+ All Categories
Home > Documents > Boundary and Interface Conditions for Electromagnetic Wave Propagation …359693/FULLTEXT… ·...

Boundary and Interface Conditions for Electromagnetic Wave Propagation …359693/FULLTEXT… ·...

Date post: 20-Apr-2018
Category:
Upload: nguyenkiet
View: 224 times
Download: 4 times
Share this document with a friend
86
Boundary and Interface Conditions for Electromagnetic Wave Propagation using FDTD JON H ¨ AGGBLAD Licentiate Thesis Stockholm, Sweden 2010
Transcript
Page 1: Boundary and Interface Conditions for Electromagnetic Wave Propagation …359693/FULLTEXT… ·  · 2010-11-01Boundary and Interface Conditions for Electromagnetic Wave Propagation

Boundary and Interface Conditions forElectromagnetic Wave Propagation using FDTD

JON HAGGBLAD

Licentiate ThesisStockholm, Sweden 2010

Page 2: Boundary and Interface Conditions for Electromagnetic Wave Propagation …359693/FULLTEXT… ·  · 2010-11-01Boundary and Interface Conditions for Electromagnetic Wave Propagation

TRITA-CSC-A 2010:14ISSN-1653-5723ISRN-KTH/CSC/A--10/14--SEISBN 978-91-7415-771-0

KTH School of Computer Science and CommunicationSE-100 44 Stockholm

SWEDEN

Akademisk avhandling som med tillstand av Kungl Tekniska hogskolan framlaggestill offentlig granskning for avlaggande av teknologie licentiatexamen i numeriskanalys torsdagen den 18 november 2010 klockan 16.00 i D42, Lindstedtsvagen 5plan 4, Kungl Tekniska hogskolan, Stockholm.

c© Jon Haggblad, november 2010

Tryck: E-print AB

Page 3: Boundary and Interface Conditions for Electromagnetic Wave Propagation …359693/FULLTEXT… ·  · 2010-11-01Boundary and Interface Conditions for Electromagnetic Wave Propagation

iii

Abstract

Simulating electromagnetic waves is of increasing importance, for exam-ple, due to the rapidly growing demand of wireless communication in the fieldsof antenna design, photonics and electromagnetic compatibility (EMC). Manynumerical and asymptotic techniques have been developed and one of the mostcommon is the Finite-Difference Time-Domain (FDTD) method, also knownas the Yee scheme. This centered difference scheme was introduced by Yee in1966. The success of the Yee scheme is based on its relatively high accuracy,energy conservation and superior memory efficiency from the staggered formof defining unknowns. The scheme uses a structured Cartesian grid, which isexcellent for implementations on modern computer architectures. However,the structured grid results in loss of accuracy due to general geometry ofboundaries and material interfaces.

A natural challenge is thus to keep the overall structure of Yee schemewhile modifying the coefficients in the algorithm near boundaries and inter-faces in order to improve the overall accuracy. Initial results in this directionhave been presented by Engquist, Gustafsson, Tornberg and Wahlund in aseries of papers. Our contributions are new formulations and extensions tohigher dimensions. These new formulations give improved stability proper-ties, suitable for longer simulation times. The development of the algorithmsis supported by rigorous stability analysis. We also tackle the problem ofcontrolling the divergence free property of the solution—which is of extra im-portance in three dimensions—and present results of a number of numericaltests.

Page 4: Boundary and Interface Conditions for Electromagnetic Wave Propagation …359693/FULLTEXT… ·  · 2010-11-01Boundary and Interface Conditions for Electromagnetic Wave Propagation

iv

Page 5: Boundary and Interface Conditions for Electromagnetic Wave Propagation …359693/FULLTEXT… ·  · 2010-11-01Boundary and Interface Conditions for Electromagnetic Wave Propagation

v

Sammanfattning

Simulering av elektromagnetiska vagor ar ett omrade av allt storre vikt,drivet av behovet inom bl a telekommunikation, fotonik och elektromag-netisk kompatibilitet. Ett stort antal numeriska och asymptotiska metoderar utvecklade och anvands for detta, varav en av de vanligare ar FDTD-metoden (Finite-Difference Time-Domain), aven kallad Yee-metoden efterdess skapare, som introducerade metoden 1966. Yee-metoden har atnjutit storframgang pa grund av dess relativt hoga noggrannhet, dess energibevarandeegenskaper samt dess effektivitet som direkt foljd av den glesa mangd punk-ter som behovs. Berakningsnatet som metoden anvander sig ar av kartesiskkaraktar och lampar sig val for implementering pa moderna datorarkitekturer.Den regelbundna strukturen hos berakningsnatet besitter dock nackdelen attmaterialrander och overgangar som inte ligger parallellt med koordinataxlar-na ger upphov till en forlust av noggrannhet.

En naturlig utmaning ar darmed att forsoka bevara den effektiva regel-bundna strukturen hos Yee-metoden, men modifiera koefficienterna i meto-den langs rander och overgangar pa ett sadant satt att noggrannheten kanforbattras. Initiala resultat i denna riktning har presenteras av Engquist,Gustafsson, Tornberg och Wahlund i en serie av artiklar. I denna avhan-dling bidrar vi med nya formuleringar med fordelaktiga stabilitetsegenskagersom lampar sig val for langre simuleringstider. Dessa resultat bars upp av enrigoros stabilitetsanalys. Aven generaliseringen till hogre dimensioner behand-las, dar problemet med att hantera den divergensfria naturen hos losningarnamaste handskas med. Resultaten fran en mangd numeriska simuleringar pre-senteras.

Page 6: Boundary and Interface Conditions for Electromagnetic Wave Propagation …359693/FULLTEXT… ·  · 2010-11-01Boundary and Interface Conditions for Electromagnetic Wave Propagation

vi

Page 7: Boundary and Interface Conditions for Electromagnetic Wave Propagation …359693/FULLTEXT… ·  · 2010-11-01Boundary and Interface Conditions for Electromagnetic Wave Propagation

vii

To Marie

Page 8: Boundary and Interface Conditions for Electromagnetic Wave Propagation …359693/FULLTEXT… ·  · 2010-11-01Boundary and Interface Conditions for Electromagnetic Wave Propagation

viii

Page 9: Boundary and Interface Conditions for Electromagnetic Wave Propagation …359693/FULLTEXT… ·  · 2010-11-01Boundary and Interface Conditions for Electromagnetic Wave Propagation

Contents

1 Introduction 11.1 Maxwell’s equations . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

1.1.1 Reduction to one and two dimensions . . . . . . . . . . . . . 31.2 Computational Electromagnetics . . . . . . . . . . . . . . . . . . . . 4

1.2.1 The FDTD-method . . . . . . . . . . . . . . . . . . . . . . . 41.2.2 Other techniques . . . . . . . . . . . . . . . . . . . . . . . . . 8

1.3 Boundary conditions in the FDTD-method . . . . . . . . . . . . . . 91.3.1 Conformal methods . . . . . . . . . . . . . . . . . . . . . . . 91.3.2 Unstructured grids and hybrid methods . . . . . . . . . . . . 10

1.4 Outline and results . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

2 Boundary conditions in the Yee scheme 112.1 Inconsistencies in the standard formulation . . . . . . . . . . . . . . 11

2.1.1 Example of errors induced on boundary . . . . . . . . . . . . 122.1.2 Identifying the largest error . . . . . . . . . . . . . . . . . . . 13

2.2 Modifying the coefficients . . . . . . . . . . . . . . . . . . . . . . . . 142.2.1 Tornberg-Engquist . . . . . . . . . . . . . . . . . . . . . . . . 142.2.2 Time-stability for a class of modified coefficients . . . . . . . 162.2.3 Reconciling accuracy and stability requirements . . . . . . . . 232.2.4 Piecewise and partially modified coefficients . . . . . . . . . . 26

2.3 Numerical results in 2D . . . . . . . . . . . . . . . . . . . . . . . . . 272.4 Numerical results in 3D . . . . . . . . . . . . . . . . . . . . . . . . . 35

2.4.1 Constant field . . . . . . . . . . . . . . . . . . . . . . . . . . . 362.4.2 Harmonic wave field on plane surface . . . . . . . . . . . . . . 392.4.3 Harmonic wave field on a perfectly conducting sphere . . . . 402.4.4 On the growth of stationary error on the inner boundary . . 52

3 Interface conditions in the Yee scheme 553.1 Tornberg-Engquist style modifications for the interface problem . . . 553.2 Constructing a bounded updating stencil . . . . . . . . . . . . . . . . 573.3 Numerical results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61

3.3.1 Constant field . . . . . . . . . . . . . . . . . . . . . . . . . . . 64

ix

Page 10: Boundary and Interface Conditions for Electromagnetic Wave Propagation …359693/FULLTEXT… ·  · 2010-11-01Boundary and Interface Conditions for Electromagnetic Wave Propagation

x CONTENTS

3.3.2 Harmonic wave on plane surface . . . . . . . . . . . . . . . . 64

References 71

Page 11: Boundary and Interface Conditions for Electromagnetic Wave Propagation …359693/FULLTEXT… ·  · 2010-11-01Boundary and Interface Conditions for Electromagnetic Wave Propagation

Acknowledgements

First and foremost I would like to thank my advisors, Prof. Bjorn Engquist andProf. Olof Runborg for their continued guidance and support. I thank Bjorn forarranging several visits for me to the University of Texas at Austin, as well asinviting me to his family’s home. Olof has provided many invaluable discussionsregarding the finer points of numerics and has always had time for my questions,for which I am immensely grateful.

Of course, I would also like to thank my colleagues at the Department forNumerical Analysis for providing such a pleasant work atmosphere.

I also thank my loving wife, Marie, who had to endure me often being late homefrom work, usually later than promised.

Financial support has been provided mainly by SSF through CIAM, but alsoby Wallenbergsstiftelserna, and is gratefully acknowledged.

xi

Page 12: Boundary and Interface Conditions for Electromagnetic Wave Propagation …359693/FULLTEXT… ·  · 2010-11-01Boundary and Interface Conditions for Electromagnetic Wave Propagation
Page 13: Boundary and Interface Conditions for Electromagnetic Wave Propagation …359693/FULLTEXT… ·  · 2010-11-01Boundary and Interface Conditions for Electromagnetic Wave Propagation

Chapter 1

Introduction

Maxwell’s equations are concise mathematical formulations for a wide variety ofelectromagnetic phenomena. Thus it is only natural that this thesis start out witha brief description of these equations, followed by a brief overview of some commonnumerical methods—and the FDTD-method especially—to obtain explicit solu-tions.

At the end of the chapter, in Section 1.4 we present an outline of our con-tributions, dealing with the treatment of curved boundaries and interfaces whencomputing solutions using FDTD.

1.1 Maxwell’s equations

The starting point is Maxwell’s equations, see e.g. [21], which are usually writtenin SI units as

∂tB +∇×E = 0, (1.1)∂tD−∇×H = −Jf , (1.2)

∇ ·D = ρf , (1.3)∇ ·B = 0. (1.4)

We have two equations—Faraday’s law (1.1) and Ampere’s law (1.2)—governingthe time evolution, and two related to charge sources, Gauss’s law (1.3) and thecondition for the absence of free magnetic poles (1.4). Here E the electric field[V/m], D is the electric displacement field [C/m2], B is the magnetic flux density[T] = [Wb/m2], H is the magnetic field [A/m], ρf is the free charge density [C/m3]and Jf is the free current density [A/m2]. These fields are related through

D = ε0E + P, (1.5)

H = Bµ0−M, (1.6)

1

Page 14: Boundary and Interface Conditions for Electromagnetic Wave Propagation …359693/FULLTEXT… ·  · 2010-11-01Boundary and Interface Conditions for Electromagnetic Wave Propagation

2 CHAPTER 1. INTRODUCTION

where ε0 = 1/(c20µ0) ≈ 8.854187817 · 10−12F/m is the vacuum permittivity, µ0 =4π · 10−7Vs/Am is the vacuum permeability and c0 = 299792458m/s is the speedof light in vacuum. These are all defined constants, see ISO 31-5 [1] or ISO/IEC80000-6 [2]. Furthermore, in these expressions we have P, which is the polarization[C/m2] and M, which is the magnetization [A/m]. For the case of linear isotropicand non-dispersive materials—which is the case we will restrict ourselves to—thesetwo relations (1.5–1.6) can be simplified to

D = εE, (1.7)B = µH, (1.8)

where ε = ε0εr and µ = µ0µr. The quantities εr and µr are referred to as the rel-ative permittivity and relative permeability, respectively. These depend on spatialvariable, i.e., ε = ε(x), µ = µ(x). For conductive materials we also get attenuationof the E fields, creating a current density

Jf = σE + J′f , (1.9)

where σ is the electric conductivity. Here we introduce J′f as the free currentdensity arising from sources other than conductivity [42]. Using these expressionsand simplifications we can write the system as

µ∂tH = −∇×E, (1.10)ε∂tE = ∇×H− σE− J′f , (1.11)

∇ · (εE) = ρf , (1.12)∇ · (µH) = 0. (1.13)

Note that from (1.1–1.4) the equation of continuity of free electric charge,

∂ρf∂t

+∇ ·Jf = 0, (1.14)

follows by taking the divergence of Ampere’s law (1.2) and inserting Gauss law(1.3).

From the perspective of time evolution, the two divergence equations (1.3–1.4)are best viewed as initial conditions for the fields, since the two time evolutionequations (1.1–1.2) preserves these conditions if charge conservation is not violated.We will mainly consider the vacuum case σ = 0, J′f = 0, thus we focus on

µ∂tH = −∇×E, (1.15)ε∂tE = ∇×H, (1.16)

where µ = µ(x), ε = ε(x).The conditions at a surface of discontinuity between two different regions, de-

noted 1 and 2 with the normal vector n directed from region 1 to region 2, follows

Page 15: Boundary and Interface Conditions for Electromagnetic Wave Propagation …359693/FULLTEXT… ·  · 2010-11-01Boundary and Interface Conditions for Electromagnetic Wave Propagation

1.1. MAXWELL’S EQUATIONS 3

directly from Maxwell’s equations and are given by

n · (ε2E2 − ε1E1) = σf , (1.17)n× (E2 −E1) = 0, (1.18)

n · (µ2H2 − µ1H1) = 0, (1.19)n× (H2 −H1) = Kf . (1.20)

The important special case of the boundary conditions along a perfect electric con-ductor (PEC) for which there are no surface charges or currents, is given by

n · εE = σf , (1.21)n×E = 0, (1.22)n ·µH = 0, (1.23)

n×H = Kf . (1.24)

Here σf denotes the surface charge and Kf the surface currents. The normal ispointing away from the PEC surface. Note that (1.21) and (1.24) are not reallyboundary conditions, since the surface charge and currents are unknowns. Also,(1.23) can be shown to be a consequence of (1.22). Thus the defining relation fora PEC is (1.22), which states that the tangential electric field always is zero.

Another way to formulate the two time evolution equations (1.1) and (1.2), isas the hyperbolic system

ut = Aux +Buy + Cuz, (1.25)

where u =(Ex, Ey, Ez, Hx, Hy, Hz

)T . Observe that the symbol Aξ1 + Bξ2 + Cξ3for ‖ξ‖ = 1 has six eigenvalues λ = −c,−c, 0, 0, c, c, corresponding to the wavepropagation with velocity c and stationary divergence free fields.

For a more detailed discussion we refer to a textbook on electromagnetics, suchas [21, 42, 36].

1.1.1 Reduction to one and two dimensionsIn two dimensions the system (1.15–1.16) reduces to two independent set of equa-tions. These are the transverse magnetic (TM) polarization

ε∂tEz = ∂xHy − ∂yHx, (1.26)µ∂tHx = −∂yEz, (1.27)µ∂tHy = ∂xEz, (1.28)

and the transverse electric (TE) polarization

µ∂tHz = ∂yEx − ∂xEy, (1.29)ε∂tEx = ∂yHz, (1.30)ε∂tEy = −∂xHz, (1.31)

Page 16: Boundary and Interface Conditions for Electromagnetic Wave Propagation …359693/FULLTEXT… ·  · 2010-11-01Boundary and Interface Conditions for Electromagnetic Wave Propagation

4 CHAPTER 1. INTRODUCTION

where ε = ε(x, y) and µ = µ(x, y). Here we assumed that there are no variationsalong the z-axis, which is why these two polarizations are usually refered to as TMz

and TEz. Not only are they similar, but equivalent in the sense that we can usethe notation of acoustic waves

pt = a(x, y) (ux + vy) , (1.32)ut = b(x, y)px, (1.33)vt = b(x, y)py. (1.34)

and simply substitute a = 1/ε, b = 1/µ together with p = Ez, v = −Hx, u = Hy

or p = Hz, u = −Ey, v = Ex to get the TMz and TEz mode, respectively. Writingthis with pressure p and velocity vector u = (u, v),

pt = a(x, y)∇ ·u, (1.35)ut = b(x, y)∇p, (1.36)

we easily see that this is the usual second order wave equation

ptt = a∇ · b∇p, (1.37)

Thus in one dimension we get the we get the obvious reduction of (1.32–1.34) top and u or, if we assume constant coefficients, the standard second order waveequation, utt = c2uxx, ab = c2.

1.2 Computational Electromagnetics

Computational electromagnetics (CEM) is, broadly speaking, the study of con-structive methods for Maxwell’s equations (1.1–1.4). In other words, this meansthe construction (computation) of explicit solutions.

There are many different numerical methods to compute the fields, each withits own strengths and weaknesses. The basic concern is to balance accuracy andcomputational effort, where computational effort also includes associated difficultiessuch as the construction of a suitable mesh, as well as implementation (program-ming) complexity.

Possible applications include any type of electromagnetic phenomena, e.g., an-tennas, radars and wireless communications, electronics, photonics, electromagneticcompatibility (EMC), and medical imaging. In this treatment we are mainly inter-ested in wave type situations, which we solve using uniform spatial and temporaldiscretization and finite difference approximations.

1.2.1 The FDTD-methodThe Finite-Difference Time-Domain method (FDTD), also referred to as the Yeescheme after its inventor [44], is the application of centered differences on a stag-gered grid together with explicit leapfrog time updates on the full Maxwell equations

Page 17: Boundary and Interface Conditions for Electromagnetic Wave Propagation …359693/FULLTEXT… ·  · 2010-11-01Boundary and Interface Conditions for Electromagnetic Wave Propagation

1.2. COMPUTATIONAL ELECTROMAGNETICS 5

in time domain. Leapfrog in time means we update according to

Hn+1/2 = Hn−1/2 − ∆tµ∇×En, (1.38)

En+1 = En + ∆tε∇×Hn+1/2 (1.39)

where tn = n∆t.If we then replace the partial derivatives in the curl operators with discrete

