Documente Academic
Documente Profesional
Documente Cultură
Reference Guide
Release 6.5
Contents
Table of Contents
Part I New Features
10
1 New features
............................................................................................................
for version 6.5
10
Structure
.................................................................................................................................................
groups
Analysis
.................................................................................................................................................
(monitor) groups
Object
.................................................................................................................................................
tree browser
Built
.................................................................................................................................................
in script file editor
Script
.................................................................................................................................................
syntax highlighting
Copy
.................................................................................................................................................
and Paste
Dipole
.................................................................................................................................................
radiated power calculation
New
.................................................................................................................................................
MODE source script commands
New
.................................................................................................................................................
script functions
Online
.................................................................................................................................................
Help search bar
Simplified
.................................................................................................................................................
installation
Improved
.................................................................................................................................................
material fits
10
10
10
10
11
11
11
11
11
11
12
12
2 New features
............................................................................................................
for version 6.0
12
Multi
.................................................................................................................................................
coefficient material model
Auto
.................................................................................................................................................
fitting of experimental data
Improved
.................................................................................................................................................
material database GUI
Expanded
.................................................................................................................................................
list of material data
Spectral
.................................................................................................................................................
averaging
More
.................................................................................................................................................
far field analysis
GUI.................................................................................................................................................
upgrade
User
.................................................................................................................................................
defined source signals
Shorter
.................................................................................................................................................
source pulses
Unicode
.................................................................................................................................................
characters
12
12
12
13
13
13
13
13
14
14
3 New features
............................................................................................................
for version 5.1
14
GDSII
.................................................................................................................................................
import
Improved
.................................................................................................................................................
figure windows
n and
.................................................................................................................................................
k import
Set.................................................................................................................................................
view and orbit
Surface
.................................................................................................................................................
imports
Windows
.................................................................................................................................................
Vista support
14
14
14
14
15
15
4 New features
............................................................................................................
for version 5.0
15
Graded
.................................................................................................................................................
mesh
Polygon
.................................................................................................................................................
and triangle primitives
Quadrics
.................................................................................................................................................
and Infinipath interconnects
Native
.................................................................................................................................................
support for the Windows x64 platform
Easier
.................................................................................................................................................
installation of parallel FDTD Solutions
Meshing
.................................................................................................................................................
improvements
Faster
.................................................................................................................................................
drawing modes for all primitives
Simulation
.................................................................................................................................................
auto shutoff
Improved
.................................................................................................................................................
movie monitors
15
15
15
15
15
16
16
16
16
17
Reference Guide
20
Source amplitudes
............................................................................................................ 21
Frequency domain
............................................................................................................
normalization
22
Spectral averaging
............................................................................................................ 24
Calculating ............................................................................................................
and normalizing power in the frequency domain
30
Integrating over
............................................................................................................
lines, surfaces and volumes
31
33
1 Structures tab
............................................................................................................ 34
Geometry
.................................................................................................................................................
tab
Material
.................................................................................................................................................
tab
Rotations
.................................................................................................................................................
tab
Graphical
.................................................................................................................................................
Rendering tab
Custom
.................................................................................................................................................
tab
Import
.................................................................................................................................................
Data tab
Surface
.................................................................................................................................................
tab
Properties
.................................................................................................................................................
tab
Script
.................................................................................................................................................
tab
36
36
37
37
37
38
41
42
43
2 Simulation tab
............................................................................................................ 43
General
.................................................................................................................................................
tab
Geometry
.................................................................................................................................................
tab
Mesh
.................................................................................................................................................
settings tab
Boundary
.................................................................................................................................................
conditions tab
Advanced
.................................................................................................................................................
options tab
44
44
44
45
48
3 Sources tab............................................................................................................ 49
General
.................................................................................................................................................
tab
Geometry
.................................................................................................................................................
tab
Frequency/Wavelength
.................................................................................................................................................
tab
Beam
.................................................................................................................................................
options tab
Advanced
.................................................................................................................................................
tab
52
53
54
55
57
4 Monitors tab............................................................................................................ 58
Frequency
.................................................................................................................................................
Power/Profile tab
Frequency
.................................................................................................................................................
Power/Profile Advanced tab
General
.................................................................................................................................................
tab
Data
.................................................................................................................................................
to record tab
Geometry
.................................................................................................................................................
tab
Spectral
.................................................................................................................................................
averaging and apodization tab
Advanced
.................................................................................................................................................
tab
Setup
.................................................................................................................................................
tab
Analysis
.................................................................................................................................................
tab
60
60
61
62
62
62
63
64
64
5 Equation interpreter
............................................................................................................ 65
67
1 Mode analysis
............................................................................................................ 67
Plot
.................................................................................................................................................
and analysis options
68
Contents
Plot
.................................................................................................................................................
area
70
2 Advanced options
............................................................................................................ 71
72
1 Material database
............................................................................................................ 72
Models
.................................................................................................................................................
Mesh
.................................................................................................................................................
order
Anisotropic
.................................................................................................................................................
materials
74
77
77
2 Material Explorer
............................................................................................................ 78
81
1 Layout editor
............................................................................................................
tabs and Objects tree
82
2 Main title bar
............................................................................................................ 83
GDSII
.................................................................................................................................................
Import
Modifying
.................................................................................................................................................
your default settings
3 Toolbars
84
86
............................................................................................................ 87
Edit
.................................................................................................................................................
Mouse
.................................................................................................................................................
mode
View
.................................................................................................................................................
Simulation
.................................................................................................................................................
88
89
90
91
96
1 Running a simulation
............................................................................................................
from the command line
97
98
1 Analysis tools
............................................................................................................
and the simulation environment
98
2 The analysis............................................................................................................
window
99
Monitor
.................................................................................................................................................
properties tab
Far
.................................................................................................................................................
field settings tab
100
100
3 Analysis groups
............................................................................................................ 101
4 Figure windows
............................................................................................................
for plots and images
103
5 Data export
............................................................................................................ 104
106
1 System level
............................................................................................................ 107
del
.................................................................................................................................................
rm.................................................................................................................................................
dir.................................................................................................................................................
ls.................................................................................................................................................
cd.................................................................................................................................................
pwd
.................................................................................................................................................
cp.................................................................................................................................................
2003 - 2009 Lumerical Solutions, Inc
109
109
109
110
110
110
110
Reference Guide
mv
.................................................................................................................................................
exit
.................................................................................................................................................
system
.................................................................................................................................................
fileexists
.................................................................................................................................................
currentfilename
.................................................................................................................................................
filebasename
.................................................................................................................................................
fileextension
.................................................................................................................................................
filedirectory
.................................................................................................................................................
Run
.................................................................................................................................................
script
getpath
.................................................................................................................................................
addpath
.................................................................................................................................................
which
.................................................................................................................................................
pause
.................................................................................................................................................
break
.................................................................................................................................................
Excape
.................................................................................................................................................
key
File
.................................................................................................................................................
IO background
format
.................................................................................................................................................
loaddata
.................................................................................................................................................
savedata
.................................................................................................................................................
savedcard
.................................................................................................................................................
readdata
.................................................................................................................................................
write
.................................................................................................................................................
asapexport
.................................................................................................................................................
asapload
.................................................................................................................................................
asapimport
.................................................................................................................................................
gdsimport
.................................................................................................................................................
matlabsave
.................................................................................................................................................
lum2mat
.................................................................................................................................................
lum2mat
.................................................................................................................................................
command line
matlab
.................................................................................................................................................
matlabget
.................................................................................................................................................
matlabput
.................................................................................................................................................
111
111
111
112
112
112
113
113
113
113
114
114
114
115
115
115
116
116
116
117
117
117
118
118
119
119
120
121
122
122
123
124
2 Manipulating
............................................................................................................
variables
124
= .................................................................................................................................................
: .................................................................................................................................................
[] .................................................................................................................................................
%.................................................................................................................................................
linspace
.................................................................................................................................................
matrix
.................................................................................................................................................
randmatrix
.................................................................................................................................................
meshgridx
.................................................................................................................................................
meshgridy
.................................................................................................................................................
meshgrid3dx
.................................................................................................................................................
meshgrid3dy
.................................................................................................................................................
meshgrid3dz
.................................................................................................................................................
clear
.................................................................................................................................................
workspace
.................................................................................................................................................
Accessing
.................................................................................................................................................
and assigning matrix elements
Matrix
.................................................................................................................................................
operators
Pre-defined
.................................................................................................................................................
constants
125
125
125
126
126
126
127
127
127
127
128
128
128
129
129
130
130
Contents
132
132
132
132
133
133
133
134
134
134
135
135
135
135
136
136
136
137
137
137
138
139
139
139
141
142
142
142
143
143
143
143
144
144
144
144
145
145
145
145
146
146
146
146
147
147
147
148
Reference Guide
spline
.................................................................................................................................................
integrate
.................................................................................................................................................
find
.................................................................................................................................................
findpeaks
.................................................................................................................................................
transpose
.................................................................................................................................................
ctranspose
.................................................................................................................................................
fft.................................................................................................................................................
fftw
.................................................................................................................................................
fftk
.................................................................................................................................................
invfft
.................................................................................................................................................
czt
.................................................................................................................................................
round
.................................................................................................................................................
rand
.................................................................................................................................................
randreset
.................................................................................................................................................
148
148
149
149
150
150
150
152
153
154
155
155
156
156
157
157
6 Plotting commands
............................................................................................................ 158
plot
.................................................................................................................................................
legend
.................................................................................................................................................
image
.................................................................................................................................................
setplot
.................................................................................................................................................
selectfigure
.................................................................................................................................................
exportfigure
.................................................................................................................................................
closeall
.................................................................................................................................................
158
159
159
160
160
160
161
7 Manipulating
............................................................................................................
objects
161
deleteall
.................................................................................................................................................
delete
.................................................................................................................................................
selectall
.................................................................................................................................................
unselectall
.................................................................................................................................................
select
.................................................................................................................................................
selectpartial
.................................................................................................................................................
shiftselect
.................................................................................................................................................
shiftselectpartial
.................................................................................................................................................
move
.................................................................................................................................................
copy
.................................................................................................................................................
addtogroup
.................................................................................................................................................
adduserprop
.................................................................................................................................................
set
.................................................................................................................................................
setnamed
.................................................................................................................................................
setglobal
.................................................................................................................................................
get
.................................................................................................................................................
getnumber
.................................................................................................................................................
getnamed
.................................................................................................................................................
getnamednumber
.................................................................................................................................................
getglobal
.................................................................................................................................................
haveproperty
.................................................................................................................................................
importsurface
.................................................................................................................................................
importsurface2
.................................................................................................................................................
importnk
.................................................................................................................................................
163
163
164
164
164
164
165
165
166
166
166
167
167
168
168
169
170
170
171
171
171
172
173
174
Contents
importnk2
.................................................................................................................................................
redraw
.................................................................................................................................................
redrawoff
.................................................................................................................................................
redrawon
.................................................................................................................................................
redrawmode
.................................................................................................................................................
setview
.................................................................................................................................................
getview
.................................................................................................................................................
orbit
.................................................................................................................................................
undo
.................................................................................................................................................
redo
.................................................................................................................................................
7
175
176
176
176
176
177
178
178
179
179
8 Measurement
............................................................................................................
data
179
showdata
.................................................................................................................................................
havedata
.................................................................................................................................................
copydcard
.................................................................................................................................................
cleardcard
.................................................................................................................................................
getdata
.................................................................................................................................................
getelectric
.................................................................................................................................................
getmagnetic
.................................................................................................................................................
Read
.................................................................................................................................................
and write data to files
180
180
181
181
181
182
182
182
9 Material database
............................................................................................................ 183
addmaterial
.................................................................................................................................................
copymaterial
.................................................................................................................................................
setmaterial
.................................................................................................................................................
getmaterial
.................................................................................................................................................
getindex
.................................................................................................................................................
getfdtdindex
.................................................................................................................................................
183
183
184
184
185
185
10 User defined
............................................................................................................
GUIs
186
message
.................................................................................................................................................
newwizard
.................................................................................................................................................
newwizardpage
.................................................................................................................................................
wizardwidget
.................................................................................................................................................
runwizard
.................................................................................................................................................
wizardgetdata
.................................................................................................................................................
killwizard
.................................................................................................................................................
wizardoption
.................................................................................................................................................
fileopendialog
.................................................................................................................................................
filesavedialog
.................................................................................................................................................
186
187
187
187
188
188
188
189
189
190
11 FDTD Solutions
............................................................................................................
toolbox
190
new2d
.................................................................................................................................................
new3d
.................................................................................................................................................
load
.................................................................................................................................................
save
.................................................................................................................................................
run
.................................................................................................................................................
runparallel
.................................................................................................................................................
setparallel
.................................................................................................................................................
runanalysis
.................................................................................................................................................
structures
.................................................................................................................................................
simulation
.................................................................................................................................................
sources
.................................................................................................................................................
194
195
195
196
196
197
197
198
198
198
199
Reference Guide
monitors
.................................................................................................................................................
switchtolayout
.................................................................................................................................................
layoutmode
.................................................................................................................................................
addcircle
.................................................................................................................................................
addcustom
.................................................................................................................................................
addimport
.................................................................................................................................................
addpyramid
.................................................................................................................................................
addpoly
.................................................................................................................................................
addrect
.................................................................................................................................................
addring
.................................................................................................................................................
addsphere
.................................................................................................................................................
addsurface
.................................................................................................................................................
addstructuregroup
.................................................................................................................................................
addfdtd
.................................................................................................................................................
addmesh
.................................................................................................................................................
adddipole
.................................................................................................................................................
addgaussian
.................................................................................................................................................
addplane
.................................................................................................................................................
addmode
.................................................................................................................................................
addtfsf
.................................................................................................................................................
addimportedsource
.................................................................................................................................................
addindex
.................................................................................................................................................
addtime
.................................................................................................................................................
addmovie
.................................................................................................................................................
addprofile
.................................................................................................................................................
addpower
.................................................................................................................................................
addanalysisgroup
.................................................................................................................................................
setsourcesignal
.................................................................................................................................................
updatesourcemode
.................................................................................................................................................
clearsourcedata
.................................................................................................................................................
getsourceangle
.................................................................................................................................................
nonorm
.................................................................................................................................................
cwnorm
.................................................................................................................................................
sourcenorm
.................................................................................................................................................
sourcenorm2_avg
.................................................................................................................................................
sourcenorm2_pavg
.................................................................................................................................................
dipolepower
.................................................................................................................................................
sourcepower
.................................................................................................................................................
sourcepower_avg
.................................................................................................................................................
sourcepower_pavg
.................................................................................................................................................
sourceintensity
.................................................................................................................................................
sourceintensity_avg
.................................................................................................................................................
sourceintensity_pavg
.................................................................................................................................................
transmission
.................................................................................................................................................
transmission_avg
.................................................................................................................................................
transmission_pavg
.................................................................................................................................................
Near
.................................................................................................................................................
to far field projections
farfieldfilter
.................................................................................................................................................
farfield2d
.................................................................................................................................................
farfieldvector2d
.................................................................................................................................................
farfieldpolar2d
.................................................................................................................................................
199
199
199
200
200
200
201
201
201
201
202
202
202
203
203
203
203
204
204
204
205
205
205
205
206
206
206
207
207
207
208
208
208
209
209
210
211
211
212
213
214
215
215
216
217
217
218
221
222
223
223
Contents
farfieldangle
.................................................................................................................................................
farfield2dintegrate
.................................................................................................................................................
farfield3d
.................................................................................................................................................
farfieldvector3d
.................................................................................................................................................
farfieldpolar3d
.................................................................................................................................................
farfieldux
.................................................................................................................................................
farfielduy
.................................................................................................................................................
farfieldspherical
.................................................................................................................................................
farfield3dintegrate
.................................................................................................................................................
farfieldexact2d
.................................................................................................................................................
farfieldexact3d
.................................................................................................................................................
farfieldexact
.................................................................................................................................................
Grating
.................................................................................................................................................
calculations
grating
.................................................................................................................................................
gratingn
.................................................................................................................................................
gratingm
.................................................................................................................................................
gratingpolar
.................................................................................................................................................
gratingvector
.................................................................................................................................................
gratingperiod1
.................................................................................................................................................
gratingperiod2
.................................................................................................................................................
gratingbloch1
.................................................................................................................................................
gratingu1
.................................................................................................................................................
gratingu2
.................................................................................................................................................
gratingangle
.................................................................................................................................................
gratingbloch2
.................................................................................................................................................
224
224
225
226
226
227
227
227
228
229
230
231
232
233
233
234
234
235
236
236
236
236
237
237
237
12 Creating your
............................................................................................................
own script commands
238
Part XI Appendix
240
1 Software acknowledgement
............................................................................................................ 240
Index
241
10
Reference Guide
New Features
FDTD Solutions is constantly being upgraded. See the following sections for a list of the
latest new features.
1.1
New Features
11
12
Reference Guide
1.2
New Features
13
14
Reference Guide
command setsourcesignal
207
1.3
New Features
15
1.4
16
Reference Guide
17
1 Dennis M. Sullivan, Electromagnetic simulation using the FDTD method. New York:
IEEE Press Series, (2000).
2 Allen Taflove, Computational Electromagnetics: The Finite-Difference Time-Domain
Method. Boston: Artech House, (2005).
2.1
where H, E, and D are the magnetic, electric, and displacement fields, respectively, while
is the complex relative dielectric constant (
index).
In three dimensions, Maxwell equations have six electromagnetic field components: Ex, E
y, Ez and Hx, Hy, and Hz. If we assume that the structure is infinite in the z dimension and
that the fields are independent of z, specifically that
then Maxwell's equations split into two independent sets of equations composed of three
18
Reference Guide
vector quantities each which can be solved in the x-y plane only. These are termed the
TE (transverse electric), and TM (transverse magnetic) equations. We can solve both
sets of equations with the following components:
TE: Ex, Ey, Hz
TM: Hx, Hy, Ez
For example, in the TM case, Maxwell's equations reduce to:
FDTD Solutions can solve two and three dimensional Maxwell equations in linear and
non-linear dispersive media, where the user can specify arbitrary geometric structures
and various input excitation sources. The two dimensional FDTD simulator solves the TE
and/or TM Maxwell equations.
FDTD is a time domain technique, meaning that the electromagnetic fields are solved as
a function of time. In general, FDTD Solutions is used to calculate the electromagnetic
fields as a function of frequency or wavelength by performing Fourier transforms during
the simulation. This allows it to obtain complex-valued fields and other derived quantities
such as the complex Poynting vector, normalized transmission, and far field projections
as a function of frequency or wavelength. The field information can be returned in two
different normalization states, please see the section on frequency domain normalization
22 for more details.
Dispersive materials with tabulated refractive index (n,k) data as a function of wavelength
can be solved using the multi-coefficient models with auto-fitting. Alternatively, specific
theoretical models such as Plasma (Drude), Debye or Lorentz can be used. See the
chapter on the Material Database 72 for details.
Boundary conditions are very important in electromagnetics and simulation techniques.
FDTD Solutions supports a range of boundary conditions, such as PML, periodic, and
Bloch. See the boundary conditions 45 section here for the complete list.
Sources are another important component of a simulation. FDTD Solutions supports a
number of different types of sources such as point dipoles, beams, plane waves, a
total-field scattered-field (TFSF) source, a guided-mode source for integrated optical
components, and an imported source to interface with external photonic design
19
softwares. Detailed information about each of these sources is contained in the Radiation
sources 49 section.
Unless otherwise specified, all quantities in FDTD Solutions are calculated in SI units.
Please see Units and Normalization 20 for more information.
The online User Guide at www.lumerical.com/fdtd_online_help has many more details
about the physics of FDTD and how to obtain advanced results. Please see, for example,
the sections on coherence, and far field calculations in the online User Guide.
20
Reference Guide
182
Quantity
Description
Norm
state
Units
Unit description
E(t)
N/A
V/m
|E(t)|2
N/A
(V/m)2
H(t)
Magnetic field as a
function
N/A
A/m
|H(t)|2
N/A
(A/m)2
Electric dipole in 3D
N/A
Cm
Coulomb meters
Magnetic dipole in 3D
N/A
Am2
Ampere meters
squared
Electric field in 2D
N/A
Cm/m
Magnetic dipole in 2D
N/A
Am2/m
Ampere meters
squared per meter
f=w/2p
Frequency
N/A
Hz
Hertz
E(w)
|E(w)|2
cwnorm (V/m)2
3.1
21
H(w)
Magnetic field as a
function of angular
frequency
cwnorm A/m
|H(w)|2
cwnorm (A/m)2
P(w)
Poynting vector as a
function of angular
frequency
cwnorm W/m2
Power(w)
Power as a function of
angular frequency
cwnorm W
Watts
Power(w)
2D Power as a function
of angular frequency
cwnorm W/m
E(w)
V/m/Hz
|E(w)|2
nonorm
(V/m/Hz)2
H(w)
Magnetic field as a
function of angular
frequency
nonorm
A/m/Hz
|H(w)|2
nonorm
(A/m/Hz)2
P(w)
Poynting vector as a
function of angular
frequency
nonorm
W/m2/Hz2
Power(w)
Power as a function of
angular frequency
nonorm
W/Hz2
Power(w)
2D Power as a function
of angular frequency
nonorm
W/Hz2/m
Source amplitudes
Dipole sources
Dipole source amplitudes are
Cm for 3D electric dipole sources
Am2 for 3D magnetic dipole sources
Cm/m for 2D electric dipole sources
Am2/m for 2D magnetic dipole sources
22
Reference Guide
Other sources
When specifying the amplitude for non-dipole sources, the "amplitude" refers to the peak
electric field amplitude in units of V/m. For example, if a Gaussian beam has the following
electric field distribution in time and space:
Then the "amplitude" refers to the value of E0 and has units of V/m.
3.2
Definition
Normalization
state
Esim(w)
nonorm
Hsim(w)
nonorm
Psim(w)
nonorm
Eimp(w)
cwnorm
Himp(w)
cwnorm
Pimp(w)
cwnorm
23
N/A
, where sj(t) is the
source time signal of the jth source and N is the number
of active sources in the simulation volume
Ideally, s(t) would be a dirac delta function (in which case s(w) = 1). This would allow us
to obtain the response of the system at all frequencies from a single simulation. For a
variety of reasons, it is more efficient and numerically accurate to excite the system with a
short pulse such that the spectrum, |s(w)|2, has a reasonably large value over all
frequencies of interest.
In the nonorm state, power and profile monitors in FDTD Solutions return the response
of the system to the simulated input pulse s(t):
The simulated electric field as a function of angular frequency, Esim(w), depends on both
the source pulse used, s(t), and the system under study.
In the default cwnorm state, power and profile monitors in FDTD Solutions return the
impulse response of the system.
The impulse response of the system is a much more useful quantity because it is
completely independent of the source pulse used to excite the system.
Example
Consider a beam source injected into free space at z=z0. The source signal is
24
Reference Guide
The electric field at the source injection plane has the following form:
3.3
Spectral averaging
For some simulations, it is useful to calculate the incoherent spectral average of the
electromagnetic fields or the Poynting vector. For example, we might want to calculate
where W(w) is a weighting function and Pimp(w) is the Poynting vector returned in the
cwnorm state, in other words, the impulse response of the system. (Please see
Frequency domain normalization 22 for an explanation of the impulse response.) We
could calculate the Pimp(w) at many different angular frequencies and then perform the
spectral average after the simulation. FDTD Solutions, however, allows for two methods
of more efficient spectral averaging during the simulation which can significantly reduce
the memory requirements and increase the speed of the simulation. These methods are
called "total spectral averaging" and "partial spectral averaging".
The frequency power and frequency profile monitors can record spectral averages of
various quantities during the simulation. Like the other quantities calculated by these
monitors, these can be returned in the Continuous Wave Normalization state (cwnorm),
or the No Normalization state (nonorm). For most applications, the default cwnorm state
is the best choice. In the tables below, we use the subscripts sim and imp to refer to the
quantities returned in the nonorm and cwnorm states respectively. Please refer to
Frequency domain normalization 22 for more details on the two normalization states, and
obtaining the impulse response of the system.
Total spectral averaging
FDTD Solutions supports a spectral average that uses the source input spectrum as the
weighting function. Total spectral averaging can be useful when the source spectrum of
the simulation matches the actual illumination conditions. The following table gives the
precise definitions of the quantities available using total spectral averaging.
Definition
25
Normalization
state
<|Esim|2>total
nonorm
<|Hsim|2>total
nonorm
<Psim>total
nonorm
<|Eimp|2>total
cwnorm
<|Himp|2>total
cwnorm
<Pimp>total
cwnorm
s(w)
N/A
, where sj(t) is the
source time signal of the source and N is the
number of active sources in the simulation volume
jth
Total spectral averaging can be turned on by selecting total spectral average as shown in
the screenshot below.
26
Reference Guide
Data name
<|Exsim|2>total
E2x_avg
nonorm;
E2x = getdata("monitor1","E2x_avg");
<|Eysim|2>total
E2y_avg
nonorm;
E2y = getdata("monitor1","E2y_avg");
<|Ezsim|2>total
E2z_avg
nonorm;
E2z = getdata("monitor1","E2z_avg");
<|Hxsim|2>total
H2x_avg
nonorm;
H2x = getdata("monitor1","H2x_avg");
<|Hysim)|2>total
H2y_avg
nonorm;
H2y = getdata("monitor1","H2y_avg");
<|Hzsim)|2>total
H2z_avg
nonorm;
H2z = getdata("monitor1","H2z_avg");
<Pxsim>total
Px_avg
nonorm;
Px = getdata("monitor1","Px_avg");
<Pysim>total
Py_avg
nonorm;
Py = getdata("monitor1","Py_avg");
<Pzsim>total
Pz_avg
nonorm;
Pz = getdata("monitor1","Pz_avg");
<|Eximp|2>total
E2x_avg
cwnorm;
E2x = getdata("monitor1","E2x_avg");
E2y_avg
cwnorm;
E2y = getdata("monitor1","E2y_avg");
<|Ezimp|2>total
E2z_avg
cwnorm;
E2z = getdata("monitor1","E2z_avg");
<|Hximp|2>total
H2x_avg
cwnorm;
H2x = getdata("monitor1","H2x_avg");
<|Hyimp|2>total
H2y_avg
cwnorm;
H2y = getdata("monitor1","H2y_avg");
<|Hzimp|2>total
H2z_avg
cwnorm;
H2z = getdata("monitor1","H2z_avg");
<Pximp>total
Px_avg
cwnorm;
Px = getdata("monitor1","Px_avg");
<Pyimp>total
Py_avg
cwnorm;
Py = getdata("monitor1","Py_avg");
<Pzimp>total
Pz_avg
cwnorm;
Pz = getdata("monitor1","Pz_avg");
27
Definition
<|Esim(w)|2>
Normaliza
tion state
nonorm
partial
<|Hsim(w)|2>
nonorm
partial
<Psim(w)>partial
nonorm
28
Reference Guide
<|Eimp(w)|2>
cwnorm
partial
<|Himp(w)|2>
cwnorm
partial
<Pimp(w)>partial
cwnorm
|h(w,w')|2
N/A
s(w)
N/A
, where sj(t) is the
source time signal of the source and N is the number of
active sources in the simulation volume
jth
Partial spectral averaging can be turned on by selecting partial spectral average as shown
in the screenshot below.
29
Please note that when considered as a function of angular frequency, the FWHM of
|h(w,w')|2 is 2pd rad/seconds.
To see the data available in a monitor, use the script command
?showdata 180 ("monitorname");
All data can be obtained in scripting, with commands such as getdata 181 and
transmission_pavg 217 . The available components for total spectral averaging are shown
in the following table.
Quantity
Data name
<|Exsim(w)|2>
E2x_pavg
nonorm;
E2x = getdata("monitor1","E2x_pavg");
E2y_pavg
nonorm;
E2y = getdata("monitor1","E2y_pavg");
E2z_pavg
nonorm;
E2z = getdata("monitor1","E2z_pavg");
H2x_pavg
nonorm;
H2x = getdata("monitor1","H2x_pavg");
H2y_pavg
nonorm;
H2y = getdata("monitor1","H2y_pavg");
H2z_pavg
nonorm;
H2z = getdata("monitor1","H2z_pavg");
<Pxsim(w)>partial
Px_pavg
nonorm;
Px = getdata("monitor1","Px_pavg");
<Pysim(w)>partial
Py_pavg
nonorm;
Py = getdata("monitor1","Py_pavg");
<Pzsim(w)>partial
Pz_pavg
nonorm;
Pz = getdata("monitor1","Pz_pavg");
partial
<|Eysim(w)|2>
partial
<|Ezsim(w)|2>
partial
<|Hxsim(w)|2>
partial
<|Hysim(w)|2>
partial
<|Hzsim(w)|2>
partial
30
Reference Guide
<|Eximp(w)|2>
E2x_pavg
cwnorm;
E2x = getdata("monitor1","E2x_pavg");
E2y_pavg
cwnorm;
E2y = getdata("monitor1","E2y_pavg");
E2z_pavg
cwnorm;
E2z = getdata("monitor1","E2z_pavg");
H2x_pavg
cwnorm;
H2x = getdata("monitor1","H2x_pavg");
H2y_pavg
cwnorm;
H2y = getdata("monitor1","H2y_pavg");
H2z_pavg
cwnorm;
H2z = getdata("monitor1","H2z_pavg");
<Pximp(w)>partial
Px_pavg
cwnorm;
Px = getdata("monitor1","Px_pavg");
<Pyimp(w)>partial
Py_pavg
cwnorm;
Py = getdata("monitor1","Py_pavg");
<Pzimp(w)>partial
Pz_pavg
cwnorm;
Pz = getdata("monitor1","Pz_pavg");
partial
<|Eyimp(w)|2>
partial
<|Ezimp(w)|2>
partial
<|Hximp(w)|2>
partial
<|Hyimp(w)|2>
partial
<|Hzimp(w)|2>
partial
3.4
Note that the propagating power is proportional to the real part of the Poynting vector
only, which is related to the conservation of energy for the time-averaged quantities. The
factor of 1/2 is related to the time averaging of the CW fields. The imaginary part of the
Poynting vector relates to the non-propagating reactive or stored energy, such as one
might find in the evanescent tail of light being reflected by total internal reflection (TIR).
Please see J. D. Jackson, "Classical Electrodynamics, Second Edition", John Wiley &
Sons, 1975 for further details.
As an example, if one simulates a y-propagating source such as a Gaussian bream
31
FDTD Solutions provide many GUI and scripting functions to make transmission
calculations easily at the press of a button or using a single command. The transmission
script command will perform this particular calculation.
3.5
A typical calculation with this monitor might be to integrate the total power flow across the
surface of the monitor, or
32
Reference Guide
to integrate over y (ie dimension 2) and then x (ie dimension 1)
power = 0.5*integrate(real(Pz),1:2,x,y);
power will be a matrix of dimension 10x1.
Simulation objects
33
Simulation objects
There are four types of simulation objects:
Physical structures
Structure objects are used to model the physical structure
of the device.
Simulation objects
The simulation region defines simulation parameters like
boundary conditions and mesh size.
Radiation sources
Radiation sources create the incident radiation
Measurement monitors
Monitors, located on the fourth tab, are used to collect data
from the simulation.
The CAD environment for FDTD solutions contains four main tabs: one for each group of
simulation objects. A simulation object can be added from by selecting the tab of the
group to which it belongs, and then clicking on the button for that simulation object. The
buttons for the simulation objects are located along the top of the tab. For example, in the
screen shot below, the monitor group tab is selected. Clicking on the
add a time monitor object.
button would
Once the object is selected (refer to the Getting Started section for more information),
pressing the EDIT
button will bring up a window where it is possible to modify the
properties of the simulation object. The corresponding window for the time monitor is
shown below.
34
Reference Guide
The fields for numeric parameters can be used as a simple calculator. For instance, if
you wish to set a value to the square root of 3 divided by e, just enter sqrt(3)/exp(1) into
the field. For more information, see the Equation interpreter 65 section.
Notes:
Structure objects support Multi-object editing. If you select multiple objects then click
EDIT, you can edit all properties that are common to all selected objects.
Monitors and sources have global properties. For example, the global source frequency
range will apply to all sources. The global properties can be edited with the GLOBAL
PROPERTIES
button. See the first figure above.
Structures and monitors can be organized in groups. Groups are created using the
GROUP
The purpose of this section of the Reference Guide is to describe all of the available
simulation objects and groups, and their properties. This section is organized as follows.
There are five subsections. The first four subsections correspond to the four types of
object groups. Each of these sections begins with a brief overview of the simulation
objects that are available. Then, the properties of the simulation objects are described.
The properties are organized according to the tab that they are located in when the EDIT
button is pressed. The last of the five subsections describes the syntax for the equation
interpreter.
4.1
Structures tab
The layout tab includes options to add the following physical structures:
Triangle
Triangular objects denote physical objects that appear triangular from above. For 2D
simulations, these objects represent triangles while in 3D these objects are extruded in
the z direction to a specific height. They are actually polygon objects, with the number of
vertices set to 3.
Rectangle
Rectangular regions denote physical objects that appear rectangular from above. For 2D
simulations, these objects represent rectangles while in 3D these objects are cubes of
specific height.
Polygon
Polygons allow the user to define a custom object with a variable number of vertices. The
location of each vertex can be independently positioned within a plane, and the vertices
Simulation objects
35
are connected with straight lines. For 3D simulations, the object is extruded in the z
dimension.
Circle
Circles denote physical objects which appear circular or ellipsoid from above. They are
either circles/ellipses in 2D, or circular/ellipsoid cylinders in 3D.
Ring
Ring regions represent physical objects that consist of full or partial rings when viewed
from above. Rings in 3D simulations are extruded in the z direction to a specific height.
Custom Primitives
Custom primitives can be used to create customized surfaces, specified via parametric
equations. The resulting surfaces can either exist on one or more faces of the object, or
can be used to define a cylindrically-symmetric surface of revolution.
Import Objects
Import primitives can be used to import material data from external data files. There are
three types of data that can be imported using links in the Import Data tab 38 :
SURFACES, for example from an atomic force microscope (AFM). In two dimensional
simulations, the data must be defined as y = f(x). In three dimensional simulations, it
must be defined as z = f(x,y). Both upper and lower surfaces can be imported.
IMAGES in JPG or PNG format, for example from an scanning electron microscope
(SEM). In three dimensions, the imported data is extruded along the z axis.
The REFRACTIVE INDEX (N AND K) as a function of space, for example, to represent
doped material where the doping concentrations and optical loss are calculated in
another software package. In two dimensions, the data is defined as n(x,y), k(x,y) and
in three dimensions as n(x,y,z), k(x,y,z). Please note that the value of k is translated
into a conductive (or plasma) model and is only valid at a the center frequency of the
simulation. It should therefore only be used with single frequency simulations.
Surface
Surface primitives can be used to define complex material volumes that exist above or
below analytically defined surfaces. In 3D simulations, a surface (S) is defined as a
function of variables u and v, i.e. S = S(u,v). The variables (u,v) can represent (x,y), (x,z)
or (y,z) depending on the surface orientation. Similarly, in 2D simulations, a surface is
defined as a function of u (S = S(u)) where u can represent x or y.
36
Reference Guide
Sphere
In 3D simulations, users can define spherical regions of constant refractive index through
the spherical physical object. Spherical objects only exist in 3D simulations.
Pyramid
Pyramids can be configured to half flat tops and/or flat bottoms, and either narrow or
expand in the vertical z direction. Pyramids are only available for 3D simulations.
Structure Group
Structure groups are used to organize, edit and set up composite systems of objects.
Structure groups contain variables and scripts that can be utilized to edit and set up parts
of the structure. See the Properties tab 42 and Script tab 43 sections for more
information. It is possible to create groups of groups.
Simulation objects
37
38
Reference Guide
edge of the physical object.
EQUATION UNITS: The default units in which x and y are expressed in equation 1 and
2. For example, a setting of microns means that both x and y are expressed in
microns.
CREATE 3D OBJECT BY: Options include "extrusion", and "revolution". Extrusion
results in an object that is extruded along the z-axis (i.e. invariant in z). The revolution
object is created by revolving the equation around the x-axis, resulting in a surface of
revolution.
Equation 1 and 2 are bound such that they are only defined over specific regions.
Equations which result in undefined values (1/0) result in a zero height; any equation left
blank results in a custom primitive of zero height everywhere. Equations that go larger
than the span of the object will be clipped at the edge of the object. Equations that go
negative will be clipped at zero. In the following figure, notice how the equations are
clipped at the edge of the object.
Simulation objects
39
40
Reference Guide
button allows you to reverse the order easily. Typically, it is very easy to see in the
figure window when you have the order incorrect.
PLOT PLANE: You can image the data in either the x-y plane, the x-z plane or the y-z
plane to be sure that it is correctly imported. Use this menu chooser to switch between
planes.
Z (or X or Y): Depending on the PLOT PLANE chosen, you can view cross sections at
any depth into the structure. Use this slider or the value input field to choose the depth
of cross section.
IMAGE N, IMAGE K: Choose to view n or k in the figure window.
For detailed information and example text import files, as well as script files that generate
the example files, see the Import object spatial (n,k) data page in the User Guide section
of the Online help.
Simulation objects
41
The surface equation can contain up to three terms, conic, polynomial and custom which
are added together to create the total surface. Not all terms have to be included.
Conic term:
42
Reference Guide
You can choose any analytic function of u in 2D simulations and (u,v) in 3D
simulations.
The syntax and functions available to specify the index are found in the Equation
interpreter 65 section.
For example, you could use
Simulation objects
43
4.2
Simulation tab
Simulation objects are used to define simulation parameters like boundary conditions and
mesh size.
The simulation region defines most simulation parameters including the size,
boundary conditions, mesh size, and simulation time.
The mesh override region is used to override the default mesh size in some part of
the simulation region. Normally the meshing parameters are set based on the Mesh
accuracy slider in the Simulation region setup. However, if some specific meshing
conditions are required in part of the simulation region, a mesh override region can be
specified. For example, some simulations with metals are very sensitive to meshing, and
a mesh override region may be required at the metal surface.
Note that only one simulation region per simulation is supported, but multiple mesh
override regions may be used.
TIP: Objects which lie outside the simulation region.
Any simulation objects contained or partly contained within the simulation region are
included in the simulation, while any objects which fall completely outside of the
44
Reference Guide
simulation region are not included in the simulation. Those physical structures (and
portions thereof) lying within the simulation region are included in the simulation (i.e. the
simulation is performed on that portion of the physical structure lying within the
simulation region). Physical monitors and sources are treated in a similar fashion, such
that any portion of a monitor or source lying within a simulation region will be used. The
user is warned when at least one source or monitor falls completely outside the
simulation region.
Simulation objects
45
is high accuracy. It is strongly recommended that you start with a low accuracy setting so
your simulation is fast. Once the simulation is setup properly, you should perform some
convergence testing with different mesh sizes to ensure your result is converged.
Custom non-uniform
This setting allows the user to fully customize how the non-uniform mesh is generated. If
setting the mesh cells using wavelength, the default setting of 10 is sufficient in general,
but may be reduced to 6-8 for coarse simulations.
The grading factor determines the maximum rate at which the mesh can be modified. For
example, if dx(i+1) = a*dx(i), then 1/(GRADING FACTOR) <= a <= GRADING FACTOR.
The grading factor should be between 1 and 2. The default setting is sqrt(2).
Uniform
A uniform mesh is applied to the entire simulation volume, regardless of any material
properties.
Time Step Options
DT STABILITY FACTOR: A setting which determines the size of the time step used
during the simulation, defined as a fraction of the Courant numerical stability limit. A
larger number will result in faster simulation times, and a smaller number will result in
slower simulation times. The Courant stability condition requires that this setting must
be less than 1 for the FDTD algorithm to remain numerically stable.
DT: The time step of the FDTD simulation. This is determined by the values of the
spatial grid to ensure numerical stability and cannot be directly set by the user.
PML
Many simulations employ absorbing boundary conditions that allow radiation to propagate
out of the computational area without interfering with the fields inside. Perfectly matched
layer (PML)3 boundaries absorb electromagnetic energy incident upon them. PML is most
effective when absorbing radiation at normal incidence; it can have significant reflection at
grazing incidence. Increasing the PML thickness (number of layers) will reduce
reflections, but increase the simulation time and memory requirements.
Metal
Metal boundary conditions are used to specify boundaries which are perfectly reflecting,
allowing no energy to escape the simulation volume along that boundary.
46
Reference Guide
Periodic
Periodic BC should be used when both the structures and EM fields are periodic. Periodic
boundary conditions can be used in one or more directions (i.e. only in the x direction) to
simulate a structure which is periodic in one direction but not necessarily other directions.
Bloch
Bloch BC should be used when the structures are periodic, and the EM fields periodic,
except for a phase shift between each period. Bloch boundary conditions are used
predominantly for the following two simulations:
Launching a plane wave at an angle to a periodic structure in this situation, accurate
reflection and transmission data can be measured at a single frequency point for a
given simulation.
Calculating the bandstructure of a periodic object in this situation, a broadband pulse
is injected via a dipole source into a periodic structure.
Symmetric
Symmetric boundary conditions are used when the user is interested in a problem that
exhibits one or more planes of symmetry. Both the structure and source must be
symmetric. Symmetric boundaries are mirrors for the electric field, and anti-mirrors for
the magnetic field. A visual explanation of a symmetric boundary condition is shown in the
figure below. Careful consideration must be given to whether symmetric or asymmetric
boundary conditions are required, given the vector symmetry of the desired solution. For
meaningful results, the sources used must have the same symmetry as the boundary
conditions. Further information about symmetric and asymmetric boundary conditions can
be found in the online help in the section user guide - simulation - Choosing between
symmetric and anti-symmetric BCs.
Simulation objects
47
Asymmetric
Asymmetric boundary conditions are used when the user is interested in a problem that
exhibits one or more planes of symmetry. Asymmetric boundaries are anti-mirrors for the
electric field, and mirrors for the magnetic field.
3 J. P. Berenger, J. Comput. Phys. 114, 185 (1994).
Boundary condition tab options
XMIN, XMAX, YMIN, YMAX, ZMIN, ZMAX BOUNDARIES: These fields describe the
boundary conditions to be applied along the perimeter of the simulation region.
Symmetric and asymmetric boundary conditions should be applied to the lower
boundary conditions.
ALLOW SYMMETRY ON ALL BOUNDARIES: By default, symmetric and
anti-symmetric conditions can only be used on the lower boundaries (x min, y min and z
min). This box allows you to also use symmetry and anti-symmetric conditions on the
upper boundaries in order to simulate periodic structures that exhibit symmetry.
SET BASED ON SOURCE ANGLE: Bloch boundary conditions are often used to inject
plane waves on angles into periodic structures. This option will determine the values kx,
ky and kz for you based on the source in your current simulation. Note that if more than
one source is defined, all sources must require consistent Bloch settings. By default,
this box is checked. If you uncheck the box, you should set kx, ky and kz directly.
BLOCH UNITS: Two types of units are allowed for specifying the values of kx, ky and
kz:
o bandstructure: In these units kx,y,z are defined in units of (2p/ax,y,z) where ax,y,z is the
x,y or z span of the FDTD simulation region. These units are very convenient for
bandstructure calculations.
o SI: In SI units, kx,y,z are defined in units of m-1. This is generally more convenient for
injection of plane waves on angles.
48
Reference Guide
KX, KY, KZ: The wavevector setting in the x, y and z direction for the Bloch boundary in
the units specified above.
Simulation objects
4.3
49
Increasing this number will reduce the back-reflection arising from the PML boundaries
but will also increase time and memory requirements for simulations. Defaults to a
setting of 12.
PML POLYNOMIAL: The polynomial power which determines how rapidly the electric
and magnetic conductivity increases as radiation propagates at normal incidence into
the PML. The default setting of 3 denotes a cubic increase of electric and magnetic
conductivity with increasing depth into the PML.
TYPE OF PML: The type of PML used can be STANDARD, STABILIZED or DEFAULT
CHOICE. In some cases, STABILIZED PML provides more numerical stability,
although the performance is slightly reduced.
MAX SOURCE TIME SIGNAL LENGTH: This is the maximum length of data used by
sources to store the time and time_signal properties of sources. If a large number of
sources are used and the simulation time is on the order of 100ps (which is very rare),
advanced users may want to reduce this to save memory. However, since the time
and time_signal properties of sources are important for calculating the sourcepower,
sourcenorm, and the normalization for the transmission functions, care must be taken
with source normalization. In particular, in most cases, nonorm option should be used.
SET DEFAULTS: Can be used to reset the settings back to their original default
settings.
Sources tab
The layout tab includes options to add the following sources:
Point sources
Point sources are oscillating dipoles that act as sources in Maxwell's equation to produce
electromagnetic fields. Their position and direction are specified in terms of the center
position (x, y, and z for 3D simulations) and their orientation through angles phi
(measured in the x-y plane with respect to the x-axis) and theta (measured from the
z-axis). They can be placed at one or more points anywhere in the simulation area.
For two-dimensional simulations, the behavior of point sources depends on whether you
are performing a TE or a TM simulation. For a TE simulation, a magnetic dipole is
oriented in the z-direction, while an electric dipole is oriented in the x-y plane by the
ANGLE argument, which specifies the angle measured with respect to the x-axis. For a
TM simulation, an electric dipole is oriented in the z-direction, while a magnetic dipole is
oriented in the x-y plane with the same ANGLE argument describing the direction of the
dipole vector.
50
Reference Guide
Simulation objects
51
particularly useful to study the scattering behavior of objects, as the scattered field can be
isolated from the incident field.
In 2D, the TFSF source injects along one edge of a rectangle as specified by the user.
The other three boundaries subtract the incident field (allowing for the wave propagation).
Everything inside the TFSF boundary is total field (i.e. incident + scattered field), while
everything outside is only scattered field. In the absence of any objects, the wave
propagates within the TFSF region and is subtracted out at the other end; this of course
results in no scattered field. However, if one places an object in the path of the TFSF
wave, this introduces scattered fields that then propagate outside the total field area.
Consequently, one can then measure the total or scattered transmission, by placing
monitors inside or the total field region, respectively. Currently, only normal incidence
plane waves are supported as the incident field.
TIP: Using TFSF sources
TFSF sources can be used when:
the source can completely surround the scattering objects in a homogeneous
material (including materials with complex index).
the scattering object is on or in a multilayer slab that is illuminated from above.
Certain boundaries of the TFSF can be dragged outside the simulation area
boundaries, for example, when symmetric or anti-symmetric boundary conditions are
used in the simulation. For advanced use of TFSF sources, please consult an
application example or technical support at support@lumerical.com.
Note:
Some care is needed when using the TFSF source. The concept of total/scattered field
is complex and can lead to misinterpretation of results, particularly with regards to
energy conservation.
Mode sources
The mode source is used to inject a guided mode into the simulation region. The extent of
the region defining the mode source (i.e. center location, and span) is that used in the
computation of the guided modes for the structure. In three-dimensional simulations, the
mode source defines a plane across which the guided modes are computed, while in
two-dimensions the mode source defined a line across which the guided modes are
computed. From the computed guided modes, a single mode is selected for injection into
the FDTD simulation region. For additional details on the operation of the mode solver,
consult the integrated mode solver section 67 .
Imported sources
The imported source allows the user to input field profile data as a radiation source within
the three-dimensional FDTD Solutions design environment. Currently, ASAP sources
52
Reference Guide
(produced with Breault Research Organizations ASAP ray-tracing design environment)
can be used as an imported source.
Imported sources are only available in 3D simulations.
Simulation objects
53
54
Reference Guide
At the top of the tab, it is possible to chose to either SET FREQUENCY / WAVELENGTH
or SET TIME-DOMAIN. If you choose to set the frequency or wavelength ranges to define
your sources, then FDTD Solutions tries to find the optimum time domain settings that will
cover the desired frequency/wavelength range without compromising accuracy. If you
choose to directly modify the time domain settings, please keep the following tips in
mind:
Pulse durations: Choose a pulse duration that can accurately span your frequency or
wavelength range of interest. However, keep in mind that very short pulses contain
many frequency components and therefore disperse quickly. As a result, short pulses
require more points per wavelength for accurate simulation.
Pulse offset: This parameter defines the temporal separation between the start of the
simulation and the center of the input pulse. To ensure that the input pulse is not
truncated, the pulse offset should be at least 2 times the pulse duration. This will
ensure that the frequency distribution around the center frequency of the source is
close to symmetrical, and the initial fields are close to zero at the beginning of the
simulation.
Source type: In general, you can choose between standard and broadband source
Simulation objects
55
types. Standard sources consist of a Gaussian pulse at a fixed optical carrier, while the
broadband sources consist of a Gaussian pulse with an optical carrier which varies
across the pulse envelope. Broadband sources can be used to perform simulations in
which wideband frequency data is required for instance, from 200 to 1000 THz. This
type of frequency range cannot be accurately simulated using the standard source
type.
Set frequency wavelength
If the SET FREQUENCY / WAVELENGTH option was chosen, this section makes it
possible to either set the frequency or the wavelength and choose to either set the center
and span or the minimum and maximum frequencies of the source.
Set time domain
The options in the time domain section are:
SOURCE TYPE: This setting is used to specify whether the source is a standard
source or a broadband source. The standard source consists of an optical carrier with a
fixed frequency and a Gaussian envelope. The broadband source, which contains a
much wider spectrum, consists of a chirped optical carrier with a Gaussian envelope.
When the user uses the script function setsourcesignal, this field will be set as "user
input".
FREQUENCY: The center frequency of the optical carrier.
PULSELENGTH: The full-width at half-maximum (FWHM) power temporal duration of
the pulse.
OFFSET: The time at which the source reaches its peak amplitude, measured relative
to the start of the simulation. An offset of N seconds corresponds to a source which
reaches its peak amplitude N seconds after the start of the simulation.
BANDWIDTH: The FWHM frequency width of the time-domain pulse.
Advanced
ELIMINATE DISCONTINUITY: Ensures the function has a continuous derivative
(smooth transitions from/to zero) at the start and end of a user defined source time
signal. By default, this option is enabled.
56
Reference Guide
plot is not automatically updated because the thin lens calculations can be long.
PLOT IN NEW WINDOW: This is the same as SHOW/REFRESH but opens a new
window for the graphics that will persist after you close the property edit window.
Beam options for Gaussian and Cauchy/Lorentizian sources
USE SCALAR APPROXIMATION / USE THIN LENS: These checkboxes allow the user
to choose whether to use the scalar approximation for the electric field or the thin lens
calculation. Gaussian sources can be defined using either the scalar approximation or
thin lens calculation, whereas Cauchy/Lorentzian sources can only be defined using the
scalar approximation.
Scalar approximation
BEAM PARAMETERS: This menu is used to choose to define the scalar beam by the
WAIST SIZE AND POSITION or the BEAM SIZE AND DIVERGENCE ANGLE.
If WAIST SIZE AND POSITION is chosen, the options are:
WAIST RADIUS: 1/e field (1/e2 power) radius of the beam for a Gaussian beam, or a
half-width half-maximum (HWHM) for the Cauchy/Lorentzian beam.
DISTANCE FROM WAIST: The distance, d, as shown in the figure below. A positive
distance corresponds to a diverging beam, and a negative sign corresponds to a
converging beam.
If BEAM SIZE AND DIVERGENCE ANGLE is chosen, the options are:
BEAM RADIUS: 1/e field (1/e2 power) radius of the beam for a Gaussian beam, or a
half-width half-maximum (HWHM) for the Cauchy/Lorentzian beam.
DIVERGENCE ANGLE: Angle of the radiation spread as measured in the far field, as
shown in the figure below. A positive angle corresponds to a diverging beam and a
negative angle corresponds to a converging beam.
Thin Lens
NA: This is nsin(a) where n is the refractive index of the medium in which the source is
found and a is the half angle as shown in the figure below. Please note that the index
will not be correctly defined in dispersive media and lenses should only be used in
non-dispersive media. The refractive index for the source is determined at X, Y (and
Z).
DISTANCE FROM FOCUS: The distance d from focus as shown in the figure below. A
negative distance indicates a converging beam and a positive distance indicates a
diverging beam.
FILL LENS: Checking this box indicates that the lens is illuminated with a plane wave
which is clipped at the lens edge. If FILL LENS is checked, then it is possible to set the
diameter of the thin lens (LENS DIAMETER) and the beam diameter prior to striking
the lens (BEAM DIAMETER), as shown in the figure below. A beam diameter much
larger than the lens diameter is equivalent to a filled lens.
NUMBER OF PLANE WAVES: This is the number of plane waves used to construct
the beam. The beam profile is more accurate as this number increases but the
calculation takes longer. The default value in 2D is 1000.
Simulation objects
57
The figure below shows the beam parameter definitions for the scalar approximation
beam.
The figure below shows the beam parameter definitions for the thin lens, fully-vectorial
beam.
58
Reference Guide
4.4
Monitors tab
The layout tab includes options to add the following monitors:
Index Monitors
Index monitors records the n and k value as a function of frequency/wavelength in a
simulation. Index monitors are only available in two or three dimensions; there is no
option for linear or point index monitors. In the future, the index monitor will be able to
capture the time-evolution of the physical properties profile for nonlinear media.
Time-domain monitors
Time-domain monitors provide time-domain information for field components over the
course of the simulation. Time-domain monitors can consist of point, line, or area
monitors to capture this information over different spatial extents within the FDTD
simulation region. For the purposes of extracting line widths of resonant structures
through Fourier analysis, point time monitors with a down sample time of 1 are sufficient.
TIP: Using time monitors
Check the memory requirements when using 1D, 2D or 3D time monitors, since they
will generate large amounts of data. Consider using the temporal or spatial
downsampling options.
Movie monitors
Movie monitors capture a desired field component over the region spanned by the movie
monitor for the duration of the simulation. Movie monitors are only available in the two
dimensional variety. The resultant movies are saved with the same name as the monitor
in the current working directory.
TIP: CW Movies
It is possible to create a CW movie from profile or power monitor data. For more
information, see the online help at http://www.lumerical.com/fdtd_online_help/ and go to
the User Guide - Data Analysis section.
Note: Movie monitors are ignored when running parallel simulations.
When running a simulation in parallel, all movie monitors will be ignored. Constructing
Simulation objects
59
the movies from multiple processes running on different computers would add extra
communication and computation overhead, as well as be difficult to implement. There
is no workaround, except to run the simulation as a single process. This is generally not
a problem, since movie monitors are most useful for qualitative understanding only,
where a low resolution simulation is sufficient.
60
Reference Guide
Profile monitors: when it is most important to measure the fields at a very specific point
in space.
Power monitors: when it is most important to get the most accurate power
measurements.
TIP: Switching between power monitor and profile monitor
You can switch between frequency-domain power monitors and frequency-domain
profile monitors by changing the SPATIAL INTERPOLATION setting in the Advanced
Options tab. When the SPATIAL INTERPOLATION is set to NEAREST MESH CELL or
NONE, the monitor becomes a frequency-domain power monitor.
Analysis groups
Analysis groups are used to group, setup monitor groups and/or process monitor data.
The group object has a section that can contain code to set up the monitors, as well as a
section that can contain code to process monitor data once a simulation has been run
(this is why they are called analysis groups and not monitor groups). It is possible to
create groups of groups.
Simulation objects
61
the discrete fourier transforms (DFTs), taking into account the desired sampling rate,
the Nyquist limit and the time step, dt.
DOWN SAMPLE TIME: This is the time step downsampling.
62
Reference Guide
unchecked, the frequencies/wavelengths at which to record data can be set using the
pull down menus and boxes below them.
FREQUENCY POINTS: Set to choose the number of frequency points at which to
record data.
Simulation objects
63
Full apodization involves windowing the time-domain data on both the start and end
side. The resulting windowed data is then processed to produce frequency-domain
information.
Start apodization involves windowing the front side of the time-domain data. This can
be useful to exclude the initial source excitation from the frequency-domain data.
End apodization involves windowing the last part of the simulation. This can be useful
for ramping down the time-domain signal in devices where the radiation lives a long
time, like cavities.
64
Reference Guide
sampling per optical cycle.
SAMPLING RATE: This converts the minimum points per optical cycle into an actual
sampling rate in Hz.
DOWN SAMPLE TIME: This is the time step downsampling.
FRAME RATE: The speed at which frames are displayed on the screen, in units of
frames per second. The default is 30.
Index monitors:
SPATIAL INTERPOLATION: There are three options for index monitors. The default
option, SPECIFIED POSITION returns the index that that the field sees at the location
where the monitor is placed. The next two options. NEAREST MESH CELL and NONE
are as described for time-domain monitors. In simulations with mesh refinement turned
on, the default option does not show the averaging of the indices, but the other options
do.
Simulation objects
65
The following buttons and regions are available in the script tab:
ANALYSIS SCRIPT: This is where the script commands are written. To find a list of
script commands, see the Scripting Language 106 section of the Reference Guide.
ANALYSIS SCRIPT OUTPUT: Press the RUN ANALYSIS button to run the script. If
there are no syntax errors in the script the SCRIPT OUTPUT will read <script
complete>. In addition, the analysis script output will contain any results from the "?"
script command.
RUN ANALYSIS: Pressing the run analysis prompt runs the analysis script and saves
the results. This button can only be pressed when the simulation is in analysis mode.
SAVE ANALYSIS: Pressing this button saves changed made to the analysis script
(even when in analysis mode).
For more information and examples, see the Analysis groups page of the User Guide
section of the Online Help.
4.5
Equation interpreter
The fields for numeric parameters can be used as a simple calculator. For instance, if you
wish to set a value to the square root of 3 divided by e, just enter sqrt(3)/exp(1) into the
field. The expression will be automatically evaluated when you press Enter or click on a
different field. Equations which become undefined (i.e. 1/0) should be avoided.
The following two tables provide a list of available operators and constants.
Operator category
Syntax
Algebraic
+, -, *, /
Trigonometric
Inverse trigonometric
Hyperbolic trigonometric
Power
^ or **
Exponential
exp()
log10(), log()
Square root
sqrt()
Absolute
abs()
Mod
mod()
Variable or predefined
constant
Description
Units
66
Reference Guide
c
m/s
pi
The variable p
none
Examples
2^10
sqrt(3)/exp(1)
sin(45*pi/180)
Description
Units
x, y, z
Position variables
as defined by user
Hz
Hz
l0
k0
Examples
sin(x)^2
exp(-x^2-y^2)
f/1e14
67
5.1
49
Mode analysis
The MODE ANALYSIS window is shown in the screenshot below. The upper left-hand
portion of the window contains the MODE PARAMETERS section, where the mode
number, effective index, propagation loss, and polarization (percentage of the mode
polarized TE; not valid for 3D simulations) are shown. The lower left-hand corner shows
the CALCULATION, ANALYSIS AND SELECTION OPTIONS; upon launch, the lower
left-hand portion of the window shows the default calculation parameters to be used to
simulate the structure. The right-hand portion of the window contains the PLOT AREA
where the simulation data is plotted, and the two drop-down boxes at the top of the plot
area are used to specify which data to plot in the plot window, while the region at the
bottom right can be used to modify the current mode plot options. Upon launch, the plot
area shows the refractive index profile of the structure being analyzed.
68
Reference Guide
Mode Parameters
The mode parameters portion of the window displays simulation data relevant to the
different modes calculated for the structure of interest. This portion of the window shows
the modes, arranged from top to bottom in terms of the highest effective index and
numbered sequentially. For each mode, this portion of the window shows the effective
index of the mode, the calculated loss (measured in dB per millimeter of propagation; only
valid for lossy materials), and the TE or TM fraction corresponding to the definition of TE
and TM in 2D FDTD. For 3D simulations, the TE or TM fraction is not displayed.
See the following sections for more information about the analysis and plot sections.
69
70
Reference Guide
bent in the x-z plane. A bend orientation of 90 means that the waveguide is bent in
the y-z plane.
CALCULATE MODE: by clicking this button the mode solver will start the calculation for
the waveguide modes given the criteria above.
Note:
Any desired changes to the boundary conditions must be done by editing the simulation
region via the layout editor.
View current parameters
With the option pull-down box set to VIEW CURRENT PARAMETERS, the lower
left-hand portion of the window displays the current simulation parameters corresponding
to the modes that have been calculated. A portion of the screenshot which shows the
current parameters is shown below. The parameters are the same as for the SET
CURRENT PARAMETERS with the exception of:
CURRENT NUMBER OF MODES: the number of modes that have actually been
calculated
X, Y BOUNDARY MIN, MAX: the boundary conditions used on the x and y boundaries
Select Mode for Injection
With the option pull-down box set to SELECT MODE FOR INJECTION, the lower
left-hand portion of the window contains a button labeled SELECT MODE FOR FDTD
SOURCE. Pressing this button will initialize the mode source with the current mode
selected within the mode table in the upper left-hand portion of the window.
71
pull-down.
Figure window
The plot itself where the data appears is automatically labeled and scaled to fit the
simulation data. As with the layout editor, the plot can be zoomed using the standard
mouse actions. Note, however, that the mouse is automatically in the zoom state when
over the plotted data and therefore the keyboard shortcut Z is not necessary.
Mode plot options
The MODE PLOT OPTIONS can be set in the bottom right of the MODE ANALYSIS
window, the options are
LINEAR/LOG SCALE: determines whether the simulation data is plotted on a linear or
a log plot
SUPERIMPOSE STRUCTURE: toggles whether a black outline showing the physical
structure is superimposed on the simulation data
PLOT: indicates which part of complex-valued simulation data is to be plotted. Available
options include:
o AMPLITUDE
o PHASE
o REAL PART
o IMAGINARY PART
COORDINATES: currently supports only CARTESIAN coordinate system.
5.2
Advanced options
The ADVANCED OPTIONS tab has the following parameters:
MAXIMUM NUMBER OF MODES TO STORE: When searching for modes in a range
of effective indices from n1 to n2, it is possible to fill your available memory if too many
modes are found. For this reason, the maximum number of modes is limited and the
calculation will stop when this number of modes is exceeded.
USE SINGLE PRECISION: this can be used to save some memory during the
calculation of the modes but the results are less accurate.
AUTOMATICALLY REMOVE PML MODES/THRESHOLD FOR PML MODE
REMOVAL: In the future PML boundary conditions will be permitted in the integrated
mode solver. This setting can then be used, as in MODE Solutions, to remove
unphysical PML modes.
CONVERGENCE TOLERANCE: the convergence tolerance used for the calculations.
The default value corresponds to 1e-12 but can be increased by the user to speed
convergence or decreased to improve accuracy.
72
Reference Guide
Material database
This chapter details operation of the Material Database and Material Explorer.
Material Database
The Materials Database allows for the definition of complex materials using experimental
data or parametrized models. It can be accessed by clicking the material database button
on the Structures tab. The Material Database stores the material data to be used in the
simulation. It also provides an interface to change material properties like color, mesh
order, and model parameters. Experimental data can also be loaded into the database.
To view the resulting index profile, use the Material Explorer.
Material Explorer
The Material Explorer is used to check the material fits that will be used in the simulation.
It is most important to check the fits when using the Sampled data material type, but the
Material Explorer can be used to check the fits for any material type. The Material
Explorer can be accessed through the Simulation menu.
6.1
Material database
The Materials Database allows for the definition of complex materials using experimental
data or parametrized models. It can be accessed by clicking the material database button
on the physical object layout editor tab. The Material Database stores the material data to
be used in the simulation. It also provides an interface to change material properties like
color, mesh order, and model parameters. Experimental data can also be loaded into the
database. To view the resulting index profile, use the Go to Material Explorer button on
the bottom left hand corner of the window to open the Material Explorer.
Material database
73
Material list
The material list shows all of the materials that are defined in the database. Many of the
material properties are editable. Double click on the table entry to change its value.
Property
No modification
No delete
Name
Mesh order
Color
Anisotropy
Description
These materials can not be modified. The default materials
included with the installation package can not be modified .
These materials can not be deleted. Materials that are
currently used in a simulation can not be edited.
The material name.
The mesh order. See the mesh order 77 section for more
information.
The color used to draw the objects in the CAD.
The type of anisotropy. See the Anisotropic materials 77
74
Reference Guide
Type
Last modified
Add
Delete
Copy
section.
The type of material model used. See the material models
section for more information.
The last modified date.
74
Material Properties
Material properties related to the model type are shown in the Model properties panel.
See the material models section for more information about these properties.
6.1.1 Models
This section describes the material models supported by the Material Database. Model
parameters can be edited in the Material property panel of the Material Database window.
Sampled data
The Sampled data model is used to import experimental material data. The experimental
data can be imported from a text file with the Import data... button.
The Sampled data material definition uses an automatic fitting routine to generate a multicoefficient material model of the experimental data over the frequency range specified by
the source.The fitting routine can use one of the models described below, or a more
generalized model. The fits can be checked and adjusted in the Material Explorer.
Tolerance - The desired RMS error between the permittivity of the experimental data and
the material fit. The fitting routine will use the least number of coefficients that produce a
fit with an RMS error less than the tolerance.
Max coefficients - The maximum number of coefficients allowed to be used in the
material fit. More coefficients can produce a more accurate fit, but will make the
simulation slower.
The following advanced options can be set in the Material Explorer:
Make Fit Passive - Set to be true to prevent the fit from having gain at any frequency. By
default this is true in order to prevent diverging simulations.
Improve Stability - If this setting is true, the fitting routine restricts the range of coefficients
Material database
75
in the fit in order to reduce numerical instabilities which cause simulations to diverge.
Imaginary Weight - Increasing the weight increases the importance of the imaginary part
of the permittivity when calculating a fit. A weight of 1 gives equal weight to the imaginary
and real parts of the permittivity.
Specify Fit Range - Set to true to decouple the bandwidth used to generate the material fit
and the source bandwidth. This option is used in parameter sweeps where the source
frequency is changed, and where it is important to keep the material parameters constant
over the whole parameter sweep. The fit range should cover the simulation bandwidth.
Bandwidth range - Bandwidth to be used for the fit when Specify Fit Range is true.
Dielectric
The Dielectric model is used to create a material with a constant real index. This material
will have the specified index at all frequencies (non-dispersive).
Refractive index - The refractive index of the material. Must be >= 1.
(n,k) material
The (n,k) material model is used to create a material with a specific value of n and k at a
single frequency.
Refractive index - Real part of the index at the center frequency of the simulation. Must
be > 0.
Imaginary refractive index - Imaginary part of the index at the center frequency of the
simulation. Positive values correspond to loss, negative values will produce gain.
NOTE: Single frequency simulations only!
This type of material model should only be used for single frequency simulations. The
implementation of the (n,k) material model is such that the material properties will only
be correct at the center frequency of the simulation.
Conductive
The Conductive model is used to create a material defined by the following formula.
Plasma
The Plasma model is used to create a material defined by the following formula.
Debye
The Debye model is used to create a material defined by the following formula.
76
Reference Guide
Lorentz
The Lorentz model is used to create a material defined by the following formula.
Sellmeier
The Sellmeier model is used to create a material defined by the following formula. The C
coefficients have dimensions of micrometers squared (mm2).
PEC
A Perfect Electrical Conductor (PEC). There are no parameters for this model.
Kerr nonlinear
In the Kerr nonlinear model, the electric polarization field P will depend on the electric field
E in the following manner.
Solving for the displacement field D gives
The relative permittivity and Chi3 values must be specified by the user.
Material database
77
Importing arbitrary dispersive models" section of the FDTD Online Help (User Guide Structure and Materials)
78
Reference Guide
FDTD Solutions currently allows for a diagonal permittivity tensor of the following form
To define an anisotropic material, set the Anisotropy field in the Material database to
Diagonal. The Material property editor will then have a property field for each direction.
When using the Material Explorer, you can select the component (x,y,z) of the permittivity
or index to plot.
Note:
When you rotate a geometric primitive, the permittivity tensor is not rotated.
6.2
Material Explorer
The Material Explorer is used to check the material fits that will be used in the simulation.
This is most important when using the Sampled data material type, although it can be
used to check material properties for all material types.
If the fit for a Sampled data material is not good enough, the Tolerance and Max
coefficient properties and the wavelength range of the source can be edited in the
Material Explorer.
Material database
Plot windows
The two figure windows at the top of the Material Explorer window show the real and
imaginary parts of the material index.
Description
Select the material to check.
If the material is anisotropic, select the axis to check.
The Tolerance setting of the material. Only applies to
Sampled data materials.
The Max coefficients setting of the material. Only applies to
Sampled data materials.
Show or hide the advanced options.
Increasing the weight increases the importance of the
imaginary part of the permittivity when calculating a fit. A
79
80
Reference Guide
weight of 1 gives equal weight to the imaginary and real parts
of the permittivity.
Make fit passive
Check to prevent the material fit from having gain at any
frequency. By default this is checked in order to prevent
diverging simulations.
Improve stability
Check to restrict the range of coefficients in the material fit in
order to reduce numerical instabilities which cause simulations
to diverge.
Specify fit range
Decouple the bandwidth used to generate the material fit and
the source bandwidth.
Bandwidth range of fit
The frequency/wavelength range used for the fit if specify fit
range is selected. The bandwidth of the fit should cover the
simulation bandwidth.
Save fit parameters
Update the Material Database with the new Tolerance and
Max coefficients values.
Bandwidth units
Specify range in units of wavelength or frequency. Specify
range by Min/Max or Center/Span.
Bandwidth range
The frequency/wavelength range of interest. By default, this is
the source limits.
Save source bandwidth Update the source limits with these values.
Vertical axis
Plot permittivity or index
Show extended spectrum Plot the fit over a wider range.
Show material data
Show the experimental data on the plot windows
Fit and plot
Calculate the fit and plot data.
Plot in new window
Plots fit and data in a new window
Fit analysis
Property
RMS error
Number of coefficients
Description
The RMS error of the fit. The fitting algorithm will use the
minimum number of coefficients required to achieve an RMS
error less than the value specified by the Tolerance property of
that material.
The number of coefficients used in the fit.
81
82
Reference Guide
in the simulation can be accessed and analyzed.
In order to edit an object, press the SWITCH TO LAYOUT
button. This will delete
all the simulation data, and return the simulation to layout mode. The image below
shows the CAD layout editor in analysis mode. Notice that the COPY, MOVE, DELETE,
etc, buttons are disabled.
7.1
83
7.2
84
Reference Guide
The view menu includes
the ability to choose the default layout of CAD
the ability to choose which windows, toolbars and structures are visible
the mouse mode toolbar options
the view toolbar options
Setting
This setting menu contains options to change the units used and the normalization of the
frequency domain data. More information regarding normalization is given in the
Frequency domain normalization 22 section in chapter3
Simulation
This menu is important since it contains option to change the settings used for parallel
computations. It also contains all of the options given in the simulation toolbar.
Help
The help menu contains update links and tells you which version of FDTD Solutions you
are running, including the expiry date of the license file in use. It also contains links to the
FDTD Online Help. The getting started and reference guide links will launch the .pdf copy
of these guides. Since the online version is the most current, we recommend that you use
the online version if you are connected to the internet.
Supported
General
Multiple cells in GDSII library file
Yes
Yes
Primitives/Objects
Box/Rectangle
Yes
Yes
Yes
Node
No
Text
No
Yes
Yes
85
Advanced
Cell references in external library/file
No
No
No
GDSII Import
GDSII import is initiated by accessing the IMPORT->GDSII option from the FILE menu.
This will bring up a standard file browser which will allow you to select a GDSII file with
the extension .gds or .db. Selecting a GDSII file will bring up the Single layer GDSII
Import window as shown below.
86
Reference Guide
The following 3 input parameters control how the GDSII data is imported to FDTD
Solutions structures:
Cell Name: This selection menu contains the valid cells available in the GDSII library.
Select the cell you wish to import.
Layer number: This selection menu contains all of the layer number present in the
GDSII file. Only structures with the selected layer number will be imported by this
operation.
Material: This selection menu contains a list of the valid materials in your current
simulation environment. This material will be assigned to the imported structures.
Selecting the Import layer button imports all the structures with the selected layer number
in the selected cell into the FDTD Solutions layout environment. These structures are
automatically put in a structure group. The material is set as an input parameter for the
structure code, and the script in the structure group sets all the objects to the desired
material. The name of the structure group includes the layer number from which they
came. For 3D simulations, the structure group contains a variable "z span". This used to
set the width of the layer in the z direction. The origin of the structures, as well as their
orientation, can be changed by changing the properties of the structure group.
87
Finally, it is sometimes useful to run a default script each time you start up FDTD
Solutions, for example, to change working directories to your home directory. Users can
save a script .lsf file called
C:\Program Files\Lumerical\FDTD\defaults\default.lsf (Windows)
/usr/local/Lumerical/defaults/default.lsf (Linux)
that will be automatically run each time FDTD Solutions opens.
7.3
Toolbars
There are 6 toolbars in CAD. For more information on the first four toolbars see the
following sections For information on the alignment toolbar see the User Guide in the
Online Help. The online help toolbar is self explanatory.
Edit toolbar
The edit toolbar contains tools used to edit simulation objects.
View toolbar
The view toolbar contains tools to zoom to the extents of objects, draw a grid and view
the mesh used for the simulation.
Simulation toolbar
The simulation toolbar contains tools to run the simulation and switch back to layout
mode.
Alignment toolbar
Alignment tools are only available when the structure tab is selected. The alignment
toolbar consists of six buttons that control the way in which objects can be accurately
positioned with respect to other objects. For example, these functions were used to align
the left edge of the circular objects with the left edge of the rectangle in the figure below.
88
Reference Guide
7.3.1 Edit
The view tools are described below. When applicable, the shortcut key used to run the
function from the keyboard is given in brackets next to the name of the tool. An object
must be selected in order to use these tools.
33
chapter
Duplicate (D)
This command makes a duplicate of the currently selected object. The copies that are
created are identical to the originals, apart from a one grid cell offset in their x position
which allows the user to distinguish between the original and the copy. When multiple
objects are selected, all of the selected objects will be copied. When copying sources
and monitors, it is important to rename the copies so that each object has a unique name.
Move
The move command allows shifting a single or multiple selected objects by a specified
89
distance in each of the x,y,z dimensions. A pop-up window that appears has field entries
to specify the shift amount.
Array
The array command allows the user to create an array or arrays of objects.
The array edit window that pops up contains several array properties :
A1 LATTICE: the distance between the grid in the a1 direction
A2 LATTICE: the distance between the grid in the a2 direction
ANGLE BETWEEN A1 AND X-AXIS: the angle (in degrees) between the a1 direction
and the x-axis
ANGLE BETWEEN A1 AND A2: the angle (in degrees) between the a1 and the a2
directions.
COLUMNS, ROWS: fields which define the number of rows and columns which
comprise the array.
AZ LATTICE: the distance between elements in the z direction (valid for 3D simulations
only)
LAYERS: the number of elements in the z direction (valid for 3D simulations only)
The definition of these parameters in terms of the resulting array is shown in the diagram
below along with an example array properties edit window.
Delete (Del)
The delete command removes the currently selected object, or objects, from the
simulation.
90
Reference Guide
Select (S)
This functions puts the mouse into the select mode. This allows objects to be selected
through the view ports (objects may be selected in the objects tree regardless of whether
the select tool is pressed or not).
For reference, the current location of the mouse within the view ports is shown in the
fields at the bottom left-hand corner of the CAD window (see the image below). The >
and < buttons at the right increase or decrease the number of decimal places shown in
these fields.
Zoom (Z)
This function sets the mouse to be in the zoom tool mode. The aspect ratio of the 2D
view port, and the XY view 3D, is maintained at 1:1, so there is no distortion and circles
are plotted as circles.
Ruler (R)
Once the ruler mode is selected, a distance measurement can be made by pressing the
left mouse button and then dragging the mouse. A non-permanent triangle is drawn
between the locations where the mouse button was pressed (A) and released (B). The
distances are given in the lower right hand corner of the CAD window (see the image
above under the select mouse mode). The dx and dy fields correspond to the horizontal
and vertical distance between A and B, and the AB field corresponds to the length of the
hypotenuse.
7.3.3 View
The view tools are described below. When applicable, the shortcut key used to run the
function from the keyboard is given in brackets next to the name of the tool.
91
Drawing Grid
Clicking on the drawing grid brings up a window in which the following options can be
edited
SHOW GRID: when checked, the grid will be plotted in the drawing palette
SNAP TO GRID: when checked, objects can only be moved so that their centers align
with intersection points of the grid
A1 LATTICE: the distance between the grid in the a1 direction
A2 LATTICE: the distance between the grid in the a2 direction
AZ LATTICED: the distance between the grid in the z direction
ANGLE BETWEEN A1 AND X-AXIS: the angle (in degrees) between the a1 direction
and the x-axis
ANGLE BETWEEN A1 AND A2: the angle (in degrees) between the a1 and the a2
directions.
7.3.4 Simulation
The simulation tools are:
92
Reference Guide
requirements are broken down into categories such as Simulation fields and Monitor data.
Material Explorer
The Materials Explorer can be used to check the material properties that will be used in a
simulation. For more information, please see the section on Material Explorer 78 .
Run FDTD
Run the current simulation in single process mode. If the current simulation project is not
saved, the application will prompt the user to save the project to a simulation project (.fsp)
file. For more information on running a simulation, consult the Running a simulation 96
section.
Run scripts
This function will allow the user to run a Lumerical script file (*.lsf) to perform
automated commands to, for example, run a series of simulations for parameter sweeps
or optimized device performance. This button is located in the CAD environment twice if
the script editor is open: once in the simulation toolbar and once at the top of the script
editor. Pressing on button on the toolbar brings up an open file dialog, so that a file can
be chosen. Pressing the version of this button on top of the script editor runs the script
that is open in the script editor.
7.4
View ports
The view ports show a graphical representation of all the simulation objects.
When running the mouse over the view port, it will either have the shape of an arrow, a
hand, a magnifying glass or a ruler. You can toggle between these by selecting a mouse
mode as described in detail in the toolbars section.
93
7.5
7.6
94
Reference Guide
Moving toolbars
To move a toolbar, hover the mouse over the top of the toolbar, where the dotted line is.
When the mouse cursor becomes a four-headed arrow, press the left mouse button and
drag and drop the toolbar. If you reach a region where you can place a toolbar, the CAD
environment makes room for the toolbar, creating a blue void.
Moving and undocking windows
The object tree, script prompt, view ports and script editor may be undocked (the
perspective view port is undocked in the image below) by double clicking the name with
the left mouse button. This is particularly useful for the script file editor, since it can be
convenient to make the window quite large when writing script files. The object tree, script
editor and analysis window can be docked on top of each other either to the right or to the
left of the view ports. If they are placed on top of each other, they gain tabs on their
bottom left corner so that you can toggle between them.
Tip: Moving undocked windows in Linux
To reposition an undocked window on Linux operating systems, hold down the Alt key
before attempting to move the window.
95
96
Reference Guide
Running a simulation
When the desired physical structure, sources, monitors and simulation area have been
defined, it is possible to run the simulation. Selecting Run FDTD in the Simulation menu
or clicking on the RUN button in the toolbar will launch the simulation progress window. If
you have not already saved your simulation, you will be prompted to do so as you must
have a saved simulation project file in order to run a simulation.
The simulation progress window allows you to start, pause and exit simulations. Any
movie monitors will save to the filename you chose for the movie monitor. Closing the
simulation progress window or pressing the EXIT button will launch the data analysis
window (for further information, consult the section entitled The analysis tools 98 ).
Running a simulation
97
8.1
98
Reference Guide
Analysis tools
This section describes the way in which the integrated analysis routines are used to
visualize and analyze simulation data. The manner in which the analysis routine interacts
with the overall simulation environment is described in the next section: Analysis tools
and the simulation environment 98 . This is followed by two sections to familiarize the user
with the operation of the analysis routines. The first section entitled The analysis window
99 describes the analysis routine window and its various components. The second
entitled Analysis groups 101 describes the analysis tab of an analysis object. Finally, the
two general ways in which data can be visualized and analyzed is detailed. The plotting
functions, a central component to the overall analysis routines, are described in Figure
windows 103 section. The section entitled Data export 104 describes how data can be
exported to plot in other software packages for further analysis or formal presentation.
More advanced analysis can be performed with the extensive scripting language, as
described in the Scripting language 106 section.
9.1
Analysis tools
9.2
99
As can be seen, the window itself is divided into four different sections where each is
described in turn below, together with the File item.
DATA TO ANALYZE: In this section, the user specifies which monitor data to analyze.
The top field, labeled Monitor consists of a pull-down menu in which the user selects
the simulation monitor to be analyzed. Depending on the monitor selected, various
other input fields in the analysis window will be active or inactive depending on its
relevance to the current monitor. For example, selecting a time-domain field monitor
will result in the frequency field becoming inactive as it is not relevant.
NORMALIZE MONITOR TO SOURCE POWER(DFT ONLY): Only applicable to
frequency-domain field monitors and power monitors. This option, when checked,
normalize the transmission data to the source power, rather than having the results
returned in Watts.
CONVERT FREQUENCY TO WAVELENGTH: This checkbox toggles between
displaying the data in wavelength or frequency units.
MONITOR PROPERTIES / FAR FIELD SETTINGS:
o MONITOR PROPERTIES The monitor properties contain information as to how the
particular monitor is to be analyzed. The monitor properties tab is more fully
discussed in the Monitor properties tab 100 section.
o FAR FIELD SETTINGS The far field settings tab is where the end-user sets the
properties that govern the far field transformation, including the resolution, which
100
Reference Guide
direction to project in, and so on. When plotting far field data, the data to output
setting in the monitor properties tab must be set to far field. The contents of the far
field settings tab is more fully discussed in the Far field settings tab 100 section.
PLOT DATA: The plot data section of the analysis window contains a button which,
when pressed, generates the desired plot in a new window as specified in the Data to
analyze and Monitor properties sections of the analysis window. Within the plot data
section of the analysis window, the user can specify whether to plot linear or log data.
EXPORT DATA: The export data section of the analysis window contains a filename
field in which the user specifies the filename to which the data subset is exported when
the Export button is pressed. For more information about this function, please contact
Lumerical Support.
Analysis tools
101
9.3
Analysis groups
Analysis groups are objects that contain monitors and associated script functions which
can be used to create customize data analysis. For example, an absorption monitor
group can be created with a power monitor, index monitor, and the a script function that
calculates absorption from the fields and index.
102
Reference Guide
An example of the edit window for an analysis group is shown in the screenshot below.
As can be seen above, there is a SETUP tab and an ANALYSIS tab. The SETUP tab
contains all the information needed to edit and set up monitors that are located in the
analysis group. The functionality of the SETUP tab is very similar to the Structure groups
object. See the Properties 42 and Script 43 tab section for information. It is only possible
to edit information in the SETUP tab in layout mode, but information in the SCRIPT tab
can be edited both in layout and analysis mode (see the note at the top of the window
which is highlighted in yellow).
The ANALYSIS tab contains all the information to analyze the monitor data. It is divided
into two sub-tabs. The VARIABLES tab contains all input parameters in the top half, and
the output parameters (named results) in the bottom half. Parameters can be added and
removed using the respective buttons. Any changes to the variables can be saved using
the SAVE ANALYSIS button at the bottom of the tab. The RUN ANALYSIS button runs
the analysis script located in the SCRIPT tab.
Once an analysis routine has run, the result (output parameters) become monitor data,
that can be accessed from the script prompt or a script file in the same manner that
monitor data is accessed for simple monitors.
A screenshot of the contents of the SCRIPT tab is given below. There is a section of the
window that contains the analysis script and a section that contains the results of the
analysis script once the RUN ANALYSIS button has been pressed.
Note that the script below computes the output parameter. Since the script contains the
script command to print the results to the screen, i.e. "?", the value computed for the
Analysis tools
103
output parameter is printed in the Analysis Script Output portion of the window.
More information concerning Analysis groups is available in the User Guide section of the
Online Help.
9.4
Image
All of the figure windows support the same zoom functionality as in the layout editor. The
104
Reference Guide
left button zooms in by a factor of two, the right button zooms out by a factor of two,
pressing and holding the left-hand mouse button results in a zoom window, and doubleclicking either mouse button scales the plot to show all of the data.
The figure window also has functions that are accessible from the top menu, which
contains the FILE and SETTING.
The FILE submenu contains the following items:
EXPORT TO JPEG: Opens a file browser and to select a filename for a jpeg copy of
the current view of the figure. A window will pop up asking for the figure resolution.
The SETTING submenu contains the following items:
Common for Plot and Image:
AXIS: Allows the following axes properties to be set
o SET AXIS LIMITS(Ctrl+A): Opens a GUI window that allows the min and max values
to be set for both the x and y axes. The initial values correspond to the current view
of the figure.
o INVERT AXIS(Ctrl+V): A check box that allows the axis to be inverted: the vertical
axis is drawn on the horizontal and vice versa.
COLOR MAP: Allows you to choose between a color image (Ctrl+C)or a grey-scale
figure(Ctrl+G).
SET TITLE(Ctrl+T): allows you to set the x label, y label, and the title of the plot.
Plot specific
SET LEGEND(Ctrl+L): Allows you to set the legend and its position.
Image specific
COLOR BAR:
o SET COLOR BAR LIMITS (Ctrl+B): Opens a GUI window that allows the min and
max values to be set for both the color bar. The initial values correspond to the
current view of the figure. Any data values larger than the maximum are displayed at
the color (or grey-scale) of the maximum, and similarly for the minimum. This allows
for over-saturation of the colors to emphasize certain regions of the image, or for
more accurate comparison between two images.
o RESET DEFAULT LIMITS(Ctrl+D): Resets the original limits. This corresponds to the
minimum and maximum values of the data being imaged.
9.5
Data export
In some cases, the user may wish to export the FDTD simulation data to take advantage
of the advanced plotting and data analysis tools not available in the FDTD Solutions. Data
export can be done in a number of ways, but in general the use of the scripting language
will be required. The user can use scripting commands as described in the Scripting
language 106 section to write data into text format, or alternatively use Matlab by directly
calling Matlab functions in FDTD or by exporting data to .mat files.
Export to text files
The data subset export facility in the analysis view allows the user to save to a specified
Analysis tools
105
filename, a subset of the total simulation data for quick plotting in other software
packages. For x-y plots, the data subset export facility generates a two-column ASCII
data file, with a header which specifies where the data was taken from and the column
headings with units. For image plots, the data subset consists of two columns which
specify the x and y positions in the units specified within the CAD layout editor, and a
matrix of data which consists of the field quantities being exported. The user may also
write a script file and utilize the write 117 script function to custom create a text file.
Matlab
MATLAB has a number of specialized plotting functions useful for visualizing FDTD
simulation data. For example, contour plot or vector plot, which are not available in the
FDTD Solutions but found in MATLAB, are suitable for visualizing the electric field or
power flow. FDTD Solutions provides two interfaces for users wishing to use MATLAB in
their analysis:
1. The first option allows MATLAB commands to be called directly from within the FDTD
Solutions scripting environment. Data can be moved between FDTD workspace and
MATLAB workspace, so the user can take advantage of the combined functionality
provided by both programs. This is accomplished by using the script commands,
matlab 122 , matlabput 124 , and matlabget 123 . To use this option, both FDTD and
MATLAB must be installed on the same computer.
2. The second option allows simulation data to be exported to MATLAB .mat files for
subsequent data analysis in MATLAB. For more information, see the matlabsave 120
command.
The FDTD Solutions Online Help provides an example of how each option can be used.
See the User Guide - Scripting language section.
MATLAB is a registered trademark of The Mathworks, Inc.
106
Reference Guide
10
Scripting Language
Lumerical provides a powerful scripting language to manipulate simulation objects, launch
simulations and analyze results. Script commands can be entered directly into a script
prompt, be run from a saved script file, or entered into a group object. Group objects run
setup scripts every time they are edited, and analysis scripts when these are called.
To view the script prompt, select VIEW->WINDOWS-> SCRIPT PROMPT from VIEW
menu on the main title bar. You can type and execute commands in the script region.
Script files can be created and edited in the script file editor, which is opened by selecting
VIEW->WINDOWS-> SCRIPT FILE EDITOR from VIEW menu on the main title bar.
They can also be created and edited in another text editor. All files with the extension .lsf
are recognized as script files. To run a saved script file, open a file in the script file editor
and press the run script button, or select RUN SCRIPT from the SIMULATE menu on the
main title bar. Scripts can also be run by typing their file name at the script prompt or in
another script file.
When running a script file in the a different directory using the GUI, the current working
directory is unchanged, but the directory of the script file is added to the scripting path.
This way, any files called by that script will be found. However, the search order is the
current directory first, and then any other folders in the path, THEN the directory of the
script file.
Structure and analysis groups both have associated set up scripts. These script are run
whenever the group is edited, or the when the TEST button located below the scripts in
the edit GUI is pressed. In addition, analysis groups have an analysis script. The analysis
script is not run automatically. It can be run using the runanalysis script command, or by
choosing to edit the properties of the script, selecting the ANALYSIS tab, and pressing
the RUN ANALYSIS button just below where the script is.
The script functions have been organized into the following sections.
Section
System level
107
Manipulating variables
Operators
130
Functions
139
124
Plotting commands
158
Manipulating objects
161
Scripting Language
Material database functions
User defined GUIs
107
183
186
190
Description
del 109
rm 109
Deletes a file.
ls 110
dir 109
cd
110
pwd
cp
110
Copy a file.
110
mv
exit
Move a file
111
111
system
111
fileexists
112
currentfilename
filebasename
filedirectory
112
112
113
fileextension
113
Description
113
108
Reference Guide
getpath
113
addpath
114
which
114
pause
114
break
115
ESCAPE key
115
115
Command
Description
format
116
STD OUT
write
117
LDF files
loaddata
116
savedata
116
savedcard
117
Text files
readdata
write
117
117
118
118
asapimport 119
See Also
exportfigure 160 , load
, save
196
MATLAB functions
Command
matlabsave
lum2mat
121
Description
120
Scripting Language
lum2mat command line
matlab
122
122
matlabget
123
matlabput
124
10.1.1 del
Delete a file.
Syntax
Description
del("filename");
rm("filename");
See Also
System level
107
, delete
163
10.1.2 rm
Delete a file.
Syntax
Description
del("filename");
rm("filename");
See Also
System level
107
, delete
163
10.1.3 dir
List files in a directory.
Syntax
Description
out = dir;
out = ls;
out = dir("directory");
out = ls("directory");
See Also
System level
107
109
110
Reference Guide
10.1.4 ls
List files in a directory.
Syntax
Description
out = dir;
out = ls;
out = dir("directory");
out = ls("directory");
See Also
System level
107
10.1.5 cd
Change directory.
Syntax
Description
cd;
cd("directory");
See Also
System level
107
10.1.6 pwd
Returns the current working directory.
Syntax
Description
out = pwd;
See Also
System level
107
, currentfilename
112
10.1.7 cp
Copy a file.
Syntax
Description
Scripting Language
cp("file1","file2");
cp("path1\file1","path2
\file2");
See Also
System level
107
, mv
111
, pwd
110
, copy (objects)
111
166
10.1.8 mv
Move a file.
Syntax
Description
mv("file1","file2");
cp("path1\file1","path2
\file2");
See Also
System level
107
, cp
110
, pwd
110
10.1.9 exit
Exit the application.
Syntax
Description
exit;
exit(option);
See Also
System level
107
10.1.10 system
The system command is used to have the Operating System execute a command, rather
than the script prompt.
Only available in FDTD Solutions.
112
Reference Guide
Syntax
Description
system("command");
See Also
System level
107
10.1.11 fileexists
Check if a file exists. The file extension must be specified. By default, the entire path will
be searched.
Syntax
Description
out = fileexists("filename");
out =
fileexists("c:\temp\file.txt");
See Also
System level
107
, getpath
113
, which
114
, pwd
110
10.1.12 currentfilename
Get the current filename and directory.
Syntax
Description
out = currentfilename;
See Also
System level 107 , fileexists 112 , getpath
filebasename 112 , filedirectory 113
113
, which
114
, pwd
110
, fileextension
113
10.1.13 filebasename
Get the file basename from a string.
Syntax
Description
out = filebasename(
"location/filename.ext" );
See Also
Scripting Language
System level
107
, currentfilename
112
, getpath
113
, which
114
, pwd
110
10.1.14 fileextension
Get the file extension from a string.
Syntax
Description
out = fileextension(
"name.ext");
See Also
System level
107
, currentfilename
112
, getpath
113
, which
114
, pwd
110
10.1.15 filedirectory
Get the file directory from a string.
Syntax
Description
out = filedirectory(
"location/filename.ext" );
See Also
System level
107
, currentfilename
112
, getpath
113
, which
114
, pwd
110
Description
filename;
See Also
System level
107
, getpath
113
, addpath
114
, which
114
10.1.17 getpath
Get the current path. The path always contains the current working directory.
Syntax
Description
113
114
Reference Guide
out = getpath;
See Also
System level
107
, addpath
114
, which
114
, pwd
110
10.1.18 addpath
Add a directory to the path.
Syntax
Description
addpath("directory");
See Also
System level
107
, getpath
113
, which
114
, pwd
110
10.1.19 which
Returns the full file pathname for the specified file. This is useful when checking what
script file will run.
Syntax
Description
out = which("filename");
See Also
System level
107
, getpath
113
, addpath
114
, pwd
110
, currentfilename
112
, fileexists
112
10.1.20 pause
Pause program for a time.
Hit the space bar to force the script to continue. Hit the ESCAPE key to break the script
at this point.
Syntax
Description
pause(time);
See Also
Scripting Language
System level
107
, break
115
, ESCAPE key
115
115
10.1.21 break
Stops a script from executing.
Syntax
Description
break;
See Also
System level
107
, ESCAPE key
115
, pause
114
Description
ESCAPE key
See Also
System level
107
, break
115
, pause
114
116
Reference Guide
See Also
System level
107
10.1.24 format
The two format commands toggle the script interpreter between 2 output precision states.
The commands print (?) and num2str() use this state to determine how many digits of
precision to output.
Only available in FDTD Solutions.
Syntax
Description
format long;
format short;
See Also
System level
107
, num2str
137
,?
139
10.1.25 loaddata
Loads workspace variables or d-card data from a Lumerical data file (ldf) file. If any
current variables exist with the same names as those in the file, the current values will be
overwritten.
Syntax
Description
loaddata("filename");
See Also
System level
107
, savedata
116
, savedcard
117
, workspace
129
, showdata
180
10.1.26 savedata
Saves workspace variables to a Lumerical data file (ldf) file.
Syntax
Description
savedata("filename");
savedata("filename", var1,
var2,...);
Scripting Language
See Also
System level
107
, savedcard
117
, loaddata
116
, workspace
129
, lum2mat
117
121
10.1.27 savedcard
Saves d-card data to a Lumerical data file (ldf) file. D-cards are generally used to store
monitor data.
Syntax
Description
savedcard("filename");
savedcard("filename",
"name1", "name2",...);
See Also
System level
107
, savedata
116
, loaddata
116
, showdata
180
, lum2mat
121
10.1.28 readdata
You can import numerical values stored in text files with the readdata command. This
command will read a file with data in a row/column format. The data must be correctly
formatted so each row has the same number of columns. Readdata will ignore any line
that begins with a letter.
Syntax
Description
M=readdata("filename.txt");
Will load the text file filename into matrix variable M. Any
lines starting with a letter are ignored.
See Also
System level
107
, rm
109
, write
117
10.1.29 write
Writes string variables to text files or to standard output.
Typically the write command is used to output data to a text file. If the specified file does
not exist, it will be created. If it does exist, then the output string will be appended to the
end of the file. The write command will automatically add a new line character at the end
of the string.
On Linux systems only, the write command will output to the standard output (stdout) if a
filename is not specified. The write command can only write to standard output in FDTD
Solutions.
118
Reference Guide
Syntax
Description
write(my_string);
write("testfile.txt",
my_string);
See Also
System level
107
, readdata
117
, rm
109
, num2str
137
,?
139
, endl
139
, format
116
10.1.30 asapexport
Exports the desired monitor to a file for interfacing with BRO's ASAP. These files are
called fld files. The monitor must be a frequency power or a frequency profile monitor.
Syntax
Description
asapexport(
"monitorname");
107
, asapload
118
, asapimport
119
, addimportedsource
205
10.1.31 asapload
Load data from an fld file from BRO's ASAP. asapload creates a d-card structure called
"fld_data" which contains all the data in the file. If "fl_data" exists, it will be called
"fl_data_2". After loading an asapfile with asapload, you can extract any desired data.
Data can be
Ex, Ey, Ez, Hx, Hy, Hz, x, y, z
power, frequency, wavelength, index
Syntax
Description
asapload;
asapload( "filename");
Scripting Language
See Also
System level
107
, asapexport
118
, asapimport
119
, addimportedsource
119
205
10.1.32 asapimport
Import an ASAP fld file into an ASAP source. This is equivalent to editing the properties
of the ASAP source, and clicking on the READ ASAP SOURCE button.
Syntax
Description
asapimport( "sourcename"); Imports the fld file into the sourcename source. A file
browser will open to select the file.
This function does not return any data.
asapimport( "sourcename",
"filename");
See Also
System level
107
, asapexport
118
, asapload
118
, addimportedsource
205
10.1.33 gdsimport
Import a layer from a GDSII file into the layout environment. This is equivalent to
performing a GDSII import through the FILE->IMPORT menu. See the Reference Guide
- Layout editor chapter for more information.
Syntax
Description
gdsimport("filename",
"cellname", layer);
gdsimport("filename",
"cellname", layer,
"material");
gdsimport("filename",
"cellname", layer,
"material", zmin, zmax);
Parameter
Type
Description
filename
string
120
Reference Guide
cellname
string
layer
number
or string
material
string
z min
number
z max
number
See Also
System level
107
, setnamed
168
10.1.34 matlabsave
Save workspace data to Matlab .mat data files.
Matlab has recently changed its .mat file format. The primary advantage is that the new
format supports files larger than 2GB. Matlab 7.3 is the first version to support the new
format, but can also read the previous file format. All Matlab Pre 7.3 cannot read the new
format.
There is currently no option to this function to cause a version 7.3 Matlab .mat file to be
written. This command can only produce the older format .mat file. For more information
about the Matlab file formats and how to save to a version 7.3 .mat file refer to the
lum2mat script commmand.
Only available in FDTD Solutions.
Syntax
Description
matlabsave("filename");
matlabsave("filename",
var1, ..., varN);
Scripting Language
See Also
System level
107
, lum2mat
121
122
, matlabput
121
124
10.1.35 lum2mat
Convert Lumerical .ldf, .fsp, .lms files into Matlab .mat data files.
The name of the Matlab file will be the same name as the input file, but with a .mat file
extension. Within the Matlab file, source/monitor data is stored in named variables. All of
the names of variables associated with a particular monitor/source are prefixed with the
monitor/source name, as set in the monitor/source properties. The remainder of the
variable name describes the contents of the data, such as EM field components, spatial
coordinates, time vectors and frequency vectors.
When exporting script variables to Matlab file, they will appear in the Matlab workspace
with the same name as in the Lumerical scripting workspace.
Matlab has recently changed its .mat file format. The primary advantage is that the new
format supports files larger than 2GB. Matlab 7.3 is the first version to support the new
format. Matlab 7.3 can also read the previous file format. All Matlab Pre 7.3 canhgnot
read the new format.
The 64-bit version of FDTD Solutions exports to the new Matlab file format by default.
The 32-bit version of FDTD Solutions exports to the Matlab Pre 7.3 file format by default.
The defaults can be overridden with an extra option added to the command.
For more information about Matlab, please see:
http://www.mathworks.com/products/matlab/
For information on how to use the Matlab output file please see:
http://www.mathworks.com/access/helpdesk/help/techdoc/ref/load.shtml#
Syntax
Description
lum2mat ("filename");
lum2mat
("filename",option);
Option
1 : export to new Matlab file format
2 : export to Matlab Pre 7.3 file format
See Also
System level 107 , lum2mat command line
savedcard 117 , showdata 180
122
, matlab
122
, loaddata
116
, savedata
116
122
Reference Guide
Description
lum2mat filename
See Also
System level
107
, lum2mat
121
10.1.37 matlab
Runs a MATLAB command from the FDTD Solutions script prompt. This gives access to
extended mathematical and visualization functionality from the FDTD Solutions script
environment. If MATLAB is not installed, this function will return an error.
The first time a MATLAB function (matlab, matlabget or matlabput) is called, a MATLAB
session will be started and a connection will be established with the Lumerical scripting
environment. Once this connection is established, MATLAB commands can be run using
the matlab function. It is important to understand that the MATLAB and FDTD Solutions
workspaces are completely separate and independent. A MATLAB command cannot act
on a variable defined in the FDTD Solutions workspace, and vice-versa. Variables must
be passed between the workspaces using the matlabget and matlabput functions. At any
time you may examine the MATLAB workspace or interact with the MATLAB environment
by typing commands at the MATLAB script prompt.
The output from the MATLAB commands will be printed at the FDTD Solutions script
prompt. One limitation of the matlab function is that no error reporting is provided to either
the FDTD script prompt or the MATLAB prompt. MATLAB commands should be tested
by typing them directly into the MATLAB prompt before they are used in FDTD Solutions.
When using a number of MATLAB commands together, it is recommended that the
commands are stored in a MATLAB m-file. Instead of embedding many commands into a
single matlab script function call, you may simply call the m-file with the matlab script
Scripting Language
123
command. Using MATLAB m-files in this way will allow you to interactively test your
MATLAB code at the MATLAB script prompt before running it from FDTD Solutions.
Supported MATLAB versions
This function requires that MATLAB version 7.0 (2004) or newer to be installed on the
computer. Also, please remember that 32 bit and 64 bit applications can not be mixed.
For example, if you have the 32 bit version of MATLAB, then you MUST use the 32 bit
version of FDTD. NOTE: The student version of MATLAB is 32 bit.
To check if the Matlab script integration is enabled, select the Help - Matlab integration
status menu option. This window will report that the script integration is active or inactive.
If FDTD is unable to establish a connection with MATLAB, even when a supported
version is installed, try re-installing MATLAB, then reinstalling FDTD in their respective
default directories. This usually fixes the problem. If not, please contact Lumerical
support.
Syntax
Description
matlab("command");
matlab("
command_1
command_2
");
See Also
System level
107
, matlabget
123
, matlabput
124
, lum2mat
121
10.1.38 matlabget
Copies a variable from the MATLAB workspace to the FDTD Solutions workspace. The
resulting variable in the FDTD Solutions workspace will have the same name as in
MATLAB, and will overwrite any existing variable with the same name. If the variable does
not exist in MATLAB, the command will return an error. For more information, please see
the matlab command description.
Syntax
Description
matlabget(var1,
var2,...varN);
See Also
System level
107
, matlab
122
, matlabput
124
124
Reference Guide
10.1.39 matlabput
Copies a variable from the FDTD Solutions workspace to the MATLAB workspace. The
resulting variable in the MATLAB workspace will have the same name as in FDTD
Solutions, and will overwrite any existing variable with the same name. If the variable
does not exist in FDTD Solutions, the command will return an error. For more information,
please see the matlab command description.
Syntax
Description
matlabput(var1,
var2,...varN);
See Also
System level
107
, matlab
122
, matlabget
123
Description
Assignment operator.
:
[]
125
Array operator.
125
Create matrix.
125
126
linspace
matrix
126
126
randmatrix
127
meshgridx
127
meshgridy
127
meshgrid3dx
127
meshgrid3dy
128
meshgrid3dz
128
clear
128
workspace
129
Scripting Language
125
variables.
Matrix elements
129
Matrix operations
130
Pre-defined constants
130
10.2.1 =
Assignment operators.
Syntax
Description
x = 5+2i;
See Also
Manipulating variables
124
, ==
133
10.2.2 :
Array operator.
Syntax
Description
x = 2 : 10;
x = 6 : -1.5 : 2;
See Also
Manipulating variables
124
, linspace
126
10.2.3 []
Specify matrix element by element.
Only available in FDTD Solutions.
Command
Description
x = [u11,...,u1N; u21,...,u2N;
uM1,...,uMN]
126
Reference Guide
matrices of compatible dimension.
See Also
Manipulating variables
124
, linspace
126
, matrix
126
10.2.4 %
Used to create variables with spaced in the names.
Only available in FDTD Solutions.
Command
Description
See Also
Manipulating variables
124
10.2.5 linspace
Creates a linearly spaced array.
Syntax
Description
124
,:
125
, []
125
10.2.6 matrix
Initialize a matrix. All elements are set to zero.
Syntax
Description
x = matrix(i,j,k,....);
See Also
Manipulating variables
124
, linspace
126
, []
125
Scripting Language
10.2.7 randmatrix
Initialize a matrix. All elements are random numbers between 0 and 1.
Syntax
Description
x = randmatrix(i,j,k,....);
See Also
Manipulating variables
124
, matrix
126
, rand
156
, randreset
156
10.2.8 meshgridx
Create a 2D meshgrid in the x direction
Syntax
Description
out = meshgridx(x,y);
See Also
Manipulating variables
124
, image
159
, meshgridy
127
, meshgrid3dx
127
10.2.9 meshgridy
Create a 2D meshgrid in the y direction
Syntax
Description
out = meshgridy(x,y);
See Also
Manipulating variables
124
, image
159
, meshgridx
10.2.10 meshgrid3dx
Create a 3D meshgrid in the x direction
Syntax
Description
127
, meshgrid3dx
127
127
128
Reference Guide
out = meshgrid3dx(x,y,z);
See Also
Manipulating variables
124
, meshgridx
127
, meshgridy
127
, meshgrid3dy
128
, meshgrid3dz
128
10.2.11 meshgrid3dy
Create a 3D meshgrid in the y direction
Syntax
Description
out = meshgrid3dy(x,y,z);
See Also
Manipulating variables
124
, meshgridx
127
, meshgridy
127
, meshgrid3dx
127
, meshgrid3dz
128
10.2.12 meshgrid3dz
Create a 3D meshgrid in the z direction
Syntax
Description
out = meshgrid3dz(x,y,z);
See Also
Manipulating variables
124
, meshgridx
127
, meshgridy
127
, meshgrid3dx
127
, meshgrid3dy
128
10.2.13 clear
Clears all stored workspace variables. This will not clear any simulation data stored in
d-cards. The variables c, pi, eps0, mu0 will be reset to their default values.
Syntax
Description
clear;
See Also
Manipulating variables
124
, cleardcard
181
Scripting Language
129
10.2.14 workspace
Returns a list of all the currently defined variables in the scripting workspace.
Syntax
Description
out = workspace;
See Also
Manipulating variables
124
, showdata
180
x = [u, v, w]
x(7) = 5;
x(7) = y(2);
x(3,1,8) = 3;
x(2:5,1) = 1:4;
x(2:5,1) = 1;
x = y(1:10,2,1:20);
x is equal to a sub-matrix of y.
x = matrix(2,3);
x(4)=7;
x=y(z);
See Also
Manipulating variables
124
130
Reference Guide
Dimension of Operation
y
Dimension of Value of z
z
1x1
N/A
z = sin(x)
1x1
z11 = sin(x11)
1x1
1x1
z=x*y
1x1
10x10
1x1
z=x*y
10x10
10x10
10x10
z=x*y
10x10
10x10
11x11
z=x*y
Error
Error
See Also
Manipulating variables
124
Description
pi
The number p.
eps0
mu0
See Also
Manipulating variables
124
10.3 Operators
Standard mathematical and string operators.
Algebraic operators
Command
Description
132
Multiplication. Ex: y = x * z;
132
Division. Ex: y = x / z;
132
Addition. Ex: y = x + z;
Scripting Language
131
132
Subtraction. Ex: y = x z;
132
133
Description
==
Comparison.
133
almostequal
!=
133
134
<=
134
>=
134
<
135
Less than.
>
135
Greater than.
&
135
AND.
and
AND.
135
| 136
OR.
or
OR.
136
NOT.
136
NOT.
137
String operators
Command
Description
num2str
137
"
137
'
138
Add strings
132
endl
139
Output to screen
132
Reference Guide
Command
Description
139
139
10.3.1 *
Multiplication.
Syntax
Description
y = x * z;
Multiply x and z.
See Also
Operators
130
,*
132
,/
132
,+
132
,-
132
,^
133
10.3.2 /
Division.
Syntax
Description
y = x / z;
Divide x by z.
See Also
Operators
130
,*
132
,/
132
,+
132
,-
132
,^
133
10.3.3 +
Addition.
Syntax
Description
y = x + z;
Add x and z.
y = string1 + string2;
See Also
Operators
130
,*
132
,/
132
,+
132
,-
132
,^
133
Description
y = x - z;
Subtract z from x.
Scripting Language
y = -x;
See Also
Operators
133
Negative
130
,*
132
,/
132
,+
132
,-
132
,^
133
10.3.5 ^
Power. In expression A^B, if B is complex, the phase of A is evaluated from -p to p.
Syntax
Description
y = x^3;
x cubed.
See Also
Operators
130
,*
132
,/
132
,+
132
,-
132
,^
133
10.3.6 ==
Logical comparison. This operators can be used with complex numbers and strings.
Syntax
Description
out = y == x;
See Also
Operators 130 , = 125 , almostequal
, or 136 , ! 136 , ~ 137
133
, !=
134
, <=
134
, >=
134
,<
135
,>
135
,&
135
, and
135
, | 136
10.3.7 almostequal
Almost equal comparison operator. When using floating point numbers (rather than
integers), two values that are meant to be equal may not be exactly equal due to rounding
errors that are always present in floating point calculations. In such cases, the almost
equal function can be useful.
Only available in FDTD Solutions.
Syntax
Description
out = almostequal(A, B);
out = almostequal(A, B,
relative diff);
out = almostequal(A, B,
relative diff, absolute diff);
134
Reference Guide
See Also
Operators
136 , ~ 137
130
,=
125
, ==
133
, !=
134
, <=
134
, >=
134
,<
135
,>
135
,&
135
, and
135
, | 136 , or
136
,!
10.3.8 !=
Not equal to comparison operator. Returns 1 if values are not equal. Returns 0 if values
are equal. This operator can be used in matrix operations. This operators can be used
with complex numbers.
Syntax
Description
out = a!=b;
See Also
Operators 130 , ==
136 , ! 136 , ~ 137
133
, almostequal
133
, <=
134
, >=
134
,<
135
,>
135
,&
135
, and
135
, | 136 , or
10.3.9 <=
Logical less than or equal to. Imaginary components of x and y are ignored.
Syntax
Description
out = y <= x;
See Also
Operators 130 , ==
136 , ! 136 , ~ 137
133
, !=
134
, almostequal
133
, >=
134
,<
135
,>
135
,&
135
, and
135
, | 136 , or
10.3.10 >=
Logical greater than or equal to. Imaginary components of x and y are ignored.
Syntax
Description
out = y >= x;
See Also
Operators 130 , ==
136 , ! 136 , ~ 137
133
, !=
134
, <=
134
, almostequal
133
,<
135
,>
135
,&
135
, and
135
, | 136 , or
Scripting Language
135
10.3.11 <
Logical less than. Imaginary components of x and y are ignored.
Syntax
Description
out = y < x;
Less than.
See Also
Operators 130 , ==
136 , ! 136 , ~ 137
133
, !=
134
, <=
134
, >=
134
, almostequal
133
,>
135
,&
135
, and
135
, | 136 , or
135
, and
135
, | 136 , or
10.3.12 >
Logical greater than. Imaginary components of x and y are ignored.
Syntax
Description
out = y > x;
Greater than.
See Also
Operators 130 , ==
136 , ! 136 , ~ 137
133
, !=
134
, <=
134
, >=
134
,<
135
, almostequal
133
,&
10.3.13 &
Logical AND. Imaginary components of x and y are ignored.
Syntax
Description
out = y & x;
If the real part of either or both of x,y are zero, then return
0. Otherwise return 1.
y and x;
Same as &.
See Also
Operators
130
, ==
133
, !=
134
, <=
134
, >=
134
,<
135
,>
135
,&
135
, and
135
, | 136 , or
136
,!
136
,~
137
10.3.14 and
Logical AND. Imaginary components of x and y are ignored.
Syntax
Description
out = y & x;
If the real part of either or both of x,y are zero, then return
0. Otherwise return 1.
136
Reference Guide
y and x;
See Also
Operators
Same as &.
130
, ==
133
, !=
134
, <=
134
, >=
134
,<
135
,>
135
,&
135
, and
135
, | 136 , or
136
,!
136
,~
137
10.3.15 |
Logical OR. Imaginary components of x and y are ignored.
Syntax
Description
out = y | x;
y or x;
Same as |.
See Also
Operators
130
, ==
133
, !=
134
, <=
134
, >=
134
,<
135
,>
135
,&
135
, and
135
, | 136 , or
136
,!
136
,~
137
10.3.16 or
Logical OR. Imaginary components of x and y are ignored.
Syntax
Description
out = y | x;
y or x;
Same as |.
See Also
Operators
130
, ==
133
, !=
134
, <=
134
, >=
134
,<
135
,>
135
,&
135
, and
135
, | 136 , or
136
,!
136
,~
137
10.3.17 !
Logical NOT operator. If a value is 0, then NOT returns 1. For all other values, NOT
returns 0. NOT(A) is equivalent to A==0, where == is the comparison operator.
Only available in FDTD Solutions.
Syntax
Description
out = !a;
out = ~a;
Scripting Language
See Also
Operators
130
, ==
133
, !=
134
, <=
134
, >=
134
,<
135
,>
135
,&
135
, and
135
, | 136 , or
136
,!
137
136
,~
137
10.3.18 ~
Logical NOT operator. If a value is 0, then NOT returns 1. For all other values, NOT
returns 0. NOT(A) is equivalent to A==0, where == is the comparison operator.
Only available in FDTD Solutions.
Syntax
Description
out = !a;
out = ~a;
See Also
Operators
130
, ==
133
, !=
134
, <=
134
, >=
134
,<
135
,>
135
,&
135
, and
135
, | 136 , or
136
,!
136
,~
137
10.3.19 num2str
Convert an integer, floating point number, or matrix into a string. Use the format script
command to change the precision of the output.
Syntax
Description
out = num2str(x);
See Also
Operators
130
,"
137
,+
132
,?
139
, endl
139
, write
117
, format
116
10.3.20 "
String operator. Strings can be created with single or double quotes.
The following escape sequences are recognized when creating strings with double
quotes:
\"
double quotes in string
\n
newline (linefeed) character in string
\\
backslash in string
Double quotes within strings are only available in FDTD Solutions.
Strings created with single quotes are only available in FDTD Solutions.
Syntax
Description
out="my string";
138
Reference Guide
See Also
Operators
130
,'
138
, num2str
137
,+
132
, endl
139
, write
117
10.3.21 '
String operator. Strings can be created with single or double quotes.
The following escape sequences are recognized when creating strings with single quotes:
''
single quote in string
Only available in FDTD Solutions.
Syntax
Description
out='my string';
See Also
Scripting Language
Operators
130
,"
137
, num2str
137
,+
132
, endl
139
, write
139
117
10.3.22 endl
Add an end of line character to a string
Syntax
Description
out = "line1"+endl+"line2";
See Also
Operators
130
, num2str
137
,+
132
,"
137
, write
117
10.3.23 ?
Print output to the screen. Use the format script command to change the precision of the
output.
Syntax
Description
?command;
See Also
System level
107
, write
117
, format
116
10.3.24 comments
Use the # character to comment script files. Anything after the # character is ignored.
The comments are not displayed when the script file is run. Comments can not be used
when typing commands directly into the script prompt.
Syntax
Description
x=1; # set x to 1
See Also
System level
107
10.4 Functions
Standard mathematical and matrix functions.
Trigonometric and complex
Command
Description
sin
141
140
Reference Guide
cos
142
tan
142
asin
142
acos
143
atan
143
atan2
real
abs
144
Complex conjugate
144
Absolute value
144
angle
143
imag
conj
143
144
unwrap
145
Description
log
145
log10
145
sqrt
145
exp
146
The exponential.
Matrix functions
Command
Description
size
146
length
pinch
146
146
sum
147
max
147
min
147
Scripting Language
dot
cross
flip
interp
148
spline
148
integrate
find
141
Integrate a matrix
148
149
findpeaks
149
transpose
150
Transpose a matrix
ctranspose 150
See also
Manipulating variables
Description
fft
150
fftw
fftk
153
invfft
czt
152
Inverse fft.
154
Chirped z-transform.
155
Miscellaneous
Command
Description
round
rand
155
156
randreset
156
10.4.1 sin
Trigonometric sine function. Angle units are in radians. Function is defined for complex
angles. Phase of a complex number is evaluated between -p and p.
Syntax
Description
142
Reference Guide
out = sin(x);
See Also
Functions
139
, asin
142
10.4.2 cos
Trigonometric cosine function. Angle units are in radians. Function is defined for
complex angles. Phase of a complex number is evaluated between -p and p.
Syntax
Description
out = cos(x);
See Also
Functions
139
, acos
143
10.4.3 tan
Trigonometric tangent function. Angle units are in radians. Function is defined for
complex angles. Phase of a complex number is evaluated between -p and p.
Syntax
Description
out = tan(x);
See Also
Functions
139
, atan
143
, atan2
143
10.4.4 asin
Inverse trigonometric sine function. Angle units are in radians. Function is defined for
complex values. Phase of a complex number is evaluated between -p and p. If x is
complex, or abs(x) > 1, the following equation is used:
asin(x) = -i ln( ix + sqrt(1-x^2))
Syntax
Description
out = asin(x);
See Also
Functions
139
, sin
141
Scripting Language
143
10.4.5 acos
Inverse trigonometric cosine function. Angle units are in radians. Function is defined for
complex values. Phase of a complex number is evaluated between -p and p. If x is
complex, or abs(x) > 1, the following equation is used:
acos(x) = -i ln( x + i sqrt( 1-x^2))
Syntax
Description
out = acos(x);
See Also
Functions
139
, cos
142
10.4.6 atan
Inverse trigonometric tangent function. Angle units are in radians. Function is defined for
complex values. Phase of a complex number is evaluated between -p and p. If x is
complex, or abs(x) > 1, the following equation is used:
atan(x) = 0.5 i ln( (i+x)/(i-x) )
Syntax
Description
out = atan(x);
See Also
Functions
139
, atan2
143
, tan
142
10.4.7 atan2
Inverse trigonometric tangent function, calculates the arctangent of y/x, but returns the
angle in the correct quadrant. Angle units are in radians. Function is defined for real
values only.
Syntax
Description
out = atan2(y,x);
See Also
Functions
139
, atan
143
, tan
142
10.4.8 real
Returns the real part of a number or matrix.
Syntax
Description
144
Reference Guide
out = real(x);
See Also
Functions
139
, imag
144
10.4.9 imag
Returns the imaginary part of a number or matrix.
Syntax
Description
out = imag(x);
See Also
Functions
139
, real
143
, conj
144
10.4.10 conj
Returns the complex conjugate of a number or matrix.
Syntax
Description
out = conj(x);
See Also
Functions
139
, real
143
, imag
144
10.4.11 abs
Returns the absolute value of a number or matrix.
Syntax
Description
out = abs(x);
See Also
Functions
139
, real
143
, imag
144
10.4.12 angle
Returns the angle or phase of a complex number or matrix in radians.
Syntax
Description
out = angle(x);
See Also
2003 - 2009 Lumerical Solutions, Inc
Scripting Language
Functions
139
, real
143
, imag
144
, unwrap
145
145
10.4.13 unwrap
Removes changes of more than 2p from a 1D array. It can be useful after angle(x) to see
phase without discontinuities.
Syntax
Description
out = unwrap(x);
See Also
Functions
139
, real
143
, imag
144
, angle
144
10.4.14 log
The natural logarithm. Input can be complex or negative.
Syntax
Description
out = log(x);
See Also
Functions 139 , log10
10.4.15 log10
The log, base 10. Input can be complex or negative.
Syntax
Description
out = log10(x);
See Also
Functions 139 , log
10.4.16 sqrt
The square root.
Syntax
Description
out = sqrt(x);
See Also
Functions
139
,^
133
146
Reference Guide
10.4.17 exp
The exponential.
Syntax
Description
out = exp(x);
The exponential.
See Also
Functions
139
, log
145
,^
133
10.4.18 size
Returns the size of a matrix.
Syntax
Description
y = size(x);
See Also
Functions
139
, length
146
, flip
10.4.19 length
Returns the number of elements in a matrix.
Syntax
Description
y = length(x);
See Also
Functions
139
, size
146
10.4.20 pinch
Removes all singleton dimensions from a matrix.
Syntax
Description
out = pinch(x);
pinch(x,i);
Scripting Language
147
matrix then
y=pinch(x,2);
will return an NxKxP matrix where
y(i,j,k) = x(i,1,j,k)
pinch(x,I,j);
See Also
Functions
139
, find
149
, size
146
, flip
10.4.21 sum
Sum of elements in a matrix.
Syntax
Description
out = sum(x);
out = sum(x,2);
See Also
Functions
139
10.4.22 max
The maximum value in a matrix.
Syntax
Description
out = max(x);
See Also
Functions
139
10.4.23 min
The minimum value in a matrix.
Syntax
Description
out = min(x);
148
Reference Guide
See Also
Functions
139
10.4.24 interp
Linear interpolation of a data set.
Syntax
Description
See Also
Functions
139
, spline
148
10.4.25 spline
Does a cubic spline interpolation of a data set.
Syntax
Description
out = spline(Ex,xold,xnew);
See Also
Functions
139
, interp
148
10.4.26 integrate
Returns the integral over the specified dimension of a matrix. For more details on the use
of this function, see also Integrating over lines, surfaces and volumes 31 .
Integrals over singleton dimension will return zero (i.e. the area under a single point is
zero).
Scripting Language
149
Syntax
Description
See Also
Functions
139
, max
147
, min
147
, interp
148
, find
149
, pinch
146
, round
155
, getdata
181
10.4.27 find
This function will search for entries in a matrix that meet some condition. The indices of
those values are returned.
For multi-dimensional matrixes, the find function will still return a single index. This is
useful when using the output from find in a loop.
Syntax
Description
out = find(x,5e-6);
out = find(x>5);
See Also
Functions
139
, pinch
146
, findpeaks
149
10.4.28 findpeaks
Returns the position of peaks in a matrix. A peak is defined as a data point that is larger
than its nearest neighbors.
Syntax
Description
out = findpeaks(y);
150
Reference Guide
the data, a value of 1 is returned.
findpeaks(y,n);
See Also
Functions
139
, find
149
10.4.29 transpose
Transpose a 1D or 2D matrix.
Syntax
Description
y = transpose(x);
See Also
Functions
139
, ctranspose
150
, flip
10.4.30 ctranspose
Transpose a 1D or 2D matrix and take the complex conjugate of each element.
Syntax
Description
y = ctranspose(x);
See Also
Functions
139
, transpose
150
10.4.31 fft
Compute the 1D, 2D or 3D Fast Fourier Transform (fft) of a matrix. In the 1D case the
transform is given by
The fft, inverse fft and all associated functions have an option (option 1 below) that
controls the format used to store the frequency domain data. When working with spectral
data it is not possible to switch between formats; there are no functions to convert
Scripting Language
151
between formats. This implies that if you use option 1=n to produce a spectrum with fft,
then you must also use option 1=n if you want to pass that same spectral data to invfft.
Similarly, if you use option 1=n for fft, then you also need to use option 1=n with fftw to get
the proper frequency vector corresponding to your spectrum. invfft and fftk work in the
same way.
Syntax
Description
out = fft(Ex);
out = fft(Ex,option1,
option2);
option1
This option controls the format used to store the
frequency domain data. The options are:
1 : the standard fft (zero frequency is at the first
element of the matrix).
2 : zero frequency is the first element, but only data up
to and including the Nyquist frequency is stored. This
option is only useful for real valued, 1D time/spatial
signals.
3 : the fft is shifted so zero frequency is the central
element of the spectrum (precisely, this means the zero
frequency point is at element floor(N/2 + 1), where N is
the number of samples).
option2
This option is either a 1, 2 or 3 element vector depending
on whether Ex is 1D, 2D or 3D. For each dimension,
specify a value of either 0, 1 or N to obtain the desired 0
padding options.
0: no zero padding
1: zero padding up to the next power of 2 longer than
the length of Ex (default)
N: zero pad up to length N if N > length(Ex), where
length of Ex is the length in a specific dimension. If N
<= length(Ex), it will zero pad up to the next power of 2
longer than the length of Ex. For the fastest results, N
should be a power of 2 and can be entered, for
example, as 2^12.
152
Reference Guide
FFT. To convert between the different FFT conventions, switch the invfft and fft and
rescale the results. For a signal y with N elements this can be done as follows:
Lumerical code
Matlab code
fft(y,1,0)
ifft(y)*N
invfft(y,1,0)
fft(y)/N
See Also
Functions
139
, invfft
154
, fftw
152
, fftk
153
, czt
155
10.4.32 fftw
Returns the angular frequency vector corresponding to time vector t.
,
where N=length(t).
fftw and all related functions have an option (option 1 below) that controls the format used
to store the frequency domain data. When working with spectral data it is not possible to
switch between formats; there are no functions to convert between formats. This implies
that if you use option 1=n to produce a spectrum with fft, then you must also use option
1=n if you want to pass that same spectral data to invfft. Similarly, if you use option 1=n
for fft, then you also need to use option 1=n with fftw to get the proper frequency vector
corresponding to your spectrum. Invfft and fftk work in the same way.
Syntax
Description
out = fftw(t);
fftw(t,option1,option2);
Option1
1 : the standard fft (default)
2 : frequencies above the Nyquist frequency are
removed
3 : the fft is shifted so both positive and negative
frequencies are seen
Option2
0: no zero padding
1: zero padding up to the next power of 2 longer than
the length of Ex (default)
N: zero pad up to length N if N > length(Ex). If N <=
length(Ex), it will zero pad up to the next power of 2
longer than the length of Ex. For the fastest results, N
should be a power of 2 and can be entered, for
Scripting Language
153
example, as 2^12.
See Also
Functions
139
, fft
150
, fftk
153
, invfft
154
10.4.33 fftk
Returns the spatial wavevector kx associated with a fourier transform of a function of x.
,
where N=length(x).
fftk and all related functions have an option (option 1 below) that controls the format used
to store the frequency domain data. When working with spectral data it is not possible to
switch between formats; there are no functions to convert between formats. This implies
that if you use option 1=n to produce a spectrum with fft, then you must also use option
1=n if you want to pass that same spectral data to invfft. Similarly, if you use option 1=n
for fft, then you also need to use option 1=n with fftw to get the proper frequency vector
corresponding to your spectrum. Invfft and fftk work in the same way.
Syntax
Description
out = fftk(x);
fftk(x,option1,option2);
Option1
1 : the standard fft (default)
2 : frequencies above the Nyquist frequency are
removed
3 : the fft is shifted so both positive and negative
frequencies are seen
Option2
0: no zero padding
1: zero padding up to the next power of 2 longer than
the length of Ex (default)
N: zero pad up to length N if N > length(Ex). If N <=
length(Ex), it will zero pad up to the next power of 2
longer than the length of Ex. For the fastest results, N
should be a power of 2 and can be entered, for
example, as 2^12.
See Also
Functions
139
, fft
150
, fftw
152
, invfft
154
154
Reference Guide
10.4.34 invfft
Compute the 1D,2D or 3D inverse Fast Fourier Transform (fft) of a matrix. In the 1D case
the transform is given by
The inverse fft, fft and all related functions have an option (option 1 below) that controls
the format used to store the frequency domain data. When working with spectral data it is
not possible to switch between formats; there are no functions to convert between
formats. This implies that if you use option 1=n to produce a spectrum with fft, then you
must also use option 1=n if you want to pass that same spectral data to invfft. Similarly, if
you use option 1=n for fft, then you also need to use option 1=n with fftw to get the proper
frequency vector corresponding to your spectrum. Invfft and fftk work in the same way.
Syntax
Description
out = invfft(x);
invfft(x,option1,option2);
option1
This option controls the format used to store the
frequency domain data. The options are:
1 : the standard fft (zero frequency is at the first
element of the matrix).
2 : zero frequency is the first element, but only data up
to and including the Nyquist frequency is stored. This
option is only useful for real valued, 1D time/spatial
signals.
3 : the fft is shifted so zero frequency is the central
element of the spectrum (precisely, this means the zero
frequency point is at element floor(N/2 + 1), where N is
the number of samples).
option2
This option is either a 1, 2 or 3 element vector depending
on whether Ex is 1D, 2D or 3D. For each dimension,
specify a value of either 0, 1 or N to obtain the desired 0
padding options.
0: no zero padding
1: zero padding up to the next power of 2 longer than
the length of Ex (default)
N: zero pad up to length N if N > length(Ex), where
length of Ex is the length in a specific dimension. If N
<= length(Ex), it will zero pad up to the next power of 2
Scripting Language
155
139
, fft
150
, fftw
152
, fftk
153
10.4.35 czt
Returns the chirped z-transform of a set of data. The czt function is often more
convenient than the standard fft functions because you can specify an arbitrary range of
k.
Syntax
Description
out = czt(Ex,t,w)
czt(Ex,x,y,kx,ky);
See Also
Functions
139
, fft
150
10.4.36 round
Rounds a number to the nearest integer.
Syntax
Description
out = round(x);
See Also
Functions
139
156
Reference Guide
10.4.37 rand
Generate a uniform random number between 0 and 1.
Syntax
Description
out = rand;
out = rand(min,max);
139
, randreset
156
, randmatrix
127
10.4.38 randreset
Resets the random number generator seed.
Syntax
Description
out = randreset;
out = randreset(seed);
See Also
Functions
139
, rand
156
, randmatrix
127
Description
for
For loop.
if
157
If statement.
157
while
157
Scripting Language
157
10.5.1 for
for loops allow some operations to be repeated a number of times. A while loop can be
implemented when using the three argument version of for.
Syntax
Description
for(x=1:100) { ?x; }
x=1;
for(0; x<10; 0) {
?x;
x=x+1;
}
See Also
Loops 156 , if
157
10.5.2 if
The scripting language supports if statements in the following forms:
Syntax
Description
if(x < 5) {
y = x^2;
}
Multi-line if statement
if(x < 5) {
y = x^2;
} else {
y = x^3;
}
If else statement.
if(x < 5) {
if(x > 0) {y = x^2; }
} else {
y = x^3;
}
See Also
158
Reference Guide
Loops
156
, for
157
Description
plot
158
legend
image
setplot
159
159
160
Description
selectfigure
160
Selects a figure.
exportfigure
160
Exports a figure.
closeall
161
10.6.1 plot
Create line plots.
Syntax
Description
out = plot(x,y);
plot(x,y);
x is a nx1 matrix.
y is a nxm matrix.
This will generate a graph with m lines. (y(1:n,1) vs x, y(1:
n,2) vs x, etc)
plot(x,y1,y2,y3);
Scripting Language
159
158
, legend
159
, image
159
, closeall
161
, setplot
160
, exportfigure
160
10.6.2 legend
Add a legend to a line plot.
Syntax
Description
legend
("legend1","legend2",...,
"legendn");
See Also
Plotting commands
158
, legend
159
, plot
158
, closeall
161
10.6.3 image
Create 2D image plots.
Syntax
Description
out = image(x,y,z);
See Also
Plotting commands
158
, plot
158
, closeall
161
, setplot
160
, exportfigure
160
160
Reference Guide
10.6.4 setplot
Set figure properties.
Only available in FDTD Solutions.
Syntax
Description
?setplot;
setplot("property", "property
value");
See Also
Plotting commands
158
, image
159
, plot
158
10.6.5 selectfigure
Selecting a figure will show the figure on screen (give it focus). A warning will be
generated if the figure does not exist.
Syntax
Description
selectfigure;
selectfigure(1);
Selects figure 1.
See Also
Plotting commands
158
, exportfigure
160
, image
159
, plot
158
, setplot
160
, closeall
161
10.6.6 exportfigure
Exports the current figure to a JPG image. If the file extension is not specified, ".jpg" will
be used.
If a file is overwritten, a warning will be generated. If an export fails, a warning will be
generated.
Syntax
Description
exportfigure("filename");
exportfigure("filename",
Scripting Language
width, height);
161
See Also
Plotting commands
158
, selectfigure
160
, image
159
, plot
158
, setplot
160
, closeall
161
10.6.7 closeall
Close all open figure windows.
Syntax
Description
closeall;
See Also
Plotting commands
158
, plot
158
, image
159
Description
deleteall
delete
163
selectall
164
unselectall
select
163
164
164
selectpartial
shiftselect
164
165
shiftselectpartial
165
162
Reference Guide
Command
Description
move
Move an object.
copy
166
Copy an object.
166
addtogroup
166
Object properties
Command
Description
adduserprop
set
167
setnamed
setglobal
get
167
168
168
169
getnumber
getnamed
170
170
getnamednumber
getglobal
importsurface
171
172
importsurface2
173
174
importnk2
171
haveproperty
importnk
171
175
Description
redraw
Redraw graphics.
176
redrawoff
176
redrawon
176
Scripting Language
redrawmode
setview
177
getview
178
orbit
176
178
Description
undo
redo
179
179
10.7.1 deleteall
Deletes all objects in the current TAB.
Syntax
Description
deleteall;
See Also
Manipulating objects
161
, delete
163
, selectall
164
, select
164
10.7.2 delete
Deletes selected objects in the current TAB.
Syntax
Description
delete;
See Also
Manipulating objects
163
161
, deleteall
163
, select
164
, selectall
164
, del
109
164
Reference Guide
10.7.3 selectall
Selects all objects in the current TAB.
Syntax
Description
selectall;
See Also
Manipulating objects
161
, unselectall
164
, select
164
, set
167
, deleteall
163
10.7.4 unselectall
Unselect all objects in the current TAB.
Syntax
Description
unselectall;
See Also
Manipulating objects
161
, select
164
, selectall
164
10.7.5 select
Selects objects with a given name, in the current TAB.
Syntax
Description
select("name");
select("group
name::name");
See Also
Manipulating objects 161 , set 167 , delete 163 , deleteall
selectpartial 164 , shiftselect 165 , shiftselectpartial 165
163
, selectall
164
, unselectall
164
10.7.6 selectpartial
Selects any objects with a given partial name, in the current TAB.
Syntax
Description
selectpartial("partialname");
Scripting Language
165
10.7.7 shiftselect
Same as select, but does not unselect other currently selected objects.
Syntax
Description
shiftselect("name");
shiftselect("group
name::name");
See Also
Manipulating objects
161
, select
164
10.7.8 shiftselectpartial
Same as selectpartial, but does not unselect other currently selected objects.
Syntax
Description
See Also
Manipulating objects
161
, select
164
166
Reference Guide
10.7.9 move
Move selected objects.
Syntax
Description
move(dx);
In 2D or 3D, move by dx
move(dx,dy);
move(dx,dy,dz);
See Also
Manipulating objects
161
, copy
166
, select
164
10.7.10 copy
Copy selected objects.
Syntax
Description
copy;
copy(dx);
copy(dx,dy);
copy(dx,dy,dz);
See Also
Manipulating objects
161
, move
166
, select
164
, cp (copy files)
110
10.7.11 addtogroup
Add selected objects to a group.
Only available in FDTD Solutions.
Syntax
Description
addtogroup("group name");
Scripting Language
167
name" is created.
This function does not return any data.
See Also
Manipulating objects
161
10.7.12 adduserprop
Add user properties to a structure group.
Only available in FDTD Solutions.
Syntax
Description
adduserprop("property
name", type, value);
See Also
Manipulating objects
161
10.7.13 set
Set a property of currently selected objects. This command will return an error in analysis
mode.
Syntax
Description
?set;
set("property",value);
set("property",value,i);
168
Reference Guide
tree. The uppermost selected object is given the index 1,
and the index numbers increase as you go down the tree.
See Also
Manipulating objects
haveproperty 171
161
, get
169
, setnamed
168
, setmaterial
184
, addmaterial
183
10.7.14 setnamed
Like the set command, except that the object name must be specified. This command
will return an error in analysis mode.
Syntax
Description
?setnamed("name");
setnamed("name",
"property", value);
setnamed("name",
"property", value,i);
This form can be used to set the property of the ith named
object when multiple objects have the same name.
The objects are ordered by their location in the object
tree. The uppermost selected object is given the index 1,
and the index numbers increase as you go down the tree.
setnamed("groupname::
name", "property", value);
setnamed("groupname::
name", "property", value,i);
This form can be used to set the property of the ith object
with the name "name" in the group "groupname" when
multiple objects have the same name.
The objects are ordered by their location in the object
tree. The uppermost selected object is given the index 1,
and the index numbers increase as you go down the tree.
See Also
Manipulating objects
161
, set
167
, get
169
, getnamed
170
, getnamednumber
171
10.7.15 setglobal
Used to set the global variables in the current tab. Only applicable in the Sources and
Monitors tabs.
Only available in FDTD Solutions.
Syntax
Description
Scripting Language
169
?setglobal;
out = setglobal("name",
value);
Sets the global variable called "name" for the current tab
to value. Set global returns 1 if it was successful in setting
the values.
See Also
Manipulating objects
161
, getglobal
171
, set
167
, get
169
10.7.16 get
Get a property from selected objects. The property names for the get command are the
same as the property names in the Edit dialogue box. For example, if you see a property
called "mesh accuracy", then you can use the command get("mesh accuracy"); to get that
property. It is possible to get numeric, string, drop down and checkbox properties.
Note: Beam profiles
In addition to the properties available through the Edit dialogue, it is possible to get the
beam profile for gaussian, planewave and mode sources. The property names are "x
vector","y vector","z vector","Ex","Ey","Ez","Hx","Hy", and "Hz". In addition, for mode
sources, the real part of the effective index for the mode can be obtained. This property is
named "neff".
Syntax
Description
?get;
out = get("property");
get("property",i);
Gets the property of the ith selected object. Use this to act
on a series of objects. It cannot be used to get the value
of a selected object in a group.
The objects are ordered by their location in the object
tree. The uppermost selected object is given the index 1,
and the index numbers increase as you go down the tree.
See Also
Manipulating objects
haveproperty 171
161
, getnumber
170
, getnamed
170
, getnamednumber
171
, set
167
170
Reference Guide
10.7.17 getnumber
Get the number of objects that are selected.
Syntax
Description
out = getnumber;
See Also
Manipulating objects
161
, get
169
, getnamed
170
, getnamednumber
171
, set
167
10.7.18 getnamed
Get a property from objects with a given name.
If multiple objects are selected, and the values are different, the smallest value is
returned. To be certain of the results, be sure that only one object is selected, or use the
form of getnamed that allows a specific object to be selected.
Syntax
Description
?getnamed("name");
out = getnamed("name",
"property");
out=getnamed("name",
"property", i);
Gets the property of the ith named object. Use this to act
on a series of objects.
The objects are ordered by their location in the object
tree. The uppermost selected object is given the index 1,
and the index numbers increase as you go down the tree.
out = getnamed
("groupname::name",
"property");
out = getnamed
("groupname::name",
"property");
See Also
Manipulating objects
161
, get
169
, getnumber
170
, getnamednumber
171
, set
167
, setnamed
168
Scripting Language
171
10.7.19 getnamednumber
Get the number of objects with a given name.
Syntax
Description
out = getnamednumber
( "name");
out = getnamednumber
( "groupname::name");
See Also
Manipulating objects
161
, get
169
, getnamed
170
, getnumber
170
, set
167
, setnamed
168
10.7.20 getglobal
Get the value of global properties in the current tab. Only applicable in the Sources and
Monitors tabs.
Only available in FDTD Solutions.
Syntax
Description
?getglobal;
out = getglobal("name");
See Also
Manipulating objects
161
, setglobal
168
, set
167
, get
169
10.7.21 haveproperty
Returns the number of selected objects with a particular property.
Syntax
Description
out = haveproperty
("property");
See Also
Manipulating objects
161
, get
169
, set
167
172
Reference Guide
10.7.22 importsurface
Import surface data. This command only applies to import primitives. The function returns
1 if the data is successfully imported. Example script files showing how to use these
functions can be found in the Online Help. See the User Guide, Structures section.
Syntax
Description
out = importsurface(filename,
Import a surface from the file in the string filename
upper_surface,file_units,x0,y0,z0, in a three dimensional simulation. All arguments
invertXY);
after filename are optional.
out = importsurface(filename,
upper_surface,file_units,x0,y0,
invertXY);
Parameter
filename
upper_surface
file_units
Default value
Type
Description
required
string
"m"
x0
y0
number
z0
number
invertXY
Scripting Language
See Also
Manipulating objects
161
, importsurface2
173
173
10.7.23 importsurface2
Import surface data from script variables. This command only applies to import primitives.
The function returns 1 if the data is successfully imported. Example script files showing
how to use these functions can be found in the Online Help. See the User Guide,
Structures section.
Syntax
Description
out = importsurface2(Z,x,y,
upper_surface);
out = importsurface2(Y,x,
upper_surface);
Parameter
Default value
Type
Description
required
matrix
required
matrix
required
matrix
upper_surface
See Also
Manipulating objects
required
161
, importsurface
172
matrix
174
Reference Guide
10.7.24 importnk
Import the refractive index (n and k) over an entire volume or surface from a file. This
command only applies to import primitives. The function returns 1 if the data is
successfully imported. Example script files showing how to use these functions can be
found in the Online Help. See the User Guide, Structures section.
Syntax
Description
Default value
Type
Description
filename
required
string
file_units
"m"
string
x0
y0
number
z0
number
reverse_index_order
Scripting Language
175
161
, importnk2
175
10.7.25 importnk2
Import the refractive index (n and k) over an entire volume or surface from script
variables. This command only applies to import primitives. The function returns 1 if the
data is successfully imported. Example script files showing how to use these functions
can be found in the Online Help. See the User Guide, Structures section.
Syntax
Description
out = importnk2(n,x,y,z);
out = importnk2(n,x,y);
Parameter
Default value
Type
Description
required
matrix
required
matrix
required
matrix
See Also
176
Reference Guide
Manipulating objects
161
, importnk
174
10.7.26 redraw
Redraws graphics.
Syntax
Description
redraw;
Redraws graphics.
This function does not return any data.
See Also
Manipulating objects
161
, redrawon
176
, redrawoff
176
, redrawmode
176
10.7.27 redrawoff
This command will prevent redrawing while a script file is executing, unless you explicitly
request a redraw with the redraw command. This can speed up the execution of a script
file if you are manipulating many objects.
Syntax
Description
redrawoff;
See Also
Manipulating objects
161
, redrawon
176
, redraw
176
, redrawmode
176
10.7.28 redrawon
This command turns the redrawing back on. The graphics will be redrawn after any script
command that may change the properties of a graphical object.
Syntax
Description
redrawon;
See Also
Manipulating objects
161
, redraw
176
, redrawoff
176
, redrawmode
176
10.7.29 redrawmode
This command can be used to determine the current status of automatic redrawing. It can
also be used to set the current status of automatic redrawing. The graphics will be
redrawn after any script command that may change the properties of a graphical object.
Scripting Language
177
Syntax
Description
out = redrawmode;
out = redrawmode(in);
See Also
Manipulating objects
161
, redraw
176
, redrawoff
176
10.7.30 setview
This command allows the viewing properties of the Layout Editor to be modified.
Syntax
Description
outstring = setview;
setview("property");
Sets the default value for any of the view properties. For
example,
setview("extent");
is the same as pressing the graphical extent button.
setview("property",value);
zoom
theta
178
Reference Guide
phi
See Also
Manipulating objects
161
, getview
178
, orbit
178
, redraw
176
10.7.31 getview
This command allows the viewing properties of the Layout Editor to be retrieved.
Syntax
Description
outstring = getview;
out = getview("property");
The properties that can be obtained with getview are described in setview
See Also
Manipulating objects
161
, setview
177
, orbit
178
, redraw
177
176
10.7.32 orbit
This command performs an elliptical viewing orbit of the structure in the perspective view.
Note that the commands setview 177 , getview 178 and redraw 176 make it possible to
create any type of orbit you would like in your own script file.
Syntax
Description
orbit;
orbit(zoom_factor);
orbit(zoom_factor, frame_rate);
orbit(zoom_factor, frame_rate,
"filename");
Scripting Language
See Also
Manipulating objects
161
, setview
177
, getview
179
178
10.7.33 undo
Undo the last command that modified any objects, you can undo the last 5 commands.
Syntax
Description
undo;
See Also
Manipulating objects
161
, redo
179
10.7.34 redo
Redo a command after a previous undo.
Syntax
Description
redo;
See Also
Manipulating objects
161
, undo
179
180
havedata
180
180
Reference Guide
card.
copydcard
181
cleardcard
181
Clears a d-card.
181
getelectric
Get |E|2
182
getmagnetic
Get |H|2
182
182
10.8.1 showdata
Provides a list of existing d-cards, or shows the data contained in a specific d-card. To
retrieve data from the d-card, use getdata.
Syntax
Description
out = showdata;
showdata("name");
See Also
Measurements
179
, getdata
181
, havedata
180
, copydcard
181
, cleardcard
181
, workspace
129
10.8.2 havedata
Used to see if there is any data stored within a d-card.
Only available in FDTD Solutions.
Syntax
Description
havedata;
havedata("name");
Scripting Language
See Also
Measurements
179
, getdata
181
, copydcard
181
, cleardcard
181
, workspace
181
129
10.8.3 copydcard
Will create a global copy of any d-card currently in memory.
Syntax
Description
copydcard( "name");
copydcard( "name",
"newname");
See Also
Measurements
179
, showdata
180
, havedata
180
, cleardcard
181
10.8.4 cleardcard
Clears global d-cards. Only global d-cards are cleared. Local d-cards are associated
with the current simulation and can only be cleared by switching from Analysis Mode to
Layout Mode.
Syntax
Description
cleardcard;
cleardcard( "name1",
"name2", ...);
See Also
Measurements
179
, showdata
180
, havedata
180
, copydcard
181
10.8.5 getdata
Gets monitor data from a d-card. To see what data is available, use showdata. The
output of this function will be normalized if the CW norm option is enabled.
Syntax
Description
out = getdata
( "monitorname",
"dataname");
182
Reference Guide
"Monitor1".
getdata( "monitorname",
"dataname", option);
See Also
Measurements 179 , showdata
208 , cwnorm 208
180
, havedata
180
, getelectric
182
, getmagnetic
182
, nonorm
10.8.6 getelectric
Returns the sum of the amplitude squares for all electric field components, i.e. it returns |
Ex|2+|Ey|2+|Ez|2.
Syntax
Description
out = getelectric
( "monitorname");
See Also
Measurements
179
, showdata
180
, getdata
181
, getmagnetic
182
, cwnorm
208
, nonorm
208
10.8.7 getmagnetic
Returns the sum of the amplitude squares for all magnetic field components, i.e. it returns
|Hx|2+|Hy|2+|Hz|2.
Syntax
Description
out = getmagnetic
( "monitorname");
See Also
Measurements
179
, showdata
180
, getdata
181
, getelectric
182
, cwnorm
208
, nonorm
208
Scripting Language
183
Description
addmaterial
183
copymaterial
183
setmaterial
184
getmaterial
184
getindex
185
getfdtdindex
185
10.9.1 addmaterial
Adds a new material to the material database.
Syntax
Description
?addmaterial;
out = addmaterial
("materialtype");
See Also
Material database
183
, setmaterial
184
, getindex
185
, getfdtdindex
10.9.2 copymaterial
Makes a copy of a material in the material database.
Only available in FDTD Solutions.
Syntax
Description
185
184
Reference Guide
out = copymaterial
("materialname");
See Also
Material database
183
, setmaterial
184
, getindex
185
, getfdtdindex
185
10.9.3 setmaterial
Modifies properties of a material in the material database.
Syntax
Description
?setmaterial;
setmaterial
( "materialname");
setmaterial
Sets the property named "propertyname" of the material
( "materialname",
with the name "materialname" to newvalue. The argument
"propertyname", newvalue); newvalue can be a number or a string. The arguments
"propertyname" and "materialname" have to match
correct string exactly. For example,
setmaterial("Si","Mesh order",4);
will set the property "mesh order" of the materials "Si" to
4.
See Also
Material database
183
, addmaterial
183
, getmaterial
184
, getindex
185
, getfdtdindex
185
10.9.4 getmaterial
Returns properties of a material in the material database.
Syntax
Description
?getmaterial
( "materialname");
out = getmaterial
( "materialname",
"propertyname");
See Also
Material database
183
, addmaterial
183
, setmaterial
184
, getindex
185
, getfdtdindex
185
Scripting Language
185
10.9.5 getindex
Returns the complex index of any material that is in the material database. The index at
the specified frequency is interpolated from the neighboring frequencies where the index
data is available.
Syntax
Description
out = getindex
( "materialname", f);
183
, getfdtdindex
185
, addmaterial
183
, setmaterial
184
10.9.6 getfdtdindex
This function returns the material index of a material in the database as it will be used in
an actual FDTD simulation.
In FDTD Solutions, many materials (such as Experimental materials) have properties that
depend on frequency. Using getfdtdindex, you can specify frequency range, and the fitting
routine will find a best fit of the material data over that range. The index evaluated at the
specified f is then returned. Note that the fit result depends on the fit parameters, Max
coefficients and Tolerance set for the material, thus getfdtdindex result depends on those
parameters as well.
Syntax
Description
out = getfdtdindex
( "materialname", f, fmin,
fmax);
getfdtdindex
("materialname", f,fmin,
fmax, component);
See Also
Material database
183
, getindex
185
, addmaterial
183
, setmaterial
184
186
Reference Guide
Command
Description
message
186
newwizard
187
newwizardpage
wizardwidget
runwizard
187
188
wizardgetdata
killwizard
187
188
188
wizardoption
189
fileopendialog
189
filesavedialog
190
10.10.1 message
Creates a message window that displays some text. The user must hit Enter, or click the
OK button to continue.
Syntax
Description
message("text");
See Also
User defined GUI
186
, newwizard
187
Scripting Language
187
10.10.2 newwizard
Used to create a new user defined wizard. Opens a new wizard window.
Syntax
Description
newwizard( w, h, "title");
See Also
User defined GUI
186
, message
186
10.10.3 newwizardpage
This creates a page for the wizard and should be done before adding any widgets.
Syntax
Description
newwizardpage( "label1");
newwizardpage( "label1",
"label2");
See Also
User defined GUI
186
, newwizardpage
187
10.10.4 wizardwidget
Adds a new widget to the current wizard window. This command should only be done
after creating a new wizard page with the command newwizard.
Syntax
Description
wizardwidget( "type",
"name");
type can be
"number" for a numeric input field
"string" for a alphanumeric field
"checkbox" for a checkbox
"menu" for a pulldown menu field
"label" to add a string label (wizardgetdata does not
return information for labels)
name is a string used to give the input field, checkbox,
menu item or label a name.
wizardwidget( "type", "label", defaultValue provides a default value for numeric inputs,
defaultValue);
checkboxes, menu items or strings.
188
Reference Guide
If the "type" of widget is a "menu", then the menu choices
must be provided. These choices should be separated by
the character "|". For example, to create a pulldown
wizardwidget( "type", "label",
widget with the name "simulation type" and 3 choices
"choices", defaultValue);
"TE","TM","3D", with the default choice "3D", the
command is
wizardwidget("menu","simulation type","TE|TM|3D",3);
See Also
User defined GUI
186
, newwizardpage
187
10.10.5 runwizard
Runs the wizard and returns a value indicating which button was pressed.
Syntax
Description
out = runwizard;
See Also
User defined GUI
186
, newwizardpage
187
10.10.6 wizardgetdata
Returns data entered into a specific widget.
This function is only available in MODE Solutions.
Syntax
Description
out = wizardgetdata(N);
See Also
User defined GUI
186
Returns the value that the user entered into the Nth
widget. Out will be a number or a string, depending on the
type of widget.
, newwizardpage
187
10.10.7 killwizard
This closes the wizard window. It should only be called after a wizard window has been
created with the newwizard command.
Syntax
Description
Scripting Language
killwizard;
See Also
User defined GUI
189
186
, newwizardpage
187
10.10.8 wizardoption
Sets some options for wizard widgets and labels.
Syntax
Description
186
, newwizard
187
10.10.9 fileopendialog
Calls the standard windows file open dialog.
This function is only available in MODE Solutions.
Syntax
Description
out = fileopendialog;
Brings up the open file dialog box and returns the path
that the user selects.
out = fileopendialog(".ext");
See Also
User defined GUIs
186
, filesavedialog
190
190
Reference Guide
10.10.10 filesavedialog
Calls the standard windows file save dialog.
This function is only available in MODE Solutions.
Syntax
Description
out = filesavedialog;
Brings up the save file dialog box and returns the path
that the user selects.
out = filesavedialog(".ext");
See Also
User defined GUIs
186
, fileopendialog
189
Description
new2d
194
new3d
195
load
save
run
195
196
196
runparallel
197
setparallel
197
runanalysis
198
Description
structures
198
simulation
198
sources
199
monitors
199
Scripting Language
switchtolayout
layoutmode
199
199
Adding objects
Command
Description
addcircle
200
addcustom
addimport
200
200
addpyramid
201
addpoly
201
addrect
201
addring
201
addsphere
addsurface
addfdtd
202
202
addstructuregroup
202
203
addmesh
203
adddipole
203
addgaussian
203
addplane
204
addmode
204
addtfsf
204
addimportedsource
addindex
addtime
191
205
205
205
addmovie
205
addprofile
206
addpower
206
192
Reference Guide
addanalysisgroup
206
Description
setsourcesignal
207
updatesourcemode
clearsourcedata
getsourceangle
207
207
208
nonorm
208
Use no normalization.
cwnorm
208
Use CW normalization.
sourcenorm
209
sourcenorm2_avg
sourcenorm2_pavg
dipolepower
210
211
sourcepower_avg
212
sourcepower_pavg
sourceintensity
211
sourcepower
213
215
sourceintensity_pavg
215
216
transmission_avg
214
sourceintensity_avg
transmission
209
217
Scripting Language
transmission_pavg
Command
farfieldfilter
farfield2d
218
Description
The far field filter is used to remove ripples in the far
field projection due to clipping of the near fields. It
should be used when the near fields at the edge of
the monitor are small but not precisely zero.
221
222
farfieldvector2d
farfieldpolar2d
farfieldangle
farfield3d
217
193
223
223
224
225
farfieldvector3d
farfieldpolar3d
226
226
farfieldux
227
farfielduy
227
farfieldspherical
farfieldexact2d
227
229
194
Reference Guide
farfieldexact3d
farfieldexact
230
231
farfield2dintegrate
224
farfield3dintegrate
228
Grating calculations
232
Command
Description
grating
233
gratingn
233
gratingm
234
gratingpolar
234
gratingvector
235
gratingperiod1
236
gratingperiod2
236
gratingbloch1
236
gratingbloch2
237
gratingu1
236
gratingu2
237
gratingangle
237
10.11.1 new2d
Creates a new 2D layout environment.
Syntax
Description
new2d;
Scripting Language
new2d(option);
See Also
FDTD toolbox
190
195
, new3d
195
10.11.2 new3d
Creates a new 3D layout environment.
Syntax
Description
new3d;
new3d(option);
See Also
FDTD toolbox
190
, new2d
194
10.11.3 load
Loads an fsp file. These files contain all the simulation setup such as physical structures,
source position, etc. If the simulation has already been run, the file will also contain
simulation results.
Syntax
Description
load("filename.fsp");
See Also
FDTD toolbox
190
, loaddata
116
, save
196
, savedata
116
, savedcard
117
196
Reference Guide
10.11.4 save
Saves an fsp file. These files contain all the simulation setup such as physical structures,
source position, etc. If the simulation has already been run, the file will also contain
simulation results.
Syntax
Description
save;
save("filename.fsp");
See Also
FDTD toolbox
190
, load
195
, loaddata
116
, savedata
116
, savedcard
117
10.11.5 run
Launch the simulation. When the simulation finishes, all simulation data will be saved to
the current file.
Syntax
Description
run;
run(option1);
run(option1,option2);
run(option1,option2,
filename);
Scripting Language
the extension ".lmf".
See Also
FDTD toolbox
190
, runparallel
197
, runanalysis
198
10.11.6 runparallel
Launch the simulation in parallel mode. Equivalent to run(3). When the simulation
finishes, all simulation data will be saved to the current file.
Syntax
Description
runparallel;
See Also
FDTD toolbox
190
, run
196
, setparallel
197
, runanalysis
198
10.11.7 setparallel
Sets the options required for parallel simulations. The property to be set has the same
name as shown in the Parallel Computing Options Window, as shown below. The
property name is not case sensitive and does not have to be complete: for example,
"command line arguments <args>" can be replace with "command line".
Syntax
Description
197
198
Reference Guide
setparallel("number of
nodes",8);
See Also
FDTD toolbox
190
, runparallel
197
10.11.8 runanalysis
Runs the analysis script in analysis objects.
Syntax
Description
runanalysis;
runanalysis("group name");
See Also
FDTD toolbox
190
, run
196
10.11.9 structures
Switch to the STRUCTURES TAB.
Syntax
Description
structures;
See Also
FDTD toolbox
190
, switchtolayout
199
10.11.10 simulation
Switch to the SIMULATION TAB.
Syntax
Description
simulation;
See Also
FDTD toolbox
190
, switchtolayout
199
Scripting Language
10.11.11 sources
Switch to the SOURCES TAB.
Syntax
Description
sources;
See Also
FDTD toolbox
190
, switchtolayout
199
10.11.12 monitors
Switch to the MONITORS TAB.
Syntax
Description
monitors;
See Also
FDTD toolbox
190
, switchtolayout
199
10.11.13 switchtolayout
Closes the analysis window and allows you to manipulate simulation objects for a new
simulation. If a simulation file is open in ANALYSIS mode, any commands to modify
objects will return errors. You must switch to LAYOUT mode before modifying any ob
jects.
Syntax
Description
switchtolayout;
See Also
FDTD toolbox
190
, layoutmode
199
10.11.14 layoutmode
Used to determine if the simulation file is open in layout or in analysis mode.
Syntax
Description
?layoutmode;
199
200
Reference Guide
See Also
FDTD toolbox
190
, switchtolayout
199
10.11.15 addcircle
Adds a circle primitive to the simulation environment. If necessary, the structures TAB
will be selected before adding the object.
Syntax
Description
addcircle;
See Also
FDTD toolbox
190
10.11.16 addcustom
Adds a custom primitive to the simulation environment. If necessary, the structures TAB
will be selected before adding the object.
Syntax
Description
addcustom;
See Also
FDTD toolbox
190
10.11.17 addimport
Adds an import primitive to the simulation environment. If necessary, the structures TAB
will be selected before adding the object.
Syntax
Description
addimport;
See Also
FDTD toolbox
190
Scripting Language
201
10.11.18 addpyramid
Adds a pyramid primitive to the simulation environment. If necessary, the structures TAB
will be selected before adding the object.
Syntax
Description
addpyramid;
See Also
FDTD toolbox
190
10.11.19 addpoly
Adds a polygon primitive to the simulation environment. If necessary, the structures TAB
will be selected before adding the object.
Syntax
Description
addpoly;
See Also
FDTD toolbox
190
10.11.20 addrect
Adds a rectangle primitive to the simulation environment. If necessary, the structures
TAB will be selected before adding the object.
Syntax
Description
addrect;
See Also
FDTD toolbox
190
10.11.21 addring
Adds a ring primitive to the simulation environment. If necessary, the structures TAB will
be selected before adding the object.
Syntax
Description
addring;
202
Reference Guide
This function does not return any data.
See Also
FDTD toolbox
190
10.11.22 addsphere
Adds a sphere primitive to the simulation environment. If necessary, the structures TAB
will be selected before adding the object.
Syntax
Description
addsphere;
See Also
FDTD toolbox
190
10.11.23 addsurface
Adds a surface primitive to the simulation environment. If necessary, the structures TAB
will be selected before adding the object.
Syntax
Description
addsurface;
See Also
FDTD toolbox
190
10.11.24 addstructuregroup
Adds a structure group to the simulation environment. If necessary, the structures TAB
will be selected before adding the object.
Syntax
Description
addstructuregroup;
See Also
FDTD toolbox
190
, addtogroup
166
, adduserprop
167
, addanalysisgroup
206
Scripting Language
203
10.11.25 addfdtd
Adds a FDTD simulation area to the simulation environment. If necessary, the simulation
TAB will be selected before adding the object.
Syntax
Description
addfdtd;
See Also
FDTD toolbox
190
10.11.26 addmesh
Adds a mesh override region to the simulation environment. If necessary, the simulation
TAB will be selected before adding the object.
Syntax
Description
addmesh;
See Also
FDTD toolbox
190
10.11.27 adddipole
Adds a dipole source to the simulation environment. If necessary, the sources TAB will
be selected before adding the object.
Syntax
Description
adddipole;
See Also
FDTD toolbox
190
10.11.28 addgaussian
Adds a gaussian source to the simulation environment. If necessary, the sources TAB
will be selected before adding the object.
Syntax
Description
204
Reference Guide
addgaussian;
See Also
FDTD toolbox
190
10.11.29 addplane
Adds a plane wave source to the simulation environment. If necessary, the sources TAB
will be selected before adding the object.
Syntax
Description
addplane;
See Also
FDTD toolbox
190
10.11.30 addmode
Adds a mode source to the simulation environment. If necessary, the sources TAB will
be selected before adding the object.
Syntax
Description
addmode;
See Also
FDTD toolbox
190
10.11.31 addtfsf
Adds a Total Field Scattered Field (tfsf) source to the simulation environment. If
necessary, the sources TAB will be selected before adding the object.
Syntax
Description
addtfsf;
See Also
FDTD toolbox
190
Scripting Language
205
10.11.32 addimportedsource
Adds an imported source to the simulation environment. If necessary, the sources TAB
will be selected before adding the object.
Syntax
Description
addimportedsource;
See Also
FDTD toolbox
190
, asapimport
119
, asapload
118
, asapexport
118
10.11.33 addindex
Adds an index monitor to the simulation environment. If necessary, the monitors TAB will
be selected before adding the object.
Syntax
Description
addindex;
See Also
FDTD toolbox
190
10.11.34 addtime
Adds a time monitor to the simulation environment. If necessary, the monitors TAB will
be selected before adding the object.
Syntax
Description
addtime;
See Also
FDTD toolbox
190
10.11.35 addmovie
Adds a movie monitor to the simulation environment. If necessary, the monitors TAB will
be selected before adding the object.
Syntax
Description
addmovie;
206
Reference Guide
This function does not return any data.
See Also
FDTD toolbox
190
10.11.36 addprofile
Adds a profile monitor to the simulation environment. If necessary, the monitors TAB will
be selected before adding the object.
Syntax
Description
addprofile;
See Also
FDTD toolbox
190
10.11.37 addpower
Adds a power monitor to the simulation environment. If necessary, the monitors TAB will
be selected before adding the object.
Syntax
Description
addpower;
See Also
FDTD toolbox
190
10.11.38 addanalysisgroup
Adds an analysis group to the simulation environment. If necessary, the monitors TAB
will be selected before adding the object.
Syntax
Description
addanalysisgroup;
See Also
FDTD toolbox
190
, addtogroup
166
, addstructuregroup
202
Scripting Language
207
10.11.39 setsourcesignal
Sets a custom source time signal.
This is an advanced source setting for users wanting a custom source time signal. For
the vast majority of simulations, a custom time signal is not required. If this function is not
used, the time signal will be automatically generated by FDTD Solutions.
Syntax
Description
190
, sourcepower
211
10.11.40 updatesourcemode
Updates the mode profile of a MODE source. If there is no mode profile stored in the
source, then the mode with the highest effective index will be selected. If a mode is
already stored in the source, then the mode with the best overlap with the old mode will
be selected.
Syntax
Description
updatesourcemode;
See Also
FDTD toolbox
190
, addmode
204
, clearsourcedata
207
10.11.41 clearsourcedata
Clears source data for an imported source, or the selected mode for a mode source.
Syntax
Description
clearsourcedata;
See Also
FDTD toolbox
190
, updatesourcemode
207
, asapimport
119
, asapload
118
, asapexport
118
208
Reference Guide
10.11.42 getsourceangle
Broadband sources inject fields that have a constant in-plane wavevector at all
frequencies. Therefore, the injection angle must change as a function of frequency. The
in-plane wavevector is chosen such that the incidence angle at the center frequency of
the simulation will match the source angle theta specified in the source properties.
Higher frequencies will be injected at smaller angles, while lower frequencies will be
injected at larger angles.
This function returns the injection angle as a function of frequency.
Syntax
Description
theta = getsourceangle(
"sourcename", f);
See Also
FDTD toolbox 190 , sourcepower
injection angles
211
10.11.43 nonorm
Do not normalized the data to the source power. The actual field intensities will be used
in all calculations.
This function controls the checkbox located in Settings - Frequency domain.
Syntax
Description
nonorm;
Use no normalization.
This function does not return any data.
See Also
FDTD toolbox
190
, cwnorm
208
20
10.11.44 cwnorm
Use CW normalization. All simulation data will be normalized to the injected source
power. Most users prefer to do their analysis in the CW normalization state, since it
removes any effect caused by the finite pulse length of the source. It also converts the
units of all electromagnetic fields to be the same as in the time domain.
This function controls the checkbox located in Settings - Frequency domain.
Syntax
Description
cwnorm;
Use CW normalization.
This function does not return any data.
Scripting Language
See Also
FDTD toolbox
190
, nonorm
208
209
20
10.11.45 sourcenorm
Returns the source normalization spectrum used to normalize data in the cwnorm state
for standard fourier transform quantities. See the Units and normalization chapter for
more information.
If the source time signal of the jth source in the simulation is sj(t), and N is the number of
active sources then
Syntax
Description
out = sourcenorm(f);
See Also
FDTD toolbox 190 , sourcenorm2_avg 209 , sourcenorm2_pavg
cwnorm 208 , nonorm 208 , Units and Normalization 20
210
, sourcepower
211
10.11.46 sourcenorm2_avg
Returns the source normalization spectrum used to normalize data in the cwnorm state
for the total spectral averaged quantities. See the Units and normalization - Spectral
averaging 24 section for more information.
The script function sourcenorm is defined as
Syntax
Description
210
Reference Guide
out = sourcenorm2_avg;
out = sourcenorm2_avg(
"sourcename");
See Also
FDTD toolbox 190 , sourcenorm 209 , sourcenorm2_pavg 210 , sourcepower_avg
cwnorm 208 , nonorm 208 , Units and Normalization 20 , Spectral averaging 24
212
10.11.47 sourcenorm2_pavg
Returns the source normalization spectrum used to normalize data in the cwnorm state
for the partial spectral averaged quantities. See the Units and normalization - Spectral
averaging 24 section for more information.
If the source time signal of the jth source in the simulation is sj(t), and N is the number of
active sources then
Partial spectral averaging uses a Lorentzian weighting of the following form. Delta is the
FWHM of |h|2.
Syntax
Description
out = sourcenorm2_pavg( f, This function returns the source normalization for partial
delta);
spectral averaged quantities.
out = sourcenorm2_pavg( f, This function makes it possible to perform the
delta, "sourcename");
normalization using the spectrum of one source, rather
than the sum of all the sources.
See Also
FDTD toolbox
190
, sourcenorm
209
, sourcenorm2_avg
209
, sourcepower_pavg
213
Scripting Language
cwnorm
208
, nonorm
208
20
, Spectral averaging
211
24
10.11.48 dipolepower
Returns the power injected into the simulation region by a dipole source. In 3D
simulations, the units will be in Watts if cw norm is used, and Watts/Hertz2 if no norm is
used.
The dipolepower script command returns the power that was injected into the simulation
region, and is equivalent to measuring the power transmitted out of a small box
surrounding the dipole. In contrast, sourcepower 211 will return the power that an ideal
dipole would radiate in a homogeneous material. dipolepower and sourcepower are
equivalent for homogeneous materials.
Advanced notes:
There can be some numerical errors in this calculation that become significant when
small mesh sizes are used. If the mesh step is the order of, or smaller than, l/500, it
may be necessary to measure this quantity using a small box of power monitors
surrounding the dipole.
If the dipole is injected into a dispersive medium with a non-zero imaginary part of the
refractive index, then the results of this function are not reliable.
Please contact support@lumerical.com for more assistance if you are using a dipole in
dispersive medium, or in a fine mesh region, and would like to calculate the total power
emitted by the dipole.
Syntax
Description
out = dipolepower(f);
See Also
FDTD toolbox 190 , sourcenorm 209 , sourcepower 211 , sourcepower_avg 212 ,
sourcepower_pavg 213 , transmission 216 , cwnorm 208 , nonorm 208 , Units and
Normalization 20
10.11.49 sourcepower
Returns the power injected into the simulation by the source. In 3D simulations, the units
will be in Watts if CW norm is used, and Watts/Hertz2 if No norm is used.
The exact output of sourcepower depends on the type of source used.
For beam sources (plane wave, gaussian, etc), each source records the poynting vector
2003 - 2009 Lumerical Solutions, Inc
212
Reference Guide
at its position, which is integrated to give the sources injected power.
For point sources (dipoles), sourcepower will return the power that an ideal dipole would
inject into homogeneous material. Use the dipolepower 211 script function to obtain the
power that was actually injected into the simulation region.
Syntax
Description
out = sourcepower(f);
out = sourcepower(f,
option);
20
10.11.50 sourcepower_avg
Returns the total spectral average power injected into the simulation by the source. See
the Units and normalization - Spectral averaging 24 section for more information.
This script function calculates the following quantities, depending on whether the
normalization state is cwnorm or nonorm:
Scripting Language
213
where sourcepower is the quantity returned by the sourcepower script function, s(w) is
returned by sourcenorm, and w=2pf. Typically, this function should be used in the cwnorm
state. Also see the sourcenorm2_pavg script function.
Syntax
Description
out = sourcepower_avg;
out =
sourcepower_avg(option);
out =
sourcepower_avg(option,
"sourcename");
See Also
FDTD toolbox 190 , sourcenorm2_avg 209 , sourcepower 211 , sourcepower_pavg 213 ,
transmission_avg 217 , cwnorm 208 , nonorm 208 , Units and Normalization 20 , Spectral
averaging 24
10.11.51 sourcepower_pavg
Returns the partial spectral average power injected into the simulation by the source. See
the Units and normalization - Spectral averaging 24 section for more information.
Partial spectral averaging uses a Lorentzian weighting of the form
This script function calculates the following quantities, depending on whether the
normalization state is cwnorm or nonorm:
214
Reference Guide
where sourcepower is the quantity returned by the sourcepower script function, s(w) is
returned by sourcenorm, and w=2pf. Typically, this function should be used in the cwnorm
state. Also see the sourcenorm2_pavg script function.
Syntax
Description
out = sourcepower_pavg(f);
out = sourcepower_pavg(f,
option);
out = sourcepower_pavg(f,
option, "sourcename");
See Also
FDTD toolbox 190 , sourcenorm2_pavg 210 , sourcepower 211 , sourcepower_avg 212 ,
transmission_pavg 217 , cwnorm 208 , nonorm 208 , Units and Normalization 20 , Spectral
averaging 24
10.11.52 sourceintensity
Sourceintensity returns the source power divided by the area of the source. In 3D
simulations, the units will be in Watts/m2 if CW norm is used, and Watts/m2/Hertz2 if No
norm is used. For more information see the sourcepower 211 script command.
Syntax
Description
out = sourceintensity(f);
out = sourceintensity(f,
option);
Scripting Language
215
See Also
FDTD toolbox 190 , sourcenorm 209 , sourcepower 211 , sourceintensity_avg 215 ,
sourceintensity_pavg 215 , dipolepower 211 , transmission 216 , cwnorm 208 , nonorm
Units and Normalization 20
208
10.11.53 sourceintensity_avg
Returns the total spectral average intensity injected into the simulation by the source. The
average intensity is equal to the average power divided by the source area. See the
sourcepower_pavg 213 command and the Units and normalization - Spectral averaging 24
section for more information.
Syntax
Description
out = sourceintensity_avg;
out =
The additional argument, option, can have a value of 1 or
sourceintensity_avg(option); 2. If it is 2, the data is unfolded where possible according
to the symmetry or anti-symmetric boundaries if it comes
from a monitor that intersect such a boundary at x min, y
min or z min. The default value of option is 2.
out =
sourceintensity_avg(option,
"sourcename");
See Also
FDTD toolbox 190 , sourcenorm2_avg 209 , sourceintensity 214 , sourcepower 211 ,
transmission_avg 217 , cwnorm 208 , nonorm 208 , Units and Normalization 20 , Spectral
averaging 24
10.11.54 sourceintensity_pavg
Returns the partial spectral average intensity injected into the simulation by the source.
The partial average intensity is equal to the partial average power divided by the source
area. See the sourcepower_pavg 213 command and the Units and normalization Spectral averaging 24 section for more information.
216
Reference Guide
Syntax
Description
out =
sourceintensity_pavg(f);
out =
sourceintensity_pavg(f,
option);
out =
sourceintensity_pavg(f,
option, "sourcename");
See Also
FDTD toolbox 190 , sourcenorm2_pavg 210 , sourcepower 211 , sourcepower_avg 212 ,
transmission_pavg 217 , cwnorm 208 , nonorm 208 , Units and Normalization 20 , Spectral
averaging 24
10.11.55 transmission
The transmission function returns the amount of power transmitted through power
monitors and profile monitors, normalized to the source power. The transmission is
calculated with the following formula.
Description
out = transmission(
"monitorname");
out = transmission(
"monitorname", option);
Scripting Language
See Also
FDTD toolbox 190 , sourcepower
transmission_pavg 217
211
, dipolepower
211
, transmission_avg
217
217
10.11.56 transmission_avg
Returns the total spectral average power through a monitor surface, normalized to the
total spectral average of the source. See the Units and normalization - Spectral averaging
24 section for more information.
Description
out = transmission_avg(
"monitorname");
out = transmission_avg(
"monitorname", option);
See Also
FDTD toolbox 190 , sourcepower_avg 212 , transmission
and Normalization 20 , Spectral averaging 24
216
, transmission_pavg
217
, Units
10.11.57 transmission_pavg
Returns the partial spectral average power through a monitor surface, normalized to the
partial spectral average of the source. See the Units and normalization - Spectral
averaging 24 section for more information.
218
Reference Guide
dS is the surface normal
The normalization state (cwnorm or nonorm) does not affect the result because of the
source power normalization.
Syntax
Description
out = transmission_pavg(
"monitorname" );
out = transmission_pavg(
"monitorname", option );
See Also
FDTD toolbox 190 , sourcepower_pavg 213 , transmission
and Normalization 20 , Spectral averaging 24
216
, transmission_avg
217
, Units
Scripting Language
219
wavelengths.
Case 2
The electromagnetic fields are known on the
surface of a box. The field can be projected to
any point outside the box.
It is necessary to surround the scattering
object with 6 surface monitors and add the
results of 6 projections coherently using an
exact far field projection. This projection is
slow because it does not make use of ffts. This
projection can be used to calculate the fields
as close as a few wavelengths from where
they were recorded.
Field normalization
The far field projection functions farfield2d, farfield3d, farfieldvector2d,
farfieldvector3d, farfieldpolar2d and farfieldpolar3d return either the
complex electric field( ) or electric field intensity (|E|2) at a distance of 1m. To scale the
field to a different distance we can recognize that the electric field intensity decreases like
1/R in 2D and 1/R2 in 3D. This means that
|E(R)|2 = |E0|2/R in 2D
|E(R)|2 = |E0|2/R2 in 3D
where E0 is the field at a distance of 1 m as returned by the far field scripting functions
and R is measured in meters. The electric field will scale as
in 2D
in 3D
Power Integrals
In general, we want to integrate power over a given solid angle in the far field. There are 2
ways this can be done
1. We integrate the fraction of total electric field intensity (|E|2) over the solid angle that
we are interested in, and multiply by the normalized power transmission through the
monitor in the near field.
2. We calculate the Poynting vector in the far field and integrate the power over a given
solid angle. We then normalize to the original source power. In the far field, we can use
plane wave relationships between E and H. Therefore the Poynting vector is simply
220
Reference Guide
Coordinate Systems
For some far field projections, it is important to calculate the vectorial components of the
electric field in order to determine the polarization properties. In 3D, the commands
farfieldvector3d and farfieldpolar3d will return the vector field components. In
2D, use farfieldvector2d and farfieldpolar2d.
These commands return three complex components of the electromagnetic field. All the
properties of the polarization of the field can be determined from the amplitudes and
phases of these components.
The difference between farfieldvector3d and farfieldpolar3d is the coordinate
system for defining the components of the electric field. farfieldvector3d uses a
Cartesian coordinate system and farfieldpolar3d uses a spherical coordinate
system.
farfieldvector3d
farfieldpolar3d
where P is the poynting vector and R is the radius. The far field projections in FDTD
Solutions return the electric field as a function of the variables ux and uy which are the x
and y components of the unit direction vector. The unit direction vector is related to the
angular variables by
Scripting Language
221
When changing integration variables from (q,j) to (ux,uy), it can be shown that
Care must be taken to avoid numerical errors due to the cos(q) term. Examples can be
found in the FDTD Online Help - User Guide - Analysis - Far Field Projections section
of Lumerical's website.
See Also
FDTD toolbox
190
, farfield2d
222
, farfield3d
225
10.11.59 farfieldfilter
The far field filter is used to remove ripples in the far field projection due to clipping of the
near fields. It should be used when the near fields at the edge of the monitor are small but
not precisely zero. The far field filter has a single input parameter, which is a number
between 0 and 1. By default, it is 0, which turns the filter off. This filter is applied to all far
field projections.
222
Reference Guide
The bumpy blue line of the figure shows the
near field electric field that will be used for a
far field projection. In this case, the field
does not go to zero at the edge of the
monitor, which will lead to ripples in the far
field projection. The green line shows the
the spatial filter that will be applied to the
fields, ensuring they go to zero. The filter
parameter defines the width of the filter by
the following formula: a=(a)/(a+b).
Syntax
Description
out = farfieldfilter;
farfieldfilter(alpha);
190
, farfield2d
222
, farfield3d
225
10.11.60 farfield2d
Projects a given power or field profile monitor to the far field. The electric field intensity
|E|2 is returned.
Syntax
Description
E2 = farfield2d("mname", f,
n, illumination, periods,
index, direction);
Parameter
Default
value
mname
required
optional
Type
Description
string
number
Scripting Language
223
optional
2000
number
illumination
optional
number
periods
optional
number
index
optional
value at
monitor
center
number
direction
optional
direction of
max power
flow
number
See Also
FDTD toolbox 190 , Far field projections
223 , farfieldpolar2d 223 , farfieldexact2d
218
229
10.11.61 farfieldvector2d
The function farfieldvector2d is similar to farfield2d, but it returns the complex electric
fields, rather than field intensity. The data is returned as matrix of Nx3, where the last
index refers to Ex, Ey and Ez which are the complex components of the electric field
vector.
Syntax
Description
out = farfieldvector2d(
"mname",...);
See Also
FDTD toolbox
190
, farfield2d
222
10.11.62 farfieldpolar2d
The function farfieldpolar2d is similar to farfield2d, but it returns the complex electric
fields, rather than field intensity. The data is returned as matrix of Nx3, where the last
index refers to Er, Eq and Ez, in cylindrical coordinates. For TM simulations, this function
gives precisely the result of farfieldvector2d because the only non-zero field component is
Ez.
Syntax
Description
out = farfieldpolar2d(
"mname",...);
224
Reference Guide
See Also
FDTD toolbox
190
, farfield2d
222
, farfieldvector2d
223
10.11.63 farfieldangle
Used for 2D simulations. It returns the matrix of angles, in degrees, corresponding to the
data in farfield2d. This is required because the projection does not use a set of linearly
spaced angles for the projection. It is often useful to re-interpolate the data onto a set of
linearly spaced angles using the interp or spline functions.
Syntax
Description
theta = farfieldangle(
"mname", f, n, index);
Parameter
Default
value
Type
Description
string
mname
required
optional
number
optional
2000
number
index
optional
value at
monitor
center
number
See Also
FDTD toolbox
190
, farfield2d
222
10.11.64 farfield2dintegrate
Used in 2D simulations, this function integrates the far field projection over some range of
theta. Angles are specified in degrees, but the integral is done in radians.
Syntax
Description
out =
farfield2dintegrate(E2,
Scripting Language
225
Default
value
Type
Description
E2
required
matrix
theta
required
matrix
halfangle
optional
90
vector
theta0
optional
vector
See Also
FDTD toolbox
190
218
, farfield2d
222
, farfieldangle
224
10.11.65 farfield3d
Projects a given power or field profile monitor to the far field. The electric field intensity
|E|2 is returned.
Syntax
Description
out = farfield3d("mname",f,
na, nb, illumination,
periodsa, periodsb, index,
direction);
Parameter
Default
value
Type
Description
string
mname
required
optional
number
na
optional
150
number
nb
optional
150
number
226
Reference Guide
illumination
optional
number
periodsa
optional
number
periodsb
optional
number
index
optional
value at
monitor
center
number
direction
optional
direction of
max power
flow
number
See Also
FDTD toolbox 190 , Far field projections 218 , farfield2d 222 , farfieldvector3d 226 ,
farfieldpolar3d 226 , farfieldux 227 , farfielduy 227 , farfieldexact3d 230 , farfieldfilter
221
10.11.66 farfieldvector3d
The function farfieldvector3d is similar to farfield3d, but it returns the complex electric
fields, rather than field intensity. The data is returned as matrix of NxMx3, where N and
M are spatial indices and the last index refers to Ex, Ey and Ez. The components Ex, Ey
and Ez are the complex components of the electric field vector.
Syntax
Description
out = farfieldvector3d(
"monitorname",...);
See Also
FDTD toolbox
190
, farfield3d
225
10.11.67 farfieldpolar3d
The function farfieldpolar3d is similar to farfield3d, but it returns the complex electric
fields, rather than field intensity. The data is returned as matrix of NxMx3, where N and
M are spatial indices and the last index refers to Er, Eq and Ej, in spherical coordinates.
The components Er, Eq and Ej are the complex components of the electric field vector.
Syntax
Description
out = farfieldpolar3d(
"monitorname",...);
Scripting Language
See Also
FDTD toolbox
190
, farfield3d
225
, farfieldvector3d
227
226
10.11.68 farfieldux
Used for 3D simulations. It returns the matrix of ux corresponding to the data in farfield3d.
When projecting in
x: ux corresponds to y
y: ux corresponds to x
z: ux corresponds to x
Syntax
Description
190
, farfield3d
225
, farfielduy
227
, farfieldspherical
227
, farfieldexact
231
10.11.69 farfielduy
Used for 3D simulations. It returns the matrix of uy corresponding to the data in farfield3d.
When projecting in
x: uy corresponds to z
y: uy corresponds to z
z: uy corresponds to y
Syntax
Description
190
, farfield3d
225
, farfieldux
227
, farfieldspherical
227
, farfieldexact
231
10.11.70 farfieldspherical
This functions interpolates far field data (3D simulations) from E(ux,uy) to E(theta,phi).
The far field projections functions generally return the projection as a function of ux,uy
(direction cosines). farfieldspherical can be used to interpolate this data into the more
common units of theta, phi.
Syntax
Description
228
Reference Guide
Parameter
Default
value
Type
Description
E2
required
matrix
ux
required
vector
uy
required
vector
theta
required
vector
phi
required
vector
See Also
FDTD toolbox
190
218
, farfield3d
225
, farfieldux
227
, farfielduy
227
10.11.71 farfield3dintegrate
Used in 3D simulations, this function integrates the far field projection over a cone
centered at theta0 and phi0, with a width specified by halfangle. The far field electric field
is a function of the direction cosines (ux,uy), but farfield3dintegrate automatically does the
change of variables. Similarly, angles are specified in degrees, but converted to radians
before the integral is calculated.
Syntax
Description
out =
farfield3dintegrate(E2, ux,
uy, halfangle, theta0,
phi0);
Parameter
Default
value
Type
Description
E2
required
matrix
ux
required
vector
uy
required
vector
halfangle
optional
vector
90
Scripting Language
229
theta0
optional
vector
phi0
optional
vector
See Also
FDTD toolbox 190 , Near to far field projections
227 , farfieldspherical 227
218
, farfield3d
225
, farfieldux
227
, farfielduy
10.11.72 farfieldexact2d
This function projects complete complex vector fields to specific locations. It is expected
to be correct down to distances on the order of one wavelength. The projections from
multiple monitors can be added to create a total far field projection.
farfieldexact2d projects any surface to the grid points defined by the vectors x, y. The
data is returned in the form of a matrix that is of dimension NxMx3 where N is the length
of the x vector, M is the length of the y vector and the final index represents Ex, Ey, and
Ez. Note that N and M can be 1; when they are both 1, the function is the same as
farfieldexact.
Syntax
Description
out = farfieldexact2d(
"mname", x, y, f, index);
Parame
ter
Default
value
Type
Description
mname
required
string
required
vector
required
vector
optional
index
optional index at number The index of the material to use for the
monitor
projection.
center
230
Reference Guide
See Also
FDTD toolbox
190
, farfield2d
222
, farfieldexact3d
230
, farfieldexact
231
10.11.73 farfieldexact3d
The three dimension form of farfieldexact2d. This function projects complete complex
vector fields to specific locations. It is expected to be correct down to distances on the
order of one wavelength. The projections from multiple monitors can be added to create a
total far field projection.
farfieldexact3d projects any surface to the grid points defined by the vectors x,y and z.
The data is returned in a matrix of dimension NxMxKx3 where N is the length of the
vector x, M the length of the vector y, K is the length of the vector z and the final index
represents Ex, Ey, and Ez. Note that N, M and K can be 1, and when they are all 1, the
function is the same as farfieldexact.
Syntax
Description
out = farfieldexact3d(
"mname", x, y, z, f, index);
Parameter
Default
value
Type
Description
mname
required
string
required
vector
required
vector
required
vector
optional
number
index
optional
value at
monitor
center
number
See Also
FDTD toolbox
190
, farfield3d
225
, farfieldexact2d
229
, farfieldexact
231
Scripting Language
231
10.11.74 farfieldexact
This function projects complete complex vector fields to specific locations. It is expected
to be correct down to distances on the order of one wavelength. The projections from
multiple monitors can be added to create a total far field projection.
farfieldexact projects any surface fields to a series of points defined by vector lists. The
x,y, z coordinates of each evaluation point are taken element-by-element from the vector
lists. i.e., the i-th point in a 2D simulation would be at [x(i),y(i)].
3D
Vectors lists x,y,z must have the same length L or be length 1. The data is returned in a
matrix of dimension Lx3. The first index represents positions defined by one element
from each of x,y, z. [x(i),y(i),z(i)]; the second index represents Ex, Ey, and Ez.
2D
Vector lists x, y must have the same length L or be length 1. The data is returned in the
form of a matrix that is of dimension Lx3. The first index represents positions defined by
one element from each of x,y. [x(i),y(i)]; The second index represents Ex, Ey, and Ez.
Syntax
Description
out =
farfieldexact("mname", x, y,
f, index)
out =
farfieldexact("mname", x, y,
z, f, index);
Parameter
Default
mname
Type
Description
required
string
required
vector
required
vector
required
vector
optional
number
Default
value
232
Reference Guide
index
See Also
FDTD toolbox
optional
190
, farfield2d
value at
monitor
center
222
, farfield3d
number
225
, farfieldexact2d
229
, farfieldexact3d
230
where ax and ay are the grating periods in the x and y directions respectively and (n,m)
are any integers where the condition
can be satisfied. In the
following grating functions, the x and y components of the incoming k vector are
determined from the Bloch boundary conditions (or periodic boundary conditions) used
during the simulation. They should also correspond to the x and y components of the
source k vector.
See Also
FDTD toolbox
190
Scripting Language
233
10.11.76 grating
Returns the relative strength of all physical grating orders for a given simulation. The
result corresponds to the fraction of power that is reflected or transmitted into a particular
order. Results are normalized such that the sum of all the orders is equal to 1.
3D simulations: Data is returned in a N x M matrix where N,M are the number of grating
orders.
2D simulations: Data is returned in a N matrix where N is the number of grating orders.
Syntax
Description
out =
grating("monitorname",f,
index, direction );
Parameter
Default
value
Type
Description
string
monitornam
e
required
optional
number
index
optional
value at
monitor
center
number
direction
optional
direction of
max power
flow
number
See Also
FDTD toolbox 190 , Grating calculations 232 , gratingn 233 , gratingperiod1
236 , gratingu1 236 , gratingangle 237 , gratingpolar 234 , gratingvector 235
236
, gratingbloch1
10.11.77 gratingn
Returns the vector of integers, n, corresponding to the values returned by grating.
Syntax
Description
out = gratingn(
"monitorname",...);
See Also
FDTD toolbox
190
, grating
233
, gratingm
234
234
Reference Guide
10.11.78 gratingm
Returns the vector of integers, m, corresponding to the values returned by grating. Only
used in 3D simulations.
Syntax
Description
out = gratingm(
"monitorname",...);
See Also
FDTD toolbox
190
, grating
233
, gratingn
233
10.11.79 gratingpolar
Returns the relative strength of all physical grating orders for a given simulation. The
result corresponds to the fraction of power that is reflected or transmitted into a particular
order. Results are normalized such that the sum of all the orders is equal to 1. Very
similar to the basic grating function, except that the vector field information is returned in
spherical coordinates. This is useful when studying the polarization effects.
3D simulations: Data is returned in a N x M x 3 matrix where N,M are the number of
grating orders. The third dimension is Er, Etheta, Ephi.
2D simulations: Data is returned in a N x 3 matrix where N is the number of grating
orders. The second dimension is Er, Etheta, Ephi.
Syntax
Description
out = gratingpolar(
"mname", f, index,
direction);
Parameter
Default
value
Type
Description
string
mname
required
optional
number
index
optional
value at
monitor
center
number
direction
optional
direction of
max power
number
Scripting Language
235
flow
See Also
FDTD toolbox 190 , Grating calculations 232 , grating 233 , gratingn 233 , gratingperiod1
gratingbloch1 236 , gratingu1 236 , gratingangle 237 , gratingvector 235
236
10.11.80 gratingvector
Returns the relative strength of all physical grating orders for a given simulation. The
result corresponds to the fraction of power that is reflected or transmitted into a particular
order. Results are normalized such that the sum of all the orders is equal to 1. Very
similar to the basic grating function, except that the vector field information is returned in
Cartesian coordinates. This is useful when studying the polarization effects.
3D simulations: Data is returned in a N x M x3 matrix where N,M are the number of
grating orders. The third dimension is Ex, Ey, Ez.
2D simulations: Data is returned in a N x3 matrix where N is the number of grating orders.
The second dimension is Ex, Ey, Ez.
Syntax
Description
out = gratingvector(
"mname", f, index,
direction);
Parameter
Default
value
Type
Description
string
mname
required
optional
number
index
optional
value at
monitor
center
number
direction
optional
direction of
max power
flow
number
See Also
FDTD toolbox 190 , Grating calculations 232 , grating 233 , gratingn 233 , gratingperiod1
gratingbloch1 236 , gratingu1 236 , gratingangle 237 , gratingpolar 234
236
236
Reference Guide
10.11.81 gratingperiod1
Returns the grating period ax based on the value from the simulation area.
Syntax
Description
out = gratingperiod1(
"monitorname", ...);
See Also
FDTD toolbox
190
, grating
233
, gratingperiod2
236
10.11.82 gratingperiod2
Returns the grating period ax based on the value from the simulation area. Only used in
3D simulations.
Syntax
Description
out = gratingperiod2(
"monitorname", ...);
See Also
FDTD toolbox
190
, grating
233
, gratingperiod1
236
10.11.83 gratingbloch1
Returns the value of the bloch vector (kin)x used for the calculation, based on the value for
the simulation area.
Syntax
Description
out = gratingbloch1(
"monitorname", ...);
See Also
FDTD toolbox
190
, grating
233
, gratingbloch2
237
10.11.84 gratingu1
Returns first component of the unit vector (ux) corresponding to the values returned by
grating.
Syntax
Description
out = gratingu1(
"monitorname", ...);
Scripting Language
See Also
FDTD toolbox
190
, grating
233
, gratingu2
237
237
10.11.85 gratingu2
Returns first component of the unit vector (uy) corresponding to the values returned by
grating. Only used in 3D simulations
Syntax
Description
out = gratingu2(
"monitorname", ...);
See Also
FDTD toolbox
190
, grating
233
, gratingu1
236
10.11.86 gratingangle
Returns the angle of each order corresponding to the values returned by grating, in
degrees. Only available for 2d simulations.
Syntax
Description
out = gratingangle(
"monitorname", ...);
See Also
FDTD toolbox
190
, grating
233
10.11.87 gratingbloch2
Returns the value of the bloch vector (kin)y used for the calculation, based on the value for
the simulation area. Only used in 3D simulations.
Syntax
Description
out = gratingbloch2(
"monitorname", ...);
See Also
FDTD toolbox
190
, grating
233
, gratingbloch1
236
238
Reference Guide
Note:
All script files use a common variable space. As a consequence, variables defined in
the scripts are global, and the script files have access to all variables defined in the
simulation project file.
This can lead to problems when two script files use the same variable names. For
example, script_1.lsf (defined below) will print the value 10 to the command line
since script_2.lsf modified the variable i.
script_1.lsf
i=1;
script_2;
?i;
script_2.lsf
Scripting Language
for(i=1:10) {
# do something
}
239
240
Reference Guide
11
Appendix
Index
Index
' 138
- 132
! 136, 137
!= 134
" 137
# 139
% 126
& 135
* 132
/ 132
: 125
? 139
[] 125
^ 133
| 136
~ 137
+ 132
< 135
<= 134
= 125
== 133
> 135
>= 134
abs 144
absolute 144
access 129
acos 143
addanalysisgroup 206
addcircle 200
addcustom 200
adddipole 203
addfdtd 203
addgaussian 203
addimage 200
addimportedsource 205
addindex 205
2003 - 2009 Lumerical Solutions, Inc
addition 132
addmaterial 183
addmesh 203
addmode 204
addmovie 205
addpath 114
addplane 204
addpoly 201
addpower 206
addprofile 206
addpyramid 201
addrect 201
addring 201
addsphere 202
addstructuregroup 202
addsurface 202
addtfsf 204
addtime 205
addtogroup 166
adduserprop 167
almostequal 133
analysis group 58, 101
analysis tools 98
and 135
angle 144
anisotropic 77
apodization 62
arccos 143
arcsin 142
arctan 143
array 125, 129, 130
asap 49, 118, 119
asapexport 118
asapimport 119
asapload 118
asin 142
assign 129
assignment 125
atan 143
241
242
Reference Guide
atan2 143
boundary conditions 45
break 115
c 130
cd 110
clear 128
cleardcard 181
clearsourcedata 207
closeall 161
command line 122
comment 139
comparison 133
conductivity 74
conj 144
conjugate 144
copy 110, 166
copydcard 181
cos 142
cosine 142
cp 110
ctranspose 150
currentfilename 112
custom primitive 37
cwnorm 208
czt 155
data export 104
default settings 86
del 109
delete 163
deleteall 163
Dielectric 74
dipolepower 211
dir 109, 110
division 132
double quote 137
drude 74
else 157
endl 139
eps0 130
equal 125
equal to 133
equation interpreter 65
escape 115
exit 111
exp 146
exponential 146
exportfigure 160
farfield2d 222
farfield2dintegrate 224
farfield3d 225
farfield3dintegrate 228
farfieldangle 224
farfieldexact 231
farfieldexact2d 229
farfieldexact3d 230
farfieldfilter 221
farfieldpolar2d 223
farfieldpolar3d 226
farfieldspherical 227
farfieldux 227
farfielduy 227
farfieldvector2d 223
farfieldvector3d 226
fft 150
fftk 153
fftw 152
filebasename 112
filedirectory 113
fileexists 112
fileextension 113
fileopendialog 189
filesavedialog 190
find 149
findpeaks 149
for 157
format 116
gds 119
gdsii 84, 119
2003 - 2009 Lumerical Solutions, Inc
Index
get 169
getdata 181
getelectric 182
getfdtdindex 185
getglobal 171
getindex 185
getmagnetic 182
getmaterial 184
getnamed 170
getnamednumber 171
getnumber 170
getpath 113
getsourceangle 208
getview 178
grating 233
gratingangle 237
gratingbloch1 236
gratingbloch2 237
gratingm 234
gratingn 233
gratingperiod1 236
gratingperiod2 236
gratingpolar 234
gratingu1 236
gratingu2 237
gratingvector 235
greater than 135
greater than or equal to 134
havedata 180
if 157
imag 144
image 159
imaginary 144
import 84, 119
import object 34
importnk 174
importnk2 175
importsurface 172
importsurface2 173
2003 - 2009 Lumerical Solutions, Inc
integrate 148
integration 31
interp 148
interpolate 148
inverse 154
invfft 154
Kerr nonlinear 74
killwizard 188
layout 81
layoutmode 199
legend 159
length 146
less than 135
less than or equal to 134
linspace 126
ln 145
load 116, 195
loaddata 116
log 145
log10 145
loop 157
lorentz 74
ls 110
lum2mat 121, 122
mat 121
material database 72
material models 74
matlab 104, 121, 122
matlabget 123
matlabput 124
matlabsave 120
matrix 126, 130
max 147
Max coefficients 74
mesh 77
mesh refinement region 43
meshgrid3dx 127
meshgrid3dy 128
meshgrid3dz 128
243
244
Reference Guide
meshgridx 127
meshgridy 127
message 186
min 147
mod 155
mode solver 67
monitor 58
monitors 199
move 111, 166
mu0 130
multiplication 132
mv 111
natural 145
negative 132
new2d 194
new3d 195
newwizard 187
newwizardpage 187
nonorm 208
normalization 20
not 134, 136, 137
num2str 137
or 136
orbit 178
order 77
output 139
path 113, 114
pause 114
PEC 74
permeability 130
permittivity 130
phase 144
pi 130
pinch 146
plasma 74
plot 158
power 133
priorities 77
pwd 110
quit 111
rand 156
randmatrix 127
random 156
randreset 156
readdata 117
real 143
redo 179
redraw 176
redrawmode 176
redrawoff 176
redrawon 176
rm 109
round 155
run 113, 196
runanalysis 198
running a simulation 96
runparallel 197
runwizard 188
sampled data 74
save 116, 117, 196
savedata 116
savedcard 117
screen 139
script 113
seed 156
select 164
selectall 163, 164
selectfigure 160
selectpartial 164
Sellmeier 74
set 167
setglobal 168
setmaterial 184
setnamed 168
setparallel 197
setplot 160
setsourcesignal 207
setview 177
2003 - 2009 Lumerical Solutions, Inc
Index
shiftselect 165
shiftselectpartial 165
showdata 180
simulation 198
simulation region 43
sin 141
sine 141
single quote 138
size 146
source 49
sourceintensity 214
sourceintensity_avg 215
sourceintensity_pavg 215
sourcenorm 209
sourcenorm2_avg 209
sourcenorm2_pavg 210
sourcepower 211
sourcepower_avg 212
sourcepower_pavg 213
sources 199
spectral averaging 62
speed of light 130
spline 148
sqrt 145
square root 145
strings 137, 138
structure 34
structures 198
structures group 34
subtraction 132
sum 147
surface 41
surface object 41
switchtolayout 199
system 111
tan 142
tangent 142
Tolerance 74
toolbar 87
2003 - 2009 Lumerical Solutions, Inc
transmission 216
transmission_avg 217
transmission_pavg 217
transpose 150
undo 179
units 20
unselectall 164
unwrap 145
updatesourcemode 207
variables with spaces 126
which 114
wizardgetdata 188
wizardoption 189
wizardwidget 187
workspace 129
write 117
z-transform 155
245