Computational Photonics - uni-jena.deComputational Photonics, Abbe School of Photonics, FSU Jena,...

67
Computational Photonics, Abbe School of Photonics, FSU Jena, Prof. T. Pertsch, 20.05.2015 1 Computational Photonics Prof. Thomas Pertsch Abbe School of Photonics Friedrich-Schiller-Universität Jena 0. Introduction and Motivation ..................................................................... 3 0.1 Why computational photonics? ......................................................................... 3 0.2 Maxwell’s equations .......................................................................................... 4 0.2.1 Maxwell’s equations in time domain ................................................................. 4 0.2.2 Maxwell’s equations in frequency domain......................................................... 5 0.3 Basic numerical operations ............................................................................... 5 0.3.1 Differentiation.................................................................................................... 5 0.3.2 Integration ......................................................................................................... 6 0.3.3 Root Finding & Minimization/ Maximization ...................................................... 7 0.3.4 Linear systems of equations ........................................................................... 10 0.3.5 Eigenvalue problems ...................................................................................... 11 0.3.6 Discrete (Fast) Fourier transform - FFT .......................................................... 11 0.3.7 Ordinary differential equations (ODEs) ........................................................... 12 1. Matrix method for stratified media ......................................................... 15 1.1 Wave equation in volumes of homogeneous media ....................................... 15 1.2 Optical layer systems ...................................................................................... 17 1.3 Derivation of the transfer matrix ...................................................................... 18 1.4 Reflection and transmission problem .............................................................. 20 1.5 Guided modes in layer systems ...................................................................... 25 2. Finite-difference method for waveguide modes ..................................... 28 2.1 Scalar approximation for weakly guiding waveguides with small index differences ...................................................................................................... 28 2.1.1 Stationary solutions of the scalar Helmholtz equation .................................... 28 2.1.2 Matrix notation of the eigenvalue equation ..................................................... 30 2.1.3 Boundary conditions ....................................................................................... 31 2.2 Full vectorial mode solver for waveguides with large index differences .......... 32 3. Beam Propagation Method (BPM) ......................................................... 40 3.1 Categorization of Partial Differential Equation (PDE) problems ...................... 40 3.2 Slowly Varying Envelope Approximation (SVEA)............................................ 42 3.3 Differential equations of BPM ......................................................................... 43 3.4 Semi-vector BPM ............................................................................................ 45 3.5 Scalar BPM ..................................................................................................... 45 3.6 Crank-Nicolson method .................................................................................. 45 3.7 Alternating Direction Implicit (ADI) .................................................................. 46 3.8 Boundary condition ......................................................................................... 46 3.8.1 Absorbing Boundary Conditions (ABC) ........................................................... 46 3.8.2 Transparent Boundary Condition (TBC).......................................................... 47 3.8.3 Perfectly matched layer boundaries (PML) ..................................................... 48 3.9 Conformal mapping regions ............................................................................ 50 3.10 Wide-angle BPM based on Padé operators .................................................... 51 3.10.1 Fresnel approximation – Padé 0 th order .......................................................... 52 3.10.2 Wide angle (WA) approximation – Padé (1,1)................................................. 53 4. Finite Difference Time Domain Method (FDTD)..................................... 55 4.1 Maxwell’s equations ........................................................................................ 55 4.2 1D problems ................................................................................................... 56 4.2.1 Solution with finite difference method in the time domain for E z ..................... 57 4.2.2 Yee grid in 1D and Leapfrog time steps .......................................................... 59

Transcript of Computational Photonics - uni-jena.deComputational Photonics, Abbe School of Photonics, FSU Jena,...

Page 1: Computational Photonics - uni-jena.deComputational Photonics, Abbe School of Photonics, FSU Jena, Prof. T. Pertsch, 20.05.2015 5 0.2.2 Maxwell’s equations in frequency domain Using

Computational Photonics, Abbe School of Photonics, FSU Jena, Prof. T. Pertsch, 20.05.2015 1

Computational Photonics Prof. Thomas Pertsch

Abbe School of Photonics Friedrich-Schiller-Universität Jena

0. Introduction and Motivation ..................................................................... 3 0.1 Why computational photonics? ......................................................................... 3 0.2 Maxwell’s equations .......................................................................................... 4 0.2.1 Maxwell’s equations in time domain ................................................................. 4 0.2.2 Maxwell’s equations in frequency domain......................................................... 5 0.3 Basic numerical operations ............................................................................... 5 0.3.1 Differentiation .................................................................................................... 5 0.3.2 Integration ......................................................................................................... 6 0.3.3 Root Finding & Minimization/ Maximization ...................................................... 7 0.3.4 Linear systems of equations ........................................................................... 10 0.3.5 Eigenvalue problems ...................................................................................... 11 0.3.6 Discrete (Fast) Fourier transform - FFT .......................................................... 11 0.3.7 Ordinary differential equations (ODEs) ........................................................... 12

1. Matrix method for stratified media ......................................................... 15 1.1 Wave equation in volumes of homogeneous media ....................................... 15 1.2 Optical layer systems ...................................................................................... 17 1.3 Derivation of the transfer matrix ...................................................................... 18 1.4 Reflection and transmission problem .............................................................. 20 1.5 Guided modes in layer systems ...................................................................... 25

2. Finite-difference method for waveguide modes ..................................... 28 2.1 Scalar approximation for weakly guiding waveguides with small index

differences ...................................................................................................... 28 2.1.1 Stationary solutions of the scalar Helmholtz equation .................................... 28 2.1.2 Matrix notation of the eigenvalue equation ..................................................... 30 2.1.3 Boundary conditions ....................................................................................... 31 2.2 Full vectorial mode solver for waveguides with large index differences .......... 32

3. Beam Propagation Method (BPM) ......................................................... 40 3.1 Categorization of Partial Differential Equation (PDE) problems ...................... 40 3.2 Slowly Varying Envelope Approximation (SVEA) ............................................ 42 3.3 Differential equations of BPM ......................................................................... 43 3.4 Semi-vector BPM ............................................................................................ 45 3.5 Scalar BPM ..................................................................................................... 45 3.6 Crank-Nicolson method .................................................................................. 45 3.7 Alternating Direction Implicit (ADI) .................................................................. 46 3.8 Boundary condition ......................................................................................... 46 3.8.1 Absorbing Boundary Conditions (ABC) ........................................................... 46 3.8.2 Transparent Boundary Condition (TBC).......................................................... 47 3.8.3 Perfectly matched layer boundaries (PML) ..................................................... 48 3.9 Conformal mapping regions ............................................................................ 50 3.10 Wide-angle BPM based on Padé operators .................................................... 51 3.10.1 Fresnel approximation – Padé 0th order .......................................................... 52 3.10.2 Wide angle (WA) approximation – Padé (1,1) ................................................. 53

4. Finite Difference Time Domain Method (FDTD)..................................... 55 4.1 Maxwell’s equations ........................................................................................ 55 4.2 1D problems ................................................................................................... 56 4.2.1 Solution with finite difference method in the time domain for Ez ..................... 57 4.2.2 Yee grid in 1D and Leapfrog time steps .......................................................... 59

Page 2: Computational Photonics - uni-jena.deComputational Photonics, Abbe School of Photonics, FSU Jena, Prof. T. Pertsch, 20.05.2015 5 0.2.2 Maxwell’s equations in frequency domain Using

Computational Photonics, Abbe School of Photonics, FSU Jena, Prof. T. Pertsch, 20.05.2015 2

4.3 3D problems ................................................................................................... 60 4.3.1 Yee grid in 3D ................................................................................................. 61 4.3.2 Physical interpretation..................................................................................... 62 4.3.3 Divergence-free nature of the Yee discretization ............................................ 64 4.3.4 Computational procedure ................................................................................ 65 4.4 Simplification to 2D problems ......................................................................... 66 4.5 Implementing light sources ............................................................................. 66 4.6 Relation between frequency and time domain ................................................ 68 4.7 Dispersive and nonlinear materials ................................................................. 70 4.8 Boundary conditions ....................................................................................... 72

5. Fiber waveguides .................................................................................. 73 5.1.1 The general eigenvalue problem for scalar fields ........................................... 73 5.1.2 Properties of guided modes ............................................................................ 73 5.1.3 Cylinder symmetric waveguides ..................................................................... 75 5.1.4 Bessel’s differential equation .......................................................................... 76 5.1.5 Analytical solutions of Bessel’s differential equation ....................................... 77 5.1.6 Specifying the numerical problem ................................................................... 78 5.1.7 Solving the second order singularity ............................................................... 79 5.1.8 Numerical integration methods ....................................................................... 80 5.1.9 Eigenvalue search .......................................................................................... 82 5.1.10 Calculation examples ...................................................................................... 83

6. Fourier Modal Method for periodic systems ........................................... 86 6.1 Formulation of the problem in 2D for TE ......................................................... 87 6.2 Scalar theory for thin elements ....................................................................... 88 6.3 Rigorous grating solver ................................................................................... 90 6.3.1 Calculation of eigenmodes in Fourier space ................................................... 91 6.3.2 Explicit derivation for 2D problems ................................................................. 95

7. Finite Element Method (FEM) .............................................................. 100 7.1 The basic set up ........................................................................................... 101 7.2 Global vs. local labeling ................................................................................ 101 7.3 Weak formulation .......................................................................................... 102 7.4 Example Results ........................................................................................... 104

8. Outlook ................................................................................................ 107

Page 3: Computational Photonics - uni-jena.deComputational Photonics, Abbe School of Photonics, FSU Jena, Prof. T. Pertsch, 20.05.2015 5 0.2.2 Maxwell’s equations in frequency domain Using

Computational Photonics, Abbe School of Photonics, FSU Jena, Prof. T. Pertsch, 20.05.2015 3

0. Introduction and Motivation 0.1 Why computational photonics? • it’s a numerical experiment • provides insides to inaccessible domain • permits to interpret and understand experimental results • simplifies the design of functional elements • explores prospective applications presently not realizable • with available large scale computational resources it became an inevitable

tool in the world of micro- and nanooptics

What is light? • „Light is like an odor an emanation of our body“

Epikur (Greek philosopher, 341-271 BC) • Straight „Light-Ray“ as an abstract imagination

Euklid in „Elements“ (365 - ca. 300 BC) • Light is an electromagnetic wave

J. C. Maxwell 1873 (Propagation and interaction of light with matter) • Light consists of particles (Photons)

A. Einstein 1905 (Creation and absorption) • Light is particle and wave

De Broglie 1923 (quantum mechanics)

Formulation of the problem: For a specific geometry and a particular set of boundary conditions Maxwell‘s equations have to be solved (with or without approximations) Description of the interaction of electromagnetic waves with matter • Initially published 1873 by James Clark Maxwell • Experimental proof by Heinrich Rudolf Hertz 1884 (speed of radio waves

corresponds to the speed of light)

Page 4: Computational Photonics - uni-jena.deComputational Photonics, Abbe School of Photonics, FSU Jena, Prof. T. Pertsch, 20.05.2015 5 0.2.2 Maxwell’s equations in frequency domain Using

Computational Photonics, Abbe School of Photonics, FSU Jena, Prof. T. Pertsch, 20.05.2015 4

0.2 Maxwell’s equations 0.2.1 Maxwell’s equations in time domain

makr

ext

( , ) ( , )rot ( , ) , rot ( , ) ( , ) ,

div ( , ) ( , ), div ( , ) 0,

t tt t tt t

t t t

∂ ∂= − = +

∂ ∂= r =

B r D rE r H r j r

D r r B r (1)

− E(r,t) electric field [V m-1] − H(r,t) magnetic field [A m-1] − D(r,t) dielectric flux density [As m-2] − B(r,t) magnetic flux density [Vs m-2] − rext(r,t) external charge

density [As m-3] − jmakr(r,t) macroscopic current

density [A m-2] (Usually there are no external charges or currents in optics.)

Matter equations in time domain

0

0

( , ) ( , ) ( , ),( , ) ( , ) ( , )

t t tt t t= ε +

= µ +

D r E r P rB r H r M r

(2)

− P(r,t) dielectric polarization [As m-2] − M(r,t) magnetic polarization (magnetization) [Vs m-2] − 0ε permittivity of vacuum 2 1 12

0 0 0( c ) 8.85 10 As/Vm− −ε = µ = ⋅

− 0µ permeability of vacuum 120 4 10 Vs/Am−µ = π ⋅

in linear, local, isotropic Media in optics

00

( , ) ( , ) ( , ) ,

( , ) 0

t R t t t t

t

′ ′= ε − ∂

=

∫P r r E r

M r (3)

with ( , )R t′r being the response function

Page 5: Computational Photonics - uni-jena.deComputational Photonics, Abbe School of Photonics, FSU Jena, Prof. T. Pertsch, 20.05.2015 5 0.2.2 Maxwell’s equations in frequency domain Using

Computational Photonics, Abbe School of Photonics, FSU Jena, Prof. T. Pertsch, 20.05.2015 5

0.2.2 Maxwell’s equations in frequency domain Using Fourier transformation to transform into frequency space

1( , ) ( , )exp( ) , ( , ) ( , )exp( )2

t i t d t i t dt∞ ∞

−∞ −∞

= ω − ω ω ω = ωπ∫ ∫V r V r V r V r . (4)

Maxwell’s equations in frequency domain by FT it∂

− ω∂

rot ( , ) ( , ), rot ( , ) ( , ),div ( , ) ( , ), div ( , ) 0.

i iω = ω ω ω = − ω ω

ω = r ω ω =

E r B r H r D rD r r B r

(5)

Matter equations in frequency domain

( , ) ( , )exp( )R t i t t∞

−∞

χ ω = ω ∂∫r r (6)

with ( , )χ ωr being the material´s susceptibility, which is connected to the dielectric constant ( , )ε ωr by ( , ) 1 ( , )ε ω = + χ ωr r )

0 0

0

( , ) ( , ) ( , ) ( , ) ( , ) ( , )

( , ) 0 ( , ) ( , )

