Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 39

Tutorial on

Introduction to a Finite-difference
Time-domain simulation method for
electromagnetism and photonics
By
Dr. Yousuf Khan Naudhani

ICE Cube Conference BUITEMS Quetta


November 12, 2018

1
The Technology Triangle
• Theoretical research followed by calculations and numerical
simulations
• An optimized simulation model then leads to the
experimentation and fabrication
• The fabrication results are then measured and compared to
the simulation

2
Numerical Simulation Method
• Simulation techniques can be generally categorized
into time domain and frequency domain methods

3
Time Domain Simulation
• The evolution of the EM waves in space is computed
with respect to time
• Solves a broad range of frequencies using a short pulse
• Provides both near-field and far-field results in a single
run
• A time domain simulation in general requires less
computation resources as compared to frequency
domain
• Some well-known time-domain methods include:
• Finite-Difference Time-Domain (FDTD)
• Coupling method
• Finite-Integral Time-Domain (FITD)
• Plane Wave Expansion (PWE)

4
Frequency Domain Simulation
• Frequency domain method computes the EM
waves in terms of their frequency components
• The effect of individual frequency components
can be analysed
• Some famous frequency domain calculation
methods include
• Transfer Matrix Method (TMM)
• Finite Element Method (FEM)
• Method of Moments (MoM)
• Fast Multi-pole Method (FMM)

5
Time domain vs. Frequency domain
• In general, the time domain methods are
more accurate for smaller problems
• While, for larger computations, frequency
domain method is more efficient in terms of
computational time and memory

6
Numerical Methods: Basis Choices
finite difference finite elements

in irregular “elements,”
approximate unknowns
by low-degree polynomial

boundary-element methods
discretize discretize only the
unknowns boundaries between
on regular grid homogeneous media

…solve
integral equation
Much easier to analyze, implement, via Green’s functions
generalize, parallelize, optimize, … Potentially much more efficient,
especially for high resolution
7
Finite-Difference Time-Domain Method
(FDTD)
• FDTD method was first proposed in 1966 by Yee
[Yee66], and later on established in 1980 by Taflove
[Taf80]
• Maxwell’s equations to compute the propagation of
electric and magnetic fields in time and space
• Calculation in a wide range of frequencies by using a
broadband excitation source such as a short
Gaussian pulse
• Allows computing the response of the system over a
wide range of frequencies in a single run

8
Finite-Difference Time-Domain Method
(FDTD)
• FDTD technique is one of the most widely used simulation method
to compute and resolve EM boundary value problems
• EM field distribution inside the complex optical structures with non-
uniform refractive index such as PhCs
• Study the actual propagation of field during the simulation by
generating animations and images

9
FDTD Simulation Method 6

• Study the actual


propagation of field
during the simulation
• EM-field distribution
• Source and material
behaviour
• Losses at the ends
• Transmission and
reflection spectra

10
Simulation Method: FDTD 11

• Maxwell’s equation to compute field distribution on


discrete grid
• Initial conditions: initial phase, amplitude,
wavelength
• Permittivity distribution
• Boundary conditions

11
Finite-Difference Time-Domain Method
(FDTD)
• These discrete set of nodes also known as Yee grid
• vector components of the field are associated with
different locations of the grid cell
• The field distribution along the mesh is calculated by
solving Maxwell’s equations on all the nodes
• The derivatives in Maxwell’s equations i.e. 𝛻 × and
𝜕/𝜕𝑡 are replaced by finite-differences resulting in a
set of algebraic equations which are linear on
coordinates

12
Finite-Difference Time-Domain Method
(FDTD)
• The field propagation in time 𝑡 uses
a technique called leap-frog where
the 𝐸 field is calculated from the 𝐸
fields at time 𝑡 − ∆𝑡 including 𝐻
fields at time 𝑡 − ∆𝑡 /2, and vice
versa for 𝐻 at 𝑡 + ∆𝑡/2
• The propagation of 𝐸 and 𝐻 fields
is calculated with time by an offset
of half of a time step ∆𝑡

13
Best FDTD Simulation Tools
• CST (Computer Simulation Technoloy) Microwave
studio
• Lumerical FDTD
• MEEP (MIT Electromagnetic Equation Propagation)

14
MEEP ?

15
MEEP FDTD
• MEEP (MIT Electromagnetic Equation Propagation)
• Finite-Difference Time-Domain (FDTD) method
• Free and open-source software under the GNU GPL.
• Complete script ability via Python, Scheme, or C++ APIs.
• Simulation in 1d, 2d, 3d, and cylindrical coordinates.
• Distributed memory parallelism on any system
supporting MPI.
• Portable to any Unix-like operating system such
as Linux, macOS, and FreeBSD.

