Lecture 4b -- Maxwell's Equations on a Yee Grid · í ì l í ì l î ì í õ í ó & ] v ] r ] (...

27
10/10/2019 1 Advanced Computation: Computational Electromagnetics Maxwell’s Equations on a Yee Grid Outline Yee Grid Maxwell’s equations on a Yee grid Finite-difference approximations of Maxwell’s equations on a Yee grid Consequences of the Yee grid Alternative grids Slide 2

Transcript of Lecture 4b -- Maxwell's Equations on a Yee Grid · í ì l í ì l î ì í õ í ó & ] v ] r ] (...

Page 1: Lecture 4b -- Maxwell's Equations on a Yee Grid · í ì l í ì l î ì í õ í ó & ] v ] r ] ( ( v µ ] } v ( } í ^ o ] ï ï]] \ [] + + \ ([H w w w wc c LMN LM N

10/10/2019

1

Advanced Computation:Computational Electromagnetics

Maxwell’s Equationson a Yee Grid

Outline• Yee Grid• Maxwell’s equations on a Yee grid• Finite-difference approximations of Maxwell’s equations on a Yee grid• Consequences of the Yee grid• Alternative grids

Slide 2

Page 2: Lecture 4b -- Maxwell's Equations on a Yee Grid · í ì l í ì l î ì í õ í ó & ] v ] r ] ( ( v µ ] } v ( } í ^ o ] ï ï]] \ [] + + \ ([H w w w wc c LMN LM N

10/10/2019

2

Slide 3

Yee Grid

Kane S. Yee

Slide 4

Kane S. Yee

Kane S. Yee was born in Canton, China on March 26, 1934. He received a B.S.E.E., M.S.E.E and Ph.D. in Applied Mathematics from the University of California at Berkeley in 1957, 1958, and 1963, respectively.

He did research on electromagnetic diffraction while employed by Lockheed Missile and Space Co. (1959-1961). He has been associated with the Lawrence Livermore Laboratory since 1963. At present he is a professor in mathematics at Kansas State University. His main areas of interest are electromagnetics, hydrodynamics and numerical solution to partial differential equations.

K. S. Yee, “A Closed-Form Expression for the Energy Dissipation in a Low-Loss Transmission Line,” IEEE Trans. Nuclear Science, vol. 21, no. 1, pp. 1006-1008, 1974.

Page 3: Lecture 4b -- Maxwell's Equations on a Yee Grid · í ì l í ì l î ì í õ í ó & ] v ] r ] ( ( v µ ] } v ( } í ^ o ] ï ï]] \ [] + + \ ([H w w w wc c LMN LM N

10/10/2019

3

3D Grids

Slide 5

A three-dimensional grid looks like this:

One cell from the grid looks like this:

x y

z

, , grid resolution parametersx y z

𝑁=15

𝑁 = 10𝑁 = 10

Collocated Grid

Slide 6

Within the grid cell, where should Ex, Ey, Ez, Hx, Hy, and Hz be placed?

A straightforward approach would be to locate all of the field components at a common point within in a grid cell; perhaps at the origin.

xE

xy

z

xHyEyH

zEzH

Page 4: Lecture 4b -- Maxwell's Equations on a Yee Grid · í ì l í ì l î ì í õ í ó & ] v ] r ] ( ( v µ ] } v ( } í ^ o ] ï ï]] \ [] + + \ ([H w w w wc c LMN LM N

10/10/2019

4

Yee Grid

Slide 7

Instead, the field components will be staggered within the grid cell.

K. S. Yee, “Numerical solution of the initial boundary value problems involving Maxwell’s equations in isotropic media,” IEEE Trans. Microwave Theory and Techniques, vol. 44, pp. 61–69, 1966.

Stereo Image of Yee Cell

Slide 8

To view the Yee cell if full 3D, look past the image above so that they appear double. When the double images overlap so that you see three Yee cells, the middle image will be three-dimensional.