ω = ε χ ω ω → ω = ε ε ω ω

ω = → ω = µ ω

P r r E r D r r E r

M r B r H r

(7)

0.3 Basic numerical operations 0.3.1 Differentiation Derived from the definition of differentiation, e.g. right-sided/forward difference equation

0

( ) ( ) ( )( ) limh

f x f x h f xf xx h→

∂ + −′= =∂

for finite h ( ) ( )( ) [ ( )]h

f x h f xf x D f xh

+ −′ ≈ =

or left-sided/backward ( ) ( )[ ( )]h

f x f x hD f xh

− −= .

or central operator ( ) ( )[ ( )]

2hf x h f x hD f x

h+ − −

=

higher order differentiation

Page 6: Computational Photonics - uni-jena.deComputational Photonics, Abbe School of Photonics, FSU Jena, Prof. T. Pertsch, 20.05.2015 5 0.2.2 Maxwell’s equations in frequency domain Using

Computational Photonics, Abbe School of Photonics, FSU Jena, Prof. T. Pertsch, 20.05.2015 6

22

( ) 2 ( ) ( )( ) [ ( )]hf x h f x f x hf x D f x

h− − + +′′ ≈ =

0.3.2 Integration

( ) ( )11

0.

i

i

xb N

ia x

A dx f x dx f x+−

=

= =∑∫ ∫

with 1[ , ]i i iI x x += where 1i ix x h+ = + and ( ) /h b a N= − with 0 , Nx a x b= =

Decomposition of the full integration interval [ ],a b into N equivalent partial

intervals 1[ , ]i i iI x x += .

Implementation example: rectangle rule in each interval the mean value of the function is approximated by

12

( )2i ii

hf x f f x+

≈ = +

resulting in an integral approximation 11 1 1

1 1 10 0 02 2 2

i

i

xN N N

i i ii i ix

b aA dx f h f fN

+− − −

+ + += = =

−≈ = =∑ ∑ ∑∫

Rectangle rule for approximation of integrals.

Page 7: Computational Photonics - uni-jena.deComputational Photonics, Abbe School of Photonics, FSU Jena, Prof. T. Pertsch, 20.05.2015 5 0.2.2 Maxwell’s equations in frequency domain Using

Computational Photonics, Abbe School of Photonics, FSU Jena, Prof. T. Pertsch, 20.05.2015 7

0.3.3 Root Finding & Minimization/ Maximization

Root finding of a single isolated root in one dimension.

Secant method for 1D iterative solution by

11

1

( )( ) ( )

i ii i

i i

x xx x f xf x f x

−+

−= −

until

( ) ( ) ( )1 10i i if x f x f x−− ≤ ε with ε determined by the desired accuracy

Illustration of the secant method (The individual points are numbered in the order of the iterations.)

Page 8: Computational Photonics - uni-jena.deComputational Photonics, Abbe School of Photonics, FSU Jena, Prof. T. Pertsch, 20.05.2015 5 0.2.2 Maxwell’s equations in frequency domain Using

Computational Photonics, Abbe School of Photonics, FSU Jena, Prof. T. Pertsch, 20.05.2015 8

Secant method Codeschnipsel 11 function [x,i,status] = secant_method(x0,x1,tol1,tol2,no) 2 3 %x0,x1: start value 4 %tol1, tol2: tolerance 5 %no: maximum number iterations 6 7 %graphic output 8 ab = -0.4; x_old=1000;fx_old=1000; 9 axis on; 10 plot( [-5 5], [0 0]); % plotting x-axis 11 hold on; 12 set(findobj(gca,'Type','line','Color',[0 0 1]),'Color', 'black','LineWidth',1) 13 p=(-5):0.1:(5); 14 for i=1:1:(101) 15 f(i) = f1(p(i)); 16 end 17 plot(p,f,'LineWidth',1); 18 i = 0; fa = f1(x0); fb = f1(x1); 19 if abs(fa) > abs(fb) 20 a = x0; b = x1; 21 else 22 a = x1; b = x0; tmp = fb; fb = fa; fa = tmp; 23 end 24 % iteration of the secant 25 while i < no 26 s=fb/fa; r=1-s; 27 t=s*(a-b); %ascent between two points oft he secant 28 x=b-t/r; % step towards root 29 fx=f1(x); % converging towards root 30 % output of points of the secant 31 if abs(x_old-x)<0.3 && abs(fx_old-fx)<0.3 32 ab=ab-0.2; 33 end 34 x_old=x; fx_old=fx; 35 plot(x,fx,'rO','LineWidth',1); 36 text(x+ab, fx,num2str(i+1),'HorizontalAlignment','left') 37 if t == 0 38 status = 'Method did not converge.'; return 39 end 40 if abs(fx) < tol1 41 status = 'Method converged and calculated solution.'; return 42 end 43 if abs(x-b) < tol2*(1+abs(x)) 44 status = 'Method converged and calculated solution.'; return

Page 9: Computational Photonics - uni-jena.deComputational Photonics, Abbe School of Photonics, FSU Jena, Prof. T. Pertsch, 20.05.2015 5 0.2.2 Maxwell’s equations in frequency domain Using

Computational Photonics, Abbe School of Photonics, FSU Jena, Prof. T. Pertsch, 20.05.2015 9

45 end 46 i = i+1; 47 if abs(fx) > abs(fb) 48 a = x; fa = fx; 49 else 50 a = b; fa = fb; b = x; fb = fx; 51 end 52 end 53 status = 'Number iterations exceeded.';

Minima of higher-dimensional functions by minimization along alternating directions Approach: solution of multiple one-dimensional minimizations in alternating directions. Starting from point 1P

into direction 1u

1 1,P u

and iteratively minimizing

( )( )( )( )

( )( )

1 1 1 2 1 1 1

2 2 2 3 2 2 2

1

min

min

min n n n n n n

f P u P P u

f P u P P u

f P u P P u

+ λ = + λ

+ λ = + λ

+ λ = + λ

until no further improvement can be obtained along any direction. Choosing directions along steepest descent (opposite to gradient)

( )1i i iiP P f P+ = − λ ∇

mit ( )( )( )min i ii tf P t f P

∈λ = − ∇

Examples of easy and difficult converging surfaces.

Page 10: Computational Photonics - uni-jena.deComputational Photonics, Abbe School of Photonics, FSU Jena, Prof. T. Pertsch, 20.05.2015 5 0.2.2 Maxwell’s equations in frequency domain Using

Computational Photonics, Abbe School of Photonics, FSU Jena, Prof. T. Pertsch, 20.05.2015 10

0.3.4 Linear systems of equations System of algebraic equations

11 1 12 2 13 3 1 1

21 1 22 2 23 3 2 2

31 1 32 2 33 3 3 3

1 1 2 2 3 3

...

...

......

...

n n

n n

n n

m m m mn n m

a x a x a x a x ba x a x a x a x ba x a x a x a x b

a x a x a x a x b

+ + + + =

+ + + + =

+ + + + =

+ + + + =

in matrix representation

Ax b=

with A being a coefficient matrix and b

a column vector

11 12 1

21 22 2

1 2 3 4

...

...A

...

n

n

m m m m

a a aa a a

a a a a

=

,

1

2

...

m

bb

b

b

=

.

alternative formulation of the problem ( ) 0f x = with ( )

1

n

i ij j ij

f x a x b=

= −∑ and

1, , ; 1, ,j n i m= = Types of problems:

− Ax b=

− calculating the inverse matrix 1A− with -1ˆ ˆ ˆAA E= equivalent to

ˆj jAx b=

with 1,...,j N= and 1jjb = , and all other 0 , then

( )11

ˆ ,..., NA x x− =

Important matrix properties: 1. n m= same number of equations and unknowns 2. hermite matrix †ˆ ˆA A= (komplex conjugate and transposed) 3. positiv definite ˆ 0vAv v> ∀

4. band matrix

5. sparse matrix most matrix coefficients are zero

always use addapted solution schemes

Page 11: Computational Photonics - uni-jena.deComputational Photonics, Abbe School of Photonics, FSU Jena, Prof. T. Pertsch, 20.05.2015 5 0.2.2 Maxwell’s equations in frequency domain Using

Computational Photonics, Abbe School of Photonics, FSU Jena, Prof. T. Pertsch, 20.05.2015 11

0.3.5 Eigenvalue problems

( )2

2ˆ ˆ ˆM with M E 0x x xΩ

ω⋅ = λ λ = → −λ =

characteristic polynomial ˆ ˆdet M E ( ) 0P − λ = λ = to have solutions of

( )ˆ ˆ 0M E x− λ = which are not identical zero

0.3.6 Discrete (Fast) Fourier transform - FFT Starting from periodic function ( ) ( )f x L f x± = Periodic original space with set of discrete points with period L and step size a

0, ,2 , ,x a a L a= −

Periodic frequency space with set of discrete frequencies

[ ] 2 2 20,1 ,2 , , 1LL L a Lk π π π= ⋅ ⋅ − with L N

a=

Definition of discrete Fourier transform (FT)

( ) ( )ikx

xf k a e f x−= ∑

with ( )2, 0La LN k n n Nπ= = ≤ < , x n a= ⋅

and inverse discrete Fourier transform (FT-1)

( ) ( )1 ikxL

kf x e f k= ∑

General property: 1( ) FT ( ) ( )f x f k FT f x−→ → → →

Page 12: Computational Photonics - uni-jena.deComputational Photonics, Abbe School of Photonics, FSU Jena, Prof. T. Pertsch, 20.05.2015 5 0.2.2 Maxwell’s equations in frequency domain Using

Computational Photonics, Abbe School of Photonics, FSU Jena, Prof. T. Pertsch, 20.05.2015 12

Illustration of decomposition of periodic function into harmonic functions.

Generalization for higher dimensions with ( x x→

; k k→

), e.g. for 3 dimensions

( ) ( )

( ) ( )

3

3

1

ikx

x

ikx

k

f k a e f x

f x e f kL

−=

=

0.3.7 Ordinary differential equations (ODEs) General form of ordinary differential equation

( ) ( )( 1), ',..., ,n

nn

d f tG f f f t

dt−=

distinction of initial value problems and boundary value problems

Initial value problems (AWA) initial values

( ) ( ) ( ) ( )10 , ' 0 ,..., 0nf t f t f t−= = =

Page 13: Computational Photonics - uni-jena.deComputational Photonics, Abbe School of Photonics, FSU Jena, Prof. T. Pertsch, 20.05.2015 5 0.2.2 Maxwell’s equations in frequency domain Using

Computational Photonics, Abbe School of Photonics, FSU Jena, Prof. T. Pertsch, 20.05.2015 13

equivalent to system of coupled first order differential equations

( )

( )

( )

( )

11 1 2

22 1 2

33 1 2

1 2

( ) , ,..., ,

( ) , ,..., ,

( ) , ,..., ,

( ) , ,..., ,

n

n

n

nn n

df t G f f f tdt

df t G f f f tdt

df t G f f f tdt

df t G f f f tdt

=

=

=

=

Simple solution method

Forward Euler scheme problem:

( ) ( )( ),f t G f t t′ = transformed into difference equation:

( ) ( ) ( ) ( )( )'( ) ,tf t t f t

f t D f t G f t ttD

+ D −= = = D

with discretization tD : ( ) :nf f n t= ⋅D results in difference equation

( )1 ,n nn

f f G f tt

+ −=

D

and recursion formula for the solution of the ODE

( )1 ,n n nf f t G f t+ = + D ⋅

Page 14: Computational Photonics - uni-jena.deComputational Photonics, Abbe School of Photonics, FSU Jena, Prof. T. Pertsch, 20.05.2015 5 0.2.2 Maxwell’s equations in frequency domain Using

Computational Photonics, Abbe School of Photonics, FSU Jena, Prof. T. Pertsch, 20.05.2015 14

Limitation: global error

h

Error

Discretization error Round off error

Global

Limitation: instability

1

2 3

exakte Lösung

Euler Lösung

p

q

Instability scheme of harmonic oscillator equation.

Page 15: Computational Photonics - uni-jena.deComputational Photonics, Abbe School of Photonics, FSU Jena, Prof. T. Pertsch, 20.05.2015 5 0.2.2 Maxwell’s equations in frequency domain Using

Computational Photonics, Abbe School of Photonics, FSU Jena, Prof. T. Pertsch, 20.05.2015 15

1. Matrix method for stratified media 1.1 Wave equation in volumes of homogeneous media From Maxwell's equation one can derive wave equations in inhomogeneous media for different fields. Electric field: 2

0 0( , ) ( , ) ( , )∇×∇× ω = ω ε µ ε ω ωE r r E r (8) Dielectric flux density (electric displacement):

20

0

1 ( , ) ( , )( , )

∇×∇× ω = ω µ ωε ε ω

D r D rr

(9)

Magnetic field:

20

0

1 ( , ) ( , )( , )

∇× ∇× ω = ω µ ωε ε ω

H r H rr

(10)

For homogeneous media these wave equations simplify considerably: ( , ) ( )ε ω = ε ωr (11) divergence condition 0 0( ) ( , ) ( ) ( , ) 0∇ ε ε ω ω = ε ε ω ∇ ω =E r E r

(12) curl curl grad div – Laplace

0

( , ) ( , ) ( , ) ( , )=

∇×∇× ω =∇ ∇ ω − D ω = −D ω E r E r E r E r