differences, we get on component form the complete set of equations for the Yeescheme according to1,

Hx

∣∣n+ 12

i,j+ 12 ,k+ 1

2= Hx

∣∣n− 12

i,j+ 12 ,k+ 1

2+ ∆t

µ

(D+zEy

∣∣ni,j+ 1

2 ,k−D+yEz

∣∣ni,j,k+ 1

2

)(1.40)

Hy

∣∣n+ 12

i+ 12 ,j,k+ 1

2= Hy

∣∣n− 12

i+ 12 ,j,k+ 1

2+ ∆t

µ

(D+xEz

∣∣ni,j,k+ 1

2−D+zEx

∣∣ni+ 1

2 ,j,k

)(1.41)

Hz

∣∣n+ 12

i+ 12 ,j+

12 ,k

= Hz

∣∣n− 12

i+ 12 ,j+

12 ,k

+ ∆tµ

(D+yEx

∣∣ni+ 1

2 ,j,k−D+xEy

∣∣ni,j+ 1

2 ,k

)(1.42)

Ex∣∣n+1i+ 1

2 ,j,k= Ex

∣∣ni+ 1

2 ,j,k− ∆t

ε

(D+zHy

∣∣ni+ 1

2 ,j,k−12−D+yHz

∣∣ni+ 1

2 ,j−12 ,k

)(1.43)

Ey∣∣n+1i,j+ 1

2 ,k= Ey

∣∣ni,j+ 1

2 ,k− ∆t

ε

(D+xHz

∣∣ni− 1

2 ,j+12 ,k−D+zHx

∣∣ni,j+ 1

2 ,k−12

)(1.44)

Ez∣∣n+1i,j,k+ 1

2= Ez

∣∣ni,j,k+ 1

2− ∆t

ε

(D+yHx

∣∣ni,j− 1

2 ,k+ 12−D+xHy

∣∣ni− 1

2 ,j,k+ 12

)(1.45)

where the mesh is defined as

Ex∣∣ni+ 1

2 ,j,k, i = 1, . . . , Nx, j = 1, . . . , Ny + 1, k = 1, . . . , Nz + 1, (1.46)

Ey∣∣ni,j+ 1

2 ,k, i = 1, . . . , Nx + 1, j = 1, . . . , Ny, k = 1, . . . , Nz + 1, (1.47)

Ez∣∣ni,j,k+ 1

2, i = 1, . . . , Nx + 1, j = 1, . . . , Ny + 1, k = 1, . . . , Nz, (1.48)

Hx

∣∣n− 12

i,j+ 12 ,k+ 1

2, i = 1, . . . , Nx + 1, j = 1, . . . , Ny, k = 1, . . . , Nz, (1.49)

Hy

∣∣n− 12

i+ 12 ,j,k+ 1

2, i = 1, . . . , Nx, j = 1, . . . , Ny + 1, k = 1, . . . , Nz, (1.50)

Hx

∣∣n− 12

i+ 12 ,j+

12 ,k, i = 1, . . . , Nx, j = 1, . . . , Ny, k = 1, . . . , Nz + 1, (1.51)

where n = 0, . . . , Nt and Nx, Ny, Nz are the number of cells in each direction. Theunit cell is illustrated in Figure 1.1. Each component has the coordinates

(xi, yj , zk) = ((i− 1)hx, (j − 1)hy, (k − 1)hz) , (1.52)

which is valid also for half indices. The reason the coordinates are shifted by minusone is to avoid the use of zero index in the implementation. This of course is

Page 18: Boundary and Interface Conditions for Electromagnetic Wave Propagation …359693/FULLTEXT… ·  · 2010-11-01Boundary and Interface Conditions for Electromagnetic Wave Propagation

6 CHAPTER 1. INTRODUCTION

Ex

Ey

Ez

Hx

Hy

Hz

x

y

z

Figure 1.1: Unit cell for the Yee scheme

completely arbitrary. The difference operator D+x is forward difference along thespecified coordinate, i.e.,

D+xEz∣∣i,j,k+ 1

2=Ez∣∣i+1,j,k+ 1

2− Ez

∣∣i+1,j,k+ 1

2

hx. (1.53)

Although this is a forward difference, they way it appears in the FDTD algorithm(1.40–1.45) makes the differences centered.

In two dimensions with the acoustic equations the discretized system becomes

pn+ 1

2j+ 1

2 ,l+12

= pn− 1

2j+ 1

2 ,l+12

+ ∆taj+ 12 ,l+

12

(D+xu

nj,l+ 1

2+D+yv

nj+ 1

2 ,l

), (1.54)

un+1j,l+ 1

2= unj,l+ 1

2+ ∆tbj,l+ 1

2D−xp

n+ 12

j+ 12 ,l+

12, (1.55)

vn+1j+ 1

2 ,l= vnj+ 1

2 ,l+ ∆tbj+ 1

2 ,lD−yp

n+ 12

j+ 12 ,l+

12. (1.56)

(1.57)

1Note that we move the sign, −∇ × E → +(−∇ × E), ∇ × H → −(−∇ × H), this is byconvention.

Page 19: Boundary and Interface Conditions for Electromagnetic Wave Propagation …359693/FULLTEXT… ·  · 2010-11-01Boundary and Interface Conditions for Electromagnetic Wave Propagation

1.2. COMPUTATIONAL ELECTROMAGNETICS 7

v

p u

v

p u

v

p u

v

p u

v

p u

v

p u

v

p u

v

p u

v

p u

v v v

u

u

u

S

N

W E

Figure 1.2: The notation used for the p-update stencil.

where

D+xuj,l+ 12

=uj+1,l+ 1

2− uj,l+ 1

2

hx, (1.58)

D+yvj+ 12 ,l

=vj+ 1

2 ,l+1 − vj+ 12 ,l

hy, (1.59)

D−xpj+ 12 ,l+

12

=pj+ 1

2 ,l+12− pj− 1

2 ,l+12

hx, (1.60)

D−ypj+ 12 ,l+

12

=pj+ 1

2 ,l+12− pj+ 1

2 ,l−12

hy, (1.61)

Here the mesh is defined by cells centered on p, i.e.,

pn− 1

2j+ 1

2 ,k+ 12

j = 1, . . . , Nx, k = 1, . . . , Ny,unj,k+ 1

2j = 1, . . . , Nx + 1, k = 1, . . . , Ny,

vnj+ 1

2 ,kj = 1, . . . , Nx, k = 1, . . . , Ny + 1,

(1.62)

with the field coordinates being given by

(xj , yk) = ((j − 1)hx, (l − 1)hy) (1.63)

and the time levels are attn = n∆t. (1.64)

When discussing the update stencil for p we will usually use the compass notationuj+1,l+1/2 = uE, uj,l+1/2 = uW, vj+1/2,l+1 = vN, uj+1/2,l = vS, illustrated in Figure1.2.

Page 20: Boundary and Interface Conditions for Electromagnetic Wave Propagation …359693/FULLTEXT… ·  · 2010-11-01Boundary and Interface Conditions for Electromagnetic Wave Propagation

8 CHAPTER 1. INTRODUCTION

The FDTD algorithm is explicit, and hence for stability has an upper bound onthe timestep, i.e., a Courant–Friedrichs–Lewy (CFL) condition, which is given by

cλ ≤ 1√d, (1.65)

where d is the dimension, λ = ∆t/h and c is the wave speed.The FDTD method has proven to be very successful and is still extremely pop-

ular despite its age. Reasons for this include a very high memory efficiency due tothe staggered grid points, exact energy and divergence (charge) conservation as wellas 2nd order accuracy in both time and space. Furthermore, the uniform grid giveslow dispersion for wave like problems and makes it easy to implement on modern(e.g. multi-core) architectures. For further information on the FDTD method werefer to [37].

1.2.2 Other techniques

There are many other techniques for solving Maxwell’s equations other than theFDTD method. They include higher order approximations of the derivatives on theYee grid, see e.g. [15]. The higher order means that a coarser grid can be employedwhile still achieving sufficient accuracy. Although it is fairly straightforward todevise a higher order method for the inner domain, constructing a robust highorder method for the internal boundaries and interfaces is harder. Hence thesemethods are usually not used in applications, yet.

An alternative is to use Discontinuous Galerkin (DG) methods. These are widelystudied in the academic community, see e.g. [19, 7], and are now starting to findtheir way into the use in industry.

One approach is to reduce the domain by either going to frequency (Fourier)domain, and/or restricting the problem to the boundary giving a boundary in-tegral formulation over surface charges and currents. This last method is in theCEM community referred to as the Method of Moments (MoM) [13], and can beaccelerated by a multipole expansion, giving the much celebrated Fast MultipoleMethod (FMM) [33, 14, 11]. For scattering problems with large segments of freespace, this is very efficient and the method of choice in industry when doing, forexample, radar cross section (RCS) calculations.

One of the major obstacles in wave propagation is dealing with high frequencies,since fast oscillations give rise to a large number of unknowns, i.e, the spatial extentis large relative to the wavelength. If the frequencies are sufficiently high, thenone can use asymptotic techniques such as Geometric Optics (GO) [34, 10], theGeometric Theory of Diffraction (GTD) by Keller [23], the extension to UnifiedTheory of Diffraction (UTD) introduced by Kouyoumjian and Pathak in [24], orGaussian beam methods [30, 26]. In the integral formulation one can use PhysicalOptics as well as high frequency asymptotics, see e.g. [4, 5]. Thus for very highfrequencies the problem becomes yet simpler.

Page 21: Boundary and Interface Conditions for Electromagnetic Wave Propagation …359693/FULLTEXT… ·  · 2010-11-01Boundary and Interface Conditions for Electromagnetic Wave Propagation

1.3. BOUNDARY CONDITIONS IN THE FDTD-METHOD 9

1.3 Boundary conditions in the FDTD-method

While using a uniform grid is very efficient for computing the inner domain forhomogeneous media, when modelling curved interfaces and boundaries the approx-imation becomes coarse since it is difficult to properly resolve the geometry usingonly horizontal and vertical planes. This gives rise to the so called “Lego effect”,where objects modelled obtain a distinct block-shaped look. The term staircasingis also used frequently, especially for the 2D case. Accurate boundary treatment isof course not only important for the accuracy along the edges, but of great concernfor the entire computation since the errors generated near the boundary propagateinto the domain.

There are many techniques to improve the situation, a few of which are describedbelow.

1.3.1 Conformal methods

One of the first methods that improve on simple staircasing without going tononorthogonal coordinates or totally unstructured grids is the contour-path FDTDmethod (CP-FDTD) [22]. These methods in its initial form are plauged by late-time instabilities, regardless of the timestep used [27]. This can be fixed by e.g.adding a term to the update equations [31].

Later another scheme was introduced by Dey and Mittra [8], usually dubbed lo-cally conformal FDTD (CFDTD), which is much simpler. Since then there has beenmany contributions to the topic [12, 32]. This class of methods involve weightingthe update stencil according to the fraction of the sides of the unit cube which areinside the domain. Dey-Mittra style conformal FDTD methods modify Faraday’slaw according to

Hz

∣∣n+ 12

i+ 12 ,j+

12 ,k

= Hz

∣∣n− 12

i+ 12 ,j+

12 ,k

+ ∆tµ ·Az

∣∣i+ 1

2 ,j+12 ,k

×(lx∣∣i+ 1

2 ,j+1,k ·Ex∣∣ni+ 1

2 ,j+1,k − lx∣∣i+ 1

2 ,j,k·Ex

∣∣ni+ 1

2 ,j,k

− lx∣∣i+1,j+ 1

2 ,k·Ey

∣∣ni+1,j+ 1

2 ,k+ lx

∣∣i,j+ 1

2 ,k·Ey

∣∣ni,j+ 1

2 ,k

), (1.66)

where l and A are the length and area of the edges and faces of the cells inside thedomain. These methods reduce the errors along the boundary, but at the cost of astricter CFL-condition, usually around 0.5 − 0.7 of that of standard FDTD. Thisrestriction has motivated much of the later improved variants [45], which tries toloosen the CFL restriction, usually at the cost of complexity.

Page 22: Boundary and Interface Conditions for Electromagnetic Wave Propagation …359693/FULLTEXT… ·  · 2010-11-01Boundary and Interface Conditions for Electromagnetic Wave Propagation

10 CHAPTER 1. INTRODUCTION

1.3.2 Unstructured grids and hybrid methodsInstead of modifying the update stencil, one can modify the grid along the bound-aries. One way to do this is by using a hybrid FEM-FDTD method, where one canuse an unstructured grid to resolve the boundary. A number of such methods havebeen devised [43, 29], but it was first in [35] that a stable such method without anydissipation or timestep reduction was constructed. In this method the FDTD-cellsand the unstructed mesh is joined by a layer of pyramidal elements. Here symmetryis crucial in avoiding late time instabilities and some care must be taken in how toupdate the cells joining the structured and unstructured meshes.

1.4 Outline and results

The work in this thesis is divided into two parts, Chapter 2 and Chapter 3.In Chapter 2 we consider curved boundaries in the FDTD-method. As a starting

point we use the consistency conditions derived in [39] for modified coefficients alongthe boundary in 2D. We formulate a new way of modifying the coefficients in theupdate stencil to satisfy these conditions while at the same time obtaining time-stability. This is backed up by rigorous stability analysis. Different variants of thesemodifications are considered, each giving different compromises between long timestability and accuracy. We also extend the method in [39] to 3D, where we havethe added difficulty of controlling the divergence-free nature of the solutions. It isshown how the errors that occur can be projected away, since they are orthogonalto the space of solutions. A number of numerical tests are run to verify the findings.

Chapter 3 deals with curved interfaces in the FDTD-method. We present twonew ways of doing the modifications to obtain a lower spatial approximation error.One is by generalizing the method in [39], while the other is to directly approximatethe jump conditions. Numerical results are presented.

Page 23: Boundary and Interface Conditions for Electromagnetic Wave Propagation …359693/FULLTEXT… ·  · 2010-11-01Boundary and Interface Conditions for Electromagnetic Wave Propagation

Chapter 2

Boundary conditions in the Yee scheme

The boundary conditions for the acoustic equations (1.32–1.34) and hard reflectionsare [39]

n · (u, v) = 0, (x, y) ∈ ∂Ω, (2.1)n · ∇p = 0, (x, y) ∈ ∂Ω, (2.2)

where n is the normal vector of the boundary. This corresponds to the standardPEC boundary conditions for Maxwell’s equations [37]. For the Yee scheme we shallsee that it is enough to just enforce (2.1), which is done in the update stencil for p.We will follow the formulation in [40] where the boundary condition is implementedby setting b and the initial values of (u, v) outside the domain to zero.

2.1 Inconsistencies in the standard formulation

When the boundary ∂Ω is parallel to one of the grid axes it is straightforward toconstruct consistent boundary conditions. For example, when ∂Ω is parallel to they-axis, e.g. if Ω is equal to the left or right half plane, then (2.1) is enforced bysetting u = 0 along the edge in the update formula for p. Similarly, setting v = 0enforces (2.1) in a consistent manner for ∂Ω parallel to the x-axis, correspondingto, e.g., Ω equal to the top or bottom half plane.

However, should ∂Ω not be aligned with the grid, things are not so simple.Usually the boundary is then approximated locally by vertical and horizontal lines,giving a staircasing pattern. The advantage of this strategy is that it is easy toimplement, while the downside being a general reduction in accuracy, compared towhen approximating horizontal and vertical boundaries. In fact, for some situationsthe staircasing approximation is inconsistent and does not converge at all [39]. Onesuch case will be illustrated in Section 2.1.1. The validity of staircasing in FDTDis a well studied subject and we refer to [6, 9, 18, 20, 22] for more information.

11

Page 24: Boundary and Interface Conditions for Electromagnetic Wave Propagation …359693/FULLTEXT… ·  · 2010-11-01Boundary and Interface Conditions for Electromagnetic Wave Propagation

12 CHAPTER 2. BOUNDARY CONDITIONS IN THE YEE SCHEME

v

p u

v

p u

v

p u

v

p u

v

p u

v

p u

v

p u

v

p u

v

p u

v v v

u

u

u

u=

0

v = 0

x

y

0

0

Figure 2.1: Example of discretization where the boundary is to the right. The (u, v)components are zero on the dashed staircased boundary.

2.1.1 Example of errors induced on boundary

To illustrate the type of errors that can occur for staircasing of the boundary,consider the domain in Figure 2.1, given by

Ω = (x, y) | 2x+ y < h/4, ∂Ω = (x, y) | 2x+ y = h/4, (2.3)

Then the normal vector is n = (2, 1)/√

5 and the boundary condition (2.1) becomes2u + v = 0. If we assume a(x) = b(x) = 1 then this boundary admits the exactsolution u = 1, v = −2 and p = P , where P is an arbitrary constant. Considerthe stencil where p is at the grid point (0, 0), which is the situation depicted inFigure 2.1 where the u value at (−h/2, 0) and the v value at (0,−h/2) is inside thedomain, while u at (h/2, 0) and v at (0, h/2) is set to zero. If the field is initializedto the exact constant solution previously mentioned, then the update formula forp becomes

p1/2 = p−1/2 + ∆th

((0− u0)+

(0− v0)) = P + ∆t

h6= P. (2.4)

Hence we see that the truncation error is O(1/h) and we get an immediate O(1)error in L∞ after the first update.

This is a worst-case type scenario, but still clearly illustrate the possible errorsthat can occur. Note however, that the error in an integrated norm is not as bad.We shall see that in discrete L2 norm we still have convergence, albeit only at arate O(

√h), since the number of boundary points is of order O(1/h).

Page 25: Boundary and Interface Conditions for Electromagnetic Wave Propagation …359693/FULLTEXT… ·  · 2010-11-01Boundary and Interface Conditions for Electromagnetic Wave Propagation

2.1. INCONSISTENCIES IN THE STANDARD FORMULATION 13

2.1.2 Identifying the largest error

To be able to reduce the error being generated at the boundary, we first need toidentify the form of the O(1/h) truncation error. The derivation is based on [39].Consider the equation for p, which is pt = a(ux + vy). The spatial approximationis

a(ux + vy)∣∣∣j+1/2,l+1/2

≈aj+1/2,l+1/2

h

(uE − uW + vN − vS) . (2.5)

Consider the same situation as before in Figure 2.1, with the p stencil in the cornerof the staircasing so that the u value above and the v value to the left is zero, i.e.,uE = vN = 0. Let (x?, y?) ∈ ∂Ω be a point on the boundary. Then the Taylorexpansion of the discretization is

aoh

(uE − uW + vN − vS) =

aoh

(0−

(u(x?, y?) + (xW − x?)ux(x?, y?) + (yW − y?)uy(x?, y?) +O(h2)

)+ 0−

(v(x?, y?) + (xS − x?)vx(x?, y?) + (yS − y?)vy(x?, y?) +O(h2)

))(2.6)