16
MEEP interfaces
• C/C++ interface
• Original interface developed
• Executable compiled with MEEP library
• Provides tremendous flexibility and speed
• Python interface
• Python scripts
• flexibility to customize the simulation
• Python libraries such as NumPy, SciPy, and matplotlib
• Scheme interface
• Most widely used interface
• Built on Scheme and Libctl to make simple problems easy
and hard problems soluble
• Scripted and interpreted at runtime
17
What I can do with MEEP ?

18
What I can do with MEEP ?
strange waveguides

& microcavities

[B. Norris, UMN] [Assefa & Kolodziejski, 3d


MIT] structures

[Mangan,
Corning]

synthetic materials
optical phenomena
hollow-core fibers
19
What I can do with MEEP ?

20
MEEP FDTD: boundary conditions
• Meep (MIT EM equation propagation)
• 2D and 3D computations
• Perfectly Matched Layers (PML)
• Periodic Boundary Conditions (PBC)
Top view Side view

3D view Side view Top view

21
Perfectly Matched Layers (PML)
• PML: key properties
• Thickness
• Direction

22
Special features of MEEP
• Arbitrary dimensionality, boundary conditions
• Perfectly matched layers
• Periodic boundary conditions
• Subpixel averaging
• Symmetry and parallelization
• Fully programmable
• Nonlinear and saturable gain media
• Frequency-domain solver

23
Symmetry and parallelization

• Symmetry (3 choices)
• Mirror-symmetry
• Rotate2-symmetry
• Rotate4-symmetry

24
Getting hands on MEEP

SiO2

25
Working in MEEP
• Lattice: defines the size of the computational cell,
when used
• Material-type: basic materials (3 choices)
• Medium
• Perfect-metal
• Material-function
• Geometric-object: basic structures
• Block
• Cylinder
• Sphere / Ellipsoid
• Cone
26
Tutorial examples

• Index-guided waveguide
• Index-guided bent waveguide

27
MEEP: Scheme user-interface

28
Example: Index-guided waveguide
• (set! geometry-lattice (make lattice (size 16 8 no-size)))
• (set! geometry (list (make block (center 0 0)
(size infinity 1 infinity) (material (make dielectric
(epsilon 12))))))
• (set! sources (list (make source (src (make continuous-
src (frequency 0.15))) (component Ez) (center -7 0))))
• (set! pml-layers (list (make pml (thickness 1.0))))
• (set! resolution 10)
• (run-until 200 (at-beginning output-epsilon) (at-end
output-efield-z))

29
Example: Index-guided waveguide
• Dielectric function is as expected:

• Ez field propagates nicely along waveguide as


expected

30
Selected Step functions

• Output-epsilon
• Output-efield-z
• Output-tot-pwr
• (output-png component, h5topng-options)

31
Example: Index-guided Bend
• (set! geometry-lattice (make lattice (size 16 16 no-size)))
• (set! geometry (list
(make block (center -2 -3.5) (size 12 1 infinity)
(material (make dielectric (epsilon 12))))
(make block (center 3.5 2) (size 1 12 infinity)
(material (make dielectric (epsilon 12))))))
• (set! resolution 10)

32
Index-Guided Bend
• (set! pml-layers (list (make pml (thickness 1.0))))
• (set! sources (list (make source (src (make
continuous-src (wavelength (* 2 (sqrt 12)))
(width 20))) (component Ez) (center -7 -3.5) (size 0
1))))
• (run-until 200 (at-beginning output-epsilon) (to-
appended "ez" (at-every 0.6 output-efield-z)))

33
Example: Index-Guided Bend
• Can create movie from this

34
Run functions
• Run-until
• Run-sources
• Run-sources+
• Stop-when-fields-decayed
• (run-k-point T k)

35
Example: Index-Guided Bend
• (define-param no-bend? false)
• (set! geometry (if no-bend?
(list (make block (center 0 wvg-ycen)
(size infinity w infinity)
(material (make dielectric (epsilon 12)))))
• (list (make block (center (* -0.5 pad) wvg-ycen)
(size (- sx pad) w infinity)
(material (make dielectric (epsilon 12))))
(make block (center wvg-xcen (* 0.5 pad))
(size w (- sy pad) infinity)
(material (make dielectric (epsilon 12)))))))

36
Example: Index-Guided Bend
• (define-param nfreq 100)
• (define trans ; transmitted flux
(add-flux fcen df nfreq
• (if no-bend?
(make flux-region
(center (- (/ sx 2) 1.5) wvg-ycen) (size 0 (* w 2)))
• (make flux-region
(center wvg-xcen (- (/ sy 2) 1.5)) (size (* w 2) 0)))))
• (define refl ; reflected flux
(add-flux fcen df nfreq
(make flux-region
(center (+ (* -0.5 sx) 1.5) wvg-ycen) (size 0 (* w 2)))))

37
Example: Index-Guided Bend
• Transmission, reflection, and loss spectrum for the
bend

38
Suggested reference

• MEEP tutorial:
http://jdj.mit.edu/wiki/index.php/Meep_Tuto
rial

39

You might also like