N18锆合金高温变形行为研究

advertisement
South China University of Technology
Potential and Field
Xiaobao Yang
Department of Physics
www.compphys.cn
www.compphys.cn
ODE and PDE
(1) initial-value problems, which involve timedependent equations with given initial conditions;
(2) boundary-value problems, which involve differential
equations with specified boundary conditions;
(3) eigenvalue problems, which involve solutions for
selected parameters (eigenvalues) in the equations.
www.compphys.cn
www.compphys.cn
www.compphys.cn
www.compphys.cn
Invisible Cloak by Metamaterials
LIGHT
SOURCE
LIGHT
RAYS
OBJECT
METAMATERIAL
www.compphys.cn
Undetectable vs Invisible
隐形飞机
吸收掉而不是反射掉来自雷达的能量
谐振型 相消干涉和衰减结合
宽频带型 碳-耗能塑料材料
负折射
www.compphys.cn
Maxwell
Laplace
Poisson
www.compphys.cn
Maxwell Equations
Name
Differential form
Integral form
Gauss’s law:
Gauss’s law for magnetism:
Maxwell-Faraday equation
(Faraday’s law of induction):
Ampere’s circuital law
(with Maxwell's correction):
www.compphys.cn
Iterative method
www.compphys.cn
www.compphys.cn
www.compphys.cn
www.compphys.cn
Laplace’s Equation
In a region containing no charges, the electronic potentials obeys:
 V
2
 V 
2
V
x
 V

2
x
2

x
 V
2

2
y
2
2

V ( i , j , k )  V ( i  1, j , k )
x
1
x
[
 V ( i  12 )
x

 V
z
, or
 V ( i  12 )
x
2
 0
V
x
]

V ( i  1, j , k )  V ( i  1, j , k )
2x
V ( i  1, j , k )  V ( i  1, j , k )  2(V ( i , j , k )
(x)
2
www.compphys.cn
Laplace’s Equation
 V
2
x

2
 V
2
y

2
 V
2
z
2

x  y  z
V ( i  1, j , k )  V ( i  1, j , k )  2V ( i , j , k )
(x)
2
V ( i , j  1, k )  V ( i , j  1, k )  2V ( i , j , k )
(y )
2
V ( i , j , k  1)  V ( i , j , k  1)  2V ( i , j , k )
 V
(z )
x
V (i , j , k ) 
1
2
2
2
 V
2

y
2
 V
2

z
2
 0
[V ( i  1, j , k )  V ( i  1, j , k )  V ( i , j  1, k )  V ( i , j  1, k )
6
 V ( i , j , k  1)  V ( i , j , k  1)]
www.compphys.cn
Laplace’s Equation
V (i , j , k ) 
1
[V ( i  1, j , k )  V ( i  1, j , k )  V ( i , j  1, k )  V ( i , j  1, k )
6
 V ( i , j , k  1)  V ( i , j , k  1)]
V0(i,j,k) V1(i,j,k)V2(i,j,k)…
Relaxation algorithm with boundary condition.
Why it works?
www.compphys.cn
Laplace’s Equation
Take it as a diffusion equation for a new function V :
V ( x , y , z , t )
t
 V
2
 D(
x
2
 V
2

y
2
 V
2

z
2
)
The iteration in the relaxation algorithm is considered as an
evolution of time for
V ( x, y, z, t   )
www.compphys.cn
Application of Laplace’s Equation
Example of application:
V=-1
y
+1
-1
V=+1
+1
x
-1
Solid lines: metallic wall,
Dashed lines: insulating wall
Z: infinite (2-D problem)
www.compphys.cn
Application of Laplace’s Equation
 V
2
x
 V
2

2
x
2

V ( i  1, j )  V ( i  1, j )  2V ( i , j )
(x)
V ( i , j  1)  V ( i , j  1)  2V ( i , j )
(x)
V (i , j ) 
1
2
x  y
2
 V
2
x
2
 V
2

y
2
 0
[V ( i  1, j )  V ( i  1, j )  V ( i , j  1)  V ( i , j  1)
4
www.compphys.cn
Application of Laplace’s Equation
Example of application:
y
V=-1
V=+1
x
Refer to code
“prismV.m”
Schematic cross-section of a hollow metallic
prism with a solid, metallic inner conductor.
Z direction is assumed infinite.
www.compphys.cn
Application of Laplace’s Equation
Example of application:
y
V=+1
V=-1
V=0
x
Schematic of two capacitor plates held at V=1
(left plate) and V=-1 (right plate) The square
boundary surronding the plates is held at V=0.
Plates and box are assumed to be infinite
along Z direction.
www.compphys.cn
Convergence: Jacobi vs Gauss-Seidel
L x L grid problem
►Jacobi method:
V n ew ( i , j ) 
1
4
[V o ld ( i  1, j )  V o ld ( i  1, j )  V o ld ( i , j  1)  V o ld ( i , j  1)]
Convergence scaled by L4.
One factor of L2 from the increase of required number of iterations,
while another factor of L2 arises from loops due to increased grid points.
►Gauss-Seidel method:
V new ( i , j ) 
1
4
[V old ( i  1, j )  V new ( i  1, j )  V old ( i , j  1)  V new ( i , j  1)
In the code it can be simplified as:
V (i , j ) 
1
[V ( i  1, j )  V ( i  1, j )  V ( i , j  1)  V ( i , j  1)
4
www.compphys.cn
Speed up convergence: simultaneous over-relaxation (SOR)
L x L grid problem
 V ( i , j )  V ( i , j )  V ( i , j ),
*
Where V* is the new value obtained by Gauss-Seidel method.
To speed up convergence,:
V new ( i , j )    V ( i , j )  V old ( i , j )
Generally, if α≥2, the method does not converge.
If α<1  “under-relaxation”;
If 1<α<2  “over-relaxation”;
It is tested that the best choice for α is:
Refer to code “plateV_SOR.c”
 
2
and excises.
1  / L
www.compphys.cn
Potential and Fields Near Electric Charges
When charges are concluded, the electronic potentials obeys Poisson EQ:
 V
2
 V 
2
x
2
 V
2

y
2
 V
2

z
2


+q
0
x  y  z
V (i , j , k ) 
1
[V ( i  1, j , k )  V ( i  1, j , k )  V ( i , j  1, k )  V ( i , j  1, k )
6
 V ( i , j , k  1)  V ( i , j , k  1)] 
 ( i , j , k )(  x )
2
6 0
All the relaxation methods are applicable here.
www.compphys.cn
Potential and Fields Near Electric Charges
Set V=0 at the boundary by assuming the box is large enough.
www.compphys.cn
Negative refraction
n 
 22
11
假如说“隐身衣”是想让别人看不到你,
那么负折射透镜就是让你看到别人看不到的东西。
www.compphys.cn
Finite-difference time-domain method
www.compphys.cn
Integration
www.compphys.cn
Thomas Simpson
is best remembered for his work on
interpolation and numerical methods
of integration
Gauss, Karl Friedrich
German mathematician who is
sometimes called the
"prince of mathematics."
www.compphys.cn
Simpson integration
将 这 些 区 域 的 面 积 加 起 来 , 从 1 ~ n  1个 区 域 , 得 到 :
1
S = [ f ( x1 )  4 f ( x 2 )  2 f ( x 3 )  4 f ( x 4 )  ...  f ( x n )] x
3
总结系数规律是:
首尾2项的系数是1/3
其它的偶数项的系数是4/3
奇数项的系数是2/3
x1
x2
x3
x4
x5
www.compphys.cn
抛物线法积分
Numerical Integration (Simpson method)
www.compphys.cn
Integration: Number of Nodes vs Precision
Generally, the numerical integration could be
expressed as following with n+1 integration nodes:

b
a

n
f ( x) dx   Ak f ( xk )
k 0
Is it possible to have a precision with an
higher order than n in terms of
polynomial?
www.compphys.cn
Basis of the Gaussian Quadrature Rule
Revisit of Trapezoid method:
b

f ( x ) dx  c1 f ( a )  c 2 f ( b )

ba
2
a
f (a ) 
ba
f (b )
2
The two-point Gauss Quadrature Rule is an extension of the
Trapezoidal Rule approximation where the arguments of the
function are not predetermined as a and b but as unknowns
x1 and x2. In the two-point Gauss Quadrature Rule, the integral
is approximated as
b
I 

f ( x ) dx  c1 f ( x1 )  c 2 f ( x 2 )
a
www.compphys.cn
Basis of the Gaussian Quadrature Rule
The four unknowns x1, x2, c1 and c2 are found by assuming that the
formula gives exact results for integrating a general third order
polynomial,
f ( x )  a 0  a1 x  a 2 x  a 3 x .
2
Hence
b

a
b
f ( x ) dx 
 a
 a1 x  a 2 x  a 3 x
2
0
3
3
 dx
a
b

x
x
x 
  a 0 x  a1
 a2
 a3

2
3
4

a
2
3
4
 b2  a2 
 b3  a3 
 b4  a4 
 a 0  b  a   a1 
  a2 
  a3 

2
3
4






www.compphys.cn
Basis of the Gaussian Quadrature Rule
b

It follows that
f ( x ) dx  c1  a 0  a1 x1  a 2 x1  a 3 x1
2
  c 2  a 0  a1 x 2  a 2 x 2  a 3 x 2
3
2
3

a
Equating Equations the two previous two expressions yield
 b2  a2 
 b3  a3 
 b4  a4 
a 0  b  a   a1 
  a2 
  a3 

2
3
4






 c1  a 0  a1 x1  a 2 x1  a 3 x1
2
 a 0  c1  c 2   a 1  c 1 x 1  c 2
  c a  a x  a x  a x 
x   a c x  c x   a c x  c
3
2
2
0
1
2
2
2
2
2
1 1
3
2
3
2
2
2
2
3
3
1 1
x
2 2
3

www.compphys.cn
Basis of the Gaussian Quadrature Rule
Since the constants a0, a1, a2, a3
are arbitrary, we have:
b  a  c1  c 2
b a
2
2
b a
3
b a
4
ba
x1  
 2
 c1 x1  c 2 x 2
2
2
c1 
4
 c1 x1  c 2 x 2
3
1  ba




2
3

ba
x2  
 2
 c1 x1  c 2 x 2
3
3
4
2
Thus,
3
c2 
 1  b  a


2
 3 
ba
2
ba
2
www.compphys.cn
Basis of the Gaussian Quadrature Rule
Hence Two-Point Gaussian Quadrature Rule
b
 f ( x ) dx 
a
c1 f  x1   c 2 f  x 2  =
ba
2
ba 1  ba ba ba 1  ba
f
f






2
2
2
2
2
3

 3




It gives exact results for any third order polynomial.
That is, the Gaussian Quadrature gives a precision of 2n-1.
www.compphys.cn
Standard Gaussian Quadrature
In handbooks, coefficients and
arguments given for n-point
Gauss Quadrature Rule are
given for integrals
( x  m t  c; m 
ba
2
1

1
;c 
a b
)
2
n
g ( x ) dx 

i 1
ci g ( xi )
b

a
1
f ( x)dx 

1
b a ba
ba
f 
x
dx

2
2
2


[a,b][-1,1]
www.compphys.cn
Arguments and Weighing Factors
for n-point Gauss Quadrature Formulas
1
Table 1: Weighting factors c and function
arguments x used in Gauss Quadrature
Formulas.
n
 g ( x ) dx   c g ( x )
i
1
i
i 1
www.compphys.cn
Arguments and Weighing Factors
for n-point Gauss Quadrature Formulas
Table 1 (cont.) : Weighting factors c and function
arguments x used in Gauss Quadrature Formulas.
www.compphys.cn
Example for Gauss Quadrature
a) Use two-point Gauss Quadrature Rule to approximate the
distance covered by a rocket from t=8 to t=30 as given by
30

140000



x    2000 ln 
 9.8 t  dt

 140000  2100 t 

8 
b) Find the true error, E
t
for part (a).
c) Also, find the absolute relative true error,
a
for part (a).
www.compphys.cn
Solution
First, change the limits of integration from [8,30] to [-1,1], by
previous relations as follows
30

f ( t ) dt 
8
30  8
2
1

1
30  8 
 30  8
f 
x
 dx
2 
 2
1
 11  f  11 x  19  dx
1
Next, get weighting factors and function argument values from
Table 1, for the two point rule,
c1 
1 . 000000000
x1   0.577350269
c2 
1 . 000000000
x 2  0 . 577350269
www.compphys.cn
Solution (cont.)
Now we can use the Gauss Quadrature formula
1
11  f  11 x  19  dx  11c1 f  11 x1  19   11c 2 f 11 x 2  19 
1
 11 f  11(  0.5773503)  19   11 f 11(0.5773503)  19 
 11 f (12.64915)  11 f (25.35085)
 11(296.8317 )  11(708.4811)
 11058.44 m
www.compphys.cn
Solution (cont)
b) The true error, E , is
t
E t  T rue V alue  A pproxim ate V alue
 11061.34  11058.44
 2.9000 m
c) The absolute relative true error,  t , is (Exact value =
11061.34m)
t 
11061.34  11058.44
 100%