and the expansion of the analytic expression around the same point is given by

a (ux + vy) = ao (ux(x?, y?) + vy(x?, y?)) +O(h). (2.7)

Here the subscript o refers to the point (x, y)o = (xj+1/2, yl+1/2). From (2.6) and(2.7) we see that the spatial truncation error term has the form

τ = aoh

(−u(x?, y?)− v(x?, y?)) +O(1). (2.8)

To see that the leading order term does not vanish we introduce the rotated coor-dinate system (ξ, η) where ξ is along the tangent line Γ? of ∂Ω at (x?, y?). In thiscoordinate system we have (u, v) = uξ + vη and the boundary condition becomesn · (u, v) = v = 0 on ∂Ω. Inserting the explicit coordinate transform(

uv

)=(

cosα − sinαsinα cosα

)(uv

)(2.9)

where α is the angle of Γ? relative to the x-axis, into (2.8) we get

τ = aoh

(−(cosα+ sinα)u(ξ?, η?)) +O(1), (2.10)

since v(ξ?, η?) = 0, where (ξ?, η?) is the coordinates for the point (x?, y?). Thusthis term does not vanish, except for the special case α = 3π/4, and τ = O(1/h).The local truncation error is defined as ∆t · τ , which becomes O(1).

Page 26: Boundary and Interface Conditions for Electromagnetic Wave Propagation …359693/FULLTEXT… ·  · 2010-11-01Boundary and Interface Conditions for Electromagnetic Wave Propagation

14 CHAPTER 2. BOUNDARY CONDITIONS IN THE YEE SCHEME

2.2 Modifying the coefficients

We want to eliminate the leading order error in (2.8) by weighting the stencils for palong the boundary. This was done successfully in [39], which is a continuation ofearlier work in [40] and [38]. We will refer to this class of of methods as Tornberg-Engquist type modifications.

2.2.1 Tornberg-EngquistConsider the generalized Yee scheme given by

a(ux + vy)∣∣∣j+1/2l+1/2

≈aj+1/2,l+1/2

h

(aEuE − aWuW + aNvN − aSvS) , (2.11)

where we have introduced the coefficients aE, aW, aN, aS inside the parenthesis.Thus for each node (xj+1/2, yl+1/2), which is where the pressure p is defined, weintroduce four new quantities. Note that coefficients for adjacent cells do not needto be the same, e.g. we can have aW

j−1/2,l+1/2 6= aEj+1/2,l+1/2.

By introducing these coefficients and Taylor expanding like in (2.6–2.7) we getthe truncation error

τ = aoh

(−aWu(x?, y?)− aSv(x?, y?)

)+O(1) (2.12)

= aoh

(−(aW cosα+ aS sinα)u(ξ?, η?)

)+O(1). (2.13)

Thus for this particular case with uE = vN = 0, we get the consistency condition

aW cosα+ aS sinα = 0. (2.14)

Unfortunately one can show [39] that it is not possible for the class of methodsgiven by (2.11) to remove the next term in the error expansion, which in this caseis of the form

− aoaW

h

((xW − x?)ux(x?, y?) + (yW − y?)uy(x?, y?)

)− aoa

S

h

((xS − x?)vx(x?, y?) + (yS − y?)vy(x?, y?)

). (2.15)

The consistency condition (2.14) corresponds to the case shown in Figure 2.2b,together with the other seven ways the boundary can intersect the update stencilfor p. It is straightforward to derive the other seven consistency conditions and wesummarize them in Table 2.1.

Preserving the CFL-condition

There are some degrees of freedom still left after we satisfy the conditions in Table2.1. In [39] the extra flexibility was used to make sure the CFL-condition of the

Page 27: Boundary and Interface Conditions for Electromagnetic Wave Propagation …359693/FULLTEXT… ·  · 2010-11-01Boundary and Interface Conditions for Electromagnetic Wave Propagation

2.2. MODIFYING THE COEFFICIENTS 15

aE cosα− aS sinα = 0 (XY1)aW cosα+ aS sinα = 0 (XY2)aE cosα+ aN sinα = 0 (XY3)aW cosα− aN sinα = 0 (XY4)

aE cosα+(aN − aS) sinα = 0 (X1)

aW cosα−(aN − aS) sinα = 0 (X2)(

aE − aW) cosα− aS sinα = 0 (Y1)(aE − aW) cosα+ aN sinα = 0 (Y2)

Table 2.1: Summary of the consistency conditions. The labeling corresponds to the onedefined in Figure 2.2.

(a) XY1 (b) XY2 (c) XY3 (d) XY4 (e) X1 (f) X2 (g) Y1 (h) Y2

Figure 2.2: The eight different cases for how the boundary can intersect the updatestencil for p.

original scheme was not affected. To obtain this it is necessary to divide the con-sistency conditions further into two cases depending on the angle. This gives Table2.2.

Time-stability

As was demonstrated clearly in [39] when modifying the coefficients in the waydescribed above, the accuracy is improved by one order, giving a convergence oforder O(h) in the final solution. The contrast between the O(1) and O(h) errorin the field for unmodified and modified coefficients, respectively is striking, cf.Figures 2.8 and 2.9.

The question of stability remains to be answered. As far as the author knowsthere is no proof of stability for these modifications of the Yee scheme. Instead, wehad to rely on our numerical experiments, where so far no indications of instabilityhave been observed. However, when attempting to extend the method to threedimensions, which is done in Section 2.4, we noted that for long times the solutionbecomes inaccurate and the L2 norm starts to grow exponentially. Further testingin the 2D case reveals that if we initialize all frequencies representable on the gridby setting the initial field to uniformly random data, then after time stepping for along time, T ≈ 5 · 103, we observe exponential growth in time, see Figure 2.3. Notethat the scheme still appears to be stable as it is bounded independently of the size∆t or number of time steps, suggesting that the bound on the solution is of the

Page 28: Boundary and Interface Conditions for Electromagnetic Wave Propagation …359693/FULLTEXT… ·  · 2010-11-01Boundary and Interface Conditions for Electromagnetic Wave Propagation

16 CHAPTER 2. BOUNDARY CONDITIONS IN THE YEE SCHEME

(XY1) α ∈ [0, π/4] aE = sinα/ cosαα ∈ (π/4, π/2] aS = cosα/ sinα

(XY2) α ∈ [π/2, 3π/4] aS = − cosα/ sinαα ∈ (3π/4, π) aW = − sinα/ cosα

(XY3) α ∈ [π/2, 3π/4] aN = − cosα/ sinαα ∈ (3π/4, π) aE = − sinα/ cosα

(XY4) α ∈ [0, π/4] aW = sinα/ cosαα ∈ (π/4, π/2] aN = cosα/ sinα

(X1) α ∈ [π/4, π/2] aN = 1− cosα/ sinαα ∈ (π/2, 3π/4] aS = 1 + cosα/ sinα

(X2) α ∈ [π/4, π/2] aS = 1− cosα/ sinαα ∈ (π/2, 3π/4] aN = 1 + cosα/ sinα

(Y1) α ∈ [0, π/4] aW = 1− sinα/ cosαα ∈ [3π/4, π) aE = 1 + sinα/ cosα

(Y2) α ∈ [0, π/4] aE = 1− sinα/ cosαα ∈ [3π/4, π) aW = 1 + sinα/ cosα

Table 2.2: Summary of the consistency conditions when we use the extra degree offreedom to keep the CFL-condition unchanged. The labeling corresponds to the onedefined in Figure 2.2.

form

‖pn−1/2‖h + ‖un‖h + ‖vn‖h ≤ Ceαtn(‖p−1/2‖h + ‖u0‖h + ‖v0‖h

), ∀n > 0,

(2.16)where C,α > 0 and tn = n∆t. The norm used is defined by the inner products

〈p(1), p(2)〉h =∑

j,l∈ΩpN

p(1)j+ 1

2 ,l+12p

(2)j+ 1

2 ,l+12h2, (2.17)

〈u(1), u(2)〉h =∑

j,l∈ΩuN

u(1)j,l+ 1

2u

(2)j,l+ 1

2h2, (2.18)

〈v(1), v(2)〉h =∑

j,l∈ΩvN

v(1)j+ 1

2 ,lv

(2)j+ 1

2 ,lh2. (2.19)

Here we use the sets ΩpN , ΩuN and ΩvN , which contains the indices corresponding tofield points inside the internal domain, for respective variable.

A possible reason why this growth was noticed in 3D before it was seen in 2Dis the higher dimension of the boundary.

2.2.2 Time-stability for a class of modified coefficientsFurther investigations of a bound on the solution reveals that if we can write thescheme in divergence form, then one can obtain time-stability, i.e., a bound inde-

Page 29: Boundary and Interface Conditions for Electromagnetic Wave Propagation …359693/FULLTEXT… ·  · 2010-11-01Boundary and Interface Conditions for Electromagnetic Wave Propagation

2.2. MODIFYING THE COEFFICIENTS 17

0 500 1000 1500 200010

−2

100

102

104

t

L2 n

orm

diffe

rence

(a) ‖pn−1/2 − p−1/2‖h

0 500 1000 1500 200010

−2

100

102

104

t

L2 n

orm

diffe

rence

(b) ‖un − u0‖h

Figure 2.3: For long times we observe exponential growth of the solution that is indepen-dent of the number of time steps, indicating that we still have stability, albeit not time-stability. We initialize the grid with uniformly random data to excite all frequencies repre-sentable on the grid. Parameters of the problem are a = b = −1, N = 64, λ = ∆t/h = 0.3,with a boundary defined by y = (x − x) tanα + √εmach for x = π(1 −

√3 +√

2/100)/2and α = π/6. Note that for the velocity field u = (u, v) we use the Euclidean norm.

pendent of T

‖pn−1/2‖h + ‖un‖h + ‖vn‖h ≤ C(‖p−1/2‖h + ‖u0‖h + ‖v0‖h

), C > 0,∀n > 0.

(2.20)To see this we start by considering an even more general class of equations, whichin the continuous case is given by

pt = a1∂x (α1u) + a2∂y (α2v) , (2.21)ut = b1∂x (β1p) , (2.22)vt = b2∂y (β2p) , (2.23)p = u = v = 0, p, u, v ∈ ∂Ω, (2.24)

where ai, αi, bi, βi, i = 1, 2 depend on x, y. Before showing the existence of a con-served quantity for the corresponding discretization, we show that the continuousPDEs has a conserved energy. The norm ‖ · ‖2 denotes the standard L2 norm.

Theorem 2.2.1. For a1β1 > 0, α1b1 > 0, α2b2 > 0 the system (2.21–2.23) has anenergy defined by

E(p, u, v) =∥∥∥√β1

a1p∥∥∥2

2+∥∥∥√α1

b1u∥∥∥2

2+∥∥∥√α2

b1v∥∥∥2

2. (2.25)

Page 30: Boundary and Interface Conditions for Electromagnetic Wave Propagation …359693/FULLTEXT… ·  · 2010-11-01Boundary and Interface Conditions for Electromagnetic Wave Propagation

18 CHAPTER 2. BOUNDARY CONDITIONS IN THE YEE SCHEME

It is exactly conserved ifβ1

a1= β2

a2, ∀x ∈ Ω. (2.26)

Proof. Define the energy

E =∫ (

Ap2 +Bu2 + Cv2) dxdy, A,B,C > 0 (2.27)

where A,B,C depends on x, y. Then we get the time derivative as

∂tE = 2∫

(Appt +Buut + Cvvt) dxdy

= 2∫Ap(a1 (α1u)x + a2 (α2v)y

)+Bub1 (β1p)x + Cvb2 (β2p)y dxdy

= 2∫− (Apa1)x α1u− (Apa2)y α2v +Bub1 (β1p)x + Cvb2 (β2p)y dxdy.

(2.28)

Hence to get ∂tE = 0 we need to have

(Apa1)x α1u = Bub1 (β1p)x , (2.29)(Apa2)y α2v = Cvb2 (β2p)y . (2.30)

Thus we get the system

Aa1 = β1, α1 = Bb1, Aa2 = β2, α2 = Cb2, (2.31)

or if we solve for A,B,C

A = β1

a1= β2

a2, B = α1

b1, C = α2

b2. (2.32)

The assumptions a1β1 > 0, α1b1 > 0, α2b2 > 0 implies that A,B,C > 0.

Now we are ready to tackle the discrete case. The discretization of (2.21–2.23)is given by

pn+ 1

2j+ 1

2 ,l+12

= pn− 1

2j+ 1

2 ,l+12

+ ∆ta(1)j+ 1

2 ,l+12D+x

(1)j,l+ 1

2unj,l+ 1

2

)+ ∆ta(2)

j+ 12 ,l+

12D+y

(2)j+ 1

2 ,lvnj+ 1

2 ,l

),

(2.33)

un+1j,l+ 1

2= unj,l+ 1

2+ ∆tb(1)

j,l+ 12D−x

(1)j+ 1

2 ,l+12pn+ 1

2j+ 1

2 ,l+12

), (2.34)

vn+1j+ 1

2 ,l= vnj+ 1

2 ,l+ ∆tb(2)

j+ 12 ,lD−y

(2)j+ 1

2 ,l+12pn+ 1

2j+ 1

2 ,l+12

), (2.35)

Page 31: Boundary and Interface Conditions for Electromagnetic Wave Propagation …359693/FULLTEXT… ·  · 2010-11-01Boundary and Interface Conditions for Electromagnetic Wave Propagation

2.2. MODIFYING THE COEFFICIENTS 19

where we assume zero outer boundary data (homogeneous Dirichlet conditions).The coefficients are assumed to be bounded from above and below. We also intro-duce

c(1)j+ 1

2 ,l+12

= 12

√a

(1)j+ 1

2l+ 1

2

β(1)j+ 1

2l+ 1

2

√α(1)j

l+ 12

b(1)j

l+ 12

+√α

(1)j+1l+ 1

2

b(1)j+1l+ 1

2

, (2.36)

c(1)j,l+ 1

2= 1

2

√a(1)j+ 1

2l+ 1

2

β(1)j+ 1

2l+ 1

2

+√a

(1)j− 1

2l+ 1

2

β(1)j− 1

2l+ 1

2

√α(1)j

l+ 12

b(1)j

l+ 12

, (2.37)

c(2)j+ 1

2 ,l+12

= 12

√a

(2)j+ 1

2l+ 1

2

β(2)j+ 1

2l+ 1

2

√α(2)j+ 1

2l

b(2)j+ 1

2l

+√α

(2)j+ 1

2l+1

b(2)j+ 1

2l+1

, (2.38)

c(2)j+ 1

2 ,l= 1

2

√a(2)j+ 1

2l− 1

2

β(2)j+ 1

2l− 1

2

+√a

(2)j+ 1

2l+ 1

2

β(2)j+ 1

2l+ 1

2

√α(2)j+ 1

2l

b(2)j+ 1

2l

. (2.39)

Theorem 2.2.2. The discretization (2.33–2.35) is time-stable, i.e.,

‖pn− 12 ‖h + ‖un‖h + ‖vn‖h ≤ C

(‖p− 1

2 ‖h + ‖u0‖h + ‖v0‖h), (2.40)

with C independent of n, if

β(1)j+ 1

2 ,l+12

a(1)j+ 1

2 ,l+12

(2)j+ 1

2 ,l+12

a(2)j+ 1

2 ,l+12

, ∀j, l ∈ ΩpN , (2.41)

andλ maxi∈1,2

maxj,l

c(i) ≤ 1− δ√2, δ > 0, (2.42)

are satisfied.

The proof follows from two Lemmas and is based on, and generalizes, the ideasin [15]. First we need to define two discrete quantities, Nh and Eh, by

Nh(pn− 12 , un, vn) =

∥∥∥√β(1)

a(1) pn− 1

2

∥∥∥2

h+∥∥∥√α(1)

b(1) un∥∥∥2

h+∥∥∥√α(2)

b(2) vn∥∥∥2

h, (2.43)

Eh(pn− 12 , un, vn) = Nh −∆t

⟨α(1)un, D−x

(β(1)pn−

12

)⟩h

−∆t⟨α(2)vn, D−x

(β(2)pn−

12

)⟩h

(2.44)

Page 32: Boundary and Interface Conditions for Electromagnetic Wave Propagation …359693/FULLTEXT… ·  · 2010-11-01Boundary and Interface Conditions for Electromagnetic Wave Propagation

20 CHAPTER 2. BOUNDARY CONDITIONS IN THE YEE SCHEME

Lemma 2.2.1. For a(i)β(i) > 0, α(i)b(i) > 0, i = 1, 2, the discretization (2.33–2.35) conserves the quantity Eh, i.e.,

Eh(pn− 12 , un, vn) = Eh(p− 1

2 , u0, v0), ∀n > 0, (2.45)

if (2.41) is satisfied.

Proof. Expanding (2.33–2.35) according to

pn+ 1

2j+ 1

2 ,l+12

= pn− 1

2j+ 1

2 ,l+12

+ ∆ta

(1)j+ 1

2 ,l+12

β(1)j+ 1

2 ,l+12

β(1)j+ 1

2 ,l+12D+x

(1)j,l+ 1

2unj,l+ 1

2

)

+ ∆ta

(2)j+ 1

2 ,l+12

β(2)j+ 1

2 ,l+12

β(2)j+ 1

2 ,l+12D+y

(2)j+ 1

2 ,lvnj+ 1

2 ,l

),

(2.46)

un+1j,l+ 1

2= unj,l+ 1

2+ ∆t

b(1)j,l+ 1

2

α(1)j,l+ 1

2

α(1)j,l+ 1

2D−x

(1)j+ 1

2 ,l+12pn+ 1

2j+ 1

2 ,l+12

), (2.47)

vn+1j+ 1

2 ,l= vnj+ 1

2 ,l+ ∆t

b(2)j+ 1

2 ,l

α(2)j+ 1

2 ,l

α(2)j+ 1

2 ,lD−y

(2)j+ 1

2 ,l+12pn+ 1

2j+ 1

2 ,l+12

), (2.48)

and then divide away the coefficient as well as multiplying with the conjugate, weget

β(1)j+ 1

2 ,l+12

a(1)j+ 1

2 ,l+12

[(pn+ 1

2j+ 1

2 ,l+12

)2−(pn− 1

2j+ 1

2 ,l+12

)2]

= ∆t(β

(1)j+ 1

2 ,l+12D+x

(1)j,l+ 1

2unj,l+ 1

2

)+ β

(2)j+ 1

2 ,l+12D+y

(2)j+ 1

2 ,lvnj+ 1

2 ,l

))(pn+ 1

2j+ 1

2 ,l+12

+ pn− 1

2j+ 1

2 ,l+12

), (2.49)