((

(13)

Helmholtz equation

2

2( , ) ( ) ( , ) 0cω

D ω + ε ω ω =E r E r with 2

0 0

1c =ε µ

(14)

To solve the Helmholtz equation one can choose between different ansatz functions, each having advantages for different investigated problems or coordinate systems. Here we are choosing the plane wave ansatz function:

0( , ) ( )exp(i ( ) )ω = ω ωE r E k r with 2

0 0

1c =ε µ

(15)

The plane wave ansatz function has the following parameters

complex amplitude vector (polarization & phase):

0

00

0

( )x

y

z

EEE

ω =

E (16)

wave vector (phase velocity & direction of energy flow): ( )x

y

z

kkk

ω =

k (17)

Page 16: Computational Photonics - uni-jena.deComputational Photonics, Abbe School of Photonics, FSU Jena, Prof. T. Pertsch, 20.05.2015 5 0.2.2 Maxwell’s equations in frequency domain Using

Computational Photonics, Abbe School of Photonics, FSU Jena, Prof. T. Pertsch, 20.05.2015 16

These six parameters can't be chosen completely independently. They rather have to fulfill the dispersion relation and must form a divergence-free field: 0 ( ) ( , ) 0ε ε ω ∇ ω =E r (18) The ansatz must solve the Helmholtz equation which results in an eigenvalue problem, the solution of which determines the dispersion relation. Inserting the plane wave ansatz into Helmholtz equation:

0( , ) ( )exp(i ( ) )ω = ω ωE r E k r 2

2( , ) ( ) ( , ) 0cω

D ω + ε ω ω =E r E r (19)

with

0

0

0

( , ) exp( ( )) ( ) ( , )x

y x y z

z

x EE i k x k y k z i

yE

z

∂ ∂ ∂ ∇ ω = + + = ω ω ∂ ∂

E r k E r

(20)

and ( ) 2( , ) ( , ) ( ) ( , )∇ ∇ ω = D ω = − ω ωE r E r k E r

(21)

Hence the dispersion relation of free space is

2

2( ) ( )cω

ω = ε ωk (22)

Without loss of generality we define the z-axis as the axis of propagation.

2

2 22k ( ) ( ) k ( ) k ( )z x yc

ωω = ± ε ω − ω − ω (23)

We are looking at the different types of solutions which fulfill the dispersion relation:

Page 17: Computational Photonics - uni-jena.deComputational Photonics, Abbe School of Photonics, FSU Jena, Prof. T. Pertsch, 20.05.2015 5 0.2.2 Maxwell’s equations in frequency domain Using

Computational Photonics, Abbe School of Photonics, FSU Jena, Prof. T. Pertsch, 20.05.2015 17

Propagating waves

for 2

2 22 ( ) k ( ) k ( )x yc

ωε ω > ω + ω

22 2

2k ( ) ( ) k ( ) k ( )z x ycω

ω = ε ω − ω − ω

The sign of the wave vector dictates the direction (forward/backward) of propagation.

source

Evanescent waves

for 2

2 22 ( ) k ( ) k ( )x yc

ωε ω < ω + ω

22 2

2ik ( ) ( ) k ( ) k ( ) ( )z x y cω

ω = γ ω = ω + ω − ε ω

The sign of the wave vector must be chosen to ensure decay.

source

1.2 Optical layer systems Now we are looking for solutions of the wave equation in inhomogeneous media, which are constructed as a stack of homogeneous layers. This results in two categories of physical problems:

Transmission-reflection problem

− Bragg mirrors − chirped mirrors for dispersion compensation

z

x

y

Page 18: Computational Photonics - uni-jena.deComputational Photonics, Abbe School of Photonics, FSU Jena, Prof. T. Pertsch, 20.05.2015 5 0.2.2 Maxwell’s equations in frequency domain Using

Computational Photonics, Abbe School of Photonics, FSU Jena, Prof. T. Pertsch, 20.05.2015 18

− interferometers

Guided modes

− multi-layer waveguides − Bragg waveguides

The general idea for the solution of these problems is the following: • Separating the domains in regions for which an analytical solution for the

wave equation exists = mode expansion (free space plane wave) • Expanding the field into a superposition of these modes = Adjusting the

amplitudes of each mode, such that the boundary conditions are fulfilled (exact or approximately)

• Modes in which the field is expanded should be adopted to the geometry Fields in the layer system

Prerequisites:

− stationary − layers in y-z-plane − incident fields in x-z-plane

Ansatz: ( )z( , , ) Re ( )expx z t x ik z i t= − ω rE E

( )z( , , ) Re ( )expx z t x ik z i t= − ω rH H

Decomposition in TE and TM fields:

TE 0

, 00

HE

H

= =

E Hx

TE y TE

z

TM 0

, 00

EH

E

= =

H Ex

TM y TM

z

1.3 Derivation of the transfer matrix Transition conditions Fields: Et and Ht continuous TE: E(y) and Hz TM: H(y) and Ez

z

x

y

Page 19: Computational Photonics - uni-jena.deComputational Photonics, Abbe School of Photonics, FSU Jena, Prof. T. Pertsch, 20.05.2015 5 0.2.2 Maxwell’s equations in frequency domain Using

Computational Photonics, Abbe School of Photonics, FSU Jena, Prof. T. Pertsch, 20.05.2015 19

Calculation of tangential components (normal components can be derived from them) wave vector component kz conserved throughout the layer system (determined by incidence angle)

wave vector component kx constant in a single homogeneous layer but varies from layer to layer

( )2

2 22ix i zk k

= ε ω −

Field calculation of continuous components (TE)

( )2

2 22z2 2 ( ) 0

xi

i y

k

k E xx c

∂ ω

+ ε ω − = ∂

((((

and z0

( ) ( )yiH x E x

x∂

= −ωµ ∂

Solution:

( ) ( )

( ) ( )i1 2 x

0 1 2

( ) cos sin

( ) ( ) sin cos

i

i i i

y x

z y x x x

E x C k x C k x

i H x E x k C k x C k xx

= +

∂ ωµ = = − + ∂

Determination of 1 2,C C by 1(0)yE C= and 20

iy xE k Cx∂

=∂

TE:

( ) ( )

( ) ( )i 0x

0

1( ) cos (0) sin

sin (0) cos

i i

i i i

y x y x y

y x x y x y

E x k x E k x Ek x

E k k x E k x Ex x

∂= +

∂ ∂= − +

∂ ∂

TM:

( ) ( )

( ) ( )0

0

1( ) cos (0) sin

1 1sin (0) cos

i i

i

i

i i

iy x y x y

x i

xy x y x y

i i i

H x k x H k x Hk x

kH k x H k x H

x x

ε ∂= +

ε ∂

∂ ∂= − +

ε ∂ ε ε ∂

Combined TE/TM:

Θkz

Θkz

kz

kx

kzkx

kz

kxkz

kx

kzkxkzkx

Page 20: Computational Photonics - uni-jena.deComputational Photonics, Abbe School of Photonics, FSU Jena, Prof. T. Pertsch, 20.05.2015 5 0.2.2 Maxwell’s equations in frequency domain Using

Computational Photonics, Abbe School of Photonics, FSU Jena, Prof. T. Pertsch, 20.05.2015 20

( ) ( )

( ) ( )i

i

1( ) cos (0) sin (0)

( ) sin (0) cos (0)

i i

i

i i i

x xx

x x x

F x k x F k x Gk

G x k k x F k x G

= +α

= −α +

TE: 0 i, , 1y z yF E G i H Ex∂

= = ωµ = α =∂

TM: 0 i i, , 1/y z i yF H G i E Hx∂

= = − ωε = α α = ε∂

Summary of matrix method:

1 0 0

ˆm ( ) MN

i iiD

F F Fd

G G G=

= =

with ( )( ) ( )

( ) ( )

ix1cos sin

msin cos

i ii

i i

k d k dkx

k k d k d

α= − α

ixix i

ix i ix ix

TE: i, , 1y yF E G Ex∂

= = α =∂

TM: i i, , 1/y i yF H G Hx∂

= = α α = ε∂

1.4 Reflection and transmission problem

Transmission coefficient (T) und reflection coefficient (R)

in in

T RF FT RF F

= =

z

x

given: F(0), G(0), kz, εi, di

to be calculated fields: F(D), G(D)

( ) ( )2

2 2i z

0

2,ix zk k k

πω = ε ω − λ

0

D

z

x

y z

x

yFin FR

FT

Fin FR

FT

substrate, s

cladding, c

Page 21: Computational Photonics - uni-jena.deComputational Photonics, Abbe School of Photonics, FSU Jena, Prof. T. Pertsch, 20.05.2015 5 0.2.2 Maxwell’s equations in frequency domain Using

Computational Photonics, Abbe School of Photonics, FSU Jena, Prof. T. Pertsch, 20.05.2015 21

Connecting the incident, reflected, and transmitted fields with the transfer matrix by expressing the fields at the interfaces of the layer system based on incident, reflected, and transmitted fields: At the substrate side:

[ ]

[ ]in S R S

S S in S R S

(0,z) exp( ) exp( ) exp( )

(0,z) exp( ) exp( ) exp( )z x x

x z x x

F ik z F ik x F ik x

G i k ik z F ik x F ik x

= + −

= α − −

At the cladding side:

[ ]

[ ]T C

C C T C

( ,z) exp( ) exp ( )

( ,z) exp( ) exp ( )z x

x z x

F D ik z F ik x D

G D i k ik z F ik x D

= −

= α −

Connecting the substrate and cladding side by the transfer matrix:

( )in RT 11 12

S S in RC C T 21 22

( ) ( )( ) ( ) xx

F FF M D M Dk F Fk F M D M D

+ = α −α ii

Resulting in reflection/transmission coefficients:

( )22 11 21 12

2

k M k M M k k MR

NkT

N

α −α − + α α=

α=

s sx c cx s sx c cx

s sx

i

with ( )22 11 21 12N k M k M M k k M= α + α + −α αs sx c cx s sx c cxi

( )2

2 2s/c x s/c 0

0

2zk k

π= ε λ − λ

Energy flux defined by the normal component of the Poynting vectors sx

x T x R

x in x in

s ss s

τ = r =

z

x

ysin sR sxR

sT sxT

sx in

z

x

y z

x

ysin sR sxR

sT sxT

sx in

substrate, s

cladding, c

Page 22: Computational Photonics - uni-jena.deComputational Photonics, Abbe School of Photonics, FSU Jena, Prof. T. Pertsch, 20.05.2015 5 0.2.2 Maxwell’s equations in frequency domain Using

Computational Photonics, Abbe School of Photonics, FSU Jena, Prof. T. Pertsch, 20.05.2015 22

( )( )

2

2ReRe

c cx

s sx

R

kT

k

r =

ατ =

α

Example: Bragg mirror Series of alternating dielectric layers with a chosen thickness, such that reflected light interferes constructively

The thickness of each layer is chosen to match 0 / 4i id n = λ . Example: 10 layers, 1 1.5n = , 2 2.0n = , Design 0.6µmλ =

Page 23: Computational Photonics - uni-jena.deComputational Photonics, Abbe School of Photonics, FSU Jena, Prof. T. Pertsch, 20.05.2015 5 0.2.2 Maxwell’s equations in frequency domain Using

Computational Photonics, Abbe School of Photonics, FSU Jena, Prof. T. Pertsch, 20.05.2015 23

Introducing a defect will couple light evanescently through the structure

Page 24: Computational Photonics - uni-jena.deComputational Photonics, Abbe School of Photonics, FSU Jena, Prof. T. Pertsch, 20.05.2015 5 0.2.2 Maxwell’s equations in frequency domain Using

Computational Photonics, Abbe School of Photonics, FSU Jena, Prof. T. Pertsch, 20.05.2015 24

Field distribution Aim: calculation of the field distribution ( )F x in the entire structure Starting point: known shape of transmitted vector Remark: The field at x D= is more easily known than at 0x = since it only depends on a single wave (transmitted wave). In contrast at 0x = the field is a superposition of the incident and reflected field. Hence to fix the field at

0x = one would have to solve the reflection problem first, whereas at x D= one can determine the field by setting ( )F D to an arbitrary value, e.g.

( ) 1F D = and calculating ( )G D from Maxwell´s equations to ( ) c cxG D i k= α .

1

Tc cxcD

D

FFFF i kG

x

= =∂ αα ∂

now: 1TF ≡

1. invert the structure (vector transforms into (1, -iαckcx)) 2. calculate the field vector up to the next layer boundary 3. calculate towards the current x-value, starting from the layer boundary 4. save the first component of the vector 5. turn back the derived field and structure by inverting the order of the calculated fields

Page 25: Computational Photonics - uni-jena.deComputational Photonics, Abbe School of Photonics, FSU Jena, Prof. T. Pertsch, 20.05.2015 5 0.2.2 Maxwell’s equations in frequency domain Using

Computational Photonics, Abbe School of Photonics, FSU Jena, Prof. T. Pertsch, 20.05.2015 25

Calculating the real fields ( )z( , , ) Re ( )expx z t x ik z i t= − ω rE E

( )z( , , ) Re ( )expx z t x ik z i t= − ω rH H

with TE: ( ) ( ) yE ex F x=

TM: ( ) ( ) yH ex F x=

1.5 Guided modes in layer systems

no y dependence, phase rotation in z direction

− waves propagating without diffraction − allows miniaturization of optics − concept is used in optical communication systems

How can waves be bound by the layer system? principle mechanism is total internal reflection

Physical reasoning of the field distribution:

zx

yz

x

y Fin FR

FT

Fin FR

FT

zx

yz

x

y

zx

yz

x

y

Fin FR

FT

Fin FR

FT

Fin FR

FT

Fin FR

FT

Fin FR

FT

Fin FR

FT

z

x

nx

substrate

cladding

layer (system)

Page 26: Computational Photonics - uni-jena.deComputational Photonics, Abbe School of Photonics, FSU Jena, Prof. T. Pertsch, 20.05.2015 5 0.2.2 Maxwell’s equations in frequency domain Using

Computational Photonics, Abbe School of Photonics, FSU Jena, Prof. T. Pertsch, 20.05.2015 26

• plane wave in propagation direction: exp( )zik z

• evanescent wave in substrate and cladding 2

2,2 max ( )k

> ε ωz s c

• oscillating solution in core ( )sin( ) cos( )fx fxA k x B k x+ 2

22 max ( )ii

kcω

< ε ωz

general condition for guided waves: 2

2s,c 2max ( ) max ( )ii

kc cω ω

ε ω < < ε ωz

Modes are resonances of the system

A physical explanation of the correspondence of roots and modes can be seen in the singularities of the reflection and transmission coefficients. Hence there is a field in the layer without an input field.

For comparison this is the reflectivity and transmissivity of the same layer system in the kz-domain corresponding to the reflection/transmission problem addressed in the previous section. Here no singularities are observed.

Dispersion relation of guided waves singularities of R and T

( ) ( )( ) ( )

22 11 21 12

22 11 21 12

k M k M M k k MFRF k M k M M k k M

α −α − + α α= =

α + α + −α αs sx c cx s sx c cxR

I s sx c cx s sx c cx

i

i

singularity: ( ) ( )22 11 21 12 0k M k M M k k Mα + α + −α α =s sx c cx s sx c cxi

0 0.5 1 1.5 20

10

20

30

40

kz/k0

Inte

nsity

abs(T)abs(R)

0 0.5 1 1.5 20

1000

2000

3000

4000

5000

6000

kz/k0

Inte

nsity

abs(T)abs(R)

0 0.2 0.4 0.6 0.8 10

0.2

0.4

0.6

0.8

1

kz/k0

Inte

nsity

abs(T)abs(R)

0 0.2 0.4 0.6 0.8 10

0.2

0.4

0.6

0.8

1

kz/k0

Ene

rgy

τr

Page 27: Computational Photonics - uni-jena.deComputational Photonics, Abbe School of Photonics, FSU Jena, Prof. T. Pertsch, 20.05.2015 5 0.2.2 Maxwell’s equations in frequency domain Using

Computational Photonics, Abbe School of Photonics, FSU Jena, Prof. T. Pertsch, 20.05.2015 27

Roots of the denominator correspond to modes guided along the layer system.

The problem of finding a guided mode is reduced to finding a root.

with: , ,k i k i= µ = µsx s cx c 2

2, ,2 ( ) 0k

µ = − ε ω >s c z s c

TE,TM TE,TM TE,TM TE,TM22 11 21 12 0M M M Mµ + µ + + µ µα α α =αs c c ss c c s

Field distributions of guided modes inside a single high-index layer embedded into low-index substrate and cladding.

12 14 16 18 20-100

0

100

200

300

kz [µm-1]D

0 0.5 10

2

4

6

8

lateral distance [µm]

abs(

E) [

V2 /m2 ]

0 1 2 3-2

-1

0

1

2

lateral distance [µm]

abs(

E) [

V2 /m2 ]

Page 28: Computational Photonics - uni-jena.deComputational Photonics, Abbe School of Photonics, FSU Jena, Prof. T. Pertsch, 20.05.2015 5 0.2.2 Maxwell’s equations in frequency domain Using

Computational Photonics, Abbe School of Photonics, FSU Jena, Prof. T. Pertsch, 20.05.2015 28

2. Finite-difference method for waveguide modes 2.1 Scalar approximation for weakly guiding

waveguides with small index differences (A similar method is documented in J. Riishede, N. A. Mortensen, and J. Laegsgaard, "A ‘poor man´s approach´ to modeling micro-structured optical fibers," J. Opt. A: Pure Appl. Opt. 5, 534-538 (2003)) Starting from the wave equation

2

2rot rot ( , ) (r, ) ( , )cω

ω = ε ω ωE r E r

Neglecting the divergence of the electric field in weakly inhomogeneous media with grad ( , ) 0ε ω ≈r div ( , ) 0ω =D r 0 ( , )div ( , ) 0ε ε ω ω ≈r E r We obtain the Helmholtz equation for inhomogeneous media

2

2( , ) (r, ) ( , ) 0cω

ω + ε ω ω =E r E rD

Neglecting the vectorial properties of the electric field scalar Helmholtz equation

2(r) ( , ) (r) 0v k vD + ω =r with 2

22( , ) ( , )k

ω = ε ωr r

2.1.1 Stationary solutions of the scalar Helmholtz equation Now we search for the stationary states (modes) of the problem with

( , ) ( , , )x yε ω = ε ωr , by taking the following ansatz function ( )(r) ( , )expv u x y z= βi

which results in an eigenvalue equation for the propagation constant β (2) 2 2( , ) ( , , ) ( ) ( , ) 0u x y k x y u x y D + ω −β ω =

This eigenvalue problem is to be solved by a finite difference scheme

2 2

2 22 2 ( , ) ( , , ) ( ) ( , ) 0u x y k x y u x y

x y ∂ ∂ + + ω −β ω = ∂ ∂

with the Laplace operator for two dimensions

2 2

2 2

( , ) ( , )u x y u x yx y

∂ ∂+

∂ ∂

which must be approximated by a discrete operator in the following way

Page 29: Computational Photonics - uni-jena.deComputational Photonics, Abbe School of Photonics, FSU Jena, Prof. T. Pertsch, 20.05.2015 5 0.2.2 Maxwell’s equations in frequency domain Using

Computational Photonics, Abbe School of Photonics, FSU Jena, Prof. T. Pertsch, 20.05.2015 29

Discretization of Laplace operator in two dimensions

21 1

2 2,

( , ) 2 ( , ) ( , )

j k

j k j k j k

x y

u x y u x y u x yux h

+ −− +∂≈

21 1

2 2,

( , ) 2 ( , ) ( , )

j k

j k j k j k

x y

u x y u x y u x yuy h

+ −− +∂≈

2 21, 1, , 1 , 1 ,

,2 2 2,

4( )

j k

j k j k j k j k j kj k

x y

u u u u uu u ux y h

+ − + −+ + + −∂ ∂+ = D ≈

∂ ∂

Hence the eigenvalue problem in discrete notation reads as

1, 1, , 1 , 1 , 2 2, ,2

4( ) ( ) 0j k j k j k j k j k

j k j k

u u u u uk u

h+ − + −+ + + −

+ ω −β ω =

which is a linear equation for each variable ,j ku coupled to 4 neighboring equations

( , ) ,( , ) ( )x y j ku x y uD → D

Introducing a computation grid: • quadratic area of size a a× • equidistant discretization of the area with N N× grid points

-10-5

05

10 -10-5

05

10

0

50

100

150

200

Xy

U(x,y)

Dxj= Dyk=h

(xj,k,Uj,k) (xj+1,k,Uj+1,k)

x

y

(xj,k-1,Uj,k-1)

(xj,k+1,Uj,k+1)

(xj-1,k,Uj-1,k)

Page 30: Computational Photonics - uni-jena.deComputational Photonics, Abbe School of Photonics, FSU Jena, Prof. T. Pertsch, 20.05.2015 5 0.2.2 Maxwell’s equations in frequency domain Using

Computational Photonics, Abbe School of Photonics, FSU Jena, Prof. T. Pertsch, 20.05.2015 30

example at point ( 2, 3)j k= = :

3,3 1,3 2,4 2,2 2,32,3 2

4( )

u u u u uu

h+ + + −

D ≈

2.1.2 Matrix notation of the eigenvalue equation ,j ku : originally 2D variable depending on x-direction (j) and y-direction (k)

unfolding of ,j ku into a 1D vector

for each vector component ,j ku results an individual linear equation

matrix dimension: number variables in x-direction times number variables in y-direction

a

N

.

.

11 2 3 N

N

.

.

11 . . N

j

k

U|∂ΩG = UG

.

.

= 0

U j,k

matrix

Page 31: Computational Photonics - uni-jena.deComputational Photonics, Abbe School of Photonics, FSU Jena, Prof. T. Pertsch, 20.05.2015 5 0.2.2 Maxwell’s equations in frequency domain Using

Computational Photonics, Abbe School of Photonics, FSU Jena, Prof. T. Pertsch, 20.05.2015 31

Matrix equation: schematic picture of the matrix formulation of the 2D Laplace operator

matrix: small number of non-zero values 'sparse' matrix

2.1.3 Boundary conditions

Example: metal boundaries (Metal tube with boundaries i∂Ω )

U 2,2U 3,2

U N-1,2U 2,3

U 3,3

U N-2,2

U 4,3

U N-2,3

U N-1,3U 2,4U 3,4U 4,4

-4 1 0 0 .. 0 1 0 0 0 0 … 1 -4 1 0 .. 0 0 1 0 0 0 …

1 0 0 0 .. 0 -4 1 0 0 0 … 0 1 0 0 0 … 0 1 0 0 .. 0 1 -4 1 0 0 … 0 0 1 0 0 …0 0 1 0 .. 0 0 1 -4 1 0 … 0 0 0 1 0 …

…discrete Laplace operator

N

.k.

1 1 j Nx iterates first

accounts for the 1D – problem (tridiagonal matrix)

occures for 2D problems

a

N

.

.

1

- boundaries of the grid ?

- 4 U1,3 + U2,3 + U0,3 + U1,4 + U1,2

h2( D U ) 1,3 =

example:

1 20 outside the grid

⇒ boundary conditions(compare with theory of partial differential equation)

Page 32: Computational Photonics - uni-jena.deComputational Photonics, Abbe School of Photonics, FSU Jena, Prof. T. Pertsch, 20.05.2015 5 0.2.2 Maxwell’s equations in frequency domain Using

Computational Photonics, Abbe School of Photonics, FSU Jena, Prof. T. Pertsch, 20.05.2015 32

2.2 Full vectorial mode solver for waveguides with large index differences

(according to Zhu et al., Optics Express 10, 853 2002) starting from directly discretizing Maxwell’s equations using finite differences

t∂

∇× = −∂BE and

t∂

∇× =∂DH

looking for guided modes propagating in the z-direction, all fields are assumed to have a spatio-temporal dependence like

( )exp i z tβ −ω −

introducing this ansatz into Maxwell's equation, rescaling the electric field by the free space impedance 0 0 0/Z µ ε= in order to symmetrize the equations and performing all derivatives with respect to time t and space z gives

0 0

0 0

0 0

z zx y r x y

z zy x r y x

y yx xz r z

E Hik H i E ik E i Hy y

E Hik H i E ik E i Hx x

E HE Hik H ik Ex y x y

∂ ∂= − β − ε = − β∂ ∂

∂ ∂= β − − ε = β −

∂ ∂∂ ∂∂ ∂

= − − ε = −∂ ∂ ∂ ∂

∂ΩG

U|∂Ωi = Ui = const

N

.

.

11 . . N

grid with metal boundaries (U|∂ΩG = 0 )

2 ≤ j ≤ N-1, 2 ≤ k ≤ N-1

⇒ (N-2) × (N-2) – equations⇒ (N-2) × (N-2) – unknown

- 4 Uj,k + Uj+1,k + Uj-1,k + Uj,k+1 + Uj,k-1

h2=( D U )j,k = 0

Page 33: Computational Photonics - uni-jena.deComputational Photonics, Abbe School of Photonics, FSU Jena, Prof. T. Pertsch, 20.05.2015 5 0.2.2 Maxwell’s equations in frequency domain Using

Computational Photonics, Abbe School of Photonics, FSU Jena, Prof. T. Pertsch, 20.05.2015 33

now the differential operators are approximated by finite differences which are formulated on a so-called Yee-grid to preserve the inversion symmetry of the original problem also in its discrete mathematical representation

Please be aware that electric and magnetic field are evaluated half a unit cell apart! The 'beauty' of the Yee-grid can be seen when illustrating the fundamental laws of electromagnetics. Let's start from Ampere's law by taking the first Maxwell's equation

( , ) ( , )t tt

∂− = ∇×

∂B r E r 0 ( , ) ( , )i t tωµ =∇×H r E r

and integrating over a finite surface F

0 ( , ) ( , )F F

i t tωµ ∂ = ∇× ∂∫ ∫H r f E r f

where ∂f is the surface normal Applying Stokes law the surface integral on the right hand side is transformed into a boundary integral

0( )

( , ) ( , )F F

i t tωµ ∂ = ∂∫ ∫H r f E r s

where ∂s is the tangential element of the boundary This integral equation can be expressed (approximated) based on the field components in the Yee-grid as

0 ( , ) x ( 1, ) ( ,( , 1) x ( ,) x )y x y x yz E j l E j l y E j l E jH l lj yi D Dωµ = +D + D− −+ D D

Page 34: Computational Photonics - uni-jena.deComputational Photonics, Abbe School of Photonics, FSU Jena, Prof. T. Pertsch, 20.05.2015 5 0.2.2 Maxwell’s equations in frequency domain Using

Computational Photonics, Abbe School of Photonics, FSU Jena, Prof. T. Pertsch, 20.05.2015 34

Resorting the equation gives

0

( 1, ) ( , ) ( , 1) ( , )( , ) y y x xz

E j l E j l E j l E j li H j lx y

+ − + −ωµ = −

D D

Now we discretize the complete Maxwell's equations using this ansatz

0

0

0

( , 1) ( , )( , ) ( , )

( 1, ) ( , )( , ) ( , )

( 1, ) ( , ) ( , 1) ( , )( , )

z zx y

z zy x

y y x xz

E j l E j lik H j l i E j ly

E j l E j lik H j l i E j lx

E j l E j l E j l E j lik H j lx y

+ −= − β

D+ −

= β −D

+ − + −= −

D D

0

0

0

( , ) ( , 1)( , ) ( , ) ( , )

( , ) ( 1, )( , ) ( , ) ( , )

( , ) ( 1, ) ( , ) ( , 1)( , ) ( , )

z zrx x y

z zry y x

y y x xrz z

H j l H j lik j l E j l i H j ly

H j l H j lik j l E j l i H j lx

H j l H j l H j l H j lik j l E j lx y

− −− ε = − β

D− −

− ε = β −D

− − − −− ε = −

D D

with the spatially averaged material parameters ( , ) ( , 1)( , )

2( , ) ( 1, )( , )

2( , ) ( 1, 1) ( , 1) ( 1, )( , )

4

r rrx

r rry

r r r rrz

j l j lj l

j l j lj l

j l j l j l j lj l

ε + ε −ε =

ε + ε −ε =

ε + ε − − + ε − + ε −ε =

Page 35: Computational Photonics - uni-jena.deComputational Photonics, Abbe School of Photonics, FSU Jena, Prof. T. Pertsch, 20.05.2015 5 0.2.2 Maxwell’s equations in frequency domain Using

Computational Photonics, Abbe School of Photonics, FSU Jena, Prof. T. Pertsch, 20.05.2015 35

The spatial averaging of material properties is a technique to increase computational convergence by minimizing the so-called 'staircase approximation error' in finite difference schemes. As a last step we rewrite the discretized Maxwell's equations in matrix notation and use the perfect electric conductor boundary conditions from above

0

0

00

0

0 0 00 0 00 0 0

x y x

y x y

z y x z

rx x y x

ry y x y

rz z y x z

iik i

iik i

− β = β − − − β = β − −

H I U EH I U EH U U E

ε E I V Hε E I V H

ε E V V H

with • I the identity matrix, • , ,x y zE and , ,x y zH the concatenated vectors of x,y,z-directed field components

, , ( , )x y zE j l and , , ( , )x y zH j l , respectively

• rxε the diagonal matrix of spatially averaged material parameters. Furthermore there are the matrices of differential operators in discrete form on the Yee-grid

1 11 11

x x

− − = D

U

( , 1) ( , )A j l A j l+ −

1 11 11

y y

− − = D

U

( 1, ) ( , )A j l A j l+ −

11 11

1x x

− = −D

V

( , ) ( , 1)A j l A j l− −

111

11

y y

= −D −

V

( , ) ( 1, )A j l A j l− −

Page 36: Computational Photonics - uni-jena.deComputational Photonics, Abbe School of Photonics, FSU Jena, Prof. T. Pertsch, 20.05.2015 5 0.2.2 Maxwell’s equations in frequency domain Using

Computational Photonics, Abbe School of Photonics, FSU Jena, Prof. T. Pertsch, 20.05.2015 36

Please be aware that even though these matrices look asymmetric they represent symmetric finite difference operators since the Yee grid symmetrizes the problem. For the numerical solution of the eigenvalue problem one can combine the two coupled differential equations of first order for the two fields E and H into a single decoupled differential equation of second order for a single field, i.e. E or H . For the electric field this results in (quasi TE version):

2xx xy x x

yx yy y y

= β

P P E EP P E E

with the sub-matrices

( )( )( )( )

( ) ( )( ) ( )

2 1 2 1 20 0 0

2 1 2 1 20 0 0

1 2 2 2 10 0 0

1 2 2 2 10 0 0

xx x rz y x y x rz x rx y y

yy y rz x y x y rz y ry x x

xy x rz y ry x x x rz x y x

yx y rz x rx y y y rz y x y

k k k

k k k

k k k

k k k

− − − −

− − − −

− − − −

− − − −

= − + + +

= − + + +

= + − +

= + − +

P U ε V V U I U ε V ε V U

P U ε V V U I U ε V ε V U

P U ε V ε V U I U ε V V U

P U ε V ε V U I U ε V V U

These equations might look quite lengthy but finally they consist just of a few matrix operations. Similarly for the magnetic field this results in (quasi TM version):

2xx xy x x

yx yy y y

= β

Q Q H HQ Q H H

with the sub-matrices

( )( )( )( )

( ) ( )( ) ( )

2 1 2 2 10 0 0

2 1 2 2 10 0 0

2 1 2 2 10 0 0

2 1 2 2 10 0 0

xx x y x rz y ry x x y rz y

yy y x y rz x rx y y x rz x

xy ry x x y rz x x y x rz x

yx rx y y x rz y y x y rz y

k k k

k k k

k k k

k k k

− − − −

− − − −

− − − −

− − − −

= − + + +

= − + + +

= − + + +

= − + + +

Q V U U ε V ε V U I U ε V

Q V U U ε V ε V U I U ε V

Q ε V U U ε V V U I U ε V

Q ε V U U ε V V U I U ε V

Example 1: Photonic crystal fiber Solving the eigenvalue problem for obtaining the propagation constant and the field distribution of guided modes.

Page 37: Computational Photonics - uni-jena.deComputational Photonics, Abbe School of Photonics, FSU Jena, Prof. T. Pertsch, 20.05.2015 5 0.2.2 Maxwell’s equations in frequency domain Using

Computational Photonics, Abbe School of Photonics, FSU Jena, Prof. T. Pertsch, 20.05.2015 37

Absolute value of the H-field in the x-y cross section of the first mode.

Example 2: Silver nano wire in vacuum Ag-cylindrical wave guide (r=λ/3) at λ=630nm

Absolute value of the E-field in the x-y cross section of the first mode.

Page 38: Computational Photonics - uni-jena.deComputational Photonics, Abbe School of Photonics, FSU Jena, Prof. T. Pertsch, 20.05.2015 5 0.2.2 Maxwell’s equations in frequency domain Using

Computational Photonics, Abbe School of Photonics, FSU Jena, Prof. T. Pertsch, 20.05.2015 38

Intensity of the E-field in the x-y cross section of the second mode.

Dispersion relation of a metallic waveguide with 0 effk nβ = , where effn is the so-called effective index of the mode.

Example 3: Silver nano wire on substrate Ag-cylindrical waveguide (r=λ/3) on a substrate with 1.5n = at λ=840nm

Page 39: Computational Photonics - uni-jena.deComputational Photonics, Abbe School of Photonics, FSU Jena, Prof. T. Pertsch, 20.05.2015 5 0.2.2 Maxwell’s equations in frequency domain Using

Computational Photonics, Abbe School of Photonics, FSU Jena, Prof. T. Pertsch, 20.05.2015 39

Intensity of the E-field in the x-y cross section of the first mode. The light is mainly confined at the interface between the silver nanowire and the substrate.

Dispersion relation of a metallic waveguide on a substrate.

Page 40: Computational Photonics - uni-jena.deComputational Photonics, Abbe School of Photonics, FSU Jena, Prof. T. Pertsch, 20.05.2015 5 0.2.2 Maxwell’s equations in frequency domain Using

Computational Photonics, Abbe School of Photonics, FSU Jena, Prof. T. Pertsch, 20.05.2015 40

3. Beam Propagation Method (BPM) • up to this point we only dealt with eigenmodes

− required invariance of the structure in the third dimension − What happens if light propagation occurs in a medium where the

index distribution weakly changes? • accurately model a very wide range of devices

− linear and nonlinear light propagation in axially varying waveguide systems, as e.g. o curvilinear directional couplers, o branching and combining waveguides, o S-shaped bent waveguides, o tapered waveguides

− ultra short light pulse propagation in optical fibers • implementation

− finite difference BPM solves Maxwell's equations by using finite differences in place of partial derivatives

− computational intensive − entirely in the frequency domain only weak nonlinearities can be modeled

− use of a slowly varying envelope approximation in the paraxial direction the device is assumed to have an optical axis, and that most of the light travels approximately in this direction, (paraxial approximation) allows to rely on first order differential equations

3.1 Categorization of Partial Differential Equation (PDE) problems

general second-order Partial Differential Equation

2 2 2

2 2 0f f f f fp q r s t u f vx x y y x y

∂ ∂ ∂ ∂ ∂+ + + + + ⋅ + =

∂ ∂ ∂ ∂ ∂ ∂ (23)

The following different types of partial differential equations are distinguished − 1. 2 4q pr< : elliptic PDE

− 2. 2 4q pr= : parabolic PDE

− 3. 2 4q pr> : hyperbolic PDE

Elliptic PDE

Example: ( , ) ( , ) ( , )u x y u x y x yx y

∂ ∂r

∂ ∂

2 2

2 2+ = Poisson equation

Page 41: Computational Photonics - uni-jena.deComputational Photonics, Abbe School of Photonics, FSU Jena, Prof. T. Pertsch, 20.05.2015 5 0.2.2 Maxwell’s equations in frequency domain Using

Computational Photonics, Abbe School of Photonics, FSU Jena, Prof. T. Pertsch, 20.05.2015 41

Boundary Value Problem (BVP) limited mainly by computing memory

Hyperbolic PDE

Example: ( , ) ( , )u x y u x yvt y

∂ ∂=

∂ ∂

2 22

2 2 1D wave equation

Parabolic PDE

Example: ( , ) ( , )u x t u x tDt x x

∂ ∂ ∂ ∂ ∂ ∂

= diffusion equation (IVP)

both are Initial Value Problem (IVP) limited mainly by computing time and stability issues

Page 42: Computational Photonics - uni-jena.deComputational Photonics, Abbe School of Photonics, FSU Jena, Prof. T. Pertsch, 20.05.2015 5 0.2.2 Maxwell’s equations in frequency domain Using

Computational Photonics, Abbe School of Photonics, FSU Jena, Prof. T. Pertsch, 20.05.2015 42

3.2 Slowly Varying Envelope Approximation (SVEA) Assumptions • Each component of the optical electromagnetic field is primarily a periodic

(harmonic) function of position. • The field changes most rapidly along the optical axis z (with a period on

the order of the optical wavelength λ ).

Slowly Varying Envelope Approximation (SVEA) • replace the quickly varying component, Φ , with a slowly varying one, φ , as 0( , , ) ( , , )exp( )x y z x y z ikn zΦ = φ − with 2 /k = π λ • introduction of a reference index 0n light is travelling mostly parallel to

the z axis (paraxial approximation) and is monochromatic with wavelength λ

SVEA Advantages • requirements on the mesh to represent derivatives by finite differences are

relaxed choose fewer mesh points higher speed of the calculation without compromising accuracy

• accurate BPM calculations using step sizes zD > λ

SVEA Problems • if part of the light strongly deviates from the direction of the axis z

solution: wide angle BPM

Page 43: Computational Photonics - uni-jena.deComputational Photonics, Abbe School of Photonics, FSU Jena, Prof. T. Pertsch, 20.05.2015 5 0.2.2 Maxwell’s equations in frequency domain Using

Computational Photonics, Abbe School of Photonics, FSU Jena, Prof. T. Pertsch, 20.05.2015 43

• if structure has large index contrast no accurate global choice of 0n finer mesh needed solution: if variation is in z direction 0 ( )n z

quality of choice of 0n can be checked by evaluating the speed of phase evolution of φ in the numerics

3.3 Differential equations of BPM starting from Maxwell’s equations in the frequency domain with an inhomogeneous distribution of the dielectric properties ( , , )x y zε

0

0 ( , , )i

i x y z∇× = − ωµ

∇× = ωε ε

E HH E

+ no charges [ ( , , ) ] 00

x y z∇ ⋅ ε ⋅ =∇ ⋅ =

EH

magnetic field can be eliminated by taking curl of curlE -equation 2 ( , , )k x y z∇×∇× = εE E with 0 0k = ω ε µ

using the vector identity 2( )∇×∇× =∇ ∇⋅ −∇ one gets the wave equation

2 2 ( , , ) ( )k x y z∇ + ε =∇ ∇ ⋅E E E since BPM is biased for the z -axis, it is natural to treat z -components of the field E and the operator ∇ separately from the transverse components x and y

ˆt zE= +E E z and ˆt z∂

∇ =∇ +∂

z

the transverse component of the wave equation becomes

2

2 22 ( , , ) ( )t z

t t t t t tEk x y z

z z∂ ∂

∇ + + ε = ∇ ∇ ⋅ +∂ ∂

EE E E (23)

which is an inconsistent problem since it contains transverse and longitudinal components. Splitting also the divergence equation in the transverse and longitudinal components

( ) ( , , )( , , ) ( , , ) 0zt t z

x y z Ex y z E x y zz z

∂ε ∂∇ ⋅ ε + + ε =

∂ ∂E

and neglecting the second term (ε is assumed to change only slowly in z )

( )( , , ) ( , , ) 0zt t

Ex y z x y zz

∂∇ ⋅ ε + ε ≈

∂E

one can eliminate the longitudinal term in the right hand side of the wave equation (23)

2

2 22

1( , , ) ( ( , , ) )( , , )

tt t t t t t t tk x y z x y z

z x y z ∂

∇ + + ε = ∇ ∇ ⋅ − ∇ ⋅ ε ∂ ε

EE E E E

Page 44: Computational Photonics - uni-jena.deComputational Photonics, Abbe School of Photonics, FSU Jena, Prof. T. Pertsch, 20.05.2015 5 0.2.2 Maxwell’s equations in frequency domain Using

Computational Photonics, Abbe School of Photonics, FSU Jena, Prof. T. Pertsch, 20.05.2015 44

applying the chain rule on the second divergence term on the right hand side, the first divergence term is canceled out

2

2 22

1( , , ) ( ( , , ))( , , )

tt t t t t tk x y z x y z

z x y z ∂

∇ + + ε = −∇ ∇ ε ⋅ ∂ ε

EE E E (23)

up to now: Due to the propagation direction which points mainly along z the field tE is varying slowly in x and y , but rapidly in z now: SVEA is introduced 0( , , ) ( , , )exp( )t tx y z x y z in kz= −E e the new field ( , , )t x y ze is slowly varying in all coordinates (compared to λ ) substituting SVEA ansatz into wave equation (23)

2

2 2 20 02

12 ( ( , , ) ) ( ( , , )) 0( , , )

t tt t t t t tikn k x y z n x y z

z z x y z ∂ ∂

− + ε − +∇ +∇ ∇ ε ⋅ = ∂ ∂ ε

e e e e e

If reference index 0n was chosen correctly, the first term will be much smaller than the second and hence can be neglected (physics: neglect coupling to backward propagating waves and introducing paraxial approximation) results in a first-order differential equation for te in the z coordinate and changes the problem from an elliptic PDE (boundary value problem) to a parabolic PDE (initial value problem) Next step: collect the transverse 2. order operators in a matrix form and shift them to the right hand side

02 x xxx xy

yx yyy y

e eP Pikn

P Pe ez ∂

= ∂

with the components of the operator being

22 2

02

2

2

22 2

02

1 ( , , ) ( ( , , ) )( , , )

1 ( , , )( , , )

1 ( , , )( , , )

1 ( , , ) ( ( , , ) )( , , )

xx

xy

yx

yy

P x y z k x y z nx x y z x y

P x y zx x y z y x y

P x y zy x y z x y x

P x y z k x y z ny x y z y x

∂ ∂ ∂= ε ⋅ + + ε − ∂ ε ∂ ∂

∂ ∂ ∂= ε ⋅ + ∂ ε ∂ ∂ ∂

∂ ∂ ∂= ε ⋅ + ∂ ε ∂ ∂ ∂

∂ ∂ ∂= ε ⋅ + + ε − ∂ ε ∂ ∂

Summary of the results • paraxial vector wave equation for the optical electric field • initial value problem: knowledge of the electric field in some transverse

plane ( const.z = ) is enough • reflections of light are neglected

Page 45: Computational Photonics - uni-jena.deComputational Photonics, Abbe School of Photonics, FSU Jena, Prof. T. Pertsch, 20.05.2015 5 0.2.2 Maxwell’s equations in frequency domain Using

Computational Photonics, Abbe School of Photonics, FSU Jena, Prof. T. Pertsch, 20.05.2015 45

• in a finite differencing scheme the operator P is a large sparse matrix

3.4 Semi-vector BPM up to now: full vector character of the electromagnetic field is included now: if the modeled device operates mainly on a single field component, the other component’s contribution can often be neglected semi vector TE equation for E-field being mainly transversely polarized

02 xxx x

eikn P ez

∂=

or semi vector TM equation for H-field being mainly transversely polarized

02 yyy y

eikn P e

z∂

=∂

Properties • correctly models differences of TE and TM wave propagation • neglects coupling to other field component

3.5 Scalar BPM if structure has very low index contrast, the x∂ε ∂ and y∂ε ∂ term can be neglected operators commute xxP and yyP reduce to scalar operator

2 2

2 202 2 ( ( , , ) )P k x y z n

x y∂ ∂

= + + ε −∂ ∂

3.6 Crank-Nicolson method formal solution of BPM equation can be written as

t 1 t 00

( ) exp ( )2

zz zin k

D=

Pe e with 1 0z z zD = −

however, a rational function is needed to approximate the exponent of the operator a simple approximation would be

[ ] 1 (1 )exp1

xxx

+ −α=

−α

The case α=0.5 • called Padé(1,1) approximation • accurate for small x small step size zD (higher order Padé

approximations can be used, see below as supplementary material) • generates the first three terms of the MacLaurin series expansion for

[ ]exp x leads to Crank-Nicolson scheme

Page 46: Computational Photonics - uni-jena.deComputational Photonics, Abbe School of Photonics, FSU Jena, Prof. T. Pertsch, 20.05.2015 5 0.2.2 Maxwell’s equations in frequency domain Using

Computational Photonics, Abbe School of Photonics, FSU Jena, Prof. T. Pertsch, 20.05.2015 46

1 00 0

( ) ( )4 4t t

z zz zin k in k

D D− = +

I P e I P e

since the operator P is applied to the unknown t 1( )ze it is an implicit method requires solution of set of linear equations Variable α is called scheme parameter, for 0.5α = the method is stable and energy conserving, since it corresponds to the discrete operator which preserves the inversion symmetry in z.

3.7 Alternating Direction Implicit (ADI) • Solving the implicit problem in 2D leads to a huge set of linear equations. time consuming numerical solution

• However, 1D problems result only in a simple tridiagonal matrix which can be solved very fast.

ADI approximation • splitting the n-dimensional operator into n subsequent 1-dimensional

operators each operation only on a single dimension fast algorithm: periodic application of 1D operators in x and y direction

3.8 Boundary condition Easiest boundary condition: reflecting boundaries (electric walls) • assuming that the field is zero at the boundary perfect reflection

Advanced boundary conditions: fields can radiate out of simulation area • fields radiating out, e.g. from waveguide, should not disturb the evolution

by being reflected back from the boundaries let the radiation fields out • do not create any additional effects for the fields propagating inside the

computation domain (e.g. instability, dissipation etc.)

Typical advanced boundary condition • absorbing boundary conditions (ABC) • transparent boundary conditions (TBC) • perfectly matched layer boundaries (PML)

3.8.1 Absorbing Boundary Conditions (ABC) problem: • field at the boundary of the computational window is not wanted solution:

Page 47: Computational Photonics - uni-jena.deComputational Photonics, Abbe School of Photonics, FSU Jena, Prof. T. Pertsch, 20.05.2015 5 0.2.2 Maxwell’s equations in frequency domain Using

Computational Photonics, Abbe School of Photonics, FSU Jena, Prof. T. Pertsch, 20.05.2015 47

• remove field at boundaries by multiplication with factor <1 can be introduced by ( ) 0ℑ ε > at the boundary

however: • All inhomogeneities of the optical properties induce reflections themselves. • This can be shown by computing Fresnel reflection at interface where just

the imaginary part of the dielectric function changes. improvement: • soft onset of the absorbing layer technical realization: • multiplication of the field in each iteration step with a filter function, e.g. in

1D:

absabs abs

abs abs

1 exp expp pp p Pe e A A

N N −

= − − −

with abs 3...5N =

drawback: • absorption strength absA and absorption width absN are difficult to adjust for

the smallest reflection • individual optimal parameters for each problem

3.8.2 Transparent Boundary Condition (TBC) goal: • simulates a nonexistent boundary • Radiation is allowed to freely escape from the simulated area without

reflection. • Flux of radiation back into the simulated area is prevented. method: • assuming that the field in the vicinity of the virtual boundary consists of an

outgoing plane wave and does not include any reflected wave from the virtual boundary wave function for the wave traveling to the left with the x -directed wave number xk is expressed as

( , ) ( )exp(i )xx z A z k xφ =

Derivation projecting the field onto the following lattice ( )p pxφ = φ

k-Vektor boundary

φ(x)=φ0exp(ikxx)

p

Page 48: Computational Photonics - uni-jena.deComputational Photonics, Abbe School of Photonics, FSU Jena, Prof. T. Pertsch, 20.05.2015 5 0.2.2 Maxwell’s equations in frequency domain Using

Computational Photonics, Abbe School of Photonics, FSU Jena, Prof. T. Pertsch, 20.05.2015 48

lattice points 1p = − and p m= are outside the computational window

At the left boundary the relation of the field at neighboring mesh points can be expressed as

1

0

exp( )xjk x φD =

φ with 1 0x x xD = −

from which we can calculate the x -directed wave number xk as

1

0

1 lnxkj x

φ= D φ

if ( ) 0xkℜ > plane wave is traveling outwards ( ) 0xkℜ < plane wave is traveling inwards since inward waves should not exist ( )xkℜ must be positive ( ) 0xkℜ ≥

Implementation • xk is calculated at the boundary • another mesh point at 1p = − is artificially added to the mesh • the field at 1p = − is assumed to be determined by the same plane wave

function

0

1

exp( )xjk x−

φD =

φ with 1 0 0 1x x x x x−D = − = −

• assuming that the xk -vector is preserved by the wave

1 01 1 0 0

0 1

exp( ) 0xjk x −−

φ φ= D = → = φ φ − φ φ

φ φ

• trick: calculate 1nxk − one step zD before applying it to the boundary

takes into account that the wave energy is traveling also forwards 1 1

1 1 0 00 n n n n− −−= φ φ − φ φ

3.8.3 Perfectly matched layer boundaries (PML)

Definition perfectly matched layer = artificial absorbing layer for wave equations used to truncate computational regions in numerical methods to simulate problems with open boundaries

Page 49: Computational Photonics - uni-jena.deComputational Photonics, Abbe School of Photonics, FSU Jena, Prof. T. Pertsch, 20.05.2015 5 0.2.2 Maxwell’s equations in frequency domain Using

Computational Photonics, Abbe School of Photonics, FSU Jena, Prof. T. Pertsch, 20.05.2015 49

Property waves incident upon the PML from a non-PML medium do not reflect at the interface strongly absorb outgoing waves from the interior of a computational region without reflecting them back into the interior (impedance matching required)

Different formulations nice one: stretched-coordinate PML (Chew and Weedon) coordinate transformation in which one (or more) coordinates are mapped to complex numbers analytic continuation of the wave equation into complex coordinates, transforming propagating (oscillating) waves into exponentially decaying waves

Technical description to absorb waves propagating in the x direction, the following transformation is applied to the wave equation: all x derivatives / x∂ ∂ are replaced by

1( )1 i xx x

∂ ∂→

σ∂ ∂+ω

with ω being the angular frequency and σ some positive function of x Hence, propagating waves in x+ direction ( 0k > ) become attenuated

[ ]exp ( ) exp ( ) ( ') 'xki kx t i kx t x x − ω → −ω − σ ∂ ω ∫

which corresponds to the coordinate transformation (analytic continuation to complex coordinates)

( ') 'xix x x x→ + σ ∂

ω ∫ or equivalently (1 / )x x i∂ →∂ + σ ω

Properties • for real valued σ the PML attenuate only propagating waves • purely evanescent waves oscillate in the PML but do not decay more

quickly attenuation of evanescent waves can be accelerated by including a real coordinate stretching in the PML corresponds to complex valued σ

• PML is reflectionless only for the exact wave equation discretized simulation shows small numerical reflections can be minimized by gradually turning on the absorption coefficient σ from zero over a short distance on the scale of the wavelength of the wave (e.g. with quadratic spatial profile)

Page 50: Computational Photonics - uni-jena.deComputational Photonics, Abbe School of Photonics, FSU Jena, Prof. T. Pertsch, 20.05.2015 5 0.2.2 Maxwell’s equations in frequency domain Using

Computational Photonics, Abbe School of Photonics, FSU Jena, Prof. T. Pertsch, 20.05.2015 50

3.9 Conformal mapping regions • used to simulate curved optical waveguides • solving bends by BPM directly leads to large errors due to the paraxial

approximation • can be used to treat losses in curved waveguides • radii of curvature need to be restricted to large values, when first order

approximation of the conformal mapping is used (corresponding to linear index gradient)

Method • apply a conformal mapping in the complex plane to transform a curved

waveguide ( , )x yε in coordinates ( ,x y ) into a straight waveguide described by a modified epsilon distribution ( )u′ε in new coordinates ( ,u v )

• conformal mapping is an angle-preserving transformation in a complex

plane • typical example for local angle preserving transformation: world maps

Demonstration for 2D scalar wave equation

2 22 2 ( , ) ( , ) 0k n x y x z

x z∂ ∂ + + φ = ∂ ∂

Page 51: Computational Photonics - uni-jena.deComputational Photonics, Abbe School of Photonics, FSU Jena, Prof. T. Pertsch, 20.05.2015 5 0.2.2 Maxwell’s equations in frequency domain Using

Computational Photonics, Abbe School of Photonics, FSU Jena, Prof. T. Pertsch, 20.05.2015 51

general transformation ( ) ( )W u iv f x iz f Z= + = + = for f being an analytical function in the complex plane To straighten a bend with radius R in the ( ,u v ) plane, ( )f Z should be taken as ( ) ln( / )W f Z R Z R= = applying the transformation to the wave equation gives

( )2

2 22 2 ( , ), ( , ) 0dZk n x u v y u v

dWu v

∂ ∂+ + φ =

∂ ∂

with the Jacobian of the transformation being

exp( / )dZ u RdW

=

a bended waveguide is transformed into straight waveguide with modified refractive index

( , )dZ n x ydW

• limitations imposed by the paraxial approximation are avoided • in first order approximation a linear index gradient is added to account for

the bending

3.10 Wide-angle BPM based on Padé operators supplementary material, not covered by the lecture

Principle expansion via Padé is more accurate than Taylor expansion for the same order of terms larger angles / higher index contrast / more complex mode interference can be analyzed as the Padé order increases

Derivation starting from scalar wave equation without neglecting second order z derivative, the equation can be formally rewritten as

0 0

0 0

/ 21 ( / 2 )( / )

P k njz j k n z∂φ

= − φ∂ + ∂ ∂

(*)

which can be reduced to

Njz D∂φ

= − φ∂

with N and D being polynomials determined by the operator P applying a finite difference scheme we get to iteration equation

Page 52: Computational Photonics - uni-jena.deComputational Photonics, Abbe School of Photonics, FSU Jena, Prof. T. Pertsch, 20.05.2015 5 0.2.2 Maxwell’s equations in frequency domain Using

Computational Photonics, Abbe School of Photonics, FSU Jena, Prof. T. Pertsch, 20.05.2015 52

1 (1 )l lD j z ND j z N

+ − D −αφ = φ

+ D α

with α being a control parameter of the finite difference scheme ranging between 0 and 1 ( 0α = fully implicit scheme; 1α = fully explicit scheme;

0.5α = Crank-Nicolson scheme) the numerator (1 )D j z N− D −α can be factorized as

1 2Nom Nom Nom 2 1( ...) (1 )...(1 )(1 )N N N

NA P B P C P c P c P c P− −+ + + = + + + with coefficients 1 2, ,..., Nc c c which can be obtained from the solution of the algebraic equation 1 2

Nom Nom Nom( (1 ) ) ( ...) 0N N ND j z N A P B P C P− −− D −α = + + + = similarly the denominator D j z N+ D α can be factorized as

1 2Den Den Den 2 1( ...) (1 )...(1 )(1 )N N N

NA P B P C P d P d P d P− −+ + + = + + + with coefficients 1 2, ,..., Nd d d which can be obtained from the solution of the algebraic equation

i0

( ) 0N

i

iD j z N d P

=+ D α = =∑

with 00 0 1c d P= = =

Thus, the unknown field 1l+φ at z z+ D is related to the known field lφ at z as

1 2

1 Nom Nom Nom1 2

Den Den Den

......

N N Nl l

N N NA P B P C PA P B P C P

− −+

− −+ + +

φ = φ+ + +

or

1 2 1

2 1

(1 )...(1 )(1 )(1 )...(1 )(1 )

l lN

N

c P c P c Pd P d P d P

+ + + +φ = φ

+ + +

3.10.1 Fresnel approximation – Padé 0th order starting again from wave equation (*) we account for the z-derivative by the recursion equation

0 0

0 01

/ 2

1 ( / 2 )n

n

P k njz j k n

z −

∂= −

∂∂ +∂

(**)

which is used to replace the z-derivative in the denominator of (**)

in paraxial approximation 0

1

/

1

P a Pj jjz aa z −

∂= − = −

∂∂ +∂

with 0 02a k n= and 1

0z −

∂≈

Page 53: Computational Photonics - uni-jena.deComputational Photonics, Abbe School of Photonics, FSU Jena, Prof. T. Pertsch, 20.05.2015 5 0.2.2 Maxwell’s equations in frequency domain Using

Computational Photonics, Abbe School of Photonics, FSU Jena, Prof. T. Pertsch, 20.05.2015 53

comparison to the expansion equations gives 1D = and /N P a= and therefore the nominator becomes

Nom(1 ) 1 (1 ) 1PD j z N j z A Pa

− D −α = − D −α = +

and the denominator analogously

Den1 1PD j z N j z A Pa

+ D α = + D α = +

with

Nom(1 )zA ja

D −α= −

DenzA ja

D α=

thus the unknown field 1l+φ at z z+ D is related to the known field lφ at z as

1 Nom

Den

11

l lA PA P

+ +φ = φ

+

or ( ) ( )1

Den Nom1 1l lA P A P++ φ = + φ which is the standard Fresnel formula

3.10.2 Wide angle (WA) approximation – Padé (1,1) using again the recursion equation

1

0

/

1

P ajjza z

∂= −

∂∂ +∂

and inserting the previous result

0

Pjz a∂

= −∂

we get

1

2

/

1

P aj Pza

∂= −

∂ +

comparison to the expansion equations gives

21 PDa

= + and /N P a=

and therefore the nominator becomes

Nom2 21 1(1 ) 1 (1 ) 1 1P PD j z N j z j z P A P

a aa a−α − D −α = + − D −α = + − D = +

Page 54: Computational Photonics - uni-jena.deComputational Photonics, Abbe School of Photonics, FSU Jena, Prof. T. Pertsch, 20.05.2015 5 0.2.2 Maxwell’s equations in frequency domain Using

Computational Photonics, Abbe School of Photonics, FSU Jena, Prof. T. Pertsch, 20.05.2015 54

and the denominator analogously

Den2 211 1P PD j z N j z j z P A P

a aa aα + D α = + + D α = + D = +

with

Nom 21 (1 )zA j

aaD −α

= −

Den 21 zA j

aaD α

= +

thus the unknown field 1l+φ at z z+ D is related to the known field lφ at z again as ( ) ( )1

Den Nom1 1l lA P A P++ φ = + φ which includes now higher order corrections

Page 55: Computational Photonics - uni-jena.deComputational Photonics, Abbe School of Photonics, FSU Jena, Prof. T. Pertsch, 20.05.2015 5 0.2.2 Maxwell’s equations in frequency domain Using

Computational Photonics, Abbe School of Photonics, FSU Jena, Prof. T. Pertsch, 20.05.2015 55

4. Finite Difference Time Domain Method (FDTD) • ab initio, direct solution of Maxwell‘s equations • probably the most often used numerical technique, as an implementation is

straight forward (but what is cumbersome: implementation of proper boundary conditions)

• requires excessive computational resources for reasonable problems in 3D (implementation on cluster computers)

• implementation is absolutely general but often doesn‘t take explicit advantage of symmetries

• in principle all kinds of materials are treatable (dispersive or nonlinear materials) but one has to be careful to preserve the stability of the method

4.1 Maxwell’s equations

makr

ext

( , ) ( , )rot ( , ) , rot ( , ) ( , ),

div ( , ) ( , ), div ( , ) 0,

t tt t tt t

t t t

∂ ∂= − = +

∂ ∂= r =

B r D rE r H r j r

D r r B r

mater equations

0

0

( , ) ( , ) ( , ),( , ) ( , ) ( , )

t t tt t t= ε += µ +

D r E r P rB r H r M r

− E(r,t) electric field − H(r,t) magnetic field − D(r,t) dielectric flux density − B(r,t) magnetic flux density − P(r,t) dielectric polarization − M(r,t) magnetic polarization (magnetization) − rext(r,t) external charge density − jmakr(r,t) macroscopic current density

MWEQ in linear isotropic, dispersionless & non-magnetic dielectric Media

( )0

0

( , ) ( , ),( , ) ( , ),

t tt t= ε ε

= µ

D r r E rB r H r

( )

( )

0 0 makr

0

( , ) ( , )rot ( , ) , ,

div ( , ) 0, di

rot ( ,

,

)

v ( , ) 0

t tt tt

tt

tε ε = =

∂ ∂= −µ = ε ε +

∂ ∂ r E r

H r E rE r H

r

r r

H

j

curl-equations for individual components in Cartesian coordinates

0

( , ) 1(a) rot ( , )t tt

∂= −

∂ µH r E r

⇑ field sources

Page 56: Computational Photonics - uni-jena.deComputational Photonics, Abbe School of Photonics, FSU Jena, Prof. T. Pertsch, 20.05.2015 5 0.2.2 Maxwell’s equations in frequency domain Using

Computational Photonics, Abbe School of Photonics, FSU Jena, Prof. T. Pertsch, 20.05.2015 56

0

0

0

1 ,

1 ,

1

yx z

y xz

yxz

EH Et z y

H EEt x z

EEHt y x

∂ ∂ ∂= − ∂ µ ∂ ∂

∂ ∂∂ = − ∂ µ ∂ ∂ ∂ ∂∂

= − ∂ µ ∂ ∂

( )0

( , ) 1(b) rot ( , )t tt

∂= −

∂ ε εE r H r j

r

( )

( )

( )

0

0

0

1 ,

1 ,

1

yx zx

y x zy

y xzz

HE H jt y z

E H H jt z x

H HE jt x y

∂ ∂ ∂= − − ∂ ε ε ∂ ∂

∂ ∂ ∂ = − − ∂ ε ε ∂ ∂

∂ ∂∂= − − ∂ ε ε ∂ ∂

r

r

r

We will assume source-free conditions ( 0=j ) for the moment.

4.2 1D problems Assuming that there is no dependence on y and z all dynamics in x

0 0

1 1( ) 0, ,y yx z zH EH E Hat t x t x

∂ ∂∂ ∂ ∂= = =

∂ ∂ µ ∂ ∂ µ ∂

( ) ( )0 0

1 1( ) 0, ,y yx z zE HE H Eb

t t x t x∂ ∂∂ ∂ ∂

= = =∂ ∂ ε ε ∂ ∂ ε ε ∂r r

grouping together all non-mixing transverse electromagnetic components (TEM)

z-polarized E-field ( )0 0

1 1,y yz zH HE Et x t x

∂ ∂∂ ∂= =

∂ ε ε ∂ ∂ µ ∂r

y-polarized E-field ( )0 0

1 1,y yz zE EH Ht x t x

∂ ∂∂ ∂= =

∂ ε ε ∂ ∂ µ ∂r

Without loss of generality we concentrate on the first case ( zE ).

Page 57: Computational Photonics - uni-jena.deComputational Photonics, Abbe School of Photonics, FSU Jena, Prof. T. Pertsch, 20.05.2015 5 0.2.2 Maxwell’s equations in frequency domain Using

Computational Photonics, Abbe School of Photonics, FSU Jena, Prof. T. Pertsch, 20.05.2015 57

4.2.1 Solution with finite difference method in the time domain for Ez

Discretization of derivative operators symmetric discretization is second order accurate

21 11 1

1 1

( )n N NN N

N N N

f f f O x xx x x

+ −+ −

+ −

∂ − ≈ + − ∂ −

while the asymmetric discretization is just first order accurate

[ ]11

1

n N NN N

N N N

f f f O x xx x x

−−

∂ −≈ + −

∂ −

always use symmetric discrete operators if possible / feasible! introduce discrete space-time index notation: ( , ) ( , )i n i x n t= D D upper index = time(n ) lower index = space( i )

21 1

1 12

21 1

1 12

( , ) ( )2

( )2

( , ) ( )2

( )2

( )

n n nn i i i

z i

n n ni i i

n n nn i i i

y i

n n ni i i

i

E E EE i x n t E O xx x

E E E O tt tH H HH i x n t H O xx x

H H H O tt t

i x

+ −

+ −

+ −

+ −

∂ − D D = ⇒ = + D ∂ D∂ − = + D ∂ D∂ − D D = ⇒ = + D ∂ D∂ − = + D ∂ D

ε D = ε

Maxwell’s equations

( )0 0

1 11 1

0

1 11 1

0

0 01 1

1 1

0

1 11

0

1 1

12 2

1

1 1

12 2

1

n ny i iz

i

n n n ni i i i

i

n n n ni i i i

i

n ny i iz

n n n ni i i i

n n ni i i i

H E HEt x t x

E E H Ht x

tE E H Hx

H H EEt x t x

H H E Et x

tH H E Ex

+ −+ −

+ −+ −

+ −+ −

+ −+ −

∂ ∂ ∂∂= ⇒ =

∂ ε ε ∂ ∂ ε ε ∂

− −⇒ ≈

D ε ε D

D ⇒ ≈ + − ε ε D

∂ ∂ ∂∂= ⇒ =

∂ µ ∂ ∂ µ ∂

− −⇒ ≈

D µ D

D⇒ ≈ + −

µ D

r

1n

Page 58: Computational Photonics - uni-jena.deComputational Photonics, Abbe School of Photonics, FSU Jena, Prof. T. Pertsch, 20.05.2015 5 0.2.2 Maxwell’s equations in frequency domain Using

Computational Photonics, Abbe School of Photonics, FSU Jena, Prof. T. Pertsch, 20.05.2015 58

FDTD Discretization for the H field:

FDTD Discretization for the E field:

E

H

E

H

E

H

E

H

E

H

E

H

E

H

E

H

E

H

E

H

E

H

E

H

E

H

E

H

E

H

E

H

E

H

E

H

E

H

E

H

E

H

E

H

E

H

E

H

E

H

E

H

E

H

E

H

E

H

E

H 5

4

3

2

1

1 2 3 4 5 6 x(i)

t(n)

E

H

E

H

E

H

E

H

E

H

E

H

E

H

E

H

E

H

E

H

E

H

E

H

E

H

E

H

E

H

E

H

E

H

E

H

E

H

E

H

E

H

E

H

E

H

E

H

E

H

E

H

E

H

E

H

E

H

E

H 5

4

3

2

1

1 2 3 4 5 6 x(i)

t(n)

Page 59: Computational Photonics - uni-jena.deComputational Photonics, Abbe School of Photonics, FSU Jena, Prof. T. Pertsch, 20.05.2015 5 0.2.2 Maxwell’s equations in frequency domain Using

Computational Photonics, Abbe School of Photonics, FSU Jena, Prof. T. Pertsch, 20.05.2015 59

4.2.2 Yee grid in 1D and Leapfrog time steps

Equations for a single space-time step

1 0.5 0.50.5 0.5

0.5 0.50.5 0.5 1

0

0

1

1

n

n n n ni i i i

i

n n ni i i i

tE

tH H E

E H

Ex

Hx

+ + ++ −

+ −+ + +

D ≈ + − ε ε D

D ≈ + − µ D

Properties Divergence MWEQs?

− The condition of no divergence of the fields is always fulfilled in 1D, since fields are always transverse polarized to the direction of field change.

Resolution of discretization xD and tD ? (from physical arguments)

5

4

3

2

1

1 2 3 4 5 6 x(i)

t(n)

E

H

E

H

E

H

E

H

E

H

E

H

E

H

E

H

E

H

E

H

E

H

E

H

E

H

E

H

E

H

E

H

E

H

E

H

E

H

E

H

E

H

E

H

E

H

E

H

E

H

E

H

E

H

E

H

E

H

E

H

2

1

1 2 3 x(i)

t(n)

E

H

E

H

E

H

E

H

E

H

E

H

1.5 2.5 3.5

2.5

1.5

Page 60: Computational Photonics - uni-jena.deComputational Photonics, Abbe School of Photonics, FSU Jena, Prof. T. Pertsch, 20.05.2015 5 0.2.2 Maxwell’s equations in frequency domain Using

Computational Photonics, Abbe School of Photonics, FSU Jena, Prof. T. Pertsch, 20.05.2015 60

− spatial grid resolution xD must be fine enough to display the finest structures of the ε distribution and the fields rule of thumb (heuristically): max/ (20 )x nD ≤ λ , with maxn being the highest refractive index in the simulation domain

− temporal stepsize tD is limited by the speed of light, i.e. the interaction in space can reach only up to the next neighbor in one time-step sets upper limit to the phase velocity /t x cD ≤ D (see notes on stability in section 4.3.4)

Boundaries? − finite size of treatable simulation domain requires truncation of

space most simple approach: perfectly conducting boundary ( 0E = at the boundary)

Sources? − either initial field distribution or sources in the simulation domain − initial field is difficult in higher dimensions since field must have

zero divergence (would require prior knowledge of solution) − sources as e.g. currents:

0.50.5

0

1 0.5 0.50.5 0.5

0

1n n n ni i i i

ni

i i

tE E Hx

t jH+ ++

+ ++ −

DD ≈ + − + ε εε εD

4.3 3D problems space grid ( , , , ) ( , , , )i j k n i x j y k z n t= D D D D

( , , , )

( , , )

nx x ijk

ijk

E i x j y k z n t E

i x j y k z

⇒ D D D D =

ε D D D = ε

Finite differencing in space and time

1 1 2

1 1

2

( )2

( )2

n nnx xx i j k i j kijk

n n nx x xijk ijk ijk

E EEO y

y y

E E EO t

t t

+ −

+ −

−∂ = + D ∂ D

∂ − = + D ∂ D

Page 61: Computational Photonics - uni-jena.deComputational Photonics, Abbe School of Photonics, FSU Jena, Prof. T. Pertsch, 20.05.2015 5 0.2.2 Maxwell’s equations in frequency domain Using

Computational Photonics, Abbe School of Photonics, FSU Jena, Prof. T. Pertsch, 20.05.2015 61

4.3.1 Yee grid in 3D

discretizing MWEQ ( )0

1x

x yz jt y

Hz

E H ∂ ∂ ∂= − − ∂ ε ε ∂ ∂ r

1 12 2

1 1 1 12 2 2 2

1 1 1 12 2 2 2

1 12 2

1 12 2

, , , ,

, 1, , , , , 1 , ,

, ,0 , ,

n nx xi j k i j k

n nn ny yz zi j k i j k i j k i j k n

x i j ki j k

E E

H HH Ht jy z

+ −

+ + + +

+ + + + + +

+ ++ +

=

−−D + − − ε ε D D

other equations: 1 12 2

1 1 1 12 2 2 2

1 1 1 12 2 2 2

1 12 21 1

2 2

, 1, , 1,

, 1, 1 , 1, , 1, 1, 1,

, 1,0 , 1,

n n

y yi j k i j k

n n n nx x z z ni j k i j k i j k i j k

y i j ki j k

E E

H H H Ht jz x

+ −

− + + − + +

− + + − + + + − + +

− + +− + +

=

− −D + − − ε ε D D

1 12 2

1 1 1 12 2 2 2

1 1 1 12 2 2 2

1 12 2

1 12 2

, , 1 , , 1

, , 1 1, , 1 , 1, 1 , , 1

, , 10 , , 1

n nz zi j k i j k

n n n ny y x x ni j k i j k i j k i j k

z i j ki j k

E E

H H H Ht jx y

+ −

− + + − + +

+ + − + + − + + − +

− + +− + +

=

− −D + − − ε ε D D

1 1 1 12 2 2 23 31 1 1 1 1 1

2 2 2 2 2 2 2 21 12 2

, 1, , 1, , , 1 , , 11

, 1, 1 , 1, 10

n n n ny y z zi j k i j k i j k i j kn n

x xi j k i j k

E E E EtH Hz y

+ + + +

− + + − + + − + + − + ++

− + + − + +

− −D = + − µ D D

Ez

Ey

Ex

Hy

Hy

Hz Hz

Hz Hx

Hx

Hy

Hx

x(i)

y(j)

z(k)

Page 62: Computational Photonics - uni-jena.deComputational Photonics, Abbe School of Photonics, FSU Jena, Prof. T. Pertsch, 20.05.2015 5 0.2.2 Maxwell’s equations in frequency domain Using

Computational Photonics, Abbe School of Photonics, FSU Jena, Prof. T. Pertsch, 20.05.2015 62

1 11 12 22 2

31 1 1 1 1 1 12 2 2 2 2 2 2 2

1 12 2

1 , , 1 , , 1 , , , ,

, , 1 , , 10

n nn nx xz zn n i j k i j k i j k i j k

y yi j k i j k

E EE EtH Hx z

+ ++ ++ + + + − + + + + + +

+ + + +

−−D = + − µ D D

1 11 1 2 22 23 1 1 1 1 1 1 12 2 2 2 2 2 2 2

1 12 2

, , , , , 1, , 1,1

, 1, , 1,0

n nn ny yx xi j k i j k i j k i j kn n

z zi j k i j k

E EE EtH Hy x

+ ++ +

+ + + + + + + − + ++

+ + + +

−−D = + − µ D D

Grid size

( ) ( )( ) ( )( ) ( )

12

12

12

, 1, 1 1, ,

1, , 1 , 1,

1, 1, , , 1

n nx x y z x x y z

n ny x y y x y z

n nz x y z x y z

E N N N H N N N

E N N N H N N N

E N N N H N N N

+

+

+

+ + +

+ + +

+ + +

Simple boundary conditions: Perfect Electric Conductor (PEC)

( ) ( )

( ) ( ):,1,: 0, :,:,1 0

:, 1,: 0, :,:, 1 0x x

x y x z

E E

E N E N

= =

+ = + =

( ) ( )

( ) ( )1,:,: 0, :,:,1 0

1,:,: 0, :,:, 1 0y y

y x y z

E E

E N E N

= =

+ = + =

( ) ( )

( ) ( )1,:,: 0, :,1,: 0

1,:,: 0, :, 1,: 0z z

z x z y

E E

E N E N

= =

+ = + =

4.3.2 Physical interpretation

3D Yee grid & Amper’s law

0( )

( ) (, ) , )(F F

tt

t∂ε ε ∂ = ∂

∂ ∫ ∫r f sH rE r

Page 63: Computational Photonics - uni-jena.deComputational Photonics, Abbe School of Photonics, FSU Jena, Prof. T. Pertsch, 20.05.2015 5 0.2.2 Maxwell’s equations in frequency domain Using

Computational Photonics, Abbe School of Photonics, FSU Jena, Prof. T. Pertsch, 20.05.2015 63

Hx(i-1/2,j,k)

Hx(i-1/2,j+1,k)

Hy(i,j+1/2,k)

Hy(i-1,j+1/2,k)

Ey(i-1/2,j+1,k-1/2)

Ey(i-1/2,j+1,k+1/2)

Ez(i-1/2,j+3/2,k)

Ez(i-1/2,j+1/2,k)

1 12 2

1 1 1 12 2 2 2

1 12 2

1 11 12 22 2

, , , ,0 , ,

, , , 1,, , 1, ,

n n

i j k i j ki j k

n nn n

i j k i jx ki jy x yk j

z z

i k

x yt

x y x

E

H H y

E

H H

+ −

− + − +

+ +

− − ++ − +

− ε ε D D D

= D + D − D − D

solving for the unknown component:

1 12 2

1 1 1 12 2 2 2

1 1 1 12 2 2 2

1 12 2

, , , ,

, , 1, , , , , 1,

0 , ,

y y

n n

i j k i j k

n n n n

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

z

i k

z

j

H H H

E E

tx y

H

+ −

− + − +

+ − + − − +

+ +

=

− −D + + ε ε D D

3D Yee grid & Faraday’s law

0( )

( , ) ( , )F F

tt

t∂µ ∂ = − ∂

∂ ∫ ∫ E rf sH r

Hx(i-1/2,j,k)

Hx(i-1/2,j+1,k)

Hy(i,j+1/2,k)

Hy(i-1,j+1/2,k)

Ey(i-1/2,j+1,k-1/2)

Ey(i-1/2,j+1,k+1/2)

Ez(i-1/2,j+3/2,k)

Ez(i-1/2,j+1/2,k)

Page 64: Computational Photonics - uni-jena.deComputational Photonics, Abbe School of Photonics, FSU Jena, Prof. T. Pertsch, 20.05.2015 5 0.2.2 Maxwell’s equations in frequency domain Using

Computational Photonics, Abbe School of Photonics, FSU Jena, Prof. T. Pertsch, 20.05.2015 64

4.3.3 Divergence-free nature of the Yee discretization

( )

( )

0 0 makr

0

( , ) ( , )rot ( , ) ,

div

r ,

,( , ) 0, div

ot ( , )

( , ) 0

t tt tt

tt

tε ε = =

∂ ∂= −µ = ε ε +

∂ ∂ r E r

H r E rE r H

r

r r

H

j

( )0div ?t∂

ε =∂

E ( )0 0Yee cell Yee cell

div dV dt t∂ ∂

ε = ε∂ ∂∫∫∫ ∫∫E E f

( )

( )

( )

1 1 1 12 2 2 2

1 1 1 12 2 2 2

1 1 1 12 2 2 2

0 0 , , 1, ,Yee cell

Term1

0 , 1, , ,

Term 2

0 , , 1 , ,

Term 3

x xi j k i j k

y yi j k i j k

z zi j k i j k

d E E y zt t

E E x zt

E E x yt

+ + − + +

− + + − +

− + + − +

∂ ∂ε = ε − D D

∂ ∂

∂+ε − D D

∂+ε − D D

∫∫ E f((((((((((

((((((((((

((((((((((

substitute Term 1 with curl equation ( )0

1 yx zHE H

t y z∂ ∂ ∂

= − ∂ ε ε ∂ ∂ r

1 1 1 12 2 2 2

1 1 1 12 2 2 2

, 1, , , , , 1 , ,

1, 1, 1, , 1, , 1 1, ,

Term 1y yz zi j k i j k i j k i j k

y yz zi j k i j k i j k i j k

H HH H

y z

H HH H

y z

+ + + + + +

− + + − + − + + − +

−− = − D D −− − − D D

collecting the contributions from Term 1, Term 2 and Term 3 results in vanishing of all contributions:

( ) ( ) ( )0Yeecell

Term 1 Term 2 Term 3 0d y z x z x yt∂

ε = D D + D D + D D =∂ ∫∫ E f∂

hence, if the field was divergence-free at some time it will conserve this property!

[ ] ( ) [ ]0 0 0Yee cell Yee cell

div ( 0) 0 & div 0 div 0t dV dVt∂

ε = = ε = ⇒ ε =∂∫∫∫ ∫∫∫E E E

it is important to ensure that sources do not introduce artificial divergence!

Page 65: Computational Photonics - uni-jena.deComputational Photonics, Abbe School of Photonics, FSU Jena, Prof. T. Pertsch, 20.05.2015 5 0.2.2 Maxwell’s equations in frequency domain Using

Computational Photonics, Abbe School of Photonics, FSU Jena, Prof. T. Pertsch, 20.05.2015 65

4.3.4 Computational procedure • Using the spatial differences of the E Field that are known for the time step

n Δt to calculate the H field at the time step (n+1/2) Δt • Using the spatial differences of the H Field that are known for the time step

(n+1/2) Δt to calculate the E field at the time step (n+1) Δt • Using the spatial differences of the E Field that are known for the time step

(n+1) Δt to calculate the H field at the time step (n+3/2) Δt • …

Properties of the algorithm • Leapfrog algorithm discretization in all components,

explicit formulation in time • Close to the physical world as the spatial and temporal

propagation is exactly simulated • Yee grid can ensure inherently divergence-free solution. • Method is second order accurate in all spacetime

dimensions (from central differences). • To ensure stability, the Courant-Friedrichs-Lewy condition has to be

fulfilled (published very early in [R. Courant, K. Friedrichs, H. Lewy, “Über die partiellen Differenzengleichungen der mathematischen Physik”, Mathematische Annalen 32, (1869)]. This condition links temporal and spatial resolution (as in the 1D case). In three dimensions, the stability condition will be

1/2

2 2 2

1 1 1 13

htc x y z c

D ≤ + + = D D D (for a cubic grid).

Note that the temporal and spatial discretization cannot be chosen independently. This means that if you want to double the spatial resolution in a 3D FDTD, your memory consumption rises by a factor of 8 (23), while your computing time rises at least by a factor of 16 (24)!

sour

ce: u

rban

-fitn

ess.

de

Page 66: Computational Photonics - uni-jena.deComputational Photonics, Abbe School of Photonics, FSU Jena, Prof. T. Pertsch, 20.05.2015 5 0.2.2 Maxwell’s equations in frequency domain Using

Computational Photonics, Abbe School of Photonics, FSU Jena, Prof. T. Pertsch, 20.05.2015 66

4.4 Simplification to 2D problems • Problems are often invariant in one spatial direction, taking z (e.g. grating,

cylindrical objects) • Derivations of the field along this directions are zero

0

1 yx EHt z

∂∂=

∂ µ ∂ ( )0

1 yz x zx

HE E Hjy t y z

∂∂ ∂ ∂− − = − ∂ ∂ ε ε ∂ ∂ r

0

1y z xH E Et x z

∂ ∂ ∂= −

∂ µ ∂ ∂ ( )0

1y xy

E Hjt z

∂ ∂− = ∂ ε ε ∂ r

( )0 0

1 1

z

y yz x z xz

Hx

E HH E E Hjt y x t x y

∂− ∂

∂ ∂ ∂ ∂ ∂ ∂= − − = − ∂ µ ∂ ∂ ∂ ε ε ∂ ∂ r

Maxwell can be decoupled into 2 sets of each 3 differential equations

( )0 0

0

1 1

1

y yz x z xz

yx

H EE H H E jt x y t y x

EHt z

∂ ∂ ∂ ∂ ∂ ∂= − = − − ∂ ε ε ∂ ∂ ∂ µ ∂ ∂

∂∂=

∂ µ ∂

r

( )0

1 yz x zx

HE E Hjy t y z

∂∂ ∂ ∂− − = − ∂ ∂ ε ε ∂ ∂ r

0

1y z xH E Et x z

∂ ∂ ∂= −

∂ µ ∂ ∂ ( )0

1y xy

E Hjt z

∂ ∂− = ∂ ε ε ∂ r

zHx

∂− ∂

TE polarization TM polarization

4.5 Implementing light sources • arbitrary light sources can be modeled simply by adding the source field to

the field in the computational domain • a physical model for sources is a macroscopic current density

makr( , ) ( , )rot ( , ) , rot ( , ) ( , )t tt t tt t

∂ ∂= − = +

∂ ∂B r D rE r H r j r

• Simplified implementation by adding a source term to the electric field, which corresponds to an externally driven dipole polarization

Examples for temporal variation of the light source x-polarized cw-source

, , , ,sin( )n n

x xi j k i j kE E n t= + D ω

x-polarized impulse ,, , , ,

n nx x n ni j k i j k

E E ′= + δ

Examples for spatial variation of the light source x-polarized Gaussian wave

Page 67: Computational Photonics - uni-jena.deComputational Photonics, Abbe School of Photonics, FSU Jena, Prof. T. Pertsch, 20.05.2015 5 0.2.2 Maxwell’s equations in frequency domain Using

Computational Photonics, Abbe School of Photonics, FSU Jena, Prof. T. Pertsch, 20.05.2015 67

22

, , , ,exp sin( )n n

x xi j k i j kx y

i x j yE E n t D D = + − + D ω σ σ