Download FDTD Solutions training

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Lorentz force wikipedia , lookup

Magnetic monopole wikipedia , lookup

Magnetohydrodynamics wikipedia , lookup

Dielectric wikipedia , lookup

Electromagnetism wikipedia , lookup

Multiferroics wikipedia , lookup

Maxwell's equations wikipedia , lookup

Computational electromagnetics wikipedia , lookup

Transcript
FDTD Solutions
Numerical Methods
Outline
 Application area review
 Ray optics vs. wave optics
 Finite Difference Time Domain method
: Yee cell
: Uniform, graded, and conformal meshing
: Obtaining frequency domain results from a time
domain method
 Boundary conditions
 Coherence and polarization in FDTD
 Accuracy and convergence testing
© 2012 Lumerical Solutions, Inc.
1
Application area overview
Our products can accurately simulate many technologies
Photonic crystals
Bandstructure
Plasmonics
CMOS Image sensors
Nanoparticles
Solar cells
Resonators
LED/OLEDs
Grating devices
Lithography
Metamaterials
Waveguides
© 2012 Lumerical Solutions, Inc.
Wave optics vs. ray tracing
 Question: What features are common among
these applications?
(When do you need to use FDTD Solutions?)
 Answer: Feature sizes are on the order of the
wavelength.
© 2012 Lumerical Solutions, Inc.
2
Wave optics vs. ray tracing
Source  = 0.55 um
4 um
© 2012 Lumerical Solutions, Inc.
Wave optics vs. ray tracing
Incident light
R=100%
45
n=1.5
n=1
Snell’s Law gives
c: 41.8
© 2012 Lumerical Solutions, Inc.
3
Wave optics vs. ray tracing
 = 0.4 um
 = 4 um
20 um
rayvswave_700THz.mpg
© 2012 Lumerical Solutions, Inc.
rayvswave_70THz.mpg
Wave optics vs. ray tracing
 Conclusion: You need FDTD Solutions when
feature sizes are on the order of a wavelength
© 2012 Lumerical Solutions, Inc.
4
Overview of FDTD method
TOPICS
 Maxwell equations
 Yee cell
 Time domain technique
 Fourier transform
 Sources and Monitors
 Computational requirements
 2D vs. 3D
 Advantages of the FDTD method