α(1)j,l+ 1

2

b(1)j,l+ 1

2

[(un+1j,l+ 1

2

)2−(unj,l+ 1

2

)2]

= ∆tα(1)j,l+ 1

2D−x

(1)j+ 1

2 ,l+12pn+ 1

2j+ 1

2 ,l+12

)(un+1j,l+ 1

2+ unj,l+ 1

2

), (2.50)

α(2)j+ 1

2 ,l

b(2)j+ 1

2 ,l

[(vn+1j+ 1

2 ,l

)2−(vnj+ 1

2 ,l

)2]

= ∆tα(2)j+ 1

2 ,lD−y

(2)j+ 1

2 ,l+12pn+ 1

2j+ 1

2 ,l+12

)(vn+1j+ 1

2 ,l+ vnj+ 1

2 ,l

). (2.51)

Page 33: Boundary and Interface Conditions for Electromagnetic Wave Propagation …359693/FULLTEXT… ·  · 2010-11-01Boundary and Interface Conditions for Electromagnetic Wave Propagation

2.2. MODIFYING THE COEFFICIENTS 21

Hence summing gives us

∥∥∥√β(1)

a(1) pn+ 1

2

∥∥∥2

h=∥∥∥√β(1)

a(1) pn− 1

2

∥∥∥2

h

+ ∆t⟨β(1)D+x

(α(1)un

)+ β(2)D+y

(α(2)vn

), pn+ 1

2 + pn−12

⟩h, (2.52)

∥∥∥√α(1)

b(1) un+1∥∥∥2

h=∥∥∥√α(1)

b(1) un∥∥∥2

h+ ∆t

⟨α(1)D−x

(β(1)pn+ 1

2

), un+1 + un

⟩h, (2.53)∥∥∥√α(2)

b(2) vn+1∥∥∥2

h=∥∥∥√α(2)

b(2) vn∥∥∥2

h+ ∆t

⟨α(2)D−y

(β(2)pn+ 1

2

), vn+1 + vn

⟩h. (2.54)

Now we need to find the form of the conserved quantity. To do this we first sumthe three terms involving inner-products in (2.52–2.54) to get

∆t⟨β(1)D+x

(α(1)un

)+ β(2)D+y

(α(2)vn

), pn+ 1

2 + pn−12

⟩h

+ ∆t⟨α(1)D−x

(β(1)pn+ 1

2

), un+1 + un

⟩h

+ ∆t⟨α(2)D−y

(β(2)pn+ 1

2

), vn+1 + vn

⟩h. (2.55)

Since both u and v are zero on the internal and external boundaries, we have theidentities

〈D+xu, v〉h = −〈u,D−xv〉h , (2.56)〈D+yu, v〉h = −〈u,D−yv〉h , (2.57)

and we can rewrite (2.55) to

−∆t⟨α(1)un, D−x

(β(1)pn+ 1

2

)⟩h−∆t

⟨α(2)vn, D−x

(β(2)pn+ 1

2

)⟩h

−∆t⟨α(1)un, D−x

(β(1)pn−

12

)⟩h−∆t

⟨α(2)vn, D−x

(β(2)pn−

12

)⟩h

+ ∆t⟨α(1)un+1, D−x

(β(1)pn+ 1

2

)⟩h

+ ∆t⟨α(2)vn+1, D−x

(β(2)pn+ 1

2

)⟩h

+ ∆t⟨α(1)un, D−x

(β(1)pn+ 1

2

)⟩h

+ ∆t⟨α(2)vn, D−x

(β(2)pn+ 1

2

)⟩h

(2.58)

which simplifies to

−∆t⟨α(1)un, D−x

(β(1)pn−

12

)⟩h−∆t

⟨α(2)vn, D−x

(β(2)pn−

12

)⟩h

+ ∆t⟨α(1)un+1, D−x

(β(1)pn+ 1

2

)⟩h

+ ∆t⟨α(2)vn+1, D−x

(β(2)pn+ 1

2

)⟩h. (2.59)

We see that we get two identical expression with opposite sign and different time lev-els n. Hence, summing (2.52–2.54) and using (2.59), we obtain Eh(pn+ 1

2 , un+1, vn+1) =Eh(pn− 1

2 , un, vn), and the conservation of Eh follows.

Page 34: Boundary and Interface Conditions for Electromagnetic Wave Propagation …359693/FULLTEXT… ·  · 2010-11-01Boundary and Interface Conditions for Electromagnetic Wave Propagation

22 CHAPTER 2. BOUNDARY CONDITIONS IN THE YEE SCHEME

Now we will derive the condition necessary for Eh to define an energy, moreprecisely a norm that is equivalent with Nh uniformly in h.

Lemma 2.2.2. Suppose (2.42) is satisfied, then

δNh ≤ Eh ≤ (2− δ)Nh. (2.60)

Proof. We need to bound the second part of (2.44). The first of these two termsexpands to

∆t∣∣∣⟨α(1)un, D−x

(β(1)pn−

12

)⟩h

∣∣∣=

∣∣∣∣∣∣∑j,l

λ(β

(1)j+ 1

2 ,l+12pn− 1

2j+ 1

2 ,l+12− β(1)

j− 12 ,l+

12pn− 1

2j− 1

2 ,l+12

(1)j,l+ 1

2unj,l+ 1

2h2

∣∣∣∣∣∣ . (2.61)

Thus using the triangle inequality as well as

νγxy ≤ 12

(1√2ν2x2 +

√2γ2y2

), (2.62)

we can bound (2.61) by

≤ λ

2∑j,l

√a

(1)j+ 1

2l+ 1

2

β(1)j+ 1

2l+ 1

2

α(1)j

l+ 12

b(1)j

l+ 12

(1√2

∣∣∣∣∣√β(1)

a(1) pn− 1

2

∣∣∣∣∣2

j+ 12

l+ 12

+√

2

∣∣∣∣∣√α(1)

b(1) un

∣∣∣∣∣2

jl+ 1

2

)h2

+√a

(1)j− 1

2l+ 1

2

β(1)j− 1

2l+ 1

2

α(1)j

l+ 12

b(1)j

l+ 12

(1√2

∣∣∣∣∣√β(1)

a(1) pn− 1

2

∣∣∣∣∣2

j− 12

l+ 12

+√

2

∣∣∣∣∣√α(1)

b(1) un

∣∣∣∣∣2

jl+ 1

2

)h2 (2.63)

= λ∑j,l

c(1)j+1/2,l+1/2︷ ︸︸ ︷

12

√a

(1)j+ 1

2l+ 1

2

β(1)j+ 1

2l+ 1

2

√α(1)j

l+ 12

b(1)j

l+ 12

+√α

(1)j+1l+ 1

2

b(1)j+1l+ 1

2

1√2

∣∣∣∣∣√β(1)

a(1) pn− 1

2

∣∣∣∣∣2

j+ 12

l+ 12

+ 12

√a(1)j+ 1

2l+ 1

2

β(1)j+ 1

2l+ 1

2

+√a

(1)j− 1

2l+ 1

2

β(1)j− 1

2l+ 1

2

√α(1)j

l+ 12

b(1)j

l+ 12︸ ︷︷ ︸

c(1)j,l+1/2

√2

∣∣∣∣∣√α(1)

b(1) un

∣∣∣∣∣2

jl+ 1

2

h2 (2.64)

≤ λmaxj,l

c(1)j+ 1

2 ,l+12, c

(1)j,l+ 1

2

( 1√2

∥∥∥√β(1)

a(1) pn− 1

2

∥∥∥2

h+√

2∥∥∥√α(1)

b(1) un∥∥∥2

h

)(2.65)

Page 35: Boundary and Interface Conditions for Electromagnetic Wave Propagation …359693/FULLTEXT… ·  · 2010-11-01Boundary and Interface Conditions for Electromagnetic Wave Propagation

2.2. MODIFYING THE COEFFICIENTS 23

For the second term we get analogously

∆t∣∣∣⟨α(2)vn, D−y

(β(2)pn−

12

)⟩h

∣∣∣≤ λmax

j,l

c(2)j+ 1

2 ,l+12, c

(2)j+ 1

2 ,l

( 1√2

∥∥∥√β(2)

a(2) pn− 1

2

∥∥∥2

h+√

2∥∥∥√α(2)

b(2) vn∥∥∥2

h

). (2.66)

We thus see that if (2.42) holds, then∣∣∣∆t⟨α(1)un, D−x

(β(1)pn−

12

)⟩h

+ ∆t⟨α(2)vn, D−y

(β(2)pn−

12

)⟩h

∣∣∣ ≤(1− δ)

(∥∥∥√β(1)

a(1) pn− 1

2

∥∥∥2

h+∥∥∥√α(1)

b(1) un∥∥∥2

h+∥∥∥√α(2)

b(2) vn∥∥∥2

h

)(2.67)

and the estimate (2.60) follows.

With this we are ready to prove Theorem 2.2.2.

Proof of Theorem 2.2.2. Let

C1 = minΩ

β(1)

a(1) ,α(1)

b(1) ,α(2)

b(2)

, (2.68)

C2 = maxΩ

β(1)

a(1) ,α(1)

b(1) ,α(2)

b(2)

, (2.69)

then

‖pn−1/2‖2h + ‖un‖2h + ‖vn‖2h ≤1C1Nh(pn−1/2, un, vn) (2.70)

≤ 1C1δ

Eh(pn−1/2, un, vn) (2.71)

= 1C1δ

Eh(p−1/2, u0, v0) (2.72)

≤ 2− δδ

1C1Nh(p−1/2, u0, v0) (2.73)

≤ 2− δδ

C2

C1

(‖p−1/2‖2h + ‖u0‖2h + ‖v0‖2h

). (2.74)

2.2.3 Reconciling accuracy and stability requirementsTo construct a time-stable modification of the coefficients in (2.11) along the bound-ary we use as starting point the discretization (2.33–2.35). The aim is to modify

Page 36: Boundary and Interface Conditions for Electromagnetic Wave Propagation …359693/FULLTEXT… ·  · 2010-11-01Boundary and Interface Conditions for Electromagnetic Wave Propagation

24 CHAPTER 2. BOUNDARY CONDITIONS IN THE YEE SCHEME

1 cell

ncells

Inside Outside

α = arctann

Figure 2.4: The discretization considered. The p values are centered on the cells shown,with u and v on the edges.

the coefficients such that the consistency conditions in Table 2.2 are satisfied at thesame time as the stability requirements in Theorem 2.2.2.

The major restriction that the divergence form discretization (2.33–2.35) in-troduces, compared to the update formula in (2.11), is that the coefficients onneighbouring stencils couple. This means we have to solve a system of consistencyequations on the boundary. As we shall see this system of equations only has asolution for the angles α = arctan 1/n or α = arctann, when n ∈ Z.

To see how we obtain a time-stable modification of the coefficients, consider thedivergence form equation given by

pt = a(∂x (α1u) + ∂y (α2v)), (2.75)ut = bpx, (2.76)vt = bpy, (2.77)

αi = αi(x, y), i = 1, 2, which is a special case of (2.21–2.23). We discretize this as

pn+ 1

2j+ 1

2 ,l+12

= pn− 1

2j+ 1

2 ,l+12

+ ∆taj+ 12 ,l+

12

×(D+x

(1)j,l+ 1

2unj,l+ 1

2

)+D+y

(2)j+ 1

2 ,lvnj+ 1

2 ,l

)),

(2.78)

un+1j,l+ 1

2= unj,l+ 1

2+ ∆tbj,l+ 1

2D−xp

n+ 12

j+ 12 ,l+

12, (2.79)

vn+1j+ 1

2 ,l= vnj+ 1

2 ,l+ ∆tbj+ 1

2 ,lD−yp

n+ 12

j+ 12 ,l+

12. (2.80)

which is a special case of (2.33–2.35), for which (2.41) is always satisfied. If we canmodify α(1) and α(2) such that the scheme reduces to the usual system (1.54–1.56)in the inner domain, while at the same time it satisfies the consistency conditions inTable 2.2 along the inner boundary, we get a time-stable consistent method. Notethat we obtain the time-stability by construction, as this discretization satisfies theconditions in Theorem 2.2.2.

Page 37: Boundary and Interface Conditions for Electromagnetic Wave Propagation …359693/FULLTEXT… ·  · 2010-11-01Boundary and Interface Conditions for Electromagnetic Wave Propagation

2.2. MODIFYING THE COEFFICIENTS 25

Theorem 2.2.3. Assume the discretization (2.78–2.80) with α(1) = α(2) = 1 awayfrom the (inner) boundary. Let the angle of the boundary relative to the x-axisbe given by α = arctann, n ∈ N+, giving the discretization shown in Figure 2.4.Denote the coordinate in the center bottom corner cell by (xj0+1/2, yl0+1/2). Assumethat the coefficient aj+1/2,l+1/2 is constant within each group of n cells, i.e., thataj0+1/2,l0+1/2+i = a for i = 0, . . . , n− 1.

Then the consistency conditions in Table 2.1 are satisfied if and only if

α(1)j0+ 1

2 ,l0+i = i

n, i = 1, . . . , n− 1, (2.81)

α(2)j0+ 1

2 ,l0+i = 1, i = 1, . . . , n− 1. (2.82)

Proof. By denoting

aNi = aj+ 1

2 ,l+i−12α

(2)j+ 1

2 ,l+i, (2.83)

aWi = aj+ 1

2 ,l+i−12α

(1)j,l+i− 1

2, (2.84)

aSi = aj+ 1

2 ,l+i−12α

(2)j+ 1

2 ,l+i−1, (2.85)

for i = 1, . . . , n− 1, the consistency conditions for the cells become

aWn cosα−

(aNn − aS

n

)sinα = 0,

aWn−1 cosα−

(aNn−1 − aS

n−1)

sinα = 0,...

aW2 cosα−

(aN

2 − aS2)

sinα = 0,aW

1 cosα− aN1 sinα = 0.

(2.86)

This is a system of n equations that needs to be solved. Stencils i = 2 to n is forwhen the boundary is to the left (X2), and stencil i = 1 is when the boundary isto the left and down (XY4). See Figure 2.2 to recall what X2 and XY4 refers to.Since α(1) = α(2) = 1 away from the boundary, the conditions we need to imposeon the coefficients are

aNn = a, (2.87)

aWi = a, i = 1, . . . , n, (2.88)

aSi+1 = aN

i = Ai, i = 1, . . . , n− 1, (2.89)

where we introduced Ai as the coefficient inbetween cell i and i + 1. Thus the

Page 38: Boundary and Interface Conditions for Electromagnetic Wave Propagation …359693/FULLTEXT… ·  · 2010-11-01Boundary and Interface Conditions for Electromagnetic Wave Propagation

26 CHAPTER 2. BOUNDARY CONDITIONS IN THE YEE SCHEME

system (2.86) can be written as

a− (a−An−1)n = 0,a− (An−1 −An−2)n = 0,

...a− (A2 −A1)n = 0,a−A1n = 0,

(2.90)

where we note that the first equation is the sum of the other n−1 equations. Thuswe get the unique solution

Ai = i

na, i = 1, . . . , n− 1, (2.91)

and hence (2.81–2.82) follows.

Corollary 2.2.1. The result in Theorem 2.2.3 is by symmetry also valid for α =arctan 1/n and α = arctann, n ∈ Z.

Corollary 2.2.2. From the system (2.90) we see that if arctanα 6= n, n ∈ N, thenthe first equation is no longer the sum of the remaining n − 1 equations and thesystem does not have a solution. Thus we can not obtain a discretization of theform (2.78–2.80) that satisfies the consistency conditions if arctanα 6= n.

Remark 2.2.1. The condition (2.42) for the modifications (2.81–2.82) reduces to thestandard CFL condition (1.65) for the Yee-scheme.

Example 2.2.1. As an example consider the case n = 2, then the updating stencilson the boundary becomes

a (ux + vy) ≈ah−1 (−uW + vN − 1

2vS), (A-stencil, X2)

ah−1 (−uW + 12vN), (B-stencil, corner, XY4)

(2.92)

2.2.4 Piecewise and partially modified coefficientsIn Theorem 2.2.3, time-stability was reconciled with O(h) accuracy for a subsetof rational angles. To improve the accuracy for an arbitrary angle while keepingthe time-stability of the original Yee scheme, one can approximate the boundaryby piecewise 1/n angles, as illustrated in Figure 2.5. As an example, consider theboundary given by the line with the angle α = arctan 2/5 with respect to the x-axis.The usual staircasing gives a repeated pattern of 1/2 and 1/3 cells. Again, this canbe seen clearly in Figure 2.5. Instead of setting α = arctan 2/5 in the consistencyrelations, we set either α = arctan 1/2 or arctan 1/3 depending on if the cell is partof a 1/2 or 1/3 group of cells.

Page 39: Boundary and Interface Conditions for Electromagnetic Wave Propagation …359693/FULLTEXT… ·  · 2010-11-01Boundary and Interface Conditions for Electromagnetic Wave Propagation

2.3. NUMERICAL RESULTS IN 2D 27

α1 = arctan 13

α2 = arctan 12

α = arctan 25

Figure 2.5: The staircase approximation of the α = arctan 2/5 case is shown as a darkline. Piecewise 1/n approximation amounts to setting the angle to α = arctan 1/3 andarctan 1/2 in the consistency conditions for the three and two cells, respectively, that arein a horizontal row.

Effectively, this means that we still have O(1) errors, but with a much smallerconstant. This is for a straight line, which in a sense is the worst possible situationsince there is a global exact angle. For a curved line, the 1/n-approximation shouldconverge until the boundary is straight on the scale ≈ h.

Hence we see that we can construct a piecewise approximation of an angledboundary by the repeated application of (2.81). We will refer to this method aspiecewise modification, or piecewise Tornberg-Engquist.

An alternative way to piecewise approximate a non-integer angle is to simplyskip the first equation in the system (2.86). Applying the same conditions (2.87–2.89) then gives the coefficients

α(1)j0+ 1

2 ,l0+i = i

tanα, i = 1, . . . , n− 2, (2.93)

α(1)j0+ 1

2 ,l0+n−1 = 1, (2.94)

α(2)j0+ 1

2 ,l0+i = 1, i = 1, . . . , n− 1. (2.95)

It has been observed in some cases that the error in the outer most cell, i.e., inthis case top cell, is insignificant compared to the rest, making this strategy inmodification effective. Eq. (2.93–2.95) will be refered to as partial modification, orpartial Tornberg-Engquist.

It should be emphasized that both piecewise and partial Tornberg-Engquistmodifications are time-stable.

2.3 Numerical results in 2D

We run the numerical tests on a [0, 2π] × [0, 2π] ⊂ R2 domain with homogeneousDirichlet outer boundary conditions for the (u, v) field. The coefficients are set to