11061.34
 0.0262%
www.compphys.cn
A comparison between Gauss Quadrature and Newton-Cotes methods
I 

1
0
sin x
Set x=(t+1)/2, we get:
dx
x
I 

s in ( t 2 1 )
1
1
t 1
dt
2-point Gaussian qudrature:
sin
I 
1
(  0.5773503  1)
2
 0.5773503  1
sin

1
(0.5773503  1)
2
 0.9460411
0.5773503  1
3-point Gaussian qudrature:
sin
I  0.5555556 
1
(0.7745907  1)
2
0.7745907  1
s in
 0 .5 5 5 5 5 5 6 
sin
 0.8888889 
1
2
0 1
1
( 0 .7 7 4 5 9 0 7  1)
2
 = 0 .9 4 6 0 8 3 1
0 .7 7 4 5 9 0 7  1
www.compphys.cn
A comparison between Gauss Quadrature
and Newton-Cotes methods

The exact value should be 0.9460831...

用梯形公式,对积分区间[0,1]二分了11次用
2049个函数值,才可得到7位准确数字。

用Simpson公式对区间二分3次,用了9个函数
值,得到同样的结果。

用Gauss公式仅用了3个函数值,就得到结果。
www.compphys.cn
A summary on numerical integration

梯形求积公式和抛物线求积公式是低精度的方法
,但对于光滑性较差的函数有时比用高精度方法
能得到更好的效果。


Gauss型求积,它的节点是不规则的,所以当
节点增加时,前面的计算的函数值不能被后面利
用。计算过程比较麻烦,但精度高,特别是对计
算无穷区间上的积分和广义积分,则是其他方法
所不能比的。
www.compphys.cn
Homework




5.7, 5.8, 5.11
Sending to 17273799@qq.com
when ready
For lecture notes, refer to
http://www.compphys.cn/~xby
ang/
www.compphys.cn
Download