时城有限差分法 维FDTD
1 一维FDTD 时域有限差分法
2.2一维标量波动方程的FDTD 自由空间中的 Maxwell方程 aE -VXH at ah V×E at 简单的一维情况 aE 1 aHy aH 1 dE uo az 2021/12/10
2 2.2 一维标量波动方程的FDTD 0 1 t = E H 0 1 t = − H E 自由空间中的Maxwell 方程 简单的一维情况 0 x 1 H y t z = − E 0 y 1 x H E t z = − 2021/12/10
对时间和空间差分 aE 1H, at az E12(k)-E12(k)1H(k+1/2)-H”(k-1/2) △t aH I dE at az Hy(k+1/2)-H”(k+1/2)1Ex2(k+1)-E2(k 2021/12/10
3 对时间和空间差分 0 x 1 H y t z = − E 0 y 1 x H E t z = − ( ) ( ) ( ) ( ) 1/2 1/2 0 1 1/ 2 1/ 2 n n n n x x y y k k k k t x + − − + − − = − E E H H ( ) ( ) ( ) ( ) 1 1/2 1/2 0 1/ 2 1/ 2 1 1 n n n n y y x x k k k k t x + + + + − + + − = − H H E E 2021/12/10
Ex+2(k)-E(k)1H(k+1/2)-H”(k-1/2) △t Eo △x Hn(k+1/2)-H"(k+1/2 1Ex2(k+1)-Ex2(k) LX E -12 k-2 k-1 k+2 k-11/2k-1/2 k+l/2 k+11/2 k+2l/2 E n+In k-2 k k+1 k+2 Figure 1.1 Interleaving of the E and H fields in space and time in the FDTD formulation To calculate H,(k+ 1/ 2), for instance, the neighboring values of E, at k and k+I are nceded. Similarly, to calculate Er(k+ 1). the value of H, at k+1/2 and k+I 1/2 are needed
( ) ( ) ( ) ( ) 1/2 1/2 0 1 1/ 2 1/ 2 n n n n x x y y k k k k t x + − − + − − = − E E H H ( ) ( ) ( ) ( ) 1 1/2 1/2 0 1/ 2 1/ 2 1 1 n n n n y y x x k k k k t x + + + + − + + − = − H H E E
The figure below represents the FDTD method. The orange triangles represent approximations of Er while the purple triangles represent Hr ap proximations. Each row corresponds to a specific instant in time, at half time steps, whereas each column represents a single spacial grid point through time. The gray and blue grid line represent whole and half steps respec tively, in both time and space. The initial values that must be given are the green circles, and the boundaries are the orange and purple circles (H)+2 k+ (Ex)k+2 The FDTD Approximation grid n+2 72+ 7+1 + 7 kk+2 k+l kite
5
进一步,得到迭代公式 E+2(k)=En-2 △ 4rh”(k+1/2)-H(k-1/2) H(k+12)=H"(k+12)[E2(k+1)-E2(k)] △x 编程实践中,一般取 E E 则 E n+1/2 1△ (k)=En2(k) unE a [f"(k+12)-f”(k-12) ;“(+12)=B(+12)-0([E:“(+)+E(
进一步,得到迭代公式 ( ) ( ) ( ) ( ) 1/2 1/2 0 1/ 2 1/ 2 n n n n x x y y t k k k k x + − = − + − − E E H H ( ) ( ) ( ) ( ) 1 1/2 1/2 0 1/ 2 1/ 2 1 n n n n y y x x t k k k k x + + + + = + − + − H H E E 编程实践中,一般取 0 0 E E = 则: ( ) ( ) ( ) ( ) 1/2 1/2 0 0 1 1/ 2 1/ 2 n n n n x x y y t k k k k x + − = − + − − E E H H ( ) ( ) ( ) ( ) 1 1/2 1/2 0 0 1 1/ 2 1/ 2 1 n n n n y y x x t k k k k x + + + + = + − + − H H E E
若网格尺寸确定,则时间间隔就确定了 那么 C △x 77 E。△x 0 2 2021/12/10
7 若网格尺寸确定,则时间间隔就确定了 0 2 x t c = 那么 0 0 0 0 1 1 / 2 2 t x c x x c = = = 2021/12/10
for n =2: max time-1 iNner Loop E -Increments electric wave in space for k = 2: max_space E(k) E(k)+eta*(H(k-1)-H(k)); end %Hard Source- imposes a value on the grid pulse exp(-5*((to-n)/spread)"2); E(center__problem_space)= pulse; %Inner Loop H Increments magnetic wave in space for J =1: max_space-1 H(j)=H(j)+eta*(E(j)-E(j+1)); end end E2(k)=En2(k)-0.[”(k+1/2)-(k-12) 分(k+1/2)=B(+12)-05E(+1)-E2(k)
( ) ( ) ( ) ( ) 1/2 1/2 0.5 1/ 2 1/ 2 n n n n x x y y k k k k + − = − + − − E E H H ( ) ( ) ( ) ( ) 1 1/2 1/2 1/ 2 1/ 2 0.5 1 n n n n y y x x k k k k + + + + = + − + − H H E E
We define two important arrays E zeros(max_space, 1) %Initialize Electric array H = E iNitialize Magnetic array Two things are important in understanding the algorithm compared to the equations. The first is that the values of array e are updated at time n+ 1/2 whereas the values of array H are updated at time n+ 1 The other factor in the time equation is the placement of the pulse. It happens between the updates of array E and array H. So the pulse is factored into the arrays H and e at time step n and n+1/2 respectively. A visualization of this process is given in the figure below E(k+1)at n Array h outer Pulse added to array e loop n Trav E E(k′+1) from n-1 kk+ k+1 k E(k)H(j)E(k+1)H(j+1)
9 Two things are important in understanding the algorithm compared to the equations. The first is that the values of array E are updated at time n+1/2 whereas the values of array H are updated at time n + 1: The other factor in the time equation is the placement of the pulse. It happens between the updates of array E and array H. So the pulse is factored into the arrays H and E at time step n and n+1/2 respectively. A visualization of this process is given in the figure below
Simulation of electric and magnetic pulse at time n=100 Simulation of electric Pulse 0.5 0.5 100 120 140 160 180 imulation of magnetic Pulse 0.5 0.5 100 120 140160180200
10