Page 40: Boundary and Interface Conditions for Electromagnetic Wave Propagation …359693/FULLTEXT… ·  · 2010-11-01Boundary and Interface Conditions for Electromagnetic Wave Propagation

28 CHAPTER 2. BOUNDARY CONDITIONS IN THE YEE SCHEME

x/π

y/π

0 1 20

0.5

1

1.5

2

−5

0

5

(a) p

x/π

y/π

0 1 20

0.5

1

1.5

2

−6

−4

−2

0

2

4

6

(b) u

x/π

y/π

0 1 20

0.5

1

1.5

2

−4

−2

0

2

4

(c) v

Figure 2.6: Exact field used for convergence study.

a = b = −1. To test the modified coefficients we set an internal inclined boundarydefined by y(x) = (x− x) tanα so that the inner domain and boundary becomes

Ω = (x, y) ⊂ [0, 2π]× [0, 2π] | y > (x− x) tanα, (2.96)Γ = (x, y) ⊂ [0, 2π]× [0, 2π] | y = (x− x) tanα. (2.97)

The angle α is relative to the x-axis. When measuring errors we only include aninner subset Ω ⊂ Ω of the domain in such a way that the effects from the outerboundary has not yet propagated into the area where we measure. Outside of thediscrete L2-norm defined by (2.17–2.19), we also use

‖p‖∞ = maxj,l∈Ωp

N

|pj+1/2,l+1/2|, (2.98)

‖u‖∞ = maxj,l∈Ωu

N

|uj,l+1/2|, (2.99)

‖v‖∞ = maxj,l∈Ωv

N

|vj+1/2,l|. (2.100)

The exact solution for a reflected harmonic wave is used. Let

ϕ = eikI ·x + eikx?

eikR · (x−x?) (2.101)

where kI = (k, 0), kR = k · (cos 2α, sin 2α), k = ω/c and x? = (x?, y?) is any pointon the boundary. Then the fields given by

p(x, y, t) = 1b<(∂tϕe−iωt), (2.102)

u(x, y, t) = <(∇ϕe−iωt), (2.103)

satisfy both (1.32–1.33) and the boundary conditions (2.1–2.2). These are visualizedin Figure 2.6 for k = 5.

We observe the stability of the piecewise modification of coefficients in Figure2.7, where the modification is according to Theorem 2.2.3. This verifies the analysis,

Page 41: Boundary and Interface Conditions for Electromagnetic Wave Propagation …359693/FULLTEXT… ·  · 2010-11-01Boundary and Interface Conditions for Electromagnetic Wave Propagation

2.3. NUMERICAL RESULTS IN 2D 29

0 2 4 6 8 10

x 104

10−2

10−1

100

101

t

L2 n

orm

diffe

rence

(a) p field

0 2 4 6 8 10

x 104

10−2

10−1

100

101

t

L2 n

orm

diffe

rence

(b) u field

Figure 2.7: Numerical stability of the piecewise modifications for the angle α =arctan 2/5. The boundary is divided into sections with α = arctan 1/2 and α = arctan 1/3.CFL is 0.3.

as we appear to have time-stability with the field bounded independently of the timet.

In Figures 2.8–2.10 we can observe the resulting fields when time stepping withstandard Yee, Tornberg-Engquist modified coefficients and piecewise modificationsfor the angle arctan 2/5. In both cases where the coefficients are modified we seea clear improvement in the quality of the solution. In the standard Yee case weclearly see the O(1/h) truncation error being generated at the boundary and thenbeing propagated into the domain.

With regards to accuracy we plot the convergence in Figures 2.11–2.12. We seethat the unmodified Yee scheme behaves as O(

√h) in the discrete L2 norm and

O(1) in L∞, as one would expect from the discussion in Section 2.1.1. Both type ofmodifications—standard Tornberg-Engquist and piecewise modifications—gives aclear O(h) convergence in both L2 and L∞ for α = arctan 1/3. The most interestingcase is when α = arctan 2/5 in Figure 2.12. We see a marked improvement in thepointwise error for piecewise modifications compared to the traditional Yee scheme,and a solid O(h) convergence in L2. Partial modification according to (2.93–2.95)gives, in this case, the same convergence line as Tornberg-Engquist. This indicatesthat the error is not evenly distributed, with most of it occuring in and near thecorner cells (bottom in Figure 2.4), and very little in the cells where the consistencycondition is violated.

Page 42: Boundary and Interface Conditions for Electromagnetic Wave Propagation …359693/FULLTEXT… ·  · 2010-11-01Boundary and Interface Conditions for Electromagnetic Wave Propagation

30 CHAPTER 2. BOUNDARY CONDITIONS IN THE YEE SCHEME

x/π

y/π

0.9 1 1.1 1.2

0.7

0.8

0.9

1

1.1

−10

−5

0

5

10

(a) p

x/π

y/π

0.9 1 1.1 1.2

0.7

0.8

0.9

1

1.1

−5

0

5

(b) u

x/π

y/π

0.9 1 1.1 1.2

0.7

0.8

0.9

1

1.1

−10

−5

0

5

10

(c) v

Figure 2.8: Close-ups of the computed field with the standard Yee scheme for the anglearctan 2/5 of the inner boundary. The grid size is N = 900 and the field is shown att = 0.3π, which corresponds to n = 225 timesteps with CFL = 0.6.

Page 43: Boundary and Interface Conditions for Electromagnetic Wave Propagation …359693/FULLTEXT… ·  · 2010-11-01Boundary and Interface Conditions for Electromagnetic Wave Propagation

2.3. NUMERICAL RESULTS IN 2D 31

x/π

y/π

0.9 1 1.1 1.2

0.7

0.8

0.9

1

1.1

−10

−5

0

5

10

(a) p

x/π

y/π

0.9 1 1.1 1.2

0.7

0.8

0.9

1

1.1

−3

−2

−1

0

1

2

3

(b) u

x/π

y/π

0.9 1 1.1 1.2

0.7

0.8

0.9

1

1.1

−5

0

5

(c) v

Figure 2.9: Close-ups of the computed field with the Tornberg-Engquist modified coef-ficients for the angle arctan 2/5 of the inner boundary. The grid size is N = 900 and thefield is shown at t = 0.3π, which corresponds to n = 225 timesteps with CFL = 0.6.

Page 44: Boundary and Interface Conditions for Electromagnetic Wave Propagation …359693/FULLTEXT… ·  · 2010-11-01Boundary and Interface Conditions for Electromagnetic Wave Propagation

32 CHAPTER 2. BOUNDARY CONDITIONS IN THE YEE SCHEME

x/π

y/π

0.9 1 1.1 1.2

0.7

0.8

0.9

1

1.1

−10

−5

0

5

10

(a) p

x/π

y/π

0.9 1 1.1 1.2

0.7

0.8

0.9

1

1.1

−4

−2

0

2

4

(b) u

x/π

y/π

0.9 1 1.1 1.2

0.7

0.8

0.9

1

1.1

−5

0

5

(c) v

Figure 2.10: Close-ups of the computed field with the piecewise modified coefficientsfor the angle arctan 2/5 of the inner boundary. The grid size is N = 900 and the field isshown at t = 0.3π, which corresponds to n = 225 timesteps with CFL = 0.6.

Page 45: Boundary and Interface Conditions for Electromagnetic Wave Propagation …359693/FULLTEXT… ·  · 2010-11-01Boundary and Interface Conditions for Electromagnetic Wave Propagation

2.3. NUMERICAL RESULTS IN 2D 33

10−3

10−2

10−1

10−2

10−1

100

101

h

Max

nor

m e

rror

(a) p field

10−3

10−2

10−1

10−1

100

101

h

Max

nor

m e

rror

(b) u field

10−3

10−2

10−1

10−2

10−1

100

h

L 2 err

or

(c) p field

10−3

10−2

10−1

10−2

10−1

100

h

L 2 err

or

(d) u field

Figure 2.11: Convergence study in L∞ and discrete L2 norm for the angle α =arctan 1/3. () is standard FDTD, (×) is Tornberg-Engquist and (?) is piecewise modifi-cation. Dashed lines indicate slope of 1/2 and 1.

Page 46: Boundary and Interface Conditions for Electromagnetic Wave Propagation …359693/FULLTEXT… ·  · 2010-11-01Boundary and Interface Conditions for Electromagnetic Wave Propagation

34 CHAPTER 2. BOUNDARY CONDITIONS IN THE YEE SCHEME

10−3

10−2

10−1

10−2

10−1

100

101

h

Max

nor

m e

rror

(a) p field

10−3

10−2

10−1

10−1

100

101

h

Max

nor

m e

rror

(b) u field

10−3

10−2

10−1

10−2

10−1

100

h

L 2 err

or

(c) p field

10−3

10−2

10−1

10−2

10−1

100

h

L 2 err

or

(d) u field

Figure 2.12: Convergence study in L∞ and discrete L2 norm for the angle α =arctan 2/5. () is standard FDTD, (×) is Tornberg-Engquist and (?) is piecewise modifica-tion. Dashed lines indicate slope of 1/2 and 1. The error for partial modification accordingto (2.93–2.95) is also computed and gives the same convergence line as Tornberg-Engquist.

Page 47: Boundary and Interface Conditions for Electromagnetic Wave Propagation …359693/FULLTEXT… ·  · 2010-11-01Boundary and Interface Conditions for Electromagnetic Wave Propagation

2.4. NUMERICAL RESULTS IN 3D 35

2.4 Numerical results in 3D

In 3D we need the full Maxwell’s equations (1.1–1.4) and the discretization (1.40–1.45). The relevant boundary condition for the fields on a perfect electric conductor(PEC) surface are

n×E = 0, (2.104)

which says that the tangential electric field on the boundary is zero.We extend the Tornberg-Engquist style modifications of the coefficients to 3D

by modification of the coefficients dimension by dimension, by simply using theintersection of the plane with the update stencils. Since it is the electric field Ewhich defines the boundary, it is the update stencil for H we need to modify, in thesame way as for the pressure p. For example, the standard FDTD update formulafor the Hx component is given by

Hx

∣∣n+ 12

i,j+ 12 ,k+ 1

2= Hx

∣∣n− 12

i,j+ 12 ,k+ 1

2+ ∆t

µ

(D+zEy

∣∣ni,j+ 1

2 ,k−D+yEz

∣∣ni,j,k+ 1

2

). (2.105)

Thus we introduce the components a, b, c, d, such that

Hx

∣∣n+ 12

i,j+ 12 ,k+ 1

2= Hx

∣∣n− 12

i,j+ 12 ,k+ 1

2

+ ∆tµ

(ai,j+ 1

2 ,k+ 12Ey∣∣ni,j+ 1

2 ,k+1 − bi,j+ 12 ,k+ 1

2Ey∣∣ni,j+ 1

2 ,k

− ci,j+ 12 ,k+ 1

2Ez∣∣ni,j+1,k+ 1

2+ di,j+ 1

2 ,k+ 12Ez∣∣ni,j,k+ 1

2

), (2.106)

along the inner boundary. These coefficients are chosen so as to satisfy the con-sistency conditions in Table 2.1, where the angle is obtained by intersecting theboundary surface with the plane defined by keeping x constant. Analogous modi-fications are done for the Hy and Hz update formulas.

For the numerical examples the domain is set to Ω = [0, 2π]3 where we let aplane Γ cut through the inner domain. Γ is parametrized by

z = (x− x0) tan β + (y − y0) tanα, (2.107)

which means the normal vector is given by

n = 1√1 + tan2 α+ tan2 β

tan βtanα−1

. (2.108)

For the cases considered we will formulate the solution in terms of the angles ϕ andθ together with the normal vector

n =

cosϕ sin θsinϕ sin θ

cos θ

, 0 ≤ ϕ ≤ 2π, 0 ≤ θ ≤ π, (2.109)

Page 48: Boundary and Interface Conditions for Electromagnetic Wave Propagation …359693/FULLTEXT… ·  · 2010-11-01Boundary and Interface Conditions for Electromagnetic Wave Propagation

36 CHAPTER 2. BOUNDARY CONDITIONS IN THE YEE SCHEME

xy

z

θn

y

x

ϕn

Figure 2.13: Illustrating the angles θ and ϕ. The normal n is pointing into the domain.

as well as for simplicity restrict ourselves to θ ∈ (0, π/4), ϕ ∈ (5π/4, 3π/2). To seehow these two set of angles are related we project according to nyz = (n · y)y +(n · z)z = (0, sinϕ sin θ, cos θ)T , thus giving

α = arccos(

nyz · (0, 0, 1)T√sin2 ϕ sin2 θ + cos2 θ

)= arctan(− sinϕ tan θ). (2.110)

Similarly we get β = arctan(− cosϕ tan θ). We note that α is the angle of the linethrough the Hx update stencil, which is in the (y, z)-plane, and β is the angle of theline through the Hy stencil, which is in the (x, z)-plane. Furthermore, we denotethe angle of the line intersecting the Hz stencil by γ, which is in the (x, y)-planeand is with respect to the x-axis and given in terms of ϕ as γ = ϕ − π/2. SeeFigures 2.13–2.14.

Concerning stability and time-stability, note that since we do standard Tornberg-Engquist modifications, we do not expect to observe time-stability. To verify thatwe still have a stable scheme, we timestep random data in Figures 2.15–2.16 andmeasure the L2 norm. In these Figures we clearly see that the field growth is inde-pendent of the number of timestep, similar to the 2D situation. The difference isthat we get linear growth in the H- field, which dominates the picture for small t(note that the y-axis is logarithmic). We shall see the consequence of this growthin the different test cases. Why this occur and ways to avoid it is discussed in asSection 2.4.4.

2.4.1 Constant fieldAs a first test of the generalization to 3D we time step a constant solution. To findsuch a solution consider the boundary condition for the tangential electric fields(2.104)cosϕ sin θ

sinϕ sin θcos θ

×ExEyEz

=

Ez sinϕ sin θ − Ey cos θEx cos θ − Ez cosϕ sin θ

Ey cosϕ sin θ − Ex sinϕ sin θ

= 0. (2.111)

Page 49: Boundary and Interface Conditions for Electromagnetic Wave Propagation …359693/FULLTEXT… ·  · 2010-11-01Boundary and Interface Conditions for Electromagnetic Wave Propagation

2.4. NUMERICAL RESULTS IN 3D 37

Hx Ez

Ey

α

HyEz

Ex

β

Hz Ex

Eyγ

Figure 2.14: The projected angles α, β and γ, as well as how the boundary planeintersects the individual H-stencils.

N ‖H−Hexact‖∞ p ‖E−Eexact‖∞ p20 3.07(-01) 3.57(-01)60 1.91(-01) 0.432 5.77(-01) -0.437180 1.42(-01) 0.269 5.16(-01) 0.101

N ‖H−Hexact‖2 p ‖E−Eexact‖2 p20 1.02(-01) 1.09(-01)60 5.94(-02) 0.495 1.01(-01) 0.072180 3.38(-02) 0.512 5.39(-02) 0.567

Table 2.3: The resulting error after time stepping the constant solution (2.112–2.113)using the standard Yee method on a N×N grid. Given in the column p is the convergencerate. The parameters for the internal boundary are ϕ = 11π/8, θ = π/7, x = −1/2 andy = −1/2.

Setting Ez = 1 gives the solution for both fields as

E = (− tan β,− tanα, 1), (2.112)H = 0. (2.113)

The results after time stepping on a grid of resolution N × N are shown inTable 2.3 and 2.4. We clearly see that we have constant error for the standardYee scheme, while the error is down to machine precision when using the modifiedcoefficients.

Page 50: Boundary and Interface Conditions for Electromagnetic Wave Propagation …359693/FULLTEXT… ·  · 2010-11-01Boundary and Interface Conditions for Electromagnetic Wave Propagation

38 CHAPTER 2. BOUNDARY CONDITIONS IN THE YEE SCHEME

200 400 600 800

100

102

104

t

L2 n

orm

diffe

rence

(a) H.

200 400 600 800

100

105

tL

2 n

orm

diffe

rence

(b) E.

Figure 2.15: L2 norm of the field when initialized with random data. The norm for thestandard Yee method is shown as the (in average) constant line, which is included as acomparison.

200 400 600 800

100

102

104

t

L2 n

orm

diffe

rence

(a) H.

200 400 600 800

100

105

t

L2 n

orm

diffe

rence

(b) E.

Figure 2.16: Same as Figure 2.15 but with 1/10 the time step ∆t. We see that thegrowth clearly is independent of the number of time steps.

Page 51: Boundary and Interface Conditions for Electromagnetic Wave Propagation …359693/FULLTEXT… ·  · 2010-11-01Boundary and Interface Conditions for Electromagnetic Wave Propagation

2.4. NUMERICAL RESULTS IN 3D 39

N ‖H−Hexact‖∞ ‖E−Eexact‖∞20 2.25(-16) 1.59(-16)60 7.17(-16) 2.83(-16)180 2.21(-15) 1.00(-15)

N ‖H−Hexact‖2 ‖E−Eexact‖220 6.05(-17) 4.35(-17)60 1.04(-16) 6.07(-17)180 1.89(-16) 1.47(-16)

Table 2.4: Same as Figure 2.3 but using modified coefficients. The convergence rate isuninteresting here as we are already close to εmachine.

2.4.2 Harmonic wave field on plane surfaceAs a second test case we consider the reflection of a plane wave. Thus let theincoming wave be given by

Einc = −ikpincei(kkinc ·x−ωt), (2.114)

Hinc = k

µωkinc ×Einc, (2.115)

where the polarization and wave vectors are given by pinc = (0, 0, 1)T and kinc =−nxy = (− cosϕ,− sinϕ, 0)T . Thus the reflected wave is given by

Eref = −ikprefei(kkref · (x−x?)−ωt)eikkincx?

, (2.116)

Href = k

µωkref ×Eref, (2.117)

where kref = (− cosϕ cos 2θ,− sinϕ cos 2θ, sin 2θ) and pref = (kinc × pinc) × kref.Note that the amplitude for the reflected magnetic field can be simplified to

(−ik)k/(µω) = −iωε,

and that the cross products between the polarization and wave vectors have thecomponents

kinc × pinc = (− sinϕ, cosϕ, 0)T (2.118)pref = (− cosϕ sin 2θ, sinϕ sin 2θ, cos 2θ). (2.119)

These wave and polarization vectors are illustrated in Figure 2.17.In Figure 2.18–2.19 we see some qualitative results of the field after time step-

ping. Clearly we have a large improvement for modified coefficients. The conver-gence is shown in Figure 2.20, where the E field is evidently O(h) both in L∞ and

Page 52: Boundary and Interface Conditions for Electromagnetic Wave Propagation …359693/FULLTEXT… ·  · 2010-11-01Boundary and Interface Conditions for Electromagnetic Wave Propagation