Page 5: Lecture 4b -- Maxwell's Equations on a Yee Grid · í ì l í ì l î ì í õ í ó & ] v ] r ] ( ( v µ ] } v ( } í ^ o ] ï ï]] \ [] + + \ ([H w w w wc c LMN LM N

10/10/2019

5

Yee Cell for 1D, 2D, and 3D Grids

Slide 9

xy

z

xEyE

zE

xHyH

zH

3D Yee Grid

2D Yee Grids

zE

xHyH

xy

xy

zHyE

xE

E Mode

H Mode

1D Yee Grids

z

xE

yH

yExH

Ey Mode

Ex Mode

z

* These are the same for isotropic materials.

Reasons to Use the Yee Grid

Slide 10

0E

0H

1. Divergence-free3. Elegant arrangementto approximate curl equations

2. Physical boundary conditions are naturally satisfied

Page 6: Lecture 4b -- Maxwell's Equations on a Yee Grid · í ì l í ì l î ì í õ í ó & ] v ] r ] ( ( v µ ] } v ( } í ^ o ] ï ï]] \ [] + + \ ([H w w w wc c LMN LM N

10/10/2019

6

Visualizing Extended Yee Grids

Slide 11

y

x

ij

222 Grid

44 Grid (E Mode)

Slide 12

Finite-Difference Approximations of

Maxwell’s Equationson a Yee Grid

Page 7: Lecture 4b -- Maxwell's Equations on a Yee Grid · í ì l í ì l î ì í õ í ó & ] v ] r ] ( ( v µ ] } v ( } í ^ o ] ï ï]] \ [] + + \ ([H w w w wc c LMN LM N

10/10/2019

7

Starting Point

Slide 13

0

0

0

0

0

0

yzxx x

x zyy y

y xzz z

yzxx x

x zyy y

y xzz z

EEk H

y z

E Ek H

z xE E

k Hx y

HHk E

y z

H Hk E

z x

H Hk E

x y

Start with Maxwell’s equations in the following form.

Here only diagonally anisotropic material tensors were retained. This will be needed to incorporate a uniaxial perfectly matched layer (UPML) absorbing boundary condition.

These equations are valid independent of the chosen sign convention.

Normalize the Grid Coordinates

Slide 14

0x k x 0y k y 0z k z

yzxx x

x zyy y

y xzz z

yzxx x

x zyy y

y xzz z

EEH

y z

E EH

z xE E

Hx y

HHE

y z

H HE

z x

H HE

x y

The grid is normalized according to

This “absorbs” the k0 term into the spatial derivatives and simplifies Maxwell’s equations to

0

0

0

0

0

0

yzxx x

x zyy y

y xzz z

yzxx x

x zyy y

y xzz z

EEk H

y z

E Ek H

z xE E

k Hx y

HHk E

y z

H Hk E

z x

H Hk E

x y

Page 8: Lecture 4b -- Maxwell's Equations on a Yee Grid · í ì l í ì l î ì í õ í ó & ] v ] r ] ( ( v µ ] } v ( } í ^ o ] ï ï]] \ [] + + \ ([H w w w wc c LMN LM N

10/10/2019

8

Starting Point

Slide 15

yz

x

z

xx

y

x

z

xz

yy

zy

EE

E E

E E

y z

z x

x

H

H

yH

xx

y

z

yz

x z

x

y

yz

y

z

x

HH

H H

y z

z x

E

H

y

HE

x

E

Finite-Difference Equation for

Slide 16

x xyz

xy z

EEH

, , ,, ki j k ixx

jxH

Page 9: Lecture 4b -- Maxwell's Equations on a Yee Grid · í ì l í ì l î ì í õ í ó & ] v ] r ] ( ( v µ ] } v ( } í ^ o ] ï ï]] \ [] + + \ ([H w w w wc c LMN LM N

10/10/2019

9

Finite-Difference Equation for