© 2012 Lumerical Solutions, Inc.
Maxwell’s equations
Describe the behavior of both the electric and magnetic fields, as well as their interactions
with matter.
Name
Differential form
Integral form
Gauss’ law
Gauss' law for magnetism
(absence of magnetic monopoles):
Faraday’s law of induction:
Ampère’s law
(with Maxwell's extension):
© 2012 Lumerical Solutions, Inc.
5
Maxwell’s equations
Meaning
Symbol
SI Unit of Measure
electric field
volt per meter
magnetic field
also called the auxiliary field
ampere per meter
electric displacement field
also called the electric flux density
coulomb per square meter
magnetic flux density
also called the magnetic induction
also called the magnetic field
tesla, or equivalently,
weber per square meter
free electric charge density,
not including dipole charges bound in a
material
coulomb per cubic meter
free current density,
not including polarization or magnetization
currents bound in a material
ampere per square meter
© 2012 Lumerical Solutions, Inc.
Wave Optics – Free space plane wave
In vacuum, without charges (=0) or currents (J=0)
 Maxwell’s equations have a simple solution in terms of traveling
sinusoidal plane waves
 The electric and magnetic field directions are orthogonal to one
another and the direction of travel k
 The E, H fields are in phase, traveling at the speed c
H
© 2012 Lumerical Solutions, Inc.
6
Wave Optics - Simple materials
In linear materials, the D and B fields are related to E and
H by:
D  E
B  H
where:
ε is the electrical permittivity of the material, and
μ is the permeability of the material
In FDTD Solutions, we typically deal with the electrical
permittivity only
μ=μ0 is the permeability of the free space
© 2012 Lumerical Solutions, Inc.
How the FDTD method works
E and H are discrete in time


E (t )  E nt

 ( n 1 ) t
H (t )  H 2
The basic FDTD time-stepping relation:

 t  
E n 1  E n    H n 1 2



t  
H n 3 2  H n 1 2    E n 1

E0

H1 2


E1

H3 2
…
2nd order accurate in time: error ~ t2
© 2012 Lumerical Solutions, Inc.
7
Maxwell equations on a mesh
Yee cell
 E and H are
discrete in space
© 2012 Lumerical Solutions, Inc.
The Yee cell
Spatially stagger the vector components of the E-field and H-field about
rectangular unit cells of a Cartesian computational grid.
Z
Yee
cell
Ez
Hx
Ey
Hy
(x,y,z)
Ex
Y
Hz
X
2nd order accurate in space
Kane Yee (1966). "Numerical solution of initial boundary value problems involving Maxwell's
equations in isotropic media". Antennas and Propagation, IEEE Transactions on 14: 302–
307.
© 2012 Lumerical Solutions, Inc.
8
How are dielectric properties treated?

 (r )
The true structure
The meshed structure
 i , j ,k
Discrete
mesh
Y
X
Conformal mesh technology
© 2012 Lumerical Solutions, Inc.
Conformal mesh technology
 Interfaces are a problem for Maxwell’s equations
on a discrete mesh
: The fields can be discontinuous at interfaces
: The positions of the interface cannot be resolved to
better than dx
: Staircasing effects
 Solutions
: Graded mesh (reduce mesh size near interfaces)
: Conformal mesh technology
: Combination of both
© 2012 Lumerical Solutions, Inc.
9
Conformal mesh technology
 Finite difference methods cannot resolve
interface positions or layer thicknesses to better
than the mesh size
© 2012 Lumerical Solutions, Inc.
Conformal mesh technology
 Staircasing can lead to unwanted effects
© 2012 Lumerical Solutions, Inc.
10
Conformal mesh technology
 Conformal mesh technology uses an integral
solution to Maxwell’s equations near interfaces
: Lumerical’s approach can handle arbitrary dispersive
media
: More advanced than well known approaches such as
the Yu-Mittra model for PEC
© 2012 Lumerical Solutions, Inc.
Example: Yu-Mittra approach for PEC
C
 
Bz
   E  dl
t
C
 
   E  dl
C1
C1
Ex
Ey
Bz
Ey
y
PEC
Ex
x
© 2012 Lumerical Solutions, Inc.
11
Conformal mesh technology
Application
Simulation mesh
Best Solution
Multilayer
Conformal mesh can allow you to use the
default simulation mesh.
Mie scattering
We combine conformal meshing with graded
meshing, but the mesh is not as fine as with
staircasing.
Waveguide couplers
Conformal mesh can allow you to use the
default simulation mesh.
© 2012 Lumerical Solutions, Inc.
Conformal mesh technology
 There are 3 variants used
: Conformal variant 0 (default)
• Conformal mesh applied to all materials except metals and
PEC (Perfect Electrical Conductor)
• Metals are materials with real() < 1
• This is the best setting without doing convergence
testing
: Conformal variant 1
• Conformal mesh applied to all interfaces
: Conformal variant 2
• Yu-Mittra model for PEC applied to PEC and metals
© 2012 Lumerical Solutions, Inc.
12
Conformal mesh technology
 Simple rule of thumb
: Use the default conformal variant 0
 Possible exceptions
: If the simulation diverges
• Test using staircasing
: If you are studying plasmonic effects
• Consider using conformal variant 1
• Do some careful convergence testing and read the page at
http://docs.lumerical.com/en/fdtd/user_guide_testing_conver
gence.html
© 2012 Lumerical Solutions, Inc.
Computational Resource Requirements
How do the required computational resources scale with grid size?
3D
2D
Memory
Requirements
~ (/dx)3
~ (/dx)2
Simulation Time
~ (/dx)4
~ (/dx)3

dx=/10
© 2012 Lumerical Solutions, Inc.
13
Controlling the mesh


We provide a mesh accuracy slider that ranges from 1-8
The mesh algorithm then targets a minimum


Note that =0/n, where n is the refractive index
Generally, /dx=10 (mesh accuracy 2) is considered reasonable for many
FDTD simulations and /dx ~ 20 (mesh accuracy 4,5) is considered very
high accuracy
It is still often worth running at /dx=6 (mesh accuracy 1) for initial
simulations
The default is /dx=10 (mesh accuracy 2)
We will see later why /dx = 1/(k dx) is the right quantity to consider
The meshing can be fully customized
: /dx = 6, 10, 14, 18, 22, 26, 30, 34




:
:
Typically, we use mesh override regions to force a particular mesh in a given region, which
we recommend
We can fully customize the mesh algorithm details if desired but this is not recommended
© 2012 Lumerical Solutions, Inc.
Tip
 Use a coarse mesh for simulations
: Memory scales as 1/dx3
: Simulation time scales as 1/dx4
© 2012 Lumerical Solutions, Inc.
14
2D vs 3D
 FDTD simulations can be run in 2D or 3D
3D
3D
2D:
2D: Structure
Structure is
is infinite
infinite in
in zz direction
direction
Z
Y
X
Y
Z
X
© 2012 Lumerical Solutions, Inc.
2D vs 3D
 2D assumes


 E H


0
z z
z
 We get perfect separation of Maxwell’s equations into
two independent sets of equations
: Transverse Electric (TE) : involves only Ex, Ey, Hz
: Transverse Magnetic (TM) : involves only Ez, Hx, Hy
 The terms “TE” and “TM” are no longer used in FDTD
Solutions. Use the blue arrows of sources to determine
the Electric field polarization.
© 2012 Lumerical Solutions, Inc.
15
FDTD is a time domain technique!
 The simulation is run to solve Maxwell’s equations in
time to obtain E(t) and H(t)
 Most users want to know the field as a function of
wavelength, E(), or equivalently frequency, E(w)
 The steady state, continuous wave (CW) field E(w) is
calculated from E(t) by Fourier transform during the
simulation.
TSim
iwt

E (w ) 

 e E (t )dt
0
See section on Units and Normalization of Reference Manual for more details:
http://www.lumerical.com/fdtd_online_help/ref_fdtd_units_units_and_normalization.php
© 2012 Lumerical Solutions, Inc.
FDTD is a time domain technique!
 Normalize E(w) to the source spectrum and we can obtain the
impulse response of the system!
T

1 Sim iwt 
Eimpulse(w ) 
e E (t )dt

s(w ) 0
 Eimpulse is a response of the system
: It is independent of the source pulse used
: It is the CW, or monochromatic response
 Ideally s(w)=1, meaning that s(t) is a delta function
: In practice, we use a very short pulse
© 2012 Lumerical Solutions, Inc.
16
Advantages of the FDTD method
Advantages
 Few inherent approximations = accurate
 A very general technique that can deal with many types
of problems
 Arbitrarily complex geometries
 One simulation gives broadband results
© 2012 Lumerical Solutions, Inc.
Example, ring resonator
through
n=2.915
4.4 m
~1.55m
drop
© 2012 Lumerical Solutions, Inc.
17
Example: waveguide ring resonator
time
1
Fourier
Transform
ring.mpg
2
© 2012 Lumerical Solutions, Inc.
Example: waveguide ring resonator
through
drop
© 2012 Lumerical Solutions, Inc.
18
Boundary conditions
 PML
• Absorbs incident fields
• Use PML when the fields are meant to propagate away
from the simulation region
 Metal
• Perfect metal boundary
• 100% reflection, 0% absorption
 Periodic
• For periodic structures
• The structure AND fields must be periodic
• Typically used with the plane wave source
© 2012 Lumerical Solutions, Inc.
Symmetric/Anti-Symmetric boundaries
 Symmetric/Anti-Symmetric
• Can reduce memory/time for symmetric simulations
• Both structure AND fields must be symmetric
© 2012 Lumerical Solutions, Inc.
19
Symmetric/Anti-Symmetric boundaries
Non zero components of the electric and magnetic fields at
symmetric/anti-symmetric boundaries
© 2012 Lumerical Solutions, Inc.
Symmetric/Anti-Symmetric boundaries
How the different electric and mangetic components behave under
different symmetry conditions
© 2012 Lumerical Solutions, Inc.
20
Symmetric/Anti-Symmetric boundaries
 Symmetry/Anti-Symmetry can be used for
periodic structures
: Consider file from far field section, farfield4.fsp
© 2012 Lumerical Solutions, Inc.
Symmetric/Anti-Symmetric boundaries
 Symmetry/Anti-Symmetry can be used for
periodic structures
: Image the near and far fields at 1.3 microns
© 2012 Lumerical Solutions, Inc.
21
Symmetric/Anti-Symmetric boundaries
 Symmetry/Anti-Symmetry can even be used for
periodic structures
: We can get the same results but the simulation runs faster
: Far field projections can still be done
: The data is automatically “unfolded” so we see the full image
GUI and script results
Actual simulation
© 2012 Lumerical Solutions, Inc.
Bloch boundary conditions
 Bloch
• For periodic structures (similar to periodic)
• Use Bloch when the plane wave source is at nonnormal incidence
• Use Bloch for bandstructure simulations.
• Bloch boundaries conditions ensure that
E(x+a) = exp(ika)*E(x)
a is the simulation span
k is the Bloch vector
© 2012 Lumerical Solutions, Inc.
22
Bloch boundary conditions
• Periodic boundaries are just a special case of Bloch
boundaries (k=0)!
• Bloch BC requires 2x memory and simulation time
• When using Bloch boundaries for non-normal plane waves,
you must check the following
© 2012 Lumerical Solutions, Inc.
Bloch boundary conditions

Consider the difference between correct and incorrect k settings for a
plane wave in free space
Correct
usr_bloch_movie_2.mpg
Incorrect
usr_bloch_movie_3.mpg
© 2012 Lumerical Solutions, Inc.
23
Bloch boundary conditions
 When the setting are correct, we can study periodic structure
illuminated by plane waves at angles
: We can calculate far field projections
• Assume periodicity the same as with periodic boundary conditions
: We can calculate grating order efficiencies, the same as with periodic
boundary conditions
: We must be cautious about the PML performance when the angle of
incidence is steep
• Sometimes, we need to increase the number of layers of PML to get accurate
results
© 2012 Lumerical Solutions, Inc.
Coherence
 Temporal incoherence
: The phase, j, of the light shifts randomly over time, on a time
scale tc


E (t )  E0 cos(wt  j (t ))
2
T
 10 15 s
w
t c  10 11 s
: Even without random phase shifts, if the light is not
monochromatic, it is incoherent
t c  f  1
: In either case, the coherence length of the system is often much
longer than any standard simulation time (tc >> T)
• It is not efficiency in general to directly model incoherence
• It is not possible to perform near to far field projections of incoherent results in
the near field
© 2012 Lumerical Solutions, Inc.
24
Coherence
 Temporal incoherence
: The frequency domain monitors of FDTD Solutions
calculate the monochromatic response of the system
• There are some advanced features to directly extract incoherent results where the
value of f ~ 1/tc can be specified, see
http://docs.lumerical.com/en/fdtd/user_guide_spectral_averaging.html for details
: In general, the best approach is to calculate the
monochromatic (or CW) response first, then calculate
the incoherent result with


2
2
E (w0 )   W (w ) E (w ) dw
• Where W(w) is the spectrum of the physical source used
© 2012 Lumerical Solutions, Inc.
Coherence
 Temporal incoherence example
: Reflection of 50nm of silver on 500nm of silicon
CW or monochromatic response
© 2012 Lumerical Solutions, Inc.
25
Coherence
 From one simulation, we can calculate the
incoherent results at many wavelengths


2
2
E (w0 )   W (w ) E (w ) dw
© 2012 Lumerical Solutions, Inc.
Coherence

Spatial incoherence can be simulated using the ergodic principle
+


Each ensemble consists of dipoles with randomized phase, amplitude,
position, orientation and pulse time
A large number of ensembles must be averaged
:

There is a statistical error associated that decreases with increased number of ensembles
Typically 50 to 100 simulations is a minimum requirement and more
may be required
:

+……+
See Chan, Soljačić, and Joannopoulos, “Direct calculation of thermal emission for threedimensionally periodic photonic crystal slabs” http://pre.aps.org/abstract/PRE/v74/i3/e036615
for discussion
It is often erroneously assumed that one simulation is enough
:
This may or may not be true, but it depends on the details of what is being recorded
© 2012 Lumerical Solutions, Inc.
26
Coherence
 Spatial coherence
: The same results can be reconstructed from spatially
coherent results
• There is no statistical error
• The total number of simulations is typically less than is
required by ensemble averaging
: Example for an ensemble of incoherent dipole
emitters
© 2012 Lumerical Solutions, Inc.
Coherence
 Incoherent sources are dealt with from the
coherent results.
 For example, consider 2 dipoles
log(|E(w)|2)
Time domain
dipole_coherent.mpg
© 2012 Lumerical Solutions, Inc.
27
Coherence
 Incoherent dipoles, 2 simulations
Simulation 1
log(|E1|2+|E2|2)
log(|E1|2)
dipole_incoherent1.mpg
Simulation 2
log(|E2|2)
log(|E1+E2|2)
dipole_incoherent1.mpg
© 2012 Lumerical Solutions, Inc.
Polarization
 FDTD simulations have well defined polarization
 Unpolarized results are obtained by adding the results of 2 orthogonal
polarization simulations incoherently
½( |E1|2
+
|E2|2 ) = <|E|2>unpolarized
© 2012 Lumerical Solutions, Inc.
28
Dipoles
 Incoherent, isotropic dipoles require the sum of 3
orthogonal polarization states, summed
incoherently
2
E
= 1/3
{
 2
E px
+
 2
E py
+
 2
E pz
}
The above theory greatly simplifies LED/OLED simulations
© 2012 Lumerical Solutions, Inc.
Coherence
 We often have to find incoherent results
:
:
:
:
:
Temporal incoherence
Spatial incoherence
Unpolarized light
Anisotropic dipole emitters
and more...
 It is generally most efficient to reconstruct the
incoherent results from the coherent results
: There is no statistical error
: The total number of simulations is typically less than
a brute force approach
© 2012 Lumerical Solutions, Inc.
29
Accuracy and convergence testing
Dispersion relation in FDTD (in free space)
2
 k y y   1
 1
 k x x   1
 wt   1
 k z z 
 ct sin  2    x sin  2    y sin  2    z sin  2 

 



 


 
2
2
t  0 


When x  0
y  0
z  0 
we have
w  c k x2  k y2  k z2  ck
Typical target for accuracy might be
Courant stability limit t 
2
k x x 2


~ 0.3 
 10
2
20
x
x
c 3
© 2012 Lumerical Solutions, Inc.
Accuracy and convergence testing


In reality, many factor beyond the mesh size affect the accuracy of FDTD
For example
: The proximity of the PML
: PML reflections
: The multi-coefficient model fit
• How well do you know n,k for your materials? What is the experimental error? Do you
expect the same n,k as other authors?
: and more...


Please read
http://docs.lumerical.com/en/fdtd/user_guide_testing_convergence.html for
a detailed list and steps on doing convergence testing
Do not waste time making the mesh size really small without considering
the other factors
: And some of them can get worse as the mesh size gets small!
© 2012 Lumerical Solutions, Inc.
30
Accuracy and convergence testing
 With care and computing power, almost any
accuracy can be achieved
 The more important limit for real devices is often
how well you know the geometry and the
material properties (n,k)
© 2012 Lumerical Solutions, Inc.
Review and tips
 What mesh size should I use?
: “mesh accuracy” of 1 or 2 for initial setup (faster)
: Use “mesh accuracy” of 2-4 for final simulations
: “mesh accuracy” 5-8 is almost never necessary
• Use mesh overrides instead for most applications
 How long a simulation time should I use?
: Start with longer simulations times and let the “auto-shutoff”
feature find out when you can stop the simulation
: Check with point time monitors
 How do I check the memory requirements?
© 2012 Lumerical Solutions, Inc.
31
Review and tips
What are some tricks for speeding up FDTD Solutions, and reducing the
memory requirements?

Avoid simulating homogeneous regions with no structure

Use symmetry where possible

Use periodicity where possible

Use a coarse mesh (use a refined mesh for final simulations)
:
:
:
:
Use far field projections instead
Gain factors of 2, 4 or 8
Gain factors of 100s or 1000s
Start with “mesh accuracy” of 1 instead of 2
•
•
•
:
:

gives 8 times faster simulation
5 times less memory
within 10-20% accuracy in general
User mesh accuracy of 2-4 for final simulation
Use mesh override regions for local regions of fine mesh
Reduce amount of data collected
:
:
:
Down sample monitors spatially
Record fewer frequency points in frequency monitors
Record only the necessary field components
© 2012 Lumerical Solutions, Inc.
Review and tips
 Questions and answers…
© 2012 Lumerical Solutions, Inc.
32
Getting help
 Technical Support
: Email: [email protected]
: Online help: docs.lumerical.com/en/fdtd/knowledge_base.html
• Many examples, user guide, full text search, getting started,
reference guide, installation manuals
: Phone: +1-604-733-9006 and press 2 for support
 Sales information: [email protected]
 Find an authorized sales representative for your
region:
: www.lumerical.com and select Contact Us
© 2012 Lumerical Solutions, Inc.
33