40 CHAPTER 2. BOUNDARY CONDITIONS IN THE YEE SCHEME

Hinc

Einc

kinc

n

Eref

Href

kref

xy

z

Figure 2.17: Illustrating the harmonic field vectors used in (2.114–2.115) and (2.116–2.117). The incoming wave has the electric field polarized in the z-direction and themagnetic field polarized in the xy-plane, transverse to the boundary. The incoming wavevector is parallel to the plane of incidence.

L2. As for the H-field, the error is reduced by one order of magntitude, but the con-vergence is not as convincing. The unmodified Yee scheme has O(

√h) convergence

in L2, and O(1) in L∞, as expected.To investigate the reason for the lack of convergence in the H-field, we measure

the error in the inner domain only. The padding distance from the inner boundarywas choosen to be 0.3. The results can be seen in Figure 2.21, where we observea solid O(h) convergence in both L∞ and L2 for both fields. It appears that wehave a stationary error occuring along the boundary in the H field. This observedphenomena, as well as possible ways to reduce it, is discussed further in Section2.4.4. In Figure 2.22 the time series of the error is shown.

2.4.3 Harmonic wave field on a perfectly conducting sphere

As another test case we consider the scattering of plane waves against a metallic(PEC) sphere. This can be solved analytically and is called Mie scattering. See[36] for an in-depth treatment.

The incoming plane wave and the reflected wave is expanded as

Einc = E0ei(kx−ωt)ex (2.120)

= E0e−iωt

∞∑n=1

in2n+ 1n(n+ 1)

(M(1)

o1n(k)− iN(1)e1n(k)

)(2.121)

Page 53: Boundary and Interface Conditions for Electromagnetic Wave Propagation …359693/FULLTEXT… ·  · 2010-11-01Boundary and Interface Conditions for Electromagnetic Wave Propagation

2.4. NUMERICAL RESULTS IN 3D 41

x/π

y/π

0.5 1 1.5

0.6

0.8

1

1.2

1.4

−1.5

−1

−0.5

0

0.5

1

1.5

(a) Hx standard Yee.

x/π

y/π

0.5 1 1.5

0.6

0.8

1

1.2

1.4

−1.5

−1

−0.5

0

0.5

1

1.5

(b) Hx coefficients modified.

x/π

y/π

0.6 0.8 1 1.2 1.4

0.6

0.8

1

1.2

1.4

−0.5

0

0.5

(c) Hy standard Yee.

x/π

y/π

0.6 0.8 1 1.2 1.4

0.6

0.8

1

1.2

1.4

−0.6

−0.4

−0.2

0

0.2

0.4

0.6

(d) Hy coefficients modified.

x/π

y/π

0.6 0.8 1 1.2 1.4

0.6

0.8

1

1.2

1.4

−0.1

0

0.1

0.2

(e) Hz standard Yee.

x/π

y/π

0.6 0.8 1 1.2 1.4

0.6

0.8

1

1.2

1.4

−0.02

0

0.02

0.04

0.06

0.08

(f) Hz coefficients modified.

Figure 2.18: Comparison of magnetic field for standard Yee and modified coefficients.Again the O(1/h) truncation error generated at the boundary is clearly visible.

Page 54: Boundary and Interface Conditions for Electromagnetic Wave Propagation …359693/FULLTEXT… ·  · 2010-11-01Boundary and Interface Conditions for Electromagnetic Wave Propagation

42 CHAPTER 2. BOUNDARY CONDITIONS IN THE YEE SCHEME

x/π

y/π

0.6 0.8 1 1.2 1.4

0.6

0.8

1

1.2

1.4

−0.6

−0.4

−0.2

0

0.2

0.4

0.6

(a) Ex standard Yee.

x/π

y/π

0.6 0.8 1 1.2 1.4

0.6

0.8

1

1.2

1.4

−0.2

−0.1

0

0.1

0.2

(b) Ex coefficients modified.

x/π

y/π

0.5 1 1.5

0.6

0.8

1

1.2

1.4

−1

−0.5

0

0.5

1

(c) Ey standard Yee.

x/π

y/π

0.5 1 1.5

0.6

0.8

1

1.2

1.4

−0.6

−0.4

−0.2

0

0.2

0.4

0.6

(d) Ey coefficients modified.

x/π

y/π

0.5 1 1.5

0.6

0.8

1

1.2

1.4

−1.5

−1

−0.5

0

0.5

1

1.5

(e) Ez standard Yee.

x/π

y/π

0.5 1 1.5

0.6

0.8

1

1.2

1.4

−1

−0.5

0

0.5

1

(f) Ez coefficients modified.

Figure 2.19: Comparison of electric field for standard Yee and modified coefficients. Thequalitative improvement is noticeable.

Page 55: Boundary and Interface Conditions for Electromagnetic Wave Propagation …359693/FULLTEXT… ·  · 2010-11-01Boundary and Interface Conditions for Electromagnetic Wave Propagation

2.4. NUMERICAL RESULTS IN 3D 43

10−3

10−2

10−1

10−3

10−2

10−1

100

h

Ma

x n

orm

err

or

(a) H.

10−3

10−2

10−1

10−2

10−1

100

h

Ma

x n

orm

err

or

(b) E.

10−3

10−2

10−1

10−3

10−2

10−1

100

h

L2 e

rro

r

(c) H.

10−3

10−2

10−1

10−3

10−2

10−1

100

h

L2 e

rro

r

(d) E.

Figure 2.20: Convergence of the harmonic field reflected on the plane, i.e., the solutiongiven by (2.114–2.115) and (2.116–2.117). The dashed lines indicate slope 1/2 and 1. ()is standard Yee and (×) is modified coefficients.

Page 56: Boundary and Interface Conditions for Electromagnetic Wave Propagation …359693/FULLTEXT… ·  · 2010-11-01Boundary and Interface Conditions for Electromagnetic Wave Propagation

44 CHAPTER 2. BOUNDARY CONDITIONS IN THE YEE SCHEME

10−3

10−2

10−1

10−3

10−2

10−1

100

h

Ma

x n

orm

err

or

(a) H.

10−3

10−2

10−1

10−3

10−2

10−1

100

h

Ma

x n

orm

err

or

(b) E.

10−3

10−2

10−1

10−3

10−2

10−1

100

h

L2 e

rro

r

(c) H.

10−3

10−2

10−1

10−3

10−2

10−1

100

h

L2 e

rro

r

(d) E.

Figure 2.21: Same as Figure 2.20 but here the boundary cells are excluded by a distanceof 0.3. () is standard Yee and (×) is modified coefficients. The modified scheme clearlyexhibits O(h) convergence.

Page 57: Boundary and Interface Conditions for Electromagnetic Wave Propagation …359693/FULLTEXT… ·  · 2010-11-01Boundary and Interface Conditions for Electromagnetic Wave Propagation

2.4. NUMERICAL RESULTS IN 3D 45

0 0.1 0.2 0.30

0.05

0.1

0.15

0.2

0.25

t/π

Ma

x n

orm

err

or

(a) H.

0 0.1 0.2 0.30

0.05

0.1

0.15

0.2

t/π

Ma

x n

orm

err

or

(b) E.

0 0.1 0.2 0.30

0.02

0.04

0.06

0.08

t/π

L2 n

orm

err

or

(c) H.

0 0.1 0.2 0.30

0.02

0.04

0.06

0.08

t/π

L2 n

orm

err

or

(d) E.

Figure 2.22: Time series of the error in the solution of the reflected harmonic wave.Solid line is modified coefficients, dashed line is standard Yee. The resulution is N = 160.

Page 58: Boundary and Interface Conditions for Electromagnetic Wave Propagation …359693/FULLTEXT… ·  · 2010-11-01Boundary and Interface Conditions for Electromagnetic Wave Propagation

46 CHAPTER 2. BOUNDARY CONDITIONS IN THE YEE SCHEME

Hinc = H0ei(kx−ωt)ey (2.122)

= −kE0

µωeiωt

∞∑n=1

in2n+ 1n(n+ 1)

(M(1)

e1n(k) + iN(1)o1n(k)

)(2.123)

and

Eref = E0e−iωt

∞∑n=1

in2n+ 1n(n+ 1)

(anM(3)

o1n(k)− ibnN(3)e1n(k)

), (2.124)

Href = −kE0

µωe−iωt

∞∑n=1

in2n+ 1n(n+ 1)

(bnM(3)

e1n(k) + ianN(3)o1n(k)

), (2.125)

where

M o1ne

(k) = ± 1sin θ zn(kr)P 1

n(cos θ)cossinϕeθ − zn(kr)∂P

1n(cos θ)∂θ

sincosϕeϕ, (2.126)

N o1ne

(k) = n(n+ 1)kr

zn(kr)P 1n(cos θ) sin

cosϕer

+ 1kr

∂r[krzn(kr)]∂P

1n(cos θ)∂θ

sincosϕeθ

± 1kr sin θ

∂(kr) [krzn(kr)]P 1n(cos θ)cos

sinϕeϕ. (2.127)

and

an = − jn(α)h

(1)n (α)

, (2.128)

bn = − (αjn(α))′(αh

(1)n (α)

)′ , α = ka, (2.129)

with r = a being the radius of the sphere.These functions M and N are called spherical vector functions. The subscript

o,e refers to if odd (sin) or even (cos) functions are used. The subscript 1n refersto the the index on Pmn . For o the sign of ± is +, and for e it is −. The superscriptrefers to the type of spherical Bessel functions zn used. In (2.121–2.123) sphericalBessel functions jn(kr) of the first kind are used and in (2.124–2.125) sphericalBessel functions of the third kind (Hankel functions of the first kind) h(1)

n (kr) areused.

These Bessel functions are defined by

zn(x) =√

π

2xZn+1/2(x), (2.130)

Page 59: Boundary and Interface Conditions for Electromagnetic Wave Propagation …359693/FULLTEXT… ·  · 2010-11-01Boundary and Interface Conditions for Electromagnetic Wave Propagation

2.4. NUMERICAL RESULTS IN 3D 47

H(1)ν (x) = Jν(x) + iYν(x). (2.131)

Yν(x) = Jν(x) cos νπ − J−ν(x)sin νπ (2.132)

Jν(x) =(x

2

)ν ∞∑k=0

(−x

2

4

)kk!Γ(ν + k + 1) (2.133)

where ν can be noninteger and Γ is the Gamma function. The functions Pmnare associated Legendre functions of the first kind, obtained from the Legendrepolynomials by

Pmn (x) = (1− x2)m/2 dm

dxmPn(x), (2.134)

where Pn in turn is defined as

Pn(x) = 12nn!

[dn

dxn (x2 − 1)n]. (2.135)

Note that different normalizations Pmn occur in the litterature. Here the Con-don–Shortley phase (−1)m is omitted. The derivatives of the associated Legendrefunctions are obtained by the relation

dPmn (cos θ)dx = 1

2[(n−m+ 1)(n+m)Pm−1

n (cos θ)− Pm+1n (cos θ)

]. (2.136)

The update stencils are modified in the same way as with a plane inner boundary.The angle used is tangent line of the intersection of the sphere and the stencil planeat the grid points for the field components (Hx, Hy, Hz) for which we modify thecomponents.

Qualitative results of the computed fields are shown in Figures 2.23–2.24. Wesee, similarly to the plane boundary case, that the quality of the solution is no-ticeably higher when we modify the coefficients. As for convergence, Figure 2.25and 2.26 shows the convergence with and without the boundary cells. When theboundary cells are excluded we observe O(h) convergence in both fields and in bothL∞ and L2 norms.

Page 60: Boundary and Interface Conditions for Electromagnetic Wave Propagation …359693/FULLTEXT… ·  · 2010-11-01Boundary and Interface Conditions for Electromagnetic Wave Propagation

48 CHAPTER 2. BOUNDARY CONDITIONS IN THE YEE SCHEME

x/π

y/π

−0.5 0 0.5−0.5

0

0.5

−0.5

0

0.5

(a) Ex

x/π

y/π

−0.5 0 0.5−0.5

0

0.5

−0.5

0

0.5

(b) Ex, modified coefficients.

x/π

y/π

−0.5 0 0.5−0.5

0

0.5

−0.15

−0.1

−0.05

0

0.05

0.1

0.15

(c) Ey

x/π

y/π

−0.5 0 0.5−0.5

0

0.5

−0.15

−0.1

−0.05

0

0.05

0.1

0.15

(d) Ey , modified coefficients.

x/π

y/π

−0.5 0 0.5−0.5

0

0.5

−0.25

−0.2

−0.15

−0.1

−0.05

0

0.05

(e) Ez

x/π

y/π

−0.5 0 0.5−0.5

0

0.5

−0.15

−0.1

−0.05

0

0.05

(f) Ez , modified coefficients.

Figure 2.23: Comparing the calculated electric field from (2.121–2.125). The grid resul-tion is N = 140.

Page 61: Boundary and Interface Conditions for Electromagnetic Wave Propagation …359693/FULLTEXT… ·  · 2010-11-01Boundary and Interface Conditions for Electromagnetic Wave Propagation

2.4. NUMERICAL RESULTS IN 3D 49

x/π

y/π

−0.5 0 0.5−0.5

0

0.5

−0.3

−0.2

−0.1

0

0.1

0.2

0.3

(a) Hx

x/π

y/π

−0.5 0 0.5−0.5

0

0.5

−0.15

−0.1

−0.05

0

0.05

0.1

0.15

(b) Hx, modified coefficients.

x/π

y/π

−0.5 0 0.5−0.5

0

0.5

−1

−0.5

0

0.5

1

(c) Hy

x/π

y/π

−0.5 0 0.5−0.5

0

0.5

−0.5

0

0.5

1

1.5

2

(d) Hy , modified coefficients.

x/π

y/π

−0.5 0 0.5−0.5

0

0.5

−0.5

0

0.5

(e) Hz

x/π

y/π

−0.5 0 0.5−0.5

0

0.5

−1

−0.5

0

0.5

1

1.5

(f) Hz , modified coefficients.

Figure 2.24: Comparing the calculated magnetic field from (2.121–2.125). The gridresultion is N = 140.

Page 62: Boundary and Interface Conditions for Electromagnetic Wave Propagation …359693/FULLTEXT… ·  · 2010-11-01Boundary and Interface Conditions for Electromagnetic Wave Propagation

50 CHAPTER 2. BOUNDARY CONDITIONS IN THE YEE SCHEME

10−3

10−2

10−1

10−1

100

101

h

Ma

x n

orm

err

or

(a) H

10−3

10−2

10−1

10−1

100

101

h

Ma

x n

orm

err

or

(b) E

10−3

10−2

10−1

10−2

10−1

100

h

L2 e

rro

r

(c) H

10−3

10−2

10−1

10−2

10−1

100

h

L2 e

rro

r

(d) E

Figure 2.25: Convergence tests of (2.121–2.125). () is standard Yee and (×) is modifiedcoefficients.

Page 63: Boundary and Interface Conditions for Electromagnetic Wave Propagation …359693/FULLTEXT… ·  · 2010-11-01Boundary and Interface Conditions for Electromagnetic Wave Propagation

2.4. NUMERICAL RESULTS IN 3D 51

10−3

10−2

10−1

10−2

10−1

100

h

Ma

x n

orm

err

or

(a) H

10−3

10−2

10−1

10−2

10−1

100

h

Ma

x n

orm

err

or

(b) E

10−3

10−2

10−1

10−2

10−1

100

h

L2 e

rro

r

(c) H

10−3

10−2

10−1

10−2

10−1

100

h

L2 e

rro

r

(d) E

Figure 2.26: Same as Figure 2.25, but without the cells along the boundary.

Page 64: Boundary and Interface Conditions for Electromagnetic Wave Propagation …359693/FULLTEXT… ·  · 2010-11-01Boundary and Interface Conditions for Electromagnetic Wave Propagation

52 CHAPTER 2. BOUNDARY CONDITIONS IN THE YEE SCHEME

2.4.4 On the growth of stationary error on the inner boundaryIn 3D we observe an additional phenomena not present in the 2D case, which is theaccumulation of stationary errors along the inner boundary in the H field. Thatthe error is not propagating into the domain is verified by the observed first orderconvergence when we disregard the boundary cells in Figures 2.21 and 2.26. Theaccumulation speed of the error can be seen from Figures 2.15–2.16 to be linear.Note that these plots have the y-axis in logarithmic scale.

The mechanism behind this error appears to be the slight non-conservation ofdivergence in the modified cells, leading to a static field localized there. This errorlies in the subspace spanned by the eigenfunctions corresponding to the two zeroeigenvalues, cf. the hyperbolic formulation (1.25).

To understand why this error is stationary we note that Gauss law for themagnetic field (1.4) means that we have the standard vector potential representationB = ∇×A. Thus Faraday’s law (1.1) gives ∇× (E + At) = 0, hence

E + At = ∇φ. (2.137)

To see what happens if Gauss law is not fully satisfied, we recall that in generalwe can always decompose a vector field into its solenoidal (divergence-free) andirrotational (curl-free) components, e.g., B = ∇ × A + ∇ψ. For this case thenGauss law becomes ∇ ·B = ∆ψ 6= 0. But when we insert this expansion intoFaraday’s law we get

∇× (E + At) +∇×∇ψt︸ ︷︷ ︸=0

= 0, (2.138)

i.e., we still have the same equation (2.137) for the dynamics. The same expansioninto Ampere’s law (1.2) gives

∇×∇×A +∇×∇ψ︸ ︷︷ ︸=0

= ∇φt −Att, (2.139)

again all influence from the extra irrotational term disappears. Thus we see thatthe time evolution is not affected (in vacuum).

Since the error is in an orthogonal subspace, we can project away the error. Thisrequires the solution of an elliptic problem and, for the case of constant coefficients,can even be done in the post-processing stage. The irrotational part of the fieldneeds to be subtracted away according to

Hcorrected = H−∇ψ, (2.140)∇2ψ = ∇ ·H, (2.141)

where we need to solve the elliptic equation for ψ first. A simple way to do thisin practice is to timestep the parabolic problem ψt = ∇2ψ − ∇ ·H, which is thesame as Jacobi-iterating (2.141). In Particle-in-Cell methods (PIC) this type of

Page 65: Boundary and Interface Conditions for Electromagnetic Wave Propagation …359693/FULLTEXT… ·  · 2010-11-01Boundary and Interface Conditions for Electromagnetic Wave Propagation

2.4. NUMERICAL RESULTS IN 3D 53

200 400 600 800

100

102

t

L2 n

orm

diffe

rence

(a) H

200 400 600 800

100

102

104

t

L2 n

orm

diffe

rence

(b) E

Figure 2.27: Projecting away the divergence using the Langdon-Marder correction.Compare to Figure 2.15–2.16, where we see that the difference is the removal of theinitial linear growth.