Slide 17

x xyz

xy z

EEH

, 1, , ,i j k i j kz zE

y

E

, , ,, ki j k ixx

jxH

Finite-Difference Equation for

Slide 18

x xyz

xy z

EEH

, 1, , ,i j k i j kz zE

y

E

, , ,, ki j k ixx

jxH

, , 1 , ,i j k i j ky yE

z

E

Page 10: Lecture 4b -- Maxwell's Equations on a Yee Grid · í ì l í ì l î ì í õ í ó & ] v ] r ] ( ( v µ ] } v ( } í ^ o ] ï ï]] \ [] + + \ ([H w w w wc c LMN LM N

10/10/2019

10

Finite-Difference Equation for

Slide 19

y yx z

yz x

E EH

, , ,, ki j k iyy

jyH

Finite-Difference Equation for

Slide 20

y yx z

yz x

E EH

, , 1 , ,i j k i j kx xE

z

E

, , ,, ki j k iyy

jyH

Page 11: Lecture 4b -- Maxwell's Equations on a Yee Grid · í ì l í ì l î ì í õ í ó & ] v ] r ] ( ( v µ ] } v ( } í ^ o ] ï ï]] \ [] + + \ ([H w w w wc c LMN LM N

10/10/2019

11

Finite-Difference Equation for

Slide 21

y yx z

yz x

E EH

, , 1 , ,i j k i j kx xE

z

E

, , ,, ki j k iyy

jyH

1, , , ,i j k i j kz zE

x

E

Finite-Difference Equation for

Slide 22

z zy x

zx y

E EH

, , ,, ki j k izz

jzH

Page 12: Lecture 4b -- Maxwell's Equations on a Yee Grid · í ì l í ì l î ì í õ í ó & ] v ] r ] ( ( v µ ] } v ( } í ^ o ] ï ï]] \ [] + + \ ([H w w w wc c LMN LM N

10/10/2019

12

Finite-Difference Equation for

Slide 23

z zy x

zx y

E EH

1, , , ,i j k i j ky yE

x

E

, , ,, ki j k izz

jzH

Finite-Difference Equation for

Slide 24

z zy x

zx y

E EH

1, , , ,i j k i j ky yE

x

E

, , ,, ki j k izz

jzH

, 1, , ,i j k i j kx xE

y

E

Page 13: Lecture 4b -- Maxwell's Equations on a Yee Grid · í ì l í ì l î ì í õ í ó & ] v ] r ] ( ( v µ ] } v ( } í ^ o ] ï ï]] \ [] + + \ ([H w w w wc c LMN LM N

10/10/2019

13

Finite-Difference Equation for

Slide 25

xxxyz

H

yE

z

H

, , ,, ki j kx

i jxx E

Finite-Difference Equation for

Slide 26

xxxyz

H

yE

z

H

, , , 1,i j k i j kz z

y

H H

, , ,, ki j kx

i jxx E

Page 14: Lecture 4b -- Maxwell's Equations on a Yee Grid · í ì l í ì l î ì í õ í ó & ] v ] r ] ( ( v µ ] } v ( } í ^ o ] ï ï]] \ [] + + \ ([H w w w wc c LMN LM N

10/10/2019

14

Finite-Difference Equation for

Slide 27

xxxyz

H

yE

z

H

, , , 1,i j k i j kz z

y

H H

, , ,, ki j kx

i jxx E

, , , , 1i j k i j ky yH H

z

Finite-Difference Equation for

Slide 28

yyx z

y

H H

xE

z

, , ,, ki j ky

i jyy E

Page 15: Lecture 4b -- Maxwell's Equations on a Yee Grid · í ì l í ì l î ì í õ í ó & ] v ] r ] ( ( v µ ] } v ( } í ^ o ] ï ï]] \ [] + + \ ([H w w w wc c LMN LM N

10/10/2019

15

Finite-Difference Equation for

Slide 29

yyx z

y

H H

xE

z

, , ,, ki j ky

i jyy E

, , , , 1i j k i j kx x

z

H H

Finite-Difference Equation for

Slide 30

yyx z

y

H H

xE

z

, , ,, ki j ky

i jyy E

, , 1, ,i j k i j kz zH H

x

, , , , 1i j k i j kx x

z

H H

Page 16: Lecture 4b -- Maxwell's Equations on a Yee Grid · í ì l í ì l î ì í õ í ó & ] v ] r ] ( ( v µ ] } v ( } í ^ o ] ï ï]] \ [] + + \ ([H w w w wc c LMN LM N

10/10/2019

16

Finite-Difference Equation for

Slide 31

zzy x

z

H H

yE

x

, , ,, ki j kz

i jzz E

Finite-Difference Equation for

Slide 32

zzy x

z

H H

yE

x

, , ,, ki j kz

i jzz E

, , 1, ,i j k i j ky y

x

H H

Page 17: Lecture 4b -- Maxwell's Equations on a Yee Grid · í ì l í ì l î ì í õ í ó & ] v ] r ] ( ( v µ ] } v ( } í ^ o ] ï ï]] \ [] + + \ ([H w w w wc c LMN LM N

10/10/2019

17

Finite-Difference Equation for

Slide 33

zzy x

z

H H

yE

x

, , , 1,i j k i j kx xH H

y

, , ,, ki j kz

i jzz E

, , 1, ,i j k i j ky y

x

H H

Summary of Finite-Difference Approximations of Maxwell’s Equations

Slide 34

x

y

z

yz

x z

y

xx

yy

zz

xx

yy

zz

yz

x z

y

x

x

x

y

z

EE

E E

E E

E

E

E

y z

z x

x y

y z

H

H

H

HH

H H

H H

z x

x y

, , 1, ,

, ,

,

, ,

,

, ,, 1, , ,

, , 1 , , 1, , , ,

1, , , , , 1,

,

,

, ,

, , ,

, ,

1

,

i j kx

i j ky

i j kz

i j k i

i j k i j ki j ki j kxx

i j kyy

i j ky yz z

i j k i j k i j k i j kx x z z

i j k i j k i j k i j ky y x x i j k

j

z

kz z

z

y

E E

y z

E E

E E E E

H

H

H

HH

z x

x

E E E

y

H

y

E

, , , , 1

, , , , 1

, ,

, ,

, ,

, , 1, ,

, , 1, , , ,

, ,

, ,

,, 1

,,

i j kx

i j ky

i

i j k i j ky

i j k i j k i j k i j k

i j kxx

i jx x z z

i j k i j k i j k i j k

kyy

i j kyz

kz

xz

jy x

H

H H H H

H H

z

z x

x y

H

E

E

HE

Page 18: Lecture 4b -- Maxwell's Equations on a Yee Grid · í ì l í ì l î ì í õ í ó & ] v ] r ] ( ( v µ ] } v ( } í ^ o ] ï ï]] \ [] + + \ ([H w w w wc c LMN LM N

10/10/2019

18

Slide 35

Consequences of theYee Grid

Field Components are at Physically Different Positions

Slide 36

Even though the field components reside within the same Yee cell, they are out of phase.

Any time that a wave is injected, extracted, or analyzed within a simulation, this must be accounted form.

Page 19: Lecture 4b -- Maxwell's Equations on a Yee Grid · í ì l í ì l î ì í õ í ó & ] v ] r ] ( ( v µ ] } v ( } í ^ o ] ï ï]] \ [] + + \ ([H w w w wc c LMN LM N

10/10/2019

19

Field Components are at Physically Different Positions

Slide 37

Even though the field components reside within the same Yee cell, they may reside in different media. This happens when an interface slices through the middle of a Yee cell.

This is the main reason why each field component is assigned its own material properties.

𝜀 assigned to 𝐸 .𝜀 assigned to 𝐸 .𝜀 assigned to 𝐸 .𝜇 assigned to 𝐻 .𝜇 assigned to 𝐻 .𝜇 assigned to 𝐻 .

𝜀

𝜀

𝐸 resides in 𝜀

𝐸 and 𝐸 resides in 𝜀

Dispersion on a Yee Grid

38

Recall the dispersion relation for an isotropic material with parameters r and r.2

2 2 2r r

0x y zk k k

c

The analogous dispersion relation on a frequency-domain Yee grid filled with r and r is22 22

r r

2 2 2sin sin sin

2 2 2y yx x z z

x y z

kk k

v

In this equation, the speed of light c0 is written as v because the velocity is different due to the dispersion of the grid.

Page 20: Lecture 4b -- Maxwell's Equations on a Yee Grid · í ì l í ì l î ì í õ í ó & ] v ] r ] ( ( v µ ] } v ( } í ^ o ] ï ï]] \ [] + + \ ([H w w w wc c LMN LM N

10/10/2019

20

Drawback of Structured Grids

Slide 39

Structured grids exhibit highly anisotropic dispersion.

Anisotropic Dispersion

FDM

Compensation Factor g (1 of 2)

40

The numerical dispersion equation is solved for velocity v.1

22 2 2

r r

2 2 2sin sin sin

2 2 2y yx x z z

x y z

kk kv

In the absence of grid dispersion, v should be exactly the speed of light c0. Due to the Yee grid, waves slow down by a factor g.

0v c g

We can calculate this factor by combining the above equations.

22 2

0

r r

2 2 2sin sin sin

2 2 2y yx x z z

x y z

kc k kg

Page 21: Lecture 4b -- Maxwell's Equations on a Yee Grid · í ì l í ì l î ì í õ í ó & ] v ] r ] ( ( v µ ] } v ( } í ^ o ] ï ï]] \ [] + + \ ([H w w w wc c LMN LM N

10/10/2019

21

Compensation Factor g (2 of 2)

41

We can write a simpler and more useful expression for g.

22 2

0

00

r r

1 2 2 2sin sin sin

2 2 2

2

y yx x z z

x y z

kk k

k n

k

n

g

Compensating for Numerical Dispersion

42

Given that the wave slows down by factor g in the direction of , it follows that we can compensate for the dispersion by artificially “speeding up” the wave.

We do this by decreasing the values of r and r across the entire grid by a factor of g.

k

r r r r g g

Notes:1. We can only compensate for dispersion for one direction k.2. We can only compensate for dispersion in one set of material

values r and r.3. It is best to choose average or dominant values for these

parameters.4. Choose q = 22.5° if nothing else is known.

22.5q

k

Page 22: Lecture 4b -- Maxwell's Equations on a Yee Grid · í ì l í ì l î ì í õ í ó & ] v ] r ] ( ( v µ ] } v ( } í ^ o ] ï ï]] \ [] + + \ ([H w w w wc c LMN LM N

10/10/2019

22

Slide 43

Alternative Grids

Drawbacks of Uniform Grids

Slide 44

Uniform grids are the easiest to implement, but do not conform well to arbitrary structures and exhibit high anisotropic dispersion.

Anisotropic Dispersion (see Lecture 10) Staircase Approximation (see Lecture 18)

Page 23: Lecture 4b -- Maxwell's Equations on a Yee Grid · í ì l í ì l î ì í õ í ó & ] v ] r ] ( ( v µ ] } v ( } í ^ o ] ï ï]] \ [] + + \ ([H w w w wc c LMN LM N

10/10/2019

23

Drawbacks of Structured Grids (1 of 2)

Slide 45

Structured grids are the easiest to implement, but do not conform well to arbitrary geometries.

Structured Grid Unstructured Grid

Hexagonal Grids

Slide 46

Hexagonal grids are good for minimizing anisotropic dispersion suffered on Cartesian grids. This is very useful when extracting phase information.

See Text, pp. 101-103.

Yee-FDTD

Hex-FDTD

10x

Phase Velocity as a Function of Propagation Angle

57°0° 115° 172° 229° 286° 344°

Page 24: Lecture 4b -- Maxwell's Equations on a Yee Grid · í ì l í ì l î ì í õ í ó & ] v ] r ] ( ( v µ ] } v ( } í ^ o ] ï ï]] \ [] + + \ ([H w w w wc c LMN LM N

10/10/2019

24

Nonuniform Orthogonal Grids (1 of 2)

Slide 47

Nonuniform orthogonal grids are still relatively simple to implement and provide some ability to refine the grid at localized regions.

See Text, pp. 464-471.

Nonuniform Orthogonal Grids (2 of 2)

Slide 48

Uniform Grid Simulation• 80×110×16 cells• 140,800 cells

Nonuniform Grid Simulation• 64×76×16 cells• 77,824 cells

Conclusion: Roughly 50% memory and time savings.

Page 25: Lecture 4b -- Maxwell's Equations on a Yee Grid · í ì l í ì l î ì í õ í ó & ] v ] r ] ( ( v µ ] } v ( } í ^ o ] ï ï]] \ [] + + \ ([H w w w wc c LMN LM N

10/10/2019

25

Curvilinear Coordinates

Slide 49

Maxwell’s equations can be transformed from curvilinear coordinates to Cartesian coordinates to conform to curved boundaries of a device.

M. Fusco, “FDTD Algorithm in Curvilinear Coordinates,” IEEE Trans. Ant. and Prop., vol. 38, no. 1, pp. 76-89, 1990.See Text, pp. 484-492.

Structured Nonorthogonal Grids

Slide 50

This is a particularly powerful approach for simulating periodic structures with oblique symmetries.

M. Fusco, “FDTD Algorithm in Curvilinear Coordinates,” IEEE Trans. Ant. and Prop., vol. 38, no. 1, pp. 76-89, 1990.

Page 26: Lecture 4b -- Maxwell's Equations on a Yee Grid · í ì l í ì l î ì í õ í ó & ] v ] r ] ( ( v µ ] } v ( } í ^ o ] ï ï]] \ [] + + \ ([H w w w wc c LMN LM N

10/10/2019

26

Irregular Nonorthogonal Unstructured Grids

Slide 51

Unstructured grids are more tedious to implement, but can conform to highly complex shapes while maintaining good cell aspect ratios and global uniformity.

ln x

P. Harms, J. Lee, R. Mittra, “A Study of the Nonorthogonal FDTD Method Versus the Conventional FDTD Technique for Computing Resonant Frequencies of Cylindrical Cavities,” IEEE Trans. Microwave Theory and Techniq., vol. 40, no. 4, pp. 741-746 , 1992.

Comparison of convergence rates

Bodies of Revolution (Cylindrical Symmetry)

Slide 52

Three-dimensional devices with cylindrical symmetry can be very efficiently modeled using cylindrical coordinates.

even odd

0

even odd

0

, , , cos , sin

, , , cos , sin

m

m

E e m e m

H h m h m

q q q

q q q

Devices with cylindrical symmetry have fields that are periodic around their axis. Therefore, the fields can be expanded into a Fourier series in .

Due to a singularity at 𝑟 = 0, update equations for fields on the z axis are derived differently.

See Text, Chapter 12

Page 27: Lecture 4b -- Maxwell's Equations on a Yee Grid · í ì l í ì l î ì í õ í ó & ] v ] r ] ( ( v µ ] } v ( } í ^ o ] ï ï]] \ [] + + \ ([H w w w wc c LMN LM N

10/10/2019

27

Some Devices with Cylindrical Symmetry

Slide 53

Bent WaveguidesDipole Antennas

Cylindrical Waveguides

Conical Horn Antenna

Focusing Antennas

Diffractive Lenses