correction is refered to as a Langdon-Marder correction [25, 28]. We implementthis by iterating according to

Hx

∣∣i,j+ 1

2 ,k+ 12

= Hx

∣∣i,j+ 1

2 ,k+ 12

+ d∆tD−x(∇ ·H)i+ 12 ,j+

12 ,k+ 1

2, (2.142)

Hy

∣∣i+ 1

2 ,j,k+ 12

= Hy

∣∣i+ 1

2 ,j,k+ 12

+ d∆tD−y(∇ ·H)i+ 12 ,j+

12 ,k+ 1

2, (2.143)

Hz

∣∣i+ 1

2 ,j+12 ,k

= Hz

∣∣i+ 1

2 ,j+12 ,k

+ d∆tD−z(∇ ·H)i+ 12 ,j+

12 ,k+ 1

2, (2.144)

where

(∇ ·H)i+ 12 ,j+

12 ,k+ 1

2

= D+xHx

∣∣i,j+ 1

2 ,k+ 12

+D+yHy

∣∣i+ 1

2 ,j,k+ 12

+D+zHz

∣∣i+ 1

2 ,j+12 ,k, (2.145)

and d = h2/(6∆t). The (internal) boundary condition for this iteration is set to∇ ·H = 0 in a staircased fashion.

By doing this for the test case of a incoming plane wave on a plate, (2.114–2.117),we see in Figure 2.27 that the linear growth vanishes, and the energy behaves exactlylike in the 2D-case. The convergence is shown in Figure 2.28 to be restored in L2and the error is reduced in L∞. The reason the convergence is not fully restoredin L∞ is, while the error in the vicinity of the internal boundary is removed, theerror in cells adjacent to the boundary is not fully corrected.

Page 66: Boundary and Interface Conditions for Electromagnetic Wave Propagation …359693/FULLTEXT… ·  · 2010-11-01Boundary and Interface Conditions for Electromagnetic Wave Propagation

54 CHAPTER 2. BOUNDARY CONDITIONS IN THE YEE SCHEME

10−3

10−2

10−1

10−3

10−2

10−1

100

h

Ma

x n

orm

err

or

(a) H

10−3

10−2

10−1

10−3

10−2

10−1

100

h

L2 e

rro

r

(b) H

Figure 2.28: Convergence when projecting away the divergence afterwards usingLangdon-Marger. () is standard Yee, (×) is modified coefficients and (?) is when thedivergence error has been reduced. The slopes indicate first and half order convergence.

Page 67: Boundary and Interface Conditions for Electromagnetic Wave Propagation …359693/FULLTEXT… ·  · 2010-11-01Boundary and Interface Conditions for Electromagnetic Wave Propagation

Chapter 3

Interface conditions in the Yee scheme

We now turn our attention to the case of an internal interface intersecting thecomputational domain at an oblique angle. Considering the two-dimensional casewe again use the acoustic formulation (1.32–1.34), which has the interface conditions

n · (u2 − u1) = 0, (3.1)t · (b−1

2 u2 − b−11 u1) = 0, (3.2)

for the velocity field u = (u, v).From (3.2) we see that the component of the velocity field along the interface

can be discontinuous. This can in the same way as the boundary case give rise toO(1/h) truncation errors, but in general the errors occuring along an interface issmaller than those occurring at a boundary.

3.1 Tornberg-Engquist style modifications for the interfaceproblem

Consider the domain Ω = [0, 2π]× [0, 2π] and an interface Γ intersecting diagonallywith an angle α relative to the x-axis. Without loss of generality, we will assumeα ∈ (0, π/4). The part of Ω to the left of Γ is denoted by A, and the part to theright is denoted by B.

The spatial differentiation approximation of the right hand side of the equationgoverning the time evolution of the pressure field is for the generalized Yee schemegiven by

a(ux + vy) ≈ h−1 (aEuE − aWuW + aNvN − aSvS) . (3.3)

As in the case of a solid boundary, we Taylor expand to identify the largest error,which we then try to remove by adjusting the coefficients aE, aW, aN, aS along theinterface. Since we assume α ∈ (0, π/4) we will get two different cases in thestaircasing approximation of the boundary. The Y2 and XY4 cases; we refer toFigure 2.2 for the notation.

55

Page 68: Boundary and Interface Conditions for Electromagnetic Wave Propagation …359693/FULLTEXT… ·  · 2010-11-01Boundary and Interface Conditions for Electromagnetic Wave Propagation

56 CHAPTER 3. INTERFACE CONDITIONS IN THE YEE SCHEME

We start with the XY4 case, corresponding to uS and vE on the right side (B) ofthe interface. Then uN, vW together with p is on the left (A) side. Taylor expandingaround a point on the interface (x?, y?) ∈ Γ we then can write (3.3) as

1h

aE [uB(x?, y?) + (xE − x?)uB

x (x?, y?) + (yE − y?)uBy (x?, y?)

](3.4)

−aW [uA(x?, y?) + (xW − x?)uAx (x?, y?) + (yW − y?)uA

y (x?, y?)]

(3.5)+aN [vA(x?, y?) + (xN − x?)vA

x (x?, y?) + (yN − y?)vAy (x?, y?)

](3.6)

−aS [vB(x?, y?) + (xS − x?)vBx (x?, y?) + (yS − y?)vB

y (x?, y?) +O(h2)]

. (3.7)

Thus the lowest order terms are1h

(aEuB − aWuA + aNvA − aSvB) . (3.8)

As before, introduce a rotated coordinate system (ξ, η) such that ξ is along thetangent line Γ? to the interface Γ at (x?, y?). Denote the coefficients of the rotatedcoordinate system by (u, v), where (u, v) = uξ + vη. Thus we have the relations

u = t · (u, v) = u cosα+ v sinα,v = n · (u, v) = −u sinα+ v cosα, (3.9)

as well asu = u cosα− v sinα,v = u sinα+ v cosα, (3.10)

where the normal and tangential vectors are given by

n = (− sinα, cosα), t = (cosα, sinα). (3.11)

In the rotated coordinate system the interface conditions (3.1–3.2) becomes thejump conditions vA = vB and uA = (bA/bB)uB. Using (3.10) we can write thelowest order terms (3.8) as being proportional to (dropping the h−1)

aE (uB cosα− vB sinα)− aW (uA cosα− vA sinα

)+ aN (uA sinα+ vA cosα

)− aS (uB sinα+ vB cosα

)=(aE cosα− aS sinα

)uB +

(aN sinα− aW cosα

)uA

−(aE sinα+ aS cosα

)vB +

(aW sinα+ aN cosα

)vA. (3.12)

Using the jump conditions this reduces to[ (aE cosα− aS sinα

) bBbA

+ aN sinα− aW cosα]uA

+[aW sinα+ aN cosα− aE sinα− aS cosα

]vB. (3.13)

Page 69: Boundary and Interface Conditions for Electromagnetic Wave Propagation …359693/FULLTEXT… ·  · 2010-11-01Boundary and Interface Conditions for Electromagnetic Wave Propagation

3.2. CONSTRUCTING A BOUNDED UPDATING STENCIL 57

There are many solutions, but for simplicity we choose to set aN = aS = aA andaW = aE, giving

aW(bB

bA− 1)

cosα− aA(bB

bA− 1)

sinα = 0, (3.14)

which in turn givesaW = sinα

cosαaA, α ∈ (0, π/4). (3.15)

For the Y2 case, when vS is on the B side of the interface while vN, uE, uW istogether with p on the A side, we get that the lowest order term is proportional to

aEuA − aWuA + aNvA − aSvB (3.16)= aE (uA cosα− vA sinα

)− aW (uA cosα− v sinα

)(3.17)

+ aN (uA sinα+ vA cosα)− aS (uB sinα+ vB cosα

)(3.18)

=[(aE − aW) cosα+ aN sinα

]uA (3.19)

+[(aW − aE) sinα+ aN cosα

]vA (3.20)

− aSuB sinα− aSvB cosα. (3.21)

With the jump conditions vA = vB, u = (bA/bB)uB this reduces to[(aE − aW) cosα+

(aN − bB

bAaS)

sinα]uA

+[(aW − aE) sinα+

(aN − aS) cosα

]vA. (3.22)

This expression we can eliminate by setting aW = aS = aA and

aN = aA(

cos2 α+ bB

bAsin2 α

), (3.23)

aE = aA + aA(

cos2 α+ bA

bBsin2 α− 1

)cosαsinα . (3.24)

Thus with these choices of coefficients along the interface we can improve the trun-cation order of the spatial differentiation stencil by one order.

3.2 Constructing a bounded updating stencil

As an alternative approach, we will here use the interface/jump conditions (3.1–3.2) as a basis for constructing the update stencil across the interface. This is incontrast to Section 3.1, where the difference approximation of the PDE was usedas a starting point. One can view this as using a weak form approximation insteadof a strong form approximation.

Page 70: Boundary and Interface Conditions for Electromagnetic Wave Propagation …359693/FULLTEXT… ·  · 2010-11-01Boundary and Interface Conditions for Electromagnetic Wave Propagation

58 CHAPTER 3. INTERFACE CONDITIONS IN THE YEE SCHEME

We will consider a special case where the interface has the slope 2, i.e., the angleα between the interface and the x-axis is α = arctan 2. The coefficients are chosento be aL = bL = 1 and aR = 1, bR = 1/2, where the subscripts L and R meanleft and right respectively, of the interface. Again introduce the rotated field (u, v),this time with v along the tangent and u along with the normal. Note that this isopposite to the rotated field in Section 3.1, i.e., the rotation is still defined by

u = u cosϕ+ v sinϕ,v = −u sinϕ+ v cosϕ, (3.25)

but the rotation angle is ϕ = α−π/2. Thus for this specific case of α = arctan 2, ϕbecomes negative and we rotate clockwise. In Section 3.1 the rotation was counter-clockwise. Thus in the rotated coordinate system the jump conditions (3.1–3.2)become [

v

b

]= 2vR − vL = 0 (tangent jump),

[u] = uR − uL = 0 (normal jump).(3.26)

Hence in the original field components we can expand to get[v

b

]= 2(uR sinϕ+ vR cosϕ)− (uL sinϕ+ vL cosϕ) = 0, (3.27)

[u] = uR cosϕ− vR sinϕ− (uL cosϕ− vL sinϕ) = 0, (3.28)

which simplifies to (using that cosϕ/ sinϕ = −2)

2 (uR + 2vR) = uL + 2vL, (tangent jump),2uR − vR = 2uL − vL, (normal jump).

(3.29)

To construct the stencil with which we update the p field we form a linear combina-tion of (3.29) according to (tangent) + θ · (normal) = 0. This gives the expression

(2− θ)vL + (1 + 2θ)uL − (4− θ)vR − (2 + 2θ)uR = 0. (3.30)

Hence scaling this appropriately by φ/h, where φ is another constant, akin to θ,and h is the grid spacing, we get

∂p

∂t← (2− θ)vL + (1 + 2θ)uL − (4− θ)vR − (2 + 2θ)uR

h·φ (3.31)

Thus we have two free parameters per stencil to play with when we now map thisto the explicit cases occurring. For the given angle, tanα = 2, we get two types ofstencils, denoted A and B. This is illustrated in Figure 3.1. For the A-stencil wehave no vR, hence we set θ = 4. Furthermore, we want the coefficient for uL to be−1, thus we need to set φ = −1/9. This gives

29vL − uL + 10

9 uR = 0. (3.32)

Page 71: Boundary and Interface Conditions for Electromagnetic Wave Propagation …359693/FULLTEXT… ·  · 2010-11-01Boundary and Interface Conditions for Electromagnetic Wave Propagation

3.2. CONSTRUCTING A BOUNDED UPDATING STENCIL 59

v

pu u

v

v

p

v

v

p

v

pu u

v

p

v

p

v

B

A

Figure 3.1: Illustrating the A and B type stencils. p is updated across the interface.

Comparing with∂p

∂t= a1 · (α1u)x + a2 · (α2v)y (3.33)

we see that we can match this to an update stencil for p by letting

a1 = 1, a2 = 1, αright1 = 10

9 , αleft1 = 1, αup

2 = 1, αdown2 = 7

9 , (3.34)

giving the approximation

∂p

∂t≈ 1h

(109 uR − uL + vL −

79vR

). (3.35)

for the A-stencil.For the B-stencil we need to match uL = −1 and vL = 7/9, hence matching the

coefficients of (3.31) we get the system

φ(1 + 2θ) = −1, φ(2− θ) = 79 , (3.36)

which admits the solution θ = −5, φ = 1/9. Hence the stencil becomes

79vL − uL − vR + 8

9uR = 0. (3.37)

Again comparing with (3.33) gives the set of coefficients

a1 = 1, a2 = 1, αright1 = 8

9 , αleft1 = 1, αup

2 = 79 , αdown

2 = 1, (3.38)

and the update stencil for the B case becomes

∂p

∂t≈ 1h

(89uR − uL + 7

9vL − vR

). (3.39)

Page 72: Boundary and Interface Conditions for Electromagnetic Wave Propagation …359693/FULLTEXT… ·  · 2010-11-01Boundary and Interface Conditions for Electromagnetic Wave Propagation

60 CHAPTER 3. INTERFACE CONDITIONS IN THE YEE SCHEME

Applicability of the proof to the method

Finally we need to investigate if the method in Section 3.2 belongs to the class ofmethods shown to be stable in Theorem 2.2.2.

First we consider the specific case given by (3.35) and (3.39). Quite easily wesee that the proof covers the stencil on the left side of the interface, the issue is onthe right side.

In the numerical scheme we do not change the stencil on the right side, butfor the p directly to the right of the A-stencil we have that α(1)

W = 10/9, thus tocorrespond to the numerics we need to set α(1)

E = 10/9 and a(1) = 9/10 as well.Then the problem is the restriction (2.41), which seem to indicate that we need tomodify β too.

Thus we can conclude that the method is not covered by Theorem 2.2.2 and thequestion of stability needs to be further investigated numerically.

Consequence of violating (2.41)

Since the reason the method in Section 3.2 is not covered by Theorem 2.2.2 is (2.41),we are interested in the consequences of violating this relation. Thus instead let

β(1)

a(1) = β(2)

a(2) + δ. (3.40)

Then the norm of the p-field becomes

∥∥∥√β(1)

a(1) pn+ 1

2

∥∥∥2

h=∥∥∥√β(1)

a(1) pn− 1

2

∥∥∥2

h

+ ∆t⟨β(1)D+x

(α(1)un

)+ β(2)D+y

(α(2)vn

), pn+ 1

2 + pn−12

⟩h

+ ∆t⟨δ ·β(2)D+y

(α(2)vn

), pn+ 1

2 + pn−12

⟩h(R)

(3.41)

where the h(R) notation means to only sum over the right side. The last extraterm can also be written as

−∆t⟨α(2)vn, δ ·D−y

(β(2)pn+ 1

2 + β(2)pn−12

)⟩h(R)

(3.42)

for easier comparison with the terms occurring in the conserved energy. Thus theenergy changes by this for every timestep.

Non-divergence form

Another option is to investigate the stability of the bounded updating stencils(3.35,3.39) without formulating the problem in divergence form. Then the norms

Page 73: Boundary and Interface Conditions for Electromagnetic Wave Propagation …359693/FULLTEXT… ·  · 2010-11-01Boundary and Interface Conditions for Electromagnetic Wave Propagation

3.3. NUMERICAL RESULTS 61

become∥∥∥ 1√apn+ 1

2

∥∥∥2

h=∥∥∥ 1√

apn−

12

∥∥∥2

h(3.43)

+ ∆th

⟨aEu

nE − aWunW + aNv

nN − aSvnS , pn+ 1

2 + pn−12

⟩h

(3.44)∥∥∥ 1√bun+1

∥∥∥2

h=∥∥∥ 1√

bun∥∥∥2

h+ ∆t

⟨D−xp

n+ 12 , un+1 + un

⟩h

(3.45)∥∥∥ 1√bvn+1

∥∥∥2

h=∥∥∥ 1√

bvn∥∥∥2

h+ ∆t

⟨D−yp

n+ 12 , vn+1 + vn

⟩h. (3.46)

Taking the difference of the updating stencil for p with the usual Yee-stencil, wesee that we have an extra contribution to the energy of the form

∆th

⟨19u

nE + 2

9vnS , p

n+ 12 + pn−

12

⟩A

+ ∆th

⟨89u

nE − unW + 7

9vnN − vnS , pn+ 1

2 + pn−12

⟩B, (3.47)

where A and B subscripts mean to only sum over the A and B stencils, respectively.Thus in contrast to the boundary case we have not here an algorithm with

guaranteed stability.

3.3 Numerical results

Similar to the boundary case we run the numerical tests on Ω = [0, 2π]×[0, 2π], withhomogeneous outer boundary conditions. The error is measured on an internal areaΩ ⊂ Ω such that the effects from the outer boundary does not affect the results.The domain is dived into two parts, A and B, with different material parametersa and b. The angle of the interface relative to the x-axis is α = arctan 1/2 for theTornberg-Engquist modifications and α = arctan 2 for the bounded modifications.

First the stability is tested by initializing the field to random data and runfor a long time. The results are shown in Figures 3.2–3.5, where both type ofmodifications are tested for different timestep sizes. For the Tornberg-Engquiststyle modification in (3.15) and (3.24) we see a similar behaviour as in the boundarycase with exponential growth for long times, but independent of the number oftimesteps, i.e., the methods appears to be stable but not time-stable. For thebounded update stencil in (3.35) and (3.39) the we see a similar exponential growththat is independent of the number of timesteps, but it appears to occur much later.On the other hand, we seem to have a small linear error growth that is dependentof the number of time steps, indicating a weak instability.

Page 74: Boundary and Interface Conditions for Electromagnetic Wave Propagation …359693/FULLTEXT… ·  · 2010-11-01Boundary and Interface Conditions for Electromagnetic Wave Propagation

62 CHAPTER 3. INTERFACE CONDITIONS IN THE YEE SCHEME

0 200 400 600 800

10−2

100

102

t

L2 n

orm

diffe

ren

ce

(a) p

0 200 400 600 800

10−2

100

102

tL

2 n

orm

diffe

ren

ce

(b) u

Figure 3.2: Test of numerical stability of (3.15),(3.24), which is the Tornberg-Engquiststyle modifications, by initializing the field to random data. CFL is 0.3.

0 200 400 600 800

10−2

100

102

t

L2 n

orm

diffe

ren

ce

(a) p

0 200 400 600 800

10−2

100

102

t

L2 n

orm

diffe

ren

ce

(b) u

Figure 3.3: Same as Figure 3.4, but with CFL set to 0.03.

Page 75: Boundary and Interface Conditions for Electromagnetic Wave Propagation …359693/FULLTEXT… ·  · 2010-11-01Boundary and Interface Conditions for Electromagnetic Wave Propagation

3.3. NUMERICAL RESULTS 63

0 2000 4000 6000 8000

10−2

100

102

t

L2 n

orm

diffe

ren

ce

(a) p

0 2000 4000 6000 8000

10−2

100

102

tL

2 n

orm

diffe

ren

ce

(b) u

Figure 3.4: Test of numerical stability of (3.35),(3.39), which is the bounded updatestencil, by initializing the field to random data. CFL is 0.3. Note the much longer timescale as compared to Figures 3.2–3.3.

0 2000 4000 6000 8000

10−4

10−2

100

102

t

L2 n

orm

diffe

ren

ce

(a) p

0 2000 4000 6000 8000

10−1

100

101

102

t

L2 n

orm

diffe

ren

ce

(b) u

Figure 3.5: Same as Figure 3.4, but with CFL set to 0.03.

Page 76: Boundary and Interface Conditions for Electromagnetic Wave Propagation …359693/FULLTEXT… ·  · 2010-11-01Boundary and Interface Conditions for Electromagnetic Wave Propagation

64 CHAPTER 3. INTERFACE CONDITIONS IN THE YEE SCHEME

p u vStandard Yee 6.5334(-02) 1.5268(-01) 2.6863(-01)TE-modification 0 0 0Bounded modification 2.2204(-16) 2.2204(-16) 0

Table 3.1: Error in the static solution (3.48–3.53) measured in L∞ after timestepping.The grid size is N = 256.

3.3.1 Constant fieldThe first test case for convergence is a constant solution, which is given by

pA = 1, (3.48)uA = 1, (3.49)vA = 1/d, (3.50)

and

pB = 1, (3.51)uB = bB/bA, (3.52)vB = bB/bA(d+ 1/d) sin2 α, (3.53)

where d = 1/ tanα. The error after timestepping is computed in L∞, with theresults shown in Table 3.1. Both type of modifications completely remove theerrors generated by the interface.

3.3.2 Harmonic wave on plane surfaceFor the convergence tests we use an exact solution derived by rotating the standardformula for a transmitted plane wave. The rotation is given by

x = x cosϕ+ y sinϕ,y = −x sinϕ+ y cosϕ,

(3.54)

and

r(ν) = x(x− x, y − y) cos ν + y(x− x, y − y) sin ν, (3.55)

where ϕ = α − π/2 is the rotation of the entire field relative to the normal. Thevariable ν is used to rotate the incoming, reflected and transmitted part of the fieldrelative to the normal. For the field we use the acoustic coefficients (c, ρ) definedby

a = −c2ρ, (3.56)b = −1/ρ. (3.57)

Page 77: Boundary and Interface Conditions for Electromagnetic Wave Propagation …359693/FULLTEXT… ·  · 2010-11-01Boundary and Interface Conditions for Electromagnetic Wave Propagation

3.3. NUMERICAL RESULTS 65

The field to the left of the interface is then given by

pA = sin(ω(t− r(x, y, θ)/cA

))+R sin

(−w

(t+ r(x, y, φ)/cA

)), (3.58)

uA = 1ρAcA

(sin(ω(t− r(x, y, θ/cA

))cos(θ + ϕ) (3.59)

+R sin(ω(t+ r(x, y, φ)/cA

))cos(φ+ ϕ)

), (3.60)

vA = 1ρAcA

(sin(ω(t− r(x, y, θ)/cA

))sin(θ + ϕ) (3.61)

+R sin(ω(t+ r(x, y, φ)/cA

))sin(φ+ ϕ)

), (3.62)

where θ is angle of incoming wave and φ the angle of reflected wave. We use theincoming wave angle θ = π/8, and the reflected angle is then φ = −θ. To the rightthe field is given by

pB = T sin(ω(t− r(x, y, γ)/cB

)), (3.63)

uB = T

ρBcBsin(ω(t− r(x, y, γ)/cB

))cos(γ + ϕ), (3.64)

vB = T

ρBcBsin(ω(t− r(x, y, γ)/cB

))sin(γ + ϕ), (3.65)

where γ is angle of transmitted wave, which becomes γ = arcsin ((cB/cA) sin θ).The reflection and transmission coefficients are

R = bB√

1/(aBbB)− sin2 θ − bA√

1/(aAbA) cos θbB√

1/(aBbB)− sin2 θ + bA√

1/(aAbA) cos θ, (3.66)

T = 2bA√

1/(aAbA) cos θbB√

1/(aBbB)− sin2 θ + bA√

1/(aAbA) cos θ. (3.67)

First we compute the convergence order of the spatial discretization, with theresults shown in Figure 3.6 and 3.7. We clearly see that both modifications improvethe order of accuracy by one from O(1/h) to O(1). This agrees with what we wouldexpect.

Figure 3.8 and 3.9 shows the convergence of the solution at a fixed time. Thepressure field p converges as O(h) for both type of modifications as well as thestandard Yee method. The velocity field u converges as O(h1/2) in L2 and seemsinconsistent for all three methods in L∞. Unfortunately, despite the improvementin the spatial discretization we do not see a clear improvement in the final solution.This indicates that other error sources dominate the error generated at the interface.

In Figure 3.10 and 3.11 we see the time series of the error for both type ofmodifications as well as the standard Yee method. Here we see indications that theerror generated at the interface, which is visible directly after the first timestep in

Page 78: Boundary and Interface Conditions for Electromagnetic Wave Propagation …359693/FULLTEXT… ·  · 2010-11-01Boundary and Interface Conditions for Electromagnetic Wave Propagation

66 CHAPTER 3. INTERFACE CONDITIONS IN THE YEE SCHEME

10−3

10−2

10−1

10−1

100

101

102

h

Err

or

in L

10−3

10−2

10−1

10−1

100

101

h

Err

or

in L

2Figure 3.6: The truncation error for the p update stencil with the Tornberg-Enguiststyle modifications given by (3.15) and (3.24). () is standard Yee and (×) is the modifiedcoefficients.

10−3

10−2

10−1

10−1

100

101

102

h

Err

or

in L

10−3

10−2

10−1

10−1

100

101

h

Err

or

in L

2

Figure 3.7: The truncation error for the p update stencil with the modifications givenby (3.35) and (3.39). () is standard Yee and (×) is the modified coefficients.

L∞, is reduced by the modifications. But these errors are quickly eclipsed by someother error source, giving no real improvement at the end time.

In conclusion, we are able to reduce the local truncation error by a factor of hat the interface but unfortunately this improvement does not seem to enhance thequality of the approximation in our test cases over long time.

Page 79: Boundary and Interface Conditions for Electromagnetic Wave Propagation …359693/FULLTEXT… ·  · 2010-11-01Boundary and Interface Conditions for Electromagnetic Wave Propagation

3.3. NUMERICAL RESULTS 67

10−3

10−2

10−1

10−3

10−2

10−1

h

Err

or

in L

(a) p

10−3

10−2

10−1

10−3

10−2

10−1

h

Err

or

in L

2

(b) p

10−3

10−2

10−1

10−1

100

h

Err

or

in L

(c) u

10−3

10−2

10−1

10−2

10−1

h

Err

or

in L

2

(d) u

Figure 3.8: Convergence of the Tornberg-Enguist style modifications given by (3.15) and(3.24). () is standard Yee and (×) is the modified coefficients.

Page 80: Boundary and Interface Conditions for Electromagnetic Wave Propagation …359693/FULLTEXT… ·  · 2010-11-01Boundary and Interface Conditions for Electromagnetic Wave Propagation

68 CHAPTER 3. INTERFACE CONDITIONS IN THE YEE SCHEME

10−3

10−2

10−1

10−3

10−2

10−1

h

Err

or

in L

(a) p

10−3

10−2

10−1

10−3

10−2

10−1

h

Err

or

in L

2

(b) p

10−3

10−2

10−1

10−1

100

h

Err

or

in L

(c) u

10−3

10−2

10−1

10−2

10−1

h

Err

or

in L

2

(d) u

Figure 3.9: Convergence of the modifications given by (3.35) and (3.39). () is standardYee and (×) is the modified coefficients.

Page 81: Boundary and Interface Conditions for Electromagnetic Wave Propagation …359693/FULLTEXT… ·  · 2010-11-01Boundary and Interface Conditions for Electromagnetic Wave Propagation

3.3. NUMERICAL RESULTS 69

0 0.05 0.1 0.15 0.2 0.25 0.30

0.01

0.02

0.03

0.04

0.05

0.06

t/π

L∞

err

or

(a) p

0 0.05 0.1 0.15 0.2 0.25 0.30

0.005

0.01

0.015

0.02

0.025

t/π

L2 e

rror

(b) p

0 0.05 0.1 0.15 0.2 0.25 0.30

0.05

0.1

0.15

0.2

0.25

t/π

L∞

err

or

(c) u

0 0.05 0.1 0.15 0.2 0.25 0.30

0.01

0.02

0.03

0.04

0.05

t/π

L2 e

rror

(d) u

Figure 3.10: Time series of the Tornberg-Enguist style modifications given by (3.15) and(3.24). (– –) is standard Yee and (–) is the modified coefficients.

Page 82: Boundary and Interface Conditions for Electromagnetic Wave Propagation …359693/FULLTEXT… ·  · 2010-11-01Boundary and Interface Conditions for Electromagnetic Wave Propagation

70 CHAPTER 3. INTERFACE CONDITIONS IN THE YEE SCHEME

0 0.05 0.1 0.15 0.2 0.25 0.30

0.01

0.02

0.03

0.04

0.05

t/π

L∞

err

or

(a) p

0 0.05 0.1 0.15 0.2 0.25 0.30

0.005

0.01

0.015

0.02

0.025

t/π

L2 e

rror

(b) p

0 0.05 0.1 0.15 0.2 0.25 0.30

0.02

0.04

0.06

0.08

0.1

0.12

0.14

0.16

t/π

L∞

err

or

(c) u

0 0.05 0.1 0.15 0.2 0.25 0.30

0.01

0.02

0.03

0.04

0.05

t/π

L2 e

rror

(d) u

Figure 3.11: Time series of the modifications given by (3.35) and (3.39). (– –) is standardYee and (–) is the modified coefficients.

Page 83: Boundary and Interface Conditions for Electromagnetic Wave Propagation …359693/FULLTEXT… ·  · 2010-11-01Boundary and Interface Conditions for Electromagnetic Wave Propagation

References

[1] I. 31-5:1992. Part 5: Electricity and magnetism. ISO, Geneva, Switzerland,1992.

[2] I. 31-5:1992. Part 6: Electromagnetism. ISO, Geneva, Switzerland, 1992.

[3] A. Bondeson, T. Rylander, and P. Ingelstrom. Computational Electromagnet-ics. Springer, 2005.

[4] O. P. Bruno and F. Reitich. Solution of a boundary value problem forHelmholtz equation via variation of the boundary into the complex domain.Proc. R. Soc. Edinburgh, 122:317–340, 1992.

[5] O. P. Bruno and F. Reitich. Numerical solution of diffraction problems: amethod of variation of boundaries. J. Opt. Soc. Am. A, 10(6):1168–1175,1993.

[6] A. Cangellaris and D. Wright. Analysis of the numerical error caused by thestair-stepped approximation of a conducting boundary in FDTD simulationsof electromagnetic phenomena. IEEE Trans. Antennas Propag., 39(10):1518–1525, oct. 1991.

[7] G. Cohen, X. Ferrieres, and S. Pernet. Discontinuous Galerkin methods forMaxwell’s equations in the time domain. C. R. Phys., 7(5):494 – 500, 2006.Electromagnetic modelling.

[8] S. Dey and R. Mittra. A locally conformal finite-difference time-domain(FDTD) algorithm for modeling three-dimensional perfectly conducting ob-jects. IEEE Microw. Guided. W., 7(9):273 –275, sep. 1997.

[9] A. Ditkowski, K. Dridi, and J. S. Hesthaven. Convergent cartesian gridmethods for Maxwell’s equations in complex geometries. J. Comput. Phys.,170(1):39 – 80, 2001.

[10] B. Engquist and O. Runborg. Computational high frequency wave propagation.Acta Numer., 12:181–266, 2003.

71

Page 84: Boundary and Interface Conditions for Electromagnetic Wave Propagation …359693/FULLTEXT… ·  · 2010-11-01Boundary and Interface Conditions for Electromagnetic Wave Propagation

72 REFERENCES

[11] B. Engquist and L. Ying. Fast directional multilevel algorithms for oscillatorykernels. SIAM J. Sci. Comput., 29(4):1710–1737, 2007.

[12] M. Fusco. FDTD algorithm in curvilinear coordinates [EM scattering]. IEEETrans. Antennas Propag., 38(1):76 –89, jan. 1990.

[13] W. C. Gibson. The Method of Moments in Electromagnetics. Chapman andHall/CRC, 2007.

[14] L. Greengard and V. Rokhlin. A fast algorithm for particle simulations. J.Comput. Phys., 73(2):325 – 348, 1987.

[15] B. Gustafsson. High Order Difference Methods for Time Dependent PDE.Springer, 2008.

[16] B. Gustafsson and E. Mossberg. Time compact high order difference methodsfor wave propagation. SIAM J. Sci. Comput., 26(1):259–271, 2005.

[17] B. Gustafsson and P. Wahlund. Time compact high order difference methodsfor wave propagation, 2D. J. Sci. Comput., 25(1):195–211, 2005.

[18] Y. Hao and C. Railton. Analyzing electromagnetic structures with curvedboundaries on Cartesian FDTD meshes. IEEE T. Microw. Theory., 46(1):82–88, jan. 1998.

[19] J. S. Hesthaven and T. Warburton. Nodal high-order methods on unstructuredgrids: I. time-domain solution of Maxwell’s equations. J. Comput. Phys.,181(1):186 – 221, 2002.

[20] R. Holland. Pitfalls of staircase meshing. IEEE T. Electromagn. C., 35(4):434–439, nov. 1993.

[21] J. D. Jackson. Classical Electrodynamics. Wiley, 3 edition, 1998.

[22] T. Jurgens, A. Taflove, K. Umashankar, and T. Moore. Finite-difference time-domain modeling of curved surfaces [EM scattering]. IEEE T. Antenn. Propag.,40(4):357 –366, apr. 1992.

[23] J. B. Keller. Geometrical theory of diffraction. J. Opt. Soc. Am., 52(2):116–130, 1962.

[24] R. G. Kouyoumjian and P. H. Pathak. A uniform geometrical theory of diffrac-tion for an edge in a perfectly conducting surface. Proc. IEEE, 62:1448–1461,Nov. 1974.

[25] A. B. Langdon. On enforcing Gauss’ law in electromagnetic particle-in-cellcodes. Comput. Phys. Commun., 70(3):447 – 450, 1992.

Page 85: Boundary and Interface Conditions for Electromagnetic Wave Propagation …359693/FULLTEXT… ·  · 2010-11-01Boundary and Interface Conditions for Electromagnetic Wave Propagation

REFERENCES 73

[26] S. Leung, J. Qian, and R. Burridge. Eulerian Gaussian beams for high-frequency wave propagation. Geophysics, 72:61–76, 2007.

[27] N. K. Madsen. Divergence preserving discrete surface integral methods forMaxwell’s curl equations using non-orthogonal unstructured grids. J. Comput.Phys., 119(1):34–45, 1995.

[28] B. Marder. A method for incorporating Gauss’ law into electromagnetic PICcodes. J. Comput. Phys., 68(1):48 – 55, 1987.

[29] A. Monorchio and R. Mittra. A hybrid finite-element finite-difference time-domain (FE/FDTD) technique for solving complex electromagnetic problems.IEEE Microw. Guided. W., 8(2):93 –95, feb. 1998.

[30] M. M. Popov. A new method of computation of wave fields using Gaussianbeams. Wave Motion, 4(1):85 – 97, 1982.

[31] C. Railton and I. Craddock. Stabilised CPFDTD algorithm for the analysisof arbitrary 3D PEC structures. IEE Proc. Microwaves Antennas Propag.,143(5):367 –372, oct. 1996.

[32] C. Railton and J. Schneider. An analytical and numerical analysis of severallocally conformal FDTD schemes. IEEE T. Microw. Theory., 47(1):56 –66,jan. 1999.

[33] V. Rokhlin. Rapid solution of integral equations of classical potential theory.J. Comput. Phys., 60(2):187 – 207, 1985.

[34] O. Runborg and B. Engquist. Mathematical models and numerical methodsfor high frequency waves. Commun. Comput. Phys., 2:827–880, 2007.

[35] T. Rylander and A. Bondeson. Stable FEM-FDTD hybrid method forMaxwell’s equations. Comput. Phys. Commun., 125(1-3):75 – 82, 2000.

[36] J. A. Stratton. Electromagnetic Theory. McGraw-Hill Companies, 1941.

[37] A. Taflove and S. C. Hagness. Computational Electrodynamics: The Finite-Difference Time-Domain Method. Artech House Publishers, 3 edition, 2005.

[38] A.-K. Tornberg and B. Engquist. Regularization for accurate numerical wavepropagation in discontinuous media. Methods and Applications of Analysis,13:247–274, 2006.

[39] A.-K. Tornberg and B. Engquist. Consistent boundary conditions for the Yeescheme. J. Comput. Phys., 227(14):6922–6943, 2008.

[40] A.-K. Tornberg, B. Engquist, B. Gustafsson, and P. Wahlund. A new typeof boundary treatment for wave propagation. BIT, 46:145–170(26), November2006.

Page 86: Boundary and Interface Conditions for Electromagnetic Wave Propagation …359693/FULLTEXT… ·  · 2010-11-01Boundary and Interface Conditions for Electromagnetic Wave Propagation

74 REFERENCES

[41] P. Wahlund and B. Gustafsson. High-order difference methods for waves indiscontinuous media. J. Comput. Appl. Math., 192(1):142 – 147, 2006. SpecialIssue on Computational and Mathematical Methods in Science and Engineer-ing (CMMSE-2004).

[42] R. K. Wangsness. Electromagnetic Fields. Wiley, 2 edition, 1986.

[43] R.-B. Wu and T. Itoh. Hybrid finite-difference time-domain modeling of curvedsurfaces using tetrahedral edge elements. IEEE T. Antenn. Propag., 45(8):1302–1309, aug. 1997.

[44] K. S. Yee. Numerical solution of initial boundary value problems involvingMaxwell’s equations in isotropic media. IEEE T. Antenn. Propag., 14, 1966.

[45] I. Zagorodnov, R. Schuhmann, and T. Weiland. Conformal FDTD-methodsto avoid time step reduction with and without cell enlargement. J. Comput.Phys., 225(2):1493–1507, 2007.


Recommended