You are on page 1of 2905

Lumerical Knowledge Base

Release 2016b
Contents 1

Table of Contents
Part I Knowledge Base 15
Part II Installation Manual 16
1 Windows Installation ............................................................................................................ 17
FDTD Solutions Install Instructions
................................................................................................................................................. 17
MODE Solutions Install Instructions
................................................................................................................................................. 22
DEVICE Install Instructions ................................................................................................................................................. 26
INTERCONNECT Install Instructions
................................................................................................................................................. 30
Running jobs on other com puters
.................................................................................................................................................
in your local netw ork 34
2 Linux Installation ............................................................................................................ 35
FDTD Solutions Install Instructions
................................................................................................................................................. 36
MODE Solutions Install Instructions
................................................................................................................................................. 39
DEVICE Install Instructions ................................................................................................................................................. 42
INTERCONNECT Install Instructions
................................................................................................................................................. 46
Configure engine ................................................................................................................................................. 49
Cluster setup ................................................................................................................................................. 50
Running sim ulations ................................................................................................................................................. 52
3 Mac Installation ............................................................................................................ 58
FDTD Solutions Install Instructions
................................................................................................................................................. 58
MODE Solutions Install Instructions
................................................................................................................................................. 62
DEVICE Install Instructions ................................................................................................................................................. 65
INTERCONNECT Install Instructions
................................................................................................................................................. 69
Configure engine ................................................................................................................................................. 72
4 Product Licensing ............................................................................................................ 73
Node Trusted Storage ................................................................................................................................................. 74
Node MAC Locked ................................................................................................................................................. 82
Node USB key ................................................................................................................................................. 83
Floating Trusted Storage ................................................................................................................................................. 85
Floating MAC Locked ................................................................................................................................................. 88
Floating USB key ................................................................................................................................................. 91
Floating Triad Redundant ................................................................................................................................................. 95
Part III Solvers 101
1 Optical solvers ............................................................................................................ 103
FDTD ................................................................................................................................................. 103
varFDTD ................................................................................................................................................. 107
FDE ................................................................................................................................................. 109
EME ................................................................................................................................................. 114
Units and norm alization ................................................................................................................................................. 116
2 Optical toolbox ............................................................................................................ 126
Near to far field projections ................................................................................................................................................. 126
Grating projections ................................................................................................................................................. 150
Eigenm ode propagate script .................................................................................................................................................
com m and 156
Multilayer stack RT calculator................................................................................................................................................. 156
3 DEVICE solvers ............................................................................................................ 157
CHARGE ................................................................................................................................................. 157
HEAT ................................................................................................................................................. 163
4 Schematic solvers ............................................................................................................ 166
DDF ................................................................................................................................................. 166
SDA ................................................................................................................................................. 168
Part IV Getting Started 171
Part V Component Tools Reference Guide 172
1 New Features ............................................................................................................ 172
New features in 2016b ................................................................................................................................................. 172
New features in 2016a ................................................................................................................................................. 173
New features in 2015b ................................................................................................................................................. 176
New features in 2015a ................................................................................................................................................. 176
New features in 2014a ................................................................................................................................................. 177

2003 - 2016 Lumerical Solutions, Inc


2 Lumerical Knowledge Base

New features in 2013c ................................................................................................................................................. 178


New features in 2013b ................................................................................................................................................. 179
New features in 2013a ................................................................................................................................................. 181
New features in prior versions
................................................................................................................................................. 182
2 Layout Editor ............................................................................................................ 197
Main Title Bar ................................................................................................................................................. 198
Toolbars ................................................................................................................................................. 199
View Ports ................................................................................................................................................. 208
Objects Tree ................................................................................................................................................. 208
Object Library ................................................................................................................................................. 210
Results View ................................................................................................................................................. 210
Optim ization and Sw eeps ................................................................................................................................................. 210
Script Prom pt and Script Editor
................................................................................................................................................. 211
Script Workspace and Script Favorites
................................................................................................................................................. 211
Boundary Conditions ................................................................................................................................................. 211
Changing the CAD layout ................................................................................................................................................. 211
Resource Manager ................................................................................................................................................. 213
Running a sim ulation ................................................................................................................................................. 213
Equation Interpreter ................................................................................................................................................. 214
3 Material properties ............................................................................................................ 215
Optical m aterials ................................................................................................................................................. 215
DEVICE m aterials ................................................................................................................................................. 276
4 Simulation Objects ............................................................................................................ 314
Structures ................................................................................................................................................. 318
Groups ................................................................................................................................................. 388
Optical Sim ulation Objects ................................................................................................................................................. 399
Electrical Sim ulation Objects ................................................................................................................................................. 671
Therm al Sim ulation Objects ................................................................................................................................................. 688
5 Parameter sweeps, optimization
............................................................................................................
and yield analysis 696
Param eter sw eeps ................................................................................................................................................. 699
Optim ization ................................................................................................................................................. 716
Yield analysis ................................................................................................................................................. 728
6 Result analysis ............................................................................................................ 735
Working w ith the graphical layout
.................................................................................................................................................
environm ent 735
Eigenm ode solver Analysis (FDE)
................................................................................................................................................. 749
EME solver analysis ................................................................................................................................................. 774
Data export ................................................................................................................................................. 788
Data im port ................................................................................................................................................. 792
Analysis groups ................................................................................................................................................. 798
Testing convergence ................................................................................................................................................. 847
Other analysis tools and testing
.................................................................................................................................................
m ethods 859
Part VI System Tools Reference Guide 883
1 New features ............................................................................................................ 883
New features in 2016b ................................................................................................................................................. 883
New features in 2016a ................................................................................................................................................. 884
New features in 2015b ................................................................................................................................................. 885
New features in 2015a ................................................................................................................................................. 887
New features in 2014a ................................................................................................................................................. 888
New features in 2013c ................................................................................................................................................. 889
New features in 2013b ................................................................................................................................................. 890
New features in 2013a ................................................................................................................................................. 890
2 Schematic editor ............................................................................................................ 891
Main title bar ................................................................................................................................................. 892
Toolbars ................................................................................................................................................. 892
View ports and Full View ................................................................................................................................................. 893
Properties, Ports and Results................................................................................................................................................. 896
Elem ent tree and Elem ent library
................................................................................................................................................. 897
Script prom pt/Output and Script
.................................................................................................................................................
editor 898
Sim ulation Status Bar ................................................................................................................................................. 899
Using the schem atic editor ................................................................................................................................................. 899
Property Expressions ................................................................................................................................................. 903
3 Element Library ............................................................................................................ 904
Elem ent Properties ................................................................................................................................................. 905
Root Elem ent ................................................................................................................................................. 905

2003 - 2016 Lumerical Solutions, Inc


Contents 3

Prim itive Elem ents ................................................................................................................................................. 911


Com pound Elem ents ................................................................................................................................................. 1322
Scripted Elem ent ................................................................................................................................................. 1326
Custom Library & Design Kit................................................................................................................................................. 1331
4 Parameter sweeps, optimization
............................................................................................................
and yield analysis 1338
Param eter sw eeps ................................................................................................................................................. 1341
Optim ization ................................................................................................................................................. 1358
Yield analysis ................................................................................................................................................. 1370
5 Result analysis ............................................................................................................ 1377
Result View ................................................................................................................................................. 1377
Visualizer and plot w indow s................................................................................................................................................. 1378
Script Workspace and Script.................................................................................................................................................
Favorites 1379
Data export ................................................................................................................................................. 1381
Part VII Scripting Language 1383
1 Scripting tutorials ............................................................................................................ 1383
Scripting basics ................................................................................................................................................. 1384
Creating plots and im ages ................................................................................................................................................. 1392
Modifying objects ................................................................................................................................................. 1395
Running sim ulations ................................................................................................................................................. 1400
Accessing sim ulation data ................................................................................................................................................. 1401
File im port and export ................................................................................................................................................. 1406
MATLAB ................................................................................................................................................. 1410
Creating a custom GUI ................................................................................................................................................. 1425
2 System ............................................................................................................ 1426
new project ................................................................................................................................................. 1429
new m ode ................................................................................................................................................. 1430
save ................................................................................................................................................. 1430
load ................................................................................................................................................. 1430
del ................................................................................................................................................. 1431
rm ................................................................................................................................................. 1431
dir ................................................................................................................................................. 1431
ls ................................................................................................................................................. 1431
cd ................................................................................................................................................. 1432
pw d ................................................................................................................................................. 1432
cp ................................................................................................................................................. 1432
mv ................................................................................................................................................. 1432
exit ................................................................................................................................................. 1433
system ................................................................................................................................................. 1433
fileexists ................................................................................................................................................. 1433
currentfilenam e ................................................................................................................................................. 1434
filebasenam e ................................................................................................................................................. 1434
fileextension ................................................................................................................................................. 1434
filedirectory ................................................................................................................................................. 1434
getcom m ands ................................................................................................................................................. 1435
Run script ................................................................................................................................................. 1435
runinitialize ................................................................................................................................................. 1435
runstep ................................................................................................................................................. 1435
runfinalize ................................................................................................................................................. 1436
w aituntildone ................................................................................................................................................. 1436
getpath ................................................................................................................................................. 1436
addpath ................................................................................................................................................. 1436
clearpath ................................................................................................................................................. 1437
w hich ................................................................................................................................................. 1437
pause ................................................................................................................................................. 1437
break ................................................................................................................................................. 1438
Excape key ................................................................................................................................................. 1438
form at ................................................................................................................................................. 1438
loaddata ................................................................................................................................................. 1438
savedata ................................................................................................................................................. 1439
savedcard ................................................................................................................................................. 1439
readdata ................................................................................................................................................. 1439
w rite ................................................................................................................................................. 1440
asapexport ................................................................................................................................................. 1440
asapload ................................................................................................................................................. 1440
asapim port ................................................................................................................................................. 1441

2003 - 2016 Lumerical Solutions, Inc


4 Lumerical Knowledge Base

tecplotread ................................................................................................................................................. 1441


copytoclipboard ................................................................................................................................................. 1441
pastefrom clipboard ................................................................................................................................................. 1442
debug ................................................................................................................................................. 1442
vtksave ................................................................................................................................................. 1442
lookupread ................................................................................................................................................. 1442
lookupopen ................................................................................................................................................. 1443
lookupclose ................................................................................................................................................. 1443
lookupw rite ................................................................................................................................................. 1443
lookupreadtable ................................................................................................................................................. 1444
lookupreadvalue ................................................................................................................................................. 1444
lookupreadnportsparam eter................................................................................................................................................. 1444
lookupappend ................................................................................................................................................. 1445
insert ................................................................................................................................................. 1445
touchstoneload ................................................................................................................................................. 1445
hide ................................................................................................................................................. 1445
show ................................................................................................................................................. 1446
clearlogw indow ................................................................................................................................................. 1446
version ................................................................................................................................................. 1446
versionfile ................................................................................................................................................. 1446
im portnetlist ................................................................................................................................................. 1447
exportnetlist ................................................................................................................................................. 1447
exportcsvresults ................................................................................................................................................. 1447
new ................................................................................................................................................. 1448
exist ................................................................................................................................................. 1448
exporthtm l ................................................................................................................................................. 1448
help ................................................................................................................................................. 1448
logm essage ................................................................................................................................................. 1449
refresh ................................................................................................................................................. 1449
operatingsystem ................................................................................................................................................. 1449
fileexpand ................................................................................................................................................. 1450
autosaveon ................................................................................................................................................. 1450
read ................................................................................................................................................. 1450
autosaveoff ................................................................................................................................................. 1450
encryptscript ................................................................................................................................................. 1451
readstltriangles ................................................................................................................................................. 1451
setconnectionrouting ................................................................................................................................................. 1451
findproperty ................................................................................................................................................. 1452
findpropertyvalue ................................................................................................................................................. 1452
3 Manipulating variables ............................................................................................................ 1452
= ................................................................................................................................................. 1453
: ................................................................................................................................................. 1454
[] ................................................................................................................................................. 1454
% ................................................................................................................................................. 1454
linspace ................................................................................................................................................. 1454
m atrix ................................................................................................................................................. 1455
randm atrix ................................................................................................................................................. 1455
randnm atrix ................................................................................................................................................. 1455
histogram ................................................................................................................................................. 1455
m eshgridx ................................................................................................................................................. 1456
m eshgridy ................................................................................................................................................. 1456
m eshgrid3dx ................................................................................................................................................. 1456
m eshgrid3dy ................................................................................................................................................. 1456
m eshgrid3dz ................................................................................................................................................. 1457
m eshgrid4d ................................................................................................................................................. 1457
clear ................................................................................................................................................. 1457
w orkspace ................................................................................................................................................. 1457
Accessing and assigning m atrix
.................................................................................................................................................
elem ents 1458
Matrix operators ................................................................................................................................................. 1458
Pre-defined constants ................................................................................................................................................. 1459
m atrixdataset ................................................................................................................................................. 1459
rectilineardataset ................................................................................................................................................. 1459
addparam eter ................................................................................................................................................. 1460
addattribute ................................................................................................................................................. 1460
getparam eter ................................................................................................................................................. 1460
getattribute ................................................................................................................................................. 1461
eye ................................................................................................................................................. 1461

2003 - 2016 Lumerical Solutions, Inc


Contents 5

Datasets ................................................................................................................................................. 1461


struct ................................................................................................................................................. 1465
cell ................................................................................................................................................. 1465
unstructureddataset ................................................................................................................................................. 1466
global ................................................................................................................................................. 1466
sim ulation ................................................................................................................................................. 1466
4 Operators ............................................................................................................ 1467
. ................................................................................................................................................. 1468
* ................................................................................................................................................. 1468
/ ................................................................................................................................................. 1468
+ ................................................................................................................................................. 1469
- ................................................................................................................................................. 1469
^ ................................................................................................................................................. 1469
== ................................................................................................................................................. 1469
alm ostequal ................................................................................................................................................. 1470
!= ................................................................................................................................................. 1470
<= ................................................................................................................................................. 1470
>= ................................................................................................................................................. 1470
< ................................................................................................................................................. 1471
> ................................................................................................................................................. 1471
& ................................................................................................................................................. 1471
and ................................................................................................................................................. 1471
| ................................................................................................................................................. 1472
or ................................................................................................................................................. 1472
! ................................................................................................................................................. 1472
~ ................................................................................................................................................. 1473
" ................................................................................................................................................. 1473
' ................................................................................................................................................. 1474
endl ................................................................................................................................................. 1474
? ................................................................................................................................................. 1474
com m ents ................................................................................................................................................. 1474
5 Functions ............................................................................................................ 1475
sin ................................................................................................................................................. 1478
cos ................................................................................................................................................. 1479
tan ................................................................................................................................................. 1479
asin ................................................................................................................................................. 1479
acos ................................................................................................................................................. 1479
atan ................................................................................................................................................. 1480
atan2 ................................................................................................................................................. 1480
real ................................................................................................................................................. 1480
im ag ................................................................................................................................................. 1480
conj ................................................................................................................................................. 1481
abs ................................................................................................................................................. 1481
angle ................................................................................................................................................. 1481
unw rap ................................................................................................................................................. 1481
log ................................................................................................................................................. 1482
log10 ................................................................................................................................................. 1482
sqrt ................................................................................................................................................. 1482
exp ................................................................................................................................................. 1482
size ................................................................................................................................................. 1482
length ................................................................................................................................................. 1483
pinch ................................................................................................................................................. 1483
sum ................................................................................................................................................. 1483
m ax ................................................................................................................................................. 1484
m in ................................................................................................................................................. 1484
dot ................................................................................................................................................. 1484
cross ................................................................................................................................................. 1484
eig ................................................................................................................................................. 1485
m ult ................................................................................................................................................. 1485
flip ................................................................................................................................................. 1485
perm ute ................................................................................................................................................. 1486
reshape ................................................................................................................................................. 1486
inv ................................................................................................................................................. 1486
interp ................................................................................................................................................. 1487
interptri ................................................................................................................................................. 1487
spline ................................................................................................................................................. 1487
polyfit ................................................................................................................................................. 1488

2003 - 2016 Lumerical Solutions, Inc


6 Lumerical Knowledge Base

integrate ................................................................................................................................................. 1488


integrate2 ................................................................................................................................................. 1488
find ................................................................................................................................................. 1489
findpeaks ................................................................................................................................................. 1489
transpose ................................................................................................................................................. 1490
ctranspose ................................................................................................................................................. 1490
num 2str ................................................................................................................................................. 1490
str2num ................................................................................................................................................. 1490
eval ................................................................................................................................................. 1491
feval ................................................................................................................................................. 1491
substring ................................................................................................................................................. 1491
findstring ................................................................................................................................................. 1491
replace ................................................................................................................................................. 1492
replacestring ................................................................................................................................................. 1492
splitstring ................................................................................................................................................. 1492
upper ................................................................................................................................................. 1493
low er ................................................................................................................................................. 1493
toscript ................................................................................................................................................. 1493
fft ................................................................................................................................................. 1493
fftw ................................................................................................................................................. 1494
fftk ................................................................................................................................................. 1495
invfft ................................................................................................................................................. 1496
czt ................................................................................................................................................. 1497
sroughness ................................................................................................................................................. 1497
polyarea ................................................................................................................................................. 1497
centroid ................................................................................................................................................. 1498
polyintersect ................................................................................................................................................. 1498
inpoly ................................................................................................................................................. 1498
polygrow ................................................................................................................................................. 1499
polyand ................................................................................................................................................. 1499
polyor ................................................................................................................................................. 1499
polydiff ................................................................................................................................................. 1500
polyxor ................................................................................................................................................. 1500
lineintersect ................................................................................................................................................. 1500
linecross ................................................................................................................................................. 1501
ceil ................................................................................................................................................. 1501
floor ................................................................................................................................................. 1501
m od ................................................................................................................................................. 1502
sign ................................................................................................................................................. 1502
round ................................................................................................................................................. 1502
rand ................................................................................................................................................. 1502
lognrnd ................................................................................................................................................. 1503
randn ................................................................................................................................................. 1503
randreset ................................................................................................................................................. 1503
finite ................................................................................................................................................. 1504
solar ................................................................................................................................................. 1504
stackrt ................................................................................................................................................. 1504
m ean ................................................................................................................................................. 1505
all ................................................................................................................................................. 1505
any ................................................................................................................................................. 1505
var ................................................................................................................................................. 1505
std ................................................................................................................................................. 1506
precision ................................................................................................................................................. 1506
m apfind ................................................................................................................................................. 1506
quadtri ................................................................................................................................................. 1507
quadtet ................................................................................................................................................. 1507
expand ................................................................................................................................................. 1507
expand2 ................................................................................................................................................. 1508
interptet ................................................................................................................................................. 1508
quadtet ................................................................................................................................................. 1509
norm ................................................................................................................................................. 1509
chol ................................................................................................................................................. 1510
svd ................................................................................................................................................. 1510
colorm atchfunction ................................................................................................................................................. 1511
colorm atch ................................................................................................................................................. 1512
colorm atchxy ................................................................................................................................................. 1513
colorm atchuv ................................................................................................................................................. 1515
erf ................................................................................................................................................. 1516

2003 - 2016 Lumerical Solutions, Inc


Contents 7

erfc ................................................................................................................................................. 1517


unique ................................................................................................................................................. 1518
uniquevertices ................................................................................................................................................. 1519
chpts ................................................................................................................................................. 1519
chebin ................................................................................................................................................. 1519
cov ................................................................................................................................................. 1520
corrcoef ................................................................................................................................................. 1520
corrtransf ................................................................................................................................................. 1520
dcht ................................................................................................................................................. 1521
icht ................................................................................................................................................. 1521
besselj ................................................................................................................................................. 1522
bessely ................................................................................................................................................. 1522
besseli ................................................................................................................................................. 1522
besselk ................................................................................................................................................. 1523
6 Loop and conditional statements
............................................................................................................ 1523
for ................................................................................................................................................. 1523
if ................................................................................................................................................. 1523
7 Plotting commands ............................................................................................................ 1524
plot ................................................................................................................................................. 1525
plotxy ................................................................................................................................................. 1525
holdon ................................................................................................................................................. 1526
holdoff ................................................................................................................................................. 1526
polar ................................................................................................................................................. 1526
polar2 ................................................................................................................................................. 1527
polarim age ................................................................................................................................................. 1528
sm ithchart ................................................................................................................................................. 1528
histc ................................................................................................................................................. 1528
legend ................................................................................................................................................. 1529
im age ................................................................................................................................................. 1529
visualize ................................................................................................................................................. 1529
add2visualizer ................................................................................................................................................. 1530
selectfigure ................................................................................................................................................. 1530
setplot ................................................................................................................................................. 1530
exportfigure ................................................................................................................................................. 1531
closeall ................................................................................................................................................. 1531
vectorplot ................................................................................................................................................. 1531
8 Adding Objects ............................................................................................................ 1532
sw itchtolayout ................................................................................................................................................. 1534
sw itchtodesign ................................................................................................................................................. 1535
layoutm ode ................................................................................................................................................. 1535
designm ode ................................................................................................................................................. 1535
addgroup ................................................................................................................................................. 1535
addstructuregroup ................................................................................................................................................. 1536
addanalysisgroup ................................................................................................................................................. 1536
addobject ................................................................................................................................................. 1536
addplanarsolid ................................................................................................................................................. 1536
addcontact ................................................................................................................................................. 1537
addcircle ................................................................................................................................................. 1537
addcustom ................................................................................................................................................. 1537
addim port ................................................................................................................................................. 1537
addpyram id ................................................................................................................................................. 1538
addpoly ................................................................................................................................................. 1538
addrect ................................................................................................................................................. 1538
addtriangle ................................................................................................................................................. 1538
addring ................................................................................................................................................. 1539
addsphere ................................................................................................................................................. 1539
addsurface ................................................................................................................................................. 1539
addfdtd ................................................................................................................................................. 1539
addfde ................................................................................................................................................. 1540
addvarfdtd ................................................................................................................................................. 1540
addbc ................................................................................................................................................. 1540
addem e ................................................................................................................................................. 1540
addem eport ................................................................................................................................................. 1541
addem eindex ................................................................................................................................................. 1541
addem eprofile ................................................................................................................................................. 1541
addm esh ................................................................................................................................................. 1541
addchargem esh ................................................................................................................................................. 1542

2003 - 2016 Lumerical Solutions, Inc


8 Lumerical Knowledge Base

addheatm esh ................................................................................................................................................. 1542


addm eshconstraint ................................................................................................................................................. 1542
addim porttem perature ................................................................................................................................................. 1542
addim portheat ................................................................................................................................................. 1543
adduniform heat ................................................................................................................................................. 1543
addtem peraturem onitor ................................................................................................................................................. 1543
addheatfluxm onitor ................................................................................................................................................. 1544
addm ode ................................................................................................................................................. 1544
addm odesource ................................................................................................................................................. 1544
adddipole ................................................................................................................................................. 1545
addgaussian ................................................................................................................................................. 1545
addplane ................................................................................................................................................. 1545
addtfsf ................................................................................................................................................. 1545
addim portedsource ................................................................................................................................................. 1546
addindex ................................................................................................................................................. 1546
addtim e ................................................................................................................................................. 1546
addm ovie ................................................................................................................................................. 1546
addprofile ................................................................................................................................................. 1547
addpow er ................................................................................................................................................. 1547
createbeam ................................................................................................................................................. 1547
adddevice ................................................................................................................................................. 1547
addchargesolver ................................................................................................................................................. 1548
addheatsolver ................................................................................................................................................. 1548
adddope ................................................................................................................................................. 1548
adddiffusion ................................................................................................................................................. 1548
addim portdope ................................................................................................................................................. 1549
addbulkgen ................................................................................................................................................. 1549
addim portgen ................................................................................................................................................. 1549
adddeltachargesource ................................................................................................................................................. 1549
addgridattribute ................................................................................................................................................. 1550
addelem ent ................................................................................................................................................. 1551
addm odeexpansion ................................................................................................................................................. 1551
addeffectiveindex ................................................................................................................................................. 1551
addchargem onitor ................................................................................................................................................. 1552
addefieldm onitor ................................................................................................................................................. 1552
addbandstructurem onitor ................................................................................................................................................. 1552
addjfluxm onitor ................................................................................................................................................. 1552
addlayer ................................................................................................................................................. 1552
addlayerbuilder ................................................................................................................................................. 1553
extractstructure ................................................................................................................................................. 1553
stlim port ................................................................................................................................................. 1554
addw aveguide ................................................................................................................................................. 1555
add2drect ................................................................................................................................................. 1555
add2dpoly ................................................................................................................................................. 1555
im portcsvlc ................................................................................................................................................. 1555
9 Manipulating objects ............................................................................................................ 1556
setcontact ................................................................................................................................................. 1559
setbc ................................................................................................................................................. 1560
deletebc ................................................................................................................................................. 1561
getbc ................................................................................................................................................. 1562
deleteallbc ................................................................................................................................................. 1563
groupscope ................................................................................................................................................. 1563
deleteall ................................................................................................................................................. 1563
delete ................................................................................................................................................. 1563
selectall ................................................................................................................................................. 1564
unselectall ................................................................................................................................................. 1564
select ................................................................................................................................................. 1564
selectpartial ................................................................................................................................................. 1565
shiftselect ................................................................................................................................................. 1565
shiftselectpartial ................................................................................................................................................. 1565
flipelem ent ................................................................................................................................................. 1566
rotateelem ent ................................................................................................................................................. 1566
m ove ................................................................................................................................................. 1566
copy ................................................................................................................................................. 1566
addtogroup ................................................................................................................................................. 1567
adduserprop ................................................................................................................................................. 1567
addanalysisprop ................................................................................................................................................. 1567

2003 - 2016 Lumerical Solutions, Inc


Contents 9

addanalysisresult ................................................................................................................................................. 1568


set ................................................................................................................................................. 1568
setnam ed ................................................................................................................................................. 1568
setglobalm onitor ................................................................................................................................................. 1569
setglobalsource ................................................................................................................................................. 1569
setm odes ................................................................................................................................................. 1570
setposition ................................................................................................................................................. 1570
setrectangle ................................................................................................................................................. 1570
getposition ................................................................................................................................................. 1570
getrectangle ................................................................................................................................................. 1571
get ................................................................................................................................................. 1571
runsetup ................................................................................................................................................. 1571
getnum ber ................................................................................................................................................. 1572
getnam ed ................................................................................................................................................. 1572
getnam ednum ber ................................................................................................................................................. 1572
getglobalm onitor ................................................................................................................................................. 1573
getglobalsource ................................................................................................................................................. 1573
getsolver ................................................................................................................................................. 1573
haveproperty ................................................................................................................................................. 1573
im portsurface ................................................................................................................................................. 1574
im portsurface2 ................................................................................................................................................. 1574
im portnk ................................................................................................................................................. 1575
im portnk2 ................................................................................................................................................. 1576
im portnkobfuscated ................................................................................................................................................. 1576
im portbinary ................................................................................................................................................. 1577
im portbinary2 ................................................................................................................................................. 1578
im portbinaryobfuscated ................................................................................................................................................. 1578
updatesourcem ode ................................................................................................................................................. 1579
setsourcesignal ................................................................................................................................................. 1580
updatem odes ................................................................................................................................................. 1580
clearsourcedata ................................................................................................................................................. 1581
clearm odedata ................................................................................................................................................. 1582
seteigensolver ................................................................................................................................................. 1582
geteigensolver ................................................................................................................................................. 1582
redraw ................................................................................................................................................. 1583
redraw off ................................................................................................................................................. 1583
redraw on ................................................................................................................................................. 1583
redraw m ode ................................................................................................................................................. 1583
setview ................................................................................................................................................. 1584
getview ................................................................................................................................................. 1584
orbit ................................................................................................................................................. 1585
fram erate ................................................................................................................................................. 1585
undo ................................................................................................................................................. 1585
redo ................................................................................................................................................. 1586
addport ................................................................................................................................................. 1586
rem oveport ................................................................................................................................................. 1586
connect ................................................................................................................................................. 1587
disconnect ................................................................................................................................................. 1587
setexpansion ................................................................................................................................................. 1587
rem oveexpansion ................................................................................................................................................. 1587
getactivesolver ................................................................................................................................................. 1588
setactivesolver ................................................................................................................................................. 1588
getnam e ................................................................................................................................................. 1588
setnam e ................................................................................................................................................. 1588
autoarrange ................................................................................................................................................. 1589
createcom pound ................................................................................................................................................. 1589
addproperty ................................................................................................................................................. 1589
setexpression ................................................................................................................................................. 1589
im portdataset ................................................................................................................................................. 1590
cleardataset ................................................................................................................................................. 1591
getcelllist ................................................................................................................................................. 1591
getlayerlist ................................................................................................................................................. 1591
setlayer ................................................................................................................................................. 1591
loadgdsfile ................................................................................................................................................. 1592
setcom positionfraction ................................................................................................................................................. 1592
getcom positionfraction ................................................................................................................................................. 1592
seticon ................................................................................................................................................. 1593

2003 - 2016 Lumerical Solutions, Inc


10 Lumerical Knowledge Base

10 Running simulations ............................................................................................................ 1593


run ................................................................................................................................................. 1593
runparallel ................................................................................................................................................. 1594
addjob ................................................................................................................................................. 1594
runjobs ................................................................................................................................................. 1594
clearjobs ................................................................................................................................................. 1595
runsw eep ................................................................................................................................................. 1595
11 FDTD Measurements and Normalization
............................................................................................................ 1595
transm ission ................................................................................................................................................. 1596
transm ission_avg ................................................................................................................................................. 1597
transm ission_pavg ................................................................................................................................................. 1597
getsourceangle ................................................................................................................................................. 1598
nonorm ................................................................................................................................................. 1598
cw norm ................................................................................................................................................. 1598
sourcenorm ................................................................................................................................................. 1599
sourcenorm 2_avg ................................................................................................................................................. 1599
sourcenorm 2_pavg ................................................................................................................................................. 1600
dipolepow er ................................................................................................................................................. 1600
sourcepow er ................................................................................................................................................. 1601
sourcepow er_avg ................................................................................................................................................. 1602
sourcepow er_pavg ................................................................................................................................................. 1603
sourceintensity ................................................................................................................................................. 1603
sourceintensity_avg ................................................................................................................................................. 1604
sourceintensity_pavg ................................................................................................................................................. 1604
12 FDE Solver Measurements ............................................................................................................ 1605
setanalysis ................................................................................................................................................. 1605
getanalysis ................................................................................................................................................. 1605
analysis ................................................................................................................................................. 1606
m esh ................................................................................................................................................. 1606
findm odes ................................................................................................................................................. 1606
selectm ode ................................................................................................................................................. 1606
frequencysw eep ................................................................................................................................................. 1607
coupling ................................................................................................................................................. 1607
overlap ................................................................................................................................................. 1608
bestoverlap ................................................................................................................................................. 1609
propagate ................................................................................................................................................. 1609
num m odes ................................................................................................................................................. 1610
optim izeposition ................................................................................................................................................. 1610
13 EME Solver Analysis ............................................................................................................ 1611
setem eanalysis ................................................................................................................................................. 1611
getem eanalysis ................................................................................................................................................. 1611
em epropagate ................................................................................................................................................. 1611
em esw eep ................................................................................................................................................. 1612
getem esw eep ................................................................................................................................................. 1612
14 INTERCONNECT Element library
............................................................................................................ 1612
library ................................................................................................................................................. 1613
addtolibrary ................................................................................................................................................. 1613
custom library ................................................................................................................................................. 1613
autoplace ................................................................................................................................................. 1614
saveelem ent ................................................................................................................................................. 1614
loadelem ent ................................................................................................................................................. 1614
probe ................................................................................................................................................. 1614
setvalue ................................................................................................................................................. 1615
exportschem atic ................................................................................................................................................. 1615
im portschem atic ................................................................................................................................................. 1615
loaddesignkit ................................................................................................................................................. 1615
rem ovedesignkit ................................................................................................................................................. 1616
reloaddesignkit ................................................................................................................................................. 1616
loadcustom ................................................................................................................................................. 1616
packagedesignkit ................................................................................................................................................. 1616
installdesignkit ................................................................................................................................................. 1617
replacelibrary ................................................................................................................................................. 1617
15 INTERCONNECT Measurements
............................................................................................................ 1617
validate ................................................................................................................................................. 1619
validateall ................................................................................................................................................. 1619
setresult ................................................................................................................................................. 1619

2003 - 2016 Lumerical Solutions, Inc


Contents 11

getresultdata ................................................................................................................................................. 1620


getvalue ................................................................................................................................................. 1620
popportdata ................................................................................................................................................. 1620
pushportdata ................................................................................................................................................. 1620
cloneportdata ................................................................................................................................................. 1621
popportfram e ................................................................................................................................................. 1621
pushportfram e ................................................................................................................................................. 1622
popportfram edata ................................................................................................................................................. 1622
pushportfram edata ................................................................................................................................................. 1623
getportfram eheader ................................................................................................................................................. 1623
setportfram eheader ................................................................................................................................................. 1623
getm onitorfram e ................................................................................................................................................. 1623
getm onitorw aveform ................................................................................................................................................. 1624
portdatasize ................................................................................................................................................. 1625
getopticaldata ................................................................................................................................................. 1625
getopticalw aveform ................................................................................................................................................. 1626
setopticaldata ................................................................................................................................................. 1627
getdigitaldata ................................................................................................................................................. 1628
getdigitalw aveform ................................................................................................................................................. 1628
setdigitaldata ................................................................................................................................................. 1629
getelectricaldata ................................................................................................................................................. 1629
getelectricalw aveform ................................................................................................................................................. 1630
setelectricaldata ................................................................................................................................................. 1631
setsparam eter ................................................................................................................................................. 1631
setfir ................................................................................................................................................. 1633
setsetting ................................................................................................................................................. 1633
getsetting ................................................................................................................................................. 1634
getports ................................................................................................................................................. 1634
runoptim ization ................................................................................................................................................. 1634
exportim age ................................................................................................................................................. 1635
16 Interoperability ............................................................................................................ 1635
opensession ................................................................................................................................................. 1636
closesession ................................................................................................................................................. 1637
putrem otedata ................................................................................................................................................. 1637
getrem otedata ................................................................................................................................................. 1638
evalrem ote ................................................................................................................................................. 1639
appopen ................................................................................................................................................. 1639
appgetvar ................................................................................................................................................. 1640
appevalscript ................................................................................................................................................. 1641
appclose ................................................................................................................................................. 1641
m atlabsave ................................................................................................................................................. 1642
m atlabsavelegacy ................................................................................................................................................. 1642
m atlabload ................................................................................................................................................. 1642
m atlab ................................................................................................................................................. 1642
m atlabget ................................................................................................................................................. 1643
m atlabput ................................................................................................................................................. 1644
17 Measurement and optimization
............................................................................................................
data 1644
deletesw eep ................................................................................................................................................. 1645
getsw eepdata ................................................................................................................................................. 1645
getsw eepresult ................................................................................................................................................. 1646
getdata ................................................................................................................................................. 1646
getresult ................................................................................................................................................. 1647
runanalysis ................................................................................................................................................. 1647
havedata ................................................................................................................................................. 1648
haveresult ................................................................................................................................................. 1648
havesw eepdata ................................................................................................................................................. 1648
havesw eepresult ................................................................................................................................................. 1649
copydcard ................................................................................................................................................. 1649
clearanalysis ................................................................................................................................................. 1650
cleardcard ................................................................................................................................................. 1650
getelectric ................................................................................................................................................. 1650
getm agnetic ................................................................................................................................................. 1651
Read and w rite data to files ................................................................................................................................................. 1651
loadsw eep ................................................................................................................................................. 1651
savesw eep ................................................................................................................................................. 1651
issw eep ................................................................................................................................................. 1652
m cfit ................................................................................................................................................. 1652

2003 - 2016 Lumerical Solutions, Inc


12 Lumerical Knowledge Base

copysw eep ................................................................................................................................................. 1652


pastesw eep ................................................................................................................................................. 1652
addsw eep ................................................................................................................................................. 1653
insertsw eep ................................................................................................................................................. 1653
getsw eep ................................................................................................................................................. 1653
setsw eep ................................................................................................................................................. 1654
addsw eepparam eter ................................................................................................................................................. 1655
addsw eepresult ................................................................................................................................................. 1655
rem ovesw eepparam eter ................................................................................................................................................. 1656
rem ovesw eepresult ................................................................................................................................................. 1656
sim ulationdiverged ................................................................................................................................................. 1656
18 Near to far field projections............................................................................................................ 1657
farfieldfilter ................................................................................................................................................. 1658
farfield2d ................................................................................................................................................. 1658
farfieldvector2d ................................................................................................................................................. 1659
farfieldpolar2d ................................................................................................................................................. 1659
farfieldangle ................................................................................................................................................. 1659
farfield2dintegrate ................................................................................................................................................. 1660
farfield3d ................................................................................................................................................. 1661
farfieldvector3d ................................................................................................................................................. 1661
farfieldpolar3d ................................................................................................................................................. 1662
farfieldux ................................................................................................................................................. 1662
farfielduy ................................................................................................................................................. 1662
farfieldspherical ................................................................................................................................................. 1663
farfield3dintegrate ................................................................................................................................................. 1663
farfieldexact2d ................................................................................................................................................. 1664
farfieldexact3d ................................................................................................................................................. 1664
farfieldexact ................................................................................................................................................. 1665
19 Grating projections ............................................................................................................ 1666
grating ................................................................................................................................................. 1666
gratingn ................................................................................................................................................. 1667
gratingm ................................................................................................................................................. 1668
gratingpolar ................................................................................................................................................. 1668
gratingvector ................................................................................................................................................. 1669
gratingperiod1 ................................................................................................................................................. 1669
gratingperiod2 ................................................................................................................................................. 1670
gratingangle ................................................................................................................................................. 1670
gratingu1 ................................................................................................................................................. 1670
gratingu2 ................................................................................................................................................. 1670
gratingbloch1 ................................................................................................................................................. 1671
gratingbloch2 ................................................................................................................................................. 1671
20 Material database ............................................................................................................ 1671
addm aterial ................................................................................................................................................. 1672
copym aterial ................................................................................................................................................. 1672
setm aterial ................................................................................................................................................. 1672
getm aterial ................................................................................................................................................. 1673
getindex ................................................................................................................................................. 1673
getfdtdindex ................................................................................................................................................. 1673
getm odeindex ................................................................................................................................................. 1674
getnum ericalperm ittivity ................................................................................................................................................. 1674
deletem aterial ................................................................................................................................................. 1675
m aterialexists ................................................................................................................................................. 1676
getfdtdsurfaceconductivity ................................................................................................................................................. 1676
getsurfaceconductivity ................................................................................................................................................. 1676
21 GDSII ............................................................................................................ 1677
gdsopen ................................................................................................................................................. 1677
gdsclose ................................................................................................................................................. 1677
gdsbegincell ................................................................................................................................................. 1678
gdsendcell ................................................................................................................................................. 1678
gdsaddpoly ................................................................................................................................................. 1679
gdsaddcircle ................................................................................................................................................. 1679
gdsaddrect ................................................................................................................................................. 1680
gdsaddref ................................................................................................................................................. 1680
gdsim port ................................................................................................................................................. 1681
22 HDF5 ............................................................................................................ 1682
h5info ................................................................................................................................................. 1682

2003 - 2016 Lumerical Solutions, Inc


Contents 13

h5read ................................................................................................................................................. 1683


h5readattr ................................................................................................................................................. 1683
23 User defined GUIs ............................................................................................................ 1684
m essage ................................................................................................................................................. 1684
new w izard ................................................................................................................................................. 1684
new w izardpage ................................................................................................................................................. 1685
w izardw idget ................................................................................................................................................. 1685
w izarddata ................................................................................................................................................. 1685
runw izard ................................................................................................................................................. 1686
w izardgetdata ................................................................................................................................................. 1686
killw izard ................................................................................................................................................. 1686
w izardoption ................................................................................................................................................. 1687
fileopendialog ................................................................................................................................................. 1687
filesavedialog ................................................................................................................................................. 1687
24 Creating your own script commands
............................................................................................................ 1687
Part VIII Applications 1690
1 Nanophotonics ............................................................................................................ 1694
Microscopy and Lithography................................................................................................................................................. 1696
Particle and Surface Scattering
................................................................................................................................................. 1722
Photonic Crystal and Diffractive
.................................................................................................................................................
Optics 1757
Plasm onics ................................................................................................................................................. 1881
Other Nanophotonic Applications
................................................................................................................................................. 1941
2 Metamaterials ............................................................................................................ 1984
Methodology ................................................................................................................................................. 1986
S Param eter extraction ................................................................................................................................................. 1987
Effective bulk properties ................................................................................................................................................. 1989
Effective param eters - Sm ith................................................................................................................................................. 1990
THz device - Chen ................................................................................................................................................. 1995
Wire Pairs - Zhou ................................................................................................................................................. 1997
Chiral m aterials - Kw on ................................................................................................................................................. 1999
Bulk m etam aterials ................................................................................................................................................. 2002
Terahertz Resonator ................................................................................................................................................. 2005
Metam aterial Absorbers ................................................................................................................................................. 2007
3 Photonic Integrated Circuits
............................................................................................................ 2016
Passive com ponents ................................................................................................................................................. 2018
Electro-Optic Modulators ................................................................................................................................................. 2204
Photodetectors ................................................................................................................................................. 2268
Circuits and System s ................................................................................................................................................. 2291
Com pact Model Libraries (CMLs)
................................................................................................................................................. 2474
Lasers ................................................................................................................................................. 2484
Therm al Tuning ................................................................................................................................................. 2503
4 CMOS Image Sensors ............................................................................................................ 2510
Optical Sim ulation Methodology
................................................................................................................................................. 2513
Electrical Sim ulation Methodology
................................................................................................................................................. 2527
Exam ples ................................................................................................................................................. 2532
5 Solar Cells ............................................................................................................ 2594
Getting Started ................................................................................................................................................. 2597
Methodology ................................................................................................................................................. 2623
Silicon w ith m oth-eye antireflection
.................................................................................................................................................
coatings 2627
2D silicon square grating ................................................................................................................................................. 2630
3D pillar silicon solar cell ................................................................................................................................................. 2635
Thin film GaAs solar cell ................................................................................................................................................. 2640
TiO2 pyram id on silicon ................................................................................................................................................. 2651
Organic solar cell w ith PC structure
................................................................................................................................................. 2658
Plasm onic solar cell at norm.................................................................................................................................................
al and oblique incidence 2663
6 Heat Assisted Magnetic Recording
............................................................................................................ 2669
Methodology and Tips ................................................................................................................................................. 2670
HAMR - Grating Coupler ................................................................................................................................................. 2671
HAMR - Tapered Waveguide ................................................................................................................................................. 2673
HAMR - Nanoscale Ridge Aperture
................................................................................................................................................. 2676
HAMR - Plasm on Antenna ................................................................................................................................................. 2678
Com plete Optical HAMR System
................................................................................................................................................. 2680
7 OLEDs ............................................................................................................ 2682

2003 - 2016 Lumerical Solutions, Inc


14 Lumerical Knowledge Base

Sim ulation Methodology ................................................................................................................................................. 2685


Sim ple 2D OLED ................................................................................................................................................. 2689
3D OLED ................................................................................................................................................. 2694
Supplem entary Topics ................................................................................................................................................. 2708
8 Nonlinear and Gain ............................................................................................................ 2716
Methodology ................................................................................................................................................. 2718
Gain and Laser ................................................................................................................................................. 2723
Kerr Effect ................................................................................................................................................. 2750
Harm onic Generation ................................................................................................................................................. 2756
Four Wave Mixing ................................................................................................................................................. 2757
Soliton Propagation ................................................................................................................................................. 2761
Ring Modulator ................................................................................................................................................. 2766
Optical Bistability ................................................................................................................................................. 2768
9 Other Applications ............................................................................................................ 2771
Graphene ................................................................................................................................................. 2773
Electronic Com ponents ................................................................................................................................................. 2800
Heat Transport ................................................................................................................................................. 2853
Magneto-Optical Kerr Effect ................................................................................................................................................. 2879
Faraday Effect ................................................................................................................................................. 2881
Nonreciprocal Phase Shift ................................................................................................................................................. 2883
Tim e Reversal ................................................................................................................................................. 2891
Stress and Strain ................................................................................................................................................. 2892
Index 2897

2003 - 2016 Lumerical Solutions, Inc


Knowledge Base 15

1 Knowledge Base
Welcome to the Lumerical Solutions Knowledge Base for release 2016b
You may browse the online Knowledge Base via the Table of Contents or use the search to find specific pages. The
Previous and Next buttons located at the upper and lower right can also be used to navigate through the pages.

New users: We recommend working through a couple of Getting Started 171 Tutorials. You can also watch the
introductory product videos on the Video page.

New Features - See new product features by release


Component Tools
New Features -
System Tools 883
Installation 16 Installation and setup
Solvers 101 Learn about Lumerical's solvers
Getting Started 171 Introductory tutorials and examples
Component Tools Component design tools reference guide
Reference Guide 172 Solvers 101 : FDTD, varFDTD, EME, FDE, CHARGE, HEAT
Products: FDTD Solutions, MODE Solutions, DEVICE
System Tools System design tools reference guide
Reference Guide 883 Solvers 101 : DDF, SDA
Products: INTERCONNECT
Script Language 1383 Scripting language tutorial and command definitions
Applications 1690 Application examples organized in the following sections:
Nanophotonics 1694
Metamaterials 1984
Photonic Integrated Circuits (PIC) 2016
CMOS image sensors 2510
Solar cells 2594
Heat Assisted Magnetic Recording (HAMR) 2669
OLEDs 2682
Nonlinear and Gain systems 2716
Other applications 2771

Lumerical recommends that users always upgrade to the latest product version (currently release 2016b) to gain
access to all new features and bug fixes. Customers with a current license are always entitled to upgrade to the
latest version at no additional cost. For users that are not ready to upgrade, an older snapshot of the Knowledge
Base can be found at 2015b Knowledge Base.

We recommend using this online Knowledge Base to access the most up-to-date documentation. However, a PDF
copy of the Knowledge Base is available for customers working without an internet connection. Please note that
example files and movies are not available in the PDF; such files must be accessed via the online Knowledge base.
Download: Knowledge_Base.pdf

Find our Chinese Knowledge Base micro-site here.

2003 - 2016 Lumerical Solutions, Inc


16 Lumerical Knowledge Base

2 Installation Manual
Please select the appropriate section

Windows - FDTD Solutions 17 Linux - FDTD Solutions 36 MAC - FDTD Solutions 58

Windows - MODE Solutions 22 Linux - MODE Solutions 39 MAC - MODE Solutions 62

Windows - DEVICE 26 Linux - DEVICE 42 MAC - DEVICE 65

Windows - INTERCONNECT 30 Linux - INTERCONNECT 46 MAC - INTERCONNECT 69

Sim ple Installation (YouTube)


Alternative video source in Mandarin, click here

2003 - 2016 Lumerical Solutions, Inc


Installation Manual 17

2.1 Windows Installation

Windows Installation manuals. Please select your Product

FDTD Solutions 17

MODE Solutions 22

INTERCONNECT 30

DEVICE 26

Please contact install@lumerical.com if you have any questions.

2.1.1 FDTD Solutions Install Instructions

The following section


describes the
standard installation
process for FDTD
Solutions.

Please ensure that


you have an
Administrator
privilege before
continuing with the
install process.

Sim ple Installation (YouTube)


Alternative video source in Mandarin, click here

Pre-Step 1: Check the system requirements and supported operating systems


View details
For the complete list of system requirements and supported platforms, please consult the supported systems
page.

Pre-Step 2: Install the FlexNet License Manager - Floating Licenses Only


View details
NOTE: Node Lock or Floating license
Most trial evaluation licenses are Node Lock and do not require the
installation of the FlexNet License Manager. For Node Lock licenses, please

2003 - 2016 Lumerical Solutions, Inc


18 Lumerical Knowledge Base

continue to Installation Procedure step 1.

Purchased licenses can be either Node Lock or Floating. For Floating licenses,
the Flexnet License Manager must be installed on one computer on your network.
See the detailed instructions below.

LICENSE MANAGER INSTALLATION

Lumerical recommends installing the FlexNet License


Manager on a reliable server that will remain running
and connected to your local network. Please note that
you must have administrator privilege to install the
Lumerical FlexNet License Manager.

1. Download the FlexNet Licensing Manager from


the Download Center (registration required)

2. Unzip the installation package. You can right-click


the zip file and select Extract All...

3. Run the installer by launching the LFLM.msi


installer
Note: Under install options, please
ensure that "Standard
Configuration" is checked. Keeping
the default settings is
recommended.

4. After successfully installing the FlexNet License


Manager, the activation utility will automatically
open.

5. Enter your eight-character activation code,


including the hyphen, and click the Activate
button.

6. If successful, the Activation window should now list


the valid license status and expiry date.

The License Activation utility can be also be


accessed by:
Windows 7 or 10: Click Start -> All Programs ->
Lumerical -> Lumerical FlexLM -> Activate or
Deactivate a license

Installation Procedure
1. Download the FDTD Solutions installation package
View details

2003 - 2016 Lumerical Solutions, Inc


Installation Manual 19

Download the installation package from the Download


Center (registration required)

2. Unzip the installation package


View details
You must UNZIP the compressed install packages
before running the installer. Right-Click the downloaded
file and select Extract All.

3. Run the installer


View details
Go to the FDTD Solutions directory created in Step 2
and run "FDTD_Solutions_Installer.exe". We
recommended using all of the default options during the
installation.

Note : The install wizard will install


FDTD Solutions, and other required
product components such as Microsoft MPI
and MPICH2 Framework. The wizard will
only install the other product
components if they are not already
installed and up to date on your
computer.

4. Launch FDTD Solutions software and configure your license


View details

2003 - 2016 Lumerical Solutions, Inc


20 Lumerical Knowledge Base

This can be done by double clicking the FDTD


Solutions icon on your Desktop, or alternatively:
Windows 7 or earlier: Click Start -> All Programs ->
Lumerical ->FDTD Solutions ->FDTD Solutions
Windows 8: Open the Charm Bar -> Click Search ->
Search for "FDTD Solutions" (Apps)

Launching FDTD Solutions for the first time, or if the


license has not been configured yet, you may see the
following error screen. This is a prompt to configure your
license information, or activate the license code
received. To configure your license, click the Yes
button.

You may re-open the Configure license utility later


through the Start menu:
Windows 7 or 10: Click Start -> All Programs ->
Lumerical -> FDTD Solutions --> Configure FDTD
license
Windows 8: Open the Charm Bar -> Click Search ->
Search for "Configure FDTD license" (Apps)
NODE LOCKED LICENSE:

If you have a node-locked license, ensure the Node


Locked tab is selected, then enter in your case-
sensitive eight-character activation code, including the
hyphen, and click the Activate button. It may take a
few minutes before the license activation completes.

FLOATING LICENSE:

If you have a floating license, ensure the Floating tab is


selected, then enter in the server name or IP address of
the license server set up from Pre-Step 2 - LICENSE
MANAGER INSTALLATION

Note: If you are installing Lumerical's


software on a second computer in your
local network, it is not necessary to
activate the license again. Instead, you
must specify the Name or IP address of
the computer where the license was
activated.

2003 - 2016 Lumerical Solutions, Inc


Installation Manual 21

5.Next steps
View details
Getting started examples
Work through one of the introductory getting started 171 examples.
More product licensing information
See the Product Licensing 73 chapter.
Advanced setup and configuration
See the Setup and Configuration section for information on advanced configuration of Lumerical's software.
Running simulations
See the Running Simulations section for information on running simulations, including from the command line.
Online vs Offline activation
Two license activation modes are available: Online Mode and Offline Mode.
Online activation is generally faster and easier, so this is the recommended method for all users.
Offline activation is a backup solution for customers who are unable to activate license through the internet.
License activation will be done by sending a "request XML file" to Lumerical Support, and a "response XML file"
will be provided. For more information, see the Offline Activation page.
Please note: Offline mode activation is only available for customers. Trial / evaluation licenses must be
activated using online mode.
Save your activation code
Please keep your Activation Code for your records. If you need to change your license server, you can "de-
activate" the license and re-use the Activation Code on the new server.

This completes the FDTD Solutions installation for Windows.

2003 - 2016 Lumerical Solutions, Inc


22 Lumerical Knowledge Base

2.1.2 MODE Solutions Install Instructions

The following section


describes the
standard installation
process for MODE
Solutions.

Please ensure that


you have an
Administrator
privilege before
continuing with the
install process.

Sim ple Installation (YouTube)


Alternative video source in Mandarin, click here

Pre-Step 1: Check the system requirements and supported operating systems


View details
For the complete list of system requirements and supported platforms, please consult the supported systems
page.

Pre-Step 2: Install the FlexNet License Manager - Floating Licenses Only


View details
NOTE: Node Lock or Floating license
Most trial evaluation licenses are Node Lock and do not require the
installation of the FlexNet License Manager. For Node Lock licenses, please
continue to Installation Procedure step 1.

Purchased licenses can be either Node Lock or Floating. For Floating licenses,
the Flexnet License Manager must be installed on one computer on your network.
See the detailed instructions below.

LICENSE MANAGER INSTALLATION

Lumerical recommends installing the FlexNet License


Manager on a reliable server that will remain running
and connected to your local network. Please note that
you must have administrator privilege to install the
Lumerical FlexNet License Manager.

1. Download the FlexNet Licensing Manager from


the Download Center (registration required)

2. Unzip the installation package. You can right-click


the zip file and select Extract All...

2003 - 2016 Lumerical Solutions, Inc


Installation Manual 23

3. Run the installer by launching the LFLM.msi


installer
Note: Under install options, please
ensure that "Standard
Configuration" is checked. Keeping
the default settings is
recommended.

4. After successfully installing the FlexNet License


Manager, the activation utility will automatically
open.

5. Enter your eight-character activation code,


including the hyphen, and click the Activate
button.

6. If successful, the Activation window should now list


the valid license status and expiry date.

The License Activation utility can be also be


accessed by:
Windows 7 or 10: Click Start -> All Programs ->
Lumerical -> Lumerical FlexLM -> Activate or
Deactivate a license

Installation Procedure
1. Download the MODE Solutions installation package
View details
Download the installation package from the Download
Center (registration required)

2. Unzip the installation package


View details
You must UNZIP the compressed install packages
before running the installer. Right-Click the downloaded
file and select Extract All.

3. Run the installer


View details

2003 - 2016 Lumerical Solutions, Inc


24 Lumerical Knowledge Base

Go to the MODE Solutions directory created in Step 2


and run "MODE_Solutions_Installer.exe". We
recommended using all of the default options during the
installation.

Note : The install wizard will install


MODE Solutions, and other required
product components such as Microsoft MPI
and MPICH2 Framework. The wizard will
only install the other product
components if they are not already
installed and up to date on your
computer.

4.Launch MODE Solutions software and configure your license


View details
This can be done by double clicking the MODE
Solutions icon on your Desktop, or alternatively:
Windows 7 or earlier: Click Start -> All Programs ->
Lumerical ->MODE Solutions ->MODE Solutions
Windows 8: Open the Charm Bar -> Click Search ->
Search for "MODE Solutions" (Apps)

Launching MODE Solutions for the first time, or if the


license has not been configured yet, you may see the
following error screen. This is a prompt to configure your
license information, or activate the license code
received. To configure your license, click the Yes
button.

You may re-open the Configure license utility later


through the Start menu:
Windows 7 or 10: Click Start -> All Programs ->
Lumerical -> MODE Solutions --> Configure MODE
license
Windows 8: Open the Charm Bar -> Click Search ->
Search for "Configure MODE license" (Apps)

2003 - 2016 Lumerical Solutions, Inc


Installation Manual 25

NODE LOCKED LICENSE:

If you have a node-locked license, ensure the Node


Locked tab is selected, then enter in your case-
sensitive eight-character activation code, including the
hyphen, and click the Activate button. It may take a
few minutes before the license activation completes.

FLOATING LICENSE:

If you have a floating license, ensure the Floating tab is


selected, then enter in the server name or IP address of
the license server set up from Pre-Step 2 - LICENSE
MANAGER INSTALLATION

Note: If you are installing Lumerical's


software on a second computer in your
local network, it is not necessary to
activate the license again. Instead, you
must specify the Name or IP address of
the computer where the license was
activated.

5.Next steps
View details
Getting started examples
Work through one of the introductory getting started 171 examples.
More product licensing information
See the Product Licensing 73 chapter.
Advanced setup and configuration
See the Setup and Configuration section for information on advanced configuration of Lumerical's software.
Running simulations
See the Running Simulations section for information on running simulations, including from the command line.
Online vs Offline activation
Two license activation modes are available: Online Mode and Offline Mode.
Online activation is generally faster and easier, so this is the recommended method for all users.
Offline activation is a backup solution for customers who are unable to activate license through the internet.
License activation will be done by sending a "request XML file" to Lumerical Support, and a "response XML file"
will be provided. For more information, see the Offline Activation page.
Please note: Offline mode activation is only available for customers. Trial / evaluation licenses must be
activated using online mode.

2003 - 2016 Lumerical Solutions, Inc


26 Lumerical Knowledge Base

Save your activation code


Please keep your Activation Code for your records. If you need to change your license server, you can "de-
activate" the license and re-use the Activation Code on the new server.

This completes the MODE Solutions installation for Windows.

2.1.3 DEVICE Install Instructions

The following section


describes the
standard installation
process for DEVICE.

Please ensure that


you have an
Administrator
privilege before
continuing with the
install process.

Sim ple Installation (YouTube)


Alternative video source in Mandarin, click here

Pre-Step 1: Check the system requirements and supported operating systems


View details
For the complete list of system requirements and supported platforms, please consult the supported systems
page.

Pre-Step 2: Install the FlexNet License Manager - Floating Licenses Only


View details
NOTE: Node Lock or Floating license
Most trial evaluation licenses are Node Lock and do not require the
installation of the FlexNet License Manager. For Node Lock licenses, please
continue to Installation Procedure step 1.

Purchased licenses can be either Node Lock or Floating. For Floating licenses,
the Flexnet License Manager must be installed on one computer on your network.
See the detailed instructions below.

2003 - 2016 Lumerical Solutions, Inc


Installation Manual 27

LICENSE MANAGER INSTALLATION

Lumerical recommends installing the FlexNet License


Manager on a reliable server that will remain running
and connected to your local network. Please note that
you must have administrator privilege to install the
Lumerical FlexNet License Manager.

1. Download the FlexNet Licensing Manager from


the Download Center (registration required)

2. Unzip the installation package. You can right-click


the zip file and select Extract All...

3. Run the installer by launching the LFLM.msi


installer
Note: Under install options, please
ensure that "Standard
Configuration" is checked. Keeping
the default settings is
recommended.

4. After successfully installing the FlexNet License


Manager, the activation utility will automatically
open.

5. Enter your eight-character activation code,


including the hyphen, and click the Activate
button.

6. If successful, the Activation window should now list


the valid license status and expiry date.

The License Activation utility can be also be


accessed by:
Windows 7 or 10: Click Start -> All Programs ->
Lumerical -> Lumerical FlexLM -> Activate or
Deactivate a license

Installation Procedure
1. Download the DEVICE installation package
View details
Download the installation package from the Download
Center (registration required)

2003 - 2016 Lumerical Solutions, Inc


28 Lumerical Knowledge Base

2. Unzip the installation package


View details
You must UNZIP the compressed install packages
before running the installer. Right-Click the downloaded
file and select Extract All.

3. Run the installer


View details
Go to the DEVICE directory created in Step 2 and run
"DEVICE_Installer.exe". We recommended using all
of the default options during the installation.

Note : The install wizard will install


DEVICE, and other required product
components such as Microsoft MPI and
MPICH2 Framework. The wizard will only
install the other product components if
they are not already installed and up to
date on your computer.

4.Launch DEVICE software and configure your license


View details
This can be done by double clicking the Lumerical
DEVICE icon on your Desktop, or alternatively:
Windows 7 or earlier: Click Start -> All Programs ->
Lumerical ->DEVICE ->DEVICE
Windows 8: Open the Charm Bar -> Click Search ->
Search for "DEVICE" (Apps)

2003 - 2016 Lumerical Solutions, Inc


Installation Manual 29

Launching DEVICE for the first time, or if the license


has not been configured yet, you may see the following
error screen. This is a prompt to configure your license
information, or activate the license code received. To
configure your license, click the Yes button.

You may re-open the Configure license utility later


through the Start menu:
Windows 7 or 10: Click Start -> All Programs ->
Lumerical -> DEVICE --> Configure DEVICE license
Windows 8: Open the Charm Bar -> Click Search ->
Search for "Configure DEVICE license" (Apps)

NODE LOCKED LICENSE:

If you have a node-locked license, ensure the Node


Locked tab is selected, then enter in your case-
sensitive eight-character activation code, including the
hyphen, and click the Activate button. It may take a
few minutes before the license activation completes.

FLOATING LICENSE:

If you have a floating license, ensure the Floating tab is


selected, then enter in the server name or IP address of
the license server set up from Pre-Step 2 - LICENSE
MANAGER INSTALLATION

Note: If you are installing Lumerical's


software on a second computer in your
local network, it is not necessary to
activate the license again. Instead, you
must specify the Name or IP address of
the computer where the license was
activated.

5.Next steps
View details
Getting started examples
Work through one of the introductory getting started 171 examples.
More product licensing information
See the Product Licensing 73 chapter.

2003 - 2016 Lumerical Solutions, Inc


30 Lumerical Knowledge Base

Advanced setup and configuration


See the Setup and Configuration section for information on advanced configuration of Lumerical's software.
Running simulations
See the Running Simulations section for information on running simulations, including from the command line.
Online vs Offline activation
Two license activation modes are available: Online Mode and Offline Mode.
Online activation is generally faster and easier, so this is the recommended method for all users.
Offline activation is a backup solution for customers who are unable to activate license through the internet.
License activation will be done by sending a "request XML file" to Lumerical Support, and a "response XML file"
will be provided. For more information, see the Offline Activation page.
Please note: Offline mode activation is only available for customers. Trial / evaluation licenses must be
activated using online mode.
Save your activation code
Please keep your Activation Code for your records. If you need to change your license server, you can "de-
activate" the license and re-use the Activation Code on the new server.

This completes the DEVICE installation for Windows.

2.1.4 INTERCONNECT Install Instructions

The following section


describes the
standard installation
process for
INTERCONNECT.

Please ensure that


you have an
Administrator
privilege before
continuing with the
install process.

Sim ple Installation (YouTube)


Alternative video source in Mandarin, click here

Pre-Step 1: Check the system requirements and supported operating systems


View details
For the complete list of system requirements and supported platforms, please consult the supported systems
page.

Pre-Step 2: Install the FlexNet License Manager - Floating Licenses Only


View details
NOTE: Node Lock or Floating license
Most trial evaluation licenses are Node Lock and do not require the
installation of the FlexNet License Manager. For Node Lock licenses, please
continue to Installation Procedure step 1.

2003 - 2016 Lumerical Solutions, Inc


Installation Manual 31

Purchased licenses can be either Node Lock or Floating. For Floating licenses,
the Flexnet License Manager must be installed on one computer on your network.
See the detailed instructions below.

LICENSE MANAGER INSTALLATION

Lumerical recommends installing the FlexNet License


Manager on a reliable server that will remain running
and connected to your local network. Please note that
you must have administrator privilege to install the
Lumerical FlexNet License Manager.

1. Download the FlexNet Licensing Manager from


the Download Center (registration required)

2. Unzip the installation package. You can right-click


the zip file and select Extract All...

3. Run the installer by launching the LFLM.msi


installer
Note: Under install options, please
ensure that "Standard
Configuration" is checked. Keeping
the default settings is
recommended.

4. After successfully installing the FlexNet License


Manager, the activation utility will automatically
open.

5. Enter your eight-character activation code,


including the hyphen, and click the Activate
button.

6. If successful, the Activation window should now list


the valid license status and expiry date.

The License Activation utility can be also be


accessed by:
Windows 7 or 10: Click Start -> All Programs ->
Lumerical -> Lumerical FlexLM -> Activate or
Deactivate a license

Installation Procedure
1. Download the INTERCONNECT installation package
View details

2003 - 2016 Lumerical Solutions, Inc


32 Lumerical Knowledge Base

Download the installation package from the Download


Center (registration required)

2. Unzip the installation package


View details
You must UNZIP the compressed install packages
before running the installer. Right-Click the downloaded
file and select Extract All.

3. Run the installer


View details
Go to the INTERCONNECT directory created in Step 2
and run "INTERCONNECT_Installer.exe". We
recommended using all of the default options during the
installation.

4. Launch INTERCONNECT software and configure your license


View details
This can be done by double clicking the
INTERCONNECT icon on your Desktop, or alternatively:
Windows 7 or earlier: Click Start -> All Programs ->
Lumerical ->INTERCONNECT ->INTERCONNECT
Windows 8: Open the Charm Bar -> Click Search ->
Search for "INTERCONNECT" (Apps)

2003 - 2016 Lumerical Solutions, Inc


Installation Manual 33

Launching INTERCONNECT for the first time, or if the


license has not been configured yet, you may see the
following error screen. This is a prompt to configure your
license information, or activate the license code
received. To configure your license, click the Yes
button.

You may re-open the Configure license utility later


through the Start menu:
Windows 7 or 10: Click Start -> All Programs ->
Lumerical -> INTERCONNECT --> Configure
INTERCONNECT license
Windows 8: Open the Charm Bar -> Click Search ->
Search for "Configure INTERCONNECT license" (Apps)
NODE LOCKED LICENSE:

If you have a node-locked license, ensure the Node


Locked tab is selected, then enter in your case-
sensitive eight-character activation code, including the
hyphen, and click the Activate button. It may take a
few minutes before the license activation completes.

FLOATING LICENSE:

If you have a floating license, ensure the Floating tab is


selected, then enter in the server name or IP address of
the license server set up from Pre-Step 2 - LICENSE
MANAGER INSTALLATION

Note: If you are installing Lumerical's


software on a second computer in your
local network, it is not necessary to
activate the license again. Instead, you
must specify the Name or IP address of
the computer where the license was
activated.

5.Next steps
View details
Getting started examples
Work through one of the introductory getting started 171 examples.
More product licensing information

2003 - 2016 Lumerical Solutions, Inc


34 Lumerical Knowledge Base

See the Product Licensing 73 chapter.


Advanced setup and configuration
See the Setup and Configuration section for information on advanced configuration of Lumerical's software.
Running simulations
See the Running Simulations section for information on running simulations, including from the command line.
Online vs Offline activation
Two license activation modes are available: Online Mode and Offline Mode.
Online activation is generally faster and easier, so this is the recommended method for all users.
Offline activation is a backup solution for customers who are unable to activate license through the internet.
License activation will be done by sending a "request XML file" to Lumerical Support, and a "response XML file"
will be provided. For more information, see the Offline Activation page.
Please note: Offline mode activation is only available for customers. Trial / evaluation licenses must be
activated using online mode.
Save your activation code
Please keep your Activation Code for your records. If you need to change your license server, you can "de-
activate" the license and re-use the Activation Code on the new server.

This completes the INTERCONNECT installation for Windows.

2.1.5 Running jobs on other computers in your local network


This page describes how to configure the simulation engine so you can run jobs on other computers within your local
area network. Your Lumerical software must be installed on each computer, as described in the Installation
instructions 17 section, before you attempt to configure the engine. Additionally, this feature requires a floating
(network) type license. Node locked licenses are restricted to a single computer.

Concurrent computing refers to running multiple simultaneous simulations, usually on different computers.
Distributed computing refers to running a single simulation using multiple cores/processors/workstations, giving
access to a greater total amount of memory and reducing computation time. Additional information and requirements
can be found on the Resource configuration utility 213 page. For example, all computers must run the same
operating system.

1. Ensure you have the same username and password on all machines
You must have the same credentials (username and password) on all machines. Your account must have a
password.

2. Setup a network directory


A network file system is required so all computers can access the simulation files. This is most easily
accomplished with a network drive. The network drive should be accessible to all computers using the same
Windows UNC path name. For example:
\\server\public\temp

Network drives are often setup in office networks, but you can create your own file share by using the Windows
Explorer to navigate to a folder, then right click on the folder and select the "sharing and security" or "sharing" option
(depending on the version of Windows you are using). For more information on creating a shared folder, see your
Windows operating system documentation.

3. Setup computing resources

2003 - 2016 Lumerical Solutions, Inc


Installation Manual 35

1. Open the software


2. Open the Resource configuration window, (in the Simulation ->
Configure resources menu)
3. Add each resource (computer) to the list
4. Edit each resource and select MPICH2 (rather than the default
Microsoft MPI)
5. Click the Run tests button
6. For the first test, you may be prompted for your Windows account
username and password
7. After entering your username and password, be sure to click the
REGISTER button, then the OK button
8. Re-run the test. It should pass successfully

Your username and password is required to launch simulations on


remote computers. This information will be encrypted and stored in the
Windows registry. You can also access the Set MPICH2 username
and password utility through the start menu:
Start-> All Programs-> Lumerical-> MPICH2-> Set MPICH2 us

Note: If you are encountering "Unable to connect to host" error when


running the configuration test, please see More information on MPICH2

4. Run the test parameter sweep


Copy the file C:\Program Files\Lumerical\<product>\examples\paralleltest to your working
directory on a network drive. Open paralleltest, then switch to the Optimization and Sweeps window. If the
sweeps run properly, your system is configured properly.

Note: Log files


The simulation engine creates a log file named filename_p0.log. The information in this file can be helpful
when debugging problems with the parallel engine.

2.2 Linux Installation

Linux Installation manuals. Please select your Product

FDTD Solutions 36

2003 - 2016 Lumerical Solutions, Inc


36 Lumerical Knowledge Base

MODE Solutions 39

INTERCONNECT 46

DEVICE 42

Please contact install@lumerical.com if you have any questions.

2.2.1 FDTD Solutions Install Instructions

The following section describes the standard installation process for FDTD Solutions. In order to use the software,
you will need at least two install packages: The Lumerical FlexNet License Manager and FDTD Solutions.

Lumerical provides a floating license; which means that the license can be shared between multiple machines in the
same broadcast domain or subnet.

Please ensure that you have an Administrator privilege before continuing with the install process.

Pre-Step 1: Check the system requirements and supported operating systems


View details
For the complete list of system requirements and supported platforms, please consult the supported systems
page.

Installation Procedure
Steps 1-4 outline the installation procedure for Lumerical FlexNet License Manager. This must be done on one
computer.
Steps 5-8 outline the installation procedure for FDTD Solutions. This can be done on multiple computers.

1. Download the Lumerical FlexNet License Manager Installation Package


View details
The installation packages are available from Lumerical
Download Center page (registration is required)

2. Extract the Compressed Installation Package of Lumerical FlexNet License Manager


View details
Upon successful download, unpack the installation package with the following command:
tar -zxf <name of downloaded file>

3. Run the Installer of FlexNet License Manager


View details

2003 - 2016 Lumerical Solutions, Inc


Installation Manual 37

Go to the FlexNet License Manager directory that you


have extracted, and run the installer:
sudo sh ./install.sh

Follow the steps and instructions on the script to


complete the installation.

If you don't have yum installed, you can use the following:
sudo rpm -ivh lumerical-flexlm-<version>.i386.rpm

4. Activate Your License Activation Code


View details
Upon successful installation, you would need to launch
the Lumerical Activation Utility to activate your license.
sudo /opt/lumerical/lumerical-flexlm/lumerical-activation-utility

Note: If you are using non-graphical


Linux, please see "Part 2: Activate
License" link below for further
information on how to activate your
license with a Console Mode.

Online vs Offline activation


Two license activation modes are available:
Online activation would be faster and easier, so this
is the recommended method for all users.

Offline activation is a backup solution for customers


who are unable to activate license through the
internet. License activation will be done by sending a
"request XML file" to Lumerical Support, and a
"response XML file" will be provided. For more
information, see the Offline Activation page.
Please note: Offline mode activation is
only available for customers. Trial /
evaluation licenses must be activated
using online mode.

Enter your eight-character activation code, including the


hyphen, and click the Activate button. It may take a few
minutes before the license activation completes.

Note: Please keep your Activation Code


for your records. If you need to change
your license server, you can "de-
activate" the license and re-use the
Activation Code on the new server.

For more information about activating licenses, select


your license model from the Product Licensing 73 page
then see the Activate your license section.

5. Download the FDTD Solutions Installation Package


View details

2003 - 2016 Lumerical Solutions, Inc


38 Lumerical Knowledge Base

The installation packages are available from Lumerical


Download Center page (registration is required)

6. Extract the Compressed Installation Package of FDTD Solutions


View details
Upon successful download, unpack both installation packages with the following command:
tar -zxf <name of downloaded file>

7. Run the Installer of FDTD Solutions


View details
Go to the FDTD Solutions directory that you have extracted from Step 2, and then run the install utility script with
the command
sudo sh ./install.sh

Follow the steps and instructions on the script to complete the installation.

Tip: installing with RPM


If you wish to have more control over the installation process, you can still use the 'rpm' command to install the
software. This will allow you to do things like change the default installation directory (using the --prefix option)
or prevent the automatic uninstall of old versions.
sudo rpm -ivh FDTD-<version>.rpm

Note: The install.sh script will remove any old versions. If you want to install multiple versions, you should
not use the install script. Instead, manually install the RPM.

8. Launch FDTD Solutions software


View details
This can be done from your terminal by using the
following command
/opt/lumerical/fdtd/bin/fdtd-solutions&

Note: If you have installed the Lumerical


FlexNet License Manager on a different
machine, you would be required to configure
your FDTD Solutions License Configuration.

1. Open your FDTD Solutions License Configuration


/opt/lumerical/fdtd/bin/fdtd-config-license

2. On the "Server" box, enter the host name or the IP


address of your license server.

3. Click OK to save your changes

4. Re-launch FDTD Solutions

2003 - 2016 Lumerical Solutions, Inc


Installation Manual 39

9. Next steps
View details
Optionally, add FDTD Solutions to your system path
Adding FDTD to the system path allows you to start FDTD Solutions simply by typing fdtd-solutions at the
prompt, without having to specify the full path.
sh /opt/lumerical/fdtd/bin/fdtd-config.sh
This script will add the install directory of FDTD Solutions to your system path and add an icon on your desktop.
After running the script, you can start FDTD Solutions by typing fdtd-solutions.
Getting started examples
Work through one of the introductory getting started 171 examples.
More product licensing information
See the Product Licensing 73 chapter.
Advanced setup and configuration
See the Setup and Configuration section for information on advanced configuration of Lumerical's software.
Running simulations
See the Running Simulations section for information on running simulations, including from the command line.

This completes the FDTD Solutions installation for Linux.

2.2.2 MODE Solutions Install Instructions

The following section describes the standard installation process for MODE Solutions. In order to use our software,
you will need at least two install packages: The Lumerical FlexNet License Manager and MODE Solutions.

Lumerical provides a floating license; which means that the license can be shared between multiple machines in the
same broadcast domain or subnet.

Please ensure that you have an Administrator privilege before continuing with the install process.

Pre-Step 1: Check the system requirements and supported operating systems


View details
For the complete list of system requirements and supported platforms, please consult the supported systems
page.

Installation Procedure
Steps 1-4 outline the installation procedure for Lumerical FlexNet License Manager. This must be done on one
computer.
Steps 5-8 outline the installation procedure for MODE Solutions. This can be done on multiple computers.

1. Download the Lumerical FlexNet License Manager Installation Package


View details

2003 - 2016 Lumerical Solutions, Inc


40 Lumerical Knowledge Base

The installation packages are available from Lumerical


Download Center page (registration is required)

2. Extract the Compressed Installation Package of Lumerical FlexNet License Manager


View details
Upon successful download, unpack the installation package with the following command:
tar -zxf <name of downloaded file>

3. Run the Installer of FlexNet License Manager


View details
Go to the FlexNet License Manager directory that you
have extracted, and run the installer:
sudo sh ./install.sh

Follow the steps and instructions on the script to


complete the installation.

If you don't have yum installed, you can use the following:
sudo rpm -ivh lumerical-flexlm-<version>.i386.rpm

4. Activate Your License Activation Code


View details
Upon successful installation, you would need to launch
the Lumerical Activation Utility to activate your license.
sudo /opt/lumerical/lumerical-flexlm/lumerical-activation-utility

Note: If you are using non-graphical


Linux, please see "Part 2: Activate
License" link below for further
information on how to activate your
license with a Console Mode.

Online vs Offline activation


Two license activation modes are available:
Online activation would be faster and easier, so this
is the recommended method for all users.

Offline activation is a backup solution for customers


who are unable to activate license through the
internet. License activation will be done by sending a
"request XML file" to Lumerical Support, and a
"response XML file" will be provided. For more
information, see the Offline Activation page.
Please note: Offline mode activation is
only available for customers. Trial /

2003 - 2016 Lumerical Solutions, Inc


Installation Manual 41

evaluation licenses must be activated


using online mode.

Enter your eight-character activation code, including the


hyphen, and click the Activate button. It may take a few
minutes before the license activation completes.

Note: Please keep your Activation Code


for your records. If you need to change
your license server, you can "de-
activate" the license and re-use the
Activation Code on the new server.

For more information about activating licenses, select


your license model from the Product Licensing 73 page
then see the Activate your license section.

5. Download the MODE Solutions Installation Package


View details
The installation packages are available from Lumerical
Download Center page (registration is required)

6. Extract the Compressed Installation Package of MODE Solutions


View details
Upon successful download, unpack both installation packages with the following command:
tar -zxf <name of downloaded file>

7. Run the Installer of MODE Solutions


View details
Go to the MODE Solutions directory that you have extracted from Step 2, and then run the install utility script
with the command
sudo sh ./install.sh

Follow the steps and instructions on the script to complete the installation.

Tip: installing with RPM


If you wish to have more control over the installation process, you can still use the 'rpm' command to install the
software. This will allow you to do things like change the default installation directory (using the --prefix option)
or prevent the automatic uninstall of old versions.
sudo rpm -ivh MODE-<version>.rpm

Note: The install.sh script will remove any old versions. If you want to install multiple versions, you should
not use the install script. Instead, manually install the RPM.

8. Launch MODE Solutions software

2003 - 2016 Lumerical Solutions, Inc


42 Lumerical Knowledge Base

View details
This can be done from your terminal by using the
following command
/opt/lumerical/mode/bin/mode-solutions&

Note: If you have installed the Lumerical


FlexNet License Manager on a different
machine, you would be required to configure
your MODE Solutions License Configuration.

1. Open your MODE Solutions License Configuration


/opt/lumerical/mode/bin/mode-config-license

2. On the "Server" box, enter the host name or the IP


address of your license server.

3. Click OK to save your changes

4. Re-launch MODE Solutions

9. Next steps
View details
Optionally, add MODE Solutions to your system path
Adding MODE to the system path allows you to start MODE Solutions simply by typing mode-solutions at the
prompt, without having to specify the full path.
sh /opt/lumerical/mode/bin/mode-config.sh
This script will add the install directory of MODE Solutions to your system path and add an icon on your desktop.
After running the script, you can start MODE Solutions by typing mode-solutions.
Getting started examples
Work through one of the introductory getting started 171 examples.
More product licensing information
See the Product Licensing 73 chapter.
Advanced setup and configuration
See the Setup and Configuration section for information on advanced configuration of Lumerical's software.
Running simulations
See the Running Simulations section for information on running simulations, including from the command line.

This completes the MODE Solutions installation for Linux.

2.2.3 DEVICE Install Instructions

The following section describes the standard installation process for DEVICE. In order to use our software, you
would need at least two install packages: The Lumerical FlexNet License Manager and DEVICE.

Lumerical provides a floating license; which means that the license can be shared between multiple machines in the
same broadcast domain or subnet.

Please ensure that you have an Administrator privilege before continuing with the install process.

Pre-Step 1: Check the system requirements and supported operating systems


View details
For the complete list of system requirements and supported platforms, please consult the supported systems

2003 - 2016 Lumerical Solutions, Inc


Installation Manual 43

page.

Installation Procedure
Steps 1-4 outline the installation procedure for Lumerical FlexNet License Manager. This must be done on one
computer.
Steps 5-8 outline the installation procedure for DEVICE. This can be done on multiple computers.

1. Download the Lumerical FlexNet License Manager Installation Package


View details
The installation packages are available from Lumerical
Download Center page (registration is required)

2. Extract the Compressed Installation Package of Lumerical FlexNet License Manager


View details
Upon successful download, unpack the installation package with the following command:
tar -zxf <name of downloaded file>

3. Run the Installer of FlexNet License Manager


View details
Go to the FlexNet License Manager directory that you
have extracted, and run the installer:
sudo sh ./install.sh

Follow the steps and instructions on the script to


complete the installation.

If you don't have yum installed, you can use the following:
sudo rpm -ivh lumerical-flexlm-<version>.i386.rpm

4. Activate Your License Activation Code


View details

2003 - 2016 Lumerical Solutions, Inc


44 Lumerical Knowledge Base

Upon successful installation, you would need to launch


the Lumerical Activation Utility to activate your license.
sudo /opt/lumerical/lumerical-flexlm/lumerical-activation-utility

Note: If you are using non-graphical


Linux, please see "Part 2: Activate
License" link below for further
information on how to activate your
license with a Console Mode.

Online vs Offline activation


Two license activation modes are available:
Online activation would be faster and easier, so this
is the recommended method for all users.

Offline activation is a backup solution for customers


who are unable to activate license through the
internet. License activation will be done by sending a
"request XML file" to Lumerical Support, and a
"response XML file" will be provided. For more
information, see the Offline Activation page.
Please note: Offline mode activation is
only available for customers. Trial /
evaluation licenses must be activated
using online mode.

Enter your eight-character activation code, including the


hyphen, and click the Activate button. It may take a few
minutes before the license activation completes.

Note: Please keep your Activation Code


for your records. If you need to change
your license server, you can "de-
activate" the license and re-use the
Activation Code on the new server.

For more information about activating licenses, select


your license model from the Product Licensing 73 page
then see the Activate your license section.

5. Download the DEVICE Installation Package


View details
The installation packages are available from Lumerical
Download Center page (registration is required)

6. Extract the Compressed Installation Package of DEVICE


View details

2003 - 2016 Lumerical Solutions, Inc


Installation Manual 45

Upon successful download, unpack both installation packages with the following command:
tar -zxf <name of downloaded file>

7. Run the Installer of DEVICE


View details
Go to the DEVICE directory that you have extracted from Step 2, and then run the install utility script with the
command
sudo sh ./install.sh

Follow the steps and instructions on the script to complete the installation.

Tip: installing with RPM


If you wish to have more control over the installation process, you can still use the 'rpm' command to install the
software. This will allow you to do things like change the default installation directory (using the --prefix option)
or prevent the automatic uninstall of old versions.
sudo rpm -ivh DEVICE-<version>.rpm

Note: The install.sh script will remove any old versions. If you want to install multiple versions, you should
not use the install script. Instead, manually install the RPM.

8. Launch DEVICE software


View details
This can be done from your terminal by using the
following command
/opt/lumerical/device/bin/device&

Note: If you have installed the Lumerical


FlexNet License Manager on a different machine,
you would be required to configure your DEVICE
License Configuration.

1. Open your DEVICE License Configuration


/opt/lumerical/device/bin/device-config-license

2. On the "Server" box, enter the host name or the IP address of


your license server.

3. Click OK to save your changes

4. Re-launch DEVICE

9. Next steps
View details
Optionally, add DEVICE to your system path
Adding DEVICE to the system path allows you to start DEVICE simply by typing device at the prompt, without
having to specify the full path.
sh /opt/lumerical/device/bin/device-config.sh
This script will add the install directory of DEVICE to your system path and add an icon on your desktop. After
running the script, you can start DEVICE by typing device.
Getting started examples
Work through one of the introductory getting started 171 examples.
More product licensing information
See the Product Licensing 73 chapter.

2003 - 2016 Lumerical Solutions, Inc


46 Lumerical Knowledge Base

Advanced setup and configuration


See the Setup and Configuration section for information on advanced configuration of Lumerical's software.
Running simulations
See the Running Simulations section for information on running simulations, including from the command line.

This completes the DEVICE installation for Linux.

2.2.4 INTERCONNECT Install Instructions

The following section describes the standard installation process for INTERCONNECT. In order to use our software,
you would need at least two install packages: The Lumerical FlexNet License Manager and INTERCONNECT.

Lumerical provides a floating license; which means that the license can be shared between multiple machines in the
same broadcast domain or subnet.

Please ensure that you have an Administrator privilege before continuing with the install process.

Pre-Step 1: Check the system requirements and supported operating systems


View details
For the complete list of system requirements and supported platforms, please consult the supported systems
page.

Installation Procedure
Steps 1-4 outline the installation procedure for Lumerical FlexNet License Manager. This must be done on one
computer.
Steps 5-8 outline the installation procedure for INTERCONNECT. This can be done on multiple computers.

1. Download the Lumerical FlexNet License Manager Installation Package


View details
The installation packages are available from Lumerical
Download Center page (registration is required)

2. Extract the Compressed Installation Package of Lumerical FlexNet License Manager


View details
Upon successful download, unpack the installation package with the following command:
tar -zxf <name of downloaded file>

3. Run the Installer of FlexNet License Manager


View details

2003 - 2016 Lumerical Solutions, Inc


Installation Manual 47

Go to the FlexNet License Manager directory that you


have extracted, and run the installer:
sudo sh ./install.sh

Follow the steps and instructions on the script to


complete the installation.

If you don't have yum installed, you can use the following:
sudo rpm -ivh lumerical-flexlm-<version>.i386.rpm

4. Activate Your License Activation Code


View details
Upon successful installation, you would need to launch
the Lumerical Activation Utility to activate your license.
sudo /opt/lumerical/lumerical-flexlm/lumerical-activation-utility

Note: If you are using non-graphical


Linux, please see "Part 2: Activate
License" link below for further
information on how to activate your
license with a Console Mode.

Online vs Offline activation


Two license activation modes are available:
Online activation would be faster and easier, so this
is the recommended method for all users.

Offline activation is a backup solution for customers


who are unable to activate license through the
internet. License activation will be done by sending a
"request XML file" to Lumerical Support, and a
"response XML file" will be provided. For more
information, see the Offline Activation page.
Please note: Offline mode activation is
only available for customers. Trial /
evaluation licenses must be activated
using online mode.

Enter your eight-character activation code, including the


hyphen, and click the Activate button. It may take a few
minutes before the license activation completes.

Note: Please keep your Activation Code


for your records. If you need to change
your license server, you can "de-
activate" the license and re-use the
Activation Code on the new server.

For more information about activating licenses, select


your license model from the Product Licensing 73 page
then see the Activate your license section.

5. Download the INTERCONNECT Installation Package


View details

2003 - 2016 Lumerical Solutions, Inc


48 Lumerical Knowledge Base

The installation packages are available from Lumerical


Download Center page (registration is required)

6. Extract the Compressed Installation Package of INTERCONNECT


View details
Upon successful download, unpack both installation packages with the following command:
tar -zxf <name of downloaded file>

7. Run the Installer of INTERCONNECT


View details
Go to the INTERCONNECT directory that you have extracted from Step 2, and then run the install utility script
with the command
sudo sh ./install.sh

Follow the steps and instructions on the script to complete the installation.

Tip: installing with RPM


If you wish to have more control over the installation process, you can still use the 'rpm' command to install the
software. This will allow you to do things like change the default installation directory (using the --prefix option)
or prevent the automatic uninstall of old versions.
sudo rpm -ivh INTERCONNECT-<version>.rpm

Note: The install.sh script will remove any old versions. If you want to install multiple versions, you should
not use the install script. Instead, manually install the RPM.

8. Launch INTERCONNECT software


View details
This can be done from your terminal by using the
following command
/opt/lumerical/interconnect/bin/interconnect&

Note: If you have installed the Lumerical FlexNet License


Manager on a different machine, you would be required to
configure your INTERCONNECT License Configuration.

1. Open your INTERCONNECT License Configuration


/opt/lumerical/interconnect/bin/interconnect-config-license

2. On the "Server" box, enter the host name or the IP address of your license
server.

3. Click OK to save your changes

4. Re-launch INTERCONNECT

2003 - 2016 Lumerical Solutions, Inc


Installation Manual 49

9. Next steps
View details
Optionally, add INTERCONNECT to your system path
Adding INTERCONNECT to the system path allows you to start INTERCONNECT simply by typing interconnect
at the prompt, without having to specify the full path.
sh /opt/lumerical/interconnect/bin/interconnect-config.sh
This script will add the install directory of INTERCONNECT to your system path and add an icon on your desktop.
After running the script, you can start INTERCONNECT by typing interconnect.
Getting started examples
Work through one of the introductory getting started 171 examples.
More product licensing information
See the Product Licensing 73 chapter.
Advanced setup and configuration
See the Setup and Configuration section for information on advanced configuration of Lumerical's software.
Running simulations
See the Running Simulations section for information on running simulations, including from the command line.

This completes the INTERCONNECT installation for Linux.

2.2.5 Configure engine

This section is for FDTD Solutions and MODE Solutions only

This page describes how to configure the simulation engine so you can run jobs on computers within your local area
network. The FDTD Solutions and/or MODE Solutions must be installed on each computer, as described in the
main Installation instructions 36 section, before you attempt to configure the engine.

Concurrent computing refers to running multiple simultaneous simulations, usually on different computers.
Distributed computing refers to running a single simulation using multiple cores/processors/workstations, giving
access to a greater total amount of memory and reducing computation time.

Note: Users with only 1 computer


If you have only one computer, skip steps 1-3.

1. Configure your firewall


Many Linux clusters communicate across a private Ethernet network and therefore firewall security may not be
required. If no firewall is in use in your network, this step may be skipped.
The MPI processes communicate using a range of ports. It's easiest to simply disable the firewall on all nodes.
An alternate solution is to configure MPI to use a specific range of ports, then create exceptions for those ports.
See the MPI documentation for details.
If you want to leave the firewall turned on, two additional firewall exceptions are required:
In some configurations, MPI requires the use of the ssh programs to start remote processes on the compute
nodes during parallel execution. Ensure that the ssh port 22 is allowed to accept incoming TCP/IP connections on
all of your compute nodes.
The FlexNet License Manager default port list can be found on the default ports page.

2. Setup a network directory


To launch simulations on an arbitrary node, it's best to setup a network file system. The network file system must be
accessible to all nodes under the same name. This will allow any node to access the simulation files.
On many Linux networks, each user's home directory is a network file system and is common to all nodes. If this is
the case you may use your home directory to store your simulation files. For more information on creating a network
file systems, see your operating system documentation.

3. Configure your compute nodes to allow remote login without a password, as the version of MPICH2 included with

2003 - 2016 Lumerical Solutions, Inc


50 Lumerical Knowledge Base

the installation package uses ssh to start remote jobs. If this is not setup, the user will have to type their password
many times. On your primary computer, enter the following commands to create a set of ssh keys.
ssh-keygen -t rsa

Press enter several times to accept all the defaults and an empty passphrase. This creates your public/private keys
and saves them in your home directory under the $HOME/.ssh folder. Next you must place your public key in the
text file $HOME/.ssh/authorized_keys on each compute node. This can be accomplished using the following
commands for each compute node:
ssh <node name> "mkdir -p ~/.ssh; chmod 700 ~/.ssh"
cat ~/.ssh/id_rsa.pub | ssh <node name> "cat - >> ~/.ssh/authorized_keys"
ssh <node name> "chmod 600 ~/.ssh/authorized_keys"

Note that if your home directory is on a network file system and is the same directory for all compute nodes, then
you will only have to run the above command one time. Once you have completed this step, you should be able to
login to any of the compute nodes using the ssh <node name> command without entering a password.

Note: Determining the Name / IP address of your computer


If you need to find the IP address of a computer, use the command /sbin/ifconfig

4. Check resources
1. Open the Lumerical software (only for FDTD and MODE
Solutions)
2. Open the Resource configuration utility 213 , (in the
Simulation -> Configure resources menu)
MODE Solutions Only: Notice that Resources are
configured on a per-Solver basis (one solver per tab)
3. Add additional resources to the list (Optional)
4. Edit the resource properties if necessary
5. Use the Run tests button to confirm the resources are
setup properly

To configure your system to use a different version of MPI,


see the Run solver with MPI page.

5. Run the test parameter sweep


Copy the file /opt/lumerical/<software_name>/examples/paralleltest to your working directory,
such as the Desktop. Open paralleltest, then switch to the Optimization and Sweeps window. Run the
parameter sweeps eigensolver_sweep and propagator_sweep. If the sweeps run properly, your system is
configured properly.

Note: Log files


The simulation engine creates a log file named filename_p0.log. The information in this file can be helpful
when debugging problems with the parallel engine.

This completes the simulation engine configuration on a local area network.

2.2.6 Cluster setup

This section is for FDTD Solutions and MODE Solutions only

To install Lumerical software on a computer cluster or network of workstations, follow these instructions. On a
computer cluster, the computers are generally referred to as compute nodes rather than workstations. Often one or
more computers in a cluster are designated as management nodes and are reserved for launching jobs and/or
storing data files. For the purpose of these instructions, we will use the terminology of compute nodes and
management nodes.

2003 - 2016 Lumerical Solutions, Inc


Installation Manual 51

1. Install software
Install the product on each node of your cluster (or group of workstations) as described in the main installation 35
section.

2. Flexnet license configuration


The FlexNet licence manager should only be installed on the management node. On the other hand, the product
(FDTD Solutions, MODE Solutions, DEVICE or INTERCONNECT) can be installed on both the management node
and the compute nodes.

Note for large computer cluster installs:


If you have a large number of compute nodes, you may find that manually running the install script is time
consuming. One way to avoid this is to install on a network file system that is visible to all the compute nodes.
This can be accomplished using the install utility and specifying an alternate install directory instead of the default
location such as /opt/lumerical/fdtd or /opt/lumerical/mode

3. Configure your firewall


Many Linux clusters communicate across a private Ethernet network and therefore firewall security may not be
required. If no firewall is in use on your cluster nodes then this step may be skipped.
The MPI software requires the use of the ssh programs to start remote processes on the compute nodes during
parallel execution. If you are using a firewall, you should ensure that the ssh port 22 is allowed to accept incoming
TCP/IP connections on all of your compute nodes. Additional firewall exceptions may be required, depending on
your MPICH version (e.x. MPICH ch_p4 uses ports 1024-65535 by default).
The FlexNet License Manager default port list can be found on the default ports page.

4. Setup a network directory


To launch simulations on an arbitrary compute node, it's best to setup a network file system on one of the nodes
(typically the management node). The network file system should be accessible to all nodes in the cluster under the
same mount point. This will allow any node to access the simulation tile.

On many Linux clusters each user's home directory is a network file system and is common to all nodes. If this is
the case you may use your home directory to store your fsp files for parallel simulation. Otherwise, you can create a
network file share on your management node. For more information on creating a network file systems, see your
Linux operating system documentation.

5. Determine which executables to run


When running parallel simulations, inter-process communication is accomplished using a Message Passing
Interface (MPI) library. Different MPI library implementations allow parallel execution on a variety of different types of
hardware. Several versions of MPICH and MPICH2 are included with the standard product installation. You should
select the MPI version that is most appropriate for your system, and select the corresponding engine executable.
The installDir/bin/<product>-mpi-status.sh script determines which options are available on your
system. The default option MPI version is MPICH2 - Nemesis, located at installDir/mpich2/nemesis/bin/
mpiexec.

The corresponding simulation engine for FDTD Solutions is installDir/bin/fdtd-engine-mpich2nem.

The corresponding simulation engine for MODE Solutions is installDir/bin/varfdtd-engine-


mpich2nem. The eigensolver engine (fd-engine) is not a parallel application so there is no need to provide
different versions of the engine for each MPI version.

For a complete list of MPI and engine versions, see the Run solver with MPI page.

6. Login without passwords


If you are using a scheduler, or are linking to other local copies of MPI libraries that are already configured and
running parallel jobs, this step may be unnecessary.

2003 - 2016 Lumerical Solutions, Inc


52 Lumerical Knowledge Base

Your compute nodes must be configure to allow remote login to all other compute nodes without a password. This
will allow jobs to start without the user having to type a password for each compute node. By default, the version of
MPICH2 that is included will use the ssh command to start remote jobs. The ssh command can be configured to
use public keys instead of passwords for login. To set this up, run the following command on the management node
where you plan to launch your jobs:

ssh-keygen -t rsa

Press enter several times to accept all the defaults and an empty passphrase. This creates your public/private keys
and saves them in your home directory under the $HOME/.ssh folder. Next you must place your public key in the
text file $HOME/.ssh/authorized_keys on each compute node. This can be accomplished using the following
commands for each compute node in your cluster:

ssh <node name> "mkdir -p ~/.ssh; chmod 700 ~/.ssh"


cat ~/.ssh/id_rsa.pub | ssh <node name> "cat - >>\ ~/.ssh/authorized_keys"
ssh <node name> "chmod 600 ~/.ssh/authorized_keys"

Note that if your home directory is on a network file system and is the same directory for all compute nodes, then
you will only have to run the above command one time for one of the nodes. Once you have completed this step, you
should be able to login to any of the compute nodes using the ssh <node name> command without entering a
password.
Using a remote shell other than ssh
If you are using the MPICH MPI environment all you have to do is set the environment variable
P4_RSHCOMMAND to rsh on your cluster nodes. If you only launch jobs from specific management nodes, you
only have to set this variable on those machines.

7. Run a simple MPI test program


Lumerical includes a simple test program to test your MPI installation. If CPi runs successfully, you will see the
value of pi (3.1415....) printed on your screen as well as a message from each of the computers that participates in
the calculation. To run CPi, use a command like this:
installDir/mpich2/nemesis/bin/mpiexec -n 4 installDir/mpitest/cpi-mpich2nem

The option -n specifies the number of processes to use in the computation. You may change the number 4 to match
the number of compute nodes or processors in your system. There are also other advanced options for mpiexec/
mpirun that can be listed with the command mpiexec -h. You should try to run CPI with the same arguments that
will be used to run the actual simulation engine.

8. Run the simulation engine

Copy the file installDir/examples/paralleltest.fsp to your working directory. The command


required to run the simulation should be similar to what was required for the cpi test.
installDir/mpich2/nemesis/bin/mpiexec -n 4 installDir/bin/fdtd-engine-mpich2nem parallelt

Copy the file installDir/examples/paralleltest.lms to your working directory. The command required to run the
simulation should be similar to what was required for the cpi test.
installDir/mpich2/nemesis/bin/mpiexec -n 4 installDir/bin/varfdtd-engine-mpich2nem parall
You can also try running the eigensolver engine, although it doesn't make use of MPI
installDir/bin/fd-engine paralleltest.lms

2.2.7 Running simulations

This section is for FDTD Solutions and MODE Solutions only

In this section we will explain how to configure your system to launch jobs in two common ways:
From the Graphical User Interface (GUI) using the Run button, script commands and the optimization and
parameter sweep windows.

2003 - 2016 Lumerical Solutions, Inc


Installation Manual 53

From the command line with no GUI interface.

The list below explains how to configure your system, depending on your hardware and how you intend to launch
simulation:

1. Launch simulations from the GUI using your local workstation for the simulations.
It's likely that this will work after installation immediately without further configuration. Please see Resource
configuration in the User Guide if you want to change the default number of cores used for each simulation.

2. Launch simulations from the GUI using several computers on your LAN or on a cluster without a
scheduler.
This may take some configuration initially. Please see Configure engine 49 for the necessary steps and then
Resource configuration in the User Guide.

3. Launch simulations from the command line on your local workstation

For FDTD Solutions, the complete command to start the simulation engine in parallel using MPI is quite lengthy
and complex. The fdtd-run-local.sh shell file automatically generates the complete command, making it
much easier to start simulations from the command line. If you want to use non-default MPI options, you can edit
this file as needed. To run a simulation with this shell file, use
/opt/lumerical/fdtd/bin/fdtd-run-local.sh -n 8 file1.fsp
to run the file using 8 cores. If the bin directory is in your path, the command can be shorted to
fdtd-run-local.sh -n 8 file1.fsp

You can also use this command to run multiple fsp files. For example
fdtd-run-local.sh -n 8 file1.fsp file2.fsp
will run both files sequentially using 8 cores and
fdtd-run-local.sh -n 8 *.fsp
will run all the simulation files in the current directory.

For MODE Solutions, the command required to run a varfdtd (progator) simulation will be something like this:
installDir/mpich2/nemesis/bin/mpiexec -n 4 installDir/bin/varfdtd-engine-mpich2nem parall
To run fd-engine (eigensolver), the command will be something like:
installDir/bin/fd-engine paralleltest.lms

Please note that the remainder of this page contains instructions for FDTD Solutions only.

4. Launch jobs by submitting to a scheduler from the command line


We provide a template submission script for a linux based PBS scheduling system. Some modifications may be
required depending on the configuration of your cluster and it may be necessary to involve your System
Administrator for this configuration.

The template of submission scripts composed of 3 parts for easier customization and reuse
/opt/lumerical/fdtd/bin/fdtd-run-pbs.sh: The master script file used to submit your simulations to
the scheduler. It takes fsp files as arguments, produces the submission script and runs the qsub command. It is
documented with comments in case it needs to be customized. If you modify this file, we recommend that you
make a copy of it under a different name, such as fdtd-run.sh so that your changes will not be overwritten when
you upgrade the software.
/opt/lumerical/fdtd/bin/fdtd-process-template.sh: this script is reference by fdtd-run-
pbs.sh but should not have to be modified.
/opt/lumerical/fdtd/templates/fdtd-pbs-template.sh: This is the template script that is used to
create a job submission script for your scheduler. it must be configured once to ensure that we create the correct
submission script as required by your System Administrator. When modifying this file, we recommend that you
make a copy of this file (to avoid overwriting when you upgrade the software). You will also then need to modify the
TEMPLATE variable in fdtd-run-pbs.sh script to specify the correct template file.

2003 - 2016 Lumerical Solutions, Inc


54 Lumerical Knowledge Base

Once configured, you can submit jobs to the scheduler with a command like
sh ./fdtd-run-pbs.sh [-n <procs>] fsp1 [fsp2 ... [fspN]]

For example, to submit all the fsp files in a directory to the scheduler, asking for 8 processes per simulation, you
can use
sh ./fdtd-run-pbs.sh *.fsp

5. Launch jobs by submitting to a scheduler from the GUI


This is not an officially supported feature of FDTD Solutions, but it can be configured to work on some systems.
Some of the usual features, such as being able to monitor job progress in the job manager window, or pausing jobs,
will not be possible. However, if this can be configured for your system, it can enable you to run optimization tasks
from the head node of cluster with a scheduler.

First, it is important to be sure that you can correctly submit jobs to the scheduler form the command line using
step 4. Once that is working, there are 2 additional steps

Modify your fdtd-pbs-template.sh template or fdtd-pbs-run.sh script so that it will wait after
submission of the job until the job is completed. Some schedulers have a simple blocking options, such as the -K
option with lsf, or the "-W block=true" option with some versions of qsub. If there is not a simple blocking option
for your scheduler, please contact Lumerical support for assistance.

Configure your resources as shown in the screenshots below. Please note that you will likely not get any
information about the job progress in the job manager. It will simply indicate 0% complete until the job is finished.
To see job progress, you will have to monitor the log files. Furthermore, you should not try to pause or terminate
jobs. Job cancellation or deletion should be done as directed by your System Administrator to correctly terminate
jobs that have been submitted to a scheduler.

Add a new Cluster resource. Don't worry about the number of Processes listed or the IP/Hostname.

Edit the advanced options and set it up as below. Please note that we use -n 16 to use 16 processes per simulation.
You can change this as desired.

2003 - 2016 Lumerical Solutions, Inc


Installation Manual 55

It is likely that your Job Manager window will not display any progress at all until the job is 100% complete. To try
and make it update progress, you can try adding the -remote flag to the fdtd-engine. However, you may only see
something like the screenshot below. Please look at the log file from the job to monitor progress. Please do not try
to use the Quit buttons, but cancel your jobs if necessary as directed by your System Administrator.

Once everything is working, duplicate your cluster resource as many times as you have licenses on your cluster.
Your Resource Configuration Window might look like the following if you want to run 10 concurrent simulations on
your cluster.

2003 - 2016 Lumerical Solutions, Inc


56 Lumerical Knowledge Base

6. Launch jobs from Windows on a Linux machine

This is not an officially supported feature of FDTD Solutions, but it is possible to launch simulation on a Linux
machine from Windows. The fsp file must be saved in a network folder that can be read and written by both the
Windows and the Linux machine. Also, there must be no spaces in the path or file name. The steps are:
a. Download and install an ssh client for Windows such as PuTTY.
b. Ensure that you can login using ssh from Windows without having to type a password. For example, using
PuTTY, you can generate a set of public/private keys. The public key must be placed in the your home the text
file $HOME/.ssh/authorized_keys on the Linux machine.
c. Create and save a session with PuTTY. For example, if you are connecting to a Linux machine called wkst1,
you can create a PuTTY session called grouse.lcs.local.
d. Add a resource and configure the basic and advanced options as shown below. Note that the IP/Hostname is
only listed as PuTTY as a reminder and the number of processes specified is only a reminder. The key part of
the setup is done in the Resource advanced options windows. Please verify carefully that the Command
to execute displayed at the bottom of the window is correct, and note that the number of processors to be
used is actually controlled with the option -n 4 (for 4 processes) in the Extra FDTD command line
options field.

2003 - 2016 Lumerical Solutions, Inc


Installation Manual 57

e. Save the file fdtd_launch_from_windows.sh in /opt/lumerical/fdtd/bin and ensure that it is executable with the
command:
sudo chmod 755 /opt/lumerical/fdtd/bin/fdtd_launch_from_windows.sh
f. Modify the lines in fdtd_launch_from_windows.sh that translate the Windows PATH to the Linux PATH. For
example, if you have access a file in Windows from \\solar.lcs.local\support\Temp and on Linux
from /home/USERNAME, then you need could modify the lines to be
# replace the file path
FSPFILE=$(echo $FSPFILE | sed 's_//solar.lcs.local/support/Temp_/home/USERNAME_')
Please note that both the Windows and the Linux path should be specified with only forward slashes ('/') because
the lines immediately before this in the script automatically convert all backslashes ('\') to forward slashes ('/').
Tips: You can also use echo to see on how your command is being interpreted by the command line. For e.g.:
echo \\123.123.123.123\fdtd\file.fsp

g. Test the setup. We recommend first trying to use the file fdtd_launch_from_windows.sh directly from
Linux while typing a Windows style path to the fsp file. Next, please try running a simple fsp file. Once running
you should get a progress update for your simulations, and you can right click on the job to display additional job
information, as shown in the windows below.
Note: The "Run tests" button in the resource configuration utility can not be used to test if the system is configured
properly. The test will always fail with this configuration, even if everything is configured properly and the simulation
will actually run.

2003 - 2016 Lumerical Solutions, Inc


58 Lumerical Knowledge Base

2.3 Mac Installation

MAC OS X Installation manuals. Please select your Product

FDTD Solutions 58

MODE Solutions 62

INTERCONNECT 69

DEVICE 65

Please contact install@lumerical.com if you have any questions.

2.3.1 FDTD Solutions Install Instructions

The following section describes the standard installation process for FDTD Solutions. In order to use our software,
you would need at least two install packages: The Lumerical FlexNet License Manager and FDTD Solutions.

Lumerical provides a floating license; which means that the license can be shared between multiple machines in the
same broadcast domain or subnet.

Please ensure that you have an Administrator privilege before continuing with the install process.

Pre-Step 1: Check the system requirements and supported operating systems


View details
For the complete list of system requirements and supported platforms, please consult the supported systems
page.

Pre-Step 2: Install the FlexNet License Manager - Floating Licenses Only


View details
NOTE: Node or Floating license
Most trial evaluation licenses are floating and require the installation of the FlexNet License Manager. The
Flexnet License Manager must be installed on one computer on your network. See the detailed instructions
below.

2003 - 2016 Lumerical Solutions, Inc


Installation Manual 59

Purchased licenses may be either node-locked or floating. For node-locked licenses, please continue to
Installation Procedure step 1.
LICENSE MANAGER INSTALLATION

1. Download the FlexNet Licensing Manager from


the Download Center (registration required)

2. Double click the disk image (Lumerical_FlexLM-


<version>.dmg) to mount the installer.

3. Double click the installer package Lumerical


FlexLM.pk g and follow the instructions on the
installation wizard.

4. Upon successful installation, you would need to


launch the Lumerical Activation Utility to activate
your license.
This can be done by clicking Applications ->
Lumerical -> Lumerical FlexLM ->
Lumerical Activation Utility

5. Please enter the eight-character Activation Code


that you have received (the dash is also required),
and click Activate. It may take a few minutes before
the license activation completes.

6. If successful, the Activation window should now list


the valid license status and expiry date.

Note: Please keep your Activation Code


for your records. If you need to change
your license server, you can "de-
activate" the license and re-use the
Activation Code on the new server.

Installation Procedure
1. Download the Installation Packages of FDTD Solutions
View details
The installation packages are available
from Lumerical Download Center page
(registration is required)

2. Run the installer of FDTD Solutions


View details

2003 - 2016 Lumerical Solutions, Inc


60 Lumerical Knowledge Base

1. Locate the dmg file of FDTD Solutions that you have


downloaded from Step 1.

2. Double click the disk image (FDTD Solutions-


<version>.dmg) to mount the installer.

3. Double click the installer package FDTD


Solutions.pk g and follow the instructions on the
installation wizard. This should complete the
installation of FDTD Solutions.

3. Launch FDTD Solutions software


View details
This can be done by clicking Applications ->
Lumerical -> FDTD Solutions -> FDTD
Solutions

Launching FDTD Solutions for the first time, or if the


license has not been configured yet, you may see the
following error screen. This is a prompt to configure your
license information, or activate the license code
received. To configure your license, click the Yes
button.

You may re-open the Configure license utility later by:


Click Applications -> Lumerical -> FDTD
Solutions -> License Configure

NODE LOCKED LICENSE:

If you have a node-locked license, ensure the Node


Locked tab is selected, then enter in your case-
sensitive eight-character activation code, including the
hyphen, and click the Activate button. It may take a
few minutes before the license activation completes.

2003 - 2016 Lumerical Solutions, Inc


Installation Manual 61

FLOATING LICENSE:

If you have a floating license, ensure the Floating tab is


selected, then enter in the server name or IP address of
the license server set up from Pre-Step 2 - LICENSE
MANAGER INSTALLATION

Note: If you are installing Lumerical's


software on a second computer in your
local network, it is not necessary to
activate the license again. Instead, you
must specify the Name or IP address of
the computer where the license was
activated.

4. Next steps
View details
Getting started examples
Work through one of the introductory getting started 171 examples.
Opening multiple Graphical Interface instances
MAC OS X, by defaults, only allows the user to open one instance of the application at the same time. However,
using a command line workaround, it is possible to open multiple Graphical User Interface with a single license.
To do this:
1. Please ensure that none of FDTD Solutions Graphical User Interface window is open on the MAC computer

2. Open your terminal


Click Applications -> Utilities -> Terminal

3. Enter the following command:


/Applications/Lumerical/FDTD\ Solutions/FDTD\ Solutions.app/Contents/MacOS/fdtd-
solutions&
The above command would open the Graphical User Interface of the software, and the ampersand (&) would return
the command line control to you, thus allowing you to repeat the same command in order to open the 2nd GUI.

4. You can repeat step #3 as many times as required, but please note that you should only do this on a single
terminal. Running the command on the 2nd terminal, would use a 2nd license.
More product licensing information
See the Product Licensing 73 chapter.
Advanced setup and configuration
See the Setup and Configuration section for information on advanced configuration of Lumerical's software.
Running simulations
See the Running Simulations section for information on running simulations, including from the command line.

This completes the FDTD Solutions installation for MAC OS X.

2003 - 2016 Lumerical Solutions, Inc


62 Lumerical Knowledge Base

2.3.2 MODE Solutions Install Instructions

The following section describes the standard installation process for MODE Solutions. In order to use our software,
you would need at least two install packages: The Lumerical FlexNet License Manager and MODE Solutions.

Lumerical provides a floating license; which means that the license can be shared between multiple machines in the
same broadcast domain or subnet.

Please ensure that you have an Administrator privilege before continuing with the install process.

Pre-Step 1: Check the system requirements and supported operating systems


View details
For the complete list of system requirements and supported platforms, please consult the supported systems
page.

Pre-Step 2: Install the FlexNet License Manager - Floating Licenses Only


View details
NOTE: Node or Floating license
Most trial evaluation licenses are floating and require the installation of the FlexNet License Manager. The
Flexnet License Manager must be installed on one computer on your network. See the detailed instructions
below.

Purchased licenses may be either node-locked or floating. For node-locked licenses, please continue to
Installation Procedure step 1.
LICENSE MANAGER INSTALLATION

1. Download the FlexNet Licensing Manager from


the Download Center (registration required)

2. Double click the disk image (Lumerical_FlexLM-


<version>.dmg) to mount the installer.

3. Double click the installer package Lumerical


FlexLM.pk g and follow the instructions on the
installation wizard.

4. Upon successful installation, you would need to


launch the Lumerical Activation Utility to activate
your license.
This can be done by clicking Applications ->
Lumerical -> Lumerical FlexLM ->
Lumerical Activation Utility

5. Please enter the eight-character Activation Code


that you have received (the dash is also required),
and click Activate. It may take a few minutes before
the license activation completes.

6. If successful, the Activation window should now list


the valid license status and expiry date.

Note: Please keep your Activation Code


for your records. If you need to change
your license server, you can "de-

2003 - 2016 Lumerical Solutions, Inc


Installation Manual 63

activate" the license and re-use the


Activation Code on the new server.

Installation Procedure
1. Download the Installation Packages of MODE Solutions
View details
The installation packages are available
from Lumerical Download Center page
(registration is required)

2. Run the installer of MODE Solutions


View details
1. Locate the dmg file of MODE Solutions that you
have downloaded from Step 1.

2. Double click the disk image (MODE Solutions-


<version>.dmg) to mount the installer.

3. Double click the installer package MODE


Solutions.pk g and follow the instructions on the
installation wizard. This should complete the
installation of MODE Solutions.

3. Launch MODE Solutions software


View details
This can be done by clicking Applications ->
Lumerical -> MODE Solutions -> MODE
Solutions

2003 - 2016 Lumerical Solutions, Inc


64 Lumerical Knowledge Base

Launching MODE Solutions for the first time, or if the


license has not been configured yet, you may see the
following error screen. This is a prompt to configure your
license information, or activate the license code
received. To configure your license, click the Yes
button.

You may re-open the Configure license utility later by:


Click Applications -> Lumerical -> MODE
Solutions -> License Configure

NODE LOCKED LICENSE:

If you have a node-locked license, ensure the Node


Locked tab is selected, then enter in your case-
sensitive eight-character activation code, including the
hyphen, and click the Activate button. It may take a
few minutes before the license activation completes.

FLOATING LICENSE:

If you have a floating license, ensure the Floating tab is


selected, then enter in the server name or IP address of
the license server set up from Pre-Step 2 - LICENSE
MANAGER INSTALLATION

Note: If you are installing Lumerical's


software on a second computer in your
local network, it is not necessary to
activate the license again. Instead, you
must specify the Name or IP address of
the computer where the license was
activated.

4. Next steps
View details
Getting started examples
Work through one of the introductory getting started 171 examples.
Opening multiple Graphical Interface instances
MAC OS X, by defaults, only allows the user to open one instance of the application at the same time. However,
using a command line workaround, it is possible to open multiple Graphical User Interface with a single license.
To do this:
1. Please ensure that none of MODE Solutions Graphical User Interface window is open on the MAC computer

2003 - 2016 Lumerical Solutions, Inc


Installation Manual 65

2. Open your terminal


Click Applications -> Utilities -> Terminal

3. Enter the following command:


/Applications/Lumerical/MODE\ Solutions/MODE\ Solutions.app/Contents/MacOS/mode-
solutions&
The above command would open the Graphical User Interface of the software, and the ampersand (&) would return
the command line control to you, thus allowing you to repeat the same command in order to open the 2nd GUI.

4. You can repeat step #3 as many times as required, but please note that you should only do this on a single
terminal. Running the command on the 2nd terminal, would use a 2nd license.
More product licensing information
See the Product Licensing 73 chapter.
Advanced setup and configuration
See the Setup and Configuration section for information on advanced configuration of Lumerical's software.
Running simulations
See the Running Simulations section for information on running simulations, including from the command line.

This completes the MODE Solutions installation for MAC OS X.

2.3.3 DEVICE Install Instructions

The following section describes the standard installation process for DEVICE. In order to use our software, you
would need at least two install packages: The Lumerical FlexNet License Manager and DEVICE.

Lumerical provides a floating license; which means that the license can be shared between multiple machines in the
same broadcast domain or subnet.

Please ensure that you have an Administrator privilege before continuing with the install process.

Pre-Step 1: Check the system requirements and supported operating systems


View details
For the complete list of system requirements and supported platforms, please consult the supported systems
page.

Pre-Step 2: Install the FlexNet License Manager - Floating Licenses Only


View details
NOTE: Node or Floating license
Most trial evaluation licenses are floating and require the installation of the FlexNet License Manager. The
Flexnet License Manager must be installed on one computer on your network. See the detailed instructions
below.

Purchased licenses may be either node-locked or floating. For node-locked licenses, please continue to
Installation Procedure step 1.

2003 - 2016 Lumerical Solutions, Inc


66 Lumerical Knowledge Base

LICENSE MANAGER INSTALLATION

1. Download the FlexNet Licensing Manager from


the Download Center (registration required)

2. Double click the disk image (Lumerical_FlexLM-


<version>.dmg) to mount the installer.

3. Double click the installer package Lumerical


FlexLM.pk g and follow the instructions on the
installation wizard.

4. Upon successful installation, you would need to


launch the Lumerical Activation Utility to activate
your license.
This can be done by clicking Applications ->
Lumerical -> Lumerical FlexLM ->
Lumerical Activation Utility

5. Please enter the eight-character Activation Code


that you have received (the dash is also required),
and click Activate. It may take a few minutes before
the license activation completes.

6. If successful, the Activation window should now list


the valid license status and expiry date.

Note: Please keep your Activation Code


for your records. If you need to change
your license server, you can "de-
activate" the license and re-use the
Activation Code on the new server.

Installation Procedure
1. Download the Installation Packages of DEVICE
View details
The installation packages are available
from Lumerical Download Center page
(registration is required)

2. Run the installer of DEVICE


View details

2003 - 2016 Lumerical Solutions, Inc


Installation Manual 67

1. Locate the dmg file of DEVICE that you have


downloaded from Step 1.

2. Double click the disk image (DEVICE-


<version>.dmg) to mount the installer.

3. Double click the installer package DEVICE.pk g and


follow the instructions on the installation wizard.
This should complete the installation of DEVICE.

3. Launch DEVICE software


View details
This can be done by clicking Applications ->
Lumerical -> DEVICE -> DEVICE

Launching DEVICE for the first time, or if the license


has not been configured yet, you may see the following
error screen. This is a prompt to configure your license
information, or activate the license code received. To
configure your license, click the Yes button.

You may re-open the Configure license utility later by:


Click Applications -> Lumerical -> DEVICE
-> License Configure

NODE LOCKED LICENSE:

If you have a node-locked license, ensure the Node


Locked tab is selected, then enter in your case-
sensitive eight-character activation code, including the
hyphen, and click the Activate button. It may take a
few minutes before the license activation completes.

2003 - 2016 Lumerical Solutions, Inc


68 Lumerical Knowledge Base

FLOATING LICENSE:

If you have a floating license, ensure the Floating tab is


selected, then enter in the server name or IP address of
the license server set up from Pre-Step 2 - LICENSE
MANAGER INSTALLATION

Note: If you are installing Lumerical's


software on a second computer in your
local network, it is not necessary to
activate the license again. Instead, you
must specify the Name or IP address of
the computer where the license was
activated.

4. Next steps
View details
Getting started examples
Work through one of the introductory getting started 171 examples.
Opening multiple Graphical Interface instances
MAC OS X, by defaults, only allows the user to open one instance of the application at the same time. However,
using a command line workaround, it is possible to open multiple Graphical User Interface with a single license.
To do this:
1. Please ensure that none of DEVICE Graphical User Interface window is open on the MAC computer

2. Open your terminal


Click Applications -> Utilities -> Terminal

3. Enter the following command:


/Applications/Lumerical/DEVICE/DEVICE.app/Contents/MacOS/device&
The above command would open the Graphical User Interface of the software, and the ampersand (&) would return
the command line control to you, thus allowing you to repeat the same command in order to open the 2nd GUI.

4. You can repeat step #3 as many times as required, but please note that you should only do this on a single
terminal. Running the command on the 2nd terminal, would use a 2nd license.
More product licensing information
See the Product Licensing 73 chapter.
Advanced setup and configuration
See the Setup and Configuration section for information on advanced configuration of Lumerical's software.
Running simulations
See the Running Simulations section for information on running simulations, including from the command line.

This completes the DEVICE installation for MAC OS X.

2003 - 2016 Lumerical Solutions, Inc


Installation Manual 69

2.3.4 INTERCONNECT Install Instructions

The following section describes the standard installation process for INTERCONNECT. In order to use our software,
you would need at least two install packages: The Lumerical FlexNet License Manager and INTERCONNECT.

Lumerical provides a floating license; which means that the license can be shared between multiple machines in the
same broadcast domain or subnet.

Please ensure that you have an Administrator privilege before continuing with the install process.

Pre-Step 1: Check the system requirements and supported operating systems


View details
For the complete list of system requirements and supported platforms, please consult the supported systems
page.

Pre-Step 2: Install the FlexNet License Manager - Floating Licenses Only


View details
NOTE: Node or Floating license
Most trial evaluation licenses are floating and require the installation of the FlexNet License Manager. The
Flexnet License Manager must be installed on one computer on your network. See the detailed instructions
below.

Purchased licenses may be either node-locked or floating. For node-locked licenses, please continue to
Installation Procedure step 1.
LICENSE MANAGER INSTALLATION

1. Download the FlexNet Licensing Manager from


the Download Center (registration required)

2. Double click the disk image (Lumerical_FlexLM-


<version>.dmg) to mount the installer.

3. Double click the installer package Lumerical


FlexLM.pk g and follow the instructions on the
installation wizard.

4. Upon successful installation, you would need to


launch the Lumerical Activation Utility to activate
your license.
This can be done by clicking Applications ->
Lumerical -> Lumerical FlexLM ->
Lumerical Activation Utility

5. Please enter the eight-character Activation Code


that you have received (the dash is also required),
and click Activate. It may take a few minutes before
the license activation completes.

6. If successful, the Activation window should now list


the valid license status and expiry date.

Note: Please keep your Activation Code


for your records. If you need to change
your license server, you can "de-

2003 - 2016 Lumerical Solutions, Inc


70 Lumerical Knowledge Base

activate" the license and re-use the


Activation Code on the new server.

Installation Procedure
1. Download the Installation Packages of INTERCONNECT
View details
The installation packages are available
from Lumerical Download Center page
(registration is required)

2. Run the installer of INTERCONNECT


View details
1. Locate the dmg file of INTERCONNECT that you
have downloaded from Step 1.

2. Double click the disk image (INTERCONNECT-


<version>.dmg) to mount the installer.

3. Double click the installer package


INTERCONNECT.pk g and follow the instructions on
the installation wizard. This should complete the
installation of INTERCONNECT.

3. Launch INTERCONNECT software


View details
This can be done by clicking Applications ->
Lumerical -> INTERCONNECT ->
INTERCONNECT

2003 - 2016 Lumerical Solutions, Inc


Installation Manual 71

Launching INTERCONNECT for the first time, or if the


license has not been configured yet, you may see the
following error screen. This is a prompt to configure your
license information, or activate the license code
received. To configure your license, click the Yes
button.

You may re-open the Configure license utility later by:


Click Applications -> Lumerical ->
INTERCONNECT -> License Configure

NODE LOCKED LICENSE:

If you have a node-locked license, ensure the Node


Locked tab is selected, then enter in your case-
sensitive eight-character activation code, including the
hyphen, and click the Activate button. It may take a
few minutes before the license activation completes.

FLOATING LICENSE:

If you have a floating license, ensure the Floating tab is


selected, then enter in the server name or IP address of
the license server set up from Pre-Step 2 - LICENSE
MANAGER INSTALLATION

Note: If you are installing Lumerical's


software on a second computer in your
local network, it is not necessary to
activate the license again. Instead, you
must specify the Name or IP address of
the computer where the license was
activated.

4. Next steps
View details
Getting started examples
Work through one of the introductory getting started 171 examples.
Opening multiple Graphical Interface instances
MAC OS X, by defaults, only allows the user to open one instance of the application at the same time. However,
using a command line workaround, it is possible to open multiple Graphical User Interface with a single license.
To do this:
1. Please ensure that none of INTERCONNECT Graphical User Interface window is open on the MAC computer

2003 - 2016 Lumerical Solutions, Inc


72 Lumerical Knowledge Base

2. Open your terminal


Click Applications -> Utilities -> Terminal

3. Enter the following command:


/Applications/Lumerical/INTERCONNECT/INTERCONNECT.app/Contents/MacOS/
interconnect&
The above command would open the Graphical User Interface of the software, and the ampersand (&) would return
the command line control to you, thus allowing you to repeat the same command in order to open the 2nd GUI.

4. You can repeat step #3 as many times as required, but please note that you should only do this on a single
terminal. Running the command on the 2nd terminal, would use a 2nd license.
More product licensing information
See the Product Licensing 73 chapter.
Advanced setup and configuration
See the Setup and Configuration section for information on advanced configuration of Lumerical's software.
Running simulations
See the Running Simulations section for information on running simulations, including from the command line.

This completes the INTERCONNECT installation for MAC OS X.

2.3.5 Configure engine

This section is for FDTD Solutions and MODE Solutions only

In order to run any simulation, the engine must be configured. This page describes how to configure the parallel
simulation engine to run on the local computer, and to send jobs to other computers in the local area network. The
product must be installed on each computer, as described in the main Installation instructions 58 section, before
you attempt to configure the engine.

Distributed computing refers to running a single simulation using multiple processors/cores/workstations, giving
access to a greater total amount of memory and reducing computation time. Concurrent computing refers to running
multiple simultaneous simulations on different machines.

Note: Users with only 1 computer


If all simulations will be run on the local computer, you may skip steps 1 - 2.

1. Setup a network directory


To launch simulations on an arbitrary computer, it's best to setup a network file system. The network file system
should be accessible to all computers under the same name. This will allow any computer to access the simulation
file.

2. Configure your computers to allow remote login without a password. This will allow simulations to start without the
user having to type a password for each computer. By default, the version of MPI that is included with the installation
package will use ssh to start remote jobs. The ssh command can be configured to use public keys instead of
passwords for login. To set this up, run the following command on the management node where you plan to launch
your jobs:

ssh-keygen -t rsa

Press enter several times to accept all the defaults and an empty passphrase. This creates your public/private keys
and saves them in your home directory under the $HOME/.ssh folder. Next you must place your public key in the
text file $HOME/.ssh/authorized_keys on each compute node. This can be accomplished using the following
commands for each compute node in your cluster:

2003 - 2016 Lumerical Solutions, Inc


Installation Manual 73

ssh <node name> "mkdir -p ~/.ssh; chmod 700 ~/.ssh"


cat ~/.ssh/id_rsa.pub | ssh <node name> "cat - >>\ ~/.ssh/authorized_keys"
ssh <node name> "chmod 600 ~/.ssh/authorized_keys"

Note that if your home directory is on a network file system and is the same directory for all compute nodes, then
you will only have to run the above command one time for one of the nodes. Once you have completed this step, you
should be able to login to any of the compute nodes using the ssh <node name> command without entering a
password.

Note: Determining the Name / IP address of your computer


Run the command /sbin/ifconfig

3. Check resources
1. Open MODE Solutions
2. Open the Resource configuration utility 213 , (in
the Simulation -> Configure resources menu)
MODE Solutions Only: Notice that Resources are
configured on a per-Solver basis (one solver per tab)
3. Add additional resources to the list (Optional)
4. Edit the resource properties if necessary
5. Use the Run tests button to confirm the
resources are setup properly

4. Run the test parameter sweep


Copy the file Applications -> Lumerical -> Product -> Examples -> paralleltest to your
working directory, such as the Desktop. Open paralleltest, then switch to the Optimization and Sweeps
window. Run the parameter sweeps eigensolver_sweep and propagator_sweep. If the sweeps run properly,
your system is configured properly.

Note: Log files


The simulation engine creates a log file named filename_p0.log. The information in this file can be helpful
when debugging problems with the parallel engine.

This completes the configuration for a single workstation and for distributing tasks to multiple computers on a local
area network.

2.4 Product Licensing


We offer a variety of licensing models to best suit your particular requirements, network configuration, and operating
system. Click on the links below to find out more about each model, recommendations, how to configure, and
common troubleshooting suggestions.

Available license models


Trusted storage MAC locked USB key locked Triad redundant
locked* locked

2003 - 2016 Lumerical Solutions, Inc


74 Lumerical Knowledge Base

Node NOT AVAILABLE


locked

Node Trusted Storage Node MAC Locked 82 Node USB key 83


74

Floating

Floating Trusted Floating MAC Locked Floating USB key 91 Floating Triad
Storage 85 88 Redundant 95
* Default license model

For more information on advanced configuration of your Lumerical product licenses, see the Advanced configuration
section.

2.4.1 Node Trusted Storage


Overview
The Node locked Trusted Storage license model is the
default license model for product evaluations and
training courses, as well as customers with a single
license.

This licensing model is well suited for customers who do


not need to share the license between computers. This
model does not require additional advanced network
configurations or maintenance of an external License
Manager utility.

Notes
This license can not be accessed by other networked workstations.
This license can only be used by a single user at a time.
This is the default license model for product trials and training courses.
Does not offer a Dashboard to show the availability of licenses.
Not available for Linux operating systems.

Activating your license (online)


This is the most convenient and recommended activation method if an open internet connection is available.
The activation is processed almost immediately, allowing for use of the product after. Activating a Node Lock
license is processed using the product license configuration utility.

Launching the product immediately after successful installation will bring up a message prompt similar to the
following. Clicking the 'Yes' button will launch the the product configuration utility.

2003 - 2016 Lumerical Solutions, Inc


Installation Manual 75

The product configuration utility can also be launched manually:


Window Start-> All Programs-> Lumerical-> <PRODUCT>-> Configure license
s
Linux /opt/lumerical/<PRODUCT>/bin/<PRODUCT>-config-license
MAC Applications/Lumerical/<PRODUCT>/License Configure
* replace 'PRODUCT' with the Lumerical application name, such as FDTD, MODE, DEVICE, or
INTERCONNECT.

NOTE: If your license entitlement includes multiple products under one


activation code, activation will only need to be processed under one
product's configuration utility. All other product(s) will be able to
reference the same activated license.

2. Select the Node Locked tab

3. Enter the eight-character activation code (including hyphen " - ") from the license notification email received.

4. Click the Activate button. The utility will authenticate the license with the activation server. This may take
several minutes, depending on the network connection, during which time the utility may appear inactive.

2003 - 2016 Lumerical Solutions, Inc


76 Lumerical Knowledge Base

Optional: Once completed, click on the Licenses tab to verify the license activated successfully. For more
information on the license status, please see Trusted Storage Activation Status.

2003 - 2016 Lumerical Solutions, Inc


Installation Manual 77

Once you have configured your license, you should be able to start using the software.
Activating your license (offline)
Note: This feature is not available for free licenses (product evaluations,
training courses, etc), which must use the online activation method above.

Part 1 - Generating Request


We recommend completing the Node-Lock license activation process using the Online method where
possible. However, it is understandable that some conditions may not allow for this such as an isolated private
network, no internet access, or having strict network policies, in which case the offline method provides an
alternate means. This will require that the offline request file be sent to Lumerical for processing, and in turn a
response file will be sent back to apply; during which time the product can not be used yet.

Please note: a workstation with an internet connection is required to send


and receive the files.

Activating a node locked license is processed using the product license configuration utility. Launching the
product after successful installation will bring up a message prompt similar to that below. Clicking the 'Yes'
button will load the the product configuration utility:

The product configuration utility can also be launched manually:


Window Start-> All Programs-> Lumerical-> <PRODUCT>-> Configure license
s
Linux /opt/lumerical/<PRODUCT>/bin/<PRODUCT>-config-license
MAC Applications/Lumerical/<PRODUCT>/License Configure
* replace 'PRODUCT' with the Lumerical application name, such as FDTD, MODE, DEVICE, or
INTERCONNECT.

NOTE: If your license entitlement includes multiple products under one


activation code, activation will only need to be processed under one
product's configuration utility. All other product(s) will be able to
reference the same activated license.

2. Select the Node Locked tab

3. Select the "Offline Mode (Manually Process License Files)" option.

2003 - 2016 Lumerical Solutions, Inc


78 Lumerical Knowledge Base

4. Enter the eight-character activation code (including hyphen " - ") from the license notification email received.
Clicking the Activate button will bring up the save file window. Save the XML file to an accessible location
as the file will need to be attached and sent to Lumerical for processing.

5. Send the request XML file to install@lumerical.com, with the subject title: Offline Activation Request for
prompt attention from Support.

Part 2 - Applying Response File


1. Once you have received back a responseXML.xml file from Lumerical, save the file to an accessible
location, then repeat Step 1 - 3 from Part 1 - Generating Request.

2. Click the "Browse" button, towards the lower half of the window. A "Load File dialog box" will appear
allowing you to locate for the saved file.

2003 - 2016 Lumerical Solutions, Inc


Installation Manual 79

3. Click and select the saved responseXML file and click Open. This will apply the activated license (this may
take a few minutes to complete).

Optional: Once completed, click on the Licenses tab to verify the license activated successfully. For more
information on the license status, please see Trusted Storage Activation Status.

2003 - 2016 Lumerical Solutions, Inc


80 Lumerical Knowledge Base

Once you have configured your license, you should be able to start using the software.
Checking the license availability
See the Check license availability page.
Transferring your license to a new computer
Although node-locked licenses are intended to be used on one selected workstation, the case may come up
where we need to transfer the product for use on another workstation. This is to accommodate certain
circumstances, such as hardware failure, installation troubleshooting, workstation upgrade, etc. This is not
intended for use as a portability option (there are other licensing models better suited for this); there is a limit
of how many times a license can be re-activated.

To transfer the license for use on another workstation, we will need to deactivate it first in order to free it up. To
do this:
Part 1 - Deactivate License on Current Workstation.
Window Start -> All Programs -> Lumerical -> Lumerical FlexLM -> Activate or Deactivate a license
s
Linux /opt/lumerical/lumerical-flexlm/lumerical-activation-utility
MAC Applications -> Lumerical -> Lumerical FlexLM -> Lumerical Activation Utility

1. Verify the Node Locked tab is selected, then choose the Licenses tab:

2. Then select the license listed and click the Deactivate button:

2003 - 2016 Lumerical Solutions, Inc


Installation Manual 81

This will remove the license from the listing and free it up.

NOTE: This procedure can be used to safely protect and reactivate your
product if you should need to reformat / re-install the operating system on
the same workstation as well.

Part 2 - Activating License on New Workstation


(Please see the Activating your license section above)
See also
Trusted Storage Activation Errors
Common FlexNet Error Codes

You may find additional useful information in the Advanced configuration chapter.

2003 - 2016 Lumerical Solutions, Inc


82 Lumerical Knowledge Base

2.4.2 Node MAC Locked


Overview
The Node MAC Locked license model is typically used
as a backup when there are problems with the default
Trusted Storage locking method.

Notes
This license can not be accessed by other networked workstations.
This license can only be used by a single user at a time.
Does not offer a Dashboard to show the availability of licenses.
This license model uses a file-based (.lic) license, which is received pre-activated.
Not available for Linux operating systems.
These licenses are locked to the computer hardware and cannot be moved to a different computer.
This license model is typically used for customers that experience technical problems with the Trusted Storage
license model.

Importing the license file


Node MAC Locked and Node USB Key license models use a file-based (or certificate) activation, as opposed
to a code-based activation. The license file is processed and sent pre-activated, which does not require an
internet connection for further processing.

To import the license file, navigate to the following default installation directory, replacing <Product> with that
which you have installed:
C:\Program Files\Lumerical\<Product>\bin\licenses\

Notice there is an existing file called start.lic; do not move or alter this file. Copy and paste, or move, the
received license to this directory. You may see the warning prompt below; click Continue to save the license
file to this location.

2003 - 2016 Lumerical Solutions, Inc


Installation Manual 83

Launch the product to verify the license has been imported successfully.

NOTE: If your license entitlement includes multiple products, this process


will need to be completed under each product's licenses directory.

Checking the license availability


See the Check license availability page.
Transferring your license to a new computer
MAC locked licenses can not be transferred between computers. Please see https://www.lumerical.com/
support/ for instructions to contact Lumerical technical support for assistance.

See also
Common FlexNet Error Codes

You may find additional useful information in the Advanced configuration chapter.

2.4.3 Node USB key


Overview
The Node USB key license model allows for the
selective use of Lumerical products on multiple
computers by moving the USB key. This license model
is occasionally used in secure environments where
computers are not connected to a network, or as a
portability option for those needing to run the product on
different non-networked computers.

Notes
Can be used to run products on different computers by moving the USB key.
This license model uses a file-based (.lic) license in addition to the USB key.
There is an extra charge for USB key locked licenses.
Not available for Linux operating systems.
Does not offer a Dashboard to show the availability of licenses.

Importing the license file


Node MAC Locked and Node USB Key license models use a file-based (or certificate) activation, as opposed

2003 - 2016 Lumerical Solutions, Inc


84 Lumerical Knowledge Base

to a code-based activation. The license file is processed and sent pre-activated, which does not require an
internet connection for further processing.

To import the license file, navigate to the following default installation directory, replacing <Product> with that
which you have installed:
C:\Program Files\Lumerical\<Product>\bin\licenses\

Notice there is an existing file called start.lic; do not move or alter this file. Copy and paste, or move, the
received license to this directory. You may see the warning prompt below; click Continue to save the license
file to this location.

Launch the product to verify the license has been imported successfully.

NOTE: If your license entitlement includes multiple products, this process


will need to be completed under each product's licenses directory.

Checking the license availability


See the Check license availability page.
Running the product on other workstations
The product and license must be installed on each each workstation you would like use. Once the software is
configured on each workstation, it's simply a matter of inserting the USB Lock into the desired workstation
then launching the software.

Common issues

2003 - 2016 Lumerical Solutions, Inc


Installation Manual 85

Error code 9 - Missing USB key


If the product is launched without the USB Lock
inserted, you will see the following error prompt. Plug
in the USB Key and click Try again to run the
product.

Floating error: -9 Invalid host. The hostid of this system does


not match the hostid specified in the license file. Feature:
FDTD_Solutions_design Hostid: FlexID=9-000000 License path:
C:\Program Files\Lumerical\FDTD\bin\licenses
\LicenseFile_node_USB.lic;C:\Program Files\Lumerical\FDTD\bin
\licenses\start.lic; FlexNet Licensing error: -9,57 For further
information, refer to the FlexNet Licensing documentation,
available at w w w .flexerasoftw are.com.

See also
Common FlexNet Error Codes

You may find additional useful information in the Advanced configuration chapter.

2.4.4 Floating Trusted Storage


Overview
The Floating Trusted Storage license
model is the default license model for
purchased Floating licenses, and for those
running Linux platforms. This is one of the
most flexible licensing models. The license
is issued as an 8-digit activation code
which will require installation of the
Lumerical FlexNet License Manager to
activate.

Notes
Floating licenses allow users to access their licenses on any computer in the local network.
Floating Trusted Storage is one of the most flexible licensing models.
This is the default license model for customers wanting a Floating license.
This is the default license model for Linux users.
License can be transferred between computers up to three times.

Installing the license manager


Note: Instruction below is for Windows operating systems. Please see the
Installation Manual 16 section for information on other supported platforms.

2003 - 2016 Lumerical Solutions, Inc


86 Lumerical Knowledge Base

LICENSE MANAGER INSTALLATION

Lumerical recommends installing the FlexNet


License Manager on a reliable server that will remain
running and connected to your local network. Please
note that you must have administrator privilege to
install the Lumerical FlexNet License Manager.

1. Download the FlexNet Licensing Manager from


the Download Center (registration required)

2. Unzip the installation package. You can right-


click the zip file and select Extract All...

3. Run the installer by launching the LFLM.msi


installer
Note: Under install options,
please ensure that "Standard
Configuration" is checked. Keeping
the default settings is
recommended.

4. After successfully installing the FlexNet License


Manager, the activation utility will automatically
open.

5. Enter your eight-character activation code,


including the hyphen, and click the Activate
button.

6. If successful, the Activation window should now


list the valid license status and expiry date.

The License Activation utility can be also be


accessed by:
Windows 7 or 10: Click Start -> All Programs ->
Lumerical -> Lumerical FlexLM -> Activate or
Deactivate a license

Activating your license


See the standard product installation manuals for instructions to activate the FlexNet license manager.
Windows Installation 17
Linux Installation 35
Mac Installation 58

Note: Offline Activation is not available for free licenses (product


evaluations, training courses, etc), which must use the online activation
method above.

Also see:
Trusted Storage Activation Status
Configuring Lumericals products
1. Open License Configuration utility of the products that you would like to configure
Window Start-> All Programs-> Lumerical-> <PRODUCT>-> Configure license

2003 - 2016 Lumerical Solutions, Inc


Installation Manual 87

s
Linux /opt/lumerical/<PRODUCT>/bin/<PRODUCT>-config-license
MAC Applications/Lumerical/<PRODUCT>/License Configure
* replace 'PRODUCT' with the Lumerical application name, such as FDTD, MODE, DEVICE, or
INTERCONNECT.

2. Select the Floating tab and enter the host name or


IP address of the license server or the machine
where FlexNet License Manager is installed.
If the FlexNet License Manager is installed on the
same machine with the product then you can set the
server name as "localhost". Click OK when
completed.

Checking the license availability


See the Check license availability page.
Transferring your license to a new computer
Licenses using the Trusted Storage locking mechanism can be transferred to a different computer up to three
times. To transfer the license:
1. Install the Flexnet License Manager on the new computer, as explained above.
2. On the old computer, open the License Activation utility, select a license and click the Deactivate button
3. On the new computer, open the License Activation utility, enter the license activation code (from your
email), and click the Activate button.

Window Start -> All Programs -> Lumerical -> Lumerical FlexLM -> Activate or Deactivate a license
s
Linux /opt/lumerical/lumerical-flexlm/lumerical-activation-utility
MAC Applications -> Lumerical -> Lumerical FlexLM -> Lumerical Activation Utility

See also
License Activation Errors

2003 - 2016 Lumerical Solutions, Inc


88 Lumerical Knowledge Base

Common FlexNet Error Codes

You may find additional useful information in the Advanced configuration chapter.

2.4.5 Floating MAC Locked


Overview
The Floating MAC locked license model is
typically used as a backup when there are
problems with the default Trusted Storage
locking method. Additionally, customers
that want to manage their Lumerical
licenses with an existing FlexNet lmgrd
license manager require this license
model.

Notes
Floating licenses allow users to access their licenses on any computer in the local network.
This license model is typically used for customers with existing FlexNet license manager installations, or for
customers that experience technical problems with the Trusted Storage license model.
This license model uses a file (.lic) base license.
These licenses are locked to the computer hardware and cannot be moved to a different computer.

Installing the license manager


Note: Instruction below is for Windows operating systems. Please see the
Installation Manual 16 section for information on other supported platforms.

LICENSE MANAGER INSTALLATION

Lumerical recommends installing the FlexNet


License Manager on a reliable server that will remain
running and connected to your local network. Please
note that you must have administrator privilege to
install the Lumerical FlexNet License Manager.

1. Download the FlexNet Licensing Manager from


the Download Center (registration required)

2. Unzip the installation package. You can right-


click the zip file and select Extract All...

3. Run the installer by launching the LFLM.msi


installer
Note: Under install options,
please ensure that "Standard
Configuration" is checked. Keeping
the default settings is
recommended.

4. After successfully installing the FlexNet License

2003 - 2016 Lumerical Solutions, Inc


Installation Manual 89

Manager, the activation utility will automatically


open.

5. Enter your eight-character activation code,


including the hyphen, and click the Activate
button.

6. If successful, the Activation window should now


list the valid license status and expiry date.

The License Activation utility can be also be


accessed by:
Windows 7 or 10: Click Start -> All Programs ->
Lumerical -> Lumerical FlexLM -> Activate or
Deactivate a license

Activating your license


Please note that you must have an administrator privilege to install a new license file.

1. Go to the Vendor Daemon Configuration on your FlexNet Publisher dashboard, or by simply visiting the
following link: http://localhost:8095/vendor
2. You will be asked to Sign In with an administrator user name and password, which are both set to admin
by default.

3. Click the Import License button


4. Then, click Choose File / Browse and located the license file that you have received from us.

5. Click the Import License button


If the update is successful, you will see messages in green that notify you that the update has been done
successfully.
6. You will be required to restart your Lumerical Flex License Manager for the changes to take effect. Please
see the Restart License Manager on how to do this.
7. Repeat the steps above for the other two license servers in the quorum

Afterwards, you can verify the status of your licenses by following the instructions here: Checking License
Status.

2003 - 2016 Lumerical Solutions, Inc


90 Lumerical Knowledge Base

Please note that if your new license is a license extension or renewal of your previous license that is still
valid, your new license may not be activated right away. Once your existing license expire, then the new
license will be activated automatically after you have done the above steps.

One of the common error that you may encounter is the message: "License file exists. Cannot overwrite an
existing file, licenses/LUMERICL/LicenseFile.lic, unless overwrite option is enabled"

When this happens, it means that you have an license with the same file name in the same location.
Please verify whether the previous license is still valid or not.
If the previous license is still valid: You must rename your new license to a unique name. Please only
use alphabetical characters and numbers for the file name (e.g. LicenseFile2013.lic)
If the previous license has expired: You can manually remove them, or alternatively during Step 4 please
select "Overwrite License File on License Server" to overwrite your previous license file.

If you are using Linux and wish to install the license file through command line interface, please see the
following instructions.
Open your terminal / command line interface
Copy the license file that you received and put it in the "licenses" folder
sudo cp /home/lumerical/Desk top/LicenseFile.lic /opt/lumerical/lumerical-flexlm/licenses/LUMERICL/
Change owner of the license file to lumlmadmin so that the license manager able to access it
sudo chown lumlmadmin /opt/lumerical/lumerical-flexlm/licenses/LUMERICL/LicenseFile.lic
Restart your license manager so the changes could take effects
Please see the the Restart License Manager section to restart the Lumerical FlexNet License Manager
Configuring Lumericals products
1. Open License Configuration utility of the products that you would like to configure
Window Start-> All Programs-> Lumerical-> <PRODUCT>-> Configure license
s
Linux /opt/lumerical/<PRODUCT>/bin/<PRODUCT>-config-license
MAC Applications/Lumerical/<PRODUCT>/License Configure
* replace 'PRODUCT' with the Lumerical application name, such as FDTD, MODE, DEVICE, or
INTERCONNECT.

2003 - 2016 Lumerical Solutions, Inc


Installation Manual 91

2. Select the Floating tab and enter the host name or


IP address of the license server or the machine
where FlexNet License Manager is installed.
If the FlexNet License Manager is installed on the
same machine with the product then you can set the
server name as "localhost". Click OK when
completed.

Checking the license availability


See the Check license availability page.
Transferring your license to a new computer
MAC locked licenses can not be transferred between computers. Please see https://www.lumerical.com/
support/ for instructions to contact Lumerical technical support for assistance.

See also
Common FlexNet Error Codes

You may find additional useful information in the Advanced configuration chapter.

2.4.6 Floating USB key


Overview
The Floating USB key license model
allows the License Manager to be
transferred between computers by moving
the USB key. This license model is rarely
the best option, but it is occasionally used
in secure environments where sub-
networks are not connected together, or as
a portability option for those needing to run
the product on different non-networked
workstations.

Notes
The license manager can be moved between computers by moving the USB key.
This license model uses a file (.lic) base license in addition to the USB key.
There is an extra charge for USB key locked licenses.
This license model is rarely the best option.

Installing the license manager


See the standard installation 16 instructions.

2003 - 2016 Lumerical Solutions, Inc


92 Lumerical Knowledge Base

Ensure the USB key driver check-box is selected during the License Manager installation process.

Activating your license


Please note that you must have an administrator privilege to install a new license file.

1. Go to the Vendor Daemon Configuration on your FlexNet Publisher dashboard, or by simply visiting the
following link: http://localhost:8095/vendor
2. You will be asked to Sign In with an administrator user name and password, which are both set to admin
by default.

3. Click the Import License button


4. Then, click Choose File / Browse and located the license file that you have received from us.

5. Click the Import License button


If the update is successful, you will see messages in green that notify you that the update has been done
successfully.
6. You will be required to restart your Lumerical Flex License Manager for the changes to take effect. Please
see the Restart License Manager on how to do this.
7. Repeat the steps above for the other two license servers in the quorum

Afterwards, you can verify the status of your licenses by following the instructions here: Checking License
Status.

2003 - 2016 Lumerical Solutions, Inc


Installation Manual 93

Please note that if your new license is a license extension or renewal of your previous license that is still
valid, your new license may not be activated right away. Once your existing license expire, then the new
license will be activated automatically after you have done the above steps.

One of the common error that you may encounter is the message: "License file exists. Cannot overwrite an
existing file, licenses/LUMERICL/LicenseFile.lic, unless overwrite option is enabled"

When this happens, it means that you have an license with the same file name in the same location.
Please verify whether the previous license is still valid or not.
If the previous license is still valid: You must rename your new license to a unique name. Please only
use alphabetical characters and numbers for the file name (e.g. LicenseFile2013.lic)
If the previous license has expired: You can manually remove them, or alternatively during Step 4 please
select "Overwrite License File on License Server" to overwrite your previous license file.

If you are using Linux and wish to install the license file through command line interface, please see the
following instructions.
Open your terminal / command line interface
Copy the license file that you received and put it in the "licenses" folder
sudo cp /home/lumerical/Desk top/LicenseFile.lic /opt/lumerical/lumerical-flexlm/licenses/LUMERICL/
Change owner of the license file to lumlmadmin so that the license manager able to access it
sudo chown lumlmadmin /opt/lumerical/lumerical-flexlm/licenses/LUMERICL/LicenseFile.lic
Restart your license manager so the changes could take effects
Please see the the Restart License Manager section to restart the Lumerical FlexNet License Manager
Configuring Lumericals products
1. Open License Configuration utility of the products that you would like to configure
Window Start-> All Programs-> Lumerical-> <PRODUCT>-> Configure license
s
Linux /opt/lumerical/<PRODUCT>/bin/<PRODUCT>-config-license
MAC Applications/Lumerical/<PRODUCT>/License Configure
* replace 'PRODUCT' with the Lumerical application name, such as FDTD, MODE, DEVICE, or
INTERCONNECT.

2003 - 2016 Lumerical Solutions, Inc


94 Lumerical Knowledge Base

2. Select the Floating tab and enter the host name or


IP address of the license server or the machine
where FlexNet License Manager is installed.
If the FlexNet License Manager is installed on the
same machine with the product then you can set the
server name as "localhost". Click OK when
completed.

Checking the license availability


See the Check license availability page.
Transferring your license to a new computer
1. The license manager and any associated license files must be installed and configured on the new
computer.
2. Move the USB key to the new computer.
3. Restart the License Manager on the new computer.

The Dashboard utility can be used to verify


successful installation of the USB key
driver, and that the system has detected
the key after it has been plugged in.

Common issues

2003 - 2016 Lumerical Solutions, Inc


Installation Manual 95

Floating error: -92: The


following error window will be
encountered when trying to run
the product without the USB key
plugged in.

See also
Common FlexNet Error Codes

You may find additional useful information in the Advanced configuration chapter.

2.4.7 Floating Triad Redundant


Overview
The Floating Triad Redundant license
model is appropriate for large installations
that wish to ensure high availability of
licenses by running 3 license servers in a
special redundant configuration. In this
configuration, licenses can be accessed
even if one license server fails. However, if
two servers fail, licenses can not be
accessed. Due to the complexity of this
model, it is only recommended for large
institutions with prior experience running
triad redundant Flex license servers.

In a redundant configuration, the Primary


server will act as the license server if at
least one other server is running properly.
If the Primary server fails, but the other two
machines are running properly, then the
Secondary server take over as the license
server. When connecting to a triad license
server, Lumerical's software first attempts
to connect to the Primary server. If the
software does not receive a response, it
will contact the Secondary server.

Notes
Floating licenses allow users to access their licenses on any computer in the local network.
The Triad configuration provides redundancy if the primary license server fails.
This license model uses a file (.lic) base license. These licenses are locked to the computer hardware and cannot
be transferred to a different computer.

2003 - 2016 Lumerical Solutions, Inc


96 Lumerical Knowledge Base

This license model is appropriate for large institutions with experience running redundant license servers.
The three license servers should be on the same local network and should be running the same OS.

Installing the license manager


For triad redundant license managers, it is necessary to install the license manager on three computers
running the same OS and connected to the same local network. The following instructions explain how to
install the license manager for each OS.

Windows 1. Extract the compressed folder that you


downloaded.
You can right-click the folder and select
extract all
2. Install the Lumerical_FlexLM_Installer.exe
file and follow the instructions on the
installation wizard.
3. For the Install Options window, ensure that
the "Standard Configuration. Uncheck
this option for triad configuration" is
unchecked. Uncheck the option to
"Launch License Activation Utility
when finished" as well.
4. Click Next and complete with the
installation.

Linux 1. Open your terminal / command line


interface
2. Extract the compressed folder that you
downloaded
tar -xzf Lumerical_FlexLM-<version>.tar.gz
3. Install the rpm package inside the
extracted directory
sudo yum install lumerical-flexlm-
<version>.i386.rpm

If you don't have yum installed, you can use


the following:
sudo rpm -ivh lumerical-flexlm-
<version>.i386.rpm

4. Once the installation has completed,


remove the default license file (start.lic)
that comes with the install package to set
up your License Manager for Redundant
Triad
sudo rm /opt/lumerical/lumerical-flexlm/
licenses/LUMERICL/start.lic
MAC 1. Double click the disk image
(Lumerical_FlexLM-<version>.dmg) to
mount the installer
2. Double click the installer package
Lumerical FlexLM and follow the
instructions on the installation wizard
3. Once the installation has completed,
remove the default license file (start.lic)
that comes with the install package to set

2003 - 2016 Lumerical Solutions, Inc


Installation Manual 97

up your License Manager for Redundant


Triad
sudo rm /opt/lumerical/lumerical-flexlm/
licenses/LUMERICL/start.lic

The standard installation 16 instructions may also be helpful.


Activating your license
Step 1: Modify license file
Once the License Manager has been installed and setup, you should modify your license file with the
appropriate information.

The following information are required to be specified on your license file:


The host names of your three license servers
The port number of your lmadmin (the default is 27011)
The decision of which license server will be the primary, secondary, and tertiary server

On the heading of your license file, you will see the following information:
#Please Do not delete this comment line.
SERVER this_host 0060dd469ca8
SERVER this_host2 000c290a498c
SERVER this_host3 001CC0F3684F
VENDOR LUMERICL
USE_SERVER

At minimum, you need to add and consider the following:


The first SERVER line will become your primary server (Master), then the second and third SERVER line
will become your secondary and tertiary server respectively
Modify each "this_host" information with the host name of your license servers. Ensure that the host name
is paired with the respective MAC address/ Host ID
Add the lmadmin port number information (the default is 27011)

#Please Do not delete this comment line.


SERVER SKY 0060dd469ca8 27011 PRIMARY_IS_MASTER
SERVER PANORAMA 000c290a498c 27011
SERVER CYPRESS 001CC0F3684F 27011
VENDOR LUMERICL
USE_SERVER

Other parameter that you can enter is PRIMARY_IS_MASTER. This parameter is optional and should be
placed on the first SERVER line
The PRIMARY_IS_MASTER keyword is a feature for FlexNet Licensing that ensures that the primary server is
the Master whenever it is running and communicating with one of the other license servers.
If this is set and the primary server goes down, when the primary server comes back up again, it will always
become the master.
If this is not set and the primary server goes down, the secondary server becomes the master and remains
the master even when the primary server comes back up. The primary can only become the master again

2003 - 2016 Lumerical Solutions, Inc


98 Lumerical Knowledge Base

when the secondary license server fails.

Step 2: Install license file


Install the license file, as explained below, on all three computhers in the triad.
Please note that you must have an administrator privilege to install a new license file.

1. Go to the Vendor Daemon Configuration on your FlexNet Publisher dashboard, or by simply visiting the
following link: http://localhost:8095/vendor
2. You will be asked to Sign In with an administrator user name and password, which are both set to admin
by default.

3. Click the Import License button


4. Then, click Choose File / Browse and located the license file that you have received from us.

5. Click the Import License button


If the update is successful, you will see messages in green that notify you that the update has been done
successfully.
6. You will be required to restart your Lumerical Flex License Manager for the changes to take effect. Please
see the Restart License Manager on how to do this.
7. Repeat the steps above for the other two license servers in the quorum

Afterwards, you can verify the status of your licenses by following the instructions here: Checking License
Status.
Please note that if your new license is a license extension or renewal of your previous license that is still
valid, your new license may not be activated right away. Once your existing license expire, then the new
license will be activated automatically after you have done the above steps.

One of the common error that you may encounter is the message: "License file exists. Cannot overwrite an
existing file, licenses/LUMERICL/LicenseFile.lic, unless overwrite option is enabled"

When this happens, it means that you have an license with the same file name in the same location.

2003 - 2016 Lumerical Solutions, Inc


Installation Manual 99

Please verify whether the previous license is still valid or not.


If the previous license is still valid: You must rename your new license to a unique name. Please only
use alphabetical characters and numbers for the file name (e.g. LicenseFile2013.lic)
If the previous license has expired: You can manually remove them, or alternatively during Step 4 please
select "Overwrite License File on License Server" to overwrite your previous license file.

If you are using Linux and wish to install the license file through command line interface, please see the
following instructions.
Open your terminal / command line interface
Copy the license file that you received and put it in the "licenses" folder
sudo cp /home/lumerical/Desk top/LicenseFile.lic /opt/lumerical/lumerical-flexlm/licenses/LUMERICL/
Change owner of the license file to lumlmadmin so that the license manager able to access it
sudo chown lumlmadmin /opt/lumerical/lumerical-flexlm/licenses/LUMERICL/LicenseFile.lic
Restart your license manager so the changes could take effects
Please see the the Restart License Manager section to restart the Lumerical FlexNet License Manager
Configuring Lumericals products
If you haven't setup your license configuration yet, you will be required to configure your license upon
launching the program for the first time. This page will show you how to easily configure your license.

1. Open Configure License utility of the product that you would like to configure
Window Start-> All Programs-> Lumerical-> <PRODUCT>-> Configure license
s
Linux /opt/lumerical/<PRODUCT>/bin/<PRODUCT>-config-license
MAC Applications/Lumerical/<PRODUCT>/License Configure
* replace 'PRODUCT' with the Lumerical application name, such as FDTD, MODE, DEVICE, or
INTERCONNECT.

2. Select Configure redundant server check box

3. Enter the host names or IP addresses of the three license servers

2003 - 2016 Lumerical Solutions, Inc


100 Lumerical Knowledge Base

4. Click OK

Once you have configured your license, you should be able to start using the software.
Optional: You can check your license status anytime by visiting the FlexNet Publisher Dashboard. See
Check License Status guide.

Firewall
If your license server is using a third party firewall or is bound by IP tables rules you may be required to
additional configuration. Please see the following page to Configure Firewall.
*Please note that Windows firewall is automatically configured by Lumerical installer
Checking the license availability
See the Check license availability page.
Transferring your license to a new computer
Triad redundant licenses can not be transferred to other computers. Please see https://www.lumerical.com/
support/ for instructions to contact Lumerical technical support for assistance.

Common issues

Connecting to a non-Master
License Server

When running triad redundant


servers, you must connect to the
Primary server. If you connect to a
license server that is not the Primary
to view the license status, you see Error: You have connected to a license server that is configured for
the error message shown below. In three server redundancy and is not the Master. This license server
this example the computer's name is cannot display the status of the vendor daemons. You must connect
'SKY'. to the Master in this quorum. SKY

See also
Common FlexNet Error Codes

You may find additional useful information in the Advanced configuration chapter.

2003 - 2016 Lumerical Solutions, Inc


Solvers 101

3 Solvers
Lumerical is a recognized leader in the fields of optoelectronic device simulation and photonic integrated circuit
design. Our optoelectronic device and circuit simulation products are used at hundreds of locations in more than 30
countries around the world, and have been used in more than 900 scientific publications. Learn more about our
solvers in this chapter.

Solver name Acronym Product(s) Description


2D, 3D Finite-Difference Time- FDTD FDTD Solutions 2D, 3D Maxwell solver based on the
Domain 103 Finite-Difference Time-Domain
method. Well suited for analyzing
the interaction of UV, visible, and IR
radiation with complicated
structures employing wavelength
scale features.
Finite-Difference Eigenmode 109 FDE MODE Solutions The Finite-Difference Eigenmode
FDTD Solutions solver calculates the spatial profile
and frequency dependence of
modes by solving Maxwell's
equations on a cross section of the
waveguide.
2.5D Finite-Difference Time- varFDTD MODE Solutions 2.5D variational FDTD propagation
Domain 107 method for simulating light
propagation in optically large planar
integrated optical components.
Eigenmode Expansion 114 EME MODE Solutions The EME method is a fully vectorial
and bi-directional technique to solve
Maxwell's equations. The
methodology relies on the modal
decomposition of electromagnetic
fields into a basis set of
eigenmodes, which are computed
by dividing the geometry into
multiple cells and then solving for
the modes at the interface between
adjacent cells. Scattering matrices
for each section are formulated by
applying boundary conditions at the
interface between each section. The
solution to each section is then
propagated bi-directionally to
calculate the total transmission and
reflection of the device, as well as
the final field profile.
Charge Transport 157 CHARGE DEVICE The charge transport solver self-
consistently solves Poissons
equation and the drift-diffusion
equations to model the steady-state
and transient behavior of charge
carriers (electrons and holes) in
semiconductor devices such as
solar cells, image sensors, photo-
detectors and modulators.
Heat Transport 163 HEAT DEVICE The heat transport solver evaluates
the heat transport equation in

2003 - 2016 Lumerical Solutions, Inc


102 Lumerical Knowledge Base

solids, and can additionally include


Joule heating from conductive
electrical transport by self-
consistently evaluating the DC
current equation.
Dynamic Data Flow 166 DDF INTERCONNECT Bidirectional time domain photonic
integrated circuit (PIC) solver. The
data flow simulator allows more
flexibility than traditional discrete
time or time-driven simulators. See
the whitepaper for details.
Scattering Data Analysis 168 SDA INTERCONNECT Bidirectional frequency domain
photonic integrated circuit (PIC)
solver. The frequency domain
response of each element is
represented by a scattering matrix,
and the overall response of the
system is calculated by solving a
sparse matrix representation of the
circuit. See the whitepaper for
details.

Optical toolbox functions Acronym Product(s) Description


Near to far field projections 126 FDTD Solutions The near to far field projections
MODE Solutions calculate the EM fields anywhere in
the far field. The near field data is
obtained from one of Lumerical's
optical solvers, then the far field
projection is calculated as a post-
processing step.
Grating projections 150 FDTD Solutions The near to far Grating projections
MODE Solutions calculate the far field profile from a
periodic grating structure. The near
field data is typically obtained from
one of Lumerical's optical solvers.
The far field is then calculated as a
post-processing step.
Eigenmode propagate script MODE Solutions A unidirectional eigenmode
command 156 expansion method is available via
the propagate script command.
This command calculates the
resulting output mode profile of an
arbitrary input mode after it has
propagated through a waveguide for
some distance.
Multilayer stack RT calculator 156 FDTD Solutions The multilayer stack reflection &
MODE Solutions transmission script function
calculates the reflection and
transmission of a plane wave
through an arbitrary multi-layer
stack using an analytic transfer
matrix method.

2003 - 2016 Lumerical Solutions, Inc


Solvers 103

3.1 Optical solvers


3.1.1 FDTD
Introduction
The Finite-Difference Time-Domain (FDTD) method1,2,3 is a state-of-the-art method for solving Maxwell's equations in
complex geometries. Being a direct time and space solution, it offers the user a unique insight into all types of
problems in electromagnetics and photonics. In addition, FDTD can also obtain the frequency solution by exploiting
Fourier transforms, thus a full range of useful quantities can be calculated, such as the complex Poynting vector and
the transmission / reflection of light.

Solver physics
This section will introduce the basic mathematical and physics formalism behind the FDTD algorithm.

FDTD solves Maxwell's curl equations in non-magnetic materials:


r
D r
= H
t
r r
D( w ) = e 0 e r ( w ) E ( w )
r
H 1 r
=- E
t m0

where H, E, and D are the magnetic, electric, and displacement fields, respectively, while
e r ( w ) is the complex

relative dielectric constant (


e r ( w ) = n 2 , where n is the refractive index).

In three dimensions, Maxwell equations have six electromagnetic field components: Ex , Ey , 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
e r ( w , x, y , z ) = e r ( w , x, y )
r r
E H
= =0
z z

then Maxwell's equations split into two independent sets of equations composed of three 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:


Dz H y H x
= -
t x y
Dz ( w ) = e 0 e r ( w ) E z ( w )
H x 1 E z
=-
t m0 y
H y 1 E z
=
t m0 x

The FDTD method solves these equations on a discrete spatial and temporal grid. Each field component is solved
at a slightly different location within the grid cell (Yee cell), as shown below. By default, data collected from the

2003 - 2016 Lumerical Solutions, Inc


104 Lumerical Knowledge Base

FDTD solver is automatically interpolated to the origin of each grid point, so the end user does not have to deal
with this issue in their analysis.

Dispersive materials with tabulated refractive index (n,k) data as a function of wavelength can be incorporated by
using the multi-coefficient material models that automatically generates a material model based on the tabulated
data. Alternatively, specific models such as Plasma (Drude), Debye or Lorentz can be used. See the Materials
215 chapter for details. The FDTD solver supports a range of boundary conditions, such as PML, periodic, and

Bloch. See the boundary conditions 459 section here for the complete list. The FDTD solver 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 softwares. Detailed information about each of these sources is contained in the sources
510 section.

See the FDTD Numerical methods video for additional information: http://www.lumerical.com/support/courses/
fdtd_numerical_methods/video.html. You can also find more information on Wikipedia.

Meshing
FDTD Solutions uses a rectangular, Cartesian style mesh, like the one shown in the following screenshot. It's
important to understand that of the fundamental simulation quantities (material properties and geometrical
information, electric and magnetic fields) are calculated at each mesh point. Obviously, using a smaller mesh
allows for a more accurate representation of the device, but at a substantial cost. As the mesh becomes smaller,
the simulation time and memory requirements will increase. The FDTD solver provides a number of features,
including the conformal mesh algorithm, that allow you to obtain accurate results, even when using a relatively
coarse mesh.

By default, the simulation mesh is automatically generated. To maintain


accuracy, the meshing algorithm will create a smaller mesh in high index
(to maintain a constant number of mesh points per wavelength) and highly
absorbing (resolve penetration depths) materials. In some cases, it is also
necessary to manually add additional meshing constraints. Usually, this
involves forcing the mesh to be smaller near complex structures (often
metal) where the fields are changing very rapidly.

Units and normalization


Unless otherwise specified, all quantities are returned in SI units. Please see Units and Normalization 116 for
more information.

2003 - 2016 Lumerical Solutions, Inc


Solvers 105

References
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).
3 Stephen D. Gedney, Introduction to the Finite-Difference Time-Domain (FDTD) Method for Electromagnetics.
Morgan & Claypool publishers, (2011).

3.1.1.1 Ray vs Wave simple example


This very simple example of a grating demonstrates how the ray approximation breaks down as the structure feature
size becomes wavelength scale.

Solvers 101

FDTD
Associated files
ray vs wave.fsp

The structure in this example is a simple grating with an


index contrast of 1.5:1. If the illumination is at normal
incidence, a very simple application of Snell's law
suggests that the fields should be completely reflected,
since the angle of incidence on the grating surface is 45
degrees which is beyond the critical angle of 41.8
degrees.

2003 - 2016 Lumerical Solutions, Inc


106 Lumerical Knowledge Base

The same system setup in FDTD Solutions.

Notice that the span is 20um.

Simulation results when the source wavelength is 0.4um.


The key point is to recognize that 0.4um is much
smaller than the period of the structure (20um). In this
situation, the behavior of the system is basically
predicted by the simple ray approximation; most of the
fields are reflected.

switchtolayout;
save("400nm.fsp");
setnamed("source","center wavelength",400e-9);
run;

2003 - 2016 Lumerical Solutions, Inc


Solvers 107

Simulation results when the source wavelength is 4um.


The key point is to recognize that 4um is much closer in
scale to the period of the structure (20um). In this
situation, the behavior of the system is quite different. A
significant fraction of power is transmitted through the
device.

switchtolayout;
save("4000nm.fsp");
setnamed("source","center wavelength",4000e-9);
run;

3.1.2 varFDTD
Introduction
The 2.5D varFDTD solver accurately describes the propagation of light in planar integrated optical systems, from
ridge waveguide-based systems to more complex geometries such as photonic crystals. The propagator allows for
planar (omni-directional) propagation without any assumptions about an optical axis, which allows for structures like
ring resonators and photonic crystal cavities to be efficiently modeled devices that have been traditionally treated
with 3D FDTD. The varFDTD solver can model devices on the scale of hundreds of microns quickly.

Video resources
varFDTD introduction (YouTube.com)
MODE Solutions overview (YouTube.com)
MODE Solutions Introductory Webinar (lumerical.com)
More videos (lumerical.com)

Selected Application Examples


Ring Resonator Getting Started Tutorial 2021

AWGs and Star Couplers 2119


Tapered Waveguide 2673
Ring Modulator 2766

Solver physics
The varFDTD solver is based on collapsing a 3D geometry into a 2D set of effective indices that can be solved
with 2D FDTD 103 . This works best with waveguides made from planar structures, as the main assumption of this
method is that there is little coupling between different supported slab modes. For many devices, such as SOI
based slab waveguide structures, that only support 2 vertical modes with different polarizations, this is an
excellent assumption.

The calculation steps involve:

2003 - 2016 Lumerical Solutions, Inc


108 Lumerical Knowledge Base

1. Identification of the vertical slab modes of the core waveguide structure, over a desired range of wavelengths.
2. Meshing of the structure and collapse of the 3rd dimension by calculation of the corresponding effective 2D
indices (taking into account the vertical slab mode profile). There are currently two approaches to doing this:
a) Variational
A variational procedure based on Hammer and Ivanova1. Here, the effective permittivities of the TE and TM-like
modes have the form:
2

TE b
2 ( e ( x, y , z ) - e ( z , w ) ) M ( z , w )
r dz
e ( x, y , w ) = r +
eff
z
2
k M ( z, w ) dz
z

2
1 1 1 M
| M |2 dz - dz
e ( x, y, z ) z
2
TM br e
z r z r
e
e eff ( x, y, w ) = +
k 1 2 1 2
z e ( x, y, z ) | M | dz k2 M dz
z
e ( x, y , z )
where r, M and r are the 1-D reference permittivity profile, the associated guided slab mode and the
propagation constant.
b) Reciprocity Based
This is a procedure based on the reciprocity theorem, as described in Snyder and Love2:
r 2

b e
1
2 ( e ( x, y , z ) - e r ( z , w ) ) E ( z , w ) dz
neff ( x, y, w ) = r + 0 z
k m0
P ndz
z

Note that in both cases, the generated effective materials are also dispersive, where the dispersion comes both
from the original material properties (material dispersion) and the slab waveguide geometry (waveguide
dispersion). These new materials are then fitted using Lumerical Solutions' multi-coefficient model into a time-
domain form that can be used in the 2D FDTD simulation in step 3. Note that the effective index treatment
may lead to generated materials that have properties that are unphysical (for example, having an artificial
negative imaginary index). In this case, one has the option of restricting the range of generated indices to the
min/max values defined by the physical material properties of the original materials. All of these settings can
be found under the Effective index tab 425 of the varFDTD simulation region.

3. Simulation of the structure in 2D by FDTD.


4. If desired, re-expansion of the fields into 3D.

For additional information on the varFDTD solver, see the Lumericals 2.5D FDTD Propagation Method whitepaper
on our website.

Meshing
The MODE Solutions Propagator uses a rectangular, Cartesian style mesh, like the one shown in the following
screenshot. It's important to understand that of the fundamental simulation quantities (material properties and
geometrical information, electric and magnetic fields) are calculated at each mesh point. Obviously, using a
smaller mesh allows for a more accurate representation of the device, but at a substantial cost. As the mesh
becomes smaller, the simulation time and memory requirements will increase. MODE Solutions provides a
number of features, including the conformal mesh algorithm, that allow you to obtain accurate results, even when
using a relatively coarse mesh.

2003 - 2016 Lumerical Solutions, Inc


Solvers 109

By default, the simulation mesh is automatically generated. To maintain


accuracy, the meshing algorithm will create a smaller mesh in high index
(to maintain a constant number of mesh points per wavelength) and highly
absorbing (resolve penetration depths) materials. In some cases, it is also
necessary to manually add additional meshing constraints. Usually, this
involves forcing the mesh to be smaller near complex structures (often
metal) where the fields are changing very rapidly.

Note: meshing time


The general meshing algorithm can take a reasonable amount of time compared to the simulation because the
mesh must be effectively completed in 3D. It is possible for the user to specify if the structure is composed of
purely extruded structures - that is structures that are extruded along z with perfectly vertical sidewalls. In this
case, the meshing can be accomplished much faster.

Units and normalization


Unless otherwise specified, all quantities are returned in SI units. Please see Units and Normalization 116 for
more information.

References
1 Manfred Hammer and Olena V. Ivanova, MESA Institute for Nanotechnology, University of Twente, Enschede,
The Netherlands
"Effective index approximation of photonic crystal slabs: a 2-to-1-D assessment", Optical and Quantum
Electronics ,Volume 41, Number 4, 267-283, DOI: 10.1007/s11082-009-9349-3
2 Allan W. Snyder and John D. Love, Optical Waveguide Theory. Chapman & Hall, London, England, 1983.

3.1.3 FDE
Introduction
The Finite Difference Eigenmode (FDE) solver calculates the spatial profile and frequency dependence of modes
solves Maxwell's equations on a cross-sectional mesh of the waveguide. The solver calculates the mode field
profiles, effective index, and loss. Integrated frequency sweep makes it easy to calculate group delay, dispersion,
etc. The solver can also treat bent waveguides.

Video resources
MODE Solutions overview (YouTube.com)
MODE Solutions Introductory Webinar (lumerical.com)

2003 - 2016 Lumerical Solutions, Inc


110 Lumerical Knowledge Base

More videos (lumerical.com)

Selected Application Examples


Photonic Crystal Fiber Getting Started Tutorial 1770

Plasmonic Waveguide Getting Started Tutorial 1883

Evanescent Waveguide Coupler 2108


Arrow Slab Waveguide 2164
SMF-28 Fibre 2178

Solver physics
In the z-normal eigenmode solver simulation example shown in the figure above, we have the vector fields:
E ( x, y )e i ( - wt + bz ) and H ( x, y )e i ( - wt + bz )
where is the angular frequency and is the propagation constant. The modal effective index is then defined as
cb
neff =
w .

The Eigensolver find these modes by solving Maxwell's equations on a cross-sectional mesh of the waveguide.
The finite difference algorithm is the current method used for meshing the waveguide geometry, and has the ability
to accommodate arbitrary waveguide structure. Once the structure is meshed, Maxwell's equations are then
formulated into a matrix eigenvalue problem and solved using sparse matrix techniques to obtain the effective
index and mode profiles of the waveguide modes. This method is based on Zhu and Brown1, with proprietary
modifications and extensions.

The fields are normalized such that the maximum electric field intensity |E|^2 is 1.

Note: The FDE solves an eigenvalue problem where beta2 (beta square) is the eigenvalue (see the reference
below) and in some cases, such as evanescent modes or waveguides made from lossy material, beta2 is a
negative or complex number. The choice of root for beta2 determines if we are returning the forward or backward
propagating modes. By default, the root chosen is the one with a positive value of the real part of beta which, in
most cases, corresponds to the forward propagating mode. However, we know that a waveguide will not create
gain if the material has no gain. To ensure that the correct forward propagating modes are reported, the FDE may
flip the sign of the default root to ensure that the mode has loss (and a negative phase velocity) which is physical.
Detailed settings can be found in Advanced options 767 .

Bent waveguide mode solver


The FDE mode solver is also capable of simulating bent waveguides. For more information, see the Bent
waveguide solver 111 sub-page.

Meshing
The MODE Solutions Eigenmode Solver uses a rectangular, Cartesian style mesh, like the one shown in the

2003 - 2016 Lumerical Solutions, Inc


Solvers 111

following screenshot. It's important to understand that of the fundamental simulation quantities (material
properties and geometrical information, electric and magnetic fields) are calculated at each mesh point.
Obviously, using a smaller mesh allows for a more accurate representation of the device, but at a substantial
cost. As the mesh becomes smaller, the simulation time and memory requirements will increase. MODE
Solutions provides a number of features, including the conformal mesh algorithm, that allow you to obtain
accurate results, even when using a relatively coarse mesh.

By default, the simulation will use a uniform mesh. You simply set the
number of mesh points along each axis. In some cases, it is necessary to
add additional meshing constraints. Usually, this involves forcing the mesh
to be smaller near complex structures where the fields are changing very
rapidly.

Note: In FDTD-based simulations, it's important to use a smaller mesh in


high index materials, and to maintain a minimum number of mesh points
per wavelength. This constraint does not exist for the Eigenmode solver.

Units and normalization


Unless otherwise specified, all quantities are returned in SI units. Please see Units and Normalization 116 for
more information.

References
Z. Zhu and T. G. Brown, Full-vectorial finite-difference analysis of microstructured optical fibers, Opt. Express
10, 853864 (2002), http://www.opticsexpress.org/abstract.cfm?URI=OPEX-10-17-853

3.1.3.1 Bent waveguide solver


Bent waveguide solver
In a straight waveguide, the FDE engine solves for modes of the form
r r
E ( x, y, z ) = f ( x, y ) exp( i bz )
2p
b = neff k0 = neff
l0
Maxwell's equations are solved in a Cartesian coordinate system with the appropriate boundary conditions. There are
a discrete set of values of effective index (nef f ) for which the electromagnetic field is displayed at z=0 where

r r
E ( x, y, z = 0) = f ( x, y )

In a bent waveguide, the MODE Solutions - Eigenmode solver will solve for modes of the form
r r
E ( r , y ' , q ) = f ( r , y ' ) exp( i br 0 q )
2p
b = neff k0 = neff
l0
Where the (r,y',q) represent a cylindrical coordinate system described in the Bend orientation section.

The bend can lead to radiative losses. The losses can be measured by using Perfectly Matched Layer (PML)
boundary conditions to absorb the radiation from the waveguide. To illustrate the effect of the bend orientation angle,
the following images show the fundamental mode for a bent fiber with a circular cross-section in the xy-plane.

2003 - 2016 Lumerical Solutions, Inc


112 Lumerical Knowledge Base

bend orientation 0 degree (ie. w aveguide bends in XZ bend orientation 90 degrees (ie. w aveguide bends in
plane) YZ plane)

The left figure above clearly shows that the mode is shifted away from the center horizontally and no symmetry is in
x axis, since the bend is in xz plane and the bend center is in the negative x side. Similarly the right figure shows
the mode center moves upwards because the bend orientation is set to be 90 degree.

NOTE: This discussion assumes we are using a 2D Eigenmode solver region oriented
in the XY plane. For other Eigenmode solver orientations, see the FDE solver in
other orientations section.

Bend radius setting


The bend radius is measured from the
center of the FDE simulation region.

For the purpose of this calculation, the


definition of the FDE simulation region
center is slightly different than the
conventional definition: the boundary
condition regions are considered to be
part of the simulation volume. As long
as the width of the boundary condition
region is the same on both sides of the
simulation, then the standard definition
applies. However, if the boundary
conditions have different widths (eg.
metal on one side, PML on the other),
then the center of the radius of curvature
will be in a slightly different location, as
shown on the right

Bend orientation setting


The (r,y',q) represent a cylindrical coordinate system shown in the figure below. The "bend orientation" angle, f, that
can be set in the FDE analysis window is also shown in the following figure. The bend orientation angle determines
the direction in which the waveguide bends. The cross section of the FDE simulation region is shown in white with a
purple arrow indicating the direction of propagation of the mode. The FDE simulation region is the cross section of
the waveguide when q = 0. The electromagnetic fields are returned in the Cartesian reference frame (x,y,z=0):

2003 - 2016 Lumerical Solutions, Inc


Solvers 113

E x ( x, y )
r r
E ( r , y ' , q = 0) = E ( x, y, z = 0) = E y ( x, y )
E ( x, y )
z
r - r0 = x cos( j ) + y sin( j )
y ' = - x sin( j ) + y cos( j )

FDE Solver in other orientations (XZ, YZ, or 1D solvers)


The above description assumes that you are using a 2D FDE solver oriented in the XY plane (meaning Z is the
propagation direction). To understand the bend orientation for all Eigenmode solver orientations:

1. When the waveguide cross section is in XY plane and Z is the propagation direction, if the bend is in xz plane
around an axis parallel to y, the bend orientation property is 0 when the bend center is in negative x, and the
bend orientation property is 180 degrees when the bend center is in positive x; if the bend is in yz plane around
an axis parallel to x, the orientation is 90 degrees when the bend center is in the negative y, and the orientation
is 270 degrees when the bend center is in the positive y; in the case that the bend is in between xz and yz
planes, the orientation angle is in between;
2. When the waveguide cross section is in YZ plane and X is the propagation direction, if the bend is in yx plane,
the orientation is 0 (negative y) or 180 degrees (positive y); in zx plane, the orientation is 90 (negative z) or 270
(positive z) degrees;
3. When the waveguide cross section is in ZX plane and Y is the propagation direction, if the bend is in zy plane,
the orientation is 0/180; in xy plane, the orientation is 90/270 degrees.

For 1D Eigenmode solver, as long as the propagation direction is set, you can follow up the rules summarized
above. For example, a 1D waveguide is in x axis and the propagation direction is y, using the rule #3 we know that
the bend orientation can only be in xy plane, thus the bend orientation is 90 degrees. If the bend orientation is set to
be 0 or 180 degrees,which means the bend is in zy plane, because it is infinite in size ( 1D waveguide along x) ,
there is no effect to the mode.

2003 - 2016 Lumerical Solutions, Inc


114 Lumerical Knowledge Base

To understand the bend orientation clearly, we suggest that you create a waveguide, and use bend orientation either
in 0 or 90 degrees to check where the mode is shifted.

Minimum bend radius


The bending radius must be greater than or
equal to half the simulation span. For a smaller
bend radius, the simulation span must be
reduced.

For the purpose of this discussion, the


simulation span is considered to be the FDE
object span plus the width of the boundary
condition region, as shown on the right.

3.1.4 EME
Introduction
The bidirectional eigenmode expansion (EME) solver is ideal for simulating light propagation over long distances. The
computational cost of the method scales exceptionally well with the device length, making it much more efficient for
the design and optimization of long tapers and periodic devices compared to FDTD-based methods.

Video resources
Eigenmode Expansion Solver Webinar (lumerical.com)
MODE Solutions Introductory Webinar (lumerical.com)
More videos (lumerical.com)

Selected Application Examples


Spot Size Converter Getting Started Tutorial 2053

Fiber Bragg Grating 2182


MMI Coupler 2118
Waveguide Bragg Grating 2132
Phase-shifted Bragg Grating 2132

Solver physics
The EME method is a frequency domain method for solving Maxwell's equations. The algorithm is fully vectorial
and bi-directional, and offers a good alternative to FDTD-based methods for long propagation distances

The methodology involves 2 key steps:

1. The modal decomposition of electromagnetic fields into a basis set of eigenmodes. These modes are
computed by dividing the geometry into multiple cells and then solving for the modes at the interface between
adjacent cells. Scattering matrices for each section are then formulated by matching the tangential E and H fields
at the cell boundaries. This is the most time consuming portion of the EME calculation. In this step, FDE 109
solver is used.

2003 - 2016 Lumerical Solutions, Inc


Solvers 115

2. The simulation is now in analysis mode, and the solution to each section can be propagated bi-directionally to
calculate the S matrix of the entire device. The internal fields can also be reconstructed, if desired. This step can
be carried out very quickly.

Once in analysis mode, the user can change the propagation distance of each section arbitrarily without having to
repeat step 1. This is why the EME method is very efficient for scanning the lengths of devices, as demonstrated
in the Spot Size Converter Example 2053 .

The EME method has several advantages over other propagation methods:
Beam propagation methods (BPM): unlike BPM, which relies on a slowly varying envelope approximation, the
EME method makes no such approximations and is a rigorous technique. The accuracy of BPM also becomes
compromised for propagation at large angles, or in components with high refractive-index contrast, making it
unsuitable for photonic components manufactured from silicon or other high index contrast material systems.
Finite-difference time-domain (FDTD) methods: the EME method scales exceptionally well with propagation
distance and is an ideal method for simulating long structures whereas FDTD-based methods, while rigorous,
exhibit significant increases in simulation times as the length of the device increases .

Meshing
Transverse mesh (y,z)
The EME solver uses a rectangular, Cartesian style mesh, like the one
shown in the figure to the right. It is important to understand that the
fundamental simulation quantities (material properties and geometrical
information, electric and magnetic fields) are calculated at each mesh
point. Obviously, using a smaller mesh allows for a more accurate
representation of the device, but at a substantial cost. As the mesh
becomes smaller, the simulation time and memory requirements will
increase. MODE Solutions provides a number of features, including the
conformal mesh algorithm, that allow you to obtain accurate results, even
when using a relatively coarse mesh.

By default, the simulation will use a uniform mesh in the transverse


directions. You simply set the number of mesh points along each axis. In
some cases, it is necessary to add additional meshing constraints.
Usually, this involves forcing the mesh to be smaller near complex
structures where the fields are changing very rapidly.

2003 - 2016 Lumerical Solutions, Inc


116 Lumerical Knowledge Base

Note: In FDTD-based simulations, it's important to use a smaller mesh in


high index materials, and to maintain a minimum number of mesh points
per wavelength. This constraint does not exist for the EME solver.
Longitudinal mesh (x)
The mesh along the propagation direction is defined by adding cells to the
EME simulation region. An eigenmode simulation is carried out at the
center x location of each cell to calculated all the modes supported at that
cross section. More cells will allow for a more accurate representation of
the geometry in the longitudinal direction, but at the cost of increasing the
simulation time and memory.

Cell groups can be used to specify a non-uniform longitudinal mesh. For


example, in the MMI structure to the right, only 1 cell is required for the
uniform sections, while more cells are required for the tapered sections.

Continuously Varying Cross-sectional Subcell (CVCS) method


The traditional EME method represents continuously varying structures, such as tapers, with a staircase
approximation to resolve geometrical or material variations along the direction of propagation. This leads to non-
physical reflections and calculation inaccuracies. The typical workaround involves increasing the number of
expansion interfaces, which results in increased computational costs, both in terms of time and memory.
Lumericals CVCS method avoids this staircasing effect and, through extensive benchmarking versus 3D finite-
difference time-domain (FDTD) simulations for a wide variety of waveguide structures, offers excellent accuracy at
a fraction of the time for longer structures.

Units and normalization


Unless otherwise specified, all quantities are returned in SI units. Please see Units and Normalization 116 for
more information.

3.1.5 Units and normalization


Unless otherwise stated, Lumerical's optical solvers used SI units at all times.

General
Solvers: All

Quantity Description Units Unit description


f=w/2p Frequency Hz Hertz
x,y,z Position m Meter
t Time s Seconds

Time domain electromagnetic fields


Solvers: FDTD, varFDTD

Quantity Description Units Unit description


E(t) Electric field as function of time V/m Volts per meter
|E(t)|2 Electric field intensity as a function of time (V/m)2 Volts squared per
meter squared
H(t) Magnetic field as a function A/m Amperes per meter

2003 - 2016 Lumerical Solutions, Inc


Solvers 117

|H(t)|2 Magnetic field intensity as a function of time (A/m)2 Amperes squared per
meter squared

P(t) Poynting vector as a function of time W/m2 Watts per meter


squared
Power(t) Power as a function of time W Watts

Dipole moments
Solvers: FDTD, varFDTD

Quantity Description Units Unit description


p Electric dipole in 3D Cm Coulomb meters
m Magnetic dipole in 3D Am2 Ampere meters
squared
p Electric field in 2D Cm/m Coulomb meters per
meter
m Magnetic dipole in 2D Am2/m Ampere meters
squared per meter

Frequency domain electromagnetic fields - Steady state, single frequency, cwnorm


data
Solvers: All

Steady state data can be collected from FDTD and varFDTD simulations by using frequency domain monitors
with the cwnorm option enabled. For more information, see the Frequency domain normalization 119 page.

Quantity Description Units Unit description


E(w) Electric field as a function of angular frequency V/m Volts per meter
|E(w)|2 Electric field intensity as a function of angular frequency (V/m)2 Volts squared per
meter squared
H(w) Magnetic field as a function of angular frequency A/m Amperes per meter
|H(w)|2 Magnetic field intensity as a function of angular frequency (A/m)2 Amperes squared per
meter squared
P(w) Poynting vector as a function of angular frequency W/m2 Watts per meter
squared
Power(w) Power as a function of angular frequency W Watts
Power(w) 2D Power as a function of angular frequency W/m Watts per meter

Frequency domain electromagnetic fields - nonorm data


Solvers: FDTD, varFDTD

The nonorm state units only apply to data collected by frequency domain monitors when the normalization state
is set to nonorm. The nonorm state is rarely used, since the cwnorm state is more useful in most situations.
For more information, see the Frequency domain normalization 119 page.

2003 - 2016 Lumerical Solutions, Inc


118 Lumerical Knowledge Base

Quantity Description Units Unit description


E(w) Electric field as a function of angular frequency V/m/Hz Volts per meter per
Hertz
|E(w)|2 Electric field intensity as a function of angular frequency (V/m/Hz)2 Volts squared per
meter squared per
Hertz squared
H(w) Magnetic field as a function of angular frequency A/m/Hz Amperes per meter
per Hertz
|H(w)|2 Magnetic field intensity as a function of angular frequency (A/m/Hz)2 Amperes squared per
meter squared per
Hertz squared
P(w) Poynting vector as a function of angular frequency W/m2/Hz 2 Watts per meter
squared per Hertz
squared
Power(w) Power as a function of angular frequency W/Hz 2 Watts per Hertz
squared
Power(w) 2D Power as a function of angular frequency W/Hz 2/m Watts per Hertz
squared per meter

Source amplitudes
Solvers: FDTD, varFDTD

Beam sources
When specifying the amplitude for beam 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:
(t - t0 ) 2 (x2 + y2 )
E ( x, y, z , t ) = E0 sin (w0 (t - t0 ) ) exp -

2
exp - 2

2 ( Dt ) w 0
Then the "amplitude" refers to the value of E0 and has units of V/m. It is worth noting that different beams will
inject different amounts of power for a given source amplitude.

Dipole sources
For dipole sources, amplitude refers to the amplitude of the point source whose units are listed below. Base
amplitude refers to the amplitude that will generate a radiated CW power of 10 nW/m in 2D simulations and 1 fW
in 3D simulations, and total amplitude refers to the amplitude actually used in the simulations which is the
product of the amplitude and the base amplitude.

Dipole source amplitude units 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

More units and normalization information:


Frequency domain normalization 119
Spectral averaging 120
Parseval's theorem - Energy conservation 125

2003 - 2016 Lumerical Solutions, Inc


Solvers 119

3.1.5.1 Frequency domain normalization


The frequency power and frequency profile monitors in the FDTD and varFDTD solvers record the electric and
magnetic fields at a series of user-defined frequencies. These can be returned in either the Continuous Wave
Normalization state (cwnorm), or the No Normalization state (nonorm). For most applications, the default cwnorm
618 state is the best choice.

In the nonorm state, the returned fields are simply the Fourier transform of the simulated time domain fields, and we
use the subscript sim to refer to these fields in the table below. In the cwnorm state, the fields are normalized by
the Fourier transform of the source pulse, thereby yielding the impulse response of the system, and we use a
subscript imp to refer to these fields in the table below.

Quantity Definition Normalization


state
Esim (w)
r r nonorm
Esim ( w ) = exp (i wt )E (t )dt

Hsim (w)
r r nonorm
H sim ( w ) = exp (i wt )H (t )dt

Psim (w)
r r r* nonorm
Psim ( w ) = Esim ( w ) H sim (w)
r
Eimp(w) r 1 r Esim ( w ) cwnorm
Eimp ( w ) = exp (i wt )E (t )dt =
s( w ) s( w )
r
Himp(w) r 1 r H sim ( w ) cwnorm
H imp ( w ) = exp (i wt )H (t )dt =
s( w ) s( w )
r r*
Pimp(w) r r r* Esim ( w ) H sim (w) cwnorm
Pimp ( w ) = Eimp ( w ) H imp ( w ) = 2
| s( w ) |
s(w) 1 N/A
s( w ) =
N
exp (i wt )s (t )dt
sources
j
, where s j(t) is the source time
th
signal of the j source and N is the number of active sources in
the simulation volume

Understanding Continuous Wave Normalization (cwnorm)


Impulse response
FDTD is a time domain method, ie. the electromagnetic fields are calculated as a function of time. Here, the system
being simulated is excited by a dipole, beam, mode or imported source, and the time signal of the source, s(t), is a
pulse. For example, this could be
(t - t0 ) 2
s (t ) = sin (w0 (t - t0 ) ) exp - 2

2(Dt )
and the Fourier transform of s(t) is s(w)
s ( w ) = exp (i wt )s (t )dt

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 return the response of the system to the simulated input pulse s(t):

2003 - 2016 Lumerical Solutions, Inc


120 Lumerical Knowledge Base

r r
Esim ( w ) = exp (i wt )E (t )dt
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 return the impulse response of the system.
r
r Esim ( w )
Eimp ( w ) =
s( w )
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=z 0. The source signal is

(t - t0 ) 2
s (t ) = sin (w0 (t - t0 ) ) exp - 2

2(Dt )
The electric field at the source injection plane has the following form:
E ( x, y, z0 , t ) = E0 ( x, y, z0 ) s (t )

In the cwnorm state,


E ( x, y , z , w ) = E 0 ( x, y , z )
In other words, the field returned in the cwnorm state is the field that would exist if a CW source of amplitude E0
had been used at the angular frequency w. It removes any frequency dependence due to the finite pulse length of the
source, and the units of the returned fields are the same as time domain fields.

3.1.5.2 Spectral averaging


For some FDTD and varFDTD 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
r r
P = W (w ) Pimp ( w )d w
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 119 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 119 for more details on
the two normalization states, and obtaining the impulse response of the system.

Total spectral averaging


FDTD Solutions/Propagator 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.

Quantity Definition Normalization state

2003 - 2016 Lumerical Solutions, Inc


Solvers 121

<|Esim |2> total r 2 + r 2


nonorm
Esim = Esim ( w ) d w
total 0

<|Hsim |2> total r 2 + r 2


nonorm
H sim = H sim ( w ) d w
total 0

<Psim > total r + r nonorm


Psim
total
= sim ( w )d w
0
P

<|Eimp|2> total +
2 r 2 cwnorm
s ( w ) Eimp ( w ) d w
r 2 0
Eimp = +
total 2
s( w )
0
dw

<|Himp|2> total +
2 r 2 cwnorm
s ( w ) H imp ( w ) d w
r 2 0
H imp = +
total 2
s( w )
0
dw

2 r
<Pimp> total + cwnorm
s ( w ) Pimp ( w )d w
r 0
Pimp = +
total
2
s( w )
0
dw

s(w) 1 N/A
s( w ) = exp (i wt )s j (t )dt
N sources
, where s j(t) is the source time
signal of the jth source and N is the number of active sources in the
simulation volume

Total spectral averaging can be turned on by selecting total spectral average as shown in the screenshot below.

To see the data available in a monitor, use the script command


?getdata 1646 ("monitorname");
All data can be obtained in scripting, with commands such as getdata 1646 and transmission_avg 1597 . The available
components for total spectral averaging are shown in the following table.

Quantity Data name Example script command

2003 - 2016 Lumerical Solutions, Inc


122 Lumerical Knowledge Base

<|Ex sim |2> total E2x_avg nonorm;


E2x = getdata("monitor1","E2x_avg");
<|Ey sim |2> total E2y_avg nonorm;
E2y = getdata("monitor1","E2y_avg");
<|Ez sim |2> total E2z_avg nonorm;
E2z = getdata("monitor1","E2z_avg");
<|Hx sim |2> total H2x_avg nonorm;
H2x = getdata("monitor1","H2x_avg");
<|Hy sim )|2> total H2y_avg nonorm;
H2y = getdata("monitor1","H2y_avg");
<|Hz sim )|2> total H2z_avg nonorm;
H2z = getdata("monitor1","H2z_avg");
<Px sim > total Px_avg nonorm;
Px = getdata("monitor1","Px_avg");
<Py sim > total Py_avg nonorm;
Py = getdata("monitor1","Py_avg");
<Pz sim > total Pz_avg nonorm;
Pz = getdata("monitor1","Pz_avg");
<|Ex imp|2> total E2x_avg cwnorm;
E2x = getdata("monitor1","E2x_avg");
<|Ey imp|2> total E2y_avg cwnorm;
E2y = getdata("monitor1","E2y_avg");
<|Ez imp|2> total E2z_avg cwnorm;
E2z = getdata("monitor1","E2z_avg");
<|Hx imp|2> total H2x_avg cwnorm;
H2x = getdata("monitor1","H2x_avg");
<|Hy imp|2> total H2y_avg cwnorm;
H2y = getdata("monitor1","H2y_avg");
<|Hz imp|2> total H2z_avg cwnorm;
H2z = getdata("monitor1","H2z_avg");
<Px imp> total Px_avg cwnorm;
Px = getdata("monitor1","Px_avg");
<Py imp> total Py_avg cwnorm;
Py = getdata("monitor1","Py_avg");
<Pz imp> total Pz_avg cwnorm;
Pz = getdata("monitor1","Pz_avg");

Partial spectral averaging


FDTD Solutions/Propagator supports a spectral average that uses a Lorentzian weighting function multiplied by the
source spectrum. Partial spectral averaging is useful to extract the average response of the system to a variety of
different illumination conditions from a single simulation. The following table gives the precise definitions of the
quantities available using partial spectral averaging.

Quantity Definition Normalization state

<|Esim (w)|2> partial r 2


+
2 r 2 nonorm
Esim ( w ) = h( w , w ' ) Esim ( w ' ) d w '
partial -

2003 - 2016 Lumerical Solutions, Inc


Solvers 123

<|Hsim (w)|2> partial r 2


+
2 r 2 nonorm
H sim ( w ) = h( w , w ' ) H sim ( w ' ) d w '
partial -

<Psim (w)> partial r nonorm


2 r
+
2
Psim ( w ) = h( w , w ' ) Psim ( w ' )d w '
partial -

<|Eimp(w)|2> partial +
2 2 r 2 cwnorm
h( w , w ' ) s ( w ' ) Eimp ( w ' ) d w '
r 2
-
Eimp ( w ) = +
partial 2 2
h( w , w ' )
-
s( w ' ) d w '

<|Himp(w)|2> partial +
2 2 r 2 cwnorm
h( w , w ' ) s ( w ' ) H imp ( w ' ) d w '
r 2
-
H imp ( w ) = +
partial 2 2
h( w , w ' )
-
s( w ' ) d w '

2 r
<Pimp(w)> partial + cwnorm
2
h( w , w ' ) s ( w ' ) Pimp ( w ' )d w '
r -
Pimp ( w ) = +
partial
2 2
h( w , w ' )
-
s( w ' ) d w '

|h(w,w')|2 2 d N/A
hi ( w , w ' ) =
( w - w ' ) 2 + ( pd ) 2
2
h( w , w ' ) d w' = 1

s(w) 1 N/A
s( w ) = exp (i wt )s j (t )dt
N sources
, where s j(t) is the source time
signal of the jth source and N is the number of active sources in the
simulation volume

Partial spectral averaging can be turned on by selecting partial spectral average as shown in the screenshot below.

The FWHM of |h(f,f')|2 is called d, and can be modified as shown below.

2003 - 2016 Lumerical Solutions, Inc


124 Lumerical Knowledge Base

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


?getdata 1646 ("monitorname");
All data can be obtained in scripting, with commands such as getdata 1646 and transmission_pavg 1597 . The available
components for total spectral averaging are shown in the following table.

Quantity Data name Example script command

<|Ex sim (w)|2> partial E2x_pavg nonorm;


E2x = getdata("monitor1","E2x_pavg");
<|Ey sim (w)|2> partial E2y_pavg nonorm;
E2y = getdata("monitor1","E2y_pavg");
<|Ez sim (w)|2> partial E2z_pavg nonorm;
E2z = getdata("monitor1","E2z_pavg");
<|Hx sim (w)|2> partial H2x_pavg nonorm;
H2x = getdata("monitor1","H2x_pavg");
<|Hy sim (w)|2> partial H2y_pavg nonorm;
H2y = getdata("monitor1","H2y_pavg");
<|Hz sim (w)|2> partial H2z_pavg nonorm;
H2z = getdata("monitor1","H2z_pavg");
<Px sim (w)> partial Px_pavg nonorm;
Px = getdata("monitor1","Px_pavg");
<Py sim (w)> partial Py_pavg nonorm;
Py = getdata("monitor1","Py_pavg");
<Pz sim (w)> partial Pz_pavg nonorm;
Pz = getdata("monitor1","Pz_pavg");
<|Ex imp(w)|2> partial E2x_pavg cwnorm;
E2x = getdata("monitor1","E2x_pavg");
<|Ey imp(w)|2> partial E2y_pavg cwnorm;
E2y = getdata("monitor1","E2y_pavg");
<|Ez imp(w)|2> partial E2z_pavg cwnorm;
E2z = getdata("monitor1","E2z_pavg");
<|Hx imp(w)|2> partial H2x_pavg cwnorm;
H2x = getdata("monitor1","H2x_pavg");
<|Hy imp(w)|2> partial H2y_pavg cwnorm;
H2y = getdata("monitor1","H2y_pavg");
<|Hz imp(w)|2> partial H2z_pavg cwnorm;
H2z = getdata("monitor1","H2z_pavg");
<Px imp(w)> partial Px_pavg cwnorm;
Px = getdata("monitor1","Px_pavg");

2003 - 2016 Lumerical Solutions, Inc


Solvers 125

<Py imp(w)> partial Py_pavg cwnorm;


Py = getdata("monitor1","Py_pavg");
<Pz imp(w)> partial Pz_pavg cwnorm;
Pz = getdata("monitor1","Pz_pavg");

3.1.5.3 Parseval's theorem - Energy conservation

Objective
Parseval's theorem refers to that information is not lost in Fourier transform. In this example, we verify Parseval's
theorem by evaluating the energy carried by a short pulse both in the time and frequency domain, which is basically
energy conservation. In this example, we employ the "power" rawdata returned by both planar time and frequency
monitor for calculation.

Note: Energy conservation - nonorm state


This example only applies to the nonom state. In nonorm, the source is a pulse by default. The pulse carries a
finite amount of energy, in Joule. If there is no loss in Fourier transform, the amount of energy has to be exactly
the same in time and frequency domain. Unlike a CW source, the amount of energy accumulated is a function of
time. This example does not apply when CWnorm is on.

Associated files
Parsevals_theorem.fsp
Parsevals_theorem.lsf

See also
Units and normalization 116
Frequency domain normalization 119
CW normalization 618
Integrating the Poynting vector 865

2 2
e(t ) dt = E ( f ) df
- -

Suppose that e(t) and E(f) are the fields in the time and frequency domain respectively, where E(f) is obtained by the
fourier transform of e(t). According to Parseval's theorem, the following equation holds,

2 2
e(t ) dt = E ( f ) df
- -

For a simple plane wave, the Poynting vector is directly proportional to abs(E)^2, where E is the electric field. This
relation holds in both time and frequency domain. For a short pulse in the nonorm state (without time averaging),

e0 2
Power _ time(t ) = real (Poynting ^ (t )) dS = n e(t ) dS
m0

2003 - 2016 Lumerical Solutions, Inc


126 Lumerical Knowledge Base

e0 2
Energy _ spectrum( f ) = real (Poynting ^ ( f )) dS = n E( f ) dS
m0

In order words, for the same area dS, the theorem can be written as a form of conservation of energy. Note that
Energy_spectrum(f) has a unit of Watt/Hz^2, while power_time(t) has a unit of Watt.


Energy = power (t )dt = Energy _ spectrum( f )df
- -

To verify the above equation, a simple simulation with a plane wave and planar monitors (both time and frequency) is
performed in the nonorm state. Download the above associated files and run the script. The script contains two
parts: 1) the "power" returned by the monitors and 2) Poynting vector integration.

First, it extracts the "power" recorded by the time and frequency monitor accordingly. The reason for this step is
because the returned "power" is not computational expensive since it's just a 1D vector. One can integrate
power_time(t) and energy_spectrum(f) to calculate the amount of energy carried by a pulse, in Joule. Note that, the
"power" returned by the time monitor is the instantaneous power, while the "power" returned by the frequency
monitor is the time averaged power (therefore needs a factor of 2 to compensate the 0.5 set by default, see the
sourcepower 1601 command). The sourcepower command is also used for comparison, where another factor of 2 is
introduced from the integration of the negative frequencies due to Fourier transform.

By integrating the area under the above curves,


Ratio of energy_time to energy_f = 1.00111
Ratio of energy_time to energy_f_sourcepower = 0.99886

Second, an integration of Poynting vector is performed. Note that, this step could be quite computational expensive
since the field data is usually a 3D matrix, especially the time domain data. Pz is used to calculate power in the
both domains, using the above equation.

Ratio of energy_time_manual to energy_f_manual = 1.00111

This is an example to show that the time and frequency domain monitors record the same data without losing
information during Fourier transform.

3.2 Optical toolbox


3.2.1 Near to far field projections
Introduction
The near to far field projections calculate the EM fields anywhere in the far field. The near field data is obtained from
one of Lumerical's optical solvers, then the far field projection is calculated as a post-processing step.

2003 - 2016 Lumerical Solutions, Inc


Solvers 127

A simple way to understand far field projections is to view them as a decomposition of the near field data using a set
of plane waves propagating at different angles as the basis for the decomposition. The end result is that the far field
projections functions provide a straightforward and numerically efficient method for calculating the EM fields
anywhere in the intermediate and far field regions.

If your structure is periodic, see the Grating projections 150 toolbox feature page.

In this topic
Simple example 130
Direction unit vector coordinates 132
Far field filtering 134
Field polarization 136
Magnetic fields 140
Periodic structures 142
Power integration on hemisphere 145
Creating line plots 146
Projection distance scaling 148
Changing the far field index 814
Far field analysis objects 813
Associated files
solver_far_field_dvd.fsp

See also
Grating projections 150 toolbox
Far field projection 1657 script functions
Far field projection
Related publications
Allen Taflove, Computational
Electromagnetics: The Finite-Difference Time-
Domain Method. Boston: Artech House,
(2005).

Example
The example below shows how the far field projection can be used to see the angular distribution of reflected light
from a DVD surface. The light is reflected off a "bump" on the DVD surface from a focused beam that is slightly
misaligned with the track. The FDTD simulation runs in the time domain and a movie shows how the fields
interact with the defect (bump). The reflected light is recorded in the near field approximately 50 nm above the
surface by a frequency monitor that performs a running Fourier transform to collect the CW response at 650 nm.
After the simulation is complete, the far field projection is used to propagate the reflected radiation to a
hemisphere at a distance of 1 m. The final result is an image of the field intensity on the hemisphere, as viewed
from above. The effects of the misalignment of the spot can clearly be seen.

Near field simulation results Results in far field

Hemispherical surface where far field is


calculated (1m radius)

2003 - 2016 Lumerical Solutions, Inc


128 Lumerical Knowledge Base

Screenshot of simulation

View of hemisphere, looking down

Reflected near field |E|^2 data on XY plane above


structure

Far field |E|^2 on hemisphere

Understanding when far field projections can be used


Requirements:
The EM fields must be known everywhere on a plane or on a closed surface.
The plane or closed surface must be in a single homogeneous material.
The material must extend out to infinity. There can be no additional structures (or sources) beyond this plane or
closed surface.
The far field projection functions assume that the EM fields are zero beyond the edge of the monitor. This
effectively truncates the near fields at the monitor edge.
The material can not be absorbing or dispersive.

There are two types of situations where these conditions are satisfied:

2003 - 2016 Lumerical Solutions, Inc


Solvers 129

Case 1 - fields known on a plane Case 2 - fields known on a closed surface


When fields are known on a single surface, the When the fields are known on a closed surface, the
projection functions can be used to calculate the fields projection functions can be used to calculate the fields
anywhere beyond that surface. In the above anywhere beyond that surface. In the above
screenshot, a monitor is located above the source. screenshot, a monitor surrounds the source and
This monitor records all of the reflected fields. There scattering particle. The monitor box records all
are no additional structures or sources of light above reflected fields. There are no additional structures or
the source. In this situation, the far field projections sources of light above the source. In this situation, the
can be used to calculate the EM fields anywhere above far field projections can be used to calculate the EM
the monitor plane. fields anywhere outside of the monitor box. See far field
from a box 817 analysis group for details.
Note: In the above example, the monitor has a finite
width (eg. 5um), but in principle the far field projections Only the farfieldexact, farfieldexact2d
need to know the fields everywhere on a plane and farfieldexact3d commands allow projections
extending to +/- infinity. The projection functions from multiple monitors added to create a total far field
assume the fields are zero everywhere beyond the projection.
edge of the monitor. This assumption is only accurate
when the monitor is wide enough to record most of the
light that is propagating into the far field. Using a
monitor that is too narrow will lead to errors in the far
field data. See the Far field filter 134 page for more
information.

Additional resources
Simple far field example 130
Direction unit vector coordinates 132

Far field filtering 134

2003 - 2016 Lumerical Solutions, Inc


130 Lumerical Knowledge Base

Field polarization 136


Magnetic fields 140
Periodic structures 142
Power integration on hemisphere 145
Creating line plots 146
Projection distance scaling 148
Changing the far field index (Analysis object) 814

3.2.1.1 Far field projections - Simple example


Objective
We will calculate the far field distribution of a Gaussian beam propagating at 30 degrees to the z-axis with an
azimuthal angle of 15 degrees from a near field FDTD simulation.

Note: The descriptions and examples of the far field projection calculation on the following pages are primarily
intended for users of FDTD Solutions. For users interested in calculating far field projections with MODE Solutions,
these descriptions are basically still correct, although some subtle differences do exist. For more information and
examples on far field projections in MODE Solutions, please contact support@lumerical.com.

Associated files
solver_far_field.fsp
solver_far_field.lsf

See also
Far field projection 1657 script functions
Grating projections 150 toolbox

The simulation file is a simple simulation with a Gaussian source propagating at 30 degrees to the z-axis with an
azimuthal angle of 15 degrees.

2003 - 2016 Lumerical Solutions, Inc


Solvers 131

After running the simulation, right click on the monitor 'z2' and select Visualize Far field. The following window will
appear. Notice that you can choose to visualize the far field intensity E2 (that is |E|2), or the complex vector field
components Es and Ep.

2003 - 2016 Lumerical Solutions, Inc


132 Lumerical Knowledge Base

It is also possible to calculate the far field with a few script commands. The script file will perform a projection to the
far field using the farfield3d function, which returns |E|2. The plot that is created is shown below. This plot represents
the electric field intensity (|E|2) on a hemisphere of radius R = 1m for z > 0.

Note: To obtain the far field vector components in spherical coordinates, use the farfieldpolar3d script function. Es
corresponds to Ephi (Ez in 2D), while Ep corresponds to Etheta.
Note: The projection direction is automatically determined by the direction of net power flow through the monitor.

As we expect, the Gaussian beam is propagating at 30 degrees to the z axis with an azimuthal angle of
approximately 15 degrees.

3.2.1.2 Far field projections - Direction unit vector coordinates


Objective
This section describes the direction unit vector coordinates used by far field projections and grating projections.

Associated files
solver_far_field.fsp
solver_far_field.lsf

See also
Far field projection 1657 script functions

2003 - 2016 Lumerical Solutions, Inc


Solvers 133

The standard 3D far field and


grating projection functions
calculate the far field profile on a
hemispherical surface 1 meter
from the simulation.

Calculating the field profile on a


hemispherical surface creates a
minor issue when we try to plot
the data on a flat computer
screen. The data must be
'flattened' in some way so that we
can represent a curved surface on
a flat computer screen. By default
we plot the far field data as if we
look straight down on the
hemisphere.
The position vectors u1, u2 of the
data returned by the far field
projections use 'direction unit
vector' coordinates. Each unit
vector goes from -1 to 1 as shown
in the figure to the right.

The far field is calculated at a


linearly spaced set of points as
measured in the u1, u2 direction
unit vector coordinates.

The point u1,u2 = 0,0 corresponds


to propagation at normal
incidence, in the middle of the
hemisphere.

Coordinate transformations between spherical and direction cosine units are described below.
Coordinate limits and units
radius 0<r m
polar angl e 0 rad
azimuthal angle 0 2 rad
unit vector -1 u 1

Spherical to direction cosine


u x = sin( q ) cos( j )
u y = sin( q ) sin( j )
u z = cos( q )
Generalized diagram
uz = 1 - u x2 - u 2y

u x2 + u 2y + u z2 = 1

2003 - 2016 Lumerical Solutions, Inc


134 Lumerical Knowledge Base

Direction cosine to spherical


r =1
q = a cos(u z )
uy
j = a tan( )
ux

Note: farfieldspherical
The farfieldspherical function can be used to
interpolate far field data from ux,uy coordinates to
spherical coordinates. Specific exam ple: The m onitor is in the X-Y
plane. The direction of propagation is
prim arily in the Z direction.

Note on performing integrals


We typically want to perform integrals in spherical coordinates such as the following
2
power = P ( q , j ) R sin( q )d qd j
where P is the Poynting vector and R is the radius. The far field projections 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. When changing integration
variables from (q,j) to (ux ,uy ), it can be shown that

power = P( q , j ) R 2 sin (q )d qd j
du x du y
= P(u x , u y ) R 2
cos(q )
Care must be taken to avoid numerical errors due to the cos(q) term. It's best to use the
farfield3dintegrate function to evaluate these integrals.

3.2.1.3 Far field projections - Spatial filtering


Objective
This section describes the far field spatial filtering option.

Note: The descriptions and examples of the far field projection calculation on the following pages are primarily
intended for users of FDTD Solutions. For users interested in calculating far field projections with MODE Solutions,
these descriptions are basically still correct, although some subtle differences do exist. For more information and
examples on far field projections in MODE Solutions, please contact support@lumerical.com.

2003 - 2016 Lumerical Solutions, Inc


Solvers 135

Associated files
solver_far_field_filter.fsp
solver_far_field_filter.lsf

See also
farfieldfilter 1658 script function
Far field projection 1657 script functions

For far field projections to be accurate, all radiation that will propagate to the far field must pass through the monitor
being used for the projection. The far field projection functions assume that the EM fields are zero beyond the edge
of the monitor. This effectively truncates the near fields at the monitor edge.

In some cases, the monitor (and simulation region) would have to be impractically large to ensure that all of the
radiation passes through the monitor. One such simulation is the angular distribution of a dipole near an interface. To
reproduce these results, run the simulation file and then the script.

The blue line in the following figure shows the near field data just above the interface surface. The far field projection
functions will use this data to calculate the far field intensity. The important point to notice is that the near field data
is non-zero near the edge of the plot (red circles). It is obvious that the these near fields do not immediately go to
zero at x=8um, but that is what the far field projections assume.

This truncation will lead to high frequency ripple in the far field projection data. The far field filter option allows us to
apply a spatial filter to the near field data (shown in green). When the fields go more smoothly to zero, the high

2003 - 2016 Lumerical Solutions, Inc


136 Lumerical Knowledge Base

frequency ripple is removed from the projection. Both projections are shown below. Change the far field filter setting
in the script file to reproduce each of these results.

farfieldfilter(0); farfieldfilter(1);

It is important to realize that the far field filter does not make the projection more accurate. The filter simply removes
high frequency ripple caused by the field truncation. To increase the accuracy, the monitor (and simulation region)
must be made wider, so the monitor can record more of the fields that will eventually propagate to the far field.

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. The filter parameter defines the width of the filter by the
following formula: = (a)/(a+b).

Note: Periodic structures - far field filter


The far field filter option should not be used for periodic structures. Set it to zero when using the 'assume periodic'
option.

3.2.1.4 Far field projections - Field polarization


Objective
This section discusses how to obtain and understand the vector field components and polarization of far field
projections.

Note: The descriptions and examples of the far field projection calculation on the following pages are primarily

2003 - 2016 Lumerical Solutions, Inc


Solvers 137

intended for users of FDTD Solutions. For users interested in calculating far field projections with MODE Solutions,
these descriptions are basically still correct, although some subtle differences do exist. For more information and
examples on far field projections in MODE Solutions, please contact support@lumerical.com.

Associated files
solver_far_field.fsp
solver_far_field.lsf

See also
Far field projection 1657 script functions

We will continue to study the far field example file described in Simple example 130 .

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 this section, we will focus on the script commands farfieldvector3d
and farfieldpolar3d. The concepts dealt with here can also be applied to the two dimensional commands
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

The script file performs a projection in both coordinate systems. The results are shown below

farfieldvector3d farfieldpolar3d
Ex Er

2003 - 2016 Lumerical Solutions, Inc


138 Lumerical Knowledge Base

Ey Eq

Ez Ej

The results in spherical coordinates are the easiest to interpret. Er is 15 orders of magnitude smaller than the other
components. We expect that Er should be zero because in the far field the electric field is perpendicular to the

2003 - 2016 Lumerical Solutions, Inc


Solvers 139

direction of propagation. The small non-zero terms are due to numerical rounding error on double precision numbers.
The polarization of the original source is P polarized. Therefore we expect that at the center of the beam, Ej is zero
and this is clearly the case on the image plots above. Due to the diffraction of the gaussian beam Ej is non zero
when the azimuthal angle is different than 15 degrees.

To see the effect of changing to S polarization, modify the property "polarization angle" to 90 degrees from 0, see
the polarization angle 521 definition

After re-running the FDTD Simulation, run the script file again. A comparison of the two source polarizations is
shown below. We can see the expected result that at the beam center there is only an Eq component when the
source is P polarized, but only an Ej component when the source is S polarized.

P polarized source (polarization angle = 0 degree) S polarized source (polarization angle = 90 degree)
Eq Eq

Ej Ej

2003 - 2016 Lumerical Solutions, Inc


140 Lumerical Knowledge Base

3.2.1.5 Far field projections - Magnetic fields


Objective
This section discusses how to obtain the H field components of far field projections.

Associated files
solver_far_field_magnetic.fsp
solver_far_field_magnetic.lsf

See also
Far field projection 1657 script functions

Related publications
B. Wang and G. P. Wang, "Directional beaming of
light from a nanoslit surrounded by metallic
heterostructures," Appl. Phys. Lett. 88, 013114
(2006)

Calculating |H|^2 in the far field


2 e0 2
2 H = n2 E
H m0
To calculate in the far field, you can simply use the relation

Calculating H in the intermediate and far field


We use the farfieldexact script commands to calculate the components of the electric field at any specific point in
the farfield. In this example (based on the nanoslit device shown in Wang et. al.), we can calculate the E field
intensity on top of the device to analyze the focusing properties of this nanoslit structure. This is done using the
following script commands:

# define desired region of x and y


x = linspace(-5e-6,5e-6,200);
y = linspace(1e-6,50e-6,500);

# do far field projection

2003 - 2016 Lumerical Solutions, Inc


Solvers 141

E2 = farfieldexact2d('monitor1',x,y);
E2 = sum(abs(E2)^2,3); # calculate E2 from Ex, Ey, Ez

# plot E field intensity profile as a function of x,y


image(x*1e6,y*1e6,E2,'x (microns)','y (microns)','E field intensity');

Next, we can calculate the H fields numerically from the E fields using Maxwell's equation:

E z E y
- = i wm 0 H x
y z
E x E z
- = i wm 0 H y
z x
E y E x
- = i wm 0 H z
x y
For example, in the attached script, Hz is calculated using the following script commands:

delta = 1e-9; # used to calculate the numerical derivative;


f = getdata("T","f");

Ey1 = pinch(farfieldexact2d("T",x-delta,y),3,2);
Ey2 = pinch(farfieldexact2d("T",x+delta,y),3,2);
Ex1 = pinch(farfieldexact2d("T",x,y-delta),3,1);
Ex2 = pinch(farfieldexact2d("T",x,y+delta),3,1);
dEy_dx = (Ey2-Ey1)/(2*delta);
dEx_dy = (Ex2-Ex1)/(2*delta);
Hz = (dEy_dx - dEx_dy) / (1i * 2* pi * f * mu0);

# plot H field intensity profile as a function of x,y


image(x*1e6,y*1e6,abs(Hz)^2,"x (um)","y (um)","Hz");

2003 - 2016 Lumerical Solutions, Inc


142 Lumerical Knowledge Base

3.2.1.6 Far field projections - Periodic structures


Objective
This section describes the "Assume structure is periodic" options of the far field projections tab.

As discussed in previous sections, far field projections are typically used for isolated structures rather than periodic
arrays. However, it is possible to use the projection functions to calculate the approximate far field distribution of
finite sized periodic arrays. For infinitely periodic structures, the grating functions should be used.

Note: The descriptions and examples of the far field projection calculation on the following pages are primarily
intended for users of FDTD Solutions. For users interested in calculating far field projections with MODE Solutions,
these descriptions are basically still correct, although some subtle differences do exist. For more information and
examples on far field projections in MODE Solutions, please contact support@lumerical.com.

Associated files
solver_far_field_periodic.fsp

See also
Far field projection 1657 script functions
Grating projections 150 toolbox
Far field from periodic structures 152

Non-periodic projection
By default, the far field functions assume that the near fields are zero beyond the monitor boundary (as discussed in
the Far field filtering 134 section). This occurs even when using periodic boundary conditions. Physically, this acts
like an aperture placed over the structure, only allowing radiation from one period of the structure to propagate to the

2003 - 2016 Lumerical Solutions, Inc


Solvers 143

far field. The aperture causes strong diffraction, which tends to make these projections not very useful.

See the image below. To simulate an infinite plane wave source (red) incident on a periodic array of structures
(blue), we model a single period (orange) by using periodic boundary conditions. The default far field projection gives
the far field distribution (yellow) from a single period. It is as if an aperture (black) only allows light from one period to
propagate to the far field.

The final result is simply the projection from a single period:


r r
E far = E0far

The following figure shows the reflected far field |E|^2 distribution from the FDTD Blaze grating application example
when using the default far field projection settings. To reproduce this figure, run blaze_grating.fsp which you
can download from FDTD Blaze grating example page. Using the Analysis window to plot the far field projection of
the reflection monitor. Don't select the 'assume periodic' option.

For structures with a finite number of periods, there are two cases:
The device is uniformly illuminated by the source. In other words, the source beam is much larger than the finite
sized device. Top hat illumination is appropriate for this case.
The device is much larger than the source beam. In this case, the source is only illuminating a portion of the
device and Gaussian illumination should be used.

Top hat illumination


You will notice that as the number of periods is increased, the far field distributions will become sharper. Diffraction
effects are lessened when more periods are included.

2003 - 2016 Lumerical Solutions, Inc


144 Lumerical Knowledge Base

The final result is the phase correct sum of m periods, where k bloch=0 for normal incidence,

r r 2 i (kinplane - kbloch )ma


E far = E0far e
m-2
If we calculate the far field projection of the blaze structure assuming 10 periods with top hat illumination, notice how
the features become sharper than the single period illumination. More periods will make the features even sharper.

Gaussian illumination
The difference between Top hat and Gaussian illumination tends to be small. Projections using Gaussian
illumination are smoother because the Gaussian weighting function is smoother than the top hat function.

The final result is the phase correct sum of m periods with a Gaussian weighting, where k bloch=0 for normal
incidence,
2

m

r r i (k -k )ma -
inplane bloch 5 / 2

E far = E0far e
m = -
e

The Gaussian illumination projection looks very similar to the top hat illumination.

2003 - 2016 Lumerical Solutions, Inc


Solvers 145

Infinite periodic structures


As the number of periods is increased, the sharp features in the above figures become delta functions. When
studying true gratings, you should consider using the grating projection 150 functions, rather than the far field
projections.

Note: Periodic structures - far field filter


The far field filter option should not be used for periodic structures. Set it to zero when using the 'assume periodic'
option.

3.2.1.7 Far field projections - Power integration on hemisphere


Objective
The section explains how to integrate the far fields on the default hemispherical surface. This is typically done to
calculate the amount of far field power within some range of angles.
Note: The descriptions and examples of the far field projection calculation on the following pages are primarily
intended for users of FDTD Solutions. For users interested in calculating far field projections with MODE Solutions,
these descriptions are basically still correct, although some subtle differences do exist. For more information and
examples on far field projections in MODE Solutions, please contact support@lumerical.com.

Associated files
solver_far_field.fsp
solver_far_field.lsf

See also
Far field projection 1657 script functions

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.

2003 - 2016 Lumerical Solutions, Inc


146 Lumerical Knowledge Base

r2
E
cone
far _ field _ fraction = r2
E
hemisphere

Power _ norm = far _ field _ fraction * near _ field _ power _ transmissi on


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, it is easy to calculate the normal component of the
Poynting vector directly from the Electric fields by using the plane wave relationships between E and H. We
know the tangential components the Poynting vector are zero for a plane wave.
e0 r 2
Poynting ^ = n E
m0
1
Power = real (Poynting ^ )
2 cone
Power
Power _ norm =
SourcePower

Both methods will give the same result.

The script file will calculate the normalized power in a given cone around the z-axis defined by a half-angle. It will do
the calculation by both methods described above. The desired half angle can be set in the first executed line of the
script file
# choose the half angle over which we will integrate
half_angle = 30; #in degrees

We expect that using a half angle of 30 degrees will account for 50% of the power. When we run with 30 degrees,
we find have the following output
> solver_far_field2;
The half angle is: 30 degrees at (theta,phi)=(0,0)
The normalized transmission by Method 1 is: 45.6613 %
The normalized transmission by Method 2 is: 44.5107 %

If we try several angles we find that


Cone half angle (degrees) Normalized transmission in cone Normalized transmission in cone
by method 1 (%) by method 2 (%)
29 38.4055 37.4377
30 45.6613 44.5107
31 54.7707 53.3905

As expected, we find that half the power is radiated within a half-angle cone of 30 degrees around the z-axis.

NOTE: Far field integration


The function farfield3dintegrate makes integrating far field data very easy.

NOTE: Integration with non-default far field refractive index.


Additional normalization is required when using a non-default far field refractive index. See the far field refractive
index page or contact Lumerical support for additional information.

3.2.1.8 Far field projections - Creating line plots


Objective
This section shows how to obtain line plots of 2D far field projection data.

Note: The descriptions and examples of the far field projection calculation on the following pages are primarily

2003 - 2016 Lumerical Solutions, Inc


Solvers 147

intended for users of FDTD Solutions. For users interested in calculating far field projections with MODE Solutions,
these descriptions are basically still correct, although some subtle differences do exist. For more information and
examples on far field projections in MODE Solutions, please contact support@lumerical.com.

Associated files
solver_far_field.fsp
solver_far_field.lsf

See also
farfieldspherical 1663 script function
Direction unit vector coordinates 132
Far field projection 1657 script functions

The farfield3d functions generally returns the far field projection as a 2D function of ux and uy. This is shown in
figure 1 below. Often we want to create a line plot of this data at a specific value of theta or phi, such as the lines
marked in red on the following figure. The associated script shows how to use the farfieldspherical script
function to interpolate the standard farfield data to an arbitrary location defined by theta/phi.

polar image plot of E^2 Line plot of E^2 vs theta at phi=0.

2003 - 2016 Lumerical Solutions, Inc


148 Lumerical Knowledge Base

Line plot of E^2 vs theta at phi=15. Line plot of E^2 vs phi at theta=30.

3.2.1.9 Far field projections - Projection distance scaling

Objective
This section describes how to rescale far field projections to distances other than the default of 1m. It also
describes how to use the farfieldexact functions to calculate the field distribution at arbitrary positions,
including the so called intermediate field (beyond the simulation region boundary, but not yet the far field).

Note: The descriptions and examples of the far field projection calculation on the following pages are primarily
intended for users of FDTD Solutions. For users interested in calculating far field projections with MODE Solutions,
these descriptions are basically still correct, although some subtle differences do exist. For more information and
examples on far field projections in MODE Solutions, please contact support@lumerical.com.

Associated files
solver_far_field.fsp
solver_far_field.lsf

See also
Far field projection 1657 script functions

The script file first calculates the standard far field distribution. Rather than calculating the distribution on the entire
hemisphere, we only get one line at y=0. This data is calculated with both the farfield3d and
farfieldexact3d functions. As the following figure shows, both functions return the same result for the field
distribution on a hemisphere with a radius of 1m.

2003 - 2016 Lumerical Solutions, Inc


Solvers 149

In most cases, the standard projection location is sufficient. However, if you wish to know the field amplitude at a
different distance (such as a hemisphere with a radius of 1mm), we recognize that the E and |E|^2 scale as shown in
the following table. This formula is valid anywhere in the far field.

Electric field scaling Electric field intensity scaling


2D
r r r 2
E ( R) = E0 / R r 2 E (1)
E (r ) =
r

3D
r r r 2
E ( R) = E0 / R r 2 E (1)
E (r ) =
r2

Projections to the intermediate field


If you want to calculate the field distribution quite close to the structures (the intermediate field), then the
farfieldexact functions must be used. The intermediate field is the region close to the structure where the
fields are not yet propagating like simple plane waves. The farfieldexact functions are able to calculate the
field distribution in the far field or intermediate field (to within a few wavelengths of the simulation region).

For example, suppose we wish to know the fields on an a hemisphere with a radius of 10um. One approach (blue
line in following figure) might be to simply scale the fields by a factor of (1m/10um)^2. This is NOT correct because
10um is not far enough to be considered as the far field. The EM fields are not yet propagating like simple plane
waves. The correct approach is to use the farfieldexact3d function (green line).

2003 - 2016 Lumerical Solutions, Inc


150 Lumerical Knowledge Base

As you can see, the two calculations do not give the same results. The blue line is not quite correct because
rescaling the far field distribution is not correct in the intermediate field.

Note: Projections to
surfaces other than
hemispheres
Use the farfieldexact
functions when you want the field
distribution on a surface other than
a hemisphere. The following figure
shows the field intensity along a
straight line for x=-20:20um at
y=0um, z=10um.

3.2.2 Grating projections


Introduction
The near to far Grating projections calculate the far field profile from a periodic grating structure. The near field data
is typically obtained from one of Lumerical's optical solvers. The far field is then calculated as a post-processing
step.

A simple way to understand far field projections is to view them as a decomposition of the near field data using a set
of plane waves propagating at different angles as the basis for the decomposition. The end result is that the far field
projections functions provide a straightforward and numerically efficient method for calculating the EM fields
anywhere in the intermediate and far field regions.

If your structure is not periodic, see the far field projection 126 toolbox feature page.

2003 - 2016 Lumerical Solutions, Inc


Solvers 151

See also
Far field projection 126 toolbox
Grating projection 1666 script functions
Far field projection video
Grating and far field analysis objects 813
Grating order transmission analysis object
1790

Related publications
Allen Taflove, Computational
Electromagnetics: The Finite-Difference Time-
Domain Method. Boston: Artech House,
(2005).

Grating physics
The grating functions are used to calculate the direction and intensity of light reflected or transmitted through a
periodic structure. For example, the grating order directions of a 2D grating can be calculated from the well known
grating equation
m l = a x (sin q m + sin qi )
For our purposes, it's more convenient to re-write this equation in terms of the wave vector k:
2p
(k m ) x = (kin ) x + m
ax
In 3D, these equations become:
2p
(k n, m ) x = (kin ) x + n
ax
2p
(k n, m ) y = (kin ) y + m
ay

where ax and ay are the grating periods in the x and y directions


respectively and (n,m) are any integers where the condition

| k n, m | k = 2 p o index / lo
is satisfied.

It's important to remember that the grating order directions are defined entirely by the device period, the source
wavelength and angle of incidence, and the background refractive index. In principle, the grating order directions can
be calculated without running a simulation. However, in practice, the simulation must first be meshed in order for
these functions to obtain necessary information such as the dimensions and period of the structure. The functions

2003 - 2016 Lumerical Solutions, Inc


152 Lumerical Knowledge Base

gratingn, gratingm, gratingu1, gratingu2 and gratingangle can be used to calculate the direction of
each order.

After running a simulation the grating commands can be used to calculate the fraction of power that is scattered
in each direction. The grating function uses a technique similar to a far field projection to calculate what fraction of
near field power propagates in each grating order direction. To get polarization and phase information, use
gratingpolar and gratingvector.

Additional resources
Direction unit vector coordinates 132 (in far field projections section)
Field polarization 136 (in far field projections section)
Magnetic fields 140 (in far field projections section)
Projection distance scaling 148 (in far field projections section)

3.2.2.1 Far field from periodic structures


In this example, we show how to decompose the transmitted or reflected fields of a periodic structure into plane
waves and propagate them an arbitrary distance through homogeneous material. We will compare the results of a
projection with a direct FDTD simulation of the same near field region, to demonstrate that this method can work well
even over small distances. In practice, the user would normally only simulate a small volume around the periodic
scattering structure.

This technique is useful in some lithography applications.

Associated files
solvers_propagate_periodic.fsp
solvers_propagate_periodic.lsf

See also
Lithography - projections to resist 1715

Setup
The example simulation file contains a thin film of gold on glass with a circular etch hole in it. The simulation volume
represents one unit cell of a periodic structure which has a period of 1.5 microns in both the x and y directions. The
source covers a wavelength range of 0.4 to 0.6 microns, and is polarized with the E field along the x-axis. We take
advantage of the symmetry of the structure to reduce the simulation volume to 1/4 of the unit cell.

Analysis
The script file uses the grating script commands to decompose the field recorded at the monitor called

2003 - 2016 Lumerical Solutions, Inc


Solvers 153

"transmission" onto a basis state of plane waves. The plane waves can then be propagated to any distance and
summed up to calculate the E field at any distance. In principle, this approach is straightforward, but in practice, it
can be somewhat complicated. It is important to test your analysis against known results to ensure there are no
mistakes in your analysis.

This summing is most conveniently done using the chirped z-transform, or czt, script function. There are a number of
amplitude and phase correction factors in the script that must be correctly taken into account, however, the idea of
the plane wave decomposition and is quite simple and involves 2 steps:

Step 1: The E field at the "transmission" monitor surface is decomposed into a sum of plane waves

E ( x, y, z0 ) = E n ,m exp( ik x ,n x +ik y ,m y )
n ,m

2n p
k x ,n =
ax
2m p
k y ,m =
ay

where kx,n and ky,m are the in-plane wave vectors associated with the (n,m) diffracted order and ax, ay are the x
and y periods respectively. The En,m coefficients are calculated using the gratingvector script command.

Step 2: The E field at any distance z can then be constructed simply by taking the sum

E ( x, y, z ) = E n ,m exp( ik x ,n x +ik y ,m y + ik z ,n ,m z )
n ,m

k z ,n ,m = k 2 - k x2,n - k y2,m

and this final sum is most easily accomplished uzing the czt script function.

Results
The script file propagate_periodic_test.lsf is used to test this projection method by comparing it to
simulated FDTD results. After running the file propagate_periodic.fsp, running the script file will generate the following
figures.

2003 - 2016 Lumerical Solutions, Inc


154 Lumerical Knowledge Base

The near field, w here it is recorded by the FDTD m onitor

The electric field intensity in the x-z plane for the first 10
m icrons of propagation, as calculated by the plane w ave
The electric field intensity in the x-z plane for the first 10
decom position and projection.
m icrons of propagation, as calculated by FDTD

2003 - 2016 Lumerical Solutions, Inc


Solvers 155

A com parison of the electric field intensity vs z at (x,y)=(0,0)

A com parison of the Ex vs z at (x,y)=(0,0)

We see that there is good agreement between the projected fields and the fields as calculated by FDTD. There is
some discrepancy which increases as the propagation distance increases. This difference is due to grid dispersion
(the speed of light on the FDTD mesh is slightly different than free space as well as being anisotropic) and therefore

2003 - 2016 Lumerical Solutions, Inc


156 Lumerical Knowledge Base

we can expect that the projected result is in fact more accurate for long propagation lengths. Here, we show a plot
based projection and post-processing, for up to 100 um. To obtain this plot below, set test=0 in
solvers_propagate_periodic.lsf and run the script.

3.2.3 Eigenmode propagate script command


Introduction
A unidirectional eigenmode expansion method is available via the propagate script command. This command
calculates the resulting output mode profile of an arbitrary input mode after it has propagated through a waveguide for
some distance. This is done by decomposing the input mode into modes supported by the waveguide (ie. the
currently calculated modes) using overlap integrals. Each supported mode is then propagated through the
waveguide. The resulting modes are then added coherently to give the final mode profile.

Toolbox physics
See the propagate 1609 script function for details.

3.2.4 Multilayer stack RT calculator


Introduction
The multilayer stack reflection & transmission script function calculates the reflection and transmission of a plane
wave through an arbitrary multi-layer stack using the analytic transfer matrix method. This function returns the
fraction of transmitted and reflected power (Ts, Tp, Rs, Rp), and the complex reflection and transmission coefficients
(ts, tp, rs, rp), for both S and P polarizations. The user must specify the angle of incidence and frequency range of
the illumination, as well as the thickness and refractive index of each layer.

2003 - 2016 Lumerical Solutions, Inc


Solvers 157

See also
stackrt 1504 script command
4 layer stack 1782 application example

3.3 DEVICE solvers


3.3.1 CHARGE
Introduction
The charge transport solver is a physics-based electrical simulation tool for semiconductor devices, which self-
consistently solves the system of equations describing the electrostatic potential (Poissons equation) and density
of free carriers (the drift-diffusion equations). The drift-diffusion model is an established and robust method that will
produce accurate results for a wide range of semiconductor devices under common operating conditions.

Video resources
DEVICE overview (YouTube.com)
DEVICE Introductory Webinar (lumerical.com)
More videos (lumerical.com)

Solver physics
Charge Transport Solver
This section will introduce the basic mathematical and physics formalism behind the self-consistent algorithm
used in DEVICE, starting from the non-linear Poisson and drift-diffusion equations. DEVICE solves the drift-
diffusion equations for electrons and holes (carriers)

J n = q mn n E + qDnn
J p = q m p p E - qDp p

where Jn,p is the current density (A/cm2), q is the positive electron charge, n,p is the mobility, E is the electric
field, Dn,p is the diffusivity, and n and p are the densities of the electrons and holes, respectively (the subscripts n
and p indicate quantities that are specific to the carrier type). Each carrier (electron or hole) moves under the
influence of two competing processes: drift due to the applied electric field, and random thermal diffusion due to
the gradient in the density. These processes are represented in the drift-diffusion equations as the sum of two
terms.

2003 - 2016 Lumerical Solutions, Inc


158 Lumerical Knowledge Base

The mobility n,p describes the ease with which carriers can move through the semiconductor material, and is
related to the diffusivity Dn,p through the Einstein relation,

k BT
Dn , p = m n , p
q

where k B is the Boltzmann constant. The mobility is a key property of the material, and may be modeled as a
function of temperature, impurity (doping) concentration, carrier concentration, and electric field. For further
details, please see the section on material models.

To solve the drift-diffusion equations, the electric field must be known. To determine the electric field, Poisson's
equation is solved:

- ( eV ) = q r

where is the dielectric permittivity, V the electrostatic potential


(E = -V ) and the net charge density,

r = p-n+C

which includes the contribution C from the ionized impurity density.

Finally, the auxiliary continuity equations are required to account for charge conservation

n 1
= J n - Rn
t q
p 1
= - J p - Rp
t q

where Rn,p is the net recombination rate (the difference between the recombination rate and generation rate). The
physical processes associated with the material are assumed to act equivalently when applied to electrons or
holes, and as a result, R = Rn = Rp. The recombination and generation processes are important factors in the
material-specific calculation of carrier behavior. Multiple recombination and generation processes are modeled,
which may depend on temperature, impurity (doping) concentration, carrier concentration, electric field, and
current density. For further details, please see the section on material models.

DEVICE discretizes and solves the drift-diffusion and Poissons equations on an unstructured finite-element mesh
in one and two dimensions. The simulation region is partitioned into multiple domains along boundaries between
materials with unique physical descriptions. The materials used in the simulation may be categorized as
insulators, semiconductors, or conductors; each type of material has an associated user-specified model or
collection of models that describe its behavior. In particular, specialized multi-coefficient models are provided for
semiconductors that describe the fundamental properties, mobility, and recombination processes inherent to that
material.

The system of equations solved by DEVICE admits both a steady-state and time-varying result. By enforcing the
condition

n p
= =0
t t

in the continuity equations, the carrier density and electrostatic potential can be solved at steady-state. Steady-
state simulations can be used to examine the systems behavior at a fixed operating point, and are also useful

2003 - 2016 Lumerical Solutions, Inc


Solvers 159

when extracting small-signal parameters for a component (e.g. for frequency response analysis). Alternately, by
specifying an initial condition for the carrier density and electrostatic potential, the equations can be solved in a
sequence of discrete times. The time-dependent behavior of the component can then be used to directly evaluate
its large-signal time-domain response or extract large-signal AC parameters.

Boundary conditions are very important in an accurate semiconductor device simulation. Two categories of
boundary condition are present in DEVICE: those that relate to the electrostatic potential (Poissons equation)
and those that relate to the carrier densities (the drift-diffusion equations). Poissons equation and the drift-
diffusion equations are second-order partial differential equations (PDE), and each requires that the solution be
explicitly specified for at least one location. This is known as a Dirichlet boundary condition. For the electrostatic
potential, the Dirichlet condition takes the form of a boundary (internal or external) with a fixed voltage specified,

V ( x) = V1

as is typical of an electrical contact. For the carrier densities, the majority carrier concentration is set to its
equilibrium value at the interface between a contact and the semiconductor, such that
p-n+C = 0

At internal boundaries between two domains that are not contacts, the boundary conditions are determined from
the physical properties of the interface. In the case of the electrostatic potential, the electric flux density must be
continuous across the boundary in the absence of a surface charge. For the electron and hole densities,
boundary conditions between the semiconductor and adjacent materials may be specified in terms of a surface
recombination current density, which will default to zero (no carrier flux across the boundary) for insulators or an
infinite recombination velocity (forcing the carrier density to its equilibrium value) for contacts. At the external
(open) boundaries of the simulation domain, homogenous Neumann boundary conditions are applied: the electric
field normal to the boundary is set to zero as is the surface recombination current density. Physically, this
corresponds to an insulating boundary across which no charge can flow.

Small Signal AC Analysis


Small signal AC analysis gives a frequency domain solution to the linearized charge transport equations (Poisson
and drift-diffusion). The DEVICE charge transport solver will find a self-consistent solution to the coupled, non-
linear system of equations.
q
- ( e r V ) - ( p - n + C ) = FV (V , n, p ) = 0
e0
n n
- + J n - R = - + Fn (V , n, p ) = 0
t t
p p
+Jp + R = + Fp (V , n, p ) = 0
t t

At steady-state, the time derivatives n / t and


p / t are zero, and solution
x = {V , n , p} is determined.

The function
FV ,n , p
can be expanded in a Taylor series around the operating point x with a perturbation ~
x e j wt (in

response to an applied perturbation


q = q + q~e j wt ) and truncated at first order, e.g.

2003 - 2016 Lumerical Solutions, Inc


160 Lumerical Knowledge Base

FV
FV ( x) = F V ( x ) + ( x - x ) + ...
x x
FV ~ FV ~ FV ~ j wt
F V (x) + ( V+ n+ p )e
V x n x p x

FV (x )
The steady-state residual is zero. Incorporating the time derivatives, we obtain the system of equations

FV ~ FV ~ FV ~ ~
V+ n+ p = qV
V x n x p x
F ~ F F
- j wn~ + n V + n n~ + n ~ p = q~n
V x n x p x
F ~ F F
j w~
p + p V + p n~ + p ~ p = q~p
V x n x p x

q~ =0 q~V
where we assume that the perturbations to the carrier densities at the terminals are zero ( n , p ) and
represents the applied small amplitude signal. This system of equations is solved for the (complex) small
~ ~p
amplitude responses V , n~ and .

The terminal currents are calculated as the sum of their components, including the displacement and carrier
currents. The small amplitude displacement current density is

~
J d = - j we V

The electron and hole currents are found by assuming a first-order expansion around the operating point,
e.g.

~ ~ j wt J J J
J n ( x )e = J n ( x) - J n ( x ) = [ n j~n + n j~p + n u~ ]e j wt
jn x jp x u x
The net currents are resolved as the integrated flux into the terminals.

The small signal analysis is a computationally effective way of resolving the frequency domain response of a
semiconductor device under conditions where the small amplitude/linear approximation is valid. For large signal
response when the behavior of the semiconductor device is non-linear, a full time domain simulation can be
performed.

Coupled Heat Charge Transport


To extend the charge transport solver to account for self-heating effects, the drift-diffusion equations are adapted
to account for the influence of a gradient in the temperature,

2003 - 2016 Lumerical Solutions, Inc


Solvers 161

J n = mn (qE n + kT )n + mn kTn
J p = m p (qE p + kT ) p + m p kTp

where
m is the carrier mobility, k is the Boltzmann constant,
q is the elementary charge, and where the
driving fields are described as

1 kT 3 kT 1 3 kT m *
E n = Ec - log N c + logT = Ec - log( n )
q q 2 q q 2 q m0
1 kT 3 kT 1 3 kT m *
E p = Ev - log N v - logT = Ev + log( p )
q q 2 q q 2 q m0

Ec Ev Nc Nv
In these equations, and are the conduction band and valence band energies, respectively; and
mn * mp *
are the electron and hole effective densities of states, respectively; and and are the electron and
m0
hole effective masses, respectively, scaled by the electron rest mass . An additional term is added when
Fermi-Dirac statistics are used. In the absence of a temperature gradient, these equations reduce to the classic
drift-diffusion equations.

In a coupled heat and charge transport (CHCT) simulation, the drift-diffusion equations defined above are solved
self-consistently with Poissons equation and the heat transport equation (see heat transport solver physics
description),

T
cp r - (kT ) = Q
t

where the applied heat


Q
(W/m3) is now generated from the combination of Joule heating from the carrier
currents and from carrier recombination:

Q = Qn + Q p + QR

In this description of heating,

Qn , p = J n , p E n , p
1
QR = ( E g + 3kT ) R
q

Eg R is the net recombination (recombination less generation).


where is the bandgap energy and

The boundary conditions for the heat transport equation are set by the temperatures at the contacts, which are
assumed to be constant and uniform. All other thermal boundaries are assumed to be insulating.

Meshing
DEVICE uses an unstructured, finite-element mesh, like the one shown in the following screenshot. The solution
to the system of equations used to determine the physical quantities of interest is estimated from the discrete
formulation of those equations. Consequently, it's important to understand that of the fundamental simulation
quantities (material properties, geometry information, electrostatic potential, and carrier concentrations) are

2003 - 2016 Lumerical Solutions, Inc


162 Lumerical Knowledge Base

calculated at each mesh vertex.

A finer mesh (with shorter edge lengths and smaller elements) will better approximate the exact solution to the
system of equations, but at a substantial cost. As the mesh features become smaller, the simulation time and
memory requirements will increase. DEVICE provides a number of tools, including the automatic and guided
mesh refinement, that allow you to obtain accurate results, while minimizing computational effort.

Units and normalization


Quantity Description Units Unit description
Length Length units in cm Centimeter
semiconductor models.
This is reflected in the
semiconductor device
literature, and in the
parameter coefficients for
the material models.
Energy The electron energy E is eV Electron volts
related to the local
electrostatic potential
(voltage) as E = -qV. All
energies (and voltages) are
referenced from the
(equilibrium) Fermi level of
an electrical contact in the
system.

Selected Application Examples


Getting Started Examples 171
Vertical Photodetector 2271
Traveling Wave Modulator 2242
Thin film GaAs solar cell 2640
GaAs PIN diode 2833
MOSFET 2842

2003 - 2016 Lumerical Solutions, Inc


Solvers 163

3.3.2 HEAT
Introduction
The heat transport solver is a physics-based simulation tool for solid-state devices. The solver can evaluate the heat
transport equation independently, or self-consistently solve the coupled system of equations for heat transport and
conductive electrical transport to calculate thermal response to Joule heating in an electrically driven system.

Solver physics
The heat transport solver calculates the solution T (the temperature) to the heat transport equation in a solid
medium,

T
rc p - (kDT ) = Q
t

where is the mass density (kg/m3), c p is the specific heat (J/kg.K), k is the thermal conductivity (W/m.K), and
Q is the applied heat energy transfer rate (W/m3).

The electric current equation (Ohms law)

J = sE = - sV

with electrical conductivity (1/Ohm.m) can also be solved self-consistently with the heat transport equation.
Combined with the auxiliary continuity equation,

r
= - J
t

with charge density (1/m3) and Gausss law (for DC permittivity ),

- ( eV ) = r

one obtains the following differential equation for a homogenous material system:

r s
+ r =0
t e

The solution to this equation is an exponential decay with a relaxation time =/. When changes to the system
are observed on time scales where t>>, the quasi-static approximation can be applied, and . Note that in
steady-state, by construction. Under the quasi-static approximation, the electric current equation
combined with the continuity equation reduces to

( sE) = 0

The power dissipated due to Ohmic loss is equivalent to

P = J E = sE 2

which is then applied to the heat transport equations as a heat energy transfer rate Q=P (Joule heating).

The heat transport solver discretizes and solves the heat transport equation or the coupled heat transport and
electric current equations on a finite-element mesh in two or three dimensions. The simulation region is
partitioned into multiple domains along boundaries between materials with unique physical descriptions. The
materials used in the simulation may be categorized as insulators, semiconductors, alloys of semiconductors,

2003 - 2016 Lumerical Solutions, Inc


164 Lumerical Knowledge Base

conductors, or fluids; each type of material has an associated user-specified model or collection of models that
describe its behavior. Domains of fluid materials are not directly simulated: fluids can specify boundary conditions
to the simulation that depend on their physical properties.

The system of equations solved for a heat transport simulation admit both a steady-state and time-varying result.
In steady-state,

T
=0
t
and the heat transport equation reduces to

- (kT ) = Q

while the electric current equations remain as

( sE) = Q

Steady-state simulations can be used to examine the systems behavior at a fixed operating point. Alternately, by
specifying an initial condition for the temperature (and electric field, if required), the equations can be solved in a
sequence of discrete times. The time-dependent behavior of the component can then be used to directly evaluate
its large-signal time-domain response.

Boundary conditions are very important in an accurate simulation of a solid-state device. The heat transport solver
supports a variety of boundary conditions that can be applied at the interface between two materials, at the
surface of a geometric solid, at a simulation boundary, or at the intersection of a solid and the simulation
boundary. The boundary conditions for heat transport and their applicability are enumerated in the table that
follows. For simulations that couple the electric current equations, uniform electrostatic boundary conditions are
supported (both steady-state and time-varying). For internal boundaries between material domains, continuity of
variables is enforced. Where a boundary condition is not defined, the boundary is assumed to be insulating.

Condition Material/ Material Solid Boundary Simulation Simulation /Solid


Boundary boundary
intersection
Fixed temperature Y Y Y
Fixed temperature
X X X
+ thermal resistance
Power Y Y Y
Heat flux X X X X
Convection
Constant X X X X
Forced flow X
Natural flow, top
X
surface
Natural flow, bottom
X
surface
Natural flow, vertical
X
surface
Radiation X X X X
Table : Supported boundary conditions and interface types for heat transport. X indicates steady-state only, Y

2003 - 2016 Lumerical Solutions, Inc


Solvers 165

indicates steady-state and time-varying. Radiative boundary conditions can be combined with convection.

Meshing
DEVICE solvers, including the heat transport solver, use a finite-element mesh, like the one shown in the
following screenshot. The solution to the system of equations used to determine the physical quantities of
interest is estimated from the discrete formulation of those equations. Consequently, it's important to understand
that the fundamental simulation quantities (material properties, geometry information, temperature, and
electrostatic potential) are calculated at each mesh vertex.

A finer mesh (with shorter edge lengths and smaller elements) will better approximate the exact solution to the
system of equations, but at a substantial cost in simulation performance. As the mesh features become smaller,
the simulation time and memory requirements will increase. DEVICE provides a number of tools, including the
automatic and guided mesh refinement, that allow you to obtain accurate results, while minimizing computational
effort.

Units and normalization


Quantity Description Units Unit description
Length Length units in heat M Meter (SI)
transport simulations
Temperature Average thermal energy K Kelvin (SI)
Electrostatic potential Electrostatic potential V Voltage
energy relative to a
reference

Selected Application Examples


Getting Started Examples 171
Thermally Tuned Waveguide 2503
Photothermal Heating in Plasmonic Nanostructures 1933

2003 - 2016 Lumerical Solutions, Inc


166 Lumerical Knowledge Base

3.4 Schematic solvers


3.4.1 DDF
Introduction
The Dynamic Data Flow (DDF) solver is a time domain simulator that uses a data flow system simulator, allowing for
more flexibility than using traditional discrete time or time-driven simulators. The simulator scheduler calculates each
element in order to generate time domain waveform samples and propagate them bidirectionally. Very close coupling
between components can be simulated allowing, for example, the analysis of optical resonators.

Solver physics
This section will introduce the basic mathematical and physics formalism behind the DDF algorithm.

In the time domain simulation, data is represented as a stream of samples [1]. Each sample represents the
value of the signal at a specific point in time. Three key settings are essential to time domain simulations are
the sequence length, the time window and the sample rate. The three parameters are interactive to each other
and defined by the following equations:

The simulation time window is:

LB
tw = LB TB = (1)
BR

Where LB is the sequence length, TB is the bit period and BR is the bit rate. The simulation sample rate is:

NS / B
fs = = N S / B BR (2)
TB

Where NS/B is the number of samples per bit. The number of samples is:

N S = LB N S / B = t w f s
(3)

For analog signals, we can simply define the simulation time window as the following equation with Ts
represents the sampling period:

NS
t w = N S TS = (4)
fs

The DDF solver relies upon Infinite Impulse Response (IIR) and Finite Impulse Response (FIR) digital filters to
implement frequency dependent behavior in time domain simulations. For each signal mode and signal band, a
corresponding digital filter is created, addressing complex single or multimode wavelength division multiplexing
(WDM) devices. By supporting multiple baseband signals for coarse WDM circuits, one for each channel,
different digital filters can be applied to different bands, reducing the limitations and trade-offs as to how well
these digital filters can apply a desired frequency response to a time domain signal.

The following figure shows the scattering matrix methodology of the DDF solver. The scattering matrix is a
container of multiple modes and digital filters centered at each signal baseband.

2003 - 2016 Lumerical Solutions, Inc


Solvers 167

Video resources
INTERCONNECT overview
INTERCONNECT introductory webinar
More videos

References
[1] G. Zhou, Dynamic Dataflow Modeling in Ptolemy 2, Technical Memorandum UCB/ERL M05/2, University
of California, Berkeley, CA 94720, December 21, 2004.

3.4.1.1 Transmission analysis


This simple transmission analysis example of a direct amplitude modulation transceiver demonstrates the Dynamic
Data Flow algorithm.

Solvers 101

DDF
Associated files
am_transceiver.icp

The circuit in this example is a simple optical amplitude modulation transceiver. The Non-Return to Zero (NRZ)
electrical signal is generated based on a Pseudo-Random Bit Sequence, and then it is used to modulate an optical
signal which is generated by a Continuous Wave laser. The modulated optical signal is demodulated by a photo-
diode and smoothed out by a low-pass filter. At last, the eye diagram of the received signal is measured the the Eye
Diagram analyzer. The following figure is the eye diagram measured for the circuit in the example file
am_transceiver.icp.

2003 - 2016 Lumerical Solutions, Inc


168 Lumerical Knowledge Base

[click to enlarge]

3.4.2 SDA
Introduction
The Scattering Data Analysis (SDA) solver is a frequency domain simulator that calculates the overall frequency
domain response of a circuit. This is done by solving a sparse matrix that represents the circuit as connected
scattering matrices, each one of them representing the frequency response of an individual element. Sophisticated
analysis and visualization tools allow for the analysis of circuits behavior, including amplitude, phase, group delay
and dispersion.

Solver physics
This section will introduce the basic mathematical and physics formalism behind the SDA algorithm.

Scattering analysis requires that the scattering matrix of each element in the circuit elements be known. The
SDA algorithm performs a preliminary simulation during which the circuit elements calculate their own
scattering matrices. The SDA algorithm is modeled on the same type of scattering analysis used in the high-
frequency electrical domain for solving microwave circuits, enabling bidirectional signals to be accurately
simulated [1]. However, it has been extended to allow for an arbitrary number of modes supported in the
waveguide elements with possible coupling between those modes that can occur in any element.

The following figure shows the block diagram of an INTERCONNECT circuit. Each element (A, B, C and D) is
represented by a scattering matrix that defines the relationship between an arbitrary number of input and output
ports and modes (y). IA is the circuit source and its output contains two modes.

2003 - 2016 Lumerical Solutions, Inc


Solvers 169

The following figure illustrates the SDA effects of coupling between different waveguides by taking into account
each elements transverse mode profiles.

Video resources
INTERCONNECT overview
INTERCONNECT introductory webinar
More videos

References
[1] D. M. Pozar, Microwave Engineering, Third edition. John Wiley & Sons (2004).

2003 - 2016 Lumerical Solutions, Inc


170 Lumerical Knowledge Base

3.4.2.1 Ring modulator frequency domain analysis


This simple example demonstrates the SDA algorithm analysis of an optical ring modulator by using an Optical
Network Analyzer (ONA).

Solvers 101

SDA
Associated files
ring_modulator_ona.icp

INTERCONNECT frequency domain analysis of a circuit under test is performed by the ONA element, enabling the
simultaneous analysis of multiple circuits in the same schematic. After the ONA runs the scattering data analysis of
the circuit, a comprehensive set of measurements on the complex transmission spectra are calculated; typical
results include gain, phase, dispersion and group velocity. Spectral peak analysis is also performed, which
automatically calculates free spectral range (FSR), bandwidth, Q-factor, and other key parameters. The following
figure shows the ring modulator's gain spectrum curve measured by the ONA and the peaks of the gain curve. The
FSR of the ring could be directly perceived through the peaks of the gain spectrum.

[click to enlarge]

2003 - 2016 Lumerical Solutions, Inc


Getting Started 171

4 Getting Started
The Getting Started examples provide step by step instructions on how to solve a number of simple realistic
problems. All simulation and script files used in the tutorials are available for download.

FDTD Solutions MODE Solutions


Nanowire 1724 FDE
Ring resonator 2020 Photonic crystal fiber 1770
Photonic crystal cavity 1759
ARROW waveguide 1941
Plasmonic waveguide 1883
Ring resonator 2020
varFDTD
Ring resonator 2020

EME
Spot size converter 2053

DEVICE INTERCONNECT
CHARGE Ring resonator 2301
p-n juntion diode 2802 (start here) Fabry-Perot resonator 2294

Silicon diode 2823 Transceiver 2308


MOSFET 2842
Silicon solar cell 2607 (multi-solver)
Mach-Zehnder modulator 2206 (multi-
solver)
HEAT
Cooling and Heating 2854 (start here)
Heat Flow in Solids 2874
Ohmic Heating 2877

After working through one or two getting started examples, see the Applications 1690 sections for more advanced
examples.

2003 - 2016 Lumerical Solutions, Inc


172 Lumerical Knowledge Base

5 Component Tools Reference Guide


Relevant solvers and products
Solvers 101 : FDTD, varFDTD, EME, FDE, DEVICE, CHARGE
Products: FDTD Solutions, MODE Solutions, DEVICE

Chapters
New features
Find new product features by release.

Layout editor 197


Learn how to use the 3D graphical CAD layout editor.

Material properties 215


This chapter explains how to define the material properties that will be used in your simulations.

Simulation objects 314


Learn more about the simulation objects (ie. structures, sources, simulation region) used to define a simulation.

Parameter sweeps 696


Learn how to run parameter sweep, optimization and yield analysis tasks.

Result analysis 735


Learn how to access and analyze simulation data.

5.1 New Features


New features in 2016b 172 (FDTD Solutions 8.16, MODE Solutions 7.8, DEVICE 5.1)
New features in 2016a 173 (FDTD Solutions 8.15, MODE Solutions 7.7, DEVICE 5.0)
New features in 2015b 176 (FDTD Solutions 8.12, MODE Solutions 7.6, DEVICE 4.6)
New features in 2015a 176 (FDTD Solutions 8.11, MODE Solutions 7.5, DEVICE 4.5)
New features in 2014a 177 (FDTD Solutions 8.9, MODE Solutions 7.1, DEVICE 4.1)
New features in 2013c 178 (FDTD Solutions 8.7, MODE Solutions 6.6, DEVICE 3.1)
New features in 2013b 179 (FDTD Solutions 8.6, MODE Solutions 6.5, DEVICE 3.0)
New features in 2013a 181 (FDTD Solutions 8.5, MODE Solutions 6.0, DEVICE 2.0)
New features in prior versions 182

To check the version of the software you are currently using, and to check for updates, go to the Help menu in the
main title bar.
See System design tools new features 883 for the new features in INTERCONNECT.
Also see the Product announcements page.

5.1.1 New features in 2016b


Shared Features
Automation API
Lumericals powerful scripting language enables the end user to manipulate simulation objects, run simulations and
analyze results, and the API extends the existing functionalities by allowing users to drive any Lumerical application
2221 from the scripting environment. This gives the designer complete freedom to define an arbitrary design process

that is both repeatable and highly automated. The API can also be driven from MATLAB 2085 , allowing the user to
utilize any MATLAB Toolbox capabilities when optimizing their designs.

Smith Charts and Polar Plots


The Visualizer 741 now supports both Smith chart and polar plot options.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 173

New script commands


add2visualizer 1530 , chebpol, chebpol1, lookupappend 1445

Optical solvers (FDTD Solutions 8.16 and MODE Solutions 7.8)


Thin 2D Sheets
New material models for 2D objects 241 allow users to efficiently simulate thin layers with arbitrary dispersive
properties. This is very useful for simulating two-dimensional materials like graphene and phosphorene, as well as
many applications in the THz and Microwave regime with extremely subwavelength layers.

Transmission Line Analysis Support


New PMC boundaries 459 and impedance calculation utility 755 have been added to facilitate analysis of transmission
lines 2141 in RF/Microwave frequencies.

Enhanced Mode Solving Engine


The eigenmode solving engine 109 in both FDTD Solutions and MODE Solutions has been upgraded to reduce
calculation time and memory.

New script commands


add2dpoly 1555

DEVICE Design Environment 5.1


Self-consistent Charge/Heat Transport
The charge transport solver 157 in DEVICE now supports both isothermal and non-isothermal temperature
dependence. A new coupled mode has also been added to simulate the effect of self-heating in high current
devices.

Small Signal AC Analysis


The new small signal AC analysis mode 157 allows users to effectively extract frequency domain response where
small amplitude/linear approximation is valid.

New script commands


addimporttemperature 1542 , closelumerical, evalclient, getclientdata, openlumerical,
putclientdata

5.1.2 New features in 2016a


Shared Features
Updated OS support
Support for Windows 10, Mac OS X 10.11 (El Capitan) and RedHat Enterprise Linux 7 has been added in the 2016a
release.

Support for Microsoft MPI


On Windows computers, Microsoft MPI is now the default version of MPI used for running simulations. The previous
version of MPI (MPICH2) is still available, and recommended for running jobs on remote computers.

Node locked licenses


In addition to the floating license model traditionally provided by Lumerical, node locked licenses are now available.
Node locked licenses are recommended for users that only run Lumericals software on a single computer. They
tend to be easier to install and more robust when running on laptops. Node locked licenses are typically secured
with a software lock, but USB hardware key based locks are also available. The traditional floating license is
recommended for customers wanting to run Lumericals software on many different computers, such as in office or
cluster environments.

Unicode characters in file and directory

2003 - 2016 Lumerical Solutions, Inc


174 Lumerical Knowledge Base

Unicode characters are now supported in file and directory names.

Plotting in Matlab
A feature to support direct plotting in Matlab by clicking a PLOT IN MATLAB 741 button in Lumerical's GUI. This
feature is currently only available for 1D line plot.

New script commands


besseli 1522 , besselj 1522 , besselk 1523 , bessely 1522 , chebin 1519 , chpts 1519 , corrcoef 1520 ,
corrtransf 1520 , cov 1520 , dcht 1521 , encryptscript 1451 , getfdtdsurfaceconductivity 1676 ,
getsurfaceconductivity 1676 , icht 1521 , lower 1493 , sroughness 1497 , toscript 1493 , upper 1493

Optical solver (FDTD Solutions 8.15)


Broadband Fixed Angle Source Technique (BFAST)
The Broadband Fixed Angle Source Technique 590 is based on the split-field FDTD method. It is a modified FDTD
algorithm that makes it possible to inject plane wave sources onto periodic structures with a constant angle, that
does not change with frequency, over any bandwidth.

Multifrequency beam calculation


The multifrequency beam calculation 543 makes it possible to correctly inject beams with a constant angle, that
does not change with frequency, over any bandwidth. In addition, beams with profiles that change rapidly with
frequency, such as diffraction-limited high NA spots, can be correctly injected over any bandwidth. The "multi-
frequency beam calculation" can now be enabled on the "Beam options" tab of the Gaussian source settings.

Spatial varying grid attributes


The permittivity rotation and matrix transform grid attributes now support importing spatially-varying data from the
script workspace, or from Matlab files containing the datasets using the addgridattribute 1550 or
importdataset 1590 script commands. Data can also be imported from Matlab files from the GUI using the grid
attribute object's edit window.

See Matrix transformation 263 , and Permittivity rotation 261 for examples.

Spatially-varying Liquid Crystal orientation data can now also be added using the new Import from CSV tool from the
Import menu in the main toolbar, or by using the importcsvlc 1555 script command. The file format which is
imported is typically created with TechWiz LCD from Sanayi System Co., Ltd. (http://sanayisystem.com/). See
Import object - Liquid crystal from CSV 502 for details on using this new import option.

New script commands


importcsvlc 1555 , simulationdiverged 1656

Optical solvers (FDTD Solutions 8.15, MODE Solutions 7.7)


Index perturbation - Temperature
The new Index Perturbation material type allows users to create materials that are sensitive to changes temperature,
as well as charge density.The temperature is specified globally for the simulation, and spatially varying temperature
profiles can also be imported from the HEAT solver. Spatially varying charge densities can also be imported from the
CHARGE solver and optionally combined with thermal effects.

DEVICE Design Environment (DEVICE 5.0)


The DEVICE design environment has changed to support multiple physical solvers within the same project.
Monitors, sources, mesh constraints, and doping objects are now associated directly with the solver in the model
tree and will appear under the solver. The associated solver must be present in the design environment before those
objects can be added.

The material database has been extended to include the thermal and conductive properties of materials. A new class
of material (thermal fluid) has been introduced for heat transport simulations. The definition of physical behavior at

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 175

interfaces between two adjacent materials is now accessed through the Interfaces 280 button in the menu bar.

The existing Electrical Contacts table has been renamed Boundary Conditions 686 . Existing electrical contacts will
appear in the Boundary Conditions table. Boundary conditions can now be associated with the surface of a solid (as
in previous versions), a surface of the simulation region, or the intersection of the surface of a simulation region and a
solid. The latter two options only apply to heat transport simulations.

These changes make it possible to perform charge and heat transport simulations from a single design environment.

Charge Transport Solver (DEVICE 5.0)


The charge transport solver in DEVICE is now called CHARGE. The CHARGE solver will contain all monitors,
sources (generation rates), doping profiles, and mesh constraints related to the charge transport simulation. Existing
electrical contacts will appear in the Boundary Conditions with the type electrical contact. Import doping and
optical generation rate objects have been updated to support the selection of arbitrary parameterized attributes as
sources from rectilinear or unstructured (finite element) datasets.

Script Updates Required


Changes to the design environment have necessitated modifications certain script commands. These are
summarized below:
addcontact, setcontact, getcontact: These commands are deprecated but continue to function as
before. Please refer to addbc, setbc, and getbc as replacements .
run, mesh: When only one solver is present (e.g. CHARGE), these commands function as before and no action
is required. When multiple solvers are present (e.g. CHARGE and HEAT), the solver must be specified with an
argument (CHARGE or HEAT).
addmesh, adddevice: These commands have been replaced with addheatmesh and addchargemesh
(replacing addmesh) and addheatsolver and addchargesolver (replacing adddevice).
Setting and getting object properties: all monitors, sources, doping objects, and mesh constraints are now
contained within the scope of the associated solver. To select or set/get the properties of a named object, the
objects scope must include the solver, e.g.
setnamed(CHARGE::monitor,x,1e-6);
replaces
setnamed(monitor,x,1e-6);

Heat Transport solver (DEVICE 5.0)


DEVICE now includes a new Heat Transport Solver called HEAT. Features of HEAT include:
Thermally and electrically driven heat transport in solid-state systems (heat transport, coupled conductive (Ohmic)
electrical current and heat transport)
2D and 3D finite element simulation
Steady state and transient simulation
Material definitions for over 40 common solid-state materials (metals, insulators and semiconductors, including
alloys with spatially-varying material composition, temperature-dependent coefficient models, support for user-
defined materials)
Thermal inputs (single value, range or value sweeps, and time-varying waveforms)
Thermal Boundary Conditions (uniform temperature and power, heat flux, convection, grey-body radiation)
Distributed heat sources (uniform heat, imported spatially varying heat)
Integration with photonic simulation tools (import heat from optical absorption, export temperature profile for
temperature-dependent optical index perturbation, compact model extraction/development using temperature input
in INTERCONNECT models)
Common Lumerical design environment (HEAT shares the design environment with CHARGE, including the same
parameter sweep and optimization framework, concurrent computing on multiple computers, broad operating
system support, and more)

New script commands


addbc 1540 , addchargemesh 1542 , addchargesolver 1548 , addheatfluxmonitor 1544 , addheatmesh 1542 ,
addheatsolver 1548 , addimportheat 1543 , addtemperaturemonitor 1543 , adduniformheat 1543 ,
deleteallbc 1563 , deletebc 1561 , getbc 1562 , setbc 1560

2003 - 2016 Lumerical Solutions, Inc


176 Lumerical Knowledge Base

5.1.3 New features in 2015b


Shared Features
Import HDF5 files
HDF5 is an open binary file format for storing and managing large, complex datasets. The file format was developed
by the HDF Group, and is widely used in scientific computing. In the 2015b release, Lumerical has added the
capability to read data from HDF5 files 792 in its FDTD, MODE, and DEVICE solvers. Using script commands, the
users will be able to read data from a wide range of HDF5 files.

New script commands


h5info 1682 , h5read 1683 , h5readattr 1683

Dataset builder
A new wizard has been added to the interface of FDTD, MODE, and DEVICE solvers in the 2015b release that will
assist the users in creating structures and doping regions (in DEVICE) using finite-element (FEM) data. The dataset
builder 375 will read the FEM data imported to the script workspace by the user and will guide the user through steps
in order to create custom structures based on the imported data.

Optical solvers (FDTD Solutions 8.12, MODE Solutions 7.6)


Graphene model (All optical solvers)
A new material model for graphene using its surface conductivity is introduced in MODE Solutions or FDTD
Solutions. The surface conductivity approach 2774 is typically much more efficient than the volumetric permittivity
approach we had. A new 2D rectangle 349 object is also added for this purpose.

Electrical solvers (DEVICE 4.6)


See Shared Features

5.1.4 New features in 2015a


Shared Features
Bundled license manager on Windows
The installation process has been simplified on Windows OS by bundling and automatically installing 17 the license
manager together with the main products. It is no longer necessary to download and separately install the license
manager application on Windows.
3D CAD geometry improvements
The new bezier waveguide primitive 338 object makes creating ridge waveguides with sidewall angles easier. The
planar solid 345 object provides new functionality for creating complex 3D planar objects. The new Standard
Tessellation Language (.STL) 487 file import makes it easy to import complex geometry data from other CAD tools.

Optical solvers
Stretched coordinate PML
The new stretched coordinate PML 460 (SCPML) uses a state of the art formulation [1] that incorporates many recent
advances and delivers a number of advantages including better absorption and greater numerical stability when
compared to the uniaxial anisotropic PML (UPML) provided in earlier versions of the software. The new PML is
available in the FDTD, varFDTD, FDE and EME solvers.

More flexible PML settings

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 177

A more flexible PML configuration 460 utility makes it possible to independently adjust the PML parameters on each
boundary. While not typically required, this level of flexibility can be important in some advanced applications.

Improved import source


The Import source 579 in the FDTD solver now supports an easier to use .mat file format for importing field data from
an analytic equation, from a different Lumerical simulation or a 3rd party simulation tool. The importdataset 1590
command makes it possible to import the data into the source with a script command.

EME can now use an arbitrary field profile as an input source


An arbitrary file profile 437 can be used as an input source in a EME port.

EME solver error estimates


New error diagnostic tools 783 in the EME solver make convergence testing much faster and easier.

EME solver multi-threading


Multi-threading in the EME solver makes the simulations significantly faster than the prior version (often several
times faster).

More EME improvements


A new monitor field profile smoothing feature provides much smoother field profiles when using the CVCS method.
The mode solver properties (such as the number of trial modes) can now be adjusted independently in each cell
group. Monitors can now be added while in Analysis mode. Field profile monitors can now be oriented in the X
normal direction. Field profile monitors can now export field data to a .mat file, which can be used as a source in
later FDTD or EME simulations.

DEVICE solvers
Spatially varying alloy compositions

Expanded list of materials in material database


A large number of new materials, including many alloy materials, have been added to the default DEVICE material
database 278 .

Major update to material database framework


The DEVICE material database 276 has undergone a major update to enhance its usability and add support for more
advanced material systems including spatially varying alloys.

Green's Function IQE Method


Calculation of the Internal Quantum Efficiency (IQE) 2585 is now possible with the introduction of a variety of new new
features including point (delta) generation source 681 .

5.1.5 New features in 2014a


Shared Features
Layer builder
The layer builder is a graphical user interface tool that allows you to import GDS files and build up a layered
structure consisting of patterning defined in GDS file cells and plane unpatterned layers. This tool allows you to
easily change the ordering and thickness of each layer and translate the position of the patterning within a layer.
Layer builders can be added to your simulation from a button in the top toolbar. See the layer builder 372 page for
more information about how to use it.

New script commands


addlayer 1552 , addlayerbuilder 1553 , chol 1510 , getcelllist 1591 , getlayerlist 1591 , loadgdsfile
1592 , setlayer 1591 , svd 1510

FDTD Solutions 8.9

2003 - 2016 Lumerical Solutions, Inc


178 Lumerical Knowledge Base

See Shared Features

MODE Solutions 7.1


Bidirectional eigenmode expansion (EME) solver
The EME method is a fully vectorial and bi-directional technique for solving Maxwell's equations. The computational
cost of the method scales exceptionally well with the device length, making it an ideal method for design and
optimization of long devices and periodic devices. For additional information see the EME solver whitepaper.

Multicore eigenmode solving engine


The FDE solver 109 is now multicore, allowing users to solve larger problems significantly faster than before.

New script commands


addeme 1540 , addemeindex 1541 , addemeport 1541 , addemeprofile 1541 , addfde 1540 , addvarfdtd 1540 ,
emepropagate 1611 , emesweep 1612 , getactivesolver 1588 , getemeanalysis 1611 , setemeanalysis 1611

DEVICE 4.1
Support for abrupt heterojunctions
Examples applications include the SiGe photodetector, and AlGaAs/GaAs thin-film solar cells

Band structure monitor


Band structure and current flux density monitors have been added. The band structure monitor is a 1D monitor that
calculates the equilibrium band structure of adjacent materials and returns the conduction, valence, intrinsic and
fermi level energies in units of ev.

Current flux monitor


The current flux monitor will calculate the total flux of the current density through a line, area or volume of the
simulation region. In 2D, the currents are in units of A/m and in 3D they are in units of A.

The monitors returns the following:

I n , p = J n , p nd s
W

Enhanced semiconductor models for high-field and breakdown effects


High-field mobility models
Trap-assisted tunneling
Band-to-band tunneling
Impact ionization

New script commands


addbanstructuremonitor, addjfluxmonitor 1552

5.1.6 New features in 2013c


Shared Features
Export viewports to image
Users can export CAD viewports into JPEG figures by selecting "View -> Export view" from the main title bar.

Electron-hole density grid attribute


FDTD Solutions and MODE Solutions can now import electron-hole density data recorded on a finite-element mesh
directly from a DEVICE simulation. This approach, which offers significant improvement over the previous (n, k)
import option, reduces simulation memory requirements and interpolation errors.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 179

GDSII export
Geometry data can be exported from Lumericals TCAD tools into GDSII files. Each GDSII file will be able to
incorporate multiple simulation primitives from a single layer. See User guide - GDSII import/export 480 for an
example.

FDTD Solutions 8.7

Purcell Factor Calculator


The Purcell factor 1816 will be automatically returned as a property of a dipole source, making it straightforward to
study the emission rate enhancement of a spontaneous emitter located inside a cavity or resonator.

Graphene Material Model


Users can add Graphene material (volumetric approach) 2776 directly from the material database.

Note: The underlying file format of the simulation files (.fsp) created by FDTD Solutions 8.7 has changed. Version
8.7 can open simulation files created by older versions of the software, but older versions will not be able to open
simulation files created by version 8.7.

MODE Solutions 6.6


Graphene Material Model
Users can add Graphene material (volumetric approach) 2776 directly from the material database.

DEVICE 3.1
See Shared Features

5.1.7 New features in 2013b


Shared Features

XML lookup table support


Users can simulate a wide range of device designs with Lumerical's TCAD tools, the results of which get
incorporated into an XML lookup table. This XML lookup table can then be associated with a specific element as the
basis for a validated compact model within an INTERCONNECT project.

Vector plots in Visualizer


The data visualizer is now able to create vector plots.

More
FFT's and far field projections are faster due to improved multithreading.
Struct and cell arrays data structures were added to the scripting language.
Font size in script file editor and script prompt can be changed.
The CAD can run script files non-graphically.
Index monitors can be used to view the simulation mesh in layout mode (i.e. without running the simulation engine).

FDTD Solutions 8.6


See Shared Features.

MODE Solutions 6.5


User-defined material models

2003 - 2016 Lumerical Solutions, Inc


180 Lumerical Knowledge Base

Users now have the ability to create plugin materials and directly modify the update equations. This will allow for
arbitrary nonlinear materials, negative index materials and many other forms of electric and magnetic field updates.
Please see the User-defined models 251 section of the Reference Guide for more detail.

In addition, the following new material models have been added to the Material database 216 (and more material
models will be introduced in the future):

1.
c ( 2)
,
c ( 3) / c ( 2 )
materials: users can now specify the
c ( 2)
and
c ( 3)
terms for nonlinear simulations. An
arbitrary dispersive base material can also be specified, in which case the added polarization will be in addition to
the polarization of any base material that is selected.

2. Paramagnetic materials: users can now specify both the Permittivity and Permeability to simulate magnetic
materials.

3. A
c ( 3)
Raman Kerr model based on the references below. This can be used model the Raman effect in Silicon.
Some examples include soliton propagation and four-wave mixing.
Goorjian and Taflove, Optics Letters, 1992, 180-182
Allen Taflove, Computational Electromagnetics: The Finite-Difference Time-Domain Method. Boston: Artech House,
(2005)

4. A Four-Level, Two-Electron laser model based on the references below. This can be used to model gain and
lasing dynamics.
Chang and Taflove, Optics Express, 2004, 3827-3833
Allen Taflove, Computational Electromagnetics: The Finite-Difference Time-Domain Method. Boston: Artech House,
(2005)

Please see the Waveguides - Nonlinear and Gain 2716 for examples that use these new material models.

DEVICE 3.0
3D solver
DEVICE is now capable of simulating fully three dimensional geometries. The solver type can be chosen by the user
to be 2D or 3D. This means that arbitrary structures particularly where slicing or averaging of imported 3D data is not
valid can now be solved for in 3 dimensions.

Visualization
The visualizer has been updated for 3D simulations to allow the user to better view the results, enabling image plots,
arbitrary slices of the 3D geometry or line plots of various types of data.

Field and charge monitors


A new object type, monitor, has been added to DEVICE. 2D/3D monitors can be placed anywhere within the
simulation region to record the total charge within the monitor and/or electric field through the monitor boundaries.

Continue from previous solution


It is now possible to specify a project file that has already been run as a reference project for solving another
simulation. The initialization step in the solver can be skipped with this feature, using the converged solution of the
specified file. This will save a lot of time in memory intensive simulations.

New script commands


The following script functions were added. For more information, see the function descriptions in the scripting section
of the Reference Guide.
all 1505 , any 1505 , quadtri, unstructuredataset 1466 , loadsweep 1651 , savesweep 1651 , var 1505 , std
1506

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 181

5.1.8 New features in 2013a


Shared Features
FlexNet license manager
Lumerical now offers a FlexNet based license manager.

FDTD Solutions 8.5


TFSF source supports angled injection
The TFSF source is now capable of injecting at non-normal angles.

MODE Solutions 6.0


Results manager and Visualizer
The Results Manager 736 is a tool for analyzing simulation data. This includes a Results View window which displays
all the results for the simulation object that is currently selected in the Object Tree. The Results Manager also
includes a Script Workspace and a Script Favorites window, providing additional GUI-based functionalities.

Also featured in MODE Solutions 6.0 is a Visualizer 741 , which significantly simplifies the process of visualizing
simulation data. When used in conjunction, Results Manager and the Visualizer provide a very useful and intuitive
way of analyzing and visualizing variables and results through the GUI, greatly reducing the need for scripting.

Mode expansion monitors


MODE Solutions 6.0 features new mode expansion monitors. These monitors allow users to expand an arbitrary field
profile (from a monitor) into a specific mode (or a set of modes). For more information on this expansion calculation,
and the results that are returned, see Using Mode Expansion Monitors 651 .

The Mode Expansion monitor greatly facilitates the interoperability between MODE Solutions and INTERCONNECT
as it returns the S parameters, which can be imported into INTERCONNECT directly. Please see the Ring resonator
(parameter extraction and yield analysis) 2033 getting started example for how to do this.

Search near complex effective index values


The Eigenmode solver in MODE Solutions 6.0 allow users to search for modes around a specific complex value of
effective index, making it much easier to study modes with high loss (ex. surface plasmon modes). See Modal
Analysis -> Set calculation parameters 754 for more information.

DEVICE 2.0
Results manager and Visualizer
The Results Manager 736 is a tool for analyzing simulation data. This includes a Results View window which displays
all the results for the simulation object that is currently selected in the Object Tree. The Results Manager also
includes a Script Workspace and a Script Favorites window, providing additional GUI-based functionalities.

Also featured in DEVICE 2.0 is the improved Visualizer 741 , which significantly simplifies the process of visualizing
simulation data. When used in conjunction, Results Manager and the Visualizer provide a very useful and intuitive
way of analyzing and visualizing variables and results through the GUI, greatly reducing the need for scripting.

Datasets
Lumerical datasets are structured data objects that collect a set of related matrices into a single convenient object.
See Dataset introduction 1461 for more information.

Yield analysis tool


A new yield analysis tool is available in the Optimization and Sweeps window. The yield analysis tool gives users

2003 - 2016 Lumerical Solutions, Inc


182 Lumerical Knowledge Base

the ability to run extensive Monte Carlo analysis, sweeping across multiple parameters to assess statistical
variations of circuit elements on overall circuit performance.

Please see the Yield analysis 728 example for more details.

Other new script commands


The following script functions were added in DEVICE 2.0. For more information, see the function descriptions in the
scripting section of the Reference Guide.
. operator 1468 , addattribute 1460 , addparameter 1460 , eig 1485 , debug 1442 , getattribute 1461 ,
getparameter 1460 , getresult 1647 , getsweepresult 1646 , integrate2 1488 , matrixdataset 1459 ,
addmodeexpansion 1551 , mult 1485 , permute 1486 rectilineardataset 1459 , reshape 1486

5.1.9 New features in prior versions


FDTD Solutions
New features in version 8.0

User-defined material models


Users now have the ability to create plugin materials and directly modify the update equations. This will allow
for arbitrary nonlinear materials, negative index materials and many other forms of electric and magnetic field
updates. Please see the User-defined models 251 section of the Reference Guide for more detail.

In addition, the following new material models have been added to the Material database 216 (and more
material models will be introduced in the future):

1.
c ( 2 ) , c ( 3) / c ( 2 ) materials: users can now specify the

and
c (3) terms for nonlinear simulations. An arbitrary dispersive base material can also be specified, in which
case the added polarization will be in addition to the polarization of any base material that is selected.

2. Paramagnetic materials: users can now specify both the Permittivity and Permeability to simulate magnetic
materials.

3. A
c ( 3)
Raman Kerr model based on the references below. This can be used model the Raman effect in
Silicon. Some examples include soliton propagation and four-wave mixing.
Goorjian and Taflove, Optics Letters, 1992, 180-182
Allen Taflove, Computational Electromagnetics: The Finite-Difference Time-Domain Method. Boston: Artech
House, (2005)

4. A Four-Level, Two-Electron laser model based on the references below. This can be used to model gain
and lasing dynamics.
Chang and Taflove, Optics Express, 2004, 3827-3833
Allen Taflove, Computational Electromagnetics: The Finite-Difference Time-Domain Method. Boston: Artech
House, (2005)

Please see the Application Library 1690 for examples that use these new material models.

Non-diagonal anisotropic media


FDTD Solutions 8 supports the full 9 element permittivity tensor:
D i = e ij E j
where summation over j is implied on the right hand side. The full anisotropy tensor can be written as

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 183

e 11 e 12 e 13

e = e 21 e 22 e 23
e e 32 e 33
31
To define this tensor, users will start by specifying the diagonal elements of the tensor. Then, arbitrary
rotations to this tensor can be applied through a Grid Attribute 399 object to induce the correct rotation. Please
see Anisotropic materials 253 for more information on how to define this tensor.

This new feature allows users to simulate magneto-optical effects, as well as arbitrary Liquid Crystals
orientations.

Results manager and Visualizer


The Results Manager 736 is a tool for analyzing simulation data. This includes a Results View window which
displays all the results for the simulation object that is currently selected in the Object Tree. The Results
Manager also includes a Script Workspace and a Script Favorites window, providing additional GUI-based
functionalities.

Also featured in FDTD Solutions 8 is a Visualizer 741 , which significantly simplifies the process of visualizing
simulation data. When used in conjunction, Results Manager and the Visualizer provide a very useful and
intuitive way of analyzing and visualizing variables and results through the GUI, greatly reducing the need for
scripting.

3D only user interface


FDTD Solutions 8 allows users to perform 2D and 3D simulations on the same 3D structure by defining 2D and
3D simulation regions in the same project file.

A 2 dimensional drawing mode is provided so that it is possible to work only with a 2 dimensional slice of the
structure. The 2 dimensional drawing mode looks very similar to the 2 dimensional drawing environment from
2D FDTD or MODE 4.

Mode expansion monitors


FDTD Solutions 8 features new mode expansion monitors. These monitors allow users to expand an arbitrary
field profile (from a monitor) into a specific mode (or a set of modes). For more information on this expansion
calculation, and the results that are returned, see Mode Expansion Monitors 649 .

The Mode Expansion monitor greatly facilitates the interoperability between FDTD Solutions and
INTERCONNECT as it returns the S parameters, which can be imported into INTERCONNECT directly.

Rotatable mode sources


MODE sources can now be injected along an angled plane by setting the rotation angles (see Sources 510 ).
Users should make sure to extend the waveguide/fiber through the PML boundaries, and make sure that the
"extend structure through pml" property under Edit FDTD Simulation -> Advanced options is unselected.

Yield analysis tool


A new yield analysis tool is available in the Optimization and Sweeps window. The yield analysis tool gives
users the ability to run extensive Monte Carlo analysis, sweeping across multiple parameters to assess
statistical variations of circuit elements on overall circuit performance.

Please see the Yield analysis 728 example for more details.

Material fitting improvements


The material fitting routine has been optimized to improve material fits for dispersive sampled materials with
low losses.

2003 - 2016 Lumerical Solutions, Inc


184 Lumerical Knowledge Base

Other new script commands


A number of script functions were added in FDTD Solutions 8, including:
. operator, addattribute, addparameter, eig, debug, getattribute, getparameter,
getresult, getsweepresult, integrate2, matrixdataset, addmodeexpansion, mult,
permute rectilineardataset, reshape, updatesourcemode, updatemodes,
seteigensolver, geteigensolver, clearmodedata, lookupread, lookupwrite,
lookupopen, lookupclose

Datasets
Lumerical datasets are structured data objects that collect a set of related matrices into a single convenient
object. See Dataset introduction 1461 for more information.

New features in version 7.5

Concurrent simulations
FDTD 7.5 provides a simple way to run multiple simulations at the same time. For example, suppose you
have 30 simulations from an optimization or parameter sweep 696 task. In the past, each of the 30 simulations
would run consecutively on the local computer. (It was also possible for the user to manually distribute the
jobs in some other manner.) With FDTD 7.5, the jobs can be automatically sent to several computers in your
local network. If there are three computers in the network, FDTD can run three concurrent simulations (one on
each computer), reducing the time to complete the sweep by a factor of 3. Extra FDTD simulation engine
licenses will be required to run additional simultaneous simulations.

Movie monitors in parallel simulations


Movie monitors now work in parallel (multi-process) simulations. In previous versions, movie monitors only
worked when the simulation was run in single processor mode.

Other new script commands


The following script functions were added in FDTD Solutions 7.5. For more information, see the function
description in the scripting section of the Reference Guide.
runsweep addjob, runjobs, clearjobs

New features in version 7.0

Optimization
Optimization 716 is a key component of FDTD Solutions 7.0 Optimization is important when there is a large
parameter space, where simple parameter sweeps require too many simulations to be practical. Prior to
FDTD 7.0, it was possible to implement your own optimization algorithms via the scripting language, but this
can be a difficult task, due to the complexity of optimization algorithms. FDTD 7.0 includes a new
optimization feature which provides a graphical interface to a built in Particle Swarm based optimization
algorithm. It is also possible to create your own custom optimization algorithms within this graphical
optimization feature.

Conformal mesh
Achieve higher accuracy for a given mesh size with conformal meshing 453 . The conformal meshing technique
can resolve interfaces to much higher precision than the standard staircase meshing, making it an ideal
method to solve structures with thin layers, curved surfaces and high index contrast materials, such as
surface plasmon or silicon on insulator waveguides.

Parameter sweeps
Parameter sweeps 699 are a very common task. Prior to FDTD 7.0, creating parameter sweeps required the
scripting language. One of the major new features in FDTD 7 is the ability to do parameter sweeps in a
completely graphical way, without the use of the scripting language.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 185

Object library
A library of complex structure groups and analysis objects have been incorporated into the graphical CAD
environment. In the past, many of these objects were available via the Online Help, but making them available
directly from within the product is much more efficient. The new object library 210 includes complex structure
groups like waveguide components, randomized clouds of particles, photonic crystal arrays, etc. It also
includes analysis objects like power transmission boxes, cavity Q calculators, S-parameter monitors, etc.

Mac OS X support
Mac OS X v10.5 Leopard and above has been added to the list of supported systems.

Windows 7 support
Windows 7 has been added to the list of supported systems.

Simplified installation and licensing


The Portable and Floating license options have been merged into a single licensing option. It is no longer
necessary to install the stand-alone Lumerical License Manager. All licensing information (quotas, expiry
dates, etc) can now be stored directly on the USB hardware key. The behavior of the key (portable or floating)
can be changed at any time without assistance from Lumerical.

More flexible PML configuration options


PML boundaries are intended to absorb all incident light, with zero reflection. In practice, there is always
some reflection. This reflection can be minimized by using more PML layers, although this makes the
simulation run slower. It is now possible to specify the desired PML reflection directly, rather than having to
specify the number of PML layers.

PML boundaries perform best when the surrounding structures extend completely through the boundary
condition region. Many users are unaware of this issue, making it a common setup mistake. In FDTD 7, the
default behavior is to automatically extend the material properties through the PML boundaries, even if they
were not drawn that way. This should result in better PML performance (absorption) for these users.

Improved GDSII import


The GDSII file import 480 functionality has been improved. GDSII operation scale, rotate, flip are now
supported. Path types 0 and 2 are now supported.

Analytic material model


The analytic material 239 model allows the user to enter an equation for the real and imaginary part of the
permittivity or refractive index which can depend on the predefined variables listed below. However, it is
important to remember that the specified equations are not used directly in the simulation. An FDTD material
model must still be generated, much like the Sampled data material model. It's important to check the FDTD
model with the Material Explorer before running a simulation.

Other new script commands


The following script functions were added in FDTD Solutions 7.0. For more information, see the function
description in the scripting section of the Reference Guide.
eval, getglobalsource, getglobalmonitor, setglobalsource, setglobalmonitor,
groupscope, getsweepdata, clearanalysis, addgroup, polar, meshgrid4d,
substring, findstring, replace, replacestring, polyarea, centroid,
polyintersect, inpoly, polygrow, polyand, polyor, polyxor, lineintersect,
linecross

New features in version 6.5

2003 - 2016 Lumerical Solutions, Inc


186 Lumerical Knowledge Base

Structure groups
The ability to group structures is one of the main new features in FDTD 6.5. Groups can be moved, rotated
and copied as a single object. In addition to simple grouping, it is possible to create parameterized group-
objects by adding script code to the group.
For example, it is possible to create a Photonic Crystal Array group with a Pitch input parameter. When the
Pitch parameter is changed, all objects in the group will automatically move to the appropriate position. For
an example of how to create and use a group see the pc micro cavity tutorial 1759 in the getting started section.

Analysis (monitor) groups


The ability to group monitors into Analysis groups is one of the main new features in FDTD 6.5. Groups can
be moved and copied as a single object. In addition to simple grouping, it is possible to create parameterized
group-objects by adding script code to the group.
For example, it is possible to create a Scattering Cross-section Analysis group. The group is composed of 4
monitors that form a box around the structure. One associated script adjusts the monitor positions as defined
by the input parameters. A second script calculates the scattering cross-section from the monitor data. This
analysis group is set up in the monitors section of the Getting Started nanowire resonance tutorial 1724 . A
second analysis group example can be found in the pc micro cavity tutorial 1759 .

Object tree browser


The object tree browser provides an alternate view of objects within a simulation. It is especially useful for
complicated simulations with many overlapping objects. In such cases, it is much easier to select objects
from the tree view than directly in the graphical view ports. It also makes selecting objects within groups
possible. For more information, see the layout editor tabs and object tree 208 section of the Layout editor
chapter.

Built in script file editor


The Script file editor allows you to create, edit, and run script files directly from within FDTD Solutions, rather
than using another text editor like Notepad. Syntax highlighting makes it easier to read, write and debug
script files. The Run Script button makes running the script quick and easy. For more information, see the
script prompt and script file editor 211 page in the Layout editor section.

Script syntax highlighting


The Script File Editor and Script Prompt have syntax highlighting to make the commands easier to read, write
and debug. Comments are green, strings are red, and loop/control statements are blue.

Copy and Paste


FDTD Solutions now supports Copy and Paste operations. This allows you to copy (Ctrl-C) a group of objects
from one simulation and paste (Ctrl-V) a copy of those objects into a different simulation. This is especially
useful with the new structure and analysis groups.

Dipole radiated power calculation


The dipolepower script command returns the actual power radiated by a dipole source. This greatly
simplifies calculations that require knowledge of the radiated power, such as enhancement and efficiency
measurements.

New Mode Source script commands


The updatesourcemode script command automatically updates the mode profile of the MODE source. This
makes it much easier to automate some types of parameter sweeps.
The get script command now returns the mode profile stored in the MODE source, in addition to the other
object properties.
The clearsourcedata script command clears the mode profile from the MODE Source.

Other new script commands


The following script functions were added in FDTD Solutions 6.5. For more information, see the function
description in the scripting section of the Reference Guide.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 187

system, almostequal, not, square brackets, single quotes, format,


updatesourcemode, clearsourcedata, addstructuregroup, addanalysisgroup,
adduserprop, addtogroup, getmaterial, havedata, layoutmode, sourceintensity,
sourceintensity_avg, sourceintensity_pavg, dipolepower, runanalysis, runwizard,
wizardgetdata, setplot.

Online Help search bar


The Online Help search toolbar provides easy access to the FDTD Solutions Online Help website. The toolbar
will open your default web browser and search the Online Help for the requested term. This is particularly
useful when searching for script function syntax. For more information, see the toolbars 199 page in the layout
editor section.

Simplified installation
Simplified licensing: The USB hardware keys now contain much of the licensing information (expiry dates,
quotas). In many cases, license files are no longer required.

Matlab script integration: FDTD Solutions automatically detects MATLAB. The MATLAB script integration
step of the FDTD installation has been removed.

MATLAB is a registered trademark of The Mathworks, Inc.

Improved material fits


The fitting functions used to generate material models from Sampled data materials have been improved to give
more control over the fits that can be generated. For example, you can specify a custom wavelength range or
force the fit to give priority to the real or imaginary part of the permittivity.

New features in version 6.0

Multi coefficient material model


In the past, FDTD Solutions supported single Plasma, Lorentz, Debye or combinations of these dispersive
models. FDTD Solutions 6 has a new generalized multi-coefficient model that allows more complicated data
to be fit. The accuracy of the model can be controlled with the number of coefficients. More coefficients will
give a better fit to experimental data, but at the expense of more memory and longer simulation times.

This model is only available when using the Sampled data material definition. The coefficients are
automatically calculated from the sampled material data over the source bandwidth. See the chapter on the
Material database 216 for details.

Auto fitting of experimental data


The Sampled data material definition (for importing experimental data) uses an automatic fitting routine to
calculate broadband model parameters from experimental data. This makes importing experimental data
much easier, since manually calculating model parameters can be very difficult. See Material database 216 for
more information.

Improved material database GUI


The Material Database interface has been completely redesigned and simplified. The Database provides an
interface to modify the properties of existing materials and to add new materials. The Material Explorer is used
to view the index/permittivity profile of material in the database. See the Material database 216 chapter for
more information.

Expanded list of material data


The number of materials included in the Material Database has been increased. Co, Cr, Cu, Ge, In, Ni, Pt, Ti,
W, AlN, GaAs, H20 are some of the new materials. The frequency range of the data has also been expanded.
Most materials have data at least from deep UV to far infrared.

2003 - 2016 Lumerical Solutions, Inc


188 Lumerical Knowledge Base

Spectral averaging
The Spectral averaging feature of Power and Profile monitors calculates the incoherent spectral average of the
electromagnetic fields or the Poynting vector as the simulation runs. The technique is much more efficient
than measuring many frequencies and averaging after the simulation.

Two types of averaging are available. Total spectral averaging uses the source input spectrum as the
weighting function. This is most useful when the source spectrum of the simulation matches the actual
illumination conditions. Partial spectral averaging uses a Lorentzian weighting function multiplied by
the source spectrum. Partial spectral averaging is useful to extract the average response of the system to a
variety of different illumination conditions from a single simulation.
See the Spectral averaging 120 section of the Units and Normalization chapter for more details.

More far field analysis


A number of new far field projection and grating script functions have been added. Three of the new functions
are described here. For more information, see the far field function section of the Reference Guide: Near to far
field projections 126 .

The farfield3dintegrate function makes integrating portions of the far field much easier.
The farfieldspherical function converts direction cosine units (returned from the far field projection
functions) into more familiar spherical coordinates.
The gratingvector function can be used to study the polarization of grating orders of periodic structures.

GUI upgrade
The entire Graphical User Interface has been updated. It is now possible to undock individual sub-windows
from the main application. This can be very helpful when trying to make one sub-window very large. Another
new feature is the ability to show/hide and rearrange toolbars.

User defined source signals


The source time signal is normally generated by FDTD Solutions based on the frequency range specified by
the user. While the automatically generated pulse is usually appropriate, there are some simulations where a
custom source time signal is desirable. FDTD Solutions 6.0 now supports user defined source time signals.
See the script command setsourcesignal 1580 for more information.

Shorter source pulses


FDTD Solutions 6.0 uses a new algorithm to generate the source time pulse from the frequency range
specified by the user. The new algorithm generates a much shorter time pulse, while still ensuring that most
of the pulse energy is contained within the frequencies of interest.

The total simulation time of many simulations is dominated by the source pulse length. These simulations will
experience a significant speedup because of the shorter pulse. Simulations with resonant structures, where
the total simulation time is not dominated by the source pulse length, will not experience this speedup.

Unicode characters
FDTD Solutions now supports Unicode file names and file paths. This allows users to work in directories and
save simulation files with names that include characters from Japanese, Chinese, or other languages that are
supported by the Unicode format.

New features in version 5.1

GDSII import
FDTD Solutions can now import GDSII files. The GDSII files use a standard data format to store 2D geometric
data. These files can be imported to create complex multi-layered structures in your simulations.

Improved figure windows

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 189

Control over the figure window color map has been expanded. The color map limits can now be adjusted. This
is useful when creating several images with a consistent color map. A grey scale color map is also available,
which is useful when creating figures to be printed in black and white.

n and k import
The import structure, used to import physical structure data from a file, has been expanded. Refractive index
(n and k) data as a function of space (3D) can be imported from a file or matrix.

Set view and orbit


The setview command gives the user complete control over the perspective view window. The orbit
command will view the current simulation objects in an elliptical orbit. This can make viewing the simulation
objects easier. Movies of the orbits can also be created.

Surface imports
The import structure, used to import physical structure data from a file, has been expanded. Surface data of
the form y = f(x) or z = f(x,y) can be imported from a file or matrix. This data can be generated from an
analytic formula or from an experimental source such as an AFM.

Windows Vista support


Windows Vista has been added to the list of supported systems. For details on installing the correct version
for your hardware and operating system (OS), please see the Installation Manuals.

New features in version 5.0

Graded mesh
FDTD Solutions now supports a non-uniform, or graded, mesh. This can dramatically increase speed and
accuracy for many problems, as well as reducing the memory requirements.

Polygon and triangle primitives


FDTD Solutions now supports extruded N-sided polygons and triangles.

Quadrics and Infinipath interconnects


FDTD Solutions now supports even more high performance computing (HPC) networking interconnects,
including Quadrics and Infinipath. Please see the Installation Manual for details on configuring your installation
for your HPC hardware.

Native support for the Windows x64 platform


FDTD Solutions has added a full Windows x64 application to the current Windows 32-bit and Linux 32- and 64-
bit versions. For details on installing the correct version for your hardware and operating system (OS), please
see the Installation Manuals.

Easier installation of parallel FDTD Solutions


Get your parallel FDTD Solutions up and running faster! The easy installation lets you immediately take full
advantage of your multi-core and multiprocessor systems, as well as larger scale clusters.

Meshing improvements
Each physical structure primitive can control its own mesh order (priority), making it easier to draw complex,
overlapping structures. Advanced users can now store the mesh from previous simulations and re-use it to
save meshing time.

Faster drawing modes for all primitives


All physical structure primitives now support wireframe, vertex wireframe and pixel drawing modes which can
make the manipulation of large numbers of primitives more convenient in the Layout Editor.

2003 - 2016 Lumerical Solutions, Inc


190 Lumerical Knowledge Base

Simulation auto shutoff


Simulations can detect when the electromagnetic fields have decayed and automatically terminate the
simulation early.

Improved movie monitors


The movie monitors now support mpeg movies of |E|2 and |H|2 and well as the usual electromagnetic field
components. The user can now choose the final movie resolution in pixels for better viewing.

New features in version 4.0


Faster Simulations
FDTD Solutions has been optimized to speed up simulations and use less memory. Version 4.0 typically runs
from four to ten times faster than previous versions for the same simulations and uses about half the memory!
The actual speedup that you achieve will depend on your simulation settings and specific computer hardware.

Surface Objects
There is a new surface object primitive that allows conic shapes, polynomial surfaces, as well as any custom
surface defined by an analytic equation of the form z = f(x,y).

Smoother Far Field Projections


When projecting to far fields, there is often an unphysical ripple due to clipping of the small, but non-zero fields
at the edges of the simulation. These ripples can be removed by appropriate filtering, making it easier to see
the distribution of light in the far field.

New features in version 3.2

Import images to create physical structures


FDTD Solutions can now import images, such as SEM images, to create two and three dimensional
structures.

Diffraction limited spots from thin lens structures


Fully-vectorial, tightly focussed beam sources coming from thin lens structures are now available in FDTD
Solutions.

Grating functions to calculate the strengths of each order of transmission and


reflections gratings
New script functions allow you to calculate the strengths of grating orders for arbitrary input angles.

Anisotropic materials
FDTD Solutions can now handle anisotropic materials.

Improved materials database interface


The new materials database interface and scripting commands makes it easier to verify your material settings.

New features in version 3.1

Sophisticated scripting language


FDTD Solutions now supports a sophisticated scripting language, which can be used to automate simulation
and analysis, while allow for more complicated analysis to be performed.

Interface with Breault Research Organizations ray-tracing package ASAP


In Release 3.1, FDTD Solutions can now exchange electric-field information with BROs ASAP 2005, allowing
designers to exchange field information between the macroscale optical modeling environment of ASAP with

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 191

the microscale optical modeling environment of FDTD Solutions.

Enhanced specification of source parameters


It is now easier to visualize the frequency- and time-domain profiles of the sources used in your simulation.
Within the source edit windows, plots now update to show the frequency content of your source and the
temporal profile of the injected pulse.

Bloch boundary conditions


FDTD Solutions now supports Bloch boundary conditions.

Improved technical specifications


Major enhancements to the way in which sources are injected have resulted in marked improvements in the
technical specifications of the product.

Physical object rotation


For increased flexibility in creating physical structures, physical primitives can now be rotated in both two and
three dimensions.

Surfaces of revolution
The custom primitive, which uses parametrized equations to define it surface, can be either extruded in one
dimension, or rotated about an axis to create a cylindrically-symmetric surface of revolution.

Broadband simulation
Radiation sources can now be designated as standard sources with a constant optical carrier frequency, or
broadband sources which have a chirped optical carrier (i.e. the carrier frequency varies under the pulse
envelope). The new broadband source allows you to measure the system response across very wide frequency
ranges (i.e. 200 to 1000 THz, or across the entire near-UV visible and near-IR part of the spectrum).

Improved 3D visualization
The perspective view of the 3D layout editor, located in the upper right-hand panel, now supports zoomed views
and view rotation.

MODE Solutions
New features in version 5.0

Rotatable mode sources


MODE sources can now be injected along an angled plane by setting the rotation angles (see Sources 510 ).
Users should make sure to extend the waveguide/fiber through the PML boundaries, and make sure that the
"extend structure through pml" property under Edit MODE Simulation -> Advanced options is unselected.

Datasets
Lumerical datasets are structured data objects that collect a set of related matrices into a single convenient
object, allowing one to package raw data into meaningful results that can be easily parameterized and
visualized.

See Dataset introduction 1461 for more information.

Yield analysis tool


A new yield analysis tool is available in the Optimization and Sweeps window. The yield analysis tool gives
users the ability to run extensive Monte Carlo analysis, sweeping across multiple parameters to assess
statistical variations of circuit elements on overall circuit performance.

Please see the Yield analysis 728 example for more details.

2003 - 2016 Lumerical Solutions, Inc


192 Lumerical Knowledge Base

Material fitting improvements


The material fitting routine has been optimized to improve material fits for dispersive sampled materials with
low losses.

Other new script commands


The following script functions were added in MODE Solutions 6.0. For more information, see the function
descriptions in the scripting section of the Reference Guide.
. operator, addattribute, addparameter, eig, debug, getattribute, getparameter,
getresult, getsweepresult, matrixdataset, rectilineardataset,
addmodeexpansion,mult, permute, integrate2, reshape, updatesourcemode,
updatemodes, seteigensolver, geteigensolver, clearmodedata, lookupread,
lookupwrite, lookupopen, lookupclose

Propagator
In addition to the eigensolver, MODE 5 contains an propagator. Lumericals 2.5D propagator is based on a fully
vectorial and physically rigourous method to collapse a 3D geometry into a 2D simulation, making it possible
to solve the 2D geometry quickly using FDTD. The propagator allows for planar propagation without any
assumptions about an optical axis, which allows for structures like photonic crystal cavities and ring
resonators to be efficiency handled

For an overview of the 2.5D Propagator, see the Lumericals 2.5D FDTD Propagation Method whitepaper on our
website. For step by step instructions for a simple use case for the propagator, please see the Getting
Started examples. In addition, the online help contains application examples which use the propagator.

3D Drawing environment with a rotating eigenmode solver


The drawing environment for MODE 5 is now 3 dimensional. The 1 and 2 dimensional eigenmode solver can
now be oriented along either the x, y or z axes.

A 2 dimensional drawing mode is provided so that it is possible to work only with a 2 dimensional slice of the
structure. The 2 dimensional drawing mode looks very similar to the 2 dimensional drawing environment from
MODE 4.

Shared CAD environment for eigensolver and propagator


The eigenmode solver and the propagator share the same CAD environment. It is possible to add both an
eigenmode solver and a propagation region to the simulation simultaneously. At any particular time only one of
the solvers will be active. See the CAD layout editor 197 section of the Reference Guide for more details.

Object tree browser


All of the objects in a simulation will be depicted in a list in the object tree browser. The objects may be easily
edited, grouped or set to active/inactive using the object tree browser. For the eigensolver the modes,
frequencysweep and refractive index data can now also be seen on the objects tree. For more information, see
the object tree 208 and object library 210 section of the Layout editor chapter.

Optimization/Sweeps
MODE 5 contains built in parameter sweeps and optimization routines. These routines make it possible to
sweep parameters such as structure sizes or bend radii through an easy to use graphical interface.

For examples of how to use the parameter sweeps, refer to the Getting Started Examples. In addition, more
information can be found in the Running Simulation chapter of the reference and online user guides.

Job Manager
The job manager provides a convenient way to run multiple simulations, and send those simulations out to any
computers on the network. You can use script commands to add multiple simulations (ie different .lms files) to
a job queue. The links for the script commands can be found under the new script commands heading below.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 193

Eigenmode solver uses multi-threaded libraries


The eigenmode solver now makes uses of multi-threaded libraries. If you search for modes on a multiple core
computer, you will be able to see that MODE 5 will use multiple cores.

Improved material fitting for low loss materials


The material fitting routine has been optimized to improve material fits for dispersive sampled materials with
low losses.

Fully Vectorial thin lens beam source


The overlap analysis tab for the eigenmode solver now contains a thin lens beam source. Details regarding the
settings and references can be found on the sources 510 page.

New features in version 4.0

Conformal mesh
Achieve higher accuracy for a given mesh size with conformal meshing. The conformal meshing technique can
resolve interfaces to much higher precision than the standard staircase meshing, making it an ideal method to
solve structures with thin layers, curved surfaces and high index contrast materials, such as surface plasmon
or silicon on insulator waveguides.

MAC OS X support
Mac OS X v10.5 Leopard and above has been added to the list of supported systems. For installation
instructions, see the MAC Installation Manual 58 .

Windows 7 support
Windows 7 has been added to the list of supported systems. For installation instructions, see the Windows
Installation Manual 17 .

Structure groups
The ability to group structures is one of the main new features in MODE 4. Groups can be moved, rotated and
copied as a single object. In addition to simple grouping, it is possible to create parameterized group-objects
by adding script code to the group.

For example, it is possible to create a Photonic Crystal Array group with a Pitch input parameter. When the
Pitch parameter is changed, all objects in the group will automatically move to the appropriate position. For
an example of how to create and use a group see the Photonic Crystal fiber tutorial 1770 in the Getting Started
guide.

Object tree browser


The object tree browser provides an alternate view of objects within a simulation. It is especially useful for
complicated simulations with many overlapping objects. In such cases, it is much easier to select objects
from the tree view than directly in the graphical view ports. It also makes selecting objects within groups
possible. For more information, see the layout editor tabs and object tree 208 section of the Layout editor
chapter.

Built in script file editor and syntax highlighting


The Script file editor allows you to create, edit, and run script files directly from within MODE Solutions, rather
than using another text editor like Notepad. The Run Script button makes running the script quick and easy.
Syntax highlighting makes it easier to read, write and debug script files (Comments are green, strings are red,
and loop/control statements are blue). For more information, see the script prompt and script file editor 211
page in the Layout editor section.

Copy and Paste


MODE Solutions now supports Copy and Paste operations. This allows you to copy (Ctrl-C) a group of

2003 - 2016 Lumerical Solutions, Inc


194 Lumerical Knowledge Base

objects from one simulation and paste (Ctrl-V) a copy of those objects into a different simulation. This is
especially useful with the new structure groups.

New script commands


The following script functions were added in MODE Solutions 4.0. For more information, see the function
description in the scripting section of the Reference Guide.
system, almostequal, not, square brackets, single quotes, format,
addstructuregroup, adduserprop, addtogroup, getmaterial, havedata, layoutmode,
runwizard, wizardgetdata, setplot, getcommands, mod, setanalysis

In addition, near to far field projections and grating calculation script functions have been added. For more
details, see the Near to Far Field 126 and Grating Order 1666 sections in the scripting chapter of the Reference
Guide.

Online Help search bar


The Online Help search toolbar provides easy access to the MODE Solutions Online Help website. The
toolbar will open your default web browser and search the Online Help for the requested term. This is
particularly useful when searching for script function syntax. For more information, see the toolbars 199 page
in the layout editor section.

Simplified installation
Simplified licensing: The USB hardware keys now contain much of the licensing information (expiry dates,
quotas). In many cases, license files are no longer required.

Matlab script integration: FDTD Solutions automatically detects MATLAB. The MATLAB script integration
step of the FDTD installation has been removed.

MATLAB is a registered trademark of The Mathworks, Inc.

Completely new material database


The material database has been completely redesigned in MODE 4. The Database provides an interface to
modify the properties of existing materials and to add new materials. The Material Explorer is used to view the
index/permittivity profile of material in the database. See the Material Database chapter for more information.

It's possible to define materials directly from simple models like Plasma or Lorentz, from a table of
experimental (n,k) data, and from an automatically generated model based on a table of experimental (n,k)
data. The number of materials included in the Material Database has been increased. Co, Cr, Cu, Ge, In, Ni,
Pt, Ti, W, AlN, GaAs, H20 are some of the new materials. The frequency range of the data has also been
expanded. Most materials have data at least from deep UV to far infrared.

The MODE material database is now compatible with the material database in FDTD 6.5.

GUI upgrade
The entire Graphical User Interface has been updated. It is now possible to undock individual sub-windows
from the main application. This can be very helpful when trying to make one sub-window very large. Another
new feature is the ability to show/hide and rearrange toolbars 199 .

Unicode characters
MODE Solutions now supports Unicode file names and file paths. This allows users to work in directories and
save simulation files with names that include characters from Japanese, Chinese, or other languages that are
supported by the Unicode format.

New features in version 3.0

GDSII import

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 195

MODE Solutions can now import GDSII files. The GDSII files use a standard data format to store 2D
geometric data. These files can be imported to create complex multi-layered structures in your simulations.
For more information, see the GDS Import 480 section.

Graded mesh
MODE Solutions now supports a non-uniform, or graded, mesh. This can dramatically increase speed and
accuracy for many problems, as well as reducing the memory requirements. For more information, please see
Non uniform mesh 455 .

Improved figure windows


Control over the figure window color map has been expanded. The color map limits can now be adjusted. This
is useful when creating several images with a consistent color map. A grey scale color map is also available,
which is useful when creating figures to be printed in black and white.

n and k import
The import structure, used to import physical structure data from a file, has been expanded. Refractive index
(n and k) data as a function of space can be imported from a file or matrix. See the Import primitives 492
section.

Native support for Win x64


MODE Solutions has added a full Windows x64 application to the current Windows 32-bit and Linux 32- and
64-bit versions. For details on installing the correct version for your hardware and operating system (OS),
please see the Installation Manuals.

Online help
The MODE Solutions Online Help is now available. This resource contains up to date copies of the Installation
Manuals, Getting Started Guide and Reference Guide. All content is fully searchable. The online help also
contains a number of example simulation and script files. New information and examples are constantly being
added to the online help.

Polygon primitives
MODE Solutions now supports extruded N-sided polygons and triangles.

Surface imports
The import structure, used to import physical structure data from a file, has been expanded. Surface data of
the form y = f(x) or z = f(x,y) can be imported from a file or matrix. This data can be generated from an
analytic formula or from an experimental source such as an AFM. See the Import primitives 489 section.

Windows Vista support


Windows Vista has been added to the list of supported systems. For details on installing the correct version
for your hardware and operating system (OS), please see the Installation Manuals.

New features in version 2.0

Sophisticated scripting language


MODE Solutions now supports a sophisticated scripting language, which can be used to automate simulation
and analysis. It also allows more complicated analysis to be performed. For a detailed description, please
see the scripting language 1383 chapter.

SEM data import


Structure profiles can now be imported into a special simulation primitive. This allows the user to define a
binary refractive index distribution from, say, an SEM image or other image. For more details, see the Import
primitives 480 section.

2003 - 2016 Lumerical Solutions, Inc


196 Lumerical Knowledge Base

Mode tracker
MODE Solutions can track individual modes of complex waveguides and fibers. This makes it easy to
calculate group delay and dispersion for waveguides and fibers that support many modes. For more details,
see the Frequency analysis 773 section.

Mode searcher
MODE Solutions can search for modes near a desired effective index, or search for modes over a range of
effective indices. This makes it easy to find modes of complex waveguide or fiber geometries, including
photonic crystal fiber. For more details, please see the Modal analysis 768 section.

Comprehensive material models


Full material dispersion models can now be incorporated into simulation projects. See theMaterial database
216 section.

Waveguide bend calculations


MODE Solutions has a new waveguide bend calculation. You can easily set a radius of curvature for any
waveguide. This allows the user to calculate coupling efficiencies from straight sections to bent sections, as
well as calculate the losses due to bending. See the Modal analysis 768 section.

Overlap calculations
Overlap calculations can now be performed with Gaussian beams, modes calculated for other waveguides, and
even with arbitrary fields imported from ASAP.

Interface with ASAP


Mode profiles can be imported to and from ASAP, an advanced ray tracing software available from Breault
Research Organization (BRO). For more details, please see the File I/O section.

Angular far field projections


MODE Solutions now displays far field projections as function of angle as well as projecting to planar surfaces.
You can calculate the power in a desired angular cone by simply dragging the mouse! See the Modal
analysis 768 section.

DEVICE
New features in version 1.5

New solver option


In the initial versions of the software, the Gummels method was used in the solver, in which the voltage and
charge were solved sequentially (one was used as a input to the other) until the two were consistent. In
DEVICE 1.5, the Newton solver has been introduced, which solves for the charge and voltage simultaneously.
The Newton solver is more sensitive to the initial conditions (it may not converge), but will converge much
faster for a wider variety of problems if its given a good initial guess.

Advanced contact models

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 197

Several modifications have


been made to the contact
models for DEVICE:
Lumped element loads
(R and C) can now be
added on device
terminals.
Custom specification of
DC sweep bias voltages
is available.
Non-ohmic contacts will
use a Schottky barrier
model accounting for
barrier lowering due to
the applied electric
field.

Adaptive transient simulation


Transient simulations now employ adaptive time-stepping to optimally vary the simulation interval while
maintaining accuracy. Coupled with the full Newton solver, a wider variety of transient simulations can now be
performed efficiently with DEVICE. To view the new settings associated with the transient simulation, consult
the "Transient" tab in the Device region properties. Here, the user may specify time step constraints, down-
sampling, and shuttering for optical generation objects.

Results selection
In the Device region properties, users now how the option to retain a reduced set of spatial data. Under the
"Results" tab, a list of all available results can be viewed, and may be toggled on or off to reduce memory
requirements. By default all results are included.

5.2 Layout Editor


This section describes the general operations of running a simulation and performing an analysis. Information on how
to set up optimization and parameter sweep projects is also described here. The contents are organization into the
following chapters. For more information on datasets, see Introduction to datasets 1461 in the Scripting chapter.

Main Title Bar 198


Toolbars 199
View ports 208
Object Tree 208
Object Library 210
Results View 210
Optimization and Sweeps 210
Script Prompt and Script Editor 211
Script Workspace and Script Favorites 211

Changing the CAD layout 211


Resource Manager 213
Running a simulation 213

2003 - 2016 Lumerical Solutions, Inc


198 Lumerical Knowledge Base

Work Flow and Layout Editor (YouTube)


Alternative video source in Mandarin, click here

5.2.1 Main Title Bar


The menus on the main title bar are listed below. If any of the options can be selected using a button on a toolbar,
the icon is drawn to the left of the name. Similarly, shortcut keys are located to the right.

File
The file menu includes options to create, save and load simulation files. The Import menu allows users to import
structural data stored in GDSII files 480 .

Edit
The edit menu allows users to undo/redo their actions, and to copy/paste/edit object in the simulation.

View
The view menu provides options to control the layout and visibility windows and toolbars.

Setting
This setting menu contains options to change the unit setting within the graphical interface. These option only apply

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 199

to the GUI. Scripts always use SI units.

Simulation
This menu contains settings for configuring resources and running simulations. In DEVICE this also provides the
option to lock the mesh.

Help
The help menu provides links to the online knowledge base, and local PDF copies of the product documentation. It
allows the user to check which version of the software is installed and whether Matlab integration is active. If a
proxy is necessary for connection to the internet, the proxy settings can also be set from the Help menu.

5.2.2 Toolbars
The following sections describe the various toolbars. Toolbars visibility can be controlled in the View - Toolbars
menu.

5.2.2.1 Main
The main toolbar contains buttons to add various Simulation objects 314 , open the Material database 216 and import
files, as described below. When available, clicking the arrow to the right of the icon expands a drop-down menu
containing related buttons. If one of the related buttons is pressed, it replaces the default button in the toolbar. See
the Simulation objects 314 chapter for information about specific objects.

Material Database
This button opens material database window.

Interfaces 280 (DEVICE only)


This button open the Material Interfaces window in DEVICE.

Structures
This button will insert the shown structure primitive into the simulation. Pressing the arrow will show all available
primitives.

Attributes 399 (Optical solvers only)


In FDTD Solutions and MODE Solutions, this button will insert the shown grid attribute into the simulation. Pressing
the arrow will show all available primitives.

Components 413 (Optical solvers only)


In FDTD Solutions and MODE Solutions, this button will open the component object library window. Pressing the
arrow will show common component categories that the library window can open with.

Groups
This button will add an analysis, container or structure group into the simulation. Pressing the arrow will allow
selection of which group to add.

2003 - 2016 Lumerical Solutions, Inc


200 Lumerical Knowledge Base

Simulation
This button will insert simulation or mesh override regions. Pressing the arrow will allow selection of which
simulation object to add.

Analysis 479 (Optical solvers only)


In FDTD Solutions and MODE Solutions, this button will open the component object library window. Pressing the
arrow will show common analysis categories that the library window can open with.

Import
This button will open a window for importing files from other programs. Pressing the arrow will allow selection of
which kind of import.

Layer Builder
This button will add a Layer Builder group which will allow you to import GDS structure data and manipulate the
layers of the structure from the graphical user interface.

Mesh Constraint (DEVICE only)


This button adds a mesh constraint to the simulation region. If only the CHARGE solver is present then it adds a
'Charge transport solver mesh constraint' and if only the HEAT solver is present then it adds a 'Heat transport solver
mesh constraint.' If both solvers are present then it provides both options.

Sources 510 (Optical solvers only)


In FDTD Solutions and MODE Solutions, this button will insert different sources into the simulation. Pressing the
arrow will allow selection of which source to add.

Monitors
This button will insert various monitors into the simulation. Pressing the arrow will allow selection of which monitor
to add.

EME Port 436 (EME only)


In MODE Solutions, when there is an active EME solver region, this button will add additional ports to the solver
region.

Doping 678 (CHARGE only)


When there is an active CHARGE solver region, this button will insert various doping regions into the simulation.
Pressing the arrow will allow selection of which monitor to add.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 201

Sources 679 (CHARGE only)


When there is an active CHARGE solver region, this button will insert various generation rate objects into the
simulation. Pressing the arrow will allow selection of which monitor to add.

Sources 692 (HEAT only)


When there is an active Heat solver region, this button will insert various doping regions into the simulation.
Pressing the arrow will allow selection of which monitor to add.

5.2.2.2 Edit
The edit toolbar contains tools used to copy, delete, or modify settings of simulation objects. 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.

Edit properties (E)


This command opens the edit properties window. See the Simulation objects 314 chapter for information about
specific properties for each object.

Tip: Group edit of multiple objects


The properties of multiple structure objects can be edited together by selecting multiple objects prior to
entering edit mode. This option to edit multiple objects is only available for structure objects, not sources or
monitors. Any properties which are identical between all of the selected objects results in the common value being
displayed in the edit dialog box.

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 distance in each of the x,y,z
dimensions. A pop-up window appears with 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 properties :


A1 LATTICE: the distance between adjacent elements in the a1 direction
A2 LATTICE: the distance between adjacent elements 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: the number of rows and columns that comprise the array.
AZ LATTICE: the distance between adjacent 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 parameters in the edit window below produce the resulting array shown in the diagram.

2003 - 2016 Lumerical Solutions, Inc


202 Lumerical Knowledge Base

Delete (Del)
The delete command removes the currently selected object, or objects, from the simulation.

5.2.2.3 Mouse mode


The mouse mode allows you to control the behavior of the mouse. Depending on the mode, the user can edit
objects, pan or zoom in the view ports or measure the distance from one point to another. When applicable, the
shortcut key used to run the function from the keyboard is given in brackets next to the name of the tool. Only one
mouse mode may be selected at a time.

Select (S)
This function 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 mouse is in select mode or not).

For reference, the current location of the mouse within the view ports is shown in the field at the bottom right-hand
corner of the CAD window (see the image below). The < and > buttons at the right decrease or increase the number
of decimal places shown.

Changing aspect ratio settings


A feature available when in the select mode is changing aspect ratio settings. Right click in one of the view
windows to see the menu, and then select Change aspect ratio settings.

Zoom (Z)
This function sets the mouse to be in the zoom mode. The default aspect ratio of the XY view and perspective views
are locked at 1:1, which means circles always appear round (rather than as ovals). The aspect ratio for the XZ and
YZ is not locked. Use the left click to zoom in and the right click to zoom out. To zoom to a particular area, drag
diagonally across the desired region. Finally, double clicking either button zooms to extent. To adjust the view, it's
easiest to set the XY view first, then adjust the Z view in the XZ or YZ views.

Pan view (P)


The pan view mode allows the user to drag the view in the plane of the view port. In the Perspective window, the pan
mode is used to rotate the view.

Scrolling in the view ports


The other method of adjusting the view ports is by using the arrow buttons on your keyboard. Each press of a
button results in the view shifting in the direction indicated by the arrow.

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

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 203

(A) and released (B). The distances are given in the lower left-hand corner of the CAD window (see the image
below). 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. For more information, please visit getting the mesh size 440 .

5.2.2.4 View
The view toolbar contains tools to zoom to the extents of objects, edit grid settings and view the mesh used for the
simulation. When applicable, the shortcut key used to run the function from the keyboard is given in brackets next to
the name of the tool.

Zoom Extent (X)


Selecting this tool centers and scales the view ports around the selected simulation objects. For instance, pressing
zoom extent while a structure is selected arranges the view such that only the structure are shown, while other
simulation objects may appear outside the extent of the view. When no objects are selected, pressing this button
zooms to the the largest object in the model. This function is also accessed via double-clicking either the left- or
right-hand mouse button while in zoom mode.

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 grid lines in the a1 direction
A2 LATTICE: the distance between grid lines in the a2 direction
AZ LATTICED: the distance between grid lines 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

View simulation mesh (optical solvers only)


In FDTD Solutions and MODE Solutions, selecting the "View simulation mesh" button will show the simulation
mesh. For visibility of other objects, it is usually turned off. Because recalculating the mesh is somewhat
computationally intensive, it is not continuously updated. For example, the mesh will not update immediately if a
physical structure is moved. To have FDTD Solutions recalculate the mesh, click the "Recalculate simulation mesh
button", located next to the "View simulation mesh" button. The mesh is always recalculated before a simulation
starts. For more information, please visit getting the mesh size 440 .

Recalculate simulation mesh (F5) (optical solvers only)


Mesh generation is too computationally intensive to be done constantly as the simulation setup is modified. If you
wish to see the current mesh, use this option to update and recalculate the mesh. The mesh is always recalculated
before running a simulation.

5.2.2.5 Simulation
The simulation tools are:

Resources
Opens the resource configuration manager 213 . This window can add/remove and enable/disable computational
resources. It also contains a useful configuration test tool to check the resource setup.

2003 - 2016 Lumerical Solutions, Inc


204 Lumerical Knowledge Base

Check memory requirements


In FDTD Solutions and MODE Solutions, this function will estimate the memory requirements for the current
simulation. The total requirements are broken down into categories such as Simulation fields and Monitor data.

Material Explorer
In FDTD Solutions and MODE Solutions, the Materials Explorer can be used to check the material's optical
properties that will be used in a simulation. For more information, please see the section on Material Explorer 220 .

Run
In FDTD Solutions this button will run the current simulation in parallel mode. For more information on how to run
simulation, see Running a simulation 213 .

In MODE Soluitons, if Eigenmode solver is the active solver, this opens the MODE Analysis 768 window. If
Propagator is the active solver, this will run the current propagator simulation (see Running a simulation) 213 .

In DEVICE, if only one solver is present then this button will run that solver (CHARGE or HEAT). If both solvers are
present then it will provide a drop down menu with both options.

Run scripts
This function will allow the user to run a Lumerical script file (*.lsf) to perform automated commands such as
plotting and saving data. 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 the button on the toolbar brings up an open file
dialog. Pressing the button in the script editor runs the script that is selected in the editor window.

Switch to layout editor


This function returns the simulation environment from analysis mode back to the layout editor mode. If you switch to
layout editor and then save the file, the data from the simulation will be overwritten and lost.

5.2.2.6 Alignment
The following is only available in FDTD and MODE:
In FDTD Solutions and MODE Solutions, the alignment toolbar provides options to control the relative alignment of
simulation objects. The alignment tool consists of six buttons that control the way in which objects can be
accurately positioned with respect to other objects. The buttons are described, from top to bottom, below and
include an example of their operation.

Solvers 101

FDTD
FDE
VarFDTD
See also
Structures 318
Toolbars 199

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 205

To demonstrate their operation, first create a rectangular object, a circle, and a ring by pressing those three buttons
in the Structures drop down menu and move the ring to the lower left of the rectangle, and the circle to the upper
right of the rectangle. The figure below shows the location of the buttons used to align, center, or stack the test
objects that were just created:

Procedure
To use the alignment functions, first select a reference object (the rectangle in the screenshot below). The first
button on the toolbar is used to select the reference object. Next, select another object and use one of the
alignment options to align the second object with respect to the first. In the following screenshot, the top edge of the
circular objects were aligned with the top edge of the rectangle.

2003 - 2016 Lumerical Solutions, Inc


206 Lumerical Knowledge Base

X/Y/Z: These indicators set which axis the positioning


will happen along. Each direction button opens up four
options and will align the selected object to the fixed
object according to the specified edge.

FIXED: This button sets which object the other objects


are positioned relative to. We select the rectangular
object with the mouse, and then press the FIXED button
to designate it as the reference object. When fixed, the
object will be outlined in red.

or
LOWER: This button moves all of the selected objects
to align with the lower or left edge of the fixed object.
Select either the ring and the circle or all three objects,
and press the LOWER button. Note that the result has
the left-most part of the ring and the circle aligned with
the left-hand edge of the rectangle.

or
MIDDLE: This button moves all the selected objects to
align with the center of the fixed object. Select all of the
objects, and press the MIDDLE button. Note that the
result is centered along the x-axis, with the fixed object
unmoved.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 207

or
UPPER: This button moves all the selected objects to
align with the upper or right edge of the fixed object.
Select the ring and the circle, and press the UPPER
button. Note that the result has the right-most part of the
ring and the circle aligned with the right-hand edge of the
rectangle.

or
STACK: The stack button moves objects along the
working axis (here, x) so that they are just touch one
another, resulting in a series of stacked objects. The
ordering of objects is determined by their center
locations: if you want to stack the ring, rectangle, and
circle in that order from left to right, just move the ring so
its center lies left of the rectangles center and move the
circle so its center is just right of the rectangles center.
Select all of the objects, and press the stack button:
Now, to better see that the objects are just touching one
another, use the middle button in the y-direction. The
result should be what is seen in the image to the left.

5.2.2.7 Search bar


The search toolbar can be used to quickly search for topics in the online product documentation knowledge base.
This will bring up the search results in a new tab in your default browser.

Online help toolbar


Search the online knowledge base for the specified term. Requires internet connection. If an internet connection is
not available, some product documentation is available in the Help - Reference Guide menu.

2003 - 2016 Lumerical Solutions, Inc


208 Lumerical Knowledge Base

5.2.3 View Ports


The view ports show a graphical representation of the
simulation from an XY, XZ, YZ and 3D perspective view.

Depending on the current mouse mode, the mouse pointer


will either have the shape of an arrow (select), a hand (pan),
a magnifying glass (zoom) or a ruler (measurement). You
can toggle between these options with the mouse mode
toolbar. When objects are selected, the vertices are drawn
with red squares (also, the object will be highlighted in the
Object tree. It is possible to copy and paste selected
objects between different CAD windows using the standard
Ctrl+C and Ctrl+V shortcut keys.

5.2.4 Objects Tree


As previously discussed, a simulation requires that the user define a set of
objects, simulation region, sources and monitors. As a complete setup may
contain a large number of objects, the object tree was designed to allow for
organization and easy selection. All simulation objects are within the group,
model, which represents the current simulation. Within 'model', objects are
listed as they are inserted by the user. Press F2 or double-click to change
the name.

To move the objects up and down the tree as well as into groups, we use the orange arrows at the top of the window.
The up and down arrows shift the objects relative to each other, while the left and right arrows move them out of and
into groups. To add groups, we use the button called groups in the main toolbar. Structure groups can only contain
structures and likewise, analysis groups can only contain monitors. See the online user guide section for more
information and examples about Structure groups 389 and Analysis groups 479 . The third group, "Containers" act like
folders and can hold any type of object. In the image above, the 'Sources/Monitors' container group has both
individual sources and monitors as well as an analysis group.

Note that there are buttons with green crosses at the top of the objects tree. These buttons can be used to hide or
display certain types of objects. When objects are selected, they are highlighted blue in the objects tree and the
vertices are marked with red squares in the view ports. Objects can always be selected by left-clicking on their name
in the object tree or edited by right-clicking. Using the tree is the preferred method of selection especially in
complicated simulation setups with many overlapping elements. In the image above, the power monitor, above, is
selected.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 209

5.2.4.1 Enable/Disable Simulation Object

User can enable/disable simulation objects by right-clicking on each and selecting "Enable/Disable". Disabled
simulation objects will remain in the object tree (and can be re-enabled), they will have no effect on the
simulation.

MODE Solutions has more than one type of simulation regions corresponding to the different types of solvers.
Only one active region is permitted at one time, and one can set a solver "active" by right-clicking on the solver
region and selecting "Set as active". Once a solver is set as active, others will be automatically "disabled" and
removed both from CAD and the actual simulation. In MODE solutions, specific solver can be set as the active
solver using the script command setactivesolver 1588 .

See also
setactivesolver 1588

2003 - 2016 Lumerical Solutions, Inc


210 Lumerical Knowledge Base

5.2.5 Object Library


In FDTD Solutions and MODE Solutions, the object tree and the object library windows help organize and find
simulation objects.

The object library provides additional


simulation objects that can be used
in your simulations. The center
portion of the window shows the
available objects in a tree format.
When selected by the mouse, a
larger image of the object is
displayed at the bottom along with
its object tree ID name and a more
detailed description. To insert an
object into the simulation, simply
double-click the object and click the
insert button at the bottom of the
window. The object library can be
opened to specific categories by
choosing any option in the
components or analysis button in the
main toolbar. For users who are not
connected to the Internet, the library
will switch to Offline mode, which
accesses a reduced version of library
included with the local installation.At
the bottom-right of the window, it will
indicate whether you are using the Some complex structures in the Analysis groups in the Object Library
local copy of the library (Offline) or Object Library 353 798

viewing the online version (Online). Structures in the Object Library are Analysis objects in the Object
organized by Structure Groups 389 Library are organized by Analysis
Groups 393

CATEGORY: Choose to only display components of a certain category (e.g. extruded polygon, photonic crystals)
TYPE: Choose to display the type of simulation object (e.g. structures, analysis groups)
KEYWORDS: The object window will only show objects that match your keyword (e.g. hemisphere, waveguide)
RESET: Sets the category to display 'all' and deletes any text in the keywords text box
SEARCH: Activates the search for objects that match the keywords (the same function as pressing enter while in
the text box)
INSERT: Pastes the object into the simulation region centered at the current view port settings (same function as
double-clicking the object)

Note: Modifying the object library


The object library is not user-modifiable, so users cannot add or delete objects in the object library. If you would
like to re-use to your own custom object, one can copy and paste the object between the simulation files or even
across products, see interoperability 788 . If you would like to suggest an object or analysis group to Lumerical,
please email support@lumerical.com

5.2.6 Results View


See the Results Manager 736 section of the Result Analysis section for more information.

5.2.7 Optimization and Sweeps


See the Optimization and parameter sweeps 716 section for more information.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 211

5.2.8 Script Prompt and Script Editor


The scripting language is useful for setting up complex structures and doing advanced data analysis. See the
Scripting chapter for a list of all the script commands, as well as examples on how to use them.

By default the script editor is located on the right hand side of the view ports and shares the same frame as the
analysis window. When both windows are open, it is possible to toggle between the two through tabs located at the
right side of the frame. The script file editor contains buttons to create, open, save and run script files. When multiple
script files are open, pressing on the run script button runs the one in the forefront. Note that when entering scripting
code in the script file editor, each command must be followed with a semicolon.

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, then any other folders in the path, and then the directory of
the script file.

By default the script prompt is located at the bottom of the


CAD window. Script commands are executed as soon as
the ENTER button is pressed on the command line. If a
semicolon is missing at the end of the command line, it is
automatically inserted it for you. Multiple lines can be
pasted into the script prompt, and will run as in the script
editor. In this case though, only the last semicolon can be
neglected.

Script file editor


OPEN: Open a script file (.lsf)
SAVE: Save the current file
SAVE AS: Save the current file and specify the file name
RUN SCRIPT: Run the current script file

A number of additional options can be found by right clicking within the script file editor window. For example, F9 will
run the currently selected portion of script. Auto-indenting, changing font sizes, etc are also available.

5.2.9 Script Workspace and Script Favorites


See the Results Manager 736 section of the Result Analysis section for more information.

5.2.10 Boundary Conditions


In DEVICE, the Boundary Conditions window allows the user to define electrical (CHARGE Solver) and voltage or
thermal contacts (HEAT Solver) in the simulation region. See the Electrical contacts 686 or thermal boundary
conditions 694 page for details.

5.2.11 Changing the CAD layout


There are pre-defined CAD layouts that can be accessed through main title toolbar. Change between the default
layouts by selecting the drop-down menu VIEW->SET DEFAULT LAYOUT, and choosing one of them. In addition,
have control over hiding and docking location of the the windows and toolbars. The current layout is saved when
CAD closes so the next time the program is opened, your previous layout will be used.

2003 - 2016 Lumerical Solutions, Inc


212 Lumerical Knowledge Base

Hiding/showing windows and toolbars


There are two methods to hide or show windows and
toolbars
1) In the main title toolbar select VIEW->WINDOWS or
VIEW->TOOLBARS. The visible windows/toolbars have a
check mark next to their name; the hidden ones do not.
2) By clicking the right button anywhere on the main title
bar or the toolbar, the following pop up menu will show up.
As before, check marks indicate when windows and
toolbars are visible.

Moving and undocking windows


Windows can be undocked by double clicking the name
with the left mouse button. This is particularly useful when
you want to make the script file editor window larger. Non-
view-port windows 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, tabs on the sides allow
toggling between them.

Tip: To reposition an undocked window on


Linux, hold down the Alt key before
attempting to move the window.

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 indicated by a blue void.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 213

5.2.12 Resource Manager

Your computing resources can be


configured in the Resource configuration
utility.

See the installation and setup chapter of


the knowledge base for more information
on the resource configuration utility.

Resource Configuration

5.2.13 Running a simulation

Run the simulation.

You will be prompted to save the file if you


have not already done so. The Job
manager window show the status of your
jobs. Job errors can be seen by right
clicking on the job and selecting the 'View
job details' option.
Job Manager
Note: The job manager options will vary
slightly between solvers.

Job manager options


QUIT & SAVE: Stops the simulations and saves the data obtained up to that point. The program will be in
Analysis mode.
QUIT & DON'T SAVE: Stops the simulations and does not save any data. The program will be in Layout mode.
FORCE QUIT: Closes the job monitor window and forcefully terminates all simulations. This option should ONLY
be used when the other Quit options don't work properly. When simulations are stopped with Force Quit, they
may not check-in their license, meaning you may not be able to run another simulation for a significant period of
time. No simulation data will be saved.
TOTAL PROGRESS BAR: Indicates the progress of the simulations.

To access actions for each job, right-clicking anywhere on the row will bring up a context menu with the following
options:
PAUSE: the engine is signaled to go into a wait mode (it will stay running, but not consume CPU)
CONTINUE: restarts a paused job
QUIT AND SAVE: As defined above.
QUIT AND DON'T SAVE: As defined above.
FORCE QUIT: As defined above.
VIEW JOB DETAILS: Opens up a modal dialog that contains the standard output messages from the engine
processes. This is helpful for debugging problems when the job fails to run.

2003 - 2016 Lumerical Solutions, Inc


214 Lumerical Knowledge Base

FDE solver in MODE Solutions


The process for running the FDE Eigenmode solver in

MODE Solutions is slightly different than the other


solvers. Typically, the Run button simply opens the
Eigenmode Solver Analysis 749 window, rather than
actually starting the calculation. In such cases, the
calculation can be started by clicking the Calculate
modes button.

Eigensolver analysis

More information on running simulations


For more information about running Lumerical simulations, including running on clusters, using a job scheduler,
preparing batch files, and using extra engine licenses, see the Installation and setup chapter.

5.2.14 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 table provides a list of available operators and constants.

Category Syntax
Algebraic operators +, -, *, /
Trigonometric operators sin, cos, tan,
asin, acos, atan, atan2,
sinh, cosh, tanh
Power operators ^ or **, exp, log10, log, sqrt
Logical operators >, <, >=, <=, ==, !=
Other operators abs, mod
Constants c - Speed of light in m/s
pi - The value of Pi

Examples
2^10
sqrt(3)/exp(1)
sin(45*pi/180)

Index profile for <Object defined dielectric> (Optical)


In addition to the above parameters, users can user position variables when specifying the index profile of the
<Object defined dielectric> material definition. Please see graded index waveguide 2168 for example.

Examples
sin(x)^2
exp(-x^2-y^2)

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 215

Note: Formulas
The position variables here are relative to object space. (x,y,z) = (0,0,0) refers to the center of the object, not
the global coordinate frame.

5.3 Material properties


This chapter explains the Material Database for optical (FDTD and MODE solutions) and electrical (DEVICE) solvers.
See the following pages for details.

Optical materials 215 Material database (optical) 216


Material explorer (optical) 220
Material permittivity models 223
Advanced material models 243
Anisotropic materials 253
Others and simulations tips (optical) 270

DEVICE materials 276 Material database (DEVICE) 277

Material interface 280


DEVICE Material models 285
Alloy materials 304
Mesh order (DEVICE) 313

5.3.1 Optical materials


This chapter explains the optical material. See the following pages for details. Users may also find the Optical
material modeling recorded video to be helpful.

Material database (optical) 216 The Materials Database allows you to manage (create,
Default optical material database 217 modify, delete) the materials that are available for use in
Getting material data from the database 219 your simulations.
Material explorer (optical) 220 The Material Explorer is used to check the material fits
Material explorer for varFDTD 222 that will be used in the simulation.
Material permittivity models 223 This section describes the permittivity (or refractive
Creating sampled data materials 226 index) material models supported by the Material
Creating lossless materials 232 Database. See this section for information on the
n,k material model 235 available material models, such as Sampled data,
Analytic material model 239 plasma, lorentz, etc.
Importing arbitrary dispersive models 231

Advanced material models 243 Users can define their own plugin material models
Flexible material plugin framework 251 written in C++.
Anisotropic materials 253 In this section, we will provide some tips for simulations
Grid attribute tips 266 with anisotropic materials.
LC rotation 255
Permittivity rotation 261
Matrix transformation 263
Others and simulations tips (optical) 270 This section describes some miscellaneous and tips
Mesh order (optical) 271 regarding optical simulations.
Creating lossless materials 232
Simulations with Silver 274

2003 - 2016 Lumerical Solutions, Inc


216 Lumerical Knowledge Base

5.3.1.1 Material database (optical)

Objective
The Materials Database allows you to manage (create, modify, delete) the materials that are available for use in your
simulations.

See Also
Default optical material database 217
Getting material data from the database 219

Optical material modeling

Introduction
The Materials Database allows for the definition of complex materials using experimental data or parametrized
models. 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.

Import / Export
The IMPORT and EXPORT buttons allow you to transfer material data between simulation files via Material Database
Files (.mdf) files.

Material list
The material list shows the materials stored in the material database. A number of materials are provided with the
product installation. To create additional materials, use the ADD button. You can also modify some of the material
properties (name, color, mesh order, etc) in the list view. A copy of the database is stored in each simulation file. A
change to the database in one file does not automatically change the materials in any other files.

Modifying default materials


Default materials provided with the product installation are write protected, and cannot be directly modified. To
modify the properties of a default material, simply use the COPY button to duplicate the material. The copied
material is unlocked. For more info, please visit default optical material database 217 .

Note: Materials currently used in the simulation cannot be deleted.

If the material is being used in the current project, a "no delete" icon will indicate that the material can be
modified but not erased. To delete these materials, first modify the simulation so they are not used.

Material Properties
ANISOTROPY: This allows users to set diagonal anisotropy, see Anisotropic materials 253 for more information.
BASE MATERIAL: For plugin materials, this allows users to choose a base material for their plugins.
REVERT TO BASE MATERIAL FOR CONFORMAL MESH CELLS: For plugin materials, this allows the user to
use conformal mesh cells from the base material. For more information, see mesh refinement options and non-
linear simulation methodology 2718 .

Use the Material properties window to view and edit the material model parameters. For model parameter definitions,
see Material permittivity models 223 or Advanced material models (plugins) 243 .

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 217

Go to Material Explorer
To modify the material fits 272 , please use the Material Explorer 220 .

5.3.1.1.1 Default optical material database

Objective
This section provides a list of materials included in the default material database.

Associated File
usr_default.mdf

See Also
Modifying material fits 272
Importing arbitrary dispersive models 231

Introduction
The default optical material database includes refractive index data for a number of common materials. When
creating a new simulation, the default database will be loaded. The default materials cannot be edited directly.
However, if you wish to modify one of the default materials, a copy of the material needs to be created, which can
then be edited.

Accessing the material database

The material database can be accessed through the Materials button on the main toolbar. In the material
database, materials are listed in the table, which identifies the material name and type, as well as other properties.
Below the material table, the properties for the currently selected material are displayed.

Modifying the default material database


To modify the default materials that appear when you create a new simulation:

These instructions describe how to create a new Default material database:


1. Locate the defaults sub-directory of the installation. By default it will be located at:
Windows: C:\Program Files\Lumerical\FDTD\defaults
Linux: /opt/lumerical/fdtd/defaults
Mac: /Applications/Lumerical/FDTD\ Solutions/FDTD\ Solutions.app/Contents/
Resources/defaults
2. Copy the default simulation file to your desktop. Optionally, you may also want to make a backup of this
file.
3. Open the file on your desktop and make all required modifications to the material database in this file. This
might include deleting unused materials and creating new materials.
4. Copy this file back into the defaults sub-directory. This generally requires Administrator access.
5. Next time you start the product, the updated material database should appear automatically.

Materials in the default material database


The following materials are included in the default material database.

Handbook of Optical Constants of Solids I - III by E. Palik

2003 - 2016 Lumerical Solutions, Inc


218 Lumerical Knowledge Base

Ag (Silver) Handbook of Optical Constants of Solids I - III by E. Palik


Al (Aluminum) Handbook of Optical Constants of Solids I - III by E. Palik
Al2O3 (Aluminum Handbook of Optical Constants of Solids I - III by E. Palik
Oxide)
Au (Gold) Handbook of Optical Constants of Solids I - III by E. Palik
Cr (Chromium) Handbook of Optical Constants of Solids I - III by E. Palik
Cu (Copper) Handbook of Optical Constants of Solids I - III by E. Palik
Fe (Iron) Handbook of Optical Constants of Solids I - III by E. Palik
GaAs (Gallium Handbook of Optical Constants of Solids I - III by E. Palik
Arsenide)
Ge (Germanium) Handbook of Optical Constants of Solids I - III by E. Palik
H2O (Water) Handbook of Optical Constants of Solids I - III by E. Palik
In (Indium) Handbook of Optical Constants of Solids I - III by E. Palik
InAs (Indium Handbook of Optical Constants of Solids I - III by E. Palik
Arsenide)
InP (Indium Handbook of Optical Constants of Solids I - III by E. Palik
Phosphide)
Ni (Nickel) Handbook of Optical Constants of Solids I - III by E. Palik
Pd (Palladium) Handbook of Optical Constants of Solids I - III by E. Palik
Handbook of Optical Constants of Solids I - III by E. Palik
Pt (Platinum)
Rh (Rhodium) Handbook of Optical Constants of Solids I - III by E. Palik
Si (Silicon) Handbook of Optical Constants of Solids I - III by E. Palik
SiO2 (Glass) Handbook of Optical Constants of Solids I - III by E. Palik

Sn (Tin) Handbook of Optical Constants of Solids I - III by E. Palik


Ti (Titanium) Handbook of Optical Constants of Solids I - III by E. Palik
TiN (Titanium Nitride) Handbook of Optical Constants of Solids I - III by E. Palik
W (Tungsten) Handbook of Optical Constants of Solids I - III by E. Palik

CRC Handbook of Chemistry & Physics


Ag (Silver) Hagemann, H. J., Gudat, W., and Kunz, C., J. Opt. Soc. Am., 65, 742, 1975
Al (Aluminum) Shiles, E., Sasaki, T., Inokuti, M., and Smith, D. Y., Phys. Rev. Sect. B, 22, 1612, 1980
Au (Gold) Olson, C. G., Lynch, D. W., and Weaver, J. H., unpublished
Cr (Chromium) Bos, L. W., and Lynch, D. W., Phys. Rev. Sect. B, 2, 4567, 1970
Cu (Copper) Hagemann, H. J., Gudat, W., and Kunz, C., J. Opt. Soc. Am., 65, 742, 1975
Fe (Iron) Weaver, J. H., Colavita, E., Lynch, D. W., and Rosei, R., Phys. Rev. Sect. B, 19, 3850,
1979
Ge (Germanium) Potter, R. F., in HOC-I, p.465
Ni (Nickel) Lynch, D. W., Rosei, R., and Weaver, J. H., Solid State Commun., 9, 2195, 1971
Ta (Tantalum) Weaver, J. H., Lynch, D. W., and Olson, D. G., Phys. Rev. Sect. B, 10, 501, 1973
Ti (Titanium) Johnson, P. B., and Christy, R. W., Phys. Rev. Sect. B, 9, 5056, 1974

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 219

V (Vanadium) Olson, C. G., Lynch, D. W., and Weaver, J. H., unpublished


W (Tungsten) Weaver, J. H., Lynch, D. W., and Olson, C. G., Phys. Rev. Sect. B, 12, 1293, 1975

Johnson and Christy


Ag (Silver) Johnson and Christy, "Optical Constants of Noble metals", Phys Rev B, 6, 4370, (1972)
Au (Gold) Johnson and Christy, "Optical Constants of Noble metals", Phys Rev B, 6, 4370, (1972)

Other
Etch 271

PEC (Perfect Electrical


Conductor)
C (graphene) - Falkovsky (mid-
IR) 2776
Graphene 2774

5.3.1.1.2 Getting material data from the database

Objective
This section describes how to get material data from the Material database or from a material fit. It is possible to get
both the raw experimental data from the database, and the automatically generated material fit that will be used in
the simulation.

See also
Creating sampled data materials 226

getindex 1673
getFDTDindex 1673
getmaterial 1673

Getting the material data from the database


Use the getindex command to get raw material data from the material database. See below for an example.

Getting the FDTD material fit


Use the getfdtdindex command to get the material fit that would be used in the simulation. See below for an
example.

2003 - 2016 Lumerical Solutions, Inc


220 Lumerical Knowledge Base

Example
This example provides a sample script that gets material data into a script variable, plots the data, then outputs it to
text files.

# Specify material
material="Si (Silicon) - Palik";

# Specify frequency range


fmin=400e12;
fmax=1500e12;
f=linspace(fmin,fmax,300);

# Get material data


n_exp = getindex(material,f);
n_FDTD = getfdtdindex(material,f,fmin,fmax);

# plot data
plot(f/1e12,real(n_exp),real(n_FDTD),"f (THz)","Re(n)");
legend("experimental data","FDTD fit");
plot(f/1e12,imag(n_exp),imag(n_FDTD),"f (THz)","Im(n)");
legend("experimental data","FDTD fit");

# export data into two text files


# each file has 3 columns: f,Re(n),Im(n)
file1=material+" (raw).txt";
file2=material+" (FDTD).txt";
rm(file1);
rm(file2);
for (i=1:length(f)) {
write(file1,num2str(f(i)/1e12)+" "+num2str(real(n_exp(i)))+" "+num2str(imag(n_exp(i))));
write(file2,num2str(f(i)/1e12)+" "+num2str(real(n_FDTD(i)))+" "+num2str(imag(n_FDTD(i)))
}

# Convert to permittivity if desired by squaring the index


eps_exp = n_exp^2;
eps_FDTD= n_FDTD^2;

Note: Accessing original data from the database


It is also possible to access the original refractive index data from the material database. See the getmaterial 1673

script command documentation.

5.3.1.2 Material explorer


Objective
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.

Users may also find the Optical material modeling recorded video to be helpful.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 221

See Also
Material explorer for varFDTD 222

Modifying material fits 272

Plot window
The two figure windows at the top of the Material Explorer window show the real and imaginary parts of the
material index.

Material settings
Property Description
Material Select the material to check.
Axis If the material is anisotropic, select the axis to check.
Fit Tolerance The Tolerance setting of the material. Only applies to fitted materials.
Max Coefficients The Max coefficients setting of the material. Only applies to fitted materials.
Show/Hide Advanced Show or hide the advanced options.
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.
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.

Simulation bandwidth settings


Property Description
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.

2003 - 2016 Lumerical Solutions, Inc


222 Lumerical Knowledge Base

View settings
Property Description
Vertical axis Plot permittivity or index
Show material data Show the experimental data on the plot windows
Standard view Plot the fit over the specified bandwidth range
Extended view range Plot the fit over a wider bandwidth range
Specify view range Specify the range to plot the fit
Plot in new window Plots fit and data in a new window

Fit and plot buttons


Property Description
Plot in new window Plot data in a new window
Fit and Plot Calculate and plot the material fit

Fit analysis
Property Description
RMS error 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.
Number of coefficients The number of coefficients used in the fit.

5.3.1.2.1 Material explorer for varFDTD


If the Propagator is the active solver, the Material Explorer will show the material properties of all the generated
effective materials (ie. the core material as well as all of the test materials).

The effective materials are generated using the methods described in 2.5D varFDTD Physics 107 . If BROADBAND is
selected for the simulation bandwidth (under the Effective index tab 425 ), a sampled dataset of effective material data
will be generated over the specified bandwidth (ie. the "Material data" shown above), which will then be fitted using
the multi-coefficient material model (ie. the "Propagator model" shown above). Alternatively, if NARROWBAND is
selected, an (n,k) material will be generated for each at the specified frequency. Note that the effective material

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 223

properties shown here include both contributions from the original material dispersion of the 3D structure, as well as
the waveguide dispersion. This is important for obtaining accurate broadband simulation results.

Unlike the Material Explorer 220 for other types of solvers, the SPECIFY FIT RANGE section is not available for the
Propagator. This is because the slab mode data is always generated for the full bandwidth range of the source, and
not outside this range.

5.3.1.3 Material permittivity models


This section describes the basic permittivity (or refractive index) material models supported by the Material
Database. Model parameters can be edited in the Material property panel of the Material Database window.

Additional resources:
Advanced material models 243
Flexible material plugin framework 251 information
Optical material modeling recorded video

Sampled 3D 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. This method can be used to create a lossless material.

There are two types of sampled data models available: Sampled 3D data and Sampled 2D data. Sampled data
changed its name to Sampled 3D data to differentiate it from a Sampled 2D data, where the material is defined in
terms of 2D surface conductivity. For backward compatibility, Sampled data can still be used but it is
recommended to use Sampled 3D data whenever possible. Sampled 2D data can be used for importing the
surface conductivity data from 2D materials such as graphene. For more information about the Sampled 2D data
material, see Material conductivity models 241 .

The Sampled data material definition uses an automatic fitting routine to


generate a multi-coefficient material model of the experimental data over the
frequency range specified by the source. 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 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.

Examples and more information


Creating sampled data materials 226
Checking material fits with the material explorer 220

2003 - 2016 Lumerical Solutions, Inc


224 Lumerical Knowledge Base

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.

Examples and more information


n,k material model 235
Checking material fits with the material explorer 220

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 3D
The Conductive model is used to create a material with the the following relative permittivity.
s
e total ( f ) = e + i
2p f eo

Note: Comparison with PEC


As the conductivity becomes very large, the performance of this model approaches the idea PEC (Perfect
Electrical Conductor) model described below.

Plasma (Drude)
The Plasma model is used to create a material with the the following relative permittivity.
w P2
e total ( f ) = e -
2 p f (i n C + 2 p f )

Debye
The Debye model is used to create a material with the the following relative permittivity.
e debye n C
e total ( f ) = e +
(n C - i 2 p f )

Lorentz
The Lorentz model is used to create a material with the the following relative permittivity.
e lorentz wO2
e total ( f ) = e +
(wO2 - 2i dO 2 p f - (2 p f ) 2 )

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 225

NOTE: Lorentz model reference:


Kurt Oughstun and Natalie Cartwright, "On the Lorentz-Lorenz formula and the Lorentz model of dielectric
dispersion," Opt. Express 11, 1541-1546 (2003)

Sellmeier
The Sellmeier model is used to create a material defined by the following formula. The C coefficients have
dimensions of micrometers squared (mm2).
B1 l2 B2 l2 B3 l2
e total ( l ) = A1 + + +
l2 - C1 l2 - C2 l2 - C3
NOTE: Single frequency simulations only!
This type of material model should only be used for single frequency simulations. The implementation of the
Sellmeier model is such that the material properties will only be correct at the center frequency of the
simulation.

PEC
A Perfect Electrical Conductor (PEC). The Electric field within this material must be zero. It will have 100%
reflection and 0% absorption. There are no parameters for this model.

Understanding the refractive index of PEC as reported in the Material Explorer and
Refractive index monitors
The refractive index of PEC is not well defined. This can be understood by considering the PEC material as a
conductive material with an infinite conductivity. As the conductivity sigma goes to infinity, the permittivity goes
to infinity. Having the Material explorer and Refractive index monitor return infinite values is not ideal, so they
report the permittivity as eps = 1+ 1e6i, meaning the refractive index is reported as sqrt(1+ 1e6i)=707+707i. It is
important to understand that these values are only for the purpose of reporting by the Material Explorer and
Refractive index monitors. The actual solver engine uses an ideal model (ie. infinite conductivity).
s
e total ( f ) = e + i ,s
2p f e o
e total ( f ) = e + i

Note: Spatial absorption measurements


It is possible for the difference between the permittivity used in the solver (infinite) and the permittivity reported
by the Refractive index monitor (1e6) to cause problems with the spatial absorption monitors. This will not be
an issue when measuring the total absorbed power with a box of monitors. Contact Lumerical support for
further details.

Analytic material
The analytic material model allows the user to enter an equation for the real and imaginary part of the permittivity
or refractive index which can depend on the predefined variables listed below. For an example, see the page.

Examples and more information


Simple analytic material model 239
Graphene material (volumetric approach) 2776
Checking material fits with the material explorer 220

The predefined variables that can be used in the equations for "real" and "imaginary" are:
- f: the frequency in the specified frequency units
- l0: the free space wavelength in the specified length units
- w: 2*pi*f in the specified units
- k0: 2*pi/l0 where l0 is in the specified length units

2003 - 2016 Lumerical Solutions, Inc


226 Lumerical Knowledge Base

- pi: the number pi


- c: the speed of light in a vacuum, ALWAYS in SI units, ie, always equal to 3e8
- x1,...,x10: numeric values that represent a parameter of interest

5.3.1.3.1 Creating sampled data materials

Objective
This section describes how to import experimental material data into the Material database, and how to check the
material fit with the Material Explorer. The Sampled 2D Data or Sampled 3D Data material type should be used when
creating materials from measured data.

Associated files
usr_sampled_data.txt
usr_sampled_data_anisotropic.txt

See also
Getting material data from the database 219

Creating lossless materials 232


Importing arbitrary dispersive models 231
Modify material fits 272
setmaterial 1672

How to: Im port sam pled data (YouTube)


Alternative video source in Mandarin, click here

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 227

Adding a new material from a data file


1. Save the experimental data in a 3 column text file, as shown below, and in usr_sampled_data.txt.
400 5.57 0.387
420 5.08894 0.237724
440 4.78731 0.169323
460 4.57592 0.130235
480 4.4202 0.0933521
500 4.29748 0.0728287
520 4.19996 0.0568346
540 4.11973 0.0472312
560 4.05256 0.0362285
580 3.99543 0.027335
600 3.94724 0.0256523
620 3.90579 0.022
640 3.86838 0.0178648
660 3.83622 0.0159291
680 3.80661 0.013161
700 3.78304 0.0125603
The first column of the material files should contain the wavelength or frequency, and the second and third
columns should contain the corresponding real and imaginary parts of the refractive index (n,k) or permittivity
when specifying a Sampled 3D Data type material. When specifying a Sampled 2D Data type material, the
second and third columns should contain the corresponding real and imaginary parts of the conductivity or
resistivity. In this example, we will illustrate a Sampled 3D Data material with refractive index data over
wavelength.

2. Open the Material Database and click the Add button. Select the Sampled 3D Data option. This will create a
new entry in the Material list. Set the material name and color by clicking on those fields.

2003 - 2016 Lumerical Solutions, Inc


228 Lumerical Knowledge Base

3. Click on the Import Data button to import the material data from the text file. Select the File to import, and
the units of the data. ?Click Next.

Data im port

4. If the columns in the text file are not in the standard order of Wavelength - Real index - Imaginary index, use
the following form to specify the order of the columns.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 229

Data im port

5. If there are no errors, click Finish.

Data im port

Adding a new material with a script


Use the addmaterial and setmaterial script commands to automatically create new materials. See the
setmaterial 1672 script command documentation page for details, or this page for an example Importing arbitrary
dispersive models 231 .

Check the material fit


FDTD Solutions will fit the experimental data to a generalized multi-coefficient model supported in the FDTD
simulation. The fitting routine only uses data within the frequency range of the source, it is best to setup the
source frequency/wavelength settings before using the Material Explorer.

Once the source is setup, click the Material Explorer button to view the material fits. Select the material name
and set the vertical axis to either index or permittivity. Click the Fit and Plot button.

2003 - 2016 Lumerical Solutions, Inc


230 Lumerical Knowledge Base

Material Explorer

The RMS error of this fit in the 400-700nm range of the source is quite small. This is not surprising, since these
numbers are based on Silicon, which tends to fit very nicely. See the Modify material fits 272 section for
information about how to modify the material fits.

Anisotropic materials
It is also possible to create anisotropic sampled data materials if we set the 'anisotropy' property to 'diagonal'.
The data import process is the same as above, except for the text file format. The file
usr_sampled_data_anistropic.txt shows the required format for anisotropic data
400 5.57 0.387 2.785 0.1935 1.85667 0.129
420 5.08894 0.237724 2.54447 0.118862 1.69631 0.0792415
440 4.78731 0.169323 2.39366 0.0846613 1.59577 0.0564409
460 4.57592 0.130235 2.28796 0.0651175 1.52531 0.0434116
480 4.4202 0.0933521 2.2101 0.0466761 1.4734 0.0311174
500 4.29748 0.0728287 2.14874 0.0364144 1.43249 0.0242762
520 4.19996 0.0568346 2.09998 0.0284173 1.39999 0.0189449
540 4.11973 0.0472312 2.05986 0.0236156 1.37324 0.0157437
560 4.05256 0.0362285 2.02628 0.0181143 1.35085 0.0120762
580 3.99543 0.027335 1.99772 0.0136675 1.33181 0.00911168
600 3.94724 0.0256523 1.97362 0.0128262 1.31575 0.00855078
620 3.90579 0.022 1.9529 0.011 1.30193 0.00733333

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 231

640 3.86838 0.0178648 1.93419 0.0089324 1.28946 0.00595494


660 3.83622 0.0159291 1.91811 0.00796453 1.27874 0.00530969
680 3.80661 0.013161 1.9033 0.00658052 1.26887 0.00438701
700 3.78304 0.0125603 1.89152 0.00628013 1.26101 0.00418676
The first column is wavelength (or frequency). The second and third columns are the real and imaginary parts
of the refractive index (or permittivity) in the X direction. Columns 4 and 5 are the real and imaginary parts of
the index (or permittivity) in the Y direction, and columns 6 and 7 are the real and imaginary parts of the index
(or permittivity) in the Z direction.

When using the Material Explorer to check the material fits, use the Axis drop down to view the material
properties for each direction.

5.3.1.3.1.1 Importing arbitrary dispersive models

Objective
This section describes how to implement dispersive models not directly supported by Lumerical Solutions. This
example shows how you might create a Plasma + Lorentz model.

One option is to use the Analytic material model, which requires an analytic function to define the refractive index.
See the Analytic material model 239 page for more information. The second option, which we will consider here, is to
evaluate the function with some other tool (eg. MATLAB) and use the Sampled data 226 material model.

Associated files
usr_create_dispersive.lsf

See also
Creating sampled data materials 226

Modify material fits 272


Analytic material model 239
setmaterial 1672

Create the dispersive model data


The script file usr_create_material_data.lsf provides an example of how this can be done. This script
function outputs the n,k values from a combined Plasma + Lorentz model to create a new material in the
Material database. The script automatically creates the material with n,k data loaded in. Users can choose to
export the data to a text file and load back in using the Sampled data, but this procidure might introduce
numerical precision problems.

Check the fit


It is important to check the quality of fit that can be achieved by the multi-coefficient model. In some cases,

2003 - 2016 Lumerical Solutions, Inc


232 Lumerical Knowledge Base

the Max number of coefficients may need to be adjusted. Check the fit with the Material Explorer, which can
be accessed from the top menu, under Simulation --> Material Explorer or from the main toolbar under 'Check'.

In this example, the fit is very good for this Plasma + Lorentz model. In fact, only 3 coefficients were used,
even though the maximum number of allowed poles was 6. Other functions may have larger errors, or may
require more coefficients to achieve an acceptable error tolerance.

Note: Improve fit with advanced options


If you cannot get a good fit to your data, uncheck the 'improve stability' option in the advanced options
section. You can also try to uncheck the 'make fit passive' option to remove even more restrictions on the
fitting function. This may, however, lead to diverging simulations. For more information, see Modifying
material fits 272 .

5.3.1.3.1.2 Creating lossless materials

Objective
This page describes how to create lossless versions of real materials (i.e. silicon or gold).

This technique is not recommended because obtaining accurate material fits can be difficult or impossible, and
because the simulation results can be quite difficult to interpret. However, for users that do wish to create 'lossless'
materials, this page provides some information.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 233

Associated files
usr_materials_lossle
ss.fsp
usr_materials_lossle
ss.lsf

See also
Creating sampled data
materials 226
Modifying material fits 272

Introduction
Occasionally, you may wish to create 'lossless' versions of materials. For example, while studying a Silicon based
photonic crystal cavity, you may want to remove any effects from Silicon material absorption, so you can more
easily study the loss due to leakage through the PC structure. The idea is to create a 'lossless' version of the
material, where the imaginary part of the refractive index (or sometimes the permittivity) is set to zero.

Problems with this approach


Broadband fits
Unfortunately, there is a significant problem with this approach. It is often difficult or impossible for the Material
Explorer to find an accurate fit to these types of lossless materials over a broad range of wavelength. If you cannot
get a good fit, the simulation results will not be accurate. If you cannot get a good fit, but still want to study 'lossless'
materials, you must run a series of single frequency simulations. This issue only exists when running broadband
simulations (ex: source wavelength range is 400-700nm) and it can be avoided by running a series of single
frequency simulations, for example using parameter sweeps 699 .

Interpretation of results
The absorption of a material is a fundamental part of its properties, and simply setting the absorption to zero can
lead to unexpected effects. Care must be taken when interpreting simulation results when the material absorption
has been artificially set to zero.

Example
Step 1: Create a 'lossless' material in the database
Creating a lossless material in the Material Database is easy and straightforward. The following lines of script
code can be used to generate a text file containing the 'lossless' refractive index data. Basically, we get the
normal refractive index data, then set the imaginary part of the refractive index to zero. Actually, we set it to
some small value like 1e-6, as non-zero numbers cause fewer problems for the material data fitting routines.

2003 - 2016 Lumerical Solutions, Inc


234 Lumerical Knowledge Base

f=linspace(c/200e-9,c/1000e-9,100); # specify frequency vector


n=getindex("Si (Silicon) - Palik",f);
data=[f, real(n), imag(n)*0+1e-6];
rm("Si (Silicon) - lossless.txt");
write("Si (Silicon) - lossless.txt",num2str(data));

Note: If you wish to set the imaginary part of the permittivity to zero, rather than the refractive index, simply
add this command between lines 2 and 3: "n=n^2;"

Once you have this text file, the data can be imported into the Material Database by following the instructions
on the Creating sampled data materials 226 page. The associated example simulation file already has a
lossless gold and lossless Silicon material in the Material Database.

Step 2: Check the material fit with the Material Explorer


The Material Explorer is used to check that the material fit (which will be used in the simulation) is a close
match to the specified data. When creating 'lossless' materials, you will often find that it is not possible to get a
good fit. The following screenshots show standard silicon and gold material fits, and the fits for lossless
versions of those materials. You can see the fit for lossless silicon is okay (but not perfect), while the fit for
lossless gold is poor. It is not possible to get a good fit to this lossless gold data.

Fitting lossless silicon:

Fitting lossless gold:

Step 3: Run a test simulation

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 235

The associated simulation and script file can be used to test the material fits. To reproduce the following
results, run the script 4 times. Each time, select a different material from the database.

Standard silicon Lossless silicon


Notice the absorption (red) is quite large. Notice the absorption is m uch sm aller. How ever, it w ill
not be exactly zero, because the im aginary part of the
m aterial fit is not zero, as w e saw above.

Standard gold Lossless gold


This is the expected reflection and absorption spectrum Notice the absorption is very high. This occurs because
for a gold slab. the m aterial fit still has a large im aginary com ponent.
These results are not very m eaningful because of the
poor m aterial fit.

5.3.1.3.2 n,k material model


This page describes how to define a material based on a single refractive index value (e.g., n + ik = 2 + 0.05i) for
single frequency 236 simulation.

For broadband 237 simulations, n,k material is not used but this is also discussed in
this page.

Note: For materials with a real valued refractive index, the situation is very
simple. Use the 'Dielectric' material model. The following complications do not
apply.

2003 - 2016 Lumerical Solutions, Inc


236 Lumerical Knowledge Base

See also
Material database 216
Creating lossless materials 232
Creating sampled data materials 226

Narrowband simulations
In some cases, it may be convenient to define the refractive index of a material based on a single n,k value (e.g. n +
ik = 2 + 0.05i). If you are using a single frequency source (i.e. the source 'Start' and 'Stop' wavelengths are equal),
then the best solution is to add an (n,k) Material to the database, as shown in the above screenshot. The n,k
material allows you to simply enter the desired n,k values.

It is important to remember that the (n,k) Material model should ONLY be used for single frequency sources. The
implementation of the (n,k) Material model is such that it only gives the desired refractive index values at the center
frequency of the source. Obviously, if the source is single frequency, this is not a problem. However, for a broadband
source, the resulting refractive index near the start and stop wavelengths can differ substantially from the desired
values. The following figures show the desired (Blue) and actual (Green) refractive index values that will occur for a
source set to 500-500nm and 400-700nm. The two lines always agree at the center frequency, but not necessary at
other frequencies.

Example

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 237

Screenshot of
Material Explorer

Source wavelength
limits: 500-500nm
(n,k) Material values:
2, 0.05

Screenshot of
Material Explorer

Source wavelength
limits: 400-700nm
(n,k) Material values:
2, 0.05

Notice the substantial


differences,
especially in the
imaginary part, near
400 and 700nm.

Broadband simulations
In some cases, you may hope to define the broadband refractive index of a material as a constant value of n,k (e.g n
+ ik = 2 + 0.05i). Unfortunately, this is a challenging problem. The root of the problem comes from the fact that
FDTD is a time domain technique, while the refractive index is known in the frequency domain. We are restricted to
describing the refractive index with a particular class of functions that are compatible with a time domain solver.
Unfortunately, a constant n,k as a function of frequency is not something that can be described perfectly with this
restriction. While we can often still get very good fits, they will never be perfect.

Option 1 - Sampled data


The best option for adding such a material to the database is with the Sampled data material, where you

2003 - 2016 Lumerical Solutions, Inc


238 Lumerical Knowledge Base

import a list of n,k data as a function of wavelength, as described on the Creating sampled data materials 226
page. The resulting material is shown in the above screenshot. The imported data would look something like
this, with a constant value of n,k

wavelength n k
390 2 0.05
400 2 0.05
410 2 0.05
420 2 0.05
430 2 0.05
440 2 0.05
...

The next step is to adjust the fit with the Material Explorer, as shown below. By adjusting the fitting
parameters, it is often possible to get a good (but not perfect) fit to the material data. In the screenshot below,
we can see that the desired n,k value is 2 + 0.05i. The actual fit varies from n = 1.992 - 2.007 and k = 0.0497 -
0.0506. While not perfect, the fit is quite good, especially when you consider that the experimental errors in
refractive index measurements are often quite large.

Option 2 - (n,k) Material (Not recommended)


This option is not recommended. It is only included here to describe the short comings of this method.

A common error is to use the (n,k) Material model when trying to create these types of materials.
Unfortunately, this model is only designed for narrowband simulations. This model will give the desired n,k
values at the center frequency of the source, but not at other wavelengths. These differences can be seen with
the Material Explorer, and will lead to errors in your simulation. Rather than using the (n,k) Material model, it is
better to use the Sampled data model described above, which allows you to adjust the fitting parameters to
get a better fit.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 239

5.3.1.3.3 Analytic material model

Objective
This section describes the Analytic material model.

Associated files
usr_analytic_material1.lms
usr_analytic_material1.lsf
usr_analytic_material1.fsp

See also
Importing arbitrary dispersive models 231

setmaterial 1672

Simple example

2003 - 2016 Lumerical Solutions, Inc


240 Lumerical Knowledge Base

Suppose we have two materials: material A has a


refractive index of na and material B has a refractive
index of nb. These two materials can be combined to
produce a composite material. The refractive index of
this composite material is simply the weighted average
a of the refractive index of the two base materials, as
shown in the following formula.
index = na a + nb (1 - a )

This type of material model can be implemented in the


material database using the Analytic material model.
This model makes it possible to define a material via an
analytic function. In this case, our function has three
variables: the index of materials A and B, and the
fraction of material A in the mixture. The variables of the
analytic model have fixed names, such as x1, x2, x3
and so on. Therefore, we must write the formula as:
index = x1x3 + x2 (1 - x3 )
where x1 = n a , x 2 = n b , x 3 =

FDTD Solutions example


It is important to understand that the analytic equation is not directly used in the simulation. It is necessary for
FDTD Solutions to create a 'fit' for this material, in the same way that it must fit the Sampled data materials. In this
example, the fit is perfect because the material is a simple lossless, non-dispersive model. For more complex
materials, the quality of the fit may be lower.
It's always a good idea to use the Material explorer to check the quality of the fit, just like you should check the fits
of Sampled data materials.

MODE Solutions example


The simulation files usr_analytic_material1.fsp and usr_analytic_material1.lms contain this
material. Using MODE Solutions, open the lms file, then run usr_analytic_material1.lsf to calculate the
effective index of the fundamental mode as a function of the weighted average a. The following figure shows the final
result of the simulation. The blue line shows the effective index of the mode, while the green line shows the actual
material index, as calculated via the above formula. As expected, the mode effective index is always less than the
material index.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 241

For dispersive materials where the index or permittivity are defined as complex equations, please see Importing
arbitrary dispersive models 231

Note: The predefined variables that can be used in the equations for "real" and
"imaginary" are:
- f: the frequency in the specified frequency units
- l0: the free space wavelength in the specified length units
- w: 2*pi*f in the specified units
- k0: 2*pi/l0 where l0 is in the specified length units
- pi: the number pi
- c: the speed of light in a vacuum, ALWAYS in SI units, ie, always equal to 3e8
- x1,...,x10: numeric values that represent a parameter of interest

5.3.1.4 Material conductivity models


Materials specified using a conductive model can be specified for 2D rectangle and polygon objects.

Behavior of Material Explorer, meshing algorithm and index monitor


The material explorer will display the surface conductivity. The surface conductivity can be displayed by a refractive
index monitor, or in the FDE solver it can be displayed in the modal analysis tab. The meshing algorithm will attempt
to automatically place a mesh line aligned to each 2D sheet, however there are situations where it is not possible to
generate a mesh where mesh lines fall exactly at the position of the sheet for all sheets, and in this case any sheets
which are not aligned with the mesh will snap to the nearest mesh line.

Conductive 2D
Parameters and units
Layer thickness: physical thickness of the sheet which will be represented as a 2D sheet in the simulation
[m]
Conductivity: conductivity of the material [S/m]

Conductive 3D
This material is implemented as a 3D permittivity. For additional details see Material permittivity models 223 .

Graphene

2003 - 2016 Lumerical Solutions, Inc


242 Lumerical Knowledge Base

This material employs the surface conductivity to model the optical properties of a graphene sheet. No base
material is needed.

Parameters and units


Scattering Rate: the scattering rate is related to the sample purity of the graphene sheet. This parameter
may be available from the graphene manufacturer, other literature or users' own requirement for this
parameter. [eV]
Chemical potential: chemical potential [eV]
Temperature: temperature [K]
Conductivity scaling: This number is typically 1, for a layer of graphene. Under some circumstances, this
model can also be used to represent multiple layers by scaling the total conductivity by the number of
layers, for example, 2 for two layers of graphene.

Examples and more information


Graphene material approach 2774

PEC
A Perfect Electrical Conductor (PEC). The Electric field within this material must be zero. It will have 100%
reflection and 0% absorption. There are no parameters for this model.

Index monitor results


The conductivity of this material is infinite, however since an infinite number cannot be represented in an index
monitor plot, index monitors will report a finite but high value of refractive index and surface conductivity.

RLC
The RLC material is used to specify a lumped element with a given resistance (R), inductance (L), and
capacitance (C). The material is implemented as a distributed surface conductivity is calculated based on the
lumped R, L, C values and the length of the object along the current flow direction.

The RLC material is defined from the Materials tab of a 2D rectangle 349 object when the material selected for
the object is <RLC>. RLC materials will not appear in the Material Database or Material Explorer.

Any combination of R, L, and C can be enabled by selecting the check boxes next to the R, L, and C
parameters. If multiple options are selected, the R, L, and C components are added in parallel.

Parameters and units


R: resistance [ohm]
L: impedance [H]
C: capacitance [F]
current flow direction: the direction of current flow in the plane of the sheet (x, y, or z)

Sampled 2D data
The Sampled data material definition uses an automatic fitting routine to
generate a multi-coefficient material model of the experimental data over the
frequency range specified by the source. The fits can be checked and adjusted
in the Material Explorer.

Parameters and units


Layer thickness: Thickness of the physical sheet which will be represented as a 2D sheet in the simulation.
[m]
Tolerance: The desired RMS error between the surface conductivity 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.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 243

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 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.

Examples and more information


Creating sampled data materials 226
Checking material fits with the material explorer 220

5.3.1.5 Advanced material models


The following material models can be used in a variety of advanced applications, such as non-linear device
simulations. Many of the following models have been implemented with the Flexible material plugin framework 251 ,
and are distributed with the standard FDTD and MODE Solutions installation packages. Source code is provided for
some models implemented with the Flexible material plugin framework.

In particular, the user should be aware of the following points.


The material explorer is often not capable of displaying the properties of the these materials. To understand the
properties of these materials, it is necessary to understand the underlying material model.
The mesh algorithm does not know which target mesh size should be used for these materials. It will base the
target mesh size on the 'Base Material' only. If a finer mesh is required, the user should force that explicitly
with a mesh override region over the material.
For some simplified material models, the system can be numerically unstable if the nonlinear perturbation is
too large. See Nonlinear Methodology - Source amplitude 2719 section fore more information.
More information and tips can be found in the Nonlinear application 2718 example section.

Additional resources:
Standard material models 223
Flexible material plugin framework 251 information
Optical material modeling
Nonlinear application 2716 examples
Material Plugins: A Practical Implementation Demo

Available material models (comes with the software package)


Chi2
This nonlinear model allow users to define the value for the
c ( 2)
term directly. An arbitrary dispersive base
material can also be specified, in which case the added polarization will be in addition to the polarization of

any base material that is selected. If the


c (1) term is 0 (default), the polarization will be added to the vacuum.

Users that only require a Chi2 term are encouraged to use this model rather than the Chi3/Chi2 model
because it uses a more numerically accurate implementation.

2003 - 2016 Lumerical Solutions, Inc


244 Lumerical Knowledge Base

Parameters and units


(1) : Chi1 [unitless]
(2) : Chi2 [m/V]

Behavior of Material Explorer and meshing algorithm


The material explorer will display the refractive index of the base material, if one is selected. If no base
material is selected, a refractive index of 1 will be displayed.
The meshing algorithm will use the refractive index of the base material when determining the simulation
mesh size. If no base material is selected, a refractive index of 1 will be assumed.

Examples and more information


Harmonic generation 2756

Source code
chi2.h
chi2.cpp

Storage fields
No storage field specified by default

Chi3/Chi2
The usage for the Chi3/Chi2 material is the same as the Chi2 material, but with the addition of the Chi3 term.
Support for higher order terms could be added with some straightforward modifications to the source code for
this model (provided below).

Parameters and units


(1) : Chi1 [unitless]
(2) : Chi2 [m/V]
(3) : Chi3 [m^2/V^2]

Behavior of Material Explorer and meshing algorithm


The material explorer will display the refractive index of the base material, if one is selected. If no base
material is selected, a refractive index of 1 will be displayed.
The meshing algorithm will use the refractive index of the base material when determining the simulation
mesh size. If no base material is selected, a refractive index of 1 will be assumed.

Examples and more information


Optical bistability 2768

Source code
chi3.h
chi3.cpp

Storage fields
No storage field specified by default

Chi3 Raman Kerr


This material allows one to model Kerr and Raman interactions.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 245

P(t ) = e 0 c (1) E (t ) + e 0 ac 0( 3) E 3 (t ) + e 0 (1 - a )E (t )(c Raman


( 3)
(t ) * E 2 (t ) )
( 3) c0( 3) wRaman
2
c Raman ( w) = 2
wRaman - 2 j wd Raman - w 2
( 3)
c Raman (t ) = FT(c Raman
( 3)
( w ))

Parameters and units


(1) : Chi1 [unitless]
(3) : Chi3 [m^2/V^2]

1. [unitless]
Raman : the non-linear Raman angular frequency [Hz]
Raman : the linewidth of the resonance [Hz]

Behavior of Material Explorer and meshing algorithm


The material explorer will display the refractive index of the base material, if one is selected. If no base
material is selected, a refractive index of 1 will be displayed.
The meshing algorithm will use the refractive index of the base material when determining the simulation
mesh size. If no base material is selected, a refractive index of 1 will be assumed.

Examples and more information


Solitons in SOI waveguide 2764

Source code
chi3ramankerr.h
chi3ramankerr.cpp

Storage fields
(3)
(1 - a ) ( c Raman (t ) * E 2 (t ))
storage_0 = Sn: Chi3 Raman term, , for the nth time step
(3)
(1 - a ) c Raman (t ) * E 2 (t )
storage_1 = Sn+1: Chi3 Raman term, , for the (n+1)th time step

References
This model was implemented based on:
Goorjian and Taflove, Optics Letters, 1992, 180-182
Taflove, Computational Electromagnetics: The Finite-Difference Time-Domain Method. Boston: Artech
House, (2005).

Four-Level Two-Electron
This model implements a four-level two-electron model that can be used for simulation of gain and lasing. The
four-level model is described in the following diagram:

2003 - 2016 Lumerical Solutions, Inc


246 Lumerical Knowledge Base

Parameters and units


wa, wb : the angular frequencies corresponding to the energy differences of levels 2-1 and 3-0 respectively
[Hz]
ga, gb : the damping coefficients for Pa and Pb respectively which control the nonradiative losses [Hz]
t30, t32, t21, t10 : the lifetimes of the different decay channels [s]
N DENSITY : the electron population density [m^-3]
SET INITIAL POPULATIONS : if 0 (false), the initial populations are N0=N1=1, and N2=N3=0. If set to 1
(true), the user can specify the initial populations and use this mechanism to change the number of
electrons in the model
N0(0), N1(0), N2(0), N3(0) : the normalized electron density population at t=0. Set these number only when
set initial population=1. [unitless]
DO NOT ENFORCE ELECTRON CONSERVATION : when set to 0 (false), electron conservation is
enforced and the level N0 population is calculated by taking Ninitial - N3 - N2 - N1. Any remaining electrons
are distributed among the other levels. If this property is set to 1 (true), then N0 is calculated from the rate
equations but, with higher pump fields, it is possible for the total number of electrons to change over time
and even to reach completely unphysical values.

The user can monitor the level populations by looking at the storage fields 4-7 which correspond to levels 0-3.

Behavior of Material Explorer and meshing algorithm


The material explorer will display the refractive index of the base material, if one is selected. If no base
material is selected, a refractive index of 1 will be displayed.
The meshing algorithm will use the refractive index of the base material when determining the simulation
mesh size. If no base material is selected, a refractive index of 1 will be assumed.

Examples and more information


Gain and Laser 2723
4 level 2 electron model 2727
Pump and probe simulation 2736

Source code
fourleveltwoelectron.h
fourleveltwoelectron.cpp

Storage fields
Polarization between levels 1 and 2:
storage_0 = Pan+1: (n+1)th time step
storage_1 = Pan: nth time step

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 247

Polarization between levels 0 and 3:


storage_2 = Pbn+1: (n+1)th time step
storage_3 = Pbn: nth time step

Population of levels for the nth time step:


storage_4 = N0: Level 0
storage_5 = N1: Level 1
storage_6 = N2: Level 2
storage_7 = N3: Level 3

References
The four-level two-electron model based on the implementation described in:
Chang and Taflove, Optics Express, 2004, 3827-3833.
Taflove, Computational Electromagnetics: The Finite-Difference Time-Domain Method. Boston: Artech
House, (2005).

Kerr nonlinear
In the Kerr nonlinear model, the electric polarization field P will depend on the electric field E in the following
manner.
r r r
( )
P (t ) = e 0 c (1) + c ( 3) | E (t ) |2 E (t )
Solving for the displacement field D gives
r r r
( )
D(t ) = e 0 e r + c ( 3) | E (t ) |2 E (t )

The relative permittivity and


c ( 3)
values must be specified by the user.
This material model does not support the option to select a base material.

Parameters and units


r : Relative permittivity [unitless]
(3) : Chi3 [m^2/V^2]

Behavior of Material Explorer and meshing algorithm


The material explorer will display a refractive index of 1.
The meshing algorithm will assume a refractive index of 1 when determining the simulation mesh size.

Examples and more information


Kerr effect example 2750
Spatial Solitons - graphene 2799

Source code
N/A. This is not a plugin material.

Paramagnetic
The paramagnetic material model allows the user to specify both the permittivity and permeability of the
material to simulate magnetic materials.

Parameters and units


r : Relative permittivity [unitless]

2003 - 2016 Lumerical Solutions, Inc


248 Lumerical Knowledge Base

r : Relative permeability [unitless]

Behavior of Material Explorer and meshing algorithm


The material explorer will display the refractive index of the base material, if one is selected. If no base
material is selected, a refractive index of 1 will be displayed.
The meshing algorithm will use the refractive index of the base material when determining the simulation
mesh size. If no base material is selected, a refractive index of 1 will be assumed.

Examples and more information


Not available

Source code
paramagnetic.h
paramagnetic.cpp

Storage fields
No storage field specified by default

Magnetic Electric Lorentz


This material allows for a Lorentz term in both the electric and magnetic properties. The material has a
relative permittivity and permeability given by

D ew e2
e ( w ) = e base ( w ) + c e +
we2 - 2i d e w - w 2
D mw m2
m (w ) = 1 + cm +
wm2 - 2i d m w - w 2

where the subscript e and m refer to the electric and magnetic properties respectively and w is the angular
frequency. The user has the option of disabling either the electric or the magnetic portion of the update by
setting the property 'exclude electric' or 'exclude magnetic' to 1 (true).

The properties of this material cannot be seen in the materials explorer, but can be visualized by using the
script file magnetic_electric_lorentz.lsf

Parameters and units


(0) electric : Chi0, the susceptibility to add to the base material. If no base material is selected, base( ) =
1. [unitless]
electric : the change in permittivity [unitless]
0 electric : the angular frequency of the resonance [Hz]
electric : the linewidth of the resonance [Hz]
(0) magnetic : Chi0, the susceptibility [unitless]
magnetic : the change in permeability [unitless]
0 magnetic :the angular frequency of the resonance [Hz]
magnetic : the linewidth of the resonance [Hz]
exclude electric : if the excluded electric is set to 1 (true), then e=ebase.
exclude magnetic : if the exclude magnetic is set to 1 (true), then m=1.

Behavior of Material Explorer and meshing algorithm


The material explorer will display the refractive index of the base material, if one is selected. If no base
material is selected, a refractive index of 1 will be displayed.
The meshing algorithm will use the refractive index of the base material when determining the simulation
mesh size. If no base material is selected, a refractive index of 1 will be assumed.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 249

Examples and more information


Bulk metamaterials 2002

Source code
magneticelectriclorentz.h
magneticelectriclorentz.cpp

Storage fields
storage_E_0 = Pn: Polarization for the nth time step
storage_E_1 = Pn+1: Polarization for the (n+1)th time step
storage_H_0 = Mn: Magnetization for the nth time step
storage_H_1 = Mn+1: Magnetization for the (n+1)th time step

Index Perturbation (np Density / temperature)


The Index Perturbation material model is used to convert electron/hole density or temperature data into a
change in refractive index. Typically a base material should be selected when using this material model.

Parameters and units


For details on these models, see Index Perturbation (np Density / temperature) 400 .
Behavior of Material Explorer and meshing algorithm
The material explorer will display the refractive index of the base material, if one is selected. If no base
material is selected, a refractive index of 1 will be displayed.
The meshing algorithm will use the refractive index of the base material when determining the simulation
mesh size. If no base material is selected, a refractive index of 1 will be assumed.

Examples and more information


Index Perturbation (np Density / temperature) 402

Source code
N/A. This is not a plugin material.

Available material models (additional plugins)


Lorentz example
A practical demonstration showing user the basic idea and the implementation of material plugin using a
simple Lorentz model, e.g., making the .h, .cpp and .dll files.

D ew o2
e ( w ) = e base ( w ) +
wo2 - 2i d w - w 2
Parameters and units
0 : the angular frequency of the resonance [Hz]
: the linewidth of the resonace [Hz]
: the change in relative permittivity [unitless]
base( ) : Base material permittivity. If no base material is selected, base( ) = 1

Behavior of Material Explorer and meshing algorithm


The material explorer will display the refractive index of the base material, if one is selected. If no base
material is selected, a refractive index of 1 will be displayed.
The meshing algorithm will use the refractive index of the base material when determining the simulation
mesh size. If no base material is selected, a refractive index of 1 will be assumed.

2003 - 2016 Lumerical Solutions, Inc


250 Lumerical Knowledge Base

Examples and video


Part I - Lorentz example
Presentation slides

Source code
lorentzexample.zip

Two-level one-electron example


A practical demonstration showing user the basic idea and the implementation of material plugin using a Two-
level model, e.g., making the .h, .cpp and .dll files.

Parameters and units


w0 : the angular frequencies corresponding to the energy differences of levels 1-0 [Hz]
g, g10 : the damping coefficients of P and transition 1->0 respectively which control the nonradiative losses
[Hz]
Nd : the electron population density [m^-3]

Behavior of Material Explorer and meshing algorithm


The material explorer will display the refractive index of the base material, if one is selected. If no base
material is selected, a refractive index of 1 will be displayed.
The meshing algorithm will use the refractive index of the base material when determining the simulation
mesh size. If no base material is selected, a refractive index of 1 will be assumed.

Examples and video


Part II - Two Level System
Presentation slides

Source code
twolevelexample.zip

Step index
A simple plugin material model which modifies the time domain update equations in order to apply a change
in permittivity over a time step function, e.g., caused by an input electrical signal.

Parameters and units


: the change in relative permittivity [unitless]
time_start, time_stop : the start and stop time of the step function [s]

Behavior of Material Explorer and meshing algorithm


The material explorer will display the refractive index of the base material, if one is selected. If no base
material is selected, a refractive index of 1 will be displayed.
The meshing algorithm will use the refractive index of the base material when determining the simulation
mesh size. If no base material is selected, a refractive index of 1 will be assumed.

Examples and more information


Ring modulator 2766
Flexible material plugin framework - Basic concept 251

Source code
stepindex.dll
stepindex.h
stepindex.cpp

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 251

Storage fields
Storage_E_0 = time_dt: Raw time data

See Material database (optical) 216 for the definition of other settings in the Material Database window.

5.3.1.5.1 Flexible material plugin framew ork


Users can define their own plugin material models written in C++. These material models can be compiled as a
plugin and added to the materials database. The standard FDTD and MODE Solutions installation packages include
a number of Advanced material models 243 implemented with this framework. Additional information can be found in
the Flexible Material Plugins whitepaper.

Additional resources:
Standard material models 223
Optical material modeling
Nonlinear application 2716 examples
Material Plugins: A Practical Implementation Demo

Basic concept
To create a new material, you must write a method in C++ that solves the following equation for for En
Pn
U nEn + =V n
e0
where En is the electric field at time nDt, Pn is the desired polarization at time nDt and Un and Vn are input values
that we provide. The polarization that is added will be in addition to the polarization of any base material that is
selected. If no base material is selected, the polarization will be added to the vacuum (ie. the default relative
permittivity or permeability is 1.)

The same approach is used to create new magnetic materials.

Simple example (an example of the stepindex 243 plugin)


Suppose you want to implement a simple linear, non-dispersive polarization that is added to Lumerical's default
multi-coeffiient model (MCM) for Silicon from Palik. The polarization that we want to add is simply
r r
P = e 0 cE
In FDTD, this means that for each component of E in this material, you want to have
P n = e 0 cE n
and therefore you need to solve
U n E n + cE n = V n
for En by implementing a method that returns
Vn
En =
Un + c
Once this material plugin has been created, you simply add this material to the database and select Silicon as
the base material. You will now have a material with a total permittivity of
e ( w ) = e MCM ( w ) + e 0 c
where eMCM(w) is the dispersive MCM model for Si from our database, and c is the additional non-dispersive
susceptibility.

FAQ
Can I solve dispersive media that include auxilliary fields? Yes, you can tell us how many storage fields
you need and we will allocate the memory and allow you to update the storage fields.
Can I solve for non-linear media? Yes, this is one of the examples we provide. In fact the c(2) medium that

2003 - 2016 Lumerical Solutions, Inc


252 Lumerical Knowledge Base

comes with the software is actually created as a plugin.


Can I solve advanced material models that might involve coupling to multi-level electron systems?
Yes, as long as you can define a polarization in the manner described above, you can introduce materials that
involve extremely complicated material models, including gain media.
Can I solve for anisotropic media? Yes, the method is setup to handle diagonal anisotropic media. For non-
diagonal anisotropy this can often be handled by applying local transformations of the reference frame using
matrix transform grid attributes. In the future, we may implement additional plugin models that allow the user to
see the other field components directly if that becomes important.

How to use material plugins in the software


Once a plugin *.dll or *.so file has been created and is saved into the correct installation folder (ex. "C:\Program
Files\Lumerical\FDTD\bin\plugins\materials" on a windows machine), the new material will appear automatically in
the materials database, and can be added as shown below for the Chi2 material that was created as a plugin.

The input parameters that are specified as part of the plugin implementation will appear either in isotropic or
diagonal anisotropic modes, as shown below:

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 253

Implementing your own model


If you want to implement a new material we recommend that you discuss it with us first. In many cases, it may
be easier for us to create a plugin and installer package for you based on the equations that you want to solve. In
other cases, we can help set you up to write, compile and use your plugins. It is still likely easiest eventually to
have us compile your final code so that a plugin and plugin installer can be built on all operating systems in a way
that is easy to distribute and install on other computers. Finally, we are always interested in collaborating with
groups that can provide sophisticated material models that we can redistribute to other users, with appropriate
references and web links. The file imaterialplugin.h shows the interface that must be implemented. Watch
a demo video

Examples
A number of example materials implemented with this feature (including source code) can be found in the
Advanced material models 243 page.

5.3.1.6 Anisotropic materials


Anisotropic materials can be represented by a 9 element permittivity tensor eij such that the electric and
displacement fields are related by
D i = e ij E j
where summation over j is implied on the right hand side. The full anisotropy tensor can be written as
e11 e12 e13

e = e 21 e 22 e 23
e e 32 e 33
31
The input of anisotropic materials is simple when the permittivity tensor is diagonal
ex 0 0

e = 0 ey 0
0 0 e z

Users may also find the Liquid crystal simulation and Optical material modeling recorded video to be helpful.

Diagonal anisotropic materials


To define an anisotropic material, set the Anisotropy field in the Material database 216 to Diagonal and specify the
material model parameters for each diagonal component. When viewing the material data with the material explorer,
use the 'axis' property to select the diagonal component to visualize.

For a simple example, see:


Diagonal anisotropy 254

General anisotropic materials


If you have a more general form of anisotropy, you must first diagonalize the permittivity matrix (use the eig script
command) and find both the eigenvalues and the unitary transformation that makes the permittivity diagonal. Once
you can write
e D = U eU
where U is a unitary matrix, U=U-1 is the complex conjugate transpose of U and D is diagonal, then the diagonal
values of D should be entered into the materials database and a matrix transform grid attribute should be added with
the transform U. The relevant objects should associated with both the material and the matrix transform grid
attribute.

For more information, see the following sub-topics.


Grid attribute tips and introduction 266

2003 - 2016 Lumerical Solutions, Inc


254 Lumerical Knowledge Base

LC rotation grid attribute 255


Permittivity rotation grid attribute 261
Matrix transformation grid attribute 263

For examples of using diagonalized permittivity matrix, please see:


MOKE 2879
Farafay effect 2881

Simple anisotropic indexes


Simple anisotropic indexes can be set using the material tab in a structure, if dielectric material is used. To specify
an anisotropic refractive index, use a semicolon to separate the diagonal xx,yy,zz indices. Eg. 1;1.5;1. Please see
the Structures section 318 , material tab for more information.

5.3.1.6.1 Diagonal anisotropy


This page provides a simple example simulation of a diagonally anisotropic material.

See also
Anisotropic materials 253

Associated files
diagonal_anisotropy.fsp

ex 0 0

e = 0 ey 0
0 0 e z

The diagonally anisotropic material in the example file has a permittivity of n_xx, n_yy, n_zz = [2, 2, 1.001]. The
anisotropic nature of the material is easily visible by comparing the field profiles of the Ex and Ez fields. Notice the
reflection and refraction visible in the Ex fields that is not present in the Ez fields.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 255

5.3.1.6.2 LC rotation
The Liquid crystal (LC) rotation grid attribute allows you to specify a spatially varying LC director orientation in terms
of theta, phi.

See also
More grid attributes 399
Anisotropic grid attribute tips 266
Liquid crystal video
Liquid crystal application examples 1953

The liquid crystals are composed of rod-like molecular structures as shown below and the molecular has a rotational
symmetry with respect to the long axis. The refractive index with respect to long and short axis is called an
extraordinary refractive index ne and ordinary refractive index no, respectively.

Due to the rotational symmetry, the transformation matrix is reduced to a function of two rotational angles (, )
such as,

cos f - sin f 0 cos q 0 sin q cos q cos f - sin f sin q cos f


U = UzUy = sin f cos f 0 0 1 0 = cos q sin f cos f sin q sin f
0 0 1 - sin q 0 cos q - sin q 0 cos q

2003 - 2016 Lumerical Solutions, Inc


256 Lumerical Knowledge Base

and the permittivity tensor in the reference (or simulation ) coordinate system (x,y,z) is transformed to the principal
coordinate system (X,Y,Z) as

eo 0 0 no2 0 0
~ * ~ ~
e D = U (q , f ) e U (q , f ) e D = 0 eo 0=0 no2 0
0 0 e e 0 0 ne2

In the following sections A and B, we explain how to set up an an uniform and a spatially varying orientation
distribution of LCs, respectively.

A .Uniform distribution
As an example, we set up LCs with ne=1.74 and no=1.53 where the orientation angle of LCs is defined as
=30 and =150. Add a LC attribute object by selecting Attributes => LC orientation on the tool bar,

and set the properties "theta" and 'phi" in the edit window as shown below.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 257

By setting these angles, FDTD Solutions creates the transformation matrix U automatically. Next, we open
material database and define a diagonal anisotropic material as show below.

Note: Ordinary and Extraordinary refractive indices


It is important that nxx and ny y are set to be the Ordinary index, and nzz is set to the Extraordinary index.

2003 - 2016 Lumerical Solutions, Inc


258 Lumerical Knowledge Base

Once we define the transformation matrix U and the diagonal refractive indexes, we assign these to "material"
and "grid attribute names" properties on the Material tab of a structure object which we want to setup as liquid
crystal.

B. Spatially varying orientation distribution of LCs


Method 1: Importing data using the script environment
In this case, we can use the addgridattribute, and optionally the importdataset 1590 script command
to add the LC attribute and to set the spatially varying LC orientation. For example, if we want to set up LCs

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 259

which are twisted in z direction as shown below, where the components of the LC director are given by
ux (x,y,z)=cos(z* ), uy (x,y,z)=sin(z* ) and uz(x,y,z)=0,

we define the director distribution in a matrix variable and put the matrix into the LC attribute property. In the
following script, matrix "n" is used to define the director distribution of the twisted nematic LCs, and this
information is put into a dataset called LC which contains the x, y, z position data and the director orientations
in an attribute called "u". At the second last line where addgridattribute command is used, a LC
attribute is added to the simulation and the director distribution is set up.

Note: Magnitude of spatially varying orientation unit vector


When specifying the LC orientation, it is important that the magnitude of the orientation vector be exactly 1,
except in regions where you don't want the LC orientation to be set where the magnitude of the vector
should be set to 0.

# define x/y/z
x = 0;
y = 0;
z = linspace(0e-6,5e-6,100);

X = meshgrid3dx(x,y,z);
Y = meshgrid3dy(x,y,z);
Z = meshgrid3dz(x,y,z);
n = matrix(length(x),length(y),length(z),3);

# define the orientation function


n(1:length(x),1:length(y),1:length(z),1) = cos(Z*pi*1e5);
n(1:length(x),1:length(y),1:length(z),2) = sin(Z*pi*1e5);
n(1:length(x),1:length(y),1:length(z),3) = 0;

# create dataset containing orientation vectors and position parameters


LC=rectilineardataset("LC",x,y,z);
LC.addattribute("u",n);

# add LC import grid attribute


addgridattribute("lc orientation",LC);

2003 - 2016 Lumerical Solutions, Inc


260 Lumerical Knowledge Base

setnamed("LC attribute","nz",50); # set resolution

We then add a material with diagonal anisotropy components and set up the object to use the LC attribute
similarly to the case of uniform distribution.

Method 2: Importing data from .mat file using the graphical user interface
In the edit window of the grid attribute, it is possible to import a .mat file containing a dataset with the required
director distribution data by clicking on the "Import data..." button. The following code shows an example of
how to save a .mat file to be imported by using the matlabsave 1642 script command.

# define x/y/z
x = 0;
y = 0;
z = linspace(0e-6,5e-6,100);

X = meshgrid3dx(x,y,z);
Y = meshgrid3dy(x,y,z);
Z = meshgrid3dz(x,y,z);
n = matrix(length(x),length(y),length(z),3);

# define the orientation function


n(1:length(x),1:length(y),1:length(z),1) = cos(Z*pi*1e5);
n(1:length(x),1:length(y),1:length(z),2) = sin(Z*pi*1e5);
n(1:length(x),1:length(y),1:length(z),3) = 0;

# create dataset containing orientation vectors and position parameters


LC=rectilineardataset("LC",x,y,z);
LC.addattribute("u",n);

# save data to .mat file


matlabsave("LC_import.mat",LC);

We then add a material with diagonal anisotropy components and set up the object to use the LC attribute
similarly to the case of uniform distribution.

Method 3: Importing data from a CSV (comma-separated values) file


From the Import menu in the top toolbar, click on Import from CSV to open the import wizard which allows you
to select the CSV file to import. This file is typically created with TechWiz LCD from Sanayi System Co., Ltd.
(http://sanayisystem.com/).

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 261

For more details on the file format and steps for importing the data from the graphical wizard, see Import object
- Liquid crystal from CSV 502 .

The same data can also be imported using the importcsvlc 1555 script command.

5.3.1.6.3 Permittivity rotation


The permittivity rotation object allows you to specify the orientation of an anisotropic material in terms of the Euler
angles.

See also e XX 0 0
e D ( X , Y , Z ) = 0 0
More grid attributes 399 ~
Anisotropic grid attribute tips 266
eYY
0 0 e ZZ

This type of grid attribute can be used for anisotropic materials that have a diagonal permittivity tensor in some
principle coordinate frame X,Y,Z. but have some other orientation in the simulation. The Euler angles are used to
define the orientation of the material in the simulation.

The default Euler rotation used by the permittivity rotation attribute is Z-Y'-Z''. With this convention, the first angle
(Phi) specifies a rotation around the Z axis (Z). The second angle (Theta) specifies a rotation around the new Y axis
(ie. after the first rotation has been applied). The third angle (Psi) specifies the final rotation around the new Z axis
(i.e. after the first two rotations have been applied). The rotation attribute is drawn as 3 colored arrows, where the
colors correspond to the principle coordinate frame Blue=X, Green=Y, Red=Z. The orientation of the arrows as drawn
in the CAD viewports can be used to confirm you have correctly entered the Euler angles.

Uniform Rotation
If we want to simulate an anisotropic material whose diagonal tensor is given by

(1.5 + 0.2 j ) 2 0 0

e~D ( X , Y , Z ) = 0 (1.4 + 0.1 j ) 2 0
0 0 1.22

and it's orientation in the simulation is given by the Euler angles


f = 10o , q = 20o , y = 30o
we first add
permittivity rotation grid attribute to layout editor and open the edit window and set the Euler angles as shown
above. After setting the angles, go to the material database and create a new material. Finally, in the Materials

2003 - 2016 Lumerical Solutions, Inc


262 Lumerical Knowledge Base

tab of the structure object, set the material and grid attribute properties as shown below.

Spatially-varying permittivity rotation


Spatially-varying theta, phi, and psi rotation angles can be specified over a rectangular grid. The following code
shows an example which generates the spatially-varying data and adds the data to a dataset.
# Specify x, y, z positions (in this case a over a 1D line in the z-direction)
x = 0;
y = 0;
z = linspace(0e-6,1e-6,100);

# Specify rotations
phi = linspace(0,pi/2,length(z));
theta = 0*phi;
psi = 0*theta;

# Generate dataset
PR=rectilineardataset("PR",x,y,z);
PR.addattribute("phi",phi);
PR.addattribute("theta",theta);
PR.addattribute("psi",psi);

Note: Rotation angle units

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 263

Although in the graphical user interface, angles are specified in units of degrees, when specifying angles in
the script, the rotation angle units are in radians.

To add the grid attribute and import the data from the PR dataset defined above, the following code can be
used:
addgridattribute("permittivity rotation",PR); # add grid attribute and import data fro
Or
addgridattribute("permittivity rotation"); # add grid attribute
importdataset(PR); # import data from PR dataset

This example generates a grid attribute where the rotation around the z-axis changes from 0 to 90 degrees
along the z-direction between z=0 to z=1 um, as illustrated below:

It is also possible to first save the dataset to a .mat file which can be imported from the grid attribute's edit
window with the "Import data..." button, or from the script using the importdataset 1590 script command":
matlabsave("rotation_data.mat",PR); # save the PR dataset to a .mat file
addgridattribute("permittivity rotation"); # add grid attribute
importdataset("rotation_data.mat"); # import data from .mat file

Once the grid attribute has been set up with spatially-varying rotation data, a new anisotropic material with
diagonal anisotropy can be added and the grid attribute can be applied to the object, like illustrated in the
uniform rotation section above.

5.3.1.6.4 Matrix transformation


The matrix transformation grid attribute is the most general type of unitary transformation, allowing the user to
directly specify the full transformation matrix. Advanced material properties such as the Magneto-Optical Kerr Effect
(MOKE) can be implemented using this object.

Associated files e xx e xy e xz
matrix_transform.lsf ~
matrix_transform_spatially_ e ( x, y, z ) = e yx e yy e yz
varying.lsf e zx e zy e zz

See also

2003 - 2016 Lumerical Solutions, Inc


264 Lumerical Knowledge Base

More grid attributes 399


Anisotropic grid attribute tips 266
Faraday Effects 2881
Magneto-Optic Kerr Effect 2879

Matrix transformation is used when a permittivity tensor e~ is given by a general form as


e xx e xy e xz
~
e ( x, y, z ) = e yx e yy e yz
e zx e zy e zz

~
e
We first need to calculate diagonal elements of D and transformation matrix U, which are the required inputs into
e~ ~
FDTD Solutions. Since diagonal elements of D are given by eigenvalues of e and transformation matrix U is
composed of the complex conjugate transpose of the eigenvectors of e~
, we use eig 1485 script command to
calculate these values.

Uniform Transform
If we want to set an anisotropic material with permittivity tensor

1.5 2 0
e ( x, y, z ) = - 2 1.5 0
~
0 0 1.2
we first calculate the eigenvalues as shown below.

>A = [ 1.5, 2,0;-2, 1.5,0;0,0,1.2]; # permittivity tensor in the reference coordinate


>Evl=eig(A,1); # calculate eigenvalues

After getting the eigenvalues, we create a new material and define the diagonal elements of refractive indexes
using setmaterial script commands as shown below.
>DeR=[sqrt(Evl(1));sqrt(Evl(2));sqrt(Evl(3))]; # diagonal elements of refractive index

>mymaterial = addmaterial("(n,k) Material");


>setmaterial(mymaterial,"name","MOKE");
>setmaterial("MOKE", "Anisotropy", 1); # enable diagonal anisotropy
>setmaterial("MOKE","Refractive Index", real(DeR)); # set real part of diagonal elemen
>setmaterial("MOKE","Imaginary Refractive Index", imag(DeR)); # set imaginary part of

If we open the material database, we can see that a new material is created as shown below.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 265

Next, to setup transformation matrix we calculate eigenvectors using eig script command as show below.

>A = [ 1.5, 2,0;-2, 1.5,0;0,0,1.2]; # permittivity tensor in the reference coordinate


>Evc=eig(A,2); # calculate eigenvectors

Once you get the eigenvectors, you add Matrix attribute object into the layout editor using
addgridattribute script command and set the eigenvectors to the property "U" of the Matrix attribute
object using set script command as shown below.

>addgridattribute("matrix transform"); # add matrix transform grid attribute


>set("U",ctranspose(Evc)); # set the complex conjugate transpose of Evc to grid attrib
>set("name","kerr attribute"); # set Evc to grid attribute property U

If you open edit window of the Matrix attribute and double click the "Value" field, you can check the elements of
the matrix U.

After setting the matrix, we assign the Matrix attribute and the material to"grid attribute names" and "material"
properties on the Material tab of a structure object which we want to setup an anisotropic material as shown
below.

2003 - 2016 Lumerical Solutions, Inc


266 Lumerical Knowledge Base

Spatially-varying Transform
Let's say we have an anisotropic material where the permittivity at each location varies as a function of the z
location, so the permittivity tensor is:
1.5 2 z 0
e ( x, y, z ) = - 2 z 1.5 0
~
0 0 1.2
We can use a loop to loop through the z-positions of the object, and calculate the diagonal anisotropy and
required unitary transform matrix at each location. The diagonal anisotropy values can be imported in an (n,k)
import 492 object, and the unitary transform matrix can be applied to the import object. This is done in the
matrix_transform_spatially_varying.lsf file.

5.3.1.6.5 Grid attribute tips


In this page, we will provide some tips for simulations using LC rotation, permittivity rotation, and matrix transform
grid attribute objects. These tips don't apply to the np Density and Temperature grid attributes.

Grid attribute introduction


The constitutive relation between the electric field E and the electric displacement D for an anisotropic material
in a reference coordinate system (x,y,z) can be written as
D ( x, y , z ) = e 0 e ( x, y , z ) E ( x, y , z )
(1)
~
where e is the permittivity tensor and is given by
e xx e xz
e xy

e~ ( x, y, z ) = e yx e yy
e yz
e zx e zz
e zy
(2)
~
Using a unitary matrix transformation U, the the permittivity tensor e can be diagonalized as below.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 267

eo 0 0 no2 0 0
~ * ~ ~
e D = U (q , f ) e U (q , f ) e D = 0 eo 0=0 no2 0
0 0 e e 0 0 ne2

~
In FDTD Solutions, instead of using the elements of e~ we use the diagonal elements of e D and the
transformation matrix U as input parameters.

The basic steps to set up anisotropy in FDTD Solutions which performs a simulation in a reference coordinate
system (x,y,z) are as follows.
1) Set the transformation matrix U using an appropriate grid attribute object,
2) In the material database, create a new material using the diagonalized permittivty elements and
3) On the Material tab of a structure object which we want to set up an anisotropic material,
a) Select the grid attribute defined in 1),
b) Select the material defined in 2).

In FDTD Solutions, three types of grid attribute named LC rotation, Permittivity rotation and Matrix
transformation are provided to define the matrix U. In the following pages, we will explain how to use these grid
attributes.

Note: Comparing Matrix transformation, Permittivity rotation, and Liquid


crystal grid attributes
Matrix transformation: the most general form of permittivity transformation. In principle, the matrix
transformation object could be used in place of the Permittivity rotation or Liquid crystal grid attributes.
Permittivity rotation: A simpler form of the transformation, appropriate for situations when the transformation
matrix corresponds to a simple spatial rotation. In such cases, this object allows you to specify the
transformation via the rotation angles theta, phi, psi.
Liquid Crystal: An even simpler transformation, appropriate for liquid crystals that can be defined in terms of
an ordinary and extraordinary permittivity, and having a uniaxial symmetry around the long axis of the
crystal. Due to this symmetry, the transformation can be specified by only two angles theta, phi.

Note: Grid attributes and nonlinear materials


Grid attributes can be used with nonlinear materials.

Diagonalization conventions
Please note that convention used above for matrix diagonalization may be different from the convention used

elsewhere, where the equation is in the form


e D = U eU .

Rotating structures
When you rotate a geometric primitive, the permittivity tensor is not rotated. In order to do this, you must
define a rotation grid attribute that has the same rotation as the object and associate the object with that grid
attribute.

Liquid crystal grid attribute transformation can be disabled by setting


orientation unit vector to 0
As shown in the script in the LC rotation page 255 , it is possible to specify a spatially varying liquid crystal
orientation with the Liquid crystal grid attribute using a spatially varying matrix of orientation unit vectors. The
magnitude of the orientation vector should be exactly 1 at each position, or the simulation can become
unstable.

2003 - 2016 Lumerical Solutions, Inc


268 Lumerical Knowledge Base

Alternatively, the magnitude of the orientation vector can be set to 0. In such cases, the grid attribute
transformation is disabled at that location, and the simulation will use the unrotated diagonal permittivity
values. For example, if we set |u(x,y,z)|=1 inside the spherical region and set |u(x,y,z)|=0 outside the region as
show below, a spherical LC region can be set up.

The positions of spatially varying liquid crystals are defined by a local


coordinate system
The positions x, y and z in LC rotation grid attribute is a position of the purple cross of the object (see figure
below). The liquid crystals positions defined as parameters in addgridattribute command is given by the local
coordinate system whose origin is set to the x, y and z values.

Index monitor currently record only diagonal index


Index monitors to not record any information about the permittivity transformations. Therefore, it is important to
do some careful testing to ensure the setup is correct.

Conformal meshing for structures associated with grid attributes

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 269

Grid attributes have a setting called "enable conformal meshing" which is set to "true" by default.

Conformal meshing can be disabled by setting the "enable conformal meshing" value to "false". This could be
considered in cases where there is a high refractive index contrast between the structure with grid attribute
applied and neighboring materials (such as when simulating plasmonic effects), where the behavior of the
fields near the material interface is important. This is because if conformal meshing is applied, the spatial
offset of field components within the Yee cell will not be considered by the grid attribute transform, causing
there to be some error as discussed in the "Spatial offset of field components within FDTD Yee cell
approximation" section below.

The diagonal permittivity tensor can be dispersive


The diagonal permittivity tensor can be dispersive, but the transformation U is not dispersive.

Spatial offset of field components within FDTD Yee cell approximation


In all FDTD simulations, each field component is calculated at a slightly different position within the Yee cell.
At cells which contain material interfaces, grid attribute transformations are applied only to field components
where there will be no mixing of field components in different materials.

This can introduce some additional error into the simulation, compared to a similar simulation without a grid
attribute object. In some cases, this approximation can introduce asymmetries into otherwise symmetric
systems. Reducing the mesh step size can help reduce these errors, but in some cases at interfaces
between materials with high index contrast, it is challenging to make the mesh size sufficiently small.

Interpolating spatially varying grid attributes


Linear interpolation is used to interpolate grid attribute data at each mesh point.
Singleton dimensions are extruded uniformly as shown below.

If the dimensions of a structure object are larger than the grid attribute data, the attribute will not be applied to
the portion of the structure that is outside of the attribute data.

Simulation speed
It is worth noting that using Grid attributes will increase the simulation memory and time requirements.
Therefore, when they are not needed, it's best to ensure they are not used. For example, rather than setting
the rotation angle to zero (the grid attribute will still be included in the simulation), it's best to disable the grid
attribute entirely.

2003 - 2016 Lumerical Solutions, Inc


270 Lumerical Knowledge Base

5.3.1.7 Others and simulations tips (optical)


This section describes some miscellaneous and tips regarding optical simulations. Users may also find the Optical
material modeling recorded video to be helpful.

See this section for information on the mesh order


property, which defines the meshing behavior (priority)
for overlapping objects.

Mesh order (optical) 271

This section describes how to modify the automatically


generated material fits of Sampled Data materials.

Modifying the material fits 272

This page describes how to simulate with a very small


real refractive index (such as silver) can be challenging
to simulate.

Simulations with Silver 274

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 271

5.3.1.7.1 Mesh order (optical)


It serves no role for objects which do not overlap. The mesh order can be set at the material level (in the material
database), or the object object level (in the object properties). Materials with a lower mesh order take priority over
materials with a higher priority number (i.e. order 1 takes priority over 2). Areas which overlap are
assigned the material properties of the higher priority material (see the following figure).

See also
Material database (optical) 216

setmaterial 1672
setnamed 1588
set 1568

How to: Define structures w ith overlapping com ponents (YouTube)


Alternative video source in Mandarin, click here

In the figure above, there are two objects that partially overlap. Depending on their mesh orders, the object that is
actually being simulated will be different. In the event that both overlapping materials have the same order, the mesh
order will be inferred from the Object tree. Objects at the bottom of the tree will take priority over objects at the top of
the tree. To ensure your simulation is well defined, it is recommended that you avoid situations where two different
overlapping structure have the same mesh order. To set the mesh order using script, one can user setmaterial
(material level), setnamed or set (object level).

2003 - 2016 Lumerical Solutions, Inc


272 Lumerical Knowledge Base

For simulations using the conformal mesh, the mesh order property defines the material properties in the mesh cells
where materials fully overlap one another. In the mesh cells which contain boundaries between two materials, the
conformal mesh algorithm solves Maxwell's integral equations near these boundaries.

Tip: Use an index monitor to confirm that the structures are meshed as intended.

Note: The etch material in the default Material database


By default, most materials in the material database have a mesh order of 2. The only exception is the etch
material, which has a mesh order of 1. The lower mesh order means that an object using the etch material will
override other objects of a different material type.
The etch material has a refractive index of n=1. If you are using a different background index, you should modify
the etch material to match the background index of your simulation.

5.3.1.7.2 Modifying the material fits

Objective
This section describes how to modify the automatically generated material fits of Sampled Data materials.

If the Propagator (varFDTD) is the active solver, please see Material explorer for
varFDTD 222 .

See also
Importing arbitrary dispersive models 231

Material database 217


Default optical material database 217
Creating sampled data materials 226

The Sampled data material model allows materials to be defined based on experimental n,k vs frequency data.
However, the experimental data cannot be used directly in the simulation. Instead, an analytic material model based
on the experimental data is automatically generated and will be used in the simulation. Before simulating, you
should check the model (fit) with the Material Explorer. If the fit is not very good, some fitting parameters can be
adjusted.

Fit Parameters
Fit tolerance
Tolerance specifies the target RMS error between the experimental data and the calculated model. The fitting
routine attempts to find a model that gives an RMS error below the tolerance value. The fitting routine will use
the fewest number of model coefficients that give an RMS error below the tolerance.
In most cases, setting the fit tolerance to zero is recommended, which means the fitting routines will select
the best fit that can be found.

Max coefficients
Max coefficients sets the maximum number of coefficients allowed in the model. More coefficients allow more

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 273

complicated features to be fit, but at the expense of more memory and simulation time. The fitting routine will
use the fewest number of coefficients that give an RMS error below the tolerance. If the RMS error cannot be
achieved, then the model with the smallest RMS error will be used.

Adjusting Max coefficients


By default, a Sampled data material has a tolerance of 0.1 and max coefficients of 6. In many cases, these
are reasonable values. However, it is always good practice to check the fit before running the simulation. Using
excessive number of coefficients can result in the fitting being too sensitive to the noise present in the data,
while having too few coefficients will result in significant errors in the fit. The following examples show an
example of each case.

Too few coefficients

The left image is the fit of Pt (Platinum) with 4 coefficients; its rms error is 8.04. The right image uses 5
coefficients and the rms error is 3.67. The additional coefficient clearly improves the fit, as shown in the plots,
and lowers the rms error value.

Too many coefficients

The left image is the fit of Ag (Silver) with 4 coefficients; its rms error is 0.14. The right image uses 7
coefficients and the rms error is 0.11.

In this case, even though more coefficients has lowered the rms error, the fit 'looks' worse due to the feature at
0.435 um. The material properties at this wavelength will have a large error when 7 coefficients are used. In this
case, the 4 coefficient is probably the better fit.

Advanced Settings
imaginary weight
Typically, the fitting routine gives equal weight to fitting the real and imaginary parts of the permittivity. Use the
Imaginary weight parameter to give more or less weight (consideration) to the imaginary part of the permittivity.
A value of 10 gives 10 times more consideration to the imaginary part, while 0.1 gives 10 times more
consideration to the real part. This parameter is most useful when the real part is much larger or smaller than
the imaginary part, and it is important to get a better fit to the smaller part.

2003 - 2016 Lumerical Solutions, Inc


274 Lumerical Knowledge Base

make fit passive


The automatic fitting routine restricts the range of coefficients used in the material model so that the fit does
not have any gain if the imported material data does not have gain. Uncheck 'make fit passive' to allow material
models with gain. Take care using this option since even if you introduce gain far from the simulation
bandwidth, it is possible to obtain diverging fields.

improve stability
Restrict the range of coefficients in the material model in order to minimize numerical instabilities which can
cause simulations to diverge. By default, this is selected to make the simulation more stable. Unselecting this
option might give a better fit, but the model is more likely to be unstable and the simulation might diverge.
Reducing the dt stability factor can sometimes fix this type of divergence.

specify fit range and Bandwidth range of fit


Decouple the bandwidth used to generate the material fit from the source bandwidth. Use this option to specify
the frequency/wavelength range to be used by the fitting algorithm, rather than using the frequency range of the
source.

Discontinuity and noise in experimental data


Noise or other errors in experimental data can make the automatic fitting difficult. In these cases, the fitting might be
poor. One solution is to edit the data so that a reasonable fit can be generated. If the data was imported from a text
file, simply edit your text file and import data again as if it were a new material. Otherwise, edit the data directly in
the material database. If you intend to edit any of the predefined materials in the material database that came with
the Lumerical Solutions installation, you have to make a copy of the original materials. The predefined materials
cannot be changed. For more info, please visit Default optical material database 217 and Creating sampled data
materials 226 .

5.3.1.7.3 Simulations w ith Silver

Objective
Materials with a very small real refractive index (such as silver) can be challenging to simulate. This page describes
how to obtain accurate simulation results in such cases.

In this topic
Modifying the default material database
217

Materials in the default material database


217

Associated File
usr_material_Ag_simulations.fs
p
usr_material_Ag_simulations.ls
f
usr_Ag_CRC_theory.txt
usr_Ag_JC_theory.txt
See Also
Modifying material fits 272
Importing arbitrary dispersive models 231

3D Gold Mie scattering sphere 1752

Experimental measurements of the real part of the refractive index of

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 275

silver. Notice that the index is very small above 350nm.

Simulations involving material with a small real refractive index tend to converge slowly with mesh size, requiring very
small mesh sizes (and therefore long simulation times) to provide accurate results. These problems become more
pronounced as the real index becomes smaller. This issue starts to become important when the real index is less
than 0.25, and can be quite significant when the index is less than 0.1.

This knowledge suggests two techniques that can be used to obtain accurate simulation results from simulations
involving silver or other materials with a similarly small real index. We will use a 50nm radius silver sphere as a test
case.

Option 1: Use a small mesh


As noted above, simulations using materials with a small real index can require very small mesh sizes to
provide accurate results. Given sufficient computational resources, it is possible to achieve accurate results by
making the mesh sufficiently small, even when the real index is very close to zero. However, in many
situations, it is not practical to make the mesh sufficiently small because the simulation will require too much
memory and time to complete.

Option 2: Adjust material fits to have a larger index


Recognizing that a small real index makes the simulation slower to converge, the material fitting parameters
can be adjusted to ensure the real index remains as large as possible. There are obviously limits on the
amount the index can be adjusted since the fit must still represent the properties of the physical material, but
this approach can be very helpful in some situations. In particular, it is worth remembering that some refractive
index measurements have significant errors. For example, the following figures show the measured refractive
index for silver from three sources: Johnson & Christy, Palik and the CRC Handbook. Clearly, there is
substantial variation in these experimental measurements. At 500nm, the Johnson & Christy data gives a real
index of 0.05, while CRC reports the index to be around 0.25.

Given this amount of variation in the experimental measurements, it can be argued that adjusting the fits by a
similar amount is reasonable. Similarly, unless you have a specific reason to believe the silver in your
experiment is best represented by the Palik or J&C measurements, using the CRC data is recommended.

The associated simulation file in this page includes several copies of the silver material in the material
database. This material data and the fits can be viewed with the Material Explorer.
- The model coefficients of the materials named "... 0.3-0.6um Fit" were selected to ensure the material
fit is quite good over the wavelength range 300-600nm.
- The model coefficients of the Johnson and Christy material named "... 0.3-0.6um Large_n_fit") were
selected to make the real index of the fit larger than the underlying data. This difference was intentional
introduced to minimize the convergence problems described above. It is worth noticing that the magnitude of

2003 - 2016 Lumerical Solutions, Inc


276 Lumerical Knowledge Base

the difference between the experimental data and fit is similar to the differences between the various sources
of experimental measurements.

Silver mie sphere example


The associated simulation file is very similar to the 3D Gold Mie scattering sphere 1752 example found in the
FDTD Solutions Knowledge base. The parameter sweep file will run the simulation using a number of different
mesh sizes, with two different material models. We expect the CRC model to converge more quickly, due to
the larger real index.

After running the parameter sweep, the script will plot the scattering cross section for each material as a
function of mesh size. As expected, both simulations converge to the analytic solution as the mesh becomes
smaller, but the simulation using the CRC model converges more quickly. A 2 nm mesh (pink link) is sufficient
to give reasonably accurate results when using the CRC material fit, while the Johnson and Christy data
material fit requires 0.75nm mesh (yellow line) to achieve a similar level of accuracy.

5.3.2 DEVICE materials


This chapter explains the electrical and thermal material models in DEVICE. See the following pages for details.

Material database (DEVICE) 277 The Materials Database allows you to manage (create,
Default DEVICE material database 278 modify, delete) the materials that are available for use in
your DEVICE electrical or thermal simulations.
Material interface 280 The material interface allows you to assign boundary
conditions (electrical and/or thermal) at the interface
between different materials.
DEVICE Material models 285 See this section for information on the available
Semiconductors 288 electrical and thermal material models; insulators,
Creating a new semiconductor material 298 semiconductors, conductors, binary alloys and fluids.
Calculating the effective density of states 301
Alloy material model 303
Fluid material model 311
Mesh order (DEVICE) 313 See this section for information on the mesh order
property, which defines the meshing behavior (priority)
for overlapping objects.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 277

5.3.2.1 Material database (DEVICE)

Objective
The Materials Database allows you to manage (create, modify, delete) the materials that are available for use in your
simulations.

See Also
Default optical material database 217
Getting material data from the database 219

Introduction
The Materials Database allows for the definition of complex materials using parametrized models. 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.

Import
The IMPORT button allows users to import material data via DEVICE simulation files (.ldev).

Material list
The material list shows the materials stored in the material database. A number of materials are provided with the
product installation. To create additional materials, use the ADD button. You can also modify some of the material
properties (name, color, mesh order, etc) in the list view. A copy of the database is stored in each simulation file. A
change to the database in one file does not automatically change the materials in any other files.

Modifying default materials


The first column of the list shows which materials are write protected. To modify the default materials that appear
when you create a new simulation, edit the simulation file in the defaults sub-directory of the installation
directory. For example, you could create a new database that contains only the materials required for your
simulations. For instructions, please see default DEVICE material database 278 .

Note: Materials currently used in the simulation cannot be deleted.


If a material is being used in the current project, a "no delete" icon will indicate that the material can be
modified but not erased. To delete these materials, first modify the simulation so they are not used.

Material Properties
Use the Material properties window to view and edit the material model parameters. For model parameter definitions,
see DEVICE material models 285 .

2003 - 2016 Lumerical Solutions, Inc


278 Lumerical Knowledge Base

5.3.2.1.1 Default DEVICE material database

Overview
This section describes the DEVICE materials database.

Associated File
device_default.ldev
See Also
DEVICE material Models 285

Introduction
The default material database of DEVICE includes a number of common materials used in electrical and thermal
simulations, including conductors, insulators, semiconductors, and fluids (air). When starting a new project, the
default database will be loaded. The default materials cannot be edited directly, however changes made to the
materials will be saved with the project. If you wish to modify one of the default materials, the default project file must
be edited.

Accessing the material database

The material database can be accessed through the Materials button on the main toolbar. In the material
database, materials are listed in the table, which identifies the material name and type, as well as other properties.
Below the material table, the properties for the currently selected material are displayed.

Modifying the default material database


The default material database is loaded from the default project file (located in the defaults sub-folder of your
installation directory). You can edit this file to have a different material database file if required. For example, you
could create a new database that contains only the materials required for your simulations.

These instructions describe how to create a new Default material database:


1. Copy of the default simulation file onto your desktop.
2. Make a backup copy.
3. Open the file on your desktop, then open the Material Database editor.
4. Make all required modifications to this database. This might include deleting unused materials and creating
new materials.
5. Copy this file back into the defaults sub-directory. Depending on your security settings, this may
require Administrator access.
6. Next time you start the product, the updated material database should appear automatically.

Materials in the default material database


The following materials are included in the default material database.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 279

Base semiconductors

GaAs (Gallium Arsenide)


AlAs (Aluminum Arsenide)
InAs (Indium Arsenide)
AlP (Aluminum Phosphide)
InP (Indium Phosphide)
GaP (Gallium Phosphide)
AlN (Aluminum Nitride)
InN (Indium Nitride)
GaN (Gallium Nitride)
GaSb (Gallium Antimonide)
AlSb (Aluminum Antimonide)
InSb (Indium Antimonide)
CdS (Cadmium Sulfide)
CdSe (Cadmium Selenide)
CdTe (Cadmium Telluride)
Si (Silicon)
Ge (Germanium)

Alloys

SiGe (Silicon Germanium)


AlGaAs (Aluminum Gallium Arsenide)
InGaAs (Indium Gallium Arsenide)
InAlAs (Indium Aluminum Arsenide)
InAsP (Indium Arsenide Phosphide)
GaAsP (Gallium Arsenide Phosphide)
InGaP (Indium Gallium Phosphide)
AlGaN (Aluminum Gallium Nitride)
InGaN (Indium Gallium Nitride)
GaAsSb (Gallium Arsenide Antimonide)
AlGaSb (Aluminum Gallium Antimonide)
AlAsSb (Aluminum Arsenide Antimonide)
InAsSb (Indium Arsenide Antimonide)
InAlSb (Indium Aluminium Antimode)
AlGaP (Aluminum Gallium Phosphide)
AlInP (Aluminum Indium Phosphide)

Insulators

Al2O3 (Aluminium oxide) - Robertson


HfO2 (Hafnium oxide) - Robertson
Si3N4 (Silicon nitride) - Sze
SiO2 (Glass) - Sze
TiO2 (Titanium oxide) - Robertson
ZrO2 (Zirconium dioxide) - Vitanov

Metals

Ag (Silver) - CRC
Al (Aluminium) - CRC
Au (Gold) - CRC
Cu (Copper) - CRC

2003 - 2016 Lumerical Solutions, Inc


280 Lumerical Knowledge Base

Fluid

Air

Note:
All fluid materials are treated as insulators in the electrical (CHARGE) simulation. And the materials are defined
by the permittivity.

5.3.2.2 Material interface

The interface properties are important when modeling the behavior of a semiconductor material in the CHARGE
solver or when modeling the heat transfer at the interface of two different materials. Certain interfaces can also be
used define boundary conditions for the simulation, therefore, it is important to understand the effect of the choice of
interface properties. There are two types of interface properties in DEVICE. Electrical interface which applies to the
'CHARGE' solver and thermal interface which applies to the 'HEAT' solver. By using the 'Add' and 'Delete' button,
users can add or remove an interface property between two materials.

Material Interfaces

Electrical interface (CHARGE solver only)


Two types of interfaces can exist with a semiconductor in the simulation region: interfaces with conductors,
and interfaces with insulators. while both are subject to the same physical process, certain restrictions on the
boundary conditions limit the application of the model to conductor interfaces.

The surface recombination process that models the charge behavior at the interface acts effectively like a
current source or sink. Electrons and holes interact with impurity trap states at the surface, and recombine.
Therefore, a surface recombination rate specifies a Neumann (or derivative) boundary condition on the charge
density. For details on the surface recombination model used in DEVICE and the procedure for calculating the
model parameters from the trap state properties, please consult the 'surface recombination' section.

Surface recombination
Trap-Assisted Model
Like bulk Shockley-Read-Hall (SRH) recombination, the presence of deep-level trap states at the

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 281

semiconductor surface catalyzes recombination. The surface recombination process is modeled by a


formula similar to that of the bulk case,
np - ni2
Rsurf =
1
(n + n1s ) + 1 ( p + p1s )
sp sn
but differs slightly from the bulk process since it is occurs on a two-dimensional surface. The trap
density Nts is now given per unit area, such that the carrier lifetime of the bulk case is replaced by a
surface recombination velocity,
3k BT
sn , p = s n , p N ts
mn*, p
The surface recombination velocity is treated as an input parameter in DEVICE, chosen to reflect the
non-ideal nature of the material surface. The surface recombination velocity may be temperature
dependent. Like the bulk case, the constants n1s and p1s are calculated as
E /k T
n = n e ts B
1s ie
- E /k T
p = n e ts B
1s ie

SURFACE RECOMBINATION VELOCITY: The surface recombination property is usually defined by a


parameter called surface recombination velocity. If there are no surface recombinations at an interface
then the net movement of carriers toward that surface is zero which refers to a surface recombination
velocity of zero. On the other hand, if the surface recombination at an interface is infinitely large then
the carriers will move toward that surface at maximum velocity (~107 cm/s) which is limited by the
material property of the semiconductor.
ELECTRON (cm/s)
HOLES (cm/s)

F(T) - TEMPERATURE DEPENDENCE OF SURFACE RECOMBINATION VELOCITY

ENABLE MODEL: Enables the temperature dependent surface recombination velocity model
T h
A(T ) = A(300)( )
300
where, A(T) is the surface recombination velocity at temperature T and ETA is the index of the power
law.

APPLY TO MAJOR CARRIERS: Enabling this options applies the surface recombination for both
majority and minority carriers. If disabled then surface recombination is applied to minority carriers
only.
TRAP Ei OFFSET (eV): Energy offset of the trap level from the mid-gap energy level (Ei).

Semiconductor-Conductor
In a DEVICE simulation, conductors specify both charge and electrostatic boundary conditions. Due to the
nature of the equations required to describe the physical behavior of the semiconductor, the charge density for
both electrons and holes must be specified explicitly on at least on surface in the system. Generally, this is
accomplished by specifying the majority carrier concentration.

On conductor surfaces where an interface model (surface recombination) is specified, the model should not be
applied to the majority carriers. This is accomplished by un-checking the "Apply to majority carriers" option,
which is the default for a newly added interface. This assumption is appropriate at a conductor interface where
the doping concentration is large: the relative change in the carrier densities due to recombination may be
large in for the minority carriers, but will typically be negligible for the majority carriers. Therefore, the physical

2003 - 2016 Lumerical Solutions, Inc


282 Lumerical Knowledge Base

behavior of the interface is correctly modeled by applying the surface recombination model to the minority
carriers, while fixing the majority carriers at their equilibrium density, which in turn specifies a necessary
boundary condition.

Semiconductor-Insulator
Unlike conductors, insulator (e.g. oxide) boundaries are not used to specify charge boundary conditions in a
DEVICE simulation. In addition, insulator interfaces may not be associated with large doping concentrations.
Therefore, when specifying the properties for an insulator interface, it is correct to ensure that the "Apply to
majority carriers" box is checked. This will ensure that the density of both the majority and minority carriers at
the insulator interface are adjusted according to the surface recombination model.

Thermal interface (HEAT solver only)


In the HEAT solver, the thermal interface properties can be used to define boundary conditions at material
interfaces. There are three types of boundary conditions available; heat flux, convection, and radiation.

HEAT FLUX: If enabled, this sets the heat flux at the interface between two materials. This option can be
used to define a cooling (or heating) boundary condition at the surface of an object in the simulation region.
HEAT FLUX (W/m2): Sets the heat flux through the interface.

CONVECTION: If enabled, this sets up a convective boundary condition between two materials. One of these
materials must be a fluid (e.g. Air).
AMBIENT TEMPERATURE (K): Sets the temperature of the fluid.
MODEL: There are 5 different convection models available.

Model Definition Input parameters


Constant Simple model using a constant h (W/m^2.K): Sets a constant
convective heat transfer coefficient value for the convective heat
transfer coefficient
Natural convection (vertical) Analytic model applicable to length scale (m): Characteristics
convective heat transfer between a length dependent on the height of
vertical plate and surrounding fluid the vertical plane
at rest
Natural convection (top plate) Analytic model applicable to length scale (m): Characteristics
convective heat transfer between length dependent on the diameter
the top surface of a horizontal (area/perimeter) of the horizontal
plane and surrounding fluid at rest plane
Natural convection (bottom Analytic model applicable to length scale (m): Characteristics
plate) convective heat transfer between length dependent on the diameter
the bottom surface of a horizontal (area/perimeter) of the horizontal
plane and surrounding fluid at rest plane
Forced convection Analytic model applicable to length scale (m): Characteristics
convective heat transfer between a length dependent on the length of
surface and surrounding fluid the plane along the direction of the
flowing at a certain velocity fluid flow
fluid velocity (m/s): Velocity of
the surrounding fluid due to
external influence

For details about the convective boundary conditions see the following sub-section on convective heat transfer.

Convective heat transfer


The amount of heat transfer at the surface of a material (solid) due to convection can be calculated using

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 283

the following equation,

q = Ah(Tsurf - T fluid )...............................(1)

where, q is the amount of heat transferred (lost) due to convection, A is the surface area of the solid, h is
the convective heat transfer coefficient which depends on the surface type and fluid properties, Tsurf is
the temperature at the solid surface, and Tf luid is the nominal temperature of the fluid. The convection
boundary condition at the material interfaces either uses a constant value for the convective heat transfer
coefficient (h) or calculates its value from the fluid properties and the surface properties (length,
orientation, etc.) using analytic equations [1]. In the case of the analytic equations, all the material data
are evaluated at temperature (Tsurf + Tf luid) / 2.

Constant: When the "constant" model is chosen, the solver uses a constant value for the convective
heat transfer coefficient and calculates the amount of heat transfer due to convection using eq. (1).

Natural convection (vertical): This analytic model is used in cases where convective heat transfer
takes place at the surface of a vertical plate immersed in a fluid (e.g. air) that has no external force
acting on it. The motion of the fluid that creates the convective heat transfer arises solely from
temperature gradient in the fluid adjacent to the solid surface and from gravitational pull. The analytic
equation used by this model is given by,




1/ 6
k 0.670 Ra L
h = 0.68 + 4/9 ..............................(2)
L 0.492k 9 / 16
1 +
mC p

and



1/ 6
k 0.387 Ra L
h = 0.825 + 4/9 ..............................(3)
L 0.492k 9 / 16
1 +
mC p

where, k is the heat transfer coefficient of the fluid, L is the characteristics length defined by the height
of the vertical plate, is the dynamic viscosity of the fluid, Cp is the specific heat of the fluid, and RaL is
9
the Rayleigh number for length L. Eq. (2) is used for laminar flow (RaL ) and eq. (3) is used for
turbulent flow (109 L
13
). The value of the Rayleigh number for a vertical wall of height L is given by,

g br 2 C p (Tsurf - T fluid ) L3
Ra L = ............................(4)
mk

where, g is the gravitational acceleration and is the thermal expansivity of the fluid.

Natural convection (top plate): This analytic model is used in cases where convective heat transfer
takes place at the top surface of a horizontal plate immersed in a fluid (e.g. air) that has no external
force acting on it. The motion of the fluid that creates the convective heat transfer arises solely from

2003 - 2016 Lumerical Solutions, Inc


284 Lumerical Knowledge Base

temperature gradient in the fluid adjacent to the solid surface and from gravitational pull. There are two
analytic equations in this model. For a hot plate (Tsurf > Tf luid), the convective coefficient is given by,

k 1/ 4
h= 0.54 Ra L ......................(5)
L
and
k 1/ 3
h= 0.15 Ra L ......................(6)
L

where, the Rayleigh number is given by eq. (4). Eq. (5) is used for laminar flow (104 L
7
) and eq.
7 11
(6) is used for turbulent flow (10 L
). For a cold plate (Tsurf < Tf luid), the convective coefficient is
given by,

k 1/ 4
h= 0.27 Ra L ......................(7)
L

where, the Rayleigh number is again given by eq. (4). This model is valid for both laminar and turbulent
flows (105 L
10
).

Natural convection (bottom plate): This analytic model is used in cases where convective heat
transfer takes place at the bottom surface of a horizontal plate immersed in a fluid (e.g. air) that has no
external force acting on it. The motion of the fluid that creates the convective heat transfer arises solely
from temperature gradient in the fluid adjacent to the solid surface and from gravitational pull. The
equations used in this model are similar to the ones used for natural convection on the top surface of a
horizontal plate with the difference that for a hot plate (Tsurf > Tf luid), the convective coefficient is given by
eq. (7) and for a cold plate (Tsurf < Tf luid), it is given by eqs. (5) and (6).

Forced convection: This analytic model is used for convection on a solid surface immersed in fluid
(e.g. air) where the fluid is flowing due to an external force. For example, the fluid flow can be forced by
a fan or a pump. The average convective heat transfer coefficient for a plate length of L is give by,




1/ 2
2k 0.3387 Pr 1 / 3 Re L
h= .......................(8)
L 2 / 3 1/ 4
0.0468k
1 +
mC p

and

2k 1 / 3
h=
L
( 4/5
)
Pr 0.037 Re L - 871 .......................(9)

where, ReL is the Reynolds number given by

rv fluid L
Re L = .........................(10)
m

5
where vf luid is the velocity of the fluid. Eq. (8) is used for the case of laminar flow (ReL ) and eq.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 285

(9) is used for the case of mixed flow (laminar + turbulent) in the range ReL > 5.105.

RADIATION:
AMBIENT TEMPERATURE (K): Sets the temperature of the surrounding environment.
EMISSIVITY (a.u.): 1 for black-body radiation and <1 for gray-body radiation.

Heat transfer due to radiation is calculated using the Stefan-Boltzmann law given by,

q = A es (Tsurf - Tenv )
4

where, q is the heat loss due to radiation, A is the surface area, is the emissivity of the solid, is the
Stefan-Boltzmann constant, Tsurf is surface temperature and Tenv is the temperature of the surrounding
environment.

Reference
1. F. P. Incropera, D. P. DeWitt, T. L. Bergman, and A. S. Lavine, "Fundamentals of Heat and Mass
Transfer," John Wiley & Sons, 6th edition, 2006.

5.3.2.3 DEVICE Material models


This section describes the material models available in the DEVICE solver. Models can be added and modified in the
Material Database. Different models are used to realize two different types of material properties, electrical and
thermal, each belonging to a different solver, CHARGE and HEAT, respectively.

Electrical Properties
The material models used to define the electrical properties of materials fall into one of five general classes:
conductors, insulators, semiconductors, alloys, and fluids.

Conductor
Conductors are treated as perfect electrical conductors in a DEVICE simulation. Therefore, the electrostatic
potential is constant over the entire domain of the conductor. Conductors are used to specify electrostatic
boundary conditions, and must be associated with a contact in an electrical simulation.

Conductor material details


Work Function
The defining characteristic of the conductor is its work function, which describes the energy cost of removing
an electron from the material.

Insulator
Materials that are defined as insulators are treated as ideal electrical insulators with a constant isotropic DC
permittivity. Insulators contain no free charge, and specify flux boundary conditions in an electrical simulation.

Insulator material details


Relative Dielectric Permittivity
The relative permittivity (or dielectric constant) of the material is equal to the square of the refractive index, and
is assumed to be the DC (zero frequency) value.

Semiconductor
Semiconductors, like insulators, are band gap materials. The band gap of a semiconductor is typically small
enough to allow a significant fraction of electrons to be thermally excited from the valence band to the conduction

2003 - 2016 Lumerical Solutions, Inc


286 Lumerical Knowledge Base

band at room temperature (300K). The band gap for a semiconductor typically ranges from 0.5-1.5eV. When
energetically excited to a conduction band state, electrons leave behind a positively charged mobile vacancy,
known as a hole, which behaves much like a free electron in the semiconductor. The mobility of the electrons and
holes and the rates at which they are generated and recombine are determined by the models described in this
section.

Semiconductor material details


Semiconductors are described by a comprehensive set of parametric models that account for the behavior of
free charge in an ideal crystal lattice and corrections to that behavior due to interactions with impurities,
interactions with other charges, and temperature effects. See the Semiconductor model 288 page for details of
its Electronic Properties and Recombination.

Binary Alloy
Binary Alloys consist of two semiconductors. The bandgap and other properties for alloys are determined from the
properties of the semiconductors it consists of.

Alloy material details


Since semiconductors are described by a comprehensive set of parametric models, so are alloys. See the
Alloys model 303 page for details.

Fluid
Liquid and gaseous materials are defined as fluids in the material database. In the CHARGE solver, fluids are
treated as insulators. They contain no free charge, and specify flux boundary conditions in an electrical
simulation.

Fluid material details


Relative Dielectric Permittivity
The relative permittivity (or dielectric constant) of the material is equal to the square of the refractive index, and
is assumed to be the DC (zero frequency) value.

Thermal Properties
The material models used to define the thermal properties of materials fall into one of two general classes: non-
fluids (which includes conductors, insulators, semiconductors, and alloys) and fluids.

Non-Fuild
This includes semiconductors, conductors, alloys, and insulators. All these material types are defined using
similar models describing their density, specific heat, thermal conductivity, and electrical conductivity.

Non-fluid material details


In the HEAT solver, non-fluid materials are defined by their thermal properties. The properties are listed as
follows:

Heat Transport Properties:


DENSITY (kg/m3): The density of the material in SI unit.
SPECIFIC HEAT (J/kg/K): The specific heat of the material in SI unit. Can be defined as a constant
value or using a temperature dependent model. The temperature dependence of specific heat of solids is
modeled using the following equation,

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 287

b
T
-1
300
c L (T ) = c L ,300 + c1 b
T c
+ 1
300 c L ,300

where, CL(T) is the specific heat at temperature T, CL,300 is the specific heat at 300 K, and c 1 is a constant.

THERMAL CONDUCTIVITY (W/m/K): The thermal conductivity of the material in SI unit. Can be defined
as a constant value or using a temperature dependent model. The temperature dependence of thermal
conductivity of solids is modeled using the following equation,

h
T
K L (T ) = K 300
300

where, KL(T) is the thermal conductivity at temperature T, K300 is the thermal conductivity at 300 K, and is
a constant.

Electrical Conduction Properties:


ELECTRICAL CONDUCTIVITY (S/m): The electrical conductivity of the material in SI unit. Can be
defined as a constant value or using a temperature dependent model. The temperature dependence of
electrical conductivity of solids is modeled using the following equation,

-1
1
s (T ) = {1 + a (T - T0 )}
s0

where, (T) is the electrical conductivity at temperature T, 0 is the electrical conductivity at temperature
T0, and is a constant.

Fluid
Fluid material details
Electronic Properties tab
RELATIVE DIELECTRIC PERMITTIVITY

Thermal Properties tab


Heat Transport Properties:
DENSITY (kg/m3): The mass density of the fluid in SI unit. Can be defined as a constant value or using
a temperature dependent model. The temperature dependent model is applicable for gases only and the
mass density is calculated using the ideal gas law,

Rspecific
r (T ) = P
T

where, (T) is the mass density at temperature T, P is the pressure, and Rspecif ic is the specific gas
constant.

SPECIFIC HEAT (J/kg/K): The specific heat of the fluid in SI unit. Can be defined as a constant value or
using a temperature dependent model. The temperature dependence of specific heat of fluids is modeled

2003 - 2016 Lumerical Solutions, Inc


288 Lumerical Knowledge Base

using the following equation,

b
T
-1
300
c L (T ) = c L ,300 + c1 b
T c
+ 1
300 c L ,300

where, CL(T) is the specific heat at temperature T, CL,300 is the specific heat at 300 K, and c 1 is a constant.

THERMAL CONDUCTIVITY (W/m/K): The thermal conductivity of the fluid in SI unit. Can be defined as
a constant value or using a temperature dependent model. The temperature dependence of thermal
conductivity of fluids is modeled using the following equation,

h
T
K L (T ) = K 300
300

where, KL(T) is the thermal conductivity at temperature T, K300 is the thermal conductivity at 300 K, and is
a constant.

DYNAMIC VISCOSITY (Pa.s): The dynamic viscosity of the fluid in SI unit. Can be defined as a
constant value or using a temperature dependent model. The temperature dependence of dynamic
viscosity of fluids is modeled using the Sutherland's formula,

T3 2
m (T ) = C1
T +S

where, (T) is the dynamic viscosity at temperature T, S is the Sutherland's constant for the particular fluid,
and C1 is given by,

C1 = m 300 (300 + S )

where, 300 is the dynamic viscosity of the fluid at 300 K.

THERMAL EXPANSIVITY (1/K): The thermal expansivity of the fluid in SI unit. Can be defined as a
constant value or using a temperature dependent model. The temperature dependence of thermal
expansivity of fluids is calculated using the ideal gas law that gives,

b =a
T

where, is the thermal expansivity at temperature T and is a constant whose value is 1 for ideal gases.

5.3.2.3.1 Material model - Semiconductors


This page describes various properties and models available in the Semiconductor material model. You may also
find the Creating a new semiconductor material 298 page to be useful.

Semiconductor Fundamental Properties


Relative Dielectric Permittivity
The relative permittivity (or dielectric constant) of the material is equal to the square of the refractive index, and is

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 289

assumed to be the DC (zero frequency) value.

Work Function
In a semiconductor, the work function s describes the energy cost of removing an electron from the intrinsic
energy level (the Fermi energy of the undoped semiconductor) and placing it at "infinity." A related value is the
electron affinitiy s, which is the energy cost of removing an electron from the conduction band edge.
EG k BT N C
c s = fs ,i - + ln
2 2 NV
where EG is the band gap and NC and NV are the effective density of states in the conduction band and valence
band, respectively.

Effective Mass
To account for the influence of the crystal lattice potential of the semiconductor, electrons and holes can be
approximated as free charges with an effective mass (relative to the electron rest mass) that depends on the
electronic band-structure of the material. In DEVICE, the effective mass is treated as a parameter of the material
model.

The temperature variation in the effective mass can be accounted for with a quadratic model
mn*, p (T ) = mn*, p (0) + aT + bT 2
where coefficients and , and the effective mass at T=0K are inputs to the model.

Related to the effective mass is the effective density of states in the conduction and valence bands
3/ 2
2 pmn* k BT
N C = 2
h2
3/ 2
2 pm*p k BT
NV = 2
h 2

where h is Plancks constant.

Band Gap
A key physical property of the material is the band gap, which, like the effective mass, is derived from the
electronic band-structure of the material. In DEVICE, the band gap energy is treated as a parameter of the
material model.

The temperature variation in the band gap can be accounted for with a "universal" empirical model
aT 2
EG (T ) = EG , 0 -
b +T
where coefficients and , and the band gap energy at T=0K are inputs to the model.

Band Gap Narrowing


When impurities are added to the intrinsic (pure) semiconductor, localized allowed energy states may be
introduced at energies that lie within the band-gap. In the case of dopants, these impurity states will exist with
energies near the conduction or valence band edges (such that the dopants readily ionize at moderate
temperatures). When the concentration of dopants is large, these discrete states will begin to merge and form a
thin "band" of allowed states within the band gap, effectively narrowing the band gap. This can be viewed as a
narrowing of the band gap or an increase in the effective density of states.

The Slotboom model [1] for band gap narrowing is provided in DEVICE to account for this effect,
N+ + N- N + + N A-
DEG = -V1 ln D A
+ ln 2 D + C
N 0 N0

2003 - 2016 Lumerical Solutions, Inc


290 Lumerical Knowledge Base

where the coefficients V1, N0, and C are inputs to the model, and the effect can be specified independently for
electrons and holes. Note that the sign implies a narrowing effect for positive coefficients.

Intrinsic Carrier Concentration


The intrinsic carrier concentration is calculated from the effective mass and band gap, and is only displayed in the
Material Database for reference. It is calculated as
ni = N C NV exp (- EG / 2k BT )
where T=300K is assumed, and the effective density of states and band gap are treated are treated as intrinsic
quantities (before band gap narrowing).

Ec valley
The conduction band of semiconductors can have several valleys and by default the lowest valley is enabled for
each semiconductor in the default list of materials in the material database. For each valley, the different
semiconductor properties can be specified and by default only those from the lowest valley are used. The user
can choose to change this by picking between the L, X or Gamma valleys.

Mobility
The mobility parameter in the drift-diffusion equations is the physical link between the motion of carriers (electrons
and holes) and the semiconductor material. The mobility can be viewed as a measure of how readily electrons
and holes can move through the crystal lattice of the semiconductor. In the absence of any interactions with the
lattice, impurities, or other carriers, electrons and holes would move freely in the periodic potential of the lattice;
interactions that change the momentum of the carriers are termed scattering events. Different types of scattering
contribute to the mobility of the electrons and holes, including
lattice scattering,
ionized and neutral impurity scattering, and
carrier-carrier scattering.
In addition, the velocity of the carriers is observed to saturate at high-fields. Each of these scattering mechanisms
can be addressed in DEVICE by applying the appropriate models, which are detailed in the following sections.

Lattice Scattering
The fundamental process that impedes the free motion of the carriers in the lattice is thermal scattering off of the
lattice itself. The mobility due to lattice scattering is treated as a basic input into the DEVICE semiconductor
model, and may be entered as a constant value or with a temperature dependence described by the "universal"
temperature model,
h
T
A(T ) = A(300)
300
where A(300) is the value of the parameter at T=300K, and is a temperature exponent. In the case of the lattice
scattering mobility L, the temperature dependence reads
h
L L T
m (T ) = m
n, p n, p (300)
300 .
where subscripts n and p refer to electrons and holes, respectively.

Impurity and Free-Carrier Scattering


Many models exist to account for the influence of impurities on the carrier mobility. DEVICE provides support for
three common models with wide-ranging applicability: the Caughey-Thomas model [2], the Masetti model [3], and
the Klaassen model [4]. Each model requires a variety of coefficients; default values are provided with DEVICE for
common semiconductors.

For general modeling purposes, the Caughey-Thomas model or Masetti models are often sufficient, and
coefficients are available for multiple semiconductor materials. The Klaassen model is primarily tuned for silicon
at T=300K, and coefficients for other materials are not available. At moderate doping densities, the mobility
predicted by all models reduces to that of the Caughey-Thomas model.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 291

The most basic model is the Caughey-Thomas model,


LI min
m nL, p - m nmin
,p
m =m +
1 + (N / N ref )
n, p n, p a

where N is the total doping concentration (N = NA + ND ), L is the lattice scattering mobility (as determined from
the model chosen in the previous section), and min, Nref, and are temperature-dependent coefficients
described the universal temperature model.

To account for extremely large doping concentrations, the Masetti model can be selected, which adds a
correction to the Caughey-Thomas model for large N:
m nL, p - m nmin
,p m n( 2, p)
m nLI, p = m nmin
,p + a
- b
1 + ( N / Cr ) 1 + (Cs / N )
.
Again, N is the total doping concentration (N = NA + ND ) and L is the lattice scattering mobility. Parameters min,
(2), Cr (replacing Nref of the Caughey-Thomas model), Cs , , and are each temperature-dependent coefficients
described the universal temperature model.

Finally, the mobility model proposed by Klaassen can be used to account for the aforementioned doping effects
(at moderate and high impurity concentrations), as well as the influence of carrier-carrier scattering. The Klaassen
model combines the basic lattice scattering with the impurity and carrier-carrier scattering using Matthisens rule
1 1 1
LIC
= L
+ IC
m n, p mn, p mn, p
where L is the lattice scattering mobility and IC is Klaassens impurity and carrier-carrier (IC) scattering
mobility. The formulation of the IC scattering mobility is complex and involves multiple levels of coefficients and
models accounting for
majority carrier scattering by dopants,
minority carrier scattering by dopants, and
electron-hole scattering.
To begin, the IC mobility is defined as a function of the dopant and carrier concentrations,
2


+
,
(
, , , =
,
)


,

1
+
, ,

- .. -
..
, , , , , , ,
where L is the lattice scattering mobility, and coefficients min, Nref 1 (equivalent to Nref or Cr), and are defined
as for the Caughey-Thomas or Masetti models. Note that the Klaassen model accounts for temperature
dependence separately, therefore constant a constant value should be used for the lattice scattering mobility.

In the preceding equation, the "scattering densities" are


N nsc = N D + N A + p
N psc = N A + N D + n
where the donor and acceptor densities, ND and NA respectively, are corrected according to the clustering
function:
N D+
N D = N D+ +
(
C D + N ref , D / N D+ ) 2

N A-
N A = N A- +
(
C A + N ref , A / N A- )
2

Here, CD , Nref ,D , CA, and Nref ,A are coefficients of the model.

2003 - 2016 Lumerical Solutions, Inc


292 Lumerical Knowledge Base

The "effective scattering densities" are defined as (using the same clustering-corrected acceptor and donor
concentrations)
p
N nsc.eff . = N D + G (Pn )N A +
F (Pn )
n
N psc.eff . = N A + G (Pp )N D +
F (Pp )
The function G describes the ratio of scattering cross-sections between repulsive and attractive screened
Coulomb potentials as a function of the factor P (itself a function of carrier density and majority dopant density).
The factor P accounts for the screening effect, and is calculated as the weighted harmonic mean of two
parameters accounting for the free-carrier and ionized impurity screening,
-1
f CW f BH
Pn ( N D , n ) = +
PCW ,n ( N D ) PBH ,n (n )
-1
f CW f BH
Pp ( N A , p ) = +
P (N ) P ( p )
CW , p A BH , p
Weights fCW and fBH are coefficients of the model.

The same factor P is used in the calculation of the function F, which describes the mobility ratio between
stationary, infinite-mass secondary scatters (e.g. ionized impurities) and mobile, finite-mass secondary scatters
(e.g. free carriers). Both functions F and G are parameterized fitting functions to physical processes, and the
coefficients of those functions (r1 to r6 for function F and s 1 to s 7 for function G) are also coefficients of the model.

High-Field Mobility
As the electric field within the semiconductor increases, the drift-velocity of the carriers is commonly observed to
saturate, reducing the mobility accordingly. To account for this effect, DEVICE includes high-field mobility models
that describe the monotonic (silicon-like) or overshoot (GaAs-like) velocity saturation behaviour. The monotonic
model is
mnLIC
,p
mnLICE
,p = 1/ b
m LIC F b
n, p n, p
1 + v sat
n, p

where LIC is the mobility accounting for lattice, impurity, and carrier-carrier scattering (as calculated using the
active models for those processes) and vsat is the model coefficient that determines the saturation velocity. F is
the driving field, which may be defined as the magnitude of the quasi-Fermi level gradient or the component of the
electric field in the direction of the current density.

The overshoot model is given as


b
vnsat
, p Fn , p
mnLIC +
Fn, p F0
,p
mnLICE
,p = b
Fn, p
1 +
F0
where again F is the driving field, F0 is the critical field, and vsat is the saturation velocity.This model is typically
applied to the electrons in GaAs.

Bulk Recombination and Generation


Recombination describes the processes by which an electron from the conduction band makes an energetic

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 293

transition and neutralizes a hole in the valence band. Generation describes the complementary behavior, where
an electron is excited from the valence band to the conduction band, creating a hole in the process (often, the
term electron-hole-pair is used when referring to generation). The models for bulk recombination and generation
processes relate to the physical mechanisms by which the carriers make the energetic transition. DEVICE
provides models describing
trap-assisted (Shockley-Read-Hall) recombination,
Auger recombination,
radiative recombination,
impact ionization, and
band to band tunneling.
These models and their parameterizations are the subject of the following sections.

Trap-Assisted (Shockley-Read-Hall) Recombination


The recombination process in the trap-assisted model assumes that there are unoccupied "trap" states (also
referred to deep-level defect states) within the band gap. Typically, these states result from impurities (either
intentional or unintentional), and the most active have energy levels near the middle of the band gap.
Recombination occurs when an electron relaxes (transfers energy to the lattice or emits a photon) to the trap
state from the conduction band, and sequentially, a hole from the valence band relaxes to the same trap state.
This process is modeled using the Shockley-Read-Hall (SRH) equation,
np - ni2
RSRH =
t p (n + n1 ) + t n ( p + p1 )
where n and p are the electron and hole lifetimes, respectively, and n1 and p1 are the effective densities of
carriers in the trap states. The trap states are characterized by their densities Nt , capture cross-section t , and
energy level Et - Ei (commonly abbreviated as Et and referenced to the intrinsic energy level). The constants n1
and p1 are calculated as
n1 = niee Et / k BT
p1 = niee - Et / k BT
The carrier lifetime can be determined from the capture cross-section and trap density as
-1
3k BT
t n, p = s n, p N t

mn*, p

but is commonly taken as an input to the model.

DEVICE provides a temperature dependent model for the SRH carrier lifetime, as well as models that include
corrections for doping density and field effects. The general form of the carrier lifetime can be expressed as
t n0, p (T ) f ( N )
t n, p (T , N , F ) =
1 + g (T , F )
where f is a function of the total dopant concentration N and g is a function of the magnitude of the applied field F.
The basic temperature-dependent model for the carrier lifetime follows the usual power-law relation
hn , p
T
t nsrh ,0
, p (T ) = t nsrh ,0
, p (300)
300
Alternately, a constant value can be supplied for both electrons and holes.

To account for doping concentration effects, DEVICE provides two correction models that use the previous
expression for the SRH carrier lifetime as an input. First, a modified model in the form proposed by Fossum is
described by
t nsrh
,p
,0
N A + ND
t nsrh
,p = s n,p
, where N n , p =
a n, p + b n, p N n, p + g n, p N n, p N nref, p
The original model of Fossum can be obtained by setting coefficients , , and to one (1) and setting to zero

2003 - 2016 Lumerical Solutions, Inc


294 Lumerical Knowledge Base

(0), and this is the default model used in DEVICE.

Alternately, a formulation proposed by Klaassen can be selected, where the SRH carrier lifetime correction is
given by the equation
s n,p
t nsrh
,p
,0
T N A + ND
t nsrh
,p = srh, 0 , where N n , p =
1+ a t
n, p n, p N n, p 300 N nref, p
Note that this model explicitly includes the temperature dependence, and should only be used in concert with a
constant value for the baseline SRH carrier lifetime.

To account for field effects, either the Hurkx [5] or Schenk [6] model may be selected. These models represent
the corrections for trap-assisted tunneling, where carriers can transition to a deep-level trap state by tunneling
through an electrostatic barrier.

Hurk x Model
The correction term g(F) for the Hurkx model (referred to as in the reference) is
~ 1 ~
[
gn = DEn exp DEn u - Kn u 3 / 2 du ]
0
where is the carrier index (n or p),
~
DEn = DEn / kT
0 E Fn > EC

DEn = EC - E Fn ET < E Fn EC
E -E E Fn ET
C T
(and a similar expression for holes), and
* 3
4 2m DEn
Kn =
3 qhF

Schenk Model
The correction term g(F) for the Schenk model is
- 1/ 2
(h )3 / 2 E - E

g = 1 + t 0 (h )3 / 4 Et - E0 1/ 4 h 3 / 2 ( )

E h 2 E E kT
0 0 0 t
E -E h - kT E + kT/ 2 E E E
exp - t 0+ 0 + t ln t - 0 ln 0
h 2h h h
0 0 0 R 0 R

Et - E0 E - E 3 / 2
exp exp - 4 t 0
kT 3 h

where the electro-optic frequency is

(
Q = q 2 F 2 / 2hmt )
1/ 3

with effective tunneling mass mt , and the transition energy is

E0 = 2 e F [ e F + Et + e R - e F - e R ]
with

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 295

eF =
(2 e R kT )2
(hQ )3
and
e R = Sh w0
which is the product of the optical phonon energy h 0 and the Huang-Rhys (coupling) factor S. The trap energy Et
is referenced to the valence band edge, and is computed from the mid-gap offset specified for the trap-assisted
tunneling model.

Auger Recombination
Auger transitions are three-particle transitions (two carriers scatter and transfer energy and/or momentum to a
third carrier) that describe four related processes, which are illustrated in the figures below. Each process has an
associated rate coefficient. According to the principle of detailed balance, the net rate for each type of carrier
must be zero at equilibrium, such that
CcnAU ni2 = CenAU and CcpAU ni2 = CepAU
Assuming that the value of the rate coefficients does not change as the system moves from equilibrium, the net
Auger recombination rate is
( )(
RAU = CcnAU n + CcpAU p np - ni2 )
Note that Auger transitions depend only on carrier density, differentiating them from other recombination
processes.

Recombination by electron Recombination by hole Generation by electron Generation by hole


excitation excitation relaxation relaxation

RnAU = CcnAU n 2 p R pAU = CcpAU np 2 GnAU = CenAU n G pAU = CepAU p

DEVICE supports three models for the capture rate coefficients, including
the universal temperature model proposed by Klaassen,
an empirical model by White accounting for a reduction in the recombination rate at high carrier concentrations,
and
a model by Clugston and Basore accounting for both high and low injection conditions.

The universal temperature model proposed by Klaassen takes the usual power-law form,
n,p
0 T
Cn,p = Cn,p( 300 )
300
and is suitable for devices where Auger recombination is moderate (low injection conditions). The Auger rate
coefficients are only weakly dependent on temperature, and constant values may be used as well.

2003 - 2016 Lumerical Solutions, Inc


296 Lumerical Knowledge Base

An alternate empirical model proposed by White can be used as a correction to the previous model, taking that
coefficient as an input. The White model accounts for the reduction in the Auger recombination rate observed at
high carrier densities (due to strong screening effects), and is expressed as
0
Cn0 Cp
Cn = , Cp =
1 + an 1 + ap
where the coefficient determines the transition density.

A related model proposed by Clugston and Basore is designed to account for the two regimes related to minority
carrier injection:
N D CnHI p
Cn = Cn0 +
ND + p 2 N D + p
HI
0 NA Cp n
C p = C p +
NA + n 2 N A + n

DEVICE will use the Auger capture rate coefficient defined in the Klaassen model (or a constant value) for the low
injection conditions, and apply a second coefficient when strong minority carrier injection dominates according to
the preceding formulations.

Radiative Recombination
In a radiative transition, a conduction band electron will relax directly, emitting a photon whose energy
approximately equals that of the band gap, and then recombine with a hole in the valence band. The opposite
process occurs when a photon is absorbed by an electron in the valence band, promoting it to the conduction
band and leaving a hole in its place. Radiative recombination transitions are typically significant only in materials
with a narrow bandgap, or a bandstructure that permits direct transitions in momentum (e.g. GaAs). Radiative
recombination is typically negligible in bulk silicon.

The recombination rate is determined from the product of a capture rate coefficient and the carrier density
product,
ROPT = CcOPT np
and the corresponding generation rate is simply the emission rate constant,
GOPT = CeOPT
Once again, the coefficients are related by the principle of detailed balance at thermal equilibrium, such that
(
ROPT = CcOPT np - ni2 )
The optical capture rate coefficient can be modeled in DEVICE either as a constant or using the universal
temperature power-law,

h
OPT OPT T
C c (T ) = C c (300)
300

Impact Ionization
Impact ionization is a carrier generation process where an electron or hole, accelerated by a high field, will relax
by transferring energy to the lattice. When energy exceeding the band gap is transferred to the lattice, an
electron-hole pair is excited (and separated by the strong local field), generating additional free carriers. Above a
critical threshold, this process leads to avalanche breakdown.

Impact ionization described by the Selberherr model [7]:


Jn Jp
RII = - a n -ap
q q
where Jn,p is the magnitude of the current density for the indicated carrier, and

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 297

E crit. bn
an = a n exp - n
Fn

The impact ionization process is exponentially dependent on the driving field F (either the quasi Fermi level
gradient or electric field component in the direction of the current density) and moderated by the critical field Ecrit .

Note: the impact ionization process is exponentially dependent on the electric field and the local variations in the
quasi-Fermi levels (through the current density). Consequently, it is a highly non-linear process, and it's inclusion
in the physical model for the semiconductor can cause divergences in the simulation. By default, the impact
ionization process is not enabled. When simulating avalanche breakdown, ensure that adequate steps are taken
to ensure simulation convergence, including reducing step size, increasing iteration limits, and enabling gradient
mixing.

Band to Band Tunneling


The band-to-band tunneling processes are a local approximations to a non-local (tunneling) process. The models
are derived from the band-bending physics at high-fields: when there exists a sufficient gradient, the band edges
present a narrow tunneling barrier to the carriers. Two models for this process are included in DEVICE: the Hurkx
[5] and Schenk [8] formulations.

Hurk x Model
The Hurkx model for band to band tunneling takes the form
F
Rbbt = - BF s D exp - 0
F
where B is a scaling parameter, F the magnitude of the electric field, F0 the critical field,

2 direct
s =
5 / 2 indirect
and
np - ni2
D=
(n + ni )( p + ni )
Schenk Model
The Schenk model is similar in form to the Hurkx model, but with explicit reference to phonon-assisted tunneling.
m -3 / 2 Fcm F
cF ( )
exp -
F
Fc
( ) -3 / 2
exp - c
s
Rbbt = AF D + F
hw hw
exp TA - 1 1 - exp - TA
kT kT
where F the magnitude of the electric field, A is a scaling factor, = 7/2 for indirect transitions,

np - ni2
D=
(n + ni )( p + ni )
and the critical field

(
Fc = B E g h wTA )3 / 2
with the acoustic phonon energy h TA.

2003 - 2016 Lumerical Solutions, Inc


298 Lumerical Knowledge Base

References
1. Slotboom, J.W., Solid-State Electron., 20, 279 (1997)
2. Caughey, D. M. and Thomas, R. E., Proc. IEEE, 52, 2192 (1967)
3. Masetti, G., et al., IEEE Trans. Electron Devices, ED-30, 764 (1983)
4. Klaassen, D. B. M., Solid State Electronics, 35, 953 (1992); Klaassen, D. B. M., Solid State Electronics, 35,
961 (1992)
5. Hurkx, G. et al., IEEE Trans. Electron Devices, 39, 331 (1992)
6. Schenk, A., Sol. Stat. Elec., 35, 1585 (1992)
7. Selberherr, S. Analysis and Simulation of Semiconductor Devices, Springer Verlag, Vienna (1984)
8. Schenk, A. Sol. Stat. Elec., 36, 19 (1993)

5.3.2.3.1.1 Creating a new semiconductor material

Objective
This section describes how to create a new semiconductor material model in the material database. For details on
the Semiconductor material input parameters, see the Semiconductor 288 material model page.

See Also
Electrical material database 278
Semiconductors 288
Calculating the effective density of states 301
Defining material interfaces for semiconductors 280

Introduction
While the electrical material database contains models for many common semiconductors, it may be necessary to
add new semiconductor models for different systems. This section will describe how to set the parameters
necessary for a minimal semiconductor model. A new semiconductor can be added to the material database by
opening the material database and choosing the "Semiconductor" option from the "Add" button menu. The newly
defined semiconductor can be named and a color can be chosen to represent the material in the layout.

Electronic Properties
When a new semiconductor material is created, the first tab in the material properties displays the
fundamental electrical properties of the semiconductor. These include the basic properties that define the
electronic behaviour of a semiconductor, including the relative dielectric permittivity, effective mass, and band
gap. Both the effective mass and band gap can be visualized directly in the material database.

Minimum settings:
The minimum set of fundamental properties required to define a semiconductor include
relative dielectric permittivity,
intrinsic work function

The relevant conduction valleys should be enabled.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 299

Fundam ental electronic properties of sem iocnductors

Fundamental

Minimum settings:
effective mass of the electrons and holes, and
band gap energy.
Each of these values may be entered as constants. Note that the relative dielectric permittivity is assumed to
be the DC value and is related to the material index as r = n2. Often times the effective density of states is
known, while the effective mass is not: to convert from effective density of states to effective mass, please refer
to the section on calculating the effective density of states 301 . To verify the effective mass and band gap
values, the intrinsic carrier density ni is automatically calculated at T = 300K,

ni = N C NV e - EG / 2 kT

Additional Settings:
In addition to specifying the properties described above, temperature dependences may be specified for the
effective mass and band gap by clicking on the adjacent buttons "f(T)". This action will bring up a parameter
editor which displays the associated formula. A band gap narrowing model can also be specified by choosing
the "Slotboom" model from the list of choices. This model will correct the band gap energy with respect to the
net dopant concentration. The band gap can be visualized in the adjacent plot to verify its behaviour.

Mobility
The mobility must be defined for both the electrons and holes, and can include corrections for temperature
dependence, impurity (dopant) and free carrier scattering, and velocity saturation.

2003 - 2016 Lumerical Solutions, Inc


300 Lumerical Knowledge Base

Mobility m odel for sem iconductors

Minimum settings:
The minimum definition for a semiconductor material must include a constant lattice scattering mobility for
both the electrons and holes. These values can be entered as constants.

Additional settings:
The basic mobility may be modified by a temperature dependence, whose model can be accessed by
selecting the adjacent "f(T)" button. In addition, corrections to the mobility can be enabled for impurity and free
carrier scattering effects using a choice of models. The parameters for the models and their formulas can be
accessed by clicking the "..." button next to the model selection.

Note: For a basic correction to the mobility that accounts for doping, choose the "Caughey-Thomas" model.
Parameters for this model are available for many common semiconductors.

Note: The Klaassen model for the impurity and free-carrier scattering is only well parameterized for silicon,
and is not recommended for other materials.

In addition to corrections to the mobility based on doping density, velocity saturation may be enabled by
specifying a saturation velocity for both electrons and holes.

Recombination and Generation


Carrier lifetime information
A basic semiconductor model does not require recombination and generation processes to be enabled.
However, a realistic semiconductor model will include some information about the carrier lifetime. To include
the carrier lifetime behaviour in the model, enable the "Trap-Assisted (Shockley-Read-Hall) Recombination"
model under the "Recombination" tab, and enter the carrier lifetime values for the electrons and holes. If
properties of the impurities are known, the offset from the mid-gap energy level can be entered in the "Trap
Properties" group. For details on how to determine the carrier lifetimes from trap properties, please consult the
description of the Shockley-Read-Hall model in the bulk recombination and generation 288 section of the

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 301

semiconductor model reference.

Bulk recom bination m odels in sem iconductors

NOTE: A basic semiconductor model does not require recombination and generation models for the bulk
or surface. A new semiconductor material will be defined without any defined surface interfaces, and in this
case, the default behaviour (ideal surfaces) will be used. For more information on defining surface interface
properties, please see the section on Material interface 280

5.3.2.3.1.2 Calculating the effective density of states

Objective
This section describes how to calculate the effective density of states using the material properties of a
semiconductor.

See Also
Semiconductor model 288
Creating a new semiconductor material 298

2003 - 2016 Lumerical Solutions, Inc


302 Lumerical Knowledge Base

Introduction
Often the effective density of states is known for a material, while the effective mass is not. In the electrical
material model for a semiconductor, the effective mass is specified. This section describes the relation
between the two properties and illustrates how to set the semiconductor model properties to reflect a known
effective density of states.

Background
The effective density of states comes from the fundamental definition of the free carrier density in a solid,

n = N ( E ) f ( E )dE
Ec
Ev
p = N ( E )[1 - f ( E )]dE
-
which depends on the density of states N(E). The density of states (DOS) is determined by the electron
structure of the solid. For typical semiconductors, a uniform bulk material with a single conduction band is
assumed. Free electrons (holes) are assumed to occupy only the lowest (highest) energies, such that the
parabolic band approximation can be applied, and the carriers can be assigned a constant effective mass. As
a result, for a 3D bulk system,
2NC
n= F1/ 2 (hc )
p
2 NV
p= F1/ 2 (hv )
p
where F is the Fermi-Dirac integral of order 1/2, and NC,V is the effective DOS,
3/ 2
2 p mn* k BT
N C = 2
h2
3/ 2
2 p m*p k BT
NV = 2
h 2

which depend on the density of states effective masses m*n,p (the density of states effective mass is the mean
of the anisotropic band effective masses).

Determining the effective mass


If the effective DOS is known at a specific temperature, it can be converted to an effective mass using the
equations above:
mn* h 3 N C3 / 2
=
me 0 4 2me 0 k BT
m*p h 3 NV3 / 2
=
me 0 4 2me 0 k BT
In the preceding expression, the electron rest mass has been factored out explicitly to give an effective mass
ratio. In the electrical material model, a quadratic temperature dependent model for the effective mass is
available 288 . If the temperature dependence of the effective DOS is known, coefficients for the linear and
quadratic terms can be determined from a best-fit.

References
1. Pirret, Robert, Advanced Semiconductor Fundamentals, vol 4., 2nd ed. Prentice Hall (2003)

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 303

5.3.2.3.2 Material model - Alloys


This page describes various properties and models available in the alloy material model. All of the properties are
actually the same as that of any semiconductor material. Here, we are only specifying the bowing parameter for
each property. You may also find the Creating a new semiconductor material 298 page to be useful.

Base materials: Pick two semiconductors that the alloy consists of. The first semiconductor will assume fraction
(1-x) and the second one, x.
Interpolation: There are two interpolation schemes used for creating the binary alloy from the two specified
semiconductors:

1- Single valley interpolation:

In this scheme, the lowest valley from semiconductor A and the lowest valley from semiconductor B are considered
and by interpolating between the two, the new valley for the alloy is calculated.

2- Multi valley interpolation:

In this scheme, all valleys from both semiconductors are considered. For example, in the diagram below, we
interpolate first between the two L valleys of semiconductor A and B and then we interpolate between the two
gamma valleys of semiconductor A and B and then we take the lower valley of the two interpolation results. This is a
more accurate interpolation method. If we choose to use the multi-valley method, we should have available data for
all valleys of both semiconductors int he material database.

The actual interpolation uses Vegard's law to determine the resulting properties for each valley depending on the
fraction x of each semiconductor in the alloy. For example for band gap energy of Al(1-x)Ga(x)As, we have:

E g , AlGaAs = (1 - x) E g ,GaAs + xEg , AlAs + bx(1 - x)


Where, b is the bowing parameter in the same units as the interpolated parameter, Eg in this case. The bowing
parameter is what we will be setting in the alloy material property tabs.

The only exception is mobility for which the reciprocal equation holds:

2003 - 2016 Lumerical Solutions, Inc


304 Lumerical Knowledge Base

1 (1 - x) x x(1 - x)
= + +
m AlGaAs mGaAs m AlAs b

Electronic Properties
For everything in this tab, we are setting the bowing parameter for the corresponding property in the same
units as the property.

Recombination
For everything in this tab, we have the choice to either set the bowing parameter for the corresponding property
or use an abrupt method, which just means that instead of a smooth interpolation between the values, there
will be an abrupt change from the value in one semiconductor to the other.

References
1. Vegard, L. (1921). "Die Konstitution der Mischkristalle und die Raumfllung der Atome". Zeitschrift fr
Physik 5 (1): 1726.

NOTE: Surface recombination properties of alloys are not interpolated from the semiconductor materials but
rather are defined at the Material interface 280 for the alloy itself in a manner similar to semiconductor materials.

5.3.2.3.2.1 Alloys

Overview
DEVICE supports simulation with alloy semiconductor materials, which combine two base semiconductors (either
unary or compound) to create new semiconductor. Physically, this is typically accomplished by depositing a
material where a fraction of its constituent atoms are substituted with those of another species. An example is the
alloy of aluminium arsenide (AlAs) and gallium arsenide (GaAs): replacing some of the gallium atoms in the crystal
lattice with aluminium atoms creates the alloy AlxGa1-xAs, where x is the fractional content of aluminium.
The fundamental properties of a semiconductor (effective mass, band gap, and mobility) are extracted from the band
structure of the crystalline material. The band structure itself is a three-dimensional quantity, which typically has
minima near points of symmetry. In semi-classical methods, such as the drift-diffusion formulation, the
semiconductor properties are assumed to be independent of carrier energy, and are derived using a parabolic
approximation for the carrier energies near the band minima.
In this application note, we will describe the interpolation procedure used to derive the properties of the alloy
material. In addition, important details about how to apply and interpret the material properties are provided.

Interpolation
Formulation
To determine the properties of the alloy semiconductor, the properties and behavior of the base semiconductors are
interpolated according to the formula

where x is the fractional content of species B and C is the bowing parameter. The fractional content x may vary as a
function of position (as in a graded heterojunction). The bowing parameter C can be used to specify quadratic
behavior for the interpolation function.

Multi-Valley vs. Single-Valley


As highlighted in the overview, many of the semiconductor properties are derived from the characteristics of the
conduction band minima, with the lowest-energy minima determining the material behavior. As an example, GaAs is
a direct band gap semiconductor, but has higher energy conduction band minima near the X and L symmetry points.
Conversely, silicon is an indirect band gap semiconductor, with the lowest energy conduction band minima located
at L.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 305

Figure : a comparison of the band gap energy for the silicon germanium alloy in the
multi valley and single valley models

In the alloy of two different materials, the symmetry points of the lowest energy conduction band minima for the base
semiconductors may be the same for both (e.g. InGaAs) or different (e.g. SiGe). There are two choices to interpolate
the properties of the base semiconductors
Multi-valley: interpolate the properties each pair of conduction band minima independently, then choose those from
the lowest-energy minima
Single-valley: interpolate the properties of the lowest energy conduction band minima from each base material,
ignoring differences in the location (nearest point of symmetry).

Typically, the first choice (multi-valley) is the most physically realistic; however, single-valley interpolation is useful
for strained materials (e.g. SiGe) and materials where information about the higher energy conduction band valleys is
not available.

Electrons vs. Holes


It is important to note that the conduction band minima define the properties for the electrons (effective mass,
mobility, etc.). The properties for holes are defined by the valence band maxima, which are typically symmetric
around the -point. In the material database, the properties for holes are repeated for each band to make them more
accessible, however only the properties defined for the active (lowest energy) conduction band are used in the
simulation.

Abrupt Transitions
For certain combinations of base semiconductors using the multi-valley selection model, properties or model
parameters may be unavailable for the higher-energy bands. This can be indicated in the material properties by
setting the parameter to zero.
In the example screenshot below, the electron mobility for the higher-energy conduction band valley for AlSb is set
to zero. Alloys with AlSb that mix the valley properties will not interpolate this parameter instead, the electron
mobility for the other base semiconductor will be used for all composition fractions.

2003 - 2016 Lumerical Solutions, Inc


306 Lumerical Knowledge Base

Figure : Electron mobility set to zero disables interpolation with that parameter

A second case relates to the transitions between direct and indirect band-gap materials, when multi-valley
interpolation is selected. In this scenario, the coefficients of the recombination rate models may be expected to
change abruptly. An example of this behavior is the radiative recombination rate, which will be much larger for a
direct band gap material than an indirect material. In this scenario, it is more accurate to use two different values for
the recombination rate coefficient, depending on the direct or indirect nature of the band gap.
To account for this behaviour, the interpolation for recombination rate properties can be disabled by choosing abrupt
interpolation. With that selection, the coefficients are chosen directly from the base semiconductor whose active
(lowest energy) conduction band is the active valley for the alloy. An example of the electron lifetime for AlxGa1-xAs
is compared to the band gap in the figure below. When the alloy transitions from the direct (-valley) band gap of
GaAs to the indirect (X-valley) band gap of AlAs at x=0.42, the carrier lifetime is adjusted to match that of the
corresponding material.

Migrating Existing DEVICE Projects


Standard Semiconductor Materials
When loading existing DEVICE project files created prior to version 4.5, the standard semiconductor materials from
the previous material database (silicon, germanium, and gallium arsenide) will be correctly migrated to the new
material model. In each case, the lowest energy conduction band valley will be identified and populated with the
material parameters from the existing projects. As an example, the active conduction band valley for silicon is X.
When loading an existing project, the existing properties for silicon are used to specify the parameters for the X
valley, and the remaining conduction band valleys are disabled.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 307

Custom Semiconductor Materials


For materials other than those listed in the preceding section, the previous semiconductor material models will be
used to populate the X valley parameters when an existing project file is loaded in the latest version of DEVICE.
Please review the material properties of all custom materials that have loaded into the new material system.

Material Work Functions and Band Offsets


In previous versions of DEVICE, the material work function was specified for the intrinsic (undoped) semiconductor
as the distance between the vacuum potential and the intrinsic energy level. The band offsets between materials
were then calculated from the relative differences between work functions.

In the updated material models, the intrinsic work function specifies the energy difference between the vacuum
potential and the mid-gap energy level 0.5*(EC + EV). As before, this is treated as an independent input. Therefore,
the intrinsic work function continues to specify the band offsets between materials, but it is not adjusted for the
intrinsic energy level offset, which may introduce small variations in energy levels relative to previous versions. When
materials are alloyed, the energy offsets are referred to the valence band edge, and the energy offsets are
interpolated to maintain the equivalent ratio of the valence band offset to the band gap difference between the two un-
alloyed base materials.

5.3.2.3.2.2 Creating a new alloy material

Objective
This section describes how to create a new alloy material model in the material database. For details on the
Semiconductor material input parameters, see the Semiconductor 288 material model page. For details about the
bowing parameters, see the Alloys 303 material model page.

See Also
Electrical material database 278
Semiconductors 288
Creating a new semiconductor material 298
Defining material interfaces for semiconductors 280

2003 - 2016 Lumerical Solutions, Inc


308 Lumerical Knowledge Base

Introduction
While the electrical material database contains models for many common alloys, it may be necessary to add new
alloy models for different systems. This section will describe how to set the minimum parameters necessary for a
new alloy model. A new alloy can be added to the material database by opening the material database and choosing
the "Binary Alloy" option from the "new material" button menu. The newly defined alloy can be named and a color
can be chosen to represent the material in the layout.

Binary Alloys
Once a new alloy material is created, the base materials can be selected using the pull down menus. Any two
semiconductor materials from the material database can be selected to create a binary alloy. The first
semiconductor assumes fraction (1-x) and the second one, x. Once the base materials are selected, the proper
interpolation option needs to be defined. To learn about the two interpolation options, see the Alloys 303 material
model page.

Ternary and Quaternary Alloys


The steps involved in creating a ternary or quaternary alloy is similar to that of a binary alloy. However, there is one
key difference. The base semiconductors for a ternary or quaternary alloy are also alloys. However, the (Alloy)
material properties interface of DEVICE allows only 'semiconductor' type materials to be used as base materials.
This means that in order to create a ternary or quaternary alloy, we have to first create 'semiconductor' material
models for the constituent alloys and then use them as base materials to create the desired ternary or quaternary
alloy.

Ternary Alloys
The default material library in DEVICE contains models for many common binary alloys (defined as 'semiconductor'
type materials). These can be directly used as base materials to create ternary alloys. For example, the GaAs and
InAs material models can be used as base materials to create InGaAs. The alloy fraction will be (InAs)x (GaAs)1-x , or
Inx Ga1-x As.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 309

Quaternary Alloys
Quaternary alloys can be created by using a binary and a ternary alloy as base materials. The binary material in
most cases will be available in the material database (defined as a 'semiconductor' type material). The ternary alloy
is however, an 'Alloy' type material created by mixing two binary alloys. Being as 'Alloy' type material, the ternary
alloy cannot be directly used as a base material for the quaternary alloy. We therefore have to create a new
'semiconductor' type material for the ternary alloy before it can be used as a base material for the quaternary alloy.
The semiconductor material properties for the ternary alloy can be calculated from its 'Alloy' type material version.
An example of how Alx Gay In1-x-y Sb can be created in DEVICE is shown below:

Creating AlxGayIn1-x-ySb
The Alx Gay In1-x-y Sb quaternary alloy can be created by mixing AlSb, GaSb, and InSb. The first step would be to
mix InSb and AlSb together to create In1-x Alx Sb. Next, the semiconductor properties of In1-x Alx Sb are extracted from
the alloy material model and are used to create a 'semiconductor' material model for it. Finally, the semiconductor
model of In1-x Alx Sb is mixed with GaSb to get Alx Gay In1-x-y Sb.

Step 1: create alloy model for In1-xAlxSb

2003 - 2016 Lumerical Solutions, Inc


310 Lumerical Knowledge Base

Create a new alloy using the 'Binary Alloy' option


under the 'new material' button. Choose InSb as
the first base material and AlSb as the second
base material. Choose the interpolation option to
be 'multi valley.'
Set the name to be In(1-x)Al(x)Sb.
Since InSb is the first and AlSb is the second
base material, the alloy fraction will be (InSb)1-
x
(AlSb)x or In1-x Alx Sb.

Step 2: get semiconductor material properties for In1-xAlxSb


Use the 'Visualize' button on the material
properties window of In(1-x)Al(x)Sb to
display the semiconductor material
properties as a function of alloy fraction
'x'.
The minimum semiconductor material
properties that are necessary to create
the 'semiconductor' material model of In1-
x
Alx Sb are permittivity (epsr), bandgap
(Eg), electron and hole effective mass
(mn, mp), electron and hole mobility
(mun, mup), and the carrier lifetimes for
SRH recombination (taun, taup).
A fixed value for alloy fraction 'x' needs to
be chosen. In this example, we have
chosen x = 0.45.

Step 3: create semiconductor material model for In1-xAlxSb

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 311

Use the parameter values from the ternary alloy


model In(1-x)Al(x)Sb for an alloy fraction of x =
0.45 to create a new semiconductor material.
Name the material In(0.55)Al(0.45)Sb.

Note: Note that a conduction valley


needs to be selected for the new
semiconductor material. Since the
interpolation used the minimum
valleys from the constituent binary
alloys to generate the parameters,
we can just select any conduction
valley (e.g. Gamma) and enable it to
input the parameters.

Step 4: create the quaternary alloy AlxGa yIn1-x-ySb


Finally, use the new semiconductor material
model for In1-x Alx Sb [In(0.55)Al(0.45)Sb] and
GaSb to create a 'Binary Alloy' material model for
Alx Gay In1-x-y Sb. Name the material Al(0.45)Ga(y)
In(1-0.45-y)Sb.

5.3.2.3.3 Material model - Fluid


This page provides information about the fluid material model used by the HEAT solver in DEVICE which applies to
both liquids and gases. The fluid material in the HEAT solver is used to define boundary conditions to the simulation
region. More specifically, it is used to define convective boundary conditions in the simulation region. The material
interface editor can be used to define a convective boundary condition between a solid and a fluid placed inside the
simulation area / volume. For convective models that use analytic formula to calculate the convective heat transfer
coefficients h, the input parameters in the models include different material properties of the fluid. For mode details

2003 - 2016 Lumerical Solutions, Inc


312 Lumerical Knowledge Base

on the available analytic model please refer to the Material interface 280 page.

NOTE: The fluid material is designed to be used by the HEAT solver to model convective heat transfer into and
out of the simulation structure. It can however be also included in the electrical simulation by the CHARGE
solver. In such cases, the CHARGE solver treats the fluid material as an insulator and it is described by its
relative dielectric permittivity.

Electronic Properties
The fluid material is designed to be used by the HEAT solver to model convective heat transfer into and out of the
simulation structure. It can however be also included in the electrical simulation by the CHARGE solver. In such
cases, the CHARGE solver treats the fluid material as an insulator and it is described by its (DC) relative
dielectric permittivity.

Thermal Properties
The thermal material model of fluids include,

Mass density: The mass density of the fluid is simply defined as the mass of the fluid per unit volume. The unit
is kg/m3. In the case of gases, the mass density can be defined as a function of temperature as discussed here
285 .

Specific heat: The specific heat, also known as the heat capacity of thermal capacity of the fluid is defined as
the ratio of the heat added to (or removed from) a fluid to the resulting temperature change. The unit is J/kg K.
The specific heat of fluids can be defined as a function of temperature as discussed here 285 .
Thermal conductivity: The thermal conductivity of a fluid is a property that quantifies its ability to conduct heat.
The unit is W/m K. The thermal conductivity of fluids can be defined as a function of temperature as discussed
here 285 .
Dynamic viscosity: The dynamic viscosity of a fluid is defined as a resistance to the movement of the fluid when
multiples layers in the fluid move at different velocities. The unit is Pa s. The dynamic viscosity can be defined
as a function of temperature as discussed here 285 .
Thermal expansivity: The thermal expansivity of a fluid defines how the volume of the fluid changes with
temperature. The unit is /K. For ideal gases, the thermal expansivity can be defined as a function of temperature
as discussed here 285 .

Using fluids with the HEAT solver


The fluid type materials are used in a thermal simulation through the material interface. The HEAT solver solves
the heat transport in solid materials only and includes the effect of any surrounding fluids through convective
boundary conditions defined at the material interfaces. For example, in order to model the heat loss into air in a
silicon waveguide, one needs to set up a convection boundary condition at the material interface between silicon
and air. Once the (fluid) material property and the interface boundary condition are defined, the solver solves the
heat transport in the solid (neglecting the fluid) and applies the convective boundary condition at the solid-fluid
interface.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 313

Fluids in Heat transport solver are included as boundary conditions only.

5.3.2.4 Mesh order (DEVICE)


The mesh order property governs how overlapping objects are meshed in the simulation. It serves no role for objects
which do not overlap. The mesh order can be set at the material level (in the material database), or the object object
level (in the object properties). Materials with a lower mesh order take priority over materials with a higher priority
number (i.e. order 1 takes priority over 2). Areas which overlap are assigned the material
properties of the higher priority material (see the following figure).

See also
setmaterial 1672
setnamed 1588
set 1568

2003 - 2016 Lumerical Solutions, Inc


314 Lumerical Knowledge Base

How to: Define structures w ith overlapping com ponents (YouTube)


Alternative video source in Mandarin, click here

In the figure above, there are two objects that partially overlap. Depending on their mesh orders, the object that is
actually being simulated will be different. In the event that both overlapping materials have the same order, the mesh
order will be inferred from the Object tree. Objects at the bottom of the tree will take priority over objects at the top of
the tree. To ensure your simulation is well defined, it is recommended that you avoid situations where two different
overlapping structure have the same mesh order. To set the mesh order using script, one can user setmaterial
(material level), setnamed or set (object level).

Meshing the structure in DEVICE


In Device, you can plot the device geometry after meshing to confirm that the structures were meshed as intended.
The ID plot displays the geometry of your design based on several factors, such as the mesh order, sequence that
the objects are created and the material of the objects. To show the ID, hit the "Recalculate simulation mesh" button
to calculate mesh, then right-click on "Device region" and "visualize" grid. A visualizer should pop up, then select
"ID" in the Attribute drop-down list.

Note: IDs of connected and splitted objects


If two objects are overlapped/connected and they are made of the same material,
these two objects will be considered as a whole and thus share the same ID. If one
object is fragmented into pieces by the insertion of another object, these
fragments will be considered as individual objects and thus have different IDs.

5.4 Simulation Objects


In this section, the simulations objects are documented. There are several types of simulation objects in FDTD
Solutions, MODE Solutions' varFDTD, MODE Solutions' FDE Solver and DEVICE. These objects are used to model
the physical structure, define the solver region, any sources of light or doping/generation regions as well as monitors
to collect data. The following sections provide detailed descriptions of each simulation object. Each simulation object
can be added by clicking on the corresponding icon in the GUI.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 315

For example, in the screen shot on the right, clicking on the

button would add a circle physical structure object.

Shared simulation objects

Structures 318

This button will insert the shown structure primitive into the simulation. Pressing the arrow will show all
available primitives.

Layer Builder 372

This button will add a Layer Builder group which will allow you to import GDS structure data and manipulate
the layers of the structure from the graphical user interface.

Groups 388

This button will add an analysis, container or structure group into the simulation. Pressing the arrow will allow
selection of which group to add.

Optical simulation objects

Attributes 399

In FDTD Solutions and MODE Solutions, this button will insert the shown grid attribute into the simulation.
Pressing the arrow will show all available primitives.

Components 413

In FDTD Solutions and MODE Solutions, this button will open the component object library window. Pressing
the arrow will show common component categories that the library window can open with.

Simulation (Optical) 414

This button will insert simulation or mesh override regions. Pressing the arrow will allow selection of which
simulation object to add.

2003 - 2016 Lumerical Solutions, Inc


316 Lumerical Knowledge Base

Analysis 479

In FDTD Solutions and MODE Solutions, this button will open the component object library window. Pressing
the arrow will show common analysis categories that the library window can open with.

Import (Optical) 480

This button will open a window for importing files from other programs. Pressing the arrow will allow selection
of which kind of import.

Sources 510

In FDTD Solutions and MODE Solutions, this button will insert different sources into the simulation. Pressing
the arrow will allow selection of which source to add.

Monitors (Optical) 637

In FDTD Solutions and MODE Solutions, this button will insert various monitors into the simulation. Pressing
the arrow will allow selection of which monitor to add.

EME Port 436

In MODE Solutions, when there is an active EME solver region, this button will add additional ports to the
solver region.

Electrical simulation objects

Simulation (Electrical) 672

This button will insert simulation or mesh override regions. Pressing the arrow will allow selection of which
simulation object to add.

Import (Electrical) 677

This button will open a window for importing files from other programs. Pressing the arrow will allow selection
of which kind of import.

Doping 678

In DEVICE, this button will insert various doping regions into the simulation. Pressing the arrow will allow
selection of which monitor to add.

Generation 679

In DEVICE, this button will insert various generation rate objects into the simulation. Pressing the arrow will
allow selection of which monitor to add.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 317

Monitor (Electrical) 682

In DEVICE, this button will insert various monitors into the simulation. Pressing the arrow will allow selection
of which monitor to add.

Thermal simulation objects

Simulation (Thermal) 688

This button will insert simulation or mesh override regions. Pressing the arrow will allow selection of which
simulation object to add.

Import (Thermal) 691

This button will open a window for importing files from other programs. Pressing the arrow will allow selection
of which kind of import.

Sources (Thermal) 692

In DEVICE, this button will insert various generation rate objects into the simulation. Pressing the arrow will
allow selection of which monitor to add.

Monitor (Thermal) 693

In DEVICE, this button will insert various monitors into the simulation. Pressing the arrow will allow selection
of which monitor to add.

Once the object is selected, 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 circle object is shown below.

TIP: In-field 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. For more information, see the Equation
interpreter 214 section.

2003 - 2016 Lumerical Solutions, Inc


318 Lumerical Knowledge Base

Notes:
Structure objects support Multi-object editing. If you select multiple objects then click EDIT, you can edit
properties that are common to all of the selected objects.
Monitors and sources have some global properties that apply to many objects. For example, the global source
frequency range can be applied to all sources. The global properties can be edited with the GLOBAL

PROPERTIES button.

5.4.1 Structures
Structures are shared in both optical and electrical solvers. This section lists the primitives shared by both solvers
and describes some examples of complex structures available in optical solvers.

Structures - Primitives 319

Complex structures (Optical) 353

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 319

Extending structures through PML (Optical) 368

Layer builder 372

5.4.1.1 Structures - Primitives

The button includes options to to add the following primitive structures:

Triangle 321

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 323

Rectangular regions denote physical objects that appear rectangular from above. For 2D simulations, these objects

2003 - 2016 Lumerical Solutions, Inc


320 Lumerical Knowledge Base

represent rectangles while in 3D these objects are extruded to a specific height.

Polygon 325

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 are connected with straight lines. For 3D simulations,
the object is extruded in the z dimension. In DEVICE, the vertices have to be entered in a counter clock wise
manner for the structure to be defined and meshed properly.

Circle 328

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 330

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.

Waveguide 338

Waveguide allows the users to create a waveguide having an isosceles trapezoidal cross section and a Bzier-
curved path.

Sphere 340

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 342

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.

Planar Solid 345

The planar solid object behaves like the polygon structure, however script commands are used to specify all the
vertices and facets of the structure.

Other primitives (Optical Solvers only)

Custom Primitives 332

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.

Surface 334

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.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 321

2D Rectangle 349

This is a true 2D rectangle (or a surface object), which has no thickness in the normal direction. This object can be
used with the graphene model using the surface conductivity approach 2774 .

5.4.1.1.1 Structures - Triangle


This page describes a triangle object. 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.

Solvers 101

FDTD
FDE
VarFDTD
DEVICE
See also
Structures 318
Creating rounded corners 358
Extruding a polygon with a sidewall
angle 362

Edit structure tabs


Geometry tab
X, Y, Z: The center position of the object
Z MIN, Z MAX: Z min, Z max position
Z SPAN: Z span of the object
ADD, DELETE: Add, delete vertices

Setting the vertices of the polygon object


The vertices of the polygon object can be edited by
moving them with the mouse,
manually editing the x,y location of each vertex in the polygon property editor,
script command

For complex shapes, scripting in the structure group is usually best. Once the script has calculated the x,y
vertex positions, they can be loaded into the polygon object with a single set("vertices",V); command.
For example, use the following code to create an octagon shaped object.

# octagon properties
n_sides=8;
r=1e-6;

# x,y position of each corner


theta=linspace(0,360,n_sides+1);
theta=theta(1:n_sides);
x=r*cos(theta*pi/180);

2003 - 2016 Lumerical Solutions, Inc


322 Lumerical Knowledge Base

y=r*sin(theta*pi/180);

# combine x,y into one vertices matrix


V=matrix(n_sides,2);
V(1:n_sides,1)=x(1:n_sides);
V(1:n_sides,2)=y(1:n_sides);

# add polygon object and set the vertices


addpoly;
set("vertices",V);

NOTE: Getting and modifying polygon vertices


To get the polygon vertices, use the following command. The vertices will be returned in an Nx2 matrix. The
columns of this matrix correspond to the X,Y positions of each vertex.
V=get("vertices");
?size(V);

To modify a polygon vertex, you must get the vertices matrix, modify the vertex matrix as desired, then re-
apply it to the polygon object:
V=get("vertices");
V(1,1)=V(1,1)+1e-6; # change the x position of the first vertex by 1um.
set("vertices",V);

Material tab
The material options are as follows:

MATERIAL: This field can be set to any material included in the material database. It is possible to include
new materials in the database, or edit the materials already included. See the material database section for
more information.
OVERRIDE MESH ORDER FROM MATERIAL DATABASE: Select to override the mesh order from the
material database and manually set a mesh order. The mesh order is used by the simulation engine to
select which material to use when two materials overlap. See the mesh order (optical) 271 or mesh order
(electrical) 271 section for more details.
MESH ORDER: Set the mesh order in this field if the OVERRIDE MESH ORDER FROM MATERIAL
DATABASE option is selected. If the option is not selected, the field displays the material's default mesh
order from the database. For example, a material of mesh order 1 will take precedence over a material of
mesh order 2.

The following only applies to MODE and FDTD Solutions:

If <Object defined dielectric> is selected, then the INDEX property must be set.
INDEX: The refractive index of the structure, when the material type is <Object defined dielectric>. The index
must be greater than one.
v Anisotropic index: To specify an anisotropic refractive index, use a semicolon to separate the diagonal
xx,yy,zz indices. Eg. 1;1.5;1
v Spatially varying index: It is possible to specify a spatially varying refractive index by entering an
equation of the variables x,y,z in this field. Eg. 2+0.1*x will create an object where the refractive index
increases in the X direction. The units of the spatial variables (x,y,z) must be set with the 'INDEX UNITS'
property described below. The variables x,y,z will be zero in the center of the object. When using an
equation in this field, consider using a mesh override region to control the simulation mesh size. For
more information on entering equations, see the Equation interpreter 214 section.
INDEX UNITS: Only relevant when specifying a spatially varying equation in the INDEX properly described
above. Specify the units (nm, um, m) of the x,y,z position variables.
GRID ATTRIBUTE NAME: Enter the name of the grid attribute that applies to this object, see the grid
attribute 253 section

The following only applies to DEVICE:

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 323

If the material chosen from the drop down menu is a binary alloy consisting of two semiconductors, then there
will be an additional property, namely, the "composition fraction" to set as well.

COMPOSITION FRACTION: This is x, the fraction of the semiconductor in the alloy. x can either take a fixed
value or vary.

The user can see which semiconductor has fraction x and which has fraction (1-x) shown in a line above this
drop down menu.

FIXED: This means that fraction x will be a constant value between 0 and 1.
LINEAR X/Y/Z: This means that the composition fraction x will vary as a function x or y or z. In this case, user
can specify the min and max fraction values for the min and max spatial points and the fraction will be
interpolated linearly in between. x,y,z here are those of the unrotated object. x,y,z are local to the object.
EQUATION: The user can enter an equation for the fraction that varies with u,v and w. u is (x-x0), v is (y-y0)
and w is (z-z0) where x0, y0 and z0 are the center coordinates of the object. This means that u,v and w are
local to the object.

Rotations tab
Rotate objects by setting the following variables:

FIRST, SECOND, THIRD AXES: Select rotation axis. Up to three different rotations can be applied.
ROTATION 1,2,3: The rotation of the object in a clockwise direction about each axis, measured in degrees.

Graphical Rendering tab


The graphical rendering tab is used to change how objects are drawn in the layout editor. The options are:

RENDER TYPE: The options for drawing the objects are detailed or wireframe. Detailed objects are shaded
and their transparency can be set using OVERRIDE COLOR OPACITY FROM MATERIAL DATABASE.
DETAIL: This is a slider which takes values between 0 and 1. By default it is set to 0.5. Higher detail shows
more detail, but increases the time required to draw objects. This setting has no effect on the simulation.
OVERRIDE COLOR OPACITY FROM MATERIAL DATABASE: When unselected the opacity is determined
from the material database. When selected, you can specify a value for ALPHA between 0 (transparent) and
1 (opaque) for the object, depending on how transparent you want the object to be.

5.4.1.1.2 Structures - Rectangle


This page describes a rectangle object. Rectangular regions denote physical objects that appear rectangular from
above. For 2D simulations, these objects represent rectangles while in 3D these objects are extruded to a specific
height.

2003 - 2016 Lumerical Solutions, Inc


324 Lumerical Knowledge Base

Solvers 101

FDTD
FDE
VarFDTD
EME
DEVICE
See also
Structures 318
Creating rounded corners 358

Edit structure tabs


Geometry tab
X, Y, Z: The center position of the object
X MIN, X MAX: X min, X max position
Y MIN, Y MAX: Y min, Y max position
Z MIN, Z MAX: Z min, Z max position
X SPAN, Y SPAN, Z SPAN: X, Y, Z span of the object

Material tab
The material options are as follows:

MATERIAL: This field can be set to any material included in the material database. It is possible to include
new materials in the database, or edit the materials already included. See the material database section for
more information.
OVERRIDE MESH ORDER FROM MATERIAL DATABASE: Select to override the mesh order from the
material database and manually set a mesh order. The mesh order is used by the simulation engine to
select which material to use when two materials overlap. See the mesh order (optical) 271 or mesh order
(electrical) 271 section for more details.
MESH ORDER: Set the mesh order in this field if the OVERRIDE MESH ORDER FROM MATERIAL
DATABASE option is selected. If the option is not selected, the field displays the material's default mesh
order from the database. For example, a material of mesh order 1 will take precedence over a material of
mesh order 2.

The following only applies to MODE and FDTD Solutions:

If <Object defined dielectric> is selected, then the INDEX property must be set.
INDEX: The refractive index of the structure, when the material type is <Object defined dielectric>. The index
must be greater than one.
v Anisotropic index: To specify an anisotropic refractive index, use a semicolon to separate the diagonal
xx,yy,zz indices. Eg. 1;1.5;1
v Spatially varying index: It is possible to specify a spatially varying refractive index by entering an
equation of the variables x,y,z in this field. Eg. 2+0.1*x will create an object where the refractive index
increases in the X direction. The units of the spatial variables (x,y,z) must be set with the 'INDEX UNITS'
property described below. The variables x,y,z will be zero in the center of the object. When using an
equation in this field, consider using a mesh override region to control the simulation mesh size. For
more information on entering equations, see the Equation interpreter 214 section.
INDEX UNITS: Only relevant when specifying a spatially varying equation in the INDEX properly described

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 325

above. Specify the units (nm, um, m) of the x,y,z position variables.
GRID ATTRIBUTE NAME: Enter the name of the grid attribute that applies to this object, see the grid
attribute 253 section

The following only applies to DEVICE:

If the material chosen from the drop down menu is a binary alloy consisting of two semiconductors, then there
will be an additional property, namely, the "composition fraction" to set as well.

COMPOSITION FRACTION: This is x, the fraction of the semiconductor in the alloy. x can either take a fixed
value or vary.

The user can see which semiconductor has fraction x and which has fraction (1-x) shown in a line above this
drop down menu.

FIXED: This means that fraction x will be a constant value between 0 and 1.
LINEAR X/Y/Z: This means that the composition fraction x will vary as a function x or y or z. In this case, user
can specify the min and max fraction values for the min and max spatial points and the fraction will be
interpolated linearly in between. x,y,z here are those of the unrotated object. x,y,z are local to the object.
EQUATION: The user can enter an equation for the fraction that varies with u,v and w. u is (x-x0), v is (y-y0)
and w is (z-z0) where x0, y0 and z0 are the center coordinates of the object. This means that u,v and w are
local to the object.

Rotations tab
Rotate objects by setting the following variables:

FIRST, SECOND, THIRD AXES: Select rotation axis. Up to three different rotations can be applied.
ROTATION 1,2,3: The rotation of the object in a clockwise direction about each axis, measured in degrees.

Graphical Rendering tab


The graphical rendering tab is used to change how objects are drawn in the layout editor. The options are:

RENDER TYPE: The options for drawing the objects are detailed or wireframe. Detailed objects are shaded
and their transparency can be set using OVERRIDE COLOR OPACITY FROM MATERIAL DATABASE.
DETAIL: This is a slider which takes values between 0 and 1. By default it is set to 0.5. Higher detail shows
more detail, but increases the time required to draw objects. This setting has no effect on the simulation.
OVERRIDE COLOR OPACITY FROM MATERIAL DATABASE: When unselected the opacity is determined
from the material database. When selected, you can specify a value for ALPHA between 0 (transparent) and
1 (opaque) for the object, depending on how transparent you want the object to be.

5.4.1.1.3 Structures - Polygon

Objective
This section describes how to set and get the vertex positions of a polygon object. 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 are connected with straight lines. For 3D simulations, the object is extruded in the z
dimension. In DEVICE, the vertices have to be entered in a counter clock wise manner for the structure to be defined
and meshed properly.

2003 - 2016 Lumerical Solutions, Inc


326 Lumerical Knowledge Base

Solvers 101

FDTD
FDE
VarFDTD
DEVICE

See also
Structures 318
Creating rounded corners 358
Extruding a polygon with a sidewall angle 362

Edit structure tabs


Geometry tab
X, Y, Z: The center position of the object
Z MIN, Z MAX: Z min, Z max position
Z SPAN: Z span of the object
ADD, DELETE: Add, delete vertices

Setting the vertices of the polygon object
The vertices of the polygon object can be edited by
moving them with the mouse,
manually editing the x,y location of each vertex in the polygon property editor,
script command

For complex shapes, scripting in the structure group is usually best. Once the script has calculated the x,y
vertex positions, they can be loaded into the polygon object with a single set("vertices",V); command.
For example, use the following code to create an octagon shaped object.

# octagon properties
n_sides=8;
r=1e-6;

# x,y position of each corner


theta=linspace(0,360,n_sides+1);
theta=theta(1:n_sides);
x=r*cos(theta*pi/180);
y=r*sin(theta*pi/180);

# combine x,y into one vertices matrix


V=matrix(n_sides,2);
V(1:n_sides,1)=x(1:n_sides);
V(1:n_sides,2)=y(1:n_sides);

# add polygon object and set the vertices


addpoly;
set("vertices",V);

NOTE: Getting and modifying polygon vertices


To get the polygon vertices, use the following command. The vertices will be returned in an Nx2 matrix. The
columns of this matrix correspond to the X,Y positions of each vertex.
V=get("vertices");

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 327

?size(V);

To modify a polygon vertex, you must get the vertices matrix, modify the vertex matrix as desired, then re-
apply it to the polygon object:
V=get("vertices");
V(1,1)=V(1,1)+1e-6; # change the x position of the first vertex by 1um.
set("vertices",V);

Material tab
The material options are as follows:

MATERIAL: This field can be set to any material included in the material database. It is possible to include
new materials in the database, or edit the materials already included. See the material database section for
more information.
OVERRIDE MESH ORDER FROM MATERIAL DATABASE: Select to override the mesh order from the
material database and manually set a mesh order. The mesh order is used by the simulation engine to
select which material to use when two materials overlap. See the mesh order (optical) 271 or mesh order
(electrical) 271 section for more details.
MESH ORDER: Set the mesh order in this field if the OVERRIDE MESH ORDER FROM MATERIAL
DATABASE option is selected. If the option is not selected, the field displays the material's default mesh
order from the database. For example, a material of mesh order 1 will take precedence over a material of
mesh order 2.

The following only applies to MODE and FDTD Solutions:

If <Object defined dielectric> is selected, then the INDEX property must be set.
INDEX: The refractive index of the structure, when the material type is <Object defined dielectric>. The index
must be greater than one.
v Anisotropic index: To specify an anisotropic refractive index, use a semicolon to separate the diagonal
xx,yy,zz indices. Eg. 1;1.5;1
v Spatially varying index: It is possible to specify a spatially varying refractive index by entering an
equation of the variables x,y,z in this field. Eg. 2+0.1*x will create an object where the refractive index
increases in the X direction. The units of the spatial variables (x,y,z) must be set with the 'INDEX UNITS'
property described below. The variables x,y,z will be zero in the center of the object. When using an
equation in this field, consider using a mesh override region to control the simulation mesh size. For
more information on entering equations, see the Equation interpreter 214 section.
INDEX UNITS: Only relevant when specifying a spatially varying equation in the INDEX properly described
above. Specify the units (nm, um, m) of the x,y,z position variables.
GRID ATTRIBUTE NAME: Enter the name of the grid attribute that applies to this object, see the grid
attribute 253 section

The following only applies to DEVICE:

If the material chosen from the drop down menu is a binary alloy consisting of two semiconductors, then there
will be an additional property, namely, the "composition fraction" to set as well.

COMPOSITION FRACTION: This is x, the fraction of the semiconductor in the alloy. x can either take a fixed
value or vary.

The user can see which semiconductor has fraction x and which has fraction (1-x) shown in a line above this
drop down menu.

FIXED: This means that fraction x will be a constant value between 0 and 1.
LINEAR X/Y/Z: This means that the composition fraction x will vary as a function x or y or z. In this case, user
can specify the min and max fraction values for the min and max spatial points and the fraction will be
interpolated linearly in between. x,y,z here are those of the unrotated object. x,y,z are local to the object.
EQUATION: The user can enter an equation for the fraction that varies with u,v and w. u is (x-x0), v is (y-y0)

2003 - 2016 Lumerical Solutions, Inc


328 Lumerical Knowledge Base

and w is (z-z0) where x0, y0 and z0 are the center coordinates of the object. This means that u,v and w are
local to the object.

Rotations tab
Rotate objects by setting the following variables:

FIRST, SECOND, THIRD AXES: Select rotation axis. Up to three different rotations can be applied.
ROTATION 1,2,3: The rotation of the object in a clockwise direction about each axis, measured in degrees.

Graphical Rendering tab


The graphical rendering tab is used to change how objects are drawn in the layout editor. The options are:

RENDER TYPE: The options for drawing the objects are detailed or wireframe. Detailed objects are shaded
and their transparency can be set using OVERRIDE COLOR OPACITY FROM MATERIAL DATABASE.
DETAIL: This is a slider which takes values between 0 and 1. By default it is set to 0.5. Higher detail shows
more detail, but increases the time required to draw objects. This setting has no effect on the simulation.
OVERRIDE COLOR OPACITY FROM MATERIAL DATABASE: When unselected the opacity is determined
from the material database. When selected, you can specify a value for ALPHA between 0 (transparent) and
1 (opaque) for the object, depending on how transparent you want the object to be.

5.4.1.1.4 Structures - Circle


This page describes a circle object. Circles denote physical objects which appear circular or ellipsoid from above.
They are either circles/ellipses in 2D, or circular/ellipsoid cylinders in 3D.

Solvers 101

FDTD
FDE
VarFDTD
EME
DEVICE

See also
Structures 318
Creating rounded corners 358

Edit structure tabs


Geometry tab
X, Y, Z: The center position of the object
Z MIN, Z MAX: Z min, Z max position
Z SPAN: Z span of the object
RADIUS: Radius of the object
MAKE ELLIPSOID: If this box is checked, a second radius can be defined

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 329

Material tab
The material options are as follows:

MATERIAL: This field can be set to any material included in the material database. It is possible to include
new materials in the database, or edit the materials already included. See the material database section for
more information.
OVERRIDE MESH ORDER FROM MATERIAL DATABASE: Select to override the mesh order from the
material database and manually set a mesh order. The mesh order is used by the simulation engine to
select which material to use when two materials overlap. See the mesh order (optical) 271 or mesh order
(electrical) 271 section for more details.
MESH ORDER: Set the mesh order in this field if the OVERRIDE MESH ORDER FROM MATERIAL
DATABASE option is selected. If the option is not selected, the field displays the material's default mesh
order from the database. For example, a material of mesh order 1 will take precedence over a material of
mesh order 2.

The following only applies to MODE and FDTD Solutions:

If <Object defined dielectric> is selected, then the INDEX property must be set.
INDEX: The refractive index of the structure, when the material type is <Object defined dielectric>. The index
must be greater than one.
v Anisotropic index: To specify an anisotropic refractive index, use a semicolon to separate the diagonal
xx,yy,zz indices. Eg. 1;1.5;1
v Spatially varying index: It is possible to specify a spatially varying refractive index by entering an
equation of the variables x,y,z in this field. Eg. 2+0.1*x will create an object where the refractive index
increases in the X direction. The units of the spatial variables (x,y,z) must be set with the 'INDEX UNITS'
property described below. The variables x,y,z will be zero in the center of the object. When using an
equation in this field, consider using a mesh override region to control the simulation mesh size. For
more information on entering equations, see the Equation interpreter 214 section.
INDEX UNITS: Only relevant when specifying a spatially varying equation in the INDEX properly described
above. Specify the units (nm, um, m) of the x,y,z position variables.
GRID ATTRIBUTE NAME: Enter the name of the grid attribute that applies to this object, see the grid
attribute 253 section

The following only applies to DEVICE:

If the material chosen from the drop down menu is a binary alloy consisting of two semiconductors, then there
will be an additional property, namely, the "composition fraction" to set as well.

COMPOSITION FRACTION: This is x, the fraction of the semiconductor in the alloy. x can either take a fixed
value or vary.

The user can see which semiconductor has fraction x and which has fraction (1-x) shown in a line above this
drop down menu.

FIXED: This means that fraction x will be a constant value between 0 and 1.
LINEAR X/Y/Z: This means that the composition fraction x will vary as a function x or y or z. In this case, user
can specify the min and max fraction values for the min and max spatial points and the fraction will be
interpolated linearly in between. x,y,z here are those of the unrotated object. x,y,z are local to the object.
EQUATION: The user can enter an equation for the fraction that varies with u,v and w. u is (x-x0), v is (y-y0)
and w is (z-z0) where x0, y0 and z0 are the center coordinates of the object. This means that u,v and w are
local to the object.

Rotations tab
Rotate objects by setting the following variables:

FIRST, SECOND, THIRD AXES: Select rotation axis. Up to three different rotations can be applied.

2003 - 2016 Lumerical Solutions, Inc


330 Lumerical Knowledge Base

ROTATION 1,2,3: The rotation of the object in a clockwise direction about each axis, measured in degrees.

Graphical Rendering tab


The graphical rendering tab is used to change how objects are drawn in the layout editor. The options are:

RENDER TYPE: The options for drawing the objects are detailed or wireframe. Detailed objects are shaded
and their transparency can be set using OVERRIDE COLOR OPACITY FROM MATERIAL DATABASE.
DETAIL: This is a slider which takes values between 0 and 1. By default it is set to 0.5. Higher detail shows
more detail, but increases the time required to draw objects. This setting has no effect on the simulation.
OVERRIDE COLOR OPACITY FROM MATERIAL DATABASE: When unselected the opacity is determined
from the material database. When selected, you can specify a value for ALPHA between 0 (transparent) and
1 (opaque) for the object, depending on how transparent you want the object to be.

5.4.1.1.5 Structures - Ring


This page describes a ring object. 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.

Solvers 101

FDTD
FDE
VarFDTD
EME
DEVICE
See also
Structures 318
Creating rounded corners 358

Edit structure tabs


Geometry tab
X, Y, Z: The center position of the object
Z MIN, Z MAX: Z min, Z max position
Z SPAN: Z span of the object
OUTER RADIUS, INNER RADIUS: Outer and inner radius of the ring
THETA START, THETA STOP: Specify the angle range that ring to be drawn, in degree.

Material tab
The material options are as follows:

MATERIAL: This field can be set to any material included in the material database. It is possible to include
new materials in the database, or edit the materials already included. See the material database section for
more information.
OVERRIDE MESH ORDER FROM MATERIAL DATABASE: Select to override the mesh order from the
material database and manually set a mesh order. The mesh order is used by the simulation engine to
select which material to use when two materials overlap. See the mesh order (optical) 271 or mesh order

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 331

(electrical) 271 section for more details.


MESH ORDER: Set the mesh order in this field if the OVERRIDE MESH ORDER FROM MATERIAL
DATABASE option is selected. If the option is not selected, the field displays the material's default mesh
order from the database. For example, a material of mesh order 1 will take precedence over a material of
mesh order 2.

The following only applies to MODE and FDTD Solutions:

If <Object defined dielectric> is selected, then the INDEX property must be set.
INDEX: The refractive index of the structure, when the material type is <Object defined dielectric>. The index
must be greater than one.
v Anisotropic index: To specify an anisotropic refractive index, use a semicolon to separate the diagonal
xx,yy,zz indices. Eg. 1;1.5;1
v Spatially varying index: It is possible to specify a spatially varying refractive index by entering an
equation of the variables x,y,z in this field. Eg. 2+0.1*x will create an object where the refractive index
increases in the X direction. The units of the spatial variables (x,y,z) must be set with the 'INDEX UNITS'
property described below. The variables x,y,z will be zero in the center of the object. When using an
equation in this field, consider using a mesh override region to control the simulation mesh size. For
more information on entering equations, see the Equation interpreter 214 section.
INDEX UNITS: Only relevant when specifying a spatially varying equation in the INDEX properly described
above. Specify the units (nm, um, m) of the x,y,z position variables.
GRID ATTRIBUTE NAME: Enter the name of the grid attribute that applies to this object, see the grid
attribute 253 section

The following only applies to DEVICE:

If the material chosen from the drop down menu is a binary alloy consisting of two semiconductors, then there
will be an additional property, namely, the "composition fraction" to set as well.

COMPOSITION FRACTION: This is x, the fraction of the semiconductor in the alloy. x can either take a fixed
value or vary.

The user can see which semiconductor has fraction x and which has fraction (1-x) shown in a line above this
drop down menu.

FIXED: This means that fraction x will be a constant value between 0 and 1.
LINEAR X/Y/Z: This means that the composition fraction x will vary as a function x or y or z. In this case, user
can specify the min and max fraction values for the min and max spatial points and the fraction will be
interpolated linearly in between. x,y,z here are those of the unrotated object. x,y,z are local to the object.
EQUATION: The user can enter an equation for the fraction that varies with u,v and w. u is (x-x0), v is (y-y0)
and w is (z-z0) where x0, y0 and z0 are the center coordinates of the object. This means that u,v and w are
local to the object.

Rotations tab
Rotate objects by setting the following variables:

FIRST, SECOND, THIRD AXES: Select rotation axis. Up to three different rotations can be applied.
ROTATION 1,2,3: The rotation of the object in a clockwise direction about each axis, measured in degrees.

Graphical Rendering tab


The graphical rendering tab is used to change how objects are drawn in the layout editor. The options are:

RENDER TYPE: The options for drawing the objects are detailed or wireframe. Detailed objects are shaded
and their transparency can be set using OVERRIDE COLOR OPACITY FROM MATERIAL DATABASE.
DETAIL: This is a slider which takes values between 0 and 1. By default it is set to 0.5. Higher detail shows
more detail, but increases the time required to draw objects. This setting has no effect on the simulation.

2003 - 2016 Lumerical Solutions, Inc


332 Lumerical Knowledge Base

OVERRIDE COLOR OPACITY FROM MATERIAL DATABASE: When unselected the opacity is determined
from the material database. When selected, you can specify a value for ALPHA between 0 (transparent) and
1 (opaque) for the object, depending on how transparent you want the object to be.

5.4.1.1.6 Structures - Custom (Optical)

Objective
This page describes a custom object. The custom tab is only available for custom primitives in MODE and FDTD
Solutions. Custom primitives are objects that are defined by equations describing the boundaries of the physical
object. The custom primitive defaults to a rectangular region upon creation, and is shaped via entry of one or more
equations in the edit window. The custom object allows you to define the y position of the object as a function of the
x position. The z position is obtained via extrusion or revolution of the y edge. (X,Y)=(0,0) corresponds to the center
of the object.

Solvers 101

FDTD
FDE
VarFDTD
See also
Structure groups 389

Edit structure tabs


Geometry tab
X, Y, Z: The center position of the object
X MIN, X MAX: X min, X max position
Y MIN, Y MAX: Y min, Y max position
Z MIN, Z MAX: Z min, Z max position
X SPAN, Y SPAN, Z SPAN: X, Y, Z span of the object

Custom tab
EQUATION 1: The equation, expressed as a function of x, which defines the upper y edge of the physical
object. The origin of equation is the center of the object. Suitable syntax for the equations is shown in the
Equation interpreter 214 section.
MAKE NONSYMMETRIC: Uncheck this if you want to define the lower edge with a different equation.
EQUATION 2: The equation, expressed as a function of x, which defines the lower 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.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 333

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.

Material tab
The material options are as follows:

MATERIAL: This field can be set to any material included in the material database. It is possible to include
new materials in the database, or edit the materials already included. See the material database section for
more information.
OVERRIDE MESH ORDER FROM MATERIAL DATABASE: Select to override the mesh order from the
material database and manually set a mesh order. The mesh order is used by the simulation engine to
select which material to use when two materials overlap. See the mesh order (optical) 271 or mesh order
(electrical) 271 section for more details.
MESH ORDER: Set the mesh order in this field if the OVERRIDE MESH ORDER FROM MATERIAL
DATABASE option is selected. If the option is not selected, the field displays the material's default mesh
order from the database. For example, a material of mesh order 1 will take precedence over a material of
mesh order 2.

The following only applies to MODE and FDTD Solutions:

If <Object defined dielectric> is selected, then the INDEX property must be set.
INDEX: The refractive index of the structure, when the material type is <Object defined dielectric>. The index
must be greater than one.
v Anisotropic index: To specify an anisotropic refractive index, use a semicolon to separate the diagonal
xx,yy,zz indices. Eg. 1;1.5;1
v Spatially varying index: It is possible to specify a spatially varying refractive index by entering an
equation of the variables x,y,z in this field. Eg. 2+0.1*x will create an object where the refractive index
increases in the X direction. The units of the spatial variables (x,y,z) must be set with the 'INDEX UNITS'
property described below. The variables x,y,z will be zero in the center of the object. When using an
equation in this field, consider using a mesh override region to control the simulation mesh size. For
more information on entering equations, see the Equation interpreter 214 section.
INDEX UNITS: Only relevant when specifying a spatially varying equation in the INDEX properly described
above. Specify the units (nm, um, m) of the x,y,z position variables.
GRID ATTRIBUTE NAME: Enter the name of the grid attribute that applies to this object, see the grid
attribute 253 section

The following only applies to DEVICE:

2003 - 2016 Lumerical Solutions, Inc


334 Lumerical Knowledge Base

If the material chosen from the drop down menu is a binary alloy consisting of two semiconductors, then there
will be an additional property, namely, the "composition fraction" to set as well.

COMPOSITION FRACTION: This is x, the fraction of the semiconductor in the alloy. x can either take a fixed
value or vary.

The user can see which semiconductor has fraction x and which has fraction (1-x) shown in a line above this
drop down menu.

FIXED: This means that fraction x will be a constant value between 0 and 1.
LINEAR X/Y/Z: This means that the composition fraction x will vary as a function x or y or z. In this case, user
can specify the min and max fraction values for the min and max spatial points and the fraction will be
interpolated linearly in between. x,y,z here are those of the unrotated object. x,y,z are local to the object.
EQUATION: The user can enter an equation for the fraction that varies with u,v and w. u is (x-x0), v is (y-y0)
and w is (z-z0) where x0, y0 and z0 are the center coordinates of the object. This means that u,v and w are
local to the object.

Rotations tab
Rotate objects by setting the following variables:

FIRST, SECOND, THIRD AXES: Select rotation axis. Up to three different rotations can be applied.
ROTATION 1,2,3: The rotation of the object in a clockwise direction about each axis, measured in degrees.

Graphical Rendering tab


The graphical rendering tab is used to change how objects are drawn in the layout editor. The options are:

RENDER TYPE: The options for drawing the objects are detailed or wireframe. Detailed objects are shaded
and their transparency can be set using OVERRIDE COLOR OPACITY FROM MATERIAL DATABASE.
DETAIL: This is a slider which takes values between 0 and 1. By default it is set to 0.5. Higher detail shows
more detail, but increases the time required to draw objects. This setting has no effect on the simulation.
OVERRIDE COLOR OPACITY FROM MATERIAL DATABASE: When unselected the opacity is determined
from the material database. When selected, you can specify a value for ALPHA between 0 (transparent) and
1 (opaque) for the object, depending on how transparent you want the object to be.

5.4.1.1.7 Structures - Surface (Optical)

Objective
This page provides an simulation file containing several example structures created with the surface object, to
demonstrate the types of structures that can be created with this object.This is only available for surface primitives in
MODE and FDTD Solutions. 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.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 335

Solvers 101

FDTD
FDE
VarFDTD

Associated files
usr_surface_example.fsp

See also
Import object surfaces 489

The simulation file usr_surface_example.fsp contains several examples of surface objects that can be created
using conic, polynomial, and custom equation options. More examples of the surface objects can be found in the
object library available in FDTD solutions.

Note: Drawing resolution


Initially the object will be drawn at a low resolution, as shown in the top half of this figure. You can increase the
drawing resolution with the settings on the Graphical rendering tab. The bottom half of this figure shows the object
displayed at the same resolution as the image that is was imported from. It is important to note that the graphical
rendering does not affect the simulation. Irrespective of the drawing resolution, the meshed object used for the
simulation is always as has been defined.

The custom tab is only available for surface primitives in MODE and FDTD Solutions. The diagrams below show how
the surface is used to create a volume of desired material.

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.

S = S conic + S polynomial + S custom

Conic term:
cr 2
S conic =
1 + 1 - ( k + 1)c 2 r 2
c = 1/R, c is the inverse of the radius of curvature of the surface at r = 0.
k is the conic constant. When k=-1 we have a parabolic surface. When k=0 we have a spherical surface.
r2 = u2 + v2.

Polynomial term:

2003 - 2016 Lumerical Solutions, Inc


336 Lumerical Knowledge Base

5
S polynomial = M ij uiv j
i , j =0

There are 36 available coefficients

Custom term:
S custom = f (u , v)
You can choose any analytic function of (u,v).
The syntax and functions available to specify the index are found in the Equation interpreter 214 section.

For example, you could use


S custom = sin( u + v)

Edit structure tabs


Geometry tab
X, Y, Z: The center position of the object
X MIN, X MAX: X min, X max position
Y MIN, Y MAX: Y min, Y max position
Z MIN, Z MAX: Z min, Z max position
X SPAN, Y SPAN, Z SPAN: X, Y, Z span of the object

The surface tab


ORIENTATION: The surface determines if S is a function of (x,y), (x,z) or (y,z)..
ZERO PLANE: This determines if surface is measured from the lower edge of the rectangular volume or the
upper edge. See diagrams above.
MATERIAL POSITION: This determines if the material fills the regions above the surface or below the
surface. See diagrams above.
SET UNDEFINED TERMS TO: It is possible that the surface equation becomes undefined. For example, it
could be sqrt(-1) for some values of (u,v). In this case, the surface function will become either zero or the
maximum value allowed by the rectangular volume encompassing the surface object.
U0, V0: The origin of the (u,v) coordinate system, If U0, V0 are zero, then (u,v) = (0,0) will correspond to the
center of the surface object. Setting these values to non-zero will offset the origin by a desired amount.
SURFACE UNITS: All quantities defining the surface must be measured in the same units. You can choose
these units with this menu.
CONIC: Check this option to include the conic term in the surface equation. If this is checked, then set
RADIUS OF CURVATURE: curvature of the surface at the origin. This is equal to the inverse of the
parameter c described in the definition of Sconic .
CONIC CONSTANT: The k constant.
CUSTOM: Check this option to include the custom term in the surface equation
EQUATION: The equation as a function u and v.
POLYNOMIAL: Check this option to include a polynomial term in the surface equation. If this option is
checked, the M coefficients as explained above can be entered into a table.

To import a surface object, please see Import object surfaces 489

Material tab
The material options are as follows:

MATERIAL: This field can be set to any material included in the material database. It is possible to include
new materials in the database, or edit the materials already included. See the material database section for
more information.
OVERRIDE MESH ORDER FROM MATERIAL DATABASE: Select to override the mesh order from the

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 337

material database and manually set a mesh order. The mesh order is used by the simulation engine to
select which material to use when two materials overlap. See the mesh order (optical) 271 or mesh order
(electrical) 271 section for more details.
MESH ORDER: Set the mesh order in this field if the OVERRIDE MESH ORDER FROM MATERIAL
DATABASE option is selected. If the option is not selected, the field displays the material's default mesh
order from the database. For example, a material of mesh order 1 will take precedence over a material of
mesh order 2.

The following only applies to MODE and FDTD Solutions:

If <Object defined dielectric> is selected, then the INDEX property must be set.
INDEX: The refractive index of the structure, when the material type is <Object defined dielectric>. The index
must be greater than one.
v Anisotropic index: To specify an anisotropic refractive index, use a semicolon to separate the diagonal
xx,yy,zz indices. Eg. 1;1.5;1
v Spatially varying index: It is possible to specify a spatially varying refractive index by entering an
equation of the variables x,y,z in this field. Eg. 2+0.1*x will create an object where the refractive index
increases in the X direction. The units of the spatial variables (x,y,z) must be set with the 'INDEX UNITS'
property described below. The variables x,y,z will be zero in the center of the object. When using an
equation in this field, consider using a mesh override region to control the simulation mesh size. For
more information on entering equations, see the Equation interpreter 214 section.
INDEX UNITS: Only relevant when specifying a spatially varying equation in the INDEX properly described
above. Specify the units (nm, um, m) of the x,y,z position variables.
GRID ATTRIBUTE NAME: Enter the name of the grid attribute that applies to this object, see the grid
attribute 253 section

The following only applies to DEVICE:

If the material chosen from the drop down menu is a binary alloy consisting of two semiconductors, then there
will be an additional property, namely, the "composition fraction" to set as well.

COMPOSITION FRACTION: This is x, the fraction of the semiconductor in the alloy. x can either take a fixed
value or vary.

The user can see which semiconductor has fraction x and which has fraction (1-x) shown in a line above this
drop down menu.

FIXED: This means that fraction x will be a constant value between 0 and 1.
LINEAR X/Y/Z: This means that the composition fraction x will vary as a function x or y or z. In this case, user
can specify the min and max fraction values for the min and max spatial points and the fraction will be
interpolated linearly in between. x,y,z here are those of the unrotated object. x,y,z are local to the object.
EQUATION: The user can enter an equation for the fraction that varies with u,v and w. u is (x-x0), v is (y-y0)
and w is (z-z0) where x0, y0 and z0 are the center coordinates of the object. This means that u,v and w are
local to the object.

Rotations tab
Rotate objects by setting the following variables:

FIRST, SECOND, THIRD AXES: Select rotation axis. Up to three different rotations can be applied.
ROTATION 1,2,3: The rotation of the object in a clockwise direction about each axis, measured in degrees.

Graphical Rendering tab


The graphical rendering tab is used to change how objects are drawn in the layout editor. The options are:

RENDER TYPE: The options for drawing the objects are detailed or wireframe. Detailed objects are shaded
and their transparency can be set using OVERRIDE COLOR OPACITY FROM MATERIAL DATABASE.

2003 - 2016 Lumerical Solutions, Inc


338 Lumerical Knowledge Base

DETAIL: This is a slider which takes values between 0 and 1. By default it is set to 0.5. Higher detail shows
more detail, but increases the time required to draw objects. This setting has no effect on the simulation.
OVERRIDE COLOR OPACITY FROM MATERIAL DATABASE: When unselected the opacity is determined
from the material database. When selected, you can specify a value for ALPHA between 0 (transparent) and
1 (opaque) for the object, depending on how transparent you want the object to be.

5.4.1.1.8 Structures - Waveguide


This section describes how to create a waveguide having an isosceles trapezoidal cross section and a Bzier-curved
path.

Solvers 101

FDTD
FDE
VarFDTD
EME

See also
Complex structures - Waveguide bends 359

Bzier curves are widely used in computer graphics for the generation of smooth curves. The path of the curve, B(t),
are defined by a set of control points, called poles, P0, P1, ...., Pn and its mathematical representation is as follows:

whe
is the binomial coefficients.
re

For n=1, the curve reduces to a straight line defined by the interpolation of the points P0 and P1.

For n=3, the curves are called cubic Bzier curves, which, together with quadratic (n=2) ones, are most commonly
used . Some of the cubic Bezier curve examples are shown below.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 339

Edit structure tabs

Geometry tab
X, Y, Z: The center position of the
object
Base width, Base height, Base
Angle: The width, height, sidewall
angle of the waveguide cross
section
Poles: Positions of Bezier poles.

Material tab
The material options are as follows:

MATERIAL: This field can be set to any material included in the material database. It is possible to include
new materials in the database, or edit the materials already included. See the material database section for
more information.
OVERRIDE MESH ORDER FROM MATERIAL DATABASE: Select to override the mesh order from the
material database and manually set a mesh order. The mesh order is used by the simulation engine to
select which material to use when two materials overlap. See the mesh order (optical) 271 or mesh order
(electrical) 271 section for more details.
MESH ORDER: Set the mesh order in this field if the OVERRIDE MESH ORDER FROM MATERIAL
DATABASE option is selected. If the option is not selected, the field displays the material's default mesh
order from the database. For example, a material of mesh order 1 will take precedence over a material of
mesh order 2.

The following only applies to MODE and FDTD Solutions:

If <Object defined dielectric> is selected, then the INDEX property must be set.
INDEX: The refractive index of the structure, when the material type is <Object defined dielectric>. The index
must be greater than one.
v Anisotropic index: To specify an anisotropic refractive index, use a semicolon to separate the diagonal
xx,yy,zz indices. Eg. 1;1.5;1
v Spatially varying index: It is possible to specify a spatially varying refractive index by entering an
equation of the variables x,y,z in this field. Eg. 2+0.1*x will create an object where the refractive index
increases in the X direction. The units of the spatial variables (x,y,z) must be set with the 'INDEX UNITS'
property described below. The variables x,y,z will be zero in the center of the object. When using an
equation in this field, consider using a mesh override region to control the simulation mesh size. For
more information on entering equations, see the Equation interpreter 214 section.
INDEX UNITS: Only relevant when specifying a spatially varying equation in the INDEX properly described
above. Specify the units (nm, um, m) of the x,y,z position variables.

2003 - 2016 Lumerical Solutions, Inc


340 Lumerical Knowledge Base

GRID ATTRIBUTE NAME: Enter the name of the grid attribute that applies to this object, see the grid
attribute 253 section

The following only applies to DEVICE:

If the material chosen from the drop down menu is a binary alloy consisting of two semiconductors, then there
will be an additional property, namely, the "composition fraction" to set as well.

COMPOSITION FRACTION: This is x, the fraction of the semiconductor in the alloy. x can either take a fixed
value or vary.

The user can see which semiconductor has fraction x and which has fraction (1-x) shown in a line above this
drop down menu.

FIXED: This means that fraction x will be a constant value between 0 and 1.
LINEAR X/Y/Z: This means that the composition fraction x will vary as a function x or y or z. In this case, user
can specify the min and max fraction values for the min and max spatial points and the fraction will be
interpolated linearly in between. x,y,z here are those of the unrotated object. x,y,z are local to the object.
EQUATION: The user can enter an equation for the fraction that varies with u,v and w. u is (x-x0), v is (y-y0)
and w is (z-z0) where x0, y0 and z0 are the center coordinates of the object. This means that u,v and w are
local to the object.

Rotations tab
Rotate objects by setting the following variables:

FIRST, SECOND, THIRD AXES: Select rotation axis. Up to three different rotations can be applied.
ROTATION 1,2,3: The rotation of the object in a clockwise direction about each axis, measured in degrees.

Graphical Rendering tab


The graphical rendering tab is used to change how objects are drawn in the layout editor. The options are:

RENDER TYPE: The options for drawing the objects are detailed or wireframe. Detailed objects are shaded
and their transparency can be set using OVERRIDE COLOR OPACITY FROM MATERIAL DATABASE.
DETAIL: This is a slider which takes values between 0 and 1. By default it is set to 0.5. Higher detail shows
more detail, but increases the time required to draw objects. This setting has no effect on the simulation.
OVERRIDE COLOR OPACITY FROM MATERIAL DATABASE: When unselected the opacity is determined
from the material database. When selected, you can specify a value for ALPHA between 0 (transparent) and
1 (opaque) for the object, depending on how transparent you want the object to be.

5.4.1.1.9 Structures - Sphere


This page describes a sphere object. In 3D simulations, users can define spherical regions of constant refractive
index through the spherical physical object. Spherical objects only exist in 3D simulations.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 341

Solvers 101

FDTD
FDE
VarFDTD
DEVICE

See also
Structures 318

Edit structure tabs


Geometry tab
X, Y, Z: The center position of the object
RADIUS: Radius of the object
MAKE ELLIPSOID: If this box is checked, second and third radii can be defined

Material tab
The material options are as follows:

MATERIAL: This field can be set to any material included in the material database. It is possible to include
new materials in the database, or edit the materials already included. See the material database section for
more information.
OVERRIDE MESH ORDER FROM MATERIAL DATABASE: Select to override the mesh order from the
material database and manually set a mesh order. The mesh order is used by the simulation engine to
select which material to use when two materials overlap. See the mesh order (optical) 271 or mesh order
(electrical) 271 section for more details.
MESH ORDER: Set the mesh order in this field if the OVERRIDE MESH ORDER FROM MATERIAL
DATABASE option is selected. If the option is not selected, the field displays the material's default mesh
order from the database. For example, a material of mesh order 1 will take precedence over a material of
mesh order 2.

The following only applies to MODE and FDTD Solutions:

If <Object defined dielectric> is selected, then the INDEX property must be set.
INDEX: The refractive index of the structure, when the material type is <Object defined dielectric>. The index
must be greater than one.
v Anisotropic index: To specify an anisotropic refractive index, use a semicolon to separate the diagonal
xx,yy,zz indices. Eg. 1;1.5;1
v Spatially varying index: It is possible to specify a spatially varying refractive index by entering an
equation of the variables x,y,z in this field. Eg. 2+0.1*x will create an object where the refractive index
increases in the X direction. The units of the spatial variables (x,y,z) must be set with the 'INDEX UNITS'
property described below. The variables x,y,z will be zero in the center of the object. When using an
equation in this field, consider using a mesh override region to control the simulation mesh size. For
more information on entering equations, see the Equation interpreter 214 section.
INDEX UNITS: Only relevant when specifying a spatially varying equation in the INDEX properly described
above. Specify the units (nm, um, m) of the x,y,z position variables.
GRID ATTRIBUTE NAME: Enter the name of the grid attribute that applies to this object, see the grid

2003 - 2016 Lumerical Solutions, Inc


342 Lumerical Knowledge Base

attribute 253 section

The following only applies to DEVICE:

If the material chosen from the drop down menu is a binary alloy consisting of two semiconductors, then there
will be an additional property, namely, the "composition fraction" to set as well.

COMPOSITION FRACTION: This is x, the fraction of the semiconductor in the alloy. x can either take a fixed
value or vary.

The user can see which semiconductor has fraction x and which has fraction (1-x) shown in a line above this
drop down menu.

FIXED: This means that fraction x will be a constant value between 0 and 1.
LINEAR X/Y/Z: This means that the composition fraction x will vary as a function x or y or z. In this case, user
can specify the min and max fraction values for the min and max spatial points and the fraction will be
interpolated linearly in between. x,y,z here are those of the unrotated object. x,y,z are local to the object.
EQUATION: The user can enter an equation for the fraction that varies with u,v and w. u is (x-x0), v is (y-y0)
and w is (z-z0) where x0, y0 and z0 are the center coordinates of the object. This means that u,v and w are
local to the object.

Rotations tab
Rotate objects by setting the following variables:

FIRST, SECOND, THIRD AXES: Select rotation axis. Up to three different rotations can be applied.
ROTATION 1,2,3: The rotation of the object in a clockwise direction about each axis, measured in degrees.

Graphical Rendering tab


The graphical rendering tab is used to change how objects are drawn in the layout editor. The options are:

RENDER TYPE: The options for drawing the objects are detailed or wireframe. Detailed objects are shaded
and their transparency can be set using OVERRIDE COLOR OPACITY FROM MATERIAL DATABASE.
DETAIL: This is a slider which takes values between 0 and 1. By default it is set to 0.5. Higher detail shows
more detail, but increases the time required to draw objects. This setting has no effect on the simulation.
OVERRIDE COLOR OPACITY FROM MATERIAL DATABASE: When unselected the opacity is determined
from the material database. When selected, you can specify a value for ALPHA between 0 (transparent) and
1 (opaque) for the object, depending on how transparent you want the object to be.

5.4.1.1.10 Structures - Pyramid


This page describes a pyramid object. 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.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 343

Solvers 101

FDTD
FDE
VarFDTD
EME
DEVICE
See also
Structures 318
Creating rounded corners 358

Edit structure tabs


Geometry tab
X, Y, Z: The center position of the object
X SPAN BOTTOM, X SPAN TOP: X bottom, top span of the object
Y SPAN BOTTOM, Y SPAN TOP: Y bottom, top span of the object
Z MIN, Z MAX: Z min, Z max position
Z SPAN: Z span of the object

Material tab
The material options are as follows:

MATERIAL: This field can be set to any material included in the material database. It is possible to include
new materials in the database, or edit the materials already included. See the material database section for
more information.
OVERRIDE MESH ORDER FROM MATERIAL DATABASE: Select to override the mesh order from the
material database and manually set a mesh order. The mesh order is used by the simulation engine to
select which material to use when two materials overlap. See the mesh order (optical) 271 or mesh order
(electrical) 271 section for more details.
MESH ORDER: Set the mesh order in this field if the OVERRIDE MESH ORDER FROM MATERIAL
DATABASE option is selected. If the option is not selected, the field displays the material's default mesh
order from the database. For example, a material of mesh order 1 will take precedence over a material of
mesh order 2.

The following only applies to MODE and FDTD Solutions:

If <Object defined dielectric> is selected, then the INDEX property must be set.
INDEX: The refractive index of the structure, when the material type is <Object defined dielectric>. The index
must be greater than one.
v Anisotropic index: To specify an anisotropic refractive index, use a semicolon to separate the diagonal
xx,yy,zz indices. Eg. 1;1.5;1
v Spatially varying index: It is possible to specify a spatially varying refractive index by entering an
equation of the variables x,y,z in this field. Eg. 2+0.1*x will create an object where the refractive index
increases in the X direction. The units of the spatial variables (x,y,z) must be set with the 'INDEX UNITS'
property described below. The variables x,y,z will be zero in the center of the object. When using an
equation in this field, consider using a mesh override region to control the simulation mesh size. For
more information on entering equations, see the Equation interpreter 214 section.
INDEX UNITS: Only relevant when specifying a spatially varying equation in the INDEX properly described

2003 - 2016 Lumerical Solutions, Inc


344 Lumerical Knowledge Base

above. Specify the units (nm, um, m) of the x,y,z position variables.
GRID ATTRIBUTE NAME: Enter the name of the grid attribute that applies to this object, see the grid
attribute 253 section

The following only applies to DEVICE:

If the material chosen from the drop down menu is a binary alloy consisting of two semiconductors, then there
will be an additional property, namely, the "composition fraction" to set as well.

COMPOSITION FRACTION: This is x, the fraction of the semiconductor in the alloy. x can either take a fixed
value or vary.

The user can see which semiconductor has fraction x and which has fraction (1-x) shown in a line above this
drop down menu.

FIXED: This means that fraction x will be a constant value between 0 and 1.
LINEAR X/Y/Z: This means that the composition fraction x will vary as a function x or y or z. In this case, user
can specify the min and max fraction values for the min and max spatial points and the fraction will be
interpolated linearly in between. x,y,z here are those of the unrotated object. x,y,z are local to the object.
EQUATION: The user can enter an equation for the fraction that varies with u,v and w. u is (x-x0), v is (y-y0)
and w is (z-z0) where x0, y0 and z0 are the center coordinates of the object. This means that u,v and w are
local to the object.

Rotations tab
Rotate objects by setting the following variables:

FIRST, SECOND, THIRD AXES: Select rotation axis. Up to three different rotations can be applied.
ROTATION 1,2,3: The rotation of the object in a clockwise direction about each axis, measured in degrees.

Graphical Rendering tab


The graphical rendering tab is used to change how objects are drawn in the layout editor. The options are:

RENDER TYPE: The options for drawing the objects are detailed or wireframe. Detailed objects are shaded
and their transparency can be set using OVERRIDE COLOR OPACITY FROM MATERIAL DATABASE.
DETAIL: This is a slider which takes values between 0 and 1. By default it is set to 0.5. Higher detail shows
more detail, but increases the time required to draw objects. This setting has no effect on the simulation.
OVERRIDE COLOR OPACITY FROM MATERIAL DATABASE: When unselected the opacity is determined
from the material database. When selected, you can specify a value for ALPHA between 0 (transparent) and
1 (opaque) for the object, depending on how transparent you want the object to be.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 345

5.4.1.1.11 Structures - Planar solid

Objective
This section describes how to set and get the vertex positions of a planar solid object.
Solvers 101

FDTD
FDE
VarFDTD
EME
DEVICE
See also
Structures 318
addplanarsolid 1536

The planar solid object behaves like the polygon structure, however we can only use script commands to specify the
vertices and facets of the structure. The image below shows how a facet is defined to denote positive or negative
spaces. In the shape below one facet comprises of two paths : p1=[1,3,2,5,4] , p2=[16,17,18,19].

Setting the vertices of the polygon object


The vertices of the planar solid object can be edited using scripting by two methods:

Specifying the vertices as a cell array.


Specifying the vertices as a matrix.

For complex shapes, one can use multiple primitives and set the mesh orders of overlapping structures to achieve
the desired shape, but using the planar solid primitive allows you to use just one object to implement complex
shapes.

A description of how the vertices and facets can be set is provided in the Planar solid - Scripting example 347 .

Edit structure tabs


Geometry tab
X, Y, Z: The center position of the object

2003 - 2016 Lumerical Solutions, Inc


346 Lumerical Knowledge Base

Material tab
The material options are as follows:

MATERIAL: This field can be set to any material included in the material database. It is possible to include
new materials in the database, or edit the materials already included. See the material database section for
more information.
OVERRIDE MESH ORDER FROM MATERIAL DATABASE: Select to override the mesh order from the
material database and manually set a mesh order. The mesh order is used by the simulation engine to
select which material to use when two materials overlap. See the mesh order (optical) 271 or mesh order
(electrical) 271 section for more details.
MESH ORDER: Set the mesh order in this field if the OVERRIDE MESH ORDER FROM MATERIAL
DATABASE option is selected. If the option is not selected, the field displays the material's default mesh
order from the database. For example, a material of mesh order 1 will take precedence over a material of
mesh order 2.

The following only applies to MODE and FDTD Solutions:

If <Object defined dielectric> is selected, then the INDEX property must be set.
INDEX: The refractive index of the structure, when the material type is <Object defined dielectric>. The index
must be greater than one.
v Anisotropic index: To specify an anisotropic refractive index, use a semicolon to separate the diagonal
xx,yy,zz indices. Eg. 1;1.5;1
v Spatially varying index: It is possible to specify a spatially varying refractive index by entering an
equation of the variables x,y,z in this field. Eg. 2+0.1*x will create an object where the refractive index
increases in the X direction. The units of the spatial variables (x,y,z) must be set with the 'INDEX UNITS'
property described below. The variables x,y,z will be zero in the center of the object. When using an
equation in this field, consider using a mesh override region to control the simulation mesh size. For
more information on entering equations, see the Equation interpreter 214 section.
INDEX UNITS: Only relevant when specifying a spatially varying equation in the INDEX properly described
above. Specify the units (nm, um, m) of the x,y,z position variables.
GRID ATTRIBUTE NAME: Enter the name of the grid attribute that applies to this object, see the grid
attribute 253 section

The following only applies to DEVICE:

If the material chosen from the drop down menu is a binary alloy consisting of two semiconductors, then there
will be an additional property, namely, the "composition fraction" to set as well.

COMPOSITION FRACTION: This is x, the fraction of the semiconductor in the alloy. x can either take a fixed
value or vary.

The user can see which semiconductor has fraction x and which has fraction (1-x) shown in a line above this
drop down menu.

FIXED: This means that fraction x will be a constant value between 0 and 1.
LINEAR X/Y/Z: This means that the composition fraction x will vary as a function x or y or z. In this case, user
can specify the min and max fraction values for the min and max spatial points and the fraction will be
interpolated linearly in between. x,y,z here are those of the unrotated object. x,y,z are local to the object.
EQUATION: The user can enter an equation for the fraction that varies with u,v and w. u is (x-x0), v is (y-y0)
and w is (z-z0) where x0, y0 and z0 are the center coordinates of the object. This means that u,v and w are
local to the object.

Rotations tab
Rotate objects by setting the following variables:

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 347

FIRST, SECOND, THIRD AXES: Select rotation axis. Up to three different rotations can be applied.
ROTATION 1,2,3: The rotation of the object in a clockwise direction about each axis, measured in degrees.

Graphical Rendering tab


The graphical rendering tab is used to change how objects are drawn in the layout editor. The options are:

RENDER TYPE: The options for drawing the objects are detailed or wireframe. Detailed objects are shaded
and their transparency can be set using OVERRIDE COLOR OPACITY FROM MATERIAL DATABASE.
DETAIL: This is a slider which takes values between 0 and 1. By default it is set to 0.5. Higher detail shows
more detail, but increases the time required to draw objects. This setting has no effect on the simulation.
OVERRIDE COLOR OPACITY FROM MATERIAL DATABASE: When unselected the opacity is determined
from the material database. When selected, you can specify a value for ALPHA between 0 (transparent) and
1 (opaque) for the object, depending on how transparent you want the object to be.

5.4.1.1.11.1 Planar solid - scripting example


This page shows an example script for constructing a cube with two planar holes:

Solvers 101

FDTD
FDE
VarFDTD
EME
DEVICE
See also
Structures 318
Planar solid 345
addplanarsolid 1536

# Select method of formatting data used to create the object


method_type = 1;

# Specify vertex locations (Refer to the figure above)


vtx = [0,0,0;
1,0,0;
1,1,0;
0,1,0;
0,0,1;
1,0,1;

2003 - 2016 Lumerical Solutions, Inc


348 Lumerical Knowledge Base

1,1,1;
0,1,1;
0.25,.25,0;
0.8,.25,0;
0.25,.8,0;
0.25,.25,1;
0.8,.25,1;
0.25,.8,1;
0.5,.8,0;
0.8,.5,0;
0.8,.8,0;
0.5,.8,1;
0.8,.5,1;
0.8,.8,1]*1e-6;

# Data format method 1: facet table as cell array


a = cell(12);
for (i = 1:12) {
if ((i == 1) | (i == 6)) {
a{i} = cell(3);
} else {
a{i} = cell(1);
}
}

a{1}{1} = [1,4,3,2]; # bottom facet has two holes


a{1}{2} = [11,10,9]; # first hole (orientation auto-corrected)
a{1}{3} = [15,17,16]; # second hole

a{2}{1} = [1,5,8,4]; # x min


a{3}{1} = [1,2,6,5]; # y min
a{4}{1} = [2,6,7,3]; # x max
a{5}{1} = [3,4,8,7]; # y max

a{6}{1} = [5,6,7,8]; # top face has two matching holes to bottom


a{6}{2} = [12,13,14];
a{6}{3} = [18,19,20];

a{7}{1} = [10,9,12,13]; # inner faces of holes


a{8}{1} = [11,10,13,14];
a{9}{1} = [9,11,14,12];
a{10}{1} = [16,15,18,19];
a{11}{1} = [15,17,20,18];
a{12}{1} = [17,16,19,20];

if (method_type == 1) {
addplanarsolid(vtx,a);
}

# Data format method : facet table as matrix

else {
b = matrix(4,3,12); # max four points per polygon, max 3 polygon per facet
for (i = 1:12) {

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 349

for (ipol = 1:length(a{i})) {


fpoly = a{i}{ipol};
for (j = 1:length(fpoly)) {
b(j,ipol,i) = fpoly(j);
}
}
}
addplanarsolid;
set('vertices',vtx); # must be done first
set('facets',b);
}

5.4.1.1.12 Structures - 2D Rectangle (Optical)


This page describes a 2D rectangle object. Rectangular regions denote physical objects that appear rectangular.
This is a true 2D rectangle (or a surface object), which has no thickness in the normal direction. This object can be
used with the graphene model using the surface conductivity approach.

Solvers 101

FDTD
FDE
VarFDTD
EME
See also
Graphene 2774

Edit structure tabs


Geometry tab
Surface normal: X, Y or Z. This is the surface normal of the 2D rectangle. When a direction of the normal is
selected, the 2D rectangle object will be rotated accordingly and the corresponding direction options to
specify span and min/max values will be grayed out. The 2D rectangle object has no thickness.

X, Y, Z: The center position of the object


X MIN, X MAX: X min, X max position
Y MIN, Y MAX: Y min, Y max position
Z MIN, Z MAX: Z min, Z max position
X SPAN, Y SPAN, Z SPAN: X, Y, Z span of the object

Material tab
The material options are as follows:

MATERIAL: The material assigned to a 2D rectangle is filtered. It can only be a dielectric with fixed index or
a graphene material type.
OVERRIDE MESH ORDER FROM MATERIAL DATABASE: Select to override the mesh order from the

2003 - 2016 Lumerical Solutions, Inc


350 Lumerical Knowledge Base

material database and manually set a mesh order. The mesh order is used by the simulation engine to
select which material to use when two materials overlap. See the mesh order (optical) 271 or mesh order
(electrical) 271 section for more details.
MESH ORDER: Set the mesh order in this field if the OVERRIDE MESH ORDER FROM MATERIAL
DATABASE option is selected. If the option is not selected, the field displays the material's default mesh
order from the database. For example, a material of mesh order 1 will take precedence over a material of
mesh order 2.

If <Object defined dielectric> is selected, then the INDEX property must be set.
INDEX: The refractive index of the structure, when the material type is <Object defined dielectric>. The index
must be greater than one.
v Anisotropic index: To specify the anisotropy, use the "Surface normal" option in the geometry tab.
v Spatially varying index: This is not supported in this 2D rectangle object.
INDEX UNITS: Only relevant when specifying a spatially varying equation in the INDEX properly described
above. Specify the units (nm, um, m) of the x,y,z position variables.
GRID ATTRIBUTE NAME: Enter the name of the grid attribute that applies to this object, see the grid
attribute 253 section

Rotations tab
Rotate objects by setting the following variables:

FIRST, SECOND, THIRD AXES: Select rotation axis. Up to three different rotations can be applied.
ROTATION 1,2,3: The rotation of the object in a clockwise direction about each axis, measured in degrees.

Note: Axis rotation


This object does not support arbitrary angle of rotation on the non-normal axis. For example, with z axis
being the normal, rotation of 30 degrees along z is allowed. However, rotation of 30 degrees along x or y
axis is not allowed. Also note, the "Surface normal" option in the "Geometry tab" also rotates the object
accordingly.

Graphical Rendering tab


The graphical rendering tab is used to change how objects are drawn in the layout editor. The options are:

RENDER TYPE: The options for drawing the objects are detailed or wireframe. Detailed objects are shaded
and their transparency can be set using OVERRIDE COLOR OPACITY FROM MATERIAL DATABASE.
DETAIL: This is a slider which takes values between 0 and 1. By default it is set to 0.5. Higher detail shows
more detail, but increases the time required to draw objects. This setting has no effect on the simulation.
OVERRIDE COLOR OPACITY FROM MATERIAL DATABASE: When unselected the opacity is determined
from the material database. When selected, you can specify a value for ALPHA between 0 (transparent) and
1 (opaque) for the object, depending on how transparent you want the object to be.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 351

5.4.1.1.13 Structures - 2D Polygon


This page describes a 2D polygon object. The object is defined in 2d surface and does not have thickness in the
surface-normal direction. It can be used with 2D materials such as graphene, PEC and sampled 2d data.

Solvers 101

FDTD
FDE
VarFDTD
EME

Associated
files
2d_poly_exa
mples.lsf

See also
Structures 318
Structure -
Polygon 325
Structure - 2D
Rectangle 349

Here are some of the example structures that can be created using a 2D polygon object. To create any one of these
structures, open the 2d_poly_examples.lsf and run the corresponding part of the script.

Edit structure tabs

Geometry tab
X, Y, Z: The center position of the object

Setting the vertices of the polygon object


The vertices of the polygon object can be edited by
moving them with the mouse,
manually editing the x,y location of each vertex in the polygon property editor,
script command

2003 - 2016 Lumerical Solutions, Inc


352 Lumerical Knowledge Base

For complex shapes, scripting in the structure group is usually best. Once the script has calculated the x,y
vertex positions, they can be loaded into the polygon object with a single set("vertices",V); command.
For example, use the following code to create an octagon shaped object.

# octagon properties
n_sides=8;
r=1e-6;

# x,y position of each corner


theta=linspace(0,360,n_sides+1);
theta=theta(1:n_sides);
x=r*cos(theta*pi/180);
y=r*sin(theta*pi/180);

# combine x,y into one vertices matrix


V=matrix(n_sides,2);
V(1:n_sides,1)=x(1:n_sides);
V(1:n_sides,2)=y(1:n_sides);

# add polygon object and set the vertices


addpoly;
set("vertices",V);

NOTE: Getting and modifying polygon vertices


To get the polygon vertices, use the following command. The vertices will be returned in an Nx2 matrix. The
columns of this matrix correspond to the X,Y positions of each vertex.
V=get("vertices");
?size(V);

To modify a polygon vertex, you must get the vertices matrix, modify the vertex matrix as desired, then re-
apply it to the polygon object:
V=get("vertices");
V(1,1)=V(1,1)+1e-6; # change the x position of the first vertex by 1um.
set("vertices",V);
Material tab
The material options are as follows:

MATERIAL: The material assigned to a 2D polygon is filtered. It can only accept graphene, PEC(perfect
electric conductor), sampled 2d data material types.
OVERRIDE MESH ORDER FROM MATERIAL DATABASE: Select to override the mesh order from the
material database and manually set a mesh order. The mesh order is used by the simulation engine to
select which material to use when two materials overlap. See the mesh order (optical) 271 or mesh order
(electrical) 271 section for more details.
MESH ORDER: Set the mesh order in this field if the OVERRIDE MESH ORDER FROM MATERIAL
DATABASE option is selected. If the option is not selected, the field displays the material's default mesh
order from the database. For example, a material of mesh order 1 will take precedence over a material of
mesh order 2.

Rotations tab
Rotate objects by setting the following variables:

FIRST, SECOND, THIRD AXES: Select rotation axis. Up to three different rotations can be applied.
ROTATION 1,2,3: The rotation of the object in a clockwise direction about each axis, measured in degrees.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 353

Note: Axis rotation


This object does not support arbitrary angle of rotation on the non-normal axis. For example, with z axis
being the normal, rotation of 30 degrees along z is allowed. However, rotation of 30 degrees along x or y
axis is not allowed. Also note, the "Surface normal" option in the "Geometry tab" also rotates the object
accordingly.

Graphical Rendering tab


The graphical rendering tab is used to change how objects are drawn in the layout editor. The options are:

RENDER TYPE: The options for drawing the objects are detailed or wireframe. Detailed objects are shaded
and their transparency can be set using OVERRIDE COLOR OPACITY FROM MATERIAL DATABASE.
DETAIL: This is a slider which takes values between 0 and 1. By default it is set to 0.5. Higher detail shows
more detail, but increases the time required to draw objects. This setting has no effect on the simulation.
OVERRIDE COLOR OPACITY FROM MATERIAL DATABASE: When unselected the opacity is determined
from the material database. When selected, you can specify a value for ALPHA between 0 (transparent) and
1 (opaque) for the object, depending on how transparent you want the object to be.

5.4.1.2 Complex structures (Optical)


This section lists some examples of complex structures. User may find Structure groups 389 useful to contain the
complex structures.

Complex structures - Arrays of objects 356

2003 - 2016 Lumerical Solutions, Inc


354 Lumerical Knowledge Base

Complex structures - Rounded corners 358

Complex structures - Waveguide bends 359

Complex structures - Sidewall angle 362

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 355

Complex structures - Spirals 362

Complex structures - Surface roughness 364

Complex structures - 3D contour 366

2003 - 2016 Lumerical Solutions, Inc


356 Lumerical Knowledge Base

Complex structures - Conformal coating 367

Note: Complex structures in DEVICE


Although some complex structures could be possibly copied from optical solvers to DEVICE, special care must
be taken in this procedure because some structure features in optical solvers may not be fully supported in
DEVICE.

5.4.1.2.1 Complex structures - Arrays of objects

Objective
This page provides a structure group that can be used to create arrays of other objects.

Solvers 101

FDTD
FDE
VarFDTD
DEVICE

Associated files
usr_array_structure_group.fsp
(surface object only available in
optical solvers)
usr_pc_structure_group.fsp

See also
Structures 318
Structure groups 389

The simulation file usr_array_structure_group.fsp contains a structure group that will create an array of
objects that are placed within the group.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 357

For example, suppose we want to create an array of hemispheres.


Step 1
Create the structure that you want to
array. In this case, we have created a
hemisphere using the surface object.

If your structure is composed of more


than one primitive, remember to group
the primitives together.

Step 2
Change the name of your structure to
'object'.

Move your structure named 'object' into


the array_group. This is most easily
accomplished with the reposition arrows
(circled in the screenshot to the right).

Step 3
Setup the array structure group as
required.
nx, ny, nz the number of
periods in each
direction
ax, ay, az the period in each
direction
center_array specify if the center
or corner of the array
should be located at
the origin.

It's possible to add custom properties to


this object to modify each instance of the
original object. In this example, we have
radius and material properties to adjust
the hemisphere.

2003 - 2016 Lumerical Solutions, Inc


358 Lumerical Knowledge Base

Step 4
The array structure group will
automatically create an array of the
objects.

For another example of a structure group that can be used to create arrays, see the Structure groups 389 page. This
page provides a detailed description of how to create your the 2D array object shown below.

5.4.1.2.2 Complex structures - Rounded corners


The following is only available in FDTD and MODE:
Objective
This section describes how to create objects with rounded corners. The example file here was created in FDTD
Solutions, but these structures can be found in the component libraries of other products as well.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 359

Solvers 101

FDTD
FDE
VarFDTD

Associated files
usr_round_corners.fsp

See also
Structures 318
Creating a spiral 362
Extruding a polygon with a sidewall angle 362

Setting polygon vertices 325

Creating objects with rounded corners


Method 1:
Objects with rounded corners can be created with the polygon object. The simulation file
usr_round_corners.fsp contains an n-sided equilateral shape with rounded corners created using the polygon
primitive and then extruding. This object can also be accessed via the object library. By default, one corner of the
object always points in the +X direction. The rotation tab of the structure group can be used to rotate the object.

Method 2:
Rounded objects can also be created using a combination of rectangles, spheres and extruded circles (tubes).
Using the structure group script, the above all-rounded rectangular prism can be produced and easily modified.

Note: Continuous slope


Sometimes, adding a sphere to round a part of the structure can be tricky. The sphere must be positioned such
that there is a continuous slope at the interface between it and the structure. Often, satisfying this criteria has the
unwanted effect of the sphere protruding out of the sides when it shouldn't. To fix this, we use a revolved custom
object with a spherical equation, rather than a sphere. This allows us to specify the domain of the equation (x-min
and x-max) and thus, limit the section of the sphere that we want. The rounded cone is a good example of this
problem.

5.4.1.2.3 Complex structures - Waveguide bends


The following is only available in FDTD and MODE Solutions:

Objective
This section describes how to create various waveguide bends using the waveguide object. The path of the
waveguide is a Bezier curve, which is defined by a set of points, called 'poles.' Further detail on Bezier curve can be
found on the ' Structures - Waveguide 338 ' page.
The example file, usr_waveguide_bends.fsp, contains an s-bend and a Y-branch, which can be used to build
more complex structures such as cascaded y-branches and directional couplers.

2003 - 2016 Lumerical Solutions, Inc


360 Lumerical Knowledge Base

Solvers 101

FDTD
FDE
EME
VarFDTD

Associated files
usr_waveguide_bends.fsp

See also
Structures - Waveguide 338

Creating an S-bend
The s-bend waveguide can be created by specifying the poles in the 'edit waveguide' window. The red dots in the
image below corresponds to the poles in the table on the right. The example s-bend can be located in the
usr_waveguide_s_bend.fsp.

If only two poles are specified, a straight waveguide is formed.

Creating a Y-branch

Using the straight and the s-bend waveguides as building blocks, a Y-branch structure group as shown below can be
created. The group contains two s-bend as well as three rectangles. The dimensions of the waveguides (x1, x2, y2)
can be parametrized and a script in the structure group can be used to build the structure automatically. This is a
good example of a parent structure script modifying child structure scripts.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 361

The following script is used in the 'script' section of the structure group:

select("straight_in");
set("poles",[0,0;x1,0]);

select("straight_out1");
set("poles",[x1+x2,y2/2;2*x1+x2,y2/2]);

select("straight_out2");
set("poles",[x1+x2,-y2/2;2*x1+x2,-y2/2]);

select("s_bend_1");
set("poles",[x1,0;x1+x2/2,0;x1+x2/2,y2/2;x1+x2,y2/2]);

select("s_bend_2");
set("poles",[x1,0;x1+x2/2,0;x1+x2/2,-y2/2;x1+x2,-y2/2]);

Note: Reference points


The pole points are defined at the center of the waveguide cross section. The x1, x2, and y2 in the Y-splitter
example are all measured with respect to the corresponding pole points.

2003 - 2016 Lumerical Solutions, Inc


362 Lumerical Knowledge Base

5.4.1.2.4 Complex structures - Sidew all angle


The following is only available in FDTD and MODE:
Objective
This section provides a script file that can be used to extrude any polygon with a desired sidewall angle. The
example file here was created in FDTD Solutions, but these structures can be found in the component libraries of
other products as well.

Solvers 101

FDTD
FDE
VarFDTD

Associated files
usr_extrude_poly.lsf

See also
Structures 318
Setting polygon vertices 325

Extruding a polygon with a sidewall angle


FDTD Solutions supports extruded polygons in three dimensions, but the sidewalls are always vertical. A non-
vertical sidewall angle can be created by using a series of polygons that increase or decrease in scale as a function
of height.

The above figure shows an extruded polygon that can be constructed by inserting a polygon in a simulation file,
selecting the polygon and running the script usr_extrude_poly.lsf.

This script uses one method to scale the vertices as a function of depth while retaining the original vertex shape at
all depths. The script can be modified by users who are interested in other algorithms for determining the shape of
an extruded structure with non-vertical sidewalls.

Note: Simulation times when using large numbers of primitives.


The simulation time is not affected by the number of primitives used to create the physical structures.
The meshing time (which occurs before the simulation begins) will increase with the number of primitives used.
However, since the meshing time is normally much less than the simulation time, this will not have a significant
effect on the total time.

5.4.1.2.5 Complex structures - Spirals


The following is only available in FDTD and MODE:

Objective
The helix and spiral objects can be found in the Object library Structures category under the "Uncategorized
structures" heading. This section describes how these two types of spiral objects are created.

Solvers 101 Spiral


FDTD
FDE
VarFDTD

In this topic
Spiral 363
Helix 363

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 363

Associated files
usr_spiral.fsp
usr_helix.fsp
See also
Structures 318
Creating a 3D contour 366
Creating rounded corners 358
Setting polygon vertices 325

Helix

Spiral
The spiral is created with a series of polygon primitives. In this example, each ring of the spiral is one polygon
object.

The top figure above shows the spiral structure group object from usr_spiral.fsp. Spiral parameters such as
radius, types of the two materials that make up the spiral, and number of turns can be modified by editing the user
properties of the group.

Helix
The helix object is created with a series of thin cylinders. The second figure above shows a helix structure group
object from usr_helix.fsp. Helix parameters such as radius and number of turns can be modified by editing the
user properties of the group.

Note: Simulation times when using large numbers of primitives.


The simulation time is not affected by the number of primitives used to create the physical structures.
The meshing time (which occurs before the simulation begins) will increase with the number of primitives used.
However, since the meshing time is normally much less than the simulation time, this will not have a significant
effect on the total simulation time.

Conical helix

2003 - 2016 Lumerical Solutions, Inc


364 Lumerical Knowledge Base

With the Helix structure group, user may change the start and end radius of the helix to make it like a cone. User
may want to pay attention to the situation when the "fiber radius" is comparable to the "end radius" that makes the
structure distorted. In that case, changing the fiber radius or other parameters may need to be considered.

5.4.1.2.6 Complex structures - Surface roughness


The following is only available in FDTD and MODE:
Objective
This section describes how to create objects with surface roughness.

Solvers 101

FDTD
FDE
VarFDTD

In this topic
Simple roughness 364
Advanced roughness 365

Associated files
usr_surface_roughness.fsp
rough_waveguide.fsp

See also
Structures 318
Import object surfaces 489

Simple roughness example


The structure group named surface roughness simple which is located in usr_surface_roughness.fsp shows
a simple technique for adding surface roughness to a ridge waveguide. Rather than creating the structure from a
single rectangle, it is composed of many thin slices, each with a random variance in width.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 365

Advanced surface roughness


The structure group named surface roughness advanced which is located in usr_surface_roughness.fsp
shows a more advanced surface roughness model. In this case, the roughness is characterized by a specified sigma
RMS (s) and correlation length (Lc). These quantities are related to the correlation function by
2
r r r d
H (r ) H (r + d ) = s 2 exp -
Lc

The roughness is generated creating a matrix of uniform random numbers in k space. The high frequency
components are removed, and the resulting values are transformed back to real space.

In this case, a single import object (surface option) is used to define the entire object, rather than building the
surface from many simple primitives like the previous example. The upper surface of this object is defined by a 2D
matrix containing the surface height as a function of x and y.

The set up script initially fills the surface matrix in K-space with uniform random numbers. A filter is applied to
remove all high frequency components. The matrix is transformed back into real space, where the amplitude is
corrected. The import object is then added to the simulation.

An example of a ridge waveguide with rough sidewalls based on this technique can be found in
rough_waveguide.fsp.

2003 - 2016 Lumerical Solutions, Inc


366 Lumerical Knowledge Base

The surface roughness plot can also be applied to wrap around a wire. In this structure group, each slice of x
containing the array of height adjustments (y) is used to perturb points in a circle. When stacked, just like the rough
ridge waveguide example from above, it creates a continuous structure with a rough exterior.

Note that the detail setting for the graphical rendering is increased because this is a complex surface. A higher
detail setting makes the surface look better in the CAD editor, but will make the drawing slow if you have many
complex surfaces with many data points. The detail setting has no effect on the actual meshing of the structure.

5.4.1.2.7 Complex structures - 3D contour


The following is only available in FDTD and MODE:
Objective
This section describes how to create an arbitrary 3D contour with a polygonal cross section.

Solvers 101

FDTD
FDE
VarFDTD

Associated files
usr_contour.fsp

See also
Structures 318
Creating a spiral 362
Creating rounded corners 358
Extruding a polygon with a sidewall angle 362

Setting polygon vertices 325

Creating an arbitrary 3D contour

This example uses a large number of polygon objects to create an arbitrary 3D contour. The user defines an arbitrary
line contour path in 3 dimensions, and a polygonal cross sectional shape. The structure is created from sections of
rotated and extruded polygons. The user can increase the number of sections used by increasing the number of
sample points of the contour. The above structure shows the contour structure group from usr_contour.fsp.
Only user properties and the first portion of the setup script in the structure group defining the cross section and
contour path should be modified. For example, a simpler structure could be created by replacing the lines defining z:

z = matrix(N_sections);
z(1) = 0;
z(N_sections) = 0;
z(2:N_sections-1) = 5e-6*sin(phi)*sin(phi/4);

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 367

with

z=0;

The structure is now bound to z=0 as shown below. Contour paths can be defined analytically, or could be read from
a text file with the readdata script command.

5.4.1.2.8 Complex structures - Conformal coating

Objective
This section shows how to use the surface and import objects to create conformal surface coatings.

Solvers 101

FDTD
FDE
VarFDTD
DEVICE
Associated files
usr_conformal_coating.fsp

See also
Structures 318
Import objects 480

Figure 2: Screenshot of the coating and substrate Figure 3: Screenshot of the coating objects. Notice how

2003 - 2016 Lumerical Solutions, Inc


368 Lumerical Knowledge Base

objects. The surface objects are on the left and the the bottom of the import object (right) has the same
import objects are on the right. surface patterning as the top.

Coatings with the Surface object


To create conformal coatings with the surface object, simply create a copy of the object and shift it vertically by the
desired thickness of your coating. In this example, the coating is 0.5um thick.

It is important to remember that there will be a region where the two objects overlap. The mesh order property must
be used to specify that the substrate material properties should be used in these regions

Coatings with the Import object


To create conformal coatings with the import object, import the surface data into the top surface of the substrate
object. Set the upper reference height to the desired value. In this example, 0um is used. Next, create a copy of the
object and set the upper reference height of the copy to the desired value. The difference between the upper
reference height of the two objects will define the coating thickness.

At this point, the Import structures will look very similar to the surface objects. There will be a region where the two
objects overlap. However, with the Import object, it's possible to import the surface data into the lower surface as
well as the upper surface. Once the surface is imported into the lower surface, the two Import objects will not overlap
at all. The surface pattern on the bottom of the object is visible in Figure 3.

Tip: Check setup with index monitors


When creating complex structures like conformal coatings, use index monitors to ensure the structures are setup
properly.

5.4.1.3 Extending structures through PML (Optical)


The following is only available in FDTD and MODE:
Objective
PML boundary conditions are designed to absorb all incident light. For best performance, physical structures should
extend completely through the PML boundary condition region. The default settings in FDTD will automatically
extend any structures which lie on the PML boundary through the PML. In some cases, such as for photonic
crystals, it is better to disable this feature and draw the structures in the PML manually.

Solvers 101

FDTD
FDE
VarFDTD
See also
Structures 318
Simulation 414
PML reflection at angles 460

Simulation areas

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 369

A typical simulation is shown in the above screenshot. The simulation region outline is shown graphically in orange.
When the boundary conditions are set to PML, the simulation region outline has some thickness. This creates three
areas, labeled A,B,C in the above figure.

A - Simulation area of interest


This is the region that the user is interested in simulating. All important structures, sources and monitors should be
defined in this area. The size of this area is set with the X,Y,Z span property of the simulation region. Monitors only
collect data in this area. Monitors and sources larger than this area will be automatically truncated at the boundary.

B - Boundary condition area


Boundary conditions are applied in this region. For most types of boundary conditions (periodic, bloch, metal), this
area is very thin (1 mesh cell thick). These boundary conditions do not need a large area to function. PML
boundaries are different in that they require a larger area to properly absorb the fields. The size of this area is
proportional to the number of PML layers used in the simulation, and inversely proportional to the mesh size.

C - Completely outside the simulation region


Everything in this area will be ignored because it is completely outside of the simulation region. It is ok to create
objects in this area, but they will not be included in the simulation. This applies to structures, sources, and
monitors.

Extending objects through the boundary condition area


During a simulation, the electromagnetic fields are calculated both within the simulation area (A) and within the
boundary condition area (B). Since the fields are still being propagated in (B), it is important that the material
properties are also defined here. An interface in this area will act like any other interface and cause reflections. All
structures should extend completely through the boundary condition area to minimize these reflections. This is
especially important when using many layers of PML. As more layers of PML are added, the boundary condition
area will become larger.

The boundary conditions tab of the FDTD region, shown below, contains an option to extend structures through the
PML. By default this option is selected.

2003 - 2016 Lumerical Solutions, Inc


370 Lumerical Knowledge Base

If the extend structure through PML option is selected, it will extend any structures that touch the inner PML
boundary in the direction normal to the boundary. For instance, if the FDTD simulation contains the structure shown
in the left image below, then the extend structure through PML option will create extend the structure as depicted on
the right. This may not be ideal for all structures. In that case, you can uncheck this option and draw the structure
through the PML.

Examples

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 371

The left figure shows the correct setup when using substrates and
other layers with PML. The layers should extend through the PML in
both the X and Y directions. The right figure shows the layers
terminated at the inside boundary of the PML. This interface may
create an undesired reflection.

If the extend structures through PML option is selected, FDTD


Solutions will automatically extend the structure in the right figure so
that it gives the same results as the left figure.

The left figure shows the correct setup when using periodic structures
with PML. The structures should extend through the PML boundary.
The right figure shows the periodic structure only defined within the
simulation volume. This effectively creates an impedance mis-match
between the PC region and the boundary condition region. The mis-
match will reduce the performance of the PML.

Important: FDTD/MODE Solutions only meshs the


structure as it is drawn on the left if the extend
structures through PML checkbox is unchecked.
Otherwise, the material which touches the inside
PML boundary will be extended straight through the
PML. When the 'extend' option is enabled, the
structure will be meshed as drawn on the right,
since none of the circles touch the inner edge of
the PML boundaries.

Note: Sources and Monitors in the boundary condition area


Sources and monitors will be automatically truncated to the inner simulation region. We recommend defining the
sources and monitors to be larger than the simulation region. That way, if you need to make the simulation region
larger, you don't need to re-size all the sources and monitors.

Note:
Anything completely outside of the orange simulation boundary region has no effect on the simulation. In the
photonic crystal example above, the two outermost rings of PC are not necessary. It is the third ring, within the
PML boundary region, that is important to minimize reflections.

5.4.1.4 Build (structure)

The button provides two options that can be used to build structures by using imported geometric data; the
layer builder and the dataset builder.

Layer builder 372

The layer builder button creates a layer builder object that can be used to import GDS files and build layered
structures consisting of patterning defined in the GDS file cells as well as plane un-patterned layers.

2003 - 2016 Lumerical Solutions, Inc


372 Lumerical Knowledge Base

Dataset builder 375

The dataset builder button opens a wizard that uses finite-element data to create an unstructured dataset and then
(if appropriate) use the dataset to build structures and doping objects (in DEVICE only). The geometric data can be
imported from a variety of supported file formats such as HDF5 792 (.h5), matlab data 1642 (.mat), tecplot 1441 (.dat), or
Lumerical data file 1408 (.ldf).

5.4.1.4.1 Layer builder

The layer builder button adds a layer builder object. Layer builders can be used to import GDS files and build
up a layered structure consisting of patterning defined in GDS file cells as well as plane unpatterned layers. This tool
allows you to easily change the ordering and thickness of each layer and translate the position of the patterning
within a layer. This is an alternative to using the GDS import options to import structures that is described in the
GDSII - Import and export 480 page.

The following example shows how to set up a layer builder with a glass substrate and a silicon y-branch structure on
top of the substrate which is loaded from a GDS file.

Solvers 101

FDTD
FDE
VarFDTD
DEVICE
Associated files
layer_builder.lsf
layer_bulder_y_branch.gds
See also
Structures 318
Scripts - Layer builder 1553
GDSII Import/Export 480

Setting up from the GUI


Add a layer builder
Open a new simulation file, and add a new layer builder object by clicking on the button.

Set background geometry


The background geometry defines the positions and spans of the layers. Edit the layer builder and set the x span
and y span to 20 um in the background geometry section. Set the z position to 0 um. You can set the z position to
refer to the position of the bottom of the layered structure, the middle, or the top.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 373

Import GDS file


Download the layer_builder_y_branch.gds file from the Associated Files section above. Click on the "Import
GDS file" button and select the layer_builder_y_branch.gds file from the file browser.

Each layer builder can load data from one GDS file.

Add layers
Click on the "Add" button in the layers section twice in order to add two layers, one for the substrate, and another for
the y-branch structure.

Layers in the list are stacked upwards from the bottom, towards the positive z axis. This means that the layer at the
top of the list will be at the bottom, and each subsequent layer in the list is stacked on top of the previous layer. You
can also change the ordering of the layers by selecting the layer and using the "Up" and "Down" buttons to move the
layer up or down in the list.

To rename the layers, double-click in the Layer Name column. Set the name of the first layer in the list to
"substrate", and set the name of the second layer to "y-branch".

Set up layers
Layers can either be plain with no patterning, or they can include patterning loaded from a specified GDS file. In the
case of this example, the substrate will have no patterning and the y-branch layer will use patterning.

Set the thickness of the substrate layer to 2 um, and set the Material to "SiO2 (Glass) - Palik". This will be the

2003 - 2016 Lumerical Solutions, Inc


374 Lumerical Knowledge Base

material of the substrate layer.

Set the thickness of the y-branch layer to 0.5 um. Leave the Material as "none". This will use the background index
of the simulation region as the background material. Set the Layer Number setting to 1. This will use the first layer
from the specified GDS file as the patterning data. Set the Pattern Material to "Si (Silicon) - Palik".

Set patterning position


To set the x and y positions of GDS pattering, you can either use the pre-set options from the drop down menu to
center or align the patterning to the corners relative to the background geometry. It's also possible to specify custom
(x,y) coordinates of the center of the patterning. In the "GDS pattern reference frame" section, a preview is
automatically generated showing the position of the structure with respect to the background geometry.

In the case of the layer_builder_y_branch.gds file, the y-branch structure includes an offset specified in the
GDS file, so we need to translate the patterning so that the y-branch structure is moved closer to the center relative
to the substrate layer. Select the "Centered at custom coordinates" option from the drop down menu, and set x to -5
um and y to -10 um.

Viewing the final structure in the Objects Tree


The layer builder automatically sets up a structure group containing the objects. You can view the structures by
expanding the layer builder in the Objects tree, and the structures in each layer will be grouped into structure group.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 375

Exporting the layer information


Using the Import and Export buttons in the edit layer builder window, it's possible to export the layer information into
a .lbr file from a layer builder and load it into another layer builder.

Using script commands


A layer builder can also be added and set up completely from the script. The layer_builder.lsf script file sets
up the same structure using the script. Below are the relevant script commands.

addlayer 1552 , addlayerbuilder 1553 , getcelllist 1591 , getlayerlist 1591 , loadgdsfile 1592 ,
setlayer 1591

5.4.1.4.2 Dataset builder

The dataset builder button opens a wizard that enables the user to create an unstructured dataset and then (if
appropriate) use the data to build structures and doping objects (in DEVICE only). It also generates a script file that
can later be used to perform the same task using only the script environment. The dataset builder is powerful tool
that facilitates the use of finite-element data imported into Lumerical's optical and electrical solvers.

Geometries and doping profiles can be created using 2D or 3D finite element data imported into the script workspace
of FDTD, MODE Solutions, or DEVICE. The advantage of using the dataset builder is that the finite-element data
can be imported from a variety of supported formats such as HDF5 792 (.h5), matlab data 1642 (.mat), tecplot 1441 (.dat),
or Lumerical data file 1408 (.ldf), before being used to build unstructured datasets (and eventually complex structures
and doping profiles).

The following example shows how the dataset builder can be used to create an unstructured dataset and build a

2003 - 2016 Lumerical Solutions, Inc


376 Lumerical Knowledge Base

structure along with its doping profile using data imported from an HDF5 file. The example is created in DEVICE.
However, the work-flow will be identical in FDTD and MODE Solutions.

Solvers 101

FDTD
FDE
VarFDTD
DEVICE
Associated files
processdata.h5
readh5file.lsf
script_out.lsf
DSB_test.ldev
See also
Structures 318
Reading HDF5 files 792

Datasets 1461

Unstructured dataset and finite-element data


The unstructured dataset is an useful format to store spatial data that is defined on a finite-element grid. A finite-
element grid consists of triangles (in 2D) or tetrahedrons (in 3D), more commonly known as elements. The data is
stored at the vertices of these elements and usually has a dimension of Nx1 (for unparameterized data), where N is
the number of verteices. Three vertex matrices x, y, and z contains the x, y, and z coordinates of all the vertices,
respectively, and have same the dimension of Nx1. Unlike rectilinear data where only the spatial data and the x, y,
z coordinates are sufficient, in a finite-element grid, an additional matrix is needed to properly describe the spatial
data, which is called the connectivity matrix. The connectivity matrix contains information about all the elements
and stores the index of the vertices that create each of the elements. The dimension of the connectivity matrix is
Mx3 (for 2D triangles) or Mx4 (for 3D tetrahedrons), where M is the number of elements in the finite-element grid. In
the following figure, the different elements (triangles) and vertices of a (2D) finite-element space are shown along with
the connectivity and vertex matrices.

Apart from the fact that the unstructured dataset holds finite-element data, it behaves similar to the rectilinear

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 377

datasets used in Lumerical's solvers. The dataset can be parameterized and it can have an arbitrary number of
attributes (spatial data) and parameters. For details about the different datasets used in Lumerical's solvers, refer to
the Datasets 1461 page.

Import finite element data into the workspace


The dataset builder works with the data available in the script workspace. Therefore, the data must be imported into
the workspace before the dataset builder is used. In this example, we will import the finite element data from an
HDF5 file. However, other file formats can also be used to import the necessary finite element data.

Download the "readh5file.lsf" script file and the "processdata.h5" HDF5 file. Open the script file in DEVICE and run
it. The script will read the data and save the variables in the workspace. Note that the script prints the units for
doping and dimension in the script prompt. For a detailed discussion on how to read HDF5 files, please refer to the
knowledge base page related to reading HDF5 files 792 .

readh5file;
Unit of doping is cm^-3
Unit of dimension is meter

Below is a screenshot of the script workspace after the data has been imported from the HDF5 file.

Build the unstructured dataset

Click on the build button in the DEVICE interface and select the dataset builder . This will open up the
dataset builder wizard.

Select dimension

To get started, select the dimension of the finite element data. In this example, we will create a 3D structure, so
select the 3D option.

2003 - 2016 Lumerical Solutions, Inc


378 Lumerical Knowledge Base

Select the connectivity matrix

Next select the connectivity matrix. The dataset builder wizard will automatically filter out the irrelevant matrices and
will show only the matrices that have the proper values (integer) and dimension to be used as a connectivity matrix
for 3D finite element data.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 379

Note: Sometimes the imported data may use a '0' based indexing. For such cases, enable the "enforce to 1-
based indexing" option to make the data compatible with the 1-based indexing used by Lumerical's solvers.

Select the vertex matrix / vertex table

The next step would be to select the vertex matrix or the vertex table containing the x, y, and z coordinates of the
vertices. The wizard will again show only the matrices that have the proper dimension for the vertex matrix or the
vertex table based on the selected connectivity matrix. The imported data in this example contains the x, y, z vertex
matrices. They can be loaded on to the appropriate coordinates by using the arrow buttons. Once all the matrices
are loaded, the wizard will show the x, y, z extent in the visualization window at the bottom.

Once the vertex matrices are selected, the wizard will give the option to select the unit of the geometric data,
change the orientation of the geometry by switching the coordinates, and mirror the geometry along any direction.

2003 - 2016 Lumerical Solutions, Inc


380 Lumerical Knowledge Base

Exam ples of axis sw apping


and m irroring.

We will select the unit to be meter as our imported data is in meter (recall the information provided by the script).
Note that for the "meter" selection, the scaling factor is 1e0 since in DEVICE (and also in the optical solvers),
dimension is expressed in meter (SI unit). The user also has the option to select a custom scaling factor for their
geometric data by selecting the custom scaling option from the drop down menu.

Once the unit has been selected, the visualization window will show the proper dimension of the geometry in micron
which is the default dimension for length in the CAD environment.

Note: Please note that the default unit for length in the CAD environment is micron. The user has the option
to change this unit from the "Setting" tab. However, the dimension data saved by DEVICE and the unit for length
that is used for all calculations in the script environment is in meter (SI unit).

Choose parameters

Often, the values (attributes) in an unstructured dataset are saved as functions of some parameters such a bias
voltage, temperature, etc. The next step in the dataset builder wizard is to select the parameters for the dataset
being built. If no parameters are selected then the dataset builder assigns an empty parameter to the dataset for
visualization purpose. Since the data in this example has no parameters, we select the "use default parameter"
option. To learn more about parameters, check the Datasets 1461 page.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 381

Choose attributes

The next step is to select the attributes. Based on the selection of the vertex matrix and the parameters, the
dataset builder wizard will again filter the matrices in the script workspace and only the matrices that have the proper
dimension will be viewed in the window. The user has the ability to select more than one attribute for a single
unstructured dataset. In our imported HDF5 file, we have only one attribute which is the doping profile of the
structure, N. We will select this matrix as our attribute in this step.

2003 - 2016 Lumerical Solutions, Inc


382 Lumerical Knowledge Base

Save unstructured dataset

Finally, the unstructured dataset is ready to be created. To do this, simply choose a name for the dataset and click
"Finish."

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 383

Visualize the unstructured dataset

Once the dataset is created, it can be viewed in the visualization window. To do this, right click on the dataset in
the script workspace and click "Visualize."

Build structures and doping objects


In the final page of the dataset builder wizard, there are options to create structures and doping profiles based on the
unstructured dataset. To use this feature, enable the check boxes for "Create structure" and/or "Create doping
import" (DEVICE only) and then click "Next."

2003 - 2016 Lumerical Solutions, Inc


384 Lumerical Knowledge Base

Create structure

If the "Create structure" option is enabled, the wizard moves to a new window where the structure can be named and
a material can be assigned to it. For our structure, we choose the name "silicon" and the material "Si (Silicon)" from
the drop down menu. Please note that the window also provides the option to override the default mesh order for the
structure. In FDTD (and MODE), this window is different and has different fields to set the material properties
appropriate for the corresponding solvers. A screenshot of the same window in FDTD is also shown below.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 385

Create import doping (in DEVICE only)

If the "Create doping import" option is enabled, the wizard opens up a new window asking for the following inputs, i)
the attributes that will be used to create the import doping objects, ii) the names of the import doping objects, iii) the
units of doping in the used data, and iv) the doping types (n or p type). In this example, we have imported n-type
doping values and the unit of the doping is cm^-3 (recall the information provided by the script). So we will choose
the unit to be cm^-3 and the doping type to be "n." Please note that there is a scaling factor of 1e6 when we choose
the unit to be cm^-3. This is because DEVICE uses a unit of m^-3 (SI unit) while creating the import doping objects.

2003 - 2016 Lumerical Solutions, Inc


386 Lumerical Knowledge Base

Generate script
The final window of the dataset builder also provides the option to create a script file that can perform the same
tasks as the wizard using the choices made at different steps. This feature is very useful in automating the whole
process of building datasets and creating structures and doping objects when generating complex structures from a
large number of imported data. The script file script_out.lsf was created using the dataset builder and it can be used
to perform all the tasks described in the preceding steps.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 387

Test the created structure and doping profile


In order to check whether the structure has been created properly and the doping has been applied to the structure
accurately, we can add a simulation region to the CAD environment to encompass the structure. In order to ensure
that the entire simulation region has a material in it, we can create a background oxide that covers both the structure
and the Device region. We will use the mesh override option to ensure that the oxide only fills the empty spaces
and do not occupy the space where the (silicon) structure is present. Once the oxide and the Device region are in
place, calculate the mesh only and right click on Device region to visualize the grid. The doping (N) plot will show
whether the doping has been applied to the structure accurately.

In the attached "DSB_test.ldev" file, the background oxide and Device region has already been created. In order to
see the resulting structure and doping, download and open the file along with the script_out.lsf script file. Open the
DEVICE file and run the script. Once all the structures are generated, calculate the mesh, and visualize the grid
from the Device region.

2003 - 2016 Lumerical Solutions, Inc


388 Lumerical Knowledge Base

Useful script commands


The following commands can also be used to create an unstructured dataset in the script environment and create
structures and import doping objects. These are the key command used in the script generated by the dataset
builder.

unstructureddataset 1466 , extractstructure 1553 , addimportdope 1549 , importdataset 1590

5.4.2 Groups

The button includes options to add different types of groups of objects. Simulation objects can be
organized into various types of groupings.

Container Group
A container group is the simplest type and can contain all object types as well as other groups. This object acts like
a simple folder allowing the user to collapse and expand its contents in the object tree. Its only user setting is a
position offset in x,y,z for all contained objects.

Note:

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 389

For DEVICE, Container Groups sit under the solver region and cannot contain structures.

Structure Group 389


Structure groups are one step above container groups in that they allow scripting commands of structures
properties. This group contains user-generated variables and scripts that can be utilized to edit and set up parts of
the structure. For example, a script can be set up to insert many circles to create a photonic crystal cavity of a
certain shape and size. See the Structure groups tutorial 389 for more information. Structure groups can contain
other structure groups.

Analysis Group (Optical solvers only) 393


Analysis groups are the most advanced of the three groups. It is a two-part group: setup and analysis. In the setup
portion, it acts like a structure group allowing users to insert and edit structures through a script except that it has
been extended to include all objects. User can create a script that modifies a simulation region span, source
locations and analysis monitor properties. In the analysis portion, it is used to process monitor data and create
output data variables once a simulation has been run. It is possible for analysis groups to contain other groups. As
an example, the top level object 'model' that represents the entire simulation, is an analysis group. Please see
Analysis groups 798 for more examples.

5.4.2.1 Primitives - Structure Groups


Objective
To provide an introduction to structure groups. The structure group shown below and located in the associated file
can be is used in the 2D square 1848 and triangular photonic crystal bandstructure 1850 calculation examples.

Solvers 101

FDTD
FDE
VarFDTD
EME
DEVICE

Associated files
usr_pc_structure_group.fsp

See also
Structures 318
Analysis groups 479
Arrays of objects 356
addstructuregroup (script command) 1536

PC Bandstructure 1843
Object Library 210

Elements of the structure group


A structure group consists of two elements
a group of structure primitives
a setup script to setup or edit the grouped primitives

The figure above shows the 2D photonic crystal array structure group from usr_pc structure
group.fsp. The structure group consists of an array of rods, whose radius, number and spacing is set by
the setup script.

Structure groups are created using the ADD STRUCTURE GROUP option of the Groups button in the

2003 - 2016 Lumerical Solutions, Inc


390 Lumerical Knowledge Base

main toolbar. If you choose to edit a structure group object, then you will see that there are three tabs in the
edit dialog box. The PROPERTIES tab contains input parameters for the script. In the PC structure group the
input parameters are the radius of the rods, the size of the array, the lattice spacing along the two axes of
symmetry, and the angle between the axes. The SCRIPT tab contains the setup script that creates a physical
structure. In the PC structure group, the script sets up the array of rods. The ROTATIONS tab is used to set
the overall orientation of the group. The first two tabs will be discussed in more detail below.

Properties tab
The PROPERTIES tab is only available for structure groups, shown in the screenshot below. It contains all the
input parameters that are needed to set up the physical structure. Custom user property variables may be
added with the ADD button, and removed with the REMOVE button.

There are two sections in the properties tab:

ORIGIN: The location of the origin of the group, in the global coordinate frame.
USER PROPERTIES: User properties are parameters that can be used to set up the structure. Each user
property has a name and a type (number, frequency ect). The user properties can be set manually in the
edit GUI or through script commands.

Script Tab
The SCRIPT tab, shown in the screenshot below, contains the setup script that is used to create and/or edit
structures within the group. The script tab can contain script commands that are used to set up a structure or
edit the properties of structures located within the structure group. The structure group has access to the user
variables defined in the PROPERTIES tab, and can change properties of any objects that are contained in the
group. The script does not have access to objects which are not located in the group, and does not share the
same variable space as the script prompt.

The following buttons and regions are available in the script tab:
SCRIPT: This is where the script commands are written. To find a list of script commands, see the Scripting
Language 1383 section of the Reference Guide.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 391

TEST/SCRIPT OUTPUT: Press the TEST button to run the script. If there are no syntax errors in the script
the SCRIPT OUTPUT will read <script complete>.

Note that:

the user parameters are used in the script to create the array. For example, the user property "radius",
which is highlighted in blue in the screenshot of the PROPERTIES tab is used in the following manner to set
the radius of the rods to 120 nm.
addcircle;
set("radius",radius);

the select and unselect script commands are used in the script. When these are called, only
elements in the group are selected. The scope of the setup script is limited to objects within the group.

the setup script does not have access to the global workspace variables (those defined in the script prompt
or in a script file). The script has its own private variable workspace. In addition, any variables defined in the
setup script cannot be obtained from the script prompt or from a script file.

objects are created relative to the origin of the group. So for example, if the origin was set to (5,0,0) microns
in the VARIABLES tab, then the following commands would add a rectangular structure centered at (10,0,0)
microns, as measured in the global coordinate frame.
addrect;
set("x",5e-6);

the TEST button runs the script and generates the array shown in the image at the top of this page. If there
are no syntax errors in the script, you will see the line <script complete> in the script output. If there is
a syntax error, the location of the error will be given in the script output. An example of an error message is:

2003 - 2016 Lumerical Solutions, Inc


392 Lumerical Knowledge Base

syntax error: prompt line: 38.

the script is also run every time the TEST or OK button is pressed or a property of the structure group is
changed with a script command.

Benefits of using structure groups


Parameter Sweeps:
Structure groups simplify parameter sweeps. The following lines can be used in a script file or script prompt to
loop through one of the lattice parameters of the 2D photonic crystal array. Each time the set script
command is called the setup script runs is executed, editing the array so that it has a the new lattice
parameter. Also, these values can be used as parameter sweep variables or part of the figure of merit in
optimizations.

a(i) = linspace(1e-6,6e-6,4) #array of lattice parameters


for(i=1:length(a)) {
switchtolayout; #edit structure group
select("2D photonic crystal array");
set("ax",a(i));
run; #run simulation
# do something
}

Copying and Pasting (Modularity):


Structure groups can be copied and pasted from one simulation to another using the CTRL+C and CTRL+V
shortcut key combinations on the keyboard.

Simplifies running script files:


Master scripts can be kept shorter by moving some of the script within the group. This can be seen, for
example, in the parameter sweep example. Also, in the script in the analysis groups there is no risk of
unintentionally overwriting variables. Any variables defined in a script file or in the script prompt become
workspace variables, and can be used or overwritten by any script that is run afterwards. In contrast, the
variables in the script of a structure group are not workspace variables, and the structure group script does not
have access to the workspace variables.

Creating a structure group from a script


It is possible to create a structure group from a script, as shown in the following example code:

addstructuregroup;
set("name","cube");
adduserprop("length",2,1e-6);
set("construction group",1);

# define the setup script by setting the 'script' property.


# Note that the entire script must be contained within a set of
# quote characters. Typically single quote characters are used
# to contain the entire string, which allows double quotes to be
# used within the script.
set('script','
addrect;
set("x span",length);
set("y span",length);
set("z span",length);
');

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 393

5.4.2.2 Analysis Groups

Objective
This section provides an introduction to analysis groups. Analysis objects allow you to group monitors (similar to
structure groups) and to analyze that monitor data. For example, a set of monitors can be grouped together to form
a closed box. From the raw monitor data, the group can calculate quantities like cross sections and far field
projections. See build in analysis group for examples 798 .

The files in this section were created using FDTD Solutions, but the same set up can be created using MODE
Solution's propagator. Lumerical provides many built in analysis groups in our object library. Please press this

button to open the online library of analysis groups, or see object library 210 for more details.

Solvers 101

FDTD
FDE
VarFDTD
EME
In this topic
Analysis groups 393
Setup tab 395
Analysis tab 396
Using analysis groups 394

Associated files
usr_transmission_box.fsp

See also
Monitors and analysis groups 637
addanalysisgroup (script command) 1536

Structure groups 389


Object Library 210

Analysis groups are container objects that can contain any simulation object 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, an index monitor, and the script function that calculates absorption from these objects. One can also
automate an optimization/parameter sweep procedure using an analysis group made of structures/simulation
regions/sources/monitors, and use the script function to update each parameter accordingly.

Analysis groups are created using the ADD ANALYSIS GROUP button in the layout editor. If you choose to
edit an analysis object, then you will see that there are two tabs in the edit dialog box
the SETUP TAB contains all the information about the monitors
the ANALYSIS TAB contains the analysis routine and input and output parameters to the analysis routine.

The figure above shows this example simulation file. The box of monitors will be used to measure the power
absorbed in the particle.

There are three parts to this topic: a discussion of the setup tab, a discussion of the analysis tab and a discussion
of how to use the analysis group.

Results returned
Results
Various custom results are returned by the analysis group objects.

2003 - 2016 Lumerical Solutions, Inc


394 Lumerical Knowledge Base

5.4.2.2.1 Using Analysis Groups

Objective
To give a description of how analysis groups can be used.

Solvers 101

FDTD
FDE
VarFDTD
In this topic
Analysis groups 393
Setup tab 395
Analysis tab 396
Using structure groups 394

Associated files
usr_transmission_box.fsp

Some important script functions which can be used in script files or the script prompt are:

set - use to set the values of the parameters


runanalysis - use run the analysis routines
getdata - use to obtain raw matrix data from the monitors. Once an analysis routine has been run, any
variables that were defined in the analysis script AND included in the results section in the VARIABLES tab can be
obtained using the getdata script command
getresults - use to obtain final results packaged in dataset form. Datasets are a way to package the result
data (such as transmitted power) together with any associated information (such as the frequency vector).

Example:
Begin by opening and running the associated simulation, usr_transmission_box.fsp. Select the analysis
group. Then enter the following script commands in the script prompt. The commands disable the option for the
analysis object to create its own plots, runs the analysis routine, gets the results, finally sends them to the
visualizer.
setnamed("trans_box","plot results",0);
runanalysis;
Pabs = getresult("trans_box","T");
?Pabs;
?Pabs.T;
?Pabs.f;
visualize(Pabs);

There one result from this object, the power transmission out of the box (T) as a function of frequency.

You can also access the analysis object results through the graphical interface, as shown below:

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 395

5.4.2.2.2 Setup - Variables and Script tabs

Objective
To provide a description of the setup tab of the Analysis group. The setup tab is where you setup the monitors
contained within the Analysis group. This tab is similar to the Edit Structure group dialog.

Solvers 101

FDTD
FDE
VarFDTD
In this topic
Analysis groups 393
Analysis tab 396
Using analysis groups 394

Using structure groups 394

Associated files
usr_transmission_box.fsp

See also
Structure groups 389

The SETUP tab contains all the information needed to edit and set up monitors that are located in the analysis
group. From the screenshot, you can see that the setup tab is subdivided into two tabs.

Variables Tab
It contains user properties, which are input parameters for the script that is located in the script tab. The
screenshot above shows the VARIABLES TAB for the scattering box analysis group in the
usr_transmission_box.fsp file. The scattering box consists of a rectangular box of power monitors. The
widths of the monitors are given by the user properties x span, y span, z span.

Script Tab
This is where the script commands are written. To find a list of script commands, see the Scripting
Language 1383 .
Note that,

the setup script can only be used to add, delete, edit or get the properties of objects in the group. So for
example, the command selectall; selects all of the monitors located inside of the group, while ignoring

2003 - 2016 Lumerical Solutions, Inc


396 Lumerical Knowledge Base

those outside.

objects are created relative to the origin of the group. So for example, if the origin was set to (5,0,0) microns
in the variables tab, then the following commands would add a power monitor centered at (10,0,0) microns.
addpower;
set("x",5e-6);

the script uses the input parameters to set up the structure (the % operator allows you to use variables with
spaces in their name)
set("x span",%x span%);

the setup script does not have access to workspace variables (those defined in the script prompt or in a
script file). In addition, any variables defined in the setup script cannot be obtained from the script prompt or
from a script file.

the script can be debugged by pressing the TEST button. If there are no syntax errors or break commands
in the script, you will see the line <script complete> in the script output. If there is a syntax error, the
location of the error will be given in the script output. An example of an error message is: syntax error:
prompt line: 38.

the script is also run every time the OK button is pressed or a property of the analysis group is changed
from the command line

it is only possible to edit information in the SETUP tab in layout mode, the edited information will not be
saved.

Usage of the "construction group" option means that objects are added from the script and changes to child
objects will not be saved.

5.4.2.2.3 Analysis - Variables and Script tabs

Objective
To provide a description of the analysis tab of the Analysis group. The Analysis tab is where you specify the
customized analysis commands that will be performed by the group. For more information and examples, see the
Analysis groups 798 .

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 397

Solvers 101

FDTD
FDE
VarFDTD

In this topic
Analysis groups 393
Setup tab 395
Using analysis groups 394
Using structure groups 394
Associated files
usr_transmission_box.fsp

The ANALYSIS tab contains all the information used to analyze the monitor data. It is divided into two sub-tabs.

Variables Tab
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. The screenshot above
depicts the VARIABLES tab for the scattering box analysis group in the usr_transmission_box.fsp file.
The variables tab contains two sets of variables and two buttons.
PARAMETERS: This section contains all the input parameters
RESULTS: The results section includes all the output parameters of the script. Once the analysis script that
has been run, only the parameters that are both defined in the results section and initialized in the analysis
script can be obtained from outside the analysis object.
SAVE ANALYSIS button: It saves any changes made in the analysis tab (only in analysis mode)
RUN ANALYSIS button: It runs the analysis script (only in analysis mode)

Script Tab
It contains a customized analysis routine. The script has access to the input parameters defined in the
variables tab, and can get data from any of the monitors located in the group. However, it cannot get data from
monitors or sources not located inside that group. The script in the analysis groups does not use the global
variable space from the script prompt and script file editor. The results from the script can be obtained in the
script prompt by setting up output parameters in the variables tab.

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 1383 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).

2003 - 2016 Lumerical Solutions, Inc


398 Lumerical Knowledge Base

The SCRIPT tab of an analysis object is shown below, the note highlighted in yellow at the top of the dialog
window says it is now in analysis mode.

Note that,

entries in the ANALYSIS tab can be edited in both the layout and the analysis modes. In layout mode, there
are two buttons in the lower right hand corner of the screen: OK and CANCEL. In analysis mode, 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 results (output parameters) become monitor data, which can be
accessed from the script prompt or a script file in the same manner that monitor data is accessed for simple
monitors. However, the analysis script can only obtain monitor data from the monitors in the group. It is not
possible to select the monitors and get their properties or use variables defined in the setup tab.

the analysis script does not have access to workspace variables (those defined in the script prompt or in a
script file). In addition, any variables defined in the analysis script cannot be obtained from the script prompt
or from a script file.

if the RUN ANALYSIS button is pressed, the ANALYSIS SCRIPT OUTPUT will contain the results of the
analysis script. Once the script has run to completion, if there are no syntax errors or break commands in
the script, you will see the line <script complete> in the script output. If there is a syntax error, the
location of the error will be given in the script output. An example of an error message is: syntax error:
prompt line: 38.

the analysis script makes use of the parameters, for example


if(%make plots%){...}

the results variables are defined in the script, for example


f=getdata("x2","f"); # get frequency data

print variables or comments to the analysis script output by prefacing the lines with the ? operator, the value
computed for the output parameter is printed in the Analysis Script Output portion of the window. If you run
the analysis from the script prompt or a script file, these lines are not printed to the script prompt. For
example, the first comment in the Analysis script output comes from the following line in the analysis code:
?"Projecting in x-y plane";

if you need to stop a script while it is running, press the ESC key on the keyboard. This will stop the

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 399

analysis script from running, and close the edit dialog window.

5.4.3 Optical Simulation Objects


This section describes the simulation objects of optical solvers, such as FDTD, varFDTD, FDE and EME.

Attributes 399

Components 413

Groups (Optical) 388

Simulation (Optical) 414

Analysis 479

Import (Optical) 480

Sources 510

Monitors (Optical) 637

5.4.3.1 Attributes

The button includes options to add the following attributes:

2003 - 2016 Lumerical Solutions, Inc


400 Lumerical Knowledge Base

Index Perturbation: np density & temperature 400

The Index Perturbation grid attribute consists of 'np density' and 'temperature' grid attributes, accounting for the
refractive index changes due to the electron-hole density as well as the temperature. These grid attribute data can
be recorded on a finite-element mesh in a DEVICE simulation.

Permittivity Rotation (FDTD only) 261

The Permittivity Rotation grid attribute allows users to add an arbitrary Euler rotation to the dielectric tensor. The
main parameters are the "angle convention" and the Euler angles theta/phi/psi.

LC Orientation (FDTD only) 255

The LC Orientation grid attribute allows users to specify arbitrary orientations for the Liquid Crystal director. The
main parameters are the angles theta/pi (specifying the LC orientation), and the dielectric tensor will be set
accordingly.

Matrix Transform (FDTD only) 263

The Matrix Transform grid attribute allows users to add an arbitrary unitary matrix to the dielectric tensor. The main
parameter is the unitary matrix U.

5.4.3.1.1 Index Perturbation

Objective
This section provides an instruction how to export electron-hole (np) density and temperature grid attribute recorded
on a finite-element mesh directly from a DEVICE simulation, and import it to FDTD or MODE.

Solvers 101

FDTD
FDE
VarFDTD
CHARGE
HEAT

See also
Charge to index conversion 402
Transferring data between electrical and
optical solvers
importdataset 1590
MZI getting started example 2206

Exporting index perturbation grid attributes from DEVICE

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 401

np density grid attribute


To export np density data, the simulation file should
contain an unstructured data set called charge with
scalar attributes n and p. This would typically be
exported from DEVICE as shown in the Mach Zehnder
2206 example (download MZI.ldev and run the simulation

file using DEVICE). This can be done by right-clicking


the charge monitor and selecting the save data with a
user-specified filename.

temperature grid attribute


The temperature grid attribute data can be exported from
DEVICE using scripts.
Once a simulation has run, click on the 'HEAT' solver
object in the object tree. This will bring up the results
related to the thermal analysis. The dataset called
'thermal' is the one to be export. The script as shown
below can be used to do that:

out = getresult("HEAT","thermal");
matlabsave("filename.mat",out);

Importing index perturbation grid attributes to FDTD or MODE


The procedure for importing the np density and temperature grid attributes are the same. A sample file
(rectChargeWg.mat) to test the np density grid attribute import function can be downloaded from the Mach Zehnder
2206 example.

Import using GUI


1. Add grid attribute object from the attribute menu
2. Right-click the grid attribute object in the object tree
3. Click the import data button and specify the filename

Import using script

2003 - 2016 Lumerical Solutions, Inc


402 Lumerical Knowledge Base

It is also possible to import the np density and temperature grid attributes using scripts. Please refer to
importdataset 1590 for further information.

Creating an index perturbation material model


The np density and temperature attributes contains information about the charge density and temperature for the
specified region in the simulation. These information needs to translated into index changes by creating an index
perturbation material model. Below are steps to be taken to create such material model.

1. Click 'Material' button from the main menu


2. Click 'Add' and select 'index perturbation' material
model
3. Specify the material name
4. In the material properties, select the type(s) of index
perturbation to be included in the material model, ie. np
density and temperature. You can include only one of
them or both. The index of the base material is then
perturbed in accordance with options you choose for the
conversion of np density / temperature to index changes.

There are two conversion options available for each grid


attributes:
'Drude' and 'Soref' for the np density and 'linear sensitivity'
and 'table of values' for temperature . For more
information about Drude and Soref modesl for np Density
material, please visit Charge to index conversion 402 .

Note: Parameters for the models


These parameters are material and frequency dependent, the default parameters are set for silicon at 1.55 um.

5.4.3.1.1.1 Charge to index conversion


This section describes the models used to calculate perturbation in refractive index for optical simulations in MODE
Solutions and FDTD Solutions based on imported charge density data from DEVICE simulations.

Solvers 101

FDTD
FDE
VarFDTD
CHARGE
Associated files
WgImport.fsp
WgImport.lms
rectChargeWg.ldf
rectCharge.ldf
rectCharge_plasma.ldf

See also
Reference Guide - Script functions
1383

importdataset 1590
matlabsave 1642
MZI getting started example 2206
(DEVICE)
Metamaterials 1984 (FDTD Solutions)

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 403

Theory behind the generalized Drude (Plasma) model


From the Plasma-Drude model ( Henry et al. 410 ), the overall refractive index, that is, the unperturbed index plus the
change in the index can be calculated from overall carrier density as follows:


e2 n p
em - * + *
w me w + i e mh w + i e
me mh
n + ik =
e0

where electrons and holes are treated as purely free carriers and n,p are the carrier densities, and m is the
permittivity of the unperturbed material, me/h is the effective mass of electrons/holes, and e/h is the mobility of
electrons/holes. Note that in this model, the coefficients are frequency dependent. For cases where the electron
and hole mobility values are large, the equation reduces to,

e2 n p
em - * + *
w2 me m h
n + ik =
e0

Theory behind the Drude expansion model


An expansion of the above Drude model at a particular wavelength assuming complex refractive indices can also be
calculated from the change in carrier density for most semiconductors as follows:

e 2 l2 DN e DN h
Dn = - 2 2 * + *
8 p c e 0 mce
n mch

e 3 l3 DN e DN h
Dn = - 2 3 2 +
*
* 2
4 p c e 0 n mce m e mch m h

where,
e is the electronic change,
0 is the permittivity of free space,
n is the index of the unperturbed material,
m is the effective mass of holes/electrons and u is the electron/hole mobility.
m*ce/h is the conductivity effective mass of electrons/holes
e/h is the electron/hole mobility.
Ne/h is the change in electron/hole carrier density.
Note that in this model, the coefficients are wavelength dependent.

Theory behind the silicon model


The above wavelength dependant model works for most semiconductors; however, there is another model to more
accurately describe the effect of carrier density on refractive index in Silicon by Soref et al 410 . In this model, the
coefficients are different depending on the wavelength.

a = (d a_Ap)(DP)d a_Ep + (d a_An)(DN)d a_En

2003 - 2016 Lumerical Solutions, Inc


404 Lumerical Knowledge Base

n = (dn_Ap)(DP)dn_Ep + (dn_An)(DN)dn_En

where,
is the absorption coefficient variation in cm-1
n is the refractive index change
P is the hole concentration change in cm-3
N is the electron concentration change in cm-3
d_Ap is 6e-18 for 1.55 um
d_An is 8.5e-18 for 1.55 um
dn_Ap is -8.5e-18 for 1.55 um
dn_An is -8.8e-22 for 1.55 um
Note that in this model, the coefficients are wavelength dependent.

Structure group for conversion of carrier density to refractive index


change
A .ldf file will contain the carrier density data calculated from DEVICE which will be imported into the structure.
Depending on which product you use, FDTD or MODE Solutions, open the WgImport.fsp or WgImport.lms. The
WgImport object has been created and defined in this file. Make sure you also download the ldf file(s). The same
geometry as the one set up in the original DEVICE simulation has to be set up in MODE/FDTD, except that an
import (n,k) object is used for the waveguide section. The structure group will take the carrier density information and
calculate the corresponding changes in the real and imaginary parts of refractive index of the material according to
one of the above formulations. In the DEVICE simulation, the voltage is swept and the corresponding carrier density
change is calculated which in turn results in a change in the index. The .ldf file will include x_data, y_data, z_data,
dn_data, dp_data and v.

The Plasma (Drude) model:


Right click on the ChargeToIndex_Drude objects in either the MODE or FDTD Solutions project files and click Edit.
In the window that opens, under the properties tab, several variables can be defined by the user.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 405

V is
the
inde
x of
the
volta
ge
arra
y
over
whic
h
the
swe
ep
in
DEV
ICE
was
don
e.
file
na
me
is
set
to
the
nam
e of
the
.ldf
file
save
d in
the
DEV
ICE
scri
pt.
lam
bda
is
the
wav
elen
gth
of
inter
est
(in
um
unit
s).
mak
e_pl
ots
is

2003 - 2016 Lumerical Solutions, Inc


406 Lumerical Knowledge Base

set
to 1
to
gen
erat
e
plot
s of
dopi
ng
den
sitie
s
and
the
imp
orte
d
n,k
valu
es.
mch
,mc
e
effec
tive
mas
s of
hole
s/
elec
tron
s
ue,
uh
carri
er
mob
ility
wav
egu
ide
n/k
are
the
nom
inal
inde
x
and
abs
orpti
on
coeff
icien
t
valu
es

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 407

in
silic
on
at
wav
elen
gth
lam
bda.

Under the script tab of the ChargeToIndex_Drude, you will find the script that loads the .ldf file, uses the
wavelength and the nominal n value to calculate the coefficients in the above equation and from that, calculates the
real and imaginary parts of refractive index and creates an import (n,k) object with (n,k) values resulting from the bias
value that corresponds to index V.

Click "test", to make sure the object is correctly created from the .ldf file.

The structure is now ready to be analyzed in either MODE or FDTD Solutions for further characterization. For an
example of the full process from the calculation of charge in DEVICE to the calculation of index change in MODE
using the Drude-plasma model please see the Metamaterial application example in the DEVICE knowledgebase.

The Drude expansion model:


Right click on the WgImport_Drude objects in either the MODE or FDTD Solutions project files and click Edit. In the
window that opens, under the properties tab, several variables can be defined by the user.

2003 - 2016 Lumerical Solutions, Inc


408 Lumerical Knowledge Base

V is
the
inde
x of
the
volta
ge
arra
y
over
whic
h
the
swe
ep
in
DEV
ICE
was
don
e.
file
na
me
is
set
to
the
nam
e of
the
.ldf
file
save
d in
the
DEV
ICE
scri
pt.
lam
bda
is
the
wav
elen
gth
of
inter
est
(in
um
unit
s).
mak
e_pl
ots
is

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 409

set
to 1
to
gen
erat
e
plot
s of
dopi
ng
den
sitie
s
and
the
imp
orte
d
n,k
valu
es.
mch
,mc
e
effec
tive
mas
s of
hole
s/
elec
tron
s
ue,
uh
elec
tron/
hole
mob
ility
wav
egu
ide
n/k
are
the
nom
inal
inde
x
and
abs
orpti
on
coeff
icien
t
valu

2003 - 2016 Lumerical Solutions, Inc


410 Lumerical Knowledge Base

es
in
silic
on
at
wav
elen
gth
lam
bda.

Under the script tab of the WgImport_Drude object, you will find the script that loads the .ldf file, uses the
wavelength to calculate the coefficients in the above equation and from that, calculates the change in refractive index
and absorption coefficients and creates an import (n,k) object with (n,k) values resulting from the bias value that
corresponds to index V.

Click "test", to make sure the object is correctly created from the .ldf file.

The structure is now ready to be analyzed in either MODE or FDTD Solutions for further characterization.

The Silicon model


Right click on the ChargeToIndex_Silicon objects in either the MODE or FDTD Solutions project files and click Edit.
In the window that opens, under the properties tab, several variables can be defined by the user.

V is the index of the voltage array over which the sweep in DEVICE was done.
The coefficients for the equation to convert the change in carrier density to change in (n,k)
are defined as follows (see reference 1);

a = (d a_Ap)(DP)d a_Ep + (d a_An)(DN)d a_En


n = (dn_Ap)(DP)dn_Ep + (dn_An)(DN)dn_En
filename is set to the name of the .ldf file saved in the DEVICE script.
lambda is the wavelength of interest (in um units).
make_plots is set to 1 to generate plots of doping densities and the imported n,k values.
waveguide n/k are the nominal index and absorption coefficient values in silicon at
wavelength lambda.

Under the script tab of the ChargeToIndex_Silicon object, you will find the script that loads the .ldf file, uses the
aforementioned coefficients to calculate the change in refractive index and absorption coefficients and creates an
import (n,k) object with (n,k) values resulting from the bias value that corresponds to index V.

Click "test", to make sure the object is correctly created from the .ldf file.

The structure is now ready to be analyzed in either MODE or FDTD Solutions for further characterization. For an
example of the full process from the calculation of charge in DEVICE to the calculation of index change in MODE
using the Silicon model please see the MZI getting started example 2206 .

References
1. Henry, C. H.; Logan, R. A.; Bertness, K. A. Journal of Applied Physics, vol. 52, (1981), p. 4457-4461.
2. R. A. Soref and B. R. Bennett, SPIE Integr. Opt. Circuit Eng. 704, 32 (1987).

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 411

5.4.3.1.1.2 Temperature to index conversion


This section describes the models used to calculate perturbation in refractive index for optical simulations in MODE
Solutions and FDTD Solutions based on imported temperature profile data from DEVICE simulations.

Solvers 101

FDTD
FDE
VarFDTD
HEAT
Associated files

See also
Index Perturbation 400
Charge to index conversion 402

Linear sensitivity model


The simpler model used to calculate index perturbation due to temperature variation assumes a linear dependency.
The complex refractive index of a material at temperature T is given by,

n + ik = (n ref + Dn) + i (k ref + Dk )

where, n is the real and k is the imaginary part of the refractive index at temperature T, nref is the real and k ref is the
imaginary part of the unperturbed refractive index at temperature Tref , and n is the change in the real part and k is
the change in the imaginary part of the refractive index. The values of n and k are given by,

dn
Dn = (T - Tref )
dT
dk
Dk = (T - Tref )
dT

where, dn/dT and dk/dT are the rate of change in the real and imaginary part of refractive index, respectively. In the
linear sensitivity model, the rate of change in refractive index is assumed to be constant at reference temperature
Tref and is used as a material property in the "index perturbation" type material.

2003 - 2016 Lumerical Solutions, Inc


412 Lumerical Knowledge Base

Nonlinear (tabular) model


The second model available for modeling index perturbation due to temperature variation allows for the modeling of
nonlinear sensitivity. The nonlinear variation of refractive index can be given as an input in tabular form to the "index
perturbation" type material. The effective index of the material at temperature T is then given by,

n + ik = (n ref + Dn) + i (k ref + Dk )

where, n is the real and k is the imaginary part of the refractive index at temperature T, nref is the real and k ref is the
imaginary part of the unperturbed refractive index at temperature Tref (300 K for the materials in the default material
database), and n is the change in the real part and k is the change in the imaginary part of the refractive index.
For a nonlinear temperature sensitivity, n and k are functions of temperature T.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 413

NOTE: At T = Tref , the values of n and k should be zero.

5.4.3.2 Components

The button includes options to open the object library 210 with a few preset categories. Components
are more complicated structures that are built from one or several primitives. Common parameters are available to be
adjusted. These pre-built Structure groups 389 enable users to quickly setup common (but often difficult to
construct), simulation environments.

The preset categories are:

Extruded polygons 318

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 are connected with straight lines. These shapes are
extruded in the z dimension.

Integrated optics 318

This category includes various shapes of waveguide paths. For 3D simulations, the sidewalls can be vertical or
angled.

Photonic crystals 318

2003 - 2016 Lumerical Solutions, Inc


414 Lumerical Knowledge Base

Photonic crystals are optical nanostructures that are either rectangular or hexagonal periodic. This category includes
PC waveguides and PC cavities.

Gratings 318

Gratings are a regularly spaced set of elements which can have polarizing, reflecting, or coupling effects.

Surface ( FDTD only) 334

This category contains examples of surface objects defined by equations.

More choices 353

There are many more categories of components available that are constantly being updated.

5.4.3.3 Simulation (Optical)


Simulation objects are used to define simulation parameters like boundary conditions and mesh size. More
information about the solver algorithms can be found in the Solvers 101 section.

FDTD solver 415

The 2D/3D FDTD solver region defines many important simulation parameters including simulation volume, boundary
conditions, simulation time, and mesh size.

FDE solver 420

The 1D/2D FDE eigenmode solver region defines many important simulation parameters including simulation volume,
boundary conditions, and mesh size.

varFDTD solver 425

The 2.5D varFDTD solver region defines many important simulation parameters including simulation volume,
boundary conditions, simulation time, effective index, and mesh size.

EME solver 432

The 2D/3D bi-directional EME solver region defines many important simulation parameters including simulation
volume, number of cells, boundary conditions, and mesh size.

Mesh override region 440

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 in the Simulation region. 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.

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 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.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 415

5.4.3.3.1 Simulation - FDTD

Edit simulation tabs


General tab
The simulation region contains three settings:
DIMENSION: The dimension of the simulation region (2D or 3D).
BACKGROUND INDEX: The refractive index of the surrounding, background medium in the simulation
region.
SIMULATION TIME: The maximum duration of the simulation to be performed. The actual simulation may be
shorter if the autoshutoff criteria are satisfied before this maximum simulation time is exceeded. For more
information about how to choose the simulation time see set the simulation region 1724 section of the
introduction in the Getting Started guide.

Geometry tab
X, Y, Z: The center position of the simulation region
X MIN, X MAX: X min, X max position
Y MIN, Y MAX: Y min, Y max position
Z MIN, Z MAX: Z min, Z max position
X SPAN, Y SPAN, Z SPAN: X, Y, Z span of the simulation region

Mesh setting tab


Mesh type
Three types of mesh generation algorithms are available, as described below

Auto non-uniform (default):


A non-uniform mesh is automatically generated based on the mesh accuracy slider bar. It is strongly
recommended to start with a mesh accuracy of 1-2 for initial simulations to make the simulations run
quickly. Higher mesh accuracies can be used for convergence testing if necessary.

The MESH ACCURACY parameter is an integer from 1-8, where 1 is low accuracy, and 8 is high
accuracy (smaller mesh). Many factors go into the meshing algorithm, including source wavelength,
material properties and the structure geometry. The number of mesh points per wavelength (ppw) is a
major considerations for the meshing algorithm. Accuracy 1 corresponds to a target of 6 ppw. Acc 2 -
>10 ppw, Acc 3 ->14ppw, and so on, in increments of 4 ppw per point on the slider bar. It is important
to remember that wavelength is inversely proportional to the refractive index. In high index materials,
the effective wavelength is smaller, meaning that the meshing algorithm will use a smaller mesh in
high index materials.

Custom non-uniform:
This setting allows the user to additional options to 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. If a
mesh override region is used in conjunction with this option, the override region will force the mesh
size everywhere, not just within the override region (afterall, the mesh is uniform).

Mesh Refinement
Mesh Refinement: Mesh refinement can give sub-cell accuracy for a simulation. See the Mesh refinement
options 448 page for more information.

2003 - 2016 Lumerical Solutions, Inc


416 Lumerical Knowledge Base

Time Step:
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/Propagator simulation. This is determined by the values of the spatial grid to
ensure numerical stability and cannot be directly set by the user.

Minimum mesh step settings


Min Mesh Step: The MIN MESH STEP sets the absolute minimum mesh size for the entire solver region. This
overrides all other mesh size settings, including mesh override regions.

Boundary conditions tab


The boundary conditions that are supported by FDTD/MODE Solutions 101 are listed below.

PML 460

Perfectly matched layer (PML)1 boundaries absorb electromagnetic waves incident upon them. They
essentially model open (or reflectionless) boundaries. In FDTD and varFDTD simulation regions, the user can
directly specify all the parameters that control their absorption properties including the number of layers. To
facilitate the selection of PML parameters, a number of profiles (or predefined sets of parameters) are available
under the boundary conditions tab. In most simulation scenarios, the user only needs to choose one of the
predefined profiles and fine tune the number of layers. PML boundaries perform best when the surrounding
structures extend completely through the boundary condition region. This will be the default behavior of
structures whether or not they were drawn to end inside or outside the PML region.
1 J. P. Berenger, Perfectly Matched Layer (PML) for Computational
Electromagnetics. Morgan & Claypool Publishers, 2007.

Metal 464

Metal boundary conditions are used to specify boundaries that behave as a Perfect Electric Conductor (PCE).
The component of the electric field parallel to a metal (PCE) boundary is zero; the component of the magnetic
field H perpendicular to a metal (PEC) boundary is also zero. Metal boundaries are perfectly reflecting,
allowing no energy to escape the simulation volume along that boundary. In the FDE solver, metal BC is the
default setting 464 .

PMC
Perfect Magnetic Conductor (PMC) boundary conditions are the magnetic equivalent of the metal (PCE)
boundaries. The component of the magnetic field H parallel to a PMC boundary is zero; the component of the
electric field perpendicular to a PMC boundary is also zero.

Periodic 478

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.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 417

Bloch (FDTD/varFDTD) 471

Bloch BC should be used when the structures and the EM fields are periodic, but a phase shift exists between
each period. Bloch boundary conditions are used in FDTD Solutions and propagator simulations 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.

note: if you choose BFAST plane wave source 590 , the Bloch BCs will be automatically overridden and use its
built_in boundary conditions.

Symmetric / Anti-Symmetric 466

Symmetric/anti-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. On the other hand, antisymmetric
boundaries are anti-mirrors for the electric field, and mirrors for the magnetic field. Careful consideration must
be given to whether symmetric or anti-symmetric 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 anti-symmetric boundary conditions can be
found in Choosing between symmetric and anti-symmetric BCs 466 .

ALLOW SYMMETRY ON ALL BOUNDARIES: Allows symmetric boundary conditions with periodic structures
(this option is not available in the boundary condition tab of mode sources and mode expansion monitors).

Boundary condition tab options

2003 - 2016 Lumerical Solutions, Inc


418 Lumerical Knowledge Base

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, k x,y ,z are defined in units of m-1. This is generally more convenient for injection of plane
waves on angles.
KX, KY, KZ: The wavevector setting in the x, y and z direction for the Bloch boundary in the units specified
above.
PML SETTINGS - TYPE: Sets the type of PML boundary formulation to be used. The options are a PML
based on a stretched coordinate formulation or a PML based on a uniaxial anisotropic material formulation
(legacy option).
PML SETTINGS - SAME SETTINGS ON ALL BOUNDARIES: When unchecked, this option allows users to
set different PML settings for the XMAX, YMIN, YMAX, ZMIN and ZMAX boundaries. When checked, the
same PML settings are used for all boundaries.
PML SETTINGS - TABLE: Sets the PML profile to be used on each boundary. The section on PML
boundary conditions 460 provides a brief description of the intended use of each profile.
PML SETTINGS - EXTEND STRUCTURE THROUGH PML: see extending structures through PML 368 .

Advanced options tab

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 419

WARNING: This tab includes options which should only be changed if you are
quite familiar with the meshing algorithm and techniques used.

Simulation bandwidth
SET SIMULATION BANDWIDTH: By default, the simulation bandwidth is inherited from the source
bandwidth. Enabling this option allows the simulation bandwidth to be set directly. Simulation bandwidth
affects many aspects of the simulation including mesh generation, material fits, monitor frequency ranges,
etc.

Mesh settings
FORCE SYMMETRIC X, Y, Z MESH: This will force a symmetric mesh about the x, y or z axis. When this
option is enabled, the meshing algorithm ONLY considers objects in the positive half of the simulation
region. The mesh in the negative half is simply a copy of the positive half mesh. All physical structures and
mesh override regions in the negative half will not be considered by the meshing algorithm. This option also
forces a mesh point at the center of the simulation region. Forcing a symmetric mesh ensures that the
mesh does not change when going from a simulation with symmetry to a simulation without symmetry.
OVERRIDE SIMULATION BANDWIDTH FOR MESH GENERATION: This option allows the simulation mesh
to be generated following a custom wavelength or frequency range, rather than the simulation bandwidth
(with is inherited from the source by default).
SNAP PEC TO YEE CELL BOUNDARY: This option forces any structures defined as PEC to have
interfaces that are aligned with the Yee cell boundaries. This ensures that all electric field components at
the PEC interface are tangential to the interface. This setting avoids complications that can result in some
circumstances if normal electric field components are set to 0 at a PEC interface. To achieve this, the
specified PEC interface may be shifted by as much as dx/2 when creating the simulation mesh, where dx is
the size of the Yee cell.

Miscellaneous
ALWAYS USE COMPLEX FIELDS: This checkbox forces the algorithm to use complex fields during
simulation. This will result in slower simulation times and increased memory requirements and should only
be used when necessary. By default, complex fields are only used when Bloch boundary conditions are
present.

2003 - 2016 Lumerical Solutions, Inc


420 Lumerical Knowledge Base

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.

Auto shutoff
USE EARLY SHUTOFF: This will automatically end the simulation when most of the energy has left the
simulation volume.
AUTO SHUTOFF MIN: The simulation will end when the total energy in the simulation volume drops to this
fraction of the maximum energy injected. The simulation data will automatically save.
USE DIVERGENCE CHECKING: This will automatically end the simulation when the total energy in the
simulation volume is this many times larger than maximum energy injected.
AUTO SHUTOFF MAX: The simulation will end when the total energy in the simulation volume rises to this
many times the maximum energy injected. The simulation data will automatically save.
DOWN SAMPLE TIME: Check the auto shutoff conditions every down sample time number of dT time steps

Parallel engine options


SET PROCESS GRID: The division of the simulation volume into sub-regions, which are then run as a
separate processes, can be manually set for more efficient computation. Better performance will be
achieved when the regions are square e.g. for 20 regions, 5x2x2 is usually more efficient than 20x1x1.
NX, NY, NZ: The process layout for parallel simulations.
SET DEFAULTS: Can be used to reset the settings back to their original default settings.

Results returned
Grid
X, Y, Z: The mesh position vectors for the x, y and z directions.

Simulation status
STATUS: Current status of the simulation, denoted by 0 for simulation in layout mode, 1 for run to full
simulation time, 2 for run to autoshutoff, or 3 for diverged.

Note:
These results can be copied to the script workspace using the function getresult 1647 with "FDTD" as the monitor
name. For example:
stat = getresult("FDTD","status");

5.4.3.3.2 Simulation - FDE

Edit simulation tabs


General tab
BACKGROUND INDEX: The refractive index of the surrounding, background medium in the simulation
region.
SOLVER TYPE: Can choose either a 1D or 2D mode solver.

Geometry tab
X, Y, Z: The center position of the simulation region
X MIN, X MAX: X min, X max position
Y MIN, Y MAX: Y min, Y max position
Z MIN, Z MAX: Z min, Z max position
X SPAN, Y SPAN, Z SPAN: X, Y, Z span of the simulation region

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 421

The availability is based on the SOLVER TYPE

Mesh setting tab


A uniform mesh is applied to the entire simulation volume, regardless of any material properties. If a mesh
override region is used in conjunction, the simulation region may become non-uniformly meshed.

Mesh definition
There are two options: NUMBER OF MESH CELLS or MAXIMUM MESH STEP

Number of mesh cells


DX, DY, DZ: Maximum mesh step

Maximum mesh step


MESH CELLS X, MESH CELLS Y, MESH CELLS Z: Number of mesh cells without a mesh override region
ACTUAL NUMBER OF MESH CELLS USED: The actual number of mesh cells with a mesh override region

Minimum mesh step settings


MIN MESH STEP: Sets the minimum mesh step for the entire solver region including the mesh override
regions.

Mesh grading
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).

Boundary conditions tab


The boundary conditions that are supported by FDTD/MODE Solutions 101 are listed below.

PML 460

Perfectly matched layer (PML)1 boundaries absorb electromagnetic waves incident upon them. They
essentially model open (or reflectionless) boundaries. In FDTD and varFDTD simulation regions, the user can
directly specify all the parameters that control their absorption properties including the number of layers. To
facilitate the selection of PML parameters, a number of profiles (or predefined sets of parameters) are available
under the boundary conditions tab. In most simulation scenarios, the user only needs to choose one of the
predefined profiles and fine tune the number of layers. PML boundaries perform best when the surrounding
structures extend completely through the boundary condition region. This will be the default behavior of
structures whether or not they were drawn to end inside or outside the PML region.
1 J. P. Berenger, Perfectly Matched Layer (PML) for Computational
Electromagnetics. Morgan & Claypool Publishers, 2007.

Metal 464

Metal boundary conditions are used to specify boundaries that behave as a Perfect Electric Conductor (PCE).
The component of the electric field parallel to a metal (PCE) boundary is zero; the component of the magnetic
field H perpendicular to a metal (PEC) boundary is also zero. Metal boundaries are perfectly reflecting,
allowing no energy to escape the simulation volume along that boundary. In the FDE solver, metal BC is the
default setting 464 .

2003 - 2016 Lumerical Solutions, Inc


422 Lumerical Knowledge Base

PMC
Perfect Magnetic Conductor (PMC) boundary conditions are the magnetic equivalent of the metal (PCE)
boundaries. The component of the magnetic field H parallel to a PMC boundary is zero; the component of the
electric field perpendicular to a PMC boundary is also zero.

Periodic 478

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 (FDTD/varFDTD) 471

Bloch BC should be used when the structures and the EM fields are periodic, but a phase shift exists between
each period. Bloch boundary conditions are used in FDTD Solutions and propagator simulations 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.

note: if you choose BFAST plane wave source 590 , the Bloch BCs will be automatically overridden and use its
built_in boundary conditions.

Symmetric / Anti-Symmetric 466

Symmetric/anti-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. On the other hand, antisymmetric
boundaries are anti-mirrors for the electric field, and mirrors for the magnetic field. Careful consideration must
be given to whether symmetric or anti-symmetric 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 anti-symmetric boundary conditions can be
found in Choosing between symmetric and anti-symmetric BCs 466 .

ALLOW SYMMETRY ON ALL BOUNDARIES: Allows symmetric boundary conditions with periodic structures
(this option is not available in the boundary condition tab of mode sources and mode expansion monitors).

Material tab

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 423

Mesh Refinement:
Mesh refinement can give sub-cell accuracy for a simulation. See the Mesh refinement options 448 page for
more information.

FIT MATERIALS WITH MULTI-COEFFICIENT MODEL


(For sampled material data) When MODE Solutions solves for modes, it uses material data that is obtained
from a linear interpolation from the closest data points. This means that when a frequency sweep is run, the
material data used can be discontinuous in time. This is especially problematic for properties such as
dispersion which depends on a second derivative of the refractive index as a function of wavelength.

If you check this option, you can choose to fit two types of materials with a multi-coefficient model. Here are
the options that are available when the checkbox is checked:

Fit sampled materials: By default this is checked. Sampled material data will be fit with a smooth multi-
coefficient material model.
Fit analytic materials: Check this option to fit a multi-coefficient model to the analytic material data. The
only reason to fit analytic models with a multi-coefficient model is to compare MODE results with FDTD.
FDTD simulations must fit a multi-coefficient model to the analytic data in order to run simulations, but the
multi-coefficient model may not be able to fit the analytic model perfectly.
Wavelength min/max or center/span: Set bandwidth over which to apply the fit.

Impedance tab

2003 - 2016 Lumerical Solutions, Inc


424 Lumerical Knowledge Base

CALCULATE CHARACTERISTIC IMPEDANCE


By default, this option is disabled. When enabled, the Z0 characteristic impedance result will be calculated for
each of the modes which are found using the specified integration region settings. For more information about
the characteristic impedance calculation, see Power and impedance integration 755 .

When the CALCULATE CHARACTERISTIC IMPEDANCE box is checked, the following settings are available:

INTEGRATION SHAPE: Options include circular, and rectangular.


X1, X2, Y1, Y2 (or Z1, Z2) (valid for rectangular integration): defines the vertices of a rectangle over which the
characteristic impedance Z0 is integrated
CENTER X, CENTER Y (or CENTER Z), RADIUS (valid for circular integration): defines the center and radius
of a circle over which the characteristic impedance is integrated

Advanced options tab


WARNING: This tab includes options which should only be changed if you are
quite familiar with the meshing algorithm and techniques used .

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 425

Mesh settings
FORCE SYMMETRIC X, Y, Z MESH: This will force a symmetric mesh about the x, y or z axis. When this
option is enabled, the meshing algorithm ONLY considers objects in the positive half of the simulation
region. The mesh in the negative half is simply a copy of the positive half mesh. All physical structures and
mesh override regions in the negative half will not be considered by the meshing algorithm. This option also
forces a mesh point at the center of the simulation region. Forcing a symmetric mesh ensures that the
mesh does not change when going from a simulation with symmetry to a simulation without symmetry.

PML settings
PML KAPPA: The normalized imaginary electric and magnetic conductivity used in the PML boundaries.
PML SIGMA: The maximum normalized electric and magnetic conductivity used in the PML boundaries.
PML LAYERS: The number of cells which are used for PML boundary conditions. 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.

SET DEFAULTS: This button resets the parameters of the advanced settings tab to the default settings.

5.4.3.3.3 Simulation - varFDTD

Edit simulation tabs


General tab
BACKGROUND INDEX: The refractive index of the surrounding, background medium in the simulation
region.
SIMULATION TIME: The maximum duration of the simulation to be performed. The actual simulation may be
shorter if the autoshutoff criteria are satisfied before this maximum simulation time is exceeded. For more
information about how to choose the simulation time see set the simulation region 1724 section of the
introduction in the Getting Started guide.

Geometry tab
X, Y, Z: The center position of the simulation region
X MIN, X MAX: X min, X max position
Y MIN, Y MAX: Y min, Y max position
Z MIN, Z MAX: Z min, Z max position
X SPAN, Y SPAN, Z SPAN: X, Y, Z span of the simulation region

Effective index tab


Slab mode position
The x,y coordinate of the single point (core region) used by the effective index method to calculate the
reference vertical slab mode used to generate the effective materials.

Effective index method:The method used to calculate the effective index of the waveguide slab, see
Propagator Physics 107 in the Solver section for more information on each method.
CAN OPTIMIZE MESH ALGORITHM FOR EXTRUDED STRUCTURES: This option allows the meshing
algorithm to run much more efficiently when the geometry is made of objects that are extruded along the z
axis with purely vertical sidewalls. Note that if the geometry contains more complex shapes (ie. when the
sidewalls are not purely vertical) this option must be unchecked.
CLAMP VALUES TO PHYSICAL MATERIAL PROPERTIES: The effective index treatment may lead to
generated materials that have properties that are unphysical (for example, having an artificial negative
imaginary index). This checkbox provides the option of restricting the range of generated indices to the min/
max values defined by the physical material properties of the original materials.

2003 - 2016 Lumerical Solutions, Inc


426 Lumerical Knowledge Base

Simulation bandwidth
NARROWBAND: the material properties are only taken at the center frequency of the simulation. This
option should be used for single frequency simulations (or when the frequency range of interest is very
narrow), since only a single (n,k) value is generated over the entire frequency span of the simulation.
BROADBAND: a dispersive material model will be created to fit the effect index materials based on the
following settings:
- maximum number of materials: the maximum number of different materials that are created from the
effect index method
- number of samples: the number of sample points to use for fitting the materials
- max coefficients, fit tolerance, imaginary weight, improve stability, make fit passive: parameters used to
fit the generated sample data (see Material explorer) 220

Test
The x,y coordinates of the test points used to study the materials created in those regions. The generated test
materials corresponding to each test point can be accessed in the material explorer.

Polarization
The polarization of the slab mode. If "user select" is chosen, the "Select mode" button is enabled. This button
will open a mode solver to calculate the slab modes for the user to choose from.

Plot
The type of field components, refractive index (real or imaginary) to plot.
PLOT CURRENT MODE: Plot the current mode.
PLOT IN NEW WINDOW: Plot the current mode in a new window.

Mesh setting tab


Mesh type
Three types of mesh generation algorithms are available, as described below

Auto non-uniform (default):


A non-uniform mesh is automatically generated based on the mesh accuracy slider bar. It is strongly
recommended to start with a mesh accuracy of 1-2 for initial simulations to make the simulations run
quickly. Higher mesh accuracies can be used for convergence testing if necessary.

The MESH ACCURACY parameter is an integer from 1-8, where 1 is low accuracy, and 8 is high
accuracy (smaller mesh). Many factors go into the meshing algorithm, including source wavelength,
material properties and the structure geometry. The number of mesh points per wavelength (ppw) is a
major considerations for the meshing algorithm. Accuracy 1 corresponds to a target of 6 ppw. Acc 2 -
>10 ppw, Acc 3 ->14ppw, and so on, in increments of 4 ppw per point on the slider bar. It is important
to remember that wavelength is inversely proportional to the refractive index. In high index materials,
the effective wavelength is smaller, meaning that the meshing algorithm will use a smaller mesh in
high index materials.

Custom non-uniform:
This setting allows the user to additional options to 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. If a
mesh override region is used in conjunction with this option, the override region will force the mesh
size everywhere, not just within the override region (afterall, the mesh is uniform).

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 427

Mesh Refinement
Mesh Refinement: Mesh refinement can give sub-cell accuracy for a simulation. See the Mesh refinement
options 448 page for more information.

Time Step:
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/Propagator simulation. This is determined by the values of the spatial grid to
ensure numerical stability and cannot be directly set by the user.

Minimum mesh step settings


Min Mesh Step: The MIN MESH STEP sets the absolute minimum mesh size for the entire solver region. This
overrides all other mesh size settings, including mesh override regions.

Boundary conditions tab


The boundary conditions that are supported by FDTD/MODE Solutions 101 are listed below.

PML 460

Perfectly matched layer (PML)1 boundaries absorb electromagnetic waves incident upon them. They essentially
model open (or reflectionless) boundaries. In FDTD and varFDTD simulation regions, the user can directly
specify all the parameters that control their absorption properties including the number of layers. To facilitate
the selection of PML parameters, a number of profiles (or predefined sets of parameters) are available under the
boundary conditions tab. In most simulation scenarios, the user only needs to choose one of the predefined
profiles and fine tune the number of layers. PML boundaries perform best when the surrounding structures
extend completely through the boundary condition region. This will be the default behavior of structures whether
or not they were drawn to end inside or outside the PML region.
1 J. P. Berenger, Perfectly Matched Layer (PML) for Computational
Electromagnetics. Morgan & Claypool Publishers, 2007.

Metal 464

Metal boundary conditions are used to specify boundaries that behave as a Perfect Electric Conductor (PCE).
The component of the electric field parallel to a metal (PCE) boundary is zero; the component of the magnetic
field H perpendicular to a metal (PEC) boundary is also zero. Metal boundaries are perfectly reflecting, allowing
no energy to escape the simulation volume along that boundary. In the FDE solver, metal BC is the default
setting 464 .

PMC
Perfect Magnetic Conductor (PMC) boundary conditions are the magnetic equivalent of the metal (PCE)
boundaries. The component of the magnetic field H parallel to a PMC boundary is zero; the component of the
electric field perpendicular to a PMC boundary is also zero.

2003 - 2016 Lumerical Solutions, Inc


428 Lumerical Knowledge Base

Periodic 478

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 (FDTD/varFDTD) 471

Bloch BC should be used when the structures and the EM fields are periodic, but a phase shift exists between
each period. Bloch boundary conditions are used in FDTD Solutions and propagator simulations 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.

note: if you choose BFAST plane wave source 590 , the Bloch BCs will be automatically overridden and use its
built_in boundary conditions.

Symmetric / Anti-Symmetric 466

Symmetric/anti-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. On the other hand, antisymmetric boundaries
are anti-mirrors for the electric field, and mirrors for the magnetic field. Careful consideration must be given to
whether symmetric or anti-symmetric 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 anti-symmetric boundary conditions can be found in
Choosing between symmetric and anti-symmetric BCs 466 .

ALLOW SYMMETRY ON ALL BOUNDARIES: Allows symmetric boundary conditions with periodic structures
(this option is not available in the boundary condition tab of mode sources and mode expansion monitors).

Boundary condition tab options

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 429

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, k x,y ,z are defined in units of m-1. This is generally more convenient for injection of plane
waves on angles.
KX, KY, KZ: The wavevector setting in the x, y and z direction for the Bloch boundary in the units specified
above.
PML SETTINGS - TYPE: Sets the type of PML boundary formulation to be used. The options are a PML
based on a stretched coordinate formulation or a PML based on a uniaxial anisotropic material formulation
(legacy option).
PML SETTINGS - SAME SETTINGS ON ALL BOUNDARIES: When unchecked, this option allows users to
set different PML settings for the XMAX, YMIN, YMAX, ZMIN and ZMAX boundaries. When checked, the
same PML settings are used for all boundaries.

2003 - 2016 Lumerical Solutions, Inc


430 Lumerical Knowledge Base

PML SETTINGS - TABLE: Sets the PML profile to be used on each boundary. The section on PML boundary
conditions 460 provides a brief description of the intended use of each profile.
PML SETTINGS - EXTEND STRUCTURE THROUGH PML: see extending structures through PML 368 .

Advanced options tab


WARNING: This tab includes options which should only be changed if you are quite
familiar with the meshing algorithm and techniques used .

Simulation bandwidth
SET SIMULATION BANDWIDTH: By default, the simulation bandwidth is inherited from the source bandwidth.
Enabling this option allows the simulation bandwidth to be set directly. Simulation bandwidth affects many
aspects of the simulation including mesh generation, material fits, monitor frequency ranges, etc.

Mesh settings
FORCE SYMMETRIC X, Y, Z MESH: This will force a symmetric mesh about the x, y or z axis. When this
option is enabled, the meshing algorithm ONLY considers objects in the positive half of the simulation region.
The mesh in the negative half is simply a copy of the positive half mesh. All physical structures and mesh
override regions in the negative half will not be considered by the meshing algorithm. This option also forces a
mesh point at the center of the simulation region. Forcing a symmetric mesh ensures that the mesh does not
change when going from a simulation with symmetry to a simulation without symmetry.
OVERRIDE SIMULATION BANDWIDTH FOR MESH GENERATION: This option allows the simulation mesh
to be generated following a custom wavelength or frequency range, rather than the simulation bandwidth (with
is inherited from the source by default).
SNAP PEC TO YEE CELL BOUNDARY: This option forces any structures defined as PEC to have interfaces
that are aligned with the Yee cell boundaries. This ensures that all electric field components at the PEC

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 431

interface are tangential to the interface. This setting avoids complications that can result in some
circumstances if normal electric field components are set to 0 at a PEC interface. To achieve this, the
specified PEC interface may be shifted by as much as dx/2 when creating the simulation mesh, where dx is
the size of the Yee cell.
ENABLE SLAB LAYER DETECTION (varFDTD only): Accurately resolve slab layer vertical thickness by
using a very small mesh at vertical interfaces. There is little cost to using a small mesh in the vertical
direction, so this option is enabled by default.

Miscellaneous
ALWAYS USE COMPLEX FIELDS: This checkbox forces the algorithm to use complex fields during
simulation. This will result in slower simulation times and increased memory requirements and should only be
used when necessary. By default, complex fields are only used when Bloch boundary conditions are present.
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.

Advanced PML settings


PML KAPPA: The normalized imaginary electric and magnetic conductivity used in the PML boundaries.
PML SIGMA: The maximum normalized electric and magnetic conductivity used in the PML boundaries.
MINIMUM PML LAYERS: The minimum number of cells which are used for PML boundary conditions.
Increasing PML layers will reduce the back-reflection arising from the boundaries but will also increase time
and memory requirements for simulations. Defaults to a setting of 12.
MAXIMUM PML LAYERS: The maximum number of cells which are used for PML boundary conditions.
Increasing PML layers will reduce the back-reflection arising from the boundaries but will also increase time
and memory requirements for simulations. Defaults to a setting of 64.
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 or STABILIZED. In some cases, STABILIZED
PML provides more numerical stability, although the performance is slightly reduced.
EXTEND STRUCTURE THROUGH PML: In most cases, we want the structures to extend through the PML
so that fields exiting the simulation region are completely absorbed, otherwise there could be some unwanted
back reflection. This option automatically extends structures through the region even if they were not drawn
as such in the CAD.

Auto shutoff
USE EARLY SHUTOFF: This will automatically end the simulation when most of the energy has left the
simulation volume.
AUTO SHUTOFF MIN: The simulation will end when the total energy in the simulation volume drops to this
fraction of the maximum energy injected. The simulation data will automatically save.
USE DIVERGENCE CHECKING: This will automatically end the simulation when the total energy in the
simulation volume is this many times larger than maximum energy injected.
AUTO SHUTOFF MAX: The simulation will end when the total energy in the simulation volume rises to this
many times the maximum energy injected. The simulation data will automatically save.
DOWN SAMPLE TIME: Check the auto shutoff conditions every down sample time number of dT time steps

Parallel engine options


SET PROCESS GRID: The division of of the simulation volume into sub-regions, which are then run as a
separate processes, can be manually set for more efficient computation. Better performance will be achieved
when the regions are square e.g. for 20 regions, 5x2x2 is usually more efficient than 20x1x1.
NX, NY, NZ: The process layout for parallel simulations.
SET DEFAULTS: Can be used to reset the settings back to their original default settings.

2003 - 2016 Lumerical Solutions, Inc


432 Lumerical Knowledge Base

5.4.3.3.4 Simulation - EME

Edit simulation tabs


General tab
ALGORITHM: The type of mesh algorithm used ("finite-difference" is currently the only available option).
BACKGROUND INDEX: The refractive index of the surrounding, background medium in the simulation
region.
SOLVER TYPE: Can choose either a 2D or 3D solver.
FREQUENCY/WAVELENGTH: The frequency or wavelength to calculate results for.

EME setup tab


Cell geometry
Includes settings for the y and z geometry of the simulation region. Also includes the following settings:
X MIN: Minimum x position of solver region. First cell group starts from this position.
ENERGY CONSERVATION: None, passive, or conserve energy.
NUMBER OF CELL GROUPS: Sets the number of cells in the solver region.
NUMBER OF MODES FOR ALL CELL GROUPS: Sets number of modes to solve for in all cells.
ALLOW CUSTOM EIGENSOLVER SETTINGS: Allows you to set a different number of modes to solve for
different cell groups in the CELL GROUP DEFINITION table. In addition, users can set other mode solving
properties such as the guess effective index, bent waveguide properties ... etc by clicking on the "Custom
settings for cell group" button below the table.
ENERGY CONSERVATION: Allows you to select the type of energy conservation to use in the propagation
stage of an EME calculation. The choices are:
1. None: no energy conservation is applied.
2. Make passive: force the total power out of the device to be less than or equal to the total power into the
device. This is the default setting and is suitable in most cases.
3. Conserve energy: force the total power out of the device to be equal to the total power into the device. This
is often necessary for periodic devices like Bragg gratings.
CELL GROUP DEFINITION: Allows you to set the span of each cell group, the number of cells in each cell
group, the subcell method to use (none or CVCS 114 ), and number of modes to solve for in each cell. Displays
the cell range of the group, and start and stop positions of the cell group.
DISPLAY CELLS: Displays cell boundaries in the CAD.
CLEAR SETTINGS FOR CELL GROUP: Clears the custom settings for the selected cell group.
CUSTOM SETTINGS FOR CELL GROUP: Allows you to make custom settings for the selected cell group.

Periodicity
NUMBER OF PERIODIC GROUPS: Number of regions of the structure that are periodic.
PERIODIC GROUP DEFINITION: Defines the cell regions that have periodicity and the number of periods in
each region.
CELL GROUP SEQUENCE: Displays the current setup and periodicity. For example [1,(2)^10,3] indicates
that there are three cell groups and the second cell group is repeated ten times.

Warning: Cell group periodicity and EME profile monitors


EME field profile monitors should not be used with the Cell group periodicity feature. EME profile monitors
will not correctly reconstruct the field profile when Cell group periodicity is used.

Transverse mesh setting tab


Since the propagation axis in the EME solver is in the x-direction, the mesh settings only apply in the y and/or
z directions depending on the solver type (2D XY, 2D XZ, or 3D).

Mesh definition
The default uniform mesh in can be defined by setting the 'Number of mesh cells', or by setting a target mesh
size using 'Maximum mesh step'.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 433

Maximum mesh step settings


DY, DZ: Target mesh size when using 'Maximum mesh step' mesh definition

Mesh grading
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).

Minimum mesh step settings


MIN MESH STEP: sets the minimum mesh step for the entire solver region including the mesh override
regions.

Actual number of mesh cells used


Displays the number of mesh cells in each direction.

Number of mesh cells without override regions


Displays the number of mesh cells in each direction if no mesh override regions are used.

Boundary conditions tab


The boundary conditions that are supported by FDTD/MODE Solutions 101 are listed below.

PML 460

Perfectly matched layer (PML)1 boundaries absorb electromagnetic waves incident upon them. They
essentially model open (or reflectionless) boundaries. In FDTD and varFDTD simulation regions, the user can
directly specify all the parameters that control their absorption properties including the number of layers. To
facilitate the selection of PML parameters, a number of profiles (or predefined sets of parameters) are available
under the boundary conditions tab. In most simulation scenarios, the user only needs to choose one of the
predefined profiles and fine tune the number of layers. PML boundaries perform best when the surrounding
structures extend completely through the boundary condition region. This will be the default behavior of
structures whether or not they were drawn to end inside or outside the PML region.
1 J. P. Berenger, Perfectly Matched Layer (PML) for Computational
Electromagnetics. Morgan & Claypool Publishers, 2007.

Metal 464

Metal boundary conditions are used to specify boundaries that behave as a Perfect Electric Conductor (PCE).
The component of the electric field parallel to a metal (PCE) boundary is zero; the component of the magnetic
field H perpendicular to a metal (PEC) boundary is also zero. Metal boundaries are perfectly reflecting,
allowing no energy to escape the simulation volume along that boundary. In the FDE solver, metal BC is the
default setting 464 .

PMC
Perfect Magnetic Conductor (PMC) boundary conditions are the magnetic equivalent of the metal (PCE)
boundaries. The component of the magnetic field H parallel to a PMC boundary is zero; the component of the
electric field perpendicular to a PMC boundary is also zero.

2003 - 2016 Lumerical Solutions, Inc


434 Lumerical Knowledge Base

Periodic 478

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 (FDTD/varFDTD) 471

Bloch BC should be used when the structures and the EM fields are periodic, but a phase shift exists between
each period. Bloch boundary conditions are used in FDTD Solutions and propagator simulations 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.

note: if you choose BFAST plane wave source 590 , the Bloch BCs will be automatically overridden and use its
built_in boundary conditions.

Symmetric / Anti-Symmetric 466

Symmetric/anti-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. On the other hand, antisymmetric
boundaries are anti-mirrors for the electric field, and mirrors for the magnetic field. Careful consideration must
be given to whether symmetric or anti-symmetric 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 anti-symmetric boundary conditions can be
found in Choosing between symmetric and anti-symmetric BCs 466 .

ALLOW SYMMETRY ON ALL BOUNDARIES: Allows symmetric boundary conditions with periodic structures
(this option is not available in the boundary condition tab of mode sources and mode expansion monitors).

Material tab
Mesh Refinement:
Mesh refinement can give sub-cell accuracy for a simulation. See the Mesh refinement options 448 page for
more information.

FIT MATERIALS WITH MULTI-COEFFICIENT MODEL


(For sampled material data) When MODE Solutions solves for modes, it uses material data that is obtained
from a linear interpolation from the closest data points. This means that when a frequency sweep is run, the
material data used can be discontinuous in time. This is especially problematic for properties such as
dispersion which depends on a second derivative of the refractive index as a function of wavelength.

If you check this option, you can choose to fit two types of materials with a multi-coefficient model. Here are
the options that are available when the checkbox is checked:

Fit sampled materials: By default this is checked. Sampled material data will be fit with a smooth multi-

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 435

coefficient material model.


Fit analytic materials: Check this option to fit a multi-coefficient model to the analytic material data. The
only reason to fit analytic models with a multi-coefficient model is to compare MODE results with FDTD.
FDTD simulations must fit a multi-coefficient model to the analytic data in order to run simulations, but the
multi-coefficient model may not be able to fit the analytic model perfectly.
Wavelength min/max or center/span: Set bandwidth over which to apply the fit.

Advanced options tab


WARNING: This tab includes options which should only be changed if you are
quite familiar with the meshing algorithm and techniques used.

Mesh settings
FORCE SYMMETRIC X, Y, Z MESH: Will force a symmetric mesh about the x or y axis. When this option
is enabled, the meshing algorithm ONLY considers objects in the positive half of the simulation region. The
mesh in the negative half is simply a copy of the positive half mesh. All physical structures and mesh
override regions in the negative half will not be considered by the meshing algorithm. This option also forces
a mesh point at the center of the simulation region. Forcing a symmetric mesh ensures that the mesh does
not change when going from a simulation with symmetry to a simulation without symmetry.

PML settings
PML KAPPA: The normalized imaginary electric and magnetic conductivity used in the PML boundaries.
PML SIGMA: The maximum normalized electric and magnetic conductivity used in the PML boundaries.
PML LAYERS: The number of cells which are used for PML boundary conditions. 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.
SET DEFAULTS: This button resets the parameters of the advanced settings tab to the default settings.

EME settings
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
MAX STORED MODES: Maximum number of modes for each cell in the EME setup.
TOLERANCE 1: This setting is used when solving for the S matrix at each interface. The interface S
matrices are calculated from a linear system of equations that attempt to match the tangential E and H field
components and the solution of these equations requires a matrix inversion. When there are modes on one
side of the boundary that are not well matched by any modes on the other side of the boundary, the solution
to the linear system of equations can result in S matrix coefficients that are much larger than 1 and do not
conserve energy. This tolerance setting is used to eliminate coupling completely to modes that cannot be
expanded on the other side of the boundary. Using values close to zero will result in smaller field
discontinuities but can lead to large energy conservation violations that cannot be corrected without
perturbing the entire S matrix. Using values close to 1 will make energy conservation work much better but
can increase field discontinuities. For periodic structures where precise energy conservation is important,
this value should typically be between 0.5 and 1. This setting affects the calculation of all interface S
matrices, regardless of the choice of the "energy conservation" setting.
TOLERANCE 2: This settings is used to determine the maximum correction that will be made to a lossy
interface S matrix to make it conserve energy. Ideally, all possible incident source conditions on an interface
will result in perfect energy conservation. If the energy conservations settings is set to "conserve energy"
then source conditions which result in loss are corrected to perfectly conserve energy. However, source
conditions that result in a total transmitted and reflected power that is smaller than "tolerance 2" will be
ignored which helps to avoid over correcting the original S matrix. For periodic structures where precise
energy conservation is important, this setting should be quite small - typically 1e-5 or smaller - to ensure
that no incorrect losses can occur. This setting will only be used when the "energy conservation" setting is
set to "conserve energy".

2003 - 2016 Lumerical Solutions, Inc


436 Lumerical Knowledge Base

TOLERANCE 3: This setting is used for certain internal matrix calculations when trying to correct the
interface S matrices to conserve energy or to be passive. It should be kept as small as possible, however, in
some cases numerical errors can result if it is too small. In general, this setting should not have as much
impact on the results as tolerance 1 and tolerance 2. This setting will only be used when the "energy
conservation" setting is set to "conserve energy" or "make passive".

gain_max , however some modes may have negative real(neff) correspondent to a negative phase velocity.
The value of gain_max should be zero when the waveguide is made from materials with no gain, however, we
typically use a finite value for two reasons: firstly, there can be small numerical errors such that a mode with
imag(neff) = 0 may be calculated to have a numerically small, negative value such as -1e-15, and secondly,
the waveguide itself may be composed of some materials that, intentionally, have gain in other words they
have imag(n) < 0 where n is the material refractive index. The value of gain_max is given by gain_max =
maximum tolerated gain + material_gain_max, where maximum tolerated gain is specified below and
material_gain_max is the maximum value of |imag(n)| for any material in the waveguide that has gain. If no
material in the waveguide has gain, then material_gain_max = 0.
CORRECT BACKWARD PROPAGATING MODES WHEN PML IS PRESENT: By default, the detection and
correction of backward propagating modes, as described above, is not performed when any of the FDE
solver boundaries are PML. When PML boundaries are used, you must check this box to apply the
correction of backward propagating modes. However, we do not generally recommend checking this box
because PML itself can create small amounts of gain in some modes which is typically an indication that
the PML is too close to the guiding structure and not that the backward propagating mode has been
accidentally selected. In addition, evanescent modes with negative phase velocities are rarely found when
PML is used.
MAXIMUM TOLERATED GAIN: This quantity is used to calculate gain_max, as described above. Since this
is typically used for avoiding accidental sign reversal due to small numerical errors, this value is typically
very small and the default is 1e-12.
ADD MATERIAL GAIN TO MAXIMUM TOLERATED GAIN: When this is checked, the material gain (if any
gain materials are present) will be included in the calculation of gain_max, as described above. When this is
unchecked, gain_max will be equal to maximum tolerated gain.

See EME error diagnostics 783 for more information on the tolerance parameters.

Results returned
Results
COEFFICIENTS: the modal expansion coefficients for each mode as a function of cells or x.
GLOBAL ERRORS: the source-independent global errors as a function of cells or x, see EME error
diagnostics 783 .
INTERNAL S-MATRIX: the S matrix of the whole device including all the modes that are used in the EME
calculation.
LOCAL ERRORS :the source-dependent local errors as a function of cells or x, see EME error diagnostics
783 .

USER S-MATRIX: the S matrix of the whole device including only the modes that have been selected in the
Ports 436 .

5.4.3.3.4.1 Ports
This topic applies to the Eigenmode Expansion solver in MODE Solutions.

The EME solver region contains 2 ports by default. The Ports button found in the toolbar adds additional
ports to the solver.

Ports are labeled automatically and the port number corresponds to the terms in the calculated S-matrix result. You
can change the port labels by changing the order that the ports are listed in the Objects Tree using the up and down
arrows as shown in the image below.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 437

When you edit a port object you will have the following settings:

Geometry tab
Port location: Allows users to automatically set the port location to the left or right side of the EME solver region.
The geometry tab also contains options to set the size and location of the port.

EME Port tab


The "Mode calculation" section allows users to select a mode (or a set of modes) they are interested in. The user S-
matrix result returns the S-matrix for these selected modes. A selected mode can also be used as an input source
in the EME propagation stage of the analysis. In addition, it is possible to use a custom field profile from a .mat file.
See importing arbitrary source fields 437 for an example.

Results returned
Modes
NEFF: the effective index of the selected mode(s)
MODE PROFILES: the spatial mode profile (E,H) of the selected mode(s)

Results
OVERLAP_FORWARD: Overlap between port mode and forward propagating modes of nearest cell.
OVERLAP_BACKWARD: Overlap between port mode and backward propagating modes of nearest cell.
PMATRIX: Power ( integrate(real(Px),1:2, y,z)) ) in the port mode, in Watts. When multiple
modes are selected, it is the power overlap between each of the port modes. The diagonal of the matrix is
the power in each mode. Typically the fields are scaled so this is about one watt.

It is possible to use a custom field profile from a .mat file as the source in an EME simulation. The field profile data
can either be from another simulation, or defined from an equation in the script.

The script below generates a field profile and saves it into a .mat file.
# define position vectors
x = 0;
y = linspace(-2e-6,2e-6,100);
z = linspace(-1.5e-6,1.5e-6,101);
X = meshgrid3dx(x,y,z);
Y = meshgrid3dy(x,y,z);
Z = meshgrid3dz(x,y,z);

# define field profile to import


Ex = 0*X;

2003 - 2016 Lumerical Solutions, Inc


438 Lumerical Knowledge Base

Ey = exp( - (Y/1e-6)^2 - (Z/1e-6)^2 );


Ez = 0*X;
Hx = 0*X;
Hy = 0*X;
Hz = sqrt(eps0/mu0)*Ey;

# create dataset
EM = rectilineardataset("EM fields",x,y,z);
EM.addattribute("E",Ex,Ey,Ez);
EM.addattribute("H",Hx,Hy,Hz);

# save dataset to .mat file which can be imported


matlabsave("testfields.mat",EM);

To set this as a port mode, open the Edit EME port tab, select "user import" under mode selection and click on
"Import Fields".

To verify that the desired mode has been imported properly, right click on the port in the object tree and select
Visualize -> Fields.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 439

See also
Sources - Import 579

5.4.3.3.4.2 Cells
This topic applies to the Eigenmode Expansion solver in MODE Solutions.

As discussed in EME solver physics 114 , the mesh along the propagation direction is defined by adding cells to the
EME simulation region. An eigenmode simulation is carried out at the center x location of each cell to calculate all
the modes supported at that cross section. Once the cells have been defined in the EME set up tab, they will
appear as children of the EME solver region, as shown in the figure below.

To get the overall S matrix of the entire device, see the results section of Simulation - EME 432 .

Results returned
Results

2003 - 2016 Lumerical Solutions, Inc


440 Lumerical Knowledge Base

MODE FIELDS: the spatial mode profiles of each mode in the current cell.
NEFF: the effective indices of each mode in the current cell.
OVERLAP_i_i-1: the overlap integrals between the set of modes in the current cell and the set of modes in
the cell to the left of the current cell.
OVERLAP_i_i+1: the overlap integrals between the set of modes in the current cell and the set of modes in
the cell to the right of the current cell.
PMATRIX: the power carried in each mode, in watts. In a device with no absorbing materials, no PML
boundaries, the Pmatrix should be the identity matrix, one watt.
S_i_i+1: S parameter matrix for all modes between cell i and i+1. Only available after fields have been
propagated.

5.4.3.3.5 Simulation - Mesh override

Edit mesh override tabs


General tab
The general tab includes options to override the mesh size. If multiple mesh override regions are present, the
meshing algorithm will use the override region that results in the smallest mesh for that volume of space.
Constraints from mesh override regions always take precedence over the default automatic mesh, even if they
result in a larger mesh size.

Note: The 'min mesh step' setting in the solver - Mesh settings tab determines
the absolute global minimum mesh size allowed in the simulation. This setting
takes precedence over all other mesh constraints, including mesh override
regions.

Set maximum mesh step


Set the desired mesh size.
Override x mesh, Override y mesh, Override z mesh: Override the x, y or z direction mesh settings
dx, dy, dz: Respective maximum mesh step

Set equivalent index


Alternatively, since the mesh spacing is usually determined by the refractive index of the materials in the
simulation, it is possible to set an EQUIVALENT INDEX that will be used to determine the mesh spacing. A
higher index will lead to a finer mesh.
Override x mesh, Override y mesh, Override z mesh: Override the x, y or z direction mesh settings
equivalent x index, equivalent y index, equivalent z index: Respective index

Geometry tab
X, Y, Z: The center position of the simulation region
X MIN, X MAX: X min, X max position
Y MIN, Y MAX: Y min, Y max position
Z MIN, Z MAX: Z min, Z max position
X SPAN, Y SPAN, Z SPAN: X, Y, Z span of the simulation region

5.4.3.3.5.1 Getting the mesh size

Objective
This section describes how to get the locations of the mesh points.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 441

Solvers 101

FDTD
FDE
VarFDTD

In this topic
View the mesh 441
Getting the mesh from monitor data 443
Getting the mesh from Simulation region
properties 442
See also
Simulation 414
get 1571
getdata 1646
View simulation mesh 203

Measure the mesh with the ruler


The mesh can be viewed in the CAD layout editor by clicking the View simulation mesh button. The simulation mesh
is not constantly updated as simulation objects are manipulated because it would make the interface too slow. The
Recalculate simulation mesh button can be used to force a recalculation of the mesh.

Once the mesh is visible, the Ruler mouse mode can be used to measure the mesh size. The ruler measurements
are visible at the bottom of the screen.

When viewing the mesh (orange), it is often best to hide the drawing grid mesh (grey) to keep the screen from
becoming too cluttered. To hide the drawing grid, click on the Edit drawing grid button, and unselect Show grid.

2003 - 2016 Lumerical Solutions, Inc


442 Lumerical Knowledge Base

Getting the mesh from Simulation region properties


Before a simulation has been run, some information about the mesh can be obtained by getting the Simulation
region properties.

addfdtd;
?getresult("FDTD","x"); # it will return the x positions of the grid points

result:
-8.5e-007
-8.10465e-007
-7.7093e-007
-7.31395e-007
-6.9186e-007
-6.52326e-007
-6.12791e-007
-5.73256e-007
-5.33721e-007
-4.94186e-007
...
..
.

The "dx" properties:

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 443

select("FDTD"); # select simulation region


dx=get("dx"); # get dx property

The dx property has slightly different meanings, depending on the simulation mesh type.
Auto non-uniform The value is the target dx that would appear in an material with an index of 1. This is
not necessarily the actual mesh size in the simulation because the index of the
materials may not be 1.
Custom non-uniform The value in the dx field of the Max mesh step settings section
Uniform mesh The value in the dx field of the Max mesh step settings section

The dx value obtained from the get command may not be the actual dx used in the simulation, since dx can change
as a function of position with the non-uniform mesh, and the Simulation region mesh settings can be overridden with
a Mesh override region. If the precise dx values are required, they should be obtained from the monitor data.

Getting the mesh from monitor data


After a FDTD or propagator simulation has been run, the mesh point locations can be easily obtained from the
monitor data. Generally, monitors record data at each mesh point. The getdata command can be used to get the
x,y,z position vectors of the monitor data. These vectors will specify the position of each mesh point that intersect
the monitor. To obtain the mesh point positions in the X,Y plane, use a 2D monitor located in the XY plane. The
following script commands will get the x position vector from monitor1.
m="monitor1"; # monitor name
x=getdata(m,"x"); # x position data

5.4.3.3.6 Using the mesh settings tab


The mesh settings tab properties are used to control the mesh geometry, and related parameters. This section also
contains the details of the available options and how to choose.

Available options:
FDTD or varFDTD
Simulation - FDTD 415
Simulation - varFDTD 425

FDE
Simulation - FDE 420

Option details:
Mesh refinement 443
Using the non-uniform mesh 455

5.4.3.3.6.1 Mesh refinement


This page explains how conformal mesh technology can be used to improve simulation accuracy and why it is
important on a finite sized mesh. For details on how to choose the best mesh refinement option for your application,
please see Mesh refinement options 448 .

Solvers 101

FDTD
FDE
VarFDTD

In this topic
Conformal mesh method 444
Mesh refinement choices 444

2003 - 2016 Lumerical Solutions, Inc


444 Lumerical Knowledge Base

Maxwell's equations on a finite mesh 444


Simulation times and memory requirements
448

See also
Simulation 414

The conformal mesh method


The concept of the conformal mesh is to use an integral solution of Maxwell's equations near interfaces. The method
used in Lumerical's software is similar to the methods described in the following publications, with some proprietary
modifications:
Yu, W., and R. Mittra, "A conformal finite difference time domain technique for modeling curved dielectric
surfaces," IEEE Microwave Components Lett,, Vol. 11, 2001, pp. 25-27.
Allen Taflove, Computational Electromagnetics: The Finite-Difference Time-Domain Method. Boston: Artech
House, (2005).
Y. Zhao and Y. Hao, Finite-difference time-domain study of guided modes in nano-plasmonic waveguides, IEEE
Trans. Antennas Propag. 55, 30703077 (2007).
A. Mohammadi, H. Nadgaran, and M. Agio, Contour-path effective permittivities for the two dimensional finite-
difference time-domain method, Opt. Express 13, 1036710381 (2005) http://www.opticsinfobase.org/
abstract.cfm?URI=oe-13-25-10367.

Mesh refinement choices


To enable conformal meshing, go to the Simulation Region "Mesh settings" tab.

Please see Mesh refinement options 448 for details on how to choose the conformal mesh settings for your
application.

Maxwell's equation on a finite mesh


There are two key challenges associated with solving Maxwell's equations on a finite mesh:
1. There are numerical errors associated with the finite mesh size, even in homogenous material. For example, the
speed of light on a finite mesh is not the same as real space, but depends on dx, dy, dz and dt. Lumerical's
graded meshing with automatic mesh generation solves this problem by adjusting the mesh to the refractive
index of the materials. For example, the mesh in a material of n=2 will be twice as small as in a material with
n=1, because the wavelength is smaller in the higher index material. This ensures that the numerical errors
associated with the finite mesh are kept below a certain threshold in all regions of the simulation.
2. It is not possible to resolve interfaces to higher precision than the size of the mesh used. One solution is to use
mesh override regions to force a very small spatial mesh near interfaces. The disadvantage of this method is that
it can greatly increase simulation times and memory requirements. In the FDTD method, the simulation time
scales as 1/dx 4 for 3D simulations. A better solution for many applications is to use conformal mesh technology.
In some cases, a combination of both solutions is required. In general, we recommend using conformal meshing
as much as possible, and sometimes mesh override regions to force a smaller mesh size in critical regions.

The default conformal setting will apply conformal meshing to all materials except metals and PEC. Please see
Mesh refinement options 448 for a detailed description of the different mesh refinement options and how to choose
the right setting for your application.

The table below shows some typical structures where problems with a finite mesh size are encountered.

Description Default simulation mesh Graded mesh solution

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 445

A 50nm thick
layer of silicon
on glass. The
simulation
mesh size is
approximately
7nm. Without
conformal
meshing, the
layer
thickness
cannot be
defined to
better than
7nm - in other
words, a 49nm
layer and a
55nm layer
can give
exactly the
same results!

The graded
mesh solution
uses mesh
override
regions to
make the
mesh size
1nm at the
interfaces,
however many
more mesh
points are
needed.

The conformal
mesh solution
allows you to
obtain
accurate
results for this
type of
structure
without using
any mesh
override
regions.
Please note
that you
should see at
least 2 mesh
cells in your
layer.

2003 - 2016 Lumerical Solutions, Inc


446 Lumerical Knowledge Base

A silver rod of
diameter
50nm. In the
default mesh,
the curved
interfaces
cannot be well
resolved.

The graded
mesh solution
forces a much
smaller mesh
over the entire
rod,
introducing
many more
grid points.

In this
application, we
use a
combination of
graded
meshing and
conformal
meshing. The
conformal
meshing can
allow you to
obtain more
accurate
results for a
given mesh
size. Even if
the mesh size
is only twice
as large, for
example 2nm
compared to
1nm, the
computation
time in 3D
simulations
can be
reduced by a
factor of 16.
Please take
care when
using
conformal
mesh
technology
with metals,
however, and
do some
convergence
testing to be

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 447

sure that the


conformal
mesh
technology is
appropriate for
your precise
application.

A waveguide
coupler region
made from two
silicon
waveguides a
short distance
apart. The
coupling
length is
critically
sensitive to
the distance
between the
waveguides,
which can't be
resolved to
better than the
size of dx
without
conformal
mesh
technology.

The graded
mesh solution
forces a much
smaller mesh
between the
waveguides, in
order to
resolve the
distance to
any desired
accuracy.

The conformal
mesh solution
will allow you
to obtain
accurate
results for this
type of
structure
without using
a special
mesh override
region
between the
waveguides.

2003 - 2016 Lumerical Solutions, Inc


448 Lumerical Knowledge Base

Please note
that the space
between the
waveguides
should be at
least 2*dx. If
this is not the
case, a mesh
override region
may be
necessary to
ensure this,
even with the
conformal
mesh.

Simulation times and memory requirements


The following table shows the relationship between mesh step size and simulation time and memory requirements
for 2D and 3D simulations:

3D 2D
Memory requirements ~ V ( l / dx )
3
~ A ( l / dx )
2

Simulation time ~ V ( l / dx )
4
~ A ( l / dx )
3

Lumerical provides a number of mesh refinement options which can give sub-cell accuracy from a simulation. This
section explains the various options and how to choose the appropriate one for your simulation.

In this topic
How to choose which mesh refinement method to use 448

Summary of each method 449


Conformal mesh technology details 450

See also
Mesh refinement 443

How to choose which mesh refinement method to use


The default, Conformal Variant 0 setting can be used for most FDTD Solutions and Propagator simulations. In
this setting, Conformal Mesh Technology (CMT) is applied to all materials except metals and Perfect Electrical
Conductors (PEC). For the purpose of this discussion, we define metals (or plasma materials) as materials with
real(e) < 1 over the bandwidth of the simulation and e is the relative permittivity. The material properties in your
simulation can always be viewed in the Materials Explorer.

Exceptions can be determined based on your material properties, but if options other than Conformal Variant
0 is to be used, careful convergence testing is highly recommended:

If your simulation involves metals, then you may want to consider using Conformal variant 1. In this variant,
CMT is applied to all materials, including metals. CMT will give better convergence than
staircasing for small enough mesh sizes, but at larger mesh sizes it can sometimes give much
worse results. Unfortunately, the size of a 'small enough' mesh is highly dependent on the simulation. In some
cases, a <5nm mesh is sufficient, while in other cases a 1nm is not sufficient (optical wavelengths). Please do
some careful convergence testing between Conformal variant 0 and Conformal variant 1 to test

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 449

which method you should use for your particular application. Conformal variant 1 may give numerical
artifacts when |eplasma|>> |edielectric | and the mesh size is not sufficiently small.
If your simulation uses PEC instead of metals, then you will get better convergence with Conformal variant
1.

For the Eigenmode Solver in MODE Solutions, the default setting is Conformal variant 1. Since unphysical
modes resulting from the possible numerical artifacts can be easily detected in modal analysis.

Note on meshing time


Any conformal meshing technique will increase the time it takes to mesh the structure prior to the simulation itself.
For extremely complex structures involving many objects and large simulations the meshing time can become
significant compared to the simulation time. If this is the case, you may want to return to Staircase meshing for
your initial simulations and only use Conformal meshing for final results. Advanced users may also want to learn
how to re-use the simulation mesh between simulations.

Special note for dipole calculations


CMT can give much better convergence for many simulations involving calculations such as Mie scattering from
spheres, or reflection and transmission from multilayer stacks. However, it can also modify the local density of
states. If you are doing calculations involving the power radiated by dipoles placed very small distances (10s of nm)
from metal interfaces, you should compare Conformal variant 1, or Conformal variant 2 with the
standard Conformal setting, which disables CMT for metal interfaces, to be sure that your results have converged.

Summary of each method


Staircasing: The material at each position of the Yee cell is evaluated to determine which material it is in, and
the E field at that location uses only that single material property. The resulting discretized structure is unable to
account for structure variations that occur within any single Yee cell, resulting in a "staircase" permittivity mesh
that coincides with the Cartesian mesh Furthermore, any layers are effectively moved to the nearest E field
position on the Yee cell, meaning that layer thickness cannot be resolved to better than dx.

Conformal variants: Lumerical's Conformal Mesh Technology (CMT) uses a rigorous physical description of
Maxwell's integral equations near interfaces between two materials that is able to incorporate Lumerical's Multi-
Coefficient Materials. The CMT can handle interfaces between arbitrary dispersive media. In general, this provides
greater accuracy for a given mesh size, or make it possible to run jobs much faster without sacrificing accuracy.
Due to the 1/dx 4 dependence of the simulation time on the mesh size, results can often be achieved in roughly
1/10 the time. See Conformal Mesh Technology details 450 below for more information. If more than two materials
are found in a single cell, the method reverts to Staircasing for that cell. The Conformal meshing comes in three
flavors:
Conformal variant 0 CMT is not applied to interfaces involving metals or PEC
material.
Conformal variant 1 CMT is applied to all materials, including PEC and
metals.
Conformal variant 2 A simplified conformal mesh approach is applied to
interfaces involving metals and PEC.

Dielectric Volume Average: The dielectric volume average method can only handle interfaces between
one or more dielectric materials in a Yee cell. In this case, an average permittivity is created that is the simple
volume average of all the dielectric permittivities in the given cell. The volume average is calculated by dividing the
cell into NxN subcells in 2D and NxNxN subcells in 3D, where N is the "meshing refinement" value specified by
the user. If non-dielectric materials are present at the cell center, then the method reverts to the Staircase method
for that particular cell. This method has no real physical basis, but can be used for very low index contrast
dielectric structures. In particular, if there is a low index contrast spatial variation in the permittivity, such as 1.4
+0.01sin(x), then this method can give good results because it will average the permittivity over the entire Yee cell.

Volume Average: The permittivity of each cell is the simple volume average of the permittivities of the 2
materials in the cell. Each material can be fully dispersive. If more than two materials are found in a single cell, the

2003 - 2016 Lumerical Solutions, Inc


450 Lumerical Knowledge Base

method reverts to Staircasing for that cell.

Yu-Mittra method 1: This method was introduced by


Yu and Mittra to provide greater accuracy when
modeling PEC/dielectric interfaces. Lumerical's
formulation is a slight extension of the original Yu-
Mittra formulation that can be used with arbitrary
dispersive media. In the figure below, we see the
original formulation where the presence of a perfect
electrical conductor (PEC) is taken into account by
reducing the contour integral C to include only the
region outside the PEC where the electric field is non-
zero (C1). In our implementation, when updating the
B field, the contour C1 is evaluated in material 1,
while the contour C2 = (C-C1) is evaluated in material
2. In the event that one of the materials is PEC
(where E=0), this is identical to the original Yu-Mittra
formulation for PEC. If more than two materials are
found in a single cell, the method reverts to
Staircasing for that cell.

Yu-Mittra method 2: This method was introduced by


Yu and Mittra to provide greater accuracy when
modeling dielectric interfaces. Lumerical's formulation
is a slight extension of the original Yu-Mittra
formulation that can be used with arbitrary dispersive
media. An effective permittivity is assigned each
permittivity component in the Yee cell, that is
weighted by the fraction of the mesh step that is
inside material 1 or material 2. If more than two
materials are found in a single cell, the method
reverts to Staircasing for that cell.

For more information on the Yu-Mittra method and other conformal mesh algorithms, see the following references:
Yu, W., and R. Mittra, "A conformal finite difference time domain technique for modeling curved dielectric
surfaces," IEEE Microwave Components Lett,, Vol. 11, 2001, pp. 25-27.
Allen Taflove, Computational Electromagnetics: The Finite-Difference Time-Domain Method. Boston: Artech
House, (2005).
Y. Zhao and Y. Hao, Finite-difference time-domain study of guided modes in nano-plasmonic waveguides, IEEE
Trans. Antennas Propag. 55, 30703077 (2007).
A. Mohammadi, H. Nadgaran, and M. Agio, Contour-path effective permittivities for the two dimensional finite-
difference time-domain method, Opt. Express 13, 1036710381 (2005) http://www.opticsinfobase.org/
abstract.cfm?URI=oe-13-25-10367.

Conformal Mesh Technology details


Motivation
In recent years, photonic design has focused on ever smaller devices expected to operate over broad wavelength
ranges, and that make use of highly dispersive materials. Emerging photonic technologies including plasmonics and
silicon photonics exploit dispersive material characteristics and modern semiconductor manufacturing techniques to
provide new functionality to the optical designer. While such technologies open the door to greater innovation, the
combination of dispersive, high index contrast materials and nanoscale feature sizes have in turn place extreme
demands on commercially available photonic design tools.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 451

Background: Conformal Mesh FDTD


While the finite-difference time-domain (FDTD)
technique is ideally suited in principle to provide
broadband performance data for nanoscale photonic
devices, the standard Yee-cell FDTD algorithm relies on
discretizing the underlying structure onto a Cartesian
mesh. The resulting discretized structure is unable to
account for structure variations that occur within any
single Yee cell, resulting in a "staircase" permittivity
mesh that coincides with the Cartesian mesh.
In general, conformal mesh methods try to account for
subcell features by solving Maxwells integral equations
near structure boundaries. For example, the Yu-Mittra
method , shown in Figure 1, can be used to improve
accuracy when modeling curved PEC surfaces. While
this method is simple to implement, and accurately
describes the interaction of electromagnetic radiation at
microwave and radio frequencies with most metallic
materials, it will not provide accurate results for many
types of simulations conducted at optical frequencies, FIGURE 1. In the Yu-Mittra model, the presence of a
such as propagation through multilayer stacks of perfect electrical conductor (PEC) is taken into account
dispersive materials. Nevertheless, the Yu-Mittra by reducing the contour integral C to include only the
method is illustrative of the approach used by all region outside the PEC where the electric field is non-
conformal meshing methods. zero (C1).

Lumericals Conformal Mesh Technology

At optical frequencies, the dispersive nature of


commonly-used materials must be taken into account.
This can be done accurately via Lumericals Multi-
coefficient Materials (MCMs), which makes it possible
to simulate highly-dispersive materials used in
applications ranging from solar cells through biosensors
and CMOS image sensors. Figure 2 shows common
materials employed in such designs, and the types of FIGURE 2. Complex permittivity of typical materials
fits that can be accomplished using MCMs. employed in current photonic designs over wavelengths
ranging from the ultraviolet to near infrared, together with
the fits generated by Lumericals MCMs.

By applying a more rigorous physical description of the conformal mesh approach, Lumerical has developed
Conformal Mesh Technology (CMT) that is able to incorporate arbitrary dispersive MCMs. As an extension of general
conformal mesh algorithms to handle dispersive materials, it is easily possible to generate more simple conformal
mesh models like the Yu-Mittra model from Lumericals CMT.

CMT Capabilities
Greater Accuracy for a Coarse Mesh
Lumericals CMT is capable of generating significant accuracy improvements relative to staircase results. This can
be illustrated by applying the CMT to a multilayer stack, which is a common element incorporated within various
photonic designs. As a conceptually simple but challenging test case, we consider the reflection and transmission
of non-normal incidence p-polarized light through a five layer stack which includes dielectrics, metals and
semiconductors. As the analytic transmission from this multilayer stack can be easily computed with transfer matrix
theory, it provides a good test case to demonstrate the ability of CMT to account for subcell features as shown in
Figure 3.

a) b) c)

2003 - 2016 Lumerical Solutions, Inc


452 Lumerical Knowledge Base

FIGURE 3. Multi-layer stack composed of gold, a constant dielectric material of index 1.9, Si, GaAs, and Ge tested
over a wavelength range of 400-1000nm using a mesh resolution of 10 points per wavelength. The staircase result in
(b) shows significant deviations relative to the analytic response calculated from transfer matrix theory, while the
CMT result in (c) demonstrates that subcell features can be accurately accounted for.

This simple test demonstrates the ability of CMT to resolve subcell features which, in this case, is the location of
interfaces that do not necessarily match the discretized mesh. Testing shows that at a mesh resolution of 10 points
per wavelength, CMT provides significantly greater accuracy than the staircase results obtained at a much higher
mesh resolution of 34 points per wavelength. Examination of the average error calculated for the sum of the reflection
and transmission signals over the 600nm bandwidth simulated in Figure 4 shows that the level of accuracy achieved
with CMT at a coarse mesh of 10 points per wavelength could not be achieved with the staircase approach at any
reasonable mesh size, and likely that more than 60 points per wavelength would be required.

FIGURE 4. Average RMS error for reflection and transmission of five layer multilayer stack over 600nm
bandwidth. The accuracy achieved by CMT at 10 points per wavelength would likely require more than 60 points per
wavelength for the staircase approach.

The ability of CMT to produce much higher accuracy results with a more coarse mesh can also be demonstrated for
3D structures, like the organic solar cell device shown in Figure 5. While there is no analytic result that can be
calculated for such a structure, 3D FDTD results obtained with a very fine mesh can be used in place of an analytic
result. As computation time within FDTD varies with inversely with the mesh size to the fourth power (1/dx 4) using a
coarser mesh can result in significantly faster simulation times. For example, Figure 5 shows that the CMT can
achieve the same accuracy at 14 points per wavelength as the staircase method at 26 point per wavelength, which
translates into a speedup of more than 7 times.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 453

Points per wavelength

FIGURE 5. A 3D organic solar cell structure that is comprised of a periodic nanoscale pattern in a multilayer
structure. By comparing staircase and CMT results against 3D FDTD results obtained using a very fine mesh, the
RMS error of the two methods can be compared. To achieve a 1% RMS error, CMT requires a mesh size of less
than 14 points per wavelength, while the staircase approach requires a mesh size of more than 26 points per
wavelength.

Faster and Smoother Convergence


In most applications, the CMT shows faster and smoother convergence than the staircase method. This allows
designers to work at coarser mesh sizes and realize the significant simulations speedups that can be obtained due
to the 1/dx4 dependence of the FDTD simulation time. In Figure 6, we see the convergence of the green pixel
response in a typical CMOS image sensor. The CMOS image sensor involves complex material properties, such as
silicon and color filters which require the MCM to fit, AR coatings the thickness of which must be resolved to within a
few nanometers, as well as curved microlens surfaces used to focus the light. The extremely quick convergence of
the CMT method for this design demonstrates its robustness in a very complicated application.

FIGURE 6. A 3D CMOS image sensor model composed of microlenses, color filters, and metallic interconnects on a
multilayer substrate. The CMT allows for much faster and smoother convergence. At coarse mesh sizes, such as 6-
14 points per wavelength, the CMT shows that 33% of the incident light is converted to electron/holes in the green
photodiodes. The staircase method, on the other hand, may not yet be converged even at 26 points per wavelength.

Summary
The conformal mesh can enhance simulation accuracy for a given mesh size, or make it possible to run jobs much
faster without sacrificing accuracy. Due to the 1/dx 4 dependence of the simulation time on the mesh size, results
can often be achieved in roughly 1/10 the time. Also, the CMT provides submesh sensitivity to changes in
geometrical parameters, which greatly facilitates design optimization. Owing to its inherent compatibility with
Lumericals MCMs, CMT allows designers to more efficiently prototype broadband, nanoscale photonic design
concepts in high index contrast, dispersive materials.

Objective
The goal of this example is to compare the performance of conformal mesh against the more conventional staircase
method.

2003 - 2016 Lumerical Solutions, Inc


454 Lumerical Knowledge Base

The waveguide is rotated around the z-axis, the direction of propagation and the effective index and loss of the same
mode are calculated and compared for the two mesh refinement options.

Solvers 101

FDTD
FDE
VarFDTD

Associated files
mesh_comparison.lms
mesh_comparison.lsf

See also
Mesh refinement options 448

Comparison of the methods


Open mesh_comparison.lms and run the mesh_comparison.lsf script. The script will set the eigensolver
settings and run the sweep that has been set up in the sweeps and optimizations tasks to sweep over a range of
angles to rotate the waveguide with. It then plots both the effective index and loss values as a function of angle for
both mesh refinement mechanisms.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 455

The difference between the maximum and minimum effective index in the two mesh refinement cases is listed in the
table below. It is clear from these results that the conformal mesh technology delivers more reliable and consistent
results than staircasing.

Staircase Conformal
Maximum neff 2.42277 2.3932
Minimum neff 2.39408 2.39036
Change in neff 0.0286866 0.00284368

5.4.3.3.6.2 Using the non-uniform mesh


This section applies for FDTD Solutions and MODE Solutions' propagator, since both solvers use the finite-
difference-time-domain method. The simulation files provided in this section are .fsp files, but the same set up can
be created using the propagator in MODE Solutions.

Objective
The FDTD algorithm supports a graded mesh of Cartesian (rectangular) cells. This means that the size of the mesh
cells can vary as a function of position throughout the simulation region, as shown in the screenshot below. Such a
non-uniform mesh can make FDTD calculations more accurate, while requiring less memory and less computation
time than a comparable uniform mesh. There are two ways that the non-uniform mesh improves accuracy: through
reducing numerical dispersion and improving the resolution of interfaces.

2003 - 2016 Lumerical Solutions, Inc


456 Lumerical Knowledge Base

Solvers 101

FDTD
FDE
VarFDTD

In this topic
Using the non-uniform mesh 455
Testing convergence 457
Periodic structures and non-uniform meshing
458

Reduced Numerical Dispersion


Numerical dispersion is an artifact resulting from the discrete spatial sampling of the FDTD mesh. This means that
for a coarse mesh, the speed of light on the FDTD mesh may depart slightly from the exact value of the speed of
light in the material being simulated. Furthermore, the speed of light becomes slightly anisotropic, in that it depends
on the direction of propagation of the light relative to the mesh. The critical parameter that affects numerical
dispersion is N = lambda_0/(n D) where lambda_0 is the free space wavelength, n is the refractive index and D is the
FDTD mesh cell size. N represents the number of mesh cells per wavelength, and the numerical dispersion artifact
becomes negligible as N becomes large. If the refractive index, n, is complex, then both the real and imaginary parts
are considered to ensure that it has enough points per wavelength and enough points per decay length for accurate
modeling.

The automesh feature automatically configures the non-uniform mesh to minimize the effects of numerical
dispersion. In the usual use case, the user simply chooses a setting on the accuracy slider, which ranges in value
from 1 to 8. A value of 1 creates a coarse mesh (corresponding to a small N), giving the fastest and lowest memory
simulations but also introduces some (several percent) error due to the numerical dispersion artifact. At the other
end of the scale, a setting of 8 creates a very fine mesh (N is large), requiring more time and memory, while ensuring
that numerical dispersion is a negligible contribution to errors in virtually all situations. Simulation accuracy and
computational resource requirements can be traded off in this way. For most applications, a setting of between 2
and 5 on the accuracy slider is sufficiently accurate. For details on how the slider values differ, see Mesh settings
tab 443 .

Ability to accurately resolve interfaces


Many optical structures have properties that are critically sensitive to the precise locations of material interfaces.
This is particularly true of structures that have resonant characteristics or high index contrast interfaces. The non-
uniform mesh makes it possible to take into account the precise geometric location of these interfaces by using fine
mesh cells in regions where the interfaces are important and larger mesh cells in bulk regions where there are no
important interfaces as with homogeneous materials.

Lumerical Solutions provides special mesh objects termed "mesh override" objects that enable the user to indicate
where the interfaces are physically significant to the problem. The automesh feature, which otherwise operates as it
normally does, will then also take into account the override regions, as well as continuing to reduce numerical
dispersion throughout the simulation volume. The mesh override feature is particularly useful for structures with
metallic interfaces.

Convergence testing example


See the following page for a simple convergence testing example.

Periodic structures
See the last page in this section for information.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 457

Objective
In this section we will show in a simple example how to test convergence using the mesh accuracy slider. The
example uses a Fabry-Perot resonator, for which the analytic solution can be easily calculated. The desired
calculated result is the broadband transmission and reflection spectrum from a 500 nm thick layer of silicon. The
transmission and reflection spectrum is measured from 400 nm to 2000 nm in a single simulation.

Solvers 101

FDTD
FDE
VarFDTD

In this topic
Using the non-uniform mesh 455
Testing convergence 457
Periodic structures and non-uniform meshing
458

Associated files
usr_fabry_perot_Si.fsp
usr_fabry_perot_Si.lsf

Convergence as a function of the mesh accuracy slider


To reproduce these results, open the simulation file and run the associated script.

The reflection and transmission spectra are very complex. A comparison with the analytic result for a mesh
accuracy setting of 4 is shown below. Already with this setting, there is very good agreement between the results.

R and T for a mesh accuracy of 4 Difference with analytic result for mesh accuracy of 4

The maximum difference across the entire wavelength spectrum between the analytic result and that simulated using
FDTD Solutions is plotted below as a function of the mesh accuracy setting. It is clear that the numerical dispersion
is no longer contributing significantly to the error for a mesh accuracy setting of 5 or more, where the maximum
difference between simulated and analytic results from 400 nm to 2000 nm is well below 0.01 and becomes
dominated by other sources. For many applications a setting of 3 to 5 would be sufficient.

2003 - 2016 Lumerical Solutions, Inc


458 Lumerical Knowledge Base

Tip: Mesh override region


One source of error in these simulations is the mesh size near the interface. A smaller mesh at the interface would
allow the simulation to more accurately resolve exact position of the interface, leading to more accurate results.
Mesh override region could be added to the simulation to force a smaller mesh at the interfaces.

Summary
Convergence testing with the mesh accuracy setting makes it possible to determine the best tradeoff between
simulation accuracy, speed and memory requirements.

The non-uniform mesh generation does not necessarily produce meshes that automatically match the periodicity of
the physical structure. In some cases, such as high Q photonic crystal micro-cavities, using a mesh that has the
same periodicity as the physical structure being simulated is better for numerical accuracy. In this case, a mesh
override region can be used to ensure that a/D = N where a is the period, D is the mesh cell size and N is an integer.

To insert mesh override regions, select the Mesh option of the Simulation button.

The mesh override regions allows you to set dx, dy and dz over a particular region. For example, if you have a
triangular lattice PC in the x-y plane, with a lattice constant of 1 micron. You could use the following settings for a
mesh override regions that covers the entire simulation region in x and y. Note that dx = 1/20 microns, while dy =
sqrt(3)/2/20 microns. The simulation region has an x-span of 10 microns and a y span of 10*sqrt(3)/2 microns.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 459

By choosing to not use "override z mesh", the default non-uniform mesh in the z-direction will be generated.

5.4.3.3.7 Using the boundary conditions tab


The boundary conditions that are supported by FDTD/MODE Solutions 101 are listed below.

PML 460

Perfectly matched layer (PML)1 boundaries absorb electromagnetic waves incident upon them. They essentially
model open (or reflectionless) boundaries. In FDTD and varFDTD simulation regions, the user can directly specify all
the parameters that control their absorption properties including the number of layers. To facilitate the selection of
PML parameters, a number of profiles (or predefined sets of parameters) are available under the boundary conditions
tab. In most simulation scenarios, the user only needs to choose one of the predefined profiles and fine tune the
number of layers. PML boundaries perform best when the surrounding structures extend completely through the
boundary condition region. This will be the default behavior of structures whether or not they were drawn to end
inside or outside the PML region.
1 J. P. Berenger, Perfectly Matched Layer (PML) for Computational Electromagnetics.
Morgan & Claypool Publishers, 2007.

Metal 464

Metal boundary conditions are used to specify boundaries that behave as a Perfect Electric Conductor (PCE). The
component of the electric field parallel to a metal (PCE) boundary is zero; the component of the magnetic field H
perpendicular to a metal (PEC) boundary is also zero. Metal boundaries are perfectly reflecting, allowing no energy
to escape the simulation volume along that boundary. In the FDE solver, metal BC is the default setting 464 .

PMC
Perfect Magnetic Conductor (PMC) boundary conditions are the magnetic equivalent of the metal (PCE) boundaries.
The component of the magnetic field H parallel to a PMC boundary is zero; the component of the electric field
perpendicular to a PMC boundary is also zero.

2003 - 2016 Lumerical Solutions, Inc


460 Lumerical Knowledge Base

Periodic 478

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 (FDTD/varFDTD) 471

Bloch BC should be used when the structures and the EM fields are periodic, but a phase shift exists between each
period. Bloch boundary conditions are used in FDTD Solutions and propagator simulations 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.

note: if you choose BFAST plane wave source 590 , the Bloch BCs will be automatically overridden and use its
built_in boundary conditions.

Symmetric / Anti-Symmetric 466

Symmetric/anti-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. On the other hand, antisymmetric boundaries are anti-
mirrors for the electric field, and mirrors for the magnetic field. Careful consideration must be given to whether
symmetric or anti-symmetric 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 anti-symmetric boundary conditions can be found in Choosing between symmetric
and anti-symmetric BCs 466 .

ALLOW SYMMETRY ON ALL BOUNDARIES: Allows symmetric boundary conditions with periodic structures (this
option is not available in the boundary condition tab of mode sources and mode expansion monitors).

5.4.3.3.7.1 PML boundary conditions

Objective
This section discusses the issues that must be taken into consideration when employing perfectly matched layer
(PML) absorbing boundaries. A new PML boundary condition formulation was introduced in the 2015a release of the
FDTD and varFDTD solvers. The new formulation is based on the stretched coordinate formulation proposed by
Gedney and Zhao.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 461

Solvers 101

FDTD
FDE
VarFDTD

See also
Simulation 414
Extending structures through PML 368

Reference
[1] J. P. Berenger, Perfectly Matched Layer
(PML) for Computational Electromagnetics.
Morgan & Claypool Publishers, 2007.
[2] S. D. Gedney and B. Zhao, An Auxiliary
Differential Equation Formulation for the
Complex-Frequency Shifted PML, IEEE
Trans. on Antennas & Propagat., vol. 58, no.
3, 2010.

Introduction
By construction, PML absorbing boundary conditions are impedance matched to the simulation region and its
materials 1. This allows them to absorb light waves (both propagating and evanescent) with minimal reflections. An
ideal PML boundary produces zero reflections, however, in practice, there will always be small reflections due to the
discretization of the underlying PML equations. Furthermore, as a consequence of using finite difference
approximations to discretize the PML equations, there is some chance of producing numerical instabilities 2. The
goal of this section is to outline best practices for minimizing reflection errors and getting rid of numerical instabilities
without increasing simulation times unnecessarily.

2003 - 2016 Lumerical Solutions, Inc


462 Lumerical Knowledge Base

PML Type
A new PML boundary condition formulation was introduced in the 2015a release of the FDTD and varFDTD solvers.
The new formulation is based on the stretched coordinate formulation proposed by Gedney and Zhao2. The
previously employed PML formulation (based on a uniaxial anisotropic material formulation) can still be used, and
any project file that was created using the old PML formulation will continue to use it unless the PML type is
updated at the top of the PML settings table.

PML Profiles
In FDTD or varFDTD simulation regions, the user can directly specify all the parameters that control the absorption
properties of the selected PML boundaries (see the screenshot on the right). To facilitate the selection of PML
parameters, a number of profiles are available on the PML settings table under the boundary conditions tab. Under
most simulation scenarios, the user only needs to choose one of the predefined profiles (standard, stabilized, steep
angle and custom) and fine tune the number of layers. For all profiles, increasing the number of layers will usually
lead to lower reflections. Having said that, each profile has a different numerical behavior and was designed with a
particular application in mind.

PML Profile options


Standard
The standard profile was designed to provide good overall absorption with a relatively small number of layers.
Large numbers of PML layers can significantly increase simulation times, so it is suggested to try this profile
before considering any of the remaining choices. If a simulation does not contain material boundaries that cut
through PML regions, this profile will almost certainly be the most sensible choice. In general, PML
boundaries perform best when structures extend completely through the PML region. Whenever material
interfaces cut through a PML region, it may be necessary to employ the stabilized profile.

Stabilized
When material boundaries cut through PML regions, there is some chance that numerical instabilities will

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 463

appear. These usually manifest themselves as a localized exponential growth of the field amplitudes inside the
PML regions (usually near material interfaces). Most numerical instabilities that can occur inside PML regions
will go away with the use of this profile, however, this profile will require a higher number of PML layers than
the standard profile to achieve the same absorption performance. The stabilized profile was designed to provide
enhanced stability at the expense of having to increase the number of PML layers.

Steep Angle
This profile is very similar to the standard profile, and it is meant to be used when PML boundaries are
combined with periodic boundary conditions. It is designed to provide enhanced absorption in situations where
light travels in directions that are nearly parallel to PML boundaries. This profile is usually less absorptive than
the standard profile at very coarse discretizations (less than ten points per wavelength).

Custom
The standard, stabilized and steep anlge profiles have fixed PML parameters. The custom profile allows users
to experiment by giving the user full control over all the PML parameter values. The initial values of the custom
profile are those of the standard profile.

Setting PML param eters for boundaries in all diections

Using Different Profiles for Different Boundaries


PML profiles can be set individually for each PML boundary. This option can be enabled by un-checking the option
"SAME SETTINGS ON ALL BOUNDARIES" at the top of the PML settings table (see the screenshot on the right).
This option allows users to make changes - like increasing the number of layers - only on the boundaries that
actually need them.

Using different PML profiles for different boundaries can significantly reduce simulation times. The example on the
right shows the PML settings table for a 3D simulation where a stabilized profile is only needed on the x min
boundary. Using the stabilized profile on all boundaries would lead to much longer simulation times, so it is
recommended to increase the number of layers only on the boundaries that actually need them.

FDE vs. varFDTD and FDTD Solvers


In FDE simulation regions, the user can also specify the parameters that control the absorption properties of PML

2003 - 2016 Lumerical Solutions, Inc


464 Lumerical Knowledge Base

boundaries. From the onset, the FDE solver has employed a stretched coordinate PML formulation. Unlike the FDTD
and varFDTD solvers, the FDE solver does not come with predefined profiles, and it employs a fixed number of
layers.

PML Parameters
Unlike conventional boundary conditions, PML boundaries have a finite thickness. In other words, they occupy a
finite volume that surrounds the simulation region. It is within this volume that the absorption of light happens.
LAYERS: For discretization purposes, PML regions are divided into layers.
KAPPA, SIGMA, ALPHA : The absorption properties of PML regions are controlled by three parameters. Their
definition can be found in the second reference at the top of this page. Kappa is unitless by definition, but sigma
and alpha must be entered into the PML settings table as normalized unitless values. Kappa, sigma and alpha are
all graded inside the PML regions using polynomial functions. Parameter alpha is sometimes described as a
complex frequency shift (CFS) in the literature2. Its main role is to improve numerical stability. Increasing the ratio
alpha / sigma will make a a PML boundary more stable, but it will reduce its absorption effectiveness; this is why
the stabilized profile requires a larger number of layers. To recover the S.I. unit values of alpha and sigma, it is
necessary to multiply by twice the permittivity of free space and divide by the time step employed in the
simulation.
POLYNOMIAL: It specifies the order of the polynomial used to grade kappa and sigma.
ALPHA POLYNOMIAL: It specifies the order of the polynomial used to grade alpha.
MIN LAYERS, MAX LAYERS: They enforce a sensible range of values for the number of PML layers.

5.4.3.3.7.2 Starting w ith metal BCs

Objective
This page describes why it is best to start most Eigenmode Solver simulations with Metal boundary conditions (BC),
even though PML boundaries may be the more obvious choice.

Solvers 101

FDE
VarFDTD

Associated files
usr_start_metal_bc.lms
usr_start_metal_bc.lsf

See also
Simulation 414

Description
In most simulations, the device substrate and other surrounding materials extend far beyond edge of the simulation.
Therefore, the most obvious choice of BC's is PML, which will absorb fields at the simulation boundary. Metal BC's
may seem like a poor choice because the real device is not surrounded by a metal box. In spite of this initial

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 465

impression, we usually recommend starting with Metal BC's. Some simulations may eventually require PML, but a
large fraction can be done entirely with Metal boundaries.

If the modal fields are very small at the edge of the simulation, then the choice of BC's is basically irrelevant (the BC
doesn't matter when the field at the boundary is zero). In such cases, we can select the most numerically efficient
BC, rather than the most physically correct BC. Metal boundaries have the following advantages over PML
boundaries:
1. Metal BC's make the simulation faster than PML.
2. PML boundaries can introduce unphysical 'PML' modes.
3. PML boundaries can introduce very small amounts of gain or loss in an otherwise lossless system.

As long as the modal fields are very small at the edge of the simulation region, Metal boundary conditions are
usually the best choice. They will give the same result as PML, but the simulation will not suffer from the problems
described above.

PML boundaries are required for modes that do extend to the edge of the simulation region. This is most likely to
occur for modes that are not completely confined to the structure and have some radiative loss. For example, when
studying bent waveguides, PML should be used because the bend can cause radiative loss.

Example
The associated file usr_start_metal_bc.lms has a very simple oval shaped waveguide. The script
usr_start_metal_bc.lsf will calculate the effective index and mode profile of this structure using both Metal
and PML BC's. As the following figures show, the mode profile and effective index from the two tests are very similar.
However there are some interesting differences to notice:
The Metal simulation runs much faster than the PML simulation.
The mode profiles are slightly different, but these differences are only visible on a log scale. Some small
differences are expected because the Metal BC's require that the fields go to zero at the edge of the simulation,
while PML does not.
The PML simulation shows that mode1 has a very small amount of loss (the imaginary part of the index). However,
this value is numerically equivalent to zero.

Mode profile |E|^2 Mode profile log19(|E|^2)


Metal
BC

2003 - 2016 Lumerical Solutions, Inc


466 Lumerical Knowledge Base

PML BC

5.4.3.3.7.3 Symmetric and anti-symmetric BCs

Objective
Symmetry boundary conditions can be used whenever the EM fields have a plane of symmetry through the middle of
the simulation region. By taking advantage of this symmetry, the simulation volume and time can be reduced by
factors of 2, 4 or 8.

This topic describes the difference between symmetric and anti-symmetric boundary conditions, and how to select
the appropriate boundary for your simulation.

Solvers 101

FDTD
FDE
VarFDTD
In this topic
Selecting the correct symmetry option 469
Fields at the symmetry boundary 467
Reflection symmetry rules 466
Symmetric Boundary Conditions for Periodic
Structures 469
See also
Simulation 414

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 467

How to: Take advantage of sym m etry (YouTube)


Alternative video source in Mandarin, click here

Fields at the symmetry boundary


When the EM fields have a plane of symmetry, some field components must be zero at the plane of symmetry.
Symmetry boundary conditions are implemented by forcing the appropriate field components to zero. The following
table lists the field components that are zero for each symmetry option.

Symmetric Boundary Anti-Symmetric Boundary


Normal Electric Field ZERO
Tangential Electric Field ZERO
Normal Magnetic Field ZERO
Tangential Magnetic Field ZERO

The non-zero field components are shown in the following figure. Note that the blue arrows are electric field and the
green arrows are magnetic field.

2003 - 2016 Lumerical Solutions, Inc


468 Lumerical Knowledge Base

Reflection symmetry rules


The electric and magnetic fields will obey certain symmetry rules with respect to reflections through the plane of
symmetry. The reflection symmetry rules are shown in the figure below.

The above symmetry rules are helpful when determining the symmetry of modes found with the mode source, and
resonant modes of cavities. The following figure shows the Real part of Ex and Ey of a mode that was calculated
with the Mode source. The direction of propagation is +Z. Notice that Ex has the same sign on each half of the
simulation region. Ey has the opposite sign on each half. Ey also goes through zero along the plane of symmetry.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 469

Using the above symmetry rules, we can determine that there is a plane of anti-symmetry at X=0, and a plane of
symmetry at Y=0. Therefore, the x min boundary should be set to anti-symmetric and the y-min boundary condition
should be set to symmetric.

Symmetric Boundary Conditions for Periodic Structures


If the EM fields through a periodic structure have an plane of symmetry or anti-symmetry in the middle of a period of
the structure, then set the boundary conditions as follows:

1) select the option allow symmetry on all boundary conditions


2) set the minimum and maximum boundary conditions to be either symmetric or anti-symmetric depending on the
symmetry rules given above (in practice the boundary conditions are usually either both symmetric or both anti-
symmetric).

Referring to the example below, changing from Setting A to Setting B will preserve periodicity while reducing the
computation time needed by about 4x. Again this only applies if the structure and fields are BOTH symmetric and
periodic.

Selecting the correct symmetry option with sources


This section applies for FDTD Solutions and MODE Solutions' propagator, where sources are used to inject light into
the simulation region.

Most sources show their Electric or Magnetic polarization with colored arrows.
Electric field polarization is Blue
Magnetic field polarization is Green

In the image to the right, the electric dipole is


on the left and the magnetic dipole is on the
right.

2003 - 2016 Lumerical Solutions, Inc


470 Lumerical Knowledge Base

Symmetry boundary conditions use a similar color scheme.


Symmetric BC are Blue
Anti-Symmetric are Green.

The following figure shows how to select the correct symmetry condition based on the source polarization.

If the source polarization is tangential to the plane of symmetry, select the symmetry option with the same
color.
If the source polarization is normal to the plane of symmetry, select the symmetry option with the opposite
color.

Examples

In the following example with the triangular structure, there is one plane of symmetry in X. The source polarization
(Blue) is tangential to the X boundary. Therefore, we use Symmetric for the X min boundary condition. This
simulation will run 2x faster than the equivalent simulation without any symmetry settings. Notice that the blue arrow
of the source is along the edge of the region with the same color.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 471

This next example shows a simulation with two planes of symmetry (in X and Y) The source polarization (Blue) is
normal to the X boundary, and tangential to the Y boundary. Therefore, use Anti-Symmetric for the X min boundary
and Symmetric for the Y min boundary. The X and Y max boundary condition do not need to be modified. This
simulation will run 4x faster than the equivalent simulation without symmetry boundary conditions. Notice that the
blue arrow of the source is along the edge of the region with the same color, and sticking into the region with
opposite color following the rules outlined above.

Warning: Using the wrong symmetry option


When using symmetry boundary conditions, it is easy to select the wrong symmetry option. There will be no
warning message if the wrong symmetry option is selected, but the simulation results will be completely wrong.
The easiest way to confirm that you have the correct option is by re-running the simulation without symmetry
boundary conditions. Both simulations should give the same results. If they don't, you may have selected the
wrong symmetry option.

Note: Simulation span


Do not change the size of the simulation region when using symmetry. If symmetry boundary conditions are
selected, half of the simulation region will automatically be shaded in blue or green, indicating the portion of the
simulation region that will not be directly simulated.

Note: Unfolding data


Script commands like getdata, getelectric or getmagnetic automatically unfold the field data according
to the symmetry rules of the boundary condition. This makes it easy to create an image monitor the data over the
entire simulation region, even though only half the simulation region was actually simulated. However, there will
be no data recorded by the monitor if it is entirely in the shaded region. Some analysis group may not work when
symmetry is applied but some of them contain script commands to properly unfold the field data.

5.4.3.3.7.4 Bloch boundary conditions

Objective
This section descriBloch Boundary Conditions (BC's), when they are required, and how they are different from
periodic BC.

Bloch boundary conditions are used in a variety of situations, but the most common is in simulations of periodic
structures that are illuminated with a plane wave source propagating at an angle (as shown in the screenshot below).
If a BFAST plane wave 590 is used, this Bloch BCs are automatically overridden by use of its own built_in BCs.

2003 - 2016 Lumerical Solutions, Inc


472 Lumerical Knowledge Base

Solvers 101

FDTD
FDE
VarFDTD

See also
Simulation 414
Periodic boundary conditions 478
Broadband injection angles 536
PML reflection at angles 460
Plane waves - Edge effects 526

Periodic structures illuminated by the plane wave source


Bloch BC's are easiest to understand when compared with Periodic 478 BC's for applications where a periodic
structure is illuminated by a plane wave source, as shown in the above screenshot. Periodic BC's simply copy the
fields at one edge of the simulation region and re-inject them at the other edge. Bloch BC's are very similar, but
while copying the fields from one edge to the other they also apply a phase correction to the fields.
r r r
E x _ min = e - iax kb lo ch E x _ max
r r r
E x _ max = e iax kb lo ch E x _ min

The need for this phase correction is easy to understand when considering a plane wave propagating at an angle as
shown in the following movies. When the propagation is at an angle, the fields from one period to the next are not
exactly periodic: They will be out of phase by some amount. The Bloch BC's correct for this factor.

Movie of plane wave propagating at an angle


Movie of Ex fields from a
simulation of a plane wave
propagating in the Z direction
at a 45 degree angle of
incidence in free space.
Bloch BC's are used in the X
and Y directions.

This simulation is setup


correctly. A uniform wave
front at an angle of 45
degrees is visible, as
expected.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 473

INCORRECT SETUP!
Same as above, but with
periodic BC in the X and Y
directions.

This simulation shows a


common setup error, where
periodic BC have been used.
This is not correct since k x of
the plane wave is non-zero.

A similar error will occur if


the "set based on source
angle" is not enabled.
This error causes scattering
at the simulation boundary.

Other uses, including bandstructure calculations


Bloch BC's are useful in other situations where setting the in-plane wavevector is important. For example, they are
used extensively in Bandstructure 1843 calculations.

Tips and additional information


Can Bloch BC's be used for propagation at normal incidence
Bloch BC's can be understood as a more general form of Periodic BC's. Simulations that use Periodic BC's would
continue to give correct results if the Periodic BC's were replaced with Bloch BC's. In such cases, the Bloch BC's
will apply a phase correction of zero degree's, which is equivalent to simply copying the fields from one edge to the
other. However, as described in the Computational cost section, using Bloch BC's requires more memory and time,
compared to using Periodic BC's.

Computational cost
Simulations that use Bloch BC's required up to 2x the memory and time compared to an equivalent simulation
without Bloch BC's. This increase occurs because the simulation must use complex valued time domain fields,
rather than the default choice of real valued time domain fields.

Implications of using complex valued time domain fields


As stated in the Computational cost section, simulations using Bloch BC's used complex valued time domain fields.
In addition to increasing the computational cost of the simulation, this can affect the type of data collected by some
monitors:

2003 - 2016 Lumerical Solutions, Inc


474 Lumerical Knowledge Base

Index monitors: No change.


Frequency domain field monitors: No change.
Time domain field monitors: Recorded data will be complex, rather than real. In some situations, having complex
valued data is helpful. In situations where it is not desired, simply take the real part of the monitor data.
Time domain movie monitors: When the 'Intensity' option is selected, movies will look slightly different. Rather than
seeing every oscillation of the fields, only the envelope function will be visible. This is easy to understand in the
following example:
The blue line shows a sin wave modulated by a Equivalent complex valued field
gaussian pulse. Ex=e^(iwt)
The green line shows |E|^2 of this signal (Ex1 in the
following code). This is what you would see in an
'Intensity' movie from a simulation using real valued
fields.
The red line shows |E|^2 of the complex version of this
signal (Ex2 in the following code). This is what you
would see in an 'Intensity' movie from a simulation using
complex valued fields.

# Code to reproduce figure


t=linspace(0,20,1000);
w=10;

Ex1=sin(w*t)*exp(-(t-10)^2/5);
Ex2=exp(1i*w*t)*exp(-(t-10)^2/5);

plot(t,real(Ex1),abs(Ex1)^2,abs(Ex2)^2);
legend("Real Ex","|Ex_real_field|^2","|Ex_complex_field|^2");

Broadband injection for sources at an angle


As explained above, Bloch BC's apply a phase correction to the fields. This has important consequences for
broadband simulations, as explained on the Plane waves - Angled injection 529 page. Additional information can be
found on the Bloch BCs in broadband sweeps 475 page. For broadband angled injection, the BFAST plane wave 590
is recommended.

Automatic calculation of the Bloch vector when using the plane wave source
When doing simulations that involve Bloch BC and plane waves at an angle, "set based on source angle" option
should be enabled (it is by default), as shown in the following figure. This setting is only accessible when using
Bloch BC. If you disable this option, you have to input kx, ky, and kz manually. Manually setting the bloch vector is
important for bandstructure simulations.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 475

Objective
This section describes how to do broadband parameter sweeps of the source angle of incidence with Bloch boundary
conditions, when you want to do so.

Solvers 101

FDTD
FDE
VarFDTD

Associated files
usr_bloch_angle_sweep.fsp
usr_bloch_angle_sweep.lsf

See also
Simulation 414
Bloch boundary conditions 471
Broadband injection angles 536
PML reflection at angles 460

When using bloch boundary conditions with a broadband plane wave source, the angle of incidence changes as a
function of frequency, as described in the Bloch BCs in broadband simulations 471 section. This makes broadband
parameter sweeps of the source angle of incidence difficult because each simulation will return data at a different set
of incident angles for each frequency.

Imagine that we want to calculate the transmission of a structure for wavelengths between 300-600 THz (0.5-1um)
with a source angle of incidence between 10-45 degrees. One option is to do a series of single frequency
simulations. The problem with this solution is the large number of simulations that will be required, since it will

2003 - 2016 Lumerical Solutions, Inc


476 Lumerical Knowledge Base

require a 2D parameter sweep (wavelength and source angle). An alternative solution is to do a series of broadband
simulations. The advantage here is that we only need a 1D parameter sweep (source angle), since each simulation
will return broadband data. The complication is that the source angle of incidence will be different at each frequency.
Therefore, an extra step will be required to interpolate the data onto a common source angle vector.

In the associated example, we calculate the broadband (300-600 THz) transmission of a structure for plane waves
incident at 10-45 degrees. The script will run a 1D parameter sweep over a range of incidence angles. The following
figure shows the locations of the data returned by the parameter sweep.

Note
The technique in this example has the obvious benefit of making your simulations faster, by allowing you to run
broadband simulations. However, it also adds a significant amount of complexity to your simulations. For your
initial simulations, it may be easier to simply run the full 2D sweep rather than try to use this technique.

Each line of data is from a single simulation. As you can see, the effective source angle theta changes as a function
of frequency within each simulation. This makes further analysis and plotting very difficult. The solution is to
interpolate this data onto a uniform grid, as shown in the next figure. The data is interpolated to the uniform grid
through a series of 1D interpolations (one for each frequency).

The final result, power transmission vs wavelength and angle of incidence is shown below. The locations of the
original data have been superimposed on the image.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 477

This simulation simply calculates the power transmission through an interface. Using Snell's law, we calculate the
critical angle for a 2:1 dielectric interface to be 30 degrees. There should be no wavelength dependence. The above
figure suggests this result, although there is some noise because of the resolution of the sweep. The above results
could be made smoother by increasing the number of points in the sweep.

more simulations to obtain better resolutions

Note, for this example, some incidence angles are larger than the critical angle, BFAST 590 cannot be used. If the
incidence is in the opposite direction, users can use BFAST and no need to sweep.

Tips
Simulation bandwidth: In most cases, the simulation bandwidth is inherited from the source frequency range. The
simulation bandwidth affects the simulation in many ways, including the mesh size, material fits, etc. In this case,
we want these aspects of the simulation setup to be the same for each point in the sweep, even though the
source range is changing. For this reason, the script manually sets the simulation bandwidth (in the FDTD region -
advanced tab properties), rather than allowing it to be inherited from the source.

2003 - 2016 Lumerical Solutions, Inc


478 Lumerical Knowledge Base

The monitors in this example always collect data over the full wavelength range (300-600THz), even though the
source range is much smaller in some situations. This makes the data analysis easier, but it can lead to some
incorrect results for data collected outside the range of frequencies injected by the source (if the source doesn't
inject any power at some frequency, the results at that frequency can't be accurate). For the most part, this is not
a problem, since those data points are outside the range of interest. However, it can cause some small problems
near the boundaries of the data. In this particular example, you will see some errors in the above results near
theta=10, f=360THz due to this problem. This problem can be minimized by increasing the number of points in the
sweep. It can also be completely avoided by slightly increasing the source angle range to slightly more than the
actual range of interest.

5.4.3.3.7.5 Periodic boundary conditions


This page describes Periodic Boundary Conditions (BC's).

Solvers 101

FDTD
FDE
VarFDTD
See also
Bloch boundary conditions 471
Symmetric and anti-symmetric BCs 466

Plasmonic application example 1902

When studying periodic systems, Periodic BC's allow you to calculate the response of the entire system by only
simulating one unit cell. Periodic BC's are relatively straightforward to use in your simulation: simply set the
simulation span to be one unit cell wide and select Periodic BC's for that boundary. When the simulation runs, the
Periodic BC's simply copy the EM fields that occur at one side of the simulation and inject them at the other side.

The most important detail to remember is that when using Periodic BC's, everything in the system must be periodic:
both the the physical structure AND the EM fields. A common source of error is to use periodic boundary
conditions in systems where the structure is periodic, but the EM fields are not. Examples include:
A periodic structure is illuminated by a plane wave propagating at an angle. The fields will not be quite periodic in
this case, as there will be a phase difference between each period of the device. Use Bloch BC's 471 instead.
A periodic structure is excited by a single dipole source, such as in OLED 2682 simulations. In this case the
system is not periodic because there is only one dipole, not one dipole per period.

Movie of Ex fields from a


simulation of a plane wave
propagating in the Z direction
at normal incidence in free
space. Periodic BC's are
used in the X and Y
directions.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 479

Additional Tips
Periodic BC's are most often used with the Plane 521 wave source.
If the Plane wave source is injecting at an angle, then the fields will not be periodic (there will be a phase
difference between each period). Use Bloch BC's 471 instead to get single frequency result, or use BFAST 590 to
get broadband result.
For systems that are both periodic and have symmetry, select symmetry (or anti-symmetry) on both boundaries.
This allows you to simulate only 1/2 of one unit cell. See Symmetric and anti-symmetric BCs 466 for details.
For best performance, enough of the structure should be drawn in the CAD so that it extends through the
boundary condition region (the one mesh cell thick boundary region drawn in a light blue color. This ensures that
the material properties are correctly defined in the boundary condition region.

5.4.3.4 Analysis

The button includes options to open the object library 210 with a few preset categories. Analysis objects
allow you to group monitors (similar to structure groups) and to analyze that monitor data. For example, a set of
393

monitors can be grouped together to form a closed box. From the raw monitor data, the group can calculate
quantities like cross sections and far field projections.

Farfield Projections 813

The analysis groups in the Farfield projections category provide options to calculate the farfields using the nearfield
data of monitors.
This is only available in FDTD Solutions.

Optical Power 824

This category includes analysis groups for calculation of transmission of power through a monitor or box of monitors
as well as options to calculate absorption.

Resonators and modal analysis 843

This category includes analysis groups for post processing of resonator simulation results to calculate quantities
such as the Q factor as well as modal area/volume anaylsis.

More choices 798

There are many more categories of components available that are constantly being updated.

2003 - 2016 Lumerical Solutions, Inc


480 Lumerical Knowledge Base

5.4.3.5 Import (Optical)

The button includes options to import from a variety of formats:

STL 487
This page provides an example to show how to import STL-formatted files into the layout editor.

GDSII 480
This file format is commonly used to store 2-dimensional geometric data.

Surfaces 489
Tthis tool is useful for importing data 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.

(n,k) material 492


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.

Binary import 496


This section describes the data format for importing binary data to define an object. In this binary import, the data
should have values of 1 or 0, indicating that the object is or is not present. Binary import

Images 499
Imports images either in JPG or PNG format . For example, this tool is useful for importing from a scanning electron
microscope (SEM) image. In three dimensions, the imported data is extruded along the z axis.

CSV 502
Imports spatial liquid crystal (LC) orientation data from a CSV file. This file is typically created with TechWiz LCD
from Sanayi System Co., Ltd. (http://sanayisystem.com/) and makes it easy to import spatial information on LC
orientation from TechWiz LCD simulations.

Obfuscating import data 508


In some cases it may be necessary for a party A to generate binary or n,k import data and send it to party B. Party
A may not want party B to be able to see the actual structure that is being simulated. This section explains a
capability that can solve this problem.

Structure Import and Export Methods


5.4.3.5.1 Import and export - GDSII

Objective
This page provides an example to show that a GDSII file can be imported and exported. The GDSII import function
allows you to import structures from a GDSII file into the layout editor. The GDSII file format is commonly used to
store 2-dimensional geometric data. This data can be directly imported into a 2D layout environment, or it can be
used to import 3D objects into a 3D layout environment by extruding the 2D data in the Z dimension.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 481

A real GDSII example 483 can be found on the next page. Users may also find the built-in Layer builder 372 function
useful when importing and exporting GDS files.

Solvers 101

FDTD
FDE
EME
VarFDTD
DEVICE
Associated files
GDS_export_import.lsf
GDS_export.gds

See also
Structures 318
GDSII import/export 1677 script commands
Layer builder 372
Real GDSII example 483
GDSII export automation 484

Characteristics of the GDSII file


Lumerical products support most, but not all features of the GDSII file format. Unsupported features should not
prevent the file from being imported, however, the results may not be as expected. The following table details
the supported and unsupported features.

Features Supported
General
Multiple cells in GDSII library file Yes
Layer numbers for drawing objects Yes

Primitives/Objects
Box/Rectangle Yes
Polygon Yes
Path Yes
Node No
Text No
Symbolic cell reference Yes
Array cell reference Yes

Advanced
Cell references in external library/file No
Magnifications in array and symbolic references Yes
Rotations and mirroring in array and symbolic Yes
references

Note: Path corners

2003 - 2016 Lumerical Solutions, Inc


482 Lumerical Knowledge Base

Path objects in GDSII files are piecewise linear lines plus a width and optionally some information on how
to handle corners and ends. In general, GDSII files support several types of corner style options (squared,
rounded, extended squared, etc). Our import function supports type 0 (squared ends flush to the end-point)
and will default to type 2 (square ends with 1/2 the width added to the end-point) for all other types.

Note: Flattened GDSII files


While we do include scale, rotate, flip, and automatic flattening of references, not all features of GDSII are
currently supported. If you run into any problems, you may have better results by flattening the file first.

GDSII file import


Import using GUI
GDSII import is initiated by accessing the IMPORT->GDSII option from the FILE menu, or by pressing the

Import GDS button located on the main toolbar. This will bring up a standard file browser, which will
allow you to select a file with the extension .gds or .db. Selecting a GDSII file will bring up the Single layer
GDSII Import window as shown below. A downloadable associated file GDS_export.gds can be used to test
the GUI import function.

The following 3 input parameters control how the GDSII data is imported:

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 layout environment. These structures are automatically inserted into 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 original number of layers. 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.

In the simple 'GDS_export.gds' example file, valid cell/layer combinations with structure information are:
Substrate / Layer 1
Si_polygon / Layer 2
Au_particle / Layer 3
Au_particle_array / Layer 3
Import using script command

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 483

The GDSII file can also be imported via script, the command gdsimport can be used, see stage 3 of the
associated files GDS_export_import.lsf for example. For more information of the script commands,
please visit Scripting - GDSII chapter 1677 .

GDSII file export


To export a graphical design to .gds format, the following commands can be used, see stage 2 of the
associated file GDS_export_import.lsf for example.

gdsopen, gdsclose, gdsbegincell, gdsendcell, gdsaddcircle, gdsaddpoly,


gdsaddrect, gdsaddref

The graphical information can be exported to the a .gds file in the current working directory. For more
information of the commands, please visit Reference Guide - GDSII chapter 1677 .

To automate the GDSII file export process, please visit the next page GDSII export automation 484

5.4.3.5.1.1 Real GDSII example

Objective
This page provides a simple but real GDSII example in silicon photonics.

Solvers 101

FDTD
FDE
EME
VarFDTD
DEVICE
Associated files
GDS_GC_Ring.gds
GDS_GC_Ring.lsf

See also
Structures 318
GDSII import/export 1677
script commands
Layer builder 372
GDSII export automation 484

Reference
[1] Lukas Chrostowski, Xu
Wang, Jonas Flueckiger,
Yichen Wu, Yun Wang,
Sahba Talebi Fard, "Impact of
Fabrication Non-Uniformity on
Chip-Scale Silicon Photonic
Integrated Circuits", Optical
Fiber Communication
Conference, pp. Th2A.37,
03/2014.
[2] Yun Wang, Xu Wang,
Jonas Flueckiger, Han Yun,
Wei Shi, Richard Bojko,
Nicolas A. F. Jaeger, and
Lukas Chrostowski, "Focusing
sub-wavelength grating
couplers with low back
reflections for rapid prototyping

2003 - 2016 Lumerical Solutions, Inc


484 Lumerical Knowledge Base

of silicon photonic circuits,"


Opt. Express 22, 20652-20662
(2014)
http://www.opticsinfobase.org/
oe/abstract.cfm?URI=oe-22-
17-20652

The circuit in the associated GDS_GC_Ring.gds file includes one racetrack ring resonator [1], two grating couplers
[2], and routing waveguides. Users can import the whole circuit, or the individual cells, into the simulation layout
using GUI, or using script commands such as the associated GDS_GC_Ring.lsf file.

Focusing sub-wavelength grating couplers with low back Ring resonator used to study the impact of
reflections for rapid prototyping of silicon photonic circuits. fabrication non-uniformity on silicon photonic chips.
Courtesy of the L. Chrostowski group at UBC. Courtesy of the L. Chrostowski group at UBC.

5.4.3.5.1.2 GDSII export automation

Objective
This page provides an example to automate the GDSII export process.

Solvers 101

FDTD
FDE
EME
VarFDTD
DEVICE
Associated files
GDS_auto_export.lsf
GDS_auto_export_add_cell_to_top.lsf
GDS_auto_export_check_type_and_create_cel
l.lsf
GDS_auto_export_find_layer.lsf
GDS_auto_export_test.fsp
GDS_auto_export_waveguide.lsf
output.gds

See also
Structures 318
GDSII import/export 1677 script commands
Layer builder 372
Real GDSII example 483

Currently, we can only export structures to GDSII using scripts. The basic GDSII export 1677 script commands have
very limited capabilities. Here we provide some advanced scripts that can automate the GDSII export process.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 485

Please find below the detailed instructions.

Step 1: download all the associated files (except the output.gds)

Step 2. open the simulation file GDS_auto_export_test.fsp. In this file, the structure group "export_to_GDS"
contains a list of primitive structure objects. We will export most of them, but not all - the surface, sphere, pyramid,
and disable objects will be ignored.

Step 3: open and run the script file GDS_auto_export.lsf. The scripts will create a GDSII file, in which the top
cell has the same name as the structure group and contains a list of subcells corresponding to each of the objects
within the structure group.

Users should only modify the scripts in the "User modification section", as shown below. In most cases, objects on
different layers have different positions and spans in the vertical direction; therefore, we use a matrix in the form of
[layer number, z, z span] to define the layer properties. For each object, the
GDS_auto_export_find_layer.lsf will find the right layer number based on its z and z span. Users can also
adjust the discretization resolution for circle, ring, custom, and waveguide objects.

#####################################################
# User modification section starts here

gds_output='output.gds'; # set output GDS file name


group_name='export_to_GDS'; # select the structure group to be exported

2003 - 2016 Lumerical Solutions, Inc


486 Lumerical Knowledge Base

# define layer properties


layer_def=[1, 0, 1e-6; 2, 0.25e-6, 0.5e-6; 3, -0.25e-6, 0.5e-6; 4, 0, 0.5e-6]; # layer nu
layer_no=size(layer_def);
layer_no=layer_no(1);

# optional settings
n_circle=64; # number of sides to use for circle approximation (64 by default).
n_ring=64; # number of slices to use for ring approximation (64 by default).
n_custom=64; # number of slices to use for custom approximation (64 by default).
n_wg=64; # number of slices to use for waveguide approximation (64 by default).

round_to_nm=0; # round the z and z span to the nearest integer of nm

# End of user modification section


#####################################################

Step 4: check the generated GDSII file using your layout tools (e.g., KLayout) or Lumerical CAD tools. As shown in
the image below, the top cell is "export_to_GDS" and includes a list of subcells on different layers.

Notes
1. Users should put the objects to be exported into a specific structure group. The objects here only mean physical
structures (i.e., do not include simulation regions, mesh, source, monitor, etc).
2. Users should define the output GDS name, the structure group name, the layer properties, and optional settings
in the "User modification section" of the GDS_auto_export.lsf script file.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 487

3. Currently, these scripts do not support hierarchy, so users should put all the physical structures directly within
the top structure group.
4. The scripts also require that all objects should have unique names.

5.4.3.5.2 Import - STL

Objective
This page provides an example to show how to import STL-formatted files into the layout editor.

STL (Standard Tessellation Language or STereoLithography) is a well-supported format for many 3D CAD products.
It is widely used for rapid prototyping and computer-aided manufacturing. STL files describe the surface geometry of
3D objects by triangular representation of the objects. The surface of the objects are broken into a series of
triangles. Each triangle is uniquely defined by its three vortices and the surface-normal vector.

STL files can be imported by selecting 'File' --> 'Import' --> 'STL'. Multiple STL objects, as shown below, can also be
imported by sequentially importing each file. Once imported, the STL-imported objects are treated as planar solid
objects in the layout editor.

The associated files below can be used to test the import. When imported, the assembly is recognized as a single
object. Alternatively, each part can be separately imported and assembled in the layout editor. In this case, each
part imported is treated as a separate object.

Solvers 101

FDTD
FDE
VarFDTD
DEVICE
Associated files
STL_import_assembly.stl (4 parts
in a single file)
part1, part2, part3, part4 (each
part in a separate file)

See also
Structures 318
GDSII import/export 1677

Layer builder 372


stlimport 1554

Notes:
1. Binary and ASCII compatible
Both Binary and ASCII STL files are recognized in the layout editor. However, Binary files are recommended
since they are smaller in size.

2. Length unit
An STL file does not contain any information about the length unit used in the CAD software where you created
the STL file. For example, a 30 (mm) x 30 (mm) x 30 (mm) cube in STL-format created in a CAD with a length
unit set to mm will be recognized as 30 (um) x 30 (um) x 30 (um) in size by default, see stlimport 1554 to
change the scaling factor. To avoid any size issues, it is recommended that you choose the right length unit in
the layout editor prior to importing STL files.

3. Material
An STL file can represent only one type of material. An STL-imported object cannot be subdivided into multiple

2003 - 2016 Lumerical Solutions, Inc


488 Lumerical Knowledge Base

pieces. Therefore, if there are multiple shapes (or groups of shapes) that require separate material definitions,
they should be created into different STL files.

4. Tolerance
STL files may be created with different levels of tolerance. A tight tolerance results in a large file with many
surface facets. These files take a long time to load and display. A looser tolerance results in fewer surface
facets. It is generally a good idea to start with a loose tolerance and increase it as necessary to achieve a
balance between the file size and surface refinement.

Edit Planar Solid tab


Geometry tab
X, Y, Z: The relative position of imported object from the origin of the layout editor.

Material tab
The material options are as follows:

MATERIAL: This field can be set to any material included in the material database. It is possible to include
new materials in the database, or edit the materials already included. See the material database section for
more information.
OVERRIDE MESH ORDER FROM MATERIAL DATABASE: Select to override the mesh order from the
material database and manually set a mesh order. The mesh order is used by the simulation engine to
select which material to use when two materials overlap. See the mesh order (optical) 271 or mesh order
(electrical) 271 section for more details.
MESH ORDER: Set the mesh order in this field if the OVERRIDE MESH ORDER FROM MATERIAL
DATABASE option is selected. If the option is not selected, the field displays the material's default mesh
order from the database. For example, a material of mesh order 1 will take precedence over a material of
mesh order 2.

The following only applies to MODE and FDTD Solutions:

If <Object defined dielectric> is selected, then the INDEX property must be set.
INDEX: The refractive index of the structure, when the material type is <Object defined dielectric>. The index
must be greater than one.
v Anisotropic index: To specify an anisotropic refractive index, use a semicolon to separate the diagonal
xx,yy,zz indices. Eg. 1;1.5;1
v Spatially varying index: It is possible to specify a spatially varying refractive index by entering an
equation of the variables x,y,z in this field. Eg. 2+0.1*x will create an object where the refractive index
increases in the X direction. The units of the spatial variables (x,y,z) must be set with the 'INDEX UNITS'
property described below. The variables x,y,z will be zero in the center of the object. When using an
equation in this field, consider using a mesh override region to control the simulation mesh size. For
more information on entering equations, see the Equation interpreter 214 section.
INDEX UNITS: Only relevant when specifying a spatially varying equation in the INDEX properly described
above. Specify the units (nm, um, m) of the x,y,z position variables.
GRID ATTRIBUTE NAME: Enter the name of the grid attribute that applies to this object, see the grid
attribute 253 section

The following only applies to DEVICE:

If the material chosen from the drop down menu is a binary alloy consisting of two semiconductors, then there
will be an additional property, namely, the "composition fraction" to set as well.

COMPOSITION FRACTION: This is x, the fraction of the semiconductor in the alloy. x can either take a fixed
value or vary.

The user can see which semiconductor has fraction x and which has fraction (1-x) shown in a line above this
drop down menu.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 489

FIXED: This means that fraction x will be a constant value between 0 and 1.
LINEAR X/Y/Z: This means that the composition fraction x will vary as a function x or y or z. In this case, user
can specify the min and max fraction values for the min and max spatial points and the fraction will be
interpolated linearly in between. x,y,z here are those of the unrotated object. x,y,z are local to the object.
EQUATION: The user can enter an equation for the fraction that varies with u,v and w. u is (x-x0), v is (y-y0)
and w is (z-z0) where x0, y0 and z0 are the center coordinates of the object. This means that u,v and w are
local to the object.

Rotations tab
Rotate objects by setting the following variables:

FIRST, SECOND, THIRD AXES: Select rotation axis. Up to three different rotations can be applied.
ROTATION 1,2,3: The rotation of the object in a clockwise direction about each axis, measured in degrees.

Graphical Rendering tab


The graphical rendering tab is used to change how objects are drawn in the layout editor. The options are:

RENDER TYPE: The options for drawing the objects are detailed or wireframe. Detailed objects are shaded
and their transparency can be set using OVERRIDE COLOR OPACITY FROM MATERIAL DATABASE.
DETAIL: This is a slider which takes values between 0 and 1. By default it is set to 0.5. Higher detail shows
more detail, but increases the time required to draw objects. This setting has no effect on the simulation.
OVERRIDE COLOR OPACITY FROM MATERIAL DATABASE: When unselected the opacity is determined
from the material database. When selected, you can specify a value for ALPHA between 0 (transparent) and
1 (opaque) for the object, depending on how transparent you want the object to be.

5.4.3.5.3 Import object - Surfaces

Objective
This section describes the data format for importing surface data Z(x,y) into the import primitive. It provides example
data files and example script files that generate the data files. This object is sometimes used to import atomic force
microscope (AFM) data.

Solvers 101

FDTD
FDE
VarFDTD
DEVICE
Associated files
from text file
usr_importsurface_3d.fsp
usr_importsurface_3d.lsf
usr_surface_3d_1.txt
usr_surface_3d_1.lsf
usr_surface_3d_2.txt
usr_surface_3d_2.lsf

from script matrix


usr_importsurface_3d.fsp
usr_importsurface2_3d.lsf
See also
Structures 318

2003 - 2016 Lumerical Solutions, Inc


490 Lumerical Knowledge Base

Import object 480


Conformal coating 367

File formats
The file formats are shown in the following tables. Spaces, commas or tabs can be used as separators in the
files. The columns do not have to be aligned. Please note that as shown below, the data ranges go from 0 to
m for x (0 to n for y). This means that there are actually m+1 data points in x and n+1 data points in y.

Z = Z(x,y): It is often easy to reverse the meaning of x and y when exporting a file. The surface import
window provides a check button to invert x and y to correct this problem easily.
Description File format
type 1: The x and y data is
contained in the file. An
example file is
usr_surface_3d_1.tx
t. A script file that
generates this example is
usr_surface_3d_1.ls
f.

type 2: The x and y data is


not contained in the file. An
example file is
usr_surface_3d_2.tx
t. A script file that
generates this example is
usr_surface_3d_2.ls
f.

Surface object import


Using GUI

To import surface data, click on the Surface option of the Import button in the main toolbar, which will
open the Surface data import wizard.

SELECT FILE: let the user specify the data file to be imported.
X, Y, Z: the data origin in the global coordinates of the Graphical Layout Editor. For example, if you are
importing a surface defined by an AFM that is on a slab of Si that ranges from 0 to 2 microns, you should
set z0 to 2 microns.
X SPAN, Y SPAN: This defines the size of surface area that you are importing. If the x and y data was

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 491

contained in the file (file format type 1), then these fields are inactive. If the x and y data was not in the file,
then these fields are active and should be set to the desired data span.`
UPPER SURFACE, LOWER SURFACE: Choose which surface is being imported.
FILE UNITS: Select units for the data in your file.
INVERT X AND Y AXIS: It is often easy to invert the x and y axis when exporting the file. Selecting this
checkbox means that the x and y axes are automatically reversed.

Note: importing surfaces for 2D simulations or other orientations (eg. X(y,z)


or Y(x,z))
The import object always creates a surface as a function of x,y. If you need the a different surface
orientation (such as when running 2D simulations which are oriented in the XY plane), use the object
rotation property to rotate the object into a different plane.

After surface data has been imported, the Import data tab allows the following properties to be modified:
IMPORT: You can import new data into the object, or clear the imported data via a simple GUI. For
properties of the import GUI, see bottom of page.
X,Y FINE SCALE ADJUSTMENTS: Re-scale the object X,Y span. Modifying these properties will change the
X,Y span properties. Z SCALE property not used for surface import.
DATA SIZE: These properties provide some information about the imported data. They are read-only.
LOWER, UPPER REF HEIGHT: Set the vertical location of the reference plane (height=0 in the imported
data). Modifying these properties will change the Z, Z span properties.
Using Script
The following script commands are described in detail in the Scripting chapter 1574 . Examples script files are
provided here.

Command Example files Description


importsurface usr_importsurface_3d.lsf Import surface data from a file
usr_surface_3d_1.lsf created by
usr_surface_3d_1.lsf
importsurface2 usr_importsurface2_3d.lsf Import surface data from script
variables

Note: Related properties


It is important to notice that the 'x, y scale' and 'x, y span' properties are linearly related. Doubling the object 'x
span' will automatically double the 'x scale' property.
Similarly, the 'lower, upper ref height' properties are related to the 'z and z span' properties, although the
relationship is slightly more complex. See the following figure for details. The surface's can be truncated by
setting the 'z span' property to a small value.

2003 - 2016 Lumerical Solutions, Inc


492 Lumerical Knowledge Base

Note: Overlapping surfaces


If the z span is small enough such that the upper and lower surfaces overlap (as shown below), no structure will
be included in the simulation in that region.

5.4.3.5.4 Import object - Spatial (n,k) data

Objective
This section describes the data format for importing n and k (anisotropy possible) as a function of volume into the
import primitive. It also provides example data files and example script files that generate the data files. There are
two ways to import the nk data, 1) from data stored in a text file, 2) from matrices created by script commands. The
imported nk data is only for a single frequency.

Solvers 101

FDTD
FDE
VarFDTD
Associated files
from a text file
usr_importnk_3d.fsp
usr_importnk_3d.lsf
usr_importnk_3d.txt

from script matrix


usr_importnk_3d.fsp
usr_importnk2_3d.lsf

See also
Structures 318
Import object 480
Script commands
importnk 1575
importnk2 1576

File formats (isotropic and anisotropic)


The file formats are shown in the following tables. Spaces, commas or tabs can be used as separators in the
files. The columns do not have to be aligned.

Descript File format (isotropic) File


ion format
(anisotr
opic)

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 493

type 1:
Only the
real part
of the
index is
included
in the
file. The
values of
x range
from X1
to Xn, y
from Y1
to Ym
and z
from Z1
to Zp. X1
must be
the
minimu
mX
value
and Xn is
the
maximu
m value.
Also,
the
values of
x, y, and
z must
be
uniforml
y
spaced -
see
above
note.

2003 - 2016 Lumerical Solutions, Inc


494 Lumerical Knowledge Base

type 2:
The
imaginar
y part of
the
index (k)
is
included
in the
second
column
of the
file after
the
header.
An
example
file is
usr_im
portnk
_3d.tx
t. A
script
file that
generate
s this
example
is
usr_im
portnk
_3d.ls
f

n and single frequency k import GUI


To import n,k data, click on the (n,k) Material option of the Import button in the main toolbar, which will open
up the import wizard.

A screenshot of the w izard is show n in the follow ing figure

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 495

Note: No anisotropy is show n in the im port w izard and the CAD. Use an index m onitor to see indices in
other direction. By default, the xx-index is show n.

The different fields are


SELECT FILE: let the user specify the data file to be imported.
X, Y, Z: the data origin in the global coordinates of the Graphical Layout Editor. If you defined your volume
with respect to a particular point in space, for example (0,0,-5) microns, then you should set z0 to -5
microns.
X SPAN, YSPAN, ZSPAN: This defines the size of volume that you are importing. These fields are inactive
and help to determine that the file units have been properly chosen.
FILE UNITS: Select units for the data in your file.
IMPORT AS Mji INSTEAD OF Mij: 2D simulation only. It is often easy to cycle through the array indices in
the wrong order when exporting the file, and this check 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.
IMPORT AS Mkji INSTEAD OF Mijk: It is often easy to cycle through the array indices in the wrong order
when exporting the file, and this check 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.

Importing n and k data using script commands


The following script commands are described in detail in the Scripting chapter. Examples script files are
provided here.
Command Example files Description

2003 - 2016 Lumerical Solutions, Inc


496 Lumerical Knowledge Base

importnk usr_importnk_3d.fsp Import n and k data from a file.


usr_importnk_3d.lsf
usr_importnk_3d.txt
importnk2 usr_importnk_3d.fsp Import n and k data from script variables
usr_importnk2_3d.lsf

Visualizing the anisotropy

By default, only the xx-index is shown in the CAD and the import wizard. Use an index monitor 638 to see
indices in other direction.

5.4.3.5.5 Import object - Binary spatial data

Objective
This section describes the data format for importing binary data to define an object. In this binary import, the data
should have values of 1 or 0, indicating that the object is or is not present. This capability was introduced in FDTD
Solutions 8.6.3.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 497

Solvers 101

FDTD
FDE
VarFDTD

Associated files
from text file
usr_importbinary_3d.fsp
usr_importbinary_3d.lsf
usr_importbinary_3d.txt

from script matrix


usr_importbinary_3d.fsp
usr_importbinary_3d.lsf

See also
Structures 318
Import object 480

File formats
The file formats are shown in the following tables. Spaces, commas or tabs can be used as separators in the
files. The columns do not have to be aligned.
Description File format
type 1: The values of x
range from X1 to Xn, y from
Y1 to Ym and z from Z1 to
Zp. The values of x, y, and
z must be uniformly
spaced. The number n
should be either 1 (the
material is present at this
location) or 0 (the material
is not present). If other
values are used, any non-
zero value will be
interpreted to be 1.

Note that there must be at


least 2 data points in each
dimension (ie, n, m, p >=
2).

Binary import window

2003 - 2016 Lumerical Solutions, Inc


498 Lumerical Knowledge Base

To import binary data, click on the Binary import option of the Import button in the main toolbar, which will
open up the import wizard.

A screenshot of the wizard is shown in the following figure

The different fields are


X, Y, Z: the data origin in the global coordinates of the Graphical Layout Editor. If you defined your volume
with respect to a particular point in space, for example (0,0,-5) microns, then you should set z0 to -5
microns.
X SPAN, YSPAN, ZSPAN: This defines the size of volume that you are importing. These fields are inactive
and help to determine that the file units have been properly chosen.
FILE UNITS: Select units for the data in your file.
IMPORT AS Mkji INSTEAD OF Mijk: It is often easy to cycle through the array indices in the wrong order

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 499

when exporting the file, and this check 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.

Importing binary data using script commands


The following script commands are described in detail in the Reference Guide. Examples script files are
provided here.
Command Example files Description
importbinary usr_importbinary_3d.fsp Import binary data from a file.
usr_importbinary_3d.lsf
usr_importbinary_3d.txt
importbinary2 usr_importbinary_3d.fsp Import binary data from script
usr_importbinary2_3d.lsf variables

5.4.3.5.6 Import object - Images

Objective
This section describes how to use the import object to create structures from an image. Images can be imported
from JPG (*.jpg) or PNG (*.png). Other image types can be exported to these two formats in most image editing
software.

Selecting the Import Image button in the main toolbar will open the Image Import Wizard. The wizard provides a
simple interface to import, threshold, crop and scale the image. The image is used to define the objects shape in the
XY plane. The object is extruded in the Z direction.

Solvers 101

FDTD
FDE
VarFDTD
Associated files
usr_import_image.fsp
usr_import_image.jpg

See also
Structures 318
Import objects 480

Image Import wizard

2003 - 2016 Lumerical Solutions, Inc


500 Lumerical Knowledge Base

STEP 1: Add import object with the image import wizard

A) Click on the Import button expansion arrow in the main toolbar and
select the Image option to open the Image import wizard.

B) Click "Select Image" to choose your image file.

STEP 2: Set threshold

The import process takes a color or grayscale image and converts it


into a binary representation of the structure. The threshold which
defines what portion of the image will be set to be the background
index of the simulation region is defined with the THRESHOLD slider.
The invert button can be used to invert the image

STEP 3: Set scale

Once the image has been imported, it is necessary to calibrate the


length of the structure.
Here, with GRAPH CONTROL selected, the user can drag a rectangle
and use the horizontal, vertical, or diagonal dimension of the rectangle
to define the size of the imported structure.
For this example, we use the fact that the period is 270nm, or that 10
periods is 2.7 microns.

STEP 4: Crop image

With the crop image and crop items selected, the image can be
cropped using the mouse to define a rectangular region.
Once a rectangle has been dragged within the plot area region, its
edges can be dragged to the correct location.

STEP 5: Review result

The last step of the import wizard allows you to accept the structure as
depicted, or move back through the steps to make modifications.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 501

STEP 6:
See imported object in the CAD layout editor.
When the image import wizard is finished, you will see the imported
object in the CAD layout editor.

Note: Drawing resolution


Initially the object will be drawn at a low resolution, as shown in the top half of this figure. You can increase
the drawing resolution with the settings on the Graphical rendering tab. The bottom half of this figure shows
the object displayed at the same resolution as the image that is was imported from. It is important to note
that the graphical rendering does not affect the simulation. Irrespective of the drawing resolution, the meshed
object used for the simulation is always as has been defined.

Fine scale adjustment


In order to open up the wizard to adjust the fine scale, click on the "Adjust image scale" button in the "Import
data" tab of the import object's edit window as shown below.

STEP 1: Verify settings

Drag the ruler to a desired horizontal, vertical or diagonal


length. Check that the distance from A-B is what you
expect.
Verify lengths in at least 2 different directions.

2003 - 2016 Lumerical Solutions, Inc


502 Lumerical Knowledge Base

STEP 2: Define one length

Choose a direction to recalibrate your scale, for example,


horizontal. Drag the ruler over a known length, enter the
distance A-B should be setting and hit Apply. The distance
A-B will now be precisely what you defined.

STEP 3: Define a second length

Verify that your structure has the correct length in a direction


different to the one used in STEP 2. If the length is not
correct, choose to define two lengths. Select calibrate
length 2 and drag the ruler to define a second length, for
example, diagonal. Enter the desired distance A-B for the
second length and hit Apply. You can now verify that both
lengths are correct.
Hit Done when you are satisfied with your calibration. The x
scale and y scale settings will be automatically updated to
reflect your desired changes.

5.4.3.5.7 Import object - Liquid crystal from CSV

Objective
This section describes how to use the CSV import to directly import spatial Liquid Crystal (LC) orientation data from
a CSV (comma separated value) file. This file is typically created with TechWiz LCD from Sanayi System Co., Ltd.
(http://sanayisystem.com/) and makes it easy to import spatial information on LC orientation from TechWiz LCD
simulations.

Note: Other methods to define spatially-varying LC


The required csv file format is not simple to generate yourself, so data which is not already in the required format
can be imported using the addgridattribute 1550 and importdataset 1590 script commands instead. See
LC rotation 255 for more information about adding spatially-varying LC grid attributes.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 503

Solvers 101

FDTD
Associated files
csv_import_example_data.cs
v

See also
Structures 318
Import objects 480
Attributes 399
importcsvlc 1555 (script command)

File format
The file format for the csv file that defines the LC orientation as a function of space can be in a 2D format or 3D
format.

2D format
The file should have the form:
THETA,X=-50,X=-49,X=-48,X=-47,X=-46,X=-45,X=-44,X=-43,X=-42,X=-41,X=-40,X=-39,X=-38,...
Y=1,90,90,90,90,90,90,90,90,-,-,90,90,-,-,
Y=2,45,45,35,25,-,-,-,-,25,
.

PHI,X=-50,X=-49,X=-48,X=-47,X=-46,X=-45,X=-44,X=-43,X=-42,X=-41,X=-40,X=-39,X=-38,...
Y=1,35,45,55,65,75,85,90,90,-,-,90,90,-,-,
Y=2,11.5,15.2,20,30,-,-,-,-,30,40,
.
Where
The orientation of the LC is defined by THETA and PHI.
PHI is the azimuthal angle in the X-Y plane with respect to the x-axis, in degrees, using a clockwise rotation
when looking down the z axis
THETA is the angle between the x-y plane and the LC, in degrees. The polar angle, measured from the z-
axis, is 90-THETA, in degrees.
The Ux, Uy and Uz components of the unit orientation vector of the LC is given by
o Ux = sin(90-THETA)*cos(-PHI)
o Uy=sin(90-THETA)*sin(-PHI)
o Uz=cos(90-THETA)
When THETA or PHI are given by -, it indicates that there is no LC at that grid location
The units of X and Y are always in micrometers (microns)
There are precisely 2 sections, one for THETA and one for PHI
The same values of X and Y are repeated in each section
Each section has the same number of values of X and Y as columns and rows for THETA or PHI

3D format

2003 - 2016 Lumerical Solutions, Inc


504 Lumerical Knowledge Base

The file should have the form:

THETA
Z=0,X=0,X=1,X=2,X=3,
Y=1,90,90,90,90,90,90,90,90,-,-,90,90,-,-,
Y=2,45,10,22.5,15.7,-,-,-,-,75,
.

PHI
Z=0,X=0,X=1,X=2,X=3,
Y=1,0,0,0,0,90,90,90,90,-,-,90,90,-,-,
Y=2,13.4,10.5,3.23,15.7,-,-,-,-,75,73,
.
THETA
Z=1,X=0,X=1,X=2,X=3,
Y=1,75,75,75,90,90,90,90,90,-,-,90,90,-,-,
Y=2,45,10,22.5,15.7,-,-,-,-,75,
.

PHI
Z=1, X=0,X=1,X=2,X=3,
Y=1,10,20,30,0,90,90,90,90,-,-,90,90,-,-,
Y=2,13.4,10.5,3.23,15.7,-,-,-,-,75,73,
.


Where
The orientation of the LC is defined by THETA and PHI.
PHI is the azimuthal angle in the X-Y plane with respect to the x-axis, in degrees, using a clockwise rotation
when looking down the z axis
THETA is the angle between the x-y plane and the LC, in degrees. The polar angle, measured from the z-
axis, is 90-THETA, in degrees.
The Ux, Uy and Uz components of the unit orientation vector of the LC is given by
o Ux = sin(90-THETA)*cos(-PHI)
o Uy=sin(90-THETA)*sin(-PHI)
o Uz=cos(90-THETA)
When THETA or PHI are given by -, it indicates that there is no LC at that grid location
The units of X and Y are always in micrometers (microns)
There are an equal number of THETA and PHI sections. The number of values of Z is equal to the number of
THETA (or PHI) sections.
The same values of X and Y are repeated in each section
The same value of Z is repeated in each pair of THETA and PHI sections
Each section has the same number of values of X and Y as columns and rows for THETA or PHI

Graphical import
Opening the wizard
The CSV import feature is accessible from the import toolbar with the menu item Import from CSV.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 505

This will open the CSV import wizard where you can import any csv file described in the file format section.
The import wizard has three pages.

Page 1

This page allows you to select a file. Press the browse button get a file browser for easier selection.

Page 2

The file display


This page displays the csv file, and you can control the amount of the file viewed. For larger files, it may not be
desirable to preview the entire file.

2003 - 2016 Lumerical Solutions, Inc


506 Lumerical Knowledge Base

The advanced settings and rotations


Optionally, rotations in increments of 90 degrees around the x, y and z axes may be performed. For
example, if the exported format was in the x-y plane while the user desires the structure to be in the x-z
plane, a 90 degree rotation around the x axis can be used. This rotation applies to both the spatial location
and the LC orientation.
For 2D data sets, the user can indicate that the data was originally exported from the x-z plane (even though
in the csv file, the axes are specified as 'X' and 'Y'). This is critical to obtain the correct orientation of the LC
with respect to the x-y plane that will be used in FDTD Solutions. However, if 2D data is actually exported
from the x-y plane then this should be unchecked.

Page 3

The color scheme


The color scheme setting can be used to make the arrows appear blue when the are oriented with a particular
axis. For example, if the color scheme is set to "uz", the arrows will be blue if they are in the +z direction,
green if they are at 45 degrees to the z axis and red if they are in the x-y plane.

The plot control


The plot allows for full zooming and rotation in 3D. Click the Show plot help link to expand the plot help and
see all the possible controls.

Range of data for each axis


This displays the actual span of data for each axis and the number of data points that were imported. Note
that you may see fewer cylinders displayed because some of the imported locations may have been set to "-"
in the file, and a cylinder will not be drawn at that location.

Reinterpolate data for viewing


The user can reinterpolate the data for better viewing. This is particularly useful when the data is defined over a
region with a large aspect ratio or for large files.

Scripted import

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 507

The importcsvlc 1555 script command can be used to import the LC information from csv file from the script
without using the GUI import wizard.

Imported object
The CSV data is imported into a group object that contains Lumericals grid attribute and a rectangle. The
rectangle is transparent for better viewing. The properties of the imported LC including position, scaling,
resampling for viewing and the LC material can all be set directly by the LC analysis group. The names of the
LC material and LC attribute can be changed directly in the tree view. If desired, the grid attribute can be
removed from the group for association with more complex physical geometries. Also, when scripted import is
used, it is possible to import only the grid attribute for association with more complex physical geometries.

The following properties can be edited directly in the analysis group called "LC".

2003 - 2016 Lumerical Solutions, Inc


508 Lumerical Knowledge Base

Please note that the corresponding properties should not be edited directly in the "LC attribute" child or the
"LC material" child objects as they will immediately be overwritten by the "LC" analysis group.

5.4.3.5.8 Obfuscating import data

Objective
In some cases it may be necessary for a party A to generate binary or n,k import data and send it to party B. Party
A may not want party B to be able to see the actual structure that is being simulated. This section explains a
capability that can solve this problem.

Please note that the data obfuscation presented here does not use strong encryption technology. All
parties should have other means to protect their confidential information such as Non-Disclosure
Agreements (NDAs) or similar legal agreements and should additionally use strong encryption
technologies to prevent 3rd parties from gaining access to the data. Lumerical Solutions, Inc. does not
guarantee that this data obfuscation method will prevent any person from accessing the underlying data
and Lumerical Solutions, Inc. does not accept any liability for damages resulting from using this
obfuscation method, from a third party defeating this obfuscation method, or from a software error on the
part of Lumerical Solutions, Inc.

Key generation
The first step is to generate encryption and decryption keys. This will typically be done by one party who will send
one of the keys to the other. Typically, party B would generate the keys and then send the encryption key only to
party A.

There is a utility called obfuscatedimport.exe (obfuscateimport on linux and Mac) in the bin directory of
the installation. This utility can be used to create the keys. This utility must be run from the command line, or, by
using a batch file. For example, the keys on Windows can be generated with

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 509

This can be simpler to use by creating a simple *.bat file with the following commands on windows. This will create a
file keyfile.txt which contains both keys.
"C:\Program Files\Lumerical\FDTD\bin\obfuscateimport.exe" > keyfile.txt

Once the keys have been generate, they must be saved. Any files encrypted with the encryption key cannot be
decrypted without the decryption key.

Encrypting a file
To encrypt a file, the obfuscate import command should be used with these arguments
obfuscateimport.exe inputfile outputfile encryption_key
The easiest method is to create a batch file like this
"C:\Program Files\Lumerical\FDTD\bin\obfuscateimport.exe" inputfile1.txt obfuscatedfile1.
The file obfuscatedfile1.txt will contain the obfuscated copy of the input file.

Party A does not require a software license in order to encrypt a file. If they are not licensed users of FDTD
Solutions, they can simply download and install a trial version of the software and continue to use the file
obfuscation utility which does not require a license.

Importing the obfuscated file


The obfuscated file can be imported using the script commands importnkobfuscated and
importbinaryobfuscated. These commands are identical to importnk and importbinary except that they
will read an obfuscated file. They have the same argument list except that the the first argument is the decryption
key. For example, the commands
addimport;
importbinaryobfuscated("AwL3PxJG5u4jug1sL37Y2RSMPloZSO8=","obfuscatedfile1.txt","microns"
addimport;
importnkobfuscated("AwIor0AVtrZ241E4eC6NjUbTYwtLH70=","obfuscatedfile2.txt","microns");
would add 2 import objects created by reading the obfuscated files. Please see the scipt command documentation
for a detailed list of all arguments and options.

How can I be sure I've imported the correct structure?


This is not easy or it would defeat the purpose of the obfuscation. Once a structure has been imported using
obfuscated data files, you will not be able to view the structure in the GUI, it will only appear as a red wireframe box.
If you mesh the structure with index monitors, the entire import region will appear as an index of almost 0 so that
you cannot see what was imported. For this reason, sources such as mode sources, beam sources, and dipole
sources should not be placed inside an imported structure since they will not have access to the refractive index in
that region.

The best way to test is for party A to create an obfuscated copy of a non-confidential test file. This file can then be
imported using the original file (with script commands importbinary or importnk) and can also be imported from the
obfuscated file with script commands importbinaryobfuscated and importnkobfuscated). After running both
simulations on the same compute setup, any results such as electric field, power or transmission should be
numerically identical. If this is the case, you can proceed to confidential files that are obfuscated.

2003 - 2016 Lumerical Solutions, Inc


510 Lumerical Knowledge Base

What version do I need


This feature is available in FDTD Solutions 8.6.3. If obfuscated nk data is opened with an older version of FDTD
Solutions that does not support obfuscation, the nk structure will be incorrect and will not give sensible simulation
results.

5.4.3.6 Sources
The following types of sources are available in FDTD Solutions and MODE Solutions' 2.5D FDTD solver:

Point sources (dipole) 511

Oscillating dipoles act as sources in Maxwell's equation to produce electromagnetic fields. Their position and
direction are specified in terms of the center position and their orientation through angles theta, phi.

In MODE Solutions, for the 2.5D FDTD solver, the orientation of the dipole source partially depends on whether the
polarization of the propagator simulation is set to TE or TM. Depending on the simulation polarization and dipole
type, the theta, phi values may be locked.

Gaussian and Cauchy/Lorentzian beam sources 521

A Gaussian source defines a beam of electromagnetic radiation propagating in a specific direction, with the
amplitude defined by a Gaussian cross-section of a given width. By default, the Gaussian sources use a scalar
beam approximation for the electric field which is valid as long as the waist beam diameter is much larger than the
diffraction limit. The scalar approximation assumes that the fields in the direction of propagation are zero. For a
highly focused beam, there is also a thin lens source that will inject a fully vectorial beam. The cross section of this
beam will be a Gaussian if the lens is not filled, and will be a sinc function if the lens is filled. In each case, the
beams are injected along a line perpendicular to the propagation direction, and are clipped at the edges of the
source. For more information on the usage of these source, visit the planewave and beam sources 521 page.

Plane wave sources 521

Plane wave sources are used to inject laterally-uniform electromagnetic energy from one side of the source region. In
two-dimensional simulations, the plane wave source injects along a line, while in three-dimensional simulations the
plane wave source injects along a plane. It is also possible to inject a plane wave at an angle. The plane wave
source is actually the same object as the Gaussian source, with the only difference being the SOURCE SHAPE
setting. For more information on the usage of these source, visit the planewave and beam sources 521 page as well
as BFAST 590 page for angled incidence.

Total-field scattered-field sources 546

Total-field scattered-field sources are used to separate the computation region into two distinct regions one
contains the total field (i.e. the sum of the incident field and the scattered field), while the second region contains
only the scattered field. The incident field is a plane wave with a wavevector normal to injection surface. This source
type is particularly useful to study the scattering behavior of objects, as the scattered field can be isolated from the
incident field.

TIP: More information


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. See the TFSF 546 section for more
information.

Mode sources 566

The mode source is used to inject a guided mode into the simulation region. The geometry of the mode source (i.e.
center location, and span) is used to compute the guided modes for the structure. In three-dimensional simulations,
the modes are computed across a plane, while in two-dimensions they are computed across a line. From a list of

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 511

possible modes, a single mode is selected for injection into the simulation region. For additional details on the
operation of the mode solver, consult the integrated mode source 566 section.

Import sources 579

The import source allows the user to specify a custom field profile for the source injection plane. The custom field
profile can be calculated from an analytic formula, imported from another FDTD simulation, or imported from other
simulation tools such as Breault Research Organizations ASAP ray tracer.

Global source options


The global source options window adjusts default frequency-domain parameters. These settings can be used by any
of the frequency domain sources by unchecking the 'override global source settings' checkbox in the source's
Frequency/Wavelength tab.

5.4.3.6.1 Sources - Dipoles

Point sources (dipole)


Oscillating dipoles act as sources in Maxwell's equation to produce electromagnetic fields. Dipoles are used to
simulate point source radiators, such as radiation from a fluorescent molecule.

In MODE Solutions, for the 2.5D FDTD solver, the orientation of the dipole source partially depends on whether the
polarization of the propagator simulation is set to TE or TM. Depending on the simulation polarization and dipole
type, the theta, phi values may be locked.

Solvers 101

FDTD
VarFDTD
Associated files
usr_source_electric_dipole.fsp
usr_source_magnetic_dipole.fsp

See also
Sources 510
Homogeneous materials 514
Non-homogeneous materials 516
Multiple sources 519
Source movies 628
FDTD and coherence 596
Incoherent dipole 605
Incoherent unpolarized dipole 607
Using the boundary conditions tab 459

Edit source tabs


General tab
DIPOLE TYPE: A pull-down menu in which the point source can be configured as an electric dipole
(oscillating point charge) or a magnetic dipole (current loop). The radiation pattern of these dipoles is similar,
but not exactly the same.
AMPLITUDE: The amplitude of the point source. The units of the source depend on the dipole type, as
explained in the Units and normalization 618 section.
BASE AMPLITUDE: This is the amplitude that will generate a radiated CW power of 10 nW/m in 2D
simulations and 1 fW in 3D simulations.
TOTAL AMPLITUDE: This is the amplitude actually used in the simulations, it is the product of the

2003 - 2016 Lumerical Solutions, Inc


512 Lumerical Knowledge Base

AMPLITUDE and the BASE AMPLITUDE.


PHASE: The phase of the point source, measured in units of degrees. Only useful for setting relative phase
delays between multiple radiation sources.
THETA: The angle with respect to the z axis of the dipole vector
PHI: Angle with respect to positive x axis of the dipole vector.

Geometry tab
The geometry tab contains options to change the size and location of the sources. The dipole position and
direction are specified in terms of the center position and their orientation through angles theta, phi.

Frequency/Wavelength tab
The Frequency/
Wavelength tab is
shown to the right.
This tab can be
accessed through
the individual
source properties,
or the global
source properties.
Note that the plots
on the right-hand
side of the window
update as the
parameters are
updated, so that
you can easily
observe the
wavelength (top
figure), frequency
(middle figure) and
temporal (bottom
figure) content of
the source
settings.

At the top-left of
the tab, it is
possible to chose
to either SET
FREQUENCY /
WAVELENGTH or
SET TIME-
DOMAIN. In most
simulations, the
'SET
FREQUENCY /
WAVELENGTH '
option is
recommended.

If you choose to directly modify the time domain settings, please keep the following points in mind:
Pulse durations: Choose a pulse duration that can accurately span your frequency or wavelength range
of interest. However, 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

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 513

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 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.
For single frequency simulations, simply set both the min and max wavelengths to the same value.

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.
For more information, please visit Changing the source bandwidth 610

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. Enabled by default.
OPTIMIZE FOR SHORT PULSE: Use the shortest possible source pulse.
This option is enabled by default in the FDTD solver. It should only be disabled when it is necessary to
minimize the power injected by the source that is outside of the source range (eg. convergence problems
related to broadband steep angled injection).
This option is disabled by default in the varFDTD solver, as it improves the algorithms numerical stability.

Manual calculation of the source time signal


As explained above, the 'Standard' source type uses a fixed carrier with a gaussian envelope. The following
script code shows how to calculate the source time signal used by the source.
# calculate standard pulse time signal
frequency = 300e12;
pulselength = 50e-15;
offset = 150e-15;

t = linspace(0,600e-15, 10000);
w_center = frequency*2*pi;
delta_t = pulselength/(2*sqrt(log(2)));
pulse = sin( -w_center*(t-offset)) * exp( -(t-offset)^2/2/delta_t^2 );

plot(t*1e12,pulse,"t (fs)","source pulse time signal");

Note: There are some small difference between the pulse generated by this code and the actual time signal
generated by the 'standard' source pulse setting. If you need very precise control over or knowledge of the

2003 - 2016 Lumerical Solutions, Inc


514 Lumerical Knowledge Base

source time signal, you should create create your own Custom time signal 613 .
Note: The 'broadband' option is generated with a more complex function. The precise function is not provide. To
create your own arbitrary source time signals, see the Custom time signal 613 page.

Advanced tab
This tab only appears for the dipole source. The tab contains a RECORD LOCAL FIELD checkbox. When
checked, the fields around the dipole are saved; this box must be checked in order to use the dipolepower
script function.

Results returned
Results
DIPOLEPOWER: The power injected into the simulation region by a dipole is returned. The units will be in
Watts if cw norm is used and Watts/Hertz 2 if no norm is used.
PURCELL: By utilizing the power measurement, the emission rate enhancement of a spontaneous emitter
inside a cavity or resonator, the Purcell factor is returned.
TIME SIGNAL: Time domain signal of the source pulse.
SPECTRUM: The fourier transform of time signal.

5.4.3.6.1.1 Homogeneous materials


This section describes the power radiated by a dipole in a homogeneous material.

Solvers 101

FDTD
VarFDTD
In this section
Homogeneous materials 514
Non-homogeneous materials 516

Multiple sources 519

Associated files
usr_dipole_power2D.fsp
usr_dipole_power3D.fsp
usr_dipole_power.lsf

See also
Sources 510
sourcepower 1601
dipolepower 1600

Theoretical power radiated by a dipole in a homogeneous material


The analytic expressions of total radiated power of electric and magnetic dipoles in a homogeneous material of
refractive index n, in 2D and 3D are shown in the following table.

Dipole type Total radiate power (Watts) Units


2D TM Electric Dipole p m0 r 2 3 [p0] = Cm/m
P= p0 w
2 4p

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 515

2D TE Electric Dipole p m0 r 2 3 [p0] = Cm/m


P= p0 w
4 4p
3D Electric Dipole m r 2 w4 [p0] = Cm
P = 0 n p0
4p 3c
2D TM Magnetic Dipole p m0 2 r 2 w3 [m0] = Am2/m
P= n m0
4 4p c2
2D TE Magnetic Dipole p m0 2 r 2 w3 [m0] = Am2/m
P= n m0
2 4p c2
3D Magnetic Dipole m r 2 w4 [m0] = Am2
P = 0 n 3 m0
4p 3c 3

Verifying the emitted power in FDTD Solutions.


The script file usr_dipole_power.lsf will compare the above analytic formulas for power radiated by a dipole
with the measured results from an FDTD simulation. To run this example, download all three assocated files. Open
one of the simulation files (.fsp), then run the script.

The script will run a total of 6 simulations, one for each of the dipole type listed above. In each case, it will compare
the total measured power in FDTD Solutions/Propagator with the analytic expressions. It does this over a wavelength
range of 1 to 2 um. It plots both the measured power and the analytical result for each case. The sourcepower
function evaluates the analytic expression described above. The dipolepower function measures the actual power
radiated by the dipole.

The 3D electric and magnetic dipole comparisons are shown in Figure 1. The percentage difference between the
measured result and the analytical expression as a function of points per wavelength in the homogeneous material
are shown in Figure 2..

a) 3D Electric dipole b) 3D Magnetic dipole


Figure 1: The comparison between analytic power and measured power for electric and magnetic dipoles.

2003 - 2016 Lumerical Solutions, Inc


516 Lumerical Knowledge Base

a) 2D case b) 3D case
Figure 2: The difference between the analytical power for a dipole and the simulated power in FDTD Solutions, in 2D
and 3D, TE and TM, electric and magnetic dipoles.

It is important to understand the following points:


The main source of the discrepancy is that FDTD is solved on a discrete mesh. The analytic expression comes
from a calculation that assumes a continuous homogeneous material instead of a discrete mesh. Therefore it is
expected that there is a difference between the simulation and theory which should only go to zero when the mesh
size becomes very small.
In principle, dipole sources are injected by exciting the electric and magnetic fields at only one point on the mesh.
In order to allow injection at arbitrary spatial positions and dipole orientations, several mesh points are actually
excited with appropriate weighting's. This means that the total injected power changes when you move the dipole
by amounts smaller than the mesh size, dx. At 10 points per wavelength, this change in power can be as large as
5% by moving the dipole by dx/2. In Figure 2, the 2D TE electric dipole has the best agreement with the analytic
expression compared to the other 2D dipoles, but moving the dipole location by a small amount can make a
different dipole type have the best agreement.

We should note that we can compare to the analytic expression for the power radiated from dipoles to within
approximately 5% accuracy at 10 points per wavelength. This corresponds to a Mesh Accuracy setting of
approximately 2. At 20 points per wavelength (Mesh Accuracy approximately 4-5) the injected power is better than
2%.

The CW normalization option attempts to normalize monitor data to the amount of energy injected into the
simulation at each frequency. This allows the user to extract the CW response of a system for a range of
frequencies from a single simulation. For this normalization to occur, the injected power must be known. In the case
of a dipole, the injected power is calculated from the analytic formula for "total power radiated by a dipole in a
homogeneous material".

This means that the simulation data is actually normalized to the amount of power a dipole would inject in a
homogenous material, rather than how much power was actually injected into the specific simulation. A dipoles
actual injected power can vary significantly from the homogeneous value, depending on what physical structures are
near by. Field reflected from nearby structures re-interfere with the source, causing it to inject more or less power
than expected. The next section discusses this issue in more detail.

5.4.3.6.1.2 Non-homogeneous materials


As noted in the last section, the actual power emitted by a dipole is highly dependant on the surrounding materials,
and can vary significantly from the analytic formula for a dipole in a homogeneous material. This section looks at a
specific example of a dipole near a metal wall. In these cases, the CW normalization option will not work correctly
because it will normalize data to the analytic formula, rather than the actual power emitted. For accurate power
normalization, we must normalize results using the dipolepower function (actual radiated power) rather than the
standard sourcepower function (analytic power radiated in a homogeneous material).

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 517

Solvers 101

FDTD
VarFDTD
In this section
Homogeneous materials 514
Non-homogeneous materials 516

Multiple sources 519


Associated files
usr_dipole_power_metal1.fsp
usr_dipole_power_metal2.fsp

See also
Sources 510
sourcepower 1601
dipolepower 1600
Related publications
Barnes, W. L. (1998). Fluorescence near
interfaces: The role of photonic mode
density. Journal of Modern Optics, 45,661-
669. DOI: 10.1080/09500349808230614

Normalizing a dipole near a metal wall


In LEDs and OLEDs, the dipoles typically radiate near a metal wall. It is worthwhile to consider power normalization
calculations near metal walls.

Open the file usr_dipole_power_metal1.fsp. This structure we are modeling is shown in the following
screenshot.

All boundaries are PML, except for the lower z boundary, which is set to metal. There is a single dipole source in the
simulation volume. Run the simulation, then paste the following script commands into the script prompt to create the
following figures.
f1=c/1.5e-6;
f2=c/1.0e-6;
f=linspace(f1,f2,100);
power1=sourcepower(f,2,"real_source");
power2=dipolepower(f, "real_source"); # actual power radiated by the dipole

plot(c/f*1e6,power1,power2,"wavelength (um)","power");
legend("Analytic power radiated in homogeneous material",
"Actual power radiated by dipole near metal wall");

2003 - 2016 Lumerical Solutions, Inc


518 Lumerical Knowledge Base

plot(c/f*1e6,power2/power1,"wavelength (um)","normalized power");

When the simulation is done, run the script the above commands. They will calculate the total power radiated by the
dipole, normalized to the analytic expression for the power radiated by this dipole in a homogeneous material. You'll
see the following result shown in the following figure.

You can see that the radiated power is significantly different than the same dipole in free space. To understand
these results, we can consider the equivalent problem to the metal wall. Lets look at the problem using the method
of image charges. The metal wall can be replaced by a dipole with the appropriate orientation at an equal distance
behind where the original metal wall was, as shown below:

To simulate this system, load the file usr_dipole_power_metal2.fsp. It is setup with an image charge in
place of the metal wall. The lower z boundary has been extended, and set to use PML. The dipole source is
appropriately positioned. After running the simulation, paste the same script code into the script prompt again.
Notice that the figures are exactly the same as the first simulation. In the following figure, the two curves lie on top of
one another.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 519

Note: Dipole radiated power


It may seem strange that the total power radiated by the dipole changes when it is near a metal wall, despite the
fact that the dipole amplitude is fixed. To understand how this can be, we should realize that a dipole is effectively
a small antenna with a fixed current, I. The total radiated power is given by P = I2Rrad, where Rrad is the radiation
resistance of the antenna. By placing the antenna in a different location, we can change the radiation resistance
and therefore the total radiated power. Energy is conserved however, because the power needed to drive the
antenna is different in each case. From the quantum mechanical point of view, which is useful for LEDs, we see
that the local density of states is different in free space than it is near a metal wall. This will affect the rate of decay
of electron-hole pairs into photons, and can ultimately be used to improve the quantum efficiency.

Note: Beam sources


As described above, the amount of power radiated by a source can change due to interference with another
source, or when it interferes with itself. This is usually only relevant for dipole sources, but in principle it can occur
with all types of sources. It is not very important for beam sources because these simulations are usually setup so
this interference does not occur.

5.4.3.6.1.3 Multiple sources


The amount of power radiated by a source depends on the surrounding fields. Therefore, when there are multiple
sources in a simulations, or when radiation from the source can re-interfere with itself, the amount of power radiated
by the source will change. An example of a source interfering with itself is provided on the previous page. On this
page, we consider how interference between two dipole sources affects the total radiated power.

s1 and s2 in single simulation (coherent)


Solvers 101
Power box method: 1.38325 fW
FDTD
Dipolepower method: 1.39774 fW
VarFDTD
Sourcepower method: 2 fW
In this section
Homogeneous materials 514 s1 only simulation
Non-homogeneous materials 516
Power box method: 0.98147 fW
Multiple sources 519 Dipolepower method: 0.991981 fW
Associated files Sourcepower method: 1 fW
usr_two_dipoles_radiated_power.fsp
usr_two_dipoles_radiated_power.lsf s2 only simulation
Power box method: 0.98147 fW
See also Dipolepower method: 0.991981 fW
Sources 510 Sourcepower method: 1 fW
FDTD and coherence 596

Incoherent dipole 600


Soft sources 627
Sources 510
sourcepower 1601
dipolepower 1600

2003 - 2016 Lumerical Solutions, Inc


520 Lumerical Knowledge Base

This example has two dipole spaced half a wavelength apart. The script will calculate the power radiated by the two
dipole system and compare it to the power each dipole would radiate by itself. The script uses a few techniques to
measure the radiated power. To reproduce these results, open the simulation file and then run the script.

The script runs three simulations:


source s1 and s2
source s1 only
source s2 only

For each simulation, we calculate the radiated power in three ways:


Net power flow through a box of monitors surrounding the dipoles
Dipolepower function
Sourcepower function

The results of the script are shown below.

s1 and s2 in single simulation (coherent)


Power box method: 1.38 fW
Dipolepower method: 1.39 fW
Sourcepower method: 2 fW

s1 only simulation
Power box method: 0.98 fW
Dipolepower method: 0.99 fW
Sourcepower method: 1 fW

s2 only simulation
Power box method: 0.98 fW
Dipolepower method: 0.99 fW
Sourcepower method: 1 fW

There are a couple of important points to notice. First, all three techniques agree that a single dipole radiates 1fW of
power.

For the simulation with two sources, the three techniques do not agree. The Power box and Dipolepower methods
report a total radiated power of 1.4 fW while the Sourcepower reports 2 fW. The correct answer is 1.4 fW.
Interference between the two sources mean the total radiated power is not simply the sum of what each dipole would
radiate by itself. The Power box and Dipolepower methods correctly take this interference into account. The
Sourcepower method is not correct because it simply reports the sum of what each source would radiated by itself.

Therefore, when calculating the total power radiated by sources in simulations with multiple sources, you should use
the Power box or Dipolepower methods.

Note: Physical interpretation of interference changing the amount of radiated


power
It is interesting to consider why the power radiated by a dipole is different when a field is incident upon the dipole.
In FDTD solutions/Propagator, the dipole moment is a pre-defined function of time (p(t)) and therefore frequency
(p(w)). If we consider the dipole as an infinitely small antenna, the current is proportional the dipole moment. The
power required to drive the dipole, which is equal to the power radiated by the dipole, is given by the product of the
current, I, and the voltage, V. The incident electric field modifies the voltage across the dipole and therefore the
power required to drive the dipole.

Note: Beam sources


As described above, the amount of power radiated by a source can change due to interference with another
source, or when it interferes with itself. This is usually only relevant for dipole sources, but in principle it can occur
with all types of sources in a simulation. It is not very important for beam sources because these simulations are

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 521

usually setup so this interference does not occur.

5.4.3.6.2 Sources - Plane w ave and Beam

Plane wave sources


Plane wave sources are used to inject laterally-uniform electromagnetic energy from one side of the source region. In
two-dimensional simulations, the plane wave source injects along a line, while in three-dimensional simulations the
plane wave source injects along a plane. It is also possible to inject a plane wave at an angle. The plane wave
source is actually the same object as the Gaussian source, with the only difference being the SOURCE SHAPE
setting. Periodic or Bloch boundary conditions should be used with Bloch/periodic type plane wave source.
Diffracting plane wave source can be used with PML in all directions. When a broadband result at angled plane wave
incidence is pursued with one simulation without using Bloch BCs, the BFAST source technique should be used,
please read more on BFAST plane wave 590 .

Gaussian and Cauchy/Lorentzian beam sources


A Gaussian source defines a beam of electromagnetic radiation propagating in a specific direction, with the
amplitude defined by a Gaussian cross-section of a given width. By default, the Gaussian sources use a scalar
beam approximation for the electric field which is valid as long as the waist beam diameter is much larger than the
diffraction limit. The scalar approximation assumes that the fields in the direction of propagation are zero. For a
highly focused beam, there is also a thin lens source that will inject a fully vectorial beam. The cross section of this
beam will be a Gaussian if the lens is not filled, and will be a since function if the lens is filled. In each case, the
beams are injected along a line perpendicular to the propagation direction, and are clipped at the edges of the
source.

Solvers 101

FDTD
VarFDTD
In this section
Circular polarization and phase convention 540

Plane waves - Edge effects 526


Plane waves - Angled injection 529
Broadband injection angles 536
Gaussian - Dark field beam 542
Associated files
usr_source_gaussian.fsp
usr_source_planewave.fsp
Planewave
See also
Sources - Others and advanced techniques 587

Source movies 628


Multi-frequency beam calculation 543
Using the boundary conditions tab 459
Bloch 471 / Periodic 478
BFAST 590
Diffracting plane wave source 534

Gaussian beam

2003 - 2016 Lumerical Solutions, Inc


522 Lumerical Knowledge Base

Edit source tabs


General tab
SOURCE SHAPE: The shape of the beam. It can be changed to a Gaussian, plane wave or Cauchy/
Lorentzian.
AMPLITUDE: The amplitude of the source as explained in the Units and normalization 618 section.
PHASE: The phase of the point source, measured in units of degrees. Only useful for setting relative phase
delays between multiple radiation sources.
PLANE WAVE TYPE: Sets the type of the plane wave source. More information about each source type is
available in dedicated topic available from "See also" section above. This menu is available for plane wave
source only.
INJECTION AXIS: Sets the axis along which the radiation propagates.
DIRECTION: This field specifies the direction in which the radiation propagates. FORWARD corresponds to
propagation in the positive direction, while BACKWARD corresponds to propagation in the negative
direction.
ANGLE THETA: The angle of propagation, measured in degrees, with respect to the injection axis defined
above.
ANGLE PHI: The angle of propagation, in degrees, rotated about the injection axis in a right-hand context.
POLARIZATION ANGLE: The polarization angle defines the orientation of the injected electric field, and is
measured with respect to the plane formed by the direction of propagation and the normal to the injection
plane. A polarization angle of zero degrees defines P-polarized radiation, regardless of direction of
propagation while a polarization angle of 90 degrees defines S-polarized radiation.

Geometry tab
The geometry tab contains options to change the size and location of the sources.

Frequency/Wavelength tab
The Frequency/
Wavelength tab is
shown to the right.
This tab can be
accessed through
the individual
source properties,
or the global
source properties.
Note that the plots
on the right-hand
side of the window
update as the
parameters are
updated, so that
you can easily
observe the
wavelength (top
figure), frequency
(middle figure) and
temporal (bottom
figure) content of
the source
settings.

At the top-left of
the tab, it is
possible to chose
to either SET

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 523

FREQUENCY /
WAVELENGTH or
SET TIME-
DOMAIN. In most
simulations, the
'SET
FREQUENCY /
WAVELENGTH '
option is
recommended.

If you choose to directly modify the time domain settings, please keep the following points in mind:
Pulse durations: Choose a pulse duration that can accurately span your frequency or wavelength range
of interest. However, 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 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.
For single frequency simulations, simply set both the min and max wavelengths to the same value.

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.
For more information, please visit Changing the source bandwidth 610

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. Enabled by default.
OPTIMIZE FOR SHORT PULSE: Use the shortest possible source pulse.
This option is enabled by default in the FDTD solver. It should only be disabled when it is necessary to
minimize the power injected by the source that is outside of the source range (eg. convergence problems
related to broadband steep angled injection).
This option is disabled by default in the varFDTD solver, as it improves the algorithms numerical stability.

2003 - 2016 Lumerical Solutions, Inc


524 Lumerical Knowledge Base

Manual calculation of the source time signal


As explained above, the 'Standard' source type uses a fixed carrier with a gaussian envelope. The following
script code shows how to calculate the source time signal used by the source.
# calculate standard pulse time signal
frequency = 300e12;
pulselength = 50e-15;
offset = 150e-15;

t = linspace(0,600e-15, 10000);
w_center = frequency*2*pi;
delta_t = pulselength/(2*sqrt(log(2)));
pulse = sin( -w_center*(t-offset)) * exp( -(t-offset)^2/2/delta_t^2 );

plot(t*1e12,pulse,"t (fs)","source pulse time signal");

Note: There are some small difference between the pulse generated by this code and the actual time signal
generated by the 'standard' source pulse setting. If you need very precise control over or knowledge of the
source time signal, you should create create your own Custom time signal 613 .
Note: The 'broadband' option is generated with a more complex function. The precise function is not provide. To
create your own arbitrary source time signals, see the Custom time signal 613 page.

Beam options tab


In the general tab, set the source shape option to the desired shape (Gaussian, plane wave or Cauchy/
Lorentzian) before entering data in the beam options tab because the beam options that are available will
change depending on the source shape.

Beam options for all source shapes


THETA VS WAVELENGTH PLOT: This plot shows the actual injection angle theta for each source
wavelength as used in the simulation.

Multifrequency beam calculation (Gaussian, Cauchy/Lorentzian and Diffracting


plane wave only)
MULTIFREQUENCY BEAM CALCULATION check box enables/disables the calculation of the source profile
at multiple frequency points. This feature is recommended for broadband simulations, particularly if injection
under an angle is involved. It is important to remember that if this option is not checked, the same spatial
field profile at all frequencies is injected. See this dedicated topic 543 for more information about this feature.
NUMBER OF FREQUENCY POINTS specifies how many frequency points are going to be used to compute
the field profile.
NUMBER OF IFT POINTS specifies the number of points used to interpolate the beam profile and carry out
the convolution of the field profile with the modulation signal.

Beam options for Gaussian and Cauchy/Lorentzian 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.
VISUALIZE BEAM DATA: This button opens up a visualizer window where you can plot the current calculated
beam electric and magnetic field profile over the injection plane.

Scalar approximation (Gaussian and Cauchy/Lorentzian)


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

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 525

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 (Gaussian only)


References for the thin lens approximation are listed on the Sources 510 page.
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 unchecked, 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.

TIP: selecting the beam option


When the beam waist radius is several times larger than the wavelength used, scalar approximation option
should be selected. When the beam waist radius is roughly on the same order as the wavelength, the thin
lens option should be used.

Note: References for the thin lens source


The field profiles generated by the thin lens source are described in the following references. For uniform
illumination (filled lens), the field distribution is precisely the same as in the papers. For non-uniform
illumination at very high NA (numerical aperture), there are some subtle differences. This is due to a slightly
different interpretation of whether the incident beam is a Gaussian in real space or in k-space. This difference
is rarely of any practical importance because other factors such as the non-ideal lens properties become
important at these very high NA systems.

M. Mansuripur, "Distribution of light at and near the focus of high-numerical-aperture objectives," J. Opt. Soc.
Am. A 3,2086-2093 (1986).
M. Mansuripur, "Certain computational aspects of vector diffraction problems," J. Opt. Soc. Am. A 6, 786-
805 (1989).
M. Mansuripur, "Distribution of light at and near the focus of high-numerical-aperture objectives: erratum,
Certain computational aspects of vector diffraction problems: erratum" J. Opt. Soc. Am. A 10, 382-383
(1993).

The figure below shows the beam parameter definitions for the scalar approximation beam.

2003 - 2016 Lumerical Solutions, Inc


526 Lumerical Knowledge Base

The figure below shows the beam parameter definitions for the thin lens, fully-vectorial beam.

TIP: Setting Gaussian source


parameters
Gaussian spot size: The beam spot size can
be set independently of the source span. The
source span should be chosen to be larger
than the beam spot size. If the spot size is
larger than the simulation region, the beam
profile will be truncated at the simulation
boundary. If there is significant intensity at the
edges of the source, as shown in this figure,
the beam will scatter on injection.

Results returned
Results
FIELDS: The fields injected at the injection plane is returned as a function of position and frequency/
wavelength.
INDEX: The index of the region the source covers is returned. This value does not refresh automatically, user
needs to re-calculate the FIELDS.
TIME SIGNAL: Time domain signal of the source pulse.
SPECTRUM: The fourier transform of time signal.

5.4.3.6.2.1 Plane w aves - Edge effects

Objective
This section describes problems that can occur when using the plane wave source is truncated, either because the
span is too small, or when PML boundary conditions are used.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 527

Solvers 101

FDTD
VarFDTD
See also
Sources 510
Source field profiles and movies 628

TFSF sources 546

Example 1 and 2: Correct usage


Ideally the plane wave source should be used in the following manner: The source should span the entire simulation.
Periodic or Bloch boundary conditions should be used in the directions normal to the propagation. PML should be
used to to absorb the transmitted and reflected light.The first two examples illustrate this situation.

Description
Simulate a plane wave propagating through free space at
normal incidence.

Simulation Settings
Periodic BC for Y boundaries. PML for X boundaries.
Plane wave source extends through simulation boundary.
No physical structures

Results
An ideal plane wave propagates forward from the source,
and is absorbed by the PML on the right side of the
simulation.
In front of the source, a uniform intensity of 1 is measured
at all locations. This is expected for a plane wave.
Behind source injection plane, zero field is recorded
because there is no scattered field.

Recommendations
This is an appropriate way to setup simulations using plane
wave illumination and periodic structures.
For plane wave illumination of non-periodic structures,
consider using the TFSF source.

Description
Simulate a plane wave incident on a periodic array of
cylinders at normal incidence.

Simulation Settings
Periodic BC for Y boundaries. PML for X boundaries.
Plane wave extends through simulation boundary
A cylinder with index 1.4 will cause some scattering.

Results
In front of the source, a complex intensity pattern is formed
due to interference from the sphere.
Behind source injection plane, there is some scattered field
visible due to reflections from the sphere.

2003 - 2016 Lumerical Solutions, Inc


528 Lumerical Knowledge Base

Recommendations
This is an appropriate way to setup simulations using plane
wave illumination and periodic structures.
For plane wave illumination of non-periodic structures
surrounded by a uniform material, consider using the TFSF
source.

Example 3
If PML boundary conditions are used in the direction normal to the wave-vector, some undesired diffraction will occur
because of energy absorbed by the PML.

Description
Simulate a plane wave propagating through free space, but
with PML on all boundaries.

Simulation Settings
PML BC on all boundaries.
Plane wave extends through simulation boundary.
No physical structures.

Results
This simulation does not produce an ideal propagating
plane wave because the PML absorbs energy at the
simulation boundary, causing diffraction.
Far from the simulation boundary, the field still
approximates a plane wave.

Recommendations
This is not a recommended configuration, since the PML
causes non-physical distortions of the plane wave.
Consider using a focused beam source if you want a finite
sized beam.
Consider using a TFSF source if you want a plane wave on
a non-periodic structure.

Example 4
If the source does not span the entire simulation width, diffraction will occur at the source boundaries. Physically,
this setup can be understood as an infinite plane wave passing through an aperture the size of the source. Diffraction
occurs as the plane wave passes through the aperture.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 529

Description
Simulating a finite sized plane wave propagating in free space
with the planewave source.

Simulation Settings
PML BC on all boundaries.
Plane wave source does not extend through simulation
boundary.
No physical structures.

Results
This simulation does not result in an ideal propagating
plane wave because the source has a finite width. This
causes diffraction at the edges of the source.
Far from the source boundary, the field still approximates a
plane wave.
Care must be taken with this type of simulation, since any
analysis may have to compensate for the diffraction near
the source boundary.

Recommendations
This is not a recommended configuration. There are very
few situations where this simulation setup is actually
required.
Consider using a focused beam source if you want a finite
sized beam.
Consider using a TFSF source if you want a plane wave on
a non-periodic structure.

5.4.3.6.2.2 Plane w aves - Angled injection

Objective
This page describes how to set up a simulation with a plane wave source injected at an angle. Issues that arise
when using angled injection sources, including PML reflections, wavelength dependence of the injection angle, and
other errors are also discussed. Even though only the plane wave source is discussed here, the same issues arise
with all the sources including the mode source.

Note that the wavelength dependence issue can be avoided by using BFAST 590 or multifrequency beam calculation
for beam source and diffracting plane wave source.

Solvers 101

FDTD
VarFDTD
In this section
Simulation setup 530
PML reflections 531
Broadband injection angles 531

Injection errors 532


Advanced 532
See also
BFAST 590
Diffracting plane wave source 534
Multi-frequency beam calculation 543

Sources 510
Bloch boundary conditions 471
Broadband injection angles 536
Parameter sweep tasks 716

2003 - 2016 Lumerical Solutions, Inc


530 Lumerical Knowledge Base

Nested sweeps 707


Measuring reflection 860
Bloch BCs in broadband sweeps 475

Simulation setup
Source
To set a non-zero injection angle for a plane wave source, edit the source object. In the GENERAL tab of the edit
source window, set ANGLE THETA and/or ANGLE PHI (Angle Theta alone for 2D, both for 3D, if needed).

ANGLE THETA sets the angle with respect to the injection axis. In this example, the injection axis is the z-axis and
the XZ view is shown below.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 531

This angle of injection is then rotated around the injection axis by ANGLE PHI in a right-hand context. The XY view in
the image below shows phi in our example.

Boundary conditions
Bloch boundary conditions are required when using a plane wave source injected at an angle. Bloch boundary
conditions are similar to periodic boundary conditions, but they take into account a phase change across each
period. Information about setting up Bloch boundary conditions can be found on the Bloch boundary conditions 471

page.

However, when BFAST source technique 590 is used, the boundary conditions set by the users in the plane of
oblique incidence will be overridden by BFAST's own built_in boundary conditions.

PML reflections
When injecting at steep angles, light will strike the PML boundaries at grazing angles. PML boundaries are
optimized to absorb light at normal incidence. At grazing angles of incidence, large PML reflections can decrease
the accuracy of the simulation results. Increasing the number of PML layers will reduce reflections.

Steeper injection angles require more PML layers. In the multi-layer stack Planewave technique 156 application
example, the model setup script is used to set the minimum number of PML layers used based on the angle of
injection of the source.

Broadband injection angles


When a non-zero injection angle is set for Bloch/periodic plane wave source type, the actual angle of injected in the
simulation varies as a function of frequency in broadband simulations. This effect is discussed on the Broadband
injection angles 536 page.

To get the actual angle injected at any particular wavelength, you can use the getsourceangle 1598 function, or edit

2003 - 2016 Lumerical Solutions, Inc


532 Lumerical Knowledge Base

the source to see a plot of theta versus wavelength in the GENERAL tab.

In order to get broadband results at a certain source angle, a parameter sweep task can be set up to run a series of
single frequency simulations sweeping over the frequency range of interest. A guide to setting up parameter sweeps
is available at the Parameter sweep tasks 699 page.

To get the broadband results over a range of injection angles, a nested sweep can be set up to sweep over the range
of injection angles and source frequencies. The Nested sweeps 707 page provides a tutorial.

Additionally, this issue can be avoided by using BFAST 590 instead of Bloch/periodic plane wave source.

Injection errors
In broadband simulations with angled injection sources, there can be large injection errors at frequencies outside of
the center frequency. This can lead to errors if you use the transmission through a monitor placed behind the source
to measure reflected power. The alternative technique of using a monitor placed in front of the source is described on
the Measuring reflection 860 page.

Advanced
Longer source pulse
A longer source pulse can be used in the case where you are running a broadband simulation and injecting at a
steep angles where wavelengths beyond a certain threshold are injected at 90 degrees. In the following image you
can see that for this particular source setup, the wavelengths above approximately 0.8um will be injected at 90
degrees.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 533

When light is injected at 90 degrees, it propagates across the simulation interfering constructively with itself. At
these wavelengths, there can be a large field intensity because the light does not propagate out of the simulation
region. The Fourier transform of the time signal will have a large peak corresponding to the wavelengths injected at
90 degrees, and the sidelobes of this peak can create noise at wavelengths of interest.

By default, FDTD Solutions uses the shortest possible source pulses in the time domain, which means they have a
much broader spectral content than the specified source wavelength range. A longer source pulse will have narrower
spectral content, and it is possible to increase the length of the source pulse until spectrum of the source pulse
does not include the wavelengths that are injected at 90 degrees.

The spectrum vs wavelength is plot for the default source pulse. A significant amount of power is injected at
wavelengths above 0.8um.

2003 - 2016 Lumerical Solutions, Inc


534 Lumerical Knowledge Base

The spectrum for a source pulse where the pulselength and offset have been increased to 10 times the default
values. The power at wavelengths above 0.8um are reduced.

Interpolation
Another method for getting broadband results over a range of injection angles is discussed in Bloch BCs in
broadband sweeps 475 . This method uses broadband simulations and runs one parameter sweep over a range of
injection angles. This requires fewer simulations than the nested sweep method, but involves more post-processing
to interpolate the data to a common source angle vector.

Since BFAST 590 source fixes the incident angle for all the frequencies set in the source, the above interpolation is
not necessary, as one simulation can give broadband results at the given angle. When users want to get broadband
results at many different incident angles, a sweep of incident angles can be used. No interpolation will be needed
since the sweep can give broadband results as a function of incident angles.

5.4.3.6.2.3 Diffracting plane w ave source

Objective
The purpose of this section is to describe how diffracting plane wave source works and how it differs from Bloch/
periodic plane wave source. Well know double slit experiment is used to demonstrate this.
Solvers
101

FDTD

Associat
ed files
Double
slit
experimen
t with
diffracti
ng plane
wave
sources.f
sp

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 535

See also
Plane wave
sources 521
Plane waves
- Edge
effects 526
BFAST 590

Discussion and simulation setup


Diffracting plane wave source is a
source in which plane wave propagates
through a rectangular aperture. The size
of the source defined on the Geometry
tab is then the dimension of the
aperture. Additionally, diffraction pattern
will be produced as the plane wave
travels through the aperture. This differs
from the Bloch/periodic plane wave
source type, which always
automatically expands across the size
of the entire simulation region in order
to simulate pure plane wave. The type o
the plane wave source should

For this reason, diffracting plane wave


source should be used only in
simulations where the diffraction is a
desirable effect. In case of the double
slit experiment, the diffracting plane
wave source allows us to replace each
slit with a plane wave source instead of
creating a structure representing the
slits.

The sources are 12um apart and each


source/slit has size of 2um. Frequency
domain field and power monitor is used
to represent the screen that is placed
58um from the slits.

The following analytical formula can be used to calculate the spacing of the interference maxima on the projection
plane:

zl
s=
d
where:
z is the distance of the projection plane from the slits
d is the distance between the slits
lambda is wavelength

Simple calculation shows that the distance between the maxima at 633nm should be approximately 3.05um.

Tip: Reducing the simulation size


To minimize the simulation time, it is generally recommended that you do not include large regions of empty
space in a simulation. It would be possible to obtain these same results with a much smaller simulation region,
by taking advantage of the far field projection functions. This example uses a large simulation region to keep the

2003 - 2016 Lumerical Solutions, Inc


536 Lumerical Knowledge Base

analysis as simple as possible, even though it is less computationally efficient.

Results
The simulation results shown on the figures below demonstrate the diffracting nature of the sources and their
constructive and destructive interference. Moreover, the distance between the maxima is ~3.04um, which is well
aligned with the analytical result above.

5.4.3.6.2.4 Broadband injection angles

Objective
This section describes how the source angle of incidence changes as a function of frequency for non-zero injection
angles when Bloch/periodic plane wave source type is used. Note that this issue can be avoided by using BFAST
590 or multifrequency beam calculation for beam source and diffracting plane wave source.

Solvers 101

FDTD
VarFDTD
Associated
files
usr_broadb
and_inject
ion_angles
.fsp
usr_broadb
and_inject
ion_angles
.lsf

See also
BFAST 590
Diffracting
plane wave
source 534
Multi-
frequency
beam
calculation 543
Sources 510
Simulation 479
getsourceangl

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 537

e 1598
Bloch
boundary
conditions 471
Bloch BCs in
broadband
sweeps 475
PML reflection
at angles 460

Bloch/periodic plane wave source injects fields that have a constant in-plane wavevector at all frequencies. The
following figure shows a source with a nominal injection angle of approximately 45 degrees (purple arrow). The in
plane wave vector (dotted green line) is chosen such that the actual injection angle at the center frequency fsim of the
simulation matches the nominal injection angle. Since the magnitude of the wavevector is proportional to frequency,
the actual injection angle will change as a function of frequency. Higher frequencies will be injected at smaller
angles, while lower frequencies will be injected at larger angles.

The in-plane wavevector is calculated with the following formula.


kin- plane = k SIM sin( q SIM )
where
nf SIM
k SIM = 2 p
c
and qSIM is the nominal injection angle, fSIM is the center frequency of the source, n is the refractive index and c is
the speed of light.

Since the magnitude of the wavevector is a function of frequency, while the in-plane component is fixed, the injection
angle must change as a function of frequency. The angular dependence can be calculated with the following formula.

2003 - 2016 Lumerical Solutions, Inc


538 Lumerical Knowledge Base

k in- plane
sin [q ( f )] =
k( f )
sin( q SIM ) f SIM
=
f
sin( q SIM ) f SIM
q ( f ) = a sin
f
Therefore, while broadband sources can inject at angles, it must be recognized that the injection angle will change
as a function of frequency. At close to normal incidence, the change in angles is smaller than at steeper angles. A
source injecting light at 450 to 550 nm with a 5 degrees nominal incidence angle will actually inject at angles
between 4.5 and 5.5 degrees. If the nominal angle is increased to 25 degrees, the range of angles will be between 23
and 28 degrees.

The getsourceangle function can be used to get the actual injection angle as a function of frequency. This data is
also displayed in the GENERAL tab of the Plane wave and Gaussian sources.

Injection angle example


In usr_broadband_injection_angles.fsp, the source injection angle is 30 degrees, and the frequency range
is 100 to 150 THz (2-3um).

Run the simulation, then run associated script. The script first calculates the actual injection angle vs frequency with
the getsourceangle function.

Notice that the injection angle changes as a function of frequency. At low frequencies, the injection angle is almost
40 degrees. At high frequencies, the angle is about 25 degrees.

Next, the script plots the fields profile at 100 and 150 THz. Both figures are from the SAME simulation. The actual
propagation direction is obviously different.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 539

Field profile at 100THz. Angle is about 40 degrees. Field profile at 150THz. Angle is about 25 degrees.

Note: What to do
If you encounter broadband injection angle error in your
simulation, there are two options you can choose from to
avoid this problem: you can run a series of narrowband
simulations or run a series of single frequency simulations.
When using a series of narrowband simulations, you need to
again check to make sure that the angle deviance is at an
acceptable level. If not, you would have to use a series of
single frequency simulations to obtain accurate results.

When running these series of simulations, a feature that is


very helpful is the parameter sweep 699 .

Note: BFAST can avoid this problem due to its special


formulation, please refer BFAST 590 page.

Note: Bloch vector with Bloch boundary


conditions
When using bloch boundary conditions, the bloch vector
should be set to k SIM. The Bloch BC option "set based on
source angle" automatically sets the correct Bloch vector.

Note: Angle going past 90 degrees


When the center angle is going past 90 degrees, the source
in an attempt to inject angle above 90 degrees injects
evanescent fields. And this behavior is not desirable, and
simply state, the source is not able to inject above 90
degrees. When the center angle is large and/or when the
source is more broadband, this issue is more likely to occur.
In such situations, it is usually necessary to reduce the
center angle or source wavelength range.

2003 - 2016 Lumerical Solutions, Inc


540 Lumerical Knowledge Base

5.4.3.6.2.5 Circular polarization and phase convention

Objective
This topic discusses the phase convention and describes two techniques for implementing circularly (or elliptically)
polarized sources.

1. Use two sources polarized along orthogonal axes and adjust the relative amplitudes and phases of the sources
to create the desired polarization. This method is useful to study only one polarization state of the incoming light.
2. Run two simulations. In the first simulation, set the source polarization angle to 0 degrees. In the second
simulation, set the source polarization angle to 90 degrees. Using the linearity of Maxwell's equations, the
response to any arbitrary source polarization can be created by adding the the electromagnetic fields from the
two simulations with the appropriate complex-valued weighting factors.

Solvers 101

FDTD
VarFDTD
In this topic
Phase convention 540
Two sources in one simulation 540
Summing the results from two simulations 542

Associated files
usr_polarization1.fsp
usr_polarization1.lsf
usr_polarization2.fsp
usr_polarization2.lsf

See also
Sources 510
Polarization ellipse 819
CW normalization 618

Phase convention
The sign convention used in FDTD Solutions for a forward propagating planewave is exp(-iwt+ikz), so when
introducing a phase offset, phi, to the source, you will get exp(-iwt+ikz+i*phi) for forward propagating light.

Two sources in one simulation


Consider the file usr_polarization1.fsp. Here we have an x polarized plane wave source with its phase set to
0, and a y polarized plane wave source with its phase set to 90 degrees. This creates a forward propagating plane
wave with phases:
phase(Ex) = +kz
phase(Ey) = +kz + pi/2

Depending on which historical convention you use, this could be called either circular right or circular left.

Note: Normalization
When using multiple sources in a simulation, extra care must be taken to ensure you understand how the the
results are normalized. In this case, with two orthogonal sources that each have an amplitude of 1, the monitor
shows that the amplitude of both Ex and Ey are 1. This implies that |E| = sqrt(2). A power transmission monitor
located in front of the sources would return 1 (not 2) because the transmission function is normalized to the sum of
the source power from all sources. In this particular simulation, the standard normalizations give very sensible
results with the two sources. However, in many simulations with multiple sources, the default normalization may
not be appropriate. It may be necessary to disable the default normalization. This is particularly important if the
sources start to have different frequencies, time offsets, etc, or if the sources can interfere with each other in any
way.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 541

Running usr_polarization1.lsf with usr_polarization1.fsp creates the following plots.

Figure 1 Figure 2

Figure 3 Figure 4

Figures 1 and 2 compare the phase of the fields along the propagation direction measured in the simulation with the
expected phase. From Figure 3 we can see that there is a constant 90 degree phase difference between the x and y
components of the electric field, and Figure 4 verifies that the amplitudes of the field components are 1 after cw
normalization.

We can also take advantage of the vector plot feature to visualize the circular nature of the wave's polarization. Click
to visualize the E field results of the Z monitor. Choose the vector plot option. you can edit the settings for more or
fewer arrows in the plot using the downsampling option.The figure below was generated using a much finer mesh for
more data points:

2003 - 2016 Lumerical Solutions, Inc


542 Lumerical Knowledge Base

Summing the results from two simulations


The example files usr_polarization2.fsp and usr_polarization2.lsf can be used to construct the
response to a Gaussian beam source of arbitrary polarization by running two simulations.

Open usr_polarization2.fsp and run the script file usr_polarization2.lsf. This script will run two
simulations (each with a single source) and save the data in temporary fsp files called
usr_polarization2_0.fsp and usr_polarization2_90.fsp. After running the script file once, set the
variable rerun_simulations to 0 and adjust the complex weighting factors weight_0 and weight_90 in
usr_polarization2.lsf. This demonstrates how the response to an arbitrary source polarization can be
created without having to rerun the simulations.

In the figures below, we show the results for elliptical polarization created by setting weight_0 to 1 and
weight_90 to exp( 1i * 45 * pi /180), i.e. a 45 degree phase difference.

Note: BFAST is a special source technique 590 . Users should run two separate simulations using two orthogonal
polarizations and 90 phase difference to get correct circularly polarized result, and should not add two plane wave
sources with orthogonal polarization and 90 phase difference in the same simulation file !

5.4.3.6.2.6 Dark field beam

Objective
The example file on this page provide an example dark field beam source.

Solvers 101

FDTD
VarFDTD
Associated files
usr_beam_dark_field_source.fsp
See also
Sources 510
Sources - Planewave and Beam 521

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 543

This type of illumination is created using two beam sources with different Numerical Aperture settings. The phase of
the two sources are reversed, meaning the source with the smaller NA will cancel the middle portion of the source
with the larger NA, creating a source with a far field radiation pattern as shown above.

Note: It is necessary to run a couple of reference simulations to determine the correct relative amplitudes of the
two sources. See the description in the setup script of the source object for more details.

For more information about dark field illumination, please contact support@lumerical.com.

5.4.3.6.2.7 Multifrequency beam calculation

Objective
The purpose of this section is to describe the motivation and settings related to the use of multifrequency beam
calculation that can benefit broadband simulations involving Gaussian and Cauchy/Lorentzian beam source.

Solvers 101

FDTD

Associated files
Broadband_gaussian_source_injection_angle
_comparison.fsp
Broadband_gaussian_source_injection_angle
_comparison.lsf

See also
Broadband injection angles 536

Beam source 521


BFAST 590

Typically, FDTD sources, including the default settings of Gaussian beam source, are specified as a time domain
field on a 2D plane as a function of time:

(x,y,z0 ,t) = E (x,y,z0 , 0 )M(t)
where

E (x,y,z0 , 0 ) defines the field profile
M (t ) is the modulation signal

w
This approach introduces the desired field profile only at the center frequency 0 . Additionally, when such source is
injected under an angle theta, the injection angle becomes strongly frequency dependent. While this approach
provides excellent performance for single wavelength and narrow band simulations with normal incidence angle, it
has obvious drawbacks when it comes to broad band simulations. For this reason the beam source in FDTD offers
the possibility to enable the "multifrequency beam calculation" that is available on the "Beam options" tab of the
source settings:

2003 - 2016 Lumerical Solutions, Inc


544 Lumerical Knowledge Base

Enabling the "multifrequency beam calculation" will employ Inverse Fourier Transform(IFT) to construct frequency
dependent field profile:



(x,y,z0 ,t) = F -1 E (x,y,z0 , )M( w)


Settings and performance considerations


The "number of frequency points" specifies how many frequency points are going to be used to compute the field
profile. Note that the lowest and highest frequency points are not aligned with the min and max frequency specified
on the "Frequency/Wavelength" tab as it would clip the spectrum in most cases. The "number of IFT points" then
specifies the number of points used to interpolate the beam profile and carry out the convolution of the field profile
with the modulation signal.

By default, the number of frequency and IFT points is set to 15 and 125 points respectively. These values are
selected as a good tradeoff between accuracy and the performance requirements that should satisfy most
simulations using the default frequency bandwidth. While using only one frequency point will provide the same
results as the standard beam source and additional points will improve the accuracy, we recommend to use at least
7 frequency points. The number of IFT points can have more severe impact on the simulation results if the number is
too low for given bandwidth. Generally, the number of IFT points must allow for accurate reconstruction of the time
signal. The maximum number of IFT points is 251 and it cannot be set to even numbers. Note that increasing the
number of points will increase the required calculation time and resources.

The IFT calculation itself is conducted at the beginning of each simulation and it can be expected to take up to
several minutes for 3D simulation on an average machine. This is fairly negligible in case of a single simulation, but it
can become a considerable factor in case of running multiple short simulations such as in case of a parameter
sweep. For this reason, it is recommended to use this feature only when it benefits the simulation. This can typically
involve:
o Broadband simulation using thin lens or scalar approximation with non-zero distance from waist
o Broadband simulation with angled injection

Broadband beam profile example


As discussed above, when the multifrequency beam calculation is disabled, the beam profile is defined only for the
center frequency. Enabling this option then makes the beam profile frequency dependent and allows for more
physically accurate broadband simulation. The example below demonstrates how the beam profile is changing with
the frequency for a filled thin lens beam with NA=0.6 and number of plane waves=200:

Field profile at 310nm Field profile at 700nm Field profile at 1300nm

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 545

Broadband injection angles example


Another type of simulations that can greatly benefit from the multifrequency beam calculation are broadband
simulations with angled injection. The figure below shows comparison of a beam that is injected under an angle
theta=45 degrees on a range of wavelengths from 400 to 700 nm. While the multifrequency beam source injects light
under a constant angle of 45 degrees, when the feature is disabled the injection angle ranges from 34 degrees at
400nm to almost 80 degrees at 700nm.

Gaussian beam injection angle dependency w ithout


m ultifrequency beam calculation Gaussian beam injection angle dependency w ith
m ultifrequency beam calculation

The following example is using a 2D field monitor to demonstrate the propagation of a Gaussian beam injected under
an angle and interacting with a dielectric/air interface. The plots below show how the multifrequency calculation can
benefit the reflection/transmission simulations since the R/T characteristics are highly dependent on the angle of
incidence. See the associated files for more details about the simulation setup and the possibility to run the
simulation on your computer. This example also demonstrates that the multifrequency calculation has negligible
simulation time penalty in 2D mode despite the fact that the number of IFT points is set to 125.

This figure show s broadband Gaussian beam w ith injection angle of 35 degrees w ith the m ultifrequency calculation
disabled. It dem onstrates the injection angle variation w ith frequency and it's im pact on the reflection and transm ission
on the dielectric/air interface.

2003 - 2016 Lumerical Solutions, Inc


546 Lumerical Knowledge Base

Identical sim ulation setup as in the previous figure, but w ith the m ultifrequncy calculation enabled. This results in
constant injection angle across the bandw idth and consequently in m ore physical R/T characteristics.

5.4.3.6.3 Sources - TFSF

Total-field scattered-field sources


Total-field scattered-field sources are used to separate the computation region into two distinct regions one
contains the total field (i.e. the sum of the incident field and the scattered field), while the second region contains
only the scattered field. The incident field is a plane wave with a wavevector normal to injection surface. This source
type is particularly useful to study the scattering behavior of objects, as the scattered field can be isolated from the
incident field.

Solvers 101

FDTD
VarFDTD
In this section
TFSF - Correct usage 550
TFSF - Examples 552
TFSF - Power normalization 555
TFSF - Cross sections and normalization 562

TFSF - Periodic Boundaries 561


TFSF - Custom 564
Associated files
usr_source_TFSF.fsp

See also
Sources - Others and advanced techniques
587

Source movies 628


Mie scattering
TFSF video
Using the boundary conditions tab 459

The TFSF source is often used to study scattering from small particles, such as the Mie scattering 1752 example. It is
also useful when plane wave illumination of non-periodic devices is required, such as a defect on a planar surface
(see the Defect scattering and detection 1737 example). The TFSF source can be used for:

Particles in a homogeneous medium (which may be lossy or anisotropic)


Non-periodic structures in a multi-layer substrate, which may be lossy or anisotropic.
Periodic structures in a multi-layer substrate, when used in conjunction with Periodic or Bloch boundary
conditions.

The TFSF source allows you to separate the computation region into two distinct regions:
Total Field region - includes the sum of the incident field wave plus the scattered field, and the

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 547

Scattered Field region - includes only the scattered field.

TIP: More information


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 555 .

Both regions are visible in the above figure. We should note that the physical field is the total field and the separation
into an incident and a scattered field requires careful interpretation. For particles in a homogeneous medium, the
incident field is a plane wave. For particles on a substrate or multi-layer stack, the incident field is the field that
would exist in the multi-layer in the absence of a particle (or defect).

The TFSF source is an advanced source and care must be taken to ensure proper setup and analysis of results.
Please see the following pages for more information.

Correct usage 550

See this page for further information.

Examples 552

See this page for a number of examples


illustrating correct and incorrect usage
of the TFSF source.

Power normalization 555

See this page for more information on


power normalization with the TFSF
source

Usage in periodic
boundaries 561

See this page for more information on


TFSF source usage in periodic
boundaries

2003 - 2016 Lumerical Solutions, Inc


548 Lumerical Knowledge Base

Edit source tabs


General tab
INJECTION AXIS: Sets the axis along which the radiation propagates.
DIRECTION: This field specifies the direction in which the radiation propagates. FORWARD corresponds to
propagation in the positive direction, while BACKWARD corresponds to propagation in the negative
direction.
AMPLITUDE: The amplitude of the source as explained in the Units and normalization 618 section.
PHASE: The phase of the point source, measured in units of degrees. Only useful for setting relative phase
delays between multiple radiation sources.
ANGLE THETA: The angle of propagation, measured in degrees, with respect to the injection axis defined
above.
ANGLE PHI: The angle of propagation, in degrees, rotated about the injection axis in a right-hand context.
POLARIZATION ANGLE: The polarization angle defines the orientation of the injected electric field, and is
measured with respect to the plane formed by the direction of propagation and the normal to the injection
plane. A polarization angle of zero degrees defines P-polarized radiation, regardless of direction of
propagation while a polarization angle of 90 degrees defines S-polarized radiation.
THETA VS WAVELENGTH PLOT: This plot shows the actual injection angle theta for each source
wavelength as used in the simulation.

Geometry tab
The geometry tab contains options to change the size and location of the sources.

Frequency/Wavelength tab
The Frequency/
Wavelength tab is
shown to the right.
This tab can be
accessed through
the individual
source properties,
or the global
source properties.
Note that the plots
on the right-hand
side of the window
update as the
parameters are
updated, so that
you can easily
observe the
wavelength (top
figure), frequency
(middle figure) and
temporal (bottom
figure) content of
the source
settings.

At the top-left of
the tab, it is
possible to chose
to either SET
FREQUENCY /
WAVELENGTH or

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 549

SET TIME-
DOMAIN. In most
simulations, the
'SET
FREQUENCY /
WAVELENGTH '
option is
recommended.

If you choose to directly modify the time domain settings, please keep the following points in mind:
Pulse durations: Choose a pulse duration that can accurately span your frequency or wavelength range
of interest. However, 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 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.
For single frequency simulations, simply set both the min and max wavelengths to the same value.

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.
For more information, please visit Changing the source bandwidth 610

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. Enabled by default.
OPTIMIZE FOR SHORT PULSE: Use the shortest possible source pulse.
This option is enabled by default in the FDTD solver. It should only be disabled when it is necessary to
minimize the power injected by the source that is outside of the source range (eg. convergence problems
related to broadband steep angled injection).
This option is disabled by default in the varFDTD solver, as it improves the algorithms numerical stability.

Manual calculation of the source time signal


As explained above, the 'Standard' source type uses a fixed carrier with a gaussian envelope. The following

2003 - 2016 Lumerical Solutions, Inc


550 Lumerical Knowledge Base

script code shows how to calculate the source time signal used by the source.
# calculate standard pulse time signal
frequency = 300e12;
pulselength = 50e-15;
offset = 150e-15;

t = linspace(0,600e-15, 10000);
w_center = frequency*2*pi;
delta_t = pulselength/(2*sqrt(log(2)));
pulse = sin( -w_center*(t-offset)) * exp( -(t-offset)^2/2/delta_t^2 );

plot(t*1e12,pulse,"t (fs)","source pulse time signal");

Note: There are some small difference between the pulse generated by this code and the actual time signal
generated by the 'standard' source pulse setting. If you need very precise control over or knowledge of the
source time signal, you should create create your own Custom time signal 613 .
Note: The 'broadband' option is generated with a more complex function. The precise function is not provide. To
create your own arbitrary source time signals, see the Custom time signal 613 page.

Results returned
Results
TIME SIGNAL: Time domain signal of the source pulse.
SPECTRUM: The fourier transform of time signal.

5.4.3.6.3.1 Correct usage


The page provides further information on the correct usage of the TFSF source.

Solvers 101

FDTD
VarFDTD
See also
Sources 510
Source movies 628
TFSF sources 546
TFSF - Correct usage 550

TFSF - Examples 552


Mie scattering

Understanding the TFSF source


The TFSF source is an advanced version of the Plane wave source designed primarily for particle scattering
simulations, where the particle may be in a homogeneous medium or on a multi-layer substrate. When adding a
TFSF source to a simulation, the most visible difference between the TFSF source and all other sources is that it
appears as a 3D box, rather than a 2D plane. As shown in the above figure, one side of the source will be the
Injection plane. The source will inject a plane wave from this side of the source. This aspect of the source is very
similar to all other sources.

The slightly confusing aspect is that the source will then 'subtract' the same plane wave when it arrives at one of the
boundaries of the source. This is much easier to understand with an example. The following screenshots show the

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 551

behavior of the TFSF source in free space. Notice that the fields are injected at one edge, and are then 'subtracted'
at the other edge. Also notice that the fields are zero in the 'Scattered field' region, since there are no scattering
objects inside the source. For additional examples, see the Examples 552 page. The subtraction happens at the
boundaries of the source and a reference 1D line at the top right corner of the TFSF boundary is used to determine
the index profile of all the boundaries. For this reason it is important to make sure the Reference corner (yellow line
in the above figure), always goes through the substrate and NOT the feature for which we want to calculate
scattering. For more information on the correct usage of the source in periodic boundaries, please refer to the page
TFSF source in Periodic Boundaries 561 .

Simulating empty space is always a A frequency monitor records the CW


good starting point. fields.
Movie of Ez(t). The plane wave was
An intensity of 1 is measured within
injected along the left edge and
the TFSF source, while 0 is
propagates in the positive X
measured outside. There were no
direction.
structures to cause any scattering,
so the field remained an ideal plane
wave inside, with an amplitude of 1.
Similarly, the fields are zero in the
scattered field region since there
were no scattering objects in the
simulation.

Orientation with respect to the structure


When adding a TFSF source to your simulation, please ensure the following conditions are satisfied:

1. The 'scattering' object must be completely outside the TFSF source. The boundaries of the source cannot extend
through the scattering object.

2. The injection axis of the source must be normal to the substrate. In other words, all sides of the TFSF source
must 'see' the same refractive index profile along the direction of propagation. The following figures show one
example of a valid setup and one example of invalid setup.

NOT VALID. The injection axis is not normal to the


VALID. The injection axis is normal to the Gold and substrate. Also, the upper side of the source 'sees' a
Glass layers. Also, each side of the source 'sees' the refractive index of air, while the lower side 'sees' the
same refractive index profile (Air - Gold - Glass) along substrate index.
the direction of propagation, from the Injection plane to
the End plane.

Power normalization

2003 - 2016 Lumerical Solutions, Inc


552 Lumerical Knowledge Base

Power normalizations with the TFSF can be non-intuitive. For example, you may find that power transmission
measurements depend on the size of the the source. It is also possible to find situations where power
measurements are greater than 100%. While this may be non-intuitive, it is simply a normalization issue and does
not indicate a simulation error. In these situations, it is usually more physically meaningful to normalize to the
source intensity, rather than the power injected by the source. See the sourceintensity 1603 script function or contact
Lumerical support for more information.

Non-normal angles of incidence


When using non-normal angles of incidence, please take the following precautions
Remember that the angle of incidence is still wavelength dependent, as with other beam and plane wave sources.
Please see Broadband injection angles 536 for more details.
For best results, you should use a mesh override region over the entire x, y, and z span of the source so that the
mesh is uniform over the source.
For normalization, please note that the sourceintensity 1603 is defined with respect to the principle injection plane of
the source. There may be a factor of cos(theta) that needs to be applied to your result. Please see the section
Cross sections and normalization 562 as well as the Examples 552 for more details.

Non-uniform mesh
The TFSF supports the use of non-uniform mesh within the source. However, for best results, the mesh should be
uniform in the directions normal to the direction of propagation. For example, if the source is injecting along the Z
axis, the x,y mesh should be uniform within the TFSF source. This detail is particularly important
when the source angle is non-zero. See Particle on a surface at non-normal incidence 554 .

Testing your setup


The best way to test your setup is to temporarily disable the particle or defect, run your simulation and perform your
subsequent analysis. This will allow you to determine the noise floor and immediately see if something is wrong with
your setup. For example, if you are measuring the scattering and absorption cross section of a particle on a surface,
you should expect to find a scattering and absorption cross sections of 0. In most cases, your defect or particle will
have a mesh override region so that the mesh will not change when the defect is disabled. Typically the magnitude of
the electric field in the scattered field region without a defect should be approximately 1e-7 when the incidence field
amplitude is on the order of 1.

The magnitude of the electric field The magnitude of the electric field
The simulation setup with a TFSF with the particle enabled on a log
with the particle disabled on a log
source at a non-normal angle of scale. We now have confidence that
scale. Note that the field in the
incidence. the scattered field (on the order of
scattered field region is on the order
of 1e-7, while the field in the total 1e-3 to 1e-1) is correct and well
field region is on the order of 1. above the noise floor.

5.4.3.6.3.2 Examples
The following examples demonstrate how the TFSF can be used:

Free space 553


Scattering particle in free space 553

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 553

Multi-layer stack with gap 553


Particle on a surface at non-normal incidence 554

Absorbing materials 554


Extending through simulation boundaries 555
Injection parallel to substrate 555

Example 1: TFSF source in free space

Simulating empty space is always a A frequency monitor records the CW


good starting point. fields.
Movie of Ez(t). The plane wave was
An intensity of 1 is measured within
injected along the left edge and
the TFSF source, while 0 is
propagates in the positive X
measured outside. There were no
direction.
structures to cause any scattering,
so the field remained an ideal plane
wave inside, with an amplitude of 1.
Similarly, the fields are zero in the
scattered field region since there
were no scattering objects in the
simulation.

Scattering object in free space


This is a typical setup for Mie scattering. For a step-by-step tutorial example, see the Silver Nanowire Getting
Started 1724 example.

A scattering object (circle with n= A frequency monitor records the CW


1.5) is located inside the source. Any Movie of Ez(t). We can now see fields.
light scattered from the object will scattering from the circle.
The electric field intensity profile is
propagate through the source now much more complicated
boundary, into the scattered field because of scattering from the circle.
region. The TFSF source continues to
subtract the ideal plane wave at the
edge of the source. Only scattered
fields will pass into the region outside
the TFSF source.

Multi-layer stack with gap


The TFSF source can be used in systems with substrates and multi-layer stacks. The injection direction does not
have to be normal to the surface. Also, you should extend the substrate/stack completely through the source and

2003 - 2016 Lumerical Solutions, Inc


554 Lumerical Knowledge Base

boundaries.

This example shows a 3 layer stack A frequency monitor records the CW


composed of Air - Gold - Glass, with fields.
a small gap in the gold layer. Movie of Ez(t). Notice that most of
Once again, notice that the reflection
If you are interested in using the the reflection from the Gold interface
from the Gold layer is removed by the
TFSF source with substrates or multi- is automatically removed by the
source. Only light scattered from the
layer stacks, you should first run a injection plane of the source. Only
gap will pass through the edge of the
simulation without any gaps or scattering from the gap will pass
source.
scattering object, to ensure you through the edge of the source.
understand the behavior of the TFSF
source.

Particle on a surface at non-normal incidence


The TFSF source can be used in systems with substrates and multi-layer stacks. This example shows how the
source can be used to measure the scattering and aborption cross sections at non-normal incidence. Please see
Cross sections and normalization 562 for details on normalization the cross section.

This example shows a gold particle


on a surface. Note that the mesh Movie of |E(t)|2. Notice that only the
override regions extends completely field scattered by the gold particle
outside the source region in the x and can be seen in the scattered field
y directions to ensure that the x and region. The light reflected by the
y meshes are uniform over the region silicon substrate is removed. The scattering and absorption cross
of the source. The z mesh can be sections can be calculated. A
graded. In this example, the source frequency monitor records the CW
and the cross section object "scat" fields.
have been increased in size for clarity
in the movie but both could be
brought inside the uniform mesh
override region to save memory. The
source is at a nominal angle of 10
degrees, which means that angle of
incidence is actually wavelength
dependent, however, the small
change in angles has been ignored in
the analysis.

Absorbing materials
The TFSF source supports dispersive (absorbing) materials.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 555

The simulation volume is composed A frequency monitor records the CW


of Silicon. At 600nm, the index of fields.
Silicon is approximately n=3.9 + Movie of Ez(t).
Notice that the the field intensity
i0.02, which will create substantial decays, due to absorption. Also
absorption as the fields propagate. notice that the fields outside the
No scattering object is present. source are still zero, since there are
no scattering object within the
source.

Extending through simulation boundaries


In most cases, the TFSF source should not be extended through the simulation boundaries. The only exception is
that the TFSF can be extended through Periodic or Bloch boundaries.

NOT VALID - Extending source


NOT VALID - Extending source through PML boundaries
VALID - Extending source through
through PML boundaries Periodic boundaries

Injection parallel to substrate


It is not correct to use the TFSF when the injection is parallel to the surface. For more information, see the Correct
usage 550 page.

NOT VALID - Injection must be


normal to the surface.

5.4.3.6.3.3 Pow er normalization


Power normalization with the TFSF source can be slightly confusing, particularly when the data is normalized by the
power injected by the source.

This issue is best illustrated with an example. The following screenshots shows a Mie scattering simulation, where a
small gold sphere is illuminated by a planewave using the TFSF source. The goal of the simulation is to measure the
amount of power absorbed by the particle when it is illuminated by a plane wave.

2003 - 2016 Lumerical Solutions, Inc


556 Lumerical Knowledge Base

Solvers 101

FDTD
VarFDTD
Associated files
usr_TFSF_mie_absorbed_power_scri
pt.lsf

See also
Sources 510
Source movies 628
TFSF sources 546
TFSF - Correct usage 550

TFSF - Examples 552

3D Mie scattering example 1752

transmission 1596
sourcepower 1601
sourceintensity 1603

Cross sections and normalization 562

After running the 3D Mie scattering 1752 simulation, it is possible to calculate and normalize the amount of power
absorbed by the particle in several slightly different ways. The script
usr_TFSF_mie_absorbed_power_script.lsf will reproduce the following figures when applied to the 3D Mie
scattering simulation file.

Power in Watts

One option is to
calculate the
absorption in units of
Watts. In this
particular simulation,
we can see that the
particle absorbs
about 2.7e-17 W of
power at 530nm (for a
planewave with an
amplitude of 1V/m).

When the data is


presented in this form
(i.e. power in Watts),
the data is
straightforward to
understand and
interpret.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 557

Power
normalized to
the source
power

Alternatively, the data


can be normalized to
the power injected by
the source.

This type of
normalization is quite
common. For
example, the
'transmission' script
function
automatically
normalizes the power
transmission data to
the source power.
While this
normalization is often
very convenient, it is
not well suited to
simulations using the
TFSF source. The
fundamental problem
is that an ideal plane
wave has infinite
power (since it has
infinite extent), while
a single particle must
absorb a finite
amount of power.
Obviously it is not
meaningful to
normalize a finite
quantity by an infinite
one!

To avoid the problem


of having infinite
source power, we
define the source
power of the TFSF
source as the
amount of power
injected by the
primary injection
plane of the source
(the plane of the
source with the Blue
and Pink arrows). It
is important to notice
that this definition
means the source
power is proportional

2003 - 2016 Lumerical Solutions, Inc


558 Lumerical Knowledge Base

to the source size (if


the X span of the
source is doubled,
then the source
power will double).

This definition can


lead to some non-
intuitive results. For
example, in the
associated figure,
notice that the
absorbed power at
530nm is greater
than 1! This appears
to violate power
conservation (i.e. the
particle absorbed
more power than
what the source
injected). The
simulation result is
actually correct and
does not mean the
simulation is violating
any conservation
laws. Instead, it
simply demonstrates
that normalizing the
data to the source
power is not
appropriate in this
situation.

To understand why
the absorption is
larger than 1 in this
simulation, we can
plot the Poynting
vector near the nano-
particle when it is
illuminated by a
plane wave (see
figure). The Poynting
vector shows the
direction of power
flow near the particle.
The nanoparticle
outline and TFSF
source are also
shown. Notice how
the nanoparticle
affects the poynting
vector, causing it to
bend in toward the
particle. Power is
flowing towards the

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 559

particle through the


sides of the TFSF in
addition to the
primary injection
plane. The source
power calculation
does not include this
additional 'side
power', which leads
to the absorption
being larger than the
source power.

To reiterate, the
simulation results will
be correct when the
TFSF source is setup
as shown in the
screenshot. It is
capable of correctly
simulating the
system, even when
power is flowing in
through the sides of
the source. The only
issue is that the
source power
normalization only
accounts for the
power injected from
the primary injection
plane, not the sides.

It is worth noting that


even if the power
measurements are
less than 1, this is
still not a very useful
way to normalize the
results, since they
depend on the source
size. If the source
size is doubled, the
transmission data will
be halved, even
though the actual
physical quantity (eg
the power absorbed
by the particle) is
independent of the
size of the TFSF
source.

2003 - 2016 Lumerical Solutions, Inc


560 Lumerical Knowledge Base

Normalized to
source intensity
(cross section
units)

As explained above,
normalizing power
measurements to the
source power is not
recommended.
Instead, it is more
meaningful to
normalize power
measurements to the
source intensity
(Watts / m^2). This
returns the data a
cross section, in
units of Area.

To apply this
normalization, simply
divide the absorbed
power (Watts) by the
source intensity
(Watts/m^2) to get
the absorption cross
section in units of
m^2.

It is interesting to
notice that at 530nm,
the absorption cross
section is larger than
the geometrical area
of the TFSF source,
which is why the
'source power
normalization'
produced values
larger than 1. The
absorption cross
section is also much
larger than the
geometrical cross
section of the
nanoparticle.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 561

5.4.3.6.3.4 TFSF source in Periodic Boundaries


This page does provide additional information on the correct usage of the TFSF source in periodic boundaries.

Please note that the plane wave source is generally the best source for periodic simulations. The TFSF source
should only be used in situations where scattering in the specular (zeroeth order) direction is of interest.

Solvers 101

FDTD
VarFDTD
See also
Sources 510
Source movies 628
TFSF sources 546
TFSF - Correct usage 550

TFSF - Examples 552


Mie scattering

The figures below show how a same structure can have different simulation outcomes, when simulated using
different sources, TFSF source and plane wave source. TFSF source is used for the top cases, where the plane
wave source is used for the bottom cases. The structure simulated is the same, periodic, and the FDTD simulation
object employs the periodic boundary conditions, except along the axis of injection. Note that the sources extend
through the FDTD simulation regions to avoid diffraction along edges, as can also be seen in the the pages TFSF -
Examples 552 and Plane waves - edge effects 526 .

TFSF source is used in both cases. The two examples differ in the
region of the structure that the TFSF source region and the FDTD
simulation object are over. In the top image, the reference corner is
going through the substrate, where in the second image, the reference
corner goes through the feature (assuming that the protruding part of
the structure is the feature).

The subtraction, as mentioned in the TFSF - Correct usage 550 ,


happens at the boundaries of the source and the reference 1D line,
which is at the top right corner of the TFSF source region (marked with
the solid yellow line). As the reference corner goes through the
simulation structure at different parts in these two example cases, even
though the object simulated is exactly the same, collected result of
monitors outside the TFSF source region will differ.

2003 - 2016 Lumerical Solutions, Inc


562 Lumerical Knowledge Base

Plane wave source is used in both cases. Both simulation will return
exactly the same data.

5.4.3.6.3.5 Cross sections and normalization


When using finite size beams in linear systems, we typically normalize results involving power to the power
spectrum of the source. When using plane waves, which in principle have infinite power, we need to consider the
scattering and absorption cross sections instead.

The cross section, s, is defined such the scattered (or absorbed) power in Watts, P, is given by
P = sI
where, I is the source intensity in Watts/m2 and the cross section has units of m2. In two dimensional simulations,
which represent a structure which is infinite along the z axis, we generalize P to represent the power scattered per
unit length, and the cross section has units of m.

Source power vs source intensity


By default, we normalize most power results to the power of the source. For example, the script command
'transmission' will calculate the power flux through a monitor surface and normalize to the source power, returning a
dimensionless quantity. To normalize instead to the source intensity, we can use the script commands
sigma = transmission(f) * sourcepower(f) / sourceintensity(f);
where f is a vector of frequency points. The result sigma will have units of m2 from a three dimensional simulation,
and m from a two dimensional simulation. For plane waves and TFSF sources, the power of the source
('sourcepower' function) is simply the intensity of the source integrated over the area of the source injection plane.
Normalizing to the source intensity is particularly important for non-periodic simulations (typically involving the TFSF
source), since the source power depends on the (arbitrary) size of the source as setup by the user. For more
information about TFSF sources specifically, please see Power normalization 555 for more details.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 563

Angles of incidence
We have to be extremely careful about the definition of the source intensity when the source is at non normal
incidence. The source intensity as returned by the script command 'sourceintensity' is calculated by integrating the
power normal to the injection plane of the source. If instead, you want to normalize to the source intensity of the
beam as calculated in the plane normal to the direction of propagation of the beam you need an additional factor of
cos(q) where q is the nominal source angle as specified in the source properties. (Please note that this angle q
should not be frequency dependent.) For example, if you download the Mie scattering example in 3D and modify the
source angle to have theta of 30 degrees, you should see something like this in the yz view:

After running the simulation, we can run the usual analysis and we expect to see good agreement with the
theoretical results since the scattering and absorption cross sections should not depend on angle of incidence for a
sphere. Instead we will see this comparison:

The discrepancy is mainly due to the fact that our calculation defines the source intensity, I(q) with respect to the y-
normal injection plane of the source even though the source angle q is 30 degrees. The theory calculates sigma
using I0, which is independent of the angle of the source. Since we know that I(q) = I0*cos(q), we can easily modify
our script by adding the lines:
theta = 30 * pi/180; # the nominal source angle is 30 degrees
Qscat = Qscat * cos(theta);
Qabs = Qabs * cos(theta);
immediately after calculating the cross section. (Please note that q is the nominal source angle and does not have
to be corrected for wavelength.) We then see the results below, which are as accurate as the normal incidence
results on this 5nm mesh, and converge nicely as the mesh size becomes smaller.

2003 - 2016 Lumerical Solutions, Inc


564 Lumerical Knowledge Base

Periodic structures
In periodic structures, simulated with periodic or Bloch boundary conditions, the source power is integrated over one
unit cell. This makes it possible to discuss quantities such as reflected power and transmitted power as fractions of
the source power, as we do with finite sized beams. However, we should remember that this can be easily converted
into a cross section. For example, a periodic structure with a reflection of 25% simply means that the reflection
cross section is 25% of the unit cell area.

Structures on multi-layer stacks or substrates


We must pay special attention to the meaning of the scattering and absorption cross sections when the particle is
on or in a substrate or multi-layer stack. If the substrate is absorbing, then the box that measures the absorption
cross section of the particle must surround only the particle. If that is not possible, then the loss per unit volume
must be integrated only over the particle volume. The scattering cross section is more subtle: since the incident field
is defined as the field that would exist in the multi-layer in the absence of the defect, the scattering cross section will
not include any power from the specular reflection or transmission. This is ideal for detecting small scattering cross
sections on surfaces that have large specular reflections. However, in the precise direction of the specular reflection
it will not be possible to directly measure the simulated result since experimentally the specular reflection will
dominate the small scattering from the defect. Please see the TFSF Examples 552 section for an example of setting
up this type of simulation.

Note: Since BFAST assumes periodic structure, users should not use BFAST source 590 at an angle to replace
TFSF to get oblique incidence result.

5.4.3.6.3.6 Custom TFSF

Objective
This topic explains how to create a customized focused beam TFSF source for analysis of nano particle scattering.
The TFSF method uses plane wave, and has a built-in reference, which makes the simulation very effective. In some
cases, users may want to test some other forms of beam sources in order to explore possibly new properties. In this
example, we use the fundamental idea of TFSF, that is, the differential method.

Note: Custom TFSF


Customizing a TFSF source is an advanced feature. In the vast majority of simulations, the plane wave TFSF is
sufficient to analyze the scattering of a nano particle. This is true even when in experiment a Gaussian beam or a
NA focus beam is used where the illumination on the particle is almost uniform. Only in the cases where a very
large numerical aperture (NA) beam is used, or a beam with specialized polarization form is used, may the custom
TFSF be used.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 565

Solvers 101

FDTD
VarFDTD
Associated files
usr_source_CTFSF_NA.fsp
usr_source_CTFSF_NA.lsf

See also
Sources 510
TFSF 546
Custom time signal 613
Custom spectrum 615
Changing the source bandwidth 610

setsourcesignal 1580
Mie scattering 3D 1752

The basic idea of the differential method is to first run a simulation without the scatter and record the fields as the
reference, then run another simulation with the scatter. The difference of the fields in the two simulations is the
scattering field, and at the same time, any diffraction errors caused by the possible PML cut of the complete beam
profile is minimized, if not canceled completely.

Simulation settings and analysis


We take the Mie scattering 3D 1752 as an example to use custom NA beam TFSF with NA=0.6. Different from the
regular TFSF where the plane wave is limited into the source region, NA beam 510 is composed of many angled
plane waves. Due to diffraction, its lateral size can be large. Larger source size means that the simulation region
must also be large, which causes longer simulation time. However, the nano particle is usually quite small, thus the
light-matter interaction occurs in a small region. Since the differential method is used, we can use relatively small
simulation region, whereas the diffraction effect can be minimized as long as the diffraction fields do not interact with
the particle (place the source as close to the particle as possible). In this example, we choose the simulation region
as 2.5*1.0*2.5 um. In practice, you may do a converging test to choose the proper simulation region. Other settings
are the same as the Mie scattering case, except that now we use the wavelength range from 400nm to 900nm.

In calculation of the scattering cross section and absorption cross section, the source intensity is usually used,
please refer the nanowire example 1730 . The function sourceintensity 1603 gives correct result for a plane wave.
However, for a NA beam, the source profile is not uniform and this function does not give the correct result. To get
correct result, we use the intensity on the front monitor (in this example it is y1) as the source intensity illuminating
the particle.

Once the scattering and absorption fields are obtained after running the simulations, we use the integration of the
Poyinting vector to get the power, then use the definition of the cross sections to obtain the scattering and
absorption cross sections. The graph below shows the results (left) and comparison(right) to the plane wave TFSF.
The noticeable minor difference is mainly due to the small simulation region we used. If you use a larger simulation
region, such as 4*1.5*4 um, the results agree well with the plane wave TFSF.

2003 - 2016 Lumerical Solutions, Inc


566 Lumerical Knowledge Base

The absorption, scattering and extinguish cross Comparison to TFSF method


sections

It is not surprising that the two results are about the same. This is because the particle is small and the illumination
from the NA source on the particle is quite uniform. If the illumination is not uniform across the particle, the results
can be different.

The Script
In the first part of the script usr_source_CTFSF_NA.lsf, choosing doTFSF=1 is to get the regular plane wave
TFSF results, which are used to validate the custom TFSF in this example. You can choose doTFSF=0 to avoid it.
Next, the reference simulation without the sphere is run, where the illumination profile at the focus and the fields in
the monitors are recorded where the averaged intensity in y1 monitor is calculated as the source intensity to be
used later. Then the simulation with the scatter "sphere" is run. Note that to save simulation time, some objects are
enabled or disabled. Finally the scattering fields are obtained with the differential methods, the powers are calculated
though the integration of the Poynting vectors, and the cross sections are obtained by the use of the averaged
intensity of the illumination beam. Running the script you can duplicate the figure above.

Tips:
1: keep the the same mesh for the two simulations: Usually TFSF gives better results using a uniform mesh in
TFSF region. An override mesh can be used for this purpose to have a uniform mesh. Since the differential fields
need to be in the same grid, this override mesh should be kept even when there is no particle in the reference
simulation.
2: far field projection: Some times users want to get the far field properties using the custom TFSF method. If this
is the case, users must add a proper analysis group such as the "scat_ff" in Mie scattering 3D 1752 . At the same
time, the script inside the analysis group should be modified in order to output the fields instead of the intensity.
Then in the script file usr_source_CTFSF_NA.lsf users can add scripts to get the far field projection in
the reference simulation and the scatter simulation. Their difference is the scattered far fields and can be easily
plotted as intensity.
3: refer Mie scattering 3D 1752 page to get more tips on scattering simulations.

Note: Custom TFSF


1. If necessary, the user can always modify the Gaussian source to be a planewave source instead. The same
script and methodology can be employed to obtain custom TFSF results.
2. Since BFAST assumes periodic structure, users should not use BFAST source 590 at an angle to build the
custom TFSF to get broadband, oblique incidence result.

5.4.3.6.4 Sources - Integrated mode source

Mode sources
The mode source is used to inject a guided mode into the simulation region. The geometry of the mode source (i.e.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 567

center location, and span) is used to compute the guided modes for the structure. In three-dimensional simulations,
the modes are computed across a plane, while in two-dimensions they are computed across a line. From a list of
possible modes, a single mode is selected for injection into the simulation region.

Solvers 101

FDTD
VarFDTD
In this section
Mode analysis 570
Plot and Analysis Options 573
Finding Modes 574
Mode source - Broadband 576
Mode source - Angled injection 578

Associated files
usr_source_mode.fsp

See also
Sources - Others and advanced
techniques 587
Source movies 628
Passive components - Getting
started 2020
Using the boundary conditions tab
459

Measuring reflection 860

This section describes the operation of the integrated mode solver to inject guided waves into FDTD simulations or
the Propagator in MODE Solutions. The mode solver itself uses the same discretization mesh as the FDTD/
propagator algorithm, so the profile of the guided modes as computed with the mode solver naturally interface with
the underlying FDTD/propagator mesh. Overall, this facilitates the injection of guided modes with minimal back-
reflection.

By default, this source will inject the fundamental mode (the mode with the largest effective index). You can control
the polarization of the automatically selected mode by setting the MODE SELECTION field to fundamental TE or
TM. With these settings, the mode source will automatically update the mode profile as the structure is modified.
This can be very helpful for tasks such as parameter sweeps where the waveguide geometry is changed.
Alternatively, it is possible to select an arbitrary mode by setting MODE SELECTION to "user defined". In this case,
the integrated mode solver is launched by pressing the SELECT MODE button within the mode source edit window.
The following pages describe the integrated mode solver. If you choose to select your own mode source please note
that the mode profile will not automatically update as the waveguide geometry is modified. It is necessary to
manually reselect the mode or use the script command updatesourcemode.

In MODE Solutions, note that the fundamental mode will be automatically selected for a 2.5D FDTD simulation. In
this case, the SELECT MODE button will grayed out unless "user select" is chosen from the "mode selection" list.
In addition, note that the polarization of the mode source is determined by the polarization chosen in the Effective
index tab 425 of the Propagator simulation region.
You must choose a mode with a polarization that matches the polarization you have chosen in the Effective index
tab 425 of the Propagator simulation region.

Broadband simulations
The beam sources (Gaussian, Mode, Import) can be used in broadband simulations, but it is important to
remember that they inject the same spatial field profile at all frequencies. This can lead to injection errors when
the source field profile is dispersive (i.e. it changes as a function of frequency).

For example, the Mode source calculates the spatial mode profile at the center frequency of the specified
frequency range, then injects that mode profile at all frequencies. This generally means the injection errors are

2003 - 2016 Lumerical Solutions, Inc


568 Lumerical Knowledge Base

very low at the center frequency, but they can be larger at the min and max frequencies because the mode profile
being injected is not exactly correct at other wavelengths. The Gaussian and Import sources suffer from the
same problem. For more information, see Mode source - Broadband 576

Edit source tabs


General tab
INJECTION AXIS: Sets the axis along which the mode source will propagate.
DIRECTION: This field specifies the direction in which the TFSF source propagates. FORWARD
corresponds to propagation in the positive direction, while BACKWARD corresponds to propagation in the
negative direction.
AMPLITUDE: The amplitude of the mode source as explained in the Units and normalization 618 section.
PHASE: The phase of the point source, measured in units of degrees. Only useful for setting relative phase
delays between multiple radiation sources.
SELECT MODE: Mode source only. Launches the mode solver and allows the user to select the desired
mode for injection. For more information on using the mode source, consult the mode analysis 570 section.
THETA: The angle of propagation, measured in degrees, with respect to the injection axis defined above.
PHI: The angle of propagation, in degrees, rotated about the injection axis in a right-hand context.
ROTATION OFFSET: Allows users to set an offset to the plane where the mode is calculated. This is useful
for ensuring that mode sources at an angle do not intersect with structures that are not part of the
waveguide/fiber.
CLEAR SOURCE DATA: Clears the selected mode for mode sources, or clears the imported data for
imported sources
PLOT: This menu allows you to choose which component of the field profile you would like to plot.
PLOT CURRENT MODE/FIELD: This button will plot the field profile selected in the PLOT pull down menu
for the currently selected mode.
PLOT IN NEW WINDOW: This is the same as PLOT CURRENT MODE/FIELD but opens a new window for
the graphics that stays open even after property edit window is closed.

Geometry tab
The geometry tab contains options to change the size and location of the sources.

Frequency/Wavelength tab
The Frequency/
Wavelength tab is
shown to the right.
This tab can be
accessed through
the individual
source properties,
or the global
source properties.
Note that the plots
on the right-hand
side of the window
update as the
parameters are
updated, so that
you can easily
observe the
wavelength (top
figure), frequency
(middle figure) and
temporal (bottom
figure) content of

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 569

the source
settings.

At the top-left of
the tab, it is
possible to chose
to either SET
FREQUENCY /
WAVELENGTH or
SET TIME-
DOMAIN. In most
simulations, the
'SET
FREQUENCY /
WAVELENGTH '
option is
recommended.

If you choose to directly modify the time domain settings, please keep the following points in mind:
Pulse durations: Choose a pulse duration that can accurately span your frequency or wavelength range
of interest. However, 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 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.
For single frequency simulations, simply set both the min and max wavelengths to the same value.

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.
For more information, please visit Changing the source bandwidth 610

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. Enabled by default.

2003 - 2016 Lumerical Solutions, Inc


570 Lumerical Knowledge Base

OPTIMIZE FOR SHORT PULSE: Use the shortest possible source pulse.
This option is enabled by default in the FDTD solver. It should only be disabled when it is necessary to
minimize the power injected by the source that is outside of the source range (eg. convergence problems
related to broadband steep angled injection).
This option is disabled by default in the varFDTD solver, as it improves the algorithms numerical stability.

Manual calculation of the source time signal


As explained above, the 'Standard' source type uses a fixed carrier with a gaussian envelope. The following
script code shows how to calculate the source time signal used by the source.
# calculate standard pulse time signal
frequency = 300e12;
pulselength = 50e-15;
offset = 150e-15;

t = linspace(0,600e-15, 10000);
w_center = frequency*2*pi;
delta_t = pulselength/(2*sqrt(log(2)));
pulse = sin( -w_center*(t-offset)) * exp( -(t-offset)^2/2/delta_t^2 );

plot(t*1e12,pulse,"t (fs)","source pulse time signal");

Note: There are some small difference between the pulse generated by this code and the actual time signal
generated by the 'standard' source pulse setting. If you need very precise control over or knowledge of the
source time signal, you should create create your own Custom time signal 613 .
Note: The 'broadband' option is generated with a more complex function. The precise function is not provide. To
create your own arbitrary source time signals, see the Custom time signal 613 page.

Results returned
Results
NEFF: Effective index as a function of frequency/wavelength is returned.
MODE PROFILES: Mode profiles (E, H, and index) are returned as a function of position and frequency/
wavelength.
TIME SIGNAL: Time domain signal of the source pulse.
SPECTRUM: The fourier transform of time signal.

5.4.3.6.4.1 Mode analysis


The MODE ANALYSIS window is shown in the screenshot below. The upper portion of the window contains the
MODE LIST where the mode number, effective index, propagation loss, and polarization are shown. The lower left-
hand corner shows the calculation parameters; 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.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 571

Modal analysis tab


The modal analysis 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 polarization fraction (please see Mode List and Deck 751 for the full definition).

Boundary conditions tab


The boundary conditions that are supported by FDTD/MODE Solutions 101 are listed below.

PML 460

Perfectly matched layer (PML)1 boundaries absorb electromagnetic waves incident upon them. They
essentially model open (or reflectionless) boundaries. In FDTD and varFDTD simulation regions, the user can
directly specify all the parameters that control their absorption properties including the number of layers. To
facilitate the selection of PML parameters, a number of profiles (or predefined sets of parameters) are available
under the boundary conditions tab. In most simulation scenarios, the user only needs to choose one of the
predefined profiles and fine tune the number of layers. PML boundaries perform best when the surrounding
structures extend completely through the boundary condition region. This will be the default behavior of
structures whether or not they were drawn to end inside or outside the PML region.
1 J. P. Berenger, Perfectly Matched Layer (PML) for Computational
Electromagnetics. Morgan & Claypool Publishers, 2007.

2003 - 2016 Lumerical Solutions, Inc


572 Lumerical Knowledge Base

Metal 464

Metal boundary conditions are used to specify boundaries that behave as a Perfect Electric Conductor (PCE).
The component of the electric field parallel to a metal (PCE) boundary is zero; the component of the magnetic
field H perpendicular to a metal (PEC) boundary is also zero. Metal boundaries are perfectly reflecting,
allowing no energy to escape the simulation volume along that boundary. In the FDE solver, metal BC is the
default setting 464 .

PMC
Perfect Magnetic Conductor (PMC) boundary conditions are the magnetic equivalent of the metal (PCE)
boundaries. The component of the magnetic field H parallel to a PMC boundary is zero; the component of the
electric field perpendicular to a PMC boundary is also zero.

Periodic 478

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 (FDTD/varFDTD) 471

Bloch BC should be used when the structures and the EM fields are periodic, but a phase shift exists between
each period. Bloch boundary conditions are used in FDTD Solutions and propagator simulations 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.

note: if you choose BFAST plane wave source 590 , the Bloch BCs will be automatically overridden and use its
built_in boundary conditions.

Symmetric / Anti-Symmetric 466

Symmetric/anti-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. On the other hand, antisymmetric
boundaries are anti-mirrors for the electric field, and mirrors for the magnetic field. Careful consideration must
be given to whether symmetric or anti-symmetric 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 anti-symmetric boundary conditions can be
found in Choosing between symmetric and anti-symmetric BCs 466 .

ALLOW SYMMETRY ON ALL BOUNDARIES: Allows symmetric boundary conditions with periodic structures

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 573

(this option is not available in the boundary condition tab of mode sources and mode expansion monitors).

Select Mode
Pressing this button (located on the lower right corner of the window) will initialize the mode source with the current
mode selected within the mode table in the upper left-hand portion of the window.

Advanced Options
The ADVANCED OPTIONS button (located on the left right corner of the window) brings up the "Mode Advanced
Options" window with the following parameters:

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.
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.

Note: Default boundary conditions (BC) in Mode solver


By default, the integrated mode solver uses Metal BC's, except in the following situations.
Symmetry - If the solver uses symmetry BC's, the integrated mode solver will use the same symmetry option.
Periodic - If the solver uses periodic BC's, and if the mode source span is large enough to cover the entire
simulation region span, the integrated mode solver will use periodic BC's on that axis.

In the Boundary conditions tab you can override these default settings to select PML or PMC boundary
conditions.

5.4.3.6.4.2 Plot and Analysis Options


The plot and analysis windows are shown in the screenshot below.

The left portion of the window displays the calculation parameters:


FREQUENCY: the frequency at which the modes are solved for.
WAVELENGTH: the wavelength at which the modes are solved for.
NUMBER OF TRIAL MODES: the number of modes to be calculated.
SEARCH: this pull-down allows the user to specify which option to search for modes in, the available options are:
o NEAR N: Allows you to look for modes near a desired effective index.
- USE MAX INDEX: Search for modes near the maximum index found in the meshed cross section.
- N: Choose the effective index to search for.
o IN RANGE: Allows you to search for modes in a desired range of indices.

2003 - 2016 Lumerical Solutions, Inc


574 Lumerical Knowledge Base

- N1, N2: Define the range of indices to search over.


BENT WAVEGUIDE: Allows the user to specify a current radius of curvature for the mode and solver for the
modes of a bent waveguide. See Bent waveguide calculation 111 for a more detailed description.
o BEND RADIUS: the bend radius of the waveguide measured from the center of the mode solver region
o BEND ORIENTATION: the orientation of the radius of curvature.
CALCULATE MODE: by clicking this button the mode solver will start the calculation for the waveguide modes
given the criteria above.
RESTORE LAST SETTINGS: restores the calculation parameters to the current simulation parameters
corresponding to the modes that have been calculated.

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
PLOT: This pull-down allows the user specifies what simulation data should be plotted within the plot area.
Box 1 specifies what general class of data to plot:
o MODAL FIELDS: allows the user to select various field quantities such as electric and magnetic field
amplitudes and intensities and Poynting vectors using the COMPONENT pull-down
o MATERIAL PROPERTIES: allows the user to select various physical quantities such as refractive index,
permittivity, and conductivity using the COMPONENT pull-down
Box 2 specifies which part of complex-valued simulation data is to plot:
o AMPLITUDE
o PHASE
o REAL PART
o IMAGINARY PART
COMPONENT: This pull-down allows the user to specify which specific component is to be plotted within the plot
area. The available options depend on the setting of the PLOT pull-down.
COORDINATES: currently supports only the CARTESIAN coordinate system.
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

5.4.3.6.4.3 Mode Source - Finding Modes

Objective
When using the eigensolver in MODE Solutions or the mode source in FDTD Solutions, there are many eigensolver
settings that can affect the modes found. For some types of structures, finding the correct modes can be
challenging. This page provides a checklist of common settings that should be checked or modified when you have
trouble finding the right modes or you get the message "no physical modes were found".

Simulation boundaries: It is often recommended that one


starts with metal boundaries when looking for well confined
modes. Please see Starting with metal boundary conditions
464 for detailed information. If the right boundaries are not

chosen, the right modes may not be found. The size of the
simulation region is also important. When using metal
boundaries, the boundaries should be far enough from the
structure interfaces so that the evanescent tails of the
modes do not reach the boundaries and get reflected.

If the mode you are interested in is radiative, you will need


to use PML boundaries. Please see Lossy modes and dB/
m to k conversion for more information.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 575

The Integrated Mode Source


When finding modes in the Mode Source, the default
boundaries are metal. These boundary conditions can be
changed as explained here 570 .

Symmetry: Enforcing symmetry in one or two directions


can greatly reduce the simulation time and memory;
however, one should use these boundaries with care when
solving for modes. Depending on the type of boundary used,
symmetric or anti symmetric, only TE or only TM results
could survive. Make sure you know the symmetry of the
fields you are looking for before you apply symmetry
boundaries. Please see Symmetry boundary conditions 466
for detailed information on how to determine which
symmetry boundary to use.
When using symmetry, sometimes it is necessary to "force
symmetry" on the mesh as well. This option can be
selected under the "advanced options" tab of the simulation
region object.
Index to search near: One can specify the index to
search near or a range of indices to search in between for
modes of interest. The specified value is not just the real
part of the index, rather it is the magnitude of the complex
index.

If the mode is lossy, you may want to enter a complex


value for this index. Please see Lossy modes and dB/m to
k conversion for more information.

Number of trial modes: The number of modes specified to


look for around a refractive index value will affect the modes
that the solver finds. If this number is too small, the desired
modes may not be found. Often, setting this number to 100
modes will ensure that no physical modes near the
specified index have been missed. If more than 100 modes
exist, then a larger number should be used if one is
interested in higher order modes.

If you still have trouble finding the right modes for your waveguide/fiber, please contact support@lumerical.com.

2003 - 2016 Lumerical Solutions, Inc


576 Lumerical Knowledge Base

5.4.3.6.4.4 Mode source - Broadband

Objective
This topic describes how the Mode source operates in broadband time-domain simulations, and the injection errors
that can occur due to mode mismatch.

Solvers 101

FDTD
VarFDTD

Associated files
usr_mode_broadband.fsp
usr_mode_broadband.lsf

See also
Sources 510
Measuring reflection 860
Get field profile and effective index 617
Mode source - angled injection 578 (FDTD
only)

Introduction
The mode solver of the Mode source uses a frequency domain technique to calculate the modes of a structure. This
technique is inherently single frequency. For broadband simulations, the mode solver calculates the modes at the
center frequency of the source. For example, if the source range is 300-600 THz, the mode solver will calculate the
modes at 450 THz.

Injection errors due to mode mismatch


The behavior of the mode source is ideal for single frequency simulations, but creates a potential problem for
broadband simulations. As noted above, the mode solver calculates the mode profile at the center frequency of the
source range. The selected mode profile will then be injected over the entire frequency range of the source.

If the mode profile is relatively constant as a function of frequency, this works well. However, if the mode profile
changes over the range of the source, there will be some reflection and scattering at the source injection plane. This
can be understood in terms of the mode profile mismatch between the mode that actually exists at that frequency
and the mode profile of the center frequency that is being injected. These errors will be largest at the minimum and
maximum frequencies of your source where the mode mismatch is largest.

Example
The mode injection errors are easy to see with a simple simulation. To reproduce the following results, open the
associated simulation file and then run the script file. The simulation consists of a simple straight waveguide. Ideally
we expect 100% transmission and 0% reflection at all frequencies.

The script calculates and plots the actual mode profile of the waveguide at 300, 450 and 600 THz. It then runs a
broadband simulation (300-600THz) and measures the reflection and transmission. The 450 THz mode profile will be
used in the simulation. The error in R and T will be plotted. These steps are repeated for waveguides that are 0.4um
and 4um wide.

In the 4um wide simulation, the mode profile is fairly constant over the entire range of frequencies. Therefore, we
expect the the mode mismatch to be small and the R, T values should be quite close to their theoretical values. For
the 0.4 um waveguide, the mode profile changes significantly as a function of frequency. This leads to significant
mode mismatch, and therefore larger errors in the R and T measurements.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 577

Mode profile as a function of frequency for 4um Error in reflection and transmission spectrum for
wide waveguide 4um wide waveguide

When the waveguide is much wider than the wavelength, The maximum error in about 0.03% in transmission. The
the mode profile is relatively constant at all frequencies. error in the reflection is very small.

Injection errors due to mode mismatch will be small.

Mode profile as a function of frequency for 0.4um Error in reflection and transmission spectrum for
wide waveguide 0.4um wide waveguide

When the waveguide is sub-wavelength, the mode profile The maximum error in transmission is about 5%. The
changes significantly as a function of frequency. maximum error in reflection is about 0.3%.

Injection errors due to mode mismatch may be


significant.

As the above figures show, when using the Mode source in broadband simulations, there can be injection errors due
to mode mismatch. These errors will be largest at the minimum and maximum frequencies where the mode
mismatch is largest.

Solutions
A number of solutions are available:

In many cases, the problems described above make it difficult to accurately measure power reflections. In such
cases, measuring the reflection with a monitor in front of the source (rather than behind the source), can be a good
solution. For more information, on this technique, see the Measuring reflections 860 page.
Using a smaller source bandwidth will minimize these problems. Unfortunately, if you need to collect broadband
data, this means you will have to run multiple simulations, which will increase the overall simulation time.
Due to mode mis-match errors, the source power normalization can be inaccurate. It may be possible to re-
normalize your other power measurements to an 'Input' monitor located in front of the source. For example, to
calculate the fraction of transmitted power at the output, you normally use the command

2003 - 2016 Lumerical Solutions, Inc


578 Lumerical Knowledge Base

transmission("output");. Instead, you could re-normalize to the power measured by the Input monitor with
the command transmission("output")/transmission("Input");.

5.4.3.6.4.5 Mode source - Angled injection

Objective
This topic explains how the Mode source works when injecting into waveguides at non-normal incidence.

Note: This feature was introduced in FDTD Solutions version 8.0.

Solvers 101

FDTD
VarFDTD

Associated files
usr_mode_angled_incidence.fsp

See also
Sources 510
Mode source - Broadband 576
Get field profile and effective index 617

The Mode source can be configured to inject at an angle, just like the plane wave and gaussian beam sources. The
additional complication with the Mode source is that there are two planes of interest:

1) Before the main FDTD simulation is run, the mode source must use it's built-in mode eigensolver to calculate the
supported modes of the waveguide. This calculation requires a cross section of the waveguide normal to the
waveguide propagation direction. This plane is drawn in the CAD with a white outline.

2) During the actual FDTD simulation, the source must inject along one of the global simulation axes (x,y, or z). This
plane is shown in the CAD as a shaded plane with a while outline.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 579

5.4.3.6.5 Sources - Import

Import source
The import source allows the user to specify a custom spatial field profile for the source injection plane. The custom
field profile can be calculated from an analytic formula, imported from another FDTD simulation, or from other
simulation tools.

Solvers 101

FDTD
EME
See also
Custom source profile from monitor data 583
Custom source profile from an equation 586
Get source field profile 617
Importing arbitrary source fields into an EME
solver port 437
importdataset 1590
Measuring reflection 860

Import dataset format


The 2D cross section of field data to be imported must be saved in a lumerical dataset with the format shown
below. The E fields are required. H fields are optional.
EM = rectilineardataset("EM fields",x,y,z);
EM.addparameter("lambda",c/f,"f",f); # Optional
EM.addattribute("E",Ex,Ey,Ez);
EM.addattribute("H",Hx,Hy,Hz); # Optional

Notes:
- Non-uniform spatial sampling is supported.
- E fields are required.
- H fields are optional
- E and H fields can be complex valued.
- EM dataset must only contain field data at one frequency point.

Specifying magnetic fields


The magnetic H fields are optional. If the H fields are not supplied, the source will attempt to calculate the H
fields from the E fields. This calculation makes certain assumptions about the change of phase of the propagating
radiation. These assumptions hold true for narrow sources such as Gaussian and plane wave sources, but may
lead to significant errors for other sources with more complex field profiles. When defining complex beams, it is
best to specify both E and H.

In some situations, it is useful to include H in the source dataset, but to set the value to the fields to zero. This
can be interpreted as a situation where the same beam is propagating in both the forward and the backward
direction at the same time, oriented such that the E fields interfere constructively at the source plane and the H
fields interfere destructively. This technique is a useful way to avoid manually calculating the H fields. Instead,
the H fields are naturally calculated as the fields propagate through the simulation volume. While this technique

2003 - 2016 Lumerical Solutions, Inc


580 Lumerical Knowledge Base

can be helpful, it is important to take some additional care when analyzing results from this type of simulation.
There are two main issues:
- Fields will be injected in both the forwards and the backwards direction. This is usually not a serious problem.
If the simulation is setup properly, with no structure behind the source, these fields will simply be absorbed by the
PML boundaries behind the source without creating any errors in the rest of the simulation.
- The automatic calculation of the amount of power injected by the source (ie. sourcepower script function) will not
be correct. Therefore, power transmission data ('T' in the result view, and results from the 'transmission' script
function) which is normalized to the sourcepower, will be incorrect. A work around is to manually calculate the
sourcepower and power transmission data.

Broadband simulations
The Mode and Import sources can be used in broadband simulations, but it is important to remember that they
inject the same spatial field profile at all frequencies. This can lead to injection errors when the source field profile
is dispersive (i.e. it changes as a function of frequency).

For example, the Mode source calculates the spatial mode profile at the center frequency of the specified
frequency range, then injects that mode profile at all frequencies. This generally means the injection errors are
very low at the center frequency, but they can be larger at the min and max frequencies because the mode profile
being injected is not exactly correct at other wavelengths. Import source suffers from the same problem. For
more information, see Mode source - Broadband 576

2D simulations
To use the import source in a 2D simulation, the imported field data should be 1D. In other words, two of the three
dimensions in the dataset (x, y, z) should have a size of one.

Edit source tabs


General tab
AMPLITUDE: The amplitude of the source as explained in the Units and normalization 618 section.
PHASE: The phase of the point source, measured in units of degrees. Only useful for setting relative phase
delays between multiple radiation sources.
INJECTION AXIS: Sets the axis along which the radiation propagates. Automatically defined based in
imported data.
DIRECTION: This field specifies the direction in which the radiation propagates. FORWARD corresponds to
propagation in the positive direction, while BACKWARD corresponds to propagation in the negative
direction.
IMPORT SOURCE: Button to load field profile from a dataset contained within a .mat file. The legacy .fld file
format is also supported. Alternately, the importdataset 1590 script command can be used to load data into
the source while using a script. See above for details on the dataset format.
IMPORTED SOURCE SETTINGS: x0, y0, z0, imported wavelength: The x,y,z spatial center of the imported
data, and the imported wavelength (optionally included in the imported data).

Geometry tab
The geometry tab contains options to change the size and location of the sources. The source span will be
automatically set based on the imported field data.

Frequency/Wavelength tab

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 581

The Frequency/
Wavelength tab is
shown to the right.
This tab can be
accessed through
the individual
source properties,
or the global
source properties.
Note that the plots
on the right-hand
side of the window
update as the
parameters are
updated, so that
you can easily
observe the
wavelength (top
figure), frequency
(middle figure) and
temporal (bottom
figure) content of
the source
settings.

At the top-left of
the tab, it is
possible to chose
to either SET
FREQUENCY /
WAVELENGTH or
SET TIME-
DOMAIN. In most
simulations, the
'SET
FREQUENCY /
WAVELENGTH '
option is
recommended.

If you choose to directly modify the time domain settings, please keep the following points in mind:
Pulse durations: Choose a pulse duration that can accurately span your frequency or wavelength range
of interest. However, 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 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

2003 - 2016 Lumerical Solutions, Inc


582 Lumerical Knowledge Base

frequency or the wavelength and choose to either set the center and span or the minimum and maximum
frequencies of the source.
For single frequency simulations, simply set both the min and max wavelengths to the same value.

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.
For more information, please visit Changing the source bandwidth 610

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. Enabled by default.
OPTIMIZE FOR SHORT PULSE: Use the shortest possible source pulse.
This option is enabled by default in the FDTD solver. It should only be disabled when it is necessary to
minimize the power injected by the source that is outside of the source range (eg. convergence problems
related to broadband steep angled injection).
This option is disabled by default in the varFDTD solver, as it improves the algorithms numerical stability.

Manual calculation of the source time signal


As explained above, the 'Standard' source type uses a fixed carrier with a gaussian envelope. The following
script code shows how to calculate the source time signal used by the source.
# calculate standard pulse time signal
frequency = 300e12;
pulselength = 50e-15;
offset = 150e-15;

t = linspace(0,600e-15, 10000);
w_center = frequency*2*pi;
delta_t = pulselength/(2*sqrt(log(2)));
pulse = sin( -w_center*(t-offset)) * exp( -(t-offset)^2/2/delta_t^2 );

plot(t*1e12,pulse,"t (fs)","source pulse time signal");

Note: There are some small difference between the pulse generated by this code and the actual time signal
generated by the 'standard' source pulse setting. If you need very precise control over or knowledge of the
source time signal, you should create create your own Custom time signal 613 .
Note: The 'broadband' option is generated with a more complex function. The precise function is not provide. To
create your own arbitrary source time signals, see the Custom time signal 613 page.

Results returned
Results
MODE PROFILES: The fields injected at the injection plane is returned as a function of position and
frequency/wavelength.
TIME SIGNAL: Time domain signal of the source pulse.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 583

SPECTRUM: The fourier transform of time signal.

See also
Custom source profile from monitor data 583
Custom source profile from an equation 586
Mode source - Broadband 576

5.4.3.6.5.1 Custom source profile from monitor data

Objective
This section describes how to create a custom source field profile from monitor data obtained from another
simulation.

Solvers 101

FDTD
Associated files
usr_source_from_monitor1.fsp
usr_source_from_monitor2.fsp
usr_source_from_monitor.lsf

See also
Sources 510
Custom field profile 579

importdataset 1590

Example description
The top screenshot shows a waveguide input coupler. Suppose we want to use this system to excite a small gold
nano-particle located at the end of the coupler (lower figure).

In the top figure, we see the entire coupler (facet, coupler, and output waveguide). The taper and waveguide are
500nm high. The coupler input width is 8.5 microns. The waveguide tapers over 10 microns to a width of 500nm,
where it still supports many modes at wavelengths around 500nm. The dielectric waveguide is assumed to have an
index of 2. The operating wavelength is 500 nm.
In the bottom figure, we see a 40 nm radius gold sphere, 200nm past the end of the taper region.

To simulate the entire device, the simulation region must be about 20x20x10 wavelengths in size. This is a large
simulation. To accurately model the gold nano-particle, a very small mesh will be required (approx 5nm). Even with
a graded mesh, this will still make the simulation substantially slower.

A more efficient solution is to break this simulation into 2 parts:


1) Model the large taper without the nano-particle using the normal mesh settings (mesh accuracy 2). A profile
monitor is used to record the field profile at the taper output.
2) Model a nano-particle and a small portion of the taper. The field profile from the initial simulation will be used as

2003 - 2016 Lumerical Solutions, Inc


584 Lumerical Knowledge Base

the source field profile for the second simulation.

Note: Reflection sensitive structure


It is important to note this method assumes that there is not much reflection back from the Gold defect and that
the waves recorded at the field monitor are not perturbed by the defect. This would not be a valid approximation in
all simulations, therefore care must be taken when using this method to divide up a simulation into multiple
simulations.

Step 1: Model taper section. Record field profile at output


The simulation file usr_source_from_monitor1.fsp is used to model the taper section. In this file, the gold
sphere has been removed (material properties set to air). A gaussian beam illuminates the facet. At the output of
the taper section, a frequency profile monitor records the electric field at a wavelength of 500 nm.

The script usr_source_from_monitor1.lsf begins by running the simulation and plotting some initial results,
as shown below. Next, it gets the E&H fields from the transmission monitor and packages them in a format that can
be loaded into the Import source.

|E| in the taper |E| field profile exported to the .fld file

Step 2: Create custom source and simulate nano-particle


The script file then loads usr_source_from_monitor2.fsp, which contains the waveguide and gold sphere
portion of the problem. The script loads the field data from the initial simulation into the Import source. After
importing the field profile, you can open the source properties and see the field profile as shown below. You should
see the same field profile that was recorded by the monitor in the last simulation.

Note: Data interpolation


The field profile in the mat file is saved on the mesh of the first simulation. The mesh in the second simulation is
different. In such situations, the field data will be automatically interpolated onto the new mesh.

After running the second simulation, the script plots some initial results. First, the transmission and reflection in
the waveguide after injecting the created source are shown. The reflection is effectively zero at 500nm, but increases
slightly away from the wavelength where the field was recorded. This is because a physically correct waveguide

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 585

mode profile will change as a function of frequency. However, we are injecting the mode profile that is correct at
500nm to be injected over a range of frequencies. Therefore, we expect some source injection error to result in
reflection due to mode mismatch when running broadband simulations with this technique. If better accuracy is
required, then a series of single frequency simulations will be required. The transmission is less than 1 because we
are only measuring transmission in the waveguide region and are ignoring light that is propagating away into the air
and substrate.

The second plot uses a box of 6 monitors surrounding the gold particle to calculate the absorption spectrum in the
gold. This plot shows that there are 2 absorption resonances.

2003 - 2016 Lumerical Solutions, Inc


586 Lumerical Knowledge Base

5.4.3.6.5.2 Custom source profile from an equation


This topic explains how the Import source can be used to inject an arbitrary field profile into your simulation. In this
example, the script can create an approximately radially polarized or azimuthally polarized beam.

Solvers 101

FDTD

Associated files
usr_custom_source.lsf
usr_custom_source.fsp

See also
Custom source profile from monitor data 583
Get source field profile 617
Importing arbitrary source fields into an EME solver port
437

importdataset 1590

Defining the field profile


Download the associated files. Open usr_custom_source.fsp and run the script file
usr_custom_source.lsf. The script calculates the electric and magnetic fields at the source injection
plane. The default settings in the script file will create a radially polarized beam, but you can modify the value
of the "pol" variable in the script to specify an azimuthally polarized beam instead.

Warning: The field profile calculated in this script is greatly simplified


equation for a radial polarized beam that is intended for demonstration
purpose only.

Adding the source to your simulation


The script then packages the data into a dataset and loads that data into the Import source using the
importdataset 1590 function. The data is also saved to a .mat file that can be later loaded into the Import source
by editing its properties and pressing the "Import Source" button, as shown below.

Measure the profile with a monitor


As a final test, we can run the simulation and compare the field profile recorded by a monitor just in front of the
source with the original EM dataset. After running the simulation, the script will plot both field profiles.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 587

The measured field profile is very similar to what we originally specified.

The solver will attempt to inject whatever fields are specified, but it is important to recognize that specifying
unphysical fields can lead to simulation errors. For example, there may be power normalization problems,
source back reflections, or differences between the specified and actual injected fields.
Note: Symmetric boundary conditions for custom field profiles
Symmetry boundary conditions can be used whenever the EM fields have a plane of symmetry through the
middle of the simulation region. For more information see Choosing between symmetric and anti-symmetric
BCs 466

5.4.3.6.6 Sources - Others and advanced techniques


This section describes some other techniques regarding the usage of sources

Coherence 596

2003 - 2016 Lumerical Solutions, Inc


588 Lumerical Knowledge Base

Changing the source bandwidth 610

Get source field profile 617

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 589

CW Normalization 618

Low frequency (GHz, MHz) simulations 627

Soft sources 627

2003 - 2016 Lumerical Solutions, Inc


590 Lumerical Knowledge Base

Source movies 628

5.4.3.6.6.1 Source - BFAST


This page describes the Broadband Fixed Angle Source Technique (BFAST), which only applies to the following
case: periodic structures illuminated with a broadband source at an angle. In this case, this technique will allow
users to obtain broadband simulation results at angled illumination.

Solvers 101

FDTD
Associated files
bfast_stack.fsp
bfast_stack.lsf

See also
Symmetric and anti-symmetric
BCs 466
Grating order transmission 1790
Blaze grating 1788
Plasmonic application 1902
Related publications
B. Liang et al, Wideband Analysis
of Periodic Structures at Oblique
Incidence by Material Independent
FDTD Algorithm, IEEE Trans.
Antennas & Propagation, Vol.62
,No.1, PP. 354 - 360.

Broadband Fixed Angle Source Technique (BFAST)


When studying periodic systems, periodic Boundary Conditions (BC) allows you to calculate the response of
the entire system by only simulating one unit cell, as mentioned in Periodic boundary conditions 478 article.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 591

When a broadband plane wave is injected into a structure at an angle, special treatment will be required. One
way is to use Bloch boundary condition 471 . However, the actual injection angles for broadband illumination
change with frequency, discussed in broadband injection at angles 536 . One way to solve this problem, the
wavelength or frequency can be swept, or a number of incident angles are simulated and interpolation is
required (refer this page 475 , for advanced user only). Oftentimes, sweeping can take much more simulation
time.

Another method to avoid the sweeping is to reformulate the FDTD algorithm. A simplified description of this
method can be briefly described here:

A plane wave angled in xz plane (traveling along z axis) can be expressed as


r r
E (r ) = e ikx x E0

To remove the angular dependence from the field, a set of new variables is used, such as:
r
Q(r ) = e - ikx x E (r )

and then the split field method (eg., split x component to xy and xz) is used to reformulate the FDTD update
equations. Therefore, by reformulating the FDTD update equations, a new algorithm can be developed by
removing this angle dependence. More details can be found in Liang's paper. Therefore, no Bloch BCs are
required. It will have its own built-in boundaries conditions transverse to the propagation direction.

When to use BFAST


If you are simulating periodic structures with a broadband plane wave source illuminated at an angle, it might
be worth trying BFAST. Due to its special formulation, the actual angle of injection does not change with
frequency, making it significantly different from Bloch BCs. Note, the BFAST technique may require special
care for some cases to achieve stability. See the tips at the bottom of the page.

How to use BFAST


BFAST should ONLY be used with a single plane wave source. BFAST can be chosen in the General tab on
the Edit plane wave source window, as shown in the image below to the left. Then users can set the incident
angle and polarization angle. Other source parameters can be set as usual. As expected, all the wavelengths
have the same injection angle, as shown in the image below to the right. In contrary, when Bloch BCs are used,
the incident angles are a function of wavelength, as shown in the figure on angled broadband injection 529 .

Once the "BFAST" is selected in the source, the Boundary Conditions transverse to the wave propagation are
automatically overridden based on BFAST's formulation. For example if users choose "Bloch", "periodic",
"Metal" or "PML" in the transverse directions, a warning sign will be shown. The figure below is showing a case
when BFAST is chosen for a plane wave source injected along the z direction. In this case, the BCs in x and y
directions should be overridden by the BFAST technique, shown by a warning sign to the right. However, the
symmetry BCs 466 can be reserved. Therefore, in this case, only the BCs in x direction are overridden by

2003 - 2016 Lumerical Solutions, Inc


592 Lumerical Knowledge Base

BFAST. PML is used in the z direction as usual.

Transverse BCs overriden by BFAST

If users set symmetric or anti-symmetric BCs, BFAST will keep and use them to save memory and speed up
the simulation. For example, if the source is injected at an angle in xz plane but no angle in yz plane, yz plan
can still use symmetry BCs 466 fitting the source polarizations. In this way, users gain 2x simulation speed.

Along the direction of the wave propagation, users need to set the longitudinal BCs as "PML". For example, if
the plane-wave injection plane is parallel to z axis, the transverse direction will be xz/yz planes, and the
longitudinal direction is z. Usually zmin and z max use PML BCs.

As usual, the source injection plane should extend completely outside the simulation region, as shown in the
figure below. Fortunately, the GUI can automatically do this for the users.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 593

In some cases, users need to modify other BFAST parameters in FDTD "Advanced options". Under this tab,
"BFAST" settings have two parameters:
BAFST ALPHA: It is the smallest dielectric refractive index in the simulation region, and should generally be
1. For example, if the background index is set to 1.33 of water in FDTD "General" tab, then 1.33 should be
used here instead of the default of 1.
DT MULTIPLIER: It is used to further reduce the time step "dt" in "Mesh settings" in addition to the "dt
factor". Its largest value is 1, meaning no change for the dt factor. When it is smaller than 1, the actual time
step dt becomes smaller, in some cases it can overcome some diverging problems impossible by modifying
other settings.

To summarize the usage of BFAST, the procedures are:


1: set the "plane wave type" as "BFAST" in the Source General tab;
2: set the Boundary conditions along the longitudinal direction as PML. GUI will automatically use BFAST's
built-in boundary conditions in the transverse directions. For consistency, user may set "Bloch" in the plane of
angle incidence (though it is overridden), and symmetry BCs in no angle plane if applicable.
3: occasionally some advanced settings need to be modified.

Example
Below is an example of dielectric stack with angled illumination at 60 degree (polarization angle 90) of a 2D
simulation, and comparison to theoretical result. To duplicate the results, you can download and run
best_stack.fsp.

More examples can be found in the Knowledge Base, such as grating order 1790 and blaze grating 1788 , as well
as plasmonic solar example 2663 .

Angle sweep
In some cases users need to get results of broadband incidence at different incident angles. This can be done
by use of sweep as usual to sweep the incident angle. Different from Bloch BC case 475 , in BFAST, at each
specified incident angle, all the wavelengths have the same angle, so no further interpolation is required. In this
example, the incident angle is set inside "model", so when the incident angle is set in sweep, the correct
quantity must be chosen. To get sweep result, open the bfast_stack.lsf and set sweep=1 and run the
sweep, the following images of reflection and transmission are shown below:

2003 - 2016 Lumerical Solutions, Inc


594 Lumerical Knowledge Base

Reflection Transm ission

Limitations
BFAST FDTD is fundamentally different from the standard FDTD formulation because the core update
equations are changed, in addition to the boundary conditions. As a result, there are some limitations:
The time step, dt, must be reduced compared to standard FDTD as the angle of incidence increases in order
to preserve numerical stability (see the next section). This is controlled by the "dt multiplier". As a result,
steep angle simulations will take more time to run. For this reason, it is important to consider if BFAST is the
right method for your application. If your bandwidth is small, or your angle of incidence is small, you may get
faster results by using Bloch boundaries conditions. Certainly, if you are only looking for results at a single
wavelength, you should use Bloch boundary conditions.
Nonlinear materials are not compatible with this method. As a result, nonlinear and all flexible material plugin
materials will not function using BFAST in current version.
Injection above the critical angles for total internal reflection (TIR) is not allowed. There is no possible stable
time step dt in this case. For example, injecting light at 50 degrees in glass that is incident on a glass/air
interface is not stable. However, if you are injecting light in a lower index medium onto a higher index medium,
then it is allowed. For example, if you are injecting light from glass onto a higher index substrate, such as
silicon, then you can use BFAST - however, the value of "bfast alpha" should be set equal to the smallest
refractive index used anywhere in your simulation.

The software can automatically detect if there is total reflection for the source injection. A warning message
will be shown as below:

If you see this warning message, you can use the Bloch+plane wave method with frequency sweep.

Numerical stability
BFAST is more numerically unstable than standard FDTD. There are several sources of instability and most

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 595

problems can be solved by adjusting certain settings. If you encounter any problems that cannot be easily
solved, please contact us for assistance. Most problems and their solutions are listed here:
The PML can be unstable for long duration simulations. If it becomes unstable, we recommend increasing the
number of layers and reducing the value of pml sigma. Sometimes the "steep angle PML" may work better.
Dispersive media can become unstable much more easily. These problems can typically be fixed by reducing
the "dt multiplier" until stability is achieved.
When using dispersive media, the numerical stability is greatly increased by using a uniform mesh over the
dispersive materials in the direction transverse to the source injection axis. For example, when considering the
scattering of a gold particle on a surface, as shown below for a 2D simulation, a mesh override region that
extends at least 1*dx outside of the gold region should be used. This mesh override region should force a
uniform mesh in dx but does not have to force a uniform mesh in dy. The figure below summarizes these
settings. Note that practically, we would often also force a uniform dy mesh to achieve accurate results for this
plasmonic structure. Furthermore, it is often simple to use a uniform value of dx across the entire unit cell but
this is not necessary for numerical stability.

Summary and Tips


Setting to use BFAST is relatively easy, as described above. However, due to its special formulation,
simulation time for a single project file may be a little longer than expected. In addition, at larger angles,
simulation speed is further decreased, and the accuracy can be degraded. There is always a compromise in
simulation between the simulation time spent and the accuracy obtained. Users are advised to make some
tests to choose whether BFAST is the most in favored method for the cases at some steep angles or with very
strong dispersive materials. In addition, converging test 847 may give you confidence for the accuracy it can
reach.

Tips:
1. BFAST: Always check "BFAST" in the "plane wave type" at the source if you want to simulate angled-
broadband source using BFAST; this ensures that all the wavelengths will have exactly the same
incident angle.
2. dt multiplier: The default dt multiplier of 0.5 is chosen for most cases. However, to speed up the
simulation, users can increase it up to 1 (eg., for pure dielectric without dispersion) if simulation does
not diverge.
3. dt multiplier: For strongly dispersive materials, smaller dt multiplier may be required to have stable
simulation.
4. mesh: Users may use a little higher mesh accuracy than usual (2 by default);
5. mesh: Uniform mesh is recommended in the transverse directions.

2003 - 2016 Lumerical Solutions, Inc


596 Lumerical Knowledge Base

6. mesh: if strong dispersive material is involved, override region should be larger than the structure as
shown above.
7. accuracy: Better accuracy can be achieved even at larger incident angles if the materials involved in the
simulation are dielectric without dispersion.
8. accuracy: The accuracy may degrade when the indent angle is large. You may need to test the results
by use of the Bloch BCs to see if you are satisfied with the accuracy.
9. speed up: Usual symmetry BCs 466 can be used if the source has zero incident angle in that plane;
10. speed up: if the smallest refractive index (constant dielectric material, including the background) in the
simulation is not 1, set "bfast alpha" to the smallest dielectric refractive index;
11. PML: If relatively large incident angle is simulated, you may choose "steep angle" PML;
12. PML: along the axis of source injection, PML BCs are used. When higher mesh accuracy is used,
users may need more number of PML layers from default setting.
13. BCs: in the transverse plane, the BCs in the plane of angled incidence are automatically overridden for
whatever the previous BCs are set. However, in the plane of no angle, the symmetry BCs are conserved.

14. critical angle: Currently it will not support the case where the incident angle is very close to and larger
than the critical angle. This can happen when the source is located at higher index material than that in
the rest of the simulation region.

Please contact us at support@lumerical.com for further assistance.

5.4.3.6.6.2 Coherence
FDTD is a fundamentally coherent simulation method. Below, we discuss three types of incoherence that are
relevant for FDTD simulations, and the difficulties in direct simulation of these effects. In many physical processes,
we have a combination of all types of incoherence.

The following sections provide three examples that show how to model various incoherent effects with FDTD
Solutions and MODE Solutions' propagator.

Solvers 101

FDTD
VarFDTD
In this topic
FDTD and coherence 596
Incoherent dipole 600
Unpolarized beam 601
Incoherent unpolarized dipole 607
Double Slit Experiment example 609

See also
Sources 510
Circular polarization 540
Sources - Dipoles 511
Soft sources 627

Temporal phase incoherence


The phase, j, of the light shifts randomly over time, on a time scale tc . For light near visible wavelengths, we have

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 597

r r
E (t ) = E0 cos(wt + j (t ) )
2p
T= 10-15 s
w
t c 10-11 s
It is not practical to simulate the statistics of temporal phase incoherence because tc >> T.

Spatial incoherence
A spatially incoherent source could be, for example, an ensemble of dipole emitters spread over a given volume.
Each dipole is independent of its neighbors, and emits radiation with a random phase that varies on a time scale on
the order of tc . At any given instant, the relative phases of all the dipoles are fixed, however, on a time scale of tc the
relative phases of the dipoles change in a completely random fashion. The direct simulation of spatial incoherence
requires simulations for very long periods of time or a large amount of ensemble averaging with one FDTD simulation
per ensemble. Therefore it is not practical to simulate spatial incoherence directly in most cases.

Polarization incoherence
In a similar manner to temporal phase incoherence, the polarization of a beam or the orientation of a dipole source
depends on time. In the case of an unpolarized beam we have
r r
E (t ) = u (t ) E0 cos(wt )

where the unit vector u(t) defines the beam polarization and varies on a time scale tc >> T. In the case of a dipole
source, we have
r r
p (t ) = u (t ) p0 cos(wt )

where the unit vector u(t) defines the dipole source polarization and varies on a time scale tc >> T.

In both cases, the time scale for the variation of the polarization is much larger then the optical cycle, making it
unpractical to simulate the statistics of temporal polarization incoherence with FDTD.

How to simulate incoherent phenomena with FDTD


Direct simulation of incoherent effects requires simulations that last many times the correlation time (tc ) which is
typically many orders of magnitude larger than the optical cycle. In some cases, ensemble averaging can be used
but this requires a very large number of simulations. Therefore to simulate the physical conditions required for
incoherence means simulation times that are far too long to be practical in most cases.

In general, a more efficient approach is to calculate the statistical averaging analytically rather than performing
lengthy or numerous simulations. In general, this requires a small number of simulations and some post-processing
of the data. In the following sections, we explain how to perform this post-processing in a number of examples that
can be applied to most simulations of incoherent processes.

See the following pages for more information.


Temporal incoherence 598
Spatial incoherence 600
Polarization incoherence 601

2003 - 2016 Lumerical Solutions, Inc


598 Lumerical Knowledge Base

This page goes over the problems associated with direct simulation of temporal incoherence, the recommended
simulation method, and provides an example simulation.

Solvers 101

FDTD
VarFDTD
Associated files
usr_temporal_incoherence.fsp
usr_temporal_incoherence.lsf

See also
Sources 510
Radiated power from multiple dipoles 519

Soft sources 627


Incoherent dipole 600
Unpolarized beam 601
Incoherent unpolarized dipole 607
Double Slit Experiment example 609

Problems with direct simulation


The phase, , of the light shifts randomly over time, on a time scale c. For light near visible wavelengths, we have
r r
E (t ) = E0 cos(wt + j (t ) )
2p
T= 10-15 s
w
t c 10-11 s
Even without random phase shifts, if the light is not monochromatic, it is incoherent.

In either case, the coherence length of the system is often much longer than any standard simulation time (c>>T),
so it is not efficient in general to directly model temporal incoherence. It is not possible to perform near to far field
projections of incoherent results in the near field.

Recommended simulation method


By default, the frequency domain (DFT) monitors of FDTD Solutions return the monochromatic response of the
system.

There are some advanced features to directly extract incoherent results (ie. where the value of f ~ 1/c can be
specified) - see Spectral averaging 662 for more detail.

In general, the best approach is to calculate the monochromatic (or CW) response first, then calculate the
incoherent result with

r 2 r 2
E (w0 ) = W (w )E (w ) d w
Where W(w) is the spectrum of the physical source used.

Temporal Incoherence Example


In usr_temporal_incoherence.fsp, we simulate the reflection from a 50 nm film of silver on a 500 nm slab of
silicon. The associated script file, usr_temporal_incoherence.lsf uses the monochromatic results from the
simulation to calculate the incoherent results (between 500 and 700 nm) for coherence lengths of 15 um and 300 um
for a physical source with a Lorentz function spectrum. The resulting plots are shown below.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 599

2003 - 2016 Lumerical Solutions, Inc


600 Lumerical Knowledge Base

This page discusses how to simulate spatial incoherence directly (or using the Ergodic principle). A more efficient
method of creating incoherent results from coherent results is also discussed.

Solvers 101

FDTD
VarFDTD
See also
Sources 510
Radiated power from multiple dipoles 519

Soft sources 627


FDTD and coherence 596
Incoherent dipole 600
Unpolarized beam 601
Incoherent unpolarized dipole 607
Related publications
Chan, Soljacic, and Joannopoulos, Direct
calculation of thermal emission for three-
dimensionally periodic photonic crystal
slabs (2006).

Problems with direct simulation of incoherence


A spatially incoherent source could be, for example, an ensemble of dipole emitters spread over a given volume.
Each dipole is independent of its neighbors, and emits radiation with a random phase that varies on a time scale on
the order of c. At any given instant, the relative phases of all the dipoles are fixed. However, on a time scale of c
the relative phases of the dipoles change in a completely random fashion. The direct simulation of spatial
incoherence requires simulations for very long periods of time or a large amount of ensemble averaging (with one
simulation per ensemble). Therefore, it is not practical to simulate spatial incoherence directly in most cases.

Ergodic principle
Spatial incoherence can be simulated using the ergodic principle of averaging results from multiple ensembles of
dipoles.

Each ensemble consists of many dipoles with randomized phase, amplitude, position, orientation and pulse time. A
large number of ensembles must be averaged in order to get reasonable results. There is a statistical error
associated that decreases with increased number of ensembles, and typically 50 to 100 simulations is a minimum
requirement for getting accurate results (more may be required). It is often erroneously assumed that one simulation
is enough.

For a discussion on this method, please see the Chan et.al. reference under related publications.

Recommended simulation method


By running the simulation for each source individually, incoherent results can be constructed from coherent results

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 601

by summing the results from each simulation incoherently. This approach has no statistical error, and the total
number of simulations required to do this is typically less than what is required for ensemble averaging. Please see
Incoherent dipole 605 and Double slit experiment 609 for some examples demonstrating spatial incoherence.

On this page, polarization incoherence and methods to simulate it are discussed.

Solvers 101

FDTD
VarFDTD

See also
Sources 510
Circular polarization 540
FDTD and coherence 596
Incoherent dipole 600
Unpolarized beam 601
Incoherent unpolarized dipole 607

Problems with direct simulation


In a similar manner to temporal phase incoherence, the polarization of a beam or the orientation of a dipole source
depends on time. In the case of an unpolarized beam we have
r r
E (t ) = u (t ) E0 cos(wt )
where the unit vector u(t) defines the beam polarization and varies on a time scale c >> T.

In the case of a dipole source, we have


r r
p (t ) = u (t ) p0 cos(wt )

where the unit vector u(t) defines the dipole source polarization and varies on a time scale c >> T.

In both cases, the time scale for the variation of the polarization is much larger than the optical cycle, making it
unpractical to simulate the statistics of temporal polarization incoherence with FDTD.

Recommended simulation method


FDTD simulations have well defined polarization. For a beam, unpolarized results are obtained by adding the results
of 2 orthogonal polarization simulations incoherently using the equation

2003 - 2016 Lumerical Solutions, Inc


602 Lumerical Knowledge Base

2 r 2 r 2
E = 12 Es + 12 E p

The derivation of this equation can be found on the Unpolarized beam 602 page.

In the case of a dipole, the results of the three orthogonal polarizations can be added incoherently using the equation

1 r 2 r 2 r
E
2
=
3
{
E px + E py + E pz
2
}
Polarization incoherence examples
For an examples on simulating polarization incoherence, see Unpolarized beam 602 and Incoherent unpolarized
dipole 607 .

To simulate an unpolarized beam or plane wave source, we need to perform 2 simulations with orthogonally polarized
beams. The fields from each simulation can then be added incoherently.

Solvers 101

FDTD
VarFDTD
Associated files
usr_unpolarized_beam.fsp
usr_unpolarized_beam.lsf

See also
Sources 510
Circular polarization 540

Introduction
To simulate an unpolarized beam or plane wave source, two simulations with orthogonal polarizations will be
required. Results for an unpolarized source can then be calculated by incoherently summing results from the two
polarized simulations according to the formula below. See the Derivation section at the bottom of this page for
details.
2 r 2 r 2
E = 1 Es + 1 E p
2 2

In practice, this means that we simulate a beam with a "polarization angle" of 0 and then a beam with a "polarization
angle of 90", as shown below. The quantity <|E|2> refers to the time averaged electric field intensity of an unpolarized
beam source.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 603

1 r 2 r 2
E
2
=
2
{
E0 + E90

Example
The files usr_unpolarized_beam.fsp and usr_unpolarized_beam.lsf can be used to reproduce the
following results.
Screenshot of the simulation

A focused beam propagating at


an angle of 60 degrees. The beam
is incident upon a surface with an
index of 2.

The angle of incidence is very


close to Brewster's angle for this
structure. Therefore, we expect
quite different behavior for the two
polarizations.
P polarized light will have higher
transmission (low reflection)
S polarized light will have lower
transmission (high reflection)

Field profile from a P polarized


beam

Notice that the transmitted fields


have an amplitude of about 0.3
(highlighted with a green circle).

2003 - 2016 Lumerical Solutions, Inc


604 Lumerical Knowledge Base

Field profile from a S polarized


beam

Notice that the transmitted fields


have an amplitude of about 0.2
(highlighted with a green circle).

Field profile from an unpolarized


beam

The field profile is simply the


average of the P and S polarized
beams (highlighted with a green
circle).

Transmission (P polarization): 98% Fraction of power transmitted into


Transmission (S polarization): 72% the substrate
Transmission (unpolarized): 85%
As expected, the P polarized
beam has a higher transmission.
Once again, the unpolarized
transmission is simply the
average of the transmissions from
the P and S simulations.

Derivation
To calculate the response of a system to an unpolarized beam, we need to average over all possible input
polarizations:

2p r
2 2
E = 1 E (q ) d q
2p
0

Due to the linearity of Maxwell's equations, we can represent the electric field of an arbitrarily polarized incoming
beam as a sum of two orthogonal polarizations:
r r r
E ( q ) = Es sin( q ) + E p cos( q )

Therefore, the integral can be computed as follows:

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 605

2p r
2 2
E = 1 E (q ) d q
2p
0
2p r r 2
= 1 Es sin( q ) + E p cos( q ) d q
2p
0
2p
r 2 2 r 2 2 r r
= 1 E sin ( q ) + E cos ( q ) + 2 E s E p sin( q ) cos( q ) d q
2p s
p

0
r 2p r 2p r r
2 Es E p 2 p
2 2
ES 2 Ep 2
= sin (q )d q + cos (q )d q + sin( q ) cos( q )d q
2p 2p 2p
0 0 0
r 2 r 2
= 1 Es + 1 E p
2 2

The following identities are required to simplify the above integral:


2p 2p
2 2
sin ( j )d j = p
0
cos ( j )d j = p
0

2p

cos(j ) sin( j )d j = 0
0

The response to a spatially incoherent sources can be obtained from the results of multiple coherent simulations.

Solvers 101

FDTD
VarFDTD
Associated files
usr_incoherent_dipoles.fsp
usr_incoherent_dipoles.lsf

See also
Sources 510
Radiated power from multiple dipoles 519

Soft sources 627


FDTD and coherence 596
Unpolarized beam 601
Incoherent unpolarized dipole 607

For example, suppose we have a simulation with two dipoles, as shown below. The coherent interference pattern
between the dipoles is clearly visible in both the movie and frequency monitors.

time domain frequency monitor (log scale)

2003 - 2016 Lumerical Solutions, Inc


606 Lumerical Knowledge Base

Coherent
interferen
ce

If we want to obtain the incoherent result, we need to perform two individual simulations, as shown below
time domain frequency domain
log(|E1|2)
Incoheren
t
simulation
1

log(|E2|2)
Incoheren
t
simulation
2

By summing the results coherently or incoherently, we can obtain the coherent or incoherent results from the two
simulations:

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 607

Coherent: log(|E1+E2|2) Incoherent: log(|E1|2+|E2|2)

Note: Radiated power and coherence


The amount of power radiated by a set of coherent dipoles will be different from a set of incoherent dipoles. For
more information, see this link:
Radiated power from multiple dipoles 519

To simulate an incoherent unpolarized dipole source we need to perform 3 simulations. In each simulation, there
must be one dipole that is orthogonal to the dipoles in the other simulations. The fields from each simulation can
them be added incoherently.

Solvers 101

FDTD
VarFDTD
See also
Sources 510
OLEDs 2694
FDTD and coherence 596

Incoherent dipole 600


Unpolarized beam 601

In practice, this means that we simulate a dipole oriented along the x, y and z axes respectively in each simulation.
To obtain the unpolarized fields, we can simply sum the results incoherently. This means that
r 2 r
E
2
= 1 r 2
3
{
E px + E py + E pz
2
}

The quantity <|E|2> refers to the time averaged electric field intensity of an unpolarized dipole source, or a large
number of randomly oriented dipoles in a spatial volume much smaller than the wavelength. For a comparison with
analytical results and a practical application of this approach, in both the near field and the far field, please see the
LEDs application example. For a proof of the principle, please see below.

Derivation
An unpolarized dipole source is created by a large number of incoherent dipole emitters contained in a small spatial
volume that have a random orientation. It can also be created by a single dipole that is randomly re-oriented every

2003 - 2016 Lumerical Solutions, Inc


608 Lumerical Knowledge Base

correlation time such that all possible orientations are equally sampled on time scales typical of photodetectors.

To calculate the field distribution of an incoherent dipole, we need to average over all possible dipole orientations.
The incoherent electric field intensity at position r is given by:

r r 2 1 r r 2
E (r ) =
4p E (r , q , j ) sin( q )d qd j

r r
where
E (r , q , j )
represents the electric field created at position r by a dipole (at position r0) with an orientation
given by the spherical angles q and j

A dipole of any orientation can be written as


r r p r p p r
p ( q , j ) = p ( ,0) sin( q ) cos( j ) + p ( , ) sin( q ) sin( j ) + p (0,0) cos( q )
2 2 2

Since Maxwell's equations are linear, we can write the electric field from a dipole with orientation q and j as

r r r r p r r p p r r
E (r , q , j ) = E (r , ,0) sin( q ) cos( j ) + E (r , , ) sin( q ) sin( j ) + E (r ,0,0) cos( q )
2 2 2

Substituting this into the equation for the field intensity of an incoherent dipole gives

r r 2 r r p r r p p r r 2
1
E (r ) = E (r , ,0) sin( q ) cos( j ) + E (r , , ) sin( q ) sin( j ) + E (r ,0,0) cos( q ) sin( q )d qd j
4p 2 2 2

It is easy (if tedious) to simply this integral with the help of the identities provided at the bottom of this page. In the
end, we get

r r 2 r r p
1
2
r r p p 2 r r 2

E (r ) = E (r , ,0) + E (r , , ) + E (r ,0,0)
3
2 2 2

Therefore, the field distribution of an incoherent, unpolarized dipole is simply the average of the field distribution of
three orthogonal dipoles. The same result can easily be shown for the H field intensity or the Poynting vector.

The following identities are required to simplify the above integral:


2p 2p

sin( j )d j = 0
0
cos(j )d j = 0
0
2p 2p
2 2
sin ( j )d j = p cos ( j )d j = p
0 0
p p
3 4 2 4
0 sin (q )d q = 3 cos (q )d q = 3
0
2p p
2 2
cos(j ) sin( j )d j = 0
0
sin( q ) cos (q )d q = 3
0
2p

d j = 2p
0

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 609

This example uses the well-known Young's double slit experiment to demonstrate the spatial coherence of sources
within an FDTD simulation.

Solvers 101

FDTD
VarFDTD
Associated files
usr_double_slit.fsp
usr_double_slit.lsf

See also
FDTD and coherence 596
Incoherent dipole 600
Unpolarized beam 601
Incoherent unpolarized dipole 607

Discussion
The simulation uses a TFSF plane wave source traveling in the +x direction that illuminates an opaque screen with
two apertures 12 um apart. The fields are observed using a frequency monitor which records the data along y at a
distance of 50 um away from screen.

The script file runs the simulation for the cases where the only the top slit is open, only the bottom slit is open, and
the case where both slits are open.

Tip: Reducing the simulation size


To minimize the simulation time, it is generally recommended that you do not include large regions of empty
space in a simulation. It would be possible to obtain these same results with a much smaller simulation region,
by taking advantage of the far field projection functions. This example uses a large simulation region to keep the
analysis as simple as possible, even though it is less computationally efficient.

As the plane wave propagates through the slit, diffraction occurs, making the slit act as a point source. The resulting
field profile on the screen is a roughly Gaussian shaped intensity profile from each slit when only one is open at a
time.

When both of the slits are open at the same time, the resulting intensity profile recorded by the monitor is not the

2003 - 2016 Lumerical Solutions, Inc


610 Lumerical Knowledge Base

simple the addition of the two intensity profiles shown above. Instead, it is a coherent sum, that includes the
interference terms between the two point sources.

It is important to understand that individual FDTD simulations are always coherent. Never the less, it is possible to
obtain incoherent results by running multiple simulations and adding the results incoherently. The figure below
shows the resulting profile for an incoherent system.

Note: The example script runs 3 simulations, but you can get both incoherent and coherent results by running only
the two simulations where only one slit is open and adding the results incoherently (|E1|2+|E2|2) and coherently (|E1
+E2|2).

5.4.3.6.6.3 Changing the source bandw idth

Objective
This page discusses how to control the bandwidth of the source pulse.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 611

Solvers 101

FDTD
VarFDTD
See also
Sources 510
Custom time signal 613
Custom spectrum 615

By default, FDTD and MODE Solutions automatically calculate the source pulse shape and bandwith from the Start
& Stop wavelength values specified by the user.
In FDTD Solutions, the 'Optimize for short pulse' option is enabled by default, meaning that a very short pulse is
typically used. In MODE Solutions, this option is disabled by default, leading to a slightly longer pulse (although still
quite short).

Optimize for short


pulse: enabled
This is the default
setting for FDTD
Solutions, meaning a
very short pulse will
be used in most
simulations.

2003 - 2016 Lumerical Solutions, Inc


612 Lumerical Knowledge Base

Optimize for short


pulse: disabled
This is the default
setting for MODE
Solutions, meaning a
slightly longe pulse
will be used in most
simulations. Using a
slightly longer pulse
minimizes the
amount of power
injected at
frequencies outside
the range of interest,
minimizing numerical
stability problems.

For the majority of simulations, the default source pulse settings work well. However, in some special situations, you
may need to modify the source pulse settings:

Very wide band pulse (ex. searching for resonant modes)


When studying resonators, the first task is generally to determine the resonant frequencies. A very wide band
source can be used to determine all resonant frequencies from a single simulation. Typically the frequency range of
interest is 0->fmax . This type of source is easily generated with the Set Frequency frame of the Frequency /
Wavelength tab. Set the frequency start value to a small value(zero is not allowed). Set frequency stop to fmax .

In the following example, the source range is 1-601 THz. Notice the broad spectrum in the Spectrum vs frequency
plot, and the very short source pulse in the Signal vs time plot.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 613

Narrow band source (ex. some non-linear simulations, some divergence


problems, etc)
In some some situations, it is necessary to create pulse with a narrow bandwidth, or to minimize the amount of
power that is injected outside the specified wavelength range. In such cases, you can disabled the 'Optimize for
short pulse' option. If that is not sufficient, you can select the 'set time domain' option and increase the Pulse length
and Offset properties as much as needed. If these settings are increases significantly, you may need to increase the
overall simulation time.

Objective
This topic explains how to create a custom time signal for a source. In this example, we create a signal with two
gaussian shaped pulses.

Note: Custom source time signals and spectra


Customizing the source time signal or spectrum is an advanced feature. In the vast majority of simulations, it is
best to simply specify the frequency/wavelength range of interest and let the software calculate the best source
time signal. It is usually far easier and more efficient to model a particular source time signal or spectrum (ie. the
solar spectrum) during data post processing. For more information, see Using the impulse response to calculate
the systems response to an arbitrary input 874 or the Solar source spectrum 2594 page. Non-linear 2716 simulations
are the one application area where custom time signals may be necessary.
Before implementing a custom source time signal or spectrum, we strongly recommend contacting
support@lumerical.com to discuss your needs.

If you are looking to simply modify the source bandwidth (ie. to create a longer, more narrow band pulse), see
Changing the source bandwidth 610 .

2003 - 2016 Lumerical Solutions, Inc


614 Lumerical Knowledge Base

Solvers 101

FDTD
VarFDTD
Associated files
usr_custom_time_signal.fsp
usr_custom_time_signal.lsf

See also
Sources 510
Custom time signal 613
Custom spectrum 615
Changing the source bandwidth 610

setsourcesignal 1580

To create a custom source time signal, the setsourcesignal function requires a complex valued function.
However, we typically only have a real valued signal. The script usr_custom_time_signal.lsf show how to
convert a real valued function into a complex valued function using an fft.

The first part of the script shows how to define a real valued time signal. In this example, we simply use a sine wave
with a dual-gaussian envelope. Next, the script shows how to convert a real valued signal into a complex valued
signal. After that, the custom time signal is loaded into the source. Finally, we run a simulation and compare the
specified pulse with the actual simulation results.

To reproduce the following figure, open the simulation file, then run the script.

This figure shows the Specified signal, the actual Source This is a zoomed in version of the same figure. We can
signal used in the simulation, and the resulting field see that the Specified signal and Source signal are very
profile as measured by a time monitor. similar. The Signal from the time monitor is delayed by
about 1/4 wavelength, as expected due to the spatial
offset between the source and monitor.

Note: Auto shutoff and time signal length


By default, the auto shutoff function does not kick in until the specified time signal length is done. So one would

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 615

see auto shutoff value stays at 1 even though the amount of remaining field is actually small in the simulation. For
example, for the above custom time signal, the auto shutoff does not start to function until 600 fs (the time length
specified in the script file), although the pulse is physically done at around 400 fs. In order to have the auto shutoff
working ASAP, user should specify a minimum time length possible, say, 450 fs for this source.

Objective
This topic explains how to create a custom source spectrum. First, we must design a time signal with the desired
spectrum. Next, we set the source to use this custom time signal with the setsourcesignal function. Finally, we
confirm the spectrum with a time monitor.

Note: Custom source time signals and spectrums


Customizing the source time signal or spectrum is an advanced feature. In the vast majority of simulations, it is
best to simply specify the frequency/wavelength range of interest and let the software calculate the best source
time signal. It is usually far easier and more efficient to model a particular source time signal or spectrum (ie. the
solar spectrum) during data post processing. For more information, see Using the impulse response to calculate
the systems response to an arbitrary input 874 or the Solar source spectrum 2594 page. Non-linear simulations are
the one application area where custom time signals may be necessary.
Before implementing a custom source time signal or spectrum, we strongly recommend contacting
support@lumerical.com to discuss your needs.

Solvers 101

FDTD
VarFDTD
Associated files
usr_custom_spectrum.fsp
usr_custom_spectrum.lsf

See also
Sources 510
Custom time signal 613
Custom spectrum 615
Changing the source bandwidth 610

setsourcesignal 1580

Setup source
Use usr_custom_spectrum.lsf to create a source with a specified power spectrum.

Specify the desired spectral shape in the first section of


the script file. In this example, we specify a sloped-wall
top-hat function.

2003 - 2016 Lumerical Solutions, Inc


616 Lumerical Knowledge Base

The time signal length must be specified in the Setup


section of the script file. In this example, the source
length is 30 fs. This figure shows the time signal we
have calculated.

The figure on the left shows the specified spectrum, and


the actual spectrum that we expect, based on the above
time signal. Notice they are not identical. The calculated
spectrum will converge to the specified spectrum as the
time signal length is increased.

Test source in FDTD simulation


The final section of the script file loads the time signal into the source and runs a simple simulation. We can
calculate the actual spectrum of the source in the FDTD simulation with the sourcepower function. It would also
be possible to confirm the spectrum with a time monitor, if there are no structures in the simulation. Structures in
the simulation will create reflections that will interfere with the source pulse. This interference would alter the
spectrum that the time monitor measures.

This figure shows the actual time signal used by the


source in the FDTD simulation. Notice the phase offset
as compared to the calculated time signal. By adjusting
the source phase setting, the phase of the fdtd time
signal could be matched to the calculated signal.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 617

This figure shows the actual source spectrum obtained


with the sourcepower function. Once again, the
spectrum is similar to the Specified and Expected
spectrums, but slightly different. The difference between
the FDTD and the calculated spectrum occurs because
the fdtd simulation uses a larger dt than the calculated
spectrum.

5.4.3.6.6.4 Get source field profile

Objective
This topic provides an example that shows how to get the spatial field profile from a Mode, planewave, or beam
source.

Solvers 101

FDTD
VarFDTD
Associated files
usr_get_source_spatial_fields.fsp
usr_get_source_spatial_fields.lsf

See also
Sources 510
getresult 1647
How close can monitors be to other objects
666

Custom source profile from monitor data 583

Use the getresult command to access the spatial field profile from the source. For Mode sources, you can also get
the mode's effective index.

The mode profile and effective index data can be accessed as soon as the mode has been calculated. The
updatesourcemode command can be used to force the mode profile calculation. The following command shows how
to get the effective index from a Mode source.

# get the source fields and effective index from the mode source
source_fields = getresult("source","mode profiles");
n = getresult("source","neff");
?n.neff;

2003 - 2016 Lumerical Solutions, Inc


618 Lumerical Knowledge Base

5.4.3.6.6.5 CW Normalization
This section describes the CW normalization used to convert time domain data to frequency (steady-state) data. The
CW normalization option should be used whenever you collect frequency domain information.

Solvers 101

FDTD
VarFDTD
In this topic
CW Normalization 618
Pulse or CW injection 620
Free space example 622
Ring resonator example 623
See also
Sources 510
Units and normalization - Ref. guide 622
Ring resonator - Getting started example 2021

Understanding Continuous Wave Normalization (cwnorm)


Impulse response
FDTD is a time domain method. The electromagnetic fields are calculated as a function of time. In FDTD Solutions,
the system being simulated is excited by a dipole, beam, mode or imported source. In FDTD Solutions, the time
signal of the source, s(t), is a pulse. For example, this could be
(t - t0 ) 2
s (t ) = sin (w0 (t - t0 ) ) exp - 2

2(Dt )
and the Fourier transform of s(t) is s(w)
s ( w ) = exp (i wt )s (t )dt

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):
r r
Esim ( w ) = exp (i wt )E (t )dt
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.
r
r Esim ( w )
Eimp ( w ) =
s( w )
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.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 619

Example
Consider a beam source injected into free space at z=z 0. The source signal is

(t - t0 ) 2
s (t ) = sin (w0 (t - t0 ) ) exp - 2

2(Dt )
The electric field at the source injection plane has the following form:
E ( x, y, z0 , t ) = E0 ( x, y, z0 ) s (t )

In the cwnorm state,


E ( x, y , z , w ) = E 0 ( x, y , z )
In other words, the field returned in the cwnorm state is the field that would exist if a CW source of amplitude E0
had been used at the angular frequency w. It removes any frequency dependence due to the finite pulse length of the
source, and the units of the returned fields are the same as time domain fields.

For more information, see the Units and Normalization chapter of the Reference Guide.

Note: Single frequency simulations in FDTD Solutions


Sources in FDTD Solutions always inject a pulse (i.e. broadband), even when the user is only interested in
collecting data at a single frequency. Pulse sources are more efficient for collecting broadband information, and at
least as efficient when collecting information at a single frequency. Therefore, there is no reason to use CW
sources. The CW response of a structure can easily be obtained from a simulation that used a pulse source.

The following screenshot shows the source Frequency/Wavelength settings tab. In this screenshot, the source
wavelength is set to a single frequency of 500nm. Even thought the frequency span is zero, a pulse is still used.
The time domain signal of the pulse, and the associated power spectrum, are shown in the figures on the right side
of the window.

When the source frequency span is set to zero (i.e. single frequency), then the frequency domain monitors will
automatically measure the response of the system at that frequency only.

Note: Changing the normalization state


By default, the CW normalization option is enabled. This is the correct setting for the majority of simulations.
However, if you want to disable the CW normalization, go to the Settings - Normalization state menu and select No
normalization. You can also use the cwnorm and nonorm script commands.

2003 - 2016 Lumerical Solutions, Inc


620 Lumerical Knowledge Base

Note: Creating a CW source


While we strongly recommend against using a CW source, it is possible to create them in FDTD Solutions. For
example, it is possible to create a source time signal like the one shown below. For more information on creating
custom source time signals, see the custom source time signal 613 page. The source pulse shown in this
screenshot is from the simple non-linear laser gain 2739 example simulation.

Your data analysis may be more complicated when using a CW source. The frequency domain normalization will
not work properly with a CW source. The CW normalization requires that the time domain fields decay to zero by
the end of the simulation.

Note: To reproduce the above screenshot, reduce the simulation time in the FDTD region from 20ps to 1ps, then
open the source properties and zoom in to the start of the source time signal.

Objective
This section describes why the sources inject a short pulse, rather than a Continuous Wave (CW) signal. A pulse is
always used, even when you set the source frequency span to zero (i.e. a single frequency).

It is very important to understand that you can obtain the CW (single frequency, steady-state) response of the
system, even though the source signal was a short, broadband pulse.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 621

Solvers 101

FDTD
VarFDTD
See also
Sources 510
CW Normalization 618

When configuring the source wavelength range (see above figure), you may notice that a broadband pulse is always
used. This behavior is quite intuitive for broadband sources, since the source must excite a range of frequencies.
However, when you are only interested in a single frequency (i.e. you set the frequency span to zero), it may appear
to be incorrect. Many people expect to see a CW signal (i.e. a sine wave) in the 'signal vs time' plot shown above.

For collecting broadband results, a pulse is always more efficient than a CW signal, while for single frequency
results, a pulse is at least as efficient as a CW signal. Always using the pulse technique allows for a more
consistent method of analyzing simulation results, where the CW response (single frequency, steady-state) is
obtained with a Fourier transform of E(t) to give E(w).

For additional details and examples, please see the CW Normalization 618 page.

Note: Creating a CW source


Lumerical recommends against using a CW source in almost all cases. However, if you insist on using a CW
signal, see the tip at the bottom of the CW Normalization 618 page for instructions.

2003 - 2016 Lumerical Solutions, Inc


622 Lumerical Knowledge Base

This page describes the CW normalization as it applies to a simple plane wave propagating through free space.

Solvers 101

FDTD
VarFDTD
In this topic
CW Normalization 618
Free space example 622
Ring resonator example 623

Associated files
usr_CW_freespace.fsp
usr_CW_freespace.lsf

See also
Sources 510
Units and normalization - Ref. guide 622

Free space example


Suppose we want to calculate the broadband power transmission of a plane wave traveling 1 micron through free
space. This is a trivial problem, but it demonstrates some of the key points. It is also a good test case because we
know to expect 100% transmission for all frequencies. A screenshot of the simulation is shown above. The monitor
located above the source will be used to measure the fields and power transmission.

Run the simulation, then the associated script. The following figure will be created.

The above figure shows the power transmission of the plane wave source as a function of frequency. In all cases, the
power is calculated by integrating the Poynting vector. The only difference is the type of normalization.

The blue line shows the result with CW norm OFF. This data is correct and does show 100% transmission, but
only after we realize that the pulse injected more energy at the center frequency than other frequencies. It is clear
that the data in this form is not very meaningful, since we expect the transmission vs frequency graph to be a flat
line. The units of this data are Watts / Hz^2. This curve is shown in the Source - Frequency/Wavelength tab.
The green line shows the result with CW norm ON. The power transmission now appears to be basically
independent of frequency, as expected. The effects of the pulse have been removed. This value is now the amount
of power that would be measured if a CW source with an electric field amplitude of 1V/m was used to excite the
system. The units of this data are Watts. The theoretical power is given by 0.5*sqrt(eps0/mu0)*(100e-9)^2, where
(100e-9)^2 is the area of the simulation cross section.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 623

The red line shows the result with CW norm ON divided by the sourcepower function. This can be calculated
more simply with the transmission function. To a first approximation, the sourcepower function is a constant
when CW norm is ON, which is why the green and red lines are very similar. However, this is not exactly true. For
information, see the note below for advanced users.

For more information, see the Units and Normalization chapter of the Reference Guide.

Note: For advanced users


If you download the example files and zoom in on the green and red lines of the transmission figure, you will see
that the green line (CW norm) is not quite flat. This is due to a numerical grid dispersion that is an inherent part of
the FDTD method. It has nothing to do with the CW normalization itself. The magnitude of this error goes to zero
as the mesh becomes smaller.
This error causes the amount of power injected by the source to vary slightly from the desired value. Fortunately,
this error is predictable, and is built into the sourcepower function (sourcepower returns the amount of power
injected by the source).
The red line is the 'flattest' line, because both the CW normalization and the source power normalizations have
been applied. The results can also be made more accurate by using a smaller mesh size (higher mesh accuracy).

This page describes the CW normalization as it applies to a ring resonator with a complicated frequency domain
transmission spectrum.

r r 2
Solvers 101
E (rdrop , w )
FDTD
2
VarFDTD S (w)
In this topic
CW Normalization 618
Free space example 622
Ring resonator example 623

Associated files
usr_ring.fsp

See also
Sources 510
Units and normalization - Ref. guide 622
Ring resonator - Getting started example 2021

Ring resonator example


The step by step method of how FDTD Solutions/propagator calculates the CW response of the system using pulse
sources is illustrated below, using the Ring resonanator example from the Getting Started Guide of FDTD Solutions.

2003 - 2016 Lumerical Solutions, Inc


624 Lumerical Knowledge Base

The source time signal has the form

1 t - t0 2
S (t ) = sin( w0t ) exp -
2 Dt

The source gives rise to the electromagnetic fields as a function of time, as shown in the movie below.

r r
E (r , t )

Point time monitors at the centers of the through and drop waveguides allow us to plot the electromagnetic fields as
a function of time

r r
E (rthrough, t )

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 625

r r
E (rdrop , t )

While the simulation is running, the frequency domain profile monitors and frequency domain power monitors perform
Discrete Fourier Transforms (DFT) to calculate the electromagnetic fields as a function of angular frequency.
r r TS IM
r r
E (r , w ) = dt exp( i wt ) E (r , t )
0

2 pc
w = 2 pf =
l
The simulation time is TSIM, and it is important that we allow the fields to decay completely in the time domain before
the end of the simulation; otherwise, the fourier transform is not correct. Point time monitors should always be used
to verify that the fields have decayed. (The exception to this rule is very high quality factor resonators.)

We can see graphically what this transformation does for the field recorded by a point time monitor at the drop
waveguide center.
r r r r 2
E (rdrop , t ) E (rdrop , w )

We can see that the electromagnetic field as a function of frequency has narrow drop channels due to the ring
resonator, and an overall gaussian envelope which is due to the source pulse. The reason is that the source pulse
injects the most energy at the central frequency of 193.1 THz, and less energy at other frequencies. The relative
amount of energy injected by the source as a function of frequency is called the source spectrum. The source
spectrum is shown in the Frequency/Wavelength tab of the Source object parameters and looks like the figure
below.

2003 - 2016 Lumerical Solutions, Inc


626 Lumerical Knowledge Base

The bottom plot shows the source signal versus


time, S(t). The middle plot shows the source
spectrum versus frequency and the upper curve
shows the source spectrum versus wavelength.

We can normalize our electromagnetic fields as a function of frequency to the source spectrum to study the pure
CW response of the system, as if the source spectrum was a constant at all frequencies. FDTD Solutions does this
normalization by default and it is called "CW Normalization". This can be set by choosing either "CW normalization"
or "No normalization" from the "Settings->Normalization state" menu of the layout editor.

With "CW Normalization" we can again consider the the correspondence between the electromagnetic fields as a
function of time and frequency at the center of the drop waveguide.
r r r r 2
E (rdrop , t ) E (rdrop , w )
2
S (w)

It is now clear that we see the response of the drop channel without the gaussian envelope due to the source
spectrum. It should be noted that switching from "CW normalization" to "No normalization" only affects the post-
processing of the simulation data. It does not affect how the data is calculated during the simulation in any way. To
avoid numerical error, we should only calculate frequency domain information at frequencies where the source
spectrum is not infinitely small.

We can also collect spatial information and calculate transmissions through monitors at different wavelengths. For
example, the spatial profiles of the ring resonator at two different wavelengths is shown below. Even if we choose to
calculate results at only one wavelength, the pulse source is still the most efficient method of calculating this CW
response.
r r 2 r r 2
E (r , w ) E (r , w )
at 1581 nm at 1553 nm

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 627

5.4.3.6.6.6 Low frequency (GHz, MHz) simulations


The majority of Lumerical's customers do simulations in the UV-Vis-IR wavelength range. For this reason, many
default settings in the software are appropriate for these wavelengths. This page explains some common issues that
must be considered when running simulations at much lower frequencies (longer wavelengths), such as in the GHz
and MHz ranges.

See also
Sources 510
Metamaterials methodology 1986
Creating sampled data materials 226

Simulation time
At lower frequencies, the simulation time property (found in the general tab of the simulation region) must be
increased. The default value of 1000fs corresponds to hundreds of optical cycles at visible frequencies. When
operating at lower frequencies, you must increase the simulation time accordingly.

Material data (refractive index)


The materials defined in the Material Database generally have refractive index data around the UV-Vis-IR wavelength
range. In most cases, the default material data does not extend to the GHz, MHz ranges. In such cases, you must
add your own material data into the database. See the 'creating sampled data materials' page for instructions.

Metals
At UV-Vis-IR wavelengths, it is often necessary to correctly model the dispersive nature of metals. At lower
frequencies, the material dispersion is less important, and metals can often be treated as ideal. Making this
approximation means that it is not necessary to find the actual refractive index values. It can also allow a much
larger simulation mesh to be used. To treat metals as ideal, use the PEC (Perfect Electrical Conductor) material
model. PEC is an ideal metal with zero absorption and 100% reflection.

Very small features


In some cases, extremely sub-wavelength features may exist in your real device. For example, a 1um thick metal
layer in a device designed to operate at 300MHz. The layer is only one millionth of a wavelength thick! Making the
simulation mesh small enough to resolve this feature will result in extremely long simulation times. Such situations
deserve careful consideration. It is often possible to make some type of reasonable approximation to make the
simulation run faster. For thin metal layers, it is often reasonable to make them much thicker in the simulation than
they are in reality. It is also possible to use a 2D sheet to represent an object with infinitesimal thickness. See the
metamaterial tips page for details.

5.4.3.6.6.7 Soft sources


"Soft" sources create radiation that is added to the existing electromagnetic fields without causing scattering of any
radiation that is incident upon the source. "Hard" sources force the electromagnetic fields to have a pre-defined value
at certain points in the simulation, and therefore have the potential to scatter incident radiation.

All sources in FDTD Solutions/MODE Solutions' propagator, including dipole sources, are "soft" sources.

2003 - 2016 Lumerical Solutions, Inc


628 Lumerical Knowledge Base

Solvers 101

FDTD
VarFDTD
See also
Sources 510
Sources - Dipoles 511
FDTD and coherence 596

Incoherent dipole 600

The total electromagnetic fields in a simulation with multiple sources is given by the coherent sum of the field due to
each individual source. Therefore, it is equivalent to calculate the total field by:
directly simulating the entire system by including all sources in a single simulation
run one simulation per source, then coherently sum the fields from each simulation
r r r r
Etotal = Es1+ s 2 = Es1 + Es 2

To see an example that shows these two techniques are equivalent, see the FDTD and coherence - Incoherent
dipole 600 page. This examples calculates the interference pattern between two dipoles. A screenshot of the
coherent interference pattern of the two dipoles from this example is shown above. This field profile can be obtained
from a single simulation with two sources, or the coherent sum of two simulations that had one source each.

For the purposes of showing that the above techniques are equivalent, we are only interested in the coherent
interference patterns from this example. The incoherent sum of the fields is not relevant to understanding this point.

Note: Radiated power and coherence


The amount of power radiated by a set of coherent dipoles will be different that a set of incoherent dipoles. For
more information, see this link:
Radiated power from multiple dipoles 519

5.4.3.6.6.8 Source movies

Objective
This page provides a basic introduction to the sources in FDTD Solutions (with images of the steady state (CW) field
profile and movies of the time domain pulse for each source). Sources in MODE Solutions' propagator are very
similar but may look slightly different since they do not have z-dependence.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 629

Solvers 101

FDTD
VarFDTD
In this topic
Dipoles 629
Gaussian beam 631

Planewave 632
TFSF 634
MODE 635
Import 579
Associated files
usr_source_electric_dipole.fsp
usr_source_magnetic_dipole.fsp
usr_source_gaussian.fsp
usr_source_planewave.fsp
usr_source_TFSF.fsp
usr_source_mode.fsp
usr_custom_source.fsp

See also
Sources 510
Sources - Dipoles 511
Plane waves - Edge effects 526

TFSF sources 546


Making a CW Movie 870

Dipoles
Dipoles are used to simulate point source radiators, such as radiation from a fluorescent molecule. There are two
types of dipole source: Electric (oscillating point charge) and Magnetic (current loop). The radiation pattern of these
dipoles is similar, but not exactly the same. For more dipole source information, see the Sources - Dipoles 511 page.

Electric dipole simulation screenshot Magnetic dipole simulation screenshot

2003 - 2016 Lumerical Solutions, Inc


630 Lumerical Knowledge Base

Electric dipole
Steady state (CW) - Ez in xy-plane

Electric dipole
Time domain - Ez in xy-plane

Electric dipole
Steady state (CW) - |E|^2 in xz-plane

Electric dipole
Time domain - |E|^2 in xz-plane

Magnetic dipole
Steady state (CW) - Ey in xz-plane

Magnetic dipole
Time domain - Ey in xz-plane

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 631

To reproduce the movies, run the associated simulation file. To create the CW field profiles, use these script
commands:
x=getdata("field_xy","x");
y=getdata("field_xy","y");
Ex=getdata("field_xy","Ex");
Ey=getdata("field_xy","Ey");
Ez=getdata("field_xy","Ez");
E2=getelectric("field_xy");
image(x*1e6,y*1e6,real(Ex),"x (um)","y (um)","real(Ex)");
image(x*1e6,y*1e6,real(Ey),"x (um)","y (um)","real(Ey)");
image(x*1e6,y*1e6,real(Ez),"x (um)","y (um)","real(Ez)");
image(x*1e6,y*1e6,E2, "x (um)","y (um)","|E|^2");

x=getdata("field_xz","x");
z=getdata("field_xz","z");
Ex=getdata("field_xz","Ex");
Ey=getdata("field_xz","Ey");
Ez=getdata("field_xz","Ez");
E2=getelectric("field_xz");
image(x*1e6,z*1e6,real(Ex),"x (um)","z (um)","real(Ex)");
image(x*1e6,z*1e6,real(Ey),"x (um)","z (um)","real(Ey)");
image(x*1e6,z*1e6,real(Ez),"x (um)","z (um)","real(Ez)");
image(x*1e6,z*1e6,E2, "x (um)","z (um)","|E|^2");

Gaussian beam
The gaussian beam source is typically used to simulate a focused beam incident on a structure. In this example we
show a beam with a numerical aperture (NA) of 0.6 focused at a point 7um in front of the source injection plane.

Simulation screenshot

2003 - 2016 Lumerical Solutions, Inc


632 Lumerical Knowledge Base

Steady state (CW) - Ey

Time domain - Ey

Steady state (CW) - |E|^2

Time domain - |E|^2

To reproduce the movies, run the associated simulation file. To create the CW field profiles, use these script
commands:
x=getdata("field","x");
y=getdata("field","y");
Ex=getdata("field","Ex");
Ey=getdata("field","Ey");
E2=getelectric("field");
image(x*1e6,y*1e6,real(Ex),"x (um)","y (um)","real(Ex)");
image(x*1e6,y*1e6,real(Ey),"x (um)","y (um)","real(Ey)");
image(x*1e6,y*1e6,E2, "x (um)","y (um)","|E|^2");

Plane wave
The plane wave source is typically used to simulate very large (approximately infinite) beams incident on periodic
structures. Periodic or Bloch boundary conditions are normally required. In this example we show a plane wave
traveling at a 30 degree angle of incidence in a 2D simulation. For more planewave source information, see the Plane
waves - Edge effects 526 page.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 633

Simulation screenshot

Steady state (CW) - Ez

Time domain - Ez

Steady state (CW) - |E|^2

Time domain - |E|^2

To reproduce the movies, run the associated simulation file. To create the CW field profiles, use these script
commands:
x=getdata("field","x");
y=getdata("field","y");
Ez=getdata("field","Ez");
E2=getelectric("field");

2003 - 2016 Lumerical Solutions, Inc


634 Lumerical Knowledge Base

image(x*1e6,y*1e6,real(Ez),"x (um)","y (um)","real(Ez)");


image(x*1e6,y*1e6,E2, "x (um)","y (um)","|E|^2");

Total Field Scattered Field (TFSF)


The TFSF source is typically used to simulate very large (approximately infinite) beams incident on finite (non-
periodic) structures. The scattering structure must be completely contained within the TFSF source. In this example
we use a TFSF to see the scattering from a cylinder in a 2D simulation. For more TFSF source information, see the
TFSF page.

Simulation screenshot

Steady state (CW) - Ez

Time domain - Ez

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 635

Steady state (CW) - |E|^2

Time domain - |E|^2

To reproduce the movies, run the associated simulation file. To create the CW field profiles, use these script
commands:
x=getdata("field","x");
y=getdata("field","y");
Ez=getdata("field","Ez");
E2=getelectric("field");
image(x*1e6,y*1e6,real(Ez),"x (um)","y (um)","real(Ez)");
image(x*1e6,y*1e6,E2, "x (um)","y (um)","|E|^2");

MODE
The MODE source is used to inject a guided mode into a device, such as a waveguide. In this example we use the
Mode source to inject a 2nd order mode into a step index fiber in a 3D simulation.

Simulation screenshot

2003 - 2016 Lumerical Solutions, Inc


636 Lumerical Knowledge Base

Steady state (CW) - Ey

Time domain - Ey

Steady state (CW) - Ez

Time domain - Ez

To reproduce the movies, run the associated simulation file. To create the CW field profiles, use these script
commands:
y=getdata("field","y");
z=getdata("field","z");
Ex=getdata("field","Ex");
Ey=getdata("field","Ey");
Ez=getdata("field","Ez");
E2=getelectric("field");
image(y*1e6,z*1e6,real(Ex),"x (um)","y (um)","real(Ex)");
image(y*1e6,z*1e6,real(Ey),"x (um)","y (um)","real(Ey)");
image(y*1e6,z*1e6,real(Ez),"x (um)","y (um)","real(Ez)");
image(y*1e6,z*1e6,E2, "x (um)","y (um)","|E|^2");

Import (custom) source


The Import source allows the user to import a custom source spatial field profile, which may be obtained from a
monitor in another simulation, or calculated analytically.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 637

Simulation screenshot

Steady state (CW) - E^2

Time domain - E^2

Steady state (CW) - Ey


Time domain - Ey

To reproduce the movies, run the associated simulation file. To create the CW field profiles, use these script
commands:
E = getresult("YZ","E");
image(E.y*1e6,E.z*1e6,real(E.Ey),"x (um)","y (um)","real(Ey)");
image(E.y*1e6,E.z*1e6,E.E2, "x (um)","y (um)","|E|^2");

5.4.3.7 Monitors (Optical)


The following types of monitors are available in Lumerical's optical solvers.

Index monitors 638

2003 - 2016 Lumerical Solutions, Inc


638 Lumerical Knowledge Base

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.

Effective index monitors 640

Effective index monitors records the effective index values as a function of frequency/wavelength in a simulation. The
geometry of effective index monitors is restricted to 2D z-normal. This monitor is only available in the varFDTD
solver.

Time-domain monitors 641

These 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.

Movie monitors 644

Movie monitors capture a desired field component over the region spanned by the monitor for the duration of the
simulation. Movie monitors are only available in the two dimensional variety (and only z-normal for propagator
simulations). The resultant movies are saved with the same name as the monitor in the current working directory.

, Frequency-domain field monitors 645

Frequency-domain field monitors collect CW, steady state EM field data in the frequency domain from an FDTD or
varFDTD simulation.

EME profile 648

Frequency-domain field monitors collect CW, steady state EM field data in the frequency domain from an EME
simulation. Very similar to the Frequency-domain field monitor.

Mode Expansion Monitors 649

Mode Expansion Monitors use overlap analysis to calculate the forward/backward propagating components of any
mode of a waveguide or fiber at an arbitrary location in the simulation region. The Mode Expansion monitor facilitates
the interoperability between FDTD Solutions and INTERCONNECT as it returns the S parameters, which can be
imported into INTERCONNECT directly.

Global Monitor Properties 658

The global monitor options window is where the user can specify the range and resolution with which to measure
frequency-domain information. These settings can be used by any of the frequency domain monitors by unchecking
the 'override global monitor settings' check box in the monitor's General tab.

5.4.3.7.1 Monitors - Refractive index

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.
In FDTD solutions, It is possible to preview the index profile while still in Layout mode (i.e. without running the
simulation). Note that the index preview returns a slightly simplified version of what the index monitor provides after
running the simulation. Some advanced settings, such as the spatial interpolation setting) will be ignored in the
preview.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 639

Tip: Computations requirements


Memory:
Index monitors generally have modest memory requirements. To minimize the amount of memory required, use 1D
or 2D rather than 3D monitors. Similarly, try to minimize the number of frequency points recorded. By default,
only one frequency point is recorded. It is also possible to use spatial downsampling to record less spatial
resolution.
Computation time:
Generally, Index monitors don't have a large effect on the simulation time, except when recording a very large
amount of data. All the index monitor data is calculated at the beginning of the simulation.

Edit monitor tabs


General tab
Simulation type: Record the type of simulation data, default setting is ALL

OVERRIDE GLOBAL MONITOR SETTINGS:


A toggle to override the global monitor settings. If checked, the user can specify the frequency range and
number of points at which frequency-domain information will be recorded (using the options described below). If
unchecked the options below are set from the global monitor settings.
USE LINEAR WAVELENGTH SPACING: By default, data is recorded at linearly spaced points with respect
to frequency. Selecting this option spaces data at linearly spaced points with respect to wavelength.
USE SOURCE LIMITS: When checked these monitors use the source limits. When 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.

set global monitor settings: Access to global properties

Geometry tab
Monitor type: The monitor type and orientation, this option will control the available of spatial settings below

X, Y, Z: The center position of the simulation region


X MIN, X MAX: X min, X max position
Y MIN, Y MAX: Y min, Y max position
Z MIN, Z MAX: Z min, Z max position
X SPAN, Y SPAN, Z SPAN: X, Y, Z span of the simulation region

The DOWN SAMPLE X, Y, Z option is used to set the spatial averaging performed on the data. A down
sample value of N corresponds to averaging over N grid points. Setting the down sample value to 1 gives the
most detailed spatial information (i.e. information at each grid point).

Advanced tab
WARNING: This tab includes options which should only be changed if you are
quite familiar with the meshing algorithm and techniques used.

SPATIAL INTERPOLATION: In FDTD generally, the electromagnetic field components and material
properties are not known at the same point in space. Instead each component of the vectorial electric and
magnetic fields are recorded at different locations in the Yee cell. Therefore, the material properties are also
known at various locations within the Yee cell. This setting controls how the index monitor calculates the
refractive index data. The SPECIFIED POSITION (Default) returns the index data where the monitor is
located. This type of data is convenient for many purposes, but it is important to remember that the actual
FDTD engine calculates the fields at locations other than the Yee cell origin. The NEAREST MESH CELL
option is very similar, but the monitor location is snapped to the nearest mesh cell. The NONE option
records the index data at the locations actually used by the FDTD engine.
Note: Spatial interpolation - NONE setting

2003 - 2016 Lumerical Solutions, Inc


640 Lumerical Knowledge Base

Disabling the spatial interpolation is a very advanced feature. Only expert users that are very familiar with
the FDTD method should consider using this feature. Most standard analysis functions (such as the
transmission script function, the data visualizer, etc) assume that the spatial interpolation is enabled.
They may not give the most accurate result when used to analyze such monitor data. All analysis must be
done manually.
RECORD DATA WITHIN PML: This option is as described above for time domain monitors.
RECORD CONFORMAL MESH WHEN POSSIBLE: Enabled by default. The index monitor will record the
the effect of the conformal mesh. It is helpful to disable this option when doing absorption calculations. The
conformal mesh information can only be recorded when using the 'NEAREST MESH CELL' or 'NONE' spatial
interpolation setting, and when the spatial downsampling option is set to 1.
RECORD SURFACE CONDUCTIVITY: Disabled by default. The index monitor will record the surface
conductivity which is used in the simulation and return this as the SURFACE CONDUCTIVITY result. This
may be used if you want to record the surface conductivity components over space when using SPECIFIED
POSITION, or NONE as the spatial interpolation option.

Results returned
Results
INDEX PREVIEW: Refractive index as a function of position and frequency/wavelength before the simulation
runs. It is important to note that the preview data is not exactly the same as the data returned after the
simulation runs. Some advanced settings, such as spatial interpolation options and conformal meshing are
ignored when calculating the index preview.
INDEX: Refractive index as a function of position and frequency/wavelength.
SURFACE CONDUCTIVITY PREVIEW: Surface conductivity as a function of position and frequency/
wavelength before the simulation runs. This is useful tool to make sure the graphene object is positioned as
desired.
SURFACE CONDUCTIVITY: This will return the same result as the surface conductivity preview by default. If
the RECORD SURFACE CONDUCTIVITY option under the ADVANCED TAB is enabled, this will instead
return the surface conductivity used in the simulation which will include the effect of the selected spatial
interpolation option.

5.4.3.7.1.1 Monitors - EME index

Edit monitor tabs


Geometry tab
Monitor type: The monitor type and orientation, this option will control the available of spatial setting below

X, Y, Z: The center position of the simulation region


X MIN, X MAX: X min, X max position
Y MIN, Y MAX: Y min, Y max position
Z MIN, Z MAX: Z min, Z max position
X SPAN, Y SPAN, Z SPAN: X, Y, Z span of the simulation region

5.4.3.7.1.2 Monitors - Effective index (varFDTD)

Effective index monitors


Effective index monitors records the effective index values as a function of frequency/wavelength in a simulation. The
geometry of effective index monitors is restricted to 2D z-normal.

Note that time monitors in propagator simulations cannot have any dimensions that allow for a non-zero z-span.

This monitor is only available in the 2.5D FDTD solver.

Edit monitor tabs

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 641

General tab
OVERRIDE GLOBAL MONITOR SETTINGS:
A toggle to override the global monitor settings. If checked, the user can specify the frequency range and
number of points at which frequency-domain information will be recorded (using the options described below). If
unchecked the options below are set from the global monitor settings.
USE LINEAR WAVELENGTH SPACING: By default, data is recorded at linearly spaced points with respect
to frequency. Selecting this option spaces data at linearly spaced points with respect to wavelength.
USE SOURCE LIMITS: When checked these monitors use the source limits. When 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.

set global monitor settings: Access to global properties

Geometry tab
Monitor type: The monitor type and orientation, this option will control the available of spatial setting below

X, Y, Z: The center position of the simulation region


X MIN, X MAX: X min, X max position
Y MIN, Y MAX: Y min, Y max position
Z MIN, Z MAX: Z min, Z max position
X SPAN, Y SPAN, Z SPAN: X, Y, Z span of the simulation region

The DOWN SAMPLE X, Y, Z option is used to set the spatial averaging performed on the data. A down
sample value of N corresponds to averaging over N grid points. Setting the down sample value to 1 gives the
most detailed spatial information (i.e. information at each grid point).

Advanced tab
WARNING: This tab includes options which should only be changed if you are
quite familiar with the meshing algorithm and techniques used.

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.
RECORD DATA WITHIN PML: This option is as described above for time domain monitors.
RECORD CONFORMAL MESH WHEN POSSIBLE: Enabled by default. The index monitor will record the
the effect of the conformal mesh. It is helpful to disable this option when doing absorption calculations.

5.4.3.7.2 Monitors - Field time

Time-domain monitors
These 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: Computations requirements


Memory:
Time domain field monitors can require large amounts of memory when recording data over a large spatial domain.
When possible, use 1D rather than 2D or 3D monitors. Similarly, you can reduce the duration of time where data
is recorded. Temporal down sampling is also used to minimize the amount of data collected. Finally, it is possible
to control which field components are recorded on the Data to record tab.
Computation time:
Generally, time monitors don't have a large effect on the simulation time.

2003 - 2016 Lumerical Solutions, Inc


642 Lumerical Knowledge Base

Edit monitor tabs


General tab
The general tab for the time domain monitor includes options to edit the amount of data, and time period over
which data is collected.

Simulation type: Record the type of simulation data, default setting is ALL

Stop method
End of simulation, Choose stop time, choose number of snapshots
Start time: The time to start recording
Stop time: The time to stop recording, choose stop time option
number of snapshots: the number of time step to record, related to the dt setting in mesh settings tab 414

Geometry tab
Monitor type: The monitor type and orientation, this option will control the available of spatial setting below

X, Y, Z: The center position of the simulation region


X MIN, X MAX: X min, X max position
Y MIN, Y MAX: Y min, Y max position
Z MIN, Z MAX: Z min, Z max position
X SPAN, Y SPAN, Z SPAN: X, Y, Z span of the simulation region

The DOWN SAMPLE X, Y, Z option is used to set the spatial averaging performed on the data. A down
sample value of N corresponds to averaging over N grid points. Setting the down sample value to 1 gives the
most detailed spatial information (i.e. information at each grid point).

Data to record tab


OUTPUT EX, EY, EZ, HX, HY, HZ, PX, PY, PZ: A set of fields with which the user can select what field
components (EX, EY, EZ, HX, HY, HZ) or Poynting vector (PX, PY, PZ) to measure. In 2D simulations, only
some components are non-zero (i.e. only EX, EY, and HZ are applicable for TE simulations). All the field
quantities remain active to facilitate easy change between TE and TM simulations.
OUTPUT POWER: For surface monitors (3D) and line monitors (2D) only. You can calculate the integrated
power over the monitor surface. This requires much less memory after the simulation is completed and is
particularly suitable for large parallel simulations where only the integrated power across a surface is
required.
PLUGIN MATERIAL: For point monitors only. When a plugin material is used in a simulation, the time
monitor can return the storage fields if the material is chosen. Note: the point monitor has to be placed in
the object that uses this plugin material in order to return meaningful storage fields.

Advanced tab
WARNING: This tab includes options which should only be changed if you are
quite familiar with the meshing algorithm and techniques used.

SPATIAL INTERPOLATION: In FDTD generally, the electromagnetic field components are not recorded at
the same point in space. Instead each component of the vectorial electric and magnetic fields are recorded
at different locations in the Yee cell. In order to properly calculate the Poynting vector and electromagnetic
energy density, the fields are interpolated to the same location in the Yee cell. This setting controls how the
fields are interpolated. The options for time monitors are NEAREST MESH CELL (Default) and NONE. With
NEAREST MESH CELL, the fields are interpolated to the nearest FDTD mesh cell boundary. With NONE,
no interpolation is performed and each electromagnetic field component is recorded at a different position
within the Yee cell.
Note: Spatial interpolation - NONE setting

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 643

Disabling the spatial interpolation is a very advanced feature. Only expert users that are very familiar with
the FDTD method should consider using this feature. Most standard analysis functions (such as the
transmission script function, the data visualizer, etc) assume that the spatial interpolation is enabled.
They may not give the most accurate result when used to analyze such monitor data. All analysis must be
done manually.
RECORD DATA WITHIN PML: Collect monitor data within the PML boundary condition region. This is a very
advanced option that should rarely be used. Contact Lumerical support before enabling this option. The
simulation region - EXTEND STRUCTURE THROUGH PML option must be disabled when using this option.
MIN SAMPLING PER CYCLE: This parameter determines the minimum amount of sampling per optical
cycle that can be used. By default, it is set at 10.
SAMPLING RATE: The actual sampling rate in Hz.
DOWN SAMPLE TIME: This is the time step downsampling.

Results returned
Results
E: Electric field data as a function of position and time.
H: Magnetic field data as a function of position and time.
P: Poynting vector as a function of position and time.
SPECTRUM: The fourier transform of the electric and magnetic fields as a function of position and
frequency/wavelength.
Manual calculation of SPECTRUM result
The following code can be used to manually calculate the spectrum data (eg. if it is necessary to adjust the
frequency range of the data).
# this code can be used to manually calculate the
# spectrum result from time monitor data

# get E/H time domain fields


E = getresult("monitor","E");
H = getresult("monitor","H");

# user can specify frequency range of interest


f = linspace(50e12,1000e12,10000);

# calculate czt of time domain data


Exw = czt(pinch(E.Ex),E.t,2*pi*f);
Eyw = czt(pinch(E.Ey),E.t,2*pi*f);
Ezw = czt(pinch(E.Ez),E.t,2*pi*f);
Hxw = czt(pinch(H.Hx),H.t,2*pi*f);
Hyw = czt(pinch(H.Hy),H.t,2*pi*f);
Hzw = czt(pinch(H.Hz),H.t,2*pi*f);

# package results into a dataset


spectrum = rectilineardataset("spectrum",E.x,E.y,E.z);
spectrum.addparameter("lambda",c/f,"f",f);
spectrum.addattribute("E",Exw,Eyw,Ezw);
spectrum.addattribute("H",Hxw,Hyw,Hzw);

# visualize dataset
visualize(spectrum);

Note: Plugin material - storage fields


For point monitors inside an object that uses a plugin material, the data in the storage fields can be found
in the rawdata returned by the monitor (see below).

2003 - 2016 Lumerical Solutions, Inc


644 Lumerical Knowledge Base

Rawdata
POWER: Instantaneous power as a function of time. This data is only returned when surface monitor (3D
simulation) or line monitor (2D simulation) is used, with the "output power" option checked in the Data to
record tab. For more information or an example using this data, see Parseval's theorem 125 .
STORAGE_FIELDS: Only for plugin materials. Extra data is available if the storage field is properly specified
in the .cpp file when the material is complied. The software automatically chooses the x,y,z-direction where
the fields are meaningful to show. For more information, see plugin material 243 .

5.4.3.7.3 Monitors - Movie

Movie monitors
Movie monitors capture a desired field component over the region spanned by the monitor for the duration of the
simulation. Movie monitors are only available in the two dimensional variety (and only z-normal for propagator
simulations). The resultant movies are saved with the same name as the monitor in the current working directory.

Tip: Computations requirements


Memory:
Movie domain field monitors usually require modest amounts of memory. To reduce the memory requirements,
reduce the output movie resolution.
Computation time:
Movie monitors can have a large effect on the simulation time. Consider disabling your movie monitors to increase
the simulation speed.

TIP: CW Movies
It is possible to create a CW movie from profile or power monitor data. For more information, see the User Guide -
Data Analysis section 870 of the online Knowledge Base.

Edit monitor tabs


General tab
Simulation type: Record the type of simulation data, default setting is ALL

HORIZONTAL RESOLUTION: The horizontal width of the final movie, in pixels.


VERTICAL RESOLUTION: The vertical height of the final movie, in pixels.
SCALE: A dimensionless variable which defines how to scale the capture of the field data, with the tendency
that a scale factor too small will result in saturation of the movie, while a scale factor too large will result in
very faint radiation patterns. This parameter may not be less than zero. Tip: for Gaussian pulses, this is best
set to unity. For dipole sources, it is typically on the order of 0.01 to 0.05. The monitor outputs its maximum
intensity at the end of the simulation in the variable Monitor Name_maxI. Setting the scale factor to Monitor
Name_maxI and rerunning the simulation will result in a perfectly scaled movie.
DRAW STRUCTURE OUTLINE: A toggle which allows the user to superimpose an outline of the refractive
index profile on top of the movie. This can be used to aid in visualization of where the radiation is located
within the dielectric structure.
TM, TE FIELD COMPONENT: 2D simulations. The field component to be captured in the movie. The
choices depend on whether a TE or TM simulation is being performed, as set out in the FDTD simulation
region. If a TM simulation is being performed, the TM field component is captured to the movie, whereas if a
TE simulation is being performed, the TE field component is captured. Can also be ELECTRIC FIELD
INTENSITY (|E|2) or MAGNETIC FIELD INTENSITY (|H|2).
FIELD COMPONENT: 3D simulations. The field component to be captured in the movie. Can also be
ELECTRIC FIELD INTENSITY (|E|2) or MAGNETIC FIELD INTENSITY (|H|2).

Geometry tab
Monitor type: The monitor type and orientation, this option will control the available of spatial setting below

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 645

X, Y, Z: The center position of the simulation region


X MIN, X MAX: X min, X max position
Y MIN, Y MAX: Y min, Y max position
Z MIN, Z MAX: Z min, Z max position
X SPAN, Y SPAN, Z SPAN: X, Y, Z span of the simulation region

Advanced tab
WARNING: This tab includes options which should only be changed if you are
quite familiar with the meshing algorithm and techniques used.

MIN SAMPLING PER CYCLE: This parameter determines the desired amount of 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.
RECORD DATA WITHIN PML: This option is as described above for time domain monitors.

Results returned
Results
A movie file (.mpg) named after the simulation file name is generated. The file can be found in the same
directory as the simulation file. To view the movie, use a 3rd party movie player such as Windows Media
Player.

5.4.3.7.4 Monitors - Frequency-domain field profile

, Frequency-domain field monitors ('Field profile' and 'Field and


power')
Frequency-domain field monitors collect the field profile in the frequency domain from simulation results across
some spatial region within the simulation in the FDTD, varFDTD solvers.
Note: There are two very similar types of frequency domain field monitors: 'Frequency domain field profile' and
'Frequency domain field and power' monitors. These monitors are identical except for one advanced setting (the
spatial interpolation setting). In most situations, we recommend using the 'field and power' monitor. This monitor
'snaps' to the nearest mesh cell, which minimizes the amount of interpolation required, generally leading to more
accurate data. The 'profile' monitor does not snap to the nearest mesh cell. Instead, it records the data exactly
where the monitor was located. This can be useful in a few situations, but the extra interpolation required can slightly
reduce the accuracy of the data.

Tip: Computations requirements


Memory:
Frequency domain field monitors can require large amounts of memory when recording data over a large spatial
domain. When possible, use 1D or 2D rather than 3D monitors. Similarly, try to minimize the number of
frequency points recorded. It is also possible to use spatial downsampling to record less spatial resolution.
Finally, it is possible to control which field components are recorded on the Data to record tab. If you are only
interested in the power flux, you can select the OUTPUT POWER and disable everything else.
Computation time:
Generally, frequency monitors don't have a large effect on the simulation time, except when recording a very large
amount of data. To determine the effect on the simulation speed, simply disable the monitor and re-run the
simulation.

Edit monitor tabs


General tab

2003 - 2016 Lumerical Solutions, Inc


646 Lumerical Knowledge Base

Simulation type: Record the type of simulation data, default setting is ALL

OVERRIDE GLOBAL MONITOR SETTINGS:


A toggle to override the global monitor settings. If checked, the user can specify the frequency range and
number of points at which frequency-domain information will be recorded (using the options described below). If
unchecked the options below are set from the global monitor settings.
USE LINEAR WAVELENGTH SPACING: By default, data is recorded at linearly spaced points with respect
to frequency. Selecting this option spaces data at linearly spaced points with respect to wavelength.
USE SOURCE LIMITS: When checked these monitors use the source limits. When 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.

set global monitor settings: Access to global properties

Geometry tab
Monitor type: The monitor type and orientation, this option will control the available of spatial setting below

X, Y, Z: The center position of the simulation region


X MIN, X MAX: X min, X max position
Y MIN, Y MAX: Y min, Y max position
Z MIN, Z MAX: Z min, Z max position
X SPAN, Y SPAN, Z SPAN: X, Y, Z span of the simulation region

The DOWN SAMPLE X, Y, Z option is used to set the spatial averaging performed on the data. A down
sample value of N corresponds to averaging over N grid points. Setting the down sample value to 1 gives the
most detailed spatial information (i.e. information at each grid point).

Data to record tab


STANDARD FOURIER TRANSFORM: The monitor outputs data at specific frequencies.
PARTIAL SPECTRAL AVERAGE:The monitor outputs the partial spectral average power through a monitor
surface, normalized to the partial spectral average of the source.
TOTAL SPECTRAL AVERAGE: The monitor outputs the total spectral average power through a monitor
surface, normalized to the total spectral average of the source.
OUTPUT EX, EY, EZ, HX, HY, HZ, PX, PY, PZ: A set of fields with which the user can select what field
components (EX, EY, EZ, HX, HY, HZ) or Poynting vector (PX, PY, PZ) to measure. In 2D simulations, only
some components are non-zero (i.e. only EX, EY, and HZ are applicable for TE simulations). All the field
quantities remain active to facilitate easy change between TE and TM simulations.
OUTPUT POWER: For surface monitors (3D simulation) and line monitors (2D simulation) only. You can
calculate the integrated power over the monitor surface. This requires much less memory after the
simulation is completed and is particularly suitable for large parallel simulations where only the integrated
power across a surface is required.

Spectral averaging and apodization


PARTIAL SPECTRAL AVERAGING, DELTA: FWHM of the Lorentzian weighting function.
APODIZATION: Specifies the window function of the apodization. Options include none, start (i.e. beginning
of time signature apodized), end (i.e. end of time signature apodized, or full (i.e. both start and end). Note
that apodization will, in general, invalidate any source normalization performed and is therefore not suitable
for accurate power measurements.
APODIZATION CENTER, TIME WIDTH, FREQ WIDTH: See the diagram below for the definition of these
terms. The FREQ WIDTH corresponds to the effective bandwidth of the full apodization window, as
described under APODIZATION.

Note: Apodization functions

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 647

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.

For more information, please visit apodization 660 .

Advanced tab
WARNING: This tab includes options which should only be changed if you are
quite familiar with the meshing algorithm and techniques used.

SPATIAL INTERPOLATION: In FDTD generally, the electromagnetic field components are not recorded at
the same point in space. Instead each component of the vectorial electric and magnetic fields are recorded
at different locations in the Yee cell. In order to properly calculate the Poynting vector and electromagnetic
energy density, the fields are interpolated to the same location in the Yee cell. This setting controls how the
fields are interpolated. With NEAREST MESH CELL option (default for 'field and power' monitors), the fields
are interpolated to the nearest FDTD mesh cell boundary. With SPECIFIED POSITION option (default for
'profile' monitors), the fields are recorded exactly where the monitor is located. With NONE, no interpolation
is performed and each electromagnetic field component is recorded at a different position within the Yee
cell.
Note: Spatial interpolation - NONE setting
Disabling the spatial interpolation is a very advanced feature. Only expert users that are very familiar with
the FDTD method should consider using this feature. Most standard analysis functions (such as the
transmission script function, the data visualizer, etc) assume that the spatial interpolation is enabled.
They may not give the most accurate result when used to analyze such monitor data. All analysis must be
done manually.
RECORD DATA WITHIN PML: Collect monitor data within the PML boundary condition region. This is a very
advanced option that should rarely be used. Contact Lumerical support before enabling this option. The
simulation region - EXTEND STRUCTURE THROUGH PML option must be disabled when using this option.

Sampling frequency
OVERRIDE ADVANCED GLOBAL MONITOR SETTINGS: When this option is selected MIN SAMPLING PER
CYCLE can be set. The other options cannot be altered, they are there to display settings.
MIN SAMPLING PER CYCLE: This parameter determines the minimum amount of sampling per optical
cycle that can be used. By default, it is set at 2 (the Nyquist limit) for optimum efficiency.
DESIRED SAMPLING: This converts the minimum points per optical cycle into an actual sampling rate in
Hz.
NYQUIST LIMIT: The Nyquist sampling limit is calculated based on the maximum frequencies that may be
present in the simulation volume.
ACTUAL SAMPLING: The actual sampling rate is the rate that will actually be used for 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.

Results returned

2003 - 2016 Lumerical Solutions, Inc


648 Lumerical Knowledge Base

Results
E: Electric field data as a function of position and frequency/wavelength.
H: Magnetic field data as a function of position and frequency/wavelength.
P: Poynting vector as a function of position and frequency/wavelength.
T: Transmission as a function of frequency/wavelength.
FARFIELD: Farfield data can be obtained. For more information, see Far field projections 126 .

Rawdata
POWER: Time averaged power as a function of frequency. This data is only returned when surface monitor
(3D simulation) or line monitor (2D simulation) is used. For more information or an example using this data,
see Parseval's theorem 125 .

5.4.3.7.5 Monitors - EME profile

EME profile monitor


EME profile monitors collect the field profile in the frequency domain from simulation results across some spatial
region within an EME solver simulation.

Tip: Computational requirements


Memory:
EME profile monitors have modest memory requirements. The EME profile monitor data is calculated after the
main simulation runs, in analysis mode.
Computation time:
EME monitors do not affect the simulation run time. The monitor data is calculated when the fields are propagated
in analysis mode. The propagation time may increase due to the presence of monitors, especially for 3D monitors
with high resolution. Users have the option to not update monitors during propagation by unselecting the "update
monitors" checkbox in the EME solver analysis 774 window.

Warning: Cell group periodicity and EME profile monitors


EME field profile monitors should not be used with the Cell group periodicity feature. EME profile monitors will not
correctly reconstruct the field profile when Cell group periodicity is used.

Edit monitor tabs


General tab
SAVE DATA: The field data as a function of position will be saved as a .mat file with the specified file name.

Geometry tab
Monitor type: The monitor type and orientation, this option will control the available of spatial setting below

X, Y, Z: The center position of the simulation region


X MIN, X MAX: X min, X max position
Y MIN, Y MAX: Y min, Y max position
Z MIN, Z MAX: Z min, Z max position
X SPAN, Y SPAN, Z SPAN: X, Y, Z span of the simulation region

X RESOLUTION: Resolution of the monitor in x direction, 100 by default. This number can be changed in the
analysis mode, but will need eme propagate to take effect.

Results returned
Results
field profile: The Electric and Magnetic field data as a function of position.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 649

5.4.3.7.6 Monitors - Mode expansion

Mode Expansion Monitors


Mode Expansion Monitors use overlap analysis to calculate the forward/backward propagating components of any
mode of a waveguide or fiber at an arbitrary location in the simulation region. The Mode Expansion monitor facilitates
the interoperability between FDTD Solutions and INTERCONNECT as it returns the S parameters, which can be
imported into INTERCONNECT directly. For more information on using this monitor, please refer to the page on
using the mode expansion monitor 651 .

Edit monitor tabs


Geometry tab
Monitor type: The monitor type and orientation, this option will control the available of spatial setting below

X, Y, Z: The center position of the simulation region


X MIN, X MAX: X min, X max position
Y MIN, Y MAX: Y min, Y max position
Z MIN, Z MAX: Z min, Z max position
X SPAN, Y SPAN, Z SPAN: X, Y, Z span of the simulation region

The DOWN SAMPLE X, Y, Z option is used to set the spatial averaging performed on the data. A down
sample value of N corresponds to averaging over N grid points. Setting the down sample value to 1 gives the
most detailed spatial information (i.e. information at each grid point).

Mode expansion tab

The Mode Expansion tab contains two main sections.


The "Mode calculation" section allows users to select
a mode (or a set of modes) to expand the input profile
with. The "Monitors for expansion" section allows
users to choose a field profile from an arbitrary monitor
in the simulation to expand. For more information on
this expansion calculation, and the results that are
returned, see Using Mode Expansion Monitors 651 .

Mode Calculation
General
MODE SELECTION: Allows users to select the modes to use for the mode expansion calculation. The "user
select" option launches the eigenmode solver where the user can calculate and visualize the supported
modes (see Mode analysis 570 ); use this option to select multiple modes.

Following the "mode selection" combo box is a frame for choosing the frequencies to calculate the modes for.
Note that this does not have to correspond to the frequency points for the monitors in the "Monitors for

2003 - 2016 Lumerical Solutions, Inc


650 Lumerical Knowledge Base

expansion" table. The mode expansion monitor will automatically perform the necessary interpolation between
different frequency points.

OVERRIDE GLOBAL MONITOR SETTINGS: A toggle to override the global monitor settings. If checked, the
user can specify the frequency range and number of points at which the modes will be calculated at (using
the options described below). If unchecked, the options below are set from the global monitor settings.
USE LINEAR WAVELENGTH SPACING: By default, modes are calculated at linearly spaced points with
respect to frequency. Selecting this option spaces the points with respect to wavelength.
USE SOURCE LIMITS: When checked these monitors use the source limits. When 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 calculate the modes.

SELECT MODE: If the "user selected" option has been chosen, this will bring up the Mode analysis tab 570
for the user select from a calculated list of modes.
VISUALIZE MODE DATA: This will bring up the Visualizer, showing all the profiles for the selected modes.
CLEAR MODE DATA: Clears all the mode data.

Rotations
This frame allows user to apply an arbitrary rotation to the calculate modes.
THETA: The angle of propagation, measured in degrees, with respect to the normal axis.
PHI: The angle of propagation, in degrees, rotated about the normal axis in a right-hand context.
OFFSET: Allows users to set an offset to the plane where the modes are calculated. This is useful for
ensuring that monitors at an angle do not intersect with unwanted structures.

Note:
For best accuracy, we should place mode expansion monitors with rotations on a mesh cell. A useful
approach is to add an override mesh region at the same position of the mode expansion monitor, and this
override region can be infinitely thin (i.e., one of the spans can be 0).

Advanced
AUTO UPDATE BEFORE ANALYSIS: If checked, the monitor will automatically update the chosen modes
when "user select" in MODE SELECTION is selected. The monitor will find the best overlap between the
chosen modes and the currently calculated modes, if there are a new set of modes. This allows users to
keep track of the same chosen modes even the mode orders are switched, for example, when running a
Parameter sweep over the waveguide width. This checkbox can be unselected but it has no effect if
"fundamental mode", "fundamental TE mode" or "fundamental TM mode" is chosen in the MODE
SELECTION dropdown list.
ALIGN TO FREQUENCY MONITOR CENTER:
o By default, it is unchecked. In some cases, aligning to the center can lead to incorrect expansion when a
monitor is offset. By unchecking this option, it performs the overlap calculation without aligning the center
of the mode expansion monitor with the center of the frequency monitor. This feature is useful when a
monitor, or both expansion and frequency monitor, is offset. For the best practice, when expanding the
fields from a single frequency monitor, it is recommended to leave this unchecked and also to align the
mode expansion monitor precisely with the frequency monitor that will be expanded, and with the center of
the waveguide.
o If checked, the center of the mode expansion monitor will be laterally shifted to align with the center of the
frequency monitor when the expansion is calculated. This makes it possible to use the same mode
expansion monitor for the expansion of modes on different waveguides that are laterally offset. For
example, using one mode expansion monitor to expand the modes in multiple channels that are laterally
offset (e.g., drop and through) in a ring resonator 2021 simulation. It is recommended to place all monitors at
the centers of the waveguides accordingly to avoid incorrect expansion. This shift does not add additional
phase to the expansion.

Monitors for expansion


After the modes have been selected, the next step is to choose the monitor with the input field profile. The

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 651

"Add" and "Remove" buttons on the side can be used to add/remove monitors, and users can choose the
desired monitor from the monitor drop down list. See the getting Ring resonator 2033 getting started example for
an example that uses mode expansion monitor.

Advanced setup tips for best results


Ensure expansion monitor and frequency monitor have the same span.
When using the rotation option, ensure the expansion monitor and frequency monitor have the same span
and center position.
The expansion monitor can be used with both 'Frequency domain power' and Frequency domain field and
profile' monitors, but power monitors will give slightly more accurate results.
For most accurate results, particularly with respect to phase measurements, ensure the expansion and
frequency monitor are located exactly on a mesh point. To ensure the monitors are located at a mesh point,
use a mesh override region to enforce alignment; set dx to slightly smaller than the current dx that is used
and set the span of the mesh override to 2*dx. Align the monitors with the center of the mesh override.

Results returned
Modes
NEFF: Effective index as a function of selected mode and frequency/wavelength is returned.
MODE PROFILES: Mode profiles (E, H, and index) as a function of position and frequency/wavelength.

Modal expansions
EXPANSION FOR: A set of expansion results are returned for each input monitor specified under "Monitors
for expansion". Each set of result contains Ttotal, Tforward,Tbackward, Tnet, a,b, N, and P. Please see the
Using Mode Expansion Monitors 651 page for more information.

5.4.3.7.6.1 Using Mode Expansion Monitors

Objective
Mode expansion monitors are very useful for analyzing the fraction of power transmitted into any mode(s) of a
waveguide or fiber. The results of mode expansion monitors contain the necessary information for interfacing
between component level simulations and circuit level simulations. They are available in FDTD Solutions 8.0+ and
MODE Solutions 6.0+.

Associated files
expansion1.fsp
expansion2.fsp
expansion2.lsf
See also
Mode Expansion 649
Ring Resonator Tutorial
2020

Silicon Photonics:
Components, Circuits
and Systems
Grating Coupler S-
Parameters 2D 2076
Grating Coupler S-
Parameters 3D 2091
Relevant script
commands
addmodeexpansion
1551

setexpansion 1587
removeexpansion

2003 - 2016 Lumerical Solutions, Inc


652 Lumerical Knowledge Base

1587

What is mode expansion


r r
jm Em Hm
Given a waveguide/fiber that supports a set of modes (with and ). If a complete basis state of
modes is known, any input field can be expanded using these modes:
r r r
(
Ein = am Emforward + bm Embackward )
m
r r forward r backward
H in = (a m H m + bm H m )
m

am bm
and represent the complex transmission coefficient of the forward and backward propagating waves
j m j n = N m d mn
respectively. If we assume orthogonality , then the coefficients for any mode m can be
determined from the overlap integrals:
r r r
0.5 * dS Ein H m* = (am + bm )N m
r r r
0.5 * dS Em* H in = (am - bm )N m*

r
Ein
This is the basic concept behind mode expansion monitors. The user can specify an arbitrary input field
r r r
H in Em Hm
and (recorded by a frequency monitor), and modal fields and (by a mode expansion monitor).
The mode expansion monitor will return the following results:
r r r r r* r
dS Ein H m* d S Em H in
am = 0.25*
+

Nm Nm

r r r* r r* r
dS Ein H m
bm = 0.25*
-
dS Em H in
Nm Nm

r r r*
N m = 0.5* dS Em H m
r r r
Pin = 0.5* dS Ein H in*

N P
where m is the power of the mode m in the waveguide, and in is the total input power (in Watt) recorded
by the frequency monitor.

Note: These equations only apply to the ideal case. In practice, since an FDTD simulation uses a mesh,
a correction step is necessary to account for the grid dispersion from this discrete mesh. This correction
factor is taken into account in the mode expansion monitor built-in analysis. In the limit where the mesh
size gets very very small, these equations will give the same results as the mode expansion monitor with
the built-in correction.

How to set up mode expansion monitors


The mode expansion monitor must be placed over the cross section of the waveguide/fiber that supports the
modal fields. The monitors that are being expanded by the mode expansion monitor must also be placed over
the same cross section. Once this is done, the Mode Expansion tab can be used to select the input profiles (

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 653

r r r r
Ein H in Em H m
, ), and the modal fields ( , ). For a description on the individual settings in this tab, see Mode
Expansion 649 .

Modal Fields
When you edit mode expansion monitor, the Mode calculation section is for selecting the modal fields for this
expansion. The fundamental mode is sufficient for most cases, but if you would like to calculate the expansion
coefficient for multiple modes, select user select from the drop down menu, and then click on Select Mode.
This will bring up the mode solver and you can choose any mode(s) for this calculation from the mode list. You
may also want to use more than 1 frequency points if the component has a wide operation bandwidth.

2003 - 2016 Lumerical Solutions, Inc


654 Lumerical Knowledge Base

Input profiles
We use a frequency monitor as the input profile (the profile to be expanded). The Monitors for expansion
section allows users to choose the monitors that contain the input profiles. In the example below, four input
profiles have been selected (corresponding to each port of the ring resonator). This means that 4 sets of
expansion coefficients will be available in the Mode Expansion 651 's results section.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 655

What do the results mean


The results that can be obtained from a mode expansion monitor is shown in the screen shot below:

A set of expansion results will be available for each input monitor specified under "Monitors for expansion".
Each set of result contains:

2003 - 2016 Lumerical Solutions, Inc


656 Lumerical Knowledge Base

T_total the total transmission of the input profile. This will be the same as the result obtained with the
transmission script command. It's important to notice that the Transmission values are
normalized to the power injected by the source.
T_forwar the forward (the direction of the positive coordinate axis) transmission into the selected modal
d field(s). If more than 1 mode had been selected under "Mode calculation", the result will be an
array containing the forward transmission into each mode.
T_backw the backward (the direction of the negative coordinate axis) transmission into the selected modal
ard field(s)
T_Net the net transmission into the selected modal field(s)
a complex transmission coefficient of the forward propagating waves, of the selected model field(s)
b complex transmission coefficient of the backward propagating waves, of the selected model
field(s)
N the power of the mode m in the waveguide, based on the peak modal |E|^2 =1 in w2, this power
changes with the area of the modal field.
P the total input power recorded by the frequency monitor, in Watt.

Note: No results returned


If no results are returned in the mode expansion monitor, the most likely cause is that no "Monitors for
expansion" have been selected, or that they are of the wrong type (ex. if they do not have the right
dimensions or surface normal).

Interpreting the results


Often, we are only interested in a single waveguide cross section and a single mode. In this case, it is very
straight forward to interpret the expansion results. For example, in expansion1.fsp, we have a very simple
set up with a mode source injected into a dielectric waveguide.

2 N
T forward = a ~1
In this case, we have
sourcepower (ie. the forward transmission into the fundamental
2 N
Tbackward = b ~0
mode of the waveguide) and
sourcepower for the "T" monitor in front of the source. For

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 657

T forward = Tbackward = 0
the "R" monitor behind the source, we have , since there are no reflections in this
setup.

However, if you have multiple waveguide cross section geometries in the simulation (ex. Grating Coupler 2076 ),
or if you are expanding the fields using a different mode than what was injected by the source, the
interpretation is less obvious. The reason is because when the mode expansion monitor is calculating the
modal fields of the structure, the mode amplitude is arbitrary and the fields are simply scaled such that the
peak |E|^2 value is 1 with a phase of 0. One consequence of this scaling is that the amount of power in each
mode can be different. For example, a mode with a larger spatial size will tend to carry more power than a
smaller mode, simply because they have the same peak intensity but are different in size. This power, N, can
be calculated by integrating the Poynting vector of the modal fields. In some situation, N can be larger than the
input power P. The reason is that N is calculated based on the peak modal |E|^2 =1 in w2, so N increases with
the cross-sectional area of w2.

For example, in expansion2.fsp, the fundamental mode at the narrow waveguide (w1) is used as the
source, and we want to study the transmission into the wide waveguide (w2).

When the mode source injects the fundamental mode into w1 at the injection plane (with a peak amplitude of 1
V/m and a phase of 0), it will inject a fixed amount of power in Watts, which we can calculate from the
sourcepower 1601 function. An expansion monitor "Exp" and a field monitor "T" has been set up in w2 that will
be used to study the transmission into the wide waveguide. Since the expansion monitor is positioned in w2, it
will expand the fields based on the fundamental mode of w2, which is different than the mode injected by the
source. Again, the peak amplitude of the mode from the expansion monitor will be normalized to 1 V/m. The
expansion monitor then calculates a , which is the overlap integral between the fields recorded by "T" and the
mode profile from "Exp". However, the raw value a is not meaningful because the normalization applied to the
mode from the expansion monitor is completely arbitrary. What we need to do is to normalize away the fact
that the different modes contain different amounts of power.

The fraction of power transmitted into the fundamental mode of w2 is actually:


2
aout N out
T forward
= 2
ain N in

aout
where is the arbitrary complex transmission coefficient of the selected mode in w2,
ain
is the complex transmission coefficient of the selected mode in w1,

2003 - 2016 Lumerical Solutions, Inc


658 Lumerical Knowledge Base

N out
is the power contained in the selected mode in w2, and
N in
is the power contained in the selected mode in w1,
2
aout N out
is the actual forward transmitted power that the selected mode carries in w2.

N out
Ie. the coupling coefficients must be scaled by the power for each mode. is returned as a result for
N in ain
"Exp", and can be obtained from the sourcepower 1601 command (and equals 1). The equation above
becomes:

2
aout N out
Sourcepower

The script expansion2.lsf calculates this value, and as expected, this is exactly what the result "T
forward" from the expansion monitor returns.

Parameter extraction
The mode expansion monitors makes it very easy to extract the complex transfer function of an element.
These results contain the necessary amplitude and phase information, which serves as the interface between
the physics-based, component level simulations and the system/circuit level simulations that involve multiple
components in arbitrarily complex configurations. This parameter extraction process is relatively easy for
single mode waveguides, but can also be extended to multi-mode systems. For a step-by-step tutorial on how
to carry out this process, see the Ring Resonator Tutorial in FDTD Solutions and MODE Solutions 2020 .

For a good introduction on how to incorporate component level details into circuit level simulations (with
Lumerical's INTERCONNECT), please see the following video: Silicon Photonics: Components, Circuits and
Systems

5.4.3.7.7 Monitors - Global properties

Global Monitor Properties


The global monitor options window is where the user can specify the range and resolution with which to measure
frequency-domain information. These settings can be used by any of the frequency domain monitors by unchecking
the 'override global monitor settings' check box in the monitor's General tab.

Edit monitor tabs


Frequency Power/Profile tab
This tab only appears for the global monitor settings, but includes the same options as the general tab does
for frequency domain power and profile monitors.
USE LINEAR WAVELENGTH SPACING: By default, data is recorded at linearly spaced points with respect
to frequency. Selecting this option spaces data at linearly spaced points with respect to wavelength.
USE SOURCE LIMITS: When checked these monitors use the source limits. When 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.

Frequency Power/Profile Advanced tab


This tab only appears for the global monitor settings. It contains advanced global settings for frequency-
domain monitors. Only the MIN SAMPLING PER CYCLE can be modified by the user.
MIN SAMPLING PER CYCLE: This parameter determines the minimum amount of sampling per optical
cycle that can be used. By default, it is set at 2 (the Nyquist limit) for optimum efficiency.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 659

DESIRED SAMPLING: This converts the minimum points per optical cycle into an actual sampling rate in
Hz.
NYQUIST LIMIT: The Nyquist sampling limit is calculated based on the maximum frequencies that may be
present in the simulation volume.
ACTUAL SAMPLING: The actual sampling rate is the rate that will actually be used for 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.

5.4.3.7.8 Monitors - Others and advanced techniques


This section describes some other techniques regarding the usage of monitors

Apodization 660

Spectral averaging 662

2003 - 2016 Lumerical Solutions, Inc


660 Lumerical Knowledge Base

How close can monitors be to other objects 666

Simulation time and Frequency domain monitors 668

5.4.3.7.8.1 Apodization

Objective
This page describes the apodization option of Frequency monitors. Apodization makes it possible to exclude effects
that occur near the start and/or end of the simulation from the monitors fourier transform.

This feature can be useful for filtering away short lived transients that occur when a system is excited with a dipole
source, and when studying high Q systems that decay very slowly. Apodization is considered to be an advanced
feature and care must be taken when using it. Do some testing with a simple test simulation first, to make sure you
understand how the monitor apodization affects your simulation results.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 661

Solvers 101

FDTD
VarFDTD
Associated files
usr_Tang_cavity.fsp

See also
Correcting field amplitudes 1805

Frequency monitors 645


Cavity simulations 1804
Nonlinear simulations 2716

Introduction
Monitor apodization applies a window function to the simulation fields E(t) before the monitor performs its Fourier
transform of E(t) to obtain E(w). This makes it possible to calculate E(w) from a portion of the time signal. For
example, start apodization can be used to ignore all transients which occur near the start of the simulation.

Note:
Apodization will, in general, invalidate any source normalization performed and is therefore not suitable for accurate
power or absolute field intensity measurement. For some resonant cavities, the absolute field intensities can be
obtained with a bit of extra work. Details can be found in Correcting field amplitudes 1805

Full Apodization
This example shows how to use start apodization to get the correct mode profile for a photonic crystal cavity
contained in usr_Tang_cavity.fsp. The simulation contains dipoles which are used to excite the modes of the
cavity and a frequency monitor is set up to get the mode profile of the A11 mode.

Let's begin by looking at the electric field as a function of time. In particular, the blue line in the figure below shows |
E|2 from the m2 time monitor. The transients at the beginning are due to all the energy injected by the dipoles which
is not coupled into the A11 mode. For times greater than 600fs the time signal decays exponentially due to the fact
that the majority of the energy left in the simulation is left in the cavity modes. The beating in the time signal is due
to the fact that there are two cavity modes which are excited whose resonance frequencies do not lie far apart.

2003 - 2016 Lumerical Solutions, Inc


662 Lumerical Knowledge Base

In order to plot mode profile for the A11 from a frequency monitor we need to use start apodization to get rid of the
transients. The green line in the plots above shows the apodization window function used in the A11 monitor in the
simulation. Note that the center time of the window function is set to 1000fs in order to ensure that most of the
energy in the cavity is contained in the mode. The resulting mode profile is shown to the left below.

What happens if you do not use start apodization? The simulation contains a copy of the A11 monitor in which there
is no apodization. This monitor is called A11_no_apodization. The magnitude of the electric fields are plotted in the
image below to the right. In this image, you can see a superposition of the mode profile and the fields from the
transients. The effect of the transients is most apparent at location of the sources.

Note that there are two sources in the simulation. They are placed at the origin of simulation and at x = 500nm, y =
400nm. However, since symmetry was used in the simulation the source at x = 500nm, y = 400nm is mirrored
across the x and y axes. In the image below only three of the sources are pointed out (so that it is easier to see the
mode profile).

Start Apodization No Apodization

The end apodization does not have a visible affect in this simulation. To see that this claim is true, plot the electric
field intensity from the A11_end_apodization monitor in the simulation. This monitor is the same as the A11 monitor
except that it only uses end apodization, and the resultant |E|2 plot looks like the plot from the monitor without any
apodization.

5.4.3.7.8.2 Spectral averaging

Objective
This page describes the spectral averaging feature of Power/Profile monitors. This feature provides the most efficient
method for calculating the average response over a range of frequencies.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 663

Solvers 101

FDTD
VarFDTD
Associated files
usr_spectral_averaging.fsp
usr_spectral_averaging.lsf

See also
Monitors and analysis groups 637
Frequency domain normalization 618

Introduction
Power monitors have three spectral averaging modes.
Standard Fourier Transform (SFT), or no averaging. This is the default option, which calculates the response
of the system at a particular set of frequencies.
Partial Spectral Average (PSA). This option calculates the average response over a range of frequencies
using a Lorentzian weighting function.
Total Spectral Average (TSA). This option calculates the average response over the entire source spectrum.

The options can be selected in the Data to record tab of the monitor properties, as shown below.

In this example, we will calculate the reflection of an Air-Si-Ag-Air multi-layer stack in FDTD Solutions (a
similar set up can be created in MODE Solutions' propagator). This is a useful test case because it has a
complicated reflection spectrum. A screenshot of the structure is shown below. Please note that for this
multilayer problem we have set the mesh refinement to "conformal variant 1" to take full advantage of the
conformal meshing for both the Si and the Ag layer.

2003 - 2016 Lumerical Solutions, Inc


664 Lumerical Knowledge Base

Without the spectral averaging functions (PSA and TSA), the only way to calculate an average spectral
response is to measure the response at a large number of frequencies with the Standard Fourier Transform
(SFT) option, then manually calculate the averages by post processing. The problem with this technique is
that the simulation memory requirements can become impractically large when attempting to save a large
number of frequencies.

In this example, we will calculate two values.


Average reflection at 50 frequency points between 350-750HTz using a 10THz FWHM Lorentzian weighting
function.
Total average reflection between 350-750THz.

Both calculations will be done by two techniques.


The built in PSA and TSA monitor options.
The brute force technique of using a SFT monitor to measure the response at many frequencies (500). The
average can then be manually calculated.

The following figure shows the memory requirements estimate of this simulation. Notice that the SFT monitor
measuring 500 frequency points requires 66% of the memory, while the PSA monitor requires only 7% and the
TSA requires 0.1%. In large 3D FDTD simulations, the memory savings from the PSA and TSA options can be
very important.

Standard fourier transform (SFT)


The Standard fourier transform (SFT) calculates the response of the system at a set of specific frequencies.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 665

The vast majority of simulation analysis uses the SFT mode of operation.

The following figure shows the reflectance as a function of frequency at 500 points between 350-750 THz.

For more details about how the SFT is calculated, see the Frequency domain normalization section of the
Reference Guide.

Partial spectral average (PSA)


The Partial spectral average (PSA) mode of operation allows the monitor to calculate the average response of
the system over a range of frequencies. The weighting function is the product of the source spectrum and a
lorentzian. The FWHM of the lorentzian can be specified in the monitor properties. In this example, it is
10THz.

The following figure shows the average reflectance as calculated by the PSA monitor (red) and the brute force
technique (green). The two techniques give very similar results, although there are some differences at the
minimum and maximum frequencies. The differences at these frequencies occur because the SFT data does
not contain any data beyond the minimum or maximum frequencies. One other very important difference is
that the brute force technique required 10 times more simulation memory.

The reflectance vs frequency as calculated by the SFT (blue) is shown for reference. The lorentzian weighting
function (10 THz wide, centered at 530 THz) is also shown for reference.

NOTE: Discrepancies between PSA and brute force technique at the min and max

2003 - 2016 Lumerical Solutions, Inc


666 Lumerical Knowledge Base

frequencies
The brute force calculation does not include reflected power beyond the source limits (<350THz and
>750THz), while the TSA monitor includes all frequencies in the integrals. If the frequency range of the
standard fourier transform (SFT) monitor was increased, the agreement would improve.

Total spectral average (TSA)


The Total spectral average (TSA) mode of operation allows the monitor to calculate the average response of
the system using the source spectrum as a weighting function.

The following figure shows the average reflectance as calculated by the TSA monitor (red) and the brute force
technique (green). The two techniques give very similar results. One very important difference is that the brute
force technique required 500 times more simulation memory.

NOTE: Discrepancy between TSA and brute force technique


The brute force calculation does not include reflected power beyond the source limits (<350THz and
>750THz), while the TSA monitor includes all frequencies in the integrals. If the frequency range of the
standard fourier transform (SFT) monitor was increased, the agreement would improve.

5.4.3.7.8.3 How close can monitors be to other objects

Objective
In FDTD simulations, each field components is calculated at different spatial location within the mesh cell. This can
lead to confusion about where it is valid to put monitors, when they are close to other objects. For example, can a
time monitor be right at the edge of the simulation region, or does it need to be a few mesh points away from the
boundary?

This section describes how close monitors can be to other objects.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 667

Solvers 101

FDTD
VarFDTD
See also
Monitors and analysis groups 637

Structures
Structures do not interfere with monitors. It is ok to have a monitor at the interface of two structures, or have a
monitor cross through several objects. However, there are some types of calculations (like far field projections) that
require the monitor to be in a homogeneous material. In this case, the monitor should be at least one full mesh point
away from the structures.

Simulation region
The simulation boundary conditions are applied just past the inner edge of the simulation region boundary (the thick
orange line). It is ok to have a monitor exactly at the inner edge of the simulation region boundary. Any monitors that
extend beyond the inner edge will be automatically truncated at this edge.

Sources
Sources require a certain amount of space to inject the fields (2-3 mesh cells). Within this region, the fields are not
physically meaningful. Therefore, monitors should not be placed within this region. Sources graphically depict this
region with light grey shading. The following screenshot shows the injection region of the source, and two monitors.
The time monitor is too close the the source whereas the profile monitor is in a valid location.

2003 - 2016 Lumerical Solutions, Inc


668 Lumerical Knowledge Base

Monitors
Monitors do not interfere with other monitors. It is ok to have multiple monitors in the same position.

5.4.3.7.8.4 Simulation time and Frequency domain monitors

Objective
The objective of this section is to explain the importance of simulation time for frequency domain monitors. If
simulations are not run long enough for the electromagnetic fields to decay, the frequency domain monitor data may
not be accurate. The ring resonator file is provided here for FDTD Solutions, for a similar setup in MODE Solutions,
see Ring resonator 2021 .

Solvers 101

FDTD
VarFDTD
Associated files
usr_ring.fsp

See also
Ring resonator (Getting Started) 2021

Apodization 660
Group delay analysis 2067

First, we will investigate the effect of simulation time on the frequency domain monitor data for the ring resonator
taken from the getting started examples. The ring resonator geometry is seen in the picture above. A mode source is
injected on the left hand side of the top waveguide. At certain wavelengths, the light builds up in intensity over
multiple round-trips through the closed loop due to constructive interference. Radiation at wavelengths that do not
coincide with the resonant wavelengths of the loop is attenuated by destructive interference. The resonant light can
be coupled out through the bottom waveguide.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 669

In this example, we will look at the field intensity at the output of the bottom waveguide as a function of time and
frequency.

The first plot below shows the intensity of the Ez as a function of time. You can re-produce this plot by running
usr_ring.fsp and plotting the Ez intensity from the time-drop monitor. Note that the simulation runs to 1500fs.
The second plot shows the |Ez|^2 at the same point as a function of frequency. This plot can be re-produced by
plotting the Intensity vs frequency/wavelength of Ez from the drop monitor. The drop monitor is a frequency domain
power monitor.

The plots below can be created by setting the simulation time in usr_ring.fsp to 700fs, running the simulation
and plotting the same data as above. Note the oscillations (which are circled in red) in the frequency domain plot.
The oscillations are an artifact that arises because the simulation was not run long enough, as explained next.

Since FDTD is a time domain technique, the fields are calculated as a function of time. A Fourier transform gives the
fields as a function of frequency.

E( w ) = e -i wt E(t )dt
0

The frequency monitors calculate this integral up to the time when the simulation stops. This is the same as
assuming that the fields are 0 beyond the end of the simulation. Mathematically, this is equivalent to multiplying the
E(t) with a top hat function that starts at t = 0 and ends at the simulation time (Tsim).
E sim (t ) = E (t )[H (0) - H (Tsim )]

where H(t) is the Heaviside function. It is possible to obtain the effect of a finite simulation time on frequency monitor
data from basic properties of Fourier transforms. Below, we can see that E(w) calculated by the frequency monitor is
equal to the true E(w) convolved with a sinc function.

2003 - 2016 Lumerical Solutions, Inc


670 Lumerical Knowledge Base


E sim ( w ) = e -i wt E(t )[H (0) - H (Tsim )]dt
0

= E true ( w ) * e -i wt [H (0) - H (Tsim )]dt
0

= E true ( w ) * Tsimsinc ( wTsim )


To obtain the true E(w) from the frequency monitor, we would convolve E(w) with a delta function rather than a sinc
function. The sinc function causes frequency mixing that reduces the accuracy of the monitor data.

The Fourier transforms of the top hat functions corresponding to the above simulations are shown below. Notice that
the sinc function for the 1500fs simulation is much narrower. A narrow sinc function is preferable to a wide sinc
function because it is closer to the ideal response of a delta function.

In the image below, the blue line E(w) from the simulation that ran for 1500fs. 1500fs is long enough to give a narrow
sinc function that is a good approximation of a delta function for this simulation. Therefore, the result is very close to
the true response of the system.

The red line shows the result of taking E(w) from the 1500fs simulation and convolving it with the Fourier Transform of
the top hat function that has a width of 700fs. This result is very similar to the frequency domain plot from the
simulation that ran for 700fs.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 671

To conclude, the oscillations in the frequency domain data are caused by early termination of the simulation. These
oscillations are the result of the convolution between the true response response of the system and the sinc function
that comes from stopping the simulation too early. The convolution causes frequency mixing that reduces the
accuracy of the simulation.

To avoid this problem, the simulation should be run long enough for the time domain fields to decay. This will ensure
accurate frequency domain results. For simulations that decay very slowly, monitor Apodization 660 can be used to
minimize these problems.

Note: Auto shutoff


By default, simulations will automatically shut off when the total energy in the simulation volume drops to a small
fraction of the maximum energy injected. The auto-shutoff was developed in order to make sure the simulations run
long enough so that in most cases frequency domain data will be accurate.

5.4.4 Electrical Simulation Objects


This section describes the simulation objects of CHARGE solver.

Simulation (Electrical) 672

Import (Electrical) 677

Mesh Constraint (Electrical) 677

Doping 678

2003 - 2016 Lumerical Solutions, Inc


672 Lumerical Knowledge Base

Generation 679

Monitors (Electrical) 682

Electrical Contact 686

5.4.4.1 Simulation - CHARGE

Edit simulation tabs


General tab
Simulation region
The simulation region contains several settings:
SOLVER GEOMETRY: This drop down menu gives the choice of a 2D simulation plane or a 3D simulation.
NORM LENGTH: The length of the device in the direction perpendicular to the plane of the simulation; any
normalizations length will be with respect to this value.
SOLVER MODE: The color of the simulation region will change depending on which option is picked. Also,
the available options in the contacts table will change accordingly. Please visit the Solvers 157 section for
more information.
o STEADY STATE - dc simulations
o TRANSIENT - time dependent simulations
o SSAC - Small signal AC simulations
TEMPERATURE DEPENDENCE: The temperature dependence can be considered in the CHARGE solver,
below is the choice of temperature dependence. Please visit the Solvers 157 section for more information.
o ISOTHEMAL - An electrical simulation mode with a uniform temperature applied to all contacts and the
simulation domain. Temperature-dependent material properties are updated with parameters calculated for
the supplied simulation temperature.
o NON-ISOTHEMAL - An electrical simulation mode that allows a spatially varying temperature map added
to a region specified by the user. In regions where no temperature information is present, the simulation
region temperature is used. Contact temperatures are determined from the average temperature on the
contact surface. Heating is not calculated, and no updates to the temperature profile are made.
o COUPLED - A self-consistent CHARGE-HEAT coupled simulation mode that solves Poisson's equations,
the drift-diffusion equations and the heat transport equations. The contact temperatures are specified as
boundary conditions (fixed temperature on a surface), and heat sources can be applied (e.g. from an
r r
external import). Heating is calculated from the ohmic loss ( E
J ) and from recombination.
SIMULATION TEMPERATURE (K): The temperature in Kelvin at which the simulation will be done. This is
only effective when Isothermal Temperature dependence is selected.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 673

Continue from previous solutions


ENABLE CONTINUATION: If this option is checked, the user has the choice to specify a file that has
already been run with a solution. This solution will be used as the starting point for the Newton solver. In
simulations where the starting point isn't at zero volts, this can be very useful to save time.

Mesh tab
Global Mesh Constraints
The global mesh settings section contains several settings:
MINIMUM EDGE LENGTH: The minimum length of an edge of a triangle (in 2D) or tetrahedron (3D) used in
the mesh.
MAXIMUM EDGE LENGTH: The maximum length of an edge of a triangle (in 2D) or tetrahedron (3D) used in
the mesh.

Auto Refinement Settings


The auto refinement settings section contains several settings:
MAX REFINE STEPS: The automatic refinement proceeds in multiple stages, creating a quality triangulation
and refining the mesh according to the change in doping density and, if present, optical generation rate. This
setting limits the number of refinements at each stage, and corresponds to the number of vertexes that can
be added to the mesh at each stage.
SENSITIVITY: This setting controls the threshold at which the mesh will be refined due to the gradient in the
doping density or optical generation rate. The default value will roughly correspond to a limit of a factor of 2
change in the doping density or generation rate over the span of an element in the mesh.

Advanced Options
Mesh Options
TRIANGLE QUALITY: The quality of mesh triangle, defined the minimum angle used in the triangular mesh
cells. The higher the angle, the higher the quality of the triangle.

Geometry Options
GEOMETRY TOLERANCE (UM): When combining multiple objects to create a structure, the solver uses
this value to determine whether two points, lines, or surfaces can be combined.
GEOMETRY ALGORITHM: This provides an alternate algorithm to create the geometries which is more
efficient in 3D simulations.

Geometry tab
X, Y, Z: The center position of the simulation region
X MIN, X MAX: X min, X max position
Y MIN, Y MAX: Y min, Y max position
Z MIN, Z MAX: Z min, Z max position
X SPAN, Y SPAN, Z SPAN: X, Y, Z span of the simulation region

The availability is based on the SOLVER TYPE

Transient tab
Transient Simulation Controls
The transient simulation controls section contains several settings:

MIN TIME STEP: The smallest time step that will be used in the transient simulation (used as the initial
time step)
MAX TIME STEP: The largest time step that will be used in the transient simulation.
ABS LTE LIMIT: If the absolute error is less than this value then the solver increases the time step.
REL LTE LIMIT: If the relative error is less than this value then the solver increases the time step.

2003 - 2016 Lumerical Solutions, Inc


674 Lumerical Knowledge Base

Downsampling

DOWN SAMPLE MODE: The type of downsampling to use, None, for no downsampling, count, for
specifying the number of point to downsample at, and interval to specify the downsample step size.

Global Source Shutter

The global source shutter will apply a shutter to all the optical generation (source) objects in the simulation.
SHUTTER MODE: disabled, for no shutter, step on and step off for step functions, pulse on and pulse off for
a pulse with on and off times. The time shutter function will be plotted as the option is chosen for ease of
use. The on and off times can then be specified.
SHUTTER TON: Sets the on time of the shutter.
SHUTTER TOFF: Sets the off time of the shutter.
SHUTTER TSLEW: Sets a slew in the stepping of the shutter. This feature is useful in helping the solver to
converge where a sharp step in the shutter tend to makes the solver diverge.
SHUTTER SLEW FUNCTION: linear for a linear transition between off and on states, log for an exponential
change between the off and on states.
SHUTTER SLEW CUTOFF: The shutter uses the logarithmic function to step from this value to 1 (for turning
on) and from 1 to this value (for turning off). The stepping from zero to the slew cutoff value (and back) is
abrupt (within one time step).
ILLUMINATION POWER SCALING: This option can be used to scale the amplitude of the source. By default
the value is set to '1' which means no scaling.

Small Signal AC tab


Small signal AC Simulation Controls
PERTURBATION AMPLITUDE (V): Amplitude of the SSAC perturbation
FREQUENCY SPACING: It has three modes for frequency spacing of the SSAC
o SINGLE - A single frequency
o LINEAR - Linear sampling for a range of frequency
o LOG - Logarithm sampling for a range of frequency

Results
This tab contains a list of all the spatial results that can be recorded throughout the simulation. One can pick
to enable or disable one or more of the results to save memory as needed. The tab also contains basic
information about the available results such as their units and descriptions. The following table lists the
results that are available in the simulation region after the simulation has been run:

Categ Name Unit Description


ory
Ec eV Conduction band
Efn eV Electron quasi Fermi
level
Efp eV Hole quasi Fermi level
bandstru
Ei eV Intrinsic energy
cture
Ev eV Valence band
Evac eV Vacuum potential
xfrac a.u. Alloy composition
fraction

charge
Jn A/cm2 Electron current
density

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 675

Jp A/cm2 Hole current density


n 1/cm3 Electron density
p 1/cm3 Hole density
N 1/cm3 Net doping density

doping
NA 1/cm3 Acceptor doping
density
ND 1/cm3 Donor doping density

electrost E V/m Electric field


atics V V Electrostatic potential
Ln m Electron diffusion
length (SRH)
Lp m Hole diffusion length
mobility (SRH)
mun cm2/V-s Electron mobility
mup cm2/V-s Hole mobility
Goptext 1/cm3-s External optical
generation rate
Rau 1/cm3-s Auger recombination
rate
Rbbt 1/cm3-s Band-to-band
tunneling rate
Rii 1/cm3-s Impact ionization
recombination rate
Rnet 1/cm3-s Net recombination
recombi rate
nation
Ropt 1/cm3-s Radiative
recombination rate
Rsrh 1/cm3-s SRH recombination
rate
Rsurf 1/cm3-s Surface
recombination rate
taun s Electron lifetime
(SRH)
taup s Hole lifetime (SRH)
Q 3 Heat
W/m
thermal
T K Temperature

Advanced tab
WARNING: This tab includes options which should only be changed if you are
quite familiar with the meshing algorithm and techniques used .

Global Solver Controls


SOLVER TYPE:
DEVICE simultaneously solves the equations for the electrostatic potential (Poissons equation) and charge

2003 - 2016 Lumerical Solutions, Inc


676 Lumerical Knowledge Base

(drift-diffusion equations). The solutions to these equations must be self-consistent, i.e. the charge calculated
from the drift-diffusion equations satisfies the Poisson equation, and vice versa. Two common approaches are
used to solve this system of equations: Gummels method and Newtons method.

GUMMEL: decouples the charge problem from the electrostatic potential problem at each step. As both of
these equations are non-linear, they must in turn be solved using an iterative or direct method. First, the
electrostatic potential is solved holding the charge fixed. Next, this solution to the electrostatic potential is
used as a fixed input to the charge equations, and those are updated. This process continues until the
solution is self-consistent. Gummels method is stable and efficient for devices where the currents are small
and the variations in the charge distribution are not too extreme (meeting the criteria that the charge and
electrostatic potential are weakly coupled problems). Gummels method should not be used for transient
simulations or simulations involving high levels of charge injection.

NEWTON: the classic approach to solve a system of non-linear equations. In this method, the electrostatic
potential and charge are solved for simultaneously, and all are updated at each step. Newtons method
requires a good initial guess in order that it will converge, and can be more difficult to converge than
Gummels method. However, Newtons method can handle devices where the variations in charge density
are large. Newtons method must be used for transient simulations.

DC UPDATE MODE: self consistent to run both drift-diffusion and Poisson solvers, electrostatic to run
Poisson's solver only, and charge to run drift-diffusion solver only.

FERMI STATISTICS:
Electrons and holes are fermions, and therefore obey Fermi-Dirac statistics. At a finite temperature, the
energy distribution of the electrons is described by the Fermi-Dirac function,

where k is the Boltzmann constant, T is the temperature, and EF is the Fermi energy. When E-EF >>kT, the
Fermi-Dirac distribution can be approximated by the Boltzmann distribution,

Often in semiconductor devices, when the net doping density is sufficiently low (non-degenerate), the Fermi
energy is located within the band gap (carriers are forbidden from having energies within the range of the band
gap), far from the band edges. When the condition E-EF >>kT is satisfied (typically for |E-EF |> 3kT), the Fermi-
Dirac distribution can be replaced with the Boltzmann distribution.

The carrier density is calculated from the integrated product of the Fermi-Dirac distribution (probability of
occupancy) and the density of states (available states to occupy). For electrons, the equation is

When the Fermi-Dirac distribution is used, this integral does not have an analytic solution, and must be
approximated numerically. However, for non-degenerate conditions, the Fermi-Dirac distribution is
approximated by the Boltzmann distribution, and the preceding equation reduces to

describing the electron density at equilibrium (Nc is the effective density of states and is a constant related to
the specific properties of the semiconductor).

MULTITHREADING: If enabled, the user can choose to divide up and run the simulation over multiple threads

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 677

Convergence Controls

The following applies to both sections on Poisson Solver Controls and Drift-Diffusion Solver Controls

USE DEFAULTS: checked by default, will use an iteration limit of 40, absolute tolerance of 1e-06 volts and a
maximum update value of 5 volts.
ITERATION LIMIT: Takes a value between 1 and 10000. This limits the number of iterations of the Poisson or
drift-diffusion solver that may be run.
ABSOLUTE TOLERANCE: For a calculation to be considered converged, this determines the maximum
absolute change between iterations that can exist. For the Poisson solver, the step converges when
V k +1 - V k <d

where is the tolerance and V is the electrostatic potential. For the drift-diffusion solver, both the electron and
hole quasi-Fermi levels must converge:
k +1 k
E Fn - E Fn <d

k +1 k
E Fp - E Fp <d

MAXIMUM UPDATE: To help the calculation converge, the maximum change that will be applied to estimate
the solution at the next step can be clamped. This value is in multiples of the thermal voltage (kT/q).

Initialization
INITIALIZATION: disabled by default, but can be enabled if the start bias in a voltage sweep is far from the
solver's initial guess. More steps will help bring the initial guess closer to the start value but will cause the
simulation to take longer.

5.4.4.2 Import (Electrical)

The button includes options to import from a variety of formats:

GDSII 480
This file format is commonly used to store 2-dimensional geometric data.

STL import 487


This file format is commonly used to store 3-dimensional geometric data.

5.4.4.3 Mesh constraint (Electrical)

Mesh Constraint 677

The mesh constraint region is used to override the default mesh element area in some part of the simulation region.
Normally the meshing parameters are set in the Simulation region. However, if some specific meshing conditions are
required in part of the simulation region, a mesh constraint region can be specified.
Note that only one simulation region per simulation is supported, but multiple mesh constraint 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 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.

2003 - 2016 Lumerical Solutions, Inc


678 Lumerical Knowledge Base

Edit mesh tabs


Geometry
X, Y, Z: The center position of the simulation region
X MIN, X MAX: X min, X max position
Y MIN, Y MAX: Y min, Y max position
Z MIN, Z MAX: Z min, Z max position
X SPAN, Y SPAN, Z SPAN: X, Y, Z span of the simulation region
USE RELATIVE COORDINATES: If this is enabled then the mesh constraint will use the center or the HEAT
solver as its origin (reference). If disabled then it will use the absolute center (0,0,0) as its origin.

Mesh constraints
MAXIMUM EDGE LENGTH: The maximum length of an edge of a triangle (in 2D) or tetrahedron (in 3D) used
in the mesh.

5.4.4.4 Doping
The following types of Doping objects are available to be superimposed on the structure in DEVICE:

Constant Doping Region 678

The constant doping object allows the user to define a region with constant doping. The region geometry as well as
parameters can be entered.

Diffusion Region 679

The diffusion region object allows the user to define a region with a dopant concentration profile. The region geometry
as well as parameters can be entered.

Import Doping Region 679

The Import doping object allows the import of a user defined spatial doping profile. The location of the object is
specified via the edit window.

5.4.4.4.1 Doping - Constant


The constant doping object allows the user to define a region with constant doping. The region geometry as well as
parameters can be entered.

Edit doping tab


Geometry
X, Y, Z: The center position of the simulation region
X MIN, X MAX: X min, X max position
Y MIN, Y MAX: Y min, Y max position
Z MIN, Z MAX: Z min, Z max position
X SPAN, Y SPAN, Z SPAN: X, Y, Z span of the simulation region
USE RELATIVE COORDINATES: If this is enabled then the doping region will use the center or the
CHARGE solver as its origin (reference). If disabled then it will use the absolute center (0,0,0) as its origin.

Dopant
DOPANT TYPE: The dopant type can be n-type (donors) or p-type (acceptors).
CONCENTRATION: The concentration of the dopant can be entered.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 679

5.4.4.4.2 Doping - Diffusion


The diffusion region object allows the user to define a region with a dopant concentration profile. The region geometry
as well as parameters can be entered.

Edit doping tab


Geometry
X, Y, Z: The center position of the simulation region
X MIN, X MAX: X min, X max position
Y MIN, Y MAX: Y min, Y max position
Z MIN, Z MAX: Z min, Z max position
X SPAN, Y SPAN, Z SPAN: X, Y, Z span of the simulation region
USE RELATIVE COORDINATES: If this is enabled then the doping region will use the center or the
CHARGE solver as its origin (reference). If disabled then it will use the absolute center (0,0,0) as its origin.

Diffusion parameters
DOPANT TYPE: The dopant type can be n-type (donors) or p-type (acceptors).
SURFACE CONCENTRATION: The concentration of the dopant at the surface (the peak concentration) can
be entered.
FACE: The side of the region where the surface concentration is defined (i.e. where the diffusion source
originates). For example, "upper y" refers to the face defined by "y max".
JUNCTION WIDTH: The width of the doping profile from surface (peak) concentration to reference
concentration at the edge of the diffusion region.
DIFFUSION FUNCTION: The doping concentration profile, can be gaussian or the complementary error
function (erfc).
REFERENCE CONCENTRATION: The doping concentration on the exterior of the box (excluding the
originating face).

5.4.4.4.3 Doping - Import


The Import doping object allows the import of a user defined spatial doping profile. The location of the object is
specified via the edit window.

Edit doping tab


Geometry
X, Y, Z: The center position of the simulation region.
USE RELATIVE COORDINATES: If this is enabled then the doping region will use the center or the
CHARGE solver as its origin (reference). If disabled then it will use the absolute center (0,0,0) as its origin.

Imported data
IMPORT NEW DATA: Opens file browser to select data file. The file must be in Matlab format (.mat) and
can contain a rectangular or unstructured (finite element) datasets. Once the file is loaded, the available
datasets can be viewed and the appropriate dataset and attribute can be selected. The unit for the imported
data should be in units of /m3.
DOPANT TYPE: The dopant type can be n-type (donors) or p-type (acceptors).

5.4.4.5 Source
The following types of Optical generation (source) objects are available to be superimposed on the structure in
DEVICE:

Bulk Generation 680

The bulk generation object allows the user to define a region of bulk optical generation. The region geometry as well
as the parameters below can be specified:

2003 - 2016 Lumerical Solutions, Inc


680 Lumerical Knowledge Base

Import Generation 680

The Import generation object allows the import of a user defined optical generation region. The location of the object
is specified via the edit window.

Source - Delta (Point source) 681

The generation (source) - delta object allows the import of a delta function optical generation.

Source - Import Temperature (Charge) 681

The Temperature (CHARGE) object allows the import of a user defined temperature T(x,y,z) region.

Source - Import Heat (Charge) 682

The 'Import Heat Source' object allows the import of a user defined heat source region.

5.4.4.5.1 Source - Bulk

The bulk generation (source) object allows the user to define a region of bulk optical generation. The region
geometry as well as the parameters below can be specified:

Edit generation tab


Geometry
X, Y, Z: The center position of the simulation region
X MIN, X MAX: X min, X max position
Y MIN, Y MAX: Y min, Y max position
Z MIN, Z MAX: Z min, Z max position
X SPAN, Y SPAN, Z SPAN: X, Y, Z span of the simulation region
USE RELATIVE COORDINATES: If this is enabled then the source will use the center or the CHARGE
solver as its origin (reference). If disabled then it will use the absolute center (0,0,0) as its origin.

Bulk Optical Gerenal Parameters


ILLUMINATION FACE: The direction of illumination can be chosen by picking one of the six sides of the
cubic region.
SPECTRUM: The spectrum of the illumination can be chosen. For example, solar (AM 1.5G) will import the
spectrum of the sun.
MATERIAL: The semiconductor onto which the generation is superimposed can be chosen from this drop
down menu.
INTERFACE REFLECTION: Either an air interface or an anti reflective coating interface can be chosen as
the boundary of the generation region. In the case of the ideal anti reflective coating, all light will be assumed
to penetrate into the semiconductor, whereas in the air interface case, reflections from the air-
semiconductor interface could take place.

A plot of the generation rate versus position will be generated on the bottom right corner of the edit window.

5.4.4.5.2 Source - Import

The Import generation (source) object allows the import of a user defined optical generation region. The location
of the object is specified via the edit window.

Edit generation tab


Geometry

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 681

X, Y, Z: The center position of the simulation region.


USE RELATIVE COORDINATES: If this is enabled then the source will use the center or the CHARGE
solver as its origin (reference). If disabled then it will use the absolute center (0,0,0) as its origin.

Imported data
IMPORT NEW DATA: Opens file browser to select data file. The file must be in Matlab format (.mat) and
can contain a rectangular or unstructured (finite element) datasets. Once the file is loaded, the available
datasets can be viewed and the appropriate dataset and attribute can be selected. The unit for the imported
optical generation rate should be in units of m-3s -1.

5.4.4.5.3 Source - Delta (Point source)

The generation (source) - delta object allows the import of a delta function optical generation. The location of the
object is specified via the edit window. This can be used in measuring the impulse response of the system and the
IQE of photosensitive devices. For step by step instructions on how to use this objects for measuring IQE of a
CMOS image sensor, please visit here 2585 .

Edit generation tab


Geometry
X, Y, Z: The center position of the simulation region.
USE RELATIVE COORDINATES: If this is enabled then the source will use the center or the CHARGE
solver as its origin (reference). If disabled then it will use the absolute center (0,0,0) as its origin.

Source properties
Source type: The source type can either be specified in units of electron hole pair (ehp) generation rate ( 1/
cm3-s) or it can be specified in units of electron-hole pair (ehp) current (1/s)

5.4.4.5.4 Source - Import Temperature (Charge)

The Temperature (CHARGE) object allows the import of a user defined temperature T(x,y,z) region. The location
of the object is specified via the edit window.

Edit Temperature (Charge) tab


Geometry
X, Y, Z: The center position of the simulation region.
USE RELATIVE COORDINATES: If this is enabled then the source will use the center or the CHARGE
solver as its origin (reference). If disabled then it will use the absolute center (0,0,0) as its origin.

Imported data
IMPORT NEW DATA: Opens file browser to select data file. The file must be in Matlab format (.mat) and
can contain a rectangular or unstructured (finite element) datasets. Once the file is loaded, the available
datasets can be viewed and the appropriate dataset and attribute can be selected. The unit for the imported
temperature should be in units of K.

NOTE: This simulation object will only get applied when performing non-isothermal simulations with the CHARGE
solver.

2003 - 2016 Lumerical Solutions, Inc


682 Lumerical Knowledge Base

5.4.4.5.5 Source - Import Heat (Charge)

The 'Import Heat Source' object allows the import of a user defined heat source region. The location of the
object is specified via the edit window. The dimension of the object is specified by the user defined data.

Edit Import Heat Source


Geometry
X, Y, Z: The center position of the simulation region
USE RELATIVE COORDINATES: If this is enabled then the source will use the center or the HEAT solver
as its origin (reference). If disabled then it will use the absolute center (0,0,0) as its origin.

Data
IMPORT NEW DATA: Opens file browser to select data file. The file must be in Matlab format (.mat) and
can contain a rectangular or unstructured (finite element) datasets. Once the file is loaded, the available
datasets can be viewed and the appropriate dataset and attribute can be selected. The unit for the imported
data should be in W/m3.

NOTE: This simulation object will only get applied when performing coupled (electro-thermal) simulations with the
CHARGE solver.

5.4.4.6 Monitors (Electrical)


The following types of monitors are available in DEVICE:

Charge monitors 683

Charge monitor records electron and hole densities in the monitor space. It can also integrate the total charge within
the monitor surface/volume.

Electric Field monitors 683

Electric field monitor records the electric field within the monitor region as well as the electrostatic potential. Using
this information, it can also calculate the total charge within the monitor surface/volume.

Bandstructure monitors 684

Bandstructure monitor is a 1D monitor that calculates the equilibrium bandstructure of adjacent materials and
returns the conduction, valence, intrinsic and fermi level energies in units of ev.

Current flux monitors 684

The current flux monitor will calculate the total flux of the current density through a line, area or volume of the
simulation region. In 2D, the currents are in units of A/m and in 3D they are in units of A.

Temperature (Charge) 685

The temperature monitor records the temperature profile within the monitor region. The unit of the recorded data is
Kelvin.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 683

5.4.4.6.1 Monitors - Charge

Charge monitor records electron and hole densities in the monitor space. It can also integrate the total charge
within the monitor surface/volume.

Edit simulation tabs


General tab
MONITOR TYPE: The monitor geometry can be chosen. It can be a point, a line in any direction, a plane
normal to any of the axis or a 3D monitor.
RECORD ELECTRONS/HOLES: If this option is checked, the electron/hole densities will be recorded.
These will be in units of 1/cm^3 for both n and p.
TRUNCATE MESH: Since the generated mesh is triangular and the monitors are rectangular, if this option is
chosen, the mesh points will be interpolated onto the monitor boundaries.
INTEGRATE TOTAL CHARGE: The total number of electrons/holes will be calculated within the monitor
surface/volume. This will be in unitless ( total number of charged carriers) in 3D and in units of 1/m ( number
of carriers in a meter) in 2D for both n and p.

Geometry tab
X, Y, Z: The center position of the simulation region
X MIN, X MAX: X min, X max position
Y MIN, Y MAX: Y min, Y max position
Z MIN, Z MAX: Z min, Z max position
X SPAN, Y SPAN, Z SPAN: X, Y, Z span of the simulation region
USE RELATIVE COORDINATES: If this is enabled then the monitor will use the center or the CHARGE
solver as its origin (reference). If disabled then it will use the absolute center (0,0,0) as its origin.

The availability is based on the SOLVER TYPE

Results returned
Results
CHARGE: Electron and hole densities in the monitor space is returned as a function of emitter voltage and
base voltage. Area and ID are also returned, where ID is a number between 1 and N, with N being a number
of different materials in the set up.

5.4.4.6.2 Monitors - Electrical field

Electric field monitor records the electric field within the monitor region as well as the electrostatic potential.
Using this information, it can also calculate the total charge within the monitor surface/volume.

Edit simulation tabs


General tab
MONITOR TYPE: The monitor geometry can be chosen. It can be a point, a line in any direction, a plane
normal to any of the axis or a 3D monitor.
RECORD ELECTRIC FIELD: If this option is checked the electric field across the monitor is recorded.E will
be in units of volts/m.
RECORD ELECTROSTATIC POTENTIAL: If this option is checked, the electrostatic potential across the
monitor is recorded. V is in units of volts.
CALCULATE NET CHARGE: If this option is checked, the net charge within the monitor surface/volume is
calculated using Gauss's law by integrating the electric field flux through the box surface. The results are in
units of Coulombs in 3D simulations and Coulombs/m in 2D simulations.

2003 - 2016 Lumerical Solutions, Inc


684 Lumerical Knowledge Base

Geometry tab
X, Y, Z: The center position of the simulation region
X MIN, X MAX: X min, X max position
Y MIN, Y MAX: Y min, Y max position
Z MIN, Z MAX: Z min, Z max position
X SPAN, Y SPAN, Z SPAN: X, Y, Z span of the simulation region
USE RELATIVE COORDINATES: If this is enabled then the monitor will use the center or the CHARGE
solver as its origin (reference). If disabled then it will use the absolute center (0,0,0) as its origin.

The availability is based on the SOLVER TYPE

Results returned
Results
ELECTROSTATICS: Electric field is returned as a function of emitter voltage and base voltage. Area and the
ID are also returned, where ID is a number between 1 and N, with N being a number of different materials in
the set up.

5.4.4.6.3 Monitors - Bandstructure

Bandstructure monitor is a 1D monitor that calculates the equilibrium bandstructure of adjacent materials and
returns the conduction, valence, intrinsic and fermi level energies in units of ev.

Edit simulation tabs


General tab
MONITOR TYPE: The monitor geometry can be chosen. It can be a point, a line in any direction, a plane
normal to any of the axis or a 3D monitor.
RECORD DATA: Choose the data of interest to record, un-check unnecessary data to save momery
requirement

Geometry tab
X, Y, Z: The center position of the simulation region
X MIN, X MAX: X min, X max position
Y MIN, Y MAX: Y min, Y max position
Z MIN, Z MAX: Z min, Z max position
X SPAN, Y SPAN, Z SPAN: X, Y, Z span of the simulation region
USE RELATIVE COORDINATES: If this is enabled then the monitor will use the center or the CHARGE
solver as its origin (reference). If disabled then it will use the absolute center (0,0,0) as its origin.

The availability is based on the SOLVER TYPE

Results returned
Results
BANDSTRUCTURE: The conduction, valence, intrinsic and fermi level energies in units of ev are returned as
a function of position, emitter voltage and base voltage.

5.4.4.6.4 Monitors - Current flux

The current flux monitor will calculate the total flux of the current density through a line, area or volume of the
simulation region. In 2D, the currents are in units of A/m and in 3D they are in units of A.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 685

The monitors returns the following:

I n , p = J n , p nd s
W

Edit simulation tabs


General tab
MONITOR TYPE: The monitor geometry can be chosen. It can be a point, a line in any direction, a plane
normal to any of the axis or a 3D monitor.
RECORD DATA: Choose the data of interest to record, un-check unnecessary data to save momery
requirement

Geometry tab
X, Y, Z: The center position of the simulation region
X MIN, X MAX: X min, X max position
Y MIN, Y MAX: Y min, Y max position
Z MIN, Z MAX: Z min, Z max position
X SPAN, Y SPAN, Z SPAN: X, Y, Z span of the simulation region
USE RELATIVE COORDINATES: If this is enabled then the monitor will use the center or the CHARGE
solver as its origin (reference). If disabled then it will use the absolute center (0,0,0) as its origin.

The availability is based on the SOLVER TYPE

Results returned
Results
SURFACEFLUX: Current is returned as a function of emitter voltage and base voltage. In 2D, the currents
are in units of A/m and in 3D they are in units of A.

5.4.4.6.5 Monitors - Temperature (CHARGE)

Temperature monitor records the temperature profile in the monitor space. The unit of the recorded data is K.

Edit simulation tabs


General tab
MONITOR TYPE: The monitor geometry can be chosen. It can be a line in any direction, a plane normal to
any of the axis or a 3D monitor.

SAVE DATA: It saves the data to a .mat file, users need to specify a file name and location.

Geometry tab
X, Y, Z: The center position of the simulation region
X MIN, X MAX: X min, X max position
Y MIN, Y MAX: Y min, Y max position
Z MIN, Z MAX: Z min, Z max position
X SPAN, Y SPAN, Z SPAN: X, Y, Z span of the simulation region
USE RELATIVE COORDINATES: If this is enabled then the monitor will use the center or the HEAT solver

2003 - 2016 Lumerical Solutions, Inc


686 Lumerical Knowledge Base

as its origin (reference). If disabled then it will use the absolute center (0,0,0) as its origin.

The availability is based on the SOLVER TYPE

Results returned
Results
TEMPERATURE: Spatial temperature profile is returned. ID is also returned, where ID is a number between
1 and N, with N being a number of different materials in the set up.

NOTE: This monitor will only record data when performing non-isothermal or coupled (electro-thermal)
simulations with the CHARGE solver.

5.4.4.7 Boundary Conditions (Electrical Contacts)


The Boundary Conditions table allows the user to define electrical contacts in the simulation region and assign a
bias to them.

The add/delete/edit buttons can be used to add a new contact, delete a contact or edit the properties of a contact
respectively. DEVICE offers three types of boundary conditions, however, only the 'electrical contact' is applicable to
the 'CHARGE' solver.
The name of the contact can be typed in the Name column, the geometry of the contact can be picked from the edit
properties window.

GEOMETRY: The geometry option defines where the boundary condition can be applied. There is only one
available option, 'solid'. The pull-down menu for the solid option allows the user to pick a geometry (or structure
group) from the model tree where the boundary condition will be applied.
SOLVER MODE: The mode of the solver is consistent with the mode picked in the simulation region and can be set
to steady state or transient.

STEADY STATE MODE:

In the steady state mode, the bias assigned to each contact can either be fixed at a value or swept over a range of
DC values. In the sweep case, the start and stop biases as well as interval and the number of points in the sweep
can be specified. Alternatively, the user can manually enter a range of values for the voltage to sweep over. Series
and shunt resistors can also be added to the voltage source to model more complicated circuits.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 687

TRANSIENT MODE:

In the transient mode, the bias assigned to each contact can either be fixed at a value ( this is the same as the fixed
bias in DC mode) or transient, swept over a range of time dependant values. In the transient case, the values for
each voltage point as well as the time point can be entered in a table. Series and shunt resistors and capacitors can
also be added to the voltage source to model more complicated circuits. The resistance and capacitance for these
elements can also be specified as a function of time. If only one point is specified in the table, then a constant value
is assumed for that element. The values for the voltage Rs and Cs will be linearly interpolated in time for
consistency.

Force Ohmic: The force ohmic option is enabled by default. When enabled, it creates an ohmic contact by
matching the metals work-function with the semiconductors one. If disabled then a Schottky contact is formed
based on the difference in their work-functions.

Apply AC Small Signal: The SSAC is set to NONE by default. When enabled it creates an small signal AC to
the bias voltage.
ALL - SSAC will be applied to all bias voltage
LAST - SSAC will only be applied to the last bias voltage

Contact Temperature: The temperature of a contact can be set. This is only effective in the Coupled
Temperature Dependence.

2003 - 2016 Lumerical Solutions, Inc


688 Lumerical Knowledge Base

5.4.5 Thermal Simulation Objects


This section describes the simulation objects of HEAT solver.

Simulation (Thermal) 688

Import (Thermal) 691

Mesh Constraint (Thermal) 691

Source (Thermal) 692

Monitors (Thermal) 693

Thermal Boundary Condition 694

5.4.5.1 Simulation - HEAT

Edit simulation tabs


General tab
Simulation region
The simulation region contains several settings:
SOLVER GEOMETRY: This drop down menu gives the choice of a 2D simulation plane or a 3D simulation.
SOLVER MODE: Steady state mode for steady-state simulations and transient mode for time dependent
simulations. The color of the simulation region will change depending on which option is picked.
SOLVER PHYSICS: Thermal only performs a thermal simulation only, thermal and conductive option runs
an electro-thermal simulation using a conductive model for the electrical part. For more details about the two
simulation options go to the HEAT solver 163 page.
NORM LENGTH: The length of the device in the direction perpendicular to the plane of the simulation; any
normalizations length will be with respect to this value.

Mesh tab
Global Mesh Constraints
The global mesh settings section contains several settings:
MINIMUM EDGE LENGTH: The minimum length of an edge of a triangle (in 2D) used in the mesh.
MAXIMUM EDGE LENGTH: The maximum length of an edge of a triangle (in 2D) used in the mesh.

Auto Refinement Settings

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 689

The auto refinement settings section contains several settings:


MAX REFINE STEPS: The automatic refinement proceeds in multiple stages, creating a quality triangulation
and refining the mesh according to the change in doping density and, if present, optical generation rate. This
setting limits the number of refinements at each stage, and corresponds to the number of vertexes that can
be added to the mesh at each stage.
SENSITIVITY: This setting controls the threshold at which the mesh will be refined due to the gradient in the
doping density or optical generation rate. The default value will roughly correspond to a limit of a factor of 2
change in the doping density or generation rate over the span of an element in the mesh.

Advanced Options
Mesh Options
TRIANGLE QUALITY: The quality of mesh triangle, defined the minimum angle used in the triangular mesh
cells. The higher the angle, the higher the quality of the triangle.

Geometry Options
GEOMETRY TOLERANCE (UM): When combining multiple objects to create a structure, the solver uses
this value to determine whether two points, lines, or surfaces can be combined.
GEOMETRY ALGORITHM: This provides an alternate algorithm to create the geometries which is more
efficient in 3D simulations

Geometry tab
X, Y, Z: The center position of the simulation region
X MIN, X MAX: X min, X max position
Y MIN, Y MAX: Y min, Y max position
Z MIN, Z MAX: Z min, Z max position
X SPAN, Y SPAN, Z SPAN: X, Y, Z span of the simulation region

The availability is based on the SOLVER TYPE

Transient tab
Transient Simulation Controls
The transient simulation controls section contains several settings:

MIN TIME STEP: The smallest time step that will be used in the transient simulation (used as the initial
time step)
MAX TIME STEP: The largest time step that will be used in the transient simulation.
ABS LTE LIMIT: If the absolute error is less than this value then the solver increases the time step.
REL LTE LIMIT: If the relative error is less than this value then the solver increases the time step.

Downsampling

DOWN SAMPLE MODE: The type of downsampling to use, None, for no downsampling, count, for
specifying the number of point to downsample at, and interval to specify the downsample step size.

Global Source Shutter

The global Source shutter will apply a shutter to all the heat source objects in the simulation.
SHUTTER MODE: disabled, for no shutter, step on and step off for step functions, pulse on and pulse off for
a pulse with on and off times. The time shutter function will be plotted as the option is chosen for ease of
use. The on and off times can then be specified.
SHUTTER TON: Sets the on time of the shutter.
SHUTTER TOFF: Sets the off time of the shutter.
SHUTTER TSLEW: Sets a slew in the stepping of the shutter. This feature is useful in helping the solver to
converge where a sharp step in the shutter tend to makes the solver diverge.

2003 - 2016 Lumerical Solutions, Inc


690 Lumerical Knowledge Base

SHUTTER SLEW FUNCTION: linear for a linear transition between off and on states, log for an exponential
change between the off and on states.
SHUTTER SLEW CUTOFF: The shutter uses the logarithmic function to step from this value to 1 (for turning
on) and from 1 to this value (for turning off). The stepping from zero to the slew cutoff value (and back) is
abrupt (within one time step).
ILLUMINATION POWER SCALING: This option can be used to scale the amplitude of the source. By default
the value is set to '1' which means no scaling.

Results
This tab contains a list of all the spatial results that can be recorded throughout the simulation. One can pick
to enable or disable one or more of the results to save memory as needed. The tab also contains basic
information about the available results such as their units and descriptions. The following table lists the
results that are available in the simulation region after the simulation has been run:

Ca Na Un Description
teg me it
or
y
elec V V Electrostatic potential
tros
tati
c
C J/ Specific heat
kg-
K
Q W/ Heat
m3
ther
mal T K Temperature
kap W/ Thermal conductivity
pa m-K
rho kg/ Mass density
m3

Advanced tab
WARNING: This tab includes options which should only be changed if you are
quite familiar with the meshing algorithm and techniques used.

Global Solver Controls


MULTITHREADING: If enabled, the user can choose to divide up and run the simulation over multiple threads

Iteration Controls
USE DEFAULTS: checked by default, will use an iteration limit of 40, absolute tolerance of 1e-06 volts and a
maximum update value of 5 volts.
ITERATION LIMIT: Takes a value between 1 and 10000. This limits the number of iterations of the Poisson or
drift-diffusion solver that may be run.
ABSOLUTE TOLERANCE: For a calculation to be considered converged, this determines the maximum
absolute change between iterations that can exist. For the Poisson solver, the step converges when
V k +1 - V k <d

where is the tolerance and V is the electrostatic potential. For the drift-diffusion solver, both the electron and
hole quasi-Fermi levels must converge:

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 691

k +1 k
E Fn - E Fn <d

k +1 k
E Fp - E Fp <d

MAXIMUM UPDATE: To help the calculation converge, the maximum change that will be applied to estimate
the (thermal) solution at the next step can be clamped. This value is in units of Kelvin.

MAX VOLTAGE UPDATE: To help the calculation converge, the maximum change that will be applied to
estimate the (electrostatic) solution at the next step can be clamped. This value is in multiples of the thermal
potential (kT/q).

5.4.5.2 Import (Thermal)

The button includes options to import from a variety of formats:

GDSII 480
This file format is commonly used to store 2-dimensional geometric data.

STL import 487


This file format is commonly used to store 3-dimensional geometric data.

5.4.5.3 Mesh constraint (Thermal)

Mesh Constraint 677

The mesh constraint region is used to override the default mesh element area in some part of the simulation region.
Normally the meshing parameters are set in the Simulation region. However, if some specific meshing conditions are
required in part of the simulation region, a mesh constraint region can be specified.
Note that only one simulation region per simulation is supported, but multiple mesh constraint 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 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.

Edit mesh tabs


Geometry
X, Y, Z: The center position of the simulation region
X MIN, X MAX: X min, X max position
Y MIN, Y MAX: Y min, Y max position
Z MIN, Z MAX: Z min, Z max position
X SPAN, Y SPAN, Z SPAN: X, Y, Z span of the simulation region
USE RELATIVE COORDINATES: If this is enabled then the mesh constraint will use the center or the HEAT
solver as its origin (reference). If disabled then it will use the absolute center (0,0,0) as its origin.

Mesh constraints
MAXIMUM EDGE LENGTH: The maximum length of an edge of a triangle (in 2D) or tetrahedron (in 3D) used

2003 - 2016 Lumerical Solutions, Inc


692 Lumerical Knowledge Base

in the mesh.

5.4.5.4 Source (Thermal)


The following types of heat source objects are available to be superimposed on the structure in HEAT:

Source - Import Heat 692

The Import Heat Source object allows the import of a user defined heat generation region. The location of the object
is specified via the edit window.

Source - Uniform Heat 692

The Uniform Heat Source object allows the user to define a region of uniform heat generation. The region geometry
as well as the parameters below can be specified.

5.4.5.4.1 Source - Import Heat

The 'Import Heat Source' object allows the import of a user defined heat source region. The location of the
object is specified via the edit window. The dimension of the object is specified by the user defined data.

Edit Import Heat Source


Geometry
X, Y, Z: The center position of the simulation region
USE RELATIVE COORDINATES: If this is enabled then the source will use the center or the HEAT solver
as its origin (reference). If disabled then it will use the absolute center (0,0,0) as its origin.

Data
IMPORT NEW DATA: Opens file browser to select data file. The file must be in Matlab format (.mat) and
can contain a rectangular or unstructured (finite element) datasets. Once the file is loaded, the available
datasets can be viewed and the appropriate dataset and attribute can be selected. The unit for the imported
data should be in W/m3.

5.4.5.4.2 Source - Uniform Heat

The 'Uniform Heat Source' object allows the user to define a region of uniform heat generation. The region
geometry as well as the parameters below can be specified:

Edit Uniform Power Heat source


Geometry
SOURCE TYPE: The source can be 2D for 2D. The 2D source must be used with the appropriate 2D HEAT
solver and the 3D source should only be used with the 3D HEAT solver.
X, Y, Z: The center position of the simulation region
X MIN, X MAX: X min, X max position
Y MIN, Y MAX: Y min, Y max position
Z MIN, Z MAX: Z min, Z max position
X SPAN, Y SPAN, Z SPAN: X, Y, Z span of the simulation region
USE RELATIVE COORDINATES: If this is enabled then the source will use the center or the HEAT solver as
its origin (reference). If disabled then it will use the absolute center (0,0,0) as its origin.

Source parameter
EQUIVALENT LENGTH (um): Only applicable to 2D sources. The equivalent length defines the length of
the source in the third dimension. In 2D simulation, the input power for the source has a unit of W/m and

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 693

this is achieved by dividing the "total power" value (W) with the length in the third dimension.
USE SOLVER NORM LENGTH: Only applicable to 2D sources. Enabling this option overrides the value of
the "equivalent length" of the source with the "norm length" of the solver region.
TOTAL POWER (W): This is the total power injected by the source in Watts. In 3D, the total volume of the
source introduces this amount of heat into the simulation region. In 2D, the input power (in W) is divided by
the length of the source in the third dimension and unit for the applied input power becomes W/m.

5.4.5.5 Monitors (Thermal)


The following types of monitors are available in the thermal solver:

Monitors - Power Flow 693

The power flow monitor will calculate the total heat flux through a line, area or volume of the simulation region as well
as the temperature distribution. In 2D, the heat flux has the unit of W/m and in 3D the unit is W.

Monitors - Temperature 694

The temperature monitor records the temperature profile within the monitor region. The unit of the recorded data is
Kelvin.

5.4.5.5.1 Monitors - Pow er Flow

Power flow monitor records the heat flux through a line, area or volume of the simulation region. The data has
the unit of W/m in 2D and W in 3D.

Edit simulation tabs


General tab
MONITOR TYPE: The monitor geometry can be chosen. It can be a line in any direction, a plane normal to
any of the axis or a 3D monitor.
RECORD TEMPERATURE: If enabled, the monitor records the temperature profile as well.

Geometry tab
X, Y, Z: The center position of the simulation region
X MIN, X MAX: X min, X max position
Y MIN, Y MAX: Y min, Y max position
Z MIN, Z MAX: Z min, Z max position
X SPAN, Y SPAN, Z SPAN: X, Y, Z span of the simulation region
USE RELATIVE COORDINATES: If this is enabled then the monitor will use the center or the HEAT solver
as its origin (reference). If disabled then it will use the absolute center (0,0,0) as its origin.

The availability is based on the SOLVER TYPE

Results returned
Results
HEATFLUX: The total heat flux through a line, area or volume of the simulation region is reported. In 2D, the
heat flux has the unit of W/m and in 3D the unit is W.
TEMPERATURE: The temperature profile along the line, surface, or volume is reported in units of Kelvin.

2003 - 2016 Lumerical Solutions, Inc


694 Lumerical Knowledge Base

5.4.5.5.2 Monitors - Temperature

Temperature monitor records the temperature profile in the monitor space. The unit of the recorded data is K.

Edit simulation tabs


General tab
MONITOR TYPE: The monitor geometry can be chosen. It can be a line in any direction, a plane normal to
any of the axis or a 3D monitor.

SAVE DATA: It saves the data to a .mat file, users need to specify a file name and location.

Geometry tab
X, Y, Z: The center position of the simulation region
X MIN, X MAX: X min, X max position
Y MIN, Y MAX: Y min, Y max position
Z MIN, Z MAX: Z min, Z max position
X SPAN, Y SPAN, Z SPAN: X, Y, Z span of the simulation region
USE RELATIVE COORDINATES: If this is enabled then the monitor will use the center or the HEAT solver
as its origin (reference). If disabled then it will use the absolute center (0,0,0) as its origin.

The availability is based on the SOLVER TYPE

Results returned
Results
TEMPERATURE: Spatial temperature profile is returned. ID is also returned, where ID is a number between
1 and N, with N being a number of different materials in the set up.

5.4.5.6 Boundary Conditions (Thermal Boundary)


The Boundary Conditions table allows the user to define electrical contacts in the simulation region and assign a
bias to them.

The add/delete/edit buttons can be used to add a new contact, delete a contact or edit the properties of a contact
respectively. DEVICE offers three types of boundary conditions, however, only the 'Voltage Boundary' and the
'Thermal Boundary' are applicable to the 'HEAT' solver.
The name of the contact can be typed in the Name column, the geometry of the contact can be picked from the edit
properties window.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 695

Voltage Boundary
NAME: Name of the BC
GEOMETRY: The geometry option defines where the boundary condition can be applied. There are three
available options,
SOLID: The boundary condition is applied to the geometry (or structure group) selected within the pull-down
menu of the 'solid' option.
SOLID:SOLVER BOUNDARY: The boundary condition is applied to the intersection of the selected solver
boundary and solid.
SOLVER BOUNDARY: The boundary condition is applied to the selected solver boundary. Available options
are +/-x, +/-y, and +/-z.

Steady state
BC MODE: can be a 'Single' voltage or a voltage 'Sweep'.

Single
VOLTAGE: Single voltage value in units of Volt.

Sweep
RANGE: A range of values can be defined by the START, STOP, and INTERVAL or NUMBER OF POINTS.
VALUE: A set of voltage values can be defined by the user in a table

Transient
BC MODE: Can be a can be a 'Single' constant voltage or a time-dependent 'Transient' voltage.

Single
VOLTAGE: Constant voltage value in Volt.

Transient
BOUNDARY CONDITION PROPERTIES: Voltage as a function of time can be defined by the user in a
table.

Thermal Boundary
NAME: Name of the BC
GEOMETRY: The geometry option defines where the boundary condition can be applied. There are three
available options,
SOLID: The boundary condition is applied to the geometry (or structure group) selected within the pull-down
menu of the 'solid' option.
SOLID:SOLVER BOUNDARY: The boundary condition is applied to the intersection of the selected solver
boundary and solid.
SOLVER BOUNDARY: The boundary condition is applied to the selected solver boundary. Available options
are +/-x, +/-y, and +/-z.

Steady state
BC MODE: Can be a 'Single' value or a parameter 'Sweep'.

Single
Model Parameters
Insulating: Zero heat flow at the N/A
boundary.
Fixed temperature: Fixed temperature temperature: Temperature at the boundary in Kelvin.
at the boundary. thermal impedance (optional): Applies a thermal insulance at
the boundary with units of m2-K/W.
Power: Absolute power (heat) flow at power: A positive value indicates heating (heat going into the

2003 - 2016 Lumerical Solutions, Inc


696 Lumerical Knowledge Base

the boundary in units of W. simulation volume) and a negative value indicates cooling (heat
being removed from the simulation volume).
Heat Flux: Heat flux at the boundary in heat flux: A positive value indicates heating (heat going into
units of W/m2. the simulation volume) and a negative value indicates cooling
(heat being removed from the simulation volume).
Convection: Convective boundary ambient temperature: The external temperature of the fluid.
condition. h convection: Convective heat transfer coefficient in units of W/
m2-K.
Radiation: Radiative boundary ambient temperature: Temperature of surrounding environment.
condition. emissivity: 1 for black-body and <1 for gray-body radiation.

Heat transfer due to radiation is calculated using the Stefan-


Boltzmann law given by,

q = A es (Tsurf - Tenv )
4

where, q is the heat loss due to radiation, A is the surface area,


is the emissivity of the solid, is the Stefan-Boltzmann constant,
Tsurf is surface temperature and Tenv is the temperature of the
surrounding environment.
Convection and radiation: Combination ambient temperature: Temperature of surrounding fluid/
of convective and radiative boundary environment.
conditions. h convection: Convective heat transfer coefficient in units of W/
m2-K.
emissivity: 1 for black-body and <1 for gray-body radiation.

Sweep
SOURCE TYPE: User can sweep over temperature at the boundary or power flow through the boundary.
RANGE: A range of values (temperature or power) can be defined by the START, STOP, and INTERVAL or
NUMBER OF POINTS.
VALUE: A set of values (temperature or power) can be defined by the user in a table.

Transient
BC MODE: Can be a can be a 'Single' constant value or a time-dependent 'Transient' value.

Single
Same options available in the steady state.

Transient
SOURCE TYPE: Temperature or power flow at the boundary to sweep.
BOUNDARY CONDITION PROPERTIES: Temperature (or power) as a function of time can be defined by
the user in a table.

5.5 Parameter sweeps, optimization and yield analysis


This section describes the way in which the parameter sweeps, optimization and yield analysis are set up. These
features allow users to automate the process of finding desirable parameter values by running a large number of
simulations. For additional information, see the Optimization and sweeps video.

Descriptio Screenshot
n

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 697

Parameter Sweeps Paramete


699 r sweeps
Sweep are useful
scripting commands for finding
703
the
Nested
optimum
Sweeps 707
value and
Running
sensitivity
parameter
of the
sweeps
design
without the
performan
CAD 710
ce to
Sweep
certain
analysis for
parameter
dispersion
712
s.

Optimization 716 Optimizati


Optimization on is
scripting commands done by
722 running a
Optimization large
Setup and number of
Advanced simulation
tab 727 s with an
Particle advanced
Swarm optimizati
Optimization on
727
algorithm.
This
particularl
y useful if
there are
multiple
parameter
s to
optimize.

2003 - 2016 Lumerical Solutions, Inc


698 Lumerical Knowledge Base

Yield analysis 728 The yield


Yield analysis
scripting commands tool runs
734 extensive
Monte
Carlo
analysis,
sweeping
across
multiple
parameter
s. This
can be
useful for
assessing
variations
of
compone
nt-level
simulation
s, and on
an overall
circuit
performan
ce.

An example Optimization and Sweeps tab is shown in the screenshot below:

At the top of the window is a toolbar containing the following buttons:


Creates a parameter sweeping task.
Creates an optimization task.

Creates a yield analysis task.


Opens an edit window for the selected project where one can modify its properties.
Deletes the selected project.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 699

Runs the selected sweep, optimization and yield analysis with the resources currently set in the resources
manager.

The Animate function allows you to view the structures that will be simulated in a parameter sweep or optimization in
the CAD before you run the project:

5.5.1 Parameter sweeps


Objective
This page describes how to run a parameter sweep. Parameter sweeps are useful for finding the optimum value of a
parameter, and for studying the sensitivity of the design performance to certain parameters or running a series of
simulations with a set of varying parameters.We will demonstrate how to use the parameter sweep feature in a
simple example. We will find the optimum thickness of an anti-reflection (AR) layer on silicon. The optimum
thickness is the thickness that gives the minimum reflection at the wavelength of operation, in this example it is 500
nm. For additional information, see the Optimization and sweeps video.

Associate files
sweep_AR_coating_example.fsp

See also
Sweep scripting commands 703
Running sweeps without the CAD 710

Nested Sweeps 707


Sweep analysis for dispersion 712
Optimization tasks 716
Script - Parameters sweeps 1401

2003 - 2016 Lumerical Solutions, Inc


700 Lumerical Knowledge Base

Parameter sweep properties


NAME: Parameter sweep name.
Parameters
TYPE- RANGES: Specify sweep points with start / stop values. All values will be linearly spaced.
TYPE - VALUES: Specify each sweep point manually. Allows non-linearly spaced sweep values.
NUMBER OF POINTS: Number of points in the parameter sweep.
NAME: A user specified name for the parameter. Will appear in results dataset.
PARAMETER: Property to sweep.
TYPE: Used to specify the type of units for the selected property (eg. length, time).
START/STOP: The start/stop value of the sweep, when using the RANGES option.
VALUE_1,2,3,...: Specific sweep values, when using the VALUES option.
ADD: Add another line to the parameters table.
REMOVE: Remove a line from the parameters table.
Results
NAME: A user specified name for the result. Will appear in the results dataset.
RESULT: Result to collect.
OPERATION: Optionally, apply a simple mathematical operation to the results. Supported operations are
Sum, Mean, Integrate.
Advanced
RESAVE FILES AFTER ANALYSIS: Optionally, resave the project files after the analysis scripts have been
run. This can be helpful when the analysis scripts are slow to run.

Creating the parameter sweep project


Make sure you can see the
Optimization and Sweeps window. This
can be done by going to the menu
View->Windows->Optimization and
Sweeps, or by right clicking on the
upper menu bar and making sure that
Optimization and sweeps is selected.

Click the Add Sweep button to create a


new parameter sweep task. Click the
edit button to open the Edit sweep
dialog window.

Optimizations and sweeps

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 701

Editing parameters
Once the sweep object is open, add a
parameter and browse the parameter
pulldown menu. Select the "thickness"
property of the AR structure.

Next, choose the Type to be length


and set the Start and Stop values to
10nm and 150nm respectively. The
final result should look like the
screenshot here.

Note: Multiple parameter


sweeps and Nested Sweeps
If two or more parameters are
specified, they must have the same
dimensions (i.e., number of points).
Each sweep step will update all
parameters values one column at a
time (this is not the same as nested
parameter sweeps). For information on
how to set up nested parameter
sweeps, please see Nested Sweeps
707 .

2003 - 2016 Lumerical Solutions, Inc


702 Lumerical Knowledge Base

Recording results
Add results to record, the recorded
results will be available when the
sweep is done. Select the power
transmission 'T' from the Reflection and
Transmission monitors, as shown here.

Under the Operation column, please


leave the choice blank. The final
Parameter Sweep window should look
like this figure. Click OK to accept all
settings, and go back to the main
Optimization and Sweeps window.

Note: File not found!


Ensure that there is no period in the
parameter sweep name. Otherwise it
may result in "file not found" error
while running the sweep.

Edit Parameter Sweep

Running the parameter sweep


To run the parameter sweeps, select the
parameter sweep and click the run button. To
distribute the sweep between several local
computers, you must configure the
computation Resources before running the
optimization. Without additional configuration,
all simulations will run on the local computer.

Optimizations and sweeps

Viewing the results

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 703

The parameter sweep data is saved in a similar way to


monitor data. One can right-click on the results in the
Result View or the parameter sweep project to select
any of the sweep results to be displayed in the
Visualizer.

Parameter sweep results can also be obtained in the


script environment with the command
getsweepresult, which is similar to the command
getresult. The name of each data member is the
Name column that you specified when adding the
parameters and results, in this case "T", "R" and
"thickness". For example, the following 2 lines of script
will plot the result R vs thickness.
R = getsweepresult("thickness_sweep","R");
plot(R.thickness*1e9, R.T, "AR thickness (nm)","R");

We can see that the best thickness is approximately


60 nm. To find the precise value, we could repeat the
parameter sweep with more points, or reduce the range
of the thicknesses we consider. Alternatively, we could
consider using an Optimization project (Optimize a
design 716 ) to find the thickness that gives the smallest
reflection.

5.5.1.1 Sweep scripting commands


Objective
This page describes how to generate and run a sweep using script commands. The same example used in the
section "Parameter Sweeps" will be re-generated in this page. Using script commands to generate a sweep analysis
is a convenient way when users already have the parameters at their hands. For additional information and detailed
implementation of the script commands, please see the "Measurement and optimization data" section. Please note
that, all the script commands used in this example could also be applied to optimization and yield analysis.

Associate files
sweep_AR_coating_example.fsp
sweep_AR_coating_example_script.ls
f

See also
Optimization scripting commands 722
Yield scripting commands 734
Parameter sweeps 699
Optimization 716
Yield analysis 728
Script - Parameters sweeps 1401
Script - Measurement and optimization data 1644

To generate and run the sweep using script commands, user can open the

2003 - 2016 Lumerical Solutions, Inc


704 Lumerical Knowledge Base

sweep_AR_coating_example_script.fsp file and follow the three steps listed below; or, open and run the
script file sweep_AR_coating_example_script.lsf.

Creating the parameter sweep project


The following commands are used to generate and superficially define a new sweep named
"thickness_sweep_script".

# add a new sweep and set basic properties


addsweep;
setsweep("sweep", "name", "thickness_sweep_script");
setsweep("thickness_sweep_script", "type", "Ranges");
setsweep("thickness_sweep_script", "number of points", 10);

When the sweep is superficially generated, the parameters can then be defined and added to it. The following
commands define the name, type, range and the path of the parameter "thickness".

# define the parameter thickness


para = struct;
para.Name = "thickness";
para.Parameter = "::model::AR structure::thickness";
para.Type = "Length";
para.Start = 0.05e-6;
para.Stop = 0.15e-6;
para.Units = "microns";

This command adds the parameter "thickness" to the sweep "thickness_sweep_script". When the parameter is
successfully added, the sweep will appear in the "Optimizations and Sweeps" tab as shown below.

# add the parameter thickness to the sweep


addsweepparameter("thickness_sweep_script", para);

[click to enlarge]

The next step is to add the results that we want to measure into the sweep. The commands listed below define
and add the results "R" and "T" to the sweep as shown in the sweep editing window below. After this step, the
sweep is well defined and ready to run.

# define results
result_1 = struct;
result_1.Name = "R";
result_1.Result = "::model::R::T";

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 705

result_2 = struct;
result_2.Name = "T";
result_2.Result = "::model::T::T";

# add the results R & T to the sweep


addsweepresult("thickness_sweep_script", result_1);
addsweepresult("thickness_sweep_script", result_2);

[click to enlarge]

Running the parameter sweep


A well defined sweep can also be run by using script commands. The following command runs the sweep
"thickness_sweep" and loads the results to it. After running, the results will be loaded back to the sweep and
the sweep will be indicated by the red logo as shown below.

# run the sweep


runsweep("thickness_sweep_script");

2003 - 2016 Lumerical Solutions, Inc


706 Lumerical Knowledge Base

[click to enlarge]

Viewing the results


The sweep results could also be visualized by using script commands. The commands below stores the sweep
results "R" and "T" to two same named datasets "R" and "T" and plots them.

# save & view the results


R = getsweepresult("thickness_sweep_script", "R");
T = getsweepresult("thickness_sweep_script", "T");

plot(R.thickness*1e9, R.T, "AR thickness (nm)","R");


plot(T.thickness*1e9, abs(T.T), "AR thickness (nm)","T"); # T is in the opposite direc

The following figures are the plots of the results R and T v.s. thickness, which show same results as in the
section Parameter sweeps.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 707

5.5.1.2 Nested Sweeps


Objective
This section describes how to run a nested parameter sweep. We will demonstrate how to do this by finding the
incident angle that results in minimum reflection from a 50 nm silver film on glass for 3 different wavelengths (for a
more detailed description of this example, see Surface Plasmon Resonance 2D 1905 ).

2003 - 2016 Lumerical Solutions, Inc


708 Lumerical Knowledge Base

Associate files
sweep_nested_example.fsp

See also
Run a parameter sweep 699

Creating the nested parameter sweep project


In the Optimization and Sweeps window, click the Add Sweep button to create a new parameter sweep task
(see Parameter sweeps) 699 . Once the sweep is added, right click on the new sweep project and select Insert
Parameter Sweep.

A nested parameter sweep will be created as a result. Open the edit window for the inner sweep object,
change the name to "theta", add a parameter "source_angle" and browse the parameter pulldown menu to
select the "angle" property of the source. Set the Start/Stop values to sweep from 40 to 60 degrees, and the
Number of points 20. Finally, add a result "R" from the reflection analysis group (see Creating parameter
sweep project 699 for step-by-step details). The edit window should look like the screenshot below.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 709

Edit parameter sweep

In the edit window for the outer sweep, change the name to "wavelength", add a parameter "lambda" and
browse the parameter pulldown menu to select the "wavelength" property of the source. Set the Start/Stop
values to sweep from 0.4 to 0.6 microns in 3 points. Add a result "R" and select R from the Result
pulldowndown menu, which contains all the results in the inner sweep that are already defined.

Running the nested parameter sweep


The nested parameter sweep can be run in the same manner as a single parameter sweep, as described in
Parameter sweeps 699 .

Viewing the results


Just like single parameter sweeps, the data from a nested parameter sweep can also be retrieved using
getsweepresults. The following commands can be used to plot the data. It is also possible to plot this data
with the visualizer.
reflection = getsweepresult("wavelength", "R");
R = -reflection.T;
lambda = reflection.lambda_sweep*1e9;

plot(reflection.source_angle, pinch(R,3,1),
pinch(R,3,2),
pinch(R,3,3),
"angle of incidence (degrees)","Reflection","Reflection
legend('lambda = ' + num2str(lambda(1)), 'lambda = ' + num2str(lambda(2)), 'lambda = '

2003 - 2016 Lumerical Solutions, Inc


710 Lumerical Knowledge Base

We can see that shorter wavelengths correspond to larger incident angles where minimum reflection is
obtained.

Note: Optimizations with nested sweeps


This example file also contains an optimization task with a nested sweep. The optimization task is setup to
find the optimal thickness of silver to minimize the reflected power for illumination by 500 nm light at angles
between 45 and 50 degrees. The nested sweep is used to calculate the average reflection for angles between
45 and 50 degrees for each design (ie. thickness) in the optimization.

5.5.1.3 Running parameter sweeps without the CAD


Objective
This section describes an alternative way to run parameter sweeps on a separate network (i.e. an external cluster). If
your full license is installed on one network (i.e. your office) and your extra engine licenses are installed on an
external cluster, then the Job Manager feature of FDTD Solutions can't be used. Instead, you will use the full license
on your local computer to generate a set of simulation files. These files are then transferred to the cluster. Very
often, these jobs will be submitted to the clusters job scheduler. See the running simulations chapter for more
information on running simulations from the command line (i.e without using the Lumerical Job Manager). When the
simulations are finished, the files are transferred back to the local desktop computer. You can then reload the data
files and extract the requested information.

1. Adjust model parameters and save a set of fsp files (a fsp file for each parameter value).
2. Run all the simulations
3. Load the simulation files and extract the required information

Advantages:
The individual simulations can be sent to an external cluster or other workstations

Disadvantages:
It is not quite as simple to run all the simulations

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 711

See also
Run a parameter sweep 699

Running Simulations

Step 1: Adjust model parameters and save a new fsp file for each
parameter value
After setting up a parameter sweep as described at Parameter sweeps 699 , rather than running the parameter
sweep directly, simply choose Save to files, as shown below.

This will create a directory called with the same name as the original fsp file, in this case,
usr_optimization_example. Inside this directory you will find 10 fsp file, called "test_sweep_1.fsp"
to "test_sweep_10.fsp". Each file corresponds to a particular value of the parameters and there are 10
files because we chose 10 different values for our sweep parameter.

Step 2: Run the simulations


The simulations can be run on a cluster or extra workstations, without requiring a graphical user interface
license. A shell or batch file is the most convenient way to run these simulations. For further details, see the
running simulations chapter. In particular, see the 'Run solver with MPI' pages.

Step 3: Load the results


Once all the simulations have been completed, you can load all the results by choosing Load from files, as
shown below.

2003 - 2016 Lumerical Solutions, Inc


712 Lumerical Knowledge Base

This will reload all the results from the fsp files, as if they had been run on the local machine by pressing the
Run button. You can then proceed with the analysis of the results as shown in Parameter sweeps 699 .

Note: Re-running the parameter sweep


Once the sweep is run, a new set of fsp files are saved to a folder. If the sweep is run again, then a set of
fsp files will be saved to overwrite the previous files. To avoid overwriting the fsp files, use save as to change
file name or current working directory before re-running the sweeps.

5.5.1.4 Sweep analysis for dispersion


Objective
This section describes how to use a parameter sweep in MODE to do dispersion calculations much like those
available in the frequency analysis tab of the Eigensolver. While the GUI allows for easy and quick set-up of a
frequency sweep, the parameter sweep will achieve the same results with more versatility; here, we sweep over
frequency to generate the same plots of dispersion, neff, group velocity, etc. This technique can be generalized to
sweep over any other parameter and generate plots of other figures of merit in other Lumerical's products.

Another advantage of using this technique is that the multiple simulations in a sweep can be distributed to yield
faster results for larger simulation files.

Solver 101

FDE
Associate files
sweep_frequency_dispersion.lms
sweep_frequency_dispersion.lsf

See also
Run a parameter sweep 699
FDE - Frequency Analysis 758

Simulation set-up and results

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 713

Open the usr_frequency.lms file and in the Optimization and Sweeps window, right click on the object named
"sweep" and click "Edit". You will see that the sweep object has been set up to sweep the same simulation over a
frequency range of 100-200 THz.
Open the usr_frequency.lsf script within the project file. Notice that script takes the same inputs as the frequency
sweep in the graphical interface. Notice that the user is supposed to make sure that the start and stop frequencies
as well as the number of frequency values in that range should match between the set up sweep, and the inputs of
the script.

If the track_selected_mode variable is set to 1, the sweep will run the simulation for the first frequency and set the
desired mode as a reference dcard. Then as the frequency is swept the overlap between the selected dcard and the
corresponding mode at the new frequency is used to track that mode. The difference here with the frequency
analysis of the user interface is that the sweep is completed initially and the figures of merit are calculated
afterwards.

The following plots will be generated:

2003 - 2016 Lumerical Solutions, Inc


714 Lumerical Knowledge Base

If the track_selected_mode variable is set to 0, the sweep will track all the modes and plot the results on the same
graph. These modes are solved for according to the input variables like number of test modes, and effective index to
solve around, set at the top of the script.

The following plots will be generated:

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 715

Since the sweep automatically creates a folder with the name {filename}_sweep, when using your file, make sure the
name of the folder is set right the script where the path is respecified. Note that the working directory is changed to
access the sweep files in both cases and so you would need to switch the directory back to the original one before
you run another sweep.

2003 - 2016 Lumerical Solutions, Inc


716 Lumerical Knowledge Base

5.5.2 Optimization
Objective
This page describes how to optimize a design using the graphical user interface. Optimizing the design is done
using an advanced optimization algorithm, which requires running a large number of simulations. This can be much
more efficient than running a parameter sweep, particularly if there is more than one parameter to optimize. For
details in the optimization algorithm used, please see Particle Swarm Optimization 727 . We will demonstrate how to
use the optimization feature with a simple example. We will find the optimum thickness of an anti-reflection (AR)
layer on silicon. The optimum thickness is the thickness that gives the minimum reflection at the wavelength of
operation, in this case 500 nm. For additional information, see the Optimization and sweeps video.

Associate files
sweep_AR_coating_example.fsp

See also
Optimization scripting commands 722

Computation Resources
Run a parameter sweep 699
Particle Swarm Optimization 727

Optimization properties
NAME: Parameter sweep name.

Setup tab
Optimization and configuration
ALGORITHM - PARTICLE SWARM: Use the Particle Swarm 727 optimization method.
ALGORITHM - USER DEFINED: Create your own User Defined 727 optimization method.
TYPE: Specify if the result should be minimized or maximized.
MAXIMUM GENERATIONS: The maximum number of generations to run. The total number of simulations
to run is the product of Max generations and Generation size.
GENERATION SIZE: The number of simulations per generation.
RESET RANDOM GENERATOR: Enabling this option will reset the random number generator with a fixed
seed. This ensures the same set of random numbers are used for each run of the optimization, which leads
to consistent results between runs.
TOLERANCE: Set a tolerance to stop the optimization early (ie. run less than the maximum number of
generations. The tolerance algorithm is:
- if =0: Always run the specified number of generations.
- if >0: Always run the first 10% of generations. After that, stop the optimization if
bestResult (lastGener ation) - bestResult (10% of generation s ago)
tolerance
bestResult (lastGener ation)
. Basically, this
stops the optimization when the bestResult stops changing.
Parameters
PARAMETER: Property to optimize.
TYPE: Used to specify the type of units for the selected property (eg. length, time).
MIN/MAX: The min/max value of the range of interest.
ADD: Add another line to the parameters table.
REMOVE: Remove a line from the parameters table.
Figure of merit
Multiple results can be collected, but one must be selected as the quantity to optimize. This result must
be a single scalar number. Other results can be matrices.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 717

OPTIMIZE: Select a specific result to optimize (i.e. minimize or maximize this value). The selected result
must be a single scalar value.
NAME: A user specified name for the result. Will appear in the results dataset.
RESULT: Result to collect.
ADD: Add another line to the Figure of merit table.
REMOVE: Remove a line from the Figure of merit table.
SELECT TO OPTIMIZE: Make selected result the one to optimize.

Advanced tab
User defined algorithm tab
FIRST GENERATION SCRIPT: The First generation script can be used to define the initial parameter values
for the initial generation of simulations. This script is not required if you want random starting values.
NEXT GENERATION SCRIPT: This script is used to calculate the parameter values for the next generation,
based on results from previous generations.
TEST: Test the First and Next generation scripts without running any simulations.
SCRIPT OUTPUT: Output messages from the scripts.
Figure of merit script
This tab allows users to calculate a custom figure of merit (FOM), rather than using a value obtained
directly from a monitor or analysis object.
USE FIGURE OF MERIT SCRIPT: Select this option to enable this feature.
FIGURE OF MERIT SCRIPT: This script allows results selected in the 'Figure of merit' section of the
SETUP tab to be post-processed into a final FOM that will be optimized. The script input arguments are
the results selected in the 'Figure of merit' section of the SETUP tab. The script must calculate a variable
named 'fom', which will be used as the FOM to optimize. This variable must be a single, scalar number.

See the Custom optimization algorithms 727 page for examples.

Creating the optimization project


Make sure
you can see
the
Optimization
and Sweeps
window. This
can be done
by going to
the menu
View-
>Windows-
>Optimization
and Sweeps,
or by right
clicking on
the upper
menu bar and
making sure
that
Optimization
and sweeps
is selected.

2003 - 2016 Lumerical Solutions, Inc


718 Lumerical Knowledge Base

Click the Add


optimization
button to
create a new
optimization
task. Click
the edit
button to
open the Edit
optimization
dialog
window.
Optimizations and sweeps window

Note:
Optimizat
ions with
nested
sweeps
It may be
necessary
to use a
nested
parameter
sweep
within an
optimization
task. For
example, to
optimize a
design for
unpolarized
light, it is
necessary
to sweep
over both
polarization
s at each
point in the
optimization
task. For an
example,
see the
Nested
sweeps 707
page.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 719

Once the
optimizer
object is
open, add a
parameter
and browse
the parameter
pulldown
menu. Select
the
"thickness"
property of
the AR
structure.

Next, choose
the Type to
be length and
set the min
and max
values to 10
nm and 150
nm
respectively.
The final
result should
look like the
screenshot
here.
Add a figure
of merit.
Select the
power
transmission
'T' from the
Reflection
monitor (R),
as shown
here.

2003 - 2016 Lumerical Solutions, Inc


720 Lumerical Knowledge Base

Go to the
Setup tab and
choose the
Particle
Swarm
algorithm.
Choose to
Minimize the
figure of merit.
Set the
Maximum
generations to
20 and the
Generation
size to 10
with a
Tolerance of
0. The final
settings edit optimization window
should look
like the
screenshot
here.

Click OK to
accept all
settings, and
go back to
the main
Optimizations
and Sweeps
window. For
more
information of
the SETUP
and
ADVANCED
tab, please
see here 727 .

Running the optimization project


To run the optimization, right click on the
new optimization object and choose Run, or
simply click on the run button in the
Optimizations and Sweeps window.

To distribute the optimization between


several local computers, you must configure
the computation Resources before running
the optimization. Without additional
configuration, all simulations will run on the
local computer.

Optimizations and Sweeps window

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 721

Viewing the results


When the
optimization runs, it
automatically updates
the following window
which shows a plot of
the best figure of
merit as a function of
generation. It also
displays the best
solution found with
the corresponding
parameters. Press
"Stop Optimization"
button to end the task
early, which will keep
all of the results
calculated up to that Optimization Status
point.

At the end of the


task, you can zoom
in on the figure of
merit. We see that a
reflection of less than
0.2% was achieved
within 4 generations
and that the optimum
AR layer thickness is
approximately 60nm.

Optimization Status

2003 - 2016 Lumerical Solutions, Inc


722 Lumerical Knowledge Base

Once the optimization


has been run, you
can view the results
by right clicking on
the optimization
project.

5.5.2.1 Optimization scripting commands


Objective
This page describes how to generate and run an optimization analysis using script commands. The optimization of
the design is done using an advanced optimization algorithm, which requires running a large number of simulations.
This can be much more efficient than running a parameter sweep, particularly if there is more than one parameter to
optimize. The same example used in the section "Optimization" will be re-generated in this page. Using script
commands to generate the optimization is a convenient way when users already have the parameters at their hands.
For additional information and detailed implementation of the script commands, please see the "Measurement and
optimization data" section. Please note that, all the script commands used in this example could also be applied to
sweep and yield analysis.

Associate files
sweep_AR_coating_exampl
e.fsp
optimization_AR_coating
_example_script.lsf

See also
Sweep scripting commands 703
Yield scripting commands 734
Parameter sweeps 699
Optimization 716
Yield analysis 728
Script - Parameters sweeps 1401
Script - Measurement and
optimization data 1644

To generate and run the optimization analysis using script commands, user can open the
sweep_AR_coating_example_script.fsp file and follow the three steps listed below; or, open and run the
script file optimization_AR_coating_example_script.lsf.

Creating the optimization analysis project


The following commands are used to generate and superficially define a new optimization named
"thickness_optimization_script".

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 723

# add a new optimization and set basic properties


addsweep(1);
setsweep("optimization", "name", "thickness_optimization_script");
setsweep("thickness_optimization_script", "Type", "Minimize");
setsweep("thickness_optimization_script", "algorithm", "Particle Swarm");
setsweep("thickness_optimization_script", "maximum generations", 20);
setsweep("thickness_optimization_script", "generation size", 10);
setsweep("thickness_optimization_script", "tolerance", 0);

After the optimization is superficially generated, the parameters can then be defined and added to it. The
following commands define the path, type, optimization window and unit of the parameter. And then add this
parameter to the optimization "thickness_optimization_script".

# define the parameter thickness


para = struct;
para.Parameter = "::model::AR structure::thickness";
para.Type = "Length";
para.Min = 0.05e-6;
para.Max = 0.15e-6;
para.Units = "microns";

# add the parameter thickness to the optimization


addsweepparameter("thickness_optimization_script", para);

Then this optimization analysis will appear in the "Optimizations and Sweeps" tab as shown below.

[click to enlarge]

The next step is to add the results that we want to optimize into the optimization. The commands listed below
define and add the results "R" and "T" to the optimization object as shown in the optimization editing window
below.

# define figure of merit


result_1 = struct;
result_1.Name = "R";
result_1.Result = "::model::R::T";
result_1.Optimize = true;

result_2 = struct;

2003 - 2016 Lumerical Solutions, Inc


724 Lumerical Knowledge Base

result_2.Name = "T";
result_2.Result = "::model::T::T";
result_2.Optimize = false;

# add the figure of merits R & T to the optimization


addsweepresult("thickness_optimization_script", result_1);
addsweepresult("thickness_optimization_script", result_2);

Please note that, only the result R (reflection) is optimized to be minimum in this example. The optimization
"thickness_optimization_script" is now completely defined as shown below.

[click to enlarge]

Running the optimization analysis


When the optimization runs, it automatically updates the Optimization status window which shows a plot of
the best figure of merit as a function of generation. It also displays the best solution found with the
corresponding parameters. Press "Stop Optimization" button to end the task early, which will keep all of the
results calculated up to that point. The following command runs the optimization
"thickness_optimization_script" and loads the results to it. After the optimization has been successfully run,
the optimization process and the optimized resolution will be shown in the "Optimization Status" window as
indicated below.

# run optimization
runsweep("thickness_optimization_script");

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 725

[click to enlarge]

Close the "Optimization Status" window and user can find there are several results stored in the optimization
as indicated below.

[click to enlarge]

2003 - 2016 Lumerical Solutions, Inc


726 Lumerical Knowledge Base

Viewing the results


The optimization results could also be plotted by script commands. The commands below retrieve and plot the
"parameter trend" result as an example.

# get & view the results - parameter value


R = getsweepresult("thickness_optimization_script", "parameter trend");
value = R.getattribute("parameter value");
gen = R.getparameter("generation");

plot(gen, value / 1e-9, "generation", "parameter value (nm)", "thickness");

And the reflection optimization trend is plotted as in the figure shown below. We can see that the optimization
result and the sweep result from the previous section show great agreement with each other and the optimized
thickness to get a minimum reflection is around 60 nm.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 727

5.5.2.2 Custom optimization algorithms


This page provide two example custom optimization algorithms.

Associate files
optimization_user_defined.fsp
optimization_steepest_descent.fsp

See also
Optimization 716
Particle Swarm Optimization 727

The first example shows how to implement a simple 'shrinking box' optimization algorithm, while the second shows
a steepest descent implementation.

5.5.2.3 Particle Swarm Optimization


Particle Swarm Optimization (PSO) is a population based stochastic optimization technique, inspired by the social
behavior of flocks of birds or schools of fish [1,2], and has widely been used for various kinds of design optimization
problems [2] including nanophotonic design [3-7]. In PSO, the potential solutions, called particles, are initialized at
random positions, and then move within the parameter search space. The particles are subject to three forces as
they move:
1. Spring force towards the personal best position, p, ever achieved by that individual particle
2. Spring force towards the global best position, g, ever achieved by any particle.
3. A frictional force, proportional to the velocity.

The algorithm then follows these steps


1. Set the number of particles N and initialize the positions x
2. Evaluate figures of merit (FOM) and find p and g
3. Calculate the new velocities v for each particle based on the forces applied to the particle
r r r r r r r
vt = vt -1 + c1h1 ( pt -1 - xt -1 ) + c2h 2 ( g t -1 - xt -1 ) + (w - 1)vt -1
(1)
4. Update the positions x of each particle based on the velocity
r r r
xt = xt -1 + vt
(2)
5. Repeat from step 2 until convergence is achieved

In Eq. (1), t is the iteration counter; c 1 and c 2 are the cognitive and social factors, respectively; is called the inertial
weight; and 1 and 2 are random number between 0 and 1. Lumerical's PSO implementation uses default values of
c 1, c 2 and that have shown to converge well in many test optimization problems for photonic design problems. A
detailed description of the algorithm and the difference coefficients can be found in Refs. [1] or [2].

The movie below shows how the particle positions and velocities change as a function of iteration when using the
PSO algorithm to find the maximum of a sinc function in 2D space.

2003 - 2016 Lumerical Solutions, Inc


728 Lumerical Knowledge Base

1. J. Robinson and Y. Rahmat-Samii, "Particle swarm optimization in Electromagnetics," IEEE Trans. Antennas
and Propagat. 52, pp.397 - 407 (2004).
2. K. E. Parsopoulo and M N. Vrahatis, Particle swarm optimization and intelligence : advances and applications,
Information Science Reference, 2010.
3. J. Pond and M. Kawano, Virtual prototyping and optimization of novel solar cell designs, Proc. SPIE 7750,
775028 (2010), DOI:10.1117/12.873114
4. M. Kawano and J. Pond, "Design Optimization of Photonic Crystal Organic Solar Cells using the FDTD method
in Combination with Particle Swarm Optimization," 7th International Conference on Optics-photonics Design &
Fabrication, Yokohama, Japan, 19S1-14, 2010.
5. J. G. Mutitu, S. Shi, C. Chen, T. Creazzo, A. Barnett, C. Honsberg and D. W. Prather, "Thin film silicon solar cell
design based on photonic crystal and diffractive grating structures", Opt. Express 16, 5238, 2008
6. M.Shokooh-Saremi and R. Magnusson, "Leaky-mode resonant reflectors with extreme bandwidths," Opt. Lett.
35, 1121, 2010.
7. R. Magnusson, M. Shokooh-Saremi,and E. G. Johnson, Guided-mode resonant wave plates, Opt. Lett. 35,
2472, 2010.

5.5.3 Yield analysis


Objective
The yield analysis tool allows users to run extensive Monte Carlo analysis, sweeping across multiple parameters.
This can be useful for assessing statistical variations of circuit elements on overall circuit performance, as well as
the effects of variations in component-level simulations. You can specify the parameters to vary and the results to
record. The tool runs a number of trials with parameters values generated according to a specified distribution and
returns a yield estimate, which is the percent of trials where the results fall within a specified range of values. The
tool can also display histograms showing the distribution of parameter values used and the distribution of results
from the trials.

This page describes how to run a yield analysis task using an example finite impulse response filter circuit
composed of cascaded Mach-Zehnder interferometers, but the steps for setting up a yield analysis project in all
products are similar. See Optical filters 2321 for more information about this circuit.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 729

Associate files
run_yield.icp
sweep_AR_coating_example.fsp

See also
Yield scripting commands 734

Optical filters 2321

Yield properties
NAME: Yield name.
Configuration
NUMBER OF TRIALS: The number of trials to run.

Properties
NAME: A user specified name for the parameter. Will appear in results dataset.
PARAMETER: Property to sweep.
DESCRIPTION: Parameter statistical distribution settings.
DISTRIBUTION TYPE: Specify the type of statistical distribution. Options include: Uniform, Gaussian,
Lognormal, Truncated Gaussian, Truncated Lognormal, Discrete (uniform distribution where variables can only
take discrete values specified by the STEP).
DISTRIBUTION MEAN: Mean value of the distribution for Gaussian, Lognormal, Truncated Gaussian, and
Truncated Lognormal distributions.
DISTRIBUTION STD DEVIATION: Standard deviation of the distribution for Gaussian, Lognormal, Truncated
Gaussian, and Truncated Lognormal distributions.
DISTRIBUTION MIN/MAX: Minimum/Maximum value or cut-off value for Uniform, Truncated Gaussian,
Truncated Lognormal, and Discrete distributions.
DISTRIBUTION STEP: The discrete step size of allowed values for Discrete distribution.
DISTRIBUTION SEED: The seed value used to generate parameter values. The seed used can either be an
automatically generated random seed, or the user can specify a value for the seed so that the same results
can be achieved each time the yield analysis is run.
ADD: Add another line to the properties table.
REMOVE: Remove a line from the properties table.

Results
NAME: A user specified name for the result. Will appear in results dataset.
RESULT: Result to collect.
ESTIMATION: If "true" is selected in the Estimation field, the trial will be considered a pass if the result falls
within the specified min/max range. If there is more than one result with a yield estimate, the final yield
percentage will be the percent of trials where all of the results fall within the specified ranges.
MIN/MAX: Min/max range when the Estimation property is set to True.
ADD: Add another line to the results table.
REMOVE: Remove a line from the results table.

Creating the yield analysis project


Make sure that you can see the Optimizations and Sweeps window. This window can be opened by going into
the top menu under View->Windows and selecting Optimizations and Sweeps, or by right-clicking on the

2003 - 2016 Lumerical Solutions, Inc


730 Lumerical Knowledge Base

upper menu bar for a list of windows and selecting Optimizations and Sweeps from the list.

Click the Create New Yield Analysis button in the Optimizations and Sweeps window to create a new yield
analysis task. Click the Edit button to open the Edit yield analysis dialog window.

Once the yield analysis object is open, set the Number of trials to 20. Add a parameter (button on the right-
hand side of the Properties section) and change the name of the property to "ng1". Double-cick on the
Parameter field and browse the pulldown menu. Select the group index property of the SW1 waveguide.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 731

Next, double-click on the description field of the property to open the Edit distribution dialog window. Select
Gaussian as the distribution type and set the mean value of the distribution to 8.05 and the standard deviation
to 0.085 as shown in the following screenshot.

Click OK to accept the settings. Repeat the steps above to add the "ng2" and "ng3" properties corresponding
to the group index of the SW2 and SW3 waveguides (use the same distribution properties).

Add a result to record using the button on the right-hand side of the Results section of the window and change
the name of the result to "fsr_1". Double-click on the Result field of the result to browse available results and
select the free spectral range result from input 2 of the Optical Network Analyzer. Double-click on the
estimation field of the result and set this to true. Next, select the minimum and maximum values of the yield

2003 - 2016 Lumerical Solutions, Inc


732 Lumerical Knowledge Base

range by setting the value in the Min field to 1e11, and the value in the Max field to 2e11. Next, add two more
properties: the bandwidth and the gain from input 1 of the Optical Network analyzer, and set Estimation field to
false for these two properties. The final yield analysis window should look like the following

Click OK to accept all settings, and return to the main Optimizations and Sweeps window.

Running the yield analysis


To run the yield analysis, select the yield analysis task in the Optimizations and Sweeps window and click the
run button.

Viewing the results


The yield analysis runs the trials in batches of 10 or less and automatically updates the following window after
each batch of trials. After the yield analysis has been run, the parameters and results are listed at the right-
hand side of the window. Selecting a result will generate a histogram with 10 bins showing the distribution of
values of the result. If the estimation property of the result was set to true, then the minimum and maximum
values specified by the user are also indicated in the histogram.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 733

The log at the bottom of the window shows the calculated yield percentage which corresponds to the
percentage of trials where all of the results fall within the specified yield estimate ranges.

Selecting a parameter generates a histogram for that parameter.

Selecting both a parameter and result generates a plot showing the value of the parameter versus and result
for each trial and the yield estimate range.

2003 - 2016 Lumerical Solutions, Inc


734 Lumerical Knowledge Base

Yield analysis results can also be obtained in the script environment with the command getsweepdata,
which is similar to the command getdata. The name of each data member is the Name column that you
specified when adding the parameters and results, in this case the result is "input 2/mode 1/peak/free
spectral range". For example, the following 2 lines of script will plot the histogram showing the
distribution of free spectral range values.
yfsr=getsweepdata("yield ng","input 2/mode 1/peak/free spectral range");
histc(yfsr);

5.5.3.1 Yield scripting commands


Objective
This page describes how to generate and run a yield analysis using script commands. The yield analysis tool allows
users to run extensive Monte Carlo analysis, sweeping across multiple parameters. This can be useful for assessing
statistical variations of circuit elements on overall circuit performance, as well as the effects of variations in
component-level simulations. The same example used in the section "Yield analysis" will be re-generated in this
page. For additional information and detailed implementation of the script commands, please see the "Measurement
and optimization data" section. Please note that, all the script commands used in this example could also be
applied to sweep and optimization analyses.

Associate files
run_yield.icp
yield_ng_script.lsf

See also
Sweep scripting commands 703
Optimization scripting commands 722
Parameter sweeps 699
Optimization 716
Yield analysis 728
Script - Parameters sweeps 1401
Script - Measurement and optimization data 1644

To generate and run the yield analysis using script commands, user can open the

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 735

run_yield_example_script.icp file and follow the three steps listed below; or, open and run the script file
yield_ng_script.lsf.

Creating the yield analysis

Running the yield analysis


Viewing the results
5.6 Result analysis
This chapter describes result analysis tools and techniques used in a layout environment.

Working with the graphical layout environment 735 This section describes the way in which the integrated
analysis routines are used to visualize and analyze
simulation data.
Eigensolver Analysis 749 This section describes the Finite Difference Eigenmode
Solver 109 (FDE) analysis component of MODE
Solutions.
EME propagator analysis 774 This section describes the Eigenmode Expansion
Solver 114 (EME) analysis component of MODE
Solutions.
Data export 758 This section describes how data can be exported to
other software packages for further analysis or formal
presentation
Analysis groups 798 This section describes all analysis groups in the object
library (for optical solvers only)
Other analysis tools and testing methods 859 This section describes other analysis tools and testing
methods

5.6.1 Working with the graphical layout environment


This section describes the way in which the integrated analysis routines are used to visualize and analyze
simulation data.

The Analysis mode 736 This page describes the concept of the Analysis
mode.
Results Manager 736 The Results View window shows all the results for
the simulation object that is currently selected in the
Object Tree. The Script Workspace and Script
Favorites windows work in conjunction with the
scripting environment to provide additional GUI-
based functionalities.
Visualizer and figure windows 740 The general ways in which data can be visualized
Visualizer introductory video 741 and analyzed is detailed. The plotting functions, a
Visualizer and figure settings 741 central component to the overall analysis routines
Visualizer attributes and parameters 748 are described.

2003 - 2016 Lumerical Solutions, Inc


736 Lumerical Knowledge Base

5.6.1.1 The Analysis mode


This page describes the concept of the Analysis mode.

Before describing how the analysis routines are used for data visualization, it is important to understand the way in
which the integrated analysis tool interacts with the simulation environment. Following the completion of a
simulation, the simulation data is written into the simulation project file; even premature termination of a simulation
results in a partial dataset being written to the file. When the simulation completes, or the simulation is prematurely
terminated by pressing the QUIT & SAVE button, the project file will be in Analysis mode, meaning that any

modification of the data will require switching back to the layout mode . For details of the Job Manager, such
as Autoshutoff level, please see Running a simulation 213 .

Job Manager

In Analysis mode, simulation object properties can be viewed ( symbol means the object has data or results,
similar to havedata and haveresult command) , but not edited. This ensures that at any given time, the
simulation data results corresponds to the configuration of the simulation project. Once in the analysis tool, the user
continues to analyze the simulation data until they either wish to close the application, or they decide to alter the
simulation objects and re-perform the simulation. By exiting the analysis routines and returning to the layout editor,
existing simulation data will be erased.

Note: Re-performing a simulation without losing the existing data


If you would like to keep the existing data and re-run a simulation, the
easiest way is to save the simulation with a new file name. Then the new data
will be saved to the new file. Another way is to send the data to your Script
Workspace, data in this field will not be replaced by re-running the
simulation. To do this, right-click the results/data in the Results View 736 , and
choose "Send to script".

Note: Sending simulation files to support@lumerical.com


.fsp files in Analysis mode can be very large in size (i.e., larger than few gigabytes), it is recommended to
send the file in layout mode while communicating with the our support engineers.

5.6.1.2 Results Manager


The Results Manager is a tool for analyzing simulation data. The Results View window shows all the results for the
simulation object that is currently selected in the Object Tree. The Script Workspace and Script Favorites windows
work in conjunction with the scripting environment to provide additional GUI-based functionality.

When used in conjunction with the Visualizer 740 , the Results Manager provides a very useful and intuitive way of
analyzing and visualizing variables and results through the GUI, greatly reducing the need for scripting.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 737

Script Workspace and Script Favorites

Result View

Result View
This page describes the usage of Review View. The Result View window shows all the results for the
simulation object that is currently selected in the Object Tree.

Object tree

Result View - profile

Any simulation object that have results will be displayed with a symbol on the bottom-right corner (similar
to havedata and haveresult command). The name of the available results, and the corresponding
dimensions or are displayed in the Dimensions/Value column. One can right click on any of the results to
display them in the Visualizer 740 , or to send the to the Script Workspace for further post-processing.

With the use of datasets, allowing one to package raw data into meaningful results that can be easily
parameterized and visualized. The results for all the standard monitors can be retrieved in the original raw, un-
parameterized matrix form (using getdata 1403 ), or in dataset form (using getresult 1402 ). For example, in the

2003 - 2016 Lumerical Solutions, Inc


738 Lumerical Knowledge Base

Result View figure above, the results listed under rawdata can be obtained using the getdata command. The
results listed under "results" are datasets, and can be obtained using the getresult command (these
calculations will only be carried out when they are visualized). The icons associated with each result reflect
the type of result:

String
Matrix: this is a simple matrix result, with no associated parameters
Matrix dataset: this is a parameterized matrix results that contains at least an attribute (result), and an
associated parameter
Rectilinear dataset: this is a parameterized matrix result that is associated with a rectilinear grid
Unstructured data: this is a set of data that is not structured in form of a dataset or a matrix and rather
consists of several different types of results

For more detail on how to work with datasets in the scripting environment, please see Accessing simulation
data 1401 . Analysis group objects from the Object library have been updated to return datasets. For an example
of how to define dataset results in an analysis group, please see Analysis groups 479 .

The raw data results are all un-parameterized, simple matrix results. To create parameterized matrix datasets
from matrices, use the "Send to script" option to copy the variable into the Script Workspace.

Script Workspace and Script Favorites


The Script Workspace shows all the variables in the current scripting environment. The variables' current
values as well as the corresponding dimensions are shown in a list format. Users can use the Visualizer 740 to
visualize any variable listed in the Script Workspace by right-clicking on the variable and selecting "Visualize".

The icons in the script workspace above shows that while "sigmaabs" and "sigmascat" are parameterized
matrix datasets (since they were the results returned directly by the cross section analysis groups),
"sigmaext" is a result that we defined in the script, and is therefore a simple un-parameterized matrix. For
example, simply right-clicking on sigmaext and selecting "Visualize" will generate the following plot in the
Visualizer:

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 739

Here, the extinction cross section is plotted as a function of the index value. To associate it with the
corresponding frequency array, select the "Create visualization" option, which will open the "Visualization
Creator" dialog window:

This window allows users to set the name of the parameterized variable (sigmaext_vs_f) and its parameters (f).
Once this is defined, the visualization creator will generate the commands necessary for creating the
parameterized dataset in the Script Favorites window. When this command is ran, it will send the new
parameterized variable to the Visualizer, which will plot the variable as a function of the user specified
parameter.

Generated Command

Generated Figure
In addition to the commands generated by the visualization creator, the Script Favorites window also allows
users to define their own favorite commands by selecting "New command" and "Edit".

2003 - 2016 Lumerical Solutions, Inc


740 Lumerical Knowledge Base

5.6.1.3 Visualizer and figure windows


The Visualizer is a tool for analyzing data. Simulation data from a variety of objects (monitors, parameter
sweeps...etc) can be sent to a Visualizer.

See the Visualizer 741 video for additional information on the visualizer.

Optical Solver
Electrical Solver

The upper-left portion of the window is the plot area, which displays the current data defined by the settings in the
upper-right of the window (plot settings). The following sections describe the many options available for controlling
what data will be displayed in the plot area. These sections can be minimized if more area for plotting is required.
Data that gets added to the Visualizer is retained until it is removed (i.e., with the "Remove" button or by pressing
"X" on the top right corner of the window). This is useful for comparing results across different sets of data.

Visualizer

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 741

5.6.1.3.1 Visualizer introductory video


This introductory video shows how the data visualizer can be used to view simulation data.

See also
visualize 1529 script command
Visualizer 740 reference guide
lumerical datasets 1461
Paraview - advanced data visualization 790
using Matlab for advanced analysis 1410
Plasmonic bullseye 1910 FDTD Solutions
example
Nanobeam PC Electro-optic Modulator 2250
DEVICE example
Transceiver 2308 INTERCONNECT example

5.6.1.3.2 Visualizer and figure settings


The settings control the overall type of plot and the labels applied to it. The plot settings can be further edited by
clicking on the pencil icon on the top left corner of the plot window .

See the Visualizer 741 introductory video for additional information

1D, 2D and 3D Figures


Simulation results can be visualized using 1D line, 2D surface and 3D vector field plots. These plots can be
created from within the results visualizer ("plot in new window" button), or from the scripting language 1524 .

2003 - 2016 Lumerical Solutions, Inc


742 Lumerical Knowledge Base

1D
3D

2D

All plots support operation such as axis labels, zoom, export to JPG, etc. They all support the same zoom
functionality as in the layout editor. Pressing the left mouse button to zooms in by a factor of two, the right button
to zooms out by a factor of two, pressing and holding the left-hand mouse button results in a zoom window, and
double-clicking either mouse button scales the plot to show all of the data. Some controls are slightly different for
each type of plot (see more details in the next sections). For example, only the 3D vector plot provides controls for
3D rotation of the view; SHIFT key + mouse LEFT click allows pan view without 3D rotation. For image plots, the
color map scale can be changed from color to grey, or red2blue.

The FILE menu contains an option to export the current figure to a JPG image file.
The SETTINGS menu contains options for setting the axes, colorbar limits, color map, labels, etc.

Visualizers for rectilinear data


In this section we describe the visualizer tools for data structured in a rectilinear grid.

Plot types

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 743

Line: xy plot

Choose this option to plot a 1D vector versus another 1D vector.


For matrices with more than 1 dimension, a slice of the matrix
will be automatically chosen. You can use the parameters table
on the bottom to choose which dimension to slice and which to
plot on the x or y axis. E.g., a spectrum (field vs wavelength)

Line: Smith chart

Use this option for plotting impedance data. For more information
see this Wikipedia article.

Example: Microstrip with a lumped RLC element 2149

Line: Polar plot

Choose this option to plot the angular distribution of some


quantity. The angular coordinate is in degrees. The data must be
provided as a function of the angle in radians.

Example: Mie scattering 3D 1752

Surface

Choose this option to create a 2D image plot of monitor data. For


matrices with more than 2 dimensions, slices of the matrix will
automatically be chosen. You can use the parameters table on
the bottom to choose which dimensions to slice and which to
plot on the x or y axis. E.g., a spatial field profile (field vs x,y),
slice wavelength.

2003 - 2016 Lumerical Solutions, Inc


744 Lumerical Knowledge Base

Vector

Choose this option to create a 2D/3D vector plot of monitor data.


Choose the parameters table to slice a frequency point. It is
possible to create a vector plot of quantities such as the electric
field, magnetic field, poynting vector, etc.

Tips:
It is often more meaningful to plot the Poynting vector rather
than the fields. Plots of the electric field will often contain
vectors pointing in different directions representing the
oscillation of the field direction. The more interesting quantity
to plot is the Poynting vector to visualize the direction of power
flow.
It can be helpful to create an electric field vector plot to study
circularly polarized or elliptically polarized beams. See the
circular polarization example 540 .

Toolbar

Select, Zoom, Pan view, Zoom Extent: See Layout Editor - Toolbars 199 .

MATLAB export / MATLAB export script: Only available for line-xy and surface plots. These
buttons generate a MATLAB plot using the data plotted in the Visualizer; In addition, the MATLAB export
script button creates a script that generates the plot in MATLAB. It requires MATLAB integration. To
switch between these two buttons click and hold the button until you see the two options as shown
below:

Export to JPG: It exports the figure to a JPG file. For line plots it is possible to export to PDF and
EPS files as well. Click and hold the button to see the available options as shown below:

Show/hide chart settings: Opens the Visualizer settings described in the next section.

Get help with graph control options: Available for vector plots only. Shows a description of the
control options to zoom in/out, rotate, pan, spin, switch between wireframe and solid view, and reset
camera.

Visualizer settings

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 745

Line plot

TITLE: The title of the plot can be specified.


EDIT LEGENDS: The legends for the plots
can be specified.

xy-plot additional options:

X/Y LABEL: The x and y labels for the plot xy plot Sm ith chart Polar plot
can be specified.
SET AXIS LIMITS: The x and y limits for the
axis can be set.
NUMBER OF TICKS: The number of axis
dividers on the x and y axis can be specified.
The default is 10.

One can also choose to show/hide the title


and legends, draw the x and y axis at (0,0),
plot multiple figures using the same color,
plot the x and/or y axis on a log scale, show/
hide grids for the axis and choose to show
the plots in grey scale.

Smith chart additional options:

ASPECT RATIO: Chose between 1:1 and fill


scene.
NORMALIZING IMPEDANCE (OHMS): Set
the characteristic impedance of the system
used for normalization.

Polar plot additional options:

SET AXIS LIMITS: The x and y limits for the


axis can be set
Surface and vector plots

TITLE: The title of the plot can be specified.


X/Y/Z LABEL: The x, y and z labels for the
plot can be specified.
SET COLOR BAR LIMITS: The min/max
values for the color bar can be specified.

Surface plot additional options:

SET AXIS LIMITS: The x and y limits for the


axis can be set.

One can also choose to plot the the data in Surface plot Vector plot
logarithmic scale and choose between three
different color schemes (jet, red to blue and
grey scale).

Vector plots additional options:

One can also choose to down sample the

2003 - 2016 Lumerical Solutions, Inc


746 Lumerical Knowledge Base

data, scale vectors by a given factor, show


data points, invert background color, apply
illumination, and use parallel projection.

Plot data redraw options: There are two options:


Hold plot settings: When enabled, the current settings (e.g. color bar limits) are applied to any data set (or
slice of it) plotted in the visualizer.
Auto redraw: When enabled, the plot is refreshed automatically after any change in the settings or data set
selection. If the option is disabled, it is necessary to click on the Redraw button to update the plot; this is
particularly useful when visualizing large data sets.

EXPORT TO: Export figure to JPEG, text file or clipboard


PLOT IN NEW WINDOW: Open the plot in a new window

View options: Show/hide Attribute & Parameter panes

Visualizer for unstructured data (DEVICE)


The visualizer for unstructured data is very similar to the one for rectilinear data described in the previous
section. However, for unstructured data the only plot type available is surface and some toolbar buttons are not
available. In addition, the visualizer settings are significantly different as described next.

Some of the visualizer settings are common to 2D and 3D simulation data. These are:

SHOW: Can be "surface", which will contain the values at each mesh point only, or "surface and mesh", which
will superimpose in black the mesh grids on top of the plots, or "mesh only" which will only plot the mesh grid in
color.
AXIS SCALE OPTIONS: Can be "square" which will make sure the two axis are plotted to the same size, or
"equal" which will use the same scale for both such that the plot will be to scale.
LOG SCALE: Will plot the result on a log scale.
TITLE: The title of the plot can be specified.
X/Y/Z LABEL: The x, y and z labels for the plot can be specified.
COLOR BAR: The color bar limits can be specified and locked. Additionally, it is possible use a background
and border for the color bar.

The specific options for 2D and 3D data are described below.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 747

Options for 2D data


It is possible to choose between two plot types: surface and image. In the 2D image plot, the values are
indicated using the color bar. In the surface plot, the values are also plotted in the third dimension.

Im age plot
Surface plot

Options for 3D data


DATA VISUALIZATION: Choose between three options: unclipped (default), clipped volume and clipped
plane. When a clipping option is selected a clip plane cuts through the 3D structure and gives insight into
the inside of the 3D plot.
CLIP PLANE: The clip plane can be shown on top of a 3D surface plot. This plane is defined by the
coordinates of the origin and components of a vector perpendicular to the plane. For convenience, there are
also the quick options for choosing a x normal / y normal / z normal plane. The inside out option will flip
which side of the plane is shown. To change the plane position and/or orientation, move the arrow
perpendicular to the plane, grabbing it with a mouse left click much like a drag action. For Pan view, hold
the keyboard SHIFT key and mouse left click.

Clipped volum e Clipped plane

2003 - 2016 Lumerical Solutions, Inc


748 Lumerical Knowledge Base

2D PLANE DATA: Use this option to export the cross-section 2D data at the clip plane to the script
workspace or to show it in a new Visualizer window.

5.6.1.3.3 Visualizer attributes and parameters


An attribute is a quantity to plot (ie. Power transmission vs frequency). Multiple attributes can be sent to a single
visualizer. In addition to the attributes, data sets also contain the associated position vectors (eg: position,
frequency).

See the Visualizer 741 introductory video for additional information

Attribute
When using line plots, each attribute will appear as a separate line. When using image and vector plots, the
selected attribute will be shown.

DATA SET: full data set name (can contain multiple attributes)
ATTRIBUTE: attribute name
VECTOR OPERATION: selects a particular component of a vector attribute e.g. (Ex, Ey, |E|^2)
SCALAR OPERATION: selects a particular component of a scalar attribute e.g. (real, imag, abs, angle)
SCALE: multiplier for the data being plotted
LEGEND: this name will be shown in the legend of the plot
NOTES: additional information added by the user about the attribute
VIEW DATA: allows users to view the data in a table format as shown below

In this table format, users can select any portion of the data and "Copy" or "Export" it into a text file.
Alternatively, users can also send any portion of the data into the Script Workspace.

Parameter

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 749

ATTRIBUTES: Name of the associated attribute


PARAMETERS: Name of the parameter
ACTION: Control how the parameter is treated in the plot. For example, select which axis to plot the
parameter on.
VALUE: displays the value if it is a singular value or is blank if there is a vector of values

Plotting multi-dimensional attributes


Line plots
One parameter must be selected to plot on the X axis. All other non-singleton parameters must be set to
Slice. A specific slice can then be selected for those parameters.

Surface plots
Two parameters must be selected to plot on the X and Y axis. All other non-singleton parameters must be set
to Slice. A specific slice can then be selected for those parameters.

Vector plots
The spatial dimensions (x,y,z) are always selected to plot on the X, Y, Z axes. All non-spatial parameters
must be set to Slice. A specific slice can then be selected for those parameters.

5.6.2 Eigenmode solver Analysis (FDE)


This section describes the Finite Difference Eigenmode Solver 109 (FDE) analysis component of MODE Solutions,
once the physical structure and the simulation region have been defined. Some of the parameters can be set through
the script 1605 .

2003 - 2016 Lumerical Solutions, Inc


750 Lumerical Knowledge Base

Click to enlarge

The Eigenmode Solver analysis window can be opened by pressing the Run Active Simulation button in the
toolbar in CAD (with the Eigenmode Solver region set as active) or by selecting Analysis in the menu which appears
when you select VIEW->WINDOWS or right click at the top of the CAD widow.

Within the Eigenmode Solver analysis window there is a mode list, a deck for storing modes, three tabs for the
analysis and a section for the plots:
Mode List and Deck 751 This page describes the Mode list and Deck at the
top of the analysis window.
Modal Analysis tab 753 In this tab, the different modes supported by the
Set calculation parameters 754 structure can be solved for, and the spatial field data
Power and impedance integration 755 can be visualized. Also, it is in this tab where the
Far field settings 757 bent waveguides can be studied. This is where the
Data export 758 analysis process begins.
Frequency Analysis tab 758 In this tab, one of more modes can be analyzed as a
Set calculation parameters 760 function of frequency. Here, the frequency
Data export 761 dependence of the effective index, dispersion and
various other properties can be determined.
Overlap analysis tab 762 In this tab, one of the modes that has been solved for
Overlap 763 and can be overlapped with another mode to
Beam 765 determine, for instance, the coupling efficiency
between two modes.
Advanced options 767 At the bottom of the window, there is an advanced
options button which provides some options for
advanced users.

For a step-by-step tutorial of an Eigenmode solver example, please see the following video:

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 751

For more information such as tips on finding a mode and lossy mode, please see Others and examples 768

5.6.2.1 Mode List and Deck


As shown on the previous page, the top of the analysis window contains the Mode List and the Deck.

For a step-by-step tutorial of an Eigenmode solver example, please see the video in Eigensolver Analysis 749 .

MODE LIST
The mode list shows all of the modes that were calculated in the MODAL ANALYSIS tab along with their
effective index, loss (if applicable), and TE fractions.

Two definitions for TE fractions are provided by MODE Solutions. The "TE polarization fraction Ex" for
propagation along the z direction is defined by the following equation:

2
Ex dxdy

( Ex )
2 2
+ Ey dxdy

where |Ex|^2+|Ey|^2 corresponds to |E_parallel|^2 (since we are considering the polarization of the modes, we
only consider the fields parallel to the mode cross section). For propagation along the x/y direction (ie. "TE
polarization fraction Ey/Ex"), this is similarly defined:
2 2
Ey dydz Ex dxdz

( Ey ) ( Ex )
2 2 2 2
+ Ez dydz + Ez dxdz
,
This definition is typically used in integrated optics, but for fibers, this also helps to determine the polarization
of the mode. Note that this definition is arbitrary (since we allow for propagation in any direction), the user may
have to look carefully at the field components if unusual orientations of the Eigenmode Solver are used.

There are alternative definitions which are used more frequently for other applications/fields. For example, the
"waveguide TE/TM fraction" is defined by the following equations:

2 2

1-
E ^ dxdy
1-
H ^ dxdy

(E )dxdy and ( H )dxdy


2 2

2003 - 2016 Lumerical Solutions, Inc


752 Lumerical Knowledge Base

E
where ^ and
H ^ refers to the field component in the direction of propagation (ie. perpendicular to the mode
cross section).

Note: Calculating loss


Mode loss is calculated based on the imaginary part of the effective index.

E ( z ) = E 0 e -ink0 z & Power ~ E 2


P ( z = 1) e - 2ink0 z 10ni 4 p
Loss (dB / m) = 10 log 10 = 10 log 10 ( )=
P ( z = 0) 1 l0 ln 10
where ni is the imaginary part of the effective index.

OBJECT TREE
The modes in the mode list described above, as well as results from Frequency analysis 758 are also stored in
the "data" analysis group under the Eigenmode Solver simulation region. One can study these results using
the Lumerical Visualizer 740 .

DECK
The deck section of the analysis window shows all the stored D-CARD data.

D-CARDs are data repositories that store all the information necessary to perform complex operations such as
modal overlaps. D-CARDs on the deck can be modes calculated in MODE Solutions and copied from the
mode table (by right-clicking on the desired mode), or loaded from file. Also, D-CARDs can be imported from
ASAPTM output, they can be imported from FDTD Solutions, or they can be a default Gaussian beam. Each
D-CARD contains a large amount of data, such as vectorial electromagnetic fields, frequency vectors and
effective indices. By manipulating this information as a D-CARD, the user can easily view, store, manage and
analyze large amounts of data with a few mouse clicks.

NOTE: Calculated analysis data is not lost if you close the analysis window
The analysis window can be closed by pressing the close button (red cross at the top right side of the window in
the image above). When you re-open the window (for example by pressing the the Run Active Simulation button

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 753

) all the data that was calculated before the window was closed will be available. Also, it is possible to open
CAD and examine the properties of the structures and the simulation region when analyzing a particular mode.
However, to make changes to these structures MODE Solutions must first be switched back into Layout Mode.

This can be done by presssing the Switch to Layout button in CAD. When you switch to layout all local
data that has been calculated for the current structure will be lost. This ensures that if you have a file with data
stored in the analysis tab, then that data will belong to the structure which is in the CAD environment.

5.6.2.2 Modal Analysis Tab


The MODAL ANALYSIS tab is shown in the screenshot below, and the various components of the window are
labeled for future reference.

For a step-by-step tutorial of an Eigenmode solver example, please see the video in Eigensolver Analysis 749 .

Using the options pull-down menu, you can select options to


set the parameters 754 for calculating modes and subsequently calculate the modes
calculate intensity, power, or characteristic impedance 755 for a mode that was calculated by using the "set
calculation parameters" option
compute far field projections 757
export modal data 758 that was calculated by using the "set calculation parameters" option

Settings available in the option settings section of the modal analysis tab will change depending on which
option was chosen in the pull down menu. The options pull down menu items and the associated option
settings are described in the next few pages of this section of the reference guide.

As soon as modes are calculated, the mode plot window will contain the near field data for a mode. You can
pick which mode to plot by selecting the mode you are interested in with the mouse in the mode list. When far
field calculations are carried out, the plot shows the far field data. The plotting options are discussed in the
mode plot options page following the options pull-down menu items.

Mode plot options


The mode plot options allow changes in the plot shown above the options. In addition, you can use the PLOT
IN NEW WINDOW button to create plots in a new figure window.

2003 - 2016 Lumerical Solutions, Inc


754 Lumerical Knowledge Base

The plot options are:


PLOT: There are two pull down menus which allow you to choose which data to plot
COMPONENT: Choose the field component to plot. The options will change depending on whether the
coordinates are Cartesian or spherical.
COORDINATES: Specify whether the data is plotted on a CARTESIAN or a CYLINDRICAL coordinate
system.
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

5.6.2.2.1 Set calculation parameters


With the option pull-down box set to SET CALCULATION PARAMETERS, the modal analysis tab displays the
calculation parameters. Some of the parameters can be set through the script 1605 .

The parameters shown include:


FREQUENCY: the frequency at which the modes are solved
WAVELENGTH: the wavelength at which the modes are solved
MESH STRUCTURE: used to produce a mesh of the structure which can be examined in the visualization window
NUMBER OF TRIAL MODES: the number of modes to calculate
SEARCH NEAR N / SEARCH IN RANGE: these options allow the user to search around a specific value of
effective index, or find all of the modes within a range of effective index values. With the "near n" option, users can
type complex effective index values (ex. 0.5+5i), which is very useful for studying modes with high loss.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 755

BENT WAVEGUIDE: This checkbox is used to specify whether the waveguide is bent
BEND RADIUS: The radius of curvature of the bend
BEND ORIENTATION: The direction in which the waveguide is bent; refer to Bent waveguide calculation 359 in User
Guide for more details.
CALCULATE MODES: Starts the calculation
RESTORE LAST SETTINGS: Resets all the settings in this tab to those that were used to calculate the modes in
the mode list.

5.6.2.2.2 Pow er and impedance integration


With the option pull-down box set to POWER INTEGRATION, the modal analysis tab displays the settings used to
spatially integrate the power distribution of the calculated modes. It allows users to drag and draw a region for
integration or define the region by the vertices using the GUI.

2003 - 2016 Lumerical Solutions, Inc


756 Lumerical Knowledge Base

The power integration parameters are as follows:


INTEGRATION SHAPE: Options include circular, and rectangular.
INTEGRATE: Options include power, electric field intensity, or current (which returns the characteristic
impedance). In the far field, only power integration is allowed so that the normalization to the near field mode is
physically meaningful. Note that in the far field, the power is proportional the electric field intensity.
X1, X2, Y1, Y2 (or Z1, Z2) (valid for rectangular integration): defines the vertices of a rectangle over which the
quantity of interest is integrated
CENTER X, CENTER Y (or CENTER Z), RADIUS (valid for circular integration): defines the center and radius of a
circle over which the quantity of interest is integrated
NORMALIZE TO (valid for far field only): Two options exist:
o NEAR FIELD MODE: Allows the user to normalize to the near field, or
o PROJECTION SURFACE: Allows the user to normalize to the total far-field quantity
ANGLE (valid for far-field angular integration): defines angular cone over which the quantity of interest is integrated
FRACTION INTEGRATED: The result of the integration procedure for power or electric field intensity integration
options. This quantity updates itself as variations in the above parameters are made
CHARACTERISTIC IMPEDANCE: The result of the integration procedure for the current integration option. This
quantity updates itself as variations in the above parameters are made. The characteristic impedance is calculated
using
P
Z0 =
I2
Where P is calculated from the Poynting vector integrated over the 2D surface of the integration region:
P = P dS
S

And I is the current calculated by integrating the H field around the outer edges of the integration region:
I = H dl
c

GRAPH CONTROL:
o DEFINE INTEGRATION REGION: In this state, the mouse is used to graphically define the region over which

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 757

the integration will be performed


o ZOOM: In this state, the mouse controls the zoom of the current figure in the visualization window

5.6.2.2.3 Far field settings


With the option pull-down box set to FAR FIELD SETTINGS, the Modal Analysis tab displays the settings used to
project near field profiles into the far field.

The following parameters are required:


PROJECTION METHOD:
o ANGULAR: Projects the near-field into an angular coordinate system using a fully-vectorial, accurate algorithm.
For slab waveguides, the far field information is plotted as a function of position. For waveguides with a two
dimensional cross-section, it is plotted in polar coordinates.
o PLANAR: Projects the near-field into a Cartesian coordinate system using a fully-vectorial, accurate algorithm.
MATERIAL INDEX: This field specifies the refractive index through which the far field projection is performed
Z DISTANCE (only valid for planar projections): This field specifies the distance (in the units specified) to the
projection plane
POINTS IN X, Y (or Z): These fields allow the user to specify the number of points in the projection plane. The
larger the number of points, the longer it will take to calculate the far field projection.
WIDTH, HEIGHT (only valid for planar projections): the physical extent of the far-field plane, measured in the units
specified
X, Y, Z (only valid for planar projections): this specifies the center of the projection plane
RECENTER: pressing this button will result in recalculation of the far-field projection, centered on the X, Y, Z
values specified for the center location
CALCULATE: this button will calculation of the far-field projection

2003 - 2016 Lumerical Solutions, Inc


758 Lumerical Knowledge Base

5.6.2.2.4 Data export


The data export pull-down is where the user can save the calculated mode data to a file that can read in by another
application for additional visualization or analysis.

The data export options are as follows:


MODE FILENAME: the filename to which the data will be saved. The file will appear in the same directory in which
the simulation project appears.
EXPORT FORMAT: these radio buttons are where the user specifies if they want the data saved to a text file, a
Matlab-compatible file or a Lumerical .ldf file. The available options for the text file include column-formatted data,
standard format data. For more information about the available options, consult the File I/O 1426 section.
ITEMS TO EXPORT: these checkboxes allow the user to specify which part of the calculation data they wish to
export. Options include:
o EFFECTIVE INDEX DATA: exports the real and imaginary effective index data.
o MATERIAL PROPERTIES: exports the vectors (1D) and matrices (2D) containing the permittivity (real and
imaginary) and conductivity values for the x, y, and z directions.
o SELECTED MODES: exports the electric and magnetic field values in the x, y, z directions (i.e. Ex, Ey, Ez,
Hx, Hy, and Hz) and vectors containing the x and y (or z) positions at which the values are calculated.
o SELECTED MODES, FAR FIELD ANGULAR: exports the far-field patterns of the electric field intensity in a
polar coordinate system with x and y components of the unit vector defining the direction in which the values are
calculated.
o SELECTED MODES, FAR FIELD APPROXIMATE: exports the far-field patterns of the electric and magnetic
field values in the x, y, z directions (i.e. Ex, Ey, Ez, Hx, Hy, and Hz) and vectors containing the x and y (or z)
positions at which the values are calculated.
o SELECTED MODES, FAR FIELD EXACT: exports the far-field patterns of the electric and magnetic field values
in the x, y, z directions (i.e. Ex, Ey, Ez, Hx, Hy, and Hz) and vectors containing the x and y (or z) positions at
which the values are calculated.

5.6.2.3 Frequency Analysis Tab


The FREQUENCY ANALYSIS tab is shown in the screenshot below, where the various components of this tab are
labeled for future reference.

For a step-by-step tutorial of an Eigenmode solver example, please see the video in Eigensolver Analysis 749 .

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 759

Options pull down


set parameters 760 for running a FREQUENCY SWEEP
export modal data 761 that was calculated by using the "set calculation parameters" option

The option settings section of the modal analysis tab will change depending on which option was chosen in the
pull down menu. The mode and frequency plot window shows the mode data for the current mode in the frequency
sweep and a mode which was selected from the mode list.

MODE PLOT and FREQUENCY PLOT tab


You can control various options of the frequency sweep plot, or the mode plots (initial plot and current plot) by
selecting various options. The mode plot options are the same as in the Modal analysis 753 tab, and the
frequency plot options are as follows.

The plot pull down box allows the user to choose which data to visualize. The screenshot below shows the
different ways in which the simulation data can be plotted. Data which can be plotted versus wavelength or
frequency include:

EFFECTIVE INDEX: selecting this option will generate a plot of the effective index for each calculated mode,
plotted as a function of wavelength or frequency.
LOSS: selecting this option will generate a plot of the modal loss as a function of frequency. Measured in units
of dB/mm of propagation.
GAIN: selecting this option will generate a plot of the modal gain as a function of frequency. Measured in units
of dB/mm of propagation.
GROUP INDEX: Is the ratio of the speed of light to the group velocity, c/vG. Unitless.
GROUP VELOCITY: Is defined vG = dw/db, and can be interpreted as the rate at which the peak of a temporal
pulse will propagate in the absence of nonlinearities. Measured in meters per second (m/s).
GROUP DELAY: Is defined as t = 1/vG. Measured in picoseconds per kilometer.
DISPERSION: Is defined as the rate of change of the group delay with respect to wavelength (dt/dl). Measured
in picoseconds per nanometer per kilometer (ps/(nm km)).
BETA: Defined as b = 2p nEFF / lo, where nEFF is the effective index, and lo is the free-space wavelength.
Measured in units of inverse meters (1/m).

2003 - 2016 Lumerical Solutions, Inc


760 Lumerical Knowledge Base

plot w indow in the FREQUENCY PLOT tab

An example running frequency analysis using parameter sweep and script, please see Sweep analysis for
dispersion 712 .

5.6.2.3.1 Set calculation parameters


With the OPTION PULL-DOWN set to "set calculation parameters", the frequency analysis tab contains parameters
for the frequency sweep. Some of the parameters can be set through the script 1605 .

The parameters shown include:


TRACK SELECTED MODE: check this box to track the selected mode in the mode list.
START, STOP FREQUENCY: the first and last frequency at which the modes are solved for. If a particular mode is
being tracked, the start frequency parameter defaults to the value used to initially calculate the modes within the
MODAL ANALYSIS tab.
START, STOP WAVELENGTH: the first and last wavelength at which the modes are solved for. If a particular
mode is being tracked, the start wavelength defaults to the value used to initially calculate the modes within the
MODAL ANALYSIS tab.
NUMBER OF POINTS: The number of frequency/wavelength points to include in the sweep.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 761

NUMBER OF TEST MODES: This parameter sets the maximum number of modes to use for the sweep
calculation. To track a single mode, this parameter is best set to approximately 3 in order to keep the
computation time to a minimum (unless there are discontinuities in the sweep data, in which case this parameter
will need to be increased slightly). If track selected mode is not set, then this parameter determines the maximum
number of modes which are to be swept over the frequency/wavelength range of interest.
EFFECTIVE INDEX: This parameter is used to specify the value of effective index around which the modes are
solved for. Only valid when not tracking a selected mode.
DETAILED DISPERSION CALCULATION: Calculate the mode properties at some additional frequencies to obtain
more accurate dispersion data over the frequency/wavelength range of interest. This takes more time but gives a
more accurate result.
STORE MODE PROFILES WHILE TRACKING: This option is used for exporting to INTERCONNECT only. This
will store the mode profiles for each frequency.
BENT WAVEGUIDE: Select this option to sweep a waveguide which has a bend in it.
Bend radius - the radius of curvature of the waveguide bend
Bend orientation - the orientation of the bend; refer to Bent waveguide calculation 359 in User Guide for more
details.

5.6.2.3.2 Data export


The "export data" option is where the user can export the data for the current frequency sweep.

Standard export:
TEXT FILE (COLUMN): exports a column table of frequency, real effective index, and imaginary effective index,
loss, real beta, imaginary beta, overlap (when tracking a mode), group velocity and dispersion.
TEXT FILE (STANDARD): exports vectors of the frequency, real and imaginary effective indices, loss, real and
imaginary beta, overlap (when tracking a mode),group velocity and dispersion.
MATLAB: exports the data to a Matlab-compatible file which contains a frequency vector, a complex-valued
effective refractive index vector, a loss vector, a complex-valued beta vector, a group velocity vector and a
dispersion vector.
LDF FILE: exports the frequency results into a Lumerical .ldf file.
Export Frequency Data: exports the frequency sweep results into the selected standard format.

INTERCONNECT export:

Export the frequency sweep results into a format that can be easily loaded into INTERCONNECT. Please see
INTERCONNECT - MODE waveguide 1107 for more detail.

2003 - 2016 Lumerical Solutions, Inc


762 Lumerical Knowledge Base

5.6.2.4 Overlap analysis Tab


The OVERLAP ANALYSIS tab is shown in the screenshot below, where the various components of this tab are
labeled for future reference.

For a step-by-step tutorial of an Eigenmode solver example, please see the video in Eigensolver Analysis 749 .

An overlap is calculated between one of the entries in the mode list and an entry in the deck. The plots in the image
below show the near field data for the currently selected mode in the mode list (on the left) and in the deck (on the
right). The mode plot options are the same as those discussed in the Modal analysis 753 section.

The OVERLAP ANALYSIS tab is comprised of the following parts:

Option tabs - This allows the user to choose between overlap 763 calculations or to create/modify a Gaussian
beam 765 .
Option settings - This is where the user specifies the parameters for each option.
Modal area - A quantitative measure for the effective mode area. For a 2D z-normal Eigenmode Solver simulation
region, It is defined as:

Modal _ area =
( H 2
dxdy )
2

4
H dxdy

(The modal areas for other orientations of the Eigenmode Solver are similarly defined.)

For more information about the overlap analysis calculation, please see Overlap analysis 763 .

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 763

5.6.2.4.1 Overlap
Choosing the "Overlap" tab results in the following screen shot. Some of the parameters can be set through the
script 1605 . For more info, please visit Overlap analysis - FDE 763 .

The parameters and buttons shown include:


CALCULATE: pressing this button will calculate the overlap and the power coupling of the currently selected mode
with the currently selected D-CARD. The D-CARD profile is offset in x, y and z by the amounts indicated in X
SHIFT, Y SHIFT and Z SHIFT.
OVERLAP: the result of the overlap. The overlap calculation gives the fractional power coupling from the D-CARD
profile (E2,H2) into the mode (E1,H1). The overlap does not take into account reflections due to a mismatch in
effective indices between the D-CARD profile and the mode. The overlap is given by the following formula.

r r r r r r
overlap = Re
( )(
E1 H 2* dS E 2 H 1* dS
) 1
r r* r r r r

E1 H 1 dS
(
Re E 2 H 2* dS )
For details, see Snyder and Love "Optical Waveguide Theory", Chapman & Hall, London, England, 1983.

POWER COUPLING: the power coupling gives the total input coupling, taking into account both the mode overlap
and the mismatch in effective indices between modes. In simple cases, this reduces to the product of the
OVERLAP and the Fresnel transmission.
SHIFT BEAM CENTER: clicking this allows you to offset the D-CARD profile by X SHIFT, Y SHIFT and Z SHIFT.
RECENTER: You can use this pulldown button to re-center the X SHIFT, Y SHIFT and Z SHIFT to (0,0,0), or such
that the center of the D-CARD profile coincides with the center of the currently selected mode. It is a good idea to
do the latter before trying to optimize the position of the X SHIFT, Y SHIFT and Z SHIFT.
X SHIFT: the actual shift amount in the x direction.
Y SHIFT: the actual shift amount in the y direction.
Z SHIFT: the actual shift amount in the z direction.
OPTIMIZE POSITION: this button will try to calculate the optimum values for X SHIFT, Y SHIFT and Z SHIFT to
maximize the overlap between the currently selected D-CARD profile and the currently selected mode.

5.6.2.4.1.1 Overlap analysis


This section provides some further information about the overlap calculation of MODE Solutions. The overlap function
is typically used to measure the field overlap and power coupling between an input mode from one waveguide and all
of the modes of a second waveguide.

2003 - 2016 Lumerical Solutions, Inc


764 Lumerical Knowledge Base

See also
Data analysis 768
Overlap script function 1608

r r r
Ein H in Eout
The arbitrary input fields, labeled and are incident upon a surface and give rise to the output fields
r r r r
and
H out
. The input power is given by
{
Pin = 0.5 * Re dS Ein H in* }while the output power is given by
r r r*
{
Pout = 0.5 * Re dS Eout H out }. Any fields can be decomposed into a basis of orthogonal modes (see Marcuse
or Snyder and Love Waveguide book)
r r
E = ai ei
i
r r
H = bi hi
i

The basis modes are orthogonal in the sense


r r r*
r eri hrj = d
d S
* ij
dS ei hi
r r r*
and, for propagating modes, dS e h
i i
is real.
At the interface, the tangential components of the electric and magnetic fields are continuous:
r r^ r^
Ein^ + Erefl = Eout
r r^ r^
H in^ + H refl = H out

If we assume that the reflected field is small, we can simply decompose the input (or output) field onto the basis
state of the output waveguide:
r r r
Ein = Eout = ai ei
i
r r r
H in = H out = bi hi
i

where the ai and bi coefficients can be calculated from


r r r*
d S E
r rin r i h
ai = *
dS ei hi
r r r*
bi* =
r eri Hr in
d S
*
dS ei hi
The total power propagating in the output fields is
r r r*
{
Pout = 0.5 * Re dS Eout H out }
*
r r r
= 0.5 * Re dS ai ei b j h j
i j
r r r
{
= 0.5 * Re ai bi* dS ei hi* }
i

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 765

and therefore, the power coupling coefficient propagating in the the ith mode over the total input power is
r r r*
{ *
Pi Re ai bi dS ei hi
= r r r
}
Pin {
Re dS Ein H in* }
r r r r r
dS eri H in* dS Ein hi*
Pi
= Re

r r r* r r
1
r*
Pin

d S
i i e h

Re{ d S Ein H in }
This result tells us how much power can propagate in the ith mode from a given input field. However, the above
calculation assumed that the reflected fields were negligible. In reality there is some reflected field and this leads to
different ai and bi coefficients. Indeed, when the ai and bi coefficients are different, it means that some of the field
must be reflected because the relative amplitudes of E and H cannot be decomposed into forward propagating
modes only. A better result can be found by assuming that the reflected field has the same profile as the incoming
field, and this is what is done by MODE Solutions to calculate the power coupling. The simplest case to be
considered is a plane wave incident on a dielectric interface (air to an index of n). There is obviously a perfect
"overlap" between plane waves on both sides of the interface. However, if the ai coefficient for the decomposition of
Ein is 1, then the bi coefficient will be n. (For plane waves H = n*sqrt(eps0/mu0)). For the plane wave this leads to the
well known results that r=(n-1)/(n+1)), making it possible to calculate the power coupling between an incident field
into the forward propagating ith mode. For an exact result, it is necessary to know the complete set of waveguide
modes on both the input and output sides.

Note
The overlap calculation that is described here may not be accurate for waveguides or fibers with loss.

5.6.2.4.2 Beam
The Beam tab allows you to modify the default Gaussian beam for overlap calculations, as well as create Gaussian
beams in the deck which will be accessible from the scripting environment. There are two types of Gaussian beams,
and the user can choose between the scalar approximation for the electric field or the fully vectorial beam profile
option:

For the Gaussian Beam Source, please see the Gaussian source 521

Fully vectorial beam

2003 - 2016 Lumerical Solutions, Inc


766 Lumerical Knowledge Base

NA: This is nsin() where n is the refractive index of the medium in which the source is found and 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.

Note: References for the thin lens source


The field profiles generated by the thin lens source are described in the following references. For uniform
illumination (filled lens), the field distribution is precisely the same as in the papers. For non-uniform illumination at
very high NA (numerical aperture), there are some subtle differences. This is due to a slightly different
interpretation of whether the incident beam is a Gaussian in real space or in k-space. This difference is rarely of
any practical importance because other factors such as the non-ideal lens properties become important at these
very high NA systems.

M. Mansuripur, "Distribution of light at and near the focus of high-numerical-aperture objectives," J. Opt. Soc. Am.
A 3,2086-2093 (1986).
M. Mansuripur, "Certain computational aspects of vector diffraction problems," J. Opt. Soc. Am. A 6, 786-805
(1989).
M. Mansuripur, "Distribution of light at and near the focus of high-numerical-aperture objectives: erratum, Certain
computational aspects of vector diffraction problems: erratum" J. Opt. Soc. Am. A 10, 382-383 (1993).

Scalar approximation

Define Gaussian beam by : This menu is used to choose to define the scalar beam by the WAIST SIZE AND

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 767

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.

For both types of beams:


The polarization angle is defined with respect to the horizontal-axis for normal incidence fields. When the
incidence is off-axis, the polarization angle should be 0 for p-polarized light and 90 for s-polarized light.
The refractive index is the refractive index of the homogenous material in which the Gaussian beam is found.
The angle theta is the angle between the normal-axis and the direction of propagation.
The angle phi is the angle between the direction of propagation projected onto the Eigenmode Solver plane and the
horizontal-axis.
Create Beam: this button will add a new Gaussian beam to the deck based on the above specifications.

5.6.2.5 Advanced options


The ADVANCED OPTIONS button opens a window which contains a variety of settings for advanced users.

Advanced option

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.
FRACTIONAL OFFSET FOR DETAILED DISPERSION CALCULATIONS: this is the fractional frequency offset
used for calculating numerical derivatives with respect to frequency, when the "detailed dispersion" checkbox is
on.
MAXIMUM NUMBER OF MODES TO STORE: When searching for modes from n1 to n2, the algorithm will stop

2003 - 2016 Lumerical Solutions, Inc


768 Lumerical Knowledge Base

when this many modes have been found.


AUTOMATICALLY REMOVE PML MODES: When this is checked, un-physical modes that have their energy
primarily in the PML are removed and discarded.
THRESHOLD FOR PML MODE REMOVAL: When PML mode removal is on, modes are discarded if the fraction
of magnetic field intensity in the PML is larger than this threshold.
USE SINGLE PRECISION: Some parts of the core calculations performed by MODE Solutions can be done in
single precision. This can save some memory and time, but also decreases the accuracy of the results.

gain_max , however some modes may have negative real(neff) correspondent to a negative phase velocity. The
value of gain_max should be zero when the waveguide is made from materials with no gain, however, we typically
use a finite value for two reasons: firstly, there can be small numerical errors such that a mode with imag(neff) = 0
may be calculated to have a numerically small, negative value such as -1e-15, and secondly, the waveguide itself
may be composed of some materials that, intentionally, have gain in other words they have imag(n) < 0 where n
is the material refractive index. The value of gain_max is given by gain_max = maximum tolerated gain +
material_gain_max, where maximum tolerated gain is specified below and material_gain_max is the maximum
value of |imag(n)| for any material in the waveguide that has gain. If no material in the waveguide has gain, then
material_gain_max = 0.
CORRECT BACKWARD PROPAGATING MODES WHEN PML IS PRESENT: By default, the detection and
correction of backward propagating modes, as described above, is not performed when any of the FDE solver
boundaries are PML. When PML boundaries are used, you must check this box to apply the correction of
backward propagating modes. However, we do not generally recommend checking this box because PML itself
can create small amounts of gain in some modes which is typically an indication that the PML is too close to the
guiding structure and not that the backward propagating mode has been accidentally selected. In addition,
evanescent modes with negative phase velocities are rarely found when PML is used.
MAXIMUM TOLERATED GAIN: This quantity is used to calculate gain_max, as described above. Since this is
typically used for avoiding accidental sign reversal due to small numerical errors, this value is typically very small
and the default is 1e-12.
ADD MATERIAL GAIN TO MAXIMUM TOLERATED GAIN: When this is checked, the material gain (if any gain
materials are present) will be included in the calculation of gain_max, as described above. When this is
unchecked, gain_max will be equal to maximum tolerated gain.

For more information such as tips on finding a mode and lossy mode, please see Others and examples 768

5.6.2.6 Others and examples


This section also contains the following topics:

This page provides a checklist of


common settings that should be
checked or modified when you have
trouble finding the right modes or you
get the message "no physical modes
were found".

Finding modes 769

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 769

This page provides list of steps that one


needs to pay attention to when working
with lossy waveguides and fibers.

Lossy modes and dB/m to k conversion 770

Dispersion analysis 773 Please see Integrated Optics -


Dispersion Analysis 2064

5.6.2.6.1 Finding modes

Objective
When using the eigensolver in MODE Solutions or the mode source in FDTD Solutions, there are many eigensolver
settings that can affect the modes found. For some types of structures, finding the correct modes can be
challenging. This page provides a checklist of common settings that should be checked or modified when you have
trouble finding the right modes or you get the message "no physical modes were found".

Simulation boundaries: It is often recommended that one


starts with metal boundaries when looking for well confined
modes. Please see Starting with metal boundary conditions
464 for detailed information. If the right boundaries are not

chosen, the right modes may not be found. The size of the
simulation region is also important. When using metal
boundaries, the boundaries should be far enough from the
structure interfaces so that the evanescent tails of the
modes do not reach the boundaries and get reflected.

If the mode you are interested in is radiative, you will need


to use PML boundaries. Please see Lossy modes and dB/
m to k conversion 770 for more information.

The Integrated Mode Source


When finding modes in the Mode Source, the default
boundaries are metal. These boundary conditions can be
changed as explained here 570 .

Symmetry: Enforcing symmetry in one or two directions


can greatly reduce the simulation time and memory;
however, one should use these boundaries with care when
solving for modes. Depending on the type of boundary used,
symmetric or anti symmetric, only TE or only TM results
could survive. Make sure you know the symmetry of the
fields you are looking for before you apply symmetry
boundaries. Please see Symmetry boundary conditions 466
for detailed information on how to determine which
symmetry boundary to use.
When using symmetry, sometimes it is necessary to "force

2003 - 2016 Lumerical Solutions, Inc


770 Lumerical Knowledge Base

symmetry" on the mesh as well. This option can be


selected under the "advanced options" tab of the simulation
region object.
Index to search near: One can specify the index to
search near or a range of indices to search in between for
modes of interest. The specified value is not just the real
part of the index, rather it is the magnitude of the complex
index.

If the mode is lossy, you may want to enter a complex


value for this index. Please see Lossy modes and dB/m to
k conversion 770 for more information.

Number of trial modes: The number of modes specified to


look for around a refractive index value will affect the modes
that the solver finds. If this number is too small, the desired
modes may not be found. Often, setting this number to 100
modes will ensure that no physical modes near the
specified index have been missed. If more than 100 modes
exist, then a larger number should be used if one is
interested in higher order modes.

If you still have trouble finding the right modes for your waveguide/fiber, please contact support@lumerical.com.

5.6.2.6.2 Lossy modes and dB/m to k conversion

Objective
This page provides list of steps that one needs to pay attention to when working with lossy waveguides and fibers.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 771

Associated files
ridge.lms
ridge_1D.lms
MIM.lms
See also
Finding modes 769
Integrated MODE Source 566

Check if the mode is bound


This is the first step that one should verify when a mode is suspected to be "leaky". In many cases, a bound
mode can appear to be ill-confined, and one may want use PML boundaries because of this. If we know that
the mode we are looking for is bound, the standard procedure with metal boundaries should be use. In this
case, using PML boundaries is unnecessary and may introduce other complications. (Please see Starting
with metal boundary conditions 464 for more information.)

The best way to verify that a mode is bound is to use a 1D Eigenmode solver, and we will demonstrate this
using the example file ridge.lms. When you first solve for the modes in this ridge waveguide, you will find
the mode with neff ~ 3.475390. If you plot the "log" profile of the mode, it may seem that this mode is not
bound at 1.55um.

To verify wether this mode is bound or not, we can use a 1D mode solver to study the slab waveguide. Open
the Edit window for the MODE simulation region, and change the solver type to "1D Y:Z prop", and change the
"x" to -8. This will change the MODE region from a 2D solver to a 1D (linear y) solver. Here, we find the 2
modes with the highest neff to be a TE mode with neff = 3.475089 and a TM mode with neff = 3.475036. This
means that any mode in the ridge waveguide that has an effective index greater than 3.475089 is bound
(others will all leak away as slab modes).

2003 - 2016 Lumerical Solutions, Inc


772 Lumerical Knowledge Base

Because the mode at 3.475390 is bound, it is perfectly fine to use metal boundaries in this case. Note that we
will still need to be careful and make sure that the metal boundaries are far enough away such that they are
not influencing the modes. The best way to verify this is to increase the x-span and see if this changes the
results significantly.

Use PML boundaries


If the waveguide/fiber does have radiative loss, then we will have to use PML boundaries. In this case, it is
important to make sure that the PML boundaries are placed far enough away so that the it does not interact
with the evanescent tails of the mode. A distance of half a wavelength is a good start, but the best way to
verify this is to increase the simulation region, and see if this changes the result significantly.

Use a complex "n" value as an initial guess


The problem with leaky modes is that the imaginary part of the effective index can become quite large relative
to the real part. In this case, if you use the search "near n" option with a real "n" value as the input, it will be
difficult for the solver to locate the mode in the complex plane. The solution for this is to set a complex "n"
value:

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 773

The closer you set this "guess" value to the real and imaginary part of the effective index of the desired mode,
the easier it will be to find the mode. To do this, one can start with last wavelength where a mode can still be
found (ie. before the mode becomes too lossy), and then gradually move to the regime where the mode
becomes lossy. The real and imaginary part of the effective index should change continuously, allowing us to
guess what the next complex effective index should be.

For example, in the file MIM.lms, a mode with neff ~ 1.2336+0.601i can be found at 145 nm with the default
"use max index" option.

But if you use the same calculation parameters to look for the mode at 150nm, you will not be able to find the
desired mode. In this case, it is much easier to find the desired mode by entering the neff found at 145nm
(1.2336+0.601i) as the initial guess.

Loss conversion: dB/m (propagation loss) to k (imaginary index)


In terms of the electric field amplitude, propagation loss in dB/m is defined as

loss = -20 log 10 E (1)


E (0)

The following formula describes how the electric field amplitude decays due to material absorption (ie.
refractive index = n + ik )
- kx 2 p
l0
| E ( x) |= e
Combining the formulas gives
loss = -20 log 10 e ( -k 2p
l0
)
Solving for k gives
loss l0
k=
20 2 p log 10 (e)

5.6.2.6.3 Dispersion analysis


Please see Integrated Optics - Dispersion Analysis 2064

2003 - 2016 Lumerical Solutions, Inc


774 Lumerical Knowledge Base

5.6.3 EME solver analysis


This section describes the Eigenmode expansion solver 114 (EME) propagation analysis in MODE Solutions, once
the physical structure and the simulation region have been defined.

The EME analysis window can be opened by pressing the run button which will calculate the modes at each
cell of the EME solver region, changing the simulation to Analysis mode. In Analysis mode, we can use the EME
analysis window to propagate the fields and calculate scattering parameters (s-matrix) for the structure. The
propagation distances and periodicity can be changed in analysis mode, and the fields can be propagated without
having to recalculate the modes.

Cell group definition


The cell group definition section shows the location of the cell groups and the span between each cell group in
a tabular format. This information will be the same as in the EME setup tab of the EME solver object that was
set up while in Layout mode. From here, the group spans and subcell method for any cell group can be
modified, and the fields and s-matrix can be propagated using the new settings without having to recalculate
the modes at each cell by "eme propagate" button.

After propagating, the results from any EME profile monitors and index monitors, as well as the s-matrix
results from the EME solver object can be viewed in the Result View tab or by right-clicking on the object in
the Objects Tree and visualizing the results. See the Result View 736 page for more information.

Select source

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 775

The select source section allows you to select the input source port and the mode to inject at the input port.
The source amplitude can also be set here. These settings will be used to propagate the fields for the field
profile monitor results, but they will not affect the S-matrix results.

The field data returned by EME profile monitors will be normalized as though the amplitude of the source mode
is equal to the value set in the amplitude setting in units of V/m.

Check neff for calculated modes


After the modes at each cell are calculated, users can visualize the effective index of the modes at any cell.
To do this, just find the cell in the object tree and select it, then right-click andchoose visualize ==> neff, the
visualizer window will pop up with real(neff) as the vertical axis and the number of modes in the cell as
horizontal axis (in default it is labeled as "n", the natural number). To visualize imag(neff) in the same figure,
users can click "duplicate", and then in the "scalar operation" column choose "Im", or simply choose None in
the scalar operatin. If the " CORRECT BACKWARD PROPAGATING MODES " is checked, one may find
some modes that have negative real(neff) because otherwise they will have gain. The detection and correction
of modes that have gain, which is related to the correct selection of forward or backward propagating modes is
described at solver physics 109 of FDE and advanced options 432 .

The figure below shows real(neff) and imag(neff) of the modes in a cell, where the axes labels are modified:

The green line shows imaginary part of neff which corresponds to the loss, and the blue line shows the real
part of neff, which corresponds the phase velocity. One can see that for some lossy modes, the wave has a
negative phase velocity as real(neff) is smaller than 0, even though it is a forward propagating, evanescently
decaying mode.

Override periodicity
Selecting the override periodicity option allows the user to change the number of periods of any periodic
regions that have been defined in the EME setup tab. The new monitor and s-matrix results can be obtained
by by clicking on the "eme propagate" button, without having to re-calculate any modes.

When using this option, the periodic sequence that is defined in the tabular format in the override periodicity
section will be shown in the cell group sequence box. For example the sequence shown in the image below
indicates that there are three cell groups and the second cell group is repeated ten times.

This feature can be used for scanning the number of periods of a device such as a Fiber Bragg Grating 2182 .

Warning: Cell group periodicity and EME profile monitors

2003 - 2016 Lumerical Solutions, Inc


776 Lumerical Knowledge Base

EME field profile monitors should not be used with the Cell group periodicity feature. EME profile monitors
will not correctly reconstruct the field profile when Cell group periodicity is used.

Error diagnostics
Selecting "update monitors" will refresh the result for all monitors with the latest propagation settings. Users
can also choose to include two types of error diagnostics, see EME error diagnostics 783 for more detail.

Note that selecting these settings may increase the propagation time.

Propagation sweep
The propagation sweep tool can be used to sweep the periodicity or span of a cell group in order to scan the
length of different regions of the device. This tool allows the results for a range of spans to be calculated
without having to recalculate the modes at each cell. To set up the sweep, select the cell group whose length
will be varied, and set the start and stop lengths of the cell group, and either the length interval between each
sweep point, or the number of points to sweep over in the range.

After running the sweep using the "eme sweep" button, the "visualize eme sweep" button will open up a
visualizer showing all the elements from the user s-matrix over the cell group length.

See the Spot Size Converter 2053 getting started tutorial for an example of how this is used.

S-matrix index mapping


The values in the user s-matrix are related to the transmission and reflection coefficients between ports and
modes that are selected in the ports. See the Ports 436 section for more information about setting up ports in
the EME solver region. The size of the user s-matrix will depend on both the number of ports and the number
of modes selected at each port.

Since the size of the user s-matrix can be large depending on the number of ports and selected modes, the S-
matrix index mapping will show a table which can be used to map the user s-matrix indices to the modes and
ports of the structure. The left index of the S-parameter is the output mode, and the right index is the input
mode.
I INPUT
n 1 2
t
h OUTPUT 1 s11 s12
i 2 s21 s22
s
s 1 Port1, Mode1
c 2 Port2, Mode1
e
n
S11 is the reflection coefficient for output Port1,
a
Mode1 from input Port1, Mode1.
r
S12 is the transmission coefficient for output Port1,
i
Mode1 from input Port2, Mode1.
o
S21 is the transmission coefficient for output Port2,
,
Mode1 from input Port1, Mode1.
t
S22 is the reflection coefficient for output Port2,
h
Mode1 from input Port2, Mode1.
e
r
e
a
r
e
t

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 777

w
o
p
o
r
t
s
,
a
n
d
o
n
e
m
o
d
e
p
e
r
p
o
r
t
,
w
h
i
c
h
r
e
s
u
l
t
s
i
n
a
2
x
2
u
s
e
r
m
a
t
r
i
x
.

2003 - 2016 Lumerical Solutions, Inc


778 Lumerical Knowledge Base

o
t
e
:
R
e
m
e
m
b
e
r
t
h
a
t
m
o
d
e
1
a
t
p
o
r
t
1
i
s
a
d
i
f
f
e
r
e
n
t
p
h
y
s
i
c
a
l
m
o
d
e
f
r
o
m
m

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 779

o
d
e
1
a
t
p
o
r
t
2
.

T
h
i
s
i
s
e
a
s
y
t
o
u
n
d
e
r
s
t
a
n
d
w
h
e
n
y
o
u
r
e
m
e
m
b
e
r
t
h
a
t
t
h
e

2003 - 2016 Lumerical Solutions, Inc


780 Lumerical Knowledge Base

w
a
v
e
g
u
i
d
e
a
t
p
o
r
t
1
c
a
n
h
a
v
e
a
d
i
f
f
e
r
e
n
t
s
i
z
e
f
r
o
m
t
h
e
w
a
v
e
g
u
i
d
e
a
t
p
o

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 781

r
t
2
.
I INPUT
n 1 2 3 4
t
h 1 s11 s12 s13 s14
i OUTPUT 2 s21 s22 s23 s24
s
s 3 s31 s32 s33 s34
c 4 s41 s42 s43 s44
e
n 1 Port1, Mode1
a 2 Port1, Mode2
r
i 3 Port2, Mode1
o 4 Port2, Mode2
,
S11 is the reflection coefficient for output Port1,
t
Mode1 from input Port1, Mode1.
h
S12 is the reflection coefficient for output Port1,
e
Mode1 from input Port1, Mode2.
r
S21 is the reflection coefficient for output Port1,
e
Mode2 from input Port1, Mode1.
a
S22 is the reflection coefficient for output Port1,
r
Mode2 from input Port1, Mode2.
e
a
S31 is the transmission coefficient for output Port
g
2, Mode1 from input Port 1, Mode1.
a
S13 is the transmission coefficient for output Port
i
1, Mode1 from input Port 2, Mode1.
n
t
w
o
p
o
r
t
s
.
T
w
o
m
o
d
e
s
o
f
i
n
t
e
r
e

2003 - 2016 Lumerical Solutions, Inc


782 Lumerical Knowledge Base

s
t
h
a
v
e
b
e
e
n
s
e
l
e
c
t
e
d
f
o
r
e
a
c
h
p
o
r
t
.

T
h
i
s
r
e
s
u
l
t
s
i
n
a
4
x
4
u
s
e
r
m
a
t
r
i

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 783

x
.

5.6.3.1 EME error diagnostics


The EME solver can perform a number of error diagnostics making it possible to determine which cell interfaces are
causing problems and may require a larger number of modes, better mesh resolution, or different energy
conservation settings.

The error diagnostics are grouped into 2 categories: global and local. Global diagnostics measure the accuracy of all
contributions to the S matrix as a whole, while local diagnostics measure the accuracy for the specific source that is
selected in the EME analysis window. Some of the diagnostics are relatively fast to calculate while others take more
time. You can choose to include fast or slow diagnostics when executing eme propragate.

When describing the examples below, we will refer to the taper example at Polarization converter 2130 .

Description of the diagnostic information


Global diagnostics
Loss and Gain. Here we calculate the maximum loss and gain violations that occur for each cell interface. In
principle, the interface S matrix (the S matrix between the left and right hand modes of any given interface) should be
energy conserving. This means that regardless of the incident field conditions, there should be no gain or loss of
energy at the interface. In reality, because we have a finite number of modes calculated on a finite sized mesh, the
interface S parameters will not necessarily conserve energy for all incident field conditions, and this diagnostic
calculation gives the maximum possible violations that can occur. The data can be visualized as a function of
interface number or as a function of x position (choose which in the Parameters section of the visualizer, under the
tab 'Parameter'). When considering the interface positions, the first interface is 0 and the last interface is N where N
is the number of cells. Therefore a violation at interface i-1 corresponds to the left interface of cell i, while a violation
at interface i corresponds to the right interface of cell i. In general, we should see very small violations (particularly if
we use the 'passive', 'conserve energy' or the CVCS method). However, if large violations are seen, it is worth also
investigating the local errors because these global violations may result from excitation by very high order modes
which would never be done in practice. The fast diagnostics option must be checked to update this result. These
diagnostics are packaged in the result called 'global diagnostics'.

Expansion. The EME method is essentially an expansion of the modes on the left hand side of an interface onto the
basis vectors formed by the modes on the right hand side, and vice versa. In principle, if we had an infinite number of
modes, this expansion could be accomplished perfectly because each set of modes would be a complete
representation of the entire vector space. In reality, we always have a finite number of modes and therefore we see
the types of problems that are typical of, for example, expansion a function using a finite number of Fourier
coefficients. This diagnostic simply expands each mode on the left hand side of the boundary using the basis
vectors of all modes on the right hand side of the boundary (and vice versa), and measures the difference between
the original mode and the expanded mode. If the modes on the left and right hand side are simply different
representations of the same vector sub-space, this result will be 0. However, if the modes on either side represent
different sub-spaces of the total space then this result will be potentially as large as 1. Typically the sub-spaces
have some overlap and the result is between 0 and 1. If interfaces have a large expansion error, it may mean that
you need to increase the number of modes on either side of the boundary. However, we should also consider some
of the local error diagnostics because it is possible that only a small number of the modes are actually required for
the desired source excitation. The fast diagnostics option must be checked to update this result. These diagnostics
are packaged in the result called 'global diagnostics'.

Local diagnostics
Loss and Gain. Here we calculate the actual loss and gain violations that occur at each interface for the given
excitation source. These results may show much lower violations than the equivalent global results. These
diagnostics are packaged in the result called 'local diagnostics'.

2003 - 2016 Lumerical Solutions, Inc


784 Lumerical Knowledge Base

Coefficients. Here we show the forward and backward propagating coefficients for each mode in each cell, for the
given source excitation. The coefficients are measured at the center of each cell. The port modes are included and
are calculated at the port input and output positions. These coefficients are complex numbers in a matrix of size (N
+2) X M where N is the number of cells and M is the maximum number of modes used in any cell (or port) of the
EME region. If cells and ports use less than M modes, then the corresponding coefficients are simply set to 0. The
data can be plotted vs cell number (with 0 corresponding to the left ports and N+1 corresponding to the right ports),
or as a function of x position. These diagnostics are packaged in the result called 'coefficients'.

Field discontinuities. The EME method is fundamentally based on the continuity of the tangential E and H field
components at each cell interface, which makes it possible to create a system of linear equations the solution of
which gives the interface S matrix. Measuring the discontinuity of the tangential field components at the interfaces is
a good way to see if enough modes are being used. These diagnostics are returned in the result called 'local
diagnostics'. There are two results returned for the E field, which are
|| 2 2
E L - ER|| dS E
||
L - ER|| dS
S S
DE1 = DE2 =
|| 2 2 2
E S dS 0.5 EL|| + EL|| dS
S S

where EL and ER refer to the left and right fields at each interface and ES is the E field of the excitation source at the
port. There are two more equivalent results for the H field. These diagnostics are packaged in the result called 'local
diagnostics' and are only calculated only when 'include slow diagnostics' is checked.

Advanced settings and how to use them


There are three advanced settings in the EME solver that can have a significant impact on the results. These are:
tolerance 1. This setting is used when solving for the S matrix at each interface. The interface S matrices are
calculated from a linear system of equations that attempt to match the tangential E and H field components and
the solution of these equations requires a matrix inversion. When there are modes on one side of the boundary
that are not well matched by any modes on the other side of the boundary, the solution to the linear system of
equations can result in S matrix coefficients that are much larger than 1 and do not conserve energy. This
tolerance setting is used to eliminate coupling completely to modes that cannot be expanded on the other side of
the boundary. Using values close to zero will result in smaller field discontinuties but can lead to large energy
conservation violations that cannot be corrected without perturbing the entire S matrix. Using values close to 1 will
make energy conservation work much better but can increase field discontinuities. For periodic structures where
precise energy conservation is important, this value should typically be between 0.5 and 1. This setting affects the
calculation of all interface S matrices, regardless of the choice of the "energy conservation" setting.
tolerance 2. This settings is used to determine the maximum correction that will be made to a lossy interface S
matrix to make it conserve energy. Ideally, all possible incident source conditions on an interface will result in
perfect energy conservation. If the energy conservations settings is set to "conserve energy" then source
conditions which result in loss are corrected to perfectly conserve energy. However, source conditions that result
in a total transmitted and reflected power that is smaller than "tolerance 2" will be ignored which helps to avoid
over correcting the original S matrix. For periodic structures where precise energy conservation is important, this
setting should be quite small - typically 1e-5 or smaller - to ensure that no incorrect losses can occur. This
setting will only be used when the "energy conservation" setting is set to "conserve energy".
tolerance 3. This setting is used for certain internal matrix calculations when trying to correct the interface S
matrices to conserve energy or to be passive. It should be kept as small as possible, however, in some cases
numerical errors can result if it is too small. In general, this setting should not have as much impact on the results
as tolerance 1 and tolerance 2. This setting will only be used when the "energy conservation" setting is set to
"conserve energy" or "make passive".

See EME - Advanced settings 432 for more information.

Taper example
This example is based on the taper example at Polarization converter 2130 . We have run this example with only 5
cells in the middle cell group (the taper region) and 19 cells. The results for reach of the diagnostics, in four cases of
energy conservation and CVCS settings (none, passive, energy conserving, CVCS) are shown in the table below. For
ease of comparison, the line plots on the left and right side are shown on the same scale. The images are not shown
with the same colorbar scale.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 785

Diagn Result (5 cells in taper) Result (19 cells in taper)


ostic
type
Global
Gain

Global
Loss

Local
Gain

Local
Loss

2003 - 2016 Lumerical Solutions, Inc


786 Lumerical Knowledge Base

DE1

DE2

Forwa
rd
coeffic
ients
(energ
y
conse
rvation
=none
)

Forwa
rd
coeffic
ients
(CVC
S)

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 787

Back
ward
coeffic
ients
(energ
y
conse
rvation
=none
)

Back
ward
coeffic
ients
(CVC
S)

Expan
sion

In the above results, since we have a taper region where the modes are not changing substantially from one cell to
the next, we have no serious problems with local loss and gain or even with global loss and gain. However, setting
the energy conservation to passive or energy conserving drives all global and local gains and losses to about 1e-15.
The discontinuity in the electric fields is almost identical for both normalizations and shows that the largest
discontinuity occurs near the end of the taper region. Note that the field discontinuities are exactly zero when CVCS
is turned on. The forward coefficient magnitudes show that the light essentially propagates in the fundamental mode,
but that some forward propagating higher order modes are important in the taper region. The backward propagating
coefficients are extremely small for this device.

When the CVCS method is applied, we enforce field continuity and energy conservation - however the condition for
applying the CVCS method is a continuously varying geometry where the modes do not change substantially from
one cell to the next - therefore here we should be considering the expansion error and adding more cells if it is too
large. We can see that the expansion error is substantially reduced when we go from 5 cells to 19 cells. In some
cases, it may be useful to introduce more than one cell group over a taper to have a non-uniform distribution of cell
sizes which ensures a uniform expansion error across the taper.

Unlike tapers, in structures with abrupt transitions, such as MMIs, there can be a trade off to be made between field
discontinuity and energy conservations. Typically, to better conserve energy the field must become more
discontinuous and vice versa.

2003 - 2016 Lumerical Solutions, Inc


788 Lumerical Knowledge Base

5.6.4 Data export


Lumerical simulation data can be exported to a variety of file formats, as described below.

Interoperability between Lumerical products - Lumerical data files


The savedata 1439 script command can be used export data into a Lumerical data file (.LDF). This is a
convenient file format for transferring data between Lumerical simulation files and products. See the
Interoperability between Lumerical Products 788 and scripting tutorial 1406 for details.

Text files
The write 1440 script command can be used export data to a text file. See the scripting tutorial 1406 for details.

Excel
Direct export to Excel data files (.xlxs) is not supported. We recommend exporting your data to a text file, which
can then be imported into Excel.

MATLAB
The matlabsave 1642 command can be used to save data to .mat files. The Matlab script integration 1410 feature
is another powerful option for accessing MATLAB from the Lumerical scripting enviroment.

Paraview (for data visualization)


See the Paraview - advanced data visualization 790 topic.

Export to rayset
See the Export to ray tracers 791 topic.

GDSII files
See the GDSII 480 topic.

5.6.4.1 Interoperability between Lumerical Products


This page summarizes the different ways to transfer simulation geometry/data between the four Lumerical products,
FDTD Solutions, MODE Solutions, DEVICE and INTERCONNECT.

Geometry transfer:
Copy/Paste objects:

Copy/Paste is available for structure objects between FDTD Solutions and MODE Solutions. If the object material is
not in the default material database, it will automatically be added upon pasting into the new simulation file. This
does not include analysis groups and monitors.

Copy/Paste is available for structure objects between FDTD Solutions, MODE Solutions and DEVICE; however,
materials are not transferred to the DEVICE material database, since the electrical properties of materials are
different from the optical properties. The user will have to manually specify the material in the new simulation upon
pasting. Custom primitives, analysis groups and monitors can not be coped/pasted.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 789

Data Transfer:
Data can be transferred between the different products in several ways:

Import/Export Data:

Both .txt and .mat file formats can be used to import and export data from and to Lumerical products. Lumerical data
file (.ldf) format can also be used.
Please visit the knowledgebase pages on write 1440 , readdata 1439 , loaddata 1438 , savedata 1439 , matlabsave 1642 and
savedcard 1439 commands for more details.

S parameters can be exported from MODE Solutions to text files in a format that is compatible with
INTERCONNECT. Please visit the Plasmon section 1883 for an example.

Generation rate data can be exported from FDTD Solutions to DEVICE, using .mat files. Please visit Solar Cell
section 2594 for an example.

For simulations involving more than one product, the process can be automated using a script that calls the other
product through the command line. For more details please visit the following pages: Windows, Mac and Linux

For an example of a simulation using DEVICE and MODE, please visit the MZI example 2228 .
The MZI_automated set of files provided in the above example run MODE from the command line, called from a
script in DEVICE. Alternatively, the process can be done manually using the individual scripts provided and following
the procedure outlined in the example. For more information, please visit the charge-index conversion example 402 .

2003 - 2016 Lumerical Solutions, Inc


790 Lumerical Knowledge Base

5.6.4.2 Paraview - advanced data visualization


Learn how ParaView can be used to create advanced visualizations of Lumerical simulation data.

Associated files
paraview_vtksave_FDTD.fsp
paraview_vtksave_FDTD.lsf
paraview_vtksave_DEVICE.ldev
paraview_vtksave_DEVICE.lsf

See also
vtksave script command 1442
lumerical datasets 1461
Visualizer introductory video 741
using Matlab for advanced analysis 1410

http://www.paraview.org/

Lumerical's software provide a variety of built in data visualization functions, including line, image and vector plots.
While these functions are sufficient for the majority of data analysis, there may be situations that require more
sophisticated tools. ParaView is one such tool. ParaView is an open-source, multi-platform data analysis and
visualization application. ParaView users can quickly build visualizations to analyze their data using qualitative and
quantitative techniques. For additional information, please visit http://www.paraview.org/.

Note: Technical support for ParaView


Lumerical does not provide technical support for Paraview. Please consult the ParaView website to access their
documentation and other technical resources.

Introductory video
This video shows how the vtksave script command can be used to export simulation data from Lumerical's products,
and demonstrates how some of the basic ParaView features (including surface plots, clipping and slicing planes,
contours, and glyphs) can be used to create sophisticated visualizations of simulation data.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 791

Tips: ParaView and .vtk files


Datasets with non-spatial parameters
Lumerical datasets are used to store attributes (eg. electric field) as a function of both spatial (x,y,z) and non-
spatial parameters (eg. frequency, time, voltage, etc). Attributes can be scalar or vector quantities. Each dataset
can contain multiple attributes. The vtksave command converts the Lumerical dataset into a form that can be
imported to ParaView (.vtk file). While the Lumerical dataset and .vtk data structures are quite similar, there are a
few differences. The most important difference is that the concept of non-spatial parameters is a less fundamental
component of the .vtk data structure. This can complicate your analysis, particularly with vector data.
For example, suppose you have a dataset that contains vector electric field data as a function of x,y,z, and
frequency (at 50 frequency points). Ideally, this should be recognized as 50 different sets of vector electric field data.
Actually, ParaView will interpret it as a single electric field attribute that has 150 vector components (50 frequency
points x 3 vector components). It is possible to configure ParaView to interpret this data in a more appropriate way,
but the easiest solution is to export datasets that do not have non-spatial parameters. For example, only export from
monitors that collect data at a single frequency.

Creating vector plots in ParaView


Use the Glyph filter to create vector plots (as shown in the video). Also, when using Glyphs with large datasets, it
may be necessary to disable the 'mask points' option in the Glyph filter.

Example files
The associated files provided above are slightly modified versions of the FDTD Solutions - Plasmonic bullseye 1910

example and the DEVICE - Nanobeam PC Electro-optic Modulator 2250 example.

5.6.4.3 Export to ray tracer


This page explains the basic idea of exporting near field electromagnetic data from FDTD Solutions to a rayset for
further simulation with a ray tracing tool.

See also
Far field projections 874
Fiber ASAP Ray tracing 2192

In some applications, it is necessary to use a combination of tools to simulate your entire device. For example,
FDTD Solutions might be used to simulate scattering from a nano-particle. Additionally, it may be necessary to
calculate the fraction of scattered fields that can be collected by a macroscopic detector with a complex lens
system. The length scales involved in a macroscopic lens system are not suitable for FDTD simulation. Instead, the
near field scattering data from the FDTD simulation can be exported to a ray tracer, which is more suitable for
simulating macroscopic systems.

The process of exporting data to a ray tracer can be broken into two main steps.

Decompose near field data into a ray set


Most ray tracing tools are not able to import near field data. Instead, the near field data must first be converted into a
rayset, which can then be understood by the ray tracer. Fortunately, it is easy to decompose the near field data from
FDTD Solutions using the far field projection functions. Basically, these functions decompose the near field data
using a set of plane waves (rays) propagating at different angles as the basis for the decomposition. Each plane
wave can be considered to be one 'ray' in the ray set. The far field projections provide the amplitude, phase,
polarization, etc of each ray.

The far field projection functions are always used to do the near field to ray set conversion. However, the precise
details of the analysis depend on the application. For example, the ray 'phase' may or may not be important.
Similarly, it may or may not be necessary to combine the results of several FDTD simulations to obtain an
incoherent ray set.

For more information on these functions, see the far field projection 874 pages of the User Guide, or contact
Lumerical technical support.

2003 - 2016 Lumerical Solutions, Inc


792 Lumerical Knowledge Base

Export ray data to a text file


There are many ray tracing products (ASAP TM, FRED TM, ZEMAX TM, etc), and each uses a different file format. In
fact, a single software often uses different file formats for different types of ray sets.

Once the far field projections have been calculated, it will be necessary to write the data to a text file in a format that
can be imported into your ray tracer. This will require knowledge of the file format. See your ray tracers product
documentation or contact their technical support.

An example script for exporting OLED simulation data from FDTD Solutions to ASAP TM can be found at this 2714 link.
Please see the scripting section for asapimport 1441 and asapexport 1440 commands.

5.6.5 Data import


Users can import data from a variety of source formats into Lumerical's solvers as described below.

Import button
The import button on the top tool bar of the CAD, allows the user to import a variety of file types including
GDSII, STL, images (JPG or PNG), nk data, etc. For detailed information on what can be imported using this
button, please visit the optical import 480 page for the optical solvers and the electrical import 677 page for the
electrical solver.

Text files
The readdata 1439 script command can be used to import data from a text file. See the scripting tutorial 1406

for details.

ldf files
The loaddata 1438 script command can be used to import data from an .ldf (lumerical data file). See the
scripting tutorial 1406 for details.

MATLAB
The matlabload 1642 command can be used to load data from .mat files. The Matlab script integration 1410

feature is another powerful option for accessing MATLAB from the Lumerical scripting enviroment.

HDF5 files
The h5info 1682 , h5read 1683 , and h5readattr 1683 commands can be used to import data from HDF5 format files.
For details on how to use these commands, see the Reading HDF5 files 792 topic.

Tecplot files
The tecplotread 1441 command can be used to import data from tecplot format files. The imported geometric
data can then be used to create structures and doping profiles using the dataset builder 375 wizard.

5.6.5.1 Reading HDF5 files


HDF5 is an open binary file format for storing and managing large, complex datasets. The file format was developed
by the HDF Group, and is widely used in scientific computing. Lumerical's optical and electrical solvers have built-in
script commands that can be used to read and import data from HDF5 format files. There are also a large number of
free tools online that can be used to browse and manipulate HDF5 files. The HDF Group provides a cross-platform,
Java-based file explorer, HDFView. This utility is useful for visually exploring the file structure, but is not suitable for
extracting the data. In this article, we will describe how Lumerical's script commands can be used in conjunction
with HDFView to import data from HDF5 files.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 793

Associated files

processdata.h5
readh5file.lsf

See also

Data import 792


Scripting - HDF5 1682
Dataset builder 375
Scripting - Manipulating variables 1452

Exploring HDF5 files in HDFView

Download the HDF5 file processdata.h5. Open HDFView. Use the file browser to navigate to the folder where
you downloaded processdata.h5. The following view of the file will appear:

2003 - 2016 Lumerical Solutions, Inc


794 Lumerical Knowledge Base

Note the tree structure of the file in the file browser panel on the left hand side. HDF5 files are composed of a
hierarchy of groups containing groups, sub-groups, datasets, and attributes.

Groups

Groups are containers that enable a hierarchical organization of the file. Each group can contain sub-groups,
attributes, and datasets. The groups appear as folder icons in the HDFView program. In this example, the HDF5 file
contains a group named "vertex." Double click on group "vertex" to expand it.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 795

Attributes

Attributes are additional pieces of information that can be used to determine the nature of the data stored in the
group and are stored as pairs of label and value. Select the group vertex. In the information panel at the bottom of
the viewer, the group size and attributes are listed. In this group (vertex), the attributes are labeled MATLAB_class
and MATLAB_fields. The MATLAB_class attribute shows that the data is in Matlab 'struct' type format and the
MATLAB_fields attribute shows that the fields within the 'struct' data are x, y, and z.

Datasets

Datasets store the raw data in the HDF5 files. They appear as matrix icons in the HDFView tree. Select the
dataset 'doping.' Information about the dataset will be provided in the information panel. HDF5 supports the complex
organization of binary data, which is beyond the scope of this document. For more information, please consult the
HDF Group website.

In this simple example, the data (floating point numbers) is stored in arrays. In the case of the scalar 'doping,' the
array has dimension 1x18905 (1 row, 18905 columns). In the case of 'elements,' the the data is stored as a
4x87007 array (4 rows, 87007 columns).

Matrix
Scalar value

Double clicking on a dataset will bring up the TableView of the dataset. Below is a screenshot showing partial data
from the dataset 'elements.'

2003 - 2016 Lumerical Solutions, Inc


796 Lumerical Knowledge Base

Accessing data in the HDF5 files using script commands

Lumerical's script environment offers three commands to read data from HDF5 format files: h5info 1682 , h5read 1683 ,
and h5readattr 1683 . In this part of the example, we will see how the data in the processdata.h5 file can be read
inside Lumerical's script environment. To get started, download the script file readh5file.lsf in the same folder as the
HDF5 file. In DEVICE (or FDTD or MODE Solutions), run the script file and the data from the HDF5 file will be read
and loaded in the script workspace. The different component of the script file are discussed below.

Retrieving the file structure

The h5info 1682 command reads the structure of the HDF5 file into 'struct' format that can be accessed in the script
workspace. In the script prompt window, execute the h5info command on the test file provided (using a "?" mark at
the beginning will display the contents of the data).

filename = "processdata.h5";
data = h5info(filename);

?data;
> Struct with fields:
> Attributes
> Datasets
> Datatypes
> FileName
> Groups
> Name

The 'data' struct contains information about the HDF5 tree structure. More details about the data can be found by
inspecting each of the elements of the struct.

?data.Groups;
> Cell array with 1 elements

?data.Datasets;
> Cell array with 2 elements

Based on the information provided by HDFView, we know that the HDF5 file has 1 group and 2 datasets in the root of
the hierarchy tree. This is confirmed by the above script commands which show that 'data' has 1 group and 2
datasets. Further information about each of the groups and datasets can be found by inspecting the corresponding
cell arrays. For example, the script below returns the name of the group (vertex), the names of its two attributes
(MATLAB_class and MATLAB_fields), and the names of its three datasets (x, y, and z). Similar commands can be

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 797

used to get information about the datasets 'doping' and 'elements.'

?data.Groups{1}.Name;
> /vertex

?data.Groups{1}.Attributes;
> Cell array with 2 elements

?data.Groups{1}.Attributes{1}.Name;
> MATLAB_class
?data.Groups{1}.Attributes{2}.Name;
> MATLAB_fields

?data.Groups{1}.Datasets;
> Cell array with 3 elements

?data.Groups{1}.Datasets{1}.Name;
> /vertex/x
?data.Groups{1}.Datasets{2}.Name;
> /vertex/y
?data.Groups{1}.Datasets{3}.Name;
> /vertex/z

Note that the structure information retrieved from the file using the h5info 1682 command only contains information
about the groups (including attributes) and datasets, but not the data itself.

Accessing data

To retrieve the actual data from the HDF5 file, the h5read 1683 command is used. Each group, attribute, and dataset
in an HDF5 file is located by its path, which is similar to a path in your computer's file system (e.g. C:\Users\ or /
home/). When exploring the file structure (see the preceding section), note that the 'Name' of each group, attribute,
and dataset gives the path to that object.

For example, the dataset 'x' had the path (Name) /vertex/x'. To read the data in 'x,' execute the following command
in the script prompt. The script below will read the value of x, show its dimension (18905x1) and print the value for
the 1000th element.

x = h5read("processdata.h5","/vertex/x");
?size(x);
> result:
> 18905 1
?x(1000);
> result:
> 1.35405e-006

The same action can be performed using the following command as well (assuming that the variables filename and
data are already created with the codes in the preceding section).

x = h5read(filename,data.Groups{1}.Datasets{1}.Name);

In the downloaded script file, the data from the other datasets are read using similar commands.

Reading attributes

The h5read 1683 command cannot read the attributes of a group or dataset. In order to read the attributes, we have to
use the script command h5readattr 1683 . Since a single dataset can have multiple attributes and all of them will have
the same path, the command needs three arguments. Besides taking in the name of the file and the path of the
attribute (which is the name of the group or dataset to which the attribute belongs to), it also takes the name of the

2003 - 2016 Lumerical Solutions, Inc


798 Lumerical Knowledge Base

attribute itself as an input.

For example, recall that the group 'vertex' had the path (Name) '/vertex' and an attribute named 'MATLAB_class.' In
the script command, execute the following command. The command shows that the data in the group 'vertex' is in
'struct' format.

?h5readattr("processdata.h5","/vertex","MATLAB_class");
> struct

The same action can be performed using the following command as well (assuming that the variables filename and
data are already created with the codes in the preceding section).

?h5readattr(filename,data.Groups{1}.Name,data.Groups{1}.Attributes{1}.Name);
> struct

In the downloaded script, the units for the 'doping' dataset and the 'x' dataset are read using similar commands.

Using imported data


Once the data is imported from the HDF5 file into the script workspace, depending on the nature of the data, there
are numerous options available to use them in the simulation/calculation. Often, HDF5 format files are used to
import data in finite element format, like shown in the example above. These data usually contain geometric
information that can be used to create structures and doping profiles. Once the data is imported into the script
workspace, the 'Dataset builder 375 ' wizard can be used to create an unstructured dataset, build structures, and
create doping profiles.

5.6.6 Analysis groups


This section lists all analysis groups available in the Object Library. More advanced analysis can be performed with
the extensive scripting language, as described in the Scripting language 1383 section.

Advanced analysis 799 Bandstructure 806 Data representation 807 Far field 813

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 799

Optical power 824 Optoelectronics 842 Resonators and modal analysis 843

5.6.6.1 Advanced analysis


This page lists all analysis groups available in Advanced analysis.

This analysis group is FDTD


used to calculate the
charge and current
density inside metals as
well as the divergence of
the electric field.

Current charge density 802

An analysis group that FDTD


calculates the
Displacement field
(D=eps*E)

Displacement field

2003 - 2016 Lumerical Solutions, Inc


800 Lumerical Knowledge Base

An analysis group that FDTD


calculates the
Displacement field
(D=eps*E). The advanced
version of this object may
give slighly more
accurate results at
interfaces.

Displacement field (advanced)


This object calculates FDTD
the induced current in a
metal using Ampere's
circuital law.

Induced current 805

This object calculates FDTD


the photonic force by
integrating the Maxwell
Stress Tensor over a
closed boxed around a
particle.

Optical force MST 1968

This object calculates FDTD


the photonic force by
calculating the force per
unit volume and
integrating over the entire
volume to obtain the total
force.

Optical force volumetric 1969

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 801

This object calculates FDTD


the radiative and non-
radiative decay rate
enhancement for dipoles
near a metal particle.
advanced quantum
efficiency fluorescence
enhancement dipole
metal particle decay rate

Quantum efficiency 1915

An analysis group that FDTD


calculates complex
scattering (S) parameters
for periodic structures
with plane wave
illumination. Typically
used in meta-material
simulations.
s parameters plane wave
metamaterial

S parameter (metamaterial) 1989

5.6.6.1.1 Charge and current measurements

Objective
The following pages describe how to make charge distributions and current measurements within metals.

See also
Charge and Current density 802

Current in a wire 805

Note
This analysis should only be applied to real metals (i.e. materials where it is reasonable to assume the material is
a cloud of free electrons). This analysis will not work for PEC materials.

Background
To calculate the charge distributions and current densities, we treat each metal as a cloud of free electrons, i.e. a
plasma. To calculate the current density in a plasma we first recognize that all material properties within the FDTD
simulation are implemented via an effective material permittivity:
r r
D = e materialE
For the purposes of this calculation, we assume there are two contributions to the material permittivity: the
background permittivity (in this case, the permittivity of free space) plus the contribution from the current density.
r r
D = ( e 0 + e plasma) E
The first term is Do, the displacement field that would exist in free space for the given electric field. The second term
is proportional to the current J. For more details, see the notes below.

2003 - 2016 Lumerical Solutions, Inc


802 Lumerical Knowledge Base

r r
D = e materialE
r r
= e 0 E + e plasmaE
r
r iJ
= D0 +
w
Solving the above equation for J, we get
r r r
J = -i w ( D - D0 )
r
= -i w ( e material - e 0 ) E

See the following pages for examples.

Note
The total material permittivity is created from two contributions: one from the polarization of the medium due to
bound charge, and one from the current density due to free charge. Ampere's law can be written as
r r r r
- i wDbackground = H - J
r r r r
Dbackground = e 0 E + P = e 0 (1 + c )E
We can rewrite this equation as
r r r r
- i wDbackground = H - J
r iJ r r
- i w Dbackground + = H
w
r r r
- i wDmaterial = H
and, assuming that J is proportional to E, we have
r iJ
Dmaterial = e 0 E + P +
w
r
= (e 0 + e 0 c + e plasma )E
r
= e materialE
For plasma materials, such as metals, we have assumed that the susceptibility of the medium is 0 (i.e. P=0).

5.6.6.1.1.1 Charge and current density

Objective
This page describes how to calculate the charge and current density inside metals. The associated simulation files
use the current charge density analysis object for calculating these quantities. This analysis object can be found in
the object library in the Advanced analysis section.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 803

Associated files
usr_current_charge_density_2D.fsp
usr_current_charge_density_3D.fsp

See also
Charge and current measurements 801

Charge and Current density 802


Current in a wire 805
getdata 1646 , getresult 1647

Example
The associated files section provide a 2D and 3D example simulation using the current charge density analysis
groups. You can copy and paste these groups into your simulations or insert them directly from the object library.

Note: Mesh size and mesh refinement setting


It is often necessary to use a small mesh size for simulation involving metals, particularly when the metals have
rounded edges. The Conformal meshing algorithm feature can provide improved accuracy at interfaces, but it can
also introduce additional errors into the simulation when applied to metal interfaces. Therefore, the default
settings in FDTD Solutions is to apply the Conformal mesh to dielectric interfaces, but not to metal interfaces.

In these particular example files, the mesh refinement option has been set to 'Conformal Variant 1' (CV1), rather
than the default setting of 'Conformal Variant 0' (CV0), meaning that the conformal meshing algorithm will be
applied at the metal-dielectric interfaces. This change should only be made to your simulation file after careful
convergence testing to confirm that the CV1 option gives better (i.e. more converged) results than CV0. Until you
do this type of convergence testing, we recommend using the default CV0 option in your simulation.

The factors that make CV1 appropriate for this simulation include:
Over the simulation bandwidth, the metal refractive index is on the same order of magnitude as the background
index. CV1 tends to work best when the refractive index does not change significantly across the interface.
The simulations use a relatively small mesh (5nm for the 3D example, 0.5nm for the 2D example).

For more information on the mesh refinement options, see Mesh refinement options 448 .

To reproduce the following figures, open and run usr_current_density_2D.fsp. After the simulation is
complete, you can reproduce the following figures by visualizing the object data. The following results show the
current and electric field data for lambda = 340nm. Also note that the image colorbar scales have been adjusted.

2003 - 2016 Lumerical Solutions, Inc


804 Lumerical Knowledge Base

The X and Y
components of
the current
density J.

These figures
show the
current flowing
back and forth
in the X
direction as
the wave
propagates
along the
particle in the
Y direction.

Also notice
that the
current is zero
outside the
particle, as
expected.

The X and Y
components of
the Electric
field.

The current
density is
proportional to
the electric
field, except
for a 90 degree
phase shift.

The same analysis group also calculates the divergence of the electric field, which gives the total charge density.
This is shown in the plot below, we can see that the charges are confined to the edge of the metal, as expected.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 805

Note: Using symmetric/anti-symmetric boundary condition


If symmetric/anti-symmetric boundary condition, make sure the symmetry condition (Analysis tab->Script tab) is
specified in the analysis group to avoid matrix size mismatch between parameters used.

5.6.6.1.1.2 Current in a w ire

Objective
This page describes how to calculate the total current within a metal wire. The associated simulation file uses the
induced current analysis group that can be added to your file from the Advanced Analysis section of the object
library.

Associated files
usr_current_in_wire.fsp

See also
Charge and current measurements 801

Charge and Current density 802


Current in a wire 805

Example
The analysis group in the associated file uses Ampere's law to calculate the current induced in a metal wire by the
incoming EM fields.

2003 - 2016 Lumerical Solutions, Inc


806 Lumerical Knowledge Base


I = H dl - d D dS dt

L S

Note: This analysis object treats all metals as plasma materials, with a refractive index of 1. For the purposes of this
calculation, metals are defined as materials with absorption. This generally works well when the background material
is a non-dispersive dielectric material (i.e. air or glass). However, if your background material is a dispersive (lossy)
dielectric, the analysis script will need to be modified.

To run this example, open the attached simulation file and enter the following script commands:
run;
runanalysis;
f=getdata("induced_current","f");
current=getdata("induced_current","I");
plot(f/1e9,abs(current),"f (GHz)","|current|","Induced current");

5.6.6.2 Bandstructure
This page lists all analysis groups available in Bandstructure.

This analysis group is FDTD


used for bandstructure
calculations. It returns a
spectrum with peaks at
resonant frequencies.

Bandstructure 1844

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 807

This analysis group FDTD


creates n randomly
positioned dipole sources
in each unit cell of
photonic crystal structure
for bandstructure
simulations.

Dipole cloud 1844

5.6.6.3 Data representation


This page lists all analysis groups available in Data representation.

This object uses a FDTD


collection of point
monitors to create a line
or plane monitor with an
arbitrary orientation.

Angled monitor 808

2003 - 2016 Lumerical Solutions, Inc


808 Lumerical Knowledge Base

This analysis group FDTD


creates a curve
populated with point
monitors. For example, it
can create a circular
monitor shape.

Curved monitors 808

This analysis group uses FDTD


an index monitor to
create an outline of the
structure and super-
imposes it on E-field
plots.

E-field outlined 811

This object is similar to FDTD


the curved and angled
monitor groups to plot
data along arbitrary
curves and lines. This
object will require more
memory, but may
process faster.

Interpolation 808

5.6.6.3.1 Curved or angled monitors

Objective
This page shows two examples to explain the idea of creating curved or angled monitors using groups and
interpolation. This approach is required because the basic monitor objects can not be curved or rotated.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 809

Associated files
Example 1 (using groups):
usr_curved_monitor_group.fsp
usr_curved_monitor_group.lsf
Example 2 (using interpolation):
usr_curved_monitor_interp.fsp
usr_curved_monitor_interp.lsf

Example 1 (using groups):


This example shows how to use groups of point monitors to obtain frequency domain data along arbitrary paths
and arbitrarily oriented planes. In the example below, the mode profiles for a bent wire waveguide are determined
at 0 degrees and at 45 degrees into a bent waveguide. In addition, the electric field intensity is determined along a
circular arc in these planes.

To obtain the images shown below, run the usr_curved_monitor_group.fsp simulation. Then, run the
usr_curved_monitor_group.lsf script file. Please note that to save on meshing time, the mesh refinement
setting was set to staircase. The first two images shown below come from the two monitor groups located at the
input section of the waveguide. The left image is obtained from the monitor plane2 group. Since the input to the
waveguide is normal to the X-axis, the same distribution can be obtained with a conventional 2D X-normal power
monitor. On the right, you can see the electric field intensity obtained from monitors that form the circular arc
which is drawn in red in the left image. These monitors are contained in the curve2 group, and the location of the
monitors can be easily modified to lie along any arbitrary curve in 3D.

The next two images shown below come from the monitor groups located at 45 degrees into the waveguide. In
this case, the 2D plane monitor data cannot be obtained from a conventional monitor. As with the images above,
the image to the right shows the electric field intensity around the red circular arc from the left image.

2003 - 2016 Lumerical Solutions, Inc


810 Lumerical Knowledge Base

The image below (left) shows the transmission vs. frequency for both the monitor group (composed of 50x50
profile point monitors) located at 0 degrees and the 2D X-normal power monitor. The transmission from the two
types of monitors will converge to the same result as the number of monitors in the monitor group increase. The
right image shows the same plot for the monitor group at 45 degrees.

Example 2 (using interpolation):


In some situations, it is useful to know the field profile or other data along an arbitrary path. Unfortunately, 1D
line monitors in FDTD Solutions/propagator are always straight, and always parallel to the X,Y or Z axes. If you
need data along some other path, one option is to use a 2D monitor. When the simulation is finished, the
interpolate function can be used to get the data along an arbitrary path within the plane of the 2D monitor. In
the following example, we get the field profile along a straight line with a 45 degree angle, and a semi-circle.
Interpolation along a curve can be done using the interpolation analysis object from the Data representation
section of the object library.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 811

Interpolating monitor data along an arbitrary path.


The data interpolation can either be done using a script file or with the interpolation analysis object. After
running the associated simulation file, you can either run analysis using the interpolation object to get the
plots, or else run the associated script file. The script first plots the full 2D field profile that was recorded by
the monitor (shown above). Next, we define a new set of x,y position vectors that define the path of interest.
The first example is a line from (-5,-5um) to (5,5um). The interpolation function is used to get the field values
along this line. When the interpolation is finished, the path and the field data along that path are plotted.
Finally the calculation is repeated for a curved path along a semi-circle with a center of (1,0) with a radius of
4um. The two sets of interpolated data are shown below.

Note: Minimizing data collected


If you need to minimize the simulation time or the amount of data collected, this method of recording 2D data
then interpolating to a 1D line is not ideal. An alternate approach is to create a line of point monitors located
directly along the path of interest. See the previous example for details.

5.6.6.3.2 Structure outlines

Objective
This page provides an example file which uses the E-field outlined analysis object that creates a plot of |E|^2 with the
structure outline. The E-field outlined object can be inserted from the object library in the data representation
section. The files in this example were created using FDTD Solutions, but the same analysis group can be found in

2003 - 2016 Lumerical Solutions, Inc


812 Lumerical Knowledge Base

the Component library in MODE Solutions.

If you wish to make more sophisticated structure outlines on your figures, the best option is to export the data to
another data visualization tool such as Matlab. In addition to exporting the field data, you must export the refractive
index data. The refractive index profile can be used to create the structure outline. In Matlab, you might use the
contour functions.

Associated files
usr_make_outine_FDTD.fsp
usr_make_outine_FDTD.lsf

The associated simulation file has an analysis group that returns the field profile with the structure outline super-
imposed on the data. To reproduce the above figure, open the simulation file and run the associated script. It will
create the following figures: |E|^2 with and without the structure outline.

Default |E|^2 |E|^2 with structure outline

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 813

5.6.6.4 Far field


This page lists all analysis groups available in Far field. See the Solver - Far field 126 section for more information.

A surface can be FDTD


characterized using a
Bidirectional Scattering
Distribution Function
(BSDF).This function
relates the intensity of an
incoming ray to an
outgoing ray for all
angles of incidence and
reflection/transmission.

BSDF 1742

This group calculates the FDTD


far field (both |E|^2 and
Power) assuming an
interface is present in the
far field.

Changing the far field refractive index 814

2003 - 2016 Lumerical Solutions, Inc


814 Lumerical Knowledge Base

This group determines FDTD


the fields outside of a
closed box by calculating
the projections for each
surface and then
summing the results.

Projections from a monitor box 817

This object calculates FDTD


the fraction of power
transmitted to each
grating order and
calculates the number of
propagating grating
orders.

Grating order transmission 1790

This analysis object FDTD


creates a plot of a grating
order polarization ellipse
to determine the primary
polarization angle and
the degree of circular
polarization. The S and P
polarization are returned
for all grating orders as a
function of frequency.

Polarization ellipse 819

5.6.6.4.1 Changing the far field refractive index

Objective
By default, far field projections assume that the material at the monitor location extends to infinity. In the following
figure, this implies the substrate material extends to infinity. Obviously this is not always true.

This page describes how to calculate the far field distribution assuming the refractive index in the far field is different
from the index in the near field, which makes it possible to include effects such as the Substrate-Air interface shown
above.

Note: The descriptions and examples of the far field projection calculation on the following pages are primarily
intended for users of FDTD Solutions. For users interested in calculating far field projections with MODE Solutions,
these descriptions are basically still correct, although some subtle differences do exist. For more information and
examples on far field projections in MODE Solutions, please contact support@lumerical.com.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 815

In this topic
Projections from a monitor box 817
Changing the far field refractive index 814

Polarization ellipse 819

Associated files
usr_far_field_index.fsp
usr_far_field_index.lsf

See also
Far field projection 126 toolbox
Far field projection 1657 script functions
Stackrt 1504 script function

Two methods are available: Directly setting the far field refractive index in the far field projection functions, and
applying the Fresnel equations to the far field data in an additional post processing step.

Setting the far field refractive index in the far field projection functions
The far field projection functions have an optional argument to set the far field refractive index:
out = farfield3d("mname",f, na, nb, illumination, periodsa, periodsb, index, direction);

To understand this option, it is important to remember that the far field projection calculation is basically a plane
wave expansion of the near field data. To calculate the expansion, it is necessary to know the background refractive
index, since the ratio between E and H fields in a plane wave depends on the refractive index. By default, the
refractive index at the monitor location is used for the expansion, but the index property of the projection function
allows a different index to be specified.

Expanding the fields using a different refractive index can provide useful information, but some aspects of the data
(particularly the field amplitude and power measurements) can be slightly challenging to interpret. To illustrate the
basic issue, consider a single plane wave in air, propagating in the forward direction. If this plane wave has an
electric field amplitude of 1 V/m, the magnetic field amplitude will be sqrt(eps0/mu0) = 0.0026.

Now imagine expanding this field profile, using plane waves that exist in a medium with a refractive index = 2. The
key point is that the ratio between E and H will be different in this medium by a factor of the the refractive index: If
E=1, then H=2*sqrt(eps0/mu0) in this medium. To represent the original field profile using these plane waves, it is
necessary to combine a forward propagating wave with a electric field amplitude of 0.75 propagating in the forward
direction and a backwards wave propagating with an amplitude of 0.25. Combining these two plane waves allows us
to reconstruct the original field profile. Notice that the sign of H is reversed for the backward propagating wave.
E field: 0.75 + 0.25 = 1
H field: 0.75*2 - 0.25*2 = 1

This method can be used to quickly see how refraction from a far field interface will affect the angular distribution of
radiation. It is also used in various types of advanced data analysis. However, it is generally not the best option for
calculating the effect of a far field interface, especially when the results will be compared to experimental
measurements (i.e. power or field intensity measurements). Instead, the Fresnel correction method described below
should be used.

Example
The associated simulation file has a gaussian beam propagating at a 10 degree angle of incidence in a medium with

2003 - 2016 Lumerical Solutions, Inc


816 Lumerical Knowledge Base

a refractive index of 2. The analysis script will plot the far field for a refractive index of 2 and 1.
Efar = farfield3d("T",1,res,res);
Efar_air = farfield3d("T",1,res,res,1,1,1,n_air);

Notice how the angle of the beam changes. In the FDTD simulation (with a refractive index of 2), the gaussian beam
propagates at an angle of 10 degrees. The standard far field projection in the substrate shows the beam continues to
propagate at a 10 degree angle. When the far field refractive index is changed to 1, the angle of the beam shifts to
about 20 degrees. Snell's law can be used to confirm this is the expected shift:

n sin( q1 )
q 2 = a sin 1
n2
2 sin( 10)
= a sin
1
= 20.3 deg

Fresnel correction
Alternatively, it is possible to calculate the far field data using the 'near' field refractive index, then use Snell's law
and the Fresnel equations to account for the far field interface. Snells' law is used to calculate the change in
propagation direction that occurs when the fields pass from one material to the other. The Fresnel equations are
used to account for the fraction of power that is lost due to reflection from the interface. The details of this calculation
can be found in the associated example files. In particular, see the analysis script of the 'far_field_change_index'
analysis group.

This approach can be slightly more complicated that the first method, but it is recommended when it is necessary to
get correctly normalized field amplitudes and power measurements. The example script will calculate the |E|^2 in the
far field using the default projection (assuming the substrate with an index of 2 extends to infinity), using the plane
wave expansion method with a far field index of 1, and using the Fresnel correction using a far field index of 1.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 817

Note:
It is important to understand that multiple reflections (between the interface and the device in the FDTD
simulation) effects are not taken into account by this technique. Fortunately, such reflections are often small,
making this approximation valid in many situations.

5.6.6.4.2 Projections from a monitor box

Objective
This page describes how to calculate fields outside of a closed surface using a box of monitors and the far field
projection functions.

Lumerical provides many built in analysis groups in our object library. Please press this button to open
the online library of analysis groups and select the far field category to see which analysis groups are available.

Note: The descriptions and examples of the far field projection calculation on the following pages are primarily
intended for users of FDTD Solutions. For users interested in calculating far field projections with MODE Solutions,
these descriptions are basically still correct, although some subtle differences do exist. For more information and
examples on far field projections in MODE Solutions, please contact support@lumerical.com.

In this topic
Projections from a monitor box 817
Changing the far field refractive index 814

Polarization ellipse 819


Associated files
usr_farfield_symmetry.fsp
usr_farfield_angular.lsf
See also
Solver - Far field 126
FFP functions 1657
3D Mie scattering 1752
polar script command 1526

Related publications
Allen Taflove, Computational
Electromagnetics: The Finite-Difference Time-

2003 - 2016 Lumerical Solutions, Inc


818 Lumerical Knowledge Base

Domain Method. Boston: Artech House,


(2005).

Using the surface equivalence theorem, it is possible to show that fields radiated outside of a closed box by sources
located inside the box can be determined exactly from the field components at the surface of the box. Since
Maxwell's equations are linear, the fields outside of the box can be computed by calculating the far field projections
for each surface of the monitor box and then summing the results.

The associated files for this section, the usr_farfield_angular.lsf script file and
usr_farfield_symmetry.fsp simulation show how to use this method to obtain the electric field and intensity
in the far field due to two point sources. For sake of simplicity this simulation only contains two dipoles surrounded
by a box of monitors. However, this method also works when there are structures located in the monitor box. See,
for example, the Mie 3D application example.

A perspective view of the simulation is shown below to the left. The yellow box in the image shows the edges of the
monitors, which are grouped together in an analysis group. When the simulation has been run, the
usr_farfield_angular.lsf script file can be used to run the analysis script and create the plot of the far field
data shown below to the right. All of the far field projection script is contained in the analysis group, and the script
file is used to run the analysis script plot the resulting data.

Note: Particle scattering with a substrate


The 'box of monitor' far field projection is frequently used when studying particle scattering. This is fine, but it's
important to remember the requirement that everything beyond the monitor box must be a single homogeneous
material. When a substrate is present, this approach is not valid. Instead, the best way to calculate the far field
scattering pattern is to use a single monitor, located above or below the particle (depending if you want scattering
in the forward or backwards direction). You can then use the standard farfield3d function. When using a single
monitor, it's important to make the simulation span large enough that most of the scattered light will pass through
the monitor before hitting the PML absorbing boundary conditions.

Note: Negative signs in front of far field projections when the normal to the
monitor box points along the negative axis.
In the case where no symmetry is used, the scat analysis group contained in the
usr_farfield_symmetry.fsp simulation computes the far field projection from the sum of the far field
projections from the six monitors which make up the monitor box. Notice the negative sign on some terms.
E2_far = farfieldexact("x2",x,y,z) + farfieldexact("y2",x,y,z) + farfieldexact("z2",x,y,z
-farfieldexact("x1",x,y,z) - farfieldexact("y1",x,y,z) - farfieldexact("z1",x,y,z);
The negative sign is required because the projection needs information about the projection surface normal. In the

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 819

image below, the projection normal points outwards from the monitor box for the left monitor (x1) and right monitor
(x2) are depicted with red arrows. However, the far field projection function does not know which monitor is on the
left; it always assumes the monitor normal is pointing along the positive axis, as depicted with the yellow arrows.
The negative sign in front of the far field projection for the x1 monitor in the equation above corrects for the fact that
the yellow and red arrows point in opposite directions.

Note: Only the farfieldexact, farfieldexact2d and farfieldexact3d commands allow projections
from multiple monitors added to create a total far field projection.

Note: Far field projections and symmetric/anti-symmetric FDTD region boundaries


When symmetric or anti-symmetric boundary conditions are used in FDTD simulations, it is possible that a
monitor will lie entirely outside of the simulation region. Although the monitor does not collect any data, it is
possible to obtain the monitor data from other monitors in the simulation. In the usr_farfield_symmetry.fsp
simulation, there are two monitors which lie outside of the simulation region, and the analysis object uses data
from other monitors to obtain the contribution from the monitors which are not included in the simulation.

Note: Far field half space analysis vs resolution and number of frequency points
This calculation will take longer than the polar plot. In particular, the resolution and the number of frequency points
can significantly affect the time it takes to computer the half space. Reduce either or both parameters can
noticeable speed up the analysis.

5.6.6.4.3 Polarization ellipse

Objective
This page provides an example which uses the polarization ellipse analysis object that creates a plot of the
polarization ellipse of a grating order. From the ellipse, it is easy to determine the primary polarization angle and the
degree of circular polarization. In addition, this analysis group output the polarization handedness for all grating
orders and wavelengths. In this example, the point of view of the receiver (against the propagation direction)
polarization convention is followed.

The polarization ellipse analysis object can be found in the object library in the far field projections
section.

2003 - 2016 Lumerical Solutions, Inc


820 Lumerical Knowledge Base

Associated files
usr_pol_ellipse.fsp

See also
Circular polarization 540
Solver - Far field 126
Script - grating projection
1666

Simulation setup
Structures
We create a nanowire polarizer with a series of rectangles of Perfect Electrical Conductor (PEC). These wires
reflect S polarization, but allow P polarization to pass through. It is always a good idea to start an investigation
with a very simple test case. Before studying the nanowire polarizer, we will check our analysis script by
simulating a plane wave propagating through empty space. This is an ideal test case because we know the
measured polarization should match the source polarization. Note, the structures outside the simulation region
are just for visualization purpose.

Sources
The simulation uses two plane wave sources which allow us to simulate linear, circular, or elliptically polarized

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 821

light in a single simulation. For example, to create circularly polarized light, set the amplitude of each source
to 1. Set a 90 degree phase difference between the two sources. See the Circular polarization 540 page for
more information.

Simulation region
We use Bloch boundary conditions 471 because the source is at a non-normal incidence.

Monitors
The Polarization ellipse analysis object is composed of a power monitor and some associated script
commands. Lumerical provides many built-in analysis groups in our object library. Please press this button

to open the online library of analysis groups and select the far field category to add a similar object
to any simulation.

Results - polarization ellipse


It is always a good idea to start with a simple test case to ensure there are no errors in the simulation setup or
analysis scripts. Therefore, we will start by disabling all of the structures in the simulation. With
no structures, we can expect the polarization measured by the monitor to match the source polarization. By
changing the source amplitude and phase, you should be able to reproduce the following results. Since there
is no structure in this simulation, all of the light will be transmitted to the zeroth grating order in far field.

The title of the plot should indicate the grating order of interest, the grating order angles, the ellipse major axis
angle and the major/minor axis ratio.

Disabling all of the structures (test case)


Linear
polarizat
ion, 0
degree
(P
polarizat
ion)

Source
settings:

sourc
e_x
amplit
ude: 1
sourc
e_x
phase
:0
sourc
e_y
amplit
ude: 0
sourc
e_y
phase
:0

2003 - 2016 Lumerical Solutions, Inc


822 Lumerical Knowledge Base

Linear
polarizat
ion, 45
degree

Source
settings:

sourc
e_x
amplit
ude: 1
sourc
e_x
phase
:0
sourc
e_y
amplit
ude: 1
sourc
e_y
phase
:0
Circular
polarizat
ion

Source
settings:

sourc
e_x
amplit
ude: 1
sourc
e_x
phase
:0
sourc
e_y
amplit
ude: 1
sourc
e_y
phase
: 90

The above tests indicate that our simulation and analysis script are correctly setup. We can now move on to a
slightly more complicated system, with the nanowire grating structure. This structure acts like a polarizer,
allowing the P polarization to pass through, while reflecting most of the S polarization. After running the
simulation with a circularly polarized source, we get the following polarization ellipse. The ellipse clearly
indicates that most of the S polarization has been removed, as expected.

Enabling the structure

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 823

Circular
polarizat
ion

Source
settings:

sourc
e_x
amplit
ude: 1
sourc
e_x
phase
:0
sourc
e_y
amplit
ude: 1
sourc
e_y
phase
: 90

Extracting Gs, Gp data to text file


Since the analysis group only plots the polarization ellipse for 1 grating order at a time, one may want to
extract all Gs, Gp information as a function of all grating orders and frequency points. User may use the below
example command to export Gs_plot, and similarly for Gp_plot, to a text file (and then to Excel file for further
analysis). Note that, the write command cannot export multi-fold matrix data to a single .txt file. The extraction
of the first (Gs), second (n) and third (m) dimensions data is shown, user may further modify these lines to
extract the fourth dimension (frequency). Please see, for 1523 , write 1440 , pinch 1483 , text file 1406 .

#clear; # may need to clear the script workspace


Gs_plot=getresult("polarztn_ellipse","Gs_plot");
Gs_plot=pinch(Gs_plot.Gs_all,4); # only pick the first frequency point
sz=size(Gs_plot); # size of each dimension
for(i=1:length(sz)) { # loop over the last dimension
write("Gs_plot.txt","slice "+num2str(i)); # slicing the third dimension
write("Gs_plot.txt",num2str(pinch(Gs_plot,length(sz),i)));
}

Results - Grating order strength and polarization handedness


The Grating order strength figure indicates that a fraction of the power is scattered to the (-1,0) grating order
(about 60%). To check the polarization of this order, visualize pol in the Result View, then choose G to be the
attribute. To see the exact numbers, press View Data 748 in the attributes section. It is not necessary to re-run
the actual simulation. To slice 748 it over other frequency points, choose "lambda" in the parameter section and
slice it to your wavelength of interest. In this example, the point of view of the receiver (against the propagation
direction) polarization convention is followed. For detailed definition of the output quantities, please refer to the
analysis group, Analysis -> Script tab.

2003 - 2016 Lumerical Solutions, Inc


824 Lumerical Knowledge Base

5.6.6.5 Optical power


This page lists all analysis groups available in Optical power.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 825

An analysis group of FDTD


power monitors for
measuring scattering,
absorption, extinction
cross sections.

Cross section 1752

An analysis group that FDTD, varFDTD


measures the spatial
absorption profile.

Absorption per unit volume 826

(Simple method) 827


An analysis group that FDTD
measures the spatial
absorption profile. The
Advanced absorption
monitor should be used
to measure absorption in
metals and other strongly
absorbing materials.

Absorption per unit volume 826

(Advanced method) 831


An analysis group that FDTD
determines if power is
flowing forwards or
backwards in a particular
plane, which cannot be
determined by the
Poynting vector alone.

Direction of power flow 839

2003 - 2016 Lumerical Solutions, Inc


826 Lumerical Knowledge Base

An analysis group that FDTD, varFDTD


measures the power
leaving the box.

Power transmission box 841

5.6.6.5.1 Absorption per unit volume

Objective
This section describes a number of techniques for calculating power absorption per unit volume (Pabs) due to
material absorption. The files in this section were created using FDTD Solutions, but a similar approach can be
applied for MODE Solution's propagator. Once Pabs is known, it is easy to calculate absorption in some volume by
integrating the loss function over that volume.

Lumerical provides many built in analysis groups in our object library. Please press this button to open
the online library of analysis groups and select optical power category to insert the analysis groups shown here.

In this topic
Simple method 827
Advanced method 831
Advanced method - multiple materials 834

Divergence of Poynting vector 837

The following sections provide three techniques for calculating power absorption per unit volume (Pabs).

Simple method 827

This section describes the standard technique used to calculate power absorption per unit volume. Power absorption
is proportional to the electric field intensity and the imaginary part of the permittivity. Therefore, the calculation
requires field data from a frequency domain power monitor, and permittivity data from an index monitor.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 827

Advanced method 831

The advanced method is an extension of the simple calculation that minimizes interpolation errors near interfaces.
This technique is appropriate for simulations with large field discontinuities at the structure interfaces. Such
discontinuities are common in simulations involving metals.

Divergence of Poynting vector 837

This section describes how to calculate the absorption per unit volume from the divergence of the Poynting vector.
Divergence calculations tend to be very sensitive to numerical problems, which makes this technique inferior to the
other techniques described in this section. This method is presented only because it was a recommended approach
in earlier versions of FDTD Solutions.

5.6.6.5.1.1 Simple method

Objective
This page describes how to calculate the power absorption per unit volume (Pabs) due to material absorption. Once
Pabs is known, it is easy to calculate total absorption in some volume by integrating the loss function over that
volume.

Associated files
usr_absorption.fsp
usr_absorption.lsf
usr_absorption2D.fsp
usr_absorption2D.lsf

See also
Advanced method 831
Advanced method - multiple materials 834

Divergence of Poynting vector 837

Theory
The absorption per unit volume can be calculated from the divergence of the Poynting vector,
r r
Pabs = -0.5real ( P )
It is possible to calculate the absorption directly from this formula (see the Divergence of Poynting vector
section), but divergence calculations tend to be very sensitive to numerical problems. Fortunately, there is a
more numerically stable form. It can be shown that the above formula is equivalent to
r r
Pabs = 0.5real (i wE D * )
With a little more work, we get the desired result
2
Pabs = -0.5 w E imag ( e )
To calculate the absorption as a function of space and frequency, we only need to know the electric field
intensity and the imaginary part of the permittivity. Both quantities are easy to measure in an FDTD
simulation.

Simulation setup
The example simulation is composed of an Air - Glass - Si stack. A focused beam is incident on the stack.

2003 - 2016 Lumerical Solutions, Inc


828 Lumerical Knowledge Base

Air and Glass are not lossy materials, so we only expect absorption to occur in the Si layer.

A 3D power monitor is used to measure the electric field intensity. Similarly, an index monitor is used to
measure the permittivity. Both monitors should be the same size. 3D monitors tend to require large amounts
of memory, so they should be kept as small as possible. In this example, both monitors cover the entire
simulation region, but this is only to demonstrate that the loss is zero in the Air and Glass regions.

The simulation setup is shown in the following figure.

Note: Check memory requirements


Since 3D monitors require large amounts of memory, be sure to use the Check memory requirements button
before running the simulation. In this example, about 100MB of data is collected. Up to 1GB is required to
run the analysis script. Memory requirements for larger simulations can be much higher.

Note: Reducing memory requirements


If the memory requirements are too large, consider making some of the following modifications:
1. Reduce the spatial size of the monitors.
2. Reduce the number of frequency points.
3. Use the monitors spatial down-sampling option.
4. In the Power monitor - Data to record tab, unselect the H fields and Poynting vector data. Only the E
fields are required for this calculation.

Calculating Pabs
Run the simulation and then run the analysis script, which will create a number of figures. The first three
figures show a cross section of the electric field intensity and material properties at y=0 for the second
frequency point (approx 400nm).

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 829

The electric field intensity. The figure


can be divided into 4 regions.

0.3<z<0.5 - Air layer, reflected


fields
0.1<z<0.3 - Air layer, interference
between the incident and reflected
fields
0<z<0.1 - Glass layer, interference
between the incident and reflected
fields
-0.5<z<0 - Si layer, the transmitted
fields
The real part of the refractive index.
There are three materials in this
simulation.

0.1<z<0.5 - Air (index of 1)


0<z<0.1 - Glass (index of
approximately 1.5)
-0.5<z<0 - Si (index of
approximately 4.2)

The imaginary part of the refractive


index. The imaginary part is a
measure of the material loss. Loss
will only occur in materials with k>0.

0.1<z<0.5 - Air (k=0, no loss)


0<z<0.1 - Glass (k=0, no loss)
-0.5<z<0 - Si (k is approximately
7e-2, lossy)

From this data, the script calculates the material absorption as a function of space and frequency. A cross
section of the absorption function is shown below. Notice that loss only occurs in the Si layer.

2003 - 2016 Lumerical Solutions, Inc


830 Lumerical Knowledge Base

Total absorbed power


The total absorbed power can be calculated in two ways:

1. Integrate the loss function over the entire simulation volume.

2. Use the transmission function and a set of 2D power monitors to measure the amount of power flowing into
and out of the Si layer. The difference between these values will be the material absorption. In this example, T2
measures the power flowing into the Si, and T1 measures the power flowing out. To be strictly correct, there
should also be monitors at the sides of the Si layer, but they were not added to this simulation because most
of the power is flowing in the Z direction.

Both techniques give similar results. If a smaller mesh size was used (default mesh accuracy=2), the results
would be even closer. Also, although we don't see it in this example, the discrepancy can increase slightly at
the shorter wavelength where the absorption of the Si is higher. This is due to some numerical errors in
integrating the loss in the first dz of the Si and can be improved by using the Advanced method 831 .

Absorbed power in spherical region


When calculating absorption within a rectangular region, a box of 2D power monitors is computationally more
efficient (since it only requires surface data rather than volume data, and because the index monitor is not
required). The primary reason for calculating the loss as a function of space is to integrate over non-rectangular
regions. For example, imagine we want to calculate the total absorption within a spherical region. In such
cases, we can calculate the loss as a function of space, then integrate over the spherical volume. It is also
possible to define an integration filter using the material properties to define whether a point should be included
or not included in the integration. See the Advanced method - multiple materials 834 page for more information
on how to do this.

The following figure shows a cross section of an integration filter for a sphere centered at (0,0,-200 nm) and a
radius of 200nm.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 831

The final output of the script is the percentage of power absorbed within the spherical region at a wavelength of
400nm: ~1%

5.6.6.5.1.2 Advanced method

Objective
This page describes a more advanced spatial absorption calculation which minimizes interpolation errors that occur
because of discontinuities in the electric field near interfaces. Consider using the advanced method if a significant
fraction of the absorption occurs within the first mesh cell at interfaces.

Associated files
usr_absorption_advanced.fsp
usr_absorption_advanced.lsf
mie_au_jc_fdtd.txt

2D example:
usr_absorption_advanced_2D.fsp
usr_absorption_advanced_2D.lsf

See also
Simple method 827
Advanced method - multiple materials 834

Divergence of Poynting vector 837


Power transmission box 841

Background
This technique is an extension of the simple method 827 described on the previous page. For reasons given on
the previous page, the advanced method calculates the absorption profile using the relation
2
L = -0.5 w E imag ( e )

The difference between the two techniques is the monitor interpolation option.

2003 - 2016 Lumerical Solutions, Inc


832 Lumerical Knowledge Base

An inherent part of the FDTD method is that during the simulation, each field component (Ex, Ey, Ez) is
calculated at a different location within the Yee cell. If a monitor collects raw field data from the simulation,
post processing becomes complicated due to the fact that each field component is known at a different
location. Even simple calculations like |E|^2 = |Ex|^2+ |Ey|^2+ |Ez|^2 are not trivial since Ex, Ey, and Ez are
not known at the same location.

To simplify post-processing of simulation data, the default behavior of monitors in FDTD Solutions is to
interpolate all field components back to a common set of points (the origin of the Yee cell). This makes post-
processing simple, since all field components are known at a common point.

In most situations, the interpolation errors that occur when interpolating each field component back to the
origin of the Yee cell is negligible. Unfortunately, the absorption calculation can be quite sensitive to these
interpolation errors. The interpolation errors only become significant when:
The electric field component normal to the structure surface is large AND
a significant fraction of the total absorption occurs within the first set of mesh cells at the structure surface.

From Maxwell's equations, we know that the field component normal to the structure surface will be
discontinuous at the interface. Also, it is obvious that interpolating near a discontinuity can lead to errors. In
the absorption calculations, the interpolation error typically makes the electric field just inside the absorbing
material much larger than it really is. Since absorption is proportional to electric field intensity, this will tend to
overestimate the total absorption.

Note that these errors only occur for the mesh cells which cross the material interface. If the absorption in the
mesh cells that cross the interface is a small fraction of the total absorption, then the overall error will be
small. However, if most of the absorption is concentrated near the surface (as is the case with metals), then
the overall error can be significant.

Note: Conformal mesh


The material data has an index that is on the same order of magnitude as the background index. Also, we
are able to simulate this problem at a reasonably small mesh size of 5nm or less. For this reason, we can
change the mesh refinement option to "conformal variant 1" to take full advantage of the conformal meshing
feature, even for a metals.

Example
The simulation file usr_absorption_advanced.fsp can be used to calculate the power absorption per
unit volume of a gold sphere illuminated by a focused beam.

The total absorption is calculated in three ways:


A box of 2D monitors around the sphere
calculates the net power absorbed within the
box. This is an easy, efficient and accurate
technique to calculate total absorption within a
rectangular region.
The simple absorption analysis group described
in the previous page. The monitors in this group
use the standard field interpolation option. It will
not give accurate results in this simulation
because the field component normal to the
surface of the gold sphere is large. Errors in the
absorption data near the surface are significant
since most of the absorption occurs near the
surface.
The advanced absorption analysis group. The
monitors in this group do not use monitor
interpolation. This gives more accurate
absorption data near the sphere surface.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 833

Run the simulation, then run the associated analysis script. It will create a figure showing the absorption
spectrum as calculated by the three techniques. The analytic solution (calculated from Mie theory) is also
shown.

There are a few interesting points to notice:


1. The Net power into box and Advanced techniques are very similar.
2. The absorption calculated by the standard technique is quite different than the result from the other
techniques The standard technique is not appropriate for calculating the spatial absorption profile in metals
because it is very sensitive to interpolation errors of discontinuous field components at the metallic
interfaces.
3. All three techniques are somewhat different than the analytic result. This example was setup to run
quickly, and not to provide the most accurate result. A smaller mesh size, larger simulation region, and
more PML layers would be required to get closer agreement with the theory.

Tip: Size of the monitor


To get the most accurate results, the analysis object should be large enough to completely surround the
absorbing material, plus at least 1 mesh cell of non-absorbing region around the edges of the analysis object

Tip: Periodic and Bloch boundary conditions


To get the most accurate results when using this analysis object with Periodic and Bloch boundary
conditions, a small change should be made within the Analysis script. For details, see the analysis script
comments or contact Lumerical technical support.

Note: Higher accuracy simulation


The following figure shows the absorption data from a simulation that was run with higher accuracy settings.
As you can see, the FDTD results are converging to the analytic solution. The simple Net power box and
Advanced technique are closest to the theory.

2003 - 2016 Lumerical Solutions, Inc


834 Lumerical Knowledge Base

To increase the accuracy of the example file, make the following changes:
Simulation X, Y, Z span: 2um
Mesh override region mesh size: 1.5nm
PML layers: 24

Warning: The memory requirements and file size will be very large with these changes.

5.6.6.5.1.3 Advanced method_multiple materials

Objective
This example shows how to calculate the power absorbed in a specific material when there are two (or more)
dispersive materials in a simulation and objects are of arbitrary shapes where it would be difficult to define the a
spatial filter. This example applied both 2D and 3D cases.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 835

Associated files
usr_absorption_advanced_material.f
sp
usr_absorption_advanced_material.l
sf

See also
Simple method 827
Advanced method 831
Divergence of Poynting vector 837

Power transmission box 841

In this example of usr_absorption_advanced_material.fsp a silver particle of arbitrary shape is embedded in a silicon


substrate. Suppose we are interested in the power absorbed in the silver particle.

The advanced absorbed power monitor group returns the power absorbed as a function of space, ie Pabs(x,y,z).
Once the project file is run, executing the usr_absorption_advanced_material.lsf file will multiply Pabs(x,y,z) by 1 if
the (x,y,z) values are inside the silver particle and 0 if they are outside.
We can use the material properties of Silicon and Silver to tell if a specific point (x,y,z) lies inside particle or not.

The script, uses the index monitor inside the Pabs box to create the filters by comparing both the real and imaginary
parts the index of every point in the simulation to those of Silver and Silicon. The figure below shows the filter
generated for Silicon:

2003 - 2016 Lumerical Solutions, Inc


836 Lumerical Knowledge Base

Running the script will generate the following plots for total absorption, and absorption spectra in the two materials.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 837

This technique can be extended to 3D simulations as well.

5.6.6.5.1.4 Divergence of Poynting vector

Objective
This section describes how to calculate the absorption per unit volume from the divergence of the Poynting vector.
Divergence calculations tend to be very sensitive to numerical problems, which makes this technique inferior to the
other techniques described in this section.

2003 - 2016 Lumerical Solutions, Inc


838 Lumerical Knowledge Base

Associated files
usr_absorption_divergence.fsp
usr_absorption_divergence.lsf

See also
Loss per unit volume 826

The loss per unit volume can be calculated from the Poynting vector by
dL 1 r
dV
(
= - real P
2
)
Consider the example file usr_absorption_divergence.fsp. The simulation consists of a gold nanoparticle in
a background material that has an index of 1.5 + i0.05. A TFSF source is used to excite the simulation and a 3D
power monitor is used to measure the Poynting vector.

We want to measure the power absorbed in the gold nanoparticle. If the background was not absorbing, a box of 2D
power monitors around the particle could be used to measure the total absorbed power. In this case, since the
background is also absorbing, the box technique will not work. Instead, we will measure the Poynting vector as a
function of (x,y,z), and calculate the loss with the above formula. The loss per volume can be integrated over the
volume of the gold sphere, giving the total power absorbed by the gold.

Load the file usr_absorption_divergence.fsp, and run the simulation. When the simulation is complete, run
the script usr_absorption_divergence.lsf. It will calculate the total power absorbed within the box of
monitors using two techniques. First, with a box of 2D monitors measuring the transmission through each surface.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 839

Second, by calculating the loss per unit volume, then integrating over the entire volume of the box. Both techniques
give 48% absorption.

Next, the loss within the gold particle is calculated by integrating the loss over the volume of the sphere. It is quite
small, only 0.1% of the total power. This seems reasonable after looking at a slice of the loss per unit volume in the
XY plane. There is only a small amount of absorption in the particle very close to its surface. The matching slice of
the integration filter is also shown. The power absorbed in any arbitrary volume can be calculated by modifying the
integration filter.

Note:
3D monitors can require large amounts of memory and computation time. Therefore, it is best to keep them as
small as possible. Similarly, keep the number of frequency points small, and only record the field components that
are necessary. In this example, only the Poynting vector was saved, not the E and H field components.

5.6.6.5.2 Direction of pow er flow

Objective
In some cases, it is interesting to understand if power is flowing forwards or backwards in a particular plane of a
simulation. In this example, we show how this information can be obtained for a simulation with periodic or Bloch
boundary conditions when there is a planar region of homogeneous, low-loss dielectric material.

This information cannot easily be determined from considering the Poynting vector alone. If we consider a simple
example of a plane wave incident upon a perfectly reflecting boundary, the Poynting vector and the total transmitted
power through a plane will be zero because the total normalized transmitted power is 1 (incident wave) - 1 (reflected
wave) = 0. This is not easy to distinguish this from the case of zero fields everywhere, which also gives a total
normalized transmitted power of 0.

In this example, we use the power direction analysis object which uses farfield and grating projections to decompose
the measured E and H fields onto a basis state of forward and backward propagating plane waves. The forward power
is then calculated by summing the power in all the forward propagating plane waves, and similarly for the backward
propagating power. This method has some numerical errors that are largest when we have plane waves propagating
at very steep angles to the measurement plane. For this reason, the forward transmission minus the backwards
transmission may be different from the net transmission, measured simply by integrating the Poynting vector, by a
few percent. The power direction object can be inserted from the object library in the optical power section.

2003 - 2016 Lumerical Solutions, Inc


840 Lumerical Knowledge Base

Associated files
usr_power_direction.fsp
usr_power_direction_test.lsf

Example
In this example, we consider light incident at 20 degrees in a medium of dielectric index 1.4. The light propagates
towards a gold ellipsoid on a substrate of index 2. Bloch boundary conditions are used, meaning that we are
considering the light incident on a periodic array of these gold nanoparticles. The period is 1 micron in both x and y.
We place a special analysis group for this calculation between the source and the particle so that it measures both
the incident and reflected field. For the purpose of testing, we also place a reflection monitor behind the source. The
analysis group contains a planar power monitor and also a small index monitor because it is necessary to know the
refractive index where the fields were measured. It is important to note that this calculation is only valid if:

1. The imaginary part of the refractive index is very small or zero. We ignore the imaginary part in this calculation.
2. The material is completely uniform over the plane where the monitor is recording the field.
3. Periodic or Bloch boundary conditions are used. This method could be extended to cases where PML is used as
long as the fields go to zero near the edges of the simulation. Please contact Lumerical support if you would like
to explore this case.

After running the simulation usr_power_direction.fsp, please run the script


usr_power_direction_test.lsf. This analysis can take about a minute because there are a large number of
far field projections involved and we record data at several different wavelengths - a new farfield projection is required
for each wavelength. The script will create two figures. The first figure shows the reflected power measured using the
power direction group, which is placed between the source and the nanoparticle. We see that we have successfully
calculated the amount of backward propagating power ("new method"), which is close the reflected power measured
in the usual way ("standard method"), although there is a small numerical error. The second figure compares the
total transmission through the monitor measured in 3 ways:

1. by using T_total, calculated from the transmission function


2. by calculating R-1 where R is the reflection calculated in the usual way
3. by taking the difference of T_positive and T_negative

We see that all methods agree reasonably well, but there is the largest error in T_positive-T_negative because this
method involves the plane wave decomposition that introduces some more numerical error.
Figure 1 Figure 2

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 841

5.6.6.5.3 Pow er transmission box

Objective
This page provides a simple analysis group that calculates the net power flow out of a rectangular volume within a
simulation. The files in this section were created using FDTD Solutions, but the same analysis group can be found in
the Component library in MODE Solutions.

Lumerical provides many built in analysis groups in our object library. Please press this button to open
the online library of analysis groups and select optical power category to insert transmission boxes.

Associated files
usr_transmission_3Dbox.fsp
usr_transmission_2Dbox.fsp

See also
Loss per unit volume 826

The monitor group in the associated files calculates the net power flow out of the box of monitors. To use this group
to calculate net power flow into the box, just multiply the result by -1.

For example, in the associated files, we have a small silicon particle in a focused beam. The box of monitors can be
used to measure the power absorbed by the particle. After running the simulation, use the following commands to
plot the absorption vs wavelength. Once the visualizer is open, you may want to use the "-Real" option to make the
numbers positive, since power is flowing into the box.

2003 - 2016 Lumerical Solutions, Inc


842 Lumerical Knowledge Base

runanalysis;
net_power = getresult("trans_box","T");
visualize(net_power);

Note: Symmetry
These monitor boxes work properly when symmetry boundary conditions are used. When symmetry boundary
conditions are used, the monitor group assumes there will be equal power flows on both sides of the plane of
symmetry.

Note: Field data not saved


The monitors in these groups are set to record the net power only, to minimize the amount of data saved to file.

Note: Spherical transmission monitors


The following files contain spherical transmission
monitor objects. These are very similar to the
transmission boxes described above, but they use a
series of point monitors to create a spherical surface,
rather than using 6 2D monitors to create a box.
Due to the additional interpolation required by these
monitors, they tend to be less accurate than box
monitors. They are also not designed to work with
symmetry boundary conditions and can't be used to do
far field projections. For these reasons, we recommend
using box monitors rather than spherical monitors.

Associated files
usr_transmission_3Dsphere.fsp
usr_transmission_2Dsphere.fsp

5.6.6.6 Optoelectronics
This page lists all analysis groups available in Optoelectronics.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 843

Calculates the electron- FDTD


hole pair generation rate
under CW illumination.
Exports generation rate
to Lumerical's DEVICE
for further electrical
simulation.

CW generation rate 2623

Calculates the electron- FDTD


hole pair generation rate
under solar illumination.
Exports generation rate
to Lumerical's DEVICE
for further electrical
simulation.

Solar generation rate 2623

5.6.6.7 Resonators and modal analysis


This page lists all analysis groups available in Resonators and model analysis.

2003 - 2016 Lumerical Solutions, Inc


844 Lumerical Knowledge Base

An analysis group that FDTD, varFDTD


measures the Q factor of
a resonator. The fields
decay completely by the
end of the simulation and
the Q factor is
determined from the
FWHM of the resonant
peaks.

Low Q analysis 1807

This script sets up the FDTD


frequency domain power
monitor and index
monitor based on the x,y
span.

Effective mode area 845

An analysis group that FDTD


calculates the modal
volume as defined on the
webpage below.

Modal volume 846

An analysis group that FDTD, varFDTD


measures the Q factor of
a resonator. The fields
decay very slowly and
the quality factor is
determined from the
slope of the decaying
envelope.

Q analysis 1807

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 845

5.6.6.7.1 Effective mode area

Objective
This page provides a simple analysis group that calculates the effective mode area.

Associated files
usr_effective_mode_area.fsp

See also
Modal volume 846

Related Publication:
L.D. Landau, E.M. Lifshitz, L.P. Pitaevskii
(1984). Electrodynamics of Continuous
Media. Vol. 8 (2nd ed.). Butterworth-
Heinemann. ISBN 978-0-750-62634-7.

The effective mode area, A, is the ratio of a mode's total energy density per unit length and its peak energy density
1
A= W (r )dA
max {W (r )}
A

where W(r) is the energy density,

1 d[we (r )] r 2 1 r 2
W (r ) = Re E ( r ) + m0 H ( r )
2 dw 2

Example
The usr_effective_mode_area.fsp simulation contains a simple silicon on insulator (SOI) waveguide shown
in the image above. To get the effective mode area for the injected mode, first run the simulation. Then edit the
effective mode area analysis group and press the RUN ANALYSIS button in the ANALYSIS->SCRIPT tab. As can be
seen in the image below, the analysis script output will contain the calculated effective mode area.

In the screen shot above, you can see that the analysis script contained in the usr_effective_mode_area.fsp
simulation uses two methods to compute the effective mode area. The two methods only differ in how the derivative
in the energy density is computed. Method 1 uses central differences on the derivative on the left hand side of the
equation below. And method 2 uses central differences on the derivative on the right hand side of the equation.

2003 - 2016 Lumerical Solutions, Inc


846 Lumerical Knowledge Base

d[we (r )] d [e ( r ) ]
Re = Re w + e (r )
dw dw

5.6.6.7.2 Modal volume

Objective
This page provides simple example using the modal volume analysis object that can be used to calculate modal
volume of a confined mode. This object is available in the object library in the resonators section. A modal area
analysis object is also available from the object library for 2D simulations.

Associated files
usr_mode_volume.fsp

See also
Effective mode area 845

Modal volume calculation


This analysis object provides three simple ways to calculate the modal volume, defined below.

Calculation Type Equation


1
(
V = E 2 > 1 E 2 dV
2
)
2 2

V=
eE dV
max( eE 2 )
3 (default)

V=
( H 2
dV )2

4
H dV

It is worth noting that more sophisticated definitions of modal volume exist. If these definitions are not sufficient for
your needs, these examples can be used as a starting point for you to create your own custom modal volume
analysis object.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 847

5.6.7 Testing convergence


Numerical simulation results will never give exactly the correct answer; there is always some numerical error. It is
important to understand some of the sources of numerical error and steps that can be taken to reduce the error to an
acceptable level. Reducing the error often involves increased simulation time and memory and so it is important to
consider, for your application, what is an acceptable level of error so that you can run your simulations as quickly as
possible.

This section provides information on convergence testing techniques for the following solvers:

FDTD 847
EME 857

5.6.7.1 FDTD
This page provides a thorough method for convergence testing of results from an FDTD simulation, so you can
determine the possible sources of error in a simulation, and quantify the level of convergence.

This topic uses a 2D Mie scattering example so that a highly accurate analytic result can be calculated using Mie
theory. This will allow us to determine precisely the level of error from our FDTD simulations, but we will consider
how to estimate your level of error when a more accurate solution is not available.

The analytic result from Mie theory is contained in the nanowire_au_jc_theory_from_mcm_fit.txt file. The
testing_convergence.fsp and testing_convergence_analysis.lsf simulation and script files can be
used to generate the plots shown on this page.

Associated files
testing_convergence.fsp
testing_convergence_analys
is.lsf
nanowire_au_jc_theory_from
_mcm_fit.txt

Source of error in an FDTD simulation


It is often assumed in finite difference schemes such as FDTD that the error in a simulation result always
diminishes with decreasing grid size. In reality, there are more sources of error that need to be considered:
1. The proximity of PML. If we are studying a mode that has evanescent fields, the PML will introduce
errors if a non-negligible amount of the evanescent field comes in contact with the PML. This will, for
example, reduce the quality factor of a resonance or shift the frequency of a resonance.
2. The reflection from the PML. The PML always has some reflection which can be theoretically
calculated and changes with incident angle. Any reflection from the PML can re-interfere with the source,
leading to incorrect power normalization, or simply re-interfere with the true scattered fields of the structure
as they would exist in an ideal, unbounded space. Increasing the number of PML layers can reduce the
reflection.
3. The FDTD grid dispersion. When dx, dy, dz and dt are finite, the dispersion relation on the FDTD

2003 - 2016 Lumerical Solutions, Inc


848 Lumerical Knowledge Base

mesh is not identical to free space. The dispersion relation of FDTD can be calculated precisely for a given
mesh size (see getnumericalpermittivity 1674 ). In principle this source of error can be reduced indefinitely by
reducing the spatial and temporal mesh to 0. However, computers always use finite precision numbers
(whether floating, double or other) and there is always a limit to how far the mesh size can be reduced
without introducing new sources of numerical error. Finally, many first time users incorrectly assume that
this is the major source of error in their simulations. Given the computational costs of using a small mesh,
it is important to understand the actual contribution that this makes.
4. The staircasing effect. When dx, dy, dz and dt are finite, it is not possible to resolve geometric
features to arbitrary resolution. Lumerical's conformal mesh can make convergence much faster for many
geometries and materials, however, there will always be a geometric error for a finite sized mesh. As
discussed above, this error can be reduced by making the mesh size smaller, but eventually other
numerical considerations due to the finite precision of the numbers used will limit how small dx, dy and dz
can go.
5. The multi-coefficient model fit. In the FDTD method, it is not possible to use the dispersive
refractive index as a function of wavelength (or frequency) directly. Instead, we must fit our dispersive
material properties to models that can be solved efficiently in the time domain. Lumerical's multi-coefficient
model makes it possible to obtain good fits even for highly dispersive materials, however, there is always
error in the fit.
6. The finite sized temporal mesh. When dt is finite, the permittivity (ratio of D/E) is not exactly
equal to the theoretical model used to fit the dispersive materials. This leads to an additional discrepancy
between the dispersive material properties. Again, this discrepancy can be calculated precisely. Please
see getnumericalpermittivity 1674 for more details.
7. Non-uniform meshing. Graded meshing introduces new sources of error. The graded regions can
lead to small amounts of gain or loss, and the change in mesh size leads to a change in grid dispersion
which results in small amounts of scattering. In addition, regions with different mesh sizes can support
propagation of different frequencies of light which means that high frequency light can stay trapped in a
region with a small mesh size and eventually lead to aliasing problems for downsampled Fourier
transforms. Also, grading of the mesh can affect the PML performance and lead to more reflections.
Despite all these small sources of error, the non-uniform mesh allows us to reduce other sources of error,
namely the grid dispersion and the staircasing effects, in a highly computationally efficient way and the
benefits well outweigh the costs of using it.
8. Sources. There are a variety of small errors with sources. For example, all sources will have a small
reflection which gets worse further from the center frequency of the source. This problem is reduced as the
mesh size decreases. In addition, some sources use a mode profile or a beam profile which is calculated
only at the center frequency of the source. At other frequencies, the profile will not be exactly correct and
this will lead to increased reflection for broadband simulations. These reflections are of course small and,
when they cannot be ignored, can often be worked around to still perform broadband simulations. Please
see Mode source - Broadband 576 for an example of how to work around these issues.
9. Monitors. Monitors by default will interpolate the fields to certain desired locations, leading to additional
interpolation error. For advanced calculations, this feature can be disabled. Please see this link 831 for an
example.
Note: Spatial interpolation - NONE setting
Disabling the spatial interpolation is a very advanced feature. Only expert users that are very familiar with
the FDTD method should consider using this feature. Most standard analysis functions (such as the
transmission script function, the data visualizer, etc) assume that the spatial interpolation is
enabled. They may not give the most accurate result when used to analyze such monitor data. All
analysis must be done manually. See the advanced tab 645 of frequency monitor.
10. Limits on the size of the mesh. Single precision numbers have approximately 7 decimals of
precision. Finite-difference methods rely on taking spatial and temporal derivatives and performing integrals.
Clearly, if we oversample a wave, we may lose the ability to calculate accurate derivatives or integrals. This
will occur when dx ~ lambda/1e7 for floating precision and about lambda/1e16 for double precision
calculations. In practical terms, this will almost never occur - for example, for 1000nm light, you could
encounter difficulties when dx ~ 1e-4nm - much smaller than most realistic FDTD simulations. FDTD
Solutions uses an efficient combination of floating and double precision numbers for different parts of the
calculation, so the single precision limit should be considered.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 849

Example simulation
We will consider the extinction
cross section, which is the sum of
the scattering and absorption cross
sections, of a gold nanowire in the
wavelength range of 300nm to
1000nm. The nanowire diameter is
140nm.

This is a convenient test case


because we have an analytic
solution. Also, the 2D nature of the
problem makes convergence
testing much faster.

Quantifying the level of convergence


One challenge with convergence testing is that you generally don't know know the 'correct' answer. To
understand the convergence, we want to vary certain parameters, for example, the mesh size dx, in N steps.
Ideally we want to reduce dx until the results stop changing. To quantify this idea, at each step of a parameter
we define the difference with the results of the previous step:

(s - s ) d l
2
i i -1
D s (i ) =
(s ) d l
2
i

where i = 1,...,N is the step for each parameter. Ideally, we want to determine the point where this quantity
becomes close to 0. In reality, we may see that s(i) becomes flat at some point which means that the error
is being dominated by another parameter but the current parameter still has an effect. For example, if our
principle error is due to reflections from the PML, then we may see that s becomes flat as we vary the
distance to the PML. This is because the reflections from the PML are the principle cause of the error (which
will introduce ripple into the spectrum) but the position of those ripples will constantly change as the distance
to the PML varies.

To estimate the absolute error, it is useful to consider the quantity

(s - s ) d l
2
i N
D s N (i ) =
(s ) d l
2
i

which can also give us an estimate of the error at parameter value i if we assume that the result with
parameter N is much closer to the exact solution than with parameter i. While this gives a good estimate of
the absolute error when i << N, it obviously does not give a good estimate when i ~ N where the error will be
significantly underestimated. Still, this is the quantity that will give us the best estimate of error in the absence
of the exact solution.

To quantify the error (or difference) between different tests, we can use the following definition

(s - s2 ) dl
2
1
D s 1- 2 (i ) =
0.5(s )
2
1 + s 22 d l

2003 - 2016 Lumerical Solutions, Inc


850 Lumerical Knowledge Base

For our Mie scattering test case with a known solution, we will define the the exact error as

(s (i) - s ) d l
2
theory
D s theory (i ) =
(s ) d l
2
theory

which allows us to look at the convergence in absolute terms. This will also allow us to test our estimate of
the absolute error without knowing the exact result as defined above. If so, we can apply these methods to
problems where the exact solution is not known.

Determining your acceptable level of error


The sources of error listed above lead to typically small effects that can be ignored completely when the
default settings are used. When you want to investigate the sources of error in detail, please consider what
level of error you need and what is acceptable because it will never be possible to completely eliminate any
numerical error. For example, it may be unnecessary to define your geometric features to a precision of 1nm
(ie setting dx to 1nm) if you know that your manufacturing process can only achieve a 10nm accuracy.
Similarly, if you know that your experimental error is on the order of 5%, it may not be necessary to achieve
simulation results with an error of less than 1%.

As another example, consider the quality of Lumerical's multi-coefficient model (MCM) for Gold. The figure
below shows the MCM fit to the refractive index of gold provided by Johnson and Christy. On the same figure,
are the refractive indices of gold provided by the CRC handbook, and by Palik's handbook. It is clear that the
MCM model is not a perfect fit for gold which is highly dispersive over this wavelength range. However, the
difference between the MCM fit and Johnson and Christy is smaller than the difference between different
experimental results for gold by different authors! The optical properties of gold have been well studied, and it
is a relatively easy metal to measure (compared to metals that oxidize much more quickly), so we can expect
the differences in experimental results for other metals to be even larger. Before spending a great deal of time
getting a better fit, it is worth considering if your fit is within the experimental error you have on your material
data.

Real part of the refractive index Imaginary part of the refractive index

Convergence testing steps


We want to investigate our sources of error in the most efficient way possible. This means that we will leave
the tests that take the longest - for example reducing the mesh size - to the end. We will begin with
investigations of quantities like the PML distance, which can be done on a coarse mesh quickly. In a 2D
simulation like this one, all these steps can be completed quickly. When applied to 3D simulations, we may
be more limited due to computational resource constraints in how much we can vary certain parameters.
PML distance

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 851

We want to reduce the PML reflectivity and focus on the error that comes from having the evanescent mode
fields overlap with the PML. To do this, we set the minimum PML layers to 12 in the Advanced Options of
the FDTD simulation region. In addition, we set the mesh accuracy slider to 2 and we set the inner mesh
size over the particle to 5nm by setting the dx_max and dx_min in the mesh group object to 5nm. We use
the default conformal mesh setting, which means that conformal meshing will not be applied in this case
because we have a metal/dielectric interface. We use the parameter sweep object sweep_PML_distance to
first perform 10 steps which will vary the simulation span from 0.5 to 5 microns. In this case, the sphere
radius is only 35nm, so the distance from the structure to the PML is approximately half the simulation
span.

Spectrum for various PML distances from 0.25 to 5 Zoomed in view where we can see differences in the
microns. Note that you cannot see any difference results
between results on this scale.

The simulation span is varied from 0.5 to 5 microns in 20 steps. This corresponds to a PML distance change
of approximately 0.25 microns to 2.5 microns.

Looking at the above figures, we can estimate that our PML distance will contribute less than approximately 1e-
3 (0.1%) by about 2 microns in simulation span (a PML distance of about 1 micron). If we get to the point of
needing to reduce our error further than that, we will have to come back to this setting and increase the
simulation span further.
PML layers
We now set the simulation span at 2 microns, and leave the mesh accuracy settings the same as before.
Now we want to sweep the PML layers setting. We will sweep 5 points between 2-32 layers. The parameter
sweep object sweep_PML_layers will perform this calculation. The results are shown below.

2003 - 2016 Lumerical Solutions, Inc


852 Lumerical Knowledge Base

With the current settings, increasing the number of PML layers is not important as the contribution to the error
is on the order of 3e-5 (0.03%) for all points in the sweep. However, we may need to return to this error,
especially later when we introduce significant mesh grading that can reduce the PML performance.
Mesh accuracy
After setting the PML layers to the default value of 8, we sweep the mesh accuracy slider for a 5nm mesh over
the particle.

Based on the above results, we can operate at a mesh accuracy of 4 and we estimate a contribution to the
overall error of about 1e-3 (0.1%).
Sweep the inner mesh
We set the mesh accuracy slider at 4 (this corresponds to a target mesh size of 18 points per wavelength)
and now we will sweep the inner mesh region. We will sweep this mesh from dx=5nm to dx=0.5nm in 20
steps. We use a geometric sequence for these 20 steps with
i -1

dx N -1
dx(i ) = dxmax min
dxmax
so that we include more points at smaller values of dx than a linear spacing would give us. The results are
shown in the figures below. We see that as the mesh size decreases, s becomes smaller and smaller until
about 3nm, At that point, the results continue to change on about the same scale from point to point, and the

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 853

error is likely on the order of 1%. This is an indication that another parameter is affecting our results. To test if
this is the PML, we can increase the minimum number of layers of PML as done in the following section to try
and reduce the PML reflectivity. The PML pefromance be degraded as the inner mesh size is reduced and this
error can be seen in the spectrum in the form of small interference ripples which are preventing us from
converging on an unchanging result even though the mesh size is getting smaller. We can conclude that we
should increase the minimum number of PML layers as the mesh size decreases to compensate for the effect
on PML.

Without using enough PML layers, our error is on the order of 1% at a 3 nm mesh.
Inner mesh and increase PML layers
Based on the previous steps, we can see that the PML reflectivity and the inner mesh size are currently the
largest sources of error. We will sweep the inner mesh using the same geometric series as above but in this
case we will sweep from dx=5nm to dx=0.1nm. In addition, we set the number of PML layers to 64 which
should be large enough to reduce the influence of the PML significantly. Please note that in a 3D simulation, it
would make sense to sweep the PML layers at this point to determine how many are actually required and
alternate between increasing PML layers and reducing the mesh size.

Sweep of the inner mesh size from 5nm to 0.1nm. The Zoomed in view of the figure on the left.
PML has 64 layers and the mesh accuracy slider is
set to 4.

We see that at dx=1nm, our absolute error is about 1%. For mesh sizes above 1nm, the sN number tracks
the actual error very well, as expected. Note that the absolute error by the 0.1nm mesh is reduced to about
2.5e-3 (0.25%). Finally, since s is becoming essentially flat by 0.1 nm, and is on the order of 1e-4, we see
that other sources of error with similar sizes of s such as the distance of the PML, PML reflectivity and the

2003 - 2016 Lumerical Solutions, Inc


854 Lumerical Knowledge Base

mesh size outside the inner region are beginning to play an important role.
Multi-coefficient model fits
Until now, we have been comparing the FDTD results to the theoretical results calculated using the MCM fit to
the gold data. If we compare to cross section calculated from the original Johnson and Christy gold data, we
see that this is by far the most significant contribution to the error. In fact, the calculate absolute error is
approximately 4.2%. However, this is smaller than the error between the results calculated with the material
data from 3 different sources! In the figures below, the FDTD results were calculated with a mesh accuracy of
2, a 1nm mesh and all other default settings, which can be run in a few seconds. For comparison, the error
between the FDTD result and the result calculated using the MCM fit is 1.3%. If we are concerned about
accuracy compared to experimental results for this type of simulation, the error in the material data is likely to
be by far the dominant source of error. Nonetheless, it is useful to understand the convergence of FDTD
towards the exact solution of Maxwell's macroscopic equations and for this it is best to compare the FDTD
results to the results calculated using the MCM.

Comparison of FDTD results to the Comparison of cross sections Comparison of cross sections
results calculated from the raw calculated from the raw material calculated from the data of 3
material data. The FDTD results data and from the mcm fit. The sources: Johnson and Christy,
were calculated with a mesh error between these results is 3.6% CRC and Palik. The error between
accuracy of 2, a 1nm mesh, and all the Johnson and Christy result and
default settings. This can be run in the CRC and Palik results are
a few seconds. The error between 4.7% and 4.2% respectively.
these results is 4.2%.

Finite sized dt
A further complication of the MCM is that the actual numerical permittivity at a finite value of dt is not the same
as the MCM model in the limit dt->0. The numerical permittivity for a finite dt can be calculated using the script
function getnumericalpermittivity 1674 . In most cases, the difference is negligible and this is the case here. In
the figure below, we see a comparison of the scattering cross section using the MCM fit and the actual
numerical result with dt=1.17e-17s - the size of dt used when the inner mesh region is 5nm. The difference
between these curves is 0.01% which is negligible compared to other sources of error, and this difference will
become much smaller at smaller mesh sizes because dt is reduced as the spatial mesh gets smaller.

Conformal mesh
The conformal mesh is not a benefit for the wavelength range of this simulation. It introduces spurious

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 855

resonances into the spectrum at longer wavelengths for larger mesh sizes. Ultimately, it gives faster
convergence over the entire wavelength range, but in this case only at the smallest mesh sizes. These
spurious resonances can occur with the conformal mesh when considering metal/dielectric interfaces and are
the reason that the default "conformal" mesh setting does not apply the algorithm to metal/dielectric
interfaces. However, for many wavelength ranges involving metals the conformal mesh provides much faster
convergence and should be used. To turn on the conformal mesh for all interfaces, we use the "conformal
variant 1" setting. Here we see that if we consider the error over the entire spectrum, the conformal mesh only
gives a better answer at mesh sizes below 0.1nm. However, if we consider the error only over the range from
500nm to 560nm, which includes the resonant peak, then the conformal mesh gives a significantly lower error
at all mesh sizes considered. This means that if the resonant wavelength or linewidth were the main simulation
result, then conformal meshing should be used.

In this figure, we see the spurious resonances that


can appear at longer wavelengths. The resonances
are likely to occur at a metal dielectric interface when
the real part of the metal permittivity is negative and,
in absolute value, is much larger than the dielectric
permittivity. They disappear as the mesh size
decreases, but can cause the convergence with
conformal meshing to be slower than staircasing at
metal/dielectric interfaces. For this reason, the
conformal mesh is not applied to metal interfaces by
default.

The figure below shows the error compare to theory In this zoomed in view of the same result, we see that
for the staircase and conformal meshes as a function the conformal mesh is likely to outperform the
of mesh size. We can see that at mesh sizes of staircase mesh only at mesh sizes below about
0.1nm to 5nm, the staircase mesh actually has lower 0.1nm, which means we should not use it for this
error, however the conformal mesh is converging particular measurement over the entire wavelength
more quickly to the correct answer. range of 300nm to 1000nm.

The figure below shows the error compare to theory In this zoomed in view of the same result, we see that
for the staircase and conformal meshes, where the the conformal mesh provides an error at a 1nm mesh
error is calculated only from 500nm to 560nm, which that is comparable to the error with the staircase

2003 - 2016 Lumerical Solutions, Inc


856 Lumerical Knowledge Base

includes the main resonant peak. In this range, where mesh at 0.1nm. Clearly, if we are considering the
the spurious resonances do not appear, the extinction cross section from 500nm to 560nm, for
conformal mesh gives a consistently better answer at example to determine the resonant wavelength and
all mesh sizes from 0.1nm to 5nm. linewidth, then the conformal mesh should be used.

Non-uniform meshing
The non-uniform meshing is not currently limiting the error for this type of simulation. Experimenting with
different grading factors, uniform meshes and eliminating the downsampling of frequency domain monitors
performing fourier transforms does not substantially improve the error. Of course, as other sources of errors are
eliminated this will eventually become important.
Sources and monitors
The analysis performed here and the TFSF source used mean that source injection error and monitor
interpolation errors are not a major contributor to the error. In addition, these errors will be reduced in this
examples as the inner mesh size is decreased.

Conclusions
With care and enough computational resources, and within the limits of finite precision numbers, FDTD can
give almost arbitrarily accurate answers to the macroscopic Maxwell's equations for any geometry, assuming
the material permittivities are given by the multi-coefficient model. The figure below shows the extinction cross
section calculated from Mie theory and FDTD, and the difference between the curves is 0.15%. This could be
further improved by repeating many of the steps above.

The figure on the right shows the


FDTD spectrum and the theory using
64 layers of PML, dx=dy=0.1 nm over
the particle, a mesh accuracy of 4
(minimum of 18 points per
wavelength), and a simulation span of
2 microns. The difference between the
curves is approximately 1.5e-3
(0.15%).

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 857

5.6.7.2 EME

Associated files
pol_converter.lms
testing_convergence_EME.lsf

See also
EME error diagnostics 783
FDTD convergence testing 847

Sources of error in an EME simulation


The following are some possible sources of error in an EME simulation, and EME error diagnostics 783 can be
used to help quantify the error from these sources:
1. The staircasing effect in the longitudinal (propagation) direction. The longitudinal mesh
is defined by the cells in the EME simulation region. If the cross section of the structure or the material
properties are continuously varying along the propagation direction, more cells will allow for a more
accurate representation of the geometry in the longitudinal direction. Energy conservation can be applied
and the CVCS subcell method 114 can also be used in continuously varying regions to reduce staircasing
error.
2. Number of eigenmodes used. The EME method relies on modal decomposition of fields into a
basis set of eigenmodes, and we can specify the maximum number of these basis modes to calculate. In
the limit where the number of eigenmodes is infinite, the amount of error associated with the EME
calculation goes to zero. In reality, only a limited number of modes can be used in an EME calculation,
since more modes means longer simulation time and more memory. It is always a good idea to start with a
small number of modes for the initial calculations, and increase as necessary until the result converges.
With a large enough number of eigenmodes, free space propagation can even be simulated.

The following are some sources of error in an EME simulation which are also present in an FDTD simulation,
and convergence testing for these properties is discussed in more detail in the FDTD convergence testing 847
page:
3. The staircasing effect in the transverse direction. When dx, dy, dz are finite, it is not
possible to resolve geometric features to arbitrary resolution. Lumerical's conformal mesh can make
convergence much faster for many geometries and materials, however, there will always be a geometric error
for a finite sized mesh. As discussed above, this error can be reduced by making the mesh size smaller, but
eventually other numerical considerations due to the finite precision of the numbers used will limit how small
dx, dy and dz can go.

If PML boundaries are used:

4. The proximity of PML. If we are studying a mode that has evanescent fields, the PML will introduce
errors if a non-negligible amount of the evanescent field comes in contact with the PML. This will, for example,
reduce the quality factor of a resonance or shift the frequency of a resonance.
5. The reflection from the PML. The PML always has some reflection which can be theoretically
calculated and changes with incident angle. Any reflection from the PML can re-interfere with the source,
leading to incorrect power normalization, or simply re-interfere with the true scattered fields of the structure as
they would exist in an ideal, unbounded space.

2003 - 2016 Lumerical Solutions, Inc


858 Lumerical Knowledge Base

Convergence testing method


We can follow steps as described on the FDTD convergence testing 847 page with additional tests for the
number of modes to use in each cell, and the number of cells to use in a cell group region where the cross
section of the structure is continuously varying. We want to vary each parameter and quantify the level of
convergence by measuring the difference with results from the previous step.

Example simulation
We will consider the pol_converter.lms simulation file which simulates the structure from the Polarization
converter 2130 application example which simulates straight silicon ridge waveguides connected by a tapered
region. The result we will consider will be the conversion efficiency from the TE1 input mode to the TM0 output
mode (ie. |S52|^2 of the user s-matrix result). Please see FDTD convergence testing 847 for the types of metric
one can use to quantify the level of convergence.

The testing_convergence_EME.lsf script file performs convergence testing of the number of cells in the
tapered region, the number of eigenmodes solved for in each cell, and the transverse mesh.

The number of cells to use in the tapered region is varied from 2 cells to 20 cells and the results are plotted
below.

The number of modes solved for in each cell is varied from 4 to 14 and the results are plotted below.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 859

The mesh step size of the transverse mesh set by the mesh override region was varied from 10 nm to 50 nm.
Results are plotted below.

It turns out that for this particular example, the amount of error is relatively small even with the lowest settings
for the number of cells and the number of modes in each cell, with the number of cells in the tapered region
contributing about 0.5% error and the number of modes to use contributing less than 0.015% error. For the
transverse mesh, the amount of error goes up to about 4.5% for the coarser mesh step size, but the error goes
down to less than 0.1% with a mesh step size of 10 nm.

5.6.8 Other analysis tools and testing methods


This section describes other analysis tools and testing methods.

Measuring reflection 860 This page describes three different methods for
measuring reflectance from a structure.
Working with the Poynting vector 863 This page provides some basic information about the
Poynting vector.
Image stitching 867 This page shows how to stitch monitor data obtained
from a single period simulation together to form a super-
cell image.
Making a CW movie 870 This page describes how to create single frequency
(CW, steady state) movies of a simulation, as opposed
to the broadband time domain movies from created by
Movie monitors.
Why is monitor data complex 873 This page explains why monitor data is complex valued,
and the meaning of those complex values.
Far field projections 874 See the solver 126 section.

2003 - 2016 Lumerical Solutions, Inc


860 Lumerical Knowledge Base

Using impulse response - response to arbitrary input 874 This page explains how to calculate the time domain
response of a system to an arbitrary source time signal.
Diverging simulations 877 This page describes how to fix diverging simulations.
Testing convergence 847 This page provides some tests and ideas to deal with
convergence.

5.6.8.1 Measuring reflection


Objective
This page describes three different methods for measuring reflectance from a structure. Using a monitor placed
behind the source is the common and simplest method. Placing the monitor in front of the source can improve the
accuracy in situations where there are source injection errors. We also discuss an alternative technique using a
monitor placed along the source injection axis.

Associated files
usr_reflection_angled.fsp
usr_reflection_angled.lsf
usr_reflection_interference.fsp

See also
Sources 510

Monitor behind the source


The most straightforward setup technique used for measuring reflections from a structure is to place a
frequency domain monitor behind the source injection plane. The incident and reflected fields exist in front of
the source, but only the reflected fields will be measured if the monitor is placed behind the source.

Note: Direction of power flow


If the net power flows in the negative direction, the transmission function will return a negative number. You
may need to multiply by -1 if you want the these quantities to have positive values.

Source injection errors


An ideal source would create a beam that moves in the propagation direction, without any scattering to other

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 861

directions. Of course, FDTD is a numerical technique and some level of numerical error must be expected. In
most simulations, these numerical source injection errors are negligible, meaning the method of placing a
monitor behind the source to measure reflections generally works well. However, in some simulations, the
source injection errors can be significant. These issues are more likely to occur when using a source that
injects at an angle, a mode source, or a broadband source.

To understand the effect this back scatter can have on the accuracy of reflection measurements, imagine that
1% of the injected field is backscattered at the injection plane and 10% is actually reflected from the structure.

In this case, the power measured by a monitor behind the source will be
P = E 2 = (0.01 + 0.1) 2 = 0.121 for
a source amplitude of 1. In other words, for this case, the error in the measured reflectivity is 2.1% even
though the backscattered field is only 1%. Interference effects have been the two fields tends to amplify the
effect of any source injection errors.

Monitor in front of the source


If source injection errors are a problem in your simulation, you can measure reflected power using a monitor in
front of the source.

In the usr_relection_angled.fsp example file, a broadband plane wave source is injected with a center
angle of 30 degrees. One power monitor is placed in front of the source and one is placed behind the source.
By taking the reflection to be 1 minus the transmission from the monitor in front of the source, the reflection
obtained from the monitor in front of the source is closer to the theoretical value than the reflection obtained
using the transmission from the monitor behind the source. The usr_reflection_angled.lsf script plots
the reflection using the two methods and the theoretical reflection.

Note: Monitor positions


In a lossless simulation, the net power transmission through a monitor in front of the source is independent
of its placement. The transmission will be the same whether it is placed between the source and the
reflecting surface or past the reflecting surface.

This technique for measuring reflection assumes that the injected power is normalized to 1. Source injection
errors can also lead to errors in the power normalization. In such cases, it may be necessary to measure the
actual power injected by running a reference simulation and then using this to re-normalize the results of your
main simulation. To do this, use the monitor in front of the source to measure the forward propagating power
in reference simulation that is setup exactly the same as the main simulation, but without the structure (which
could lead to back reflections).

Line monitor interference technique


An alternative technique for measuring reflectivity is to use a line monitor placed along the source injection

2003 - 2016 Lumerical Solutions, Inc


862 Lumerical Knowledge Base

axis. This technique is not generally recommended because the analysis is more complex than the other
methods, it will only work for cases where only a single mode exists, and the accuracy of the result is
dependent on the spatial sampling rate.

In reflection_interference.fsp, a plane wave in a vacuum is normally incident on a dielectric structure with index
n=3. Between the source and the material interface, the amplitude of E^2 oscillates due to interference
between the incident and reflected fields.

We can use the amplitude of E^2 in the region between the source and the interface to determine the power
reflected:
I(x) = I1(x) + I 2(x) + 2 I1(x)I 2(x) cos ( j1(x)- j 2(x))
I(x) will oscillate with amplitude:
A = 2 I1 peak I 2 peak = 2r
for incident intensity 1 and reflectivity R=r^2
2
A
R=
Then, 2

The following plots shows the calculated R using this technique from
usr_reflection_interference.fsp and the measured transmission through a monitor behind the
source. Low spatial sampling rate is a problem here because we cannot accurately measure the amplitude of
the oscillation. Using a higher mesh accuracy setting, or adding a mesh override region would improve the
accuracy of the result.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 863

5.6.8.2 Working with the Poynting vector


Objective
This page provides some basic information about the Poynting vector.

See also
Poynting vector units 116
transmission script function 1596
Integrating the Poynting vector 865

Definition
The Poynting vector is defined as follows. Poynting vector data is generally obtained from frequency domain
monitors, with the CW normalization option enabled. In such cases, the steady-state Poynting vector data will
have units of Watts/m^2.
r r r
P = E(w) H * (w)

The following code shows how you can manually calculate the z-component of the Poynting vector from the E
and H fields. It also compares to the Poynting vector data automatically recorded by the monitor.
# Get data from monitor
m = "monitor1";
x = getdata(m,"x");
y = getdata(m,"y");
Ex = getdata(m,"Ex");
Ey = getdata(m,"Ey");
Hx = getdata(m,"Hx");
Hy = getdata(m,"Hy");
Pz = getdata(m,"Pz");

# Manually calculate the z component of the Poynting vector


Pz_manual = Ex*conj(Hy)-Ey*conj(Hx);

# Plot and compare Pz calculated manually and by the monitor


image(x,y,real(Pz),"x","y","Re(Pz)");
image(x,y,real(Pz_manual),"x","y","Re(Pz_manual)");
image(x,y,imag(Pz),"x","y","Im(Pz)");
image(x,y,imag(Pz_manual),"x","y","Im(Pz_manual)");

Power transmission
The time-averaged power flowing across a surface is given by

2003 - 2016 Lumerical Solutions, Inc


864 Lumerical Knowledge Base

1 r r
power ( w ) = real ( P) dS
2S

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).

As an example, if one simulates a y-propagating source such as a Gaussian bream striking a circular rod in a
2D TM time-domain simulation, then by placing a frequency power or profile monitor on the opposite side of
the rod, the normalized transmission, T, as a function of frequency can be calculated with:
1
( )
real PyMonitor ( w ) dx
T (w) = 2
1
2 ( )
real PySource ( w ) dx

FDTD Solutions/Propagator 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. See below for more information on integrating the Poynting vector to get net power
measurements.

Interpretation
There can be some confusion about how to interpret complex valued Poynting vector data.

Real part of the Poynting vector


Most people are familiar with the idea that the real part of the Poynting vector gives information about the
direction of power flow. For example, integrating the real part of the Poynting vector can give you the power
flowing through that surface (that's what the built in 'transmission 1596 ' script function does to calculates the
amount of power through a monitor).

Imaginary part of the Poynting vector


The imaginary part of the Poynting vector gives you information about evanescent (i.e. non-propagating) fields.
If you calculate the Poynting vector for a plane wave, you will find the imaginary part is zero. However, when
the Poynting vector is calculated from the fields near complex structures, you will often find a non-zero
imaginary part of the Poynting vector. This indicates there are resonant, non-propagating fields at that location.
This can be useful information in some situations. For example, it's best to keep the PML absorbing boundary
conditions far enough away from the structures so the evanescent fields are zero near the PML boundaries.

Monitor settings
Frequency monitors
By default, frequency monitors automatically calculate and save Poynting vector data. You can disable this
option (for example, to reduce the file size) in the monitor properties - Data to record tab.

Time monitors
By default, time monitor do not record the Poynting vector. You can enable the Poynting vector in the Data to
record tab.

Note: Reducing the size of your data files


To reduce the size of simulation files, it can be convenient to setup the frequency monitors to collect fewer
field components in the Data to record tab. For example, if you only need to know the net power flow
through the monitor, but not the spatial field profiles, it is possible to disable all of the E, H and P field
components. In such cases, be sure to enable to 'output power' option, which saves the net power through

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 865

the monitor. When 'output power' is the only enabled option, the simulation engine still collects the raw field
and Poynting vector data as the simulation runs. At the end of the simulation, it calculates the power flow
by integrating the Poynting vector. It then saves the power data, but does not save the raw field and
Poynting vector data. This can greatly reduce the size of your data files.

5.6.8.2.1 Integrating the Poynting vector

Objective
This example shows how to calculate power flow through a monitor by integrating the Poynting vector. It is also
useful as an example of how to do other integrals involving monitor data. In particular, the script file shows a simple
technique for integrating over an arbitrary area, such as a circle. The files in this section were created using FDTD
Solutions, but a similar approach can be applied for MODE Solution's propagator.

Associated files
usr_integrate_poynting.fsp
usr_integrate_poynting1.lsf
usr_integrate_poynting2.lsf
usr_integrate_poynting3.lsf

See also
Transmission 1596

Profile and Power monitors record the Poynting vector by default. Therefore, calculating power is simply a matter of
integrating the Poynting vector over a surface. Normalizing the transmitted power to the source emitted power is
generally more useful than having the result in SI units of Watts.
r r r
P = E conj ( H )
1 r
Power = real
2 surface
P ()
ds

Power
Power _ norm =
SourcePower

The script function transmission can be used to calculate the total power transmitted through a power or profile
monitor. However, to calculate the power transmitted through a portion of a monitor, you must integrate the Poynting
vector over that region.

The following screenshot shows the layout of usr_integrate_poynting.fsp. A plane wave source emits light
in the positive z direction. There is a thin gold layer with a hole in it that reflects much of the light. Monitors are
placed above and below the gold layer to measure transmission and reflection.

Run the simulation, then run the script usr_integrate_poynting1.lsf. The script will first calculate the total
transmission in two ways: using the built in transmission function, and manually integrating the Poynting vector.
The two results should be exactly the same.

2003 - 2016 Lumerical Solutions, Inc


866 Lumerical Knowledge Base

Next, the script usr_integrate_poynting2.lsf can be used to integration the Poynting vector over a circular
portion of the monitor. The script will create these two figures, showing the integration filter and the fraction of power
passing through that region.

This example script includes two other possible shapes: a rectangular region and an arbitrary polygon region, shown
below.

Finally, the script usr_integrate_poynting3.lsf can be used to separate the contribution from the field
polarized in the Ex direction from the contribution from the Ey polarized fields. This can be roughly interpreted as
measuring the fraction of power in each polarization. It is important to note that simply integrating one component of
the Poynting vector can not always be interpreted in a simple way. This analysis should not be applied to your
simulation without some careful thought.

In the simulation, notice that the source polarization angle is 30 degrees, which means most of the beam is
polarized in the X direction, with a smaller fraction polarized in the Y direction. This is consistent with the results
shown below, where approximately 2/3 of the power is X polarized and 1/3 is polarized in Y.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 867

5.6.8.3 Image stitching


Objective
When simulating periodic structures, it is sometimes helpful to see several periods of data in one image. These
examples show how to stitch monitor data obtained from a single period simulation together to form a super-cell
image.

Associated files
usr_stitch_image1.fsp
usr_stitch_image2.fsp
usr_stitch_image.lsf

Example 1
The first example shows a dielectric sphere illuminated from below by a plane wave source. Periodic boundary
conditions were used in the X and Y directions. The simulation span was 2um in both X and Y directions. The
monitor measures the E field intensity in the X-Y plane.

2003 - 2016 Lumerical Solutions, Inc


868 Lumerical Knowledge Base

Run the simulation usr_stitch_image1.fsp, copy the following script into the script prompt and press
enter. This code is used to setup the variables needed for usr_stitch_image.lsf and to create the final
image.

u=getdata("Monitor1","x");
v=getdata("Monitor1","y");
data=getelectric("Monitor1");

# periodic BC, so don't need k vector


ku=0;
kv=0;

# Set number of periods to stitch


periodsU = 3;
periodsV = 3;

# call script
usr_stitch_image;

# Image Data
image(U*1e6,V*1e6,Data,"X (microns)","Y (microns)","Electric Field Intensity");

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 869

Example 2
The second example shows a simple 2 layer dielectric stack (n=1 to n=1.5). This is essentially a 1D
simulation, so the simulation span was set to 0.05um by 0.05um by 4.00um. The stack was illuminated from
below by a plane wave at 30 degrees. Bloch boundary conditions were used in the X and Y directions. A
monitor recorded the field profile in the X-Z plane.

The following script was used to setup the variables need for usr_stitch_image.lsf and to create the
final image. Copy and paste the code into the script prompt to run. In this example, the X data was assigned
to the script variable u, while Z was assigned to v. In the plane of the monitor, the structure is only periodic in
the X direction. Therefore we will create a final image that has 80 periods stitched together in the X direction,
but only 1 period in the Z direction. This will create an image that is 4um by 4um. This script also images a
single period of the field for comparison.

u=getdata("Monitor1","x");
v=getdata("Monitor1","z");
data=getelectric("Monitor1");
data=pinch(getdata("Monitor1","Ex"));

2003 - 2016 Lumerical Solutions, Inc


870 Lumerical Knowledge Base

simulation;
select("FDTD");
ku=get("kx");
kv=get("kz");

# Image single period


image(u*1e6,v*1e6,real(data),"X (microns)","Y (microns)","Ex Field");

# Set number of periods to stitch


periodsU = 80;
periodsV = 1;

# call script
usr_stitch_image;

# Image Data
Data=real(Data);
image(U*1e6,V*1e6,Data,"X (microns)","Y (microns)","Ex Field");

5.6.8.4 Making a CW movie


Objective
This page describes how to create single frequency (CW, steady state) movies of a simulation, as opposed to the
broadband time domain movies from created by Movie monitors. The field data for a CW movie can be obtained from
a frequency monitor.

This example uses MATLAB (the movie2avi function) to create the CW movie because Lumerical's software does
not provide a 'create movie' script function. If you don't have MATLAB, see the Tip at the end of page for an alternate
solution.

Associated files
usr_cw_movie.fsp
usr_cw_movie_matlab.m

See also
Ring resonator (Getting Started) 2020
Source movies (time domain) 628
monitor data, the complex nature of 873

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 871

Step 1: Copy the 'CW movie with MATLAB' analysis object into your simulation
After the simulation has been run, set the wavelength of interest in the CW movie object, then run the analysis
script. Running the analysis script will export the appropriate data to a .mat file.
setnamed("CW movie with MATLAB","wavelength",1.52e-6);
runanalysis("CW movie with MATLAB");

Step 2: Generate the movie file with MATLAB


Open MATLAB, and run usr_cw_movie_matlab.m. This will load the data into Matlab and generate the AVI
movies seen below (converted to Flash).

The real valued, instantaneous steady state field profiles are obtained by multiplying the complex field data from the
monitor by an appropriate phase, then taking the real part. By repeating this process for phase values between 0 and
2Pi, we can see how the fields oscillate over an optical cycle. Finally, we create a structure outline on the figure with
the contour function and index monitor data. See usr_cw_movie_matlab.m for more details.

Steady state movie of Ey(w) at Drop frequency Steady state movie of |E(w)|^2 at Drop frequency

Note: To see a movie of the steady state field profile at a 'Through' frequency, change the wavelength of interest in
the 'CW movie with MATLAB' object to 1.54 um.

For comparison, the movies created by the standard Movie monitors in the simulation are shown below. These
movies show how the fields evolve during the actual FDTD simulation, including the initial broadband source pulse
and all transients that occur as the field propagate through the simulation volume. These movies are inherently
broadband. You can see that some fields leave the simulation through the Through channel and some leaves through
the Drop channel.

Broadband movie of Ey(t) Broadband movie of |E(t)|^2

2003 - 2016 Lumerical Solutions, Inc


872 Lumerical Knowledge Base

Note: Matlab imaging conventions


Note that in the Matlab m-file, usr_cw_movie_matlab.m, we must:

1) apply an unconjugated transpose operation followed by a flip up-down operation to the matrix containing the field
data
2) interpolate the data from FDTD onto a uniform grid

The first step is necessary to get the orientation correct (the image() command in FDTD interprets rows and
columns differently than the imagesc() command in MATLAB). The second step is necessary because the
imagesc() command in MATLAB assumes that matrix data is uniformly sampled, even when you provide the x,y
position vectors. See the Matlab->Tips 1410 section for more information.

TIP: Creating a CW movie without MATLAB


To create a CW movie without MATLAB, use the 'CW movie with FDTD' analysis object. It is similar to the Matlab
technique, but without the final functions to output the results as an avi movie. Instead, the movie frames
exported to a series of numbered jpg image files.

This is not as convenient as a proper movie file, but there are many programs available that convert jpeg files to
movies. Alternatively, placing the images in a folder and scrolling through them with an image viewing program will
give a good idea of what the movie would look like.

TIP: Movies of the Poynting vector as a function of time


The technique described on this page to create CW movies of the electric (or magnetic) fields can not be directly
applied to the Poynting vector, since the Poynting vector data recorded by the frequency monitors is the time
averaged value. For this reason, it is not correct to define P(t) as P(t) = exp(i*phase)*P(w). Instead, it is necessary
to first calculate E(t)=exp(i*phase)*E(w) and Ht)=exp(i*phase)*H(w), then calculate the cross product: P(t) = E(t) X
H(t).

TIP:Using other data visualization functions

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 873

The above examples use the imagesc function to plot


the field data. It is equally possible other data
visualization functions. For example, the third movie
created by the example file uses the quiver3 function
to create an animated vector plot.

It is worth noting that the X and Y span of this video is


much smaller than the other videos. Rather than
showing the entire ring resonator, this video shows a
small region around the injection plane of the source. It
is certainly possible to create a vector movie of the
entire simulation region, but some additional
processing of the field data will be required. For
example, it may be necessary to plot the data on a
coarser mesh, to reduce the number of vector arrows
drawn. Plotting the Poynting vector, rather the the
electric field, is also likely to result in a more intuitive
looking movie.

5.6.8.5 Why is monitor data complex


Objective
This page explains why monitor data is complex valued, and the meaning of those complex values.

Associated files
usr_PlaneWavePhase.lsf
usr_PlaneWavePhase.fsp

See also
Making a CW Movie 870

real 1480
imag 1480
abs 1481
getdata 1646
getelectric 1650

Frequency domain field monitors


Frequency domain monitors obtain their data via a Fourier transform of the time domain fields: E(w)=fft(E(t)).
The resulting E(w) will always be complex, even if E(t) is real valued.

It is important to understand that the complex nature of the field data is not simply an undesired numerical
consequence of the Fourier transform. The complex nature of the data provides additional information: it tells
you both the magnitude AND the phase of the frequency domain fields.

Most often, you want the magnitude of the fields (i.e. the envelope function). In such cases, the 'getelectric'
script function is useful, as it returns |E|^2. The absolute value operation removes any phase information
from the result.
It is also common to do some further analysis on the complex valued fields. In such cases, you will need to
use the 'getdata' command to get the complex valued fields. Then, the 'real', 'imag' and 'angle' commands
may be useful. The complex data also provides enough information to create a CW movie.
If you want to see what the actual field values would be at a particular instant in time, you can plot the real

2003 - 2016 Lumerical Solutions, Inc


874 Lumerical Knowledge Base

(or imaginary) part of the data.

The complex nature of the frequency domain data allows you to get the phase of the Electric field. The
associated files for this section of the online help show how to get the phase information for a plane wave
propagating in free space and compare the results with theory.

( - i wt -ik x )
A plane wave propagating in free space has a complex vector fields Ae , so the phase accumulated
over a distance d is equal to kd.

The plot above shows that the agreement between the analytic solution and the FDTD simulation. To create
the plot, run the associated simulation file. Then run the script file.

Time domain field monitors


Time monitors record the electromagnetic time domain field data directly from the FDTD simulation. In most
cases, the FDTD simulation uses real valued fields, meaning the time monitor data will also be real valued.
The exception is when running simulations with Bloch boundary conditions 471 . Bloch boundaries require that
the FDTD simulation engine use complex valued time domain fields. In such cases, the time monitors data will
also be complex.

For the majority of time domain data analysis, it is acceptable to ignore the imaginary part of the monitor data.
To do so, use the 'real' script command.

Index monitors
Index monitors record the material properties (refractive index) of the structures in the simulation. For
absorbing or dispersive materials, the refractive index is a complex number. The complex refractive index is
often written in the form n+ik. The real part of the index monitor data gives 'n', while the imaginary part gives
'k'.

5.6.8.6 Far field projections


See the Solver - Far field 126 section.

5.6.8.7 Using impulse response - response to arbitrary input


Objective
This topic explains how to calculate the time domain response of a system to an arbitrary source time signal. The
response is calculated by using the impulse response of the system (as calculated from a simulation that uses the
standard source pulse).

This type of post-processing analysis is often more efficient than directly running an FDTD simulation with the
arbitrary source pulse. For example, once the impulse response is known, it is possible to calculate the response to
many different inputs without needing to run any additional simulations.not necessary to run any addition the
response to several different time domain pulses

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 875

Associated files
usr_impulse_arbitrary_signal.fsp
usr_impulse_arbitrary_signal.lsf
See also
Custom source time signal 613

Methodology
The impulse response of the system is obtained by running a 'standard' simulation using the default source pulse.
Important points to consider include:
The source must be setup to excite the system over the full range of frequencies of interest (ie. it must cover the
full spectrum of the desired custom source signal).
A frequency domain monitor must be setup to measure the impulse response of the system over the same range
of frequencies. It is important to understand that the frequency monitors record the impulse response of the
system. No additional processing of the data is required to obtain the impulse response.
As with any simulation, it is important that the simulation time be sufficiently long so that the time domain fields
decay to ~0 by the end of the simulation.
Note that the monitors in this example file have been setup to always record data from 0.7-1.3um, regardless of
the source wavelength range.

Once the impulse response has been calculated by a frequency monitor, it is possible to calculate the system's
response to an arbitrary input based on some simple fourier analysis.
1. The user must specify the desired input signal as a function of time: Signal(t)
2. Calculate the input signal's frequency domain spectrum with a fourier transform: Signal(f)
3. Multiply the signal spectrum and the impulse response: Impulse(f) * Signal(f)
4. Inverse transform the spectrum*impulse data to obtain the systems response to the desired input: Response(t).

2003 - 2016 Lumerical Solutions, Inc


876 Lumerical Knowledge Base

Example
To reproduce the following examples, open the associated simulation file (.fsp) and run the script file (.lsf). The goal
of this example is to determine the response of the system to a 50fs Gaussian pulse propagating through a n=3
dielectric slab using the technique described above. To verify the result, the script runs another FDTD simulation
using a 50 Gaussian pulse so the calculated response can be compared to the response from the direct FDTD
simulation.

Impulse response of
system for fields
transmitted through
the structure from
0.7-1.3um.

Oscillation is due to
constructive/
destructive
interference as fields
pass through the
dielectric slab.

Spectrum of 50fs
gaussian pulse.

Notice that spectrum


of pulse is fully
contained within the
range of known
impulse response
data (0.7-1.3um).

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 877

Time domain
response of system

Input signal: Desired


input signal. This is
typically specified by
the user.

Response - from
simulation: The
response of the
system as calculated
by running a full
FDTD simulation. For
verification purposes.

Response - from
impulse analysis:
The response of the
system as calculated
from the source
spectrum and
impulse response
data. Notice that this
data is very similar to
the response as
calculated from the
verification simulation
(green line), but did
not require an
additional FDTD
simulation.

5.6.8.8 Diverging simulations


Objective
This page describes how to fix diverging simulations. Most diverging simulations are detected by the auto shut-off
feature, which displays the message "ERROR: Early termination of simulation, the electromagnetic fields are
diverging." when the overall field strength rises above a threshold value.

2003 - 2016 Lumerical Solutions, Inc


878 Lumerical Knowledge Base

Associate files
divergence_example.fsp
See also
Running simulations
Modify material fit 272

Determine the type of instability


Most diverging simulations fall into one of two categories. Either the simulation is diverging due to a dt stability factor
problem, or a PML boundary condition problem.

It is easy to determine the type of instability by setting all of the simulation boundary conditions to Metal, then re-
running the simulation.
If the simulation still diverges, it is a dt stability factor type of divergence. See the dt stability factor 878 section.
If the simulation is stable, it is a PML type of divergence. See the PML and dispersive materials 879 section.

dt stability factor
The theoretical maximum time step is calculated from the simulation mesh size based on the Courant stability
criterion. By default, Lumerical software uses a time step that is 0.99 of the theoretical maximum time step.
This theoretical maximum is calculated assuming propagation of light in a homogeneous vacuum. Once
physical structures and interfaces are included in the simulation, particularly when dispersive materials are
involved, a smaller time step is sometimes required.

Reduce the dt stability factor


Reduce the dt stability factor until the simulation is stable. In many cases, a value of 0.95 or 0.9 will make the
simulation stable. In other cases, a value of 0.5 or smaller may be required.
Reducing the time step does not affect the accuracy or memory requirements of the simulation, but does
increase the simulation time. Changing dt from 0.99 to 0.95 will increase the simulation time by 4%.
This parameter can be accessed on the Mesh Settings tab of the Simulation region properties.

Causes of dt stability factor type divergences


Material properties
Some dispersive material models can cause the simulation to be slightly unstable. If you discover that one of
your materials causes the simulation to be unstable, use the Material explorer to ensure that the material
properties are what you expect. In some cases, the automatic data fitting routine will create fits that are not
very good. In this case, you should adjust the fit parameters to obtain a better fit. See this link for more
details: Modify material fit 272 . If the fit is good, then reduce the dt stability factor to make the simulation
stable.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 879

Mesh aspect ratio


A large mesh aspect ratio can cause the simulation to be unstable. If dx = 5nm and dy = 25nm, the aspect
ratio is 5. In principal, there is nothing wrong with having a large aspect ratio, but in practice it can be slightly
unstable when dt is near the maximum theoretical limit.

PML and dispersive materials


Generally, we recommend that physical structures be extended through the boundary condition (BC) region.
This gives the most accurate simulation results. Unfortunately, some dispersive materials can be unstable
when extended through PML BCs. The fields will begin to diverge at the point where the dispersive material
touches the PML BC. This is easy to see with a movie monitor.

The steps to take in order to fix a PML divergence depend on the PML implementation that is being used.
Stretched Coordinate PML (SCPML) is recommended, but if you are using an older version of the software
prior to the 2015a release, only the Uniaxial PML (UPML) type is available.

SCPML Settings
One or more of the following changes should make the simulation stable if you are using SCPML:

1) Set PML profile to stabilized


Changing this setting alone typically solves the divergence problem. The alpha setting and number of PML
layers are increased in the stabilized PML profile compared to the standard profile.

2) Increase alpha
Setting the PML profile to "Custom" allows you to set the alpha parameter. Increasing the value of alpha can
make the simulation stable, but it can result in increased reflections, so increasing the number of PML layers
is also recommended.

3) Increase the mesh size immediately before the PML


Adding a mesh override region to increase the size of the mesh step (in the direction normal to the PML
surface) can make the PML more stable. This can affect the performance of the PML as there can be small
reflections from the grading of the mesh itself.

4) Do not extend the metal layer through the PML


Reflections from the PML are minimized when structures are extended completely through the PML. However,
if this causes the simulation to diverge, the only solution may be to stop this layer at the inside edge of the
PML. This may cause higher reflections from the PML, but will make the simulation stable. Please note that
by default structures that terminate at the PML are automatically extended through the PML. You must
terminate the structure at least 1 dx from the PML, or disable the feature "extend structure through the pml" in
the Advanced Options of the simulation region.

Legacy UPML Settings (Prior to 2015a release)


One or more of the following changes should make the simulation stable if you are using UPML:

1) Reduce PML sigma


This setting can be accessed in the Advanced tab of the Simulation region. When you reduce PML sigma, the
absorption of the PML is reduced but the number of PML layers used will be automatically increased to
compensate (until the number of layers exceeds the maximum number you have allowed). This means that the
PML performance will not be affected, but your simulation will take more time and memory due to the
increased number of PML layers.

2) Increase PML kappa


This setting can be accessed in the Advanced tab of the Simulation region. The default value is 2. Try
increasing kappa to 10 or even 20. Very often this will stop the divergence. Increasing kappa has a very small
effect on the rest of your simulation. A larger kappa will cause slightly more reflections from the PML at normal
incidence, but will actually cause slightly less reflection at steeper angles. Values of kappa much larger than
20 can cause more significant degradation of the PML performance.

2003 - 2016 Lumerical Solutions, Inc


880 Lumerical Knowledge Base

3) Increase the mesh size immediately before the PML


Adding a mesh override region to increase the size of the mesh step (in the direction normal to the PML
surface) can make the PML more stable. This can affect the performance of the PML as there can be small
reflections from the grading of the mesh itself.

4) Set Type of PML to Stabilized


This setting can be accessed in the Advanced tab of the Simulation region. This can degrade the performance
of the PML at steeper angles of incidence.

5) Do not extend the metal layer through the PML.


Reflections from the PML are minimized when structures are extended completely through the PML. However,
if this causes the simulation to diverge, the only solution may be to stop this layer at the inside edge of the
PML. This may cause higher reflections from the PML, but will make the simulation stable. Please note that
by default structures that terminate at the PML are automatically extended through the PML. You must
terminate the structure at least 1 dx from the PML, or disable the feature "extend structure through the pml" in
the Advanced Options of the simulation region.

Other diverging situations


Material fits with unphysical gain

Occasionally, the fitting routine will generate fits with gain, even though the experimental material data does
not have any gain. This will cause a simulation to diverge even if the frequency at which the fit has gain is well
outside of the simulation region.

To check if this is the case: open the material editor, select show extended spectrum and fit and plot the
index. If Im(index) is negative at some point then there will be a small region of gain. This problem can be
solved either by slightly varying the simulation bandwidth or by changing the fit tolerance and maximum
coefficients variables.

Incorrect simulation setup

Injecting a source with incompatible simulation region settings such as injecting a plane wave source with
PML boundaries at the sides of the source can also cause a simulation to diverge. See Plane waves - Edge
effects 526 .

More help

The above modifications will fix the vast majority of diverging simulations. However, if they don't fix your
simulation, please contact technical support at support@lumerical.com

Automatic divergence checking


Lumerical software has an automatic divergence checking feature. If the total energy in the simulation volume
is many times larger than the injected energy, the simulation will be stopped. The following graphical warning
shown will appear in the Job Manager and Object tree when a diverging simulation is detected.

2003 - 2016 Lumerical Solutions, Inc


Component Tools Reference Guide 881

The automatic divergence checking feature properties are found in the Advanced tab of the Simulation region
properties.

Time and movie monitors can be helpful when debugging diverging simulations. Both will show the fields
growing exponentially at some point. Simulations that suddenly become very slow (for example, the time
remaining estimate increasing from 5 minutes to 1 hour) is another sign of divergence. The automatic
divergence checking normally stops the simulation before the simulation becomes very slow

Example
The file divergence_example.fsp contains a multilayer OLED structure in a 2D simulation. The dipole
source is in a multilayer stack of highly dispersive materials. Some of the materials have complex dispersion
characteristics that lead to numerical stability problems (for example, alq3_PFD changes from an index that is
almost purely real to an index that is almost purely imaginary).

Even with these challenging materials, the simulation is stable with the default SCPML settings. With the goal
of creating an example simulation that diverges, the automatic shut-off has been disabled. (The automatic
shut-off feature normally stops the simulation when the simulation fields become very small). With the Auto
shut-off disabled, the simulation continues to run past the point it would normally stop. This allows the
numerical problems to build, eventually leading to diverging fields.

2003 - 2016 Lumerical Solutions, Inc


882 Lumerical Knowledge Base

As shown in the movie, the initial portion of the simulation runs properly, with the dipole source radiating, then
the fields decay. Later, we see that the there is an oscillating field at the dipole location. Analysis of the time
signal shows that this field is oscillating at a frequency corresponding to approximately 2.7 microns (which is
well outside the range of interest in this simulation). This wavelength is precisely the point where the alq3_PFD
material changes from an index that is almost purely real to an index that is almost purely imaginary. After a
long enough period of time, the interaction of these fields with the PML leads to a divergence. We can use this
simulation to test the techniques mentioned above. Please note that you may want to delete the movie
monitor to reproduce these steps as it will greatly speed up the simulation.

Confirm that it is a PML type of divergence


Switch all the boundary conditions to metal and rerun the simulation, we can see that it does not diverge. This
confirms the divergence is related to the PML boundaries.

Next, we can test the impact of various settings:

Parameter modified Simulation time until divergence


Default settings 27%
Set PML profile to "stabilized" No divergence
Set PML profile to "custom" and increase "alpha" to No divergence
0.1
Terminate structures at PML boundary and uncheck No divergence
the "extend structures through PML" in the FDTD
simulation region
Increase dx to 20nm near the PML boundaries. This 72%
can be done by editing the mesh override regions and
checking "override x mesh".

For this simulation, we can maintain the simulation stability for the full simulation time by using the
"stabilized" PML profile, increasing alpha, or truncating the structure before the PML. Truncating the structure
can lead to significant reflections, so either using the "stabilized" PML profile or increasing alpha would be
recommended instead.

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 883

6 System Tools Reference Guide


Relevant solvers and products
Solvers 101 : DDF, SDA
Products: INTERCONNECT

Chapters
New features 883
Find new product features by release.

Schematic editor 891


Learn how to use the graphical schematic layout editor.

Element library 904


Find element descriptions in this chapter.

Parameter sweeps 696


Learn how to run parameter sweep, optimization and yield analysis tasks.

Result analysis
Learn how to access and analyze simulation data.

6.1 New features


New features in 2016b 885 (INTERCONNECT 6.0)
New features in 2016a 884 (INTERCONNECT 5.5)
New features in 2015b 885 (INTERCONNECT 5.0)
New features in 2015a 887 (INTERCONNECT 4.5)
New features in 2014a 888 (INTERCONNECT 4.1)
New features in 2013c 889 (INTERCONNECT 3.1)
New features in 2013b 890 (INTERCONNECT 3.0)
New features in 2013a 890 (INTERCONNECT 2.5)

To check the version of the software you are currently using, and to check for updates, go to the Help menu in the
main title bar.
See Component design tools new features for the new features in FDTD Solutions, MODE Solutions and DEVICE.
Also see the Product announcements page.

6.1.1 New features in 2016b


INTERCONNECT 6.0
VerilogA Direct Programming Interface (DPI)
The new INTERCONNECT VerilogA DPI enables co-simulation with the Cadence Spectre Circuit Simulator. The
co-simulation provides designers a unified and reliable integrated photonic integrated circuit (PIC) design flow inside
Cadence Virtuoso Analog Design Environment (ADE), allowing for design and simulation of electro-optical
circuits. Electro-optical circuits having feedback can also be designed and simulated inside this environment.

Improved Simulation and Design Environment


Improved frequency domain simulation engine, netlist parser and schematic editor allows for handling of complex
PIC with thousands of elements. Additional log information provides details such as the number of elements and
connections of the current circuit.
Schematic editor now include a progress bar that is displayed when loading or parsing large circuits.
Lookup tables now can be loaded directly into the script environment, giving users access to design and extracted
parameters. It also includes new functions to read and write tables, and append parameters into existing tables.
X and Y physical layout coordinates properties are now vectors, enabling users to provide multiple layout
coordinates to define a single element. For example, a single waveguide can be defined as a vector of layout

2003 - 2016 Lumerical Solutions, Inc


884 Lumerical Knowledge Base

coordinates.
The SPICE netlist parser now supports matrix and vectors as parameters, giving additional flexibility in passing
parameter from and to INTERCONNECT.
A default custom library path parameter was added to the element library, facilitating the navigation between
different working folders when developing compact model libraries (CML). Users can also select a custom folder
and export HTML information to facilitate the process of documenting a new CML.
The property editor was greatly enhanced by including sorting of properties and categories, allowing for fine control
on how the properties should be presented in the property view. Users can also enter the property range, enabling
validation of property values.
The Schematic editor now support vertical and horizontal flip.

Extended Element Library


New EDA Cosimulation element allows for direct access of input and output electrical signals. While the
simulation is running, users can push new signal values into the input ports and pull signal values from the output
ports.
The new Optical Isolator element complements the extensive library of INTERCONNECT passive elements.

Enhanced Element Library


Waveguide elements now include an option to enable a fractional delay filter, where time delays dont have to be
an integer multiple of the sampling period. It offers better accuracy when running transient simulations, where
waveguides are typically represented as delay lines. Warning messages were also included to inform the user if
the current sample rate is too small to provide enough accuracy for time domain simulations.
Elements adopting this feature are: Straight Waveguide, MODE Waveguide, Multimode Waveguide, Waveguide
Arc Bend, Waveguide Sine Bend, Optical Delay and Electrical Delay (Delay elements do not have filter options).
For more information, please refer to the Fractional delay compensation 1103 page.
In order to compensate for additional delays introduced by the circuit simulator, a delay compensation parameter
was added to different elements, allowing for extraction of unwanted additional delays introduced by the simulator.
The new Spectrum analyzer frequency range parameter limits the range and number of points required for
frequency analysis.
The time range parameter allows for defining start time and stop time for all of the analyzers, providing fine control
over the exact time period for analysis.
The Electrical Network Analyzer now include an option to remove the DC value from the analysis.
The Waveguide Bragg grating element was extended to allow the definition of the effective index and frequency of
operation when using the grating period option.

New and Enhanced Script Commands


runinitialize 1435 , runstep 1435 , runfinalize 1436 , waituntildone 1436 , lookupread 1442 ,
lookupwrite 1443 , lookupappend 1445 , insert 1445 , getvalue 1620 , add2visualizer 1530

6.1.2 New features in 2016a


INTERCONNECT 5.5
Integration with Cadence Virtuoso Analog Design Environment
INTERCONNECT supports schematic driven layout (SDL) photonic integrated circuit design flows in combination
with Cadence Virtuoso Analog Design Environment (ADE). ADE is the advanced design and simulation
environment for the Cadence Virtuoso platform. The close integration with Virtuoso Schematic Editor offers
interactive analysis, easy design and parameterization for fast photonic integrated circuit exploration.

Parametric Analysis with Mentor Graphics Pyxis


In addition to users being able to create an INTERCONNECT circuit schematic and run the simulations directly from
Mentor Graphics Pyxis Schematic, INTERCONNECT now supports parametric analysis also driven from Mentor
Graphics Pyxis Schematic.
For more information on integration of INTERCONNECT with Mentor Graphics Pyxis, please see the following page:
Unified Design Flow for Silicon Photonics

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 885

Optical SPICE netlist export and import


INTERCONNECT was extended to allow for native exporting and importing of optical SPICE netlists, enabling
schematic driven layout (SDL) and layout driven schematic (LDS) within traditional EDA design flows. Additional
supported SPICE commands include LIB, MODEL, PARAM, INCLUDE and STEP.
For the detailed working principle of SPICE netlist export and import, please see the following page:
Import SPICE netlist

Improved Simulation and Design Environment


New simulation deadlock resolution algorithms allow for ignoring, identifying or resolving simulation deadlocks,
preventing the introduction of unnecessary single-time-step numerical delays.
New library and model properties provide compact model developers the ability to categorize models and libraries.
Please see the Knowledge Base section Compact Model Libraries (CMLs) 2474 for the detailed information.
Lookup tables now support direct mapping and interpolation between arbitrary number of design and extracted
parameters. They also include reading of interpolated optical n-port s-parameters and frequency or time dependent
tables.
X and Y physical layout coordinates properties are now supported by each element, providing support for layout
and geometric dependent effects such as temperature and process variations.
User defined connection routing now supports Manhattan or Direct connection routing.
The schematic editor now support zoom in and out by pressing and holding the control key while rotating the
wheel button, and support for creating zooming areas with the right mouse button.

Extended Element Library


New Piecewise Linear Export and Import elements allows for respectively exporting and importing a piecewise
linear time depended electrical waveform, enabling file transfer and co-design with third-party EDA tools.
Please see the Piecewise Linear Export 1309 and Piecewise Linear Import 1308 pages for more information.

Enhanced Element Library


The Data Delay element was extended to support bidirectional behavior. This specialized element allows for user
defined control of simulation deadlocks, preventing introductions of unnecessary single-time-step numerical
delays.
Please see the Data Delay 1311 element page for more information.
The Scripted element now supports cell data types to manipulate digital, electrical and optical signals, reducing
the number of required functions and greatly simplifying the process of writing time-domain scripted elements.
Please see the Scripted Element 1326 page for the implementation details of this property.
Waveguide elements models were extended to include effective index and excess loss temperature sensitivity
properties per waveguide transverse mode, enabling the incorporation of thermal effects into the waveguide
propagation transfer function. Similar functionality was also added to various coupler and resonator elements.
Please see the Waveguides 1097 Element Library section for more information.

New elements
Piecewise Linear Export 1309 , Piecewise Linear Import 1308

New and Enhanced Script Commands


besseli 1522 , besselj 1522 , besselk 1523 , bessely 1522 , corrcoef 1520 , corrtransf 1520 , cov 1520 , erf 1516 , erfc 1517 , exporthtml 1448 ,
exportnetlist 1447 , findproperty 1452 , findpropertyvalue 1452 , getmonitorframe 1623 , getmonitorwaveform 1624 ,
getportframeheader 1623 , help 1448 , logmessage 1449 , lookupreadnportsparameter 1444 , lookupreadtable 1444 ,
lookupreadvalue 1444 , lower 1493 , operatingsystem 1449 , popportframe 1621 , popportframedata 1622 , pushportframe 1622 ,
pushportframedata 1623 , refresh 1449 , replacelibrary 1617 , setconnectionrouting 1451 , setportframeheader 1623 , setvalue 1615 ,
sroughness 1497 , toscript 1493 , upper 1493

6.1.3 New features in 2015b


INTERCONNECT 5.0
Traveling Wave Laser
The new INTERCONNECT traveling wave laser element self-consistently incorporates the effects of external
feedback and resonances, allowing it to be used in the design of hybrid III-V Si-SiO2 laser chips as well as
integrated lasers driving PICs. An individual laser element can simulate Fabry-Perot lasers, and in combination with

2003 - 2016 Lumerical Solutions, Inc


886 Lumerical Knowledge Base

external elements new devices can be simulated, such as external cavity and multi-section lasers.

The laser model propagates the complex slowly-varying amplitudes of forward and backward traveling optical modes
through the gain medium in the time domain on 1D grid in the longitudinal direction. The transverse properties of
each mode are characterized by scalar quantities such as effective and group index, and mode confinement to the
gain region which can be accurately pre-calculated with an Eigen mode solver. Frequency and local carrier
dependent gain and stochastic spontaneous emission are included using digital filtering, and carrier concentrations
are updated based on optical gain, spontaneous emission, and non-radiative recombination rates.

For detailed properties of the TW Laser model, please see TW Laser 1177 .
Please see the Fabry-Perot Laser 2486 , DBR Laser 2490 and Ring Vernier Laser 2495 application example pages for this
TW laser model.

Traveling Wave Waveguide Bragg Grating


In order to improve large scale photonic integrated circuit design, the INTERCONNECT Waveguide Bragg Grating
primitive element model was extended to support full dynamic behavior. The new compact model now allows for
static or full time-dependent analysis of waveguide gratings, enabling fast and accurate simulation of integrated
circuits such as external cavity lasers.

Compact Model Library Development and Distribution


Two new licensed features enable the secured generation and use of customized compact model libraries (CML).
These features can be used to generate calibrated CMLs distributed with foundry PDKs or to efficiently protect and
distribute internally developed custom element libraries among various design groups or customers.

With the CML publisher, a designer can define and package a library of compact model elements for distribution or
inclusion in a PDK package. Critical proprietary data such as hierarchical circuit definitions of compact model
elements, performance data and process parameters can be obfuscated upon packaging and are accessible only
with an associated CML reader license

A CML reader license allows designers to open use a packaged CML published using INTERCONNECT. All required
compact model elements are extracted in the design kit folder and can be used to design, simulate and optimize
photonic integrated circuits while obfuscating underlying proprietary data used to define the models.

For more information, please see Custom Library & Design Kit 1331 .

Improved Simulation and Design Environment


The custom folder in the element library now includes the option to package or publish a CML. The publishing
feature supports the obfuscation of compact model elements and measurement data.
The design kit folder now supports direct installation and setup of CML packages
The schematic editor was extended to support adding elements to a circuit by reference.
The new options dialog box enables you to configure the integrated development environment to your needs

Extended Element Library


New Sine Bend element provides direct entry of length and height parameters, automatically calculating the
waveguide arc length.
Reference Element allows for creating circuits that reference existing compact model elements. If a referenced
calibrated compact model is updated, all the circuit elements that refer to the model are also updated.
The new Traveling Wave Laser element can be used in the design of hybrid III-V Si-SiO2 laser chips as well as
integrated lasers driving PICs.

Enhanced Element Library


Compound Element: new parameter allows for automatic loading of lookup tables with foundry parameters
facilitating the process of developing compact models.
The MODE waveguide element can now store the propagation properties from a file generated by MODE
Solutions, not requiring the file to be available at run time.

New elements

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 887

Traveling Wave Laser 1177 , Waveguide Sine Bend 1166

New and Enhanced Script Commands


exportimage 1635 , mcfit 1652 , importschematic 1615 , exportschematic 1615 , loaddesignkit 1615 ,
reloaddesignkit 1616 , removedesignkit 1616 , packagedesignkit 1616 , installdesignkit 1617

6.1.4 New features in 2015a


INTERCONNECT 4.5
Traveling Wave Electrode
The fundamental idea underlying traveling wave electrodes in contrast to lumped electrodes is that the distributed
capacitance does not limit the modulator speed. Proper design enables identical propagation speed of the optical
and the modulating electrical signal, permitting the phase modulation to accumulate monotonically and independent
of frequency. The new INTERCONNECT traveling wave electrode allows for simulation of the propagation speed
mismatch, microwave loss and impedance mismatch.
Please see the application example Traveling Wave Modulators 2454 for more information.

Dynamic Ring Modulator


In order to improve large scale photonic integrated circuit design, the INTERCONNECT ring modulator primitive
element model was extended to support full dynamic behavior.
The new ring modulator compact model now allows for static, quasi-static and full time dependent analysis of
microring resonators, enabling fast and accurate simulation of integrated circuits.
Please see the whitepapar on INTERCONNECT Ring Modulator Model and the element Optical Ring Modulator 1047
for more information. There is also an application example about the Ring Modulator Circuits 2391 available online.

SDL and LDS with PhoeniX OptoDesigner


INTERCONNECT supports schematic driven layout (SDL) and layout driven schematic (LDS) photonic integrated
circuit design flows in combination with PhoeniX OptoDesigner.

Improved Simulation and Design Environment


The new design kits folder in the element library facilitates the process of installing, loading and removing design
kits. File dependencies among different design kit elements and files is resolved using environmental variables.
The new sample mode frequency band property allows for selecting between automatic and single frequency
simulation bands, offering more control over the global simulation settings.
The new diagnostic feature offers a comparison between ideal and fitted frequency transmission of different
elements during time-domain simulations, simplifying the process of defining the number of digital filter taps for a
given simulation bandwidth.
The random number generator seed settings were extended to include a random seed option, allowing a different
seed for different runs. In combination with the existing automatic and user defined seed, users now have more
control over the random number generator behavior.

Extended Element Library


New jitter source allows for simulation of random and deterministic jitter for electrical signals.
Microwave loss element supports frequency dependent loss, including linear and squared root frequency
dependency.
Electrode transmission line addresses traveling wave modulator designs, where impedance mismatch, microwave
losses and optical and microwave index mismatch are relevant design parameters.

Enhanced Element Library


RZ and NRZ Pulse Generators: new pre-emphasis option to set overshoot and undershoot factor and period to the
generated pulse.
Optical Phase Shift: frequency dependent phase shift can now be entered as an input parameter.
Waveguide Coupler: frequency dependent coupling coefficients can now be entered as an input parameter.
Optical Ring Modulator: new ring modulator compact model allows for static, quasi-static and dynamic analysis of
ring modulators.
Optical N Port S-Parameter: extended file format now allows for user defined port names and position.
Analyzers: New startup time parameter allows for removal of initial signal transients.

2003 - 2016 Lumerical Solutions, Inc


888 Lumerical Knowledge Base

Optical Modulator Measured: new electrode type parameter allows selection between lumped and traveling wave
electrode modulators.
Impulse and Step sources: new delay and bias parameter permits adding a time and amplitude shift to the
generated output signal.
Symbol Mapper: new bias parameter permits adding an amplitude shift to the generated output signal.
Compound Element: new parameter allows for disabling the expansion of compound elements.
Electrical Network Analyzer: new parameters to generate an output signal with user defined amplitude, bias and
delay for characterization of electrical and microwave circuits.

New elements
Electrode Transmission Line 1027 , Microwave Loss 1059 , Jitter Source 1006

New and Enhanced Script Commands


addproperty 1589 , seticon 1593 , exportschematic 1615 , importschematic 1615 , loaddesignkit 1615 ,
removedesignkit 1616 , reloaddesignkit 1616 , loadcustom 1616 , fileexpand 1450 , autosaveon 1450 ,
autosaveoff 1450

6.1.5 New features in 2014a


INTERCONNECT 4.1
Multithreaded Dynamic Data Flow
INTERCONNECTs new multi-threaded dynamic data flow engine allows for faster time domain simulations of large
scale photonic integrated circuits containing hundreds of elements. The new multi-threaded engine allows for the
concurrent running of elements that are immediately available for calculation, not requiring static rescheduling of the
circuit under test before each run.

HDF5 File Format Support


INTERCONNECTs new data monitors include support for writing and reading files that use the Hierarchical Data
Format, Version 5 (HDF5). Signal waveforms are streamed to disk, reducing memory requirements for the simulation
of large scale photonic integrated circuits. By supporting the HDF5 file format, third-party tools such as MATLAB
can easily import signal waveforms directly from INTERCONNECT.

Vector Signal Analyzer


The new Vector Signal Analyzer offers comprehensive characterization of amplitude and phase modulated signals
such as DP-QPSK. Analyze complex modulated optical signals using vector and constellation diagrams to
determine signal quality or evaluate components that are designed for IQ modulation and demodulation.

Integration with Mentor Graphics Pyxis


Users can create an INTERCONNECT circuit schematic and run the simulations directly from Mentor Graphics
Pyxis Schematic. Simulation results can be imported into Mentor Graphics EZwave high-capacity, high-
performance graphical waveform environment. Note: For licensing and software version details regarding this function,
inquire with your local Lumerical representative or contact us at sales@lumerical.com.

Improved Simulation and Design Environment


The new simulation status bar includes simulation progress, time elapsed and estimated time left.
The new splash screen display progress of loading elements and PDK libraries.
The new animation option illustrates currently running elements and threads.

Extended Element Library


Scripted electrical and optical sources allow for arbitrary waveform generation.
Scripted optical modulator with arbitrary voltage dependent phase and absorption parameters facilitates prototyping
of new types of modulators.
Passive elements including optical circulator and waveguide crossing.
Network elements for the design of large optical space switch circuits.
New symbol mapper, quantizer and data recovery elements support user defined and standard advanced
modulation formats such as M-ary QAM and PSK.
Vector Signal Analyzer offers comprehensive characterization of amplitude and phase modulated signals.

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 889

Logical elements perform user defined specified logical operations on digital and electrical signals.

Enhanced Element Library


PRBS Generator: new output types include codeword and load from file, allowing for user defined bit sequences.
Mach-Zehnder Modulator: new modulator types include dual drive, balanced single drive and unbalanced single
drive with internal or external DC bias source.
Optical Modulator and Mach-Zehnder Modulator Measured: new coefficients option allows for defining voltage
dependent phase and absorption parameters using a polynomial function.
Optical Network Analyzer: new data export option facilitates extraction of multimode and multiport s-parameters
from a circuit or device under test.
Waveguide Y Branch: New insertion loss and phase shift properties.
Double Bus Ring Resonator: Thermal effects defined by properties such as thermal fill factor and effective index
ratio are now included in the model.
Waveguide Coupler: New insertion loss and conjugate properties.
MODE Waveguide: New excess loss and propagation loss properties allow for customization of waveguide
propagation properties imported from MODE Solutions.
Gaussian Beam: New property defines 2D Z normal, 2D X normal and 2D Y normal beam direction.
CW laser: RIN effect is now included in the model.
Mentor Graphics ELDO Import: The new multiport element allows for loading a single file with multiple electrical
signals, and to automatically associate different ports to different signals.
Optical S-Parameter, Optical 1xN S-Parameter and Optical N-Port S-Parameter: New option to fit filter response to
an IIR digital filter.

New elements
Vector Signal Analyzer 931 , Scripted Source 1004 , Scripted Optical Source 1024 , Modulation Symbol Mapper 984 ,
Optical Circulator 1078 , Waveguide Crossing 1132 , Modulation Symbol Demapper 1257 , Quantizer 1260 , Data Recovery 1263 ,
Optical Switch 1271 , Optical Y Switch 1274 , Digital Delay 1293 , Digital NOT 1291 , Digital Logic 1288 , Electrical NOT 1296 ,
Electrical Logic 1295 , Electrical Multiplier 1280 , Electrical Constant Multiplier 1278

New and Enhanced Script Commands


setsparameter 1631 , saveelement 1614 , loadelement 1614 , probe 1614 , runoptimization 1634 ,
autoplace 1614

6.1.6 New features in 2013c


INTERCONNECT 3.1
Optical Netlist Importing
The ability to import a SPICE netlist and create a corresponding PIC schematic, facilitating the analysis of optical
circuit representations within third-party EDA tools.

Support for PDK Development


Better support for the development of process design kits (PDKs) with the inclusion of an extensive library of
customizable compact models and lookup tables containing design intent parameters.

Result displays
Enhanced analyzers offers automatic update of results during runtime, allowing for displaying of real time waveform
plots.

Extended Element Library


Ring modulator element for the fast and accurate simulation of cascaded rings in the time and frequency domain.
Electrical s-parameter elements to incorporate measured s-parameter data.
Polarization elements including circular polarizers, beam splitters, waveplates and polarization rotators.
Electrical elements including noise sources, electrical amplifiers and network analyzers to better simulate the
electrical portion of mixed-signal circuits.
Waveguide Bragg gratings for uniform, apodized, chirped, phased and sampled gratings.
Time variant electrical filters for voltage dependent s-parameters.

2003 - 2016 Lumerical Solutions, Inc


890 Lumerical Knowledge Base

Faster Circuit Analysis


INTERCONNECTs new multi-threaded scattering data analysis engine allows for faster simulations of large scale
photonic integrated circuits containing hundreds of elements. With the new multithreaded engine, the calculation
speed of INTERCONNECT scales almost linearly with the number of cores, offering speedups of 10X or larger on
modern workstations

S-parameters Data Validation


INTERCONNECT now includes validation tools to ensure that imported S-parameter data, whether from
measurements or another simulation tool, obeys tests for reciprocity and passivity. If any imported data fails those
checks, S-parameter data may be forced to obey these checks, ensuring that simulated results are more reliable in
terms of accuracy and convergence.

New elements
Agilent ADS Export 1302 , Agilent ADS Import 1304 , Bragg Grating 1154 , Electrical Amplifier 1170 , Electrical Network
Analyzer 936 , Mentor Graphics Eldo Export 1305 , Mentor Graphics Eldo Import 1306 , Noise Source 1000 , Optical Amplifier
1173 , Optical Channel Analyzer 953 , Optical Fiber 1116 , Optical Noise Source 1021 , Optical Ring Modulator 1047 , Read

From Stream 1317 , Sampled Bragg Grating 1159 , Step Source 1003 , TV LP RC Filter 1223 , VD LP RC Filter 1225 , Write To
Stream 1316

New script commands


addproperty 1589 , addtolibrary 1613 , autoarrange 1589 , createcompound 1589 , eye 1461 ,
gdsaddcircle 1679 , gdsaddpoly 1679 , gdsaddrect 1680 , gdsaddref 1680 , gdsbegincell 1678 , gdsclose
1677 , gdsendcell 1678 , gdsopen 1677 , getports 1634 , getsetting 1634 , global 1466 , issweep 1652 ,
library 1613 , lookupclose 1443 , lookupopen 1443 , lookupread 1442 , lookupwrite 1443 , precision 1506 ,
setexpression 1589 , setsetting 1633 , simulation 1466 , touchstoneload 1445 , vectorplot 1531 ,
vtksave 1442

6.1.7 New features in 2013b


INTERCONNECT 3.0
Results manager and Visualizer
The Results Manager 736 is a tool for analyzing simulation data. This includes a Results View window which displays
all the results for the simulation object that is currently selected in the Object Tree. The Results Manager also
includes a Script Workspace and a Script Favorites window, providing additional GUI-based functionalities.

Also featured in INTERCONNECT 2.5 is an updated Visualizer, which significantly simplifies the process of
visualizing simulation data. When used in conjunction, Results Manager and the Visualizer provide a very useful and
intuitive way of analyzing and visualizing variables and results through the GUI, greatly reducing the need for
scripting.

Datasets
Lumerical datasets are structured data objects that collect a set of related matrices into a single convenient object,
allowing one to package raw data into meaningful results that can be easily parameterized and visualized.

See Dataset introduction 1461 for more information.

6.1.8 New features in 2013a


INTERCONNECT 2.0
Yield analysis tool
In INTERCONNECT 2.0, a yield analysis tool is available in the Optimization and Sweeps window. The yield analysis
tool gives users the ability to run extensive Monte Carlo analysis, sweeping across multiple parameters to assess
statistical variations of circuit elements on overall circuit performance.

Please see the Yield analysis 696 example for more information.

Faster frequency domain calculations

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 891

Improved simulation engine provides substantial speed increase to frequency domain calculations.

Cascaded elements
S-parameters for cascaded elements are automatically calculated within INTERCONNECT, simplifying the definition
of circuits employing these elements.

New scripted element capabilities


Set and get digital, electrical and optical signals in time domain.

Full view window


The Full View window shows the entire schematic of the selected view port and allows the user to select a particular
section and pan over the circuit.

Connection pins
It is now possible to insert a pin along an existing connection, allowing you to drag and modify the path of the
connection between the two components. Simply right-click on a connection and select "Insert pin".

New script commands


The following script functions were added in INTERCONNECT 2.0. For more information, see the function
descriptions in the scripting section of the Reference Guide.
flipelement 1566 , getposition 1570 , getrectangle 1571 , histc 1528 , histogram 1455 , lognrnd 1503 ,
randn 1503 , randnmatrix 1455 , rotateelement 1566 , setmodes 1570 , setposition 1570 , setrectangle
1570 , . operator 1468 , addattribute 1460 , addparameter 1460 , eig 1485 , debug 1442 , getattribute 1461
, getparameter 1460 , getresult 1647 , getsweepresult 1646 , matrixdataset 1459 ,
rectilineardataset 1459 , mult 1485 , permute 1486 , integrate2 1488 , reshape 1486

New Elements
The following elements were added in INTERCONNECT 2.0. For more information, see the Element library section of
the Reference Guide.
1xN Fork 1314 , Optical Modulator Measured 1039 , Optical N Port S-Parameter 1090 , Ramp 998 , Star Coupler 1127

6.2 Schematic editor


The image below shows the Schematic Layout Editor (depending on the product, there may be small differences).
This editor is the graphical interface to the simulation engines, it is used to setup simulations, analyze results, and
to run all scripts. In the screenshot below, different regions of the schematic layout editor are labeled. They include:
Main Title Bar 892
Toolbars 892
View Ports and Full View 893
Properties, Ports and Results 896
Element Tree and Element Library 897
Script Prompt/Output and Script Editor 898
Simulation Status Bar 899

2003 - 2016 Lumerical Solutions, Inc


892 Lumerical Knowledge Base

For tips on how to use the schematic layout editor, see Using the layout editor 899 .

6.2.1 Main title bar


The menus on the main title bar are listed below. If any of the options can be selected using a button on a toolbar,
the icon is drawn to the left of the name. Similarly, shortcut keys are located to the right.

File
The file menu includes options to create new files and save or load existing files, as well as import SPICE netlists.
See the Importing SPICE netlist page for more information.

Edit
The edit menu allows users to undo/redo their actions, copy/paste and an option to select all the objects in the
current simulation. It also contains all the options that are in the edit toolbar. Note that in the edit menu, the copy/
paste options are available, but the duplicate option is not. Conversely in the edit toolbar the duplicate option is
available, but the copy/paste option is not. The duplicate tool has the same effect as copying and then subsequently
pasting.

View
The view menu includes options to choose the mouse mode toolbar options as well as refresh annotations.

Simulation
The simulation menu includes options to run the simulation and validate all analyzers.

Help
The help menu provides links to the online knowledge base, and local PDF copies of the product documentation. It
allows the user to check which version of the software is installed, the expiry date of the license file in use, and
whether Matlab integration is active.

6.2.2 Toolbars
The shortcut key used to run the function from the keyboard is given in brackets next to the name of the tool.

Edit toolbar

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 893

The edit toolbar contains tools used to edit (E) duplicate (D), delete (Del) simulation elements.

Mouse mode toolbar

The mouse mode toolbar changes what the mouse place holder looks like on the screen. Depending on the mode,

the user can edit objects (S), pan (P) or zoom (Z) in the view ports. The "Select ports to be monitored" button
(M) allows users to select which ports to store simulation data for.

Simulation toolbar

The simulation toolbar contains tools to run and stop the simulation, as well as switch to layout mode

in the analysis mode. The "Validate all analyzers" button will rerun the analysis of each analyzer,
allowing users to change analyzer inputs (or add new analyzers) and recalculate the results without having to rerun
the simulation.

Alignment toolbar

The alignment toolbar consists of buttons that control the way in which objects can be accurately positioned with
respect to other objects.

View toolbar

The view toolbar includes the zoom extent (X) button, which is a quick way to zoom out to show the entire circuit.

6.2.3 View ports and Full View


The view ports show graphical representations of all the elements.

When moving the mouse pointer over the view port, it will either have the shape of an arrow, a hand, a magnifying
glass. You can toggle between these by selecting a mouse mode as described in the toolbars section.

By default, there is a single view port that shows all the elements that are contained in the Root Element (a
Compound Element 1322 ). Users can open additional view ports corresponding to any compound element by right
clicking on the compound element and selecting "Expand".

2003 - 2016 Lumerical Solutions, Inc


894 Lumerical Knowledge Base

At the top of each view port is the current scope of the compound element.

Element context menu options


You can access the context menu of an element by selecting the element in the view port and right-clicking.

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 895

CREATE COMPOUND ELEMENT: Add a new compound element


CREATE SCRIPTED ELEMENT: Add a new scripted element
DISPLAY RESULTS (analyzers): Visualize results that are automatically updated during run time
EDIT: Open Property Editor window
EXPAND (for compound elements): Open additional view port corresponding to the compound element
SET ICON: Opens a file browser to select an image to use as the element icon
COPY TO ELEMENT LIBRARY: Copy selected element to Element Library's Custom folder
VIEW ANNOTATIONS: Toggle annotation display on and off
HELP: Access online help page for the selected element

Selecting objects in the view ports


In order to select an object in a view port, the mouse must be in select mode (i.e. the pointer looks like an arrow).
When objects are selected, it is surrounded by a box with dotted lines (also, the names are highlighted blue in the
element tree).

Copying and Pasting from other simulations


It is possible to copy and paste between different view ports (from the same file or a different file) using the standard
Ctrl+C and Ctrl+V shortcut keys.

Using the Full View window


The Full View window shows all the entire schematic of the selected view port. The red box outlines the view that is
currently displayed in the view port and you can click on this box and drag it to change the view to a different part of
the circuit.

2003 - 2016 Lumerical Solutions, Inc


896 Lumerical Knowledge Base

6.2.4 Properties, Ports and Results


The Properties, Ports, and Results View show the properties/ports/results corresponding to the selected element.

Once a simulation completes, the results can be visualized using the Visualizer.

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 897

6.2.5 Element tree and Element library


The element tree and the element library windows help organize and find simulation elements.

Element Tree
A simulation requires that the user define a set of elements (sources, circuit elements, analyzers...etc). As a
complete setup may contain a large number of elements, the element tree was designed to allow for organization
and easy selection. All simulation elements are within the Root Element, which represents the current simulation.
Within 'Root Element', elements are listed as they are inserted by the user. Press F2 or double-click to change the
name.

Element Library
The Element Library 904 is an extensive list of pre-defined PIC elements, including optical sources, measurement
elements, and both passive and active optoelectronic devices. The center portion of the window shows the type of
elements grouped in a tree format. When selected by the mouse, the "Model" section below shows all the available
primitive elements of the selected type (with a description). To insert an element into the simulation, simply drag the
element into the view port. Users can also add custom Compound Elements 1322 or Scripted Elements 1326 in to the
Element Library.

TYPE: Choose to display the type of simulation object (e.g. structures, analysis groups)
CATEGORY: Choose to only display components of a certain category (e.g. extruded polygon, photonic crystals)
KEYWORDS: The object window will only show objects that match your keyword (e.g. hemisphere, waveguide)
RESET: Sets the category to display 'all' and deletes any text in the keywords text box

2003 - 2016 Lumerical Solutions, Inc


898 Lumerical Knowledge Base

SEARCH: Activates the search for objects that match the keywords (the same function as pressing enter while in
the text box)

6.2.6 Script prompt/Output and Script editor


Scripting
The scripting language is useful for setting up custom elements and carrying out advanced data analysis. See the
scripting section in the reference guide and user guide for a list of all the script commands, as well as examples on
how to use them.

By default the script editor is located on the right hand side of the view ports and shares the same frame as the
analysis window. When both windows are open, it is possible to toggle between the two through tabs located at the
right side of the frame. The script file editor contains buttons to create, open, save and run script files. When multiple
script files are open, pressing on the run script button runs the one in the forefront. Note that when entering scripting
code in the script file editor, each command must be followed with a semicolon.

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, then any other folders in the path, and then the directory of
the script file.

By default the script prompt is located at the bottom of the CAD window. Script commands are executed as soon as
the ENTER button is pressed on the command line. If a semicolon is missing at the end of the command line, it is
automatically inserted it for you. Multiple lines can be pasted into the script prompt, and will run as in the script
editor. In this case though, only the last semicolon can be neglected.

Output
The output prompt shows the simulation progress as well as any warning/error messages in any of the elements in
the current simulation.

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 899

6.2.7 Simulation Status Bar


While the simulation is running, the simulation status bar at the bottom shows the simulation progress, elapsed
time, and estimated time left.

6.2.8 Using the schematic editor


Ports and Connections
Each element in INTERCONNECT has at least one port which can be used to connect to and from other
elements. The connections are the links between different ports. The types of connections and ports in the
INTERCONNECT schematic layout editor can be identified by their different colors and shapes. This
convention is meant to facilitate the proper usage of INTERCONNECT. For example, electrical (blue) ports can
only connect to electrical ports, output ports can only connect to input (triangle) or bidirectional (square) ports.

Ports shapes
Triangle: input/output ports
Circle: input ports to analyzers
Square: bidirectional ports

Port/Connection colors
Red: digital signals
Blue: electrical signals
Green: optical signals

Connections lines
Dotted lines: inputs to analyzers
Bold lines: connections that have been selected

2003 - 2016 Lumerical Solutions, Inc


900 Lumerical Knowledge Base

Monitoring ports
Ports are automatically "monitored" when it is connected to an analyzer. Users can also assign ports to be
monitored if it will eventually be connected to an analyzer in analysis mode. To do this, make sure the "Select

ports to monitor" button is selected and click on the port in the layout editor. Once the simulation
completes, the users can then add analyzers to this port and calculate the results without having to re-run the
simulation (see the Analyzers in analysis mode section in the Elements section below).

Insert pin
Inserting a pin in a connection allows you to drag and modify the path of the connection between the two
components. Simply right-click on a connection and select "Insert pin".

Elements
INTERCONNECT uses different colors to denote the current states of elements.

Analyzers in analysis mode


Once the simulation is complete, users can look at the results from the analyzers using the Visualizer. If the
user wishes to change the calculation parameters of the analyzer (or to add new analyzers to monitored
ports), he or she can do this without having to re-run the simulation. In this case, the analyzer will be

displayed as "orange", and the user needs to click on the "Validate all analyzers" button in order for the
analyzers to recalculate the values corresponding to the new input settings.
Run simulation.

Add new analyzer.

Validate all analyzers.

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 901

Note that the Optical Network Analyzer 958 is an exception to this since the calculation involve re-running the
scattering analysis in order to get the new frequency domain results.

Elements with errors


Elements that contain errors (ex. missing files, missing connections...etc) are displayed as "red". When the
simulation is running, the output prompt will show any warning/error messages as shown below:

Disabled Elements
Users can choose to disable elements by setting the "enabled" property to false. Disabled
elements are displayed as "gray", and the signal will simply bypass these elements. For
example, the following two simulations will give identical results.

Active Elements
When the "animate simulation" property of the Root Element is set to True, while the simulation is running,
currently running elements and threads will be highlighted.

Changing the layout


Users have control over hiding and docking location of the the windows and toolbars. The current layout is
saved when the file closes so the next time the program is opened, your previous layout will be used.

Hiding/showing windows and toolbars


There are two methods to hide or show windows and toolbars

2003 - 2016 Lumerical Solutions, Inc


902 Lumerical Knowledge Base

1) In the main title toolbar select VIEW->WINDOWS or VIEW->TOOLBARS. The visible windows/toolbars
have a check mark next to their name; the hidden ones do not.
2) By clicking the right button anywhere on the main title bar or the toolbar, the following pop up menu will
show up. As before, check marks indicate when windows and toolbars are visible.

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 indicated by a blue
void.

Moving and undocking windows


Windows can be undocked 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.
Non-view-port windows 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, tabs on the sides allow toggling between them. In the image below, the
Object Tree window is about to be docked over top of the Object Library window.

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.

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 903

6.2.9 Property Expressions


Objective
This page describes how to set property expressions which can be used to set up property dependencies between
INTERCONNECT elements. This is a powerful feature of INTERCONNECT and is essential for creating increasingly
complex photonic integrated circuits based on sub-circuit elements.

See also
Compound Elements 1322

Root Element 905

The value of an element property can be set using an expression. The expression can be a simple numerical value,
or it can be a formula using any of the parent's properties.

The user can add new properties in the Root Element, or a Compound Element's Property Editor.

Child elements can inherit properties from from parent elements. To select a property to inherit, right-click on the
property row, click on "Inherit:" and select the property to inherit from the list.

2003 - 2016 Lumerical Solutions, Inc


904 Lumerical Knowledge Base

Or the property of a parent element can be typed into the expression for the child element.

This allows for the same properties of different elements to become dependent, and changes to these properties at
higher hierarchical levels can be cascaded to lower levels. Property dependencies make it easy to create an
unrestricted number of layers of hierarchy between compound elements.

6.3 Element Library


The Element Library in INTERCONNECT includes an extensive list of pre-defined photonic integrated circuit
elements, including optical sources, measurement elements, and both passive and active optoelectronic devices. In
addition, custom PIC elements can be defined with analytic or imported s-parameter representations via Lumericals
script language or MATLAB.

There are 3 types of PIC elements supported by INTERCONNECT:

Primitive Elements 911


Pre-defined elements that are provided by INTERCONNECT's element library.

Compound Elements 1322


"Group" elements created from primitive elements.

Scripted Elements 1326


Custom elements that can be defined with analytic or imported s-parameter representations.

Custom Library & Design Kit 1331


Custom compact models that can be used for design kits.

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 905

6.3.1 Element Properties


Each element contains a set of properties that defines its functionality, they are categorized into the following types:

General
General properties that apply for all elements in INTERCONNECT.

Standard
Standard properties that are related to the main functionality of each element. The user needs to make sure the
standard element values are correspond to the desired functionality of the element.

Enhanced
Specialized properties for the element.

Polarization
Properties that define the polarization of the element.

Waveguide
Properties that characterize the waveguide modes.

Numerical
Properties of the numerical model that is required to define the element's functionality. This includes properties
associated with randomization and noise.

Simulation
Simulation properties for the element.

Display
Visualization and annotation properties for analyzer displays.

6.3.2 Root Element


All INTERCONNECT elements are contained inside the Root Element, which represents the current simulation.
Within 'Root Element', elements are listed as they are inserted by the user.

The Root Element also contains a list of global properties which all elements can inherit or break dependencies
from. By default, all elements will inherit from the global properties of the Root Element (when applicable). These
dependency relations can be added/modified by the user as described in Property Dependencies 905 . The Root
Element also functions as a Compound Element 1322 (the top-most element in the hierarchy of compound elements),
and has all the functionalities including creating parameterized group-objects by adding script code.

2003 - 2016 Lumerical Solutions, Inc


906 Lumerical Knowledge Base

Properties
General
Name Default value Default unit Value range
name Root Element - -
Defines whether or not the element is
enabled.
annotate true - [true, false]
Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines the name of the element.
type Root Element - -
Defines the element unique type (read
only).
description The top-most - -
A brief description of the elements element in the
functionality. hierarchy of
compound
elements
prefix ROOT - -
Defines the element name prefix.
source - - -
Defines whether or not the element is
flipped.
local path - - -
Defines the element rotation value.

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 907

expandable true - [true, false]


Defines whether or not the user can
access the internal elements of the
compound.

Enhanced
Name Default value Default unit Value range
monitor data save to disk - [save to
Defines whether or not to save monitor memory, save
data to memory or to disk. to disk]

monitor buffer size 64 -


The monitor memory length affects the
rate at which monitor buffers fill and
must be flushed. Although a small
buffer size requires less memory, it
increases the rate at which buffers
must be flushed.
animate simulation false - [true, false]
Defines whether or not to animate the
simulation, highlighting elements which
are currently running and their
correspondent threads.
animation delay 0.5 s
Defines an additional delay for each
element running time.

Numerical
Name Default value Default unit Value range
multithreading user defined - [automatic, user
The number of threads to be used in defined]
the calculation. If 'automatic', the
number of processor cores will be
used.

number of threads 4 -
The user defined number of threads to
be used in the calculation.

Simulation
Name Default value Default unit Value range
bitrate 2.5e+009 bits/s
The output signal bitrate.
simulation input time window - [time window,
The simulation input type. It defines the sequence
type of property used to calculate the length, sample
number of samples, sample rate and rate]
time window.
samples per bit 64 - [1, 1e+009]
The number of samples per bit.

2003 - 2016 Lumerical Solutions, Inc


908 Lumerical Knowledge Base

sequence length 16 - [1, 1e+009]


The sequence length.
time window 6.4e-009 s
The duration of the generated signal.
This is typically set by the global
properties in the root (top-most)
element.
sample rate 160e+009 Hz
The sample rate of the generated
signal. This is typically set by the
global properties in the root (top-most)
element.
number of samples 1024 - [1, 1e+009]
The number of samples.

Script
Name Default value Default unit Value range
run setup script automatic - [automatic,
Defines whether to run setup script always]
automatically or to force the setup
script to run at the beginning of the
simulation.

Validation
Name Default value Default unit Value range
check disconnected ports false - [true, false]
Defines whether or not to check for
disconnected ports and relay
connections in the circuit.
check internal monitors true - [true, false]
Defines whether or not to check for
monitors inside of compound elements.

check analyzer sensitivity false - [true, false]


Defines whether or not to check is
signal level is bellow sensitivity level.
source connections resolve - [resolve, test,
Defines how do check connections to ignore]
sources. Elements not connected to a
source by default are not included in
the simulation (resolve). To include all
elements in the simulation regardless
their connections use 'ignore' option. In
order to find out what elements are
being ignored by the simulation select
'test'.

Results
Name Description

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 909

total elapsed time The amount of time that passed between the start
and the end of a simulation.

6.3.2.1 Simulation Methodology & Tips


Using INTERCONNECT, it is trivial to carry out time domain simulations of externally modulated laser transmitters or
direct detection lightwave receivers using different modulation formats. For time domain simulations the user can set
the time window and the number of samples, which will define the signal sampling rate used in the simulation. In
order to simplify the process of estimating these parameters, one can simply define the transmitter bitrate, the
number of samples per bit and the bit sequence length. INTERCONNECT will then calculate the time window,
sample rate and the number of samples.

When setting up a simulation system, the sequence length (number of bits) and samples per bit should be large
enough to guarantee the accuracy. A longer simulation sequence length may take longer time, hence to carefully
choose the two parameters is important. The default sequence length and samples per bit are 128 and 64,
respectively; these values would suit most of the simulation cases.

The simulation time window is:

LB
t w = LB TB = (1)
BR

Where LB is the sequence length, TB is the bit period and BR is the bit rate. The simulation sample rate is:

NS / B
fs = = N S / B BR (2)
TB

Where NS/B is the number of samples per bit. The number of samples is:

N S = LB N S / B = t w f s
(3)

For analog signals, we can simply define the simulation time window as:

NS
t w = N S TS = (4)
fs

Where Ts is the sampling period. For instance, for a bit rate of 10 GBits/s, 16 bits and 64 samples per bit, the
number of samples is 1024, the time window is 1.6 ns, and the sample rate is 640 GHz. The time domain waveform
will have the following properties:

2003 - 2016 Lumerical Solutions, Inc


910 Lumerical Knowledge Base

The frequency domain information is:

Depending on the simulation input property, these parameters can be calculated automatically by INTERCONNECT

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 911

6.3.3 Primitive Elements


The primitive elements provided by the element library have been organized into the following sections:

Analyzers 914
Sequence generators 965

Pulse generators 969


Sources 995
Modulators 1027
Passives 1054
S Parameters 1083
Waveguides 1097
Amplifiers 1170
Actives 1177
Filters 1187
Polarization 1246
Receivers 1257
Photodetectors 1265
Network 1271
Math 1277
Logic 1288
Signal processing 1298
Cosimulation 1302
Tools 1311
Custom 1321

6.3.3.1 Alphabetical list of all primitive elements


The list below shows all the primitive elements in alphabetical order.

APD Photodetector 1268


Agilent ADS Export 1302
Agilent ADS Import 1304
BP Bessel Filter 1188
BP Butterworth Filter 1211
BP Chebyshev Filter 1217
BP Gaussian Filter 1193
BP RC Filter 1206
BP Rectangular Filter 1199
Bessel Optical Filter 1228
Bragg Grating 1154
Butterworth Optical Filter 1237
CW Laser 1009
Chebyshev Optical Filter 1240
Circular Polarizer 1252
DC Source 995
DM Laser 1013
Data Delay 1311
Data Recovery 1263
Digital Delay 1293
Digital Logic 1288
Digital NOT 1291
Double Bus Ring Resonator 1135
EDA Cosimulation 1310
Electrical Adder 1282
Electrical Amplifier 1170
Electrical Attenuator 1054
Electrical Constant Multiplier 1278
Electrical Delay 1057
Electrical Logic 1295

2003 - 2016 Lumerical Solutions, Inc


912 Lumerical Knowledge Base

Electrical Multiplier 1280


Electrical N Port S-Parameter 1094
Electrical NOT 1296
Eye Diagram 926
Fabry-Perot Filter 1243
Fabry-Perot Resonator 1145
Fork 1xN 1314
Gaussian Beam 1105
Gaussian Optical Filter 1231
Gaussian Pulse Generator 978
Hyperbolic Secant Pulse Generator 981
Impulse 999
Impulse Generator 975
Jitter Source 1006
LP Bessel Filter 1191
LP Butterworth Filter 1214
LP Chebyshev Filter 1219
LP Gaussian Filter 1196
LP RC Filter 1208
LP Rectangular Filter 1203
Laser TW 1177
Linear Polarizer 1248
Logic Analyzer 914
MODE Waveguide 1107
Mach Zehnder Interferometer 1149
Mach-Zehnder Modulator 1032
Mach-Zehnder Modulator Measured 1035
Mentor Graphics Eldo Export 1305
Mentor Graphics Eldo Import 1306
Microwave Loss 1059
Mode Profile Analyzer 950
Modulation Symbol Demapper 1257
Modulation Symbol Mapper 984
Multimode CW Laser 1012
Multimode Waveguide 1114
NRZ Pulse Generator 969
Network Analyzer 936
Noise Source 1000
Optical 1xN S-Parameter 1083
Optical Adder 1284
Optical Amplifier 1173
Optical Amplitude Modulator 1030
Optical Attenuator 1062
Optical Channel Analyzer 953
Optical Circulator 1078
Optical Delay 1069
Optical Fiber 1116
Optical Gaussian Pulse Generator 986
Optical Hyperbolic Secant Pulse Generator 990

Optical Isolator 1081


Optical Mirror 1071
Optical Modulator Measured 1039
Optical Modulator Scripted 1044
Optical N Port S-Parameter 1090
Optical Network Analyzer 958
Optical Noise Source 1021
Optical Oscilloscope 948
Optical Phase Shift 1065

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 913

Optical Power Meter 946


Optical Rational Resampler 1298
Optical Ring Modulator 1047
Optical S-Parameter 1086
Optical Spectrum Analyzer 943
Optical Splitter/Coupler 1076
Optical Switch 1271
Optical Y Switch 1274
Optical impulse 1019
Oscilloscope 917
PIN Photodetector 1265
PRBS Generator 965
Piecewise Linear Export 1309
Piecewise Linear Import 1308
Polarization Beam Splitter 1246
Polarization Rotator 1250
Port Converter 1313
Power Meter 923
Probe 1320
Quantizer 1260
RZ Pulse Generator 972
Ramp Source 998
Rational Resampler 1300
Read From Stream 1317
Rectangular Optical Filter 1234
Sampled Bragg Grating 1159
Scripted Optical Source 1024
Scripted Source 1004
Sine Wave 996
Single Bus Ring Resonator 1139
Spectrum Analyzer 920
Star Coupler 1127
Step Source 1003
Straight Waveguide 1097
TV LP RC Filter 1223
Termination 1319
Termination Mirror 1074
Traveling Wave Electrode 1027
VD LP RC Filter 1225
Vector Signal Analyzer 931
Waveguide Arc Bend 1162
Waveguide Coupler 1121
Waveguide Crossing 1132
Waveguide Offset 1112
Waveguide Sine Bend 1166
Waveguide Y Branch 1125
Waveplate 1255
Write To Stream 1316

6.3.3.2 Element Properties


Each element contains a set of properties that defines its functionality, they are categorized into the following types:

General
General properties that apply for all elements in INTERCONNECT.

Standard
Standard properties that are related to the main functionality of each element. The user needs to make sure the
standard element values are correspond to the desired functionality of the element.

2003 - 2016 Lumerical Solutions, Inc


914 Lumerical Knowledge Base

Enhanced
Specialized properties for the element.

Polarization
Properties that define the polarization of the element.

Waveguide
Properties that characterize the waveguide modes.

Numerical
Properties of the numerical model that is required to define the element's functionality. This includes properties
associated with randomization and noise.

Simulation
Simulation properties for the element.

Display
Visualization and annotation properties for analyzer displays.

6.3.3.3 Analyzers
Digital
Logic Analyzer 914

Electrical
Oscilloscope 917
Spectrum Analyzer 920
Power Meter 923
Eye Diagram 926
Vector Signal Analyzer 931

Network Analyzer 936

Optical
Optical Spectrum Analyzer 943
Optical Power Meter 946
Optical Oscilloscope 948
Mode Profile Analyzer 950
Optical Channel Analyzer 953
Optical Network Analyzer 958

6.3.3.3.1 Logic Analyzer

Symbol

Description
Display digital signals in time domain.

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 915

Ports
Name Type
input Digital Signal

Properties
General
Name Default value Default unit Value range
name Logic Analyzer - -
Defines the name of the element.
annotate true - [true, false]
Defines whether or not to display
annotations on the schematic editor.

enabled true - [true, false]


Defines whether or not the element is
enabled.
type Logic Analyzer - -
Defines the element unique type (read
only).
description Display digital - -
A brief description of the elements signals in time
functionality. domain

prefix LGCA - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.

Display
Name Default value Default unit Value range
refresh true - [true, false]
Defines whether or not to update
display and annotations during the
simulation.
refresh length 16 -
Defines how ofter to update the
element. This is the minimum number
of new data values available at the
element input port that will trigger the
element update.
limit display memory true - [true, false]

2003 - 2016 Lumerical Solutions, Inc


916 Lumerical Knowledge Base

Defines whether or not to limit the


number of values displayed in the
element display.
display memory length 2048 -
This is the number of data values used
to update the display and annotations
during the simulation.

Results
Name Description
digital signal The input signal waveform.
bitrate The input signal bitrate.

Implementation Details
The logic analyzer displays digital signals in time domain according to its bitrate and sequence length. For detailed
information, please see the example file Logic_Analyzer.icp, the following figure shows the system in the
example file.

There are two results can be displayed and annotated after run the simulation, the "digital signal" and the "bitrate",
respectively. Following is a figure shows the "digital signal" waveform.

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 917

6.3.3.3.2 Oscilloscope

Symbol

Description
Allows observation of constantly varying signals in time domain.

Ports
Name Type
input Electrical Signal

Properties
General
Name Default value Default unit Value range
name Oscilloscope - -
Defines the name of the element.
annotate true - [true, false]
Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type Oscilloscope - -
Defines the element unique type (read
only).
description Allows - -

2003 - 2016 Lumerical Solutions, Inc


918 Lumerical Knowledge Base

A brief description of the elements observation of


functionality. constantly
varying signals
in time domain
prefix OSC - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.

Standard
Name Default value Default unit Value range
limit time range false - [true, false]
Enables setting the time range( start/
stop) of the analysis.
start time 0 s
Time instant to start the signal
analysis.
stop time 1 s
Time instant to stop the signal
analysis.

Display
Name Default value Default unit Value range
refresh true - [true, false]
Defines whether or not to update
display and annotations during the
simulation.
refresh length 1024 -
Defines how ofter to update the
element. This is the minimum number
of new data values available at the
element input port that will trigger the
element update.
limit display memory true - [true, false]
Defines whether or not to limit the
number of values displayed in the
element display.
display memory length 2048 -
This is the number of data values used
to update the display and annotations
during the simulation.

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 919

Results
Name Description
waveform The input signal waveform.

Implementation Details
The Oscilloscope allows the observation of electrical signals' waveform in time domain. It is an analyzer thus it
measures rather than contributes to the performance of the system. Please see the example file OSC_RFSA.icp for
more information on this element. The following figure shows the system in the example file.

In the system, two sinusoidal waves with different amplitudes and frequencies are added together and connected to
an oscilloscope. The result output measured by the oscilloscope is the waveform of the input signal. The following
figure shows the output waveform visualized from the oscilloscope.

2003 - 2016 Lumerical Solutions, Inc


920 Lumerical Knowledge Base

6.3.3.3.3 Spectrum Analyzer

Symbol

Description
Measures the magnitude of an input signal versus frequency.

Ports
Name Type
input Electrical Signal

Properties
General
Name Default value Default unit Value range
name Spectrum - -
Defines the name of the element. Analyzer

annotate true - [true, false]


Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type Spectrum - -
Defines the element unique type (read Analyzer
only).
description Measures the - -
A brief description of the elements magnitude of an
functionality. input signal
versus
frequency
prefix RFSA - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.

Standard

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 921

Name Default value Default unit Value range


limit frequency range false - [true, false]
Enables setting the frequency range of
the analysis.
frequency range 1 THz*
The frequency range (bandwidth) of the
analysis. *std. unit is Hz

plot format power - [rectangular,


Defines the plot format of the analyzer power]
results.
power unit dBm - [W, dBm, W/
Defines the power unit to plot the Hz, dBm/Hz]
analyzer results.
reference level 0 dBm*
Defines the analyzer reference power
level. Intensity plots are set to zero at *std. unit is W
this point.
remove dc false - [true, false]
Defines whether or not to display the
DC component.
sensitivity -100 dBm*
The minimum detectable signal power
level. *std. unit is W

resolution disable - [disable,


Defines the type of filter used to rectangular
simulate the analyzer resolution function,
bandwidth Gaussian
function]
bandwidth 10 GHz*
Defines the resolution bandwidth.
*std. unit is Hz

limit time range false - [true, false]


Enables setting the time range( start/
stop) of the analysis.
start time 0 s
Time instant to start the signal
analysis.
stop time 1 s
Time instant to stop the signal
analysis.

Display
Name Default value Default unit Value range
refresh true - [true, false]
Defines whether or not to update
display and annotations during the
simulation.
refresh length 1024 -

2003 - 2016 Lumerical Solutions, Inc


922 Lumerical Knowledge Base

Defines how ofter to update the


element. This is the minimum number
of new data values available at the
element input port that will trigger the
element update.
limit display memory true - [true, false]
Defines whether or not to limit the
number of values displayed in the
element display.
display memory length 2048 -
This is the number of data values used
to update the display and annotations
during the simulation.

Results
Name Description
spectrum The input signal spectrum.

Implementation Details
The spectrum analyzer measures the power spectrum of the input electrical signal versus its frequency. Please see
the example file OSC_RFSA.icp for more information. The following figure shows the system in the example file.

In the system, two sinusoidal waves with different amplitudes and frequencies are added together and connected to
a spectrum analyzer. The frequencies for the two sinusoidal waves are 10 GHz and 6 GHz, respectively. Hence the
output of the spectrum analyzer should have one peak at 6 GHz and another one at 10 GHz.

There are two plot formats of the spectrum analyzer, "rectangular" and "power", respectively. The "power unit" for the
"power" plot can be "W", "dBm", "W/Hz" and "dBm/Hz". The "rectangular" plot format plots the amplitude/linear
power of the signal versus its frequency in double sidebands, while the "power" plot format plots the power of the
signal in linear and/or dB scale versus its frequency in single sideband. The following figures are the output
measured by the spectrum analyzer with different plot formats.

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 923

Fig 1. Pow er plot w ith dBm pow er unit Fig 2. Rectangular plot am plitude

Fig 3. Pow er plot w ith W pow er unit Fig 4. Rectangular plot pow er

6.3.3.3.4 Pow er Meter

Symbol

Description
Measures the average signal power.

Ports
Name Type
input Electrical Signal

Properties
General
Name Default value Default unit Value range
name Power Meter - -
Defines the name of the element.
annotate true - [true, false]
Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type Power Meter - -

2003 - 2016 Lumerical Solutions, Inc


924 Lumerical Knowledge Base

Defines the element unique type (read


only).
description Measures the - -
A brief description of the elements average signal
functionality. power

prefix PWM - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.

Standard
Name Default value Default unit Value range
input kind amplitude - [amplitude,
Defines the type of signal input. voltage, current]

impedance 1 ohm
Impedance used to simulate voltage or
current input.
power unit dBm - [W, dBm]
Defines the power unit to plot the
analyzer results.
sensitivity -100 dBm*
The minimum detectable signal power
level. *std. unit is W

limit time range false - [true, false]


Enables setting the time range( start/
stop) of the analysis.
start time 0 s
Time instant to start the signal
analysis.
stop time 1 s
Time instant to stop the signal
analysis.

Display
Name Default value Default unit Value range
refresh true - [true, false]
Defines whether or not to update
display and annotations during the
simulation.
refresh length 8192 -
Defines how ofter to update the

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 925

element. This is the minimum number


of new data values available at the
element input port that will trigger the
element update.

Results
Name Description
total power The input signal average total power (AC and DC).
ac power The input signal average AC power.
dc power The input signal average AC power.

Implementation Details
The power meter measures the average power of the input signal. Please see the example file PWM.icp for more
information on this element. The following figure shows the system in the example file.

There are two types of input signals in the system, one DC source and one AC source. The power meters measure
the average power of the two signals. The following figures show the measured results of the two electrical sources,
respectively.

2003 - 2016 Lumerical Solutions, Inc


926 Lumerical Knowledge Base

6.3.3.3.5 Eye Diagram

Symbol

Description
Allows observation and analysis of eye diagrams.

Ports
Name Type
reference Electrical Signal
input Electrical Signal

Properties

General
Name Default value Default unit Value range
name Eye Diagram - -
Defines the name of the element.
annotate true - [true, false]
Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type Eye Diagram - -
Defines the element unique type (read
only).
description Allows - -
A brief description of the elements observation and
functionality. analysis of eye
diagrams
prefix EYE - -
Defines the element name prefix.

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 927

model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.

Standard
Name Default value Default unit Value range
bit pattern input false - [true, false]
Defines whether or not to enable the bit
pattern input port. The bit pattern input
port allows for clock recovery of the
input signal.
bitrate %bitrate% bits/s
Defines the input signal bitrate.
signal reference input true - [true, false]
Defines whether or not to enable the
signal reference input port. The
reference input port allows for
automatic delay compensation of the
input signal.
eye period 1.5 bit period
The number of periods displayed in the
eye diagram.
ignore start periods 8 -
The number of consecutive bits at the
begging of the signal waveform to be
excluded from the eye diagram.
ignore end periods 8 -
The number of consecutive bits at the
end of the signal waveform to be
excluded from the eye diagram.
delay compensation automatic - [automatic, user
Defines whether or not to use the defined]
automatic delay compensation.
delay 0 s
The time delay to apply to the input
signal.
limit time range false - [true, false]
Enables setting the time range( start/
stop) of the analysis.
start time 0 s
Time instant to start the signal
analysis.
stop time 1 s
Time instant to stop the signal

2003 - 2016 Lumerical Solutions, Inc


928 Lumerical Knowledge Base

analysis.

Enhanced
Name Default value Default unit Value range
color grading true - [true, false]
Defines whether or not to enable color
grading. It allows to color code the eye
to display the frequency (histogram) at
which a certain point in the eye is
reached
binning size 500 -
The number of vertical and horizontal
bins used to calculate the histogram
required to generate the color grading.
smoothness 10 -
The number of samples used to
smooth the color grading effect. It is
equivalent to a average moving filter
applied to each signal trace.
random sampling false - [true, false]
Defines whether or not to enable
random sampling effect. It is used to
create realistic displays of measured
eye diagrams.
time unit s - [s, bit period]
Defines the time unit to plot the
analyzer results.
decision point automatic - [automatic, user
Defines whether or not to automatically defined]
determine the optimum decision point
for eye measurements.
decision instant 20e-012 s
Defines the decision instant for eye
measurements.
threshold 0 a.u.
Defines the decision amplitude for eye
measurements.
BER estimation Gaussian - [Gaussian,
Defines type of algorithm used for BER measured]
estimation.
calculate measurements false - [true, false]
Defines whether or not to calculate eye
measurements. Measurements include
'BER', 'Q factor', 'jitter', etc.
calculate graphs false - [true, false]
Defines whether or not to calculate eye
graphs. Graphs include 'min BER vs.
time', 'Q factor vs. time', etc.
eye opening tolerance 0 ratio [0, 1]

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 929

Defines whether the eye opening


tolerance, used to estimate the
calculation range where the eye is
considered open.
plot waveforms false - [true, false]
Defines whether or not to plot
waveforms. Waveforms include 'signal
input', 'signal reference', 'bit pattern',
etc.

Display
Name Default value Default unit Value range
refresh true - [true, false]
Defines whether or not to update
display and annotations during the
simulation.
refresh length 8192 -
Defines how ofter to update the
element. This is the minimum number
of new data values available at the
element input port that will trigger the
element update.
limit display memory true - [true, false]
Defines whether or not to limit the
number of values displayed in the
element display.
display memory length 2048 -
This is the number of data values used
to update the display and annotations
during the simulation.

Results
Name Description
eye diagram The eye diagram is constructed from the input
signal waveform by overlapping the parts of the
waveform corresponding to each individual bit into a
single graph with signal amplitude on the vertical
axis and time on horizontal axis.
waveform/reference The reference signal waveform used for delay
compensation of the input signal.
waveform/correlation The correlation between the input and the reference
signal waveform.
waveform/input The input signal waveform after delay
compensation.
waveform/bit pattern The digital signal after the detection of 'ones' and
'zeros' levels.
measurement/decision instant The decision instant used to calculate the eye
measurements.If 'automatic' decision point is
selected, this is the decision instant at the

2003 - 2016 Lumerical Solutions, Inc


930 Lumerical Knowledge Base

minimum BER.
measurement/threshold The threshold value used to calculate the eye
measurements.If 'automatic' decision point is
selected, this is the threshold at the minimum
BER.
measurement/level zero mean The mean value of 'zero' levels ( 0) at the measured
decision instant and threshold.
measurement/level zero sigma The standard deviation of 'zero' levels ( 0) at the
measured decision instant and threshold.
measurement/level one mean The mean value of 'one' levels ( 1) at the measured
decision instant and threshold.
measurement/level one sigma The standard deviation of 'one' levels ( 1) at the
measured decision instant and threshold.
measurement/BER The BER at the measured decision instant and
threshold.
measurement/log of BER The log of BER at the measured decision instant
and threshold.
measurement/Q factor The Q factor at the measured decision instant.
measurement/height The eye height (EH= 1- 0-3( 1- 0)) at the
measured decision instant and threshold.
measurement/amplitude The eye amplitude (EA= 1- 0)) at the measured
decision instant and threshold.
measurement/extinction ratio The extinction ratio (Er= 1/ 0) at the measured
decision instant and threshold.
measurement/opening factor The eye opening factor (EO =( 1- 0-( 1- 0))/EA) at
the measured decision instant and threshold.
measurement/width The eye width (EW = T1- T0-3( T1- T0)) at the
measured threshold.
measurement/pulse width The pulse width ( T1- T0) at the measured
threshold.
measurement/jitter RMS The RMS jitter ( T1- T0) at the measured
threshold.
measurement/peak to peak jitter The peak to peak jitter (T1max -T0min)) at the
measured threshold.
measurement/rise time The rise time ( T0[10%-90%]) at the measured
decision instant.
measurement/fall time The fall time ( T1[90%-10%]) at the measured
decision instant.
graph/threshold at min BER The threshold at the the minimum BER value vs.the
decision instant.
graph/min BER The minimum BER vs.the decision instant.
graph/min log of BER The minimum BER vs.the decision instant.

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 931

graph/Q factor The Q factor vs.the decision instant.


graph/level zero mean The mean value of 'zero' levels ( 0) vs.the decision
instant.
graph/level zero sigma The standard deviation of 'zero' levels ( 0) vs.the
decision instant.
graph/level one mean The mean value of 'one' levels ( 1) vs.the decision
instant.
graph/level one sigma The standard deviation of 'one' levels ( 1) vs.the
decision instant.
graph/height The eye height (EH) vs.the decision instant.

graph/amplitude The eye amplitude (EA) vs.the decision instant.

graph/extinction ratio The extinction ratio (Er) vs.the decision instant.

graph/opening factor The eye opening factor (EO ) vs.the decision instant.

Implementation Details
Please see Optical PAM-4 2432 in Advanced Modulation Format Transceivers 2407 for detailed information.

Please see also the example file 4PAM_Symbol_Map.icp.

6.3.3.3.6 Vector Signal Analyzer

Symbol

Description
Allows measuring of digitally modulated IQ waveforms.

Ports
Name Type
input I Electrical Signal
input Q Electrical Signal

Properties
General
Name Default value Default unit Value range
name Vector Signal - -
Defines the name of the element. Analyzer

annotate true - [true, false]


Defines whether or not to display
annotations on the schematic editor.

2003 - 2016 Lumerical Solutions, Inc


932 Lumerical Knowledge Base

enabled true - [true, false]


Defines whether or not the element is
enabled.
type Vector Signal - -
Defines the element unique type (read Analyzer
only).
description Allows - -
A brief description of the elements measuring of
functionality. digitally
modulated IQ
waveforms
prefix VSA - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.

Standard
Name Default value Default unit Value range
signal reference input false - [true, false]
Defines whether or not to enable the
signal reference input port. The
reference input port allows for
automatic delay compensation of the
input signal.
delay compensation automatic - [automatic, user
Defines whether or not to use the defined]
automatic delay compensation.
I delay 0 s
The time delay to apply to the input
signal.
Q delay 0 s
The time delay to apply to the input
signal.
constellation diagram false - [true, false]
Defines whether or not to calculate the
constellation diagram.
bitrate %bitrate% bits/s
Defines the input signal bitrate.
ignore start symbols 8 -
The number of consecutive symbols at
the begging of the signal waveform to
be excluded from the constellation
diagram.

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 933

ignore end symbols 8 -


The number of consecutive symbols at
the end of the signal waveform to be
excluded from the constellation
diagram.
decision point automatic - [automatic, user
Defines whether or not to automatically defined]
determine the decision point for the
constellation diagram.
decision instant 20e-012 s
Defines the time instant for the
constellation diagram detection
decision points.
limit time range false - [true, false]
Enables setting the time range( start/
stop) of the analysis.
start time 0 s
Time instant to start the signal
analysis.
stop time 1 s
Time instant to stop the signal
analysis.

Enhanced
Name Default value Default unit Value range
symbol map false - [true, false]
Defines whether or not to use symbol
maps for constellation diagram
analysis.
scale factor I 1 -
The scale factor for the symbol map IQ
values.
scale factor Q 1 -
The scale factor for the symbol map IQ
values.
rotation 0 rad
The rotation angle rotates the symbol
map IQ values.
normalize IQ values automatic - [disable,
Defines whether or not to normalize automatic, from
symbol IQ values to the minimum and input]
maximum reference IQ values.The error
vector magnitude measurement
depends on how the normalization is
calculated. By default the reference IQ
values are calculated from the input IQ
values, or the vector diagram. If
automatic mode is selected and the
constellation diagram is enabled, the
reference values will be taken from the

2003 - 2016 Lumerical Solutions, Inc


934 Lumerical Knowledge Base

constellation diagram IQ values. If


automatic mode is selected and the
calculate statistics is enable, the
reference values will be taken from the
mean IQ values
load map from file false - [true, false]
Defines whether or not to load IQ
values from an input file or to use the
currently stored values.
symbol map filename symbolmap.dat - -
The file containing user defined IQ
values. Refer to the Implementation
Details section for the format expected.
modulation type 2PAM - [user defined,
Defines the input signal modulation 2PAM, 4PAM,
scheme. The user can choose between 8PAM, 16PAM,
different standard modulation schemes. BPSK, QPSK,
8PSK, 8QAM,
16QAM,
32QAM,
64QAM,
128QAM,
256QAM]
symbol map table <2,2> [-1, 1, - -
The table allows the user to read or 0...]
modified a symbol map by changing
the position of one or more symbols.
color grading true - [true, false]
Defines whether or not to enable color
grading. It allows to color code the eye
to display the frequency (histogram) at
which a certain point in the eye is
reached
binning size 500 -
The number of vertical and horizontal
bins used to calculate the histogram
required to generate the color grading.
smoothness 10 -
The number of samples used to
smooth the color grading effect. It is
equivalent to a average moving filter
applied to each signal trace.
calculate statistics false - [true, false]
Defines whether or not to calculate
constellation diagram statistics.
Statistics include 'mean level I', 'mean
level Q', etc.
calculate measurements false - [true, false]
Defines whether or not to calculate
constellation diagram measurements.
Measurements include 'EVM', 'SER',
etc.

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 935

plot waveforms false - [true, false]


Defines whether or not to plot
waveforms. Waveforms include 'signal
input I' and 'signal input Q'

Display
Name Default value Default unit Value range
refresh true - [true, false]
Defines whether or not to update
display and annotations during the
simulation.
refresh length 1024 -
Defines how ofter to update the
element. This is the minimum number
of new data values available at the
element input port that will trigger the
element update.
limit display memory true - [true, false]
Defines whether or not to limit the
number of values displayed in the
element display.
display memory length 2048 -
This is the number of data values used
to update the display and annotations
during the simulation.

Results
Name Description
vector diagram The quadrature and in-phase components mapped
to the vertical and horizontal directions, also called
I-Q diagram or polar diagram.
constellation/constellation diagram The quadrature and in-phase components mapped
to the vertical and horizontal directions shown at
detection decision points.
constellation/symbol map The modulation signal symbol map.
constellation/scale factor I The normalization scale factor applied to the
symbol map.
constellation/scale factor Q The normalization scale factor applied to the
symbol map.
waveform/constellation I The input signal levels at decision instant after
delay compensation.
waveform/constellation Q The input signal levels at decision instant after
delay compensation.
waveform/input I The input signal waveform after delay
compensation.
waveform/input Q The input signal waveform after delay
compensation.

2003 - 2016 Lumerical Solutions, Inc


936 Lumerical Knowledge Base

measurement/SER The symbol error rate at the measured decision


instant.
measurement/log of SER The log of the symbol error rate at the measured
decision instant.
measurement/EVM The error vector magnitude in % at the measured
decision instant.
measurement/EVM dB The error vector magnitude in dB at the measured
decision instant.
measurement/Q factor The Q factor at the measured decision instant.
statistics/level I mean The mean value of the detected I levels.
statistics/level I sigma The standard deviation of I levels.
statistics/level Q mean The mean value of the detected Q levels.
statistics/level Q sigma The standard deviation of Q levels.
statistics/symbol map The modulation signal symbol map using IQ mean
values, with ellipses scaled by the standard
deviation of IQ values.
statistics/symbol probability The symbol probability.

Implementation Details
Please see Optical PAM-4 2432 in Advanced Modulation Format Transceivers 2407 for detailed information.

Please see also the example file 4PAM_Symbol_Map.icp.

6.3.3.3.7 Netw ork Analyzer

Symbol

Description
Performs scattering data or impulse response analysis to calculate the overall circuit under test performance.

Ports
Name Type
output Electrical Signal
input 1 Electrical Signal

Properties
General
Name Default value Default unit Value range
name Network - -
Defines the name of the element. Analyzer

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 937

annotate true - [true, false]


Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type Network - -
Defines the element unique type (read Analyzer
only).
description Performs - -
A brief description of the elements scattering data
functionality. or impulse
response
analysis to
calculate the
overall circuit
under test
performance
prefix ENA - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.

Standard
Name Default value Default unit Value range
signal source internal - [internal,
Defines whether to use an internal or external]
external signal source for stimulus.
number of input ports 1 -
Defines the number of input ports for
the element.
source kind power - [power,
Defines the kind of signal output. amplitude]

power 0 dBm*
The average output power.
*std. unit is W

amplitude 1 a.u.
The output signal peak amplitude
(before adding the bias signal).
bias 0 a.u.
The DC offset added to the amplitude
of the output signal.

2003 - 2016 Lumerical Solutions, Inc


938 Lumerical Knowledge Base

frequency range 100 GHz*


The frequency range (bandwidth) of the
analysis. *std. unit is Hz

number of points 1000 -


The number of samples points of the
output signal
delay 0 s
The time delay to apply to the output
signal.
limit time range false - [true, false]
Enables setting the time range( start/
stop) of the analysis.
start time 1 s
Time instant to start the signal
analysis.
stop time 1 s
Time instant to stop the signal
analysis.
remove dc false - [true, false]
Defines whether or not to display the
DC component.

Enhanced
Name Default value Default unit Value range
peak analysis multiple - [disable, single,
This option allows users to select the multiple, center,
type of peak analysis to perform. fixed]

number of peaks 10 -
The number of peaks for analysis,
values are truncated or inserted to
make sure the number of peaks is
constant.
peak at maximum true - [true, false]
Defines whether or not to search for
peaks located at minimum (false) or
maximum values (true)
peak threshold 10 dB
Signal power must be greater than the
power established by the peak
threshold limit. The peak threshold limit
is set by subtracting the peak
threshold value from the power of the
largest signal peak value.
peak excursion 3 dB
The peak excursion defines the rise
and fall in amplitude that must take
place in order for a peak to be
recognized.
pit excursion 7 dB

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 939

The pit excursion value is used to


determine whether or not a local
minimum in the signal is to be
considered a pit.
fwhm excursion 3 dB
The fwhm excursion defines the rise
and fall in amplitude that must take
place whdn calculating bandwidth
values.
minimum loss 200 dB
The minimum detectable transmission
loss level.
minimum angle 0.1 urad*
The minimum detectable angle value.
*std. unit is rad

sensitivity -100 dBm*


The minimum detectable signal power
level. *std. unit is W

calculate dispersion slope false - [true, false]


Defines whether or not to calculate
dispersion slope.
data export false - [true, false]
Defines whether or not to export the
calculated s-parameter to a file
(Touchstone file format).
filename sparameters.da - -
The name of the file for writing the t
output data (destination).

Numerical
Name Default value Default unit Value range
analysis type scattering data - [scattering data,
Defines the type of analysis to be impulse
performed by the element. response]

maximum number of iterations 1000 -


This determines the maximum number
of iterations required until each element
calculate its s-parameter.
stop on convergence false - [true, false]
Defines whether or not to stop when
elements finished calculating their s-
parameters or run until 'maximum
number of iterations' is reached.

Results
Name Description
input #/transmission The complex transmission vs. frequency
corresponding to the input port.

2003 - 2016 Lumerical Solutions, Inc


940 Lumerical Knowledge Base

input #/angle The angle vs. frequency corresponding to the input


port.
input #/group delay The group delay vs. frequency corresponding to the
input port.
input #/group velocity The normalized group velocity vs. frequency
corresponding to the input port.
input #/dispersion The normalized dispersion vs. frequency
corresponding to the input port.
input #/dispersion slope The normalized dispersion slope vs. frequency
corresponding to the input port.
input #/loss The loss vs. frequency corresponding to the input
port.
input #/gain The gain vs. frequency corresponding to the input
port.
input #/peak/transmission The complex transmission vs. peak frequency
corresponding to the input port. Where peak
frequency is the location of the detected peaks.
input #/peak/angle The angle vs. peak frequency corresponding to the
input port.Where peak frequency is the location of
the detected peaks.
input #/peak/group delay The group delay vs. peak frequency corresponding
to the input port. Where peak frequency is the
location of the detected peaks.
input #/peak/group velocity The normalized group velocity vs. peak frequency
corresponding to the input port. Where peak
frequency is the location of the detected peaks.
input #/peak/dispersion The normalized dispersion vs. peak frequency
corresponding to the input port. Where peak
frequency is the location of the detected peaks.
input #/peak/dispersion slope The normalized dispersion slope vs. peak frequency
corresponding to the input port. Where peak
frequency is the location of the detected peaks.
input #/peak/loss The loss vs. peak frequency corresponding to the
input port. Where peak frequency is the location of
the detected peaks.
input #/peak/gain The gain vs. peak frequency corresponding to the
input port. Where peak frequency is the location of
the detected peaks.
input #/peak/bandwidth The bandwidth vs. peak frequency corresponding to
the input port. Where peak frequency is the location
of the detected peaks.
input #/peak/free spectral range The free spectral range vs. peak frequency
corresponding to the input port. Where peak
frequency is the location of the detected peaks.
input #/peak/quality factor The quality factor vs. peak frequency corresponding
to the input port. Where peak frequency is the
location of the detected peaks.
input #/peak/finesse The finesse vs. peak frequency corresponding to
the input port. Where peak frequency is the location

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 941

of the detected peaks.


input #/peak/extinction ratio The extinction ratio vs. peak frequency
corresponding to the input port. Where peak
frequency is the location of the detected peaks.
input #/peak/frequency The peak frequency corresponding to the input port.
Where peak frequency is the location of the
detected peaks.

Implementation Details
The electrical network analyzer (ENA) is usually used to test the overall circuit performances under testing mode. It
also could export the analysis results.

Following is an example of how to export the analysis data from an electrical network analyzer, please see also the
example file ENA.icp

Make sure that the "data export" is set to be "true" and type in the file name in the same directory of the icp file. In
this example, the data exported is the s-parameter of the low-pass filter, please see the data file
data_export.s1p, following is a glance of the exported data.

2003 - 2016 Lumerical Solutions, Inc


942 Lumerical Knowledge Base

The analysis type can be selected from "scattering data" and "impulse response". With "scattering data" analysis
selected, the scattering matrix of the element is used for the calculation of the system in frequency domain; with the
"impulse response" selected, the ENA calculates the system's reaction to an impulse signal input as a function of
time. For detail information, please see INTERCONNECT Circuit Solver.

After the simulation is run, a number of measurements will be generated. To view the results, right click on the result
entry and send it to visualize.

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 943

6.3.3.3.8 Optical Spectrum Analyzer

Symbol

Description
Measures the magnitude of an input optical signal versus frequency.

Ports
Name Type
input Optical Signal

Properties
General
Name Default value Default unit Value range
name Optical - -
Defines the name of the element. Spectrum
Analyzer
annotate true - [true, false]
Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type Optical - -
Spectrum

2003 - 2016 Lumerical Solutions, Inc


944 Lumerical Knowledge Base

Defines the element unique type (read Analyzer


only).
description Measures the - -
A brief description of the elements magnitude of an
functionality. input optical
signal versus
frequency
prefix OSA - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.

Standard
Name Default value Default unit Value range
limit frequency range false - [true, false]
Enables setting the frequency range of
the analysis.
start frequency 190 THz*
The lower frequency limit of the
analysis. *std. unit is Hz

stop frequency 200 THz*


The upper frequency limit of the
analysis. *std. unit is Hz

plot kind frequency - [frequency,


This option allow users to choose to wavelength]
plot in units of frequency or wavelength.
plot format power - [rectangular,
Defines the plot format of the analyzer power]
results.
power unit dBm - [W, dBm, W/
Defines the power unit to plot the Hz, dBm/Hz]
analyzer results.
reference level 0 dBm*
Defines the analyzer reference power
level. Intensity plots are set to zero at *std. unit is W
this point.
sensitivity -100 dBm*
The minimum detectable signal power
level. *std. unit is W

resolution disable - [disable,


Defines the type of filter used to rectangular
simulate the analyzer resolution function,

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 945

bandwidth Gaussian
function]
bandwidth 10 GHz*
Defines the resolution bandwidth.
*std. unit is Hz

limit time range false - [true, false]


Enables setting the time range( start/
stop) of the analysis.
start time 0 s
Time instant to start the signal
analysis.
stop time 1 s
Time instant to stop the signal
analysis.

Display
Name Default value Default unit Value range
refresh true - [true, false]
Defines whether or not to update
display and annotations during the
simulation.
refresh length 1024 -
Defines how ofter to update the
element. This is the minimum number
of new data values available at the
element input port that will trigger the
element update.
limit display memory true - [true, false]
Defines whether or not to limit the
number of values displayed in the
element display.
display memory length 2048 -
This is the number of data values used
to update the display and annotations
during the simulation.

Results
Name Description
sum/spectrum The total input signal spectrum. Calculated by the
sum of the energy of the optical power of the
individual modes.
mode #/spectrum The signal spectrum corresponding to the individual
mode.

Implementation Details
The Optical Spectrum Analyzer measures the power spectrum of the input optical signal versus its frequency.
Please see the electrical Spectrum Analyzer 920 for more implementation details.

2003 - 2016 Lumerical Solutions, Inc


946 Lumerical Knowledge Base

6.3.3.3.9 Optical Pow er Meter

Symbol

Description
Measures average optical power.

Ports
Name Type
input Optical Signal

Properties
General
Name Default value Default unit Value range
name Optical Power - -
Defines the name of the element. Meter

annotate true - [true, false]


Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type Optical Power - -
Defines the element unique type (read Meter
only).
description Measures - -
A brief description of the elements average optical
functionality. power

prefix OPWM - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.

Standard
Name Default value Default unit Value range

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 947

power unit dBm - [W, dBm]


Defines the power unit to plot the
analyzer results.
sensitivity -100 dBm*
The minimum detectable signal power
level. *std. unit is W

limit time range false - [true, false]


Enables setting the time range( start/
stop) of the analysis.
start time 0 s
Time instant to start the signal
analysis.
stop time 1 s
Time instant to stop the signal
analysis.

Simulation
Name Default value Default unit Value range
input signal selection last - [last, index]
Input signal selection option.
input signal index 1 -
The signal index to analyzed.

Display
Name Default value Default unit Value range
refresh true - [true, false]
Defines whether or not to update
display and annotations during the
simulation.
refresh length 8192 -
Defines how ofter to update the
element. This is the minimum number
of new data values available at the
element input port that will trigger the
element update.

Results
Name Description
sum/power The total input signal average power. Calculated by
the sum of the energy of the optical power of the
individual modes.
mode #/power The signal average power corresponding to the
individual mode.

Implementation Details
The Optical Power Meter measures the average power of the input optical signals. Please see the electrical Power
Meter 923 for more implementation details.

2003 - 2016 Lumerical Solutions, Inc


948 Lumerical Knowledge Base

6.3.3.3.10 Optical Oscilloscope

Symbol

Description
Allows observation of constantly varying optical signals in time domain.

Ports
Name Type
input Optical Signal

Properties
General
Name Default value Default unit Value range
name Optical - -
Defines the name of the element. Oscilloscope

annotate true - [true, false]


Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type Optical - -
Defines the element unique type (read Oscilloscope
only).
description Allows - -
A brief description of the elements observation of
functionality. constantly
varying optical
signals in time
domain
prefix OOSC - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 949

Standard
Name Default value Default unit Value range
frequency at max power true - [true, false]
Defines whether or not to automatically
set the frequency of operation of the
element at the location of the peak with
maximum value.
frequency 193.1 THz*
Central frequency of operation.
*std. unit is Hz

plot format power - [rectangular,


Defines the plot format of the analyzer power]
results.
power unit W - [W, dBm]
Defines the power unit to plot the
analyzer results.
sensitivity -100 dBm*
The minimum detectable signal power
level. *std. unit is W

limit time range false - [true, false]


Enables setting the time range( start/
stop) of the analysis.
start time 0 s
Time instant to start the signal
analysis.
stop time 1 s
Time instant to stop the signal
analysis.

Display
Name Default value Default unit Value range
refresh true - [true, false]
Defines whether or not to update
display and annotations during the
simulation.
refresh length 1024 -
Defines how ofter to update the
element. This is the minimum number
of new data values available at the
element input port that will trigger the
element update.
limit display memory true - [true, false]
Defines whether or not to limit the
number of values displayed in the
element display.
display memory length 2048 -
This is the number of data values used
to update the display and annotations
during the simulation.

2003 - 2016 Lumerical Solutions, Inc


950 Lumerical Knowledge Base

Results
Name Description
sum/waveform The total input signal waveform. Calculated by the
sum of the energy of the optical power of the
individual modes.
mode #/waveform The signal waveform corresponding to the individual
mode.

Implementation Details
The Optical Oscilloscope allows the observation of optical signals' waveform in time domain. Please see the
electrical Oscilloscope 917 for more implementation detail information.

6.3.3.3.11 Mode Profile Analyzer

Symbol

Description
Allows observation of optical mode profiles.

Ports
Name Type
input Optical Signal

Properties
General
Name Default value Default unit Value range
name Mode Profile - -
Defines the name of the element. Analyzer

annotate true - [true, false]


Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type Mode Profile - -
Defines the element unique type (read Analyzer
only).
description Allows - -
A brief description of the elements observation of
functionality. optical mode
profiles

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 951

prefix OMPA - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.

Results
Name Description
mode #/profile The mode profile corresponding to the individual
mode.

Implementation Details
The mode profile analyzer measures and displays the mode profile of a piece of waveguide or fiber. Please see the
example file Mode_Profile_Analyzer.icp for detailed information on this element. The following figure shows
the system in the example file.

The mode profile analyzer could display the E and H model profiles on each coordinate, The following figures show
the measured mode profile for the waveguide on E and H model on X, Y Z directions and as a whole.

2003 - 2016 Lumerical Solutions, Inc


952 Lumerical Knowledge Base

Fig 1. Model E, m agnitude Fig 5. Model H, m agnitude

Fig 2. Model E, X Fig 6. Model H, X

Fig 3. Model E, Y Fig 7. Model H, Y

Fig 4. Model E, Z Fig 8. Model H, Z

Following are the plots of the E and H model of the waveguide with a "line" plot type on each coordinate and as a
whole.

Fig 9. Line plot, m agnitude Fig 10. Line plot, X

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 953

Fig 11. Line plot, Y Fig 12. Line plot, Z

6.3.3.3.12 Optical Channel Analyzer

Symbol

Description
Measure and monitor CWDM channels power and wavelength.

Ports
Name Type
input Optical Signal

Properties
General
Name Default value Default unit Value range
name Optical Channel - -
Defines the name of the element. Analyzer

annotate true - [true, false]


Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type Optical Channel - -
Defines the element unique type (read Analyzer
only).
description Measure and - -
A brief description of the elements monitor CWDM
functionality. channels power
and wavelength
prefix OCN - -
Defines the element name prefix.
model - - -

2003 - 2016 Lumerical Solutions, Inc


954 Lumerical Knowledge Base

Defines the element model name.


library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.

Standard
Name Default value Default unit Value range
signal reference input false - [true, false]
Defines whether or not to enable the
signal reference input port. The
reference port allows for measurements
of gain and noise figure by comparing
input signals from both input ports.
plot kind frequency - [frequency,
This option allow users to choose to wavelength]
plot in units of frequency or wavelength.
power unit dBm - [W, dBm]
Defines the power unit to plot the
analyzer results.
peak threshold 10 dB
Signal power must be greater than the
power established by the peak
threshold limit. The peak threshold limit
is set by subtracting the peak
threshold value from the power of the
largest signal peak value.
peak excursion 6 dB
The peak excursion defines the rise
and fall in amplitude that must take
place in order for a peak to be
recognized.
pit excursion 10 dB
The pit excursion value is used to
determine whether or not a local
minimum in the signal is to be
considered a pit.
sensitivity -100 dBm*
The minimum detectable signal power
level. *std. unit is W

bandwidth 12.5 GHz*


Defines the resolution bandwidth.
*std. unit is Hz

interpolation offset 12.5 GHz*


Defines the interpolation offset used for
determining noise. It is the offset *std. unit is Hz
applied on each side of a detected
signal peak.

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 955

limit time range false - [true, false]


Enables setting the time range( start/
stop) of the analysis.
start time 0 s
Time instant to start the signal
analysis.
stop time 1 s
Time instant to stop the signal
analysis.

Display
Name Default value Default unit Value range
refresh true - [true, false]
Defines whether or not to update
display and annotations during the
simulation.
refresh length 8192 -
Defines how ofter to update the
element. This is the minimum number
of new data values available at the
element input port that will trigger the
element update.

Results
Name Description
channels The complex transmission vs. frequency
corresponding to the input optical mode. Where
frequency is the location of the detected peaks.
signal power The list of signal powers from the input signal,
measured at each channel frequency.
noise power The list of noise powers from the input signal,
measured at each channel frequency.
OSNR The list of OSNR values from the input signal,
measured at each channel frequency.
input/signal power The list of signal powers from the input signal,
measured at each channel frequency.
input/noise power The list of noise powers, from the input signal
measured at each channel frequency.
input/OSNR The list of OSNR values from the input signal,
measured at each channel frequency.
reference/signal power The list of signal powers from the reference signal,
measured at each channel frequency.
reference/noise power The list of noise powers, from the reference signal
measured at each channel frequency.
reference/OSNR The list of OSNR values from the reference signal,
measured at each channel frequency.
gain The list of gain values calculated between the input

2003 - 2016 Lumerical Solutions, Inc


956 Lumerical Knowledge Base

and the reference signal, measured at each channel


frequency.
noise figure The list of noise figure values calculated between
the input and the reference signal, measured at
each channel frequency.

Implementation Details
The Optical Channel Analyzer measures and monitors the channels' power and wavelength/frequency for WDM
systems. It could measure not only the signal power but also the noise power in the system and hence the optical
signal to noise ratio (OSNR). It also allows a reference input, so that the gain/loss in the channels could also been
detected. Please see the example file Optical_Channel_Analyzer.icp for detailed information on this
element, the following figure shows the system in the example file.

The plot kind of the OCN can be "frequency" or "wavelength", which is the plot unit at the location where the channel
peaks detected. The power unit can be "W" or "dBm". Signal power is measured at each channel frequency. The
following figures are the measured results for a "none"/"even" Splitter with different plot kind and power unit settings.

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 957

Fig 2. Split ratio=even,


Fig 1. Split ratio=even,
plot kind=w avelength, pow er unit=W
plot kind=frequency, pow er unit=dBm

Fig 4. Split ratio=none,


Fig 3. Split ratio=none, plot kind=w avelength, pow er unit=W
plot kind=frequency, pow er unit=dBm

If enable reference input, the OCN will also detect and measure the reference signal and compare it to the input
signal to calculate the associated gain/loss. Following is an example of enabling reference input for the OCN and
taking the channel at 193.1THz as a reference. The results window is given.

2003 - 2016 Lumerical Solutions, Inc


958 Lumerical Knowledge Base

6.3.3.3.13 Optical Netw ork Analyzer

Symbol

Description
Performs scattering data or impulse response analysis to calculate the overall circuit under test performance.

Ports
Name Type
output Optical Signal
input 1 Optical Signal

Properties
General
Name Default value Default unit Value range
name Optical Network - -
Defines the name of the element. Analyzer

annotate true - [true, false]


Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type Optical Network - -
Defines the element unique type (read Analyzer
only).
description Performs - -
A brief description of the elements scattering data
functionality. or impulse
response
analysis to
calculate the
overall circuit
under test
performance
prefix ONA - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 959

local path - - -
Defines the local path or working folder
$LOCAL for the element.

Standard
Name Default value Default unit Value range
number of input ports 1 -
Defines the number of input ports for
the element.
power 0 dBm*
The average output power.
*std. unit is W

input parameter center and - [center and


Determines how the frequency range of range range, start and
the analysis is defined. stop]

center frequency 193.1 THz*


Central frequency of operation.
*std. unit is Hz

frequency range 100 GHz*


The frequency range (bandwidth) of the
analysis. *std. unit is Hz

start frequency 193.05 THz*


The lower frequency limit of the
analysis. *std. unit is Hz

stop frequency 193.15 THz*


The upper frequency limit of the
analysis. *std. unit is Hz

number of points 1000 -


The number of samples points of the
output signal
plot kind frequency - [frequency,
This option allow users to choose to wavelength]
plot in units of frequency or wavelength.
relative to center false - [true, false]
Defines whether or not to center the
plots at zero frequency or wavelength

Waveguide
Name Default value Default unit Value range
orthogonal identifier 1 -
The identifier used to track an
orthogonal mode of an optical
waveguide. For most waveguide, two
orthogonal identifiers '1' and '2' are
available (with the default labels 'TE'
and 'TM' respectively).
label X - -
The label corresponding to the

2003 - 2016 Lumerical Solutions, Inc


960 Lumerical Knowledge Base

orthogonal identifier.

Enhanced
Name Default value Default unit Value range
peak analysis multiple - [disable, single,
This option allows users to select the multiple, center,
type of peak analysis to perform. fixed]

number of peaks 10 -
The number of peaks for analysis,
values are truncated or inserted to
make sure the number of peaks is
constant.
peak at maximum true - [true, false]
Defines whether or not to search for
peaks located at minimum (false) or
maximum values (true)
peak threshold 10 dB
Signal power must be greater than the
power established by the peak
threshold limit. The peak threshold limit
is set by subtracting the peak
threshold value from the power of the
largest signal peak value.
peak excursion 3 dB
The peak excursion defines the rise
and fall in amplitude that must take
place in order for a peak to be
recognized.
pit excursion 7 dB
The pit excursion value is used to
determine whether or not a local
minimum in the signal is to be
considered a pit.
fwhm excursion 3 dB
The fwhm excursion defines the rise
and fall in amplitude that must take
place whdn calculating bandwidth
values.
minimum loss 200 dB
The minimum detectable transmission
loss level.
minimum angle 0.1 urad*
The minimum detectable angle value.
*std. unit is rad

sensitivity -100 dBm*


The minimum detectable signal power
level. *std. unit is W

calculate dispersion slope false - [true, false]


Defines whether or not to calculate
dispersion slope.

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 961

data export disable - [disable, table,


Defines whether or not to export the s parameters]
calculated s-parameter to a file.
filename sparameters.da - -
The name of the file for writing the t
output data (destination).
single mode true - [true, false]
Defines whether or not to export only
modes that match the analyzer output
mode.
append false - [true, false]
Defines whether or not to append data
to an existing file.

Numerical
Name Default value Default unit Value range
analysis type scattering data - [scattering data,
Defines the type of analysis to be impulse
performed by the element. response]

maximum number of iterations 1000 -


This determines the maximum number
of iterations required until each element
calculate its s-parameter.
stop on convergence false - [true, false]
Defines whether or not to stop when
elements finished calculating their s-
parameters or run until 'maximum
number of iterations' is reached.
multithreading user defined - [automatic, user
The number of threads to be used in defined]
the calculation. If 'automatic', the
number of processor cores will be
used.

number of threads 4 -
The user defined number of threads to
be used in the calculation.

Results
Name Description
input #/mode #/transmission The complex transmission vs. frequency
corresponding to the input optical mode.
input #/mode #/angle The angle vs. frequency corresponding to the input
optical mode.
input #/mode #/group delay The group delay vs. frequency corresponding to the
input optical mode.
input #/mode #/group velocity The normalized group velocity vs. frequency
corresponding to the input optical mode.

2003 - 2016 Lumerical Solutions, Inc


962 Lumerical Knowledge Base

input #/mode #/dispersion The normalized dispersion vs. frequency


corresponding to the input optical mode.
input #/mode #/dispersion slope The normalized dispersion slope vs. frequency
corresponding to the input optical mode.
input #/mode #/loss The loss vs. frequency corresponding to the input
optical mode.
input #/mode #/gain The gain vs. frequency corresponding to the input
optical mode.
input #/mode #/peak/transmission The complex transmission vs. peak frequency
corresponding to the input optical mode. Where
peak frequency is the location of the detected
peaks.
input #/mode #/peak/angle The angle vs. peak frequency corresponding to the
input optical mode.Where peak frequency is the
location of the detected peaks.
input #/mode #/peak/group delay The group delay vs. peak frequency corresponding
to the input optical mode. Where peak frequency is
the location of the detected peaks.
input #/mode #/peak/group velocity The normalized group velocity vs. peak frequency
corresponding to the input optical mode. Where
peak frequency is the location of the detected
peaks.
input #/mode #/peak/dispersion The normalized dispersion vs. peak frequency
corresponding to the input optical mode. Where
peak frequency is the location of the detected
peaks.
input #/mode #/peak/dispersion slope The normalized dispersion slope vs. peak frequency
corresponding to the input optical mode. Where
peak frequency is the location of the detected
peaks.
input #/mode #/peak/loss The loss vs. peak frequency corresponding to the
input optical mode. Where peak frequency is the
location of the detected peaks.
input #/mode #/peak/gain The gain vs. peak frequency corresponding to the
input optical mode. Where peak frequency is the
location of the detected peaks.
input #/mode #/peak/bandwidth The bandwidth vs. peak frequency corresponding to
the input optical mode. Where peak frequency is
the location of the detected peaks.
input #/mode #/peak/free spectral The free spectral range vs. peak frequency
range corresponding to the input optical mode. Where
peak frequency is the location of the detected
peaks.
input #/mode #/peak/quality factor The quality factor vs. peak frequency corresponding
to the input optical mode. Where peak frequency is
the location of the detected peaks.
input #/mode #/peak/finesse The finesse vs. peak frequency corresponding to
the input optical mode. Where peak frequency is
the location of the detected peaks.

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 963

input #/mode #/peak/extinction ratio The extinction ratio vs. peak frequency
corresponding to the input optical mode. Where
peak frequency is the location of the detected
peaks.
input #/peak/frequency The peak frequency corresponding to the input port.
Where peak frequency is the location of the
detected peaks.

Implementation Details
The optical network analyzer (ONA) is usually used to test the overall circuit performances under testing mode. It
also could export the analysis results.

Following is an example of how to export the analysis data from an optical network analyzer, please see also the
example file ONA.icp

Note that the export data format could be s-parameter or table. In this example, the data exported is the
measurements for the optical band-pass filter. Please see the data files ona_s_parameter and ona_table for
more information, following is a glance for the two data files.

2003 - 2016 Lumerical Solutions, Inc


964 Lumerical Knowledge Base

Fig. 1 ONA export data - sparameter Fig. 2 ONA export data - table

The analysis type can be selected from "scattering data" and "impulse response". With "scattering data" analysis
selected, the scattering matrix of the element is used for the calculation of the system in frequency domain; with the
"impulse response" selected, the ONA calculates the system's reaction to an impulse signal input as a function of
time. for more information, please see INTERCONNECT Circuit Solver. The limitation of the impulse response
calculation is that there are ripples introduced by the finite impulse filter (FIR) used. Following is a figure measured
for the gain of a Fabry-Perot filter with the "scattering data" and "impulse response" analysis type, respectively.

After the simulation is run, a number of measurements will be generated. To view the results, right click on the result
entry and send it to visualize.

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 965

6.3.3.4 Sequence generators


PRBS Generator 965

6.3.3.4.1 PRBS Generator

Symbol

Description
The pseudo-random bit sequence (PRBS) generator a maximum length sequence code using a random initial state.

Ports
Name Type
output Digital Signal

Properties
General
Name Default value Default unit Value range
name PRBS - -
Defines the name of the element. Generator

annotate true - [true, false]


Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type PRBS - -
Defines the element unique type (read Generator
only).
description The pseudo- - -
A brief description of the elements random bit

2003 - 2016 Lumerical Solutions, Inc


966 Lumerical Knowledge Base

functionality. sequence
(PRBS)
generator a
maximum
length
sequence code
using a random
initial state
prefix PRBS - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.

Standard
Name Default value Default unit Value range
bitrate %bitrate% bits/s
The output signal bitrate.
output PRBS - [PRBS, zeros,
Defines the output type or the ones, alternate,
operation mode of the generator. codeword, load
from file]
order log(%sequence - [1, 30]
The polynomial order for the PRBS length%)/log(2)
signal for 'PRBS' output type
configuration.
codeword 101010101010 - -
The user defined codeword for
'codeword' output type configuration.
measurement filename pattern.dat - -
The filename containing the bit
sequence for 'load from file' output type
configuration. Input file is formatted
without any headers and it should
contain the bit values only, one value
per line.

Numerical
Name Default value Default unit Value range
automatic seed true - [true, false]
Defines whether or not to automatically
create an unique seed value for each
instance of this element. The seed will
be the same for each simulation run.

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 967

seed 1 -
The value of the seed for the random
number generator. A value zero
recreates an unique seed for each
simulation run.

Simulation
Name Default value Default unit Value range
time window %time window s
The duration of the generated signal. %
This is typically set by the global
properties in the root (top-most)
element.

Implementation Details
The pseudo-random bit sequence generator could generate a bit stream with the format according to the setting. The
bit rate by default is inherited from the root element setting but could be re-defined by setting the bitrate
"Expression" to none. The generated sequence length could be pre-set in the root element. The following figure
shows the system in the example file PRBS.icp.

There are six formats that can be chosen from for the sequence generated. Following is the setting for the output.

2003 - 2016 Lumerical Solutions, Inc


968 Lumerical Knowledge Base

When "PRBS" is chosen, the pseudo-random bit stream is generated; "automatic seed" under the "Numerical"
setting can be set to be "true" for a random grabbing of the bit sequence seed or "false" for a desired bit sequence
seed which is pre-defined in the software. The "order" under the "Standard" setting indicates the sequence length in
the power of 2.

When "zeros" or "ones" are chosen for the output, a sequence of 0s/1s are generated. When "alternate" is chosen,
a bit stream of alternated 0s and 1s are generated starting from the bit 0.

When "codeword" is chosen, the "codeword" setting is enabled, user can directly type in the bit sequence in the
setting frame. However, when the number of bits defined in the "codeword" is less than the sequence length setting
in the root element, the bit stream will repeat itself until the number of bits reaches the setting sequence length;
when the number of bits defined in the "codeword" is larger than the sequence length setting, the bit sequence will
be truncated at the setting length.

When "load from file" is chosen, a data file can be input to the system. Please see the example data file
pattern.dat for more information. Note that the length of the bit stream in the file will be adjusted the same way
as in the "codeword" to fit the sequence length.

The following figure is plotted by the Logic Analyzer LGCA_1, when the output is set to "PRBS". For more
information of the Logic Analyzer, please see the element library page Logic Analyzer 914 .

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 969

6.3.3.5 Pulse generators


Electrical
NRZ Pulse Generator 969
RZ Pulse Generator 972
Impulse Generator 975
Gaussian Pulse Generator 978
Hyperbolic Secant Pulse Generator 981

Modulation Symbol Mapper 984

Optical
Optical Gaussian Pulse Generator 986
Optical Hyperbolic Secant Pulse Generator 990

6.3.3.5.1 NRZ Pulse Generator

Symbol

Description
The NRZ Generator pulse generator creates a sequence of non-return to zero pulses coded by an input digital signal.

Ports
Name Type
modulation Digital Signal
output Electrical Signal

Properties
General
Name Default value Default unit Value range

2003 - 2016 Lumerical Solutions, Inc


970 Lumerical Knowledge Base

name NRZ Pulse - -


Defines the name of the element. Generator

annotate true - [true, false]


Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type NRZ Pulse - -
Defines the element unique type (read Generator
only).
description The NRZ - -
A brief description of the elements Generator pulse
functionality. generator
creates a
sequence of
non-return to
zero pulses
coded by an
input digital
signal
prefix NRZ - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.

Standard
Name Default value Default unit Value range
amplitude 1 a.u.
The output signal peak amplitude
(before adding the bias signal).
bias 0 a.u.
The DC offset added to the amplitude
of the output signal.
rise period 0.05 - (0, 1]
The ratio of the bit period required for
the response to rise from 10% to 90%
of its final value.
fall period 0.05 - (0, 1]
The ratio of the bit period required for
the response to fall from 90% to 10%
of its final value.

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 971

Enhanced
Name Default value Default unit Value range
pre emphasis false - [true, false]
Defines whether or not to use pre-
emphasis.
overshoot factor 0 -
The overshoot factor to be added to the
signal.
overshoot period 0 - (0, 1]
The duration of the overshoot as the
ratio of the bit period.
undershoot factor 0 -
The undershoot factor to be subtracted
from the signal.

undershoot period 0 - (0, 1]


The duration of the undershoot as the
ratio of the bit period.

Implementation Details
The non-return to zero (NRZ) pulse generator shapes the input digital signal to a NRZ electrical signal. Following is
the simple system in the example file NRZ_Pulse_Generator.icp.

The setting table of the NRZ pulse generator is shown below, all the parameters are defined in the property table
above.

2003 - 2016 Lumerical Solutions, Inc


972 Lumerical Knowledge Base

Following is the output plotted by the oscilloscope with the parameters indicated in the figure.

6.3.3.5.2 RZ Pulse Generator

Symbol

Description
The RZ Generator pulse generator creates a sequence of return to zero pulses coded by an input digital signal.

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 973

Ports
Name Type
modulation Digital Signal
output Electrical Signal

Properties
General
Name Default value Default unit Value range
name RZ Pulse - -
Defines the name of the element. Generator

annotate true - [true, false]


Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type RZ Pulse - -
Defines the element unique type (read Generator
only).
description The RZ - -
A brief description of the elements Generator pulse
functionality. generator
creates a
sequence of
return to zero
pulses coded
by an input
digital signal
prefix RZ - -
Defines the element name prefix.

model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.

Standard
Name Default value Default unit Value range
amplitude 1 a.u.
The output signal peak amplitude
(before adding the bias signal).
bias 0 a.u.
The DC offset added to the amplitude

2003 - 2016 Lumerical Solutions, Inc


974 Lumerical Knowledge Base

of the output signal.


duty cycle 0.5 - (0, 1]
The pulse duration or the bit period
fraction of the signal in the '1' state.
rise period 0.05 - (0, 1]
The ratio of the bit period required for
the response to rise from 10% to 90%
of its final value.
fall period 0.05 - (0, 1]
The ratio of the bit period required for
the response to fall from 90% to 10%
of its final value.

Enhanced
Name Default value Default unit Value range

pre emphasis false - [true, false]


Defines whether or not to use pre-
emphasis.
overshoot factor 0 -
The overshoot factor to be added to the
signal.
overshoot period 0 - (0, 1]
The duration of the overshoot as the
ratio of the bit period.
undershoot factor 0 -
The undershoot factor to be subtracted
from the signal.
undershoot period 0 - (0, 1]
The duration of the undershoot as the
ratio of the bit period.

Implementation Details
The return to zero (RZ) pulse generator shapes the input digital signal to a RZ electrical signal. Following is the
simple system in the example file RZ_Pulse_Generator.icp.

The setting table of the RZ pulse generator is shown below, all the parameters are defined in the property table
above.

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 975

The pre-emphasis has the same definition as in the NRZ pulse generator. For more information on the effects of pre-
emphasis, please see the NRZ Pulase Generator 969 element example.

Following is the output plotted by the oscilloscope with the parameters indicated in the figure.

6.3.3.5.3 Impulse Generator

Symbol

2003 - 2016 Lumerical Solutions, Inc


976 Lumerical Knowledge Base

Description
The impulse generator creates a sequence of impulses coded by an input digital signal.

Ports
Name Type
modulation Digital Signal
output Electrical Signal

Properties
General
Name Default value Default unit Value range

name Impulse - -
Defines the name of the element. Generator

annotate true - [true, false]


Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type Impulse - -
Defines the element unique type (read Generator
only).
description The impulse - -
A brief description of the elements generator
functionality. creates a
sequence of
impulses coded
by an input
digital signal

prefix IMPG - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.

Standard
Name Default value Default unit Value range
amplitude 1 a.u.
The output signal peak amplitude

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 977

(before adding the bias signal).


bias 0 a.u.
The DC offset added to the amplitude
of the output signal.
position 0.25 - [0, 1]
The bit period fraction that defines the
location of the pulse inside of the bit
frame.

Implementation Details
The impulse generator shapes the input digital signal to an electrical impulse signal output. Following is the simple
system in the example file Impulse_Generator.icp.

The setting table of the impulse generator is shown below, the position of the impulse defines where the impulse sit
in the bit time window. All the parameters are defined in the property table above.

Following is the output plotted by the oscilloscope with the parameters indicated in the figure.

2003 - 2016 Lumerical Solutions, Inc


978 Lumerical Knowledge Base

6.3.3.5.4 Gaussian Pulse Generator

Symbol

Description
The Gaussian pulse generator creates a sequence of pulses coded by an input digital signal.

Ports
Name Type
modulation Digital Signal
output Electrical Signal

Properties
General
Name Default value Default unit Value range

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 979

name Gaussian Pulse - -


Defines the name of the element. Generator

annotate true - [true, false]


Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type Gaussian Pulse - -
Defines the element unique type (read Generator
only).
description The Gaussian - -
A brief description of the elements pulse generator
functionality. creates a
sequence of
pulses coded
by an input
digital signal
prefix GAUSS - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.

Standard
Name Default value Default unit Value range
amplitude 1 a.u.
The output signal peak amplitude
(before adding the bias signal).
bias 0 a.u.
The DC offset added to the amplitude
of the output signal.
width 0.25 - (0, 1]
The pulse duration of the pulse full
width at half maximum, defined as ratio
of bit period.
order 1 -
Order of Gaussian function.

Numerical
Name Default value Default unit Value range
number of pulse overlaps 1 -

2003 - 2016 Lumerical Solutions, Inc


980 Lumerical Knowledge Base

For pulse shapes with long tails, this


determines how many pulse overlaps
are allowed (ie. how much to truncate
the pulses by).

Implementation Details
The Gaussian pulse generator shapes the input digital signal to an electrical Gaussian signal output. Following is
the simple system in the example file Guassin_Pulse_Generator.icp.

The setting table of the Gaussian pulse generator is shown below, all the parameters are defined in the property
table above.

Following is the output plotted by the oscilloscope with the parameters indicated in the figure.

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 981

6.3.3.5.5 Hyperboilc Secant Pulse Generator

Symbol

Description
The hyperbolic secant pulse generator creates a sequence of pulses coded by an input digital signal.

Ports
Name Type
modulation Digital Signal
output Electrical Signal

Properties
General
Name Default value Default unit Value range
name Hyperbolic - -

2003 - 2016 Lumerical Solutions, Inc


982 Lumerical Knowledge Base

Defines the name of the element. Secant Pulse


Generator
annotate true - [true, false]
Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type Hyperbolic - -
Defines the element unique type (read Secant Pulse
only). Generator

description The hyperbolic - -


A brief description of the elements secant pulse
functionality. generator
creates a
sequence of
pulses coded
by an input
digital signal
prefix SECH - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.

Standard
Name Default value Default unit Value range

amplitude 1 a.u.
The output signal peak amplitude
(before adding the bias signal).
bias 0 a.u.
The DC offset added to the amplitude
of the output signal.
width 0.25 - (0, 1]
The pulse duration of the pulse full
width at half maximum, defined as ratio
of bit period.

Numerical
Name Default value Default unit Value range
number of pulse overlaps 1 -
For pulse shapes with long tails, this
determines how many pulse overlaps

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 983

are allowed (ie. how much to truncate


the pulses by).

Implementation Details
The hyperbolic secant pulse generator shapes the input digital signal to an electrical hyperbolic secant signal
output. Following is the simple system in the example file Hyperbolic_Secant_Pulse_Generator.icp.

The setting table of the hyperbolic secant pulse generator is shown below, all the parameters are defined in the
property table above.

Following is the output plotted by the oscilloscope with the parameters indicated in the figure.

2003 - 2016 Lumerical Solutions, Inc


984 Lumerical Knowledge Base

6.3.3.5.6 Modulation Symbol Mapper

Symbol

Description
The symbol mapper takes consecutive bits and maps them to appropriate constellation points.

Ports
Name Type
modulation Digital Signal
output I Electrical Signal
output Q Electrical Signal

Properties
General
Name Default value Default unit Value range

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 985

name Modulation - -
Defines the name of the element. Symbol Mapper

annotate true - [true, false]


Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type Modulation - -
Defines the element unique type (read Symbol Mapper
only).
description The symbol - -
A brief description of the elements mapper takes
functionality. consecutive
bits and maps
them to
appropriate
constellation
points
prefix MAP - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.

Standard
Name Default value Default unit Value range
load map from file false - [true, false]
Defines whether or not to load IQ
values from an input file or to use the
currently stored values.
symbol map filename - - -
The file containing user defined IQ
values. Refer to the Implementation
Details section for the format expected.
modulation type 2PAM - [user defined,
Defines the input signal modulation 2PAM, 4PAM,
scheme. The user can choose between 8PAM, 16PAM,
different standard modulation schemes. BPSK, QPSK,
8PSK, 8QAM,
16QAM,
32QAM,
64QAM,
128QAM,
256QAM]

2003 - 2016 Lumerical Solutions, Inc


986 Lumerical Knowledge Base

symbol map table <2,2> [-1, 1, - -


The table allows the user to read or 0...]
modified a symbol map by changing
the position of one or more symbols.
scale factor I 1 -
The output signal scale factor.
scale factor Q 1 -
The output signal scale factor.
bias 0 a.u.
The DC offset added to the amplitude
of the output signal.
rotation 0 rad
The rotation angle rotates the output IQ
values
rise period 0.05 - (0, 1]
The ratio of the bit period required for
the response to rise from 10% to 90%
of its final value.
fall period 0.05 - (0, 1]
The ratio of the bit period required for
the response to fall from 90% to 10%
of its final value.

Implementation Details
Please see Optical PAM-4 2432 in Advanced Modulation Format Transceivers 2407 for detailed information.

Please see also the example file 4PAM_Symbol_Map.icp.

6.3.3.5.7 Optical Gaussian Pulse Generator

Symbol

Description
The Gaussian pulse generator creates a sequence of optical pulses modulated by an input digital signal.

Ports
Name Type
modulation Digital Signal
output Optical Signal

Properties
General
Name Default value Default unit Value range

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 987

name Optical - -
Defines the name of the element. Gaussian Pulse
Generator
annotate true - [true, false]
Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type Optical - -
Defines the element unique type (read Gaussian Pulse
only). Generator

description The Gaussian - -


A brief description of the elements pulse generator
functionality. creates a
sequence of
optical pulses
modulated by
an input digital
signal
prefix GAUSS - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.

Standard
Name Default value Default unit Value range
frequency 193.1 THz*
Central frequency of operation.
*std. unit is Hz

power 0 dBm*
The average output power.
*std. unit is W

width 0.25 - (0, 1]


The pulse duration of the pulse full
width at half maximum, defined as ratio
of bit period.
order 1 -
Order of Gaussian function.
chirp 0 -
Pulse chirp factor.
phase 0 rad
The initial output signal phase.

2003 - 2016 Lumerical Solutions, Inc


988 Lumerical Knowledge Base

Polarization
Name Default value Default unit Value range
azimuth 0 rad [-1.5708,
The azimuth angle (polarization ellipse) 1.5708]
of the signal output.
ellipticity 0 rad [-0.785398,
The ellipticity angle (polarization 0.785398]
ellipse) of the signal output.

Waveguide/Mode 1
Name Default value Default unit Value range
orthogonal identifier 1 1 -
The first identifier used to track an
orthogonal mode of an optical
waveguide. For most waveguide, two
orthogonal identifiers '1' and '2' are
available (with the default labels 'TE'
and 'TM' respectively).
label 1 X - -
The label corresponding to the first
orthogonal identifier.

Waveguide/Mode 2
Name Default value Default unit Value range
orthogonal identifier 2 2 -
The second identifier used to track an
orthogonal mode of an optical
waveguide. For most waveguide, two
orthogonal identifiers '1' and '2' are
available (with the default labels 'TE'
and 'TM' respectively).

label 2 Y - -
The label corresponding to the second
orthogonal identifier.

Numerical
Name Default value Default unit Value range
number of pulse overlaps 1 -
For pulse shapes with long tails, this
determines how many pulse overlaps
are allowed (ie. how much to truncate
the pulses by).

Implementation Details
The optical Gaussian pulse generator is an optical Gaussian pulse shapper which takes in the digital signal and
outputs Gaussian optical pulses. Following is the simple system in the example file
Optical_Gaussian_Pulse_Generator.icp.

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 989

The setting table of the optical Gaussian pulse generator is shown below, all the parameters are defined in the
properties table above. Please see the Gaussian optical filter 1231 for more information on the effects of the "order"
and "chirp" of the Gaussian pulse shapping.

Following are the output plotted by the optical oscilloscope with different chirp settings indicated in the figures, for
the phase and waveform of the signal, respectively.

2003 - 2016 Lumerical Solutions, Inc


990 Lumerical Knowledge Base

Phase Waveform

The following figure is the optical signal spectrum plotted by the OSA, for different chirp settings in the system.

6.3.3.5.8 Optical Hyperbolic Secant Pulse Generator

Symbol

Description

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 991

The hyperbolic secant pulse generator creates a sequence of optical pulses modulated by an input digital signal.

Ports
Name Type
modulation Digital Signal
output Optical Signal

Properties
General
Name Default value Default unit Value range
name Optical - -
Defines the name of the element. Hyperbolic
Secant Pulse
Generator
annotate true - [true, false]
Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type Optical - -
Defines the element unique type (read Hyperbolic
only). Secant Pulse
Generator
description The hyperbolic - -
A brief description of the elements secant pulse
functionality. generator
creates a
sequence of
optical pulses
modulated by
an input digital
signal
prefix SECH - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.

Standard
Name Default value Default unit Value range

2003 - 2016 Lumerical Solutions, Inc


992 Lumerical Knowledge Base

frequency 193.1 THz*


Central frequency of operation.
*std. unit is Hz

power 0 dBm*
The average output power.
*std. unit is W

width 0.25 - (0, 1]


The pulse duration of the pulse full
width at half maximum, defined as ratio
of bit period.
chirp 0 -
Pulse chirp factor.
phase 0 rad
The initial output signal phase.

Polarization
Name Default value Default unit Value range
azimuth 0 rad [-1.5708,
The azimuth angle (polarization ellipse) 1.5708]
of the signal output.
ellipticity 0 rad [-0.785398,
The ellipticity angle (polarization 0.785398]
ellipse) of the signal output.

Waveguide/Mode 1
Name Default value Default unit Value range
orthogonal identifier 1 1 -
The first identifier used to track an
orthogonal mode of an optical
waveguide. For most waveguide, two
orthogonal identifiers '1' and '2' are
available (with the default labels 'TE'
and 'TM' respectively).
label 1 X - -
The label corresponding to the first
orthogonal identifier.

Waveguide/Mode 2
Name Default value Default unit Value range
orthogonal identifier 2 2 -
The second identifier used to track an
orthogonal mode of an optical
waveguide. For most waveguide, two
orthogonal identifiers '1' and '2' are
available (with the default labels 'TE'
and 'TM' respectively).
label 2 Y - -
The label corresponding to the second
orthogonal identifier.

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 993

Numerical
Name Default value Default unit Value range
number of pulse overlaps 1 -
For pulse shapes with long tails, this
determines how many pulse overlaps
are allowed (ie. how much to truncate
the pulses by).

Implementation Details
The optical hyperbolic secant pulse generator is an optical hyperbolic secant pulse shapper which takes in the
digital signal and outputs hyperbolic secant optical pulses. Following is the simple system in the example file
Optical_Hyperbolic_Secant_Pulse_Generator.icp.

The setting table of the optical hyperbolic secant pulse generator is shown below, all the parameters are defined in
the properties table above.

2003 - 2016 Lumerical Solutions, Inc


994 Lumerical Knowledge Base

Following are the output plotted by the optical oscilloscope with different chirp settings indicated in the figures, for
the phase and waveform of the signal, respectively.

Phase Waveform

The following figure is the optical signal spectrum plotted by the OSA, for different chirp settings in the system.

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 995

6.3.3.6 Sources
Electrical
DC Source 995
Sine Wave 996
Ramp Source 998
Impulse 999
Noise Source 1000
Step Source 1003
Scripted Source 1004
Jitter Source 1006

Optical
CW Laser 1009
Multimode CW Laser 1012
DM Laser 1013
Optical Impulse 1019
Optical Noise Source 1021
Scripted Optical Source 1024

6.3.3.6.1 DC Source

Symbol

Description
DC source.

Ports

2003 - 2016 Lumerical Solutions, Inc


996 Lumerical Knowledge Base

Name Type
output Electrical Signal

Properties

General
Name Default value Default unit Value range
name DC Source - -
Defines the name of the element.
annotate true - [true, false]
Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type DC Source - -
Defines the element unique type (read
only).
description DC source - -
A brief description of the elements
functionality.
prefix DC - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.

Standard
Name Default value Default unit Value range
amplitude 0 a.u.
The output signal amplitude.

6.3.3.6.2 Sine Wave

Symbol

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 997

Description
The sine wave creates a electrical sine wave signal.

Ports
Name Type
output Electrical Signal

Properties
General
Name Default value Default unit Value range
name Sine Wave - -
Defines the name of the element.

annotate true - [true, false]


Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type Sine Wave - -
Defines the element unique type (read
only).
description The sine wave - -
A brief description of the elements creates a
functionality. electrical sine
wave signal
prefix SINE - -
Defines the element name prefix.
model - - -
Defines the element model name.

library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.

Standard
Name Default value Default unit Value range
amplitude 1 a.u.
The output signal peak amplitude
(before adding the bias signal).
bias 0 a.u.
The DC offset added to the amplitude
of the output signal.

2003 - 2016 Lumerical Solutions, Inc


998 Lumerical Knowledge Base

frequency 10 GHz*
The output signal frequency.
*std. unit is Hz

phase 0 rad
The initial output signal phase.

6.3.3.6.3 Ramp Source

Symbol

Description
Ramp source.

Ports
Name Type
output Electrical Signal

Properties
General
Name Default value Default unit Value range
name Ramp Source - -
Defines the name of the element.
annotate true - [true, false]
Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type Ramp Source - -
Defines the element unique type (read
only).
description Ramp source - -
A brief description of the elements
functionality.
prefix RAMP - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 999

local path - - -
Defines the local path or working folder
$LOCAL for the element.

Standard
Name Default value Default unit Value range
slope 1 (a.u.)/s
Defines the steepness of the output
signal.
bias 0 a.u.
The DC offset added to the amplitude
of the output signal.
saturation 1000 a.u.
The limit of the maximum output signal
level.
delay 0 s
The time delay to apply to the output
signal.

6.3.3.6.4 Impulse

Symbol

Description
The model generates a single impulse.

Ports
Name Type
output Electrical Signal

Properties
General
Name Default value Default unit Value range
name Impulse - -
Defines the name of the element.
annotate true - [true, false]
Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is

2003 - 2016 Lumerical Solutions, Inc


1000 Lumerical Knowledge Base

enabled.
type Impulse - -
Defines the element unique type (read
only).
description The model - -
A brief description of the elements generates a
functionality. single impulse

prefix IMP - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.

Standard
Name Default value Default unit Value range
amplitude 1 a.u.
The output signal peak amplitude
(before adding the bias signal).
bias 0 a.u.
The DC offset added to the amplitude
of the output signal.
delay 0 s
The time delay to apply to the output
signal.

6.3.3.6.5 Noise Source

Symbol

Description
The model generates Gaussian-distributed white noise.

Ports
Name Type
output Electrical Signal

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1001

Properties

General
Name Default value Default unit Value range

name Noise Source - -


Defines the name of the element.
annotate true - [true, false]
Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type Noise Source - -
Defines the element unique type (read
only).
description The model - -
A brief description of the elements generates
functionality. Gaussian-
distributed
white noise
prefix NOISE - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.

Standard
Name Default value Default unit Value range
power spectral density 10e-018 W/Hz
The output signal power spectral
density.

Numerical
Name Default value Default unit Value range
automatic seed true - [true, false]
Defines whether or not to automatically
create an unique seed value for each
instance of this element. The seed will
be the same for each simulation run.
seed 1 -
The value of the seed for the random
number generator. A value zero

2003 - 2016 Lumerical Solutions, Inc


1002 Lumerical Knowledge Base

recreates an unique seed for each


simulation run.

Implementation Details
The Noise Source generates wide bandwidth Gaussian-distributed white noise. Please see the example file
electrical_noise_source.icp for more information on this element. The following figure shows the system in
the example file:

The standard property "power spectral density" (PSD) defines the strength of the noise that distributed in the
frequency domain. The following figures show the waveform and spectrum of the noise with the PSD equals 1e-17 W/
Hz and 1e-16 W/Hz, respectively.

Fig 1. Waveform Fig 2. Waveform

Fig 3. Spectrum Fig 4. Spectrum

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1003

6.3.3.6.6 Step Source

Symbol

Description
The model generates a single step pulse.

Ports
Name Type
output Electrical Signal

Properties
General
Name Default value Default unit Value range
name Step Source - -
Defines the name of the element.
annotate true - [true, false]
Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type Step Source - -
Defines the element unique type (read
only).

description The model - -


A brief description of the elements generates a
functionality. single step
pulse
prefix STEP - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.

Standard

2003 - 2016 Lumerical Solutions, Inc


1004 Lumerical Knowledge Base

Name Default value Default unit Value range


amplitude 1 a.u.
The output signal peak amplitude
(before adding the bias signal).
bias 0 a.u.
The DC offset added to the amplitude
of the output signal.
delay 0 s
The time delay to apply to the output
signal.

6.3.3.6.7 Scripted Source

Symbol

Description
User defined scripted source.

Ports
Name Type
output Electrical Signal

Properties
General
Name Default value Default unit Value range
name Scripted - -
Defines the name of the element. Source

annotate true - [true, false]


Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type Scripted - -
Defines the element unique type (read Source
only).
description User defined - -
A brief description of the elements scripted source
functionality.
prefix SRC - -

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1005

Defines the element name prefix.


model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.

Standard
Name Default value Default unit Value range
script OUTPUT=sin(2* - -
User defined script. pi*1e9*TIME);

Implementation Details
The script source is a user defined electrical source, the definition is written by script language, please see the
example file Scripted_Source.icp for more information.

In this example, two simple sinusoidal functions are used to define the optical source, following is the oscilloscope
output waveforms.

2003 - 2016 Lumerical Solutions, Inc


1006 Lumerical Knowledge Base

Fig. 1 OSC output waveform

6.3.3.6.8 Jitter Source

Symbol

Description
Adds random and deterministic jitter to the output signal.

Ports
Name Type
input Electrical Signal
output Electrical Signal

Properties
General
Name Default value Default unit Value range
name Jitter Source - -
Defines the name of the element.

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1007

annotate true - [true, false]


Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type Jitter Source - -
Defines the element unique type (read
only).
description Adds random - -
A brief description of the elements and
functionality. deterministic
jitter to the
output signal
prefix JITTER - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.

Standard
Name Default value Default unit Value range
period 1.0 / %bitrate% s
For a digital signal, the time value
equivalent to one bit period.
jitter frequency 0.1 * %bitrate% Hz
The jitter frequency, typically a sub-
rate of the clock frequency.
deterministic jitter 0 UI [0, 1]
The level of deterministic jitter as a
fraction of one period. The deterministic
jitter has a sinusoidal form.
random jitter 0 UI [0, 1]
The level of jitter, as a fraction of the
period, that is not bounded and
described by a Gaussian probability
distribution.

Numerical
Name Default value Default unit Value range
automatic seed true - [true, false]
Defines whether or not to automatically
create an unique seed value for each

2003 - 2016 Lumerical Solutions, Inc


1008 Lumerical Knowledge Base

instance of this element. The seed will


be the same for each simulation run.
seed 1 -
The value of the seed for the random
number generator. A value zero
recreates an unique seed for each
simulation run.

Implementation Details
Jitter is the variation of the true periodicity to a presumed periodic signal. The Jitter Source element adds
deterministic and/or random jitter to the output signal. Please see the example file jitter_source.icp for the
detailed performance of this element. The following figure shows the system in the example file:

There are two types of jitter modeled in this element; the random jitter, also known as the Gaussian jitter, which is
the unpredictable time noise; the deterministic jitter, which is predictable and reproducible. The total jitter is the
combination of these two. The setting of the deterministic jitter and the random jitter is the level of the jitter as a
fraction of one jitter period, which take the value in the range [0, 1]. The effects of these two types of jitter and the
combination effect are shown in the following figures, the figures measure the eye diagram of the system in the
example.

Fig 1. Eye diagram w ith no jitter Fig 2. Eye diagram w ith 0.01 determ inistic jitter

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1009

Fig 3. Eye diagram w ith 0.01 random jitter Fig 4. Eye diagram w ith the com bination of 0.01
determ inistic jitter and 0.01 random jitter

6.3.3.6.9 CW Laser

Symbol

Description
The CW laser model generates a continuous wave (CW) optical signal.

Ports
Name Type
output Optical Signal

Properties
General
Name Default value Default unit Value range
name CW Laser - -
Defines the name of the element.
annotate true - [true, false]
Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type CW Laser - -
Defines the element unique type (read
only).
description The CW laser - -
A brief description of the elements model
functionality. generates a
continuous
wave (CW)
optical signal

2003 - 2016 Lumerical Solutions, Inc


1010 Lumerical Knowledge Base

prefix CWL - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.

Standard
Name Default value Default unit Value range
frequency 193.1 THz*
Central frequency of operation.
*std. unit is Hz

power 0 dBm*
The average output power.
*std. unit is W

linewidth 0 MHz*
The output signal spectral linewidth.
*std. unit is Hz

phase 0 rad
The initial output signal phase.

Polarization
Name Default value Default unit Value range
azimuth 0 rad [-1.5708,
The azimuth angle (polarization ellipse) 1.5708]
of the signal output.
ellipticity 0 rad [-0.785398,
The ellipticity angle (polarization 0.785398]
ellipse) of the signal output.

Waveguide/Mode 1
Name Default value Default unit Value range
orthogonal identifier 1 1 -
The first identifier used to track an
orthogonal mode of an optical
waveguide. For most waveguide, two
orthogonal identifiers '1' and '2' are
available (with the default labels 'TE'
and 'TM' respectively).
label 1 X - -
The label corresponding to the first
orthogonal identifier.

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1011

Waveguide/Mode 2
Name Default value Default unit Value range
orthogonal identifier 2 2 -
The second identifier used to track an
orthogonal mode of an optical
waveguide. For most waveguide, two
orthogonal identifiers '1' and '2' are
available (with the default labels 'TE'
and 'TM' respectively).
label 2 Y - -
The label corresponding to the second
orthogonal identifier.

Enhanced
Name Default value Default unit Value range

enable RIN false - [true, false]


Defines whether or not to add RIN to
the signal output.
RIN -140 dB/Hz
Defines the RIN at the reference power.
reference power 0 dBm*
Reference power at which RIN was
calculated. *std. unit is W

Numerical
Name Default value Default unit Value range
automatic seed true - [true, false]
Defines whether or not to automatically
create an unique seed value for each
instance of this element. The seed will
be the same for each simulation run.
seed 1 -
The value of the seed for the random
number generator. A value zero
recreates an unique seed for each
simulation run.

Implementation Details
The state of polarization (SOP) of the CW Laser model is defined by using the polarization ellipse as shown in Fig.
1, where is the ellipticity angle and is the azimuth angle, a and b are the major and minor axis of the ellipse,
respectively. Then the unified Stokes Parameters are defined by Equation. 1.

2003 - 2016 Lumerical Solutions, Inc


1012 Lumerical Knowledge Base

Equation. 1. Stokes param eters

6.3.3.6.10 Multimode CW Laser

Symbol

Description
The CW source model generates a multimode signal, composed by a set of continuous wave (CW) orthogonal
optical signals.

Ports
Name Type
output Optical Signal

Properties
General
Name Default value Default unit Value range
name Multimode CW - -
Defines the name of the element. Laser

annotate true - [true, false]


Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type Multimode CW - -
Defines the element unique type (read Laser
only).

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1013

description The CW source - -


A brief description of the elements model
functionality. generates a
multimode
signal,
composed by a
set of
continuous
wave (CW)
orthogonal
optical signals
prefix MMCW - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.

Standard
Name Default value Default unit Value range
frequency 193.1 THz*
Central frequency of operation.
*std. unit is Hz

power 0 dBm*
The average output power.
*std. unit is W

phase 0 rad
The initial output signal phase.
orthogonal identifier and power <2,2> [1, 2, - -
ratio 0.5...]
A matrix editor that allow users to input
the label (column 1) and power ratio
(column 2) corresponding to each
orthogonal identifier.

6.3.3.6.11 DM Laser

Symbol

Description

2003 - 2016 Lumerical Solutions, Inc


1014 Lumerical Knowledge Base

The model of a laser directly modulated by the electrical current.

Ports
Name Type
modulation Electrical Signal
output Optical Signal

Properties
General
Name Default value Default unit Value range
name DM Laser - -
Defines the name of the element.

annotate true - [true, false]


Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type DM Laser - -
Defines the element unique type (read
only).
description The model of a - -
A brief description of the elements laser directly
functionality. modulated by
the electrical
current
prefix DML - -
Defines the element name prefix.
model - - -
Defines the element model name.

library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.

Standard
Name Default value Default unit Value range
frequency 193.1 THz*
Central frequency of operation.
*std. unit is Hz

total quantum efficiency 0.4 - (0, 1]


Defines the total quantum efficiency 0.

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1015

active volume 0.15e-015 m^3


Defines the active volume Va.

Polarization
Name Default value Default unit Value range
azimuth 0 rad [-1.5708,
The azimuth angle (polarization ellipse) 1.5708]
of the signal output.
ellipticity 0 rad [-0.785398,
The ellipticity angle (polarization 0.785398]
ellipse) of the signal output.

Waveguide
Name Default value Default unit Value range

group index 3.526970094 -


Defines the waveguide group index.
mode confinement factor 0.4 - (0, 1]
Defines the mode confinement factor .
spontaneous emission factor 30e-006 -
Defines the spontaneous emission
coupling factor .
photon lifetime 3e-012 s
Defines the photon lifetime p.

Waveguide/Mode 1
Name Default value Default unit Value range
orthogonal identifier 1 1 -
The first identifier used to track an
orthogonal mode of an optical
waveguide. For most waveguide, two
orthogonal identifiers '1' and '2' are
available (with the default labels 'TE'
and 'TM' respectively).
label 1 X - -
The label corresponding to the first
orthogonal identifier.

Waveguide/Mode 2
Name Default value Default unit Value range
orthogonal identifier 2 2 -
The second identifier used to track an
orthogonal mode of an optical
waveguide. For most waveguide, two
orthogonal identifiers '1' and '2' are
available (with the default labels 'TE'
and 'TM' respectively).

2003 - 2016 Lumerical Solutions, Inc


1016 Lumerical Knowledge Base

label 2 Y - -
The label corresponding to the second
orthogonal identifier.

Waveguide/Recombination Coefficient
Name Default value Default unit Value range
carrier lifetime 1e-009 s
Defines the carrier lifetime n.

Waveguide/Gain
Name Default value Default unit Value range
gain compression factor 10e-024 m^3
Defines the gain compression factor ?.

gain coefficient 25e-021 m^2


Defines the gain coefficient a0.

carrier density at transparency 1e+024 m^-3


Defines the carrier density at
transparency n0.

Waveguide/Spontaneous Emission
Name Default value Default unit Value range
linewidth enhancement factor 5 -
Defines the linewidth enhancement
factor .

Numerical
Name Default value Default unit Value range
calculate noise false - [true, false]
Defines whether or not to include noise
in the rate equation model. It 'true',
laser RIN and linewidth will be enabled.
number of steps 2 -
The number of steps the ODE solver
will take for each time step.
automatic seed true - [true, false]
Defines whether or not to automatically
create an unique seed value for each
instance of this element. The seed will
be the same for each simulation run.
seed 1 -
The value of the seed for the random
number generator. A value zero
recreates an unique seed for each
simulation run.

Implementation Details

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1017

The Directly Modulated Laser (DML) model is based on reference [1]. The laser is directly modulated by electrical
current. Parameters listed in the following table follows equation (1) to (6) [1].

0 total quantum efficiency vg group velocity

spontaneous emission coupling factor linewidth enhancement factor


n carrier lifetime mode confinement factor

gain suppression factor p photon lifetime

n0 carrier density at transparency Va active volume

a0 gain coefficient

dp p b Gn (1)
= GG (n - n0 ) p - +
dt tp tn

dn I (t ) n (2)
= - G (n - n0 ) p -
dt qVa tn

df 1 1 (3)
= a {Gvg a0 (n - n0 ) - }
dt 2 tp

G = vg a0 /(1 + ep ) (4)

m(t ) = 0.5 p (t )Vah0 hv /( G t p ) (5)

1 df (6)
Dv(t ) =
2 p dt

where n and p are the electron and photon densities in the laser active region, and G are the optical phase and
gain, and m and v defines for the optical power time variations and laser chirp, respectively.

The Relative Intensity Noise (RIN) for this model is defined based on the Langevin formulation, and please refer to
Reference [2] for the detailed implementation of the photon (Fp), electron (Fn) and phase (F?) noises.

The state of polarization (SOP) of the DM Laser model is defined by using the polarization ellipse as shown in Fig. 1,
where is the ellipticity angle and is the azimuth angle, a and b are the major and minor axis of the ellipse,
respectively. Then the unified Stokes Parameters are defined by Equation. 7.

2003 - 2016 Lumerical Solutions, Inc


1018 Lumerical Knowledge Base

Equation. 7. Stokes param eters

Please see the example file DM_Laser.icp for more information on this element. The following figure shows the
system in the example file:

The following figure plots the waveforms monitored by the oscilloscope and the optical oscilloscope.

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1019

References
[1] J.C. Cartledge and G.S. Burley, "The Effect of Laser Chirping on Lightwave System Performance," JLT Vol 7,
No. 3, 568-573 (1989)
[2] G .P. Agrawal, N.K. Dutta, Semiconductor Laser, Van Nostrad Reinhold, New York, 1993.

6.3.3.6.12 Optical Impulse

Symbol

Description
The model generates a single impulse.

Ports
Name Type
output Optical Signal

Properties
General
Name Default value Default unit Value range
name Optical impulse - -
Defines the name of the element.
annotate true - [true, false]
Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]

2003 - 2016 Lumerical Solutions, Inc


1020 Lumerical Knowledge Base

Defines whether or not the element is


enabled.
type Optical impulse - -
Defines the element unique type (read
only).
description The model - -
A brief description of the elements generates a
functionality. single impulse

prefix IMP - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.

Standard
Name Default value Default unit Value range
frequency 193.1 THz*
Central frequency of operation.
*std. unit is Hz

power 0 dBm*
The average output power.
*std. unit is W

phase 0 rad
The initial output signal phase.
delay 0 s
The time delay to apply to the output
signal.

Polarization
Name Default value Default unit Value range
azimuth 0 rad [-1.5708,
The azimuth angle (polarization ellipse) 1.5708]
of the signal output.
ellipticity 0 rad [-0.785398,
The ellipticity angle (polarization 0.785398]
ellipse) of the signal output.

Waveguide/Mode 1
Name Default value Default unit Value range
orthogonal identifier 1 1 -
The first identifier used to track an
orthogonal mode of an optical

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1021

waveguide. For most waveguide, two


orthogonal identifiers '1' and '2' are
available (with the default labels 'TE'
and 'TM' respectively).
label 1 X - -
The label corresponding to the first
orthogonal identifier.

Waveguide/Mode 2
Name Default value Default unit Value range
orthogonal identifier 2 2 -
The second identifier used to track an
orthogonal mode of an optical
waveguide. For most waveguide, two
orthogonal identifiers '1' and '2' are
available (with the default labels 'TE'
and 'TM' respectively).
label 2 Y - -
The label corresponding to the second
orthogonal identifier.

Implementation Details
The state of polarization (SOP) of the CW Laser model is defined by using the polarization ellipse as shown in Fig.
1, where the angle is the ellipticity angle and is the azimuth, b and a are the minor and major axis of the ellipse,
respectively. Then the unified Stokes Parameters are defined by Equation. 1.

Equation. 1. Stokes param eters

6.3.3.6.13 Optical Noise Source

Symbol

2003 - 2016 Lumerical Solutions, Inc


1022 Lumerical Knowledge Base

Description
The model generates Gaussian-distributed optical white noise.

Ports
Name Type
output Optical Signal

Properties
General
Name Default value Default unit Value range
name Optical Noise - -
Defines the name of the element. Source

annotate true - [true, false]


Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type Optical Noise - -
Defines the element unique type (read Source
only).
description The model - -
A brief description of the elements generates
functionality. Gaussian-
distributed
optical white
noise
prefix NOISE - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.

Standard
Name Default value Default unit Value range
frequency 193.1 THz*
Central frequency of operation.
*std. unit is Hz

power spectral density 10e-018 W/Hz


The output signal power spectral
density.

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1023

Waveguide/Mode 1
Name Default value Default unit Value range
orthogonal identifier 1 1 -
The first identifier used to track an
orthogonal mode of an optical
waveguide. For most waveguide, two
orthogonal identifiers '1' and '2' are
available (with the default labels 'TE'
and 'TM' respectively).
label 1 X - -
The label corresponding to the first
orthogonal identifier.

Waveguide/Mode 2
Name Default value Default unit Value range
orthogonal identifier 2 2 -
The second identifier used to track an
orthogonal mode of an optical
waveguide. For most waveguide, two
orthogonal identifiers '1' and '2' are
available (with the default labels 'TE'
and 'TM' respectively).
label 2 Y - -
The label corresponding to the second
orthogonal identifier.

Numerical
Name Default value Default unit Value range
automatic seed true - [true, false]
Defines whether or not to automatically
create an unique seed value for each
instance of this element. The seed will
be the same for each simulation run.
seed 1 -
The value of the seed for the random
number generator. A value zero
recreates an unique seed for each
simulation run.

Implementation Details
The Optical Noise Source generates wide bandwidth Gaussian-distributed white noise. Please see the example file
optical_noise_source.icp for more information on this element. The following figure shows the system in the
example file:

2003 - 2016 Lumerical Solutions, Inc


1024 Lumerical Knowledge Base

The standard property "power spectral density" (PSD) defines the strength of the noise that distributed in the
frequency domain. The following figures show the waveform and spectrum of the noise with the PSD equals 1e-17 W/
Hz and 1e-16 W/Hz, respectively.

Fig 1. Waveform Fig 2. Waveform

Fig 3. Spectrum Fig 4. Spectrum

6.3.3.6.14 Scripted Optical Source

Symbol

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1025

Description
User defined optical source.

Ports
Name Type
output Optical Signal

Properties
General
Name Default value Default unit Value range
name Scripted - -
Defines the name of the element. Optical Source

annotate true - [true, false]


Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type Scripted - -
Defines the element unique type (read Optical Source
only).
description User defined - -
A brief description of the elements optical source
functionality.
prefix SOURCE - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.

Standard
Name Default value Default unit Value range
frequency 193.1 THz*
Central frequency of operation.
*std. unit is Hz

script OUTPUT=sin(2* - -
User defined script. pi*1e9*TIME);

Waveguide/Mode 1

2003 - 2016 Lumerical Solutions, Inc


1026 Lumerical Knowledge Base

Name Default value Default unit Value range


orthogonal identifier 1 -
The first identifier used to track an
orthogonal mode of an optical
waveguide. For most waveguide, two
orthogonal identifiers '1' and '2' are
available (with the default labels 'TE'
and 'TM' respectively).
label X - -
The label corresponding to the first
orthogonal identifier.

Implementation Details
The script optical source is a user defined optical source, the definition is written by script language, please see the
example file Script_Optical_Source.icp for more information.

In this example, two simple sinusoidal functions are used to define the optical source, following is the optical
oscilloscope output waveforms.

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1027

Fig. 1 OOSC output waveform

6.3.3.7 Modulators
Optical
Traveling Wave Electrode 1027
Optical Amplitude Modulator 1030
Mach-Zehnder Modulator 1032
Mach-Zehnder Modulator Measured 1035

Optical Modulator Measured 1039


Optical Modulator Scripted 1044
Optical Ring Modulator 1047

6.3.3.7.1 Traveling Wave Electrode

Symbol

Description
Traveling wave electrode transmission line filter.

Ports
Name Type

2003 - 2016 Lumerical Solutions, Inc


1028 Lumerical Knowledge Base

input Electrical Signal


output Electrical Signal

Properties

General
Name Default value Default unit Value range
name Traveling Wave - -
Defines the name of the element. Electrode

annotate true - [true, false]


Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type Traveling Wave - -
Defines the element unique type (read Electrode
only).
description Traveling wave - -
A brief description of the elements electrode
functionality. transmission
line filter
prefix TW - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.

Standard
Name Default value Default unit Value range
length 0.01 m
The interaction length of the modulator.
microwave loss 0 dB/m
Defines the microwave electrode loss.
loss type constant - [constant,
Defines if the loss is constant or linear, square
frequency dependent. Frequency root]
dependency can be linear (~1/f) or
square root [~1/sqrt(f)]
loss reference frequency 1 Hz
Central frequency of operation.

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1029

microwave index 4 -
Defines the the microwave effective
index.
optical index 3 -
Defines the waveguide effective index.
source resistance 50 ohm
Defines the source resistance.
source reactance 0 ohm
Defines the source reactance.
characteristic resistance 50 ohm
Defines the characteristic resistance.
characteristic reactance 0 ohm
Defines the characteristic reactance.
terminating resistance 50 ohm
Defines the terminating resistance.
terminating reactance 0 ohm
Defines the terminating reactance.
junction resistance 0 ohm.m
Defines the junction resistance.
junction capacitance type constant - [constant, table]
Defines if the junction capacitance is
constant or voltage dependent.
constant junction capacitance 0 F/m
Defines the junction capacitance.

Standard/Table
Name Default value Default unit Value range
load junction capacitance from false - [true, false]
file
Defines whether or not to load
measurements from an input file or to
use the currently stored values.
junction capacitance filename - - -
The file containing the measurement
data. Refer to the Implementation
Details section for the format expected.
junction capacitance table <30,2> [-3, - - -
A matrix editor for users to read the 2.896551724, -
element current data values (read 2.793103448...]
only).

Numerical
Name Default value Default unit Value range
time variant digital filter interpolate - [interpolate,
Defines the operation of the internal update]
time varying digital filter.

2003 - 2016 Lumerical Solutions, Inc


1030 Lumerical Knowledge Base

window function rectangular - [rectangular,


Defines the window type for the digital hamming,
filter. hanning]

number of taps 64 -
Defines the number of coefficient for
digital filter.

Diagnostic
Name Default value Default unit Value range
run diagnostic false - [true, false]
Enables the frequency response of the
designed filter implementation and the
ideal frequency response to be
generated as results.

diagnostic size 1024 -


The number of frequency points used
when calculating the filter frequency
response.
stop frequency 50e+009 Hz
The upper frequency limit for the
calculated graph.

Results
Name Description
diagnostic/normalized average voltage The normalized average voltage vs. frequency.
diagnostic/response #/transmission The complex transmission vs. frequency
corresponding to the ideal and designed filter.
diagnostic/response #/gain The gain vs. frequency corresponding to the ideal
and designed filter.
diagnostic/response #/error Mean square error comparing the frequency
response of the designed filter implementation with
the ideal frequency response.

Implementation Details
For the implementation details of traveling wave electrode, please see the application example Traveling Wave
Modulators 2454 for more information.

6.3.3.7.2 Optical Amplitude Modulator

Symbol

Description
modulates an optical signal depending on electrical signal.

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1031

Ports
Name Type
input Optical Signal
modulation Electrical Signal
output Optical Signal

Properties
General
Name Default value Default unit Value range
name Optical - -
Defines the name of the element. Amplitude
Modulator
annotate true - [true, false]
Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type Optical - -
Defines the element unique type (read Amplitude
only). Modulator

description modulates an - -
A brief description of the elements optical signal
functionality. depending on
electrical signal
prefix AM - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.

Standard
Name Default value Default unit Value range
modulation index 1 - [0, 1]
Defines the modulation index of the
modulator.

Implementation Details
The amplitude modulator (AM) modulates the amplitude of the carrier (optical signal) in proportion to the strength of

2003 - 2016 Lumerical Solutions, Inc


1032 Lumerical Knowledge Base

the electrical signal. Please see the example file AM.icp for more information. The system in the example file
demonstrates the working principle of the AM. The second figure is the parameter setting window of the AM.

The key character of AM is the modulation index. The modulation index is defined by how much the modulated
M
h=
variable varies around its un-modulated level, P , where M is the modulation power and P is the carrier power.
The figure below shows modulated signals when the modulation index is 1 and 0.5.

M M - M min
h= = max
Pcarrier Pcarrier
The modulation index is calculated by the equation .

6.3.3.7.3 Mach-Zehnder Modulator

Symbol

Description
modulates an optical signal depending on electrical signal.

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1033

Ports
Name Type
input Optical Signal
modulation 1 Electrical Signal
modulation 2 Electrical Signal
output Optical Signal

Properties
General
Name Default value Default unit Value range
name Mach-Zehnder - -
Defines the name of the element. Modulator

annotate true - [true, false]


Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type Mach-Zehnder - -
Defines the element unique type (read Modulator
only).
description modulates an - -
A brief description of the elements optical signal
functionality. depending on
electrical signal
prefix MZM - -
Defines the element name prefix.
model - - -
Defines the element model name.

library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.

Standard
Name Default value Default unit Value range
modulator type dual drive - [dual drive,
Defines whether the modulator is a balanced single
single drive or a dual drive modulator. drive,
unbalanced
single drive]
dc bias source internal - [internal,
Defines whether to use an internal or external]

2003 - 2016 Lumerical Solutions, Inc


1034 Lumerical Knowledge Base

external source for bias voltage.


bias voltage 1 0 V
The bias voltage for the first arm of the
modulator.
bias voltage 2 2 V
The bias voltage for the second arm of
the modulator.
pi dc voltage 4 V
Defines the modulator V DC voltage.
pi rf voltage 4 V
Defines the modulator V AC voltage.
extinction ratio 30 dB
Defines the extinction ratio.
insertion loss 6 dB
Defines the insertion loss (attenuation).
phase shift 0 rad
Lower arm additional phase shift.

Diagnostic
Name Default value Default unit Value range
run diagnostic false - [true, false]
Enables the frequency response of the
designed filter implementation and the
ideal frequency response to be
generated as results.
start voltage 1 0 V
The lower voltage limit for the
calculated graph.
stop voltage 1 8 V
The upper voltage limit for the
calculated graph.

number of points 1 200 -


The number of points of the calculated
graph
start voltage 2 0 V
The lower voltage limit for the
calculated graph.
stop voltage 2 8 V
The upper voltage limit for the
calculated graph.
number of points 2 200 -
The number of points of the calculated
graph

Results
Name Description

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1035

diagnostic/power The normalized intensity vs. voltage at port 1 and


port 2.
diagnostic/angle The angle vs. voltage at port 1 and port 2.

Implementation Details
For the implementation details of traveling wave electrode, please see the application example PIN Mach-Zehnder 2228

for more information.

References
See for the following reference for a description of the standard properties of the MZM:

[1] J.C. Cartledge, C. Rolland, S. Lemerle, A. Solheim, "Theoretical performance of 10 Gb/s Lightwave Systems
using a III-V Semiconductor Mach-Zehnder Modulator," IEEE PTL Vol 6, No. 2, 282-284 (1994)
[2] J.C. Cartledge, "Performance of 10 Gb/s Lightwave Systems Based on Lithium Niobate Mach-Zehnder
Modulators with Asymmetric Y-Branch WAveguides," IEEE PTL Vol 7, No. 9, 1090-1092 (1995)

6.3.3.7.4 Mach-Zehnder Modulator Measured

Symbol

Description
modulates an optical signal depending on electrical signal.

Ports
Name Type
input Optical Signal
modulation 1 Electrical Signal
modulation 2 Electrical Signal
output Optical Signal

Properties
General
Name Default value Default unit Value range
name Mach-Zehnder - -
Defines the name of the element. Modulator
Measured
annotate true - [true, false]
Defines whether or not to display
annotations on the schematic editor.

2003 - 2016 Lumerical Solutions, Inc


1036 Lumerical Knowledge Base

enabled true - [true, false]


Defines whether or not the element is
enabled.
type Mach-Zehnder - -
Defines the element unique type (read Modulator
only). Measured

description modulates an - -
A brief description of the elements optical signal
functionality. depending on
electrical signal
prefix MZM - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.

Standard
Name Default value Default unit Value range
frequency 193.1 THz*
Central frequency of operation.
*std. unit is Hz

length 1 m
The interaction length of the modulator.
splitting ratio 1.3 -
The Y-branch power splitting ratio P1/
P2.

phase shift 3.141592654 rad


0 radians for a conventional modulator
and radians for a phase-shift
modulator.
input parameter table - [table,
Defines whether the input parameter is coefficients]
a table with voltage dependent values
or coefficients of a polynomial function.

Standard/Table
Name Default value Default unit Value range
load from file false - [true, false]
Defines whether or not to load
measurements from an input file or to
use the currently stored values.
measurement filename - - -

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1037

The file containing the measurement


data. Refer to the Implementation
Details section for the format expected.
measurement type effective index - [absorption &
Defines the type of measurement data. phase, effective
index]
measurement <11,3> [-5, - - -
A matrix editor for users to read the 4.5, -4...]
element current modulation data values
(read only).

Standard/Coefficients
Name Default value Default unit Value range
absorption coefficient a -0.0617 dB/V^3/m
The polynomial coefficient for the
absorption function.
absorption coefficient b -0.2804 dB/V^2/m
The polynomial coefficient for the
absorption function.
absorption coefficient c -0.6635 dB/V/m
The polynomial coefficient for the
absorption function.
absorption coefficient d -0.0719 dB/m
The polynomial coefficient for the
absorption function.
phase coefficient a -0.0038 rad/V^3/m
The polynomial coefficient for the
phase function.
phase coefficient b 0.1132 rad/V^2/m
The polynomial coefficient for the
phase function.
phase coefficient c -0.4825 rad/V/m
The polynomial coefficient for the
phase function.
phase coefficient d -0.0107 rad/m
The polynomial coefficient for the
phase function.

Implementation Details
The working principle of Mach-Zehnder modulator (MZM) measured is the same as the MZM while it requires an
input measurement file to define the modulator's characteristic. The measurement file is usually generated by other
application tools such as DEVICE or MODE. The input file measurement type can be selected as "absorption &
phase" or "effective index". Please see example file MZM_Measured.icp.

2003 - 2016 Lumerical Solutions, Inc


1038 Lumerical Knowledge Base

If 'absorption & phase' is selected under measurement type, the file format is:

(voltage absorption phase)


-5.0 4.03632 5.68178
-4.5 2.77182 4.84456
-4.0 1.96181 3.99819
-3.5 1.44273 3.21548
-3.0 1.13272 2.51455
-2.5 0.88636 1.93182
-2.0 0.67634 1.45818
-1.5 0.4664 1.0209
-1.0 0.292739 0.601803
-0.5 0.13727 0.21909
0.0 0.0 0.0
Please see the example file abs_phase_voltage.dat. Please note that, the unit for the 'absorption' coefficient is
dB/m and the unit for the 'phase' coefficient is rad/m.

If 'effective index' is selected under measurement type, the file format is:

(voltage real(neff) imag(neff))


-5 1.40392e-6 1.14823e-7
-4.5 1.19705e-6 7.88514e-8
-4 9.8792e-7 5.58086e-8
-3.5 7.94519e-7 4.10421e-8
-3 6.21325e-7 3.22231e-8
-2.5 4.77337e-7 2.52147e-8
-2 3.60305e-7 1.92402e-8
-1.5 2.52256e-7 1.32679e-8
-1 1.48701e-7 8.3277e-9
-0.5 5.41354e-8 3.90499e-9
0 0 0

Please see the example file effective_index.txt

In this example, the characteristics of the MZM can be visualized by analyzers, following are the analyzers' output to

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1039

measure the system.

Fig. 1 Optical Oscilloscope Output Fig. 2 Optical Spectrum Analyzer Output

References

See for the following reference for a description of the standard properties of the MZM:

[1] J.C. Cartledge, "Combing Self-Phase Modulation and Optimum Modulation Conditions to Improve the
Performance of 10 Gb/s Transmission Systems Using MQW Mach-Zehnder Modulators," JLT Vol 18, No. 5, 647-655
(2000)

6.3.3.7.5 Optical Modulator Measured

Symbol

Description
modulates an optical signal depending on electrical signal.

Ports
Name Type
port 1 Optical Signal
modulation Electrical Signal
port 2 Optical Signal

Properties
General
Name Default value Default unit Value range
name Optical - -
Defines the name of the element. Modulator
Measured
annotate true - [true, false]

2003 - 2016 Lumerical Solutions, Inc


1040 Lumerical Knowledge Base

Defines whether or not to display


annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type Optical - -
Defines the element unique type (read Modulator
only). Measured

description modulates an - -
A brief description of the elements optical signal
functionality. depending on
electrical signal
prefix OM - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.

Standard
Name Default value Default unit Value range
frequency 193.1 THz*
Central frequency of operation.
*std. unit is Hz

length 1 m
The interaction length of the modulator.
input parameter table - [table,
Defines whether the input parameter is coefficients]
a table with voltage dependent values
or coefficients of a polynomial function.

Standard/Table
Name Default value Default unit Value range
load from file false - [true, false]
Defines whether or not to load
measurements from an input file or to
use the currently stored values.
measurement filename - - -
The file containing the measurement
data. Refer to the Implementation
Details section for the format expected.
measurement type effective index - [absorption &
Defines the type of measurement data. phase, effective
index]

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1041

measurement <11,3> [-5, - - -


A matrix editor for users to read the 4.5, -4...]
element current modulation data values
(read only).

Standard/Coefficients
Name Default value Default unit Value range
absorption coefficient a -0.0617 dB/V^3/m
The polynomial coefficient for the
absorption function.
absorption coefficient b -0.2804 dB/V^2/m
The polynomial coefficient for the
absorption function.
absorption coefficient c -0.6635 dB/V/m
The polynomial coefficient for the
absorption function.
absorption coefficient d -0.0719 dB/m
The polynomial coefficient for the
absorption function.
phase coefficient a -0.0038 rad/V^3/m
The polynomial coefficient for the
phase function.
phase coefficient b 0.1132 rad/V^2/m
The polynomial coefficient for the
phase function.
phase coefficient c -0.4825 rad/V/m
The polynomial coefficient for the
phase function.
phase coefficient d -0.0107 rad/m
The polynomial coefficient for the
phase function.

Waveguide
Name Default value Default unit Value range
modes TE,TM - -
List of optical mode labels supported
by the element.

Enhanced
Name Default value Default unit Value range
electrode type lumped - [lumped,
Defines the electrode type. Types traveling wave]
include 'lumped' or 'traveling wave'.
microwave loss 0 dB/m
Defines the microwave electrode loss.
microwave index 3 -
Defines the the microwave effective

2003 - 2016 Lumerical Solutions, Inc


1042 Lumerical Knowledge Base

index.
optical index 3 -
Defines the waveguide effective index.
impedance mismatch false - [true, false]
Defines whether or not to include
impedance mismatch effect.
source impedance 50 ohm
Defines the source impedance.
characteristic impedance 50 ohm
Defines the characteristic impedance.
terminating impedance 50 ohm
Defines the terminating impedance.

Numerical
Name Default value Default unit Value range
number of steps 30 -
The number of discretization steps for
the waveguide.

Implementation Details
The working principle of the optical modulator (OM) measured is the same as the normal phase modulator, while it
requires some user input information to define the modulator's characteristic. Please see the example file
OM_Measured.icp.

When the "input parameter" under the "Standard" category is set to "coefficient", the absorption coefficients and
phase coefficients can be entered under the "Coefficients" category.

When the "input parameter" is set to be "table", input measurement file is required. The measurement type of the
table can be set to be "absorption & phase" or "effective index".

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1043

If 'absorption & phase' is selected under measurement type, the file format is:

(voltage(a.u.) absorption(dB/m) phase(rad/m))


-5.0 4.03632 5.67270
-4.5 2.77182 4.84456
-4.0 1.96181 3.99819
-3.5 1.44273 3.21548
-3.0 1.13272 2.51455
-2.5 0.88636 1.93182
-2.0 0.67634 1.45819
-1.5 0.46636 1.02092
-1.0 0.29273 0.60180
-0.5 0.13727 0.21909
0.0 0.0 0.0

Please see the example file abs_phase.dat. Please note that, the unit for the 'absorption' coefficient is dB/m and
the unit for the 'phase' coefficient is rad/m.

If 'effective index' is selected under measurement type, the file format is:

(voltage(a.u.) real(neff) imag(neff))


-5 1.40392e-6 1.14823e-7
-4.5 1.19705e-6 7.88514e-8
-4 9.8792e-7 5.58086e-8
-3.5 7.94519e-7 4.10421e-8
-3 6.21325e-7 3.22231e-8
-2.5 4.77337e-7 2.52147e-8
-2 3.60305e-7 1.92402e-8
-1.5 2.52256e-7 1.32679e-8
-1 1.48701e-7 8.3277e-9
-0.5 5.41354e-8 3.90499e-9
0 0 0
Please see the example file effective_index.txt

2003 - 2016 Lumerical Solutions, Inc


1044 Lumerical Knowledge Base

In this example, the characteristics of the OM can be visualized by analyzers, following are the analyzers' output to
measure the system.

Fig. 1 Optical oscilloscope output for "coefficients" Fig. 2 Optical spectrum analyzer output for
input parameter "coefficients" input parameter

Fig. 3 Optical oscilloscope output for "table" input Fig. 4 Optical spectrum analyzer output for "table"
parameter input parameter

NOTE: It is important to note that while the modulator and source give the
appearance of an electro-optic modulator, the modulator input can represent any
scalar value that affects the material index of the waveguide and therefore the
effective index of its guiding mode. Hence, the modulating signal could just as
well represent temperature as in a silicon waveguide with heater.

6.3.3.7.6 Optical Modulator Scripted

Symbol

Description
modulates an optical signal depending on electrical signal.

Ports
Name Type
port 1 Optical Signal
modulation Electrical Signal

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1045

port 2 Optical Signal

Properties

General
Name Default value Default unit Value range
name Optical - -
Defines the name of the element. Modulator
Scripted
annotate true - [true, false]
Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type Optical - -
Defines the element unique type (read Modulator
only). Scripted

description modulates an - -
A brief description of the elements optical signal
functionality. depending on
electrical signal
prefix OM - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.

Standard
Name Default value Default unit Value range
frequency 193.1 THz*
Central frequency of operation.
*std. unit is Hz

length 1 m
The interaction length of the modulator.
script ANGLE = - -
User defined script. 2*pi;LOSS=0.1;

Waveguide
Name Default value Default unit Value range
modes TE,TM - -

2003 - 2016 Lumerical Solutions, Inc


1046 Lumerical Knowledge Base

List of optical mode labels supported


by the element.

Implementation Details
The optical modulator (OM) script is a modulator whose characteristics are totally defined by the script. Please see
the example file OM_Script.icp for detailed information.

The script language used to characterize the modulator goes under the "Standard" category in "script". Please see
the script OM_script.lsf for details.

The script can define a number of features of the modulator, in this example, it defines the coefficient. The
characteristics of the modulator can be visualized by analyzers, following are the analyzers' output to measure the
system.

Fig. 1 Optical oscilloscope output Fig.2 Optical spectrum analyzer output

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1047

6.3.3.7.7 Optical Ring Modulator

Symbol

Description
modulates an optical signal depending on electrical signal.

Ports
Name Type
port 1 Optical Signal
modulation Electrical Signal
port 2 Optical Signal

Properties
General
Name Default value Default unit Value range
name Optical Ring - -
Defines the name of the element. Modulator

annotate true - [true, false]


Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type Optical Ring - -
Defines the element unique type (read Modulator
only).
description modulates an - -
A brief description of the elements optical signal
functionality. depending on
electrical signal
prefix RING - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.

2003 - 2016 Lumerical Solutions, Inc


1048 Lumerical Knowledge Base

Standard
Name Default value Default unit Value range
frequency 193.1 THz*
Central frequency of the waveguide. A
Taylor expansion around this frequency *std. unit is Hz
is performed to estimate the
propagation transfer function of the
waveguide.
length 10e-006 m
The length of the waveguide.
load from file false - [true, false]
Defines whether or not to load
measurements from an input file or to
use the currently stored values.

measurement filename - - -
The file containing the measurement
data. Refer to the Implementation
Details section for the format expected.
measurement type effective index - [absorption &
Defines the type of measurement data. phase, effective
index]
measurement <11,3> [-5, - - -
A matrix editor for users to read the 4.5, -4...]
element current modulation data values
(read only).

Waveguide
Name Default value Default unit Value range
loss 0 dB/m
Defines the waveguide loss.
effective index 1 -
Defines the waveguide effective index.
group index 1 -
Defines the waveguide group index.
dispersion 0 s/m/m
Defines the waveguide dispersion.
coupling coefficient 1 0.5 - [0, 1]
The power coupling coefficient
corresponding to the first coupler.
coupling coefficient 2 0.5 - [0, 1]
The power coupling coefficient
corresponding to the second coupler.
modes TE,TM - -
List of optical mode labels supported
by the element.

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1049

Thermal
Name Default value Default unit Value range
thermal effects false - [true, false]
Defines whether or not to enable
thermal effects.
temperature %temperature K
Defines the temperature. %

nominal temperature 300 K


Defines the nominal temperature where
temperature sensitivity values are
measured.
thermal fill factor 1 - [0, 1]
The waveguide length ratio affected by
the thermal effects.

effective index temperature 0 /m/k


sensitivity
Defines the ratio between effective
index variation and temperature.
excess loss temperature 0 dB/m/K
sensitivity
Defines the ratio between loss variation
and temperature.

Enhanced
Name Default value Default unit Value range
electrical fill factor 1 - [0, 1]
The waveguide length ratio affected by
the modulation.

Numerical
Name Default value Default unit Value range

time variant digital filter disable - [disable,


Defines the operation of the internal interpolate,
time varying digital filter. update]

window function rectangular - [rectangular,


Defines the window type for the digital hamming,
filter. hanning]

number of taps 64 -
Defines the number of coefficient for
digital filter.

Diagnostic
Name Default value Default unit Value range
run diagnostic false - [true, false]
Enables the frequency response of the
designed filter implementation and the
ideal frequency response to be

2003 - 2016 Lumerical Solutions, Inc


1050 Lumerical Knowledge Base

generated as results.
diagnostic size 1024 -
The number of frequency points used
when calculating the filter frequency
response.

Results
Name Description
diagnostic/response #/transmission The complex transmission vs. frequency
corresponding to the ideal and designed filter.
diagnostic/response #/gain The gain vs. frequency corresponding to the ideal
and designed filter.
diagnostic/response #/error Mean square error comparing the frequency
response of the designed filter implementation with
the ideal frequency response.

Implementation Details
An optical ring modulator is usually used in wavelength division multiplexing (WDM) systems to isolate a wavelength
out of the multiplexed signal. The INTERCONNECT ring modulator model contains a time-varying frequency transfer
function that represents the relationship between the input and through port. This quasi-static behavior allows for
using the ring modulator not only as a modulator but also as a filter or multiplexer device when cascading multiple
ring modulators. In this example, we characterize the time domain and frequency domain performances of the ring
modulator, please see the example file Optical_Ring_Modulator.icp. The following figure is the setting of the
optical ring modulator.

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1051

The required input file measurement type could be selected from "effective index" and "absorption & phase". Please
see the example measurement input file neff_vs_voltage_11.txt which goes under the "effective index" type.

Please note that, the two optical ports for the carrier light path are the "in"
and "through" ports of the double bus ring.

Frequency Domain Characterization

2003 - 2016 Lumerical Solutions, Inc


1052 Lumerical Knowledge Base

The frequency domain characterization of the optical ring modulator gives the following transmission response, it
isolates out the signal with a wavelength around 1309.8nm.

Fig. 1 Frequency domain transmission response of the optical ring modulator

Time Domain Characterization

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1053

There are three numerical methods to calculate for the time variant digital filter coefficients. User can choose among
"disable", "interpolate" and "update" for the filter type, please see the whitepaper on INTERCONNECT Ring
Modulator Model for the detailed explanation of the simulation methodology. For the system shown above, the
following figure shows the output electrical signal for the three types of the time variant digital filter, respectively.

The time domain characterization of the optical ring modulator gives the following results when the time variant filter

2003 - 2016 Lumerical Solutions, Inc


1054 Lumerical Knowledge Base

is set to the "update" type. The blocked wavelength (1310nm) is much shorter than the transmission light wavelength
(1552nm), hence there is no signal blocked.

Fig.1 Received optical signal waveform (OOCS_1 Fig. 2 Received optical signal spectrum (OSA_1
output) output)

Fig. 3 Transmitted electrical signal (OSC_2 output) Fig. 4 Received electrical signal (OSC_1 output)

6.3.3.8 Passives
Electrical
Electrical Attenuator 1054

Electrical Delay 1057


Microwave Loss 1059

Optical
Optical Attenuator 1062
Optical Phase Shift 1065
Optical Delay 1069
Optical Mirror 1071
Termination Mirror 1074
Optical Splitter/Coupler 1076

Optical Circulator 1078


Optical Isolator 1081

6.3.3.8.1 Electrical Attenuator

Symbol

Description
Electrical attenuator.

Ports

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1055

Name Type
input Electrical Signal
output Electrical Signal

Properties
General
Name Default value Default unit Value range
name Electrical - -
Defines the name of the element. Attenuator

annotate true - [true, false]


Defines whether or not to display
annotations on the schematic editor.

enabled true - [true, false]


Defines whether or not the element is
enabled.
type Electrical - -
Defines the element unique type (read Attenuator
only).
description Electrical - -
A brief description of the elements attenuator
functionality.
prefix ATT - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.

Standard
Name Default value Default unit Value range
attenuation 0 dB
Defines the attenuation

Diagnostic
Name Default value Default unit Value range
run diagnostic false - [true, false]
Enables the frequency response of the
designed filter implementation and the
ideal frequency response to be
generated as results.

2003 - 2016 Lumerical Solutions, Inc


1056 Lumerical Knowledge Base

diagnostic size 1024 -


The number of frequency points used
when calculating the filter frequency
response.

Results
Name Description
diagnostic/response #/transmission The complex transmission vs. frequency
corresponding to the ideal and designed filter.
diagnostic/response #/gain The gain vs. frequency corresponding to the ideal
and designed filter.
diagnostic/response #/error Mean square error comparing the frequency
response of the designed filter implementation with
the ideal frequency response.

Implementation Details
The element Electrical Attenuator attenuates the input signal by the amount of value according to user's setting.
Following is the simulation system in the example file electrical_attenuator.icp to illustrate the working
principle and effect of this element.

In the example, the attenuation is set to be 3 dB, which attenuates the signal power by half. The two figures below
are the outputs of the oscilloscopes, for the signal's amplitude and power, respectively.

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1057

6.3.3.8.2 Electrical Delay

Symbol

Description
Electrical delay.

Ports
Name Type
input Electrical Signal
output Electrical Signal

Properties
General
Name Default value Default unit Value range
name Electrical Delay - -
Defines the name of the element.
annotate true - [true, false]
Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type Electrical Delay - -
Defines the element unique type (read
only).
description Electrical delay - -
A brief description of the elements
functionality.
prefix DLY - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -

2003 - 2016 Lumerical Solutions, Inc


1058 Lumerical Knowledge Base

Defines the element location or source


in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.

Standard
Name Default value Default unit Value range
delay 0 s
The time delay to apply to the input
signal.

Numerical
Name Default value Default unit Value range

fractional delay true - [true, false]


Defines whether to use a fractional
delay filter or force the delay to be an
integer multiple of the sample period.
delay compensation 0 -
The number of delays to compensate
for latency.

Diagnostic
Name Default value Default unit Value range
run diagnostic false - [true, false]
Enables the frequency response of the
designed filter implementation and the
ideal frequency response to be
generated as results.
diagnostic size 1024 -
The number of frequency points used
when calculating the filter frequency
response.

Results
Name Description
diagnostic/response #/transmission The complex transmission vs. frequency
corresponding to the ideal and designed filter.
diagnostic/response #/gain The gain vs. frequency corresponding to the ideal
and designed filter.
diagnostic/response #/error Mean square error comparing the frequency
response of the designed filter implementation with
the ideal frequency response.

Implementation Details
The element Electrical Delay applies a delay to the input electrical signal. The figure below shows the demonstration
system in the example file electrical_delay.icp.

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1059

The delay in this example is set to be 0.5 ns, the following figure shows the output of the oscilloscopes, the delay of
the signal is clearly shown,

6.3.3.8.3 Microw ave Loss

Symbol

Description
Microwave loss.

Ports
Name Type
input Electrical Signal

2003 - 2016 Lumerical Solutions, Inc


1060 Lumerical Knowledge Base

output Electrical Signal

Properties

General
Name Default value Default unit Value range
name Microwave Loss - -
Defines the name of the element.
annotate true - [true, false]
Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.

type Microwave Loss - -


Defines the element unique type (read
only).
description Microwave loss - -
A brief description of the elements
functionality.
prefix LOSS - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.

Standard
Name Default value Default unit Value range
length 1 m
The interaction length of the modulator.
microwave loss 0 dB/m
Defines the microwave electrode loss.
loss type constant - [constant,
Defines if the loss is constant or linear, square
frequency dependent. Frequency root]
dependency can be linear (~1/f) or
square root [~1/sqrt(f)]
loss reference frequency 1 Hz
Central frequency of operation.

Numerical

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1061

Name Default value Default unit Value range


window function rectangular - [rectangular,
Defines the window type for the digital hamming,
filter. hanning]

number of taps 64 -
Defines the number of coefficient for
digital filter.

Diagnostic
Name Default value Default unit Value range
run diagnostic false - [true, false]
Enables the frequency response of the
designed filter implementation and the
ideal frequency response to be
generated as results.

diagnostic size 1024 -


The number of frequency points used
when calculating the filter frequency
response.

Results
Name Description
diagnostic/response #/transmission The complex transmission vs. frequency
corresponding to the ideal and designed filter.
diagnostic/response #/gain The gain vs. frequency corresponding to the ideal
and designed filter.
diagnostic/response #/error Mean square error comparing the frequency
response of the designed filter implementation with
the ideal frequency response.

Implementation Details
Following is an example and implementation details of how the Microwave Loss Element works, please see the
example file: Microwave_Loss.icp

2003 - 2016 Lumerical Solutions, Inc


1062 Lumerical Knowledge Base

The key characteristics of this element are in the "standard" setting, the "length", "microwave loss", "loss type" and
"loss reference frequency". Following figure shows the measured losses for different loss types (constant, linear and
square root) with 1 m of interaction of modulator length, 1 dB/m microwave loss and 10 GHz central frequency of
operation.

6.3.3.8.4 Optical Attenuator

Symbol

Description
It reduces the power level of an optical signal.

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1063

Ports
Name Type
port 1 Optical Signal
port 2 Optical Signal

Properties
General
Name Default value Default unit Value range
name Optical - -
Defines the name of the element. Attenuator

annotate true - [true, false]


Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type Optical - -
Defines the element unique type (read Attenuator
only).
description It reduces the - -
A brief description of the elements power level of
functionality. an optical
signal
prefix ATT - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.

Standard
Name Default value Default unit Value range
attenuation 0 dB
Defines the attenuation
enable return loss false - [true, false]
Defines whether or not to include the
effect of return loss (reflections) in the
output signals.
return loss 100 dB
Defines the return loss.

2003 - 2016 Lumerical Solutions, Inc


1064 Lumerical Knowledge Base

Waveguide
Name Default value Default unit Value range
modes TE,TM - -
List of optical mode labels supported
by the element.

Diagnostic
Name Default value Default unit Value range
run diagnostic false - [true, false]
Enables the frequency response of the
designed filter implementation and the
ideal frequency response to be
generated as results.

diagnostic size 1024 -


The number of frequency points used
when calculating the filter frequency
response.

Results
Name Description
diagnostic/response #/transmission The complex transmission vs. frequency
corresponding to the ideal and designed filter.
diagnostic/response #/gain The gain vs. frequency corresponding to the ideal
and designed filter.
diagnostic/response #/error Mean square error comparing the frequency
response of the designed filter implementation with
the ideal frequency response.

Implementation Details
The element Optical Attenuator attenuates the input signal by the amount of value according to user's setting.
Following is the demonstration system in the example file optical_attenuator.icp to illustrate the working
principle and effect of this element and the property of this element.

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1065

The attenuation of this element is set to be 3 dB in the example, and according to the figure above, the optical power
meters measure a 3 dB attenuation after this element. Another property in the standard setting of this element is the
"return loss", which defines the reflection caused by this element. The "return loss" can be enabled or disabled.

6.3.3.8.5 Optical Phase Shift

Symbol

Description
Applies a phase shift to the input signal.

Ports
Name Type
port 1 Optical Signal
port 2 Optical Signal

Properties
General
Name Default value Default unit Value range
name Optical Phase - -
Defines the name of the element. Shift

annotate true - [true, false]


Defines whether or not to display
annotations on the schematic editor.

2003 - 2016 Lumerical Solutions, Inc


1066 Lumerical Knowledge Base

enabled true - [true, false]


Defines whether or not the element is
enabled.
type Optical Phase - -
Defines the element unique type (read Shift
only).
description Applies a - -
A brief description of the elements phase shift to
functionality. the input signal

prefix PHS - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.

Standard
Name Default value Default unit Value range
input parameter constant - [constant, table]
Defines whether to provide the phase or
a table with frequency dependent
values.
phase shift 0 rad
The phase shift to apply to the input
signal.
load from file false - [true, false]
Defines whether or not to load
measurements from an input file or to
use the currently stored values.
measurement filename - - -
The file containing the frequency
dependent phase values.
measurement <2> [193.1e - -
The table containing the frequency +012, 0]
dependent phase values.

Waveguide
Name Default value Default unit Value range
modes TE,TM - -
List of optical mode labels supported
by the element.

Numerical

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1067

Name Default value Default unit Value range


window function rectangular - [rectangular,
Defines the window type for the digital hamming,
filter. hanning]

number of taps 64 -
Defines the number of coefficient for
digital filter.

Diagnostic
Name Default value Default unit Value range
run diagnostic false - [true, false]
Enables the frequency response of the
designed filter implementation and the
ideal frequency response to be
generated as results.

diagnostic size 1024 -


The number of frequency points used
when calculating the filter frequency
response.

Results
Name Description
diagnostic/response #/transmission The complex transmission vs. frequency
corresponding to the ideal and designed filter.
diagnostic/response #/gain The gain vs. frequency corresponding to the ideal
and designed filter.
diagnostic/response #/error Mean square error comparing the frequency
response of the designed filter implementation with
the ideal frequency response.

Implementation Details
The optical phase shift applies a shift to the phase of the input signal. Following is an example and implementation
details of how the optical phase shift element works, please see the example file: Optical_Phase_Shift.icp

2003 - 2016 Lumerical Solutions, Inc


1068 Lumerical Knowledge Base

Following is a measurement of the phase shift, the phases of shift are /2, and 2 . The phase shift is in the
setting of "standard", the unit of the phase shift can be chosen from "deg", "mrad", "rad" and "urad". Note that the
range of the phase shift always falls into the region [0, 2 ].

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1069

6.3.3.8.6 Optical Delay

Symbol

Description
Applies a time delay to the input signal.

Ports
Name Type
port 1 Optical Signal
port 2 Optical Signal

Properties
General
Name Default value Default unit Value range
name Optical Delay - -
Defines the name of the element.
annotate true - [true, false]
Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type Optical Delay - -
Defines the element unique type (read
only).
description Applies a time - -
A brief description of the elements delay to the
functionality. input signal

prefix DLY - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.

Standard
Name Default value Default unit Value range

2003 - 2016 Lumerical Solutions, Inc


1070 Lumerical Knowledge Base

delay 0 s
The time delay to apply to the input
signal.

Waveguide
Name Default value Default unit Value range
modes TE,TM - -
List of optical mode labels supported
by the element.

Numerical
Name Default value Default unit Value range
fractional delay true - [true, false]
Defines whether to use a fractional
delay filter or force the delay to be an
integer multiple of the sample period.
delay compensation 0 -
The number of delays to compensate
for latency.

Diagnostic
Name Default value Default unit Value range
run diagnostic false - [true, false]
Enables the frequency response of the
designed filter implementation and the
ideal frequency response to be
generated as results.
diagnostic size 1024 -
The number of frequency points used
when calculating the filter frequency
response.

Results
Name Description
diagnostic/response #/transmission The complex transmission vs. frequency
corresponding to the ideal and designed filter.
diagnostic/response #/gain The gain vs. frequency corresponding to the ideal
and designed filter.
diagnostic/response #/error Mean square error comparing the frequency
response of the designed filter implementation with
the ideal frequency response.

Implementation Details
The element Optical Delay applies a delay to the input optical signal. The figure below shows the demonstration
system in the example file optical_delay.icp.

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1071

The delay in this example is set to be 1 ns, the following figure shows the output of the optical oscilloscopes, the
delay of the signal is clearly shown,

6.3.3.8.7 Optical Mirror

Symbol

Description
Reflective mirror.

Ports
Name Type
port 1 Optical Signal
port 2 Optical Signal

2003 - 2016 Lumerical Solutions, Inc


1072 Lumerical Knowledge Base

Properties

General
Name Default value Default unit Value range

name Optical Mirror - -


Defines the name of the element.
annotate true - [true, false]
Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type Optical Mirror - -
Defines the element unique type (read
only).
description Reflective mirror - -
A brief description of the elements
functionality.
prefix MIRR - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.

Standard
Name Default value Default unit Value range

reflectivity 0.99 - [0, 1]


Defines the reflectivity of the mirror.

Waveguide
Name Default value Default unit Value range
modes TE,TM - -
List of optical mode labels supported
by the element.

Diagnostic
Name Default value Default unit Value range
run diagnostic false - [true, false]
Enables the frequency response of the
designed filter implementation and the
ideal frequency response to be

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1073

generated as results.
diagnostic size 1024 -
The number of frequency points used
when calculating the filter frequency
response.

Results
Name Description
diagnostic/response #/transmission The complex transmission vs. frequency
corresponding to the ideal and designed filter.
diagnostic/response #/gain The gain vs. frequency corresponding to the ideal
and designed filter.
diagnostic/response #/error Mean square error comparing the frequency
response of the designed filter implementation with
the ideal frequency response.

Implementation Details
The optical mirror is a reflective mirror, following is a demonstration of the usage of the optical mirror and a
comparison of the optical mirror and the termination mirror. Please see the example file
Optical_Mirror_Termination_Mirror.icp.

The first figure is a system of a Fabry-Perot resonator, please note that the second optical mirror is flipped to make
the cavity symmetrical because there is a phase shift of from port 2 to port 1. The second figure replaces the
second optical mirror with a termination mirror, the two systems give the same results when the reflectivity of the two
mirrors are set to be the same.

The following figures are the measurements of the system. The first figure measures the transmission of the
systems with a termination mirror, a non-symmetrical optical mirror and a symmetrical mirror, respectively. It clearly
indicates the degree of phase shift from port 2 to port 1. The second figure shows the transmission and reflection
of the system, without considering of loss, the transmission and reflection add up to 1.

2003 - 2016 Lumerical Solutions, Inc


1074 Lumerical Knowledge Base

6.3.3.8.8 Termination Mirror

Symbol

Description
Termination mirror.

Ports
Name Type
port Optical Signal

Properties
General
Name Default value Default unit Value range
name Termination - -
Defines the name of the element. Mirror

annotate true - [true, false]


Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type Termination - -
Defines the element unique type (read Mirror
only).
description Termination - -
A brief description of the elements mirror
functionality.
prefix TERM - -
Defines the element name prefix.

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1075

model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.

Standard
Name Default value Default unit Value range
reflectivity 0 - [0, 1]
Defines the reflectivity of the mirror.

Waveguide
Name Default value Default unit Value range
modes TE,TM - -
List of optical mode labels supported
by the element.

Diagnostic
Name Default value Default unit Value range
run diagnostic false - [true, false]
Enables the frequency response of the
designed filter implementation and the
ideal frequency response to be
generated as results.
diagnostic size 1024 -
The number of frequency points used
when calculating the filter frequency
response.

Results
Name Description
diagnostic/response #/transmission The complex transmission vs. frequency
corresponding to the ideal and designed filter.
diagnostic/response #/gain The gain vs. frequency corresponding to the ideal
and designed filter.
diagnostic/response #/error Mean square error comparing the frequency
response of the designed filter implementation with
the ideal frequency response.

Implementation Details
Please see Optical Mirror for more information, please see the example file
Optical_Mirror_Termination_Mirror.icp.

2003 - 2016 Lumerical Solutions, Inc


1076 Lumerical Knowledge Base

6.3.3.8.9 Optical Splitter/Coupler

Symbol

Description
Combine or distribute light from single/multiple ports to multiple/single ports.

Ports
Name Type
port 1 Optical Signal
port 2 Optical Signal
port 3 Optical Signal

Properties
General
Name Default value Default unit Value range
name Optical Splitter/ - -
Defines the name of the element. Coupler

annotate true - [true, false]


Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type Optical Splitter/ - -
Defines the element unique type (read Coupler
only).
description Combine or - -
A brief description of the elements distribute light
functionality. from single/
multiple ports
to multiple/
single ports
prefix SPLT - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1077

$LOCAL for the element.

Standard
Name Default value Default unit Value range

number of ports 2 -
Defines the number of output ports for
the element.
split ratio even - [even, none]
Determines how the power is split
between the output ports. If 'even', the
power is split evenly between the
output ports; if 'none', all the power will
go through each one of the output ports

Waveguide
Name Default value Default unit Value range
modes TE,TM - -
List of optical mode labels supported
by the element.

Diagnostic
Name Default value Default unit Value range
run diagnostic false - [true, false]
Enables the frequency response of the
designed filter implementation and the
ideal frequency response to be
generated as results.
diagnostic size 1024 -
The number of frequency points used
when calculating the filter frequency
response.

Results
Name Description
diagnostic/response #/transmission The complex transmission vs. frequency
corresponding to the ideal and designed filter.
diagnostic/response #/gain The gain vs. frequency corresponding to the ideal
and designed filter.
diagnostic/response #/error Mean square error comparing the frequency
response of the designed filter implementation with
the ideal frequency response.

Implementation Details
The optical splitter/coupler combines/distributes light from single/multiple ports to multiple/single ports. The key
characteristics of this element is split ratio. The split ratio can be set to the format "even" or "none".

2003 - 2016 Lumerical Solutions, Inc


1078 Lumerical Knowledge Base

Following are examples of the optical splitter/coupler element with the split ratio set to "even" and "none",
respectively. With the split ratio set to "even", the power of the input signal evenly distributed to the output branches;
with the split ratio set to "none", the input signal duplicates itself to the output branches. Please see the example
file: Optical_Spliter-Coupler.icp

6.3.3.8.10 Optical Circulator

Symbol

Description
It separates optical signals that travel in opposite directions.

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1079

Ports
Name Type
port 1 Optical Signal
port 2 Optical Signal
port 3 Optical Signal

Properties
General
Name Default value Default unit Value range
name Optical - -
Defines the name of the element. Circulator

annotate true - [true, false]


Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type Optical - -
Defines the element unique type (read Circulator
only).
description It separates - -
A brief description of the elements optical signals
functionality. that travel in
opposite
directions
prefix CIR - -
Defines the element name prefix.
model - - -
Defines the element model name.

library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.

Standard
Name Default value Default unit Value range
insertion loss 0 dB
Defines the insertion loss (attenuation).
isolation 100 dB
Defines the isolation.
return loss 100 dB
Defines the return loss.

2003 - 2016 Lumerical Solutions, Inc


1080 Lumerical Knowledge Base

Waveguide
Name Default value Default unit Value range
modes TE,TM - -
List of optical mode labels supported
by the element.

Diagnostic
Name Default value Default unit Value range
run diagnostic false - [true, false]
Enables the frequency response of the
designed filter implementation and the
ideal frequency response to be
generated as results.

diagnostic size 1024 -


The number of frequency points used
when calculating the filter frequency
response.

Results
Name Description
diagnostic/response #/transmission The complex transmission vs. frequency
corresponding to the ideal and designed filter.
diagnostic/response #/gain The gain vs. frequency corresponding to the ideal
and designed filter.
diagnostic/response #/error Mean square error comparing the frequency
response of the designed filter implementation with
the ideal frequency response.

Implementation Details
The 3 port optical circulator is an element that separates optical signals that travel in opposite directions in fiber.
Please see the example file optical_circulator.icp for more information on the implementation details of this
element. Following is a figure of the system in the example:

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1081

The light enters any port of the circulator exits from the next port; which means light goes into port 1 emits from port
2, and if some of the emitted light reflected back to the circulator, it will exit from port 3. The figure above clearly
shown the working results of this element.

6.3.3.8.11 Optical Isolator

Symbol

Description
It reduces the reflected power level of an optical signal.

Ports
Name Type
port 1 Optical Signal
port 2 Optical Signal

Properties
General
Name Default value Default unit Value range

2003 - 2016 Lumerical Solutions, Inc


1082 Lumerical Knowledge Base

name Optical Isolator - -


Defines the name of the element.
annotate true - [true, false]
Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type Optical Isolator - -
Defines the element unique type (read
only).
description It reduces the - -
A brief description of the elements reflected power
functionality. level of an
optical signal
prefix ISOL - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.

Standard
Name Default value Default unit Value range
insertion loss 0 dB
Defines the insertion loss (attenuation).
isolation 100 dB
Defines the isolation.
return loss 100 dB
Defines the return loss.

Waveguide
Name Default value Default unit Value range
modes TE,TM - -
List of optical mode labels supported
by the element.

Diagnostic
Name Default value Default unit Value range
run diagnostic false - [true, false]
Enables the frequency response of the
designed filter implementation and the

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1083

ideal frequency response to be


generated as results.
diagnostic size 1024 -
The number of frequency points used
when calculating the filter frequency
response.

Results
Name Description
diagnostic/response #/transmission The complex transmission vs. frequency
corresponding to the ideal and designed filter.
diagnostic/response #/gain The gain vs. frequency corresponding to the ideal
and designed filter.
diagnostic/response #/error Mean square error comparing the frequency
response of the designed filter implementation with
the ideal frequency response.

6.3.3.9 S Parameters
Electrical
Electrical N Port S-Parameter 1094

Optical
Optical 1xN S-Parameter 1083
Optical S-Parameter 1086
Optical N Port S-parameter 1090

6.3.3.9.1 Optical 1xN S-Parameter

Symbol

Description
Optical 1xN s-parameter element.

Ports
Name Type
input Optical Signal
output 1 Optical Signal

Properties
General
Name Default value Default unit Value range

2003 - 2016 Lumerical Solutions, Inc


1084 Lumerical Knowledge Base

name Optical 1xN S- - -


Defines the name of the element. Parameter

annotate true - [true, false]


Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type Optical 1xN S- - -
Defines the element unique type (read Parameter
only).
description Optical 1xN s- - -
A brief description of the elements parameter
functionality. element

prefix SPAR - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.

Standard
Name Default value Default unit Value range
s parameters <3> [0, 1, 0] - -
A matrix editor for users to read the
element current s-parameters (read
only).

load from file false - [true, false]


Defines whether or not to load s-
parameters from an input file or to use
the currently stored s-parameters.
s parameters filename - - -
The file containing the s-parameters.
Refer to the Implementation Details
section for the format expected.

Waveguide
Name Default value Default unit Value range
modes TE,TM - -
List of optical mode labels supported
by the element.

Numerical

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1085

Name Default value Default unit Value range


digital filter type FIR - [FIR, IIR]
Defines the digital filter type used to fit
the element transfer function in time
domain.
window function rectangular - [rectangular,
Defines the window type for the digital hamming,
filter. hanning]

number of taps 64 -
Defines the number of coefficient for
digital filter.

Diagnostic
Name Default value Default unit Value range

run diagnostic false - [true, false]


Enables the frequency response of the
designed filter implementation and the
ideal frequency response to be
generated as results.
diagnostic size 1024 -
The number of frequency points used
when calculating the filter frequency
response.

Results
Name Description
diagnostic/response #/transmission The complex transmission vs. frequency
corresponding to the ideal and designed filter.
diagnostic/response #/gain The gain vs. frequency corresponding to the ideal
and designed filter.
diagnostic/response #/error Mean square error comparing the frequency
response of the designed filter implementation with
the ideal frequency response.

Implementation Details
Please see the example file Optical_1xN_SParameter.icp for detailed information.

2003 - 2016 Lumerical Solutions, Inc


1086 Lumerical Knowledge Base

The file format is:

( number of f r equenc y , number of c ol umns )

followed by the real and imaginary parts of the S parameters:

If the number of output port is 1, the format is:

f abs ( S21) angl e( S21)

Please see example s-parameter file s_parameter1.txt

If the number of output port is n>1,the format is:

f abs ( S21) angl e( S21) abs ( S31) angl e( S31) . . .

Please see example s-parameter file s_parameter2.txt

6.3.3.9.2 Optical S-Parameter

Symbol

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1087

Description
Optical two port s-parameter element.

Ports
Name Type
port 1 Optical Signal
port 2 Optical Signal

Properties
General
Name Default value Default unit Value range

name Optical S- - -
Defines the name of the element. Parameter

annotate true - [true, false]


Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type Optical S- - -
Defines the element unique type (read Parameter
only).
description Optical two port - -
A brief description of the elements s-parameter
functionality. element

prefix SPAR - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.

Standard
Name Default value Default unit Value range
s parameters <3> [0, 1, 0] - -
A matrix editor for users to read the
element current s-parameters (read
only).
load from file false - [true, false]

2003 - 2016 Lumerical Solutions, Inc


1088 Lumerical Knowledge Base

Defines whether or not to load s-


parameters from an input file or to use
the currently stored s-parameters.
s parameters filename - - -
The file containing the s-parameters.
Refer to the Implementation Details
section for the format expected.

Waveguide
Name Default value Default unit Value range
modes TE,TM - -
List of optical mode labels supported
by the element.

Numerical
Name Default value Default unit Value range
order 1 -
The order that the element internal s-
parameters are raised to. This allows
users to automatically cascade an
arbitrary number of elements.
digital filter type FIR - [FIR, IIR]
Defines the digital filter type used to fit
the element transfer function in time
domain.
window function rectangular - [rectangular,
Defines the window type for the digital hamming,
filter. hanning]

number of taps 64 -
Defines the number of coefficient for
digital filter.

Diagnostic
Name Default value Default unit Value range
run diagnostic false - [true, false]
Enables the frequency response of the
designed filter implementation and the
ideal frequency response to be
generated as results.
diagnostic size 1024 -
The number of frequency points used
when calculating the filter frequency
response.

Results
Name Description
diagnostic/response #/transmission The complex transmission vs. frequency

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1089

corresponding to the ideal and designed filter.


diagnostic/response #/gain The gain vs. frequency corresponding to the ideal
and designed filter.
diagnostic/response #/error Mean square error comparing the frequency
response of the designed filter implementation with
the ideal frequency response.

Implementation Details
Please see the example file Optical_S_Parameter.icp for detailed information.

The file format is:

( number of f r equenc y , number of c ol umns )

followed by the real and imaginary parts of the S parameters:

If the number of columns is 3, the format is:

f abs ( S21) angl e( S21)

If the number of columns is 5, the format is:

2003 - 2016 Lumerical Solutions, Inc


1090 Lumerical Knowledge Base

f abs ( S11) angl e( S11) abs ( S12) angl e( S12)

with the assumption that S22 = S11, S21 = S12

If the number of columns is 9, the format is:

f abs ( S11) angl e( S11) abs ( S12) angl e( S12) abs ( S21) angl e( S21) abs ( 22) angl e( S22)

Please see the example input s-parameter file sparameter.txt.

6.3.3.9.3 Optical N Port S-parameter

Symbol

Description
Optical N port s-parameter element.

Ports
Name Type
port 1 Optical Signal
port 2 Optical Signal

Properties

General
Name Default value Default unit Value range
name Optical N Port - -
Defines the name of the element. S-Parameter

annotate true - [true, false]


Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type Optical N Port - -
Defines the element unique type (read S-Parameter
only).
description Optical N port - -
A brief description of the elements s-parameter
functionality. element

prefix SPAR - -
Defines the element name prefix.

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1091

model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.

Standard
Name Default value Default unit Value range
load from file false - [true, false]
Defines whether or not to load s-
parameters from an input file or to use
the currently stored s-parameters.
s parameters filename - - -
The file containing the s-parameters.
Refer to the Implementation Details
section for the format expected.

Numerical
Name Default value Default unit Value range
remove disconnected ports false - [true, false]
Defines whether or not to remove
disconnected ports from the internal s-
parameters.
order 1 -
The order that the element internal s-
parameters are raised to. This allows
users to automatically cascade an
arbitrary number of elements.
digital filter type FIR - [FIR, IIR]
Defines the digital filter type used to fit
the element transfer function in time
domain.
window function rectangular - [rectangular,
Defines the window type for the digital hamming,
filter. hanning]

number of taps 64 -
Defines the number of coefficient for
digital filter.
passivity ignore - [ignore, test,
Defines how passivity of s-parameters enforce,
is enforced: 'ignore' ignores the optimal]
passivity of the s-parameters. 'test'
tests if the induced 2-norm of the s-
parameters is less than 1. 'enforce'
enforces the passivity by making sure
the the induced 2-norm of the s-

2003 - 2016 Lumerical Solutions, Inc


1092 Lumerical Knowledge Base

parameters is less than 1. 'optimal'


enforces the passivity by making sure
the the induced 2-norm and the
Frobenius norm of the s-parameters
are both less than 1.
passivity tolerance 1e-006 - [0, 1]
When enforcing passivity the induced
2-norm of the s-parameters at an
offending frequency will be equal to 1-
eps, where eps is the passivity
tolerance.
reciprocity ignore - [ignore, test,
Defines how reciprocity of s- enforce]
parameters is enforced: 'ignore' ignores
the reciprocity of the s-parameters.
'test' tests for symmetry across the
diagonal of the s-parameter matrix.
'enforce' enforces symmetry across the
diagonal of the s-parameter matrix.

Diagnostic
Name Default value Default unit Value range
run diagnostic false - [true, false]
Enables the frequency response of the
designed filter implementation and the
ideal frequency response to be
generated as results.
diagnostic size 1024 -
The number of frequency points used
when calculating the filter frequency
response.

Results
Name Description
diagnostic/passivity The induced 2-norm or the spectral norm of the s-
parameters vs. frequency.
diagnostic/reciprocity The induced 2-norm or the spectral norm of (S-S')
vs. frequency, where S is the s-parameters matrix.
diagnostic/response #/transmission The complex transmission vs. frequency
corresponding to the ideal and designed filter.
diagnostic/response #/gain The gain vs. frequency corresponding to the ideal
and designed filter.
diagnostic/response #/error Mean square error comparing the frequency
response of the designed filter implementation with
the ideal frequency response.

Implementation Details
There are a few options for the file format. Please see the following example files:
optical_N_port_sparameter.icp.

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1093

Option 1:
( " out put por t name" , " mode l abel " , mode I D ( out ) , " i nput por t name" , mode I D
( i n) , " i nput t y pe" )
( # r ows , # c ol umns )
f abs ( S) angl e( S)
...

Example file: attenuatortetm.dat

Option 2:
[ # por t s on t he l ef t , # por t s on t he r i ght ]
( " out put por t name" , " mode l abel " , mode I D ( out ) , " i nput por t name" , mode I D
( i n) , " i nput t y pe" )
( # r ows , # c ol umns )
f abs ( S) angl e( S)
...

Example file: awg_1x9.dat

Option 3:
[ " por t name" , " LEFT/ RI GHT/ TOP/ BOTTOM" ]
[ " por t name" , " LEFT/ RI GHT/ TOP/ BOTTOM" ]
...

( " out put por t name" , " mode l abel " , mode I D ( out ) , " i nput por t name" , mode I D
( i n) , " i nput t y pe" )
( # r ows , # c ol umns )
f abs ( S) angl e( S)
...

Example file: awg_1x2x2x4.dat

If the s-parameter is not fully defined for each of the ports combination, the default value 0 will be used for undefined
ones. e.g., if only S21 and S31 are defined for a 3-port S-Parameter element, S12 = S13 = S23 = S32 = S11 = S22
= S33 =0, the transmission through this combination of ports is blocked.

2003 - 2016 Lumerical Solutions, Inc


1094 Lumerical Knowledge Base

6.3.3.9.4 Electrical N Port S-Parameter

Symbol

Description
Electrical N port s-parameter element.

Ports
Name Type
port 1 Electrical Signal
port 2 Electrical Signal

Properties
General
Name Default value Default unit Value range
name Electrical N - -
Defines the name of the element. Port S-
Parameter
annotate true - [true, false]
Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type Electrical N - -
Defines the element unique type (read Port S-
only). Parameter

description Electrical N - -
A brief description of the elements port s-
functionality. parameter
element
prefix SPAR - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1095

Standard
Name Default value Default unit Value range
s parameters <9> [0, 0, 0...] - -
A matrix editor for users to read the
element current s-parameters (read
only).
load from file false - [true, false]
Defines whether or not to load s-
parameters from an input file or to use
the currently stored s-parameters.
s parameters filename - - -
The file containing the s-parameters.
Refer to the Implementation Details
section for the format expected.

Numerical
Name Default value Default unit Value range
window function rectangular - [rectangular,
Defines the window type for the digital hamming,
filter. hanning]

number of taps 64 -
Defines the number of coefficient for
digital filter.

Diagnostic
Name Default value Default unit Value range
run diagnostic false - [true, false]
Enables the frequency response of the
designed filter implementation and the
ideal frequency response to be
generated as results.
diagnostic size 1024 -
The number of frequency points used
when calculating the filter frequency
response.

Results
Name Description
diagnostic/response #/transmission The complex transmission vs. frequency
corresponding to the ideal and designed filter.
diagnostic/response #/gain The gain vs. frequency corresponding to the ideal
and designed filter.
diagnostic/response #/error Mean square error comparing the frequency
response of the designed filter implementation with
the ideal frequency response.

Implementation Details

2003 - 2016 Lumerical Solutions, Inc


1096 Lumerical Knowledge Base

The file format follows the standard Touchstone file format, the following example is for a 4-port data magnitude angle
file:

#magnitude angle
<FREQ> |S11| <S11 |S12| <S12 |S13| <S13 |S14| <S14
|S21| <S21 |S22| <S22 |S23| <S23 |S24| <S24
|S31| <S31 |S32| <S32 |S33| <S33 |S34| <S34
|S41| <S41 |S42| <S42 |S43| <S43 |S44| <S44

Real imaginary and dB angle formats are as shown below:

#Real Imaginary
<FREQ> Re{S11} Im{S11} Re{S21} Im{S21} Re{S12} Im{S12} Re{S22} Im{S22}

#dB Angle
<FREQ> 20log10|S11| <S11 20log10|S21| <S21 20log10|S12| <S12 20log10|S22| <S22

The option line is required at the beginning of the file to specify the format of the data in the file. The option line starts
with a "#" and has the format of:

#<FREQ_UNITS> <TYPE> <FORMAT> <Rn>

where

<FREQ_UNITS> = units of frequency data (options are Hz, KHz, MHz and GHz)
<TYPE> = type of file data
<FORMAT> = S-parameter format (options are:
DB for dB-angle, MA for magnitude-angle, RI for real-imaginary)
<Rn> = reference resistance in ohms, n is a positive number

The example s-parameter file uses the RI format.

Other file formats such as .txt files could also be used.

Please see example files:

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1097

sparameter2x2.icp, sparameter2x2.s4p

6.3.3.10 Waveguides
Fibers 1116
Couplers 1121
Crossings 1132
Resonators 1135
Gratings 1154
Straight Waveguide 1097
Multimode Waveguide 1114
MODE Waveguide 1107
Bend 1162
Gaussian Beam 1105
Waveguide Offset 1112

6.3.3.10.1 Straight Waveguide

Symbol

Description
Optical straight waveguide.

Ports
Name Type
port 1 Optical Signal
port 2 Optical Signal

Properties
General
Name Default value Default unit Value range
name Straight - -
Defines the name of the element. Waveguide

annotate true - [true, false]


Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type Straight - -
Defines the element unique type (read Waveguide
only).
description Optical straight - -
A brief description of the elements waveguide

2003 - 2016 Lumerical Solutions, Inc


1098 Lumerical Knowledge Base

functionality.
prefix WGD - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.

Standard
Name Default value Default unit Value range

frequency 193.1 THz*


Central frequency of the waveguide. A
Taylor expansion around this frequency *std. unit is Hz
is performed to estimate the
propagation transfer function of the
waveguide.
length 10e-006 m
The length of the waveguide.

Waveguide/Mode 1
Name Default value Default unit Value range
orthogonal identifier 1 1 -
The first identifier used to track an
orthogonal mode of an optical
waveguide. For most waveguide, two
orthogonal identifiers '1' and '2' are
available (with the default labels 'TE'
and 'TM' respectively).
label 1 TE - -
The label corresponding to the first
orthogonal identifier.
loss 1 0 dB/m
The loss corresponding to the first
orthogonal identifier.
effective index 1 1 -
The effective index corresponding to
the first orthogonal identifier.
group index 1 1 -
The group index coefficient
corresponding to the first orthogonal
identifier.
dispersion 1 0 s/m/m
The dispersion coefficient
corresponding to the first orthogonal

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1099

identifier.

Waveguide/Mode 2
Name Default value Default unit Value range

orthogonal identifier 2 2 -
The second identifier used to track an
orthogonal mode of an optical
waveguide. For most waveguide, two
orthogonal identifiers '1' and '2' are
available (with the default labels 'TE'
and 'TM' respectively).
label 2 TM - -
The label corresponding to the second
orthogonal identifier.

loss 2 0 dB/m
The loss corresponding to the second
orthogonal identifier.
effective index 2 1 -
The effective index corresponding to
the second orthogonal identifier.
group index 2 1 -
The group index coefficient
corresponding to the second
orthogonal identifier.
dispersion 2 0 s/m/m
The dispersion coefficient
corresponding to the second
orthogonal identifier.

Waveguide/Mode 1/Thermal
Name Default value Default unit Value range
effective index temperature 0 /k
sensitivity 1
Defines the ratio between effective
index variation and temperature.
excess loss temperature 0 dB/K
sensitivity 1
Defines the ratio between loss variation
and temperature.

Waveguide/Mode 2/Thermal
Name Default value Default unit Value range
effective index temperature 0 /k
sensitivity 2
Defines the ratio between effective
index variation and temperature.
excess loss temperature 0 dB/K
sensitivity 2

2003 - 2016 Lumerical Solutions, Inc


1100 Lumerical Knowledge Base

Defines the ratio between loss variation


and temperature.

Thermal
Name Default value Default unit Value range
thermal effects false - [true, false]
Defines whether or not to enable
thermal effects.
temperature %temperature K
Defines the temperature. %

nominal temperature 300 K


Defines the nominal temperature where
temperature sensitivity values are
measured.

thermal fill factor 1 - [0, 1]


The waveguide length ratio affected by
the thermal effects.

Numerical
Name Default value Default unit Value range
digital filter false - [true, false]
Defines whether or not to use a digital
filter to represent the element transfer
function in time domain.
window function rectangular - [rectangular,
Defines the window type for the digital hamming,
filter. hanning]

number of taps 64 -
Defines the number of coefficient for
digital filter.
fractional delay true - [true, false]
Defines whether to use a fractional
delay filter or force the delay to be an
integer multiple of the sample period.
delay compensation 0 -
The number of delays to compensate
for latency.

Diagnostic
Name Default value Default unit Value range
run diagnostic false - [true, false]
Enables the frequency response of the
designed filter implementation and the
ideal frequency response to be
generated as results.
diagnostic size 1024 -
The number of frequency points used

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1101

when calculating the filter frequency


response.

Results
Name Description
diagnostic/response #/transmission The complex transmission vs. frequency
corresponding to the ideal and designed filter.
diagnostic/response #/gain The gain vs. frequency corresponding to the ideal
and designed filter.
diagnostic/response #/error Mean square error comparing the frequency
response of the designed filter implementation with
the ideal frequency response.

Implementation Details
An optical straight waveguide is a physical structure that confines light waves (electromagnetic waves) in an optical
spectrum. Fiber is also a common type of optical straight waveguide. The two orthogonal identifiers "1" and "2" (with
the default labels "TE" and "TM", respectively) have the following definition for group index and dispersion coefficient.

Group c k n (1)
Index ng = =c = ( wneff ( w )) = neff ( w ) + w
ng w w w

Dispersion 2 pc 2 k (2)
Coefficient Dl = -
l2 w 2

Due to the refractive index change when light enters the waveguide from other media, the speed and phase of the
light will change accordingly. Hence the optical straight waveguide is always used as a phase shifter or an optical
delay line. The phase change and time delay introduced by a piece of straight waveguide of length L, effective and
group indices of neff and ng can be calculated by the equations listed below, where c is the speed of light:

2 pneff (3)
Dj = L
l
L ng (4)
Dt =
c

The optical straight waveguide can be used in numerous structures for different design and application purposes. In
the example file straight_waveguide.icp, the ONA measures the delay and phase shift introduced by the
waveguide. The following figure shows the system in the example file with the straight waveguide has the properties
shown on the right hand side:

2003 - 2016 Lumerical Solutions, Inc


1102 Lumerical Knowledge Base

In the system shown above, the optical signal inputs to the first Y branch is split into two identical signals. The
waveguide in the upper branch introduces a periodic phase shift to the signal with respect to wavelengths. The
measurements of the gain and phase of the two branches are shown below.

By recombining the two branches, the phase difference of signals in the two arms will construct and destruct the
signal periodically with respect to wavelength (frequency). This gives an interferometer effect. The gain (intensity
transmission frequency response) and phase of the signal outputs from the second Y branch are shown below:

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1103

6.3.3.10.1.1 Fractional delay compensation

Digital filter
For time domain simulations, the frequency dependent elements rely on either infinite impulse response (IIR) or finite
impulse response (FIR) digital filters. FIR filters can provide much better frequency responses provided the signal is
composed of tones that fall exactly on the frequencies corresponding to the FIR taps. Following is an example of a
Gaussian filter relies on FIR digital filters.

where bk are the filter tap coefficients, the filter transfer function in z-domain is:
M -1
H ( z ) = bk z -k
k =0

From the transfer function above we can see, FIR filters introduce extra M delays, witch adds a constant group delay
to the signal path.

To compensate for the artificial group delay, fractional delay and delay compensation options are available in related
waveguide elements.

Fractional delay
Waveguide elements including Straight Waveguide, MODE Waveguide, Multimode Waveguide and Waveguide
Bends adopt an option to enable a fractional delay filter, where time delays dont have to be an integer multiple of the

2003 - 2016 Lumerical Solutions, Inc


1104 Lumerical Knowledge Base

sampling period. It offers better accuracy when running transient simulations, where waveguides are typically
represented as delay lines. This option is especially useful in ring structures, since the delay adds up by the
resonance effect and become more crucial in these structures.

The default setting for "fractional delay" is "true" for all newly added waveguide elements. The "delay compensation"
number depends on the number of connections (or number of elements) in the structure. Please note that, every
time when signal passes the waveguide element, the designated number of samples of delay compensation will be
performed.

The following example wg_delay_compensation_comparison.icp has a simple ring structure built by an


optical coupler, a piece of straight waveguide and an optical modulator measured. The result is the comparison of
the modulation gain curves with scattering data analysis, impulse response without and with delay compensation.
The schematic layout and result are shown below.

The results shown above proves that, if time delay is not an integer multiple of the sampling period and no delay
compensation is performed, the impulse response of the modulation gain curve only matches the scattering data
analysis at around the center frequency (green curve and blue curve). As the frequency deviates from the center, the
FSR goes more and more off. When including fractional delay compensation, the impulse response result matches

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1105

the scattering data analysis result very well for most of the frequency ranges (red curve and blue curve), but when
frequency is far off from the center (~ 8 THz on each side), the impulse response suffers from some distortion.
Please make sure to operate in the valid frequency range when using the fractional delay compensation option.

6.3.3.10.2 Gaussian Beam

Symbol

Description
This model is equivalent to a single mode waveguide with a Gaussian beam.

Ports
Name Type
input Optical Signal
output Optical Signal

Properties
General
Name Default value Default unit Value range
name Gaussian - -
Defines the name of the element. Beam

annotate true - [true, false]


Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type Gaussian - -
Defines the element unique type (read Beam
only).
description This model is - -
A brief description of the elements equivalent to a
functionality. single mode
waveguide with
a Gaussian
beam
prefix BEAM - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).

2003 - 2016 Lumerical Solutions, Inc


1106 Lumerical Knowledge Base

local path - - -
Defines the local path or working folder
$LOCAL for the element.

Standard
Name Default value Default unit Value range
beam direction 2D Z normal - [2D X normal,
The direction of the propagation. 2D Y normal,
2D Z normal]
frequency 193.1 THz*
Central frequency of operation.
*std. unit is Hz

waist radius 10e-006 m


The 1/e field (1/e2 power) radius of the
beam.

distance from waist 0 m


The distance from waist. A positive
distance corresponds to a diverging
beam, and a negative sign corresponds
to a converging beam.
refractive index 1 -
The refractive index of the homogenous
material in which the Gaussian beam
is found.
theta 0 rad
The angle between the normal-axis and
the direction of propagation.
phi 0 rad
The angle between the direction of
propagation and the horizontal-axis.
polarization angle 0 rad
The polarization angle is defined with
respect to the horizontal-axis for
normal incidence fields. When the
incidence is off-axis, the polarization
angle should be '0' for p-polarized light
and 'pi/2' for s-polarized light.

Waveguide
Name Default value Default unit Value range
orthogonal identifier 1 -
The identifier used to track an
orthogonal mode of an optical
waveguide. For most waveguide, two
orthogonal identifiers '1' and '2' are
available (with the default labels 'TE'
and 'TM' respectively).
label Gaussian - -
The label corresponding to the

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1107

orthogonal identifier.

Numerical
Name Default value Default unit Value range

sample span 10e-006 m


The length of the sample span.
sample resolution 200 -
The number of samples per sample
span.

6.3.3.10.3 MODE Waveguide

Symbol

Description
This element can import results from MODE.

Ports
Name Type
port 1 Optical Signal
port 2 Optical Signal

Properties

General
Name Default value Default unit Value range
name MODE - -
Defines the name of the element. Waveguide

annotate true - [true, false]


Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type MODE - -
Defines the element unique type (read Waveguide
only).
description This element - -
A brief description of the elements can import
functionality. results from
MODE

2003 - 2016 Lumerical Solutions, Inc


1108 Lumerical Knowledge Base

prefix WGD - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.

Standard
Name Default value Default unit Value range
length 1 m
The length of the waveguide.
loss 0 dB/m
Defines the waveguide excess loss.
excess loss 0 dB
Defines the waveguide loss.
load mode profile true - [true, false]
Defines whether or not to load mode
profiles from an input file or to ignore
them.
load from file true - [true, false]
Defines whether or not to load
measurements from an input file or to
use the currently stored values.
ldf filename - - -
The .ldf file containing results from
'Lumerical MODE Solutions' used to
characterize the waveguide.

Enhanced
Name Default value Default unit Value range
normalize group delay false - [true, false]
If 'true' is selected, the group delays for
all modes will be subtracted by the
reference group delay (from the mode
with the smallest group delay).
propagation loss true - [true, false]
If 'true' is selected, the propagation
loss will be ignored and only a nonzero
excess loss will be taken into account.

Numerical
Name Default value Default unit Value range

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1109

digital filter false - [true, false]


Defines whether or not to use a digital
filter to represent the element transfer
function in time domain.
window function rectangular - [rectangular,
Defines the window type for the digital hamming,
filter. hanning]

number of taps 64 -
Defines the number of coefficient for
digital filter.
fractional delay true - [true, false]
Defines whether to use a fractional
delay filter or force the delay to be an
integer multiple of the sample period.
delay compensation 0 -
The number of delays to compensate
for latency.

Diagnostic
Name Default value Default unit Value range
run diagnostic false - [true, false]
Enables the frequency response of the
designed filter implementation and the
ideal frequency response to be
generated as results.
diagnostic size 1024 -
The number of frequency points used
when calculating the filter frequency
response.

Results
Name Description
diagnostic/mode #/transmission The complex transmission vs. frequency
corresponding to the optical mode.
diagnostic/mode #/alpha The propagation attenuation constant vs. frequency
corresponding to the optical mode.
diagnostic/mode #/beta The propagation phase constant vs. frequency
corresponding to the optical mode.
diagnostic/mode #/loss The loss vs. frequency corresponding to the optical
mode.
diagnostic/mode #/angle The angle vs. frequency corresponding to the
optical mode.
diagnostic/mode #/effective index The effective index vs. frequency corresponding to
the optical mode.
diagnostic/mode #/group velocity The group velocity vs. frequency corresponding to
the optical mode.
diagnostic/mode #/group delay The group delay vs. frequency corresponding to the

2003 - 2016 Lumerical Solutions, Inc


1110 Lumerical Knowledge Base

optical mode.
diagnostic/mode #/group index The group index vs. frequency corresponding to the
optical mode.
diagnostic/mode #/dispersion The dispersion vs. frequency corresponding to the
optical mode.
diagnostic/response #/transmission The complex transmission vs. frequency
corresponding to the ideal and designed filter.
diagnostic/response #/gain The gain vs. frequency corresponding to the ideal
and designed filter.
diagnostic/response #/error Mean square error comparing the frequency
response of the designed filter implementation with
the ideal frequency response.

Implementation Details

For more information on how to create a MODE Waveguide element, please visit the page Create MODE Waveguide
Element 1110 .

From release 2016b, this element started to include the option of fractional delay compensation. For more
information on this feature, please visit the page Fractional delay compensation 1103 .

6.3.3.10.3.1 Create MODE Waveguide Element

Objective
This page describes how to create a MODE Waveguide element, which enables users to import frequency-
dependent properties (such as the effective index, loss, group index, dispersion...etc) of a single- or multi-mode
waveguide directly from MODE Solutions. This allows for a more detailed description of the waveguide, leading to
more accurate simulation results.
See also
MODE Waveguide (reference guide) 1107

MODE Solutions

When carrying out a frequency sweep in MODE Solutions, select all modes of interest (from the mode list) and set
the frequency range. Make sure to select "track selected mode", "detailed dispersion calculation" and "store mode
profiles while tracking", this information is necessary for the MODE Waveguide in INTERCONNECT.

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1111

Once the frequency sweep is complete, check the frequency-dependent results for each mode and make sure that
the results are correct before exporting the data. To save the frequency result into a format that can be directly
imported into INTERCONNECT, select "Data Export" in the options drop down menu. Click on "Export for
INTERCONNECT", and enter the orthogonal identifiers which will be used to track these modes in INTERCONNECT.

2003 - 2016 Lumerical Solutions, Inc


1112 Lumerical Knowledge Base

INTERCONNECT

Add a MODE Waveguide 1107 from Element Library -> Waveguides, and specify the .ldf file from MODE Solutions as
the "ldf filename" property. The element will now function as a waveguide with the properties determined by MODE
Solutions. For example, one can look at the field profile using a Mode Profile Analyzer 950 .

6.3.3.10.4 Waveguide Offset

Symbol

Description
This element applies a spatial offset to waveguide modes.

Ports

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1113

Name Type
port 1 Optical Signal
port 2 Optical Signal

Properties
General
Name Default value Default unit Value range
name Waveguide - -
Defines the name of the element. Offset

annotate true - [true, false]


Defines whether or not to display
annotations on the schematic editor.

enabled true - [true, false]


Defines whether or not the element is
enabled.
type Waveguide - -
Defines the element unique type (read Offset
only).
description This element - -
A brief description of the elements applies a
functionality. spatial offset to
waveguide
modes
prefix OFFST - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).

local path - - -
Defines the local path or working folder
$LOCAL for the element.

Standard
Name Default value Default unit Value range
x shift 0 m
Defines the distance in the 'x' direction
to shift the input optical modes
y shift 0 m
Defines the distance in the 'y' direction
to shift the input optical modes
z shift 0 m
Defines the distance in the 'z' direction
to shift the input optical modes

2003 - 2016 Lumerical Solutions, Inc


1114 Lumerical Knowledge Base

6.3.3.10.5 Multimode Waveguide

Symbol

Description
Multimode waveguide.

Ports
Name Type
port 1 Optical Signal
port 2 Optical Signal

Properties
General
Name Default value Default unit Value range
name Multimode - -
Defines the name of the element. Waveguide

annotate true - [true, false]


Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type Multimode - -
Defines the element unique type (read Waveguide
only).
description Multimode - -
A brief description of the elements waveguide
functionality.
prefix WGD - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1115

Standard
Name Default value Default unit Value range
frequency 193.1 THz*
Central frequency of the waveguide. A
Taylor expansion around this frequency *std. unit is Hz
is performed to estimate the
propagation transfer function of the
waveguide.
length 10e-006 m
The length of the waveguide.
orthogonal identifier and <2,5> [1, 2, - -
propagation parameters 0...]
A matrix editor that allow users to input
the label (column 1), loss (column 2),
effective index (column 3), group index
(column 4) and dispersion (column 5)
corresponding to each orthogonal
identifier.

Numerical
Name Default value Default unit Value range
digital filter false - [true, false]
Defines whether or not to use a digital
filter to represent the element transfer
function in time domain.
window function rectangular - [rectangular,
Defines the window type for the digital hamming,
filter. hanning]

number of taps 64 -
Defines the number of coefficient for
digital filter.

fractional delay true - [true, false]


Defines whether to use a fractional
delay filter or force the delay to be an
integer multiple of the sample period.
delay compensation 0 -
The number of delays to compensate
for latency.

Diagnostic
Name Default value Default unit Value range
run diagnostic false - [true, false]
Enables the frequency response of the
designed filter implementation and the
ideal frequency response to be
generated as results.
diagnostic size 1024 -

2003 - 2016 Lumerical Solutions, Inc


1116 Lumerical Knowledge Base

The number of frequency points used


when calculating the filter frequency
response.

Results
Name Description
diagnostic/response #/transmission The complex transmission vs. frequency
corresponding to the ideal and designed filter.
diagnostic/response #/gain The gain vs. frequency corresponding to the ideal
and designed filter.
diagnostic/response #/error Mean square error comparing the frequency
response of the designed filter implementation with
the ideal frequency response.

Implementation Details
The multi-mode waveguide can support more modes propagating inside its core compared with a single mode
waveguide. For the implementation details of the general properties of waveguides, please see the page Straight
Waveguide for more information.

The property "orthogonal identifier and propagation parameters" defines the propagating parameters according to
each orthogonal identifier. It has the following format of matrix editor for each mode, the numerical values in the table
are just as examples and the explanation and/or units in the bracket do not need to be input to the editor.

label loss effective index group index dispersion


1 (TE) 200 (dB/m) 2.8 4.9 17 (ps/(nm*km))
2 (TM) 200 (dB/m) 2.7 3.9 16 (ps/(nm*km))

From release 2016b, this element started to include the option of fractional delay compensation. For more
information on this feature, please visit the page Fractional delay compensation 1103 .

6.3.3.10.6 Fibers
Optical Fiber 1116

6.3.3.10.6.1 Optical Fiber

Symbol

Description
Optical fiber.

Ports
Name Type
port 1 Optical Signal
port 2 Optical Signal

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1117

Properties
General
Name Default value Default unit Value range
name Optical Fiber - -
Defines the name of the element.
annotate true - [true, false]
Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type Optical Fiber - -
Defines the element unique type (read
only).
description Optical fiber - -
A brief description of the elements
functionality.
prefix FIBER - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.

Standard
Name Default value Default unit Value range
length 1000 m
The length of the waveguide.
reference frequency 1552.524381 nm* (2.99792e-083,
Central frequency of the waveguide. A
Taylor expansion around this frequency *std. unit is Hz
is performed to estimate the
propagation transfer function of the
waveguide.

Waveguide
Name Default value Default unit Value range
attenuation 0.0002 dB/m
Defines the attenuation
dispersion 16e-006 s/m/m

2003 - 2016 Lumerical Solutions, Inc


1118 Lumerical Knowledge Base

Defines the dispersion.


dispersion slope 80 s/m/m/m
Defines the dispersion slope.
modes X,Y - -
List of optical mode labels supported
by the element.

Numerical
Name Default value Default unit Value range
window function rectangular - [rectangular,
Defines the window type for the digital hamming,
filter. hanning]

number of taps 64 -
Defines the number of coefficient for
digital filter.

Diagnostic
Name Default value Default unit Value range
run diagnostic false - [true, false]
Enables the frequency response of the
designed filter implementation and the
ideal frequency response to be
generated as results.
diagnostic size 1024 -
The number of frequency points used
when calculating the filter frequency
response.

Results
Name Description
diagnostic/response #/transmission The complex transmission vs. frequency
corresponding to the ideal and designed filter.
diagnostic/response #/gain The gain vs. frequency corresponding to the ideal
and designed filter.
diagnostic/response #/error Mean square error comparing the frequency
response of the designed filter implementation with
the ideal frequency response.

Implementation Details
Optical fibers is a kind of optical waveguide with fairly flexibility, they can be potentially made very long and are the
core components of fiber optics. Following are the definitions for the properties listed in the table.

Dispersion 2 pc 2 k (1)
Dl = -
l2 w 2

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1119

Dispersion dD (2)
Slope Sl =
dl

When light propagating in the optical fiber, it suffers from attenuation and dispersions. One of the most common
dispersions in fiber is the chromatic dispersion. In the example file optical_fiber_example.icp, the optical
fiber has a length of 80 km with 2 dB/km attenuation and the chromatic dispersion coefficient and slope of 16 ps/
(nm*km) and 0.08 ps/(nm2*km). The characteristic of the fiber is tested by an optical network analyzer:

With the length of the fiber enlarged, the chromatic dispersion accumulated in the system distorted the signal
gradually and the received signal is more and more degraded so that compensation is needed at some point.

The following figures show the gain, phase and dispersion measured by the ONA; with an 80 km fiber, the gain is -16
dB for a 2 dB/km attenuation.

2003 - 2016 Lumerical Solutions, Inc


1120 Lumerical Knowledge Base

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1121

6.3.3.10.7 Couplers
Waveguide Coupler 1121
Waveguide Y Branch 1125
Star Coupler 1127

6.3.3.10.7.1 Waveguide Coupler

Symbol

Description
Optical waveguide coupler.

Ports
Name Type
port 1 Optical Signal
port 2 Optical Signal
port 3 Optical Signal

2003 - 2016 Lumerical Solutions, Inc


1122 Lumerical Knowledge Base

port 4 Optical Signal

Properties

General
Name Default value Default unit Value range
name Waveguide - -
Defines the name of the element. Coupler

annotate true - [true, false]


Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.

type Waveguide - -
Defines the element unique type (read Coupler
only).
description Optical - -
A brief description of the elements waveguide
functionality. coupler

prefix C - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.

Waveguide
Name Default value Default unit Value range
insertion loss 0 dB
Defines the insertion loss (attenuation).
input parameter coupling - [coupling
Defines whether to provide the power coefficient coefficient,
coupling coefficient, measurements, or length, table]
the cross over length.
length 0 m
The length of the waveguide.
load from file false - [true, false]
Defines whether or not to load
measurements from an input file or to
use the currently stored values.
conjugate false - [true, false]

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1123

Defines whether to use the conjugate


of the cross-coupling coefficients or
not.

Waveguide/Mode 1
Name Default value Default unit Value range
orthogonal identifier 1 1 -
The first identifier used to track an
orthogonal mode of an optical
waveguide. For most waveguide, two
orthogonal identifiers '1' and '2' are
available (with the default labels 'TE'
and 'TM' respectively).
label 1 TE - -
The label corresponding to the first
orthogonal identifier.
coupling coefficient 1 0.5 - [0, 1]
The power coupling coefficient
corresponding to the first orthogonal
identifier.
cross over length 1 1 m
The cross over coupling length
corresponding to the first orthogonal
identifier.
measurement filename 1 - - -
The file containing the frequency
dependent power coupling coefficients.
coupling coefficients 1 <2> [193.1e - -
The table containing the frequency +012, 0.5]
dependent power coupling coefficients.

Waveguide/Mode 2
Name Default value Default unit Value range
orthogonal identifier 2 2 -
The second identifier used to track an
orthogonal mode of an optical
waveguide. For most waveguide, two
orthogonal identifiers '1' and '2' are
available (with the default labels 'TE'
and 'TM' respectively).
label 2 TM - -
The label corresponding to the second
orthogonal identifier.
coupling coefficient 2 0.5 - [0, 1]
The power coupling coefficient
corresponding to the second
orthogonal identifier.
cross over length 2 1 m
The cross over coupling length

2003 - 2016 Lumerical Solutions, Inc


1124 Lumerical Knowledge Base

corresponding to the second


orthogonal identifier.
measurement filename 2 - - -
The file containing the frequency
dependent power coupling coefficients.
coupling coefficients 2 <2> [193.1e - -
The table containing the frequency +012, 0.5]
dependent power coupling coefficients.

Numerical
Name Default value Default unit Value range
window function rectangular - [rectangular,
Defines the window type for the digital hamming,
filter. hanning]

number of taps 64 -
Defines the number of coefficient for
digital filter.

Diagnostic
Name Default value Default unit Value range
run diagnostic false - [true, false]
Enables the frequency response of the
designed filter implementation and the
ideal frequency response to be
generated as results.
diagnostic size 1024 -
The number of frequency points used
when calculating the filter frequency
response.

Results
Name Description
diagnostic/response #/transmission The complex transmission vs. frequency
corresponding to the ideal and designed filter.
diagnostic/response #/gain The gain vs. frequency corresponding to the ideal
and designed filter.
diagnostic/response #/error Mean square error comparing the frequency
response of the designed filter implementation with
the ideal frequency response.

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1125

6.3.3.10.7.2 Waveguide Y Branch

Symbol

Description
Optical waveguide branch.

Ports
Name Type
port 1 Optical Signal
port 2 Optical Signal
port 3 Optical Signal

Properties
General
Name Default value Default unit Value range
name Waveguide Y - -
Defines the name of the element. Branch

annotate true - [true, false]


Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type Waveguide Y - -
Defines the element unique type (read Branch
only).
description Optical - -
A brief description of the elements waveguide
functionality. branch

prefix Y - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.

2003 - 2016 Lumerical Solutions, Inc


1126 Lumerical Knowledge Base

Standard
Name Default value Default unit Value range
insertion loss 0 dB
Defines the insertion loss (attenuation).

input parameter coupling - [coupling


Defines whether to provide the power coefficient coefficient,
coupling coefficient, measurements, or length]
the cross over length.
length 0 m
The length of the waveguide.

Waveguide
Name Default value Default unit Value range
phase shift 0 rad
Lower arm additional phase shift.

Waveguide/Mode 1
Name Default value Default unit Value range
orthogonal identifier 1 1 -
The first identifier used to track an
orthogonal mode of an optical
waveguide. For most waveguide, two
orthogonal identifiers '1' and '2' are
available (with the default labels 'TE'
and 'TM' respectively).
label 1 TE - -
The label corresponding to the first
orthogonal identifier.
coupling coefficient 1 0.5 - [0, 1]
The power coupling coefficient
corresponding to the first orthogonal
identifier.

cross over length 1 0 m


The cross over coupling length
corresponding to the first orthogonal
identifier.

Waveguide/Mode 2
Name Default value Default unit Value range
orthogonal identifier 2 2 -
The second identifier used to track an
orthogonal mode of an optical
waveguide. For most waveguide, two
orthogonal identifiers '1' and '2' are
available (with the default labels 'TE'
and 'TM' respectively).
label 2 TM - -
The label corresponding to the second

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1127

orthogonal identifier.
coupling coefficient 2 0.5 - [0, 1]
The power coupling coefficient
corresponding to the second
orthogonal identifier.
cross over length 2 0 m
The cross over coupling length
corresponding to the second
orthogonal identifier.

Diagnostic
Name Default value Default unit Value range
run diagnostic false - [true, false]
Enables the frequency response of the
designed filter implementation and the
ideal frequency response to be
generated as results.
diagnostic size 1024 -
The number of frequency points used
when calculating the filter frequency
response.

Results
Name Description
diagnostic/response #/transmission The complex transmission vs. frequency
corresponding to the ideal and designed filter.
diagnostic/response #/gain The gain vs. frequency corresponding to the ideal
and designed filter.
diagnostic/response #/error Mean square error comparing the frequency
response of the designed filter implementation with
the ideal frequency response.

6.3.3.10.7.3 Star Coupler

Symbol

Description
Star coupler.

Ports

2003 - 2016 Lumerical Solutions, Inc


1128 Lumerical Knowledge Base

Name Type
port 1 Optical Signal
port 2 Optical Signal
port 3 Optical Signal
port 4 Optical Signal

Properties
General
Name Default value Default unit Value range
name Star Coupler - -
Defines the name of the element.
annotate true - [true, false]
Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type Star Coupler - -
Defines the element unique type (read
only).
description Star coupler - -
A brief description of the elements
functionality.
prefix STAR - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.

Standard
Name Default value Default unit Value range
number of ports 2 -
Defines the number of input and output
ports for the element.
radius 10e-006 m
The radius of the star coupler.
angle 0.01 rad
Separation angle between adjacent
input and output ports.

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1129

frequency 193.1 THz*


Central frequency of the waveguide. A
Taylor expansion around this frequency *std. unit is Hz
is performed to estimate the
propagation transfer function of the
waveguide.

Waveguide/Mode 1
Name Default value Default unit Value range
orthogonal identifier 1 1 -
The first identifier used to track an
orthogonal mode of an optical
waveguide. For most waveguide, two
orthogonal identifiers '1' and '2' are
available (with the default labels 'TE'
and 'TM' respectively).

label 1 TE - -
The label corresponding to the first
orthogonal identifier.
loss 1 0 dB/m
The loss corresponding to the first
orthogonal identifier.
effective index 1 1 -
The effective index corresponding to
the first orthogonal identifier.
group index 1 1 -
The group index coefficient
corresponding to the first orthogonal
identifier.
dispersion 1 0 s/m/m
The dispersion coefficient
corresponding to the first orthogonal
identifier.

Waveguide/Mode 2
Name Default value Default unit Value range
orthogonal identifier 2 2 -
The second identifier used to track an
orthogonal mode of an optical
waveguide. For most waveguide, two
orthogonal identifiers '1' and '2' are
available (with the default labels 'TE'
and 'TM' respectively).
label 2 TM - -
The label corresponding to the second
orthogonal identifier.
loss 2 0 dB/m
The loss corresponding to the second
orthogonal identifier.

2003 - 2016 Lumerical Solutions, Inc


1130 Lumerical Knowledge Base

effective index 2 1 -
The effective index corresponding to
the second orthogonal identifier.
group index 2 1 -
The group index coefficient
corresponding to the second
orthogonal identifier.
dispersion 2 0 s/m/m
The dispersion coefficient
corresponding to the second
orthogonal identifier.

Waveguide/Mode 1/Thermal
Name Default value Default unit Value range

effective index temperature 0 /k


sensitivity 1
Defines the ratio between effective
index variation and temperature.
excess loss temperature 0 dB/K
sensitivity 1
Defines the ratio between loss variation
and temperature.

Waveguide/Mode 2/Thermal
Name Default value Default unit Value range
effective index temperature 0 /k
sensitivity 2
Defines the ratio between effective
index variation and temperature.
excess loss temperature 0 dB/K
sensitivity 2
Defines the ratio between loss variation
and temperature.

Thermal
Name Default value Default unit Value range
thermal effects false - [true, false]
Defines whether or not to enable
thermal effects.
temperature %temperature K
Defines the temperature. %

nominal temperature 300 K


Defines the nominal temperature where
temperature sensitivity values are
measured.
thermal fill factor 1 - [0, 1]
The waveguide length ratio affected by
the thermal effects.

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1131

Numerical
Name Default value Default unit Value range
bidirectional false - [true, false]
Defines whether or not to disable
bidirectional propagation. If 'false', only
propagation from 'left' to 'right' is
allowed
remove disconnected ports false - [true, false]
Defines whether or not to remove
disconnected ports from the internal s-
parameters.
window function rectangular - [rectangular,
Defines the window type for the digital hamming,
filter. hanning]

number of taps 64 -
Defines the number of coefficient for
digital filter.

Diagnostic
Name Default value Default unit Value range
run diagnostic false - [true, false]
Enables the frequency response of the
designed filter implementation and the
ideal frequency response to be
generated as results.
diagnostic size 1024 -
The number of frequency points used
when calculating the filter frequency
response.

Results
Name Description
diagnostic/response #/transmission The complex transmission vs. frequency
corresponding to the ideal and designed filter.
diagnostic/response #/gain The gain vs. frequency corresponding to the ideal
and designed filter.
diagnostic/response #/error Mean square error comparing the frequency
response of the designed filter implementation with
the ideal frequency response.

Implementation Details

2003 - 2016 Lumerical Solutions, Inc


1132 Lumerical Knowledge Base

The above figure [1] shows the geometry structure of the radiation region of the star coupler without the input and
output waveguides. The two surfaces, each with radius R are separated by distance R. The angle between adjacent
points is . Then the distance between the random two points P and Q is calculated as:

PQ 2 = R 2{(sin q1 - sin q2 ) 2 + [1 - (1 - cos q1 ) - (1 - cos q2 )]2 } (1)

Using the small angle approximation we can get the simplified equation for the distance as:

PQ R (1 - q1q2 ) (2)

Assume that P and Q are chosen from a set of N equally separated and symmetrically allocated points from the
surfaces, the p th and q th points, respectively. Then equation (2) can be written as equation (3):

q1 aq

q 2 ap

PQ R (1 - a 2 pq ) (3)

A
Assume a signal with amplitude p presented at the input surface point P, the output signal amplitude at point Q at
the output surface can be calculated based on the propagation equation as:

Ap (4)
Aq = exp{ - j bR (1 - a 2 pq )}
N

Reference
[1] Syms, R. R. A. "Silica-on silicon integrated optics." Advances in Integrated Optics. Springer US, 1994. 121-150.

6.3.3.10.8 Crossings
Waveguide Crossing 1132

6.3.3.10.8.1 Waveguide Crossing

Symbol

Description
Optical waveguide crossing.

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1133

Ports
Name Type
port 1 Optical Signal
port 2 Optical Signal
port 3 Optical Signal
port 4 Optical Signal

Properties
General
Name Default value Default unit Value range

name Waveguide - -
Defines the name of the element. Crossing

annotate true - [true, false]


Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type Waveguide - -
Defines the element unique type (read Crossing
only).
description Optical - -
A brief description of the elements waveguide
functionality. crossing

prefix WX - -
Defines the element name prefix.
model - - -
Defines the element model name.

library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.

Waveguide/Mode 1
Name Default value Default unit Value range
orthogonal identifier 1 1 -
The first identifier used to track an
orthogonal mode of an optical
waveguide. For most waveguide, two
orthogonal identifiers '1' and '2' are
available (with the default labels 'TE'
and 'TM' respectively).

2003 - 2016 Lumerical Solutions, Inc


1134 Lumerical Knowledge Base

label 1 TE - -
The label corresponding to the first
orthogonal identifier.
transmission 1 1 - [0, 1]
The transmission corresponding to the
first orthogonal identifier.
reflection 1 0 - [0, 1]
The reflection corresponding to the first
orthogonal identifier.
cross talk 1 0 - [0, 1]
The cross talk corresponding to the
first orthogonal identifier.

Waveguide/Mode 2
Name Default value Default unit Value range
orthogonal identifier 2 2 -
The second identifier used to track an
orthogonal mode of an optical
waveguide. For most waveguide, two
orthogonal identifiers '1' and '2' are
available (with the default labels 'TE'
and 'TM' respectively).
label 2 TM - -
The label corresponding to the second
orthogonal identifier.
transmission 2 1 - [0, 1]
The transmission corresponding to the
second orthogonal identifier.
reflection 2 0 - [0, 1]
The reflection corresponding to the
second orthogonal identifier.
cross talk 2 0 - [0, 1]
The cross talk corresponding to the
second orthogonal identifier.

Diagnostic
Name Default value Default unit Value range
run diagnostic - - [true, false]
Enables the frequency response of the
designed filter implementation and the
ideal frequency response to be
generated as results.
diagnostic size 0 -
The number of frequency points used
when calculating the filter frequency
response.

Results

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1135

Name Description
diagnostic/response #/transmission The complex transmission vs. frequency
corresponding to the ideal and designed filter.
diagnostic/response #/gain The gain vs. frequency corresponding to the ideal
and designed filter.
diagnostic/response #/error Mean square error comparing the frequency
response of the designed filter implementation with
the ideal frequency response.

Implementation Details
For the implementation detail of this element, please see the application example 8x8 Optical-Switch with
Waveguide-Crossing 2342 .

6.3.3.10.9 Resonators
Double Bus Ring Resonator 1135
Single Bus Ring Resonator 1139
Fabry-Perot Resonator 1145

6.3.3.10.9.1 Double Bus Ring Resonator

Symbol

Description
Optical double bus ring resonator.

Ports
Name Type
port 1 Optical Signal
port 2 Optical Signal
port 3 Optical Signal
port 4 Optical Signal

Properties
General
Name Default value Default unit Value range
name Double Bus - -
Defines the name of the element. Ring Resonator

annotate true - [true, false]


Defines whether or not to display
annotations on the schematic editor.

2003 - 2016 Lumerical Solutions, Inc


1136 Lumerical Knowledge Base

enabled true - [true, false]


Defines whether or not the element is
enabled.
type Double Bus - -
Defines the element unique type (read Ring Resonator
only).
description Optical double - -
A brief description of the elements bus ring
functionality. resonator

prefix RING - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.

Standard
Name Default value Default unit Value range
frequency 193.1 THz*
Central frequency of the waveguide. A
Taylor expansion around this frequency *std. unit is Hz
is performed to estimate the
propagation transfer function of the
waveguide.
length 10e-006 m
The length of the waveguide.

Waveguide/Mode 1
Name Default value Default unit Value range
orthogonal identifier 1 1 -
The first identifier used to track an
orthogonal mode of an optical
waveguide. For most waveguide, two
orthogonal identifiers '1' and '2' are
available (with the default labels 'TE'
and 'TM' respectively).
label 1 TE - -
The label corresponding to the first
orthogonal identifier.
loss 1 0 dB/m
The loss corresponding to the first
orthogonal identifier.
effective index 1 1 -
The effective index corresponding to

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1137

the first orthogonal identifier.


group index 1 1 -
The group index coefficient
corresponding to the first orthogonal
identifier.
dispersion 1 0 s/m/m
The dispersion coefficient
corresponding to the first orthogonal
identifier.

Waveguide/Mode 2
Name Default value Default unit Value range
orthogonal identifier 2 2 -
The second identifier used to track an
orthogonal mode of an optical
waveguide. For most waveguide, two
orthogonal identifiers '1' and '2' are
available (with the default labels 'TE'
and 'TM' respectively).
label 2 TM - -
The label corresponding to the second
orthogonal identifier.
loss 2 0 dB/m
The loss corresponding to the second
orthogonal identifier.
effective index 2 1 -
The effective index corresponding to
the second orthogonal identifier.
group index 2 1 -
The group index coefficient
corresponding to the second
orthogonal identifier.

dispersion 2 0 s/m/m
The dispersion coefficient
corresponding to the second
orthogonal identifier.

Waveguide/Mode 1/Coupler
Name Default value Default unit Value range
coupling coefficient 1 1 0.5 - [0, 1]
The power coupling coefficient
corresponding to the fist coupler and
the first orthogonal identifier.
coupling coefficient 1 2 0.5 - [0, 1]
The power coupling coefficient
corresponding to the second coupler
and the first orthogonal identifier.

Waveguide/Mode 2/Coupler

2003 - 2016 Lumerical Solutions, Inc


1138 Lumerical Knowledge Base

Name Default value Default unit Value range


coupling coefficient 2 1 0.5 - [0, 1]
The power coupling coefficient
corresponding to the fist coupler and
the second orthogonal identifier.
coupling coefficient 2 2 0.5 - [0, 1]
The power coupling coefficient
corresponding to the second coupler
and the second orthogonal identifier.

Waveguide/Mode 1/Thermal
Name Default value Default unit Value range
effective index temperature 0 /k
sensitivity 1
Defines the ratio between effective
index variation and temperature.
excess loss temperature 0 dB/K
sensitivity 1
Defines the ratio between loss variation
and temperature.

Waveguide/Mode 2/Thermal
Name Default value Default unit Value range
effective index temperature 0 /k
sensitivity 2
Defines the ratio between effective
index variation and temperature.
excess loss temperature 0 dB/K
sensitivity 2
Defines the ratio between loss variation
and temperature.

Thermal
Name Default value Default unit Value range
thermal effects false - [true, false]
Defines whether or not to enable
thermal effects.
temperature %temperature K
Defines the temperature. %

nominal temperature 300 K


Defines the nominal temperature where
temperature sensitivity values are
measured.
thermal fill factor 1 - [0, 1]
The waveguide length ratio affected by
the thermal effects.

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1139

Numerical
Name Default value Default unit Value range
window function rectangular - [rectangular,
Defines the window type for the digital hamming,
filter. hanning]

number of taps 64 -
Defines the number of coefficient for
digital filter.

Diagnostic
Name Default value Default unit Value range
run diagnostic false - [true, false]
Enables the frequency response of the
designed filter implementation and the
ideal frequency response to be
generated as results.
diagnostic size 1024 -
The number of frequency points used
when calculating the filter frequency
response.

Results
Name Description
diagnostic/response #/transmission The complex transmission vs. frequency
corresponding to the ideal and designed filter.
diagnostic/response #/gain The gain vs. frequency corresponding to the ideal
and designed filter.
diagnostic/response #/error Mean square error comparing the frequency
response of the designed filter implementation with
the ideal frequency response.

Implementation Details
Please see the Ring Resonator Tutorial 2301 for the implementation details of this element.

6.3.3.10.9.2 Single Bus Ring Resonator

Symbol

Description
Optical single bus ring resonator.

Ports
Name Type

2003 - 2016 Lumerical Solutions, Inc


1140 Lumerical Knowledge Base

port 1 Optical Signal


port 2 Optical Signal

Properties

General
Name Default value Default unit Value range
name Single Bus - -
Defines the name of the element. Ring Resonator

annotate true - [true, false]


Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type Single Bus - -
Defines the element unique type (read Ring Resonator
only).
description Optical single - -
A brief description of the elements bus ring
functionality. resonator

prefix RING - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.

Standard
Name Default value Default unit Value range
frequency 193.1 THz*
Central frequency of the waveguide. A
Taylor expansion around this frequency *std. unit is Hz
is performed to estimate the
propagation transfer function of the
waveguide.
length 10e-006 m
The length of the waveguide.

Waveguide/Mode 1
Name Default value Default unit Value range

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1141

orthogonal identifier 1 1 -
The first identifier used to track an
orthogonal mode of an optical
waveguide. For most waveguide, two
orthogonal identifiers '1' and '2' are
available (with the default labels 'TE'
and 'TM' respectively).
label 1 TE - -
The label corresponding to the first
orthogonal identifier.
loss 1 0 dB/m
The loss corresponding to the first
orthogonal identifier.
effective index 1 1 -
The effective index corresponding to
the first orthogonal identifier.
group index 1 1 -
The group index coefficient
corresponding to the first orthogonal
identifier.
dispersion 1 0 s/m/m
The dispersion coefficient
corresponding to the first orthogonal
identifier.
coupling coefficient 1 0.5 - [0, 1]
The power coupling coefficient
corresponding to the first orthogonal
identifier.

Waveguide/Mode 2
Name Default value Default unit Value range
orthogonal identifier 2 2 -
The second identifier used to track an
orthogonal mode of an optical
waveguide. For most waveguide, two
orthogonal identifiers '1' and '2' are
available (with the default labels 'TE'
and 'TM' respectively).
label 2 TM - -
The label corresponding to the second
orthogonal identifier.
loss 2 0 dB/m
The loss corresponding to the second
orthogonal identifier.
effective index 2 1 -
The effective index corresponding to
the second orthogonal identifier.
group index 2 1 -
The group index coefficient
corresponding to the second

2003 - 2016 Lumerical Solutions, Inc


1142 Lumerical Knowledge Base

orthogonal identifier.
dispersion 2 0 s/m/m
The dispersion coefficient
corresponding to the second
orthogonal identifier.
coupling coefficient 2 0.5 - [0, 1]
The power coupling coefficient
corresponding to the second
orthogonal identifier.

Waveguide/Mode 1/Thermal
Name Default value Default unit Value range
effective index temperature 0 /k
sensitivity 1
Defines the ratio between effective
index variation and temperature.
excess loss temperature 0 dB/K
sensitivity 1
Defines the ratio between loss variation
and temperature.

Waveguide/Mode 2/Thermal
Name Default value Default unit Value range
effective index temperature 0 /k
sensitivity 2
Defines the ratio between effective
index variation and temperature.
excess loss temperature 0 dB/K
sensitivity 2
Defines the ratio between loss variation
and temperature.

Thermal
Name Default value Default unit Value range
thermal effects false - [true, false]
Defines whether or not to enable
thermal effects.
temperature %temperature K
Defines the temperature. %

nominal temperature 300 K


Defines the nominal temperature where
temperature sensitivity values are
measured.
thermal fill factor 1 - [0, 1]
The waveguide length ratio affected by
the thermal effects.

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1143

Numerical
Name Default value Default unit Value range
window function rectangular - [rectangular,
Defines the window type for the digital hamming,
filter. hanning]

number of taps 64 -
Defines the number of coefficient for
digital filter.

Diagnostic
Name Default value Default unit Value range
run diagnostic false - [true, false]
Enables the frequency response of the
designed filter implementation and the
ideal frequency response to be
generated as results.
diagnostic size 1024 -
The number of frequency points used
when calculating the filter frequency
response.

Results
Name Description
diagnostic/response #/transmission The complex transmission vs. frequency
corresponding to the ideal and designed filter.
diagnostic/response #/gain The gain vs. frequency corresponding to the ideal
and designed filter.
diagnostic/response #/error Mean square error comparing the frequency
response of the designed filter implementation with
the ideal frequency response.

Implementation Details
An optical ring resonator consists of a waveguide which looped back on itself, and the resonance occurs when the
circumference of the ring is exactly a multiple number of wavelengths. Hence a ring resonator supports multiple
resonances, and the free spectral range (FSR) depends on the resonator's circumference.

commonly there is an adjacent waveguide bus beside the ring resonator to couple the light out. For a single bus ring
resonator, the transmission spectrum shows dips around the resonance wavelengths, hence it behaves like a
spectral filter. In this way, the single bus ring resonator can be used in optical communication systems for
applications, especially in wavelength division multiplexing (WDM) systems. Please see the WDM application
example 2395 for more information.

2003 - 2016 Lumerical Solutions, Inc


1144 Lumerical Knowledge Base

Given the propagation constant and the circumference L of the ring, the working principle of the single bus ring
resonator can be deducted by the following equations:

j = b L

E pass a - te- i j
= e j ( p +j )
Einput 1 - taei j

Tpass a 2 - 2at cos j + t 2


=
Tinput 1 - 2at cos j + (at ) 2

where t is the self-coupling coefficient and theoretically, t2 + k 2 = 1; a is the amplitude transmission for single pass,
which consists of propagation loss in the ring and coupling loss.

The figures below show the sweep results of the phase delay and gain/loss for the system in the example file
single_bus_ring_resonator.icp. The gain/loss are measured for 0.1 coupling coefficient and the phase
delays are measured for the coupling coefficients sweep through the values indicated in the plot.

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1145

References
[1] Bogaerts, Wim, et al. "Silicon microring resonators." Laser & Photonics Reviews 6.1 (2012): 47-73.

6.3.3.10.9.3 Fabry-Perot Resonator

Symbol

2003 - 2016 Lumerical Solutions, Inc


1146 Lumerical Knowledge Base

Description
Fabry-Perot resonator.

Ports
Name Type
port 1 Optical Signal
port 2 Optical Signal

Properties
General
Name Default value Default unit Value range
name Fabry-Perot - -
Defines the name of the element. Resonator

annotate true - [true, false]


Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type Fabry-Perot - -
Defines the element unique type (read Resonator
only).
description Fabry-Perot - -
A brief description of the elements resonator
functionality.
prefix FPR - -
Defines the element name prefix.
model - - -
Defines the element model name.

library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.

Standard
Name Default value Default unit Value range
frequency 193.1 THz*
Central frequency of the waveguide. A
Taylor expansion around this frequency *std. unit is Hz
is performed to estimate the
propagation transfer function of the
waveguide.

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1147

length 10e-006 m
The length of the waveguide.
reflectivity 0.99 - [0, 1]
Defines the reflectivity of the mirror.

Waveguide/Mode 1
Name Default value Default unit Value range
orthogonal identifier 1 1 -
The first identifier used to track an
orthogonal mode of an optical
waveguide. For most waveguide, two
orthogonal identifiers '1' and '2' are
available (with the default labels 'TE'
and 'TM' respectively).

label 1 TE - -
The label corresponding to the first
orthogonal identifier.
loss 1 0 dB/m
The loss corresponding to the first
orthogonal identifier.
effective index 1 1 -
The effective index corresponding to
the first orthogonal identifier.
group index 1 1 -
The group index coefficient
corresponding to the first orthogonal
identifier.
dispersion 1 0 s/m/m
The dispersion coefficient
corresponding to the first orthogonal
identifier.

Waveguide/Mode 2
Name Default value Default unit Value range
orthogonal identifier 2 2 -
The second identifier used to track an
orthogonal mode of an optical
waveguide. For most waveguide, two
orthogonal identifiers '1' and '2' are
available (with the default labels 'TE'
and 'TM' respectively).
label 2 TM - -
The label corresponding to the second
orthogonal identifier.
loss 2 0 dB/m
The loss corresponding to the second
orthogonal identifier.
effective index 2 1 -

2003 - 2016 Lumerical Solutions, Inc


1148 Lumerical Knowledge Base

The effective index corresponding to


the second orthogonal identifier.
group index 2 1 -
The group index coefficient
corresponding to the second
orthogonal identifier.
dispersion 2 0 s/m/m
The dispersion coefficient
corresponding to the second
orthogonal identifier.

Waveguide/Mode 1/Thermal
Name Default value Default unit Value range
effective index temperature 0 /k
sensitivity 1
Defines the ratio between effective
index variation and temperature.
excess loss temperature 0 dB/K
sensitivity 1
Defines the ratio between loss variation
and temperature.

Waveguide/Mode 2/Thermal
Name Default value Default unit Value range
effective index temperature 0 /k
sensitivity 2
Defines the ratio between effective
index variation and temperature.
excess loss temperature 0 dB/K
sensitivity 2
Defines the ratio between loss variation
and temperature.

Thermal
Name Default value Default unit Value range
thermal effects false - [true, false]
Defines whether or not to enable
thermal effects.
temperature %temperature K
Defines the temperature. %

nominal temperature 300 K


Defines the nominal temperature where
temperature sensitivity values are
measured.
thermal fill factor 1 - [0, 1]
The waveguide length ratio affected by
the thermal effects.

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1149

Numerical
Name Default value Default unit Value range
window function rectangular - [rectangular,
Defines the window type for the digital hamming,
filter. hanning]

number of taps 64 -
Defines the number of coefficient for
digital filter.

Diagnostic
Name Default value Default unit Value range
run diagnostic false - [true, false]
Enables the frequency response of the
designed filter implementation and the
ideal frequency response to be
generated as results.
diagnostic size 1024 -
The number of frequency points used
when calculating the filter frequency
response.

Results
Name Description
diagnostic/response #/transmission The complex transmission vs. frequency
corresponding to the ideal and designed filter.
diagnostic/response #/gain The gain vs. frequency corresponding to the ideal
and designed filter.
diagnostic/response #/error Mean square error comparing the frequency
response of the designed filter implementation with
the ideal frequency response.

Implementation Details
Please see the Fabry-Perot Tutorial 2294 for the implementation details of this elememt.

6.3.3.10.10 Interferometers
Mach Zehnder Interferometer 1149

6.3.3.10.10.1 Mach Zehnder Interferometer

Symbol

Description
Mach Zehnder interferometer.

2003 - 2016 Lumerical Solutions, Inc


1150 Lumerical Knowledge Base

Ports
Name Type
port 1 Optical Signal
port 2 Optical Signal
port 3 Optical Signal
port 4 Optical Signal

Properties
General
Name Default value Default unit Value range

name Mach Zehnder - -


Defines the name of the element. Interferometer

annotate true - [true, false]


Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type Mach Zehnder - -
Defines the element unique type (read Interferometer
only).
description Mach Zehnder - -
A brief description of the elements interferometer
functionality.
prefix MZI - -
Defines the element name prefix.
model - - -
Defines the element model name.

library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.

Standard
Name Default value Default unit Value range
frequency 193.1 THz*
Central frequency of the waveguide. A
Taylor expansion around this frequency *std. unit is Hz
is performed to estimate the
propagation transfer function of the
waveguide.

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1151

length 1 10e-006 m
The length of the first waveguide.
length 2 10e-006 m
The length of the second waveguide.

Waveguide/Mode 1
Name Default value Default unit Value range
orthogonal identifier 1 1 -
The first identifier used to track an
orthogonal mode of an optical
waveguide. For most waveguide, two
orthogonal identifiers '1' and '2' are
available (with the default labels 'TE'
and 'TM' respectively).

label 1 TE - -
The label corresponding to the first
orthogonal identifier.
loss 1 0 dB/m
The loss corresponding to the first
orthogonal identifier.
effective index 1 1 -
The effective index corresponding to
the first orthogonal identifier.
group index 1 1 -
The group index coefficient
corresponding to the first orthogonal
identifier.
dispersion 1 0 s/m/m
The dispersion coefficient
corresponding to the first orthogonal
identifier.

Waveguide/Mode 2
Name Default value Default unit Value range
orthogonal identifier 2 2 -
The second identifier used to track an
orthogonal mode of an optical
waveguide. For most waveguide, two
orthogonal identifiers '1' and '2' are
available (with the default labels 'TE'
and 'TM' respectively).
label 2 TM - -
The label corresponding to the second
orthogonal identifier.
loss 2 0 dB/m
The loss corresponding to the second
orthogonal identifier.
effective index 2 1 -

2003 - 2016 Lumerical Solutions, Inc


1152 Lumerical Knowledge Base

The effective index corresponding to


the second orthogonal identifier.
group index 2 1 -
The group index coefficient
corresponding to the second
orthogonal identifier.
dispersion 2 0 s/m/m
The dispersion coefficient
corresponding to the second
orthogonal identifier.

Waveguide/Mode 1/Coupler
Name Default value Default unit Value range
coupling coefficient 1 1 0.5 - [0, 1]
The power coupling coefficient
corresponding to the fist coupler and
the first orthogonal identifier.
coupling coefficient 1 2 0.5 - [0, 1]
The power coupling coefficient
corresponding to the second coupler
and the first orthogonal identifier.

Waveguide/Mode 2/Coupler
Name Default value Default unit Value range
coupling coefficient 2 1 0.5 - [0, 1]
The power coupling coefficient
corresponding to the fist coupler and
the second orthogonal identifier.
coupling coefficient 2 2 0.5 - [0, 1]
The power coupling coefficient
corresponding to the second coupler
and the second orthogonal identifier.

Waveguide/Mode 1/Thermal
Name Default value Default unit Value range
effective index temperature 0 /k
sensitivity 1
Defines the ratio between effective
index variation and temperature.
excess loss temperature 0 dB/K
sensitivity 1
Defines the ratio between loss variation
and temperature.

Waveguide/Mode 2/Thermal
Name Default value Default unit Value range
effective index temperature 0 /k

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1153

sensitivity 2
Defines the ratio between effective
index variation and temperature.
excess loss temperature 0 dB/K
sensitivity 2
Defines the ratio between loss variation
and temperature.

Thermal
Name Default value Default unit Value range
thermal effects false - [true, false]
Defines whether or not to enable
thermal effects.
temperature %temperature K
Defines the temperature. %

nominal temperature 300 K


Defines the nominal temperature where
temperature sensitivity values are
measured.
thermal fill factor 1 - [0, 1]
The waveguide length ratio affected by
the thermal effects.

Numerical
Name Default value Default unit Value range
window function rectangular - [rectangular,
Defines the window type for the digital hamming,
filter. hanning]

number of taps 64 -
Defines the number of coefficient for
digital filter.

Diagnostic
Name Default value Default unit Value range
run diagnostic false - [true, false]
Enables the frequency response of the
designed filter implementation and the
ideal frequency response to be
generated as results.
diagnostic size 1024 -
The number of frequency points used
when calculating the filter frequency
response.

Results
Name Description

2003 - 2016 Lumerical Solutions, Inc


1154 Lumerical Knowledge Base

diagnostic/response #/transmission The complex transmission vs. frequency


corresponding to the ideal and designed filter.
diagnostic/response #/gain The gain vs. frequency corresponding to the ideal
and designed filter.
diagnostic/response #/error Mean square error comparing the frequency
response of the designed filter implementation with
the ideal frequency response.

6.3.3.10.11 Gratings
Bragg Grating 1154
Sampled Bragg Grating 1159

6.3.3.10.11.1 Bragg Grating

Symbol

Description
Waveguide Bragg grating.

Ports
Name Type
port 1 Optical Signal
port 2 Optical Signal

Properties

General
Name Default value Default unit Value range
name Bragg Grating - -
Defines the name of the element.
annotate true - [true, false]
Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type Bragg Grating - -
Defines the element unique type (read
only).
description Waveguide - -
A brief description of the elements Bragg grating
functionality.

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1155

prefix WBG - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.

Standard
Name Default value Default unit Value range
length 0.005 m
The length of the waveguide.
input parameter Bragg - [grating period,
Defines whether to provide the grating frequency Bragg
period or the Bragg frequency. frequency]

period 0.53e-006 m
The grating period.
frequency 1550 nm* (2.99792e-083,
Central frequency of operation.
*std. unit is Hz

coupling parameter effective index - [effective index


Defines whether to provide the grating change change,
coupling coefficient or the effective coupling
index change. coefficient]

effective index change ac 0.0004 -


The effective index change over the
grating length.
effective index change dc 0 -
The background effective index change
over the grating length.
grating coupling coefficient 800 1/m
Defines the grating coupling coefficient.
phase shift 0 rad
The phase shift for a phase shifted
grating.

Waveguide/Mode 1
Name Default value Default unit Value range
orthogonal identifier 1 1 -
The first identifier used to track an
orthogonal mode of an optical
waveguide. For most waveguide, two
orthogonal identifiers '1' and '2' are
available (with the default labels 'TE'

2003 - 2016 Lumerical Solutions, Inc


1156 Lumerical Knowledge Base

and 'TM' respectively).


label 1 TE - -
The label corresponding to the first
orthogonal identifier.
loss 1 0 dB/m
The loss corresponding to the first
orthogonal identifier.
effective index 1 1.447 -
The effective index corresponding to
the first orthogonal identifier.
group index 1 1.447 -
The group index coefficient
corresponding to the first orthogonal
identifier.
facet reflectivity left 1 0 - [0, 1]
Defines the facet reflectivity left.
facet phase left 1 0 rad
Defines the facet phase left.
facet reflectivity right 1 0 - [0, 1]
Defines the facet reflectivity right.
facet phase right 1 0 rad
Defines the facet phase right.

Waveguide/Mode 2
Name Default value Default unit Value range
orthogonal identifier 2 2 -
The second identifier used to track an
orthogonal mode of an optical
waveguide. For most waveguide, two
orthogonal identifiers '1' and '2' are
available (with the default labels 'TE'
and 'TM' respectively).
label 2 TM - -
The label corresponding to the second
orthogonal identifier.
loss 2 0 dB/m
The loss corresponding to the second
orthogonal identifier.
effective index 2 1.447 -
The effective index corresponding to
the second orthogonal identifier.
group index 2 1.447 -
The group index coefficient
corresponding to the second
orthogonal identifier.
facet reflectivity left 2 0 - [0, 1]
Defines the facet reflectivity left.

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1157

facet phase left 2 0 rad


Defines the facet phase left.
facet reflectivity right 2 0 - [0, 1]
Defines the facet reflectivity right.
facet phase right 2 0 rad
Defines the facet phase right.

Waveguide/Apodization
Name Default value Default unit Value range
apodization function uniform - [uniform, user
Defines the grating apodization type. defined,
Gaussian,
raised cosine,
hyperbolic
tangent, sinc]

apodization parameter 0.5 -


The grating apodization parameter.
apodization table <2,2> [0, 1, - -
Table containing normalized length 1...]
versus apodization parameters.
load apodization from file false - [true, false]
Defines whether or not to load
apodization parameters from an input
file or to use the currently stored
values.
apodization filename apodization.dat - -
The file containing the normalized
length versus apodization parameter
values. Refer to the Implementation
Details section for the format expected.

Waveguide/Chirp
Name Default value Default unit Value range
chirp function none - [none, user
Defines the grating chirp type. defined, linear
chirp parameter,
linear chirp
coefficient]
chirp parameter 0 -
The chirp parameter for a linear chirped
grating.
chirp coefficient 0 -
The chirp coefficient (d/dz) for a linear
chirped grating.
chirp table <2,2> [0, 1, - -
Table containing normalized length 0...]
versus chirp coefficients.
load chirp from file false - [true, false]

2003 - 2016 Lumerical Solutions, Inc


1158 Lumerical Knowledge Base

Defines whether or not to load chirp


coefficients from an input file or to use
the currently stored values.
chirp filename chirp.dat - -
The file containing the normalized
length versus chirp coefficient values.
Refer to the Implementation Details
section for the format expected.

Numerical
Name Default value Default unit Value range
number of steps 50 -
The number of discretization steps for
a chirped or apodized grating.
digital filter false - [true, false]
Defines whether or not to use a digital
filter to represent the element transfer
function in time domain.
window function rectangular - [rectangular,
Defines the window type for the digital hamming,
filter. hanning]

number of taps 64 -
Defines the number of coefficient for
digital filter.

Diagnostic
Name Default value Default unit Value range
run diagnostic false - [true, false]
Enables the frequency response of the
designed filter implementation and the
ideal frequency response to be
generated as results.

diagnostic size 1024 -


The number of frequency points used
when calculating the filter frequency
response.

Results
Name Description
diagnostic/response #/transmission The complex transmission vs. frequency
corresponding to the ideal and designed filter.
diagnostic/response #/gain The gain vs. frequency corresponding to the ideal
and designed filter.
diagnostic/response #/error Mean square error comparing the frequency
response of the designed filter implementation with
the ideal frequency response.

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1159

6.3.3.10.11.2 Sampled Bragg Grating

Symbol

Description
Waveguide sampled Bragg grating.

Ports
Name Type
port 1 Optical Signal
port 2 Optical Signal

Properties
General
Name Default value Default unit Value range
name Sampled Bragg - -
Defines the name of the element. Grating

annotate true - [true, false]


Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type Sampled Bragg - -
Defines the element unique type (read Grating
only).

description Waveguide - -
A brief description of the elements sampled Bragg
functionality. grating

prefix WBG - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.

Standard

2003 - 2016 Lumerical Solutions, Inc


1160 Lumerical Knowledge Base

Name Default value Default unit Value range


length 0.005 m
The length of the waveguide.
duty cycle 0.2 - [0, 1]
The sampled grating duty cycle.
sampling number 1 -
The number of sampling periods
withing the grating length.
input parameter Bragg - [grating period,
Defines whether to provide the grating frequency Bragg
period or the Bragg frequency. frequency]

period 0.53e-006 m
The grating period.
frequency 1550 nm* (2.99792e-083,
Central frequency of operation.
*std. unit is Hz

effective index change ac 0.0004 -


The effective index change over the
grating length.
effective index change dc 0 -
The background effective index change
over the grating length.

Waveguide/Mode 1
Name Default value Default unit Value range
orthogonal identifier 1 1 -
The first identifier used to track an
orthogonal mode of an optical
waveguide. For most waveguide, two
orthogonal identifiers '1' and '2' are
available (with the default labels 'TE'
and 'TM' respectively).

label 1 TE - -
The label corresponding to the first
orthogonal identifier.
loss 1 0 dB/m
The loss corresponding to the first
orthogonal identifier.
effective index 1 1.477 -
The effective index corresponding to
the first orthogonal identifier.
group index 1 1.447 -
The group index coefficient
corresponding to the first orthogonal
identifier.

Waveguide/Mode 2
Name Default value Default unit Value range

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1161

orthogonal identifier 2 2 -
The second identifier used to track an
orthogonal mode of an optical
waveguide. For most waveguide, two
orthogonal identifiers '1' and '2' are
available (with the default labels 'TE'
and 'TM' respectively).
label 2 TM - -
The label corresponding to the second
orthogonal identifier.
loss 2 0 dB/m
The loss corresponding to the second
orthogonal identifier.
effective index 2 1.477 -
The effective index corresponding to
the second orthogonal identifier.
group index 2 1.447 -
The group index coefficient
corresponding to the second
orthogonal identifier.

Numerical
Name Default value Default unit Value range
window function rectangular - [rectangular,
Defines the window type for the digital hamming,
filter. hanning]

number of taps 64 -
Defines the number of coefficient for
digital filter.

Diagnostic
Name Default value Default unit Value range

run diagnostic false - [true, false]


Enables the frequency response of the
designed filter implementation and the
ideal frequency response to be
generated as results.
diagnostic size 1024 -
The number of frequency points used
when calculating the filter frequency
response.

Results
Name Description
diagnostic/response #/transmission The complex transmission vs. frequency
corresponding to the ideal and designed filter.
diagnostic/response #/gain The gain vs. frequency corresponding to the ideal
and designed filter.

2003 - 2016 Lumerical Solutions, Inc


1162 Lumerical Knowledge Base

diagnostic/response #/error Mean square error comparing the frequency


response of the designed filter implementation with
the ideal frequency response.

6.3.3.10.12 Bends
Waveguide Arc Bend 1162
Waveguide Sine Bend 1166

6.3.3.10.12.1 Waveguide Arc Bend

Symbol

Description
The model of a constant bending radius waveguide.

Ports
Name Type
port 1 Optical Signal
port 2 Optical Signal

Properties

General
Name Default value Default unit Value range
name Waveguide Arc - -
Defines the name of the element. Bend

annotate true - [true, false]


Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type Waveguide Arc - -
Defines the element unique type (read Bend
only).
description The model of a - -
A brief description of the elements constant
functionality. bending radius
waveguide
prefix WGD - -
Defines the element name prefix.
model - - -

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1163

Defines the element model name.


library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.

Standard
Name Default value Default unit Value range
frequency 193.1 THz*
Central frequency of the waveguide. A
Taylor expansion around this frequency *std. unit is Hz
is performed to estimate the
propagation transfer function of the
waveguide.
angle 0 rad
The bending angle of the waveguide.
radius 0 m
The radius of curvature of the
waveguide.

Waveguide/Mode 1
Name Default value Default unit Value range
orthogonal identifier 1 1 -
The first identifier used to track an
orthogonal mode of an optical
waveguide. For most waveguide, two
orthogonal identifiers '1' and '2' are
available (with the default labels 'TE'
and 'TM' respectively).
label 1 TE - -
The label corresponding to the first
orthogonal identifier.
loss 1 0 dB
The loss corresponding to the first
orthogonal identifier.
effective index 1 1 -
The effective index corresponding to
the first orthogonal identifier.
group index 1 1 -
The group index coefficient
corresponding to the first orthogonal
identifier.
dispersion 1 0 s/m/m
The dispersion coefficient
corresponding to the first orthogonal
identifier.

2003 - 2016 Lumerical Solutions, Inc


1164 Lumerical Knowledge Base

Waveguide/Mode 2
Name Default value Default unit Value range
orthogonal identifier 2 2 -
The second identifier used to track an
orthogonal mode of an optical
waveguide. For most waveguide, two
orthogonal identifiers '1' and '2' are
available (with the default labels 'TE'
and 'TM' respectively).
label 2 TM - -
The label corresponding to the second
orthogonal identifier.
loss 2 0 dB
The loss corresponding to the second
orthogonal identifier.
effective index 2 1 -
The effective index corresponding to
the second orthogonal identifier.
group index 2 1 -
The group index coefficient
corresponding to the second
orthogonal identifier.
dispersion 2 0 s/m/m
The dispersion coefficient
corresponding to the second
orthogonal identifier.

Waveguide/Mode 1/Thermal
Name Default value Default unit Value range
effective index temperature 0 /k
sensitivity 1
Defines the ratio between effective
index variation and temperature.
excess loss temperature 0 dB/K
sensitivity 1
Defines the ratio between loss variation
and temperature.

Waveguide/Mode 2/Thermal
Name Default value Default unit Value range
effective index temperature 0 /k
sensitivity 2
Defines the ratio between effective
index variation and temperature.
excess loss temperature 0 dB/K
sensitivity 2
Defines the ratio between loss variation

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1165

and temperature.

Thermal
Name Default value Default unit Value range

thermal effects false - [true, false]


Defines whether or not to enable
thermal effects.
temperature %temperature K
Defines the temperature. %

nominal temperature 300 K


Defines the nominal temperature where
temperature sensitivity values are
measured.
thermal fill factor 1 - [0, 1]
The waveguide length ratio affected by
the thermal effects.

Numerical
Name Default value Default unit Value range
digital filter false - [true, false]
Defines whether or not to use a digital
filter to represent the element transfer
function in time domain.
window function rectangular - [rectangular,
Defines the window type for the digital hamming,
filter. hanning]

number of taps 64 -
Defines the number of coefficient for
digital filter.
fractional delay true - [true, false]
Defines whether to use a fractional
delay filter or force the delay to be an
integer multiple of the sample period.
delay compensation 0 -
The number of delays to compensate
for latency.

Diagnostic
Name Default value Default unit Value range
run diagnostic false - [true, false]
Enables the frequency response of the
designed filter implementation and the
ideal frequency response to be
generated as results.
diagnostic size 1024 -
The number of frequency points used
when calculating the filter frequency

2003 - 2016 Lumerical Solutions, Inc


1166 Lumerical Knowledge Base

response.

Results
Name Description
diagnostic/response #/transmission The complex transmission vs. frequency
corresponding to the ideal and designed filter.
diagnostic/response #/gain The gain vs. frequency corresponding to the ideal
and designed filter.
diagnostic/response #/error Mean square error comparing the frequency
response of the designed filter implementation with
the ideal frequency response.

Implementation Details

From release 2016b, this element started to include the option of fractional delay compensation. For more
information on this feature, please visit the page Fractional delay compensation 1103 .

6.3.3.10.12.2 Waveguide Sine Bend

Symbol

Description
The model of a sine bending waveguide.

Ports
Name Type
port 1 Optical Signal
port 2 Optical Signal

Properties
General
Name Default value Default unit Value range
name Waveguide - -
Defines the name of the element. Sine Bend

annotate true - [true, false]


Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type Waveguide - -
Defines the element unique type (read Sine Bend

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1167

only).
description The model of a - -
A brief description of the elements sine bending
functionality. waveguide

prefix WGD - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.

Standard
Name Default value Default unit Value range
frequency 193.1 THz*
Central frequency of the waveguide. A
Taylor expansion around this frequency *std. unit is Hz
is performed to estimate the
propagation transfer function of the
waveguide.
length 1e-006 m
The length of the waveguide bend.
height 2e-006 m
The height of the waveguide bend.

Waveguide/Mode 1
Name Default value Default unit Value range
orthogonal identifier 1 1 -
The first identifier used to track an
orthogonal mode of an optical
waveguide. For most waveguide, two
orthogonal identifiers '1' and '2' are
available (with the default labels 'TE'
and 'TM' respectively).
label 1 TE - -
The label corresponding to the first
orthogonal identifier.
loss 1 0 dB
The loss corresponding to the first
orthogonal identifier.
effective index 1 1 -
The effective index corresponding to
the first orthogonal identifier.
group index 1 1 -

2003 - 2016 Lumerical Solutions, Inc


1168 Lumerical Knowledge Base

The group index coefficient


corresponding to the first orthogonal
identifier.
dispersion 1 0 s/m/m
The dispersion coefficient
corresponding to the first orthogonal
identifier.

Waveguide/Mode 2
Name Default value Default unit Value range
orthogonal identifier 2 2 -
The second identifier used to track an
orthogonal mode of an optical
waveguide. For most waveguide, two
orthogonal identifiers '1' and '2' are
available (with the default labels 'TE'
and 'TM' respectively).
label 2 TM - -
The label corresponding to the second
orthogonal identifier.
loss 2 0 dB
The loss corresponding to the second
orthogonal identifier.
effective index 2 1 -
The effective index corresponding to
the second orthogonal identifier.
group index 2 1 -
The group index coefficient
corresponding to the second
orthogonal identifier.
dispersion 2 0 s/m/m
The dispersion coefficient
corresponding to the second
orthogonal identifier.

Waveguide/Mode 1/Thermal
Name Default value Default unit Value range
effective index temperature 0 /k
sensitivity 1
Defines the ratio between effective
index variation and temperature.
excess loss temperature 0 dB/K
sensitivity 1
Defines the ratio between loss variation
and temperature.

Waveguide/Mode 2/Thermal
Name Default value Default unit Value range

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1169

effective index temperature 0 /k


sensitivity 2
Defines the ratio between effective
index variation and temperature.
excess loss temperature 0 dB/K
sensitivity 2
Defines the ratio between loss variation
and temperature.

Thermal
Name Default value Default unit Value range
thermal effects false - [true, false]
Defines whether or not to enable
thermal effects.

temperature %temperature K
Defines the temperature. %

nominal temperature 300 K


Defines the nominal temperature where
temperature sensitivity values are
measured.
thermal fill factor 1 - [0, 1]
The waveguide length ratio affected by
the thermal effects.

Numerical
Name Default value Default unit Value range
digital filter false - [true, false]
Defines whether or not to use a digital
filter to represent the element transfer
function in time domain.
window function rectangular - [rectangular,
Defines the window type for the digital hamming,
filter. hanning]

number of taps 64 -
Defines the number of coefficient for
digital filter.
fractional delay true - [true, false]
Defines whether to use a fractional
delay filter or force the delay to be an
integer multiple of the sample period.
delay compensation 0 -
The number of delays to compensate
for latency.

Diagnostic
Name Default value Default unit Value range
run diagnostic false - [true, false]

2003 - 2016 Lumerical Solutions, Inc


1170 Lumerical Knowledge Base

Enables the frequency response of the


designed filter implementation and the
ideal frequency response to be
generated as results.
diagnostic size 1024 -
The number of frequency points used
when calculating the filter frequency
response.

Results
Name Description
diagnostic/response #/transmission The complex transmission vs. frequency
corresponding to the ideal and designed filter.
diagnostic/response #/gain The gain vs. frequency corresponding to the ideal
and designed filter.
diagnostic/response #/error Mean square error comparing the frequency
response of the designed filter implementation with
the ideal frequency response.

Implementation Details

From release 2016b, this element started to include the option of fractional delay compensation. For more
information on this feature, please visit the page Fractional delay compensation 1103 .

6.3.3.11 Amplifiers
Electrical
Electrical Amplfier 1170

Optical
Optical Amplfier 1173

6.3.3.11.1 Electrical Amplifier

Symbol

Description
Electrical amplifier.

Ports
Name Type
input Electrical Signal
output Electrical Signal

Properties

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1171

General
Name Default value Default unit Value range
name Electrical - -
Defines the name of the element. Amplifier

annotate true - [true, false]


Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type Electrical - -
Defines the element unique type (read Amplifier
only).

description Electrical - -
A brief description of the elements amplifier
functionality.
prefix AMP - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.

Standard
Name Default value Default unit Value range
gain 20 dB
Defines the gain the amplifier.
noise spectral density 10e-018 W/Hz
The output signal noise power spectral
density.

Numerical
Name Default value Default unit Value range
enable noise true - [true, false]
Defines whether or not to add ASE
noise to the output signal.
automatic seed true - [true, false]
Defines whether or not to automatically
create an unique seed value for each
instance of this element. The seed will
be the same for each simulation run.

2003 - 2016 Lumerical Solutions, Inc


1172 Lumerical Knowledge Base

seed 1 -
The value of the seed for the random
number generator. A value zero
recreates an unique seed for each
simulation run.

Diagnostic
Name Default value Default unit Value range
run diagnostic false - [true, false]
Enables the frequency response of the
designed filter implementation and the
ideal frequency response to be
generated as results.
diagnostic size 1024 -
The number of frequency points used
when calculating the filter frequency
response.

Results
Name Description
diagnostic/response #/transmission The complex transmission vs. frequency
corresponding to the ideal and designed filter.
diagnostic/response #/gain The gain vs. frequency corresponding to the ideal
and designed filter.
diagnostic/response #/error Mean square error comparing the frequency
response of the designed filter implementation with
the ideal frequency response.

Implementation Details
The element Electrical Amplifier amplifies the signal inputs to it, at the same time, it will add noise to the signal.
Please see the example file amplifier_example.icp for more information on its implementation detail. The
following figure is the system in the example file:

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1173

The standard property "gain" defines the amplification gain of the input signal and "noise spectral density" defines
the noise added by the amplifier. The figures below show the amplification effect of the electrical amplifier in time and
frequency domain.

6.3.3.11.2 Optical Amplifier

Symbol

Description
Optical amplifier.

2003 - 2016 Lumerical Solutions, Inc


1174 Lumerical Knowledge Base

Ports
Name Type
input Optical Signal
output Optical Signal

Properties
General
Name Default value Default unit Value range
name Optical - -
Defines the name of the element. Amplifier

annotate true - [true, false]


Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type Optical - -
Defines the element unique type (read Amplifier
only).
description Optical - -
A brief description of the elements amplifier
functionality.
prefix AMP - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.

Standard
Name Default value Default unit Value range
frequency 193.1 THz*
Central frequency of operation.
*std. unit is Hz

gain 20 dB
Defines the gain the amplifier.
noise figure 4 dB
Defines the noise figure of the amplifier.
noise bandwidth 5 THz*

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1175

The ASE noise spectral range.


*std. unit is Hz

Waveguide/Mode 1
Name Default value Default unit Value range
orthogonal identifier 1 1 -
The first identifier used to track an
orthogonal mode of an optical
waveguide. For most waveguide, two
orthogonal identifiers '1' and '2' are
available (with the default labels 'TE'
and 'TM' respectively).
label 1 X - -
The label corresponding to the first
orthogonal identifier.

Waveguide/Mode 2
Name Default value Default unit Value range
orthogonal identifier 2 2 -
The second identifier used to track an
orthogonal mode of an optical
waveguide. For most waveguide, two
orthogonal identifiers '1' and '2' are
available (with the default labels 'TE'
and 'TM' respectively).
label 2 Y - -
The label corresponding to the second
orthogonal identifier.

Numerical
Name Default value Default unit Value range
enable noise true - [true, false]
Defines whether or not to add ASE
noise to the output signal.
automatic seed true - [true, false]
Defines whether or not to automatically
create an unique seed value for each
instance of this element. The seed will
be the same for each simulation run.
seed 1 -
The value of the seed for the random
number generator. A value zero
recreates an unique seed for each
simulation run.

Diagnostic
Name Default value Default unit Value range
run diagnostic false - [true, false]

2003 - 2016 Lumerical Solutions, Inc


1176 Lumerical Knowledge Base

Enables the frequency response of the


designed filter implementation and the
ideal frequency response to be
generated as results.
diagnostic size 1024 -
The number of frequency points used
when calculating the filter frequency
response.

Results
Name Description
diagnostic/response #/transmission The complex transmission vs. frequency
corresponding to the ideal and designed filter.
diagnostic/response #/gain The gain vs. frequency corresponding to the ideal
and designed filter.
diagnostic/response #/error Mean square error comparing the frequency
response of the designed filter implementation with
the ideal frequency response.

Implementation Details
The element Optical Amplifier amplifies the signal inputs to it, at the same time, it will add noise to the signal.
Please see the example file amplifier_example.icp for more information on its implementation detail. The
following figure is the system in the example file:

The figures below show the amplification effect of the optical amplifier in time and frequency domain, the noise added
by this element could also be clearly observed.

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1177

6.3.3.12 Actives
Optical
Laser TW 1177

6.3.3.12.1 Laser TW

Symbol

Description
Traveling Wave Laser Model.

Ports
Name Type
input Electrical Signal
port 1 Optical Signal
port 2 Optical Signal

Properties
General
Name Default value Default unit Value range
name Laser TW - -
Defines the name of the element.

2003 - 2016 Lumerical Solutions, Inc


1178 Lumerical Knowledge Base

annotate true - [true, false]


Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type Laser TW - -
Defines the element unique type (read
only).
description Traveling Wave - -
A brief description of the elements Laser Model
functionality.
prefix TWLM - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.

Standard
Name Default value Default unit Value range
frequency 193.1 THz*
Central frequency of operation.
*std. unit is Hz

length 0.0003 m
Defines the laser active region and
cavity length L.

active region width 5e-006 m


Defines the active region width w.
active region thickness 100e-009 m
Defines the active region depth d.

Waveguide/Mode 1
Name Default value Default unit Value range
orthogonal identifier 1 1 -
The first identifier used to track an
orthogonal mode of an optical
waveguide. For most waveguide, two
orthogonal identifiers '1' and '2' are
available (with the default labels 'TE'
and 'TM' respectively).
label 1 TE - -
The label corresponding to the first

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1179

orthogonal identifier.
polarization 1 TE - [TE, TM]
Defines the waveguide polarization.
loss 1 4342.944819 dB/m
The loss corresponding to the first
orthogonal identifier.
effective index 1 3.5 -
The effective index corresponding to
the first orthogonal identifier.
group index 1 4 -
The group index coefficient
corresponding to the first orthogonal
identifier.
dispersion 1 0 s/m/m
The dispersion coefficient
corresponding to the first orthogonal
identifier.
mode confinement factor 1 1 - [0, 1]
Defines the mode confinement factor.
spontaneous emission factor 1 0.01 -
Defines the spontaneous emission
coupling factor.
facet reflectivity left 1 0.9 - [0, 1]
Defines the facet reflectivity left.
facet reflectivity right 1 0.9 - [0, 1]
Defines the facet reflectivity right.

Waveguide/Mode 2
Name Default value Default unit Value range
orthogonal identifier 2 2 -
The second identifier used to track an
orthogonal mode of an optical
waveguide. For most waveguide, two
orthogonal identifiers '1' and '2' are
available (with the default labels 'TE'
and 'TM' respectively).
label 2 TM - -
The label corresponding to the second
orthogonal identifier.
polarization 2 TM - [TE, TM]
Defines the waveguide polarization.
loss 2 4342.944819 dB/m
The loss corresponding to the second
orthogonal identifier.
effective index 2 3.5 -
The effective index corresponding to
the second orthogonal identifier.

2003 - 2016 Lumerical Solutions, Inc


1180 Lumerical Knowledge Base

group index 2 4 -
The group index coefficient
corresponding to the second
orthogonal identifier.
dispersion 2 0 s/m/m
The dispersion coefficient
corresponding to the second
orthogonal identifier.
mode confinement factor 2 1 - [0, 1]
Defines the mode confinement factor.
spontaneous emission factor 2 0.01 -
Defines the spontaneous emission
coupling factor.
facet reflectivity left 2 0.3 - [0, 1]
Defines the facet reflectivity left.
facet reflectivity right 2 0.3 - [0, 1]
Defines the facet reflectivity right.

Waveguide/Recombination Coefficient
Name Default value Default unit Value range
radiative linear recombination 250e+006 1/s
coefficient
Defines the radiative linear
recombination coefficient Arad.

radiative quadratic 0 m^3/s


recombination coefficient
Defines the radiative quadratic
recombination coefficient Brad.

radiative cubic recombination 0 m^6/s


coefficient
Defines the radiative cubic
recombination coefficient Crad.

nonradiative linear 0 1/s


recombination coefficient
Defines the nonradiative linear
recombination coefficient Anr.

nonradiative quadratic 0 m^3/s


recombination coefficient
Defines the nonradiative quadratic
recombination coefficient Bnr.

nonradiative cubic 0 m^6/s


recombination coefficient
Defines the nonradiative cubic
recombination coefficient Cnr.

Waveguide/Gain

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1181

Name Default value Default unit Value range


gain coefficient 15e-021 m^2
Defines the gain coefficient a0.

carrier density at transparency 1.5e+024 m^-3


Defines the carrier density at
transparency n0.

initial carrier density 1.5e+024 m^-3


Defines the initial carrier density.
gain compression factor 0 m^-3
Defines the gain compression factor ?.
gain shape center frequency 352.9411765 THz*
Defines the gain shape center
frequency. *std. unit is Hz

gain shape quality factor 100 -


Defines the gain shape quality facto.
gain shape reference carrier 1.5e+024 m^-3
density
Defines the gain shape reference
carrier density.
differential gain center 0 Hz/m^-3
frequency
Defines the differential gain center
frequency.
differential gain quality factor 0 1/m^-3
Defines the differential gain quality
factor.

Waveguide/Spontaneous Emission
Name Default value Default unit Value range
spontaneous emission from true - [true, false]
gain
Defines whether or not to use the gain
shape as the spontaneous emission
shape.
spontaneous emission center 352.9411765 THz*
frequency
Defines the spontaneous emission *std. unit is Hz
center frequency.
spontaneous emission quality 10e-006 -
factor
Defines the spontaneous emission
quality factor.
spontaneous emission 1.5e+024 m^-3
reference carrier density
Defines the spontaneous emission
reference carrier density.

2003 - 2016 Lumerical Solutions, Inc


1182 Lumerical Knowledge Base

differential spontaneous 0 -
emission center frequency
Defines the differential spontaneous
emission center frequency.
differential spontaneous 0 1/m^-3
emission quality factor
Defines the differential spontaneous
emission quality factor.
linewidth enhancement factor 0 -
Defines the linewidth enhancement
factor .

Enhanced
Name Default value Default unit Value range

output carrier density false - [true, false]


Defines whether or not to add an
additional output port to monitor the
average carrier density.

Numerical
Name Default value Default unit Value range
minimum number of sections 100 -
Defines the model number of sections.
user defined constants false - [true, false]
Defines whether or not to use user
defined constants.
speed of light 299.792458e m/s
Defines the speed of light constant. +006

plank constant 0.66260755e- kg.m^2/s


Defines Plank's constant. 033

electron charge 0.160217733e- A.s


Defines the electron charge constant. 018

automatic seed true - [true, false]


Defines whether or not to automatically
create an unique seed value for each
instance of this element. The seed will
be the same for each simulation run.
seed 1 -
The value of the seed for the random
number generator. A value zero
recreates an unique seed for each
simulation run.

Diagnostic
Name Default value Default unit Value range
run diagnostic false - [true, false]
Enables the gain and spontaneous

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1183

emission spectrum response to be


generated as results.
diagnostic size 1024 -
The number of frequency points used
when calculating the gain and
spontaneous emission spectrum
response.

See Also
Please see the Fabry-Perot Laser 2486 page for an application example of this compact laser model.

Implementation Details
A generic geometry of the gain element is shown in the figure below. lact , dact and wact are the length, depth and
width of the active region of the gain element, respectively. The length of the active region is implicitly equal to the
length of the gain element, however, the width (and depth) are not assumed to be the same as those of the entire
gain element, although the width is shown to be in the figure below.

[click to enlarge]

Carrier Recombination
Two sets of recombination coefficients are defined in this compact model, one set each for the radiative
recombination and non-radiative recombination, respectively. The definition of the parameters and their relationships
are listed below.

dN dN rad dN nr N N N (1)
= + = = +
dt dt dt t t rad t nr

DN DN rad DN nr (2)
= +
DT DT DT
DN rad (3)
= Arad N + Brad N 2 + Crad N 3
DT
DN nr (4)
= Anr N + Bnr N 2 + Cnr N 3
DT

t rad = [ Arad + Brad N + Crad N 2 ]-1 (5)

2003 - 2016 Lumerical Solutions, Inc


1184 Lumerical Knowledge Base

t nr = [ Anr + Bnr N + Cnr N 2 ]-1 (6)

1 1 1 (7)
= +
t t rad t nr

DT = 1 sample rate (8)

DN rad change in carrier concentration from DN nr change in carrier concentration from


radiative processes non-radiative processes

t rad radiative carrier lifetime t nr non-radiative carrier lifetime

t overall carrier lifetime DT simulation time step

Arad radiative linear recombination coefficient Anr non-radiative linear recombination


coefficient

Brad radiative quadratic recombination Bnr non-radiative quadratic recombination


coefficient coefficient

Crad radiative cubic recombination coefficient Cnr non-radiative cubic recombination


coefficient

N carrier density

Gain
As an optical mode traverses a section of gain element, its power grows exponentially. With the exponential rate of
growth being proportional to the mode confinement to the active portion section of the structure and to the material
gain which is, in general, frequency and carrier dependent. In the present model, the peak of the spectral gain
shapes vary linearly with carrier density about the transparency carrier density with a slope given by the gain
coefficient, and with a discount at high photon densities (referred to the volume of the gain section). The gain shapes
are Lorentzian with user specified center frequency and Q values, and the center frequency and Q can be made to
vary dynamically as a linear function of the carrier density.

The following table lists the definitions of the parameters used to define the effect of gain in the compact model
element.

ap gain coefficient e non-linear gain coefficient

a fG differential gain center frequency S photon density with respect to the


volume of the active region

aQG differential gain quality factor f 0G gain shape center frequency

N Gref gain shape reference carrier density Q0G gain shape quality factor

N tr carrier density at transparency L( f cG , QG ; f ) unity peak Lorentzian function


f cG
centered at with quality factor
QG

Within one section of the active region as shown in the figure below, the gain and quality factor following the
relationship listed below.

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1185

| E (DL) |2 (9)
2
= eGg ( f , N ) DL
| E (0) |
(10)
g ( f , N ) = g peak L( f cG , QG ; f )

1 (11)
g peak = a p ( N - N tr )
1 + eS
(12)
f cG ( N ) = f 0G + a fG ( N - N Gref )

(13)
QG ( N ) = Q0G + aQG ( N - N Gref )

The following figure shows a plot of a family of Lorentzian Gain Shapes with center frequencies ad Q's being made
to vary dynamically as a linear function of carrier density within each spatial element.

[click to enlarge]

aQG = a fG = 0
Please note that, constant gain shape can be achieved by setting .

Spontaneous Emission

2003 - 2016 Lumerical Solutions, Inc


1186 Lumerical Knowledge Base

Users can set the spontaneous emission spectrum shape be equal to the gain spectrum shape by setting the
"spontaneous emission from gain" to be true, or they can set this parameter to false and then enter the following
parameters to define the spontaneous emission spectrum in a manner similar to that for the defining the gain
spectrum.

f0 E spontaneous emission center frequency Q0 E spontaneous emission quality factor

a fE spontaneous emission differential center aQE spontaneous emission quality factor


frequency

N Eref spontaneous emission reference carrier L( f cE , QE ; f ) unity peak Lorentzian function


density f cG
centered at , with quality factor
QE

The spontaneous emission shape is given by

E ( f , N ) = L( f cE , QE ; f ) (14)

with

f cE ( N ) = f 0 E + a fE ( N - N Eref ) (15)

QE ( N ) = Q0 E + aQE ( N - N Eref ) (16)

The other parameter in this group is the linewidth enhancement factor. It is important in this model as it is
responsible for the change in material index with change in carrier density, and this effect gives rise to laser chirp.

The linewidth enhancement factor is defined by:

n
4 p N (17)
aH = -
l0 g
N

where
g
N
is the gain coefficient in the compact laser model.

l
Please note that the reference wavelength, 0 , is taken to be the frequency
specified in the Standard section, which is the only place this Standard/
frequency affects the physical model.

(Optical) Mode
The effective index parameter is not used in this model as it is implicitly set equal to the group index which is the
relevant quantity affecting laser dynamics.

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1187

The spontaneous emission factor is the fraction of the spontaneous emission that gets coupled into the waveguide
mode.

Number of Sections
The gain element is divided into a number of sections each with a length of L. The time step T of the simulation is
the inverse of the simulation sample rate, which must be set to be larger than the bandwidth simulated, including
that of the gain element gain shape.

INTERCONNECT will find the value of the number of sections that makes the simulated group velocity,

DL
DT
v g = c ng
as close as possible to actual group velocity ( where c is the speed of light, and ng the group index of
the mode) for a given sample frequency. Note that for a single optical mode, this agreement can be made perfect by
adjusting the simulation sample rate.

However, the user can decide upon a minimum number of sections to be used based on other considerations, which
they can specify in the "minimum number of sections" parameter. A warning message will be shown if the number
of sections is less than the value thus specified

Another consideration for the sample rate is that it should be approximately 5 times greater than the input/output
bandwidth of interest to ensure adequate fidelity of the gain and spontaneous emission frequency dependencies
implemented by time-domain IIR filtering.

For an application example, please see the Fabry-Perot Laser 2486 page.

6.3.3.13 Filters
Electrical
BP Bessel Filter 1188
LP Bessel Filter 1191
BP Gaussian Filter 1193
LP Gaussian Filter 1196
BP Rectangular Filter 1199
LP Rectangular Filter 1203
BP RC Filter 1206
LP RC Filter 1208
BP Butterworth Filter 1211
LP Butterworth Filter 1214
BP Chebyshev Filter 1217
LP Chebyshev Filter 1219
TV LP RC Filter
VD LP RC Filter 1225

Optical
Bessel Optical Filter 1228
Gaussian Optical Filter 1231
Rectangular Optical Filter 1234
Butterworth Optical Filter 1237
Chebyshev Optical Filter 1240
Fabry Perot Optical Filter 1243

2003 - 2016 Lumerical Solutions, Inc


1188 Lumerical Knowledge Base

6.3.3.13.1 BP Bessel Filter

Symbol

Description
Electrical band pass (BP) Bessel filter.

Ports
Name Type
input Electrical Signal
output Electrical Signal

Properties
General
Name Default value Default unit Value range
name BP Bessel - -
Defines the name of the element. Filter

annotate true - [true, false]


Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type BP Bessel - -
Defines the element unique type (read Filter
only).

description Electrical band - -


A brief description of the elements pass (BP)
functionality. Bessel filter

prefix BPF - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.

Standard

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1189

Name Default value Default unit Value range


frequency 10 GHz*
Central frequency of operation.
*std. unit is Hz

bandwidth 0.75 * %bitrate Hz


The 3-dB bandwidth of the filter (full %
with at half maximum, FWHM).
order 4 - [1, 10]
Defines the filter order.

Diagnostic
Name Default value Default unit Value range
run diagnostic false - [true, false]
Enables the frequency response of the
designed filter implementation and the
ideal frequency response to be
generated as results.
diagnostic size 1024 -
The number of frequency points used
when calculating the filter frequency
response.

Results
Name Description
diagnostic/response #/transmission The complex transmission vs. frequency
corresponding to the ideal and designed filter.
diagnostic/response #/gain The gain vs. frequency corresponding to the ideal
and designed filter.
diagnostic/response #/error Mean square error comparing the frequency
response of the designed filter implementation with
the ideal frequency response.

Implementation Details
Following is an example and implementation details of how the electrical band-pass Bessel filter works, please see
the example file: BP_Bessel_Filter.icp

2003 - 2016 Lumerical Solutions, Inc


1190 Lumerical Knowledge Base

The key features for this element are the filter's order and bandwidth. Following figures show how the bandwidth and
order affect the filter's performances.

Fig. 1 BP Bessel filter transmission plot Fig. 2 BP Bessel filter gain plot

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1191

6.3.3.13.2 LP Bessel Filter

Symbol

Description
Electrical low pass (LP) Bessel filter.

Ports
Name Type
input Electrical Signal
output Electrical Signal

Properties
General
Name Default value Default unit Value range
name LP Bessel - -
Defines the name of the element. Filter

annotate true - [true, false]


Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type LP Bessel - -
Defines the element unique type (read Filter
only).

description Electrical low - -


A brief description of the elements pass (LP)
functionality. Bessel filter

prefix LPF - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.

Standard

2003 - 2016 Lumerical Solutions, Inc


1192 Lumerical Knowledge Base

Name Default value Default unit Value range


cutoff frequency 0.75 * %bitrate Hz
The 3-dB cutoff frequency of the filter %
(full with at half maximum, FWHM).
order 4 - [1, 10]
Defines the filter order.

Diagnostic
Name Default value Default unit Value range
run diagnostic false - [true, false]
Enables the frequency response of the
designed filter implementation and the
ideal frequency response to be
generated as results.

diagnostic size 1024 -


The number of frequency points used
when calculating the filter frequency
response.

Results
Name Description
diagnostic/response #/transmission The complex transmission vs. frequency
corresponding to the ideal and designed filter.
diagnostic/response #/gain The gain vs. frequency corresponding to the ideal
and designed filter.
diagnostic/response #/error Mean square error comparing the frequency
response of the designed filter implementation with
the ideal frequency response.

Implementation Details
Following is an example and implementation details of how the low-pass Bessel filter works, please see the example
file: LP_Bessel_Filter.icp

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1193

The key features for this element are the filter's order and bandwidth. Following figures show how the bandwidth and
order affect the filter's performances.

Fig. 1 LP Bessel Filter Transmission Plot Fig. 2 LP Bessel Filter Gain Plot

6.3.3.13.3 BP Gaussian Filter

Symbol

Description
Electrical band pass (BP) Gaussian filter.

2003 - 2016 Lumerical Solutions, Inc


1194 Lumerical Knowledge Base

Ports
Name Type
input Electrical Signal
output Electrical Signal

Properties
General
Name Default value Default unit Value range
name BP Gaussian - -
Defines the name of the element. Filter

annotate true - [true, false]


Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type BP Gaussian - -
Defines the element unique type (read Filter
only).
description Electrical band - -
A brief description of the elements pass (BP)
functionality. Gaussian filter

prefix BPF - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.

Standard
Name Default value Default unit Value range
frequency 10 GHz*
Central frequency of operation.
*std. unit is Hz

bandwidth 0.75 * %bitrate Hz


The 3-dB bandwidth of the filter (full %
with at half maximum, FWHM).
order 1 - [1, 10]
Defines the filter order.

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1195

Numerical
Name Default value Default unit Value range
window function rectangular - [rectangular,
Defines the window type for the digital hamming,
filter. hanning]

number of taps 64 -
Defines the number of coefficient for
digital filter.

Diagnostic
Name Default value Default unit Value range
run diagnostic false - [true, false]
Enables the frequency response of the
designed filter implementation and the
ideal frequency response to be
generated as results.
diagnostic size 1024 -
The number of frequency points used
when calculating the filter frequency
response.

Results
Name Description
diagnostic/response #/transmission The complex transmission vs. frequency
corresponding to the ideal and designed filter.
diagnostic/response #/gain The gain vs. frequency corresponding to the ideal
and designed filter.
diagnostic/response #/error Mean square error comparing the frequency
response of the designed filter implementation with
the ideal frequency response.

Implementation Details
Following is an example and implementation details of how the electrical band-pass Gaussian filter works, please
see the example file: BP_Gaussian_Filter.icp

2003 - 2016 Lumerical Solutions, Inc


1196 Lumerical Knowledge Base

The key features for this element are the filter's order and bandwidth. Following figures show how the bandwidth and
order affect the filter's performances.

Fig. 1 BP Gaussian Filter Transmission Plot Fig. 2 BP Gaussian Filter Gain Plot

6.3.3.13.4 LP Gaussian Filter

Symbol

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1197

Description
Electrical low pass (LP) Gaussian filter.

Ports
Name Type
input Electrical Signal
output Electrical Signal

Properties
General
Name Default value Default unit Value range

name LP Gaussian - -
Defines the name of the element. Filter

annotate true - [true, false]


Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type LP Gaussian - -
Defines the element unique type (read Filter
only).
description Electrical low - -
A brief description of the elements pass (LP)
functionality. Gaussian filter

prefix LPF - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.

Standard
Name Default value Default unit Value range
cutoff frequency 0.75 * %bitrate Hz
The 3-dB cutoff frequency of the filter %
(full with at half maximum, FWHM).
order 1 - [1, 10]
Defines the filter order.

2003 - 2016 Lumerical Solutions, Inc


1198 Lumerical Knowledge Base

Numerical
Name Default value Default unit Value range
window function rectangular - [rectangular,
Defines the window type for the digital hamming,
filter. hanning]

number of taps 64 -
Defines the number of coefficient for
digital filter.

Diagnostic
Name Default value Default unit Value range
run diagnostic false - [true, false]
Enables the frequency response of the
designed filter implementation and the
ideal frequency response to be
generated as results.
diagnostic size 1024 -
The number of frequency points used
when calculating the filter frequency
response.

Results
Name Description
diagnostic/response #/transmission The complex transmission vs. frequency
corresponding to the ideal and designed filter.
diagnostic/response #/gain The gain vs. frequency corresponding to the ideal
and designed filter.
diagnostic/response #/error Mean square error comparing the frequency
response of the designed filter implementation with
the ideal frequency response.

Implementation Details
Following is an example and implementation details of how the low-pass Gaussian filter works, please see the
example file: LP_Gaussian_Filter.icp

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1199

The key features for this element are the filter's order and bandwidth. Following figures show how the bandwidth and
order affect the filter's performances.

Fig. 1 LP Gaussian Filter Transmission Plot Fig. 2 LP Gaussian Filter Gain Plot

6.3.3.13.5 BP Rectangular Filter

Symbol

Description

2003 - 2016 Lumerical Solutions, Inc


1200 Lumerical Knowledge Base

Electrical band pass (BP) rectangular filter.

Ports
Name Type
input Electrical Signal
output Electrical Signal

Properties
General
Name Default value Default unit Value range
name BP Rectangular - -
Defines the name of the element. Filter

annotate true - [true, false]


Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type BP Rectangular - -
Defines the element unique type (read Filter
only).
description Electrical band - -
A brief description of the elements pass (BP)
functionality. rectangular filter

prefix BPF - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.

Standard
Name Default value Default unit Value range
frequency 10 GHz*
Central frequency of operation.
*std. unit is Hz

bandwidth 0.75 * %bitrate Hz


The 3-dB bandwidth of the filter (full %
with at half maximum, FWHM).

Numerical

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1201

Name Default value Default unit Value range


window function rectangular - [rectangular,
Defines the window type for the digital hamming,
filter. hanning]

number of taps 64 -
Defines the number of coefficient for
digital filter.

Diagnostic
Name Default value Default unit Value range
run diagnostic false - [true, false]
Enables the frequency response of the
designed filter implementation and the
ideal frequency response to be
generated as results.

diagnostic size 1024 -


The number of frequency points used
when calculating the filter frequency
response.

Results
Name Description
diagnostic/response #/transmission The complex transmission vs. frequency
corresponding to the ideal and designed filter.
diagnostic/response #/gain The gain vs. frequency corresponding to the ideal
and designed filter.
diagnostic/response #/error Mean square error comparing the frequency
response of the designed filter implementation with
the ideal frequency response.

Implementation Details
Following is an example and implementation details of how the electrical band-pass Rectangular filter works, please
see the example file: BP_Rectangular_Filter.icp

2003 - 2016 Lumerical Solutions, Inc


1202 Lumerical Knowledge Base

The following figure shows how the transmission of the band-pass rectangular filter varies with the change of the filter
bandwidth.

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1203

Fig. 1 BP Rectangular Filter Transmission Plot

6.3.3.13.6 LP Rectangular Filter

Symbol

Description
Electrical low pass (LP) rectangular filter.

Ports
Name Type
input Electrical Signal
output Electrical Signal

Properties
General

2003 - 2016 Lumerical Solutions, Inc


1204 Lumerical Knowledge Base

Name Default value Default unit Value range


name LP Rectangular - -
Defines the name of the element. Filter

annotate true - [true, false]


Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type LP Rectangular - -
Defines the element unique type (read Filter
only).
description Electrical low - -
A brief description of the elements pass (LP)
functionality. rectangular filter

prefix LPF - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.

Standard
Name Default value Default unit Value range
cutoff frequency 0.75 * %bitrate Hz
The 3-dB cutoff frequency of the filter %
(full with at half maximum, FWHM).

Numerical
Name Default value Default unit Value range
window function rectangular - [rectangular,
Defines the window type for the digital hamming,
filter. hanning]

number of taps 64 -
Defines the number of coefficient for
digital filter.

Diagnostic
Name Default value Default unit Value range
run diagnostic false - [true, false]
Enables the frequency response of the
designed filter implementation and the

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1205

ideal frequency response to be


generated as results.
diagnostic size 1024 -
The number of frequency points used
when calculating the filter frequency
response.

Results
Name Description
diagnostic/response #/transmission The complex transmission vs. frequency
corresponding to the ideal and designed filter.
diagnostic/response #/gain The gain vs. frequency corresponding to the ideal
and designed filter.
diagnostic/response #/error Mean square error comparing the frequency
response of the designed filter implementation with
the ideal frequency response.

Implementation Details
Following is an example and implementation details of how the low-pass rectangular filter works, please see the
example file: LP_Rectangular_Filter.icp

The key feature for this element is the filter's bandwidth. Following figures show how the bandwidth affects the filter's
performances.

2003 - 2016 Lumerical Solutions, Inc


1206 Lumerical Knowledge Base

Fig. 1 LP Rectangular Filter Transmission Plot

6.3.3.13.7 BP RC Filter

Symbol

Description
Electrical band pass (BP) RC filter.

Ports
Name Type
input Electrical Signal
output Electrical Signal

Properties
General

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1207

Name Default value Default unit Value range


name BP RC Filter - -
Defines the name of the element.
annotate true - [true, false]
Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type BP RC Filter - -
Defines the element unique type (read
only).
description Electrical band - -
A brief description of the elements pass (BP) RC
functionality. filter

prefix BPF - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.

Standard
Name Default value Default unit Value range
frequency 10 GHz*
Central frequency of operation.
*std. unit is Hz

bandwidth 0.75 * %bitrate Hz


The 3-dB bandwidth of the filter (full %
with at half maximum, FWHM).

Implementation Details
Following is an example and implementation details of how the electrical band-pass RC filter works, please see the
example file: BP_RC_Filter.icp

2003 - 2016 Lumerical Solutions, Inc


1208 Lumerical Knowledge Base

The key features for this element are the filter's order and bandwidth. Following figures show how the bandwidth and
order affect the filter's performances.

Fig. 1 BP RC Filter Transmission Plot Fig. 2 BP RC Filter Gain Plot

6.3.3.13.8 LP RC Filter

Symbol

Description

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1209

Electrical low pass (LP) RC filter.

Ports
Name Type
input Electrical Signal
output Electrical Signal

Properties
General
Name Default value Default unit Value range
name LP RC Filter - -
Defines the name of the element.

annotate true - [true, false]


Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type LP RC Filter - -
Defines the element unique type (read
only).
description Electrical low - -
A brief description of the elements pass (LP) RC
functionality. filter

prefix LPF - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.

Standard
Name Default value Default unit Value range
cutoff frequency 0.75 * %bitrate Hz
The 3-dB cutoff frequency of the filter %
(full with at half maximum, FWHM).

Diagnostic
Name Default value Default unit Value range
run diagnostic false - [true, false]

2003 - 2016 Lumerical Solutions, Inc


1210 Lumerical Knowledge Base

Enables the frequency response of the


designed filter implementation and the
ideal frequency response to be
generated as results.
diagnostic size 1024 -
The number of frequency points used
when calculating the filter frequency
response.

Results
Name Description
diagnostic/response #/transmission The complex transmission vs. frequency
corresponding to the ideal and designed filter.
diagnostic/response #/gain The gain vs. frequency corresponding to the ideal
and designed filter.
diagnostic/response #/error Mean square error comparing the frequency
response of the designed filter implementation with
the ideal frequency response.

Implementation Details
Following is an example and implementation details of how the low-pass RC filter works, please see the example
file: LP_RC_Filter.icp

The key feature for this element is the filter's bandwidth. Following figures show how the bandwidth affects the filter's
performances.

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1211

Fig. 1 LP RC Filter Transmission Plot Fig. 2 LP RC Filter Gain Plot

6.3.3.13.9 BP Butterw orth Filter

Symbol

Description
Electrical band pass (BP) Butterworth filter.

Ports
Name Type
input Electrical Signal
output Electrical Signal

Properties
General
Name Default value Default unit Value range
name BP Butterworth - -
Defines the name of the element. Filter

annotate true - [true, false]


Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.

2003 - 2016 Lumerical Solutions, Inc


1212 Lumerical Knowledge Base

type BP Butterworth - -
Defines the element unique type (read Filter
only).
description Electrical band - -
A brief description of the elements pass (BP)
functionality. Butterworth
filter
prefix BPF - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.

Standard
Name Default value Default unit Value range
frequency 10 GHz*
Central frequency of operation.
*std. unit is Hz

bandwidth 0.75 * %bitrate Hz


The 3-dB bandwidth of the filter (full %
with at half maximum, FWHM).
order 4 - [1, 10]
Defines the filter order.

Diagnostic
Name Default value Default unit Value range

run diagnostic false - [true, false]


Enables the frequency response of the
designed filter implementation and the
ideal frequency response to be
generated as results.
diagnostic size 1024 -
The number of frequency points used
when calculating the filter frequency
response.

Results
Name Description
diagnostic/response #/transmission The complex transmission vs. frequency
corresponding to the ideal and designed filter.
diagnostic/response #/gain The gain vs. frequency corresponding to the ideal
and designed filter.

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1213

diagnostic/response #/error Mean square error comparing the frequency


response of the designed filter implementation with
the ideal frequency response.

Implementation Details
Following is an example and implementation details of how the electrical band-pass Butterworth filter works, please
see the example file: BP_Butterworth_Filter.icp

The key features for this element are the filter's order and bandwidth. Following figures show how the bandwidth and
order affect the filter's performances.

2003 - 2016 Lumerical Solutions, Inc


1214 Lumerical Knowledge Base

Fig. 1 BP Butterworth Filter Transmission Plot Fig. 2 BP Butterworth Filter Gain Plot

6.3.3.13.10 LP Butterw orth Filter

Symbol

Description
Electrical low pass (LP) Butterworth filter.

Ports
Name Type
input Electrical Signal
output Electrical Signal

Properties
General
Name Default value Default unit Value range
name LP Butterworth - -
Defines the name of the element. Filter

annotate true - [true, false]


Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1215

type LP Butterworth - -
Defines the element unique type (read Filter
only).
description Electrical low - -
A brief description of the elements pass (LP)
functionality. Butterworth
filter
prefix LPF - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.

Standard
Name Default value Default unit Value range
cutoff frequency 0.75 * %bitrate Hz
The 3-dB cutoff frequency of the filter %
(full with at half maximum, FWHM).
order 4 - [1, 10]
Defines the filter order.

Diagnostic
Name Default value Default unit Value range
run diagnostic false - [true, false]
Enables the frequency response of the
designed filter implementation and the
ideal frequency response to be
generated as results.
diagnostic size 1024 -
The number of frequency points used
when calculating the filter frequency
response.

Results
Name Description
diagnostic/response #/transmission The complex transmission vs. frequency
corresponding to the ideal and designed filter.
diagnostic/response #/gain The gain vs. frequency corresponding to the ideal
and designed filter.
diagnostic/response #/error Mean square error comparing the frequency
response of the designed filter implementation with
the ideal frequency response.

2003 - 2016 Lumerical Solutions, Inc


1216 Lumerical Knowledge Base

Implementation Details
Following is an example and implementation details of how the low-pass Butterworth filter works, please see the
example file: LP_Butterworth_Filter.icp

The key features for this element are the filter's order and bandwidth. Following figures show how these features
affect the filter's performances.

Fig. 1 LP Butterworth Filter Transmission Plot Fig. 2 LP Butterworth Filter Gain Plot

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1217

6.3.3.13.11 BP Chebyshev Filter

Symbol

Description
Electrical band pass (BP) Chebyshev filter.

Ports
Name Type
input Electrical Signal
output Electrical Signal

Properties
General
Name Default value Default unit Value range
name BP Chebyshev - -
Defines the name of the element. Filter

annotate true - [true, false]


Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type BP Chebyshev - -
Defines the element unique type (read Filter
only).

description Electrical band - -


A brief description of the elements pass (BP)
functionality. Chebyshev filter

prefix BPF - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.

Standard

2003 - 2016 Lumerical Solutions, Inc


1218 Lumerical Knowledge Base

Name Default value Default unit Value range


frequency 10 GHz*
Central frequency of operation.
*std. unit is Hz

bandwidth 0.75 * %bitrate Hz


The 3-dB bandwidth of the filter (full %
with at half maximum, FWHM).
order 4 - [1, 10]
Defines the filter order.
ripple 3 dB
Defines the filter ripple factor.

Diagnostic
Name Default value Default unit Value range

run diagnostic false - [true, false]


Enables the frequency response of the
designed filter implementation and the
ideal frequency response to be
generated as results.
diagnostic size 1024 -
The number of frequency points used
when calculating the filter frequency
response.

Results
Name Description
diagnostic/response #/transmission The complex transmission vs. frequency
corresponding to the ideal and designed filter.
diagnostic/response #/gain The gain vs. frequency corresponding to the ideal
and designed filter.
diagnostic/response #/error Mean square error comparing the frequency
response of the designed filter implementation with
the ideal frequency response.

Implementation Details
Following is an example and implementation details of how the electrical band-pass Chebyshev filter works, please
see the example file: BP_Chebyshev_Filter.icp

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1219

The key features for this element are the filter's order and bandwidth. Following figures show how the bandwidth and
order affect the filter's performances.

Fig. 1 BP Chebyshev Filter Transmission Plot Fig. 2 BP Chebyshev Filter Gain Plot

6.3.3.13.12 LP Chebyshev Filter

Symbol

2003 - 2016 Lumerical Solutions, Inc


1220 Lumerical Knowledge Base

Description
Electrical low pass (LP) Chebyshev filter.

Ports
Name Type
input Electrical Signal
output Electrical Signal

Properties
General
Name Default value Default unit Value range
name LP Chebyshev - -
Defines the name of the element. Filter

annotate true - [true, false]


Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type LP Chebyshev - -
Defines the element unique type (read Filter
only).
description Electrical low - -
A brief description of the elements pass (LP)
functionality. Chebyshev filter

prefix LPF - -
Defines the element name prefix.
model - - -
Defines the element model name.

library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.

Standard
Name Default value Default unit Value range
cutoff frequency 0.75 * %bitrate Hz
The 3-dB cutoff frequency of the filter %
(full with at half maximum, FWHM).
order 4 - [1, 10]
Defines the filter order.
ripple 3 dB

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1221

Defines the filter ripple factor.

Diagnostic
Name Default value Default unit Value range

run diagnostic false - [true, false]


Enables the frequency response of the
designed filter implementation and the
ideal frequency response to be
generated as results.
diagnostic size 1024 -
The number of frequency points used
when calculating the filter frequency
response.

Results
Name Description
diagnostic/response #/transmission The complex transmission vs. frequency
corresponding to the ideal and designed filter.
diagnostic/response #/gain The gain vs. frequency corresponding to the ideal
and designed filter.
diagnostic/response #/error Mean square error comparing the frequency
response of the designed filter implementation with
the ideal frequency response.

Implementation Details
Following is an example and implementation details of how the low-pass Chebyshev filter works, please see the
example file: LP_Chebyshev_Filter.icp

2003 - 2016 Lumerical Solutions, Inc


1222 Lumerical Knowledge Base

The key features for this element are the filter's order, bandwidth and the filter's ripple. Following figures show how
these features affect the filter's performances.

Fig. 1 LP Chebyshev Filter Transmission Plot Fig. 2 LP Chebyshev Filter Gain Plot

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1223

6.3.3.13.13 TV LP RC Filter

Symbol

Description
Electrical time variant low pass (LP) RC filter.

Ports
Name Type
modulation Electrical Signal
input Electrical Signal
output Electrical Signal

Properties
General
Name Default value Default unit Value range
name TV LP RC Filter - -
Defines the name of the element.
annotate true - [true, false]
Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type TV LP RC Filter - -
Defines the element unique type (read
only).
description Electrical time - -
A brief description of the elements variant low pass
functionality. (LP) RC filter

prefix LPF - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.

2003 - 2016 Lumerical Solutions, Inc


1224 Lumerical Knowledge Base

Standard
Name Default value Default unit Value range
load from file false - [true, false]
Defines whether or not to load
measurements from an input file or to
use the currently stored values.
measurement filename - - -
The file containing the measurement
data. Refer to the Implementation
Details section for the format expected.
measurement <2,2> [0, 1, - -
A matrix editor for users to read the 10e+009...]
element current modulation data values
(read only).

Diagnostic
Name Default value Default unit Value range
run diagnostic false - [true, false]
Enables the frequency response of the
designed filter implementation and the
ideal frequency response to be
generated as results.
diagnostic size 1024 -
The number of frequency points used
when calculating the filter frequency
response.

Results
Name Description
diagnostic/response #/transmission The complex transmission vs. frequency
corresponding to the ideal and designed filter.
diagnostic/response #/gain The gain vs. frequency corresponding to the ideal
and designed filter.
diagnostic/response #/error Mean square error comparing the frequency
response of the designed filter implementation with
the ideal frequency response.

Implementation Details
To user define the measurement file, please see the following example file: time_variant_nrz.icp

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1225

TV LP RC Filter (LPF) measurement file format:


("Voltage","Corresponding 3DB Cut-off Bandwidth")
0 5e+09
1 3e+10
2 5e+10
...
Example file: bandwidth2.txt

6.3.3.13.14 VD LP RC Filter

Symbol

Description
Voltage dependent low pass (LP) RC filter.

Ports
Name Type
input Electrical Signal

2003 - 2016 Lumerical Solutions, Inc


1226 Lumerical Knowledge Base

output Electrical Signal

Properties

General
Name Default value Default unit Value range
name VD LP RC - -
Defines the name of the element. Filter

annotate true - [true, false]


Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.

type VD LP RC - -
Defines the element unique type (read Filter
only).
description Voltage - -
A brief description of the elements dependent low
functionality. pass (LP) RC
filter
prefix LPF - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.

Standard
Name Default value Default unit Value range
load from file false - [true, false]
Defines whether or not to load
measurements from an input file or to
use the currently stored values.
measurement filename - - -
The file containing the measurement
data. Refer to the Implementation
Details section for the format expected.
measurement <2,2> [0, 1, - -
A matrix editor for users to read the 10e+009...]
element current modulation data values
(read only).

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1227

Diagnostic
Name Default value Default unit Value range
run diagnostic false - [true, false]
Enables the frequency response of the
designed filter implementation and the
ideal frequency response to be
generated as results.
diagnostic size 1024 -
The number of frequency points used
when calculating the filter frequency
response.

Results
Name Description
diagnostic/response #/transmission The complex transmission vs. frequency
corresponding to the ideal and designed filter.
diagnostic/response #/gain The gain vs. frequency corresponding to the ideal
and designed filter.
diagnostic/response #/error Mean square error comparing the frequency
response of the designed filter implementation with
the ideal frequency response.

Implementation Details
To user define the measurement file, please see the following example file: time_variant_nrz.icp

2003 - 2016 Lumerical Solutions, Inc


1228 Lumerical Knowledge Base

VD LP RC Filter (LPF) measurement file format:


("Voltage","Corresponding 3DB Cut-off Bandwidth")
0 5e+09
1 3e+10
2 5e+10
...
Example file: bandwidth1.txt

6.3.3.13.15 Bessel Optical Filter

Symbol

Description
Bessel optical filter.

Ports
Name Type
input Optical Signal
output Optical Signal

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1229

Properties
General
Name Default value Default unit Value range
name Bessel Optical - -
Defines the name of the element. Filter

annotate true - [true, false]


Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type Bessel Optical - -
Defines the element unique type (read Filter
only).
description Bessel optical - -
A brief description of the elements filter
functionality.
prefix OBP - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.

Standard
Name Default value Default unit Value range
frequency 193.1 THz*
Central frequency of operation.
*std. unit is Hz

bandwidth 10 GHz*
The 3-dB bandwidth of the filter (full
with at half maximum, FWHM). *std. unit is Hz

order 4 - [1, 10]


Defines the filter order.

Waveguide
Name Default value Default unit Value range
modes TE,TM - -
List of optical mode labels supported
by the element.

2003 - 2016 Lumerical Solutions, Inc


1230 Lumerical Knowledge Base

Diagnostic
Name Default value Default unit Value range
run diagnostic false - [true, false]
Enables the frequency response of the
designed filter implementation and the
ideal frequency response to be
generated as results.
diagnostic size 1024 -
The number of frequency points used
when calculating the filter frequency
response.

Results
Name Description
diagnostic/response #/transmission The complex transmission vs. frequency
corresponding to the ideal and designed filter.
diagnostic/response #/gain The gain vs. frequency corresponding to the ideal
and designed filter.
diagnostic/response #/error Mean square error comparing the frequency
response of the designed filter implementation with
the ideal frequency response.

Implementation Details
Following is an example and implementation details of how the electrical Bessel optical filter works, please see the
example file: Bessel_Optical_Filter.icp

The key features for this element are the filter's order and bandwidth. Following figures show how the bandwidth and

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1231

order affect the filter's performances.

Fig. 1 Bessel optical filter transmission plot Fig. 2 Bessel optical filter gain plot

6.3.3.13.16 Gaussian Optical Filter

Symbol

Description
Gaussian optical filter.

Ports
Name Type
input Optical Signal
output Optical Signal

Properties
General
Name Default value Default unit Value range
name Gaussian - -
Defines the name of the element. Optical Filter

annotate true - [true, false]


Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.

2003 - 2016 Lumerical Solutions, Inc


1232 Lumerical Knowledge Base

type Gaussian - -
Defines the element unique type (read Optical Filter
only).
description Gaussian - -
A brief description of the elements optical filter
functionality.
prefix OBP - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.

Standard
Name Default value Default unit Value range
frequency 193.1 THz*
Central frequency of operation.
*std. unit is Hz

bandwidth 10 GHz*
The 3-dB bandwidth of the filter (full
with at half maximum, FWHM). *std. unit is Hz

order 1 - [1, 10]


Defines the filter order.

Waveguide
Name Default value Default unit Value range
modes TE,TM - -
List of optical mode labels supported
by the element.

Numerical
Name Default value Default unit Value range
window function rectangular - [rectangular,
Defines the window type for the digital hamming,
filter. hanning]

number of taps 64 -
Defines the number of coefficient for
digital filter.

Diagnostic
Name Default value Default unit Value range
run diagnostic false - [true, false]

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1233

Enables the frequency response of the


designed filter implementation and the
ideal frequency response to be
generated as results.
diagnostic size 1024 -
The number of frequency points used
when calculating the filter frequency
response.

Results
Name Description
diagnostic/response #/transmission The complex transmission vs. frequency
corresponding to the ideal and designed filter.
diagnostic/response #/gain The gain vs. frequency corresponding to the ideal
and designed filter.
diagnostic/response #/error Mean square error comparing the frequency
response of the designed filter implementation with
the ideal frequency response.

Implementation Details
Following is an example and implementation details of how the Gaussian optical filter works, please see the
example file: Gaussian_Optical_Filter.icp

The key features for this element are the filter's order and bandwidth. Following figures show how the bandwidth and
order affect the filter's performances.

2003 - 2016 Lumerical Solutions, Inc


1234 Lumerical Knowledge Base

Fig. 1 Gaussian Optical Filter Transmission Plot Fig. 2 Gaussian Optical Filter Gain Plot

6.3.3.13.17 Rectangular Optical Filter

Symbol

Description
Rectangular optical filter.

Ports
Name Type
input Optical Signal
output Optical Signal

Properties
General
Name Default value Default unit Value range
name Rectangular - -
Defines the name of the element. Optical Filter

annotate true - [true, false]


Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1235

type Rectangular - -
Defines the element unique type (read Optical Filter
only).
description Rectangular - -
A brief description of the elements optical filter
functionality.
prefix OBP - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.

Standard
Name Default value Default unit Value range
frequency 193.1 THz*
Central frequency of operation.
*std. unit is Hz

bandwidth 10 GHz*
The 3-dB bandwidth of the filter (full
with at half maximum, FWHM). *std. unit is Hz

Waveguide
Name Default value Default unit Value range
modes TE,TM - -
List of optical mode labels supported
by the element.

Numerical
Name Default value Default unit Value range
window function rectangular - [rectangular,
Defines the window type for the digital hamming,
filter. hanning]

number of taps 64 -
Defines the number of coefficient for
digital filter.

Diagnostic
Name Default value Default unit Value range
run diagnostic false - [true, false]
Enables the frequency response of the
designed filter implementation and the
ideal frequency response to be

2003 - 2016 Lumerical Solutions, Inc


1236 Lumerical Knowledge Base

generated as results.
diagnostic size 1024 -
The number of frequency points used
when calculating the filter frequency
response.

Results
Name Description
diagnostic/response #/transmission The complex transmission vs. frequency
corresponding to the ideal and designed filter.
diagnostic/response #/gain The gain vs. frequency corresponding to the ideal
and designed filter.
diagnostic/response #/error Mean square error comparing the frequency
response of the designed filter implementation with
the ideal frequency response.

Implementation Details
Following is an example and implementation details of how the rectangular optical filter works, please see the
example file: Rectangular_Optical_Filter.icp

The key feature for this element is the filter's bandwidth. Following figures show how the bandwidth affects the filter's
performances.

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1237

Fig. 1 Rectangular Optical Filter Transmission Plot

6.3.3.13.18 Butterw orth Optical Filter

Symbol

Description
Butterworth optical filter.

Ports
Name Type
input Optical Signal
output Optical Signal

Properties
General
Name Default value Default unit Value range

2003 - 2016 Lumerical Solutions, Inc


1238 Lumerical Knowledge Base

name Butterworth - -
Defines the name of the element. Optical Filter

annotate true - [true, false]


Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type Butterworth - -
Defines the element unique type (read Optical Filter
only).
description Butterworth - -
A brief description of the elements optical filter
functionality.
prefix OBP - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.

Standard
Name Default value Default unit Value range
frequency 193.1 THz*
Central frequency of operation.
*std. unit is Hz

bandwidth 10 GHz*
The 3-dB bandwidth of the filter (full
with at half maximum, FWHM). *std. unit is Hz

order 4 - [1, 10]


Defines the filter order.

Waveguide
Name Default value Default unit Value range
modes TE,TM - -
List of optical mode labels supported
by the element.

Diagnostic
Name Default value Default unit Value range
run diagnostic false - [true, false]
Enables the frequency response of the

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1239

designed filter implementation and the


ideal frequency response to be
generated as results.
diagnostic size 1024 -
The number of frequency points used
when calculating the filter frequency
response.

Results
Name Description
diagnostic/response #/transmission The complex transmission vs. frequency
corresponding to the ideal and designed filter.
diagnostic/response #/gain The gain vs. frequency corresponding to the ideal
and designed filter.
diagnostic/response #/error Mean square error comparing the frequency
response of the designed filter implementation with
the ideal frequency response.

Implementation Details
Following is an example and implementation details of how the optical Butterworth filter works, please see the
example file: Butterworth_Optical_Filter.icp

The key features for this element are the filter's order and bandwidth. Following figures show how the bandwidth and
order affect the filter's performances.

2003 - 2016 Lumerical Solutions, Inc


1240 Lumerical Knowledge Base

Fig. 1 Butterworth Optical Filter Transmission Plot Fig. 2 Butterworth Optical Filter Gain Plot

6.3.3.13.19 Chebyshev Optical Filter

Symbol

Description
Chebyshev optical filter.

Ports
Name Type
input Optical Signal
output Optical Signal

Properties
General
Name Default value Default unit Value range
name Chebyshev - -
Defines the name of the element. Optical Filter

annotate true - [true, false]


Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1241

type Chebyshev - -
Defines the element unique type (read Optical Filter
only).
description Chebyshev - -
A brief description of the elements optical filter
functionality.
prefix OBP - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.

Standard
Name Default value Default unit Value range
frequency 193.1 THz*
Central frequency of operation.
*std. unit is Hz

bandwidth 10 GHz*
The 3-dB bandwidth of the filter (full
with at half maximum, FWHM). *std. unit is Hz

order 4 - [1, 10]


Defines the filter order.
ripple 3 dB
Defines the filter ripple factor.

Waveguide
Name Default value Default unit Value range
modes TE,TM - -
List of optical mode labels supported
by the element.

Diagnostic
Name Default value Default unit Value range
run diagnostic false - [true, false]
Enables the frequency response of the
designed filter implementation and the
ideal frequency response to be
generated as results.
diagnostic size 1024 -
The number of frequency points used
when calculating the filter frequency
response.

2003 - 2016 Lumerical Solutions, Inc


1242 Lumerical Knowledge Base

Results
Name Description
diagnostic/response #/transmission The complex transmission vs. frequency
corresponding to the ideal and designed filter.
diagnostic/response #/gain The gain vs. frequency corresponding to the ideal
and designed filter.
diagnostic/response #/error Mean square error comparing the frequency
response of the designed filter implementation with
the ideal frequency response.

Implementation Details
Following is an example and implementation details of how the optical Chebyshev filter works, please see the
example file: Chebyshev_Optical_Filter.icp

The key features for this element are the filter's order and bandwidth. Following figures show how the bandwidth and
order affect the filter's performances.

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1243

Fig. 1 Chebyshev Optical Filter Transmission Plot Fig. 2 Chebyshev Optical Filter Gain Plot

6.3.3.13.20 Fabry Perot Optical Filter

Symbol

Description
Fabry-Perot filter.

Ports
Name Type
input Optical Signal
output Optical Signal

Properties
General
Name Default value Default unit Value range
name Fabry-Perot - -
Defines the name of the element. Filter

annotate true - [true, false]


Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.

2003 - 2016 Lumerical Solutions, Inc


1244 Lumerical Knowledge Base

type Fabry-Perot - -
Defines the element unique type (read Filter
only).
description Fabry-Perot - -
A brief description of the elements filter
functionality.
prefix OFP - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.

Standard
Name Default value Default unit Value range
frequency 193.1 THz*
Central frequency of operation.
*std. unit is Hz

free spectral range 100 GHz*


The frequency spacing between two
successive transmitted optical *std. unit is Hz
intensity maximums (peaks).
transmission 0.01 - [0, 1]
Power transmission coefficient of the
reflecting mirrors.

Waveguide
Name Default value Default unit Value range

modes TE,TM - -
List of optical mode labels supported
by the element.

Numerical
Name Default value Default unit Value range
window function rectangular - [rectangular,
Defines the window type for the digital hamming,
filter. hanning]

number of taps 64 -
Defines the number of coefficient for
digital filter.

Diagnostic
Name Default value Default unit Value range

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1245

run diagnostic false - [true, false]


Enables the frequency response of the
designed filter implementation and the
ideal frequency response to be
generated as results.
diagnostic size 1024 -
The number of frequency points used
when calculating the filter frequency
response.

Results
Name Description
diagnostic/response #/transmission The complex transmission vs. frequency
corresponding to the ideal and designed filter.
diagnostic/response #/gain The gain vs. frequency corresponding to the ideal
and designed filter.
diagnostic/response #/error Mean square error comparing the frequency
response of the designed filter implementation with
the ideal frequency response.

Implementation Details
Following is an example and implementation details of how the Fabry-Perot filter works, please see the example
file: Fabry-Perot_Filter.icp

The key features for this element are the filter's order and bandwidth. Following figures show how the bandwidth and
order affect the filter's performances.

2003 - 2016 Lumerical Solutions, Inc


1246 Lumerical Knowledge Base

Fig. 1 Fabry-Perot Filter Transmission Plot Fig. 2 Fabry-Perot Filter Gain Plot

6.3.3.14 Polarization
Polarization Beam Splitter 1246

Linear Polarizer 1248


Polarization Rotator 1250
Circular Polarizer 1252
Waveplate 1255

6.3.3.14.1 Polarization Beam Splitter

Symbol

Description
Polarization beam splitter.

Ports
Name Type
port 1 Optical Signal
port 2 Optical Signal
port 3 Optical Signal

Properties
General
Name Default value Default unit Value range
name Polarization - -
Defines the name of the element. Beam Splitter

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1247

annotate true - [true, false]


Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type Polarization - -
Defines the element unique type (read Beam Splitter
only).
description Polarization - -
A brief description of the elements beam splitter
functionality.
prefix SPLT - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.

Standard
Name Default value Default unit Value range
angle 0 rad
Defines the polarization rotation angle.

Waveguide/Mode 1
Name Default value Default unit Value range
orthogonal identifier 1 1 -
The first identifier used to track an
orthogonal mode of an optical
waveguide. For most waveguide, two
orthogonal identifiers '1' and '2' are
available (with the default labels 'TE'
and 'TM' respectively).
label 1 X - -
The label corresponding to the first
orthogonal identifier.

Waveguide/Mode 2
Name Default value Default unit Value range
orthogonal identifier 2 2 -
The second identifier used to track an
orthogonal mode of an optical
waveguide. For most waveguide, two
orthogonal identifiers '1' and '2' are

2003 - 2016 Lumerical Solutions, Inc


1248 Lumerical Knowledge Base

available (with the default labels 'TE'


and 'TM' respectively).
label 2 Y - -
The label corresponding to the second
orthogonal identifier.

Diagnostic
Name Default value Default unit Value range
run diagnostic false - [true, false]
Enables the frequency response of the
designed filter implementation and the
ideal frequency response to be
generated as results.
diagnostic size 1024 -
The number of frequency points used
when calculating the filter frequency
response.

Results
Name Description
diagnostic/response #/transmission The complex transmission vs. frequency
corresponding to the ideal and designed filter.
diagnostic/response #/gain The gain vs. frequency corresponding to the ideal
and designed filter.
diagnostic/response #/error Mean square error comparing the frequency
response of the designed filter implementation with
the ideal frequency response.

6.3.3.14.2 Linear Polarizer

Symbol

Description
Linear polarizer.

Ports
Name Type
port 1 Optical Signal
port 2 Optical Signal

Properties

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1249

General
Name Default value Default unit Value range
name Linear Polarizer - -
Defines the name of the element.
annotate true - [true, false]
Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type Linear Polarizer - -
Defines the element unique type (read
only).

description Linear polarizer - -


A brief description of the elements
functionality.
prefix POL - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.

Standard
Name Default value Default unit Value range
angle 0 rad
Defines the polarization rotation angle.

Waveguide/Mode 1
Name Default value Default unit Value range
orthogonal identifier 1 1 -
The first identifier used to track an
orthogonal mode of an optical
waveguide. For most waveguide, two
orthogonal identifiers '1' and '2' are
available (with the default labels 'TE'
and 'TM' respectively).
label 1 X - -
The label corresponding to the first
orthogonal identifier.

Waveguide/Mode 2

2003 - 2016 Lumerical Solutions, Inc


1250 Lumerical Knowledge Base

Name Default value Default unit Value range


orthogonal identifier 2 2 -
The second identifier used to track an
orthogonal mode of an optical
waveguide. For most waveguide, two
orthogonal identifiers '1' and '2' are
available (with the default labels 'TE'
and 'TM' respectively).
label 2 Y - -
The label corresponding to the second
orthogonal identifier.

Diagnostic
Name Default value Default unit Value range
run diagnostic false - [true, false]
Enables the frequency response of the
designed filter implementation and the
ideal frequency response to be
generated as results.
diagnostic size 1024 -
The number of frequency points used
when calculating the filter frequency
response.

Results
Name Description
diagnostic/response #/transmission The complex transmission vs. frequency
corresponding to the ideal and designed filter.
diagnostic/response #/gain The gain vs. frequency corresponding to the ideal
and designed filter.
diagnostic/response #/error Mean square error comparing the frequency
response of the designed filter implementation with
the ideal frequency response.

6.3.3.14.3 Polarization Rotator

Symbol

Description
Polarization rotator.

Ports
Name Type

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1251

port 1 Optical Signal


port 2 Optical Signal

Properties

General
Name Default value Default unit Value range
name Polarization - -
Defines the name of the element. Rotator

annotate true - [true, false]


Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type Polarization - -
Defines the element unique type (read Rotator
only).
description Polarization - -
A brief description of the elements rotator
functionality.
prefix POL - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.

Standard
Name Default value Default unit Value range
angle 0 rad
Defines the polarization rotation angle.

Waveguide/Mode 1
Name Default value Default unit Value range
orthogonal identifier 1 1 -
The first identifier used to track an
orthogonal mode of an optical
waveguide. For most waveguide, two
orthogonal identifiers '1' and '2' are
available (with the default labels 'TE'
and 'TM' respectively).

2003 - 2016 Lumerical Solutions, Inc


1252 Lumerical Knowledge Base

label 1 X - -
The label corresponding to the first
orthogonal identifier.

Waveguide/Mode 2
Name Default value Default unit Value range
orthogonal identifier 2 2 -
The second identifier used to track an
orthogonal mode of an optical
waveguide. For most waveguide, two
orthogonal identifiers '1' and '2' are
available (with the default labels 'TE'
and 'TM' respectively).
label 2 Y - -
The label corresponding to the second
orthogonal identifier.

Diagnostic
Name Default value Default unit Value range
run diagnostic false - [true, false]
Enables the frequency response of the
designed filter implementation and the
ideal frequency response to be
generated as results.
diagnostic size 1024 -
The number of frequency points used
when calculating the filter frequency
response.

Results
Name Description
diagnostic/response #/transmission The complex transmission vs. frequency
corresponding to the ideal and designed filter.
diagnostic/response #/gain The gain vs. frequency corresponding to the ideal
and designed filter.
diagnostic/response #/error Mean square error comparing the frequency
response of the designed filter implementation with
the ideal frequency response.

6.3.3.14.4 Circular Polarizer

Symbol

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1253

Description
Circular polarizer.

Ports
Name Type
port 1 Optical Signal
port 2 Optical Signal

Properties
General
Name Default value Default unit Value range
name Circular - -
Defines the name of the element. Polarizer

annotate true - [true, false]


Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type Circular - -
Defines the element unique type (read Polarizer
only).
description Circular - -
A brief description of the elements polarizer
functionality.
prefix POL - -
Defines the element name prefix.
model - - -
Defines the element model name.

library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.

Standard
Name Default value Default unit Value range
polarizer type right - [left, right]
Defines the type of the polarizer.

Waveguide/Mode 1
Name Default value Default unit Value range

2003 - 2016 Lumerical Solutions, Inc


1254 Lumerical Knowledge Base

orthogonal identifier 1 1 -
The first identifier used to track an
orthogonal mode of an optical
waveguide. For most waveguide, two
orthogonal identifiers '1' and '2' are
available (with the default labels 'TE'
and 'TM' respectively).
label 1 X - -
The label corresponding to the first
orthogonal identifier.

Waveguide/Mode 2
Name Default value Default unit Value range
orthogonal identifier 2 2 -
The second identifier used to track an
orthogonal mode of an optical
waveguide. For most waveguide, two
orthogonal identifiers '1' and '2' are
available (with the default labels 'TE'
and 'TM' respectively).
label 2 Y - -
The label corresponding to the second
orthogonal identifier.

Diagnostic
Name Default value Default unit Value range
run diagnostic false - [true, false]
Enables the frequency response of the
designed filter implementation and the
ideal frequency response to be
generated as results.
diagnostic size 1024 -
The number of frequency points used
when calculating the filter frequency
response.

Results
Name Description
diagnostic/response #/transmission The complex transmission vs. frequency
corresponding to the ideal and designed filter.
diagnostic/response #/gain The gain vs. frequency corresponding to the ideal
and designed filter.
diagnostic/response #/error Mean square error comparing the frequency
response of the designed filter implementation with
the ideal frequency response.

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1255

6.3.3.14.5 Waveplate

Symbol

Description
Waveplate.

Ports
Name Type
port 1 Optical Signal
port 2 Optical Signal

Properties
General
Name Default value Default unit Value range
name Waveplate - -
Defines the name of the element.
annotate true - [true, false]
Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type Waveplate - -
Defines the element unique type (read
only).

description Waveplate - -
A brief description of the elements
functionality.
prefix POL - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.

Standard

2003 - 2016 Lumerical Solutions, Inc


1256 Lumerical Knowledge Base

Name Default value Default unit Value range


orientation 0 rad
Defines the slow axis orientation angle.
circularity 0 rad
Defines the rotation angle.

Waveguide/Mode 1
Name Default value Default unit Value range
orthogonal identifier 1 1 -
The first identifier used to track an
orthogonal mode of an optical
waveguide. For most waveguide, two
orthogonal identifiers '1' and '2' are
available (with the default labels 'TE'
and 'TM' respectively).

label 1 X - -
The label corresponding to the first
orthogonal identifier.

Waveguide/Mode 2
Name Default value Default unit Value range
orthogonal identifier 2 2 -
The second identifier used to track an
orthogonal mode of an optical
waveguide. For most waveguide, two
orthogonal identifiers '1' and '2' are
available (with the default labels 'TE'
and 'TM' respectively).
label 2 Y - -
The label corresponding to the second
orthogonal identifier.

Diagnostic
Name Default value Default unit Value range
run diagnostic false - [true, false]
Enables the frequency response of the
designed filter implementation and the
ideal frequency response to be
generated as results.
diagnostic size 1024 -
The number of frequency points used
when calculating the filter frequency
response.

Results
Name Description
diagnostic/response #/transmission The complex transmission vs. frequency
corresponding to the ideal and designed filter.

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1257

diagnostic/response #/gain The gain vs. frequency corresponding to the ideal


and designed filter.
diagnostic/response #/error Mean square error comparing the frequency
response of the designed filter implementation with
the ideal frequency response.

6.3.3.15 Receivers
Electrical
Modulation Symbol Demapper 1257

Quantizer 1260
Data Recovery 1263

6.3.3.15.1 Modulation Symbol Demapper

Symbol

Description
The symbol demapper takes constellation points and generates appropriate consecutive bits.

Ports
Name Type
input I Electrical Signal
input Q Electrical Signal
output Digital Signal

Properties
General
Name Default value Default unit Value range
name Modulation - -
Defines the name of the element. Symbol
Demapper
annotate true - [true, false]
Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type Modulation - -
Defines the element unique type (read Symbol
only). Demapper

description The symbol - -

2003 - 2016 Lumerical Solutions, Inc


1258 Lumerical Knowledge Base

A brief description of the elements demapper


functionality. takes
constellation
points and
generates
appropriate
consecutive
bits
prefix DEMAP - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.

Standard
Name Default value Default unit Value range
bitrate %bitrate% bits/s
Defines the input signal bitrate.
I delay 0 s
The time delay to apply to the input
signal.
Q delay 0 s
The time delay to apply to the input
signal.
decision point automatic - [automatic, user
Defines whether or not to automatically defined]
determine the decision point for the
constellation diagram.
decision instant 20e-012 s
Defines the time instant for the
constellation diagram detection
decision points.
scale factor I 1 -
The scale factor for the symbol map IQ
values.
scale factor Q 1 -
The scale factor for the symbol map IQ
values.
rotation 0 rad
The rotation angle rotates the symbol
map IQ values.
load map from file false - [true, false]
Defines whether or not to load IQ
values from an input file or to use the

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1259

currently stored values.


symbol map filename - - -
The file containing user defined IQ
values. Refer to the Implementation
Details section for the format expected.
modulation type 2PAM - [user defined,
Defines the input signal modulation 2PAM, 4PAM,
scheme. The user can choose between 8PAM, 16PAM,
different standard modulation schemes. BPSK, QPSK,
8PSK, 8QAM,
16QAM,
32QAM,
64QAM,
128QAM,
256QAM]
symbol map table <2,2> [-1, 1, - -
The table allows the user to read or 0...]
modified a symbol map by changing
the position of one or more symbols.

Implementation Details
The modulation symbol demapper takes constellation points input and output appropriate consecutive bits
accordingly. Please see the example file Demapper.icp for detailed information.

In this example, the modulation symbol map is used to generate 16QAM modulated electrical signals, and then the
modulation symbol demapper demodulates the signals according to the modulation type selected.

If the demapper's modulation type matches the mapper's modulation type, the original transmitted signal should be
recovered. The first figure below has matched demapper and mapper while the second has mismatch demapper and
mapper, the results are shown.

2003 - 2016 Lumerical Solutions, Inc


1260 Lumerical Knowledge Base

Fig. 1 Matched demapper & mapper Fig. 1 Not matched demapper & mapper

6.3.3.15.2 Quantizer

Symbol

Description
The quantizer maps the input to one of possible levels depending on the correspondent threshold parameter.

Ports
Name Type
input Electrical Signal
output Electrical Signal

Properties
General
Name Default value Default unit Value range
name Quantizer - -
Defines the name of the element.
annotate true - [true, false]
Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type Quantizer - -
Defines the element unique type (read
only).
description The quantizer - -
A brief description of the elements maps the input
functionality. to one of
possible levels
depending on
the
correspondent
threshold
parameter
prefix QUANTZ - -
Defines the element name prefix.
model - - -
Defines the element model name.

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1261

library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.

Standard
Name Default value Default unit Value range
load threshold from file false - [true, false]
Defines whether or not to load a map of
input values and correspondent output
values from a file or to use the currently
stored values.

threshold filename - - -
The file containing user defined input
values and correspondent output
values. Refer to the Implementation
Details section for the format expected.
threshold table <2,2> [0, 1, - -
The table allows the user to read or 0...]
modified input values and
correspondent output values.

Implementation Details
The quantizer maps the input to one of possible levels according to the correspondent threshold parameter. Please
see example file 16PAM_Quantizer.icp for more information. The following figure shows the system in the
example.

The threshold table could be user defined by directly typing in the table or by loading from file. In this example, the
file threshold_16PAM.dat is used. The file loaded and the directly defined threshold tables are shown as
following:

2003 - 2016 Lumerical Solutions, Inc


1262 Lumerical Knowledge Base

Fig. 1 Loaded file Fig. 2 Direct defined table

According to the threshold levels, the quantizer maps the signals to different values. Following are the Eye Diagram
and Vector Signal Analyzer (VSA) plots.

Fig. 3 Eye diagram Fig. 4 Symbol mapping

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1263

6.3.3.15.3 Data Recovery

Symbol

Description
The data recovery samples the electrical signal and generates appropriate consecutive bits.

Ports
Name Type
input Electrical Signal
output Digital Signal

Properties
General
Name Default value Default unit Value range
name Data Recovery - -
Defines the name of the element.
annotate true - [true, false]
Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type Data Recovery - -
Defines the element unique type (read
only).
description The data - -
A brief description of the elements recovery
functionality. samples the
electrical signal
and generates
appropriate
consecutive
bits
prefix DATA - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder

2003 - 2016 Lumerical Solutions, Inc


1264 Lumerical Knowledge Base

$LOCAL for the element.

Standard
Name Default value Default unit Value range

bitrate %bitrate% bits/s


Defines the input signal bitrate.
delay 0 s
The time delay to apply to the input
signal.
decision point automatic - [automatic, user
Defines whether or not to automatically defined]
determine the decision point for the
constellation diagram.
decision instant 20e-012 s
Defines the time instant for the
constellation diagram detection
decision points.
threshold 0 a.u.
Defines the decision amplitude for eye
measurements.

Implementation Details
The data recovery component samples the electrical signal and makes the decision accordingly to generate
consecutive bits. Please see the example file data_recovery.icp for more information. Following is the system
in the example.

Make sure the threshold for decision making is in between of the highest and lowest electrical signal levels. Users
could also set a delay in the data recovery element, it will generate a time delay accordingly in the received signal.
In this example, the delay in the data recovery element matches the delay in the system, hence there would be no
delay detected for the recovered data. Following figure compares the transmitted signal and the recovered signal,
they match each other perfectly.

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1265

Fig. 1 Transmitted & recovered signal

6.3.3.16 Photodetectors
PIN Photodetector 1265
APD Photodetector 1268

6.3.3.16.1 PIN Photodetector

Symbol

Description
PIN photodetector.

Ports
Name Type
input Optical Signal
output Electrical Signal

Properties
General
Name Default value Default unit Value range
name PIN - -
Defines the name of the element. Photodetector

annotate true - [true, false]


Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.

2003 - 2016 Lumerical Solutions, Inc


1266 Lumerical Knowledge Base

type PIN - -
Defines the element unique type (read Photodetector
only).
description PIN - -
A brief description of the elements photodetector
functionality.
prefix PIN - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.

Standard
Name Default value Default unit Value range
frequency 193.1 THz*
Central frequency of operation.
*std. unit is Hz

responsivity 1 A/W
The responsivity of the photodetector.
dark current 0 A
The dark current for the photodetector.
thermal noise 100e-024 A/Hz^.5*
The thermal noise for the
photodetector. *std. unit is W/
Hz

Numerical
Name Default value Default unit Value range
enable thermal noise true - [true, false]
Defines whether or not to enable
thermal noise. If 'true', the user will
have to specify the 'thermal noise'
value.
enable shot noise true - [true, false]
Defines whether or not to enable shot
noise. If 'true', the shot noise will be
calculated and added to the signal.
automatic seed true - [true, false]
Defines whether or not to automatically
create an unique seed value for each
instance of this element. The seed will
be the same for each simulation run.

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1267

seed 1 -
The value of the seed for the random
number generator. A value zero
recreates an unique seed for each
simulation run.

Implementation Details
The PIN photodetector is a photodiode with a wide intrinsic semiconductor region in between the p-type and n-type
semiconductor regions. For the demonstration of the PIN photodetector, please see the example file PIN.icp,
following is a figure of the demonstration system.

The key factors of a PIN photodetector is the central frequency, which should be made the same as the laser
source; the responsivity of the photodetector and some noises. The main sources of the noise are the thermal noise,
the shot noise and the dark current. All the noises can be turned on and off for the simulation.

2003 - 2016 Lumerical Solutions, Inc


1268 Lumerical Knowledge Base

The following two figures are the eye diagrams of the system, with the noises turned off and on with the values set
according to the above table.

Please see also APD photodetector 1268 .

6.3.3.16.2 APD Photodetector

Symbol

Description
APD photodetector.

Ports
Name Type
input Optical Signal
output Electrical Signal

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1269

Properties

General
Name Default value Default unit Value range

name APD - -
Defines the name of the element. Photodetector

annotate true - [true, false]


Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type APD - -
Defines the element unique type (read Photodetector
only).
description APD - -
A brief description of the elements photodetector
functionality.
prefix APD - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.

Standard
Name Default value Default unit Value range
frequency 193.1 THz*
Central frequency of operation.
*std. unit is Hz

responsivity 1 A/W
The responsivity of the photodetector.
multiplication factor 1 -
The multiplication factor for the APD
photodetector.
ionization ratio 1 - (0, 1]
The ionization ratio for determining the
excess noise of the APD
photodetector.
dark current 0 A
The dark current for the photodetector.
thermal noise 100e-024 A/Hz^.5*

2003 - 2016 Lumerical Solutions, Inc


1270 Lumerical Knowledge Base

The thermal noise for the


photodetector. *std. unit is W/
Hz

Numerical
Name Default value Default unit Value range
enable thermal noise true - [true, false]
Defines whether or not to enable
thermal noise. If 'true', the user will
have to specify the 'thermal noise'
value.
enable shot noise true - [true, false]
Defines whether or not to enable shot
noise. If 'true', the shot noise will be
calculated and added to the signal.

automatic seed true - [true, false]


Defines whether or not to automatically
create an unique seed value for each
instance of this element. The seed will
be the same for each simulation run.
seed 1 -
The value of the seed for the random
number generator. A value zero
recreates an unique seed for each
simulation run.

Implementation Details
The APD is a highly sensitive semiconductor photodetector. For the demonstration of the PIN photodetector, please
see the example file APD.icp, following is a figure of the demonstration system.

The setting table of the APD element is shown below, the major features should be taken into consideration when
doing simulation are the responsivity of the photodiode and the noises.

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1271

The following two figures are the eye diagrams of the system, with the noises turned off and on with the values set
according to the above table.

Please see also the PIN photodetector 1265 .

6.3.3.17 Network
Optical
Optical Switch 1271
Optical Y Switch 1274

6.3.3.17.1 Optical Sw itch

Symbol

Description
Optical 2x2 switch.

Ports

2003 - 2016 Lumerical Solutions, Inc


1272 Lumerical Knowledge Base

Name Type
port 1 Optical Signal
port 2 Optical Signal
port 3 Optical Signal
port 4 Optical Signal

Properties
General
Name Default value Default unit Value range
name Optical Switch - -
Defines the name of the element.
annotate true - [true, false]
Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type Optical Switch - -
Defines the element unique type (read
only).
description Optical 2x2 - -
A brief description of the elements switch
functionality.
prefix X - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.

Standard
Name Default value Default unit Value range
control 0 - -
Switch control value.
insertion loss 0 dB
Defines the insertion loss (attenuation).
isolation 100 dB
Defines the isolation.
return loss 100 dB
Defines the return loss.

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1273

Waveguide
Name Default value Default unit Value range
modes TE,TM - -
List of optical mode labels supported
by the element.

Diagnostic
Name Default value Default unit Value range
run diagnostic false - [true, false]
Enables the frequency response of the
designed filter implementation and the
ideal frequency response to be
generated as results.

diagnostic size 1024 -


The number of frequency points used
when calculating the filter frequency
response.

Results
Name Description
diagnostic/response #/transmission The complex transmission vs. frequency
corresponding to the ideal and designed filter.
diagnostic/response #/gain The gain vs. frequency corresponding to the ideal
and designed filter.
diagnostic/response #/error Mean square error comparing the frequency
response of the designed filter implementation with
the ideal frequency response.

Implementation Details
The optical switch is a 2x2 switch which by controlling the control electrode ("control" property in "standard" setting),
the input signals can be switched to the outputs. Following is an example of the optical switch element, please see
example file Optical_Switch.icp.

Please see also the application example Optical Switches 2328 for more information on optical switch.

2003 - 2016 Lumerical Solutions, Inc


1274 Lumerical Knowledge Base

The control parameter is in the "standard" setting; when set to "0", the input signals to the two branches are directly
transferred to the corresponding outputs; when set to "1", the input signals are switched to the outputs. The setting
parameter is shown in the below figure.

The "insertion loss" adds the loss to both branches.

6.3.3.17.2 Optical Y Sw itch

Symbol

Description

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1275

Optical 1x2 switch.

Ports
Name Type
port 1 Optical Signal
port 2 Optical Signal
port 3 Optical Signal

Properties
General
Name Default value Default unit Value range
name Optical Y - -
Defines the name of the element. Switch

annotate true - [true, false]


Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type Optical Y - -
Defines the element unique type (read Switch
only).
description Optical 1x2 - -
A brief description of the elements switch
functionality.
prefix Y - -
Defines the element name prefix.
model - - -
Defines the element model name.

library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.

Standard
Name Default value Default unit Value range
control 0 - -
Switch control value.
insertion loss 0 dB
Defines the insertion loss (attenuation).
isolation 100 dB
Defines the isolation.

2003 - 2016 Lumerical Solutions, Inc


1276 Lumerical Knowledge Base

return loss 100 dB


Defines the return loss.

Waveguide
Name Default value Default unit Value range
modes TE,TM - -
List of optical mode labels supported
by the element.

Diagnostic
Name Default value Default unit Value range
run diagnostic false - [true, false]
Enables the frequency response of the
designed filter implementation and the
ideal frequency response to be
generated as results.
diagnostic size 1024 -
The number of frequency points used
when calculating the filter frequency
response.

Results
Name Description
diagnostic/response #/transmission The complex transmission vs. frequency
corresponding to the ideal and designed filter.
diagnostic/response #/gain The gain vs. frequency corresponding to the ideal
and designed filter.
diagnostic/response #/error Mean square error comparing the frequency
response of the designed filter implementation with
the ideal frequency response.

Implementation Details
The optical Y switch is a 1x2 switch which by controlling the control electrode ("control" property in "standard"
setting), the input signal can be switched between the two output branches.. Following is an example of the optical
Y switch element, please see example file Optical_Y_Switch.icp.

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1277

By default setting, the "control" value is "0" and the signal outputs to port 2; the output will be switched to port 3
when the "control" value is set to 1.

The "insertion loss" adds the loss to the activated output branch.

6.3.3.18 Math
Electrical
Electrical Adder 1282
Electrical Multiplier 1280
Electrical Constant Multiplier 1278

Optical
Optical Adder 1284

2003 - 2016 Lumerical Solutions, Inc


1278 Lumerical Knowledge Base

6.3.3.18.1 Electrical Constant Multiplier

Symbol

Description
This element multiplies the input electrical signal by a constant value..

Ports
Name Type
input Electrical Signal
output Electrical Signal

Properties
General
Name Default value Default unit Value range
name Electrical - -
Defines the name of the element. Constant
Multiplier
annotate true - [true, false]
Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type Electrical - -
Defines the element unique type (read Constant
only). Multiplier

description This element - -


A brief description of the elements multiplies the
functionality. input electrical
signal by a
constant value.
prefix GAIN - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1279

Standard
Name Default value Default unit Value range
gain 1 -
Defines the gain factor.

Diagnostic
Name Default value Default unit Value range
run diagnostic false - [true, false]
Enables the frequency response of the
designed filter implementation and the
ideal frequency response to be
generated as results.
diagnostic size 1024 -
The number of frequency points used
when calculating the filter frequency
response.

Results
Name Description
diagnostic/response #/transmission The complex transmission vs. frequency
corresponding to the ideal and designed filter.
diagnostic/response #/gain The gain vs. frequency corresponding to the ideal
and designed filter.
diagnostic/response #/error Mean square error comparing the frequency
response of the designed filter implementation with
the ideal frequency response.

Implementation Details
The element Electrical Constant Multiplier multiplies a constant value to the input signal's amplitude. For the
implementation detail of this element, please see the example file electrical_constant_multiplier.icp,
the following figure shows the system and simulation result of the system in the example.

2003 - 2016 Lumerical Solutions, Inc


1280 Lumerical Knowledge Base

Please note that, the electrical constant multiplier multiplies the constant gain on the amplitude of the input signal,
thus the powers of the signals gain have a square effect (6 dB of increment in log scale). The following figures are the
output of the oscilloscopes in the system, the scales of the amplitude can be seen.

6.3.3.18.2 Electrical Multiplier

Symbol

Description
This element multiplies two electrical signals.

Ports
Name Type

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1281

input 1 Electrical Signal


input 2 Electrical Signal
output Electrical Signal

Properties
General
Name Default value Default unit Value range
name Electrical - -
Defines the name of the element. Multiplier

annotate true - [true, false]


Defines whether or not to display
annotations on the schematic editor.

enabled true - [true, false]


Defines whether or not the element is
enabled.
type Electrical - -
Defines the element unique type (read Multiplier
only).
description This element - -
A brief description of the elements multiplies two
functionality. electrical
signals
prefix MIX - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).

local path - - -
Defines the local path or working folder
$LOCAL for the element.

Implementation Details
The Electrical Multiplier multiplies two electrical signals. Please see the example file
electrical_multiplier.icp for the implementation details of this element. The following figure shows the
system in the example file:

2003 - 2016 Lumerical Solutions, Inc


1282 Lumerical Knowledge Base

In the example file, the two input sinusoidal signals have different frequency and initial phase, the following figure
shows the input signals and the multiplex of them.

6.3.3.18.3 Electrical Adder

Symbol

Description
Electrical adder.

Ports
Name Type

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1283

input 1 Electrical Signal


input 2 Electrical Signal
output Electrical Signal

Properties
General
Name Default value Default unit Value range
name Electrical Adder - -
Defines the name of the element.
annotate true - [true, false]
Defines whether or not to display
annotations on the schematic editor.

enabled true - [true, false]


Defines whether or not the element is
enabled.
type Electrical Adder - -
Defines the element unique type (read
only).
description Electrical adder - -
A brief description of the elements
functionality.
prefix SUM - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.

Implementation Details
The Electrical Adder adds two electrical signals. For the implementation detail of this element. please see the
example file electrical_adder,icp. The following figure is the system in the example file.

2003 - 2016 Lumerical Solutions, Inc


1284 Lumerical Knowledge Base

In the example file, the two input sinusoidal signals have different frequency and initial phase, the following figure
shows the input signals and the sum of them.

6.3.3.18.4 Optical Adder

Symbol

Description
Sums the values of its input ports.

Ports

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1285

Name Type
input 1 Optical Signal
input 2 Optical Signal
output Optical Signal

Properties
General
Name Default value Default unit Value range
name Optical Adder - -
Defines the name of the element.
annotate true - [true, false]
Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type Optical Adder - -
Defines the element unique type (read
only).
description Sums the - -
A brief description of the elements values of its
functionality. input ports

prefix SUM - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).

local path - - -
Defines the local path or working folder
$LOCAL for the element.

Waveguide
Name Default value Default unit Value range
modes TE,TM - -
List of optical mode labels supported
by the element.

Diagnostic
Name Default value Default unit Value range
run diagnostic false - [true, false]
Enables the frequency response of the
designed filter implementation and the

2003 - 2016 Lumerical Solutions, Inc


1286 Lumerical Knowledge Base

ideal frequency response to be


generated as results.
diagnostic size 1024 -
The number of frequency points used
when calculating the filter frequency
response.

Results
Name Description
diagnostic/response #/transmission The complex transmission vs. frequency
corresponding to the ideal and designed filter.
diagnostic/response #/gain The gain vs. frequency corresponding to the ideal
and designed filter.
diagnostic/response #/error Mean square error comparing the frequency
response of the designed filter implementation with
the ideal frequency response.

Implementation Details
The Optical Adder sums the two input signals together. Please note that the adder adds up the amplitude of the two
input signals, hence the power output will have a square effect. For the implementation details, please see the
example file optical_adder.icp for more information, the following figure is the system in the example:

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1287

The two input signals and the sum of them by the optical adder is shown below, the power of the output signal is the
square of the input signals' amplitudes summation. The short period overshoot is due to the rising and falling periods
of the square waves.

2003 - 2016 Lumerical Solutions, Inc


1288 Lumerical Knowledge Base

6.3.3.19 Logic

Digital
Digital Logic 1288
Digital NOT 1291
Digital Delay 1293

Electrical
Electrical Logic 1295
Electrical NOT 1296

6.3.3.19.1 Digital Logic

Symbol

Description
This elements applies a logical operation to any number of input ports.

Ports
Name Type
input 1 Digital Signal
input 2 Digital Signal
output Digital Signal

Properties
General
Name Default value Default unit Value range
name Digital Logic - -
Defines the name of the element.
annotate true - [true, false]
Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type Digital Logic - -
Defines the element unique type (read
only).
description This elements - -
A brief description of the elements applies a
functionality. logical
operation to
any number of
input ports

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1289

prefix LOGIC - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.

Standard
Name Default value Default unit Value range
logic operator AND - [AND, OR,
Defines the logic operation to be NAND, NOR,
applied to the input signal. XOR, NXOR]

number of input ports 2 -


Defines the number of input ports for
the element.

Implementation Details
The Digital Logic element applies logical operations to the input digital bits. For the logical operation truth table,
please refer to the table below.

Bit 1 Bit 2 AND OR NAND NOR XOR NXOR


0 0 0 0 1 1 0 1
0 1 0 1 1 0 1 0
1 0 0 1 1 0 1 0
1 1 1 1 0 0 0 1

The following figure shows the system in the example file digital_logic.icp.

2003 - 2016 Lumerical Solutions, Inc


1290 Lumerical Knowledge Base

The table below shows the input signals and the output for different logical operations.

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1291

6.3.3.19.2 Digital NOT

Symbol

Description
This elements applies a logical NOT operation to the input port.

Ports
Name Type
input Digital Signal
output Digital Signal

Properties
General
Name Default value Default unit Value range
name Digital NOT - -
Defines the name of the element.
annotate true - [true, false]
Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type Digital NOT - -
Defines the element unique type (read
only).

2003 - 2016 Lumerical Solutions, Inc


1292 Lumerical Knowledge Base

description This elements - -


A brief description of the elements applies a
functionality. logical NOT
operation to the
input port
prefix NOT - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.

Implementation Details
The element Digital NOT applies a logical NOT operation on the input signal. Following is the system in the example
file digital_not.icp.

The following figure shows the output of the logical analyzers in the system.

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1293

6.3.3.19.3 Digital Delay

Symbol

Description
Digital delay.

Ports
Name Type
input Digital Signal
output Digital Signal

Properties
General
Name Default value Default unit Value range
name Digital Delay - -
Defines the name of the element.
annotate true - [true, false]
Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type Digital Delay - -
Defines the element unique type (read
only).
description Digital delay - -
A brief description of the elements
functionality.
prefix DLY - -

2003 - 2016 Lumerical Solutions, Inc


1294 Lumerical Knowledge Base

Defines the element name prefix.


model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.

Standard
Name Default value Default unit Value range
delay 0 bits
The time delay to apply to the input
signal.

Implementation Details
The element Digital Delay applies a number of bits delay according to the setting to the digital input signal. Please
see the example file digital_delay.icp for more information on the implementation details of this element.
Following is the system in the example file and the setting for the Digital Delay element:

With a delay of 5 bits, the system input and output are shown in the plot below.

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1295

6.3.3.19.4 Electrical Logic

Symbol

Description
This elements applies a logical operation to any number of input ports.

Ports
Name Type
input 1 Electrical Signal
input 2 Electrical Signal
output Electrical Signal

Properties
General
Name Default value Default unit Value range
name Electrical Logic - -
Defines the name of the element.
annotate true - [true, false]
Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type Electrical Logic - -
Defines the element unique type (read
only).
description This elements - -

2003 - 2016 Lumerical Solutions, Inc


1296 Lumerical Knowledge Base

A brief description of the elements applies a


functionality. logical
operation to
any number of
input ports
prefix LOGIC - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.

Standard
Name Default value Default unit Value range
logic operator AND - [AND, OR,
Defines the logic operation to be NAND, NOR,
applied to the input signal. XOR, NXOR]

threshold 0.5 a.u.


The threshold used to define if the logic
level of the input signal is high or low.
low level 0 a.u.
The output amplitude for the logic level
low.
high level 1 a.u.
The output amplitude for the logic level
high.
number of input ports 2 -
Defines the number of input ports for
the element.

Implementation Details
Please see the implementation details of the Digital Logic element for more implementation information and the
Electrical NOT 1296 element for the definition of the standard property of this element.

6.3.3.19.5 Electrical NOT

Symbol

Description
This elements applies a logical NOT operation to the input port.

Ports

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1297

Name Type
input Electrical Signal
output Electrical Signal

Properties
General
Name Default value Default unit Value range
name Electrical NOT - -
Defines the name of the element.
annotate true - [true, false]
Defines whether or not to display
annotations on the schematic editor.

enabled true - [true, false]


Defines whether or not the element is
enabled.
type Electrical NOT - -
Defines the element unique type (read
only).
description This elements - -
A brief description of the elements applies a
functionality. logical NOT
operation to the
input port
prefix NOT - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).

local path - - -
Defines the local path or working folder
$LOCAL for the element.

Standard
Name Default value Default unit Value range
threshold 0.5 a.u.
The threshold used to define if the logic
level of the input signal is high or low.
low level 0 a.u.
The output amplitude for the logic level
low.
high level 1 a.u.
The output amplitude for the logic level
high.

2003 - 2016 Lumerical Solutions, Inc


1298 Lumerical Knowledge Base

Implementation Details
The element Electrical NOT applies a logical NOT operation on the input electrical signal. Following is the system in
the example file electrical_not.icp, and the standard setting for this element.

The "threshold" defines the decision making level of the element; if the signal amplitude is above the threshold, it will
output a value at the "low level", on the other hand, if the signal amplitude is below the threshold, it will output a
value at the "high level". The following two figures are the electrical NOT output for the same input sinusoidal input
signal, with the threshold, low level and high level at 0.5, 0, 1 and 0, -1, 1, respectively.

6.3.3.20 Signal processing


Electrical
Electrical Rational Resampler 1300

Optical
Optical Rational Resampler 1298

6.3.3.20.1 Optical Rational Resampler

Symbol

Description
Optical rational resampler.

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1299

Ports
Name Type
input Optical Signal
output Optical Signal

Properties
General
Name Default value Default unit Value range
name Optical Rational - -
Defines the name of the element. Resampler

annotate true - [true, false]


Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type Optical Rational - -
Defines the element unique type (read Resampler
only).
description Optical rational - -
A brief description of the elements resampler
functionality.
prefix RSMPL - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.

Standard
Name Default value Default unit Value range
upsample rate factor 1 -
The factor to be multiplied to the input
sampling rate
downsample rate factor 1 -
The factor to divide the input sampling
rate by

Numerical

2003 - 2016 Lumerical Solutions, Inc


1300 Lumerical Knowledge Base

Name Default value Default unit Value range


number of taps 64 -
Defines the number of coefficient for
digital filter.

Implementation Details
The implementation details of the optical rational resampler is the same as the electrical rational resampler except
for that the input and output of this element are optical signals. Please see Electrical Rational Resampler 1300 for
more information.

6.3.3.20.2 Electrical Rational Resampler

Symbol

Description
Rational resampler.

Ports
Name Type
input Electrical Signal
output Electrical Signal

Properties

General
Name Default value Default unit Value range
name Rational - -
Defines the name of the element. Resampler

annotate true - [true, false]


Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type Rational - -
Defines the element unique type (read Resampler
only).
description Rational - -
A brief description of the elements resampler
functionality.
prefix RSMPL - -
Defines the element name prefix.
model - - -

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1301

Defines the element model name.


library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.

Standard
Name Default value Default unit Value range
upsample rate factor 1 -
The factor to be multiplied to the input
sampling rate
downsample rate factor 1 -
The factor to divide the input sampling
rate by

Numerical
Name Default value Default unit Value range
number of taps 64 -
Defines the number of coefficient for
digital filter.

Implementation Details
The electrical rational resampler resamples the input signal according to the sampling ratio setting. The following
figure shows the system in the example file Electrical_Rational_Resampler.icp.

The factors that will define the resampling ratio for this element is the "upsample rate factor" and the "downsample
1 upsample - rate - factor
Rup = =
Rdown downsample - rate - factor
rate factor". The upsample ratio is defined as .

2003 - 2016 Lumerical Solutions, Inc


1302 Lumerical Knowledge Base

Following are two examples for the electrical rational resampler with upsample rsatio = 2 and downsample ratio = 2,
respectively. Note the number of samples' difference between the two oscilloscopes.

Up-Sam ple reatio = 2

Dow n-Sam ple ratio = 2

6.3.3.21 Cosimulation
EDA
Agilent ADS Export 1302
Agilent ADS Import 1304
Mentor Graphics Eldo Export 1305

Mentor Graphics Eldo Import 1306

Piecewise Linear Export 1309


Piecewise Linear Import 1308
EDA Cosimulation 1310

6.3.3.21.1 Agilent ADS Export

Symbol

Description
Exports Agilent ADS time domain waveform (TIM MDIF) signal data. Agilent ADS and the Agilent logo are
trademarks of Agilent Technologies..

Ports
Name Type
input Electrical Signal

Properties

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1303

General
Name Default value Default unit Value range
name Agilent ADS - -
Defines the name of the element. Export

annotate true - [true, false]


Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type Agilent ADS - -
Defines the element unique type (read Export
only).

description Exports Agilent - -


A brief description of the elements ADS time
functionality. domain
waveform (TIM
MDIF) signal
data. Agilent
ADS and the
Agilent logo are
trademarks of
Agilent
Technologies.
prefix TO_ADS - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).

local path - - -
Defines the local path or working folder
$LOCAL for the element.

Standard
Name Default value Default unit Value range
option line # T ( SEC V R - -
Defines the option line '# T ( time_unit 50 )
data_unit R xx )' for the TIM file
format.For more information refer to
Agilent ADS documentation on
supported data files and
'TimedDataRead' component.
format line % time voltage - -
Defines the format line '% time voltage'
for the TIM file format.For more
information refer to Agilent ADS

2003 - 2016 Lumerical Solutions, Inc


1304 Lumerical Knowledge Base

documentation on supported data files


and 'TimedDataRead' component.
filename waveform.tim - -
The name of the file for writing the
output data (destination).The file
contains Agilent ADS time domain
waveform (TIM MDIF) signal data.

6.3.3.21.2 Agilent ADS Import

Symbol

Description
Imports Agilent ADS time domain waveform (TIM MDIF) signal data. Agilent ADS and the Agilent logo are
trademarks of Agilent Technologies..

Ports
Name Type
output Electrical Signal

Properties

General
Name Default value Default unit Value range
name Agilent ADS - -
Defines the name of the element. Import

annotate true - [true, false]


Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type Agilent ADS - -
Defines the element unique type (read Import
only).
description Imports Agilent - -
A brief description of the elements ADS time
functionality. domain
waveform (TIM
MDIF) signal
data. Agilent
ADS and the
Agilent logo are

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1305

trademarks of
Agilent
Technologies.
prefix FROM_ADS - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.

Standard
Name Default value Default unit Value range
filename waveform.tim - -
The name of the file containing the
input data (source).The file contains
Agilent ADS time domain waveform
(TIM MDIF) signal data.

6.3.3.21.3 Mentor Graphics Eldo Export

Symbol

Description
Exports Mentor Graphics Eldo time domain PWL corner points. Mentor Graphics Eldo and the Mentor Graphics logo
are trademarks of Mentor Graphics..

Ports
Name Type
input Electrical Signal

Properties
General
Name Default value Default unit Value range
name Mentor - -
Defines the name of the element. Graphics Eldo
Export
annotate true - [true, false]

2003 - 2016 Lumerical Solutions, Inc


1306 Lumerical Knowledge Base

Defines whether or not to display


annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type Mentor - -
Defines the element unique type (read Graphics Eldo
only). Export

description Exports Mentor - -


A brief description of the elements Graphics Eldo
functionality. time domain
PWL corner
points. Mentor
Graphics Eldo
and the Mentor
Graphics logo
are trademarks
of Mentor
Graphics.
prefix TO_ELDO - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.

Standard
Name Default value Default unit Value range
filename waveform.txt - -
The name of the file for writing the
output data (destination).The file
contains Mentor Graphics Eldo time
domain PWL corner points.

6.3.3.21.4 Mentor Graphics Eldo Import

Symbol

Description
Imports Mentor Graphics Eldo time domain PWL corner points. Mentor Graphics Eldo and the Mentor Graphics logo

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1307

are trademarks of Mentor Graphics..

Ports
Name Type
output Electrical Signal

Properties
General
Name Default value Default unit Value range
name Mentor - -
Defines the name of the element. Graphics Eldo
Import
annotate true - [true, false]
Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type Mentor - -
Defines the element unique type (read Graphics Eldo
only). Import

description Imports Mentor - -


A brief description of the elements Graphics Eldo
functionality. time domain
PWL corner
points. Mentor
Graphics Eldo
and the Mentor
Graphics logo
are trademarks
of Mentor
Graphics.

prefix FROM_ELDO - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.

Standard
Name Default value Default unit Value range
filename waveform.txt - -

2003 - 2016 Lumerical Solutions, Inc


1308 Lumerical Knowledge Base

The name of the file containing the


input data (source).The file contains
Mentor Graphics Eldo time domain
PWL corner points.

6.3.3.21.5 Piecew ise Linear Import

Symbol

Description
Imports time domain waveform piecewise linear corner points..

Ports
Name Type
output Electrical Signal

Properties
General
Name Default value Default unit Value range
name Piecewise - -
Defines the name of the element. Linear Import

annotate true - [true, false]


Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type Piecewise - -
Defines the element unique type (read Linear Import
only).
description Imports time - -
A brief description of the elements domain
functionality. waveform
piecewise linear
corner points.
prefix FROM_PWL - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1309

local path - - -
Defines the local path or working folder
$LOCAL for the element.

Standard
Name Default value Default unit Value range
filename waveform.txt - -
The name of the file containing the
input data (source).The file contains
Mentor Graphics Eldo time domain
PWL corner points.

6.3.3.21.6 Piecew ise Linear Export

Symbol

Description
Exports time domain waveform piecewise linear corner points..

Ports
Name Type
input Electrical Signal

Properties
General
Name Default value Default unit Value range
name Piecewise - -
Defines the name of the element. Linear Export

annotate true - [true, false]


Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type Piecewise - -
Defines the element unique type (read Linear Export
only).
description Exports time - -
A brief description of the elements domain
functionality. waveform
piecewise linear
corner points.

2003 - 2016 Lumerical Solutions, Inc


1310 Lumerical Knowledge Base

prefix TO_PWL - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.

Standard
Name Default value Default unit Value range
filename waveform.txt - -
The name of the file for writing the
output data (destination).The file
contains Mentor Graphics Eldo time
domain PWL corner points.

6.3.3.21.7 EDA Cosimulation

Symbol

Description
EDA Cosimulation.

Ports
Name Type
port 1 Electrical Signal
port 2 Electrical Signal

Properties
General
Name Default value Default unit Value range
name EDA - -
Defines the name of the element. Cosimulation

annotate true - [true, false]


Defines whether or not to display
annotations on the schematic editor.

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1311

enabled true - [true, false]


Defines whether or not the element is
enabled.
type EDA - -
Defines the element unique type (read Cosimulation
only).
description EDA - -
A brief description of the elements Cosimulation
functionality.
prefix COSIM - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.

Standard
Name Default value Default unit Value range
number of ports 0 -
Defines the number of ports for the
element.

6.3.3.22 Tools
Data Delay 1311
Port Converter 1313
Fork 1xN 1314
Write To Stream 1316
Read From Stream 1317

Termination 1319
Probe 1320

6.3.3.22.1 Data Delay

Symbol

Description
Data delay.

Ports
Name Type

2003 - 2016 Lumerical Solutions, Inc


1312 Lumerical Knowledge Base

input Variant
output Variant

Properties

General
Name Default value Default unit Value range
name Data Delay - -
Defines the name of the element.
annotate true - [true, false]
Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type Data Delay - -
Defines the element unique type (read
only).
description Data delay - -
A brief description of the elements
functionality.
prefix DLY - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.

Standard
Name Default value Default unit Value range
delay 1 -
Defines the number of buffer data
values delayed.

Numerical
Name Default value Default unit Value range
bidirectional false - [true, false]
Defines whether or not to disable
bidirectional propagation. If 'false', only
propagation from 'left' to 'right' is
allowed

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1313

6.3.3.22.2 Port Converter

Symbol

Description
Converts a bidirectional port into input and output ports.

Ports
Name Type
port Variant
output Variant
input Variant

Properties
General
Name Default value Default unit Value range
name Port Converter - -
Defines the name of the element.
annotate true - [true, false]
Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type Port Converter - -
Defines the element unique type (read
only).
description Converts a - -
A brief description of the elements bidirectional
functionality. port into input
and output
ports
prefix CONV - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder

2003 - 2016 Lumerical Solutions, Inc


1314 Lumerical Knowledge Base

$LOCAL for the element.

Diagnostic
Name Default value Default unit Value range

run diagnostic false - [true, false]


Enables the frequency response of the
designed filter implementation and the
ideal frequency response to be
generated as results.
diagnostic size 1024 -
The number of frequency points used
when calculating the filter frequency
response.

Results
Name Description
diagnostic/response #/transmission The complex transmission vs. frequency
corresponding to the ideal and designed filter.
diagnostic/response #/gain The gain vs. frequency corresponding to the ideal
and designed filter.
diagnostic/response #/error Mean square error comparing the frequency
response of the designed filter implementation with
the ideal frequency response.

6.3.3.22.3 Fork 1xN

Symbol

Description
Duplicates a signal from a single input to multiple output.

Ports
Name Type
input Variant
output 1 Variant
output 2 Variant

Properties
General
Name Default value Default unit Value range

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1315

name Fork 1xN - -


Defines the name of the element.
annotate true - [true, false]
Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type Fork 1xN - -
Defines the element unique type (read
only).
description Duplicates a - -
A brief description of the elements signal from a
functionality. single input to
multiple output
prefix FORK - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.

Standard
Name Default value Default unit Value range
number of ports 2 -
Defines the number of output ports for
the element.

Diagnostic
Name Default value Default unit Value range
run diagnostic false - [true, false]
Enables the frequency response of the
designed filter implementation and the
ideal frequency response to be
generated as results.
diagnostic size 1024 -
The number of frequency points used
when calculating the filter frequency
response.

Results
Name Description

2003 - 2016 Lumerical Solutions, Inc


1316 Lumerical Knowledge Base

diagnostic/response #/transmission The complex transmission vs. frequency


corresponding to the ideal and designed filter.
diagnostic/response #/gain The gain vs. frequency corresponding to the ideal
and designed filter.
diagnostic/response #/error Mean square error comparing the frequency
response of the designed filter implementation with
the ideal frequency response.

6.3.3.22.4 Write To Stream

Symbol

Description
Write To Stream.

Ports
Name Type
input Variant

Properties
General
Name Default value Default unit Value range
name Write To - -
Defines the name of the element. Stream

annotate true - [true, false]


Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type Write To - -
Defines the element unique type (read Stream
only).
description Write To - -
A brief description of the elements Stream
functionality.
prefix WRITE - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1317

Defines the element location or source


in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.

Standard
Name Default value Default unit Value range
filename file.icd - -
The name of the file for writing the
output data (destination).

Implementation Details
The "write to stream" element outputs the data to an icd file, which can be read by a "read from stream" element.
Please see the example file Digital_Write_To_Stream.icp for detailed information. Please see also the read
from stream 1317 element.

The file name is defined under the "Standard" category, by default, the file name would be set to "file.icd". In this
example, the file generated is digital_out.icd. The file can only be read by the "read from stream" element in
INTERCONNECT.

6.3.3.22.5 Read From Stream

Symbol

Description
Read From Stream.

Ports
Name Type
output Variant

Properties

2003 - 2016 Lumerical Solutions, Inc


1318 Lumerical Knowledge Base

General
Name Default value Default unit Value range
name Read From - -
Defines the name of the element. Stream

annotate true - [true, false]


Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type Read From - -
Defines the element unique type (read Stream
only).

description Read From - -


A brief description of the elements Stream
functionality.
prefix READ - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.

Standard
Name Default value Default unit Value range
filename file.icd - -
The name of the file containing the
input data (source).

Implementation Details
The read from stream element reads an icd file into the system. The icd file can be generated by a write to stream
1316 element. Please see the example file Digital_Read_From_File.icp.

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1319

The file name is defined under the "Standard" category, In this example, the file is digital_in.icd.

6.3.3.22.6 Termination

Symbol

Description
Termination.

Ports
Name Type
input Variant

Properties
General
Name Default value Default unit Value range
name Termination - -
Defines the name of the element.
annotate true - [true, false]
Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type Termination - -
Defines the element unique type (read
only).
description Termination - -

2003 - 2016 Lumerical Solutions, Inc


1320 Lumerical Knowledge Base

A brief description of the elements


functionality.
prefix T - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.

Implementation Details
The termination is an element that terminates the system. It could be used to help to have a better design of the
system. When some output ports' data are not interested to be measured or analyzed, it could be connected to a
termination to have a neat look. It also can be used as connected to ground for electrical signals.

6.3.3.22.7 Probe

Symbol

Description
Probe.

Ports
Name Type
input Variant

Properties
General
Name Default value Default unit Value range
name Probe - -
Defines the name of the element.
annotate true - [true, false]
Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type Probe - -
Defines the element unique type (read
only).

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1321

description Probe - -
A brief description of the elements
functionality.
prefix PROBE - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.

Implementation Details
The element Probe is used to store the data in which port it connected to. It will save the data to an Excel file with
the header, which is the description and property of the data, and the data values. Please see the example file
probe.icp for the implementation details of this element. Following is the figure shows the system in the example:

By running the simulation, a folder with the same name of the INTERCONNECT file will be generated and an Excel
file will be created. The Excel file is named as the element name plus the port name which is connected to the
probe, please see the file sine_1_output.csv for example.

6.3.3.23 Custom
This folder contains all the user-defined elements (or primitive elements that have been modified by the user).

To add new elements into the library, simply right-click on the element and select "Copy to Element Library".

2003 - 2016 Lumerical Solutions, Inc


1322 Lumerical Knowledge Base

It is also possible to add an element to the Element Library from the script using the addtolibrary 1613 command.

6.3.4 Compound Elements


A Compound Element is a group of primitive elements that functions as a single element. In addition to simple
grouping, it is possible to create parameterized group-objects by adding script code to the group. Compound
elements are essential for creating increasingly complex photonic integrated circuits based on sub-circuit elements.
Once created, they can be added to the element library as a Custom Element 1321 .

Objective
This page describes how to create Compound Elements, which are essential for creating increasingly complex
photonic integrated circuits based on sub-circuit elements.

Associated files
compound_element.icp

See also
Property Expressions 903

A compound element has 4 main components:


a Property Editor
a list of Ports
a list of Results
a Setup and Analysis script

To create a compound element, right-click on the view port and select "Create compound element". Once the new
"empty" compound element is created, right-click on the element and select "Expand". This will open a new view
port corresponding to the new compound element, which users can add elements to. Alternatively, users can group
existing elements into a compound element by selecting the elements in the view port, right-clicking and selecting
"Create compound element".

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1323

With the compound element selected, click on the the Edit button to open the edit window. In the edit window there
will be 4 tabs corresponding to the 4 components of a compound element.

Property Editor
The property editor includes a list of properties for the compound element. By default, this list is inherited from the
compound element's parent element (ie. Root Element 905 if it does not belong to another compound element).
However, this default list can be modified and new custom properties can be introduced. Property values of can be
set from parent values using expressions as discussed in Property Expressions 903 , so elements inside the
compound element can inherit the properties of the compound and root elements.

Ports
This is a list of ports which allow the compound element to transfer data to and from external elements. Each port
corresponds to a "Relay" object inside the compound element (which child elements of the compound element can
connect to), as well as an external port connected to the compound element (which other elements can connect to
the compound element from). For example, consider a compound element containing a Straight Waveguide. Here,
we add two ports to the compound element corresponding to Port 1 and 2 of the waveguide:

You can use the Arrange button to arrange the locations of the ports automatically so they are evenly spaced in the
view port. It's also possible to click and drag the "Relay" objects in the view port.

Once the ports are added, we can connect Port 1 and 2 of the compound element directly to Port 1 and 2 of the
straight waveguide inside the compound element through Relay 1 and 2. As shown in the figure below, the
compound element on the right is now equivalent to the straight waveguide on the left.

2003 - 2016 Lumerical Solutions, Inc


1324 Lumerical Knowledge Base

Results
The results list includes all the output results for the compound element. Once the analysis script that has been run,
only the parameters that are both defined in the results section and set in the analysis script (via setresult) 1619 can
be accessed externally. Note that it is not necessary for compound elements to have results.

Scripts
The scripts define the properties and functionalities of the compound element. This includes a "Setup" script to
setup or edit the grouped primitives, as well as a "Analysis"script to execute a customized analysis routine.

SETUP
The setup script can only be used to delete, edit or get the properties of child elements. For example, the
command "selectall" selects all of the elements inside of the compound element, while ignoring those outside.
The setup script only has access to the compound element's own properties (ie. those defined in the Property
Editor). It does not have access to workspace variables (ie. those defined in the script prompt or in a script file). In
addition, any variables defined in the setup script cannot be obtained from the script prompt or from a script file.
The setup script can be debugged by pressing the TEST button. If there are no syntax errors or break commands
in the script, you will see the line <script complete> in the script output. If there is a syntax error, the location of the
error will be given in the script output. An example of an error message is: syntax error: prompt line: 38.
The setup script is run every time the OK button is pressed.

ANALYSIS
The analysis script can only be used set the variables defined in the "Results" tab. This can be done using the
setresult 1619 script command.
The analysis script does not have access to workspace variables (ie. those defined in the script prompt or in a
script file). In addition, any variables defined in the analysis script cannot be obtained from the script prompt or from
a script file.
The analysis script is run every time the "Run Analysis" button is pressed, or if runanalysis 1647 is called from the
script prompt.

Example
In compound_element.icp, a new property "length" has been defined for the compound element, which will set
the length of the Straight Waveguide inside the compound element.

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1325

The compound element examples shown here are very simple. Users can create compound elements of arbitrary
complexity following the same work flow.

Properties
General
Name Default value Default unit Value range
name Compound - -
Defines whether or not the element is Element
enabled.
annotate true - [true, false]
Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines the name of the element.
type Compound - -
Defines the element unique type (read Element
only).
description Compound is a - -
A brief description of the elements hierarchical
functionality. element that
contains other
elements
prefix COMPOUND - -
Defines the element name prefix.
source - - -
Defines whether or not the element is
flipped.

2003 - 2016 Lumerical Solutions, Inc


1326 Lumerical Knowledge Base

local path - - -
Defines the element rotation value.
expandable true - [true, false]
Defines whether or not the user can
access the internal elements of the
compound.

Simulation
Name Default value Default unit Value range
bitrate %bitrate% bits/s
The output signal bitrate.
time window %time window s
The duration of the generated signal. %
This is typically set by the global
properties in the root (top-most)
element.
sample rate %sample rate% Hz
The sample rate of the generated
signal. This is typically set by the
global properties in the root (top-most)
element.

Script
Name Default value Default unit Value range
run setup script automatic - [automatic,
Defines whether to run setup script always]
automatically or to force the setup
script to run at the beginning of the
simulation.

6.3.5 Scripted Element


A scripted element is a custom element that can be defined with analytic or imported s-parameter representations
via Lumericals script language or MATLAB. They provide users with flexibility in defining the functionalities of circuit
elements. Once created, they can be added to the element library as a Custom Element 1321 .

Objective
This page describes how to create Scripted Elements, which provide users with flexibility in defining the
functionalities of circuit elements.

Associated files
scripted_elements.icp
digital_scripted_struct.icp
electrical_scripted_struct.icp
optical_mm_scripted_struct.icp

See also
Scripting Language 1383

A scripted element has 4 main components:


a Property Editor
a list of Ports

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1327

a list of Results
a set up Scripts (Setup, Ready, Go, Wrap-up)

To create a compound element, right-click on the view port and select "Create scripted element". Once the new
"empty" scripted element is created, users can choose to change the icon of the new element by selecting "Set
icon" (this is optional). With the scripted element selected, click on the the Edit button to open the edit window. In
the edit window there will be 4 tabs corresponding to the 4 components of a scripted element.

Property Editor
The property editor includes a list of properties for the scripted element. By default, this list only contains the
standard General properties. This default list can be modified and new custom properties can be introduced.

Ports
This is a list of ports which allow the scripted element to transfer data to and from other elements. Here, we add two
ports to the scripted element:

Results
The results list includes all the output results for the scripted element. Once the simulation has been ran, only the
parameters that are both defined in the results section and set in the scripts (via setresult) 1619 can be accessed
externally. Note that it is not necessary for scripted elements to have results.

Scripts
The scripts define the properties and functionalities of the scripted element.
The scripts only have access to the scripted element's own properties (ie. those defined in the Property Editor). It
does not have access to workspace variables (ie. those defined in the script prompt or in a script file). In addition,
any variables defined in the scripts cannot be obtained from the script prompt or from a script file.
The scripts can be debugged by pressing the TEST button. If there are no syntax errors or break commands in the
script, you will see the line <script complete> in the script output. If there is a syntax error, the location of the error
will be given in the script output. An example of an error message is: syntax error: prompt line: 38.

SETUP
The setup script can be used to set the properties of the scripted element. Often, this is done through the
setsparameter 1631 script command (which sets the s-parameters between the output and input port of the scripted
element).
The setup script is ran once at the initialization stage.

READY
The ready script defines the criteria necessary to propagate the data.
It is not necessary to define the ready stage.

GO
The go script defines what data to send to the output ports.
It is not necessary to define the go stage.

WRAP-UP
The wrap-up script can be used to post-process the data at the end of the simulation.
The wrap-up script is ran once at the wrap-up stage.
It is not necessary to define the wrap-up stage.

2003 - 2016 Lumerical Solutions, Inc


1328 Lumerical Knowledge Base

Example
In scripted_elements.icp, there are three scripted element examples:
Optical Constant Gain
Frequency Dependent Transmission
Frequency Dependent Propagation
The script commands used in these files are based on port data push and pop, please see the following script
commands pages for the implementation details of the script commands:
popportdata 1620 , getdigitaldata 1628 , setdigitaldata 1629 , pushportdata 1620 , getdigitalwaveform 1628 , popportframe 1621 ,
pushportframe 1622 , popportframedata 1622 , pushportframedata 1623 , getportframeheader 1623 , setportframeheader 1623 ,
getmonitorframe 1623 , getmonitorwaveform 1624 , lookupreadtable 1444 , lookupreadvalue 1444 , lookupreadnportsparameter
1444

The file digital_scripted_struct.icp contains an example of a scripted digital inverter element.


Expand for the details of this example
The figure below shows the system in the example file

The "Scripted Inverter" has the following script in the "Go" window under the "Simulation" tab.

signalIn = popportframe("input");

if( bitrate == 0 ) {
logmessage("bitrate : " + num2str(signalIn.header.bitrate));
logmessage("frequency_grid_spacing : " + num2str(signalIn.header.frequency_grid_spaci
bitrate = signalIn.header.bitrate;
}

logmessage(toscript(signalIn));

mxX( nCount ) = signalIn.data.time;


mxY( nCount ) = signalIn.data.value;

if( signalIn.data.value > 0 )


signalIn.data.value = 0;
else
signalIn.data.value = 1;

nCount = nCount + 1;

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1329

pushportframe("output",signalIn);

It reads in the data from the buffer at the input port, inverts the signal and pushes the data to the output port.

The "Scripted Analyzer" is scripted the same way as the "Logic Analyzer" and has the following script in the
"Wrap-up" window under the "Simulation" tab.

signalIn = getmonitorwaveform("input");

logmessage(toscript(signalIn,false));

setresult("waveform",signalIn.time,signalIn.value,"time (s)","amplitude (a.u.)");

setresult("bitrate",signalIn.bitrate,"bitrate (bits/s)");

It collects all the data at the input port, set the data to a result dataset so that it could be visualized.

Please check the links for the details of the script commands popportframe 1621 , logmessage 1449 ,
pushportframe 1622 , getmonitorwaveform 1624 and setresult 1619 .

The file electrical_scripted_struct.icp contains an example of an electrical gain element.


Expand for the details of this example
The figure below shows the system in the example file

The "Scripted Gain" has the following script in the "Go" window under the "Simulation" tab.

signalIn = popportframe("input");

if( sample_rate == 0 )
samplerate = signalIn.header.sample_rate;

logmessage(toscript(signalIn));

mxX( nCount ) = signalIn.data.time;


mxY( nCount ) = signalIn.data.value;

signalIn.data.value = signalIn.data.value * 10;

2003 - 2016 Lumerical Solutions, Inc


1330 Lumerical Knowledge Base

nCount = nCount + 1;

pushportframe("output",signalIn);

It reads in the electrical data from the buffer at the input port, enlarges the amplitude of the signals by 10 times and
pushes the data to the output port.

The "Scripted Analyzer" is scripted the same way as the "Oscilloscope" and has the following script in the "Wrap-
up" window under the "Simulation" tab.

signalIn = getmonitorwaveform("input");
logmessage(toscript(signalIn,false));
setresult("waveform",signalIn.signal.time,signalIn.signal.value,"time (s)","amplitude (a.

signalIn = getmonitorwaveform("input","frequency");
logmessage(toscript(signalIn,false));
setresult("spectrum",signalIn.signal.frequency,signalIn.signal.value,"frequency (Hz)","am

It collects all the data at the input port, and sets the data to a result dataset so that it could be visualized.

Please check the links for the details of the script commands popportframe 1621 , logmessage 1449 ,
pushportframe 1622 , getmonitorwaveform 1624 and setresult 1619 .

The file optical_mm_scripted_struct.icp contains an example of an optical gain element.


Expand for the details of this example
The figure below shows the system in the example file

The "Scripted Gain" has the following script in the "Go" window under the "Simulation" tab.

signalIn = popportframe("input");

nModes = length( signalIn.header.signal );

if( sample_rate == 0 ) {
sample_rate = signalIn.header.sample_rate;

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1331

if( nModes > 0 )


logmessage(toscript(signalIn.header));
}

if( nModes > 0 ) {


for( i = 1:nModes ) {
nSignal = length(signalIn.data.signal{i}.value);
for( j = 1:nSignal ) {
signalIn.data.signal{i}.value(j) = signalIn.data.signal{i}.value(j) * 10.0;
}
}
}

logmessage(toscript(signalIn.data));

pushportframe("output",signalIn);

It reads in the optical data from the buffer at the input port, enlarges the amplitude of the signals by 10 times and
pushes the data to the output port.

The "Scripted Analyzer" is scripted the same way as the "Optical Oscilloscope" and has the following script in the
"Wrap-up" window under the "Simulation" tab.

signalIn = getmonitorwaveform("input");
logmessage(toscript(signalIn,false));
setresult("mode 1",signalIn{1}.channel{1}.signal.time,signalIn{1}.channel{1}.signal.value
setresult("mode 2",signalIn{2}.channel{1}.signal.time,signalIn{2}.channel{1}.signal.value

It collects all the optical data for different modes at the input port, and sets the data to a result dataset so that it
could be visualized.

Please check the links for the details of the script commands popportframe 1621 , logmessage 1449 ,
pushportframe 1622 , getmonitorwaveform 1624 and setresult 1619 .

6.3.6 Custom Library & Design Kit


Introduction
To provide photonic circuit designers with an efficient workflow similar to that of a traditional EDA design
environment, it is necessary to have a design kit (DK) with libraries of photonic components that can be reliably
manufactured. A process design kit (PDK) is a comprehensive collection of technology parameters, rules and
compact models for a specific fabrication process at a particular foundry. Design kit compact models can accurately
represent the circuit-level response of a variety of components that can be manufactured using this process and
foundry. This means that IC designers can use these models in a circuit-level SPICE simulation without in-depth
knowledge of the component-level detail and the fabrication process. This separation allows for a very fast and
efficient method of virtual prototyping.

INTERCONNECT 5 introduced new licensed features that enable secure generation and use of customized compact
model libraries (CMLs). These features can be used to generate calibrated CMLs, and distributed them with foundry
PDKs, or to efficiently protect and distribute internally developed custom element libraries among different design
groups or customers.

In this topic
Generate Custom Element 1332
Package/Publish Compact Model Library 1334

Install Compact Model Libray 1336


Associated files
mzi_reference_circuit.icp

2003 - 2016 Lumerical Solutions, Inc


1332 Lumerical Knowledge Base

Generic_CML.cml

See also
Custom 1321

Objective
This section describes how to create a compact model (CM), how to package CMLs, and how to install them to the
Design Kits element library folder in INTERCONNECT.

A reference circuit

6.3.6.1 Generate Custom Element


The Custom folder in the Element Library can store all the user-defined elements (or primitive elements that have
been modified by the user). This page introduces a simple example of how to generate a compound element and
copy it to the Custom folder in the Element Library.

In this topic
Elements Design 1332
Create Custom Elements 1333

Reference Elements 1334


Associated files
cml_gc_example.icp
S_TE1550_SubGC_neg31_oxide.txt

See also
Package/Publish Compact Model Library 1334

Install Compact Model Library 1336

Elements Design
Any modified primitive elements, compound elements and script elements can be copied to the Element Library
under the Custom folder. Users can also customize the properties and icons of the elements. The following figures
shows a compound element of a grating coupler. It contains an Optical S parameter element which loads the data
from a file that contains the s parameters of a grating coupler. The grating coupler's S-parameters file can be
generated by using FDTD Solutions or experimental data.

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1333

The icon of the element can be simply set by right clicking on the element and selecting the "Set icon" option. The
icon is a scale vector graphics (SVG) image file. The figure below illustrates this process.

Create Custom Elements


To add the new element into the library, one can simply right-click on the element and select "Copy to Element
Library" or use the "addtolibrary" script command, then the element should appear in the currently selected sub-
folder under the element library Custom folder.

Option 1: select the element -> right click -> "Copy to Element Library"

Option 2: "addtolibrary" command

addtolibrary("foldername");

Additional Notes:
It is a good habit to remove any residue of the "name" and "prefix" (for example,
the "_1" in the element name "test_GS_S_parameters_1") of the element when adding

2003 - 2016 Lumerical Solutions, Inc


1334 Lumerical Knowledge Base

it to the Element Library. The sequence numbers may cause confusions when using
the element later.

Once the customized elements are copied to the Custom folder, a file with extension .ice will be generated in the
folder for each custom element. To change the default location of the Custom library folder, right click on the Custom
folder and select "Redirect", then choose the appropriate path. Users can also create sub-folders in Custom library
folder by right clicking on it and selecting "New folder".

Reference Elements
Once a customized element is added to the Custom library, it can be used in two ways, as a copy or as a
reference. The default setting for creating elements from Element Library is "Create a copy". User can change the
setting in the System Option Editor (Files -> Options) as shown below. The copy of a customized element gets full
access to the element's properties and internal data; while the reference of the element (indicated by the light blue
shadow) is the "shell" of the customized element, only the "surface" properties can be edited and the element is
non-expandable, this means user cant access the internal elements of the compound element.

6.3.6.2 Package/Publish Compact Model Library


With the CML publisher, a designer can define and package a library of compact model elements for distribution or
inclusion in a PDK package. Critical proprietary data such as hierarchical circuit definitions of compact model
elements, performance data and process parameters can be obfuscated upon packaging and are accessible only
with an associated CML reader license.

Please note that only the folders under Custom library can be packaged/published as a CML. To package/publish a
compact model library, user can simply right click on the folder and select "Package/Publish" or use the
"packagedesignkit" script command. Packaging of a CML requires no keys while publishing of a CML requires a
publisher key, hence an extra publisher license is required for publishing a compact model library.

NOTE: Please contact sales@lumerical.com to ask for a trial of the CML publisher
license.

The two options to package/publish a CML are shown below.

Option 1: select the folder -> right click -> "Package/Publish"

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1335

Option 2: "packagedesignkit" command

packagedesignkit(name, filename, key, overwrite);

A prompt window will pop out after select "Package/Publish". By clicking "OK" a CML file with extension cml will
be generated under the specified path with the specified name. The cml file can then be distributed to other users.
An example file Generic_CML.cml is available in the Associated files list at the beginning of this section.

The following table shows the comparison among the CML distribution options "Public", "Protected" and "Protected
+".

Distribution Publisher Reader End User Permissions


Model License License
Use View Edit
Public N.A. N.A.
Protected Generic N.A.
Protected+ Specific Specific Licensed

*Public: supports open collaborative CML development.


*Protected: enables obfuscation of underlying data, and locking of hierarchical model definitions.
*Protected+: further security feature such that only specially licensed users can use.

The "Export HTML" option allows the designer to export the details of the compact models in a library to separated
.html files together with the images of the symbol of the models. The .html files are named after the name of the
models. The following figure illustrates this procedure. The details of the compact models can then be used as user
guidelines and be distributed together with the CMLs.

2003 - 2016 Lumerical Solutions, Inc


1336 Lumerical Knowledge Base

6.3.6.3 Install Compact Model Library


The CML reader allows designers to open and use a packaged/published CML. All compact model elements are
installed into the design kit folder and can be used to design, simulate and optimize photonic integrated circuits.
Underlying proprietary data used to define the models remains obfuscated.

Users can install design kits by right clicking on the Design Kits folder, selecting "Install" and choosing the right cml
file, or by using the "installdesignkit" script command. If the cml file is published with a key, an extra reader license
is required to use the installed design kit. After successfully installed the CML, the elements will appear in the
Design Kits folder and they can only be used as reference. The installation process is shown below.

NOTE: Please contact sales@lumerical.com to ask for a trial of the CML reader
license.

Option 1: select "Design Kits" folder -> right click -> specify the cml file and installation path

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1337

Option 2: "installdesignkit" command

installdesignkit(filename, path, overwrite);

In the example file mzi_reference_circuit.icp, the MZI structure is constructed by the references elements
in the installed Design Kit. The following figure shows the circuit in the example file. Try to install a CML without the
appropriate key will result in an empty folder under the Design Kit Category.

If the example file is send to another end user without the design kit installed, the elements will appear in red
shadow to indicate the broken reference elements. This means the compact models are not available in the users
design kit library.

2003 - 2016 Lumerical Solutions, Inc


1338 Lumerical Knowledge Base

6.4 Parameter sweeps, optimization and yield analysis


This section describes the way in which the parameter sweeps, optimization and yield analysis are set up. These
features allow users to automate the process of finding desirable parameter values by running a large number of
simulations. For additional information, see the Optimization and sweeps video.

Descriptio Screenshot
n
Parameter Sweeps Paramete
699 r sweeps
Sweep are useful
scripting commands for finding
703
the
Nested
optimum
Sweeps 707
value and
Running
sensitivity
parameter
of the
sweeps
design
without the
performan
CAD 710
ce to
Sweep
certain
analysis for
parameter
dispersion
712
s.

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1339

Optimization 716 Optimizati


Optimization on is
scripting commands done by
722 running a
Optimization large
Setup and number of
Advanced simulation
tab 727 s with an
Particle advanced
Swarm optimizati
Optimization on
727
algorithm.
This
particularl
y useful if
there are
multiple
parameter
s to
optimize.
Yield analysis 728 The yield
Yield analysis
scripting commands tool runs
734 extensive
Monte
Carlo
analysis,
sweeping
across
multiple
parameter
s. This
can be
useful for
assessing
variations
of
compone
nt-level
simulation
s, and on
an overall
circuit
performan
ce.

An example Optimization and Sweeps tab is shown in the screenshot below:

2003 - 2016 Lumerical Solutions, Inc


1340 Lumerical Knowledge Base

At the top of the window is a toolbar containing the following buttons:


Creates a parameter sweeping task.
Creates an optimization task.

Creates a yield analysis task.


Opens an edit window for the selected project where one can modify its properties.
Deletes the selected project.
Runs the selected sweep, optimization and yield analysis with the resources currently set in the resources
manager.

The Animate function allows you to view the structures that will be simulated in a parameter sweep or optimization in
the CAD before you run the project:

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1341

6.4.1 Parameter sweeps


Objective
This page describes how to run a parameter sweep. Parameter sweeps are useful for finding the optimum value of a
parameter, and for studying the sensitivity of the design performance to certain parameters or running a series of
simulations with a set of varying parameters.We will demonstrate how to use the parameter sweep feature in a
simple example. We will find the optimum thickness of an anti-reflection (AR) layer on silicon. The optimum
thickness is the thickness that gives the minimum reflection at the wavelength of operation, in this example it is 500
nm. For additional information, see the Optimization and sweeps video.

Associate files
sweep_AR_coating_example.fsp

See also
Sweep scripting commands 703
Running sweeps without the CAD 710

Nested Sweeps 707


Sweep analysis for dispersion 712
Optimization tasks 716
Script - Parameters sweeps 1401

Parameter sweep properties


NAME: Parameter sweep name.
Parameters
TYPE- RANGES: Specify sweep points with start / stop values. All values will be linearly spaced.
TYPE - VALUES: Specify each sweep point manually. Allows non-linearly spaced sweep values.
NUMBER OF POINTS: Number of points in the parameter sweep.
NAME: A user specified name for the parameter. Will appear in results dataset.
PARAMETER: Property to sweep.
TYPE: Used to specify the type of units for the selected property (eg. length, time).
START/STOP: The start/stop value of the sweep, when using the RANGES option.
VALUE_1,2,3,...: Specific sweep values, when using the VALUES option.
ADD: Add another line to the parameters table.
REMOVE: Remove a line from the parameters table.
Results
NAME: A user specified name for the result. Will appear in the results dataset.
RESULT: Result to collect.
OPERATION: Optionally, apply a simple mathematical operation to the results. Supported operations are
Sum, Mean, Integrate.
Advanced
RESAVE FILES AFTER ANALYSIS: Optionally, resave the project files after the analysis scripts have been
run. This can be helpful when the analysis scripts are slow to run.

Creating the parameter sweep project

2003 - 2016 Lumerical Solutions, Inc


1342 Lumerical Knowledge Base

Make sure you can see the


Optimization and Sweeps window. This
can be done by going to the menu
View->Windows->Optimization and
Sweeps, or by right clicking on the
upper menu bar and making sure that
Optimization and sweeps is selected.

Click the Add Sweep button to create a


new parameter sweep task. Click the
edit button to open the Edit sweep
dialog window.

Optimizations and sweeps

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1343

Editing parameters
Once the sweep object is open, add a
parameter and browse the parameter
pulldown menu. Select the "thickness"
property of the AR structure.

Next, choose the Type to be length


and set the Start and Stop values to
10nm and 150nm respectively. The
final result should look like the
screenshot here.

Note: Multiple parameter


sweeps and Nested Sweeps
If two or more parameters are
specified, they must have the same
dimensions (i.e., number of points).
Each sweep step will update all
parameters values one column at a
time (this is not the same as nested
parameter sweeps). For information on
how to set up nested parameter
sweeps, please see Nested Sweeps
707 .

2003 - 2016 Lumerical Solutions, Inc


1344 Lumerical Knowledge Base

Recording results
Add results to record, the recorded
results will be available when the
sweep is done. Select the power
transmission 'T' from the Reflection and
Transmission monitors, as shown here.

Under the Operation column, please


leave the choice blank. The final
Parameter Sweep window should look
like this figure. Click OK to accept all
settings, and go back to the main
Optimization and Sweeps window.

Note: File not found!


Ensure that there is no period in the
parameter sweep name. Otherwise it
may result in "file not found" error
while running the sweep.

Edit Parameter Sweep

Running the parameter sweep


To run the parameter sweeps, select the
parameter sweep and click the run button. To
distribute the sweep between several local
computers, you must configure the
computation Resources before running the
optimization. Without additional configuration,
all simulations will run on the local computer.

Optimizations and sweeps

Viewing the results

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1345

The parameter sweep data is saved in a similar way to


monitor data. One can right-click on the results in the
Result View or the parameter sweep project to select
any of the sweep results to be displayed in the
Visualizer.

Parameter sweep results can also be obtained in the


script environment with the command
getsweepresult, which is similar to the command
getresult. The name of each data member is the
Name column that you specified when adding the
parameters and results, in this case "T", "R" and
"thickness". For example, the following 2 lines of script
will plot the result R vs thickness.
R = getsweepresult("thickness_sweep","R");
plot(R.thickness*1e9, R.T, "AR thickness (nm)","R");

We can see that the best thickness is approximately


60 nm. To find the precise value, we could repeat the
parameter sweep with more points, or reduce the range
of the thicknesses we consider. Alternatively, we could
consider using an Optimization project (Optimize a
design 716 ) to find the thickness that gives the smallest
reflection.

6.4.1.1 Sweep scripting commands


Objective
This page describes how to generate and run a sweep using script commands. The same example used in the
section "Parameter Sweeps" will be re-generated in this page. Using script commands to generate a sweep analysis
is a convenient way when users already have the parameters at their hands. For additional information and detailed
implementation of the script commands, please see the "Measurement and optimization data" section. Please note
that, all the script commands used in this example could also be applied to optimization and yield analysis.

Associate files
sweep_AR_coating_example.fsp
sweep_AR_coating_example_script.ls
f

See also
Optimization scripting commands 722
Yield scripting commands 734
Parameter sweeps 699
Optimization 716
Yield analysis 728
Script - Parameters sweeps 1401
Script - Measurement and optimization data 1644

To generate and run the sweep using script commands, user can open the

2003 - 2016 Lumerical Solutions, Inc


1346 Lumerical Knowledge Base

sweep_AR_coating_example_script.fsp file and follow the three steps listed below; or, open and run the
script file sweep_AR_coating_example_script.lsf.

Creating the parameter sweep project


The following commands are used to generate and superficially define a new sweep named
"thickness_sweep_script".

# add a new sweep and set basic properties


addsweep;
setsweep("sweep", "name", "thickness_sweep_script");
setsweep("thickness_sweep_script", "type", "Ranges");
setsweep("thickness_sweep_script", "number of points", 10);

When the sweep is superficially generated, the parameters can then be defined and added to it. The following
commands define the name, type, range and the path of the parameter "thickness".

# define the parameter thickness


para = struct;
para.Name = "thickness";
para.Parameter = "::model::AR structure::thickness";
para.Type = "Length";
para.Start = 0.05e-6;
para.Stop = 0.15e-6;
para.Units = "microns";

This command adds the parameter "thickness" to the sweep "thickness_sweep_script". When the parameter is
successfully added, the sweep will appear in the "Optimizations and Sweeps" tab as shown below.

# add the parameter thickness to the sweep


addsweepparameter("thickness_sweep_script", para);

[click to enlarge]

The next step is to add the results that we want to measure into the sweep. The commands listed below define
and add the results "R" and "T" to the sweep as shown in the sweep editing window below. After this step, the
sweep is well defined and ready to run.

# define results
result_1 = struct;
result_1.Name = "R";
result_1.Result = "::model::R::T";

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1347

result_2 = struct;
result_2.Name = "T";
result_2.Result = "::model::T::T";

# add the results R & T to the sweep


addsweepresult("thickness_sweep_script", result_1);
addsweepresult("thickness_sweep_script", result_2);

[click to enlarge]

Running the parameter sweep


A well defined sweep can also be run by using script commands. The following command runs the sweep
"thickness_sweep" and loads the results to it. After running, the results will be loaded back to the sweep and
the sweep will be indicated by the red logo as shown below.

# run the sweep


runsweep("thickness_sweep_script");

2003 - 2016 Lumerical Solutions, Inc


1348 Lumerical Knowledge Base

[click to enlarge]

Viewing the results


The sweep results could also be visualized by using script commands. The commands below stores the sweep
results "R" and "T" to two same named datasets "R" and "T" and plots them.

# save & view the results


R = getsweepresult("thickness_sweep_script", "R");
T = getsweepresult("thickness_sweep_script", "T");

plot(R.thickness*1e9, R.T, "AR thickness (nm)","R");


plot(T.thickness*1e9, abs(T.T), "AR thickness (nm)","T"); # T is in the opposite direc

The following figures are the plots of the results R and T v.s. thickness, which show same results as in the
section Parameter sweeps.

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1349

6.4.1.2 Nested Sweeps


Objective
This section describes how to run a nested parameter sweep. We will demonstrate how to do this by finding the
incident angle that results in minimum reflection from a 50 nm silver film on glass for 3 different wavelengths (for a
more detailed description of this example, see Surface Plasmon Resonance 2D 1905 ).

2003 - 2016 Lumerical Solutions, Inc


1350 Lumerical Knowledge Base

Associate files
sweep_nested_example.fsp

See also
Run a parameter sweep 699

Creating the nested parameter sweep project


In the Optimization and Sweeps window, click the Add Sweep button to create a new parameter sweep task
(see Parameter sweeps) 699 . Once the sweep is added, right click on the new sweep project and select Insert
Parameter Sweep.

A nested parameter sweep will be created as a result. Open the edit window for the inner sweep object,
change the name to "theta", add a parameter "source_angle" and browse the parameter pulldown menu to
select the "angle" property of the source. Set the Start/Stop values to sweep from 40 to 60 degrees, and the
Number of points 20. Finally, add a result "R" from the reflection analysis group (see Creating parameter
sweep project 699 for step-by-step details). The edit window should look like the screenshot below.

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1351

Edit parameter sweep

In the edit window for the outer sweep, change the name to "wavelength", add a parameter "lambda" and
browse the parameter pulldown menu to select the "wavelength" property of the source. Set the Start/Stop
values to sweep from 0.4 to 0.6 microns in 3 points. Add a result "R" and select R from the Result
pulldowndown menu, which contains all the results in the inner sweep that are already defined.

Running the nested parameter sweep


The nested parameter sweep can be run in the same manner as a single parameter sweep, as described in
Parameter sweeps 699 .

Viewing the results


Just like single parameter sweeps, the data from a nested parameter sweep can also be retrieved using
getsweepresults. The following commands can be used to plot the data. It is also possible to plot this data
with the visualizer.
reflection = getsweepresult("wavelength", "R");
R = -reflection.T;
lambda = reflection.lambda_sweep*1e9;

plot(reflection.source_angle, pinch(R,3,1),
pinch(R,3,2),
pinch(R,3,3),
"angle of incidence (degrees)","Reflection","Reflection
legend('lambda = ' + num2str(lambda(1)), 'lambda = ' + num2str(lambda(2)), 'lambda = '

2003 - 2016 Lumerical Solutions, Inc


1352 Lumerical Knowledge Base

We can see that shorter wavelengths correspond to larger incident angles where minimum reflection is
obtained.

Note: Optimizations with nested sweeps


This example file also contains an optimization task with a nested sweep. The optimization task is setup to
find the optimal thickness of silver to minimize the reflected power for illumination by 500 nm light at angles
between 45 and 50 degrees. The nested sweep is used to calculate the average reflection for angles between
45 and 50 degrees for each design (ie. thickness) in the optimization.

6.4.1.3 Running parameter sweeps without the CAD


Objective
This section describes an alternative way to run parameter sweeps on a separate network (i.e. an external cluster). If
your full license is installed on one network (i.e. your office) and your extra engine licenses are installed on an
external cluster, then the Job Manager feature of FDTD Solutions can't be used. Instead, you will use the full license
on your local computer to generate a set of simulation files. These files are then transferred to the cluster. Very
often, these jobs will be submitted to the clusters job scheduler. See the running simulations chapter for more
information on running simulations from the command line (i.e without using the Lumerical Job Manager). When the
simulations are finished, the files are transferred back to the local desktop computer. You can then reload the data
files and extract the requested information.

1. Adjust model parameters and save a set of fsp files (a fsp file for each parameter value).
2. Run all the simulations
3. Load the simulation files and extract the required information

Advantages:
The individual simulations can be sent to an external cluster or other workstations

Disadvantages:
It is not quite as simple to run all the simulations

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1353

See also
Run a parameter sweep 699

Running Simulations

Step 1: Adjust model parameters and save a new fsp file for each
parameter value
After setting up a parameter sweep as described at Parameter sweeps 699 , rather than running the parameter
sweep directly, simply choose Save to files, as shown below.

This will create a directory called with the same name as the original fsp file, in this case,
usr_optimization_example. Inside this directory you will find 10 fsp file, called "test_sweep_1.fsp"
to "test_sweep_10.fsp". Each file corresponds to a particular value of the parameters and there are 10
files because we chose 10 different values for our sweep parameter.

Step 2: Run the simulations


The simulations can be run on a cluster or extra workstations, without requiring a graphical user interface
license. A shell or batch file is the most convenient way to run these simulations. For further details, see the
running simulations chapter. In particular, see the 'Run solver with MPI' pages.

Step 3: Load the results


Once all the simulations have been completed, you can load all the results by choosing Load from files, as
shown below.

2003 - 2016 Lumerical Solutions, Inc


1354 Lumerical Knowledge Base

This will reload all the results from the fsp files, as if they had been run on the local machine by pressing the
Run button. You can then proceed with the analysis of the results as shown in Parameter sweeps 699 .

Note: Re-running the parameter sweep


Once the sweep is run, a new set of fsp files are saved to a folder. If the sweep is run again, then a set of
fsp files will be saved to overwrite the previous files. To avoid overwriting the fsp files, use save as to change
file name or current working directory before re-running the sweeps.

6.4.1.4 Sweep analysis for dispersion


Objective
This section describes how to use a parameter sweep in MODE to do dispersion calculations much like those
available in the frequency analysis tab of the Eigensolver. While the GUI allows for easy and quick set-up of a
frequency sweep, the parameter sweep will achieve the same results with more versatility; here, we sweep over
frequency to generate the same plots of dispersion, neff, group velocity, etc. This technique can be generalized to
sweep over any other parameter and generate plots of other figures of merit in other Lumerical's products.

Another advantage of using this technique is that the multiple simulations in a sweep can be distributed to yield
faster results for larger simulation files.

Solver 101

FDE
Associate files
sweep_frequency_dispersion.lms
sweep_frequency_dispersion.lsf

See also
Run a parameter sweep 699
FDE - Frequency Analysis 758

Simulation set-up and results

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1355

Open the usr_frequency.lms file and in the Optimization and Sweeps window, right click on the object named
"sweep" and click "Edit". You will see that the sweep object has been set up to sweep the same simulation over a
frequency range of 100-200 THz.
Open the usr_frequency.lsf script within the project file. Notice that script takes the same inputs as the frequency
sweep in the graphical interface. Notice that the user is supposed to make sure that the start and stop frequencies
as well as the number of frequency values in that range should match between the set up sweep, and the inputs of
the script.

If the track_selected_mode variable is set to 1, the sweep will run the simulation for the first frequency and set the
desired mode as a reference dcard. Then as the frequency is swept the overlap between the selected dcard and the
corresponding mode at the new frequency is used to track that mode. The difference here with the frequency
analysis of the user interface is that the sweep is completed initially and the figures of merit are calculated
afterwards.

The following plots will be generated:

2003 - 2016 Lumerical Solutions, Inc


1356 Lumerical Knowledge Base

If the track_selected_mode variable is set to 0, the sweep will track all the modes and plot the results on the same
graph. These modes are solved for according to the input variables like number of test modes, and effective index to
solve around, set at the top of the script.

The following plots will be generated:

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1357

Since the sweep automatically creates a folder with the name {filename}_sweep, when using your file, make sure the
name of the folder is set right the script where the path is respecified. Note that the working directory is changed to
access the sweep files in both cases and so you would need to switch the directory back to the original one before
you run another sweep.

2003 - 2016 Lumerical Solutions, Inc


1358 Lumerical Knowledge Base

6.4.2 Optimization
Objective
This page describes how to optimize a design using the graphical user interface. Optimizing the design is done
using an advanced optimization algorithm, which requires running a large number of simulations. This can be much
more efficient than running a parameter sweep, particularly if there is more than one parameter to optimize. For
details in the optimization algorithm used, please see Particle Swarm Optimization 727 . We will demonstrate how to
use the optimization feature with a simple example. We will find the optimum thickness of an anti-reflection (AR)
layer on silicon. The optimum thickness is the thickness that gives the minimum reflection at the wavelength of
operation, in this case 500 nm. For additional information, see the Optimization and sweeps video.

Associate files
sweep_AR_coating_example.fsp

See also
Optimization scripting commands 722

Computation Resources
Run a parameter sweep 699
Particle Swarm Optimization 727

Optimization properties
NAME: Parameter sweep name.

Setup tab
Optimization and configuration
ALGORITHM - PARTICLE SWARM: Use the Particle Swarm 727 optimization method.
ALGORITHM - USER DEFINED: Create your own User Defined 727 optimization method.
TYPE: Specify if the result should be minimized or maximized.
MAXIMUM GENERATIONS: The maximum number of generations to run. The total number of simulations
to run is the product of Max generations and Generation size.
GENERATION SIZE: The number of simulations per generation.
RESET RANDOM GENERATOR: Enabling this option will reset the random number generator with a fixed
seed. This ensures the same set of random numbers are used for each run of the optimization, which leads
to consistent results between runs.
TOLERANCE: Set a tolerance to stop the optimization early (ie. run less than the maximum number of
generations. The tolerance algorithm is:
- if =0: Always run the specified number of generations.
- if >0: Always run the first 10% of generations. After that, stop the optimization if
bestResult (lastGener ation) - bestResult (10% of generation s ago)
tolerance
bestResult (lastGener ation)
. Basically, this
stops the optimization when the bestResult stops changing.
Parameters
PARAMETER: Property to optimize.
TYPE: Used to specify the type of units for the selected property (eg. length, time).
MIN/MAX: The min/max value of the range of interest.
ADD: Add another line to the parameters table.
REMOVE: Remove a line from the parameters table.
Figure of merit
Multiple results can be collected, but one must be selected as the quantity to optimize. This result must
be a single scalar number. Other results can be matrices.

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1359

OPTIMIZE: Select a specific result to optimize (i.e. minimize or maximize this value). The selected result
must be a single scalar value.
NAME: A user specified name for the result. Will appear in the results dataset.
RESULT: Result to collect.
ADD: Add another line to the Figure of merit table.
REMOVE: Remove a line from the Figure of merit table.
SELECT TO OPTIMIZE: Make selected result the one to optimize.

Advanced tab
User defined algorithm tab
FIRST GENERATION SCRIPT: The First generation script can be used to define the initial parameter values
for the initial generation of simulations. This script is not required if you want random starting values.
NEXT GENERATION SCRIPT: This script is used to calculate the parameter values for the next generation,
based on results from previous generations.
TEST: Test the First and Next generation scripts without running any simulations.
SCRIPT OUTPUT: Output messages from the scripts.
Figure of merit script
This tab allows users to calculate a custom figure of merit (FOM), rather than using a value obtained
directly from a monitor or analysis object.
USE FIGURE OF MERIT SCRIPT: Select this option to enable this feature.
FIGURE OF MERIT SCRIPT: This script allows results selected in the 'Figure of merit' section of the
SETUP tab to be post-processed into a final FOM that will be optimized. The script input arguments are
the results selected in the 'Figure of merit' section of the SETUP tab. The script must calculate a variable
named 'fom', which will be used as the FOM to optimize. This variable must be a single, scalar number.

See the Custom optimization algorithms 727 page for examples.

Creating the optimization project


Make sure
you can see
the
Optimization
and Sweeps
window. This
can be done
by going to
the menu
View-
>Windows-
>Optimization
and Sweeps,
or by right
clicking on
the upper
menu bar and
making sure
that
Optimization
and sweeps
is selected.

2003 - 2016 Lumerical Solutions, Inc


1360 Lumerical Knowledge Base

Click the Add


optimization
button to
create a new
optimization
task. Click
the edit
button to
open the Edit
optimization
dialog
window.
Optimizations and sweeps window

Note:
Optimizat
ions with
nested
sweeps
It may be
necessary
to use a
nested
parameter
sweep
within an
optimization
task. For
example, to
optimize a
design for
unpolarized
light, it is
necessary
to sweep
over both
polarization
s at each
point in the
optimization
task. For an
example,
see the
Nested
sweeps 707
page.

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1361

Once the
optimizer
object is
open, add a
parameter
and browse
the parameter
pulldown
menu. Select
the
"thickness"
property of
the AR
structure.

Next, choose
the Type to
be length and
set the min
and max
values to 10
nm and 150
nm
respectively.
The final
result should
look like the
screenshot
here.
Add a figure
of merit.
Select the
power
transmission
'T' from the
Reflection
monitor (R),
as shown
here.

2003 - 2016 Lumerical Solutions, Inc


1362 Lumerical Knowledge Base

Go to the
Setup tab and
choose the
Particle
Swarm
algorithm.
Choose to
Minimize the
figure of merit.
Set the
Maximum
generations to
20 and the
Generation
size to 10
with a
Tolerance of
0. The final
settings edit optimization window
should look
like the
screenshot
here.

Click OK to
accept all
settings, and
go back to
the main
Optimizations
and Sweeps
window. For
more
information of
the SETUP
and
ADVANCED
tab, please
see here 727 .

Running the optimization project


To run the optimization, right click on the
new optimization object and choose Run, or
simply click on the run button in the
Optimizations and Sweeps window.

To distribute the optimization between


several local computers, you must configure
the computation Resources before running
the optimization. Without additional
configuration, all simulations will run on the
local computer.

Optimizations and Sweeps window

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1363

Viewing the results


When the
optimization runs, it
automatically updates
the following window
which shows a plot of
the best figure of
merit as a function of
generation. It also
displays the best
solution found with
the corresponding
parameters. Press
"Stop Optimization"
button to end the task
early, which will keep
all of the results
calculated up to that Optimization Status
point.

At the end of the


task, you can zoom
in on the figure of
merit. We see that a
reflection of less than
0.2% was achieved
within 4 generations
and that the optimum
AR layer thickness is
approximately 60nm.

Optimization Status

2003 - 2016 Lumerical Solutions, Inc


1364 Lumerical Knowledge Base

Once the optimization


has been run, you
can view the results
by right clicking on
the optimization
project.

6.4.2.1 Optimization scripting commands


Objective
This page describes how to generate and run an optimization analysis using script commands. The optimization of
the design is done using an advanced optimization algorithm, which requires running a large number of simulations.
This can be much more efficient than running a parameter sweep, particularly if there is more than one parameter to
optimize. The same example used in the section "Optimization" will be re-generated in this page. Using script
commands to generate the optimization is a convenient way when users already have the parameters at their hands.
For additional information and detailed implementation of the script commands, please see the "Measurement and
optimization data" section. Please note that, all the script commands used in this example could also be applied to
sweep and yield analysis.

Associate files
sweep_AR_coating_exampl
e.fsp
optimization_AR_coating
_example_script.lsf

See also
Sweep scripting commands 703
Yield scripting commands 734
Parameter sweeps 699
Optimization 716
Yield analysis 728
Script - Parameters sweeps 1401
Script - Measurement and
optimization data 1644

To generate and run the optimization analysis using script commands, user can open the
sweep_AR_coating_example_script.fsp file and follow the three steps listed below; or, open and run the
script file optimization_AR_coating_example_script.lsf.

Creating the optimization analysis project


The following commands are used to generate and superficially define a new optimization named
"thickness_optimization_script".

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1365

# add a new optimization and set basic properties


addsweep(1);
setsweep("optimization", "name", "thickness_optimization_script");
setsweep("thickness_optimization_script", "Type", "Minimize");
setsweep("thickness_optimization_script", "algorithm", "Particle Swarm");
setsweep("thickness_optimization_script", "maximum generations", 20);
setsweep("thickness_optimization_script", "generation size", 10);
setsweep("thickness_optimization_script", "tolerance", 0);

After the optimization is superficially generated, the parameters can then be defined and added to it. The
following commands define the path, type, optimization window and unit of the parameter. And then add this
parameter to the optimization "thickness_optimization_script".

# define the parameter thickness


para = struct;
para.Parameter = "::model::AR structure::thickness";
para.Type = "Length";
para.Min = 0.05e-6;
para.Max = 0.15e-6;
para.Units = "microns";

# add the parameter thickness to the optimization


addsweepparameter("thickness_optimization_script", para);

Then this optimization analysis will appear in the "Optimizations and Sweeps" tab as shown below.

[click to enlarge]

The next step is to add the results that we want to optimize into the optimization. The commands listed below
define and add the results "R" and "T" to the optimization object as shown in the optimization editing window
below.

# define figure of merit


result_1 = struct;
result_1.Name = "R";
result_1.Result = "::model::R::T";
result_1.Optimize = true;

result_2 = struct;

2003 - 2016 Lumerical Solutions, Inc


1366 Lumerical Knowledge Base

result_2.Name = "T";
result_2.Result = "::model::T::T";
result_2.Optimize = false;

# add the figure of merits R & T to the optimization


addsweepresult("thickness_optimization_script", result_1);
addsweepresult("thickness_optimization_script", result_2);

Please note that, only the result R (reflection) is optimized to be minimum in this example. The optimization
"thickness_optimization_script" is now completely defined as shown below.

[click to enlarge]

Running the optimization analysis


When the optimization runs, it automatically updates the Optimization status window which shows a plot of
the best figure of merit as a function of generation. It also displays the best solution found with the
corresponding parameters. Press "Stop Optimization" button to end the task early, which will keep all of the
results calculated up to that point. The following command runs the optimization
"thickness_optimization_script" and loads the results to it. After the optimization has been successfully run,
the optimization process and the optimized resolution will be shown in the "Optimization Status" window as
indicated below.

# run optimization
runsweep("thickness_optimization_script");

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1367

[click to enlarge]

Close the "Optimization Status" window and user can find there are several results stored in the optimization
as indicated below.

[click to enlarge]

2003 - 2016 Lumerical Solutions, Inc


1368 Lumerical Knowledge Base

Viewing the results


The optimization results could also be plotted by script commands. The commands below retrieve and plot the
"parameter trend" result as an example.

# get & view the results - parameter value


R = getsweepresult("thickness_optimization_script", "parameter trend");
value = R.getattribute("parameter value");
gen = R.getparameter("generation");

plot(gen, value / 1e-9, "generation", "parameter value (nm)", "thickness");

And the reflection optimization trend is plotted as in the figure shown below. We can see that the optimization
result and the sweep result from the previous section show great agreement with each other and the optimized
thickness to get a minimum reflection is around 60 nm.

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1369

6.4.2.2 Custom optimization algorithms


This page provide two example custom optimization algorithms.

Associate files
optimization_user_defined.fsp
optimization_steepest_descent.fsp

See also
Optimization 716
Particle Swarm Optimization 727

The first example shows how to implement a simple 'shrinking box' optimization algorithm, while the second shows
a steepest descent implementation.

6.4.2.3 Particle Swarm Optimization


Particle Swarm Optimization (PSO) is a population based stochastic optimization technique, inspired by the social
behavior of flocks of birds or schools of fish [1,2], and has widely been used for various kinds of design optimization
problems [2] including nanophotonic design [3-7]. In PSO, the potential solutions, called particles, are initialized at
random positions, and then move within the parameter search space. The particles are subject to three forces as
they move:
1. Spring force towards the personal best position, p, ever achieved by that individual particle
2. Spring force towards the global best position, g, ever achieved by any particle.
3. A frictional force, proportional to the velocity.

The algorithm then follows these steps


1. Set the number of particles N and initialize the positions x
2. Evaluate figures of merit (FOM) and find p and g
3. Calculate the new velocities v for each particle based on the forces applied to the particle
r r r r r r r
vt = vt -1 + c1h1 ( pt -1 - xt -1 ) + c2h 2 ( g t -1 - xt -1 ) + (w - 1)vt -1
(1)
4. Update the positions x of each particle based on the velocity
r r r
xt = xt -1 + vt
(2)
5. Repeat from step 2 until convergence is achieved

In Eq. (1), t is the iteration counter; c 1 and c 2 are the cognitive and social factors, respectively; is called the inertial
weight; and 1 and 2 are random number between 0 and 1. Lumerical's PSO implementation uses default values of
c 1, c 2 and that have shown to converge well in many test optimization problems for photonic design problems. A
detailed description of the algorithm and the difference coefficients can be found in Refs. [1] or [2].

The movie below shows how the particle positions and velocities change as a function of iteration when using the
PSO algorithm to find the maximum of a sinc function in 2D space.

2003 - 2016 Lumerical Solutions, Inc


1370 Lumerical Knowledge Base

1. J. Robinson and Y. Rahmat-Samii, "Particle swarm optimization in Electromagnetics," IEEE Trans. Antennas
and Propagat. 52, pp.397 - 407 (2004).
2. K. E. Parsopoulo and M N. Vrahatis, Particle swarm optimization and intelligence : advances and applications,
Information Science Reference, 2010.
3. J. Pond and M. Kawano, Virtual prototyping and optimization of novel solar cell designs, Proc. SPIE 7750,
775028 (2010), DOI:10.1117/12.873114
4. M. Kawano and J. Pond, "Design Optimization of Photonic Crystal Organic Solar Cells using the FDTD method
in Combination with Particle Swarm Optimization," 7th International Conference on Optics-photonics Design &
Fabrication, Yokohama, Japan, 19S1-14, 2010.
5. J. G. Mutitu, S. Shi, C. Chen, T. Creazzo, A. Barnett, C. Honsberg and D. W. Prather, "Thin film silicon solar cell
design based on photonic crystal and diffractive grating structures", Opt. Express 16, 5238, 2008
6. M.Shokooh-Saremi and R. Magnusson, "Leaky-mode resonant reflectors with extreme bandwidths," Opt. Lett.
35, 1121, 2010.
7. R. Magnusson, M. Shokooh-Saremi,and E. G. Johnson, Guided-mode resonant wave plates, Opt. Lett. 35,
2472, 2010.

6.4.3 Yield analysis


Objective
The yield analysis tool allows users to run extensive Monte Carlo analysis, sweeping across multiple parameters.
This can be useful for assessing statistical variations of circuit elements on overall circuit performance, as well as
the effects of variations in component-level simulations. You can specify the parameters to vary and the results to
record. The tool runs a number of trials with parameters values generated according to a specified distribution and
returns a yield estimate, which is the percent of trials where the results fall within a specified range of values. The
tool can also display histograms showing the distribution of parameter values used and the distribution of results
from the trials.

This page describes how to run a yield analysis task using an example finite impulse response filter circuit
composed of cascaded Mach-Zehnder interferometers, but the steps for setting up a yield analysis project in all
products are similar. See Optical filters 2321 for more information about this circuit.

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1371

Associate files
run_yield.icp
sweep_AR_coating_example.fsp

See also
Yield scripting commands 734

Optical filters 2321

Yield properties
NAME: Yield name.
Configuration
NUMBER OF TRIALS: The number of trials to run.

Properties
NAME: A user specified name for the parameter. Will appear in results dataset.
PARAMETER: Property to sweep.
DESCRIPTION: Parameter statistical distribution settings.
DISTRIBUTION TYPE: Specify the type of statistical distribution. Options include: Uniform, Gaussian,
Lognormal, Truncated Gaussian, Truncated Lognormal, Discrete (uniform distribution where variables can only
take discrete values specified by the STEP).
DISTRIBUTION MEAN: Mean value of the distribution for Gaussian, Lognormal, Truncated Gaussian, and
Truncated Lognormal distributions.
DISTRIBUTION STD DEVIATION: Standard deviation of the distribution for Gaussian, Lognormal, Truncated
Gaussian, and Truncated Lognormal distributions.
DISTRIBUTION MIN/MAX: Minimum/Maximum value or cut-off value for Uniform, Truncated Gaussian,
Truncated Lognormal, and Discrete distributions.
DISTRIBUTION STEP: The discrete step size of allowed values for Discrete distribution.
DISTRIBUTION SEED: The seed value used to generate parameter values. The seed used can either be an
automatically generated random seed, or the user can specify a value for the seed so that the same results
can be achieved each time the yield analysis is run.
ADD: Add another line to the properties table.
REMOVE: Remove a line from the properties table.

Results
NAME: A user specified name for the result. Will appear in results dataset.
RESULT: Result to collect.
ESTIMATION: If "true" is selected in the Estimation field, the trial will be considered a pass if the result falls
within the specified min/max range. If there is more than one result with a yield estimate, the final yield
percentage will be the percent of trials where all of the results fall within the specified ranges.
MIN/MAX: Min/max range when the Estimation property is set to True.
ADD: Add another line to the results table.
REMOVE: Remove a line from the results table.

Creating the yield analysis project


Make sure that you can see the Optimizations and Sweeps window. This window can be opened by going into
the top menu under View->Windows and selecting Optimizations and Sweeps, or by right-clicking on the

2003 - 2016 Lumerical Solutions, Inc


1372 Lumerical Knowledge Base

upper menu bar for a list of windows and selecting Optimizations and Sweeps from the list.

Click the Create New Yield Analysis button in the Optimizations and Sweeps window to create a new yield
analysis task. Click the Edit button to open the Edit yield analysis dialog window.

Once the yield analysis object is open, set the Number of trials to 20. Add a parameter (button on the right-
hand side of the Properties section) and change the name of the property to "ng1". Double-cick on the
Parameter field and browse the pulldown menu. Select the group index property of the SW1 waveguide.

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1373

Next, double-click on the description field of the property to open the Edit distribution dialog window. Select
Gaussian as the distribution type and set the mean value of the distribution to 8.05 and the standard deviation
to 0.085 as shown in the following screenshot.

Click OK to accept the settings. Repeat the steps above to add the "ng2" and "ng3" properties corresponding
to the group index of the SW2 and SW3 waveguides (use the same distribution properties).

Add a result to record using the button on the right-hand side of the Results section of the window and change
the name of the result to "fsr_1". Double-click on the Result field of the result to browse available results and
select the free spectral range result from input 2 of the Optical Network Analyzer. Double-click on the
estimation field of the result and set this to true. Next, select the minimum and maximum values of the yield

2003 - 2016 Lumerical Solutions, Inc


1374 Lumerical Knowledge Base

range by setting the value in the Min field to 1e11, and the value in the Max field to 2e11. Next, add two more
properties: the bandwidth and the gain from input 1 of the Optical Network analyzer, and set Estimation field to
false for these two properties. The final yield analysis window should look like the following

Click OK to accept all settings, and return to the main Optimizations and Sweeps window.

Running the yield analysis


To run the yield analysis, select the yield analysis task in the Optimizations and Sweeps window and click the
run button.

Viewing the results


The yield analysis runs the trials in batches of 10 or less and automatically updates the following window after
each batch of trials. After the yield analysis has been run, the parameters and results are listed at the right-
hand side of the window. Selecting a result will generate a histogram with 10 bins showing the distribution of
values of the result. If the estimation property of the result was set to true, then the minimum and maximum
values specified by the user are also indicated in the histogram.

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1375

The log at the bottom of the window shows the calculated yield percentage which corresponds to the
percentage of trials where all of the results fall within the specified yield estimate ranges.

Selecting a parameter generates a histogram for that parameter.

Selecting both a parameter and result generates a plot showing the value of the parameter versus and result
for each trial and the yield estimate range.

2003 - 2016 Lumerical Solutions, Inc


1376 Lumerical Knowledge Base

Yield analysis results can also be obtained in the script environment with the command getsweepdata,
which is similar to the command getdata. The name of each data member is the Name column that you
specified when adding the parameters and results, in this case the result is "input 2/mode 1/peak/free
spectral range". For example, the following 2 lines of script will plot the histogram showing the
distribution of free spectral range values.
yfsr=getsweepdata("yield ng","input 2/mode 1/peak/free spectral range");
histc(yfsr);

6.4.3.1 Yield scripting commands


Objective
This page describes how to generate and run a yield analysis using script commands. The yield analysis tool allows
users to run extensive Monte Carlo analysis, sweeping across multiple parameters. This can be useful for assessing
statistical variations of circuit elements on overall circuit performance, as well as the effects of variations in
component-level simulations. The same example used in the section "Yield analysis" will be re-generated in this
page. For additional information and detailed implementation of the script commands, please see the "Measurement
and optimization data" section. Please note that, all the script commands used in this example could also be
applied to sweep and optimization analyses.

Associate files
run_yield.icp
yield_ng_script.lsf

See also
Sweep scripting commands 703
Optimization scripting commands 722
Parameter sweeps 699
Optimization 716
Yield analysis 728
Script - Parameters sweeps 1401
Script - Measurement and optimization data 1644

To generate and run the yield analysis using script commands, user can open the

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1377

run_yield_example_script.icp file and follow the three steps listed below; or, open and run the script file
yield_ng_script.lsf.

Creating the yield analysis

Running the yield analysis


Viewing the results
6.5 Result analysis
This chapter describes result analysis tools and techniques used in a schematic environment.

Result View 1377 This section describes usage and symbols used in the
Result View
Visualizer and plot windows 1378 This section describes how to use the visualization
tools
Script Workspace and Script Favorites 1379 This section describes how to use script functions with
the visualization tools for results analysis
Data export 1381 This section describes how data can be exported to
other software packages for further analysis or formal
presentation

6.5.1 Result View


The Result View window shows all the results for the simulation element that is currently selected in the Element
Tree.

Any simulation object that have results will be displayed with a symbol on the bottom-right corner. The name of
the available results, and the corresponding dimensions or are displayed. One can right click on any of the results to
display them in the Visualizer 1378 , or to send the to the Script Workspace 1379 for further post-processing.

With the use of datasets, allowing one to package raw data into meaningful results that can be easily parameterized
and visualized. The results for all the standard monitors can be retrieved in the original raw, un-parameterized matrix
form (using getdata 1646 ), or in dataset form (using getresult 1647 ). For example, in the Result View figure above, the
results listed under rawdata can be obtained using the getdata command. The results listed under "results" are
datasets, and can be obtained using the getresult command (these calculations will only be carried out when they
are visualized). The icons associated with each result reflect the type of result:

String

2003 - 2016 Lumerical Solutions, Inc


1378 Lumerical Knowledge Base

Matrix: this is a simple matrix result, with no associated parameters


Matrix dataset: this is a parameterized matrix results that contains at least an attribute (result), and a
associated parameter
Rectilinear dataset: this is a parameterized matrix result that is associated with a rectilinear grid
Unstructured data: this is a set of data that is not structured in form of a dataset or a matrix and rather
consists of several different types of results

For more detail on how to work with datasets in the scripting environment, please see INTERCONNECT
Measurements 1617 .

The raw data results are all un-parameterized, simple matrix results. To create parameterized matrix datasets from
matrices, use the "Send to script" option to copy the variable into the Script Workspace 1379 .

6.5.2 Visualizer and plot windows


The Visualizer is a tool for analyzing data. Simulation data from a variety of elements (analyzers, parameter
sweeps... etc) can be sent to a Visualizer.

Data that gets added to the Visualizer is retained until it is removed (i.e., with the "Remove" button or by pressing
"X" on the top right corner of the window). This is useful for comparing results across different sets of data. The
upper-left portion of the window is the plot area, which displays the current data defined by the settings in the upper-
right of the window (plot settings). The following sections describe the many options available for controlling what
data will be displayed in the plot area. These sections can be minimized if more area for plotting is required.
Visualizer and figure settings 741
Visualizer attributes and parameters 748

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1379

Visualizer

See the Visualizer 741 introductory video for additional information.

6.5.3 Script Workspace and Script Favorites


The Script Workspace shows all the variables in the current scripting environment. The variables' current values as
well as the corresponding dimensions are shown in a list format. Users can use the Visualizer 740 to visualize any
variable listed in the Script Workspace by right-clicking on the variable and selecting "Visualize".

The icons in the script workspace above shows that while "sigmaabs" and "sigmascat" are parameterized matrix
datasets (since they were the results returned directly by the cross section analysis groups), "sigmaext" is a result
that we defined in the script, and is therefore a simple un-parameterized matrix. For example, simply right-clicking
on sigmaext and selecting "Visualize" will generate the following plot in the Visualizer:

2003 - 2016 Lumerical Solutions, Inc


1380 Lumerical Knowledge Base

Here, the extinction cross section is plotted as a function of the index value. To associate it with the corresponding
frequency array, select the "Create visualization" option, which will open the "Visualization Creator" dialog window:

This window allows users to set the name of the parameterized variable (sigmaext_vs_f) and its parameters (f). Once
this is defined, the visualization creator will generate the commands necessary for creating the parameterized
dataset in the Script Favorites window. When this command is ran, it will send the new parameterized variable to the
Visualizer, which will plot the variable as a function of the user specified parameter.

Generated Command

Generated Figure
In addition to the commands generated by the visualization creator, the Script Favorites window also allows users to
define their own favorite commands by selecting "New command" and "Edit".

2003 - 2016 Lumerical Solutions, Inc


System Tools Reference Guide 1381

6.5.4 Data export


Lumerical simulation data can be exported to a variety of file formats, as described below.

Interoperability between Lumerical products - Lumerical data files


The savedata 1439 script command can be used export data into a Lumerical data file (.LDF). This is a
convenient file format for transferring data between Lumerical simulation files and products. See the
Interoperability between Lumerical Products 788 and scripting tutorial 1406 for details.

Text files
The write 1440 script command can be used export data to a text file. See the scripting tutorial 1406 for details.

Excel
Direct export to Excel data files (.xlxs) is not supported. We recommend exporting your data to a text file, which
can then be imported into Excel.

MATLAB
The matlabsave 1642 command can be used to save data to .mat files. The Matlab script integration 1410 feature
is another powerful option for accessing MATLAB from the Lumerical scripting enviroment.

Paraview (for data visualization)


See the Paraview - advanced data visualization 790 topic.

Export to rayset
See the Export to ray tracers 791 topic.

GDSII files
See the GDSII 480 topic.

6.5.4.1 Interoperability between Lumerical Products


This page summarizes the different ways to transfer simulation geometry/data between the four Lumerical products,
FDTD Solutions, MODE Solutions, DEVICE and INTERCONNECT.

Geometry transfer:
Copy/Paste objects:

Copy/Paste is available for structure objects between FDTD Solutions and MODE Solutions. If the object material is
not in the default material database, it will automatically be added upon pasting into the new simulation file. This
does not include analysis groups and monitors.

Copy/Paste is available for structure objects between FDTD Solutions, MODE Solutions and DEVICE; however,
materials are not transferred to the DEVICE material database, since the electrical properties of materials are
different from the optical properties. The user will have to manually specify the material in the new simulation upon
pasting. Custom primitives, analysis groups and monitors can not be coped/pasted.

2003 - 2016 Lumerical Solutions, Inc


1382 Lumerical Knowledge Base

Data Transfer:
Data can be transferred between the different products in several ways:

Import/Export Data:

Both .txt and .mat file formats can be used to import and export data from and to Lumerical products. Lumerical data
file (.ldf) format can also be used.
Please visit the knowledgebase pages on write 1440 , readdata 1439 , loaddata 1438 , savedata 1439 , matlabsave 1642 and
savedcard 1439 commands for more details.

S parameters can be exported from MODE Solutions to text files in a format that is compatible with
INTERCONNECT. Please visit the Plasmon section 1883 for an example.

Generation rate data can be exported from FDTD Solutions to DEVICE, using .mat files. Please visit Solar Cell
section 2594 for an example.

For simulations involving more than one product, the process can be automated using a script that calls the other
product through the command line. For more details please visit the following pages: Windows, Mac and Linux

For an example of a simulation using DEVICE and MODE, please visit the MZI example 2228 .
The MZI_automated set of files provided in the above example run MODE from the command line, called from a
script in DEVICE. Alternatively, the process can be done manually using the individual scripts provided and following
the procedure outlined in the example. For more information, please visit the charge-index conversion example 402 .

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1383

7 Scripting Language
Lumerical provides a powerful scripting language to manipulate simulation objects, launch simulations and analyze
results. Script commands can be entered directly into the script prompt, be run from a saved script file (.lsf), or
entered into structure and analysis objects.
This section of the the knowledge base contains the syntax for each script command and scripting tutorials.

The script functions have been organized into the following sections. You can also view the alphabetical list of
commands, or watch a recorded video.

Section

System 1426

Manipulating variables 1452

Operators 1467

Functions 1475

Loop and conditional statements 1523

Plotting commands 1524

Adding Objects 1532

Manipulating objects 1556

Running simulations 1593

Measurement and optimization data 1644

INTERCONNECT Measurements 1617

Eigenmode Solver Measurements 1605

FDTD Measurements and Normalization 1595

Near to far field projections 1657

Grating projections 1666

Material database functions 1671

GDSII 1677

User defined GUIs 1684

Creating your own script commands 1687

The online version of this chapter includes examples for many commands.

7.1 Scripting tutorials


The scripting introduction portion of the User Guide is intended for users wanting a basic introduction to the scripting
language. This section contains the following topics:

Scripting basics 1384


Creating plots and images 1392

Modifying objects 1395


Running simulations 1400
Accessing simulation data 1401

File import and export 1406


MATLAB 1410
Creating a custom GUI 1425

2003 - 2016 Lumerical Solutions, Inc


1384 Lumerical Knowledge Base

Watch a recorded webinar


Scripting, creating groups and running simulations

7.1.1 Scripting basics


This section describes the basics of creating and running script files.

In this topic
Scripting basics 1384
Opening the script editor and prompt 1385
How to make a script file 1385
How to run a script file 1386
Scripting tips 1387
Variables and the scripting workspace 1388
Manipulating script arrays 1389

See also
Script functions - Reference Guide 1383

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1385

7.1.1.1 Opening the script editor and prompt


Script functions can be called directly from the script prompt, or by running presaved script files. This section
describes how to open the script file editor (to create script files) and the script prompt (to run script commands).

In this topic
Scripting basics 1384
Opening the script editor and prompt 1385
How to make a script file 1385
How to run a script file 1386
Scripting tips 1387
Variables and the scripting workspace 1388
Manipulating script arrays 1389
See also
Script functions - Reference Guide 1383

Script file editor


Go to the VIEW - WINDOWS menu and select SCRIPT FILE EDITOR. Alternatively, right click anywhere on the
menu bar and check the Script File Editor option, as shown in the above screenshot.

Script prompt
Go to the VIEW - WINDOWS menu and select SCRIPT PROMPT. Alternatively, right click anywhere on the menu
bar and check the Script Prompt option, as shown in the above screenshot.

7.1.1.2 How to make a script file


This section describes how to create a script file.

In this topic
Scripting basics 1384
Opening the script editor and prompt 1385
How to make a script file 1385
How to run a script file 1386
Scripting tips 1387
Variables and the scripting workspace 1388
Manipulating script arrays 1389

Associated files
usr_script_hello.lsf

See also
Script functions - Reference Guide 1383

2003 - 2016 Lumerical Solutions, Inc


1386 Lumerical Knowledge Base

Making your first script


For your first script we'll start with the famous Hello World example. To make a script file, open the script file
editor, as described in the previous page.

To output the text Hello world. to the command line simply enter the following line into your new document:
?"Hello world.";

Click on the save button to save the file. Set the name to be "hello". Notice that the .lsf extension is
automatically added.

You can save this document in any directory you like, but it is easiest if you save your scripts in your working
directory where you also save your .fsp or .lms simulation files. The .lsf extension allows FDTD Solutions to
recognize the document as a script file. If you have trouble creating this script file, please see the prepared version
of usr_script_hello.lsf.

7.1.1.3 How to run a script file


This section describes how to run a script file.

In this topic
Scripting basics 1384
Opening the script editor and prompt 1385
How to make a script file 1385
How to run a script file 1386
Scripting tips 1387
Variables and the scripting workspace 1388
Manipulating script arrays 1389
Associated files
usr_script_hello.lsf

See also
Run 1593
Feval 1491

In the previous section, we created a script called hello.lsf. We will now run the script. There are two ways to
run the script file.

1. Type the command hello; into the script prompt, as shown in the above screenshot. This will run the script file
named hello.lsf.

2. Click the Run Script button in the Script File Editor. You can also click the Run Script button in the main
Simulate toolbar, or by going to the Simulation - Run Simulation menu. These last two options will open a file
browser and let you select the appropriate script file.

When the script file runs, notice that the name of the script file appears in the script prompt window. Following the
script file name is the output of the file. In this case, the script outputs the string "Hello world." to the script
prompt.

Note: Working directory


To run a script file by simply typing the name into the script prompt, the file should be in the current working
directory. To change the FDTD working directory, go to the FILE menu and select CHANGE WORKING
DIRECTORY, and then select the directory to which you saved the hello.lsf script. If the script file is not in the

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1387

current working directory, and you do not wish to change your current working directory, consider using the script
command feval.

7.1.1.4 Scripting tips


This section provides a list of some basic scripting tips.

In this topic
Scripting basics 1384
Opening the script editor and prompt 1385
How to make a script file 1385
How to run a script file 1386
Scripting tips 1387
Variables and the scripting workspace 1388
Manipulating script arrays 1389

See also
Script functions - Reference Guide 1383

Commenting your script


Comments are essential for understanding and modifying script files. A comment begins with the # symbol in the
Lumerical scripting language, and ends when you start a new line. For example, you can comment code like this
# initialize variables
x = 5;
y = 7;
z = 2*x + y;
or
# loop over the waveguide width and calculate the height
for(i=1:length(W)) {
H(i) = A/W; # A is the cross-sectional area
}

Searching your script files


Use Ctrl-F in the Script File editor to open the "Find in script" search utility.

Using the up and down arrows


Hitting the up arrow while using the script prompt will recall the last entered command. You can scroll back down
again by using the down arrow as well. If you enter a few characters and then hit the up arrow it will jump to the last
command to begin with those characters.

Use the script prompt for small edits and testing


While developing complex scripts, it can be useful to test small sections by running them directly in the script
prompt. You can paste multiple script commands directly into the script prompt. Any commands that can be run in
a script file can also be run directly from the script prompt.

Remember semicolons
Every line of code in your script must end in a semi-colon, except for ones that end with a {or }. When you enter
code into the script prompt it will automatically append a semicolon to the end of the line if you forget it, but if you

2003 - 2016 Lumerical Solutions, Inc


1388 Lumerical Knowledge Base

forget semicolons in a script file it will not work.

Printing data to the screen


By using the ? in a script you can output strings to the script prompt. For example
?"Hello world";
Will output the text "Hello world" to the script prompt. The quotations are necessary to output the words as text and
not as variables.

Turning variables into text


The following example shows how to concatenate text with variables:
value1=4;
value2=13;
?"The value is:"+num2str(value1)+" The second value is:"+num2str(value2);
You will see the following output to the screen:
The value is:4 The second value is:13

Calling scripts from other scripts


It is possible to call one script file from another. See using nested script files 1687 for details.

Choosing the right text editor


Lumerical software suites include a built-in script file editor. However, you may prefer other text editors such as
Notepad++ or VIM. Other editors are okay, as long as they are simple text editors. Advanced document editors like
WORD will not work because of extra information that is written into the files.

7.1.1.5 Variables and the scripting workspace


This section provides an introduction to the script variable workspace.

In this topic
Scripting basics 1384
Opening the script editor and prompt 1385
How to make a script file 1385
How to run a script file 1386
Scripting tips 1387
Variables and the scripting workspace 1388
Manipulating script arrays 1389

See also
Script functions - Reference Guide 1383

The workspace is where all variables are stored while scripting. All variables defined in a script file or in the script
prompt are global variables. The scripting environment does not support proper functions with private variable
workspaces.

The script command workspace always returns the names of all the variables and constants that have been set.
By using the command:
?workspace;
You can see everything that the current workspace contains.

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1389

Resetting the workspace


Sometimes it is necessary to clear your workspace of all its contents to ensure that your variables are set properly.
To do so you can use the following command:
clear;
This will delete all of the variables and constants in the workspace.

7.1.1.6 Manipulating script arrays


This section provides some simple matrix manipulation examples.

In this topic
Scripting basics 1384
Opening the script editor and prompt 1385
How to make a script file 1385
How to run a script file 1386
Scripting tips 1387
Variables and the scripting workspace 1388
Manipulating script arrays 1389
See also
Script functions - Reference Guide 1383

Numeric variables in Lumerical's script language are arrays (also called matrices) of up to 4 dimensions.

Array elements can be accessed and manipulated individually. For example, at the script prompt, we could do the
following:
> x=1:5;
> ?x;
result:
1
2
3
4
5
> ?x(3);
result:
3

Array elements can also be accessed and manipulated in sub-matrices. Consider the following:
> x=1:5;
> y=1:5;
> x(2:3)=y(4:5);
> ?x;
result:
1
4
5
4
5

2003 - 2016 Lumerical Solutions, Inc


1390 Lumerical Knowledge Base

Arrays can also be initialized on an element by element basis:


?x=[1,10;100,1000];
result:
1 10
100 1000

Please note that array dimensions must be at least 2. A one dimensional array of length N will actually have a size
of Nx1, but can still be addressed as shown above.

Example use case


In 3D FDTD simulations the electromagnetic field data is returned as a 4-dimensional array, while in 2D FDTD
simulations, it is a 3-dimensional array.

In 3D simulations, the first 3 dimensions represent x, y, z. The 4th dimension represents either frequency or time.
In 2D simulations, the first 2 dimensions represent x, y. The 3rd dimension represents either frequency or time.

For details on how to get data from monitors into the script environment, please see accessing simulation data 1403 .

We'll consider how we can display results from 3D simulations by extracting a sub-matrix. In this example, we will
consider the data in a z-normal surface monitor called "reflection".

First, we get the data for |E|2, as well as the x, y, z and f (frequency) vectors.
m="reflection";
E2 = getelectric(m);
x = getdata(m,"x");
y = getdata(m,"y");
z = getdata(m,"z");
f = getdata(m,"f");

Next, if we look at the size of E2, we see that it is a 4-dimensional matrix of the following size:
> ?size(E2);
result:
41 41 1 1
This indicates that there are 41 elements for the x axis, 41 elements for the y axis, 1 element for the z axis and 1
frequency point.

We can remove the "singleton" dimensions of z and f if desired using the pinch function
> E2 = pinch(E2);
> ?size(E2);
result:
41 41

We can create an image of the data with


image(x,y,E2);
and we will see the following figure:

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1391

We can plot a cross section of |E|2 vs x by extracting a sub-array:


> ?y(21);
result:
0
> ?c/f;
result:
1.55e-006
> plot(x,E2(1:41,21));
This will produce a plot of |E|2 vs x at y = 0 at a wavelength of 1.55 microns. The resulting figure is:

2003 - 2016 Lumerical Solutions, Inc


1392 Lumerical Knowledge Base

7.1.2 Creating plots and images


Plots and images of data are easy to create in the Lumerical scripting language.

In this topic
Creating plots and images 1392

Line plots 1392


Image plots 1394
See also
Script functions - Reference Guide 1383

See the following sections for details.

7.1.2.1 Line plots


Use the plot and plotxy commands to create line plots.

In this topic
Creating plots and images 1392

Line plots 1392


Image plots 1394
See also
Script functions - Reference Guide 1383

plot script command 1525


plotxy script command 1525

A simple plot of x^2 can be created with the following commands:


x=1:10;
y=x^2;
plot(x,y);

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1393

It's possible to add labels, legends, and multiple data sets, as shown below:
x=1:10;
y=x;
y2=x^2;
plot(x,y,y2,"x","y","Your first plot");
legend("x","x^2");

If you have multiple data sets that are sampled at different points, use the plotxy command.
x1=-5:1:5;
y1=abs(x1);
x2=linspace(-10,10,100);
y2=sin(x2);
plotxy(x1,y1,x2,y2,"x","y");
legend("abs(x1)","sin(x2)");

2003 - 2016 Lumerical Solutions, Inc


1394 Lumerical Knowledge Base

7.1.2.2 Image plots


Use the image command to create 2D image plots.

In this topic
Creating plots and images 1392

Line plots 1392


Image plots 1394
See also
Script functions - Reference Guide 1383

image script command 1529

A simple image plot of x+y can be created with the following commands:
x=1:100;
y=1:100;
X=meshgridx(x,y);
Y=meshgridy(x,y);
image(x,y,X^2+Y^2);

Often, we want to plot data from monitors. You might do something like this.
m="monitor1";
x=getdata(m,"x");
y=getdata(m,"y");
E2=getelectric(m);
image(x*1e6,y*1e6,E2,"x (um)","y (um)","|E|^2");

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1395

7.1.3 Modifying objects


Simulation objects can be created, manipulated and deleted with script commands. This allows simulations to be
created using code, rather than being manually drawn.

In this topic addcircle;


Modifying objects 1395 set("x",0);
Add and select objects 1395 set("y",0);
Set and get object properties 1396
set("radius",4);
Arrays of objects 1398 ?get("material");
Groups of objects 1399
See also
Script functions - Reference Guide 1383

See the following sections for details.

7.1.3.1 Add and select objects


This section is about adding and selecting objects.

In this topic addcircle;


Modifying objects 1395 addrect;
Add and select objects 1395 selectall;
Set and get object properties 1396
set("index",2);
Arrays of objects 1398
Groups of objects 1399
See also
Script functions - Reference Guide 1383
Add object script commands 1532 (see adding objects
section)
Select script command 1564

Adding objects
Objects can be added to the simulation with commands like addcircle, adddipole, and addmovie. These
commands are equivalent to clicking on the add object buttons. For a complete list of commands, see the Add
object script commands section of the Reference Guide (see link above).
Example: add a sphere.
addsphere;

Note: Layout mode and Analysis mode


Objects can only be added to a simulation when the simulation is in layout mode. After a simulation is run, the
entire simulation setup is locked, to ensure that the simulation setup matches the settings that were used in the

2003 - 2016 Lumerical Solutions, Inc


1396 Lumerical Knowledge Base

simulation. To add, delete or modify objects, you must switch back to layout mode with the switchtolayout
command, or by clicking the Switch to layout button.

Selecting objects
The select script command can be used to select objects. This is equivalent to clicking on an object. To select an
object, one sets the groupscope to the correct object container (the default is "::model"). For example, if the
simulation has the following object tree:

Example: Delete all structures.


groupscope("Structures");
selectall;
delete;

Example: Select a monitor named reflection.


groupscope("::model");
select("reflection");

For a complete list of select commands, see the Reference Guide.

7.1.3.2 Set and get object properties


This section is about setting and getting object properties.

In this topic select("rectangle");


Modifying objects 1395 set("x span",500e-9);
Add and select objects 1395 W = get("x span");
Set and get object properties 1396
?W;
Arrays of objects 1398
Groups of objects 1399
See also
Script functions - Reference Guide 1383

Select script command 1564

You can set and get any object property with script commands.

Set example: Override and set new mesh order of rectangle


1) Set the groupscope to be the container which contains the object. In this case, we assume the object is under
the default model container (Group scope = ::model).
2) Select object. In this case, we assume the object name is "rectangle".
3) Set the object property. In this case, we set the property called "override mesh order from material database" to
checked and then set the mesh order property to 1. Note that to check a checkbox, set the property to 1 and to
uncheck set the property to 0.
select("rectangle");

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1397

set("override mesh order from material database",1);


set("mesh order",1);

Set example: Rotate a structure 90 degrees around the x-axis


1) Set the groupscope to be the container which contains the object. In this case, we assume the object is under
the default model container (Group scope = ::model).
2) Select object. In this case, we assume the object name is "rectangle".
3) Set the object property. In this case, we need to first set the property called "first axis" to "x" to specify the axis
of rotation and then set the corresponding rotation angle, "rotation 1"
select("rectangle");
set("first axis","x");
set("rotation 1",90);

Note on units!
In the scripting language all units are SI. This means that length is measured in meters, time in seconds,
frequency in Hz. This is why the above script set a value of 500e-9 for 500nm.

Note: Layout mode and Analysis mode


Objects can only be modified when the simulation is in layout mode. After a simulation is run, the entire
simulation setup is locked, to ensure that the simulation setup matches the settings that were used in the
simulation. To add, delete or modify objects, you must switch back to layout mode with the switchtolayout
command, or by clicking the Switch to layout button.

Get example: Get the "x span" of an object


1) Set the groupscope to be the container which contains the object. In this case, we assume the object is under
the default model container (Group scope = ::model).
2) Select object. In this case, we assume the object name is "rectangle".
3) Get the object property. In this case, we get the "x span" of the object. The value is saved in the variable W.
4) Print W to the screen.
select("rectangle");
W = get("x span");
?W;

Determining object property names


You can set or get any property of any object (physical structures, sources, monitors and the simulation region)
through scripting once you know the name of the object parameter. The parameters names in scripting are identical
to the names shown in the GUI.

For example, let's suppose we want to set the width (x span) of a rectangle structure. In the figure below, we can
see that the desired parameter has the label "x span (microns)". However, in the scripting language units are always
in SI and should be dropped. Therefore, the name we need to use in scripting is "x span".

2003 - 2016 Lumerical Solutions, Inc


1398 Lumerical Knowledge Base

7.1.3.3 Arrays of objects


This section shows how to create arrays of objects.

In this topic for (i=1:10) {


Modifying objects 1395 copy;
Add and select objects 1395 }
Set and get object properties 1396

Arrays of objects 1398


Groups of objects 1399
Associated files
usr_script_array.lsf

See also
Script functions - Reference Guide 1383

addstructuregroup script command 1536

addanalysisgroup script command 1536

In the scripting language, we use a series of for loops to create an array of objects.

The script file usr_script_array.lsf will array whatever objects are currently selected. For example, open a
new simulation and add a single sphere. Ensure the sphere is selected (red vertices markers). It should look like
this screenshot.

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1399

To create an array of spheres, run usr_script_array.lsf. You should now have an array of spheres, as shown
below.

The array properties can be set in the first lines of the script file, which are shown below
# choose the lattice constants
a1 = 1e-6;
a2 = 2e-6;
a3 = 1e-6;
theta1 = 0; # angle of a1 with x-axis
theta2 = 60; # angle of a2 with x-axis

# choose the number of periods


N1 = 6;
N2 = 5;
N3 = 1;

This script could be modified to add all objects of the array into a group. Grouping objects can make them easier to
manage. See the next section for more information about grouping objects.

Note: 2D array script


This example script can be used to create a 3D array of objects. If you have a 2D simulation, or are using MODE
Solutions, modify the file to remove any reference to setting the Z position. This will involve removing the inner
most for loop.

7.1.3.4 Groups of objects


Structures and Monitors can be grouped to create more sophisticated objects. For more information, see the
following links.

In this topic addcircle;


Modifying objects 1395 addrect;
Add and select objects 1395 selectall;
Set and get object properties 1396
addtogroup("structure group");
Arrays of objects 1398
Groups of objects 1399
See also
Script functions - Reference Guide 1383

addstructuregroup script command 1536

addanalysisgroup script command 1536

addtogroup script command 1567

2003 - 2016 Lumerical Solutions, Inc


1400 Lumerical Knowledge Base

Structure groups
See the Structure groups 389 page for information.

Analysis groups
See the Analysis groups 479 page for information.

7.1.4 Running simulations


This section shows how to run simulations in a variety of ways, from the script prompt

In this topic run; # run simulation


Running simulations 1400
Run a single simulation 1400

Parameter sweeps 1401


See also
Script functions - Reference Guide 1383

See the following pages for details.

7.1.4.1 Run a single simulation


This section describes how to run a single simulation from the script prompt.

In this topic run;


Running simulations 1400
Run a single simulation 1400

Parameter sweeps 1401


See also
run 1593

FDTD Solutions
Use the run script command to run your simulation. This is equivalent to clicking the "Run parallel FDTD" button in
the graphical interface. The following commands will setup and run a very simple example simulation.
newproject;
save("test_simulation");
addcircle;
adddipole;
addfdtd;
run;

MODE Solutions
Eigensolver
Use the findmodes script command to run your simulation. This is equivalent to clicking the "Calculate modes"
button in the Eigensolver analysis window. The following commands will setup and run a very simple example
simulation.
newproject;
save("test_simulation");
addcircle;
adddipole;
addmode;
findmodes;

Propagator
Use the run script command to run your simulation. This is equivalent to clicking the "Run active solver" button in

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1401

the graphical interface. The following commands will setup and run a very simple example simulation.
newproject;
save("test_simulation");
addcircle;
adddipole;
addpropagator;
run;

7.1.4.2 Parameter sweeps


This section describes how to run parameter sweep with a script.

In this topic # Initialize


Running simulations 1400 # Run simulations
Run a single simulation 1400
# Do analysis
Parameter sweeps 1401
Associated files
usr_scripting_loop.fsp
usr_scripting_loop.lsf
usr_scripting_loop_mode.lms
usr_scripting_loop_mode.lsf
See also
for 1523

FDTD Solutions
See the files usr_scripting_loop.fsp and usr_scripting_loop.lsf for a simple example that demonstrates how to do a
parameter sweep with the scripting language. In this case, we calculate the response of the system as a function of
the circle's radius.

MODE Solutions
See the files usr_scripting_loop_mode.lms and usr_scripting_loop_mode.lsf for a simple example that demonstrates
how to do a parameter sweep with the scripting language. In this case, we use the eigensolver to calculate the
modal properties of the system as a function of waveguide radius.

7.1.5 Accessing simulation data


The majority of data analysis can be carried out in the GUI environment through the Results Manager 736 , but it is
sometimes necessary to use Lumerical's scripting environment to carry out more complex post-processing of the
simulation data. This section provides a brief introduction to the commands required to access simulation data from
the scripting environment. The simulation data can then be analyzed directly in the scripting language, or exported
for further analysis elsewhere.

In this topic m="monitor1";


Getresult 1402 E=getresult(m,"E");
Getdata 1403 E_far=getresult(m,"farfield");
Other commands 1404
Loop over all monitors 1406

See also
Script functions - Reference Guide 1383

Introduction to dataset variables 1461

It is important to know that most raw monitor data recorded by monitors is stored and returned in 4D matrices. The
first three dimensions of the matrix correspond to the spatial dimensions X, Y, Z. The 4th dimension corresponds to
the frequency or time dimension, depending on the type of monitor. For example, suppose you have a FDTD
Solutions simulation with a frequency monitor in the XY plane that records 20 frequency points. Assuming the

2003 - 2016 Lumerical Solutions, Inc


1402 Lumerical Knowledge Base

monitor spans 100 mesh points in the x direction and 55 mesh points in the y direction, the size of the Ex field
component data matrix will be 100x55x1x20. Notice that the 3rd dimension (corresponding to Z) has a size of 1,
since the monitor only recorded data at one Z position.

See the following sections for more information on commonly used script commands.

Getresult 1402
Getdata 1403
Other commands 1404

7.1.5.1 getresult
The getresult command allows you to get datasets from simulation objects (see Introduction to dataset variables 1461
for more information on datasets). Obtaining data in the form of datasets is often more convenient than the individual
matrices that can be obtained with the getdata command.
Note that this section only applies to data from simulation objects (primarily monitors). For instructions on how to
get results from a parameter sweep or optimization project, please see getsweepresult 1646 in the Reference Guide.

In this topic ?getresult('total');


Getresult 1402 sigma = getresult('total','sigma');
Getdata 1403
Other commands 1404

See also
Script functions - Reference Guide 1383

getresult 1647
Introduction to dataset variables 1461

To see what type of results can be calculated from a monitor, use the ?getresult command with the name of the
monitor as the input:
> ?getresult("profile");
x
y
z
delta_x
delta_y
delta_z
surface_normal
f
.... (more raw data)
E
H
P
T
farfield
This tells you the results (including raw data and calculated results) that can be returned from monitor "profile" when
the simulation is ran.

You can also get any result into the script environment with the command getresult.

For example, suppose you have a d-card from a monitor called "profile", with data E. You can get this data into the
script environment with the command:

E = getresult("profile","E");

E is now a variable in the scripting workspace that represents the dataset result E. Now, if we want to access the
different components of the electric field (Ex, Ey, Ez) from the same monitor, we can simply use the . Operator:

Ex = E.Ex; # x component of the electric field

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1403

E2 = E.E2; # electric field intensity


And you will see these variables appear in the Script Workspace.

Once the monitor data is stored in script variables, it's possible to do further analysis. If you want to visualize any
result, simply right-click on the result in the Script Workspace and select "Visualize".

7.1.5.2 getdata
The getdata command can be used to obtain raw data from simulation objects (primarily monitors) in matrix form.
This page describes how to check what data is available, and how to get that data into standard script matrices. In
many situations, you may find the getresult 1402 command more convenient than getdata.

Note that getdata is only used to get raw data from simulation objects. To get data from a parameter sweep or
optimization task, use getsweepdata 1645 .

In this topic ?getdata;


Getresult 1402 x=getdata("through","x");
Getdata 1403
Other commands 1404

See also
Script functions - Reference Guide 1383

getdata 1646

getdata
After a simulation is run, the simulation data will be stored in the simulation objects.

For example, suppose we run a file with a source called source1, and several monitors: spatial, time_drop, through,
drop, time_through, movie. After running the simulation, ?getdata will output a list of objects with data:
> ?getdata;
local sources:
source1
local monitors:
spatial time_drop through drop time_through movie

After seeing the list of objects with data, you can get a list of data within each object with:
> ?getdata("through");
x y surface_normal f Ez Hx Hy Px Py
power

Finally, you can get the any available data with a command like:
?getdata("through","x");

This will print the result of x to the scripting screen. This is not very useful if x is a large matrix with a large amount
of data. A better approach would be to create a script variable called x and set it equal to the data in the d-card
called x. This can be done with:
x = getdata("through","x");

x is now a variable in the scripting workspace that shows the position of the monitor "through".

2003 - 2016 Lumerical Solutions, Inc


1404 Lumerical Knowledge Base

Similarly, if we want to obtain the z component of the electromagnetic field (Ez) from the monitor called "spatial", we
can use:
Ez = getdata("spatial","Ez");

Once the monitor data is stored in script variables, it's possible to do further analysis or plot the data. For a a simple
example using the image command, see Image plots 1394 .

7.1.5.3 Other commands


This page provides a brief introduction to some other useful scripting tips and commands related to getting data from
a simulation.

In this topic m="monitor1";


Getresult 1402 f=getdata(m,"f");
Getdata 1403 T=transmission(m);
Other commands 1404
plot(c/f*1e6,T,"lambda (um)","Transmission");","x");

See also
Script functions - Reference Guide 1383

transmission 1596
getelectric 1650
getmagnetic 1651
pinch 1483
size 1430
find 1489

transmission
FDTD Solutions and MODE Solutions' Propagator
Transmission results are automatically calculated by frequency domain power and profile monitors, the results are
automatically normalized by the source power. For example, to create a plot of transmission vs wavelength, use:
m="monitor1";
T=getresult(m,"T");
plot(T.lambda,T.T,"lambda (um)","Transmission");

Alternatively, the transmission command can also be used:


m="monitor1";
f=getdata(m,"f");
T=transmission(m);
plot(c/f*1e6,T,"lambda (um)","Transmission");

The two methods are equivalent. For details on the transmission calculation, see the function description in the
reference guide.

getelectric
This command simply returns
2 2 2
Ex + E y + Ez
For example, if you have a monitor called "spatial" with electric field data the amplitude of the electric field squared
can be found with:
E2 = getelectric("spatial");

In FDTD Solutions, E2 can be returned as an attribute of the dataset E from monitors. So we can also get the
electric field intensity as follows:
E = getresult("spatial","E");
E2 = E.E2; # electric field intensity

getmagnetic

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1405

This command simply returns


2 2 2
Hx + Hy + Hz
For example, if you have a monitor called "spatial" with magnetic field data the the amplitude of the magnetic field
squared can be found with:
H2 = getmagnetic("spatial");

In FDTD Solutions, H2 can be returned as an attribute of the dataset H from monitors. So we can also get the
magnetic field intensity as follows:
H = getresult("spatial","H");
H2 = H.H2; # electric field intensity

pinch, size, find


Most raw monitor data recorded by monitors is stored and returned in 4D matrices. The pinch, size, and find
commands are very useful when working with multi-dimensional matrices, and for selecting a slice out of the matrix.
Note that if your simulation does not require complex post-processing, the simplest way to take slices from 4D
matrices is to simply use the Visualizer 740 .

For example, suppose you have a 3D simulation with a power monitor in the XY plane that records 20 frequency
points. The field data will be stored in a 4D matrix, where the dimensions correspond to X,Y,Z,F. If you want to
create an image plot of the fields at a particular frequency, use:
> # get raw data from monitor
> m = "monitor1";
> x = getdata(m,"x");
> y = getdata(m,"y");
> z = getdata(m,"z");
> f = getdata(m,"f");
> Ex = getdata(m,"Ex");
>
> # check size of data
> # these sizes correspond to the lengths of
> # x, y, z, f
> ?size(Ex);
result
84 122 1 20

> # find index of frequency point


> # closest to 300THz
> fi = find(f,300e12);
>
> # pinch the frequency point of interest
> # so final data is 2D so we can plot it
> Ex_plot = pinch(Ex,4,fi); # select frequency point
> Ex_plot = pinch(Ex_plot); # remove singleton z dimension
>
> # re-check size of matrix
> ?size(Ex_plot);
result
84 122

> # image data


> image(x*1e6,y*1e6,real(Ex_plot),"x (um)","y (um)","real(Ex)");

2003 - 2016 Lumerical Solutions, Inc


1406 Lumerical Knowledge Base

7.1.5.4 Loop over all monitors


This page provides an example script that loops over all monitors to do some type of analysis. In this example, we
extract the E field data from each monitor using a while loop.

Associated files
usr_script_loop_over_all_monitors.fsp

See also
Script functions - Reference Guide 1383

getresult 1647
for loop 1523
splitstring 1492

The following code will get the electric field data from each monitors in this simulation file, then save that data in a
series of lumerical data files. To test this example, download the associated simulation file, run the simulation, then
run the following script.

mNames = splitstring(getresult,endl);

for (i=1:length(mNames)) {
if (haveresult(mNames{i},"E")) {
E=getresult(mNames{i},"E"); # get a result from that monitor
} else {
E = mNames{i} + " did not contain the specified data.";
}
savedata(mNames{i},E); # save data to file
}

7.1.6 File import and export


This section describes how to import/export data to various file formats.

In this topic a=linspace(0,2*pi,9);


File import and export 1406 write("testfile.txt",num2str(a));
Text files 1406
Lumerical Data Files (ldf) 1408

Matlab (mat) files 1409

See also
Script functions - Reference Guide 1383

See the following sections for details.

7.1.6.1 Text files


Data can be imported and exported to/from text (.txt) files, as described below.

In this topic a=linspace(0,2*pi,9);


File import and export 1406 write("testfile.txt",num2str(a));
Text files 1406
Lumerical Data Files (ldf) 1408

Matlab (mat) files 1409


See also
Script functions - Reference Guide 1383

write 1440
num2str 1490
readdata 1439

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1407

Export to text files


The write and num2str commands are used to export data to text files.

Simple export
The example exports a single vector to a text file using the File import and export 1406 commands.
a=linspace(0,2*pi,9);
write("testfile.txt",num2str(a));

Overwrite or append?
By default, the command write will append text files if they already exist. To overwrite text files, you can simply
delete the file if it already exists. For example:
f="testfile.txt";
if (fileexists(f)) { rm(f);} # delete file if it exists
a=linspace(0,2*pi,9);
write(f,num2str(a));

Complex formatting and separators


Generally, more complicated formatting is required. For example, suppose you have two variables that need to be
output in a column format with a comma as a separator and you want a header section that describes what the
variables are. Consider the following example:
# define the variables to export
a=linspace(0,2*pi,9);
b=sin(a);
f="testfile.txt";

# remove the file it if already exists


if (fileexists(f)) { rm(f);}

# write the file header


write(f,"a (radians),b");

# write the data to the file


for(i=1:length(a)){ # loop over the length of the data
write(f,num2str(a(i))+", "+num2str(b(i)));
}

The resulting text file will be named testfile.txt and have the following contents:
a (radians),b
0, 0
0.785398, 0.707107
1.5708, 1
2.35619, 0.707107
3.14159, 1.22465e-016
3.92699, -0.707107
4.71239, -1
5.49779, -0.707107
6.28319, -2.44929e-016

Exporting 2D matrices
The num2str command can convert 1D and 2D matrices directly to string. For example, it is easy to export all of the
data required to make a 2D image plot:
x=1:10;
y=1:11;
Z=randmatrix(10,11);
image(x,y,Z);
write("imageData.txt","x vector");

2003 - 2016 Lumerical Solutions, Inc


1408 Lumerical Knowledge Base

write("imageData.txt",num2str(x));
write("imageData.txt","y vector");
write("imageData.txt",num2str(y));
write("imageData.txt","Data");
write("imageData.txt",num2str(Z));

Exporting matrices with more than 2 dimensions


The num2str command cannot convert matrices with more than 2 dimensions directly to string. In such cases, a for
loop is required to export such matrices to a text file:
Z=randmatrix(3,4,5);
sz=size(Z); # size of each dimension
for(i=1:sz(3)) { # loop over 3rd dimension
write("data.txt","Slice "+num2str(i));
write("data.txt",num2str(pinch(Z,3,i)));
}

Import from text files


You can import text files with the readdata command. This command will read a file with data in a row/column
format. It will ignore any line that begins with a letter. For example, if you have called matrix.txt with the
following data:
this is the header to matrix.txt
0.0 1.2
2.3 4.1

Then, the following script will read and display the data:
M=readdata("matrix.txt");
?M;
result:
0 1.2
2.3 4.1

7.1.6.2 Lumerical Data Files (ldf)


Data can be imported and exported to/from Lumerical Data Files (.ldf). These data files can be used to store
script variables and monitor data (Dcards). This is particularly useful if you have performed a long calculation in
scripting and want to save the results.

In this topic x = linspace(-1e-6,1e-6,10);


File import and export 1406 y = x^2;
Text files 1406 savedata("mydata.ldf",x,y);
Lumerical Data Files (ldf) 1408

Matlab (mat) files 1409


See also
Script functions - Reference Guide 1383

savedata 1439
savedcard 1439
loaddata 1438

Export to .ldf files


The savedata command is used to export script variables to .ldf files.

Exporting specific variables


You can export any number of variables to a Lumerical data file, for example
x = linspace(-1e-6,1e-6,10);
y = x^2;
savedata("mydata.ldf",x,y);

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1409

Exporting the entire workspace


If you only specify a file name, all script variables will be exported. Note that you don't need to include the ".ldf"
extension in the filename. It will be automatically appended.
savedata("mydata");

Import from .ldf files


The load data command is used to load data stored in .ldf files into the current workspace.
loaddata("mydata");

This will load any variables that have been saved into the current workspace. Any variables with the same name that
currently exist in the current workspace will be overwritten.

7.1.6.3 MATLAB (mat) files


There are two ways to transfer data between FDTD and MATLAB: the script integration option, or exporting to .mat
files (using the matlabsave 1642 command).

In this topic matlab;


File import and export 1406
Text files 1406
Lumerical Data Files (ldf) 1408

Matlab (mat) files 1409


See also
Matlab interface 1410

See this link for information using MATLAB and .mat files: Matlab interfaces 1410

7.1.6.4 Tecplot (.dat) files


Tecplot (.dat) files contain geometric and doping data from process simulation. The following example shows how
the tecplotread command can be used to import data from these files into DEVICE.

Solvers 101 tecplotread


DEVICE
Associated files
example_diode_tecplot.dat
tecplot_import_diode.lsf
tecplot_imported_structure.ldev

See also
tecplotread 1441
Dataset builder 375

Reading the data


The first part of the tecplot_import_diode.lsf file reads the data from the example_diode_tecplot.dat
file. The following two lines in the script reads in the names of the zones and the data available in the zones of the
tecplot file.

filename = 'example_diode_tecplot.dat';
zonename = 'Silicon';

?"Available zones: " + tecplotread(filename);


?"Data in zone " + zonename + ": " + tecplotread(filename,zonename);

2003 - 2016 Lumerical Solutions, Inc


1410 Lumerical Knowledge Base

The next few lines read in the information about the finite element grid. Here t is the connectivity matrix and x, y are
the vertex matrices. Notice the coordinate data is converted from units of micron to meter.

t = tecplotread(filename,zonename,'FETriangle');
x = 1e-6*tecplotread(filename,zonename,'X [um]'); # convert to SI from um to m
y = 1e-6*tecplotread(filename,zonename,'Y [um]'); # convert to SI, invert

The following lines then read the doping data.

NA_name = 'NA [1/cm3]';


ND_name = 'ND [1/cm3]';

NA = 1e6*tecplotread(filename,zonename,NA_name); # convert to SI (cm^-3 --> m^-3)


ND = 1e6*tecplotread(filename,zonename,ND_name); # convert to SI (cm^-3 --> m^-3)

After reading the data, the code creates unstructured datasets for the doping data and creates geometries and
import doping objects. The same task can be performed using the Dataset builder 375 in DEVICE once the data has
been imported.

7.1.7 MATLAB
Objective
This section describes how MATLABTM can be used together with Lumerical's software. The script integration page
shows how MATLAB commands can be typed directly into the Lumerical script prompt. Alternatively, simulation
data can be exported to .mat files for later processing. The final pages in this section provide additional information
on how to visualize simulation data with MATLAB.

In this topic
Matlab 1410
Script integration 1411

mat files 1417


2D plotting 1418
3D plotting 1422

See also
File import and export 1406
matlab 1642
matlabget 1643
matlabload 1642
matlabput 1644
matlabsave 1642
matlabsavelegacy 1642
Advanced visualizations with ParaView 790

In most circumstances, it is best to do your analysis within the Lumerical scripting environment. This allows you to
take advantage of specialized functions such as far field projections, and makes automating parameter sweeps

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1411

easy. However, some specialized MATLAB functions are not available in the Lumerical scripting environment. The
best example is data visualization. Lumerical script commands allow you to make line and image plots, but these
options are limited compared to the wide range of MATLAB data visualization functions. The following pages
describe how to use MATLAB together with Lumerical's products.

MATLAB is a registered trademark of The Mathworks, Inc.

7.1.7.1 MATLAB Script Integration


Objective
The Script Integration feature allows MATLAB commands to be typed directly into the Lumerical script prompt. This
provides a very seamless way to take advantage of the full range of MATLAB functions.

Setup instructions and system requirements for the MATLAB script integration feature can be found in the online
Knowledge Base. See the Setup and Configuration section of the Installation Guide.

In this topic
Matlab 1410
Script integration 1411

mat files 1417


2D plotting 1418
3D plotting 1422

Associated files
usr_matlab.fsp
usr_matlab_optionA.lsf

See also
File import and export 1406
matlab 1642
matlabget 1643
matlabload 1642
matlabput 1644
matlabsave 1642
matlabsavelegacy 1642
Advanced visualizations with ParaView 790

Setup instructions and system requirements for the MATLAB script integration
This page describes how to set up the MATLAB integration features.

2003 - 2016 Lumerical Solutions, Inc


1412 Lumerical Knowledge Base

Associated Files
environment.plist
See also
Matlab script functions 1411

Matlab script integration - Requirements


The Matlab script integration feature allows MATLAB script functions to be called from within Lumerical's
scripts via the matlab, matlabput and matlabget script functions.
Requirements
Lumerical is not able to guarantee that all
versions of our products will be compatible with
all MATLAB versions on all operating systems
(the number of permutations is very large!),
although we have found that it works for most
customers.
32 and 64 bit applications can't be mixed. For
example, if you are using the 32-bit version of
MATLAB, you must use the 32-bit version of
Lumerical's products.
Please note that the student
edition of MATLAB is only available
as a 32-bit application.
Some releases of MATLAB include newer
versions of system libraries than are provided by
the operating system. The new libraries are
saved in a private location that only MATLAB
can 'see'. This creates problems for the Matlab
script integration, since the Lumerical
application will use the standard version of the
system library while MATLAB will use its private
version of the same library. This creates a
conflict, which stops the script integration from
working. See below for possible solutions.
The Matlab script integration feature requires
MATLAB version 2006b (7.3) or newer.

Check feature status


To check the status of the MATLAB script
integration feature, go to the Help menu and select
Matlab integration status. See the instructions
below if the status is not active.

If you have problems enabling the Matlab script


integration feature, please see https://

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1413

www.lumerical.com/support/ for technical support.

Matlab script integration - Windows setup


Configuration 1:
Our software must be able to locate the MATLAB
libraries. If they are not in the system library path,
you must manually specify their location.
1. Open the Matlab integration status window
from the Help menu.
2. Use the select button to manually locate the
MATLAB system libraries.

Configuration 2:
MATLAB must be registered as an automation server on your system before the script integration
feature will work. Registration normally occurs during the MATLAB install process, but occasionally the
registration fails or is lost. In such cases, manual registration is required. Manual registration may also
be required when you have multiple versions of MATLAB installed and would like to register MATLAB for
a desired version, eg, if the MATLAB license of one version is not available. Note, users may need
administration access for these configurations. For more information, please refer to MATLAB
documentation.

To register MATLAB, open a MATLAB session and type the following command:
!matlab /regserver

Note: the ! operator in MATLAB just executes the remainder of the line at the command prompt, so this
is equivalent to running a command like the following from the Command prompt:
C:\Program Files\MATLAB\2009a\bin\win64\matlab /regserver

To test the registration, open Lumerical and use one of the Matlab script integration functions. You can
also test the registration from MATLAB (i.e. without using any Lumerical software) with the following
commands:
h = actxserver('Matlab.Application')
h.Execute('plot(1:10)')
The first command starts a second background instance of MATLAB, very similar to the way our
software starts a MATLAB session. The second command send the plot command from the original
MATLAB session to the new MATLAB session. You should see a simple plot window.

As mentioned above, the MATLAB script integration status is sometimes reported incorrectly. If the
status utility reports 'inactive' after the above configuration, it is still possible that the integration script
functions will work properly. Try a command like the following:
matlab("plot(1:10)");

Matlab script integration - Linux setup


The following two configuration steps are often required to setup the Matlab script integration on Linux
operating systems. Occasionally, the third step will be required.

Configuration 1:
The matlab command must be in the path, so if you type matlab at the command prompt the

2003 - 2016 Lumerical Solutions, Inc


1414 Lumerical Knowledge Base

MATLAB application will start. This is suggested by the MATLAB installer, but doesnt necessarily
happen. To do this you can either add the folder where you installed MATLAB to your path, or you can
create a symbolic link to the matlab command in another folder that is already in the path (the
MATLAB installer suggests this).

Configuration 2:
Your Lumerical Product must be able to locate the
MATLAB libraries. If they are not in the system
library path, you must manually specify their
location.
1. Open the Matlab integration status window
from the Help menu.
2. Use the select button to manually locate the
MATLAB system libraries.

Configuration 3:
Some versions of MATLAB include newer versions of system libraries than the standard version provided
by the OS. The newer libraries are saved in a private location that only MATLAB can access. This
creates problems for the Matlab script integration, since your Lumerical Product will load the standard
version of the system library, while MATLAB will load it's private version of the same library. This
creates a conflict, which stops the script integration from working.

The easiest way to avoid this is to roll back to an older version of MATLAB, such as MATLAB 2006-
2008a.

Alternatively, you can try to configure your Lumerical Product to work with your current version of
MATLAB. This requires configuring our software to use the newer system libraries provided by
MATLAB, so both products load the same version of the libraries. This can be setup by creating a
simple shell file that configures the library paths. Once this file is created, your Lumerical Product can
be started with a command. For example:

cat /opt/lumerical/fdtd/bin/fdtd-matlab
#!/bin/bash
export LD_LIBRARY_PATH=/opt/MATLAB/R2010b/sys/os/glnxa64/
/opt/lumerical/fdtd/bin/fdtd-solutions $@

cat /opt/lumerical/mode/bin/mode-matlab
#!/bin/bash
export LD_LIBRARY_PATH=/opt/MATLAB/R2010b/sys/os/glnxa64/
/opt/lumerical/mode/bin/mode-solutions $@

cat /opt/lumerical/device/bin/device-matlab
#!/bin/bash
export LD_LIBRARY_PATH=/opt/MATLAB/R2010b/sys/os/glnxa64/
/opt/lumerical/device/bin/device $@

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1415

cat /opt/lumerical/interconnect/bin/interconnect-matlab
#!/bin/bash
export LD_LIBRARY_PATH=/opt/MATLAB/R2010b/sys/os/glnxa64/
/opt/lumerical/interconnect/bin/interconnect $@

As mentioned above, the MATLAB script integration status is sometimes reported incorrectly. If the
status utility reports 'inactive' after the above configuration, it is still possible that the integration script
functions will work properly. Try a command like the following:
matlab("plot(1:10)");
Matlab script integration - Mac setup
Configuration 1:

Your Lumerical Product must be able to locate the


MATLAB libraries. If they are not in the system
library path, you must manually specify their
location.
1. Open the Matlab integration status window
from the Help menu.
2. Use the select button to manually locate the
MATLAB system libraries.
3. Restart your Lumerical Product for the change
to take effect.

Configuration 2:
It may be necessary to create the following symbolic link to the MATLAB executable.
sudo ln s /Applications/MATLAB_2009b.app/bin/matlab /usr/bin/matlab

Note: The exact command will depend on your MATLAB version and install directory. The above
example command is appropriate for MATLAB 2009B installed in the default location.

As mentioned above, the MATLAB script integration status is sometimes reported incorrectly. If the
status utility reports 'inactive' after the above configuration, it is still possible that the integration script
functions will work properly. Try a command like the following:
matlab("plot(1:10)");

MATLAB API Settings


In order to take advantage of the Matlab interoperability API it is necessary to have installed 2016B or
newer version of Lumerical products. Additionally, to allow correct functionality the OS must know the
location of Lumerical application. On Windows machines this means adding the location of FDTD/
MODE/DEVICE or/and INTERCONNECT executable to the Environment Variable called PATH. This can
be do by going to:
Control Panel -> System -> Advanced system settings
and clicking on the "Environment Variables..." button that is available on the "Advanced" tab. The
"PATH" variable can be found in the list of system variables. For example, if we are going to use FDTD
Solutions we must append the location of fdtd-engine.exe, typically located under:
C:\Program Files\Lumerical\FDTD\bin
to the Variable value as shown on this figure:

2003 - 2016 Lumerical Solutions, Inc


1416 Lumerical Knowledge Base

CAUTION: Make sure that you do not delete any values from the existing path as this might affect the
functionality of other programs. The new path can be separated from the existing records by semicolon.

The second step involves telling Matlab where to look for the API before using any related commands.
The Matlab API is located in the Lumerical installation folder. In our example when we use FDTD on
Windows machine this would be typically under the following location:
C:\Program Files\Lumerical\FDTD\api\matlab
One option is to add this path to Matlab every time we want to run our Matlab script by including
command
path(path,'C:\Program Files\Lumerical\FDTD\api\matlab');
The other, possibly more convenient option is to add the path permanently to the startup.m file that is
loaded every time Matlab is launched.

The MATLAB interface functions (matlab, matlabput, matlabget) allow you to work primarily within the
Lumerical script environment, but still have access to the full range of MATLAB functions when they are required.
For information on supported versions of MATLAB, see the matlab script function description in the Reference Guide.

The first time one of these functions is called, it will start a MATLAB session and create a connection between the
two applications. Once the connection is established, it is possible to transfer data from Lumerical to MATLAB
(matlabput), transfer data from MATLAB to Lumerical (matlabget), and run MATLAB commands from the
Lumerical script prompt (matlab).

For example, open usr_matlab.fsp, then run usr_matlab_optionA.lsf. A MATLAB session will be opened
in the background. The MATLAB coutourf function is used to create a contour plot of the electric field intensity,
as shown below. In addition to the contour plot, more advanced text formatting is possible, such as using the Greek
letter Mu on the axis labels.

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1417

7.1.7.2 mat files


Objective
Data from a Lumerical script can be exported to MATLAB (.mat) files for further analysis. Similarly, data stored in
a .mat file can be loaded into Lumerical's scripting environment.

Note: The ability to load .mat files was introduced in FDTD Solutions 8.6, MODE Solutions 6.5, DEVICE 3.0,
INTERCONNECT 3.0.

2003 - 2016 Lumerical Solutions, Inc


1418 Lumerical Knowledge Base

In this topic
Matlab 1410
Script integration 1411

mat files 1417


2D plotting 1418
3D plotting 1422

Associated files
usr_matlab.fsp
usr_matlab_optionB.lsf

See also
File import and export 1406

matlab 1642
matlabget 1643
matlabload 1642
matlabput 1644
matlabsave 1642
matlabsavelegacy 1642

A data set can be exported from a Lumerical simulation to a MATLAB data file (.mat). MATLAB can then be used
to do any desired analysis. This option is appropriate when all of the analysis can be done with MATLAB and there
is no need for any further interaction with Lumerical. This option is also useful when MATLAB is not installed on the
same computer as your Lumerical products.

For example, open usr_matlab.fsp, then run usr_matlab_optionB.lsf. The script will create a .mat file
that contains the electric field intensity data, plus the associated position vectors. After the script has run, MATLAB
can be used to open the .mat file and do any required analysis.

7.1.7.3 2D image plots


Objective
This page shows how to create 2D image plots of data from Lumerical's software using MATLAB.

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1419

See also
Matlab 1410
Script integration 1411
mat files 1417
2D plotting 1418
3D plotting 1422
Advanced visualizations with ParaView 790

Plot orientation
MATLAB uses a different convention for plotting 2D matrix data than Lumerical. To get the same figure orientation in
MATLAB as in your Lumerical plots, you must apply an unconjugated transpose operation and adjust the axes, as
shown below.

FDTD image plot: MATLAB script to generate same plot:

x = 1:3; load('toPlot.mat');
y = 1:4;
A = [1,2,3,4;5,6,7,8;9,10,11,12]; % transpose matrix, plot data, add color bar
A2 = A.';
matlabsave("toPlot.mat",x,y,A); imagesc(x,y,A2);
image(x,y,A); colorbar;

% set axis limits


set(gca,'Xlim',[min(x),max(x)]);
set(gca,'Ylim',[min(y),max(y)]);

% set Y axis direction


set(gca,'YDir','normal');

Non-uniform mesh

2003 - 2016 Lumerical Solutions, Inc


1420 Lumerical Knowledge Base

The standard image command in MATLAB assumes that matrix data is uniformly sampled, even when you provide
the x,y position vectors. This is not true of the image command in the Lumerical script environment. This is an
important detail when plotting data obtained from a non-uniform mesh.

In the following example, notice that the gaussian profile is not sampled uniformly in the Y direction. To plot this data
in Matlab, you must interpolate the data on a uniform grid, as shown below.

2D image plot in Lumerical: MATLAB script to generate similar plot:

x = linspace(-1.5,0.5,100); load('toPlot.mat');
y = [linspace(-2,0,20); linspace(0.01,1,100)];
X = meshgridx(x,y); % create linearly spaced vectors
Y = meshgridy(x,y); x2 = linspace(min(x),max(x),200);
A = exp(-(1+3*X)^2-(0.5+Y)^2); y2 = linspace(min(y),max(y),200);

matlabsave("toPlot.mat",x,y,A); % create 2D mesh grids. Note that X,y vectors a


image(x,y,A); % as required by Matlab's different plotting co
[X,Y] = meshgrid(y,x);
[X2,Y2] = meshgrid(y2,x2);

% interpolate to new vectors


A2 = interp2(X,Y,A,X2,Y2);

% transpose matrix
A3 = A2.';

% plot data, add color bar, set axis limits, se


imagesc(x2,y2,A3);
colorbar;
set(gca,'Xlim',[min(x),max(x)]);
set(gca,'Ylim',[min(y),max(y)]);
set(gca,'YDir','normal');

Alternatively:
load('toPlot.mat');
A2=A.';
pcolor(x,y,A2);
colorbar;
shading interp;

7.1.7.4 Vector plots


Objective
This page shows how to create a vector plot of data from Lumerical's software using MATLAB.

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1421

See also
Matlab 1410
Script integration 1411

mat files 1417


vector plots 1531

Plot orientation
MATLAB uses a different convention for plotting matrix data than Lumerical. To get the same figure orientation in
MATLAB as in your Lumerical plots, you will need to define a uniform grid for the spatial vectors, x, y, z. This can be
done in MATLAB or in Lumerical's scripting environment; however, since MATLAB's convention for creating
meshgrids is different from Lumerical's convention, it is a lot easier to do this in Lumerical's scripting environment
before exporting the data to MATLAB. Let us assume we have the fields from a monitor named "monitor" in FDTD
Solutions:

FDTD post processing step:

# Get field and position vectors


Ex=getdata("monitor","Ex");
Ey=getdata("monitor","Ey");
Ez=getdata("monitor","Ez");

x=getdata("monitor","x");
y=getdata("monitor","y");
z=getdata("monitor","z");

# Choose a frequency point ( the first one )


Ex=pinch(Ex,4,1);
Ey=pinch(Ey,4,1);
Ez=pinch(Ez,4,1);

# Specify the resolution of the plot


res_x=10;
res_y=10;
res_z=3;

# Define uniform vectors


x2=linspace(x(1),x(length(x)),res_x);
y2=linspace(y(1),y(length(y)),res_y);
z2=linspace(z(1),z(length(z)),res_z);

xmesh = meshgrid3dx(x2,y2,z2);
ymesh = meshgrid3dy(x2,y2,z2);
zmesh = meshgrid3dz(x2,y2,z2);

2003 - 2016 Lumerical Solutions, Inc


1422 Lumerical Knowledge Base

# Interpolate fields on new uniform vectors


Ex=interp(Ex, x, y, z, x2, y2, z2);
Ey=interp(Ey, x, y, z, x2, y2, z2);
Ez=interp(Ez, x, y, z, x2, y2, z2);

matlabsave("monitor_data",Ex,Ey,Ez,xmesh,ymesh,zmesh);

Plotting
Once the 3d uniform grids have been created, we can either plot them in Lumerical's scripting environment or load
the data file in MATLAB and plot them in MATLAB:

Lumerical script to generate vector plot: MATLAB script to generate same plot:

E = rectilineardataset("E",x2,y2,z2); load('monitor_data.mat');
E.addattribute("E",Ex,Ey,Ez);
vectorplot(E); quiver3(xmesh*1e6,ymesh*1e6,zmesh*1e6,real(Ex),r
xlabel('x');
ylabel('y');
zlabel('z');

7.1.7.5 3D plotting
Objective
This example shows how to save 3D monitor data into a text file. The text file is imported into MATLAB as a matrix
and the scatter3() function is used to visualize the E-field. The resulting plot allows for real-time manipulation
such as rotation.

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1423

In this topic
Matlab 1410
Script integration 1411

mat files 1417


2D plotting 1418
3D plotting 1422

Associated files
usr_matlab_simple_beam.fsp
usr_script_3d_scatter.lsf
usr_matlab_script_3d_scatter.m

See also
File import and export 1406
matlab 1642
Advanced visualizations with ParaView 790

The MATLAB function scatter3() allows visualization of data, in this case, E-field values, at points in 3D space.
In this example, a single frequency Gaussian beam is focused in free space and the area around the focal point is
imaged. Occlusion is a major problem for such plots, thus, we threshold the number points that are displayed,
focusing only on the volume of interest. In the resulting figure, we can clearly see the focal point of the Gaussian
beam.

First, download and run the simulation usr_matlab_simple_beam.fsp. Since there are no structures, the
simulation should run fairly quickly. Next, run the script usr_script_3d_scatter.lsf. It picks out points over
the specified threshold value and writes them to e_field.txt.

m_name = "monitor2";
thresh = 1.3; # set threshold, fields above this value will be shown

mon=pinch(getelectric(m_name),4,1); # picks the first freq


xmon=getdata(m_name,"x");
ymon=getdata(m_name,"y");

2003 - 2016 Lumerical Solutions, Inc


1424 Lumerical Knowledge Base

zmon=getdata(m_name,"z");
n=size(xmon);
n=n(1);

# setup empty arrays


s=sum(mon>thresh);
x=matrix(1,s);
y=matrix(1,s);
z=matrix(1,s);
ef=matrix(1,s);

# get positions of (x,y,z) over threshold value


t=1; #counter
for(i=1:n) {
for(j=1:n) {
for(k=1:n) {
if(abs(mon(i,j,k))>thresh) {
x(t)=xmon(i);
y(t)=ymon(j);
z(t)=zmon(k);
ef(t)=abs(mon(i,j,k));
t=t+1;
}
}
}
}

# write data to a txt file to be imported into Matlab


f="e_field.txt";
del(f);
write(f,num2str(x));
write(f,num2str(y));
write(f,num2str(z));
write(f,num2str(ef));

Next, open up Matlab and set the working directory to where e_field.txt was saved. Running the following
code, contained within usr_matlab_script_3d_scatter.m will generate the interactive 3D plot seen above.
Note that the axis limits should be set to the same values for a correct spatial representation. The image above is
stretched out in the x and y directions whereas in reality, the beam is spatially more narrow.
% simple matlab script that plots single frequency 3D monitor data
e_field=dlmread('e_field.txt','\t'); % tab delimited
a=e_field(1,:); % x
b=e_field(2,:); % y
c=e_field(3,:); % z
e=e_field(4,:); % e-field value
size=25; % rendering size of plotted points

% plot the data and label


scatter3(a*1e6,b*1e6,c*1e6,size,e);
xlabel('x-axis (um)');
ylabel('y-axis (um)');
zlabel('z-axis (um)');

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1425

7.1.8 Creating a custom GUI


It is possible to implement your own GUI that can assist you in doing anything from setting up your simulations to
taking measurements and displaying their results.

See also
newwizard (Reference Guide) 1684

Example widget
In this example we will make a widget that will make 4 power monitors in the shape of a square to encase a 2D
simulation. Start by making a new script file and add the following code to it:
#open the new wizard
newwizard(300,200,"Power Box Wizard");
wizardoption("fontsize",12);
wizardoption("fieldwidth",150);
wizardoption("fieldheight",20);
wizardoption("margin",20);
newwizardpage("Go");
wizardwidget("label",endl+"Choose the dimensions in for the Power Box"+endl);
wizardoption("margin",50);
wizardwidget("number","x min (um):");
wizardwidget("number","x max (um):");
wizardwidget("number","y min (um):");
wizardwidget("number","y max (um):");
# get the user set dimensions
out = runwizard;
xmin=wizardgetdata(1)*1e-6;
xmax=wizardgetdata(2)*1e-6;
ymin=wizardgetdata(3)*1e-6;
ymax=wizardgetdata(4)*1e-6;
killwizard;
### break if the user cancelled
if(out==0) {
?"User cancelled";
break;
}
#if the user pressed "Go", add the monitor box
monitors;
addpower;
set("monitor type","Linear X");
set("name","x1");
set("x",(xmax+xmin)/2);

2003 - 2016 Lumerical Solutions, Inc


1426 Lumerical Knowledge Base

set("y",ymin);
set("x span",xmax-xmin);
copy;
set("name","x2");
set("x",(xmax+xmin)/2);
set("y",ymax);
addpower;
set("name","y1");
set("monitor type","Linear Y");
set("y",(ymax+ymin)/2);
set("x",xmin);
set("y span",ymax-ymin);
copy;
set("name","y2");
set("y",(ymax+ymin)/2);
set("x",xmax);

The code will generate the window shown below. Once the user has entered the dimensions they can then click go
and the power box will be generated. This will work on any simulation and can be easily expanded to work with 3D
simulations as well.

See the reference guide for more details on GUI commands.

7.2 System
System commands for interacting with the OS file system, running script files, etc.

System commands
Command Description
newproject 1429 Creates a new layout environment.
newmode 1430 Creates a new MODE layout environment.
new 1448 Creates a new simulation project file.
save 1430 Saves an fsp file or lms file.
load 1430 Loads an fsp file or lms file.
del 1431 Deletes a file.
rm 1431

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1427

ls 1431 Lists the files in a directory.


dir 1431

cd 1432 Changes the working directory.


pwd 1432 Returns the current working directory.
cp 1432 Copy a file.
mv 1432 Move a file.
exit 1433 Exit the application.
system 1433 Run command prompts.
fileexists 1433 Check if a file exists.
currentfilename 1434 Get the current filename.
filebasename 1434 Get the file base name from a string.
filedirectory 1434 Get the file directory from a string.
fileextension 1434 Get the file extension from a string.
copytoclipboard 1441 Copy to system clipboard.
pastefromclipboard 1442 Paste from system clipboard.
hide 1445 Hides the GUI.
show 1446 Shows the GUI.
clearlogwindow 1446 Clears output log window.
version 1446 Returns the current version of the application.
versionfile 1446 Returns the current version of the file loaded by the application.
fileexpand 1450 Expands a file name by replacing any environmental variables.
autosaveon 1450 Automatically saves current project before running a simulation.
autosaveoff 1450 The project will not be saved automatically before running a simulation.
read 1450 Read data from s text file as a string.
exist 1448 Check the existence of a variable, script or script file.
exporthtml 1448 Generates an html file describing an element.
help 1448 Opens the Lumerical knowledge base using the default web browser.
logmessage 1449 This function sends messages from scripted elements to the INTERCONNECT
output window.
refresh 1449 Reloads the current project.
operatingsystem 1449 Returns the current operating system.
setconnectionrouting 1451 Sets the connection routing for a given connection.
findproperty 1452 Returns a cell containing all elements in the circuit that have a certain
property.
findpropertyvalue 1452 Returns a cell containing all elements in the circuit that have a certain property
with a certain value.
refresh 1449 Reloads the current project.
runinitialize 1435 Initializes a step by step simulation.
runstep 1435 Runs a single simulation step.
runfinalize 1436 Finalizes a step by step simulation.

2003 - 2016 Lumerical Solutions, Inc


1428 Lumerical Knowledge Base

waituntildone 1436 This function only returns after the current simulation is done.

Encrypt script commands


Command Description
encryptscript 1451 Saves a copy of the specified script file in an encrypted format.

List of script commands


Command Description
getcommands 1435 Returns a list of available script commands.

Starting and stopping scripts


Command Description
running a script 1435 Type the script name to run it.
getpath 1436 Get the current path.
addpath 1436 Add a directory to the path.
clearpath 1437 Remove"directory" from the script path if it is there.
which 1437 Where in the path is a file.
pause 1437 Pauses program for a time.
break 1438 Will stop a script file from executing at that line.
ESCAPE key 1438 To interrupt a script file from running or a long block of commands from
executing

File input and output


Command Description
format 1438 Set the precision of the script interpreter.
STD OUT
write 1440 Writes strings to text files or to standard output.
LDF files
loaddata 1438 Load variables or d-card data from ldf file.
savedata 1439 Save variables to ldf file.
savedcard 1439 Saves d-card data to an ldf file.
Text files
readdata 1439 Read text files.
write 1440 Writes strings to text files or to standard output.
fld (field) files
asapexport 1440 Export monitor data to fld file.
asapload 1440 Load data from fld file.
asapimport 1441 Import data from fld file to Import source.
VTK files
vtksave 1442 Save in .vtk format
Touchstone files

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1429

touchstoneload 1445 Loads passive network data from a file containing Touchstone file formatted s-
parameters.
Lookup tables
lookupclose 1443 Closes a file previously created with a lookupopen command.
lookupopen 1443 Opens a file to write a lookup table.
lookupread 1442 Finds the nearest extracted value from a file containing a lookup table of
design and extracted parameters.
lookupwrite 1443 Writes to a lookup table a design and an extracted parameter pair.
lookupreadtable 1444 Returns an interpolated matrix from a file containing a lookup table of design
and extracted parameters.
lookupreadvalue 1444 Finds the value from a file containing a lookup table of design and extracted
parameters.
lookupreadnportsparameter 1444 Returns an interpolated s-parameter cell from a file containing a lookup table of
design and extracted parameters.
lookupappend 1445 Supports direct insertion of a new association into an existing table
insert 1445 Inserts an object into an existing cell
SPICE Netlist
importnetlist 1447 Imports an optical SPICE netlist.
exportnetlist 1447 Export a netlist for the current circuit.
Comma separated value (csv)
exportcsvresults 1447 Exports simulation results to comma separated value formatted files.
Tecplot files
tecplotread 1441 Imports data from tecplot format files.
STL files
readstltriangles 1451 Imports vertex data from an STL file.

Debugging
Command Description
debug 1442 Opens the debug utility window.

See Also
exportfigure 1531 , load 1430 , save 1430

7.2.1 newproject
Create a new simulation project file.

Supported Product: FDTD, DEVICE

Syntax Description
newproject; Creates a new layout environment.
This function does not return any data.
newproject(option); The options are
1: use default file and material database as template
2: use current file and material database as template

2003 - 2016 Lumerical Solutions, Inc


1430 Lumerical Knowledge Base

3: open a file browser to select and existing file as a template


The default option is 1.

See Also
System level 1426 , new 1448

7.2.2 newmode
Creates a new MODE layout environment.

Supported Product: Deprecated. Use newproject instead

Syntax Description
newmode; Creates a new layout environment.
This function does not return any data.
newmode(option); The options are
1: use default lms file and material database as template
2: use current lms file and material database as template
3: open a file browser to select and existing lms file as a template
The default option is 1.

See Also
System level 1426

7.2.3 save
Saves an simulation project file. If the simulation has been run, the file will also contain the simulation results.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
save; Open a file browser to save the file.
This function does not return any data.
save(filename); Save with the specified name

See Also
System level 1426 , load 1430 , loaddata 1438 , savedata 1439 , savedcard 1439

7.2.4 load
Loads an simulation project file. If the simulation has been run, the file will also contain the simulation results.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
load(filename); Loads the simulation file.
This function does not return any data.

See Also
System level 1426 , loaddata 1438 , save 1430 , savedata 1439 , savedcard 1439 , fileexists 1433 , dir 1431

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1431

7.2.5 del
Delete a file.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
del("filename"); Deletes the file "filename".
rm("filename"); This function does not return any data.

See Also
System level 1426 , delete 1563

7.2.6 rm
Delete a file.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
del("filename"); Deletes the file "filename".
rm("filename"); This function does not return any data.

See Also
System level 1426 , delete 1563

7.2.7 dir
List files in a directory.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
out = dir; The output is a string.
out = ls; Use ?dir; to write the value to the screen.
out = dir("directory"); Lists the files in the specified directory.
out = ls("directory");

See Also
System level 1426 , load 1430 , splitstring 1492

7.2.8 ls
List files in a directory.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
out = dir; The output is a string.
out = ls; Use ?dir; to write the value to the screen.
out = dir("directory"); Lists the files in the specified directory.
out = ls("directory");

2003 - 2016 Lumerical Solutions, Inc


1432 Lumerical Knowledge Base

See Also
System level 1426 , load 1430 , splitstring 1492

7.2.9 cd
Change directory.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
cd; Opens a window to browse to a directory.
This function does not return any data.
cd("directory"); Changes the working directory to "directory". Whenever you open an
fsp file or run a script file, it will set the working directory to the
directory of the file opened.

See Also
System level 1426

7.2.10 pwd
Returns the current working directory.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
out = pwd; Returns the current working directory as a string.

See Also
System level 1426 , currentfilename 1434

7.2.11 cp
Copy a file.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
cp("file1","file2"); Makes a copy of file1 called file2.
This function does not return any data.
cp("path1\file1","path2\file2"); Copies file1 in path1 to file2 in path2.

See Also
System level 1426 , mv 1432 , pwd 1432 , copy (objects) 1566

7.2.12 mv
Move a file.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1433

mv("file1","file2"); Moves file1 to file2.


This function does not return any data.
mv("path1\file1","path2\file2"); Moves file1 in path1 to file2 in path2.

See Also
System level 1426 , cp 1432 , pwd 1432

7.2.13 exit
Exit the application.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
exit; Exits the application. Same as exit(1);
This function does not return any data.
exit(option); Exits the application. The option can be
1: Prompt user if a file needs saving before exiting.
2: Force the application to exit without prompting the user.
The default option is 1.

See Also
System level 1426

7.2.14 system
The system command allows you to have the operating system (OS) execute a command, rather than the Lumerical
script interpreter.

The system command does not return any data.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
system("command"); Run "command" at the OS command prompt.

See Also
System level 1426 , readdata 1439 , exit 1433 ," 1473 , currentfilename 1434

7.2.15 fileexists
Check if a file exists. The file extension must be specified. By default, the entire path will be searched.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
out = fileexists("filename"); Returns 1 if the file exists
Returns 0 if the file does not exist.
out = fileexists("c:\temp\file.txt"); Search for a file not in the path

See Also
System level 1426 , getpath 1436 , which 1437 , pwd 1432 , load 1430 , loaddata 1438 , write 1440 , readdata 1439 , currentfilename 1434 ,
rm 1431 ,

2003 - 2016 Lumerical Solutions, Inc


1434 Lumerical Knowledge Base

7.2.16 currentfilename
Get the current filename and directory.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
out = currentfilename; Returns the current filename as a string.
If the current filename is not defined, this function returns an empty
string "".

See Also
System level 1426 , fileexists 1433 , getpath 1436 , which 1437 , pwd 1432 , fileextension 1434 , filebasename 1434 , filedirectory 1434

7.2.17 filebasename
Get the file basename from a string.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
out = filebasename( "location/ Returns the file basename as a string.
filename.ext" );

See Also
System level 1426 , currentfilename 1434 , getpath 1436 , which 1437 , pwd 1432

7.2.18 fileextension
Get the file extension from a string.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
out = fileextension( "name.ext"); Returns the file extension as a string.

See Also
System level 1426 , currentfilename 1434 , getpath 1436 , which 1437 , pwd 1432

7.2.19 filedirectory
Get the file directory from a string.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
out = filedirectory( "location/ Returns the file directory as a string.
filename.ext" );

See Also
System level 1426 , currentfilename 1434 , getpath 1436 , which 1437 , pwd 1432

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1435

7.2.20 getcommands
Returns the list of available script commands in the current script workspace.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
?getcommands; Returns a list of available script commands

See Also
System level 1426

7.2.21 Run script


Run a script by typing its name. The file must be in the current path. The path always searches the current
directory first. A script file is not passed variables, and does not return variables. All scripts have access to all of
the variables defined in the current workspace.

It's best to avoid using the names of Lumerical script functions (i.e. plot) for the names of your script files. If a
script file has the same name as a function, the script will be run (not the function). This allows you to effectively re-
define the behavior of a function, but it can cause confusion when done unintentionally.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
filename; Run the script file filename.lsf, if it exists in the current path.
A script does not have a return type.

See Also
System level 1426 , getpath 1436 , addpath 1436 , which 1437 , feval 1491

7.2.22 runinitialize
This script command initializes a step by step simulation.

Supported Product: INTERCONNECT

Syntax Description
runinitialize; Initialize a step by step simulation, different from run the simulation is
only initialized. This command should be used in combination with
runstep and runfinalize, and it is typically used for co-simulations.

See Also
System level 1426 , runstep 1435 , runfinalize 1436 , waituntildone 1436

7.2.23 runstep
This script command runs a single simulation step.

Supported Product: INTERCONNECT

Syntax Description
runstep; Runs a single simulation step. This command should be used in

2003 - 2016 Lumerical Solutions, Inc


1436 Lumerical Knowledge Base

combination with runinitialize and runfinalize, and it is typically used for


co-simulations.

See Also
System level 1426 , runinitialize 1435 , runfinalize 1436 , waituntildone 1436

7.2.24 runfinalize
This script command finalizes a step by step simulation.

Supported Product: INTERCONNECT

Syntax Description
runfinalize; Finalizes a step by step simulation. This command should be used in
combination with runinitialize and runstep, and it is typically used for
co-simulations.

See Also
System level 1426 , runinitialize 1435 , runstep 1435 , waituntildone 1436

7.2.25 waituntildone
This function only returns after the current simulation is done.

Supported Product: INTERCONNECT

Syntax Description
waituntildone; This function only returns after the current simulation is done. It allows
to wait for the simulation before performing any other tasks that
depends on simulation completion.

See Also
System level 1426 , runinitialize 1435 , runstep 1435 , runfinalize 1436

7.2.26 getpath
Get the current path. By default, the current working directory and the script sub-directory of the installation (eg. C:
\Program Files\Lumerical\FDTD\scripts) are in the path.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
out = getpath; Returns the current path as a string.
Use ?getpath; to print it to the screen.

See Also
System level 1426 , addpath 1436 , clearpath 1437 , which 1437 , pwd 1432

7.2.27 addpath
Add a directory to the path.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1437

Syntax Description
addpath("directory"); Adds a directory to the path.
This function does not return any data.

See Also
System level 1426 , getpath 1436 , which 1437 , pwd 1432 , clearpath 1437

7.2.28 clearpath
Removes all directories from the script path, except "./".

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
clearpath("directory"); Remove"directory" from the script path if it is there.

See Also
System level 1426 , getpath 1436 , which 1437 , pwd 1432 , addpath 1436

7.2.29 which
Returns the full file pathname for the specified file.

This function can be helpful when you have added several directories to the Lumerical path variable and you want to
check which files are being accessed.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
out = which("filename"); Returns the pathname of the file "filename" as a string.
Use ?which("filename"); to display the result to the screen.

See Also
System level 1426 , getpath 1436 , addpath 1436 , pwd 1432 , currentfilename 1434 , fileexists 1433

7.2.30 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.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
pause(time); Pauses script for time, measured in seconds.
This function does not return any data.

See Also
System level 1426 , break 1438 , ESCAPE key 1438

2003 - 2016 Lumerical Solutions, Inc


1438 Lumerical Knowledge Base

7.2.31 break
Stops a script from executing.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
break; Will stop a script file from executing at that line. A warning will be
generated.
This function does not return any data.

See Also
System level 1426 , ESCAPE key 1438 , pause 1437

7.2.32 Excape key


Interrupts a script or long block of commands.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
ESCAPE key To interrupt a script file from running or a long block of commands from
executing. A warning will be generated. Sometimes you may need to
press escape several times, or hold it down to interrupt the script.

See Also
System level 1426 , break 1438 , pause 1437

7.2.33 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.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
format long; Set script interpreter to 16 digits of precision.
format short; Set script interpreter to 6 digits of precision.

See Also
System level 1426 , num2str 1490 ,? 1474

7.2.34 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.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
loaddata("filename"); Reads data script variables or d-card data from the specified file.
This function does not return any data.

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1439

See Also
System level 1426 , savedata 1439 , savedcard 1439 , workspace 1457 , load 1430 , fileexists 1433

7.2.35 savedata
Saves workspace variables to a Lumerical data file (ldf) file. To save monitor (D-card) data to an ldf file, see the
savedcard function.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
savedata("filename"); Saves all current variables to the specified file.
This function does not return any data.
savedata("filename", var1, Saves only variables with the specified names to file.
var2,...);

See Also
System level 1426 , savedcard 1439 , loaddata 1438 , workspace 1457 , matlabsave 1642

7.2.36 savedcard
Saves d-card data to a Lumerical data file (ldf) file. D-cards are generally used to store monitor data.

Data is saved in the nonorm state. See the units and normalization 116 section of the reference guide for more
information.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
savedcard("filename"); Saves all current d-cards (local and global) to the specified ldf file.
This function does not return any data.
savedcard("filename", "name1", Saves only the d-cards with the specified names, "name1", "name2",
"name2",...); etc.

See Also
System level 1426 , copydcard 1649 , savedata 1439 , loaddata 1438 , matlabsave 1642

7.2.37 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.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

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 1426 , rm 1431 , write 1440 , str2num 1490 , findstring 1491 , replace 1492 , replacestring 1492 , substring 1491 , fileexists
1433

2003 - 2016 Lumerical Solutions, Inc


1440 Lumerical Knowledge Base

7.2.38 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.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
write(my_string); Write my_string to the standard output (linux only).
write("testfile.txt", my_string); Will write the contents of the string variable my_string to testfile.txt.
This function does not return any data.

See Also
System level 1426 , savedata 1439 , readdata 1439 , rm 1431 , num2str 1490 ,? 1474 , endl 1474 , format 1438 , fileexists 1433 , matlabsave
1642

7.2.39 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.

Supported Product: FDTD, MODE

Syntax Description
asapexport( "monitorname"); Export data from monitorname. By default, the first frequency point is
exported.
This function does not return any data.
asapexport( "monitorname", f); Exports the frequency point specified by the index f.
asapexport( "monitorname", f, Exports to the specified "filename" without opening a file browser
"filename"); window.

See Also
System level 1426 , asapload 1440 , asapimport 1441 , addimportedsource 1546

7.2.40 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 "fld_data" exists, it will be called "fld_data_2". After loading an asapfile with asapload, you can
extract any desired data., which can be
Ex, Ey, Ez, Hx, Hy, Hz, x, y, z
power, frequency, wavelength, index

Supported Product: FDTD, MODE

Syntax Description
asapload; Select the file to load with the file browser.
This function does not return any data.
asapload( "filename"); Loads data from an fld file called "filename" without a file browser.

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1441

See Also
System level 1426 , asapexport 1440 , asapimport 1441 , addimportedsource 1546 , fileexists 1433

7.2.41 asapimport
Import an ASAP fld file into an ASAP source. This is equivalent to editing the properties of the Import source, and
clicking on the Import Source button.

Supported Product: FDTD

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", Specify the file to open.
"filename");

See Also
System level 1426 , asapexport 1440 , asapload 1440 , addimportedsource 1546 , fileexists 1433

7.2.42 tecplotread
Import data from Tecplot formatted file (text).

Supported Product: DEVICE

Syntax Description
? tecplotread('filename.dat'); List all zones ( domains) in the data file.
? List all of the data fields associated with the zone.
tecplotread('filename.dat','zonen
ame');
out = Retrieve the data as an array
tecplotread('filename.dat','zonen
ame','dataname');

See Also
system 1433 , matlabload 1642 , h5read 1683

7.2.43 copytoclipboard
Copies the selected objects into the system clipboard. Equivalent to 'Ctrl-C'.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
copytoclipboard Copies selected objects to the system clipboard

See Also
System level 1426 , pastefromclipboard 1442 , copy 1566

2003 - 2016 Lumerical Solutions, Inc


1442 Lumerical Knowledge Base

7.2.44 pastefromclipboard
Paste the contents of the system clipboard into the layout environment. Equivalent to 'Ctrl-V'.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
pastefromclipboard Paste contents of system clipboard

See Also
System level 1426 , copytoclipboard 1441 , copy 1566

7.2.45 debug
Opens the debug utility window.

Supported Product: FDTD

Syntax Description
debug; Opens the debug utility window.

See Also
System level 1426

7.2.46 vtksave
The script command vtksave saves a Lumerical dataset into the VTK format. The command only saves rectilinear
and unstructured datasets. The filename will have .vtr appended for rectilinear dataset, .vtu appended for
unstructured dataset. The freely available data visualization program Paraview can then be used to create
sophisticated plots of your data.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
vtksave(filename, dataset); Save the dataset in vtk file of the name specified.

See Also
System level 1426 , datasets 1461 , rectilineardataset 1459 , matlabsave 1642 , data visualization with ParaView 790

7.2.47 lookupread
Finds the nearest extracted value from a file containing a lookup table of design and extracted parameters.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
out = lookupread Finds the nearest extracted value from a file containing a lookup table
(filename,table,design,extracted); of design and extracted parameters. Parameter table is the name of
the lookup table located inside the file, design is a cell containing
multiple structures that define the design parameters to search, and
extracted is the name of the parameter to be extracted. It will return
the value located at the nearest design parameters.
out = lookupread (filename); Returns a script object, in this case a cell array containing all the

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1443

contents of the xml file.


See Also
System level 1426 , lookupclose 1443 , lookupopen 1443 , lookupwrite 1443 , lookupreadtable 1444 , lookupreadvalue 1444 ,
lookupreadnportsparameter 1444 , lookupappend 1445 , insert 1445

7.2.48 lookupopen
Opens a file to write a lookup table.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
lookupopen (filename,table); Opens a file to write a lookup table. This command is required before
any calls to lookupwrite can be made.
See Also
System level 1426 , lookupclose 1443 , lookupread 1442 , lookupwrite 1443 , lookupreadtable 1444 , lookupreadvalue 1444 ,
lookupreadnportsparameter 1444 , lookupappend 1445 , insert 1445

7.2.49 lookupclose
Closes a file previously created with a lookupopen command.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
lookupclose (filename); Closes a file previously created with a lookupopen command. This
command is required in order to close any file open by lookupopen.
See Also
System level 1426 , lookupopen 1443 , lookupread 1442 , lookupwrite 1443 , lookupreadtable 1444 , lookupreadvalue 1444 ,
lookupreadnportsparameter 1444 , lookupappend 1445 , insert 1445

7.2.50 lookupwrite
Writes to a lookup table a design and an extracted parameter pair.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
out = lookupwrite Writes to a lookup table a design and an extracted parameter pair. The
(filename,table,design, extracted); design and extracted parameters are cells that contain multiple
structures, allowing for mapping between multiple design and extracted
parameters. This function can be called multiple times, for each call
the design and extracted parameters will be appended to the current
file. This function must be called after lookupopen and before
lookupclose.
out = lookupwrite (filename); Takes a script object, in this case a cell array containing all the
contents of the xml file, and save it to a file.
See Also
System level 1426 , lookupclose 1443 , lookupopen 1443 , lookupread 1442 , lookupreadtable 1444 , lookupreadvalue 1444 ,
lookupreadnportsparameter 1444 , lookupappend 1445 , insert 1445

2003 - 2016 Lumerical Solutions, Inc


1444 Lumerical Knowledge Base

7.2.51 lookupreadtable
Returns an interpolated matrix from a file containing a lookup table of design and extracted parameters.

Supported Product: INTERCONNECT

Syntax Description
out = lookupreadtable Returns an interpolated matrix from a file containing a lookup table of
(filename,table,design,extracted); design and extracted parameters. Parameter table is the name of the
lookup table located inside the file, design is a cell containing multiple
structures that define the design parameters to search, and extracted
is the name of the parameter to be extracted. It will return a matrix that
contains multiple columns. The first column is the independent
variable. e.g. frequency dependent transmission values.

See Also
System level 1426 , lookupopen 1443 , lookupread 1442 , lookupwrite 1443 , lookupclose 1443 , lookupreadvalue 1444 ,
lookupreadnportsparameter 1444 , lookupappend 1445 , insert 1445

7.2.52 lookupreadvalue
Finds the value from a file containing a lookup table of design and extracted parameters.

Supported Product: INTERCONNECT

Syntax Description
out = lookupreadvalue Find the value from a file containing a lookup table of design and
(filename,table,design,extracted); extracted parameters. Parameter table is the name of the lookup table
located inside the file, design is a cell containing multiple structures
that define the design parameters to search, and extracted is the name
of the parameter to be extracted. It will return the value is interpolated
at the design parameters.

See Also
System level 1426 , lookupopen 1443 , lookupread 1442 , lookupwrite 1443 , lookupclose 1443 , lookupreadtable 1444 ,
lookupreadnportsparameter 1444 , lookupappend 1445 , insert 1445

7.2.53 lookupreadnportsparameter
Returns an interpolated s-parameter cell from a file containing a lookup table of design and extracted parameters.

Supported Product: INTERCONNECT

Syntax Description
out = lookupreadnportsparameter Returns an interpolated s-parameter cell from a file containing a lookup
(filename,table,design,extracted); table of design and extracted parameters. Parameter table is the name
of the lookup table located inside the file, design is a cell containing
multiple structures that define the design parameters to search, and
extracted is the name of the parameter to be extracted. S-parameter
file format must be compatible with the Optical N Port S-Parameter.

See Also
System level 1426 , lookupopen 1443 , lookupread 1442 , lookupwrite 1443 , lookupclose 1443 , lookupreadtable 1444 ,
lookupreadvalue 1444 , lookupappend 1445 , insert 1445

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1445

7.2.54 lookupappend
This script function supports direct insertion of a new association into an existing table.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
lookupappend( filename, table, Inserts a new association into an existing lookup table.
design, extracted );

See Also
System level 1426 , lookupopen 1443 , lookupread 1442 , lookupwrite 1443 , lookupclose 1443 , lookupreadtable 1444 ,
lookupreadvalue 1444 , lookupreadnportsparameter 1444 , insert 1445

7.2.55 insert
This scriptcommand inserts an object into an existing cell.

Supported Product: INTERCONNECT

Syntax Description
out{1}.association = Inserts an object into an existing cell.
insert( out{1}.association,
association, cell number );

See Also
System level 1426 , lookupopen 1443 , lookupread 1442 , lookupwrite 1443 , lookupclose 1443 , lookupreadtable 1444 ,
lookupreadvalue 1444 , lookupreadnportsparameter 1444 , lookupappend 1445

7.2.56 touchstoneload
Loads passive network data from a file containing Touchstone file formatted s-parameters. For more information
about the Touchstone specification refer to http://www.vhdl.org/pub/ibis/connector/touchstone_spec11.pdf.

Supported Product: INTERCONNECT

Syntax Description
out = touchstoneload (filename); It returns a matrix where the first column contains the frequency
values in Hz. S-parameters are returned using MA format, where M
is the magnitude and A is the angle in radians.

See Also
System level 1426

7.2.57 hide
Hides the graphical user interface, can be used with the show 1445 command.

Supported Product: INTERCONNECT

Syntax Description
hide; hides the GUI.

2003 - 2016 Lumerical Solutions, Inc


1446 Lumerical Knowledge Base

See Also
System level 1426 , show 1445

7.2.58 show
Shows the graphical user interface, can be used with the hide 1445 command.

Supported Product: INTERCONNECT

Syntax Description
show; shows the GUI.

See Also
System level 1426 , hide 1445

7.2.59 clearlogwindow
Clears the log output log window.

Supported Product: INTERCONNECT

Syntax Description
clearlogwindow; clears output log window.

See Also
System level 1426

7.2.60 version
Returns the current version of the application.

Supported Product: INTERCONNECT

Syntax Description
out = version; Returns the version of the application.

See Also
System level 1426 , versionfile 1446

7.2.61 versionfile
Returns the current version of the file loaded by the application.

Supported Product: INTERCONNECT

Syntax Description
out = versionfile; Returns the version of the file loaded by the application.

See Also
System level 1426 , version 1446

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1447

7.2.62 importnetlist
This script command can import an optical SPICE netlist.

Supported Product: INTERCONNECT

Syntax Description
importnetlist("filename"); imports an optical SPICE netlist.

Parameter Type Description


filename string name of the netlist.

See Also
System level 1426 , exportnetlist 1447

7.2.63 exportnetlist
Export a netlist for the current circuit.

Supported Product: INTERCONNECT

Syntax Description
exportnetlist; Export a netlist for the current circuit. filename is the output
exportnetlist (filename); netlist name, element is the compound element to be exported. If
exportnetlist overwrite is true, any existing netlist file with the same name as
(element,filename,overwrite=true); filename will be overwritten. If element is not provided, the
currently selected compound element will be exported, otherwise
the root element will be exported.

See Also
System level 1426 , importnetlist 1447

7.2.64 exportcsvresults
This script command can export the results of a simulation to comma separated value formatted files, which can be
opened by Microsoft Excel.

Supported Product: INTERCONNECT

Syntax Description
exportcsvresults("filename") exports the results of the entire simulation to multiple .cvs files,
named filename_elementname.csv
exportcsvresults("filename", exports the results of the specified element to a .cvs file, named
"elementname") filename_elementname.csv

Parameter Type Description


filename string name of the .csv file
elementname string name of the element.

2003 - 2016 Lumerical Solutions, Inc


1448 Lumerical Knowledge Base

See Also
System level 1426

7.2.65 new
Create a new simulation project file.

Supported Product: MODE, INTERCONNECT

Syntax Description
new; Creates a new layout environment.

See Also
System level 1426 , newproject 1429

7.2.66 exist
Returns a number based on type of the string used in the command.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
exist("x") Returns
0 if there is no variable, operator, built-in function or script file (x.lsf) in
the current script path
1 if x is a variable, example: x=5; ?exist(x);
2 if x is an operator or built in keyword, example: ?exist(*) or ?
exist(for);
3 if x is a script file in the current script path, called x.lsf

See Also
System level 1426 , newproject 1429

7.2.67 exporthtml
Generates an html file describing an element.

Supported Product: INTERCONNECT

Syntax Description
exporthtml (element_name) Generates an html file describing an element. The file lists the element
type, symbol, and the list of properties.

See Also
System level 1426 , newproject 1429

7.2.68 help
Opens the Lumerical knowledge base using the default web browser.

Supported Product: INTERCONNECT

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1449

Syntax Description
help(argument=); Opens the Lumerical knowledge base using the default web
browser. If no arguments are provided the web browser will open
the page with the alphabetical list of all script commands,
otherwise it will run a search using the argument parameter and
open the page with the search results for the argument
parameter.

See Also
System level 1426

7.2.69 logmessage
This function sends messages from scripted elements to the INTERCONNECT output window.

Supported Product: INTERCONNECT

Syntax Description
logmessage; This function sendS messages from scripted elements to the
INTERCONNECT output window. It is specially useful to debug
scripted elements.

See Also
System level 1426

7.2.70 refresh
This command reloads the current project.

Supported Product: INTERCONNECT

Syntax Description
refresh; Reloads the current project. This is particularly useful when
changing the library property of a reference element. Reference
elements must be manually refreshed or reloaded if the library
property is modified otherwise the use will have to save and
reload the current project.

See Also
System level 1426

7.2.71 operatingsystem
Returns the current operating system.

Supported Product: INTERCONNECT

Syntax Description
operatingsystem; Returns the current operating system. Valid return values are
windows, apple or linux.

2003 - 2016 Lumerical Solutions, Inc


1450 Lumerical Knowledge Base

See Also
System level 1426

7.2.72 fileexpand
Expands a file name by replacing any environmental variables.

Supported Product: FDTD, MODE, INTERCONNECT, DEVICE

Syntax Description
fileexpand(filename); Expands a file name by replacing any environmental variables (defined
by setsetting).

See Also
System level 1426 , setsetting 1633

7.2.73 autosaveon
This command turns on the feature to automatically save the current project before running a simulation.

Supported Product: INTERCONNECT

Syntax Description
autosaveon; Automatically saves current project before running a simulation.

See Also
System level 1426 , autosaveoff 1450

7.2.74 read
This command reads data from s text file as a string.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
read(filename, size); Read a text file as a string for the user defined size 'size'. The default
value for size is 1e+6, if not specified.

See Also
System level 1426

7.2.75 autosaveoff
This command turns off the feature to automatically save the current project before running a simulation.

Supported Product: INTERCONNECT

Syntax Description
autosaveoff; The project will not be saved automatically before running a simulation
(default).

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1451

See Also
System level 1426 , autosaveon 1450

7.2.76 encryptscript
Save a copy of the specified script file in an encrypted format. The new file will have a .lsfx file extension. Encrypting
a script allows a script to be shared with others, without allowing them to see the contents of the script.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
encryptscript("filename.lsf"); Encrypt a copy of the script. The new file will be named "filename.lsfx".
encryptscript("filename.lsf", Specify an alternate file name.
"new_filename");

See Also
System level 1426

7.2.77 readstltriangles
Import a matrix of vertex positions from an STL file.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
out=stlimport("filename",scaling_fa Returns a Mx3 matrix with vertices from all STL triangles from the
ctor); specified STL file.

Scaling_factor - A STL file does not contain unit data. To import data in
units of microns, set this value to 1e-6. For nanometers, set this value
to 1e-9.

See Also
System level 1426 , stlimport 1554

7.2.78 setconnectionrouting
This command sets the connection routing for a given connection.

Supported Product: INTERCONNECT

Syntax Description
setconnectionrouting (element, This command sets the connection routing for a given connection.
port, type);
setconnectionrouting (element, If only the element and the type are provided, all connections to the
type); element port will have the same type.

If element name, port and type are provided, only the specific element
port connection will be affected.

type = "direct" or "manhattan".

See Also

2003 - 2016 Lumerical Solutions, Inc


1452 Lumerical Knowledge Base

System level 1426

7.2.79 findproperty
This command returns a cell containing all elements in the circuit that have a certain property.

Supported Product: INTERCONNECT

Syntax Description
findproperty (property, recursive); Returns a cell containing all elements in the circuit that have property
property. If recursive is true, it will return a flat list (hierarchical) with
all the elements in the current scope. The default value for recursive is
false.

See Also
System level 1426 , findpropertyvalue 1452

7.2.80 findpropertyvalue
This command returns a cell containing all elements in the circuit that have a certain property with a certain value.

Supported Product: INTERCONNECT

Syntax Description
findpropertyvalue (property, value, Returns a cell containing all elements in the circuit that have property
recursive); property with value value, if recursive is true, it will return a flat list
(hierarchical) with all the elements in the current scope. The default
value for recursive is false.

See Also
System level 1426 , findproperty 1452

7.3 Manipulating variables


The following commands are used to create and access variables.

Command Description
= 1453 Assignment operator.
: 1454 Array operator.
[] 1454 Create matrix.
% 1454 Create variable with space in the name
linspace 1454 Creates a linear spaced array.
matrix 1455 Creates a matrix filled with zeros.
randmatrix 1455 Creates a matrix with all elements randomly set between 0 and 1
randnmatrix 1455 Creates a matrix with all elements randomly distributed with mean 0 and
standard distribution 1.
histogram 1455 Create a matrix containing the histogram count of a yield analysis result.
meshgridx 1456 Create a 2D meshgrid in x direction.
meshgridy 1456 Create a 2D meshgrid in y direction.
meshgrid3dx 1456 Create a 3D meshgrid in x direction.

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1453

meshgrid3dy 1456 Create a 3D meshgrid in y direction.


meshgrid3dz 1457 Create a 3D meshgrid in z direction.
meshgrid4d 1457 Create a 4D meshgrid in any direction
clear 1457 Clears all stored script variables from memory.
workspace 1457 Returns a string of all the currently defined scripting variables.
Matrix elements 1458 How to assign and access matrix elements.
Matrix operations 1458 Describes how operators and functions act on matrices.
Pre-defined constants 1459 List of pre-defined constants.
eye 1461 Creates identity matrix
struct 1465 Creates unstructured dataset
cell 1465 Creates cell array variable

The following commands are used to create, access and manipulate datasets. For an introduction to datasets, see
the dataset introduction 1461 page.
Command Description
rectilineardataset 1459 Creates an empty rectilinear dataset associated with the coordinates x/y/z.
matrixdataset 1459 Creates an empty matrix dataset.
unstructureddataset 1466 Creates an empty unstructured dataset associated with the coordinates x/y/z
and the connectivity matrix
addparameter 1460 Adds a parameter to an existing dataset.
addattribute 1460 Adds an attribute to an existing dataset.
getresult 1647 Gets the dataset results from a monitor or analyzer.
getparameter 1460 Get a parameter from an existing dataset.
getattribute 1461 Get an attribute from an existing dataset.

The following commands are INTERCONNECT specific.


Command Description
global 1466 Returns the value of a global variable specified. Global variables are root
element properties.
simulation 1466 Returns bandwidth and channel related simulation properties.

7.3.1 =
Assignment operators.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
x = 5+2i; Assign a value to a variable.

See Also
Manipulating variables 1452 , == 1469

2003 - 2016 Lumerical Solutions, Inc


1454 Lumerical Knowledge Base

7.3.2 :
Array operator.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
x = 2 : 10; x will be an array of numbers that start at 2 and increase by 1 for each
consecutive number. The last entry will be <= 10. x will equal
2,3,...,9,10.
x = 6 : -1.5 : 2; x will be the array were the first element is 6, and consecutive
elements decrease by 1.5. All elements will be >=2. In this example,
the array will be [6, 4.5, 3].

See Also
Manipulating variables 1452 , linspace 1454

7.3.3 []
Specify matrix element by element.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Command Description
x = [u11,...,u1N; u21,...,u2N; Create an N by M matrix. Columns are separated with semicolons. Elements
uM1,...,uMN] in a row are separated with commas. The entries can either be scalars or
matrices of compatible dimension.

See Also
Manipulating variables 1452 , linspace 1454 , matrix 1455 , Accessing and assigning matrix elements 1458

7.3.4 %
Used to create variables with spaced in the names.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Command Description
%variable with space% To create a variable name that contains spaces, such as "variable with
space", put a percentage sign before and after the variable name.

See Also
Manipulating variables 1452

7.3.5 linspace
Creates a linearly spaced array.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1455

x = linspace(min,max,num); x will be an array with num elements, linearly spaced between min and
max. If num is set to 1, then x will be the average of min and max.

See Also
Manipulating variables 1452 ,: 1454 , [] 1454

7.3.6 matrix
Initialize a matrix. All elements are set to zero.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
x = matrix(i,j,k,....); Initializes an i x j x k x .... matrix.

See Also
Manipulating variables 1452 , linspace 1454 , [] 1454

7.3.7 randmatrix
Initialize a matrix. All elements are random numbers between 0 and 1.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
x = randmatrix(i,j,k,....); Initializes an i x j x k x .... matrix. The elements are all random
numbers between 0 and 1.
See Also
Manipulating variables 1452 , matrix 1455 , rand 1502 , randreset 1503

7.3.8 randnmatrix
Initialize a matrix. All elements are normally distributed random numbers with mean 0 and standard distribution 1.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
x = randnmatrix(i,j,k,....); Initializes an i x j x k x .... matrix. The elements are all random
normally distributed numbers with mean 0 and standard deviation 1.

See Also
Manipulating variables 1452 , matrix 1455 , randn 1503 , randreset 1503

7.3.9 histogram
Create a matrix containing the histogram count of a yield analysis result.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
out = histogram(y); Returns a matrix containing the histogram count of y.
out = histogram(y,n); Returns a matrix containing the histogram count of y, using n bins.

2003 - 2016 Lumerical Solutions, Inc


1456 Lumerical Knowledge Base

out = histogram(y,n,barplot); Returns a matrix containing the histogram count of y, using n bins. If
barplot is true (1), the histogram count is formatted for a bar plot.

See Also
Manipulating variables 1452 , histc 1528

7.3.10 meshgridx
Create a 2D meshgrid in the x direction

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
out = meshgridx(x,y); If x and y are single column (or single row vectors), of dimension nX1
and mX1 respectively, the command
X = meshgridx(x,y);
Will create a 2D matrix of dimension nXm where X(i,j)=x(i).

See Also
Manipulating variables 1452 , image 1529 , meshgridy 1456 , meshgrid3dx 1456

7.3.11 meshgridy
Create a 2D meshgrid in the y direction

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
out = meshgridy(x,y); If x and y are single column (or single row vectors), of dimension nX1
and mX1 respectively, the command
Y = meshgridy(x,y);
Will create a 2D matrix of dimension nXm where Y(i,j)=y(j).

See Also
Manipulating variables 1452 , image 1529 , meshgridx 1456 , meshgrid3dx 1456

7.3.12 meshgrid3dx
Create a 3D meshgrid in the x direction

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
out = meshgrid3dx(x,y,z); The 3D version of meshgridx and meshgridy.

See Also
Manipulating variables 1452 , meshgridx 1456 , meshgridy 1456 , meshgrid3dy 1456 , meshgrid3dz 1457

7.3.13 meshgrid3dy
Create a 3D meshgrid in the y direction

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1457

Syntax Description
out = meshgrid3dy(x,y,z); The 3D version of meshgridx and meshgridy.

See Also
Manipulating variables 1452 , meshgridx 1456 , meshgridy 1456 , meshgrid3dx 1456 , meshgrid3dz 1457

7.3.14 meshgrid3dz
Create a 3D meshgrid in the z direction

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
out = meshgrid3dz(x,y,z); The 3D version of meshgridx and meshgridy.

See Also
Manipulating variables 1452 , meshgridx 1456 , meshgridy 1456 , meshgrid3dx 1456 , meshgrid3dy 1456

7.3.15 meshgrid4d
Create a 4D meshgrid in any direction.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
out = meshgrid4d(dim, x1, x2, x3, The 4D meshgrid function.
x4); dim specifies the dimension along which to create the grid
x1,x2,x3,x4 are the position vectors in each direction

See Also
Manipulating variables 1452 , meshgridx 1456 , meshgridy 1456 , meshgrid3dy 1456 , meshgrid3dz 1457

7.3.16 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.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
clear; Clears all workspace variables.
This function does not return any data.

See Also
Manipulating variables 1452 , cleardcard 1650

7.3.17 workspace
Returns a list of all the currently defined variables in the scripting workspace.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description

2003 - 2016 Lumerical Solutions, Inc


1458 Lumerical Knowledge Base

out = workspace; Returns a string that lists all currently defined variables in the
workspace.
Use ?workspace; to print this to the screen.

See Also
Manipulating variables 1452

7.3.18 Accessing and assigning matrix elements


Accessing and assigning matrix elements.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Command Description
x = [u; v; w] Create a column vector. u,v,w can either be scalars or matrices of compatible
dimension.
x = [u, v, w] Create a row vector. u,v,w can either be scalars or matrices of compatible
dimension.
x(7) = 5; Set the 7th element of x to 5.
x(7) = y(2); Set the 7th element of x to the 2nd element of y.
x(3,1,8) = 3; Set an element of a multidimensional matrix to 3.
x(2:5,1) = 1:4; Set a sub-matrix of x to values 1:4. In the assignment A(I,...) = B, if B is not a
scalar, the sub-matrix A(I,...) must be the same same size as B. If B is a
scalar, then all the values of the sub-matrix are set to B.
x(2:5,1) = 1; Set all the values in a sub-matrix of x to 1.
x = y(1:10,2,1:20); x is equal to a sub-matrix of y.
x = matrix(2,3); Multi-dimension matrices can be accessed with a single index.
x(4)=7;
x=y(z); Indices stored in matrix (z) used to select elements of matrix y. length(x) will
equal length(z).

See Also
Manipulating variables 1452

7.3.19 Matrix operators


Almost all the scripting functions will act element by element on matrices. Single numbers are treated as matrices
of dimension 1x1. The following table provides some examples.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Dimension of x Dimension of y Operation Dimension of z Value of z


1x1 N/A z = sin(x) 1x1 z 11 = sin(x 11)

1x1 1x1 z=x*y 1x1 z 11 = x 11 * y 11

10x10 1x1 z=x*y 10x10 Zij = x ij * y 11

10x10 10x10 z=x*y 10x10 Zij = x ij * y ij

10x10 11x11 z=x*y Error Error

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1459

See Also
Manipulating variables 1452

7.3.20 Pre-defined constants


Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Name Description
pi The number p.
c The speed of light in a vacuum in m/s.
eps0 The permittivity of free space in SI units.
mu0 The permeability of free space in SI units.
h The Planck constant.
hbar The reduced Planck constant.
true Logical TRUE (1).
false Logical FALSE (0);
e The electron volt.

See Also
Manipulating variables 1452

7.3.21 matrixdataset
Creates an empty matrix dataset. Matrix datasets are used for data (attributes and parameters) that don't have any
spatial dependence (i.e. Reflection vs frequency). For datasets that do have x/y/z spatial coordinates (i.e. electric
fields), use rectilineardataset 1459 .

Matrix datasets can be parameterized, and can contain an arbitrary number of attributes (see addattribute) 1460 and
parameters (see addparameter) 1460 .

See Dataset introduction 1461 for more information.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
matrixdataset; Creates an empty dataset.
matrixdataset("name"); Creates an empty dataset with the name "name".

See Also
rectilineardataset 1459 , addattribute 1460 , addparameter 1460 , visualize 1529 , datasets 1461 , getparameter 1460 , getattribute
1461 , matrixdataset 1459 , struct 1465

7.3.22 rectilineardataset
Creates an empty rectilinear dataset that is associate with the x/y/z coordinates (ex. E and H fields). Like matrix
datasets, rectilinear datasets can be parameterized, and can contain an arbitrary number of attributes (see
addattribute) 1460 and parameters (see addparameter) 1460 .

See Dataset introduction 1461 for more information.


For datasets that are not associated with the x/y/z coordinates (ex. transmission as a function of frequency), see
matrixdataset 1459 .

2003 - 2016 Lumerical Solutions, Inc


1460 Lumerical Knowledge Base

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
rectilineardataset(x,y,z); Creates a empty rectilinear dataset associated with the coordinates x/
y/z.
rectilineardataset("dataset_name", Creates a empty rectilinear dataset named "dataset_name" associated
x,y,z); with the coordinates x/y/z.

See Also
rectilineardataset 1459 , addattribute 1460 , addparameter 1460 , visualize 1529 , datasets 1461 , getparameter 1460 , getattribute
1461 , matrixdataset 1459 , struct 1465

7.3.23 addparameter
Adds a parameter to an existing dataset.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
R.addparameter("p_name", p); Adds the parameter p to the existing dataset R.
R.addparameter("p1_name", p1, Adds the interdependent parameter p1_name, p2_name to the R
"p2_name", p2); dataset.
The most common interdependent parameter is frequency and
wavelength. Parameters that are not interdependent must be added
separately.

See Also
rectilineardataset 1459 , addattribute 1460 , addparameter 1460 , visualize 1529 , datasets 1461 , getparameter 1460 , getattribute
1461 , matrixdataset 1459

7.3.24 addattribute
Adds an attribute to an existing dataset.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
R.addattribute("a_name", a); Adds the scalar attribute a to the dataset R.
R.addattribute("a_vector", a_1, Adds the vector attribute a_vector to the existing dataset R. The
a_2, a_3); components of the vector are a_1, a_2 and a_3

See Also
rectilineardataset 1459 , addattribute 1460 , addparameter 1460 , visualize 1529 , datasets 1461 , getparameter 1460 , getattribute
1461 , matrixdataset 1459

7.3.25 getparameter
Get a parameter from an existing dataset.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1461

Syntax Description
?getparameter(R); Returns the names of all the parameters in the dataset R.
Parameter = R.getparameter("p"); Retrieves the parameter p from the existing dataset R. The result
"Parameter" is a scalar matrix.
Parameter = getparameter(R,"p"); Retrieves the parameter p from the existing dataset R. The result
"Parameter" is a scalar matrix.

See Also
matrixdataset 1459 , rectilineardataset 1459 , "." operator 1484 , getresult 1647 , getattribute 1461 , visualize 1529 , datasets 1461

7.3.26 getattribute
Get an attribute from an existing dataset.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
?getattribute(R); Returns the names of all the attributes in the dataset R.
Attribute = R.getattribute("a"); Retrieves the attribute a from the existing dataset R. The result
"Attribute" is a scalar matrix.
Attribute = getparameter(R,"a"); Retrieves the attribute a from the existing dataset R. The result
"Attribute" is a scalar matrix.

See Also
Dataset introduction 1461 , matrixdataset 1459 , rectilineardataset 1459 , "." operator 1484 , getresult 1647 , getparameter 1460 ,
visualize 1529 , datasets 1461

7.3.27 eye
The script command eye creates a 2D identity matrix.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
I = eye; Returns a 1x1 matrix, value 1.0.
I = eye(n); Returns nxn identity matrix.
I = eye(n,m); Returns nxm matrix with ones on main diagonal

See Also
Datasets 1461 , matrixdataset 1459 , rectilineardataset 1459 , matlab 1642 , matrix 1455

7.3.28 Datasets
Introduction to Lumerical datasets
Lumerical datasets are structured data objects that collect a set of related matrices into a single convenient object.
To introduce this concept, we'll start by providing two examples. Additional information follows.
Page contents
Example 1) Reflection vs radius and height 1462
Example 2) Electric field data from a monitor 1462
Attributes and parameters 1464
What is in a dataset? Icons and the '?' operator 1464

2003 - 2016 Lumerical Solutions, Inc


1462 Lumerical Knowledge Base

Accessing data in a dataset: the dot '.' operator 1464


Dataset types: matrixdataset and rectilineardataset 1464

Operations on datasets 1465


Scalar and vector attributes 1465

Example 1) Reflection vs radius and height (matrix dataset)


Suppose you have a parameter sweep that measures
the reflection from a particle as a function of particle
radius and height. Saving this information generally
requires 3 matrix variables. The 2D matrix R contains
the reflection value from each simulation, while the 1D
vectors radius and height contain the associated
position values.

A dataset object can be used to collect all three


matrices into a single dataset variable.

The following script code generates some example data, creates a R(radius,height) dataset, and finally creates
several plots of the data.

# create example results


radius = 0:10;
height = 1:0.1:3;
reflection = randmatrix(length(radius),length(height));

# create Reflection dataset


R = matrixdataset("R"); # initialize dataset
R.addparameter("radius",radius); # add radius parameter
R.addparameter("height",height); # add height parameter
R.addattribute("R",reflection); # add reflection attribute

# plot data
image(radius,height,reflection); # use original matrices
image(R.radius,R.height,R.R); # use dataset

# send dataset to visualizer


visualize(R);

Example 2) Electric field data from a monitor (rectilinear dataset)

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1463

Field monitors in FDTD and MODE Solutions are used


to calculate and save spatial electric field data. The
raw electric field data within the monitor is distributed
between several matrices: Each vector field component
is stored in a matrix (Ex, Ey, Ez), and the four
associated position vectors (x,y,z,f) are also stored as
separate matrices.

A dataset can be used used to collect all of this


information into a single dataset variable. The figure to
the right shows the three matrices Ex, Ey, Ez that
store each component of the electric field. It also
shows the associated position vectors x, y, z. All of
this information can be stored within a single dataset
variable.

Note: The electric field matrices usually have a 4th


dimension (time or frequency), but this dimension is
not included in the figure due to the difficulty of
graphically representing a 4th dimension!
The following script code shows how to get the raw data from a frequency monitor in FDTD Solutions (using
getdata), and how to manually create a dataset from that data. It also shows how to directly get the electric field
dataset from the monitor in a single command (using getresult). The final section shows how to create a few plots
of the data

# monitor name
m="monitor";

# get individual data elements with getdata


x=getdata(m,"x");
y=getdata(m,"y");
z=getdata(m,"z");
f=getdata(m,"f");
Ex=getdata(m,"Ex");
Ey=getdata(m,"Ey");
Ez=getdata(m,"Ez");

# manually create the electric field dataset from the raw data
# initialize dataset and provide spatial position vectors
E_manual = rectilineardataset("E_manual",x,y,z);

# add additional parameter: frequency


E_manual.addparameter("lambda",c/f,"f",f);

# add vector electric field attribute


E_manual.addattribute("E",Ex,Ey,Ez);

# all of the above commands can be avoided with a single getresult command
E_fromMonitor = getresult(m,"E");

# plot Ex(x,y) at the first z value and first frequency point


to_plot = pinch(pinch(Ex,4,1),3,1); # use original matrices
image(x,y,to_plot); # use original matrices
to_plot = pinch(pinch(E_manual.Ex,4,1),3,1); # use dataset
image(E_manual.x,E_manual.y,to_plot); # use dataset

2003 - 2016 Lumerical Solutions, Inc


1464 Lumerical Knowledge Base

# Plot the entire dataset with the Visualizer


visualize(E_manual);

Attributes and parameters


Attribute: The actual data of a dataset. In the examples above, the reflection R and electric field Ex, Ey, Ez were
the Attributes of the dataset.
Parameter: The associated position vectors of a dataset. In the above examples, radius, height, x, y, z, and f were
the parameters.

When creating datasets, the size of the attribute matrices must be consistent with the lengths of the associated
parameters matrices.

What is in a dataset? Icons and the '?' operator


The Results view and Script workspace windows provide a list of current monitor results and script variables.
Different icons are used for each type of variable (dataset, matrix, string, unstructured data). For datasets, the
preview column provides a list of the attributes and parameters in the dataset. In the screenshot below, the 'E'
dataset contains one attribute (E) that is a function of 4 parameters (x,y,z, lambda/f).

The '?' operator can be used to output the same information to the script prompt.
?E_field = getresult("monitor","E");
> E vs x, y, z, lambda/f

To output the actual attribute or parameter values, do something like:


?E_field.x; # output the 'x' position vector
> result:
> -6.58393e-006
> -6.5442e-006
> -6.50447e-006
> .....

Accessing data in a dataset: the dot '.' operator


Individual matrices stored in the dataset can be accessed with the dot '.' operator. For example, to get the raw x, y,
and Ex data from an Electric field dataset, do something like:
x = E_field.x;
y = E_field.y;
Ex = E_field.Ex;

Dataset types: matrixdataset and rectilineardataset


Data without spatial parameters (such as example 1) will use matrix datasets.
Data with spatial information from a rectilinear grid (such as the FDTD mesh) will use rectilinear datasets.

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1465

Operations on datasets
Datasets are primarily intended to be a convenient way to manage and store a collection of related data. It is not
possible to apply mathematical operations, such as addition, directly to dataset objects. Instead, the dot operator
must be used to get the desired data into a matrix. The operation can then be applied to the matrix. You may
choose to create a new dataset to store the result, or you may simply keep the result as a standard matrix.

Scalar and vector attributes


It is possible to add both scalar and vector attributes to datasets.

Scalar
The command
R.addattribute("R",reflection); # add reflection attribute
adds a scalar quantity 'R' to a dataset with the same name. To access the 'R' raw data, use:
R.R;

Vector
The command
E.addattribute("E",Ex_raw,Ey_raw,Ez_raw); # add vector E field attribute
adds a vector quantity 'E' to a dataset with the same name. In this case, we can access the raw 'E' data in the
following ways:
E.Ex; # get Ex component
E.Ey; # get Ey component
E.Ez; # get Ez component
E.E2; # get |E|^2
E.E; # get all components in a single matrix. An extra dimension of length 3 will be a

See Also
rectilineardataset 1459 , addattribute 1460 , addparameter 1460 , visualize 1529 , datasets 1461 , getparameter 1460 , getattribute
1461 , matrixdataset 1459 , struct 1465

7.3.29 struct
The script command struct adds an unstructured dataset. Any data type (such as matrix, string, dataset) can be
added to struct objects.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
a = struct; Creates an unstructured dataset.
a.a = "string"; Adds a string field to the structure.
a.b = matrix(5,5); Adds a field of matrix of 5x5 to the structure.

See Also
Datasets 1461 , matrixdataset 1459 , rectilineardataset 1459 , cell 1465

7.3.30 cell
The script command cell creates a cell array variable with specified number of elements. The cell array element can
be any data type, such as matrix, string, and dataset.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description

2003 - 2016 Lumerical Solutions, Inc


1466 Lumerical Knowledge Base

a = cell(n); Creates a cell array with n elements.


a{n} = "string"; Adds a string to the specified element of the cell array.
a{n} = matrix(5,5); Adds a field of matrix of 5x5 to the specified element of the cell array.

See Also
Datasets 1461 , matrixdataset 1459 , rectilineardataset 1459 , struct 1465 , splitstring 1492

7.3.31 unstructureddataset
unstructureddataset script command creates an empty dataset that is associated with arbitrary x/y/z coordinate in
space, and with additional matrix, a connectivity matrix to connect them. The connectivity matrix comes after x, y,
and z. Like rectilinear datasets, unstructured datasets can be parameterized, and can contain an arbitrary number
of attributes (see addattribute) 1460 and parameters (see addparameter) 1460 .

See Dataset introduction 1461 for more information. For datasets that are not associated with the x/y/z coordinates
(ex. transmission as a function of frequency), see matrixdataset 1459 .

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
unstructureddataset(x,y,z,C); Creates an empty unstructured dataset associated with the
coordinates x/y/z and a connectivity matrix to connect them.

See Also
rectilineardataset 1459 , addattribute 1460 , addparameter 1460 , visualize 1529 , datasets 1461 , getparameter 1460 , getattribute
1461 , matrixdataset 1459 , struct 1465

7.3.32 global
The script command returns the value of a global variable specified. Global variables are root element properties.

Supported Product: INTERCONNECT

Syntax Description
out = global (name); Returns the value of a global variable.

See Also
Manipulating variables 1452

7.3.33 simulation
The script command simulation returns bandwidth related simulation properties. The time domain simulator will try to
accommodate the current channels into non-overlapping simulation bandwidths. Simulation properties include the
center frequency, sample rate, number of samples, frequency grid spacing, lower and upper frequency limits. If a
single bandwidth is listed, this means all channels fit in the same bandwidth, otherwise multiple bandwidths are
required to accommodate all channels with the current sample rate.

The command also returns the list of source channels in the current simulation before the simulation estimate the
simulation bandwidths. This list includes the overlapped bandwidths. Simulation properties include the center
frequency, sample rate, number of samples, frequency grid spacing, lower and upper frequency limits. If a single
bandwidth is listed, this means all channels fit in the same bandwidth, otherwise multiple bandwidths are required to
accommodate all channels with the current sample rate.

This function is valid during analysis or run-time mode only.

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1467

Supported Product: INTERCONNECT

Syntax Description
out = simulation(bandwidth); Returns bandwidth related simulation properties.
out = simulation(channels); Returns the list of source channels in the current simulation before
the simulation estimate the simulation bandwidths.
out = simulation(single); Returns the recommended setting for simulation using a single
band (total field) that will make sure all channels are merged into
one simulation bandwidth.

See Also
Manipulating variables 1452

7.4 Operators
Standard mathematical and string operators.

Algebraic operators
Command Description
* 1468 Multiplication. Ex: y = x * z;
/ 1468 Division. Ex: y = x / z;
+ 1469 Addition. Ex: y = x + z;
- 1469 Subtraction. Ex: y = x z;
- 1469 Negative. Ex: y = -x;
^ 1469 Power. Ex: y = x^3;
In expression A^B, if B is complex, the phase of A is evaluated from -p to p.

Logical and relational operators


Command Description
== 1469 Comparison.
almostequal 1470 Almost equal comparison operator.
!= 1470 Not equal.
<= 1470 Less than or equal to.
>= 1470 Greater than or equal to.
< 1471 Less than.
> 1471 Greater than.
& 1471 AND.
and 1471 AND.
| 1472 OR.
or 1472 OR.
! 1472 NOT.
~ 1473 NOT.

2003 - 2016 Lumerical Solutions, Inc


1468 Lumerical Knowledge Base

Dataset operators
Command Description
. 1468 Retrieve the parameters and attributes of datasets.

String operators
Command Description
" 1473 Create a string variable.
' 1474 Create a string variable.
+ 1469 Add strings
endl 1474 end of line character.

Output to screen
Command Description
? 1474 Display output on screen.
# script file comments 1474 Comment script files with #

7.4.1 .
The dot operator can be used to retrieve the parameters and attributes of datasets.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
result = A.result; Retrieves the parameter or attribute "result" from the existing dataset
A. The result is a scalar matrix.
See Also
matrixdataset 1459 , rectilineardataset 1459 , getparameter 1460 , getattribute 1461 , visualize 1529

7.4.2 *
Multiplication. When applied to matrices, this operator does simple element by element multiplication, not matrix
multiplication.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
y = x * z; Multiply x and z.

See Also
Operators 1467 ,* 1468 ,/ 1468 ,+ 1469 ,- 1469 ,^ 1469 , mult 1485

7.4.3 /
Division.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
y = x / z; Divide x by z.

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1469

See Also
Operators 1467 ,* 1468 ,/ 1468 ,+ 1469 ,- 1469 ,^ 1469

7.4.4 +
Addition.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
y = x + z; Add x and z.
y = string1 + string2; Concatenate strings together.

See Also
Operators 1467 ,* 1468 ,/ 1468 ,+ 1469 ,- 1469 ,^ 1469

7.4.5 -
Subtraction, or negative.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
y = x - z; Subtract z from x.
y = -x; Negative

See Also
Operators 1467 ,* 1468 ,/ 1468 ,+ 1469 ,- 1469 ,^ 1469

7.4.6 ^
Power. In expression A^B, if B is complex, the phase of A is evaluated from -p to p.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
y = x^3; x cubed.

See Also
Operators 1467 ,* 1468 ,/ 1468 ,+ 1469 ,- 1469 ,^ 1469

7.4.7 ==
Logical comparison. This operators can be used with complex numbers and strings.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
out = y == x; Returns 1 if x and y are equal. Returns 0 otherwise.

See Also

2003 - 2016 Lumerical Solutions, Inc


1470 Lumerical Knowledge Base

Operators 1467 ,= 1453 , almostequal 1470 , != 1470 , <= 1470 , >= 1470 ,< 1471 ,> 1471 ,& 1471 , and 1471 ,| 1472 , or 1472 ,! 1472 ,~ 1473

7.4.8 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.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
out = almostequal(A, B); Returns 1 if A - B is less than or equal to A + B/2*1e-15. Returns
0 otherwise.
out = almostequal(A, B, relative Returns 1 if A - B is less than or equal to A + B/2 times relative
diff); diff. Returns 0 otherwise.
out = almostequal(A, B, relative Returns 1 if A - B is less than or equal to A + B/2 times relative
diff, absolute diff); diff or if A - B is less than or equal to absolute diff. Returns 0
otherwise.

See Also
Operators 1467 ,= 1453 , == 1469 , != 1470 , <= 1470 , >= 1470 ,< 1471 ,> 1471 ,& 1471 , and 1471 ,| 1472 , or 1472 ,! 1472 ,~ 1473

7.4.9 !=
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.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
out = a!=b; If a is not equal to b, then out equals 1. Otherwise out equals 0.

See Also
Operators 1467 , == 1469 , almostequal 1470 , <= 1470 , >= 1470 ,< 1471 ,> 1471 ,& 1471 , and 1471 ,| 1472 , or 1472 ,! 1472 ,~ 1473

7.4.10 <=
Logical less than or equal to. Imaginary components of x and y are ignored.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
out = y <= x; Less than or equal to.

See Also
Operators 1467 , == 1469 , != 1470 , almostequal 1470 , >= 1470 ,< 1471 ,> 1471 ,& 1471 , and 1471 ,| 1472 , or 1472 ,! 1472 ,~ 1473

7.4.11 >=
Logical greater than or equal to. Imaginary components of x and y are ignored.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1471

Syntax Description
out = y >= x; Greater than or equal to.

See Also
Operators 1467 , == 1469 , != 1470 , <= 1470 , almostequal 1470 ,< 1471 ,> 1471 ,& 1471 , and 1471 ,| 1472 , or 1472 ,! 1472 ,~ 1473

7.4.12 <
Logical less than. Imaginary components of x and y are ignored.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
out = y < x; Less than.

See Also
Operators 1467 , == 1469 , != 1470 , <= 1470 , >= 1470 , almostequal 1470 ,> 1471 ,& 1471 , and 1471 ,| 1472 , or 1472 ,! 1472 ,~ 1473

7.4.13 >
Logical greater than. Imaginary components of x and y are ignored.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
out = y > x; Greater than.

See Also
Operators 1467 , == 1469 , != 1470 , <= 1470 , >= 1470 ,< 1471 , almostequal 1470 ,& 1471 , and 1471 ,| 1472 , or 1472 ,! 1472 ,~ 1473

7.4.14 &
Logical AND. Imaginary components of x and y are ignored.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

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 1467 , == 1469 , != 1470 , <= 1470 , >= 1470 ,< 1471 ,> 1471 ,& 1471 , and 1471 ,| 1472 , or 1472 ,! 1472 ,~ 1473

7.4.15 and
Logical AND. Imaginary components of x and y are ignored.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
out = y & x; If the real part of either or both of x,y are zero, then return 0.

2003 - 2016 Lumerical Solutions, Inc


1472 Lumerical Knowledge Base

Otherwise return 1.
y and x; Same as &.

See Also
Operators 1467 , == 1469 , != 1470 , <= 1470 , >= 1470 ,< 1471 ,> 1471 ,& 1471 , and 1471 ,| 1472 , or 1472 ,! 1472 ,~ 1473

7.4.16 |
Logical OR. Imaginary components of x and y are ignored.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
out = y | x; If the real part of either or both of x,y is non-zero, then return 1.
Otherwise return 0.
y or x; Same as |.

See Also
Operators 1467 , == 1469 , != 1470 , <= 1470 , >= 1470 ,< 1471 ,> 1471 ,& 1471 , and 1471 ,| 1472 , or 1472 ,! 1472 ,~ 1473

7.4.17 or
Logical OR. Imaginary components of x and y are ignored.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
out = y | x; If the real part of either or both of x,y is non-zero, then return 1.
Otherwise return 0.
y or x; Same as |.

See Also
Operators 1467 , == 1469 , != 1470 , <= 1470 , >= 1470 ,< 1471 ,> 1471 ,& 1471 , and 1471 ,| 1472 , or 1472 ,! 1472 ,~ 1473

7.4.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.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
out = !a; applies logical not operator to a
out = ~a; applies logical not operator to a

See Also
Operators 1467 , == 1469 , != 1470 , <= 1470 , >= 1470 ,< 1471 ,> 1471 ,& 1471 , and 1471 ,| 1472 , or 1472 ,! 1472 ,~ 1473

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1473

7.4.19 ~
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.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
out = !a; applies logical not operator to a
out = ~a; applies logical not operator to a

See Also
Operators 1467 , == 1469 , != 1470 , <= 1470 , >= 1470 ,< 1471 ,> 1471 ,& 1471 , and 1471 ,| 1472 , or 1472 ,! 1472 ,~ 1473

7.4.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

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
out="my string"; use double quotes to create strings

NOTE: Literal backslashes and double quotes


It is always possible to create a literal backslash in a string with \\. However, \ also results in a literal backslash,
IF it it will not be interpreted as part of an escape sequence (\n, \", \\). This note is important when storing paths
in strings.

Suppose we want to create the string C:\Program Files\Lumerical. The following three commands are
valid and equivalent:
mystring = 'C:\Program Files\Lumerical'; # use single quotes
mystring = "C:\Program Files\Lumerical"; # use double quotes
mystring = "C:\\Program Files\\Lumerical"; # use double quotes and \\ escape character

However, suppose we want to create the string C:\Program Files\Lumerical\. The only difference is the
additional backslash at the end of the string. The following two commands are valid and equivalent:
mystring = 'C:\Program Files\Lumerical\'; # use single quotes
mystring = "C:\\Program Files\\Lumerical\\"; # use double quotes and \\ escape characte

The other potential command, where we use a single backslash, is not valid syntax and will result in an error.
mystring = "C:\Program Files\Lumerical\"; # use double quotes
The problem is that the script interpreter will interpret the final \" as an escape character for a literal double quote,
rather than as a single backslash and a closing double quote. When interpreted this way, the command results in
a syntax error because there is no double quote character closing the string.

See Also
Operators 1467 ,' 1474 , num2str 1490 ,+ 1469 , endl 1474 , write 1440 , eval 1491 , system 1433

2003 - 2016 Lumerical Solutions, Inc


1474 Lumerical Knowledge Base

7.4.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 (two single quote characters)

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
out='my string'; use single quotes to create strings

See Also
Operators 1467 ," 1473 , num2str 1490 ,+ 1469 , endl 1474 , write 1440 , eval 1491 , system 1433

7.4.22 endl
Add an end of line character to a string

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
out = "line1"+endl+"line2"; Add an end of line character to the string.

See Also
Operators 1467 , num2str 1490 ,+ 1469 ," 1473 , write 1440

7.4.23 ?
Print output to the screen. Use the format script command to change the precision of the output.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
?command; Displays the output of the command on the screen
This function does not return any data.

See Also
System level 1426 , write 1440 , format 1438 ,# 1474

7.4.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.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
x=1; # set x to 1 Anything after the # character is ignored.

See Also
System level 1426

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1475

7.5 Functions
Standard mathematical and matrix functions.

Trigonometric and complex


Command Description
sin 1478 Trigonometric sin function.
cos 1479 Trigonometric cos function.
tan 1479 Trigonometric tan function.
asin 1479 Inverse trigonometric sin function.
acos 1479 Inverse trigonometric cos function.
atan 1480 Inverse trigonometric tan function.
atan2 1480 Same as atan, but returns angle in correct quadrant.
real 1480 Returns the real part of variable
imag 1480 Returns the imaginary part of variable
conj 1481 Complex conjugate
abs 1481 Absolute value
angle 1481 Phase of a complex number.
unwrap 1481 Removes phase difference of more than 2p

Logarithmic, exponential and power


Command Description
log 1482 The natural logarithm. Input can be complex or negative.
log10 1482 The log, base 10. Input can be complex or negative.
sqrt 1482 The square root.
exp 1482 The exponential.

Matrix functions
Command Description
size 1482 Returns the dimensions of a matrix.
length 1483 Returns the total number of elements in a matrix.
pinch 1483 Remove singleton dimensions from a matrix.
sum 1483 The sum of a matrix.
max 1484 The max value in a matrix.
min 1484 The min value in a matrix.
dot 1484 The dot product of two vectors.
cross 1484 The cross product of two vectors.
flip 1485 Flip a matrix in one dimension.
interp 1487 Linear interpolation function.
spline 1487 Cubic spline interpolation.
polyfit 1488 Polynomial fit.

2003 - 2016 Lumerical Solutions, Inc


1476 Lumerical Knowledge Base

integrate 1488 Integrate a matrix.


integrate2 1488 Integrate a matrix, ignore singleton dimensions.
find 1489 Find values that satisfy a condition in a matrix.
findpeaks 1489 Find peaks in a matrix.
transpose 1490 Transpose a matrix.
ctranspose 1490 Transpose a matrix, and do complex conjugate.
mult 1485 Perform matrix multiplication of two or more matrices.
reshape 1486 Reshape the matrix to have different dimensions conserving the overall product
of the dimensions.
eig 1485 Calculate the eigenvalues and/or eigenvectors of a matrix.
permute 1486 Rearrange the dimensions of a matrix.
inv 1486 Calculate the inverse of a matrix.
mean 1505 Return the mean value of a matrix.
var 1505 Returns the variance.
std 1506 Returns the standard deviance.
mapfind 1506 Returns a string value associated to specified point, given a file containing a
map of values to a string.
svd 1510 Returns a 3-cell array for the decomposition.
chol 1510 Returns the lower triangular matrix.
norm 1509 Returns the matrix y to the L2-norm.
cov 1520 Calculates the covariance matrix.
corrcoef 1520 Calculates the correlation matrix.
corrtransf 1520 Calculates the transformation matrix.

See also
Manipulating variables 1452

String functions
Command Description
num2str 1490 Convert number to a string.
str2num 1490 Convert a string into a floating point number.
eval 1491 Execute string containing Lumerical scripting language.
feval 1491 Run a Lumerical script file.
length 1483 Returns the total length of the string.
substring 1491 Returns a substring of a string, as a specified position and length.
findstring 1491 Returns the position of a substring in a string.
replace 1492 Replaces a part of a string with another, at a specified position.
replacestring 1492 Replaces all instances of a substring with another string.
splitstring 1492 Split a single long string into a cell (string) array based on a delimiting
character.
upper 1493 Convert a string to upper case.

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1477

lower 1493 Convert a string to lower case.


toscript 1493 Returns a string containing the equivalent script of a generate variable.

Frequency and time-domain


Command Description
fft 1493 Fast Fourier transform.
fftw 1494 Returns the angular frequency vector.
fftk 1495 Returns the spatial wavevector kx.
invfft 1496 Inverse fft.
czt 1497 Chirped z-transform.
sroughness 1497 Returns a matrix containing a rough surface characterized by an RMS
amplitude.

Line and polygon functions


Command Description
polyarea 1497 Returns the area of a polygon.
centroid 1498 Returns the center of mass of a polygon.
polyintersect 1498 Determines if two polygons intersect.
inpoly 1498 Determines if a series of points are inside our outside a polygon.
polygrow 1499 Grows or shrinks a polygon by a specified amount.
polyand 1499 Combines two polygons into one with an and operation.
polyor 1499 Combines two polygons into one with an or operation.
polyxor 1500 Combines two polygons into one with a xor operation.
lineintersect 1500 Returns the intersection of line segments.
linecross 1501 Determines if line segments cross each other.

Colorimetry
Command Description
colormatchfunction 1511 Returns a set of color matching functions.
colormatch 1512 Calculates the X, Y, Z tristimulus values for a set of color matching functions.
colormatchxy 1513 Calculates the x, y chromaticity values for a set of color matching functions.
colormatchuv 1515 Calculates the u, v chromaticity values for a set of color matching functions.

Line and polygon functions

Miscellaneous
Command Description
ceil 1501 Round up.
floor 1501 Round down.
mod 1502 Modulus after division.
round 1502 Rounds to the nearest integer.

2003 - 2016 Lumerical Solutions, Inc


1478 Lumerical Knowledge Base

rand 1502 Returns a uniformly distributed random number between 0 and 1.


lognrnd 1503 Returns a lognormal distributed random number.
randn 1503 Returns a normally distributed random number.
randreset 1503 Resets the random number seed.
finite 1504 Determines if a number is finite or NaN.
solar 1504 Returns the solar power spectrum
stackrt 1504 Calculates reflection and transmission of multi-layer stacks
all 1505 Returns 1 if all of the specified matrix entries are nonzero and returns 0
otherwise.
any 1505 Returns 1 if any of the specified matrix entries are nonzero and returns 0
otherwise.
quadtri 1507 Returns approximated integration (first order quadrature) of data on a 2D finite
element mesh.
quadtet 1507 Returns approximated integration of data on a 3D finite element mesh.
precision 1506 Returns truncated value to a user specified precision.
erf 1516 Returns the error function.
erfc 1517 Returns the complementary error function.
unique 1518 Returns an array containing all unique values in a given matrix.
uniquevertices 1519 Given a matrix of vertices, returns a matrix of unique vertices with differences
in values larger than a specified tolerance.
icht 1521 Takes the Chebyshev interpolation coefficients and returns the corresponding
function samples
dcht 1521 Returns the Chebyshev interpolation coefficients
besselj 1522 Bessel function of the first kind
bessely 1522 Bessel function of the second kind
besseli 1522 Modified Bessel function of the first kind
besselk 1523 Modified Bessel function of the second kind

7.5.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.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
out = sin(x); Returns the complex sine of x.

See Also
Functions 1475 , asin 1479

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1479

7.5.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.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
out = cos(x); Returns the complex cosine of x.

See Also
Functions 1475 , acos 1479

7.5.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.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
out = tan(x); Returns the complex tangent of x.

See Also
Functions 1475 , atan 1480 , atan2 1480

7.5.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))

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
out = asin(x); Returns the complex arcsine of x.

See Also
Functions 1475 , sin 1478

7.5.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))

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
out = acos(x); Returns the complex arccosine of x.

See Also
Functions 1475 , cos 1479

2003 - 2016 Lumerical Solutions, Inc


1480 Lumerical Knowledge Base

7.5.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) )

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
out = atan(x); Returns the complex arctangent of x.

See Also
Functions 1475 , atan2 1480 , tan 1479

7.5.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.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
out = atan2(y,x); x,y must be real.

See Also
Functions 1475 , atan 1480 , tan 1479

7.5.8 real
Returns the real part of a number or matrix.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
out = real(x); Returns the real part of x.

See Also
Functions 1475 , imag 1480

7.5.9 imag
Returns the imaginary part of a number or matrix.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
out = imag(x); Returns the imaginary part of x.

See Also
Functions 1475 , real 1480 , conj 1481

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1481

7.5.10 conj
Returns the complex conjugate of a number or matrix.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
out = conj(x); Returns the complex conjugate of x.

See Also
Functions 1475 , real 1480 , imag 1480

7.5.11 abs
Returns the absolute value of a number or matrix.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
out = abs(x); Returns the absolute value of x.

See Also
Functions 1475 , real 1480 , imag 1480

7.5.12 angle
Returns the angle or phase of a complex number or matrix in radians.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
out = angle(x); Returns the phase of x.

See Also
Functions 1475 , real 1480 , imag 1480 , unwrap 1481

7.5.13 unwrap
Removes changes of more than 2p from a 1D array. It can be useful after angle(x) to see phase without
discontinuities.

The unwrap function is primarily intended for 1D arrays. Care must be taken when applying it to matrices with more
than one dimension.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
out = unwrap(x); Return the values of x without discontinuities.

See Also
Functions 1475 , real 1480 , imag 1480 , angle 1481

2003 - 2016 Lumerical Solutions, Inc


1482 Lumerical Knowledge Base

7.5.14 log
The natural logarithm. Input can be complex or negative.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
out = log(x); The natural logarithm. Input can be complex or negative.
See Also
Functions 1475 , log10 1482

7.5.15 log10
The log, base 10. Input can be complex or negative.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
out = log10(x); The log, base 10. Input can be complex or negative.
See Also
Functions 1475 , log 1482

7.5.16 sqrt
The square root.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
out = sqrt(x); The square root.

See Also
Functions 1475 ,^ 1469

7.5.17 exp
The exponential.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
out = exp(x); The exponential.

See Also
Functions 1475 , log 1482 ,^ 1469

7.5.18 size
Returns the size of a matrix.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1483

y = size(x); y is a matrix which shows the dimensions of x.

See Also
Functions 1475 , length 1483 , flip 1485 , transpose 1490

7.5.19 length
Returns the number of elements in a matrix. If the argument is a string, it will return the length of the string.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
y = length(x); y the number of elements in a matrix. For example, if x is an n by m
matrix, y = length( x ) = n * m.

See Also
Functions 1475 , size 1482 , transpose 1490 , flip 1485 , substring 1491 , findstring 1491 , replace 1492 , replacestring 1492

7.5.20 pinch
Removes all singleton dimensions from a matrix.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
out = pinch(x); Removes all singleton dimensions. For example, if x is a matrix of
dimension 1x1x1xM, then
y=pinch(x);
will return a Mx1 matrix where
y(i) = x(1,1,1,i);
pinch(x,i); Removes a specified dimension. If x is an NxMxKxP 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); Removes a specified dimension but keeps a specific index for the
dimension being removed. If x is an NxMxKxP matrix then
y=pinch(x,2,4);
will return an NxKxP matrix where
y(i,j,k) = x(i,4,j,k)

See Also
Functions 1475 , find 1489 , size 1482 , flip 1485

7.5.21 sum
Sum of elements in a matrix.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
out = sum(x); Sum of all the elements in a matrix, over all dimensions.
out = sum(x,2); Sum x over the specified dimension.

2003 - 2016 Lumerical Solutions, Inc


1484 Lumerical Knowledge Base

See Also
Functions 1475 , integrate 1488 , mean 1505

7.5.22 max
The maximum value in a matrix. For complex numbers, only the real part is considered.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
out = max(x); The maximum value in a matrix.

See Also
Functions 1475 , min 1484 , abs 1481 , mean 1505

7.5.23 min
The minimum value in a matrix. For complex numbers, only the real part is considered.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
out = min(x); The minimum value in a matrix.

See Also
Functions 1475 , max 1484 , abs 1481 , mean 1505

7.5.24 dot
Dot product.

Matrix A, B must have the same number of elements. The dot product will be calculated with the following formula.

C = A(i ) B (i )
i

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
C = dot(A, B); Returns the dot product of A and B

See Also
Functions 1475 , cross 1484 ,* 1468 , length 1483 , size 1482

7.5.25 cross
Vector cross product.

Matrix A, B must be the same size. The cross product will be computed on the first dimension that has a size of 3.
There must be at least one dimension with a size of 3.

Assume that A,B are 2D matrices, where the second dimension contains the vector components. The size of the
second dimension must be 3. Then the elements of C will be calculated with the standard cross product formulas.

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1485

r r r r r
C (i,1) = + A(i,2) B(i,3) - A(i,3) B(i,2)
r r r r r
C (i,2) = - A(i,1) B(i,3) + A(i,3) B(i,1)
r r r r r
C (i,3) = + A(i,1) B(i,2) - A(i,2) B(i,1)

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
C = cross(A, B); Returns the cross product of A and B

See Also
Functions 1475 , dot 1484 ,* 1468 , length 1483 , size 1482

7.5.26 eig
Find the eigen value and/or eigen vector of a matrix. The matrix has to be square.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
out = eig(A); Returns the eigenvalues of matrix A.
out = eig(A, 1);
out = eig(A, 2); Returns the eigenvectors of matrix A.
out = eig(A, 3); Returns both the eigenvalues and eigenvectors of matrix A.

See Also
Operators 1467 , = 1453 , == 1469 , != 1470 , <= 1470 , >= 1470 ,< 1471 ,> 1471 ,& 1471 , and 1471 ,| 1472 , or 1472 ,! 1472 ,~ 1473 , mult 1485 ,
permute 1486 , reshape 1486 , inv 1486

7.5.27 mult
Perform matrix multiplication of two or more matrices. The dimensions of the matrices have to match

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
out = mult(A,B,...) Returns the matrix multiplication of matrices, A x B x C ...

See Also
Operators 1467 , = 1453 , == 1469 , != 1470 , <= 1470 , >= 1470 ,< 1471 ,> 1471 ,& 1471 , and 1471 ,| 1472 , or 1472 ,! 1472 ,~ 1473 , eig 1485 ,
permute 1486 , reshape 1486 , inv 1486

7.5.28 flip
Flip a matrix along one dimension.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description

2003 - 2016 Lumerical Solutions, Inc


1486 Lumerical Knowledge Base

C = flip(A, dim); Flips the matrix A along the dimension dim.

See Also
Functions 1475 , size 1482 , length 1483 , pinch 1483 , transpose 1490 , reshape 1486 , permute 1486

7.5.29 permute
This function is a more general version of the transpose function. It allows matrix dimensions to be rearranged as
needed.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
out = permute(A, [i,j,k, ...]) Returns a matrix with the same elements as A but with rearranged
dimensions i,j,k, etc.

See Also
Operators 1467 , = 1453 , == 1469 , != 1470 , <= 1470 , >= 1470 , < 1471 , > 1471 , & 1471 , and 1471 ,| 1472 , or 1472 ,! 1472 ,~ 1473 , eig 1485 ,
reshape 1486 , mult 1485 , inv 1486 , flip 1485 , transpose 1490 , size 1482

7.5.30 reshape
Reshapes the matrix A to have the size i,j,k.The product of the specified dimensions, i*j*k*..., must be the same as
that of the original matrix A.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
out = reshape(A, [i,j,k, ...]) Returns an array with the same elements as A but reshaped to have
the size i by j by k by ...

See Also
Operators 1467 , = 1453 , == 1469 , != 1470 , <= 1470 , >= 1470 , < 1471 , > 1471 , & 1471 , and 1471 ,| 1472 , or 1472 ,! 1472 ,~ 1473 , eig 1485 ,
permute 1486 , mult 1485 , inv 1486 , flip 1485 , transpose 1490 , size 1482

7.5.31 inv
Calculate the inverse of a matrix. The matrix has to be invertible.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
out = Inv(A) Returns the inverse of matrix A

See Also
Operators 1467 ,= 1453 , == 1469 , != 1470 , <= 1470 , >= 1470 ,< 1471 ,> 1471 ,& 1471 , and 1471 ,| 1472 , or 1472 ,! 1472 ,~ 1473 , eig 1485 , mult
1485

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1487

7.5.32 interp
Linear interpolation of a data set. The data can be complex.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
out = interp(Ex, xold, xnew); Does a linear interpolation of a 1D function.
Ex is existing data
xold specifies the points where Ex is sampled
xnew specifies new point to interpolate the data.
The xnew does not have to be within the bounds of xold.
interp(Ex, xold, yold, xnew, The 2D version of interp.
ynew);
interp(Ex, xold, yold, zold, xnew, The 3D version of interp.
ynew, znew);
interp(Ex, xold, yold, zold, told, The 4D version of interp.
xnew, ynew, znew, tnew);

See Also
Functions 1475 , spline 1487 , plotxy 1525

7.5.33 interptri
The script command interpolates a data set from triangular to linear grid. The data can be complex.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
out = interptri(tri, vtx,u, xi, Does a triangular to linear interpolation of a function and outputs a PxQ
yi,extrap_val); array of interpolated values, z(xi,yi).
u is existing data of the finite element mesh (Nx1).
xi (length P) / yi (length Q) specifies the points where u is to be
sampled on the rectilinear mesh, in the x-direction and the y-
direction
tri is the elements of the triangular mesh taken from the simulation
region, the connectivity array, Mx3, containing row entries that index
the three vertices of M triangles
vtx are the vertices of the triangular mesh, Nx2, containing row
entries of (x,y) pairs, taken from the simulation region
extrap_val(optional): if an interpolation point is outside of the finite
element mesh, the point will be assigned this value (default is Inf)

See Also
quadtri, interptet 1508 , quadtet 1507

7.5.34 spline
Does a cubic spline interpolation of a data set.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description

2003 - 2016 Lumerical Solutions, Inc


1488 Lumerical Knowledge Base

out = spline(Ex,xold,xnew); Cubic spline interpolation of a 1D function.


Ex is existing data
xold specifies the points where Ex is sampled
xnew specifies new point to interpolate the data.
The xnew does not have to be within the bounds of xold.

See Also
Functions 1475 , interp 1487

7.5.35 polyfit
Polynomial fit based on linear regression. The data can be complex.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
p = polyfit(x, y, N); Returns the coefficients for a polynomial p(x) of degree N that is the
best fit for the data in y.
p ( x) = p1 + p2 x1 + p3 x 2 + ... + p N x N -1 + p N +1 x N
The length of the coefficients is N+1.

7.5.36 integrate
Returns the integral over the specified dimension of a matrix.

Integrals over singleton dimensions will return zero (i.e. the area under a single point is zero). See integrate2 for an
alternate behavior.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
out = integrate(A, n, x1); Integrates A over the nth dimension in the matrix.
x1 is the corresponding position vector for that dimension.
out = integrate(A, d, x1, x2, ...); Calculates the integral of A over the specified list of dimension(s) d.
d is a vector containing the dimensions over which to integrate.
xi are the position vectors corresponding to the dimensions of A over
which the integration is occurring.
For example
power = integrate(A,1:2,x,y) will integrate A over an x-y surface.

See Also
Functions 1475 , integrate2 1488 , max 1484 , min 1484 , interp 1487 , find 1489 , pinch 1483 , round 1502 , getdata 1646 , sum 1483 , length
1483

7.5.37 integrate2
Very similar to the standard integrate function, except that singleton dimensions are ignored.

As described in the integrate function description, integrating over dimensions with a single value (singleton
dimensions) returns zero because the area under a single point is zero. In some cases, particularly when you are
not sure which dimensions are singleton, this behavior can cause difficulties. The integrate2 function automatically
ignores all dimensions with a size of one, which avoids the problem of a zero valued integrals due to singleton
dimensions.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1489

Syntax Description
out = integrate2(A, 1, x1); Integrates A over the first dimension in the matrix.
x1 is the corresponding position vector.
out = integrate2(A, d, x1, x2, ...); Calculates the integral of A over the specified dimension(s) d.
d is a vector containing the dimensions over which to integrate.
xi is the position vector corresponding to the dimensions of A over
which the integration is occurring. If any of the xi vectors only have 1
element, integrate returns 0.
For example
power = integrate2(A,1:2,x,y) will integrate A over an x-y surface.

See Also
Functions 1475 , integrate 1488 , max 1484 , min 1484 , interp 1487 , find 1489 , pinch 1483 , round 1502 , getdata 1646 , sum 1483 , length 1483

7.5.38 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.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
out = find(x,5e-6); Will return the index of x that corresponds to the closest
value to 5e-6.
out = find(x>5); Will return indices of all values of x that are greater than
5.
out = find((x<7) & (x>=2)); Will return indices of all values of x that are greater than
or equal to 2, AND x less than 7.

See Also
Functions 1475 , pinch 1483 , findpeaks 1489 , integrate 1488 , length 1483 , size 1482 , mod 1502 , meshgrid3dx 1456 , meshgrid3dy 1456

, meshgrid3dz 1457

7.5.39 findpeaks
Returns the position of peaks in a matrix. A peak is defined as a data point that is larger than its nearest neighbors.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
out = findpeaks(y); Returns the position of the peak with the largest value in y. The length
of y must be at least 2. If no peak is found in the data, a value of 1 is
returned.
findpeaks(y,n); Returns a matrix containing the positions of the largest n peaks found
in the data. The returned values are ordered from largest to smallest.
The returned matrix is always of dimension nX1. If less than n peaks
are found, the remaining values of the returned matrix are 1.

See Also

2003 - 2016 Lumerical Solutions, Inc


1490 Lumerical Knowledge Base

Functions 1475 , find 1489

7.5.40 transpose
Transpose a 1D or 2D matrix.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
y = transpose(x); If x is an N x M matrix, then y will be M x N, where the entries are y(j,i)
=x(i,j).

See Also
Functions 1475 , ctranspose 1490 , reshape 1486 , flip 1485 , permute 1486 , size 1482

7.5.41 ctranspose
Transpose a 1D or 2D matrix and take the complex conjugate of each element.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
y = ctranspose(x); If x is an N x M matrix, then y will be M x N, where the entries are y(j,i)
=x(i,j)* .

See Also
Functions 1475 , transpose 1490

7.5.42 num2str
Convert an integer, floating point number, or matrix into a string. Use the format script command to change the
precision of the output.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
out = num2str(x); Converts the number x into a string. x can also be a 1D or 2D matrix.
The tab character (rather than space) will be used as delimiter between
columns.

See Also
Operators 1467 , " 1473 , + 1469 , ? 1474 , endl 1474 , write 1440 , format 1438 ,str2num 1490 , findstring 1491 , replace 1492 , replacestring
1492 , substring 1491 , eval 1491 , lower 1493 , upper 1493 , toscript 1493

7.5.43 str2num
Convert a string into a floating point number. Use the format script command to change the precision of the output.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
out = str2num(string); Converts string into a number.

See Also

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1491

Operators 1467 , " 1473 , + 1469 , ? 1474 , endl 1474 , write 1440 , format 1438 , findstring 1491 , replace 1492 , replacestring 1492 , substring
1491 , lower 1493 , upper 1493 , toscript 1493

7.5.44 eval
Execute string containing Lumerical scripting language.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
eval(string); Execute string containing Lumerical scripting language at the
Lumerical script prompt.
This function does not return any data.

See Also
Operators 1467 , feval 1491 , str2num 1490 , num2str 1490 , lower 1493 , upper 1493 , toscript 1493

7.5.45 feval
Evaluates a string as script file. This function is useful for running script files that are not in your path and files with
spaces in the name.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
feval(filename); Execute string containing the name of a script file at the Lumerical
script prompt.
This function does not return any data.

See Also
Operators 1467 , eval 1491 , str2num 1490 , num2str 1490 , lower 1493 , upper 1493 , toscript 1493

7.5.46 substring
Can be used to extract a substring from a string.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
s1 = substring(s,pos); Returns a substring of s, starting at position pos to the end of s. The
position pos can be 1 to length(s).
s1 = substring(s,pos,len); Returns a substring of s, starting at position pos, with len characters. If
len is -1 (or any value less than 0) it returns the substring at position
pos to the end of s. The default value of len is -1.

See Also
Functions 1475 , length 1483 , findstring 1491 , replace 1492 , replacestring 1492 , str2num 1490 , num2str 1490 , splitstring 1492 , lower
1493 , upper 1493 , toscript 1493

7.5.47 findstring
Returns the position of a given substring in a string.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

2003 - 2016 Lumerical Solutions, Inc


1492 Lumerical Knowledge Base

Syntax Description
pos = findstring(s,s1); Returns the position of the first instance substring s1 in s. If s1 is not
found in s, it returns -1.
pos = findstring(s,s1,p0); Returns the position of the first instance substring s1 in s, starting at
position p0. If s1 is not found in s, starting from p0, it returns -1.

See Also
Functions 1475 , length 1483 , substring 1491 , replace 1492 , replacestring 1492 , str2num 1490 , num2str 1490 , splitstring 1492 , lower
1493 , upper 1493 , toscript 1493

7.5.48 replace
Replaces a substring of a string with a new string.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
snew = replace(s,pos,len,s1); Replaces len characters of s, starting at position pos, with the string in
s1. If len is 0, it will insert the string s1 between pos-1 and pos. If len is
-1 (or any values less than 0) it will replace all remaining characters in
s with s1, starting at pos. The position pos can be 1 to length(s).

See Also
Functions 1475 , length 1483 , substring 1491 , findstring 1491 , replacestring 1492 , str2num 1490 , num2str 1490 , splitstring 1492 ,
lower 1493 , upper 1493 , toscript 1493

7.5.49 replacestring
Replaces a substring of a string with a new string.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
snew = replacestring(s,s1,s2); Replaces all instances of s1 in s with s2.

See Also
Functions 1475 , length 1483 , substring 1491 , findstring 1491 , replace 1492 , str2num 1490 , num2str 1490 , splitstring 1492 , lower 1493 ,
upper 1493 , toscript 1493

7.5.50 splitstring
Split a long string into a series of substrings, where the substrings are stored in a cell (ie. string) array.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
S2 = splitstring(S1,endl); Split the string S1 into a series of strings, using the end of line
character as the delimiter between strings. S2 is a cell array.

See Also
Functions 1475 , length 1483 , substring 1491 , findstring 1491 , replace 1492 , str2num 1490 , num2str 1490 , cell 1465 , dir 1431 , getresult
1647 , lower 1493 , upper 1493 , toscript 1493

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1493

7.5.51 upper
Convert a string to upper case.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
upper(string); Convert a string to upper case.

See Also
Functions 1475 , length 1483 , substring 1491 , findstring 1491 , replace 1492 , str2num 1490 , num2str 1490 , splitstring 1492 , lower 1493 ,
toscript 1493

7.5.52 lower
Convert a string to lower case.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
lower(string); Convert a string to lower case.

See Also
Functions 1475 , length 1483 , substring 1491 , findstring 1491 , replace 1492 , str2num 1490 , num2str 1490 , splitstring 1492 , upper 1493 ,
toscript 1493

7.5.53 toscript
Returns a string containing the equivalent script of a generate variable.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
out=toscript(variable, Returns a string containing the equivalent script of to generate
expand=true); variable. If expand is true, matrix values will also be converted to
script, regardless of their size this can lead to large strings. To
prevent the matrix values conversion set expand to false. This script
function is particularly useful on debugging cells and structure
variables.

See Also
Functions 1475 , length 1483 , substring 1491 , findstring 1491 , replace 1492 , str2num 1490 , num2str 1490 , splitstring 1492 , lower 1493 ,
upper 1493

7.5.54 fft
Compute the 1D, 2D or 3D Fast Fourier Transform (fft) of a matrix. In the 1D case the transform is given by

N 2 pi
( )( n -1)( m -1)
E w [m] = fft( E x ) = E x [n] e N

n =1

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 between formats. This implies that if you use option 1=n to produce a spectrum with fft, then

2003 - 2016 Lumerical Solutions, Inc


1494 Lumerical Knowledge Base

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.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
out = fft(Ex); Returns the fast Fourier transform of Ex. Ex can be 1D, 2D or 3D.
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.

Note: FFT Conventions


There are different, but equivalent conventions for defining Fourier transforms. Lumerical defines the forward FFT
using a positive sign in the exponential term, and the inverse FFT using a negative sign in the exponential term.
However, some other packages (e.g. MATLAB) use the opposite convention, with a negative sign in the
exponential for the forward FFT and a positive sign in the exponential for the inverse 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 MATLAB
fft(y,1,0) ifft(y)*N
invfft(y,1,0) fft(y)/N

See Also
Functions 1475 , invfft 1496 , fftw 1494 , fftk 1495 , czt 1497

7.5.55 fftw
Returns the angular frequency vector corresponding to time vector t.
2p
w = fftw(t ) = [0,L, ( M - 1)]
dt M ,
where M=length(t).

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1495

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.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
out = fftw(t); Returns the angular frequency vector corresponding to time vector 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(t). If N <= length(t), it will
zero pad up to the next power of 2 longer than the length of t. For the
fastest results, N should be a power of 2 and can be entered, for
example, as 2^12.

See Also
Functions 1475 , fft 1493 , fftk 1495 , invfft 1496

7.5.56 fftk
Returns the spatial wavevector kx associated with a fourier transform of a function of x.
2p
k = fftk( x) = [0,L, ( M - 1)]
dx M ,
where M=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.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
out = fftk(x); Returns the spatial wavevector kx associated with a fourier transform of
a function of 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

2003 - 2016 Lumerical Solutions, Inc


1496 Lumerical Knowledge Base

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(x). If N <= length(x), it will
zero pad up to the next power of 2 longer than the length of x. For
the fastest results, N should be a power of 2 and can be entered, for
example, as 2^12.

See Also
Functions 1475 , fft 1493 , fftw 1494 , invfft 1496

7.5.57 invfft
Compute the 1D,2D or 3D inverse Fast Fourier Transform (fft) of a matrix. In the 1D case the transform is given by
N 2 pi
1 -( )( n -1)( m -1)
E x [m] = invfft( E w ) =
N
E
n =1
w [ n] e N

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.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
out = invfft(x); Returns the inverse fast Fourier transform of x. x can 1D,2D or 3D.
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 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 1475 , fft 1493 , fftw 1494 , fftk 1495

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1497

7.5.58 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.
E k [m] = czt ( E x , x, k ) = E x [n] e ix[ n ]k [ m ]
n
ix[ n1] k [ m1]+ ix[ n 2 ] k [ m 2 ]
E k [m1, m2] = czt ( E x , x1, x 2, k1, k 2) = E [n1, n2] e
n1, n 2
x

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
out = czt(Ex,t,w) Returns the chirped z-transform of Ex, function of t, at each desired
angular frequency w. Note that w must be a linearly spaced set of
angular frequencies but can cover any range.
czt(Ex,x,y,kx,ky); The two dimensional chirped z-transform. kx and ky must be linearly
spaced sets of wavenumbers but can cover any range.

See Also
Functions 1475 , fft 1493

7.5.59 sroughness
Returns a matrix containing a rough surface characterized by an RMS amplitude.

Supported Product: INTERCONNECT

Syntax Description
out= sroughness(x_span, y_span, Returns a matrix containing a rough surface characterized by an RMS
sigma_rms, corr_x = 0, corr_y = amplitude sigma_rms and correlation lengths corr_x and corr_y.
0, seed = 0); The roughness is generated by creating a random matrix of values in K
space defined by x_span and y_span. A Gaussian filter is applied to
this matrix, then a Fourier transform is used to transform the matrix
back to real space. Due to the way the Fourier transform is setup, the
roughness will be periodic with period x, y span. This is convenient for
some application, particularly when using periodic boundary
conditions. Parameter seed defined the random seed value used to
generate the surface.

See Also
Functions 1475 , length 1483 , substring 1491 , findstring 1491 , replace 1492 , str2num 1490 , num2str 1490 , splitstring 1492 , lower 1493 ,
upper 1493

7.5.60 polyarea
Returns the area of a polygon. The area is positive if the vertices are defined in a counter-clockwise direction, and
negative if the vertices are defined in a clockwise direction.

The polygon vertices are contained in a single matrix of dimension Nx2 (or 2xN) where N >= 3. The second
dimension represents the x,y positions. For example, a valid polygon is V = [ 0,0; 1,0; 1,1; 0,1];

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description

2003 - 2016 Lumerical Solutions, Inc


1498 Lumerical Knowledge Base

out = polyarea(V); Returns the area of V. The sign of the area indicates if V is defined in a
counter-clockwise (positive) or clockwise (negative) direction.

See Also
Functions 1475 , centroid 1498 , polyintersect 1498 , inpoly 1498 , polygrow 1499 , polyand 1499 , polyor 1499 , polydiff 1500 , polyxor 1500

7.5.61 centroid
Returns the center of mass of a polygon.

The polygon vertices are contained in a single matrix of dimension Nx2 (or 2xN) where N >= 3. The second
dimension represents the x,y positions. For example, a valid polygon is V = [ 0,0; 1,0; 1,1; 0,1];

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
out = centroid(V); Returns the center of mass of V, assuming uniform density. The output
is a 2x1 matrix representing the x and y positions.

See Also
Functions 1475 , polyarea 1497 , polyintersect 1498 , inpoly 1498 , polygrow 1499 , polyand 1499 , polyor 1499 , polydiff 1500 , polyxor 1500

7.5.62 polyintersect
Determines if two polygons intersect.

The polygon vertices are contained in a single matrix of dimension Nx2 (or 2xN) where N >= 3. The second
dimension represents the x,y positions. For example, a valid polygon is V = [ 0,0; 1,0; 1,1; 0,1];

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
out = polyintersect(V1,V2); Returns
0 if the polygons do not overlap
0.5 if the polygons touch
1 if they overlap
2 if one polygon completely encloses the other

See Also
Functions 1475 , polyarea 1497 , centroid 1498 , inpoly 1498 , polygrow 1499 , polyand 1499 , polyor 1499 , polydiff 1500 , polyxor 1500

7.5.63 inpoly
Determines if a point is inside our outside a polygon. The function is vectorized so it can be used to create a mesh
of a polygon.

The polygon vertices are contained in a single matrix of dimension Nx2 (or 2xN) where N >= 3. The second
dimension represents the x,y positions. For example, a valid polygon is V = [ 0,0; 1,0; 1,1; 0,1];

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
out = inpoly(V,x,y); Returns a matrix of the same dimension of x with 1 if the
corresponding point is inside the polygon and 0 otherwise. The

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1499

matrices x and y must have the same length, or one of them can be a
singleton.

See Also
Functions 1475 , polyarea 1497 , centroid 1498 , polyintersect 1498 , polygrow 1499 , polyand 1499 , polyor 1499 , polydiff 1500 , polyxor
1500

7.5.64 polygrow
Returns a polygon that has grown or shrunk by the specified amount. The polygon is grown in a direction normal to
every line segment.

The polygon vertices are contained in a single matrix of dimension Nx2 (or 2xN) where N >= 3. The second
dimension represents the x,y positions. For example, a valid polygon is V = [ 0,0; 1,0; 1,1; 0,1];

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
out = plygrow(V,dx); Returns a new polygon that has grown by dx. To shrink a polygon, use
dx < 0.

See Also
Functions 1475 , polyarea 1497 , centroid 1498 , polyintersect 1498 , inpoly 1498 , polyand 1499 , polyor 1499 , polydiff 1500 , polyxor 1500

7.5.65 polyand
Combines two polygons into one using a boolean and operation.

The polygon vertices are contained in a single matrix of dimension Nx2 (or 2xN) where N >= 3. The second
dimension represents the x,y positions. For example, a valid polygon is V = [ 0,0; 1,0; 1,1; 0,1];

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
V3 = polyand(V1,V2); Returns a new polygon, V3, that is the and of V1 and V2.
Note: Other 2D or 3D objects
This command only works for 2D polygons. For other 2D or 3D objects, user may use the mesh order 271 to
combine multiple overlapped objects

See Also
Functions 1475 , polyor 1499 , polydiff 1500 , polyxor 1500 , polyarea 1497 , centroid 1498 , polyintersect 1498 , inpoly 1498 , polygrow 1499

, mesh order 271

7.5.66 polyor
Combines two polygons into one using a boolean or operation.

The polygon vertices are contained in a single matrix of dimension Nx2 (or 2xN) where N >= 3. The second
dimension represents the x,y positions. For example, a valid polygon is V = [ 0,0; 1,0; 1,1; 0,1];

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
V3 = polyor(V1,V2); Returns a new polygon, V3, that is the or of V1 and V2.

2003 - 2016 Lumerical Solutions, Inc


1500 Lumerical Knowledge Base

See Also
Functions 1475 , polyand 1499 , polydiff 1500 , polyxor 1500 , polyarea 1497 , centroid 1498 , polyintersect 1498 , inpoly 1498 , polygrow
1499

7.5.67 polydiff
Combines two polygons into one by taking the difference.

The polygon vertices are contained in a single matrix of dimension Nx2 (or 2xN) where N >= 3. The second
dimension represents the x,y positions. For example, a valid polygon is V = [ 0,0; 1,0; 1,1; 0,1];

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
V3 = polydiff(V1,V2); Returns a new polygon, V3, that is V1-V2.

See Also
Functions 1475 , polyand 1499 , polyor 1499 , polyxor 1500 , polyarea 1497 , centroid 1498 , polyintersect 1498 , inpoly 1498 , polygrow
1499

7.5.68 polyxor
Combines two polygons into one using a boolean xor operation.

The polygon vertices are contained in a single matrix of dimension Nx2 (or 2xN) where N >= 3. The second
dimension represents the x,y positions. For example, a valid polygon is V = [ 0,0; 1,0; 1,1; 0,1];

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
V3 = polyxor(V1,V2); Returns a new polygon, V3, that is the xor of V1 and V2.

See Also
Functions 1475 , polyand 1499 , polyor 1499 , polydiff 1500 , polyarea 1497 , centroid 1498 , polyintersect 1498 , inpoly 1498 , polygrow
1499

7.5.69 lineintersect
Returns the intersection points of lines in the x-y plane. Note that the intersection point does not have to lie on the
line segments themselves that define the lines. To see if the line segments actually cross the command linecross
should be used.

Line segments are contained in a single matrix of dimension 2*Nx2, where there are N line segments. For example,
the matrix L = [ 0,0; 1,1; 0,0, 0,1]; represents 2 lines segments, one from (0,0) to (1,1) and another from (0,0) to
(0,1).

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
out = lineintersect(L1,L2); Returns the intersection of the lines represented by the segments in L1
and L2. L1 and L2 must have the same size (2*N,2 for N line
segments). The result is a sequence of x,y points in the form Nx2
representing the intersections of the N lines. There are special cases
when
The lines are parallel. In this case, the position returned is

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1501

(1.#INF,b). The value of 1.#INF can be tested for using the script
commands finite. The value of b is 0 if the lines are not coincident
and 1 if they are coincident.
The points in a segment are degenerate, ie the same. In this case,
the position returned is (1.#INF,b), where b is 0, 1, 2 if the both line
segments are degenerate, the first is degenerate, or the second is
degenerate respectively.

See Also
Functions 1475 , linecross 1501 , finite 1504

7.5.70 linecross
Determines if line segments cross each other.

Line segments are contained in a single matrix of dimension 2*Nx2, where there are N line segments. For example,
the matrix L = [ 0,0; 1,1; 0,0, 0,1]; represents 2 lines segments, one from (0,0) to (1,1) and another from (0,0) to
(0,1).

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
out = linecross(L1,L2); Returns a matrix of dimension N which determines if the N line
segments in L1 and the N line segments in L2 cross. L1 and L2 must
have the same size (2*Nx2 for N line segments). The result is a matrix
of length N that is 0 if the segments do not cross, 1 if they cross and
0.5 if the endpoint of one line touches another. Line segments that are
coincident and touch also return a value of 0.5

See Also
Functions 1475 , lineintersect 1500 , finite 1504

7.5.71 ceil
The ceil command rounds the input to the nearest integer greater than or equal to itself.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
out = ceil(X); Returns the nearest integer greater than or equal to X.

See Also
Functions 1475 , floor 1501 , mod 1502

7.5.72 floor
The floor command rounds the input to the nearest integer less than or equal to itself.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
out = floor(X); Returns the nearest integer less than or equal to X.

See Also

2003 - 2016 Lumerical Solutions, Inc


1502 Lumerical Knowledge Base

Functions 1475 , ceil 1501 , mod 1502

7.5.73 mod
Modulus after division.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
out = mod(X,Y); Returns X - n.*Y where n = floor(X./Y) if Y is not equal to 0. The input X
must be a real array or a real scalar. Y must be a real scalar.
The following are true by convention:
mod(X,0) = X
mod(X,X) = 0

See Also
Functions 1475 , floor 1501 , ceil 1501

7.5.74 sign
Get the sign of a number.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
out = sign(data); Real values
sign = 0 for data=0
sign = 1 for data>0
sign =-1 for data<0

Complex values
sign = 0 for data=0+0i
sign = data/abs(data) for data!=0

See Also
Functions 1475 , floor 1501 , ceil 1501

7.5.75 round
Rounds a number to the nearest integer.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
out = round(x); Rounds x to the nearest integer.

See Also
Functions 1475

7.5.76 rand
Generate a uniform random number between 0 and 1.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1503

Syntax Description
out = rand; Generates a uniform random number between 0 and 1.
out = rand(min,max); Generates a random number between min and max. By default, min
and max are 0 and 1 respectively.
out = rand(min,max,option); option = 1: output is a double precision number between min and max
(default)
option = 2: output is an integer between min and max.

See Also
Functions 1475 , randreset 1503 , randmatrix 1455 , randn 1503

7.5.77 lognrnd
Generate a lognormal distributed random number.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
out = lognrnd (mean,stddev); Generates a lognormal distributed random number with user defined
mean value and standard deviation.

See Also
Functions 1475 , randreset 1503 , randn 1503

7.5.78 randn
Generate a normally distributed random number.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
out = randn; Generates a normally distributed random number with mean 0 and
standard deviation 1.
out = randn(mean,stddev); Generates a normally distributed random number with user defined
mean value and standard deviation.

See Also
Functions 1475 , randreset 1503 , lognrnd 1503 , randnmatrix 1455

7.5.79 randreset
Resets the random number generator seed.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
out = randreset; Resets the random number seed based on the clock time.
This function returns the random number seed that was used.
out = randreset(seed); Set the seed to a specific value

See Also
Functions 1475 , rand 1502 , randmatrix 1455

2003 - 2016 Lumerical Solutions, Inc


1504 Lumerical Knowledge Base

7.5.80 finite
The finite command returns 1 (true) if a value is finite. Numbers such as NaN or #1.INF return 0 (false).

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
out = finite(x); Returns a matrix of the same size as x. The values are 1 for values of x
that are finite and 0 for values that are NaN. For example, finite(1/0)
returns 0.

See Also
Functions 1475

7.5.81 solar
Returns the solar power spectrum, in Watts/meter^2/meter.

The values are based on the global tilt values from the following link:
http://rredc.nrel.gov/solar/spectra/am1.5/ASTMG173/ASTMG173.html
Supported Product: FDTD, DEVICE

Syntax Description
out = solar(1); Returns the power of the solar spectrum as a function of wavelength, in
W/m^2/m
out = solar(0); Returns the corresponding wavelength vector, in m

See Also
plot 1525 , integrate 1488

7.5.82 stackrt
Analytically calculates the reflection and transmission of a plane wave through a multi-layer stack using the analytic
transfer matrix method. This function returns the fraction of transmitted and reflected power (Ts, Tp, Rs, Rp), and
the complex reflection and transmission coefficients (ts, tp, rs, rp), for both S and P polarizations. All results are
returned in a single dataset as a function of frequency and incidence angle (optional).

Note: Thickness of first and last layer


It is necessary to specify the thickness of each layer, including the first and last layers. Often, a thickness of zero
can be used for these layers, meaning the results will be calculated just beyond the first and last interface. If a
larger value is used, the results will be calculated further from the interface. For non-lossy materials, this will not
effect the reflected and transmitted power, but it will change phase of the complex coefficients.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
RT = stackrt(n,d,f); Arguments for a stack with Nlayers:
n: Refractive index of each layer. Size is either Nlayers, or Nlayers x
length(f) if dispersive materials are involved.
d: Thickness of each layer. Size is Nlayers.
f: Frequency vector.
RT = stackrt(n,d,f,theta); theta: Angle vector, in degrees. Optional.

See Also

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1505

Functions 1475 , StackRT solver toolbox 156 , getfdtdindex 1673

7.5.83 mean
The mean value in a matrix is returned.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
out = mean(a); The mean value of the matrix a is returned.
See Also
max 1484 , min 1484 , abs 1481 , sum 1483

7.5.84 all
The script command returns 1 if all of the specified matrix entries are nonzero and returns 0 otherwise.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
out = all(A); Will return 1 if all of the A matrix entries are nonzero and will return 0
otherwise.

See Also
any 1505 , almostequal 1470

7.5.85 any
The script command returns 1 if any of the specified matrix entries are nonzero and returns 0 otherwise.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
out = any(A); Will return 1 if any of the A matrix entries are nonzero and will return 0
otherwise.

See Also
all 1505 , almostequal 1470

7.5.86 var
The script command returns the variance of all entries of the matrix specified, where variance is defined as,

N
1 2
var =
N
( xi - m )
i =1

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
out = var(A); Will return variance of all of matrix A, over all dimensions.

2003 - 2016 Lumerical Solutions, Inc


1506 Lumerical Knowledge Base

See Also
std 1506 , mean 1505

7.5.87 std
The script command returns the standard deviation of the all entries of the matrix specified, where standard deviation
is defined as,

N
1 2
s=
N
( xi - m )
i =1

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
out = std(A); Will return standard deviation of matrix A, over all dimensions.

See Also
var 1505 , mean 1505

7.5.88 precision
The script command truncates a value to a user specified precision.

Supported Product: INTERCONNECT

Syntax Description
out = precision (y,p); Truncates y to a user defined precision p. Where p is the number of
decimal places.

See Also
Functions 1475

7.5.89 mapfind
The script command returns the nearest value from a file containing a map of values to a string. It returns the string
value located at the specified nearest point.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
out = mapfind (filename,x,y); Find the nearest value from a file containing a map of values to a string.
It l returns the string value located at the nearest point (x,y).
out = mapfind (filename,x,y,z); Find the nearest value from a file containing a map of values to a string.
It returns the string value located at the nearest point (x,y,z).
out = mapfind (filename,x,y,z,w); Find the nearest value from a file containing a map of values to a string.
It returns the string value located at the nearest point (x,y,z,w).

See Also
readdata 1439 , readdata 1439

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1507

7.5.90 quadtri
The script command approximates integration (first order quadrature) of data on a 2D finite element mesh.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
out = quadtri(tri,vtx,u); outputs a scalar, the integral of u on the finite element mesh, where
tri: the connectivity array, Mx3, containing row entries that index the
three vertices of M triangles
vtx: the vertex array, Nx2, containing row entries of (x,y) pairs
u: the data on the finite element mesh (Nx1)

See Also
Functions 1475 , interptri 1487 , quadtet 1507 , interptet 1508

7.5.91 quadtet
The script command approximates integration of data on a 3D finite element mesh.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
out = quadtet(tet,vtx,u); outputs a scalar, the integral of u on the finite element mesh, where
tet: the connectivity array, Mx4, containing row entries that index the
four vertices of M tetrahedral
vtx: the vertex array, Nx3, containing row entries of (x,y,z) pairs
u: the data on the finite element mesh (Nx1)

See Also
Functions 1475 , interptri 1487 , quadtri 1507

7.5.92 expand
The script command returns the expansion coefficients between two arbitrary DFT monitors. Typically, the reference
monitor contains the modal fields for the expansion. In this case, the mode recorded by "monitor1" is expanded by
the modal fields recorded by "monitor_ref".
r r r r r r
dS E1 H 2* dS E2* H1
a = 0.25 * +
N conj ( N )

r r r* r r* r
dS E1 H 2 dS E2 H1
b = 0.25 * -
N conj ( N )

r r r*
N = 0.5 * dS E2 H 2
r r r
P = 0.5 * dS E1 H1*

For more detail on how to use this command, definitions on the parameters and how to interpret the results, please
see Using Mode Expansion Monitors 651 .

Note: N is the power of the waveguide mode. conj(N) is equal to N if this is a real number. For the unconjugated

2003 - 2016 Lumerical Solutions, Inc


1508 Lumerical Knowledge Base

coefficients, see expand2 1508 .

Supported Product: FDTD, MODE

Syntax Description
expand('monitor1','monitor_ref',x,y, outputs the expansion coefficients between the fields of two monitors
z); 'monitor1': the monitor name, of which expansion is performed,
contains E1 and H1
'monitor_ref': the reference monitor, contains E2 and H2
x/y/z: the displacement from the monitor a from the reference
monitor a_ref

See Also
Adding Objects 1532 , Using Mode Expansion Monitors 651 , setexpansion 1587 , removeexpansion 1587 , expand2 1508

7.5.93 expand2
The same as expand 1507 , but the expansion coefficients are returned in the unconjugated form:

r r r r r r
dS E1 H 2 d S E H
a = 0.25 * +
2 1

N N

r r r r r r
dS E1 H 2 dS E2 H1
b = 0.25 * -
N N

r r r
N = 0.5 * dS E2 H 2
r r r
P = 0.5 * dS E1 H1

For more detail on how to use this command, definitions on the parameters and how to interpret the results, please
see Using Mode Expansion Monitors 651 .

Supported Product: FDTD, MODE

Syntax Description
expand2('monitor1','monitor_ref',x, outputs the expansion coefficients between the fields of two monitors
y,z); 'monitor1': the monitor name, of which expansion is performed,
contains E1 and H1
'monitor_ref': the reference monitor, contains E2 and H2
x/y/z: the displacement from the monitor a from the reference
monitor a_ref

See Also
Adding Objects 1532 , Using Mode Expansion Monitors 651 , setexpansion 1587 , removeexpansion 1587 , expand 1507

7.5.94 interptet
The script command interpolates a data set in 3D from tetrahedral to rectangular grid. The data can be complex.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1509

Syntax Description
out = interptet(tet, vtx,u, xi, Does a tetrahedral to rectilinear interpolation of a function and outputs
yi,zi,extrap_val); a PxQxR array of interpolated values, f(xi,yi,zi).
u is existing data of the finite element mesh (Nx1).
xi (length P) / yi (length Q)/zi (length R) specifies the points where u
is to be sampled on the rectilinear mesh, in the x-direction y-
direction and the z-direction
tet is the elements of the tetrahedral mesh taken from the simulation
region, the connectivity array, Mx4, containing row entries that index
the 4 vertices of M triangles
vtx are the vertices of the tetrahedral mesh, Nx3, containing row
entries of (x,y,z) pairs, taken from the simulation region
extrap_val(optional): if an interpolation point is outside of the finite
element mesh, the point will be assigned this value (default is Inf)

See Also
quadtet 1507 , quadtri, interptri 1487

7.5.95 quadtet
The script command approximates integration of data on a 3D finite element mesh.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
out = quadtet(tet,vtx,u); outputs a scalar, the integral of u on the finite element mesh, where
tet: the connectivity array, Mx4, containing row entries that index the
four vertices of M tetrahedral
vtx: the vertex array, Nx3, containing row entries of (x,y,z) pairs
u: the data on the finite element mesh (Nx1)

See Also
Functions 1475 , interptri 1487 , quadtri 1507

7.5.96 norm
The script command returns the natural norm induced by the L2-norm (Spectral Norm).

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
out = norm(y); Returns y to the L2-norm, y is a matrix.

See Also
Functions 1475

2003 - 2016 Lumerical Solutions, Inc


1510 Lumerical Knowledge Base

7.5.97 chol
Returns the lower triangular matrix L where A = LL* (Cholesky lower triangular factorization of a matrix). The matrix
A must be Hermitian positive definite and can be real or complex.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
L = chol(A); Returns an lower triangular matrix L from the diagonal and upper
triangle of matrix A, satisfying the equation A = LL*

See Also
Functions 1475

7.5.98 svd
Returns a 3-cell array for the singular value decomposition. The command supports real and complex A.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
[U,S,V*] = svd(A); Returns a 3-cell array for the decomposition. A diagonal matrix S of
the same dimension as A, with non-negative diagonal elements in
decreasing order, and unitary matrices U and V*. V* is a conjugate
transpose of a matrix V. If M = svd(A), then A = mult( M{1}, M{2},
M{3} ).

Example
Returns U, S and V

A = [ 1.5, 2,0; -2, 1.5,0; 0,0,1.2];


M=svd(A);

?U = M{1};
?S = M{2};
?V_ctranspose = M{3};
?max(abs( mult(U,S,V_ctranspose)-A)); # zerp

result:
-0.6 0.8 0
0.8 0.6 0
-0 -0 1
result:
2.5 0 0
0 2.5 0
0 0 1.2
result:
-1 -0 -0
0 1 -0
0 0 1
result:
2.22045e-016

See Also
Functions 1475 , eig 1485

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1511

7.5.99 colormatchfunction
Returns the set of color matching functions
x , y , z selected by the user. These functions are dimensionless. The
available sets are the CIE 1936 and CIE 1964.

References:
CIE Proceedings (1932), 1931. Cambridge: Cambridge University Press.
CIE Proceedings (1964) Vienna Session, 1963, Vol. B, pp. 209-220 (Committee Report E-1.4.1), Bureau Central de
la CIE, Paris.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
?colormatchfunction; Show the list of available color matching functions.
M= Get the desired set of color matching functions from the list of available
colormatchfunction("functions"); ones.

Examples
This example shows how to get the list of available color matching functions and plot them.

?colormatchfunction; #Show the list of color matching functions


result:
CIE 1936
CIE 1964

M1 = colormatchfunction("CIE 1936");
M2 = colormatchfunction("CIE 1964");

lambda1 = pinch(M1,2,1)*1e9; #Get the wavelength values where the function M1 is evaluate
xbar1 = pinch(M1,2,2);
ybar1 = pinch(M1,2,3);
zbar1 = pinch(M1,2,4);

lambda2 = pinch(M2,2,1)*1e9; #Get the wavelength values where the function M2 is evaluate
xbar2 = pinch(M2,2,2);
ybar2 = pinch(M2,2,3);
zbar2 = pinch(M2,2,4);

plotxy(lambda1,xbar1,lambda1,ybar1,lambda1,zbar1,lambda2,xbar2,lambda2,ybar2,lambda2,zbar
legend("xbar (CIE 1936)","ybar (CIE 1936)","zbar (CIE 1936)","xbar (CIE 1964)","ybar (CIE

The following figure shows the output of the example code.

2003 - 2016 Lumerical Solutions, Inc


1512 Lumerical Knowledge Base

color scale

See Also
Plotting commands 1524 , plotxy 1525 , pinch 1483 , colormatch 1512 , colormatchxy 1513 , colormatchuv 1515

7.5.100 colormatch
Returns the X, Y and Z tristimulus values calculated for a given spectral power distribution (power per unit area per
unit wavelength) and a selected set of color matching functions. The colormatch function assumes that the units of
wavelength for the spectral power distribution are nanometers, for example, W/(m2 nm). The available color functions
are the CIE 1936 and CIE 1964.

The X, Y, Z values have dimensions of power per unit area, in the units used for the spectral power distribution. The
expressions for calculating the X, Y and Z values are:
X = I ( l ) x ( l )d l
Y = I ( l ) y ( l )d l

Z = I ( l ) z ( l )d l

where
I ( l ) is the spectral power distribution and x , y , z are the color matching functions.

References:
https://en.wikipedia.org/wiki/CIE_1931_color_space
CIE Proceedings (1932), 1931. Cambridge: Cambridge University Press.
CIE Proceedings (1964) Vienna Session, 1963, Vol. B, pp. 209-220 (Committee Report E-1.4.1), Bureau Central de
la CIE, Paris.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
cm = colormatch(spec, lam, Returns X, Y, Z for the spectrum spec evaluated at the wavelength
"functions"); values in lam (units of meters), using the selected color functions. If no
functions are specified, the "CIE 1936" set is used.

Examples
This example shows how to calculate the X, Y, Z values for a given spectral power distribution.

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1513

# create a dummy spectrum


lambda = linspace(300e-9,700e-9,500); # note SI units (meters)
spectrum = exp(-(lambda-450e-9)^2/(30e-9)^2);

plot(lambda*1e9,spectrum,"wavelength(nm)","test spectrum");

?cm64 = colormatch(spectrum,lambda,"CIE 1964");


result:
14.3731
6.07161
79.5907

?cm36 = colormatch(spectrum,lambda); # "CIE 1936" is assumed if no color matching functio


result:
13.1613
2.99189
72.2623

The following figure shows the plot of the test spectrum created by the example code.

color scale

See Also
Plotting commands 1524 , plot 1525 , colormatchfunction 1511 , colormatchxy 1513 , colormatchuv 1515

7.5.101 colormatchxy
Returns the x and y chromaticity values calculated for a given spectral power distribution (power per unit area per
unit wavelength) and a selected set of color matching functions. The colormatchxy function assumes that the units
of wavelength for the spectral power distribution are nanometers, for example, W/(m2 nm). The available color
functions are the CIE 1936 and CIE 1964.

The x and y values are dimensionless and they are related to the X, Y and Z values by:

X Y
x= ,y=
X +Y + Z X +Y + Z

2003 - 2016 Lumerical Solutions, Inc


1514 Lumerical Knowledge Base

References:
https://en.wikipedia.org/wiki/CIE_1931_color_space
CIE Proceedings (1932), 1931. Cambridge: Cambridge University Press.
CIE Proceedings (1964) Vienna Session, 1963, Vol. B, pp. 209-220 (Committee Report E-1.4.1), Bureau Central de
la CIE, Paris.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
cmxy = Returns x, y for the spectrum spec evaluated at the wavelength values
colormatchxy(colormatch(spec, in lam (units of meters), using the selected color functions. If no
lam, "functions")); functions are specified, the "CIE 1936" set is used.

Examples
This example shows how to calculate the x, y values for a given spectral power distribution.

# create a dummy spectrum


lambda = linspace(300e-9,700e-9,500); # note SI units (meters)
spectrum = exp(-(lambda-450e-9)^2/(30e-9)^2);

plot(lambda*1e9,spectrum,"wavelength(nm)","test spectrum");

?cmxy64 = colormatchxy( colormatch(spectrum,lambda,"CIE 1964") );


result:
0.14368
0.0606946

?cmxy36 = colormatchxy( colormatch(spectrum,lambda) );


result:
0.148857
0.033839

The following figure shows the plot of the test spectrum created by the example code.

color scale

See Also
Plotting commands 1524 , plot 1525 , colormatchfunction 1511 , colormatch 1512 , colormatchuv 1515

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1515

7.5.102 colormatchuv
Returns the u' and v' chromaticity values calculated for a given spectral power distribution (power per unit area per
unit wavelength) and a selected set of color matching functions. The colormatchuv function assumes that the units of
wavelength for the spectral power distribution are nanometers, for example, W/(m2 nm). The available color functions
are the CIE 1936 and CIE 1964.

The u' and v' values are dimensionless and they are related to the X, Y and Z values by:

4X 9Y
u' = , v' =
X + 15Y + 3Z X + 15Y + 3Z

References:
https://en.wikipedia.org/wiki/CIE_1931_color_space
http://en.wikipedia.org/wiki/CIELUV
CIE Proceedings (1932), 1931. Cambridge: Cambridge University Press.
CIE Proceedings (1964) Vienna Session, 1963, Vol. B, pp. 209-220 (Committee Report E-1.4.1), Bureau Central de
la CIE, Paris.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
cmuv = Returns u', v' for the spectrum spec evaluated at the wavelength values
colormatchuv(colormatch(spec, in lam (units of meters), using the selected color functions. If no
lam, "functions")); functions are specified, the "CIE 1936" set is used.

Examples
This example shows how to calculate the u', v' values for a given spectral power distribution.

# create a dummy spectrum


lambda = linspace(300e-9,700e-9,500); # note SI units (meters)
spectrum = exp(-(lambda-450e-9)^2/(30e-9)^2);

plot(lambda*1e9,spectrum,"wavelength(nm)","test spectrum");

?cmuv64 = colormatchuv( colormatch(spectrum,lambda,"CIE 1964") );


result:
0.167023
0.158749

?cmuv36 = colormatchuv( colormatch(spectrum,lambda) );


result:
0.191558
0.0979782

The following figure shows the plot of the test spectrum created by the example code.

2003 - 2016 Lumerical Solutions, Inc


1516 Lumerical Knowledge Base

color scale

See Also
Plotting commands 1524 , plot 1525 , colormatchfunction 1511 , colormatch 1512 , colormatchxy 1513

7.5.103 erf
Error function as defined by the following equation:

2 z
erf ( z ) = ( )
exp - t 2 dt
p 0

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
out=erf(z); Returns error function of z where z is a scalar number or matrix of
scalar numbers.

Examples
Plot the error function from z=-5 to 5.

z=linspace(-5,5,50); # generate vector of numbers from -5 to 5 with 50 points


erf_z = erf(z);
plot(z,erf_z,"z","erf");

The following figure shows the plot created by the example code.

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1517

See Also
Functions 1475 , erfc 1517

7.5.104 erfc
Complementary error function as defined by the following equation:

2 z
erfc( z ) = 1 - ( )
exp - t 2 dt
p 0

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
out=erfc(z); Returns the complementary error function of z where z is a scalar
number or matrix of scalar numbers.

Examples
Plot the complementary error function from z=-5 to 5.

z=linspace(-5,5,50); # generate vector of numbers from -5 to 5 with 50 points


erfc_z = erfc(z);
plot(z,erfc_z,"z","erfc");

The following figure shows the plot created by the example code.

2003 - 2016 Lumerical Solutions, Inc


1518 Lumerical Knowledge Base

See Also
Functions 1475 , erf 1516

7.5.105 unique
Returns an array containing all unique values in a matrix

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
out=unique(a); Returns an array containing containing all unique values in the matrix
a.

Examples
Define a matrix containing elements which are not unique and print out the unique values to the script prompt.

# define a matrix a
a = [0,0,0;
1+1i,0,0;
1,1,0;
0.25,.25,0;
0.8,.25,0;
0.25,.8,0;
0.25,.25,1];

# print unique values to script prompt


?unique(a);

result:
0+0i
0.25+0i
0.8+0i
1+0i
1+1i

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1519

See Also
Functions 1475

7.5.106 uniquevertices
Given a matrix of vertices, returns a matrix of unique vertices with differences in values larger than a specified
tolerance.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
out=uniquevertices(vertexTable, Returns unique elements of a matrix with differences in values larger
absTolerance); than a specified tolerance.

vertexTable is a Mx2 or Mx3 matrix


absTolerance is the magnitude of the tolerance

See Also
Functions 1475

7.5.107 chpts
Samples function on Chebyshev grid. Chebyshev interpolation is useful for accurately interpolating a smooth function
using a very small number of samples. The key requirement for this type of interpolation to work is that the function
is sampled on the Chebyshev roots grid, which can be done by using this command.

Supported Product: FDTD, MODE

Syntax Description
x=chpts(xmin,xmax,NumPts,option); Returns Chebyshev roots grid on interval between xmin and xmax
that can be used to sample a smooth function.
NumPts defines the number of point on given interval.

Option:
If option=1 is selected, the vector x will not include the endpoints
If option=2 is selected, the vector x will include the endpoints

See Also
dcht 1521 ,chebin 1519 ,icht 1519 ,interp 1487

7.5.108 chebin
Returns Chebyshev interpolation of a sampled function. Chebyshev interpolation is useful for accurately interpolating
a smooth function using a very small number of samples. The key requirement for this type of interpolation to work is
that the function be sampled on the Chebyshev roots grid.

Supported Product: FDTD, MODE

Syntax Description
chebin(x,f,xi,xmin,xmax) This command interpolates the function f onto the xi points. It assumes
that f contains the samples of the function taken on the Chebyshev
roots grid specified in x; x must be constructed by the call

2003 - 2016 Lumerical Solutions, Inc


1520 Lumerical Knowledge Base

# x = chpts(xmin,xmax,NumPts), otherwise an error is returned.

See Also
dcht 1521 ,chpts 1519 ,icht 1519

7.5.109 cov
This command calculates the covariance matrix.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
cov(A); Calculate the covariance matrix.
cov(A, B);
C = cov(A) returns the covariance. A is a matrix whose columns
represent random variables and whose rows represent observations;
C is the covariance matrix with the corresponding column variances
along the diagonal.

C = cov(A, B) returns the covariance between two random variables


A and B. If A and B are vectors of observations with equal length,
cov(A, B) is the 2-by-2 covariance matrix; if A and B are matrices of
observations, cov(A, B) treats A and B as vectors and is equivalent
to cov(A(:), B(:)). A and B must have equal size.

See Also
Functions 1475 , corrcoef 1520 , corrtransf 1520

7.5.110 corrcoef
This command calculates the correlation matrix.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
corrcoef(A); Calculate the correlation matrix.
corrcoef(A, B);
R = corrcoef(A) returns the matrix of correlation coefficients for A,
where the columns of A represent random variables and the rows
represent observations.

R = corrcoef(A, B) returns coefficients between two random variables


A and B.

See Also
Functions 1475 , cov 1520 , corrtransf 1520

7.5.111 corrtransf
This command calculates the transformation matrix.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1521

corrtransf(A); Calculate the transformation matrix to generate multiple sequences


of correlated random variables given a correlation matrix A

See Also
Functions 1475 , cov 1520 , corrcoef 1520

7.5.112 dcht
Returns the Chebyshev interpolation coefficients. The amplitude of the coefficients decreases exponentially and the
last coefficient offers an estimate of the relative accuracy of the interpolation.

Supported Product: FDTD, MODE

Syntax Description
coeff=dcht(f,option); Returns the Chebyshev interpolation coefficients of a sampled function
f. The function f must be sampled on a Chebyshev roots grid.

Option:
If option=1 is selected, the vector x will not include the endpoints
If option=2 is selected, the vector x will include the endpoints

Examples
This example shows how to obtain interpolation coefficients from a sampled function:

Nc = 15; # Number of sample points


xmin = 0;
xmax = 1;
x = chpts(xmin,xmax,Nc,1); # Returns Chebyshev roots grid on interval between xmin and x
f = exp(1i*2*pi*x); # Function sampling using Chebyshev grid
coeff = dcht(f,1); # Get interpolation coefficients
?abs(coeff);

See Also
chpts 1519 ,chebin 1519 ,icht 1521

7.5.113 icht
This command takes the Chebyshev interpolation coefficients and returns the corresponding function samples.

Supported Product: FDTD, MODE, INTERCONNECT, DEVICE

Syntax Description
out=icht(coeff,option); Returns function samples from Chebyshev interpolation coefficients
coeff.

Option:
If option=1 is selected, the vector x will not include the endpoints
If option=2 is selected, the vector x will include the endpoints

Examples
This example shows how to obtain interpolation coefficients from a sampled function and the calculates back the
function samples from the coefficients:

Nc = 15; # Number of sample points

2003 - 2016 Lumerical Solutions, Inc


1522 Lumerical Knowledge Base

xmin = 0;
xmax = 1;
x = chpts(xmin,xmax,Nc,1); # Returns Chebyshev roots grid on interval between xmin and x
f = exp(1i*2*pi*x); # Function sampling using Chebyshev grid
coeff = dcht(f,1); # Get interpolation coefficients

# Calculate the function samples from the coefficients and compare them to the original f

?icht(coeff,1);
?f;

See Also
dcht 1521 ,chpts 1519 ,chebin 1519

7.5.114 besselj
This command computes the Bessel function of the first kind.

Supported Product: FDTD, MODE, INTERCONNECT, DEVICE

Syntax Description
out=besselj(nu, z); "nu" is the order and "z" could be an array. Both nu and z need to be
real.

See Also
bessely 1522 , besseli 1522 , besselk 1523

7.5.115 bessely
This command computes the Bessel function of the second kind.

Supported Product: FDTD, MODE, INTERCONNECT, DEVICE

Syntax Description
out=bessely(nu, z); "nu" is the order and "z" could be an array. Both nu and z need to be
real.

See Also
besselj 1522 , besseli 1522 , besselk 1523

7.5.116 besseli
This command computes the modified Bessel function of the first kind.

Supported Product: FDTD, MODE, INTERCONNECT, DEVICE

Syntax Description
out=besseli(nu, z); "nu" is the order and "z" could be an array. Both nu and z need to be
real.

See Also
bessely 1522 , besselj 1522 , besselk 1523

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1523

7.5.117 besselk
This command computes the modified Bessel function of the second kind.

Supported Product: FDTD, MODE, INTERCONNECT, DEVICE

Syntax Description
out=besselk(nu, z); "nu" is the order and "z" could be an array. Both nu and z need to be
real.

See Also
bessely 1522 , besseli 1522 , besselj 1522

7.6 Loop and conditional statements


The scripting language currently supports FOR loops and IF statements. Other control structures such as while
loops or case statements must be constructed from these.

Command Description
for 1523 For loop.
if 1523 If statement.
while 1523 A for loop must be used. See the for loop section.

7.6.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.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
for(x=1:100) { ?x; } Single argument for loop.
The loop will be sequentially executed for each value of x.
for(x=1; x<= 100; x=x+1) { Three argument for loop.
?x; x=1 at the start of the loop. The loop continues while x <=100 and sets x=x
} +1 at each pass.
x=1; This is equivalent to a while loop that will execute while x<10.
for(0; x<10; 0) {
?x;
x=x+1;
}

See Also
Loops 1523 , if 1523

7.6.2 if
The scripting language supports if statements in the following forms:

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description

2003 - 2016 Lumerical Solutions, Inc


1524 Lumerical Knowledge Base

if(x < 5) { y = x^2; } Simple if statement on one line.


if(x < 5) { Multi-line if statement
y = x^2;
}
if(x < 5) { If else statement.
y = x^2;
} else {
y = x^3;
}
if(x < 5) { Nested if statement with else.
if(x > 0) {y = x^2; }
} else {
y = x^3;
}

Examples
This example shows a simple if, OR, AND logical statement
clear;
a=1;
b=2;
d=3;

if((a==1)|(b==2)&(d==3)){
?"correct";}
else{
?"not correct";}

See Also
Loops 1523 , for 1523 , Operators 1467 , == 1469 , almostequal 1470 ,? 1474

7.7 Plotting commands


Line and image plots are supported. These figures can be exported to jpeg images.

Plotting functions
Command Description
plot 1525 Makes line plots.
plotxy 1525 Makes line plots, when data sets are sampled at different position vectors.
polar 1526 Makes polar plots.
polar2 1527 Makes polar plots, when data sets are sampled at different position vectors.
polarimage 1528 Makes a 2D polar image plot.
smithchart 1528 Makes an impedance Smith chart.
histc 1528 Makes a histogram plot.
legend 1529 Makes a legend on a figure with line plots.
image 1529 Makes 2D image plots.
setplot 1530 Sets figure properties.
visualize 1529 Pass in simulation data to the visualizer.
add2visualizer 1530 Adds data to an existing visualizer
vectorplot 1531 Makes vector plots.

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1525

holdon 1526 Switches on the mode to hold multiple mathematical functions on the same
figure.
holdoff 1526 Switches off the mode to hold multiple mathematical functions on the same
figure.

Miscellaneous plotting functions


Command Description
selectfigure 1530 Selects a figure.
exportfigure 1531 Exports a figure.
closeall 1531 Closes all figure windows.

7.7.1 plot
Create line plots. All data sets must be sampled on the same position vector.

See plotxy for data sets that are sampled on different position vectors.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
out = plot(x,y); Creates a plot of y vs x, y and x are both 1D vectors with the same
length.
The figure number is returned.
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); Creates a plot with 3 curves, x,y1, y2, y3 must be the same length,
returns the figure number.
plot(x,y, "x label", "y label", Creates a plot of y vs x with axis labels and a title, returns the figure
"title"); number.
plot(x,y, "x label", "y label", "title", Creates a plot with desired options. Options can be be
"options"); log10x, log10y, loglog
plot points
greyscale
polar (same as the polar script command)
any comma separated list of the above, for example
"log10x,greyscale"
Returns the figure number.

See Also
Plotting commands 1524 , plotxy 1525 , holdon 1526 legend 1529 , image 1529 , closeall 1531 , setplot 1530 , exportfigure 1531 ,
visualize 1529 , vectorplot 1531 , polar 1526

7.7.2 plotxy
Create line plots. In particular, this function is used when the data sets are sampled on different position vectors.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description

2003 - 2016 Lumerical Solutions, Inc


1526 Lumerical Knowledge Base

out = plotxy(x,y); Creates a plot of y vs x, y and x are both 1D vectors with the same
length.
The figure number is returned.
plotxy(x1,y1,x2,y2,xn,yn); Creates a plot with multiple curves. The xn-yn pairs must have the
same length, but x1, x2, and xn can have different start-end values and
resolutions. It returns the figure number.
plotxy(x1,y1,x2,y2, "x label", "y Creates line plots with axis labels and a title, returns the figure
label", "title"); number.

See Also
Plotting commands 1524 , plot 1525 , legend 1529 , image 1529 , closeall 1531 , setplot 1530 , exportfigure 1531 , visualize 1529 ,
vectorplot 1531 , holdon 1526

7.7.3 holdon
This script command that can hold multiple function on a single plot. Note that, the labeling and plot options would
follow the first plot and ignore options in the second plot followed by a warning. The command setplot can be
used instead.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
holdon; Switches on the mode to hold multiple mathematical functions on the
same figure.

See Also
Plotting commands 1524 , plot 1525 , plotxy 1525 , legend 1529 , setplot 1530 , log 1482 , log10 1482 , holdoff 1526

7.7.4 holdoff
This script command that can switch off the holdon mode.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
holdoff; Switches off the mode to hold multiple mathematical functions on the
same figure.

See Also
Plotting commands 1524 , plot 1525 , holdon 1526

7.7.5 polar
Create polar plots. All data sets must be sampled on the same position vector.

See polar2 for data sets that are sampled on different position vectors.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
out = polar(theta,rho) Creates a polar coordinate plot of the angle theta versus the radius rho.
theta is the angle from the x-axis to the radius vector specified in

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1527

radians; rho is the length of the radius vector.

Theta and rho can be vectors of the same length, or if the length of
theta is n, then y can be a nxm matrix.

The figure number is returned.


polar(theta,rho1,rho2,rho3) Creates a plot with 3 curves, theta, rho1, rho2, rho3 must be the same
length, returns the figure number.
polar(theta,rho,"x label", "y label", Creates a plot of y vs x with axis labels and a title, returns the figure
"title") number.
polar(theta,rho,"x label", "y label", Creates a plot with desired options. Options can be be
"title", "options"); log10x, log10y, loglog
plot points
greyscale
polar (same as the polar script command)
any comma separated list of the above, for example
"log10x,greyscale"
Returns the figure number.
See Also
Plotting commands 1524 , polar2 1527 , legend 1529 , image 1529 , closeall 1531 , setplot 1530 , exportfigure 1531 , polarimage 1528 ,
plot 1525

7.7.6 polar2
Create polar plots. In particular, this function is used when the data sets are sampled on different position vectors.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
out = polar2(theta,rho) Creates a polar coordinate plot of the angle theta versus the radius rho.
theta is the angle from the x-axis to the radius vector specified in
radians; rho is the length of the radius vector.

Theta and rho can be vectors of the same length, or if the length of
theta is n, then y can be a nxm matrix.

The figure number is returned.


polar2(theta1,rho1,theta2,rho2) Creates a plot with 2 curves. The two data sets can be sampled on
different theta vectors.
polar2(theta,rho,"x label", "y Creates a plot of y vs x with axis labels and a title, returns the figure
label", "title") number.
polar2(theta,rho,"x label", "y Creates a plot with desired options. Options can be be
label", "title", "options"); log10x, log10y, loglog
plot points
greyscale
polar (same as the polar script command)
any comma separated list of the above, for example
"log10x,greyscale"
Returns the figure number.
See Also
Plotting commands 1524 , polar 1526 , legend 1529 , image 1529 , closeall 1531 , setplot 1530 , exportfigure 1531 , polarimage 1528

2003 - 2016 Lumerical Solutions, Inc


1528 Lumerical Knowledge Base

7.7.7 polarimage
Create 2D polar image plots. This is typically used to plot far field data.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
polarimage(ux,uy,data); Creates a 2D image plot. If
ux is of dimension N x 1, where ux goes from -1 to 1
uy is of dimension M x 1, where uy goes from -1 to 1
data must be of dimension N x M
out = image(ux,uy,data, "x label", Creates a 2D image plot with axis labels
"y label", "title"); Optionally returns the figure number.
image(ux,uy,data, "x label", "y Creates a 2D image plot with axis labels and options, options can be
label", "title", "options"); logplot

See Also
Plotting commands 1524 , plot 1525 , polar 1526 , image 1529 , closeall 1531 , setplot 1530 , exportfigure 1531 , visualize 1529 , Near to
far field projections 1657

7.7.8 smithchart
Plot impedance values in a Smith chart. The default impedance used for normalization is 50 Ohms; this can be
modified in the plot settings once the plot has been created (see Visualizer for rectilinear data 741 ).

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
out = smithchart(Z); Creates a curve in a Smith chart with the impedance values in the
array Z. The array Z must be of the form NX1 or 1XN.
out = smithchart(Z1,Z2,Z3); Creates three curves in a Smith chart with the impedance values in the
arrays Z1, Z2 and Z3. Each array must be of the form NX1 or 1XN, but
they do not have to be of the same dimension.

See Also
Plotting commands 1524 , Visualizer for rectilinear data 741

7.7.9 histc
The script command create a histogram plot.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
out = histc(y); Creates a histogram plot of y.
Returns the figure number.
histc(y,n); Creates a histogram plot of y, using n bins.
Returns the figure number.
histc (y,n, "x label", "y label", Creates a histogram plot of y, using n bins, with axis labels and a title.
"title"); Returns the figure number.

See Also

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1529

Plotting commands 1524 , histogram 1455 , legend 1529 , plot 1525 , closeall 1531 , visualize 1529

7.7.10 legend
Add a legend to a line plot.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
legend("legend1","legend2",..., Adds a legend to the selected figure.
"legendn"); Parameters can be strings, or an array of strings
This function does not return any data.

See Also
Plotting commands 1524 , legend 1529 , plot 1525 , closeall 1531 , visualize 1529

7.7.11 image
Create 2D image plots.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
out = image(x,y,z); Creates a 2D image plot. If
x is of dimension N x 1
y is of dimension M x 1
z must be of dimension N x M
Returns the figure number.
image(x,y,z, "x label", "y label", Creates a 2D image plot with axis labels, returns the figure number.
"title");
image(x,y,z, "x label", "y label", Creates a 2D image plot with axis labels and options, options can be
"title", "options"); logplot
polar
red2blue
any comma separated list of the above

See Also
Plotting commands 1524 , plot 1525 , closeall 1531 , setplot 1530 , exportfigure 1531 , visualize 1529 , polarimage 1528 , vectorplot 1531

7.7.12 visualize
Send data to the visualizer.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

For FDTD,
Syntax Description
visualize(R); Plots the dataset R in the Visualizer.
visualize(R,T); Send two datasets to the Visualizer.

For MODE, DEVICE, and INTERCONNECT,


Syntax Description

2003 - 2016 Lumerical Solutions, Inc


1530 Lumerical Knowledge Base

visualize(R); Plots the dataset R in the Visualizer.


visualize("name", Plots data on a spatial grid.
x,y,z, name - Visualizer name
p1,"p1", p2,"p2", x,y,z - spatial grid vectors
"a1",a1,"a2",a2); p1,"p1" - additional parameter vectors (vector, then parameter name).
"a1",a1 - data attributes (data name, then data matrix)
visualize("name", Plot vector data
x,y,z, "a1",a1x,a1y,a1z - data attributes (data name, then data matrix
p1,"p1", p2,"p2", X,Y,Z components)
"a1",a1x,a1y,a1z);
visualize("name", Plot data not attached to a spatial grid.
p1,"p1", p2,"p2",
"a1",a1x,a1y,a1z);

See Also
Plotting commands 1524 , Datasets 1461 , exportfigure 1531 , image 1529 , plot 1525 , setplot 1530 , closeall 1531

7.7.13 add2visualizer
Adds data to an existing visualizer

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
add2visualizer( dataset, visualizer This command adds data to an existing visualizer. If there is no
number ) visualizer corresponding to the visualizer number, then the command is
ignored.

See Also
Plotting commands 1524 , Datasets 1461 , exportfigure 1531 , image 1529 , plot 1525 , setplot 1530 , closeall 1531

7.7.14 selectfigure
Selecting a figure will show the figure on screen (give it focus). A warning will be generated if the figure does not
exist.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
selectfigure; Selects the last figure that was created.
This function does not return any data.
selectfigure(1); Selects figure 1.

See Also
Plotting commands 1524 , exportfigure 1531 , image 1529 , plot 1525 , setplot 1530 , closeall 1531

7.7.15 setplot
Set figure properties.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1531

Syntax Description
?setplot; Creates a string which lists all figure properties for the figure that is
currently selected. Unless the selectfigure() command was called, the
most recently created plot will be selected.
setplot("property", "property Set the desired property of the currently selected figure to property
value"); value.

See Also
Plotting commands 1524 , image 1529 , plot 1525 , visualize 1529

7.7.16 exportfigure
Exports the current figure to a JPG image. If the file extension is not specified, ".jpg" will be used. The image size
will be the same as the figure window size.

If a file is overwritten, a warning will be generated. If an export fails, a warning will be generated.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
exportfigure("filename"); Exports the current figure to a JPG image with the name "filename".
The exported image will have the same size as the current figure.
exportfigure("filename",xres,yres); The exported image will have the specified resolution, xres,yres, in the
x,y directions respectively.

See Also
Plotting commands 1524 , selectfigure 1530 , image 1529 , plot 1525 , setplot 1530 , closeall 1531 , visualize 1529 , closeall 1531

7.7.17 closeall
Close all open figure windows.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
closeall; Close all open figure windows.
This function does not return any data.

See Also
Plotting commands 1524 , plot 1525 , image 1529

7.7.18 vectorplot
The script command vectorplot creates a vector plot from a rectilinear dataset. The rectilinear dataset must be a
vector, like the E field, and it must have no additional parameters (i.e. if you have E vs. x,y.z.f and f has 2 or more
values, then the command fails). Generally, it is easier to use visualize(E) and then select the vector plot option.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
vectorplot(E); Creates a vector plot of the dataset

See Also

2003 - 2016 Lumerical Solutions, Inc


1532 Lumerical Knowledge Base

Plotting commands 1524 , plotxy 1525 , legend 1529 , image 1529 , closeall 1531 , setplot 1530 , exportfigure 1531 , plot 1525

7.8 Adding Objects


The following commands can be used to add objects. Objects are always added to the location specified by the
groupscope variable. Please note that not all the commands are available for all products. Please refer to the table at
the bottom of the page for each command to see which products it applies to.

Simulation environment
Command Description
switchtolayout 1534 Closes the analysis window, deletes current simulation data and allows you to
manipulate simulation objects for a new simulation.
layoutmode 1535 Used to determine if the simulation file is open in layout or in analysis mode.
groupscope 1563 Changes the group scope.
addgroup 1535 Adds a container group to the simulation environment.
addanalysisgroup 1536 Add an analysis group.
addobject 1536 Add an object from the object library.
addgridattribute 1550 Add a grid attribute object.
importcsvlc 1555 Add LC grid attribute and optionally LC structure from CSV file.

Structures
Command Description
addcircle 1537 Add a circle primitive.
addcustom 1537 Add a custom primitive.
addimport 1537 Add an import primitive.
addpyramid 1538 Add a pyramid primitive.
addpoly 1538 Add a polygon primitive
addrect 1538 Add a rectangle primitive.
addring 1539 Add a ring primitive.
addsphere 1539 Add a sphere primitive.
addsurface 1539 Add a surface primitive.
addstructuregroup 1536 Add a structure group.
addlayer 1552 Adds a layer to the layer builder object.
addlayerbuilder 1553 Adds a layer builder object.
addplanarsolid 1536 Adds a planar solid object.
stlimport 1554 Adds an STL import object.
add2drect 1555 Adds a 2D rectangle in the simulation space.
add2dpoly 1555 Adds a 2D polygon in the simulation space.
addwaveguide 1555 Adds a waveguide in the simulation space.

Simulation region
Command Description

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1533

addeme 1540 Adds an Eigenmode Expansion (EME) solver region.


addfdtd 1539 Adds an FDTD simulation area.
addfde 1540 Adds an Finite Difference Eigenmode (FDE) solver region.
addmesh 1541 Adds a mesh override region.
adddevice 1547 Adds an electrical (CHARGE) simulation are in DEVICE
addvarfdtd 1540 Adds a 2.5D varFDTD simulation region.
addmeshconstraint 1542 Adds a mesh override region in DEVICE.
addchargesolver 1548 Adds an electrical (charge transport) simulation region in DEVICE.
addheatsolver 1548 Adds a thermal (heat transport) simulation region in DEVICE.
addchargemesh 1542 Adds a mesh override region to the 'CHARGE' simulation environment in
DEVICE.
addheatmesh 1542 Adds a mesh override region to the 'HEAT' simulation environment in DEVICE.

Sources
Command Description
adddipole 1545 Add a dipole source.
addgaussian 1545 Add a Gaussian source.
addplane 1545 Add a plane source.
(FDTD Solutions) addmode 1544 ; Add a mode source.
(Propagator) addmodesource 1544
addtfsf 1545 Add a TFSF source.
addimportedsource 1546 Add an imported source.

Monitors
Command Description
addindex 1546 Adds an index monitor.
addeffectiveindex 1551 Adds an effective index monitor.
addtime 1546 Adds a time monitor.
addmovie 1546 Adds a movie monitor.
addprofile 1547 Adds a profile monitor.
addpower 1547 Adds a power monitor.
addmodeexpansion 1551 Adds a mode expansion monitor.
addbandstructuremonitor 1552 Adds a band structure monitor.
addjfluxmonitor 1552 Adds a current flux monitor.
addchargemonitor 1552 Adds a charge monitor
addefieldmonitor 1552 Adds an electric field monitor
addemeindex 1541 Adds an index monitor for an EME solver region.
addemeprofile 1541 Adds a profile monitor for an EME solver region.
addheatfluxmonitor 1544 Adds a heat flux monitor
addtemperaturemonitor 1543 Adds a temperature monitor

2003 - 2016 Lumerical Solutions, Inc


1534 Lumerical Knowledge Base

Create objects in Deck


Command Description
createbeam 1547 Creates a new Gaussian beam that is accessible from the deck.

Simulation environment
Command Description
switchtolayout 1534 Closes the analysis window, deletes current simulation data and allows you to
manipulate simulation objects for a new simulation.
switchtodesign 1535 Switches INTERCONNECT to design mode.
layoutmode 1535 Used to determine if the simulation file is open in design (layout) or in analysis
mode.
designmode 1535 Returns true if the simulation is currently in design mode.
groupscope 1563 Changes the group scope.

Adding Elements
Command Description
addelement 1551 Adds an element from the INTERCONNECT element library.

Boundary Conditions
Command Description
addbc 1540 Adds a boundary condition in DEVICE.

Adding simulation objects


Command Description
addemeport 1541 Adds a port to the active EME solver region.
adddope 1548 Adds a constant doping region.
adddiffusion 1548 Adds a diffusion region.
addbulkgen 1549 Adds a bulk generation region.
adddeltachargesource 1549 Adds a point generation source
addimportdope 1549 Adds an import primitive for a doping region.
addimportgen 1549 Adds an import primitive for a generation region.
addcontact 1537 Adds a contact to the electrical contacts table.
adduniformheat 1543 Adds a constant heat source.
addimportheat 1543 Adds an import primitive for a heat source.
addimporttemperature 1542 Adds an import temperature source to the CHARGE solver

7.8.1 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 objects.

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1535

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
switchtolayout; Switches to LAYOUT mode.
This function does not return any data.

See Also
Adding Objects 1532 , layoutmode 1535

7.8.2 switchtodesign
Switches INTERCONNECT from simulation to design mode.

Supported Product: INTERCONNECT

Syntax Description
switchtodesign; Switches INTERCONNECT from simulation to design mode.

See Also
Adding Objects 1532 , switchtolayout 1534 , layoutmode 1535 , designmode 1535

7.8.3 layoutmode
Used to determine if the simulation file is open in layout or in analysis mode.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
?layoutmode; Returns 1 if in layout mode, and 0 if in analysis mode.

See Also
Adding Objects 1532 , switchtolayout 1534 , designmode 1535

7.8.4 designmode
Used to determine if the simulation file is in design mode.

Supported Product: INTERCONNECT

Syntax Description
out = designmode; Returns 1 if in design mode, and 0 if not.

See Also
Adding Objects 1532 , switchtolayout 1534 , layoutmode 1535 , switchtodesign 1535

7.8.5 addgroup
Adds a container group to the simulation environment.

Supported Product: FDTD, MODE, DEVICE

Syntax Description

2003 - 2016 Lumerical Solutions, Inc


1536 Lumerical Knowledge Base

addgroup; Adds a container group to the simulation environment.


This function does not return any data.

See Also
Adding Objects 1532 , addtogroup 1567 , addstructuregroup 1536 , addanalysisgroup 1536

7.8.6 addstructuregroup
Adds a structure group to the simulation environment.

Supported Product: FDTD, MODE, DEVICE

Syntax Description
addstructuregroup; Adds a structure group to the simulation environment.
This function does not return any data.
See Also
Adding Objects 1532 , addtogroup 1567 , adduserprop 1567 , addgroup 1535 , addanalysisgroup 1536

7.8.7 addanalysisgroup
Adds an analysis group to the simulation environment.

Supported Product: FDTD, MODE, DEVICE

Syntax Description
addanalysisgroup; Adds an analysis group to the simulation environment.
This function does not return any data.

See Also
Adding Objects 1532 , addtogroup 1567 , adduserprop 1567 , addgroup 1535 , addstructuregroup 1536

7.8.8 addobject
Adds a object from the object library.

Supported Product: FDTD, MODE

Syntax Description
addobject("script_ID"); Adds an object from the object library.
This function does not return any data.
?addobject; Returns names of objects in the library.

See Also
Adding Objects 1532 , addtogroup 1567 , adduserprop 1567

7.8.9 addplanarsolid
Adds a planar solid primitive with the specified vertices.

Supported Product: FDTD, MODE, DEVICE

Syntax Description

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1537

addplanarsolid; adds an empty planar solid object.


addplanarsolid(vtx, fct); adds a planer solid object whose vertices are vtx and whose facets are
fct

See Also
Adding Objects 1532 , Primitives - adding planar solid objects 345

7.8.10 addcontact
Adds a new contact to the electrical contact table.

Supported Product: DEVICE

Syntax Description
addcontact; Adds a new contact to the electrical contact table.
This function does not return any data.

See Also
Adding Objects 1532

7.8.11 addcircle
Adds a circle primitive to the simulation environment.

Supported Product: FDTD, MODE, DEVICE

Syntax Description
addcircle; Adds primitive to the simulation environment.
This function does not return any data.

See Also
Adding Objects 1532

7.8.12 addcustom
Adds a custom primitive to the simulation environment.

Supported Product: FDTD, MODE

Syntax Description
addcustom; Adds primitive to the simulation environment.
This function does not return any data.

See Also
Adding Objects 1532

7.8.13 addimport
Adds an import primitive to the simulation environment.

Supported Product: FDTD, MODE

2003 - 2016 Lumerical Solutions, Inc


1538 Lumerical Knowledge Base

Syntax Description
addimport; Adds primitive to the simulation environment.
This function does not return any data.

See Also
Adding Objects 1532

7.8.14 addpyramid
Adds a pyramid primitive to the simulation environment.

Supported Product: FDTD, MODE, DEVICE

Syntax Description
addpyramid; Adds primitive to the simulation environment.
This function does not return any data.

See Also
Adding Objects 1532

7.8.15 addpoly
Adds a polygon primitive to the simulation environment.

Supported Product: FDTD, MODE, DEVICE

Syntax Description
addpoly; Adds primitive to the simulation environment.
This function does not return any data.

See Also
Adding Objects 1532

7.8.16 addrect
Adds a rectangle primitive to the simulation environment.

Supported Product: FDTD, MODE, DEVICE

Syntax Description
addrect; Adds primitive to the simulation environment.
This function does not return any data.

See Also
Adding Objects 1532

7.8.17 addtriangle
Adds a 3 vertex, triangle shaped polygon primitive to the simulation environment.

Supported Product: FDTD, MODE, DEVICE

Syntax Description

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1539

addtriangle; Adds primitive to the simulation environment.


This function does not return any data.

See Also
Adding Objects 1532 , addpoly 1538

7.8.18 addring
Adds a ring primitive to the simulation environment.

Supported Product: FDTD, MODE, DEVICE

Syntax Description
addring; Adds primitive to the simulation environment.
This function does not return any data.

See Also
Adding Objects 1532

7.8.19 addsphere
Adds a sphere primitive to the simulation environment.

Supported Product: FDTD, MODE, DEVICE

Syntax Description
addsphere; Adds primitive to the simulation environment.
This function does not return any data.

See Also
Adding Objects 1532

7.8.20 addsurface
Adds a surface primitive to the simulation environment.

Supported Product: FDTD, MODE

Syntax Description
addsurface; Adds primitive to the simulation environment.
This function does not return any data.

See Also
Adding Objects 1532

7.8.21 addfdtd
Adds a FDTD simulation area to the simulation environment.

Supported Product: FDTD, MODE

Syntax Description
addfdtd; Adds a simulation area to the simulation environment.

2003 - 2016 Lumerical Solutions, Inc


1540 Lumerical Knowledge Base

This function does not return any data.

See Also
Adding Objects 1532

7.8.22 addfde
Adds an Finite Difference Eigenmode (FDE) solver region object to the MODE Solutions simulation environment.

Supported Product: MODE Solutions

Syntax Description
addfde; Add an FDE simulation region.

See Also
Adding Objects 1532

7.8.23 addvarfdtd
Adds a 2.5D varFDTD solver object to the MODE Solutions simulation environment.

Supported Product: MODE Solutions

Syntax Description
addvarfdtd; Add a 2.5D varFDTD simulation region.

See Also
Adding Objects 1532

7.8.24 addbc
Adds a new boundary condition in DEVICE.

Supported Product: DEVICE

Syntax Description
addbc('bc_type'); Adds a new boundary condition. The type of the boundary
condition is an input argument. There are three options; 'thermal
boundary', 'voltage boundary', and 'electrical contact'.

The name of the boundary condition is set to 'new_boundary' by


default (unless specified using the next command format).
addbc('bc_type','bc_name'); Performs the same task as above and also sets the name to
'bc_name'.

See Also
Adding Objects 1532

7.8.25 addeme
Adds a Eigenmode Expansion (EME) solver object to the MODE Solutions simulation environment.

Supported Product: MODE Solutions

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1541

Syntax Description
addeme; Add an EME simulation region.

See Also
Adding Objects 1532

7.8.26 addemeport
Adds a port to an EME solver object if there is an active EME solver region.

Supported Product: MODE Solutions

Syntax Description
addemeport; Add a port to the active EME solver region.

See Also
Adding Objects 1532

7.8.27 addemeindex
Adds an index monitor that can be used to return the spatial refractive index when using an EME solver region.

Supported Product: MODE Solutions

Syntax Description
addemeindex; Add an index monitor when using an EME solver region.

See Also
Adding Objects 1532

7.8.28 addemeprofile
Adds a profile monitor that can be used to return the spatial electric and magnetic field profiles when using an EME
solver region.

Supported Product: MODE Solutions

Syntax Description
addemeprofile; Add a profile monitor when using an EME solver region.

See Also
Adding Objects 1532

7.8.29 addmesh
Adds a mesh override region to the simulation environment.

Supported Product: FDTD, MODE

Syntax Description
addmesh; Adds a mesh override region to the simulation environment.
This function does not return any data. In DEVICE, this command
adds an electrical mesh which applies to the 'CHARGE' solver.

2003 - 2016 Lumerical Solutions, Inc


1542 Lumerical Knowledge Base

See Also
Adding Objects 1532

7.8.30 addchargemesh
Adds a mesh override region to the 'CHARGE' simulation environment in DEVICE.

Supported Product: DEVICE

Syntax Description
addchargemesh; Adds a mesh override region to the 'CHARGE' simulation environment.
This function does not return any data.

See Also
Adding Objects 1532

7.8.31 addheatmesh
Adds a mesh override region to the 'HEAT' simulation environment in DEVICE.

Supported Product: DEVICE

Syntax Description
addheatmesh; Adds a mesh override region to the 'HEAT' simulation environment.
This function does not return any data.

See Also
Adding Objects 1532

7.8.32 addmeshconstraint
Adds a mesh override region to the simulation environment.

Supported Product: DEVICE

Syntax Description
addmeshconstraint("solver_name"); Adds a mesh override region to the simulation environment.The
input argument is the name of the solver, 'CHARGE' or 'HEAT'.

See Also
Adding Objects 1532

7.8.33 addimporttemperature
Adds an import temperature source to the CHARGE solver (only applicable to non-isothermal transport).

Supported Product: DEVICE

Syntax Description
addimporttemperature; Adds an import temperature source to the CHARGE solver. The
source only gets applied if the "temperature dependence" is set to
"non-isothermal."

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1543

Once the import temperature source is created, the data can be imported from a matlab (.mat) file using the GUI or
by assigning a dataset to the object using the importdataset 1590 script command. The dataset can be in rectilinear
or unstructured (finite-element) format.

See Also
Adding Objects 1532 , adduniformheat 1543 , addimportheat 1543

7.8.34 addimportheat
Adds a heat source to the simulation environment where the profile of the heat source is imported into DEVICE.

Supported Product: DEVICE

Syntax Description
addimportheat; Adds an import primitive to define a heat source. This format of the
command is only application when only one solver is present in the
model tree. If multiple solvers are present then use the second
format.
addimportheat("solver_name"); This format of the command will add an import heat source to the
solver defined by the argument. The "solver name" will be either
CHARGE or HEAT. For the CHARGE solver, the import heat
source only gets applied if the "temperature dependence" is set to
"coupled."

Once the import heat source is created, the data can be imported from a matlab (.mat) file using the GUI or by
assigning a dataset to the object using the importdataset 1590 script command. The dataset can be in rectilinear or
unstructured (finite-element) format.

See Also
Adding Objects 1532 , adduniformheat 1543

7.8.35 adduniformheat
Adds a constant heat source to the simulation environment.

Supported Product: DEVICE

Syntax Description
adduniformheat; Adds a constant heat source.

See Also
Adding Objects 1532 , addimportheat 1543

7.8.36 addtemperaturemonitor
Adds a temperature monitor to the DEVICE simulation environment. The monitor can only be added if the simulation
environment already has a 'HEAT' or 'CHARGE' (or both) solver present.

Supported Product: DEVICE

Syntax Description
addtemperaturemonitor; Adds a temperature monitor to the simulation environment. This format
of the command is only application when only one solver is present in

2003 - 2016 Lumerical Solutions, Inc


1544 Lumerical Knowledge Base

the model tree. If multiple solvers are present then use the second
format
addtemperaturemonitor("solver_na This format of the command will add a temperature monitor to the
me"); solver defined by the argument. The "solver name" will be either
CHARGE or HEAT. For the CHARGE solver, the temperature
monitor only works if the "temperature dependence" is set to "non-
isothermal" or "coupled."

See Also
Adding Objects 1532 , addheatfluxmonitor 1544

7.8.37 addheatfluxmonitor
Adds a heat flux monitor to the DEVICE simulation environment. The monitor can only be added if the simulation
environment already has a 'HEAT' solver present.

Supported Product: DEVICE

Syntax Description
addheatfluxmonitor; Adds a heat flux monitor to the simulation environment.

See Also
Adding Objects 1532 , addtemperaturemonitor 1543

7.8.38 addmode
Adds a mode source to the simulation environment for FDTD. For MODE, adds an eigenmode solver to the
simulation environment.

Supported Product: FDTD, MODE

For FDTD,
Syntax Description
addmode; Adds source to the simulation environment.
This function does not return any data.

For MODE,
Syntax Description
addmode; Add an eigenmode solver to the simulation environment.

See Also
Adding Objects 1532 , updatesourcemode 1579

7.8.39 addmodesource
Adds a mode source to the simulation environment.

Supported Product: MODE

Syntax Description
addmodesource; Adds source to the simulation environment.
This function does not return any data.

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1545

See Also
Adding Objects 1532 , addmode 1544 , updatesourcemode 1579

7.8.40 adddipole
Adds a dipole source to the simulation environment.

Supported Product: FDTD, MODE

Syntax Description
adddipole; Adds source to the simulation environment.
This function does not return any data.

See Also
Adding Objects 1532

7.8.41 addgaussian
Adds a gaussian source to the simulation environment.

Supported Product: FDTD, MODE

Syntax Description
addgaussian; Adds source to the simulation environment.
This function does not return any data.

See Also
Adding Objects 1532

7.8.42 addplane
Adds a plane wave source to the simulation environment.

Supported Product: FDTD, MODE

Syntax Description
addplane; Adds source to the simulation environment.
This function does not return any data.

See Also
Adding Objects 1532

7.8.43 addtfsf
Adds a Total Field Scattered Field (tfsf) source to the simulation environment.

Supported Product: FDTD, MODE

Syntax Description
addtfsf; Adds source to the simulation environment.
This function does not return any data.

See Also

2003 - 2016 Lumerical Solutions, Inc


1546 Lumerical Knowledge Base

Adding Objects 1532

7.8.44 addimportedsource
Adds an imported source to the simulation environment.

Supported Product: FDTD

Syntax Description
addimportedsource; Adds source to the simulation environment.
This function does not return any data.

See Also
Adding Objects 1532 , asapimport 1441 , asapload 1440 , asapexport 1440

7.8.45 addindex
Adds an index monitor to the simulation environment.

Supported Product: FDTD, MODE

Syntax Description
addindex; Adds monitor to the simulation environment.
This function does not return any data.

See Also
Adding Objects 1532

7.8.46 addtime
Adds a time monitor to the simulation environment.

Supported Product: FDTD, MODE

Syntax Description
addtime; Adds monitor to the simulation environment.
This function does not return any data.

See Also
Adding Objects 1532

7.8.47 addmovie
Adds a movie monitor to the simulation environment.

Supported Product: FDTD, MODE

Syntax Description
addmovie; Adds monitor to the simulation environment.
This function does not return any data.

See Also
Adding Objects 1532

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1547

7.8.48 addprofile
Adds a profile monitor to the simulation environment.

Supported Product: FDTD, MODE

Syntax Description
addprofile; Adds monitor to the simulation environment.
This function does not return any data.

See Also
Adding Objects 1532

7.8.49 addpower
Adds a power monitor to the simulation environment.

Supported Product: FDTD, MODE

Syntax Description
addpower; Adds monitor to the simulation environment.
This function does not return any data.

See Also
Adding Objects 1532 ,

7.8.50 createbeam
Creates a new Gaussian beam that is accessible from the deck.

Supported Product: MODE

Syntax Description
createbeam; Creates a Gaussian beam in the deck/global workspace. The
Gaussian beam has the properties specified in the Overlap analysis-
>Beam tab of the analysis window
Returns the name of the Gaussian beam created, which is by default
"gaussian#" (# being the total number of Gaussian beams existing in
the current deck).

See Also
Adding Objects 1532

7.8.51 adddevice
Adds a Device simulation region to the simulation environment.

Supported Product: DEVICE

Syntax Description
adddevice; Add a device simulation region.

See Also

2003 - 2016 Lumerical Solutions, Inc


1548 Lumerical Knowledge Base

Adding Objects 1532

7.8.52 addchargesolver
Adds an electrical (charge transport) simulation region to the simulation environment.

Supported Product: DEVICE

Syntax Description
addchargesolver; Adds an electrical (charge transport) simulation region.

See Also
Adding Objects 1532

7.8.53 addheatsolver
Adds a thermal (heat transport) simulation region to the simulation environment.

Supported Product: DEVICE

Syntax Description
addheatsolver; Adds a thermal (heat transport) simulation region.

See Also
Adding Objects 1532

7.8.54 adddope
Adds a region with constant doping to the simulation environment.

Supported Product: DEVICE

Syntax Description
adddope; Add a constant doping region.

See Also
Adding Objects 1532

7.8.55 adddiffusion
Adds a diffusion region to the simulation environment.

Supported Product: DEVICE

Syntax Description
adddiffusion; Add a diffusion region.

See Also
Adding Objects 1532

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1549

7.8.56 addimportdope
Adds a doping region to the simulation environment where the doping profile has been or will be imported into
DEVICE.

Supported Product: DEVICE

Syntax Description
addimportdope; Add an import primitive to define a doping region.

Once the import doping object is created, the doping data can be imported from a matlab (.mat) file using the GUI or
by assigning a dataset to the object using the importdataset 1590 script command. The dataset can be a rectilinear
or an unstructured dataset. Doping data can be imported into the solver workspace from other tools (e.g. process
simulation) using the Dataset builder 375 .

See Also
Adding Objects 1532 , importdataset 1590 , Dataset builder 375

7.8.57 addbulkgen
Adds a bulk generation region to the simulation environment.

Supported Product: DEVICE

Syntax Description
addbulkgen; Add a bulk generation region.

See Also
Adding Objects 1532

7.8.58 addimportgen
Adds a generation region to the simulation environment where the generation profile has been imported into DEVICE.

Supported Product: DEVICE

Syntax Description
addimportgen; Add an import primitive to define a generation region.

See Also
Adding Objects 1532 , adddeltachargesource 1549

7.8.59 adddeltachargesource
Adds a point generation source to the simulation environment.

Supported Product: DEVICE

Syntax Description
adddeltachargesource; Add a point generation source to the simulation environment.

See Also
Adding Objects 1532 , addimportgen 1549

2003 - 2016 Lumerical Solutions, Inc


1550 Lumerical Knowledge Base

7.8.60 addgridattribute
Adds a grid attribute object to the simulation environment. See the Reference Guide Attributes 399 page for more
information.

Supported Product: FDTD, MODE (np density and temperature only)

Syntax Description
addgridattribute("type"); Adds a grid attribute object to the simulation.
type: Type of attribute to add. Options are "lc orientation",
"permittivity rotation", "matrix transform", "np density", or
"temperature".
addgridattribute("type",dataset); Adds a grid attribute with spatially varying data.
type: Type of attribute to add. Options are "lc orientation",
"permittivity rotation", "matrix transform", "np density", or
"temperature".
dataset: A dataset containing the grid attribute data - see the below
table for details.

Data Simulation Dataset type Name for variables Name for variables
object defining coordinate data defining actual data
Liquid crystal 'lc orientation' grid Rectilinear x, y, z u
orientation (3 attribute
element unit
vector)
Rotation angles 'permittivity Rectilinear x, y, z theta, phi, psi
in radians rotation' grid
attribute
Unitary 'matrix transform' Rectilinear x, y, z U
transform matrix grid attribute
(3x3 tensor)
Charge density 'np density' grid Unstructured x, y, z, elements (see n, p
attribute Dataset builder 375 for more
information)
Temperature in 'temperature' grid Unstructured x, y, z, elements (see N
Kelvin attribute Dataset builder 375 for more
information)

Example
The following script is an excerpt from LCD_twist.lsf in the Twisted Nematic LCD 1955 application example which
defines a spatially varying liquid crystal.
# define x/y/z
x = 0;
y = 0;
z = linspace(0e-6,5e-6,100);

X = meshgrid3dx(x,y,z);
Y = meshgrid3dy(x,y,z);
Z = meshgrid3dz(x,y,z);
n = matrix(length(x),length(y),length(z),3);

# define the orientation function


n(1:length(x),1:length(y),1:length(z),1) = cos(Z*pi*1e5);

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1551

n(1:length(x),1:length(y),1:length(z),2) = sin(Z*pi*1e5);
n(1:length(x),1:length(y),1:length(z),3) = Z;

# create dataset containing orientation vectors and position parameters


LC=rectilineardataset("LC",x,y,z);
LC.addattribute("u",n);

# add LC import grid attribute


addgridattribute("lc orientation",LC);
setnamed("LC attribute","nz",50); # set resolution

See Also
Adding Objects 1532 , Datasets 1461 , importdataset 1590 , cleardataset 1591 , unstructureddataset 1466 , Dataset builder 375

7.8.61 addelement
Adds an element from the INTERCONNECT element library to the simulation environment.

Supported Product: INTERCONNECT

Syntax Description
addelement("element"); Adds an element from the element library.
If no element name is given, this command will add a compound
element by default.

7.8.62 addmodeexpansion
Adds a mode expansion monitor to the simulation environment.

Supported Product: FDTD, MODE

Syntax Description
addmodeexpansion; Adds a mode expansion monitor to the simulation environment.
This function does not return any data.
See Also
Adding Objects 1532 , Using Mode Expansion Monitors 651 , setexpansion 1587 , removeexpansion 1587 , updatemodes 1580 ,
seteigensolver 1582 , geteigensolver 1582

7.8.63 addeffectiveindex
Adds an effective index monitor to the simulation environment.

Supported Product: MODE

Syntax Description
addindex; Adds an effective index monitor to the simulation environment.
This function does not return any data.

See Also
Adding Objects 1532

2003 - 2016 Lumerical Solutions, Inc


1552 Lumerical Knowledge Base

7.8.64 addchargemonitor
Adds a charge monitor to the simulation environment.

Supported Product: DEVICE

Syntax Description
addchargemonitor; Adds a charge monitor to the simulation environment.

See Also
Adding Objects 1532 , addbandstructuremonitor 1552 , addefieldmonitor 1552 , addjfluxmonitor 1552

7.8.65 addefieldmonitor
Adds an electric field monitor to the simulation environment.

Supported Product: DEVICE

Syntax Description
addefieldmonitor; Adds an electric field monitor to the simulation environment.

See Also
Adding Objects 1532 , addbandstructuremonitor 1552 , addchargemonitor 1552 , addjfluxmonitor 1552

7.8.66 addbandstructuremonitor
Adds a band structure monitor to the simulation environment.

Supported Product: DEVICE

Syntax Description
addbandstructuremonitor; Adds a band structure monitor to the simulation environment.

See Also
Adding Objects 1532 , addefieldmonitor 1552 , addchargemonitor 1552 , addjfluxmonitor 1552

7.8.67 addjfluxmonitor
Adds a current flux monitor to the simulation environment.

Supported Product: DEVICE

Syntax Description
addjfluxmonitor; Adds a current flux monitor to the simulation environment.

See Also
Adding Objects 1532 , addefieldmonitor 1552 , addchargemonitor 1552 , addbandstructuremontor 1552

7.8.68 addlayer
Adds a layer to the layer builder object. The command only works if there is a layer builder object and is selected.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1553

Syntax Description
addlayer; Adds a layer to the selected layer builder object
addlayer("name"); Adds a layer named "name"

See Also
addlayerbuilder 1553 , getlayerlist 1591 , setlayer 1591 , loadgdsfile 1592 , getcelllist 1591 , getlayerlist 1591 , setlayer 1591

7.8.69 addlayerbuilder
Adds a layer builder object.

Supported Product: FDTD, MODE, DEVICE

Syntax Description
addlayerbuilder; Adds a layer builder object

See Also
addlayer 1552 , getlayerlist 1591 , setlayer 1591 , loadgdsfile 1592 , getcelllist 1591 , getlayerlist 1591 , setlayer 1591

7.8.70 extractstructure
Creates an a polygon (in 2D) or a planar solid (in 3D) using the finite-element geometric data stored in an
unstructured dataset.

Supported Product: FDTD, MODE, DEVICE

Syntax Description
extractstructure(D); Creates a polygon for 2D data and a planar solid for 3D data.
The parameter D is the input unstructured dataset.
extractstructure(D, Rel_Coplanar_Tol); Same as the above command, but the relative tolerance to
merge coplanar elements will be set to the value specified.
extractstructure(D, Rel_Coplanar_Tol, Same as the above command, but uses Laplacian smoothing
Smoothing_Pass_Count); on the surface mesh. The number of iteration is defined by
the value specified.
extractstructure(D, Rel_Coplanar_Tol, Same as the above command, but the allowed angular
Smoothing_Pass_Count, difference between triangles around a vertex where the vertex
Smoothing_Angle_Coplanar_Tol); can be moved is set to the value specified.
extractstructure(D, Rel_Coplanar_Tol, Same as the above command, but allows re-triangulation of
Smoothing_Pass_Count, the facets.
Smoothing_Angle_Coplanar_Tol,
Allow_Tessalation);

Parameters Type Description


D unstructured dataset Input data that is used to create the structure.
Rel_Coplanar_Tol number (optional) Relative tolerance to merge coplanar
elements. The default value is 1e-6.
Smoothing_Pass_Count number (optional) In 3D only. Enables Laplacian smoothing on

2003 - 2016 Lumerical Solutions, Inc


1554 Lumerical Knowledge Base

the surface mesh before surface extraction. The default


value is 0 and the maximum allowed value is 20.
Smoothing_Angle_Coplana number (optional) Sets the allowed angular difference between
r_Tol triangles around a vertex where the vertex can be
moved. The default value is 0.001.
Allow_Tessalation number (optional) In 3D only. Allows re-triangulation of the
facets.

Run the script file (extract_2d.lsf) with the DEVICE project file (geom2d.ldev) provided below for a 2D example of this
command. Here, we use the ID of the "Device region" objects to single out any part of the structure with ID = 3,
which would correspond to the semiconductor material in this example and then construct an object in that shape.

Associated files
extract_2d.lsf
geom2d.ldev

See Also
Dataset builder 375 , Datasets 1461

7.8.71 stlimport
Adds a structure to the simulation environment with structure geometry loaded from specified STL file.

Supported Product: FDTD, MODE, DEVICE

Syntax Description
stlimport(filename,scalingFactor, Add a new structure from specified STL type CAD file.
vertexRadius,debugFlag);

Parameter Default Type Description


value
filename required string Name of the STL CAD file.
scalingFactor optional 1e-6 number An STL file does not contain a unit. When imported to
Lumerical's software, the unit is micron by default. To
have the unit in nanometer, set scaling_factor 1e-9.
vertexRadius optional 1e-12 length (in m) Vertices may be shared by multiple triangles so the
same vertex may be loaded multiple times for different
triangles. The vertexRadius is the minimum distance
between two vertices so that they are considered to be
distinct vertices.
debugFlag optional false boolean If true, the following data will be printed to the script
prompt:
-Input Vertex Count (total number of vertices in the file)
-Triangles (total number of triangles)
-Filtered Vertices (number of unique vertices)
-Vertex Collisions (Input Vertex Count minus Filtered
Vertices)
-Invalid Triangles
-Expected Vertex Collisions

If the number of invalid triangles is larger than 0, try


adjusting the vertexRadius parameter and importing the

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1555

object again.

Note: If there are a large number of triangles in the STL


file, the script function can take longer to run when
debugFlag is set to true.

See Also
Adding Objects 1532 , readstltriangles 1451

7.8.72 addwaveguide
Adds a waveguide in the simulation space.

Supported Product: MODE, DEVICE

Syntax Description
addwaveguide; Adds a waveguide in the simulation space.

See Also
Adding Objects 1532

7.8.73 add2drect
Adds a 2D rectangle in the simulation space.

Supported Product: FDTD, MODE, DEVICE

Syntax Description
add2drect; Adds a 2D rectangle in simulation space.

See Also
Adding Objects 1532

7.8.74 add2dpoly
Adds a 2D polygon in the simulation space.

Supported Product: FDTD, MODE, DEVICE

Syntax Description
add2drect; Adds a 2D polygon in simulation space.

See Also
Adding Objects 1532 , Structure - 2D polygon 351 , Structure - 2D rectangle 349

7.8.75 importcsvlc
This command adds a LC grid attribute or analysis group containing a liquid crystal structure and LC grid attribute
with data imported from a specified csv (comma separated value) file without using the GUI import wizard. The
arguments allow you to make the same choices that are available in the GUI. For more information about the GUI
import wizard, see Import object - Liquid crystal from CSV 502 .

Supported Product: FDTD

2003 - 2016 Lumerical Solutions, Inc


1556 Lumerical Knowledge Base

Syntax Description
importcsvlc(filename); Import the csv file from the specified filename. All arguments after the filename are
optional.
out = Import the csv file but specify if it should be imported as a single grid attribute or added
importcsvlc(filename,optio to an analysis group LC structure.
n);
out = Import the csv file and specify if it was originally exported from the x-z plane. This
importcsvlc(filename,optio option only applies to 2D datasets but is critical to get the orientation of the LC
n,exported_from_xz_plane structure correct when it is imported into FDTD Solutions in the x-y plane.
);
out = Import the csv file with additional axis rotations.
importcsvlc(filename,optio
n,exported_from_xz_plane
,rotations);

Parameter Default value Type Description


filename required string The name of the csv file to import. May contain complete
path to file, or path relative to current working directory
option true boolean When set to 1 (true) the import will create an analysis
group structure with the grid attribute and a rectangle, the
same as when using the graphical import. When set to 0
(false) it will import only the grid attribute. This argument is
optional
exported_from_xz_plane true boolean Applies to 2D datasets only. This indicates that the data
was originally exported from the x-z plane and this should
be accounted for when it is imported into the x-y plane.
rotations [0,0,0] matrix The optional argument allows you to specify 3 rotations
around the x, y and z axes respectively that are used
exactly the same way as the graphical import wizard. The
matrix must have 3 elements and each value will be
rounded to the nearest 90 degrees.

Example
# import the grid attribute into an LC analyis group and rotate 90 degrees about the x ax
importcsvlc("myfile.csv",true,true,[90,0,0]);

See Also
addgridattribute 1550 , cleardataset 1591 , importdataset 1590

7.9 Manipulating objects


Physical structures, sources, monitors, and the simulation volume itself are considered objects. Objects generally
have properties that can be modified.

Selecting and deleting objects


Command Description
groupscope 1563 Changes the group scope.
deleteall 1563 Deletes all objects in the current group scope.
delete 1563 Deletes the selected objects.
deleteallbc 1563 Deletes all existing boundary conditions in DEVICE.

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1557

deletebc 1561 Deletes named boundary condition in DEVICE.


selectall 1564 Selects all objects in the current group scope.
unselectall 1564 Unselect all objects.
select 1564 Selects objects with a given name in the current group scope.
selectpartial 1565 Selects any objects where partialname can be found in the name.
shiftselect 1565 The same as select("name"); but does not unselect currently selected
objects. Can be used to select multiple objects.
shiftselectpartial 1565 The same as selectpartial("partialname"); but does not unselect currently
selected objects. Can be used to select multiple objects.

Moving and copying objects


Command Description
move 1566 Move an object.
copy 1566 Copy an object.
addtogroup 1567 Add an object/objects into a group.

Object properties
Command Description
adduserprop 1567 Add a user property to a structure group.
addanalysisprop 1567 Adds a analysis property to a selected object group.
addanalysisresult 1568 Adds a new result to an analysis group.
set 1568 Set a property of selected objects.
setbc 1560 Set the property of a boundary condition in DEVICE.
setnamed 1568 Set a property of any objects with a given name.
setcontact 1559 Set a property of an electrical contact.
setglobalmonitor 1569 Set global monitor properties.
setglobalsource 1569 Set global source properties.
setmodes 1570 Set mode labels.
setposition 1570 Set an element's vertical and horizontal positions.
setrectangle 1570 Set width and height of an element rectangle.
setactivesolver 1588 Set the specified solver as the active solver.
getactivesolver 1588 Get the active solver.
runsetup 1571 Force group setup scripts to run.
get 1571 Get a property of selected objects.
getbc 1562 Get a property of the named boundary condition in DEVICE
getcontact Get a property of an electrical contact.
getnumber 1572 Get the number of selected objects.
getnamed 1572 Get a property of any objects with a given name.
getnamednumber 1572 Get the number of objects with a given name.
getglobalmonitor 1573 Get global monitor properties.

2003 - 2016 Lumerical Solutions, Inc


1558 Lumerical Knowledge Base

getglobalsource 1573 Get global source properties.


getposition 1570 Get current horizontal or vertical position of an element.
getrectangle 1571 Get the width or height of an element rectangle.
haveproperty 1573 Returns the number of selected objects with a particular property.
importsurface 1574 Import surface data from a file. Only applies to import primitives.
importsurface2 1574 Import surface data from script variables. Only applies to import primitives.
importnk 1575 Import n and k data from a file. Only applies to import primitives.
importnk2 1576 Import n and k data from script variables. Only applies to import primitives.
setsourcesignal 1580 Set a custom source time signal.
updatesourcemode 1579 Updates the mode for a mode source.
clearsourcedata 1581 Clears source data for an imported source, or the selected mode for a mode
source.
setexpansion 1587 Associates a DFT monitor with a mode expansion monitor.
removeexpansion 1587 Removes a DFT monitor from a mode expansion monitor.
getname 1588 Returns the dataset name of the variable selected.
setname 1588 Sets the dataset name of the variable selected.
importdataset 1590 Imports an unstructured dataset named 'charge' to an 'eh Density' grid
attribute.
cleardataset 1591 Clear the dataset from any current grid attribute.
getcelllist 1591 Returns the list of cells associated with the loaded gds file.
getlayerlist 1591 Returns the list of layers associated with the loaded gds file.
setlayer 1591 Sets the properties of a specified layer of the selected layer builder object.
loadgdsfile 1592 Loads specified gds file into the layer builder object.
getcompositionfraction 1592 Get the composition fraction of two materials in an alloy.
setcompositionfraction 1592 Set the composition fraction of two materials in an alloy.

Controlling the view


Command Description
redraw 1583 Redraw graphics.
redrawoff 1583 Turn automatic redraw off.
redrawon 1583 Turn automatic redraw on.
redrawmode 1583 Get the current status of automatic redrawing; turn it off or on
setview 1584 Control how the graphics are drawn in the Layout Editor
getview 1584 Get the current view control properties from the Layout Editor.
orbit 1585 A built in function to do an orbit of the perspective view with option of creating
a movie.
framerate 1585 Measure graphics performance of your computer.

Element/connection properties
Command Description

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1559

set 1568 Set a property of selected element.


setnamed 1568 Set a property of any element with a given name.
get 1571 Get a property of selected element.
getnamed 1572 Get a property of any element with a given name.
addport 1586 Add a port to a compound/scripted element.
removeport 1586 Remove a port from a compound/scripted element.
connect 1587 Connects one element to another via the specified ports.
disconnect 1587 Removed a specific connection between two elements.
autoarrange 1589 Arranges port positions and dimensions of compound or scripted elements
automatically
createcompound 1589 Creates a compound element with the currently selected elements.
addproperty 1589 Adds a property to a compound or to a scripted element.
setexpression 1589 Sets the selected element's specified property to the mentioned expression.
flipelement 1566 Flips an element in the schematic editor.
rotateelement 1566 Rotates an element in the schematic editor.
seticon 1593 Set a user defined icon for an element.

Undo and redo commands


Command Description
undo 1585 Undo last modify object command.
redo 1586 Redo command after an undo.

7.9.1 setcontact
Sets the properties of the electrical contacts. This command will return an error in analysis mode.

Syntax Description
setcontact("contact name","contact type", Sets the property of the specified contact with the contact
"property name", property value); type to the specified property value. Contact type can be dc
or transient.
setcontact("contact name", Sets the global property of the specified contact. Global
"global_property", property value) property can be "name","force ohmic", or "geometry".

Add a new contact. Don't change the name or anything. Then the following command will return all the available
properties to set. you will notice that not all of these are labeled the same in the GUI. For example the range start
and stop are just labeled start and stop in the GUI.

?setcontact('new_contact','dc');
dc mode
enable rse
enable rsh
enabled
fixed contact
force ohmic
name
range interval

2003 - 2016 Lumerical Solutions, Inc


1560 Lumerical Knowledge Base

range num points


range start
range stop
rse
rsh
voltage
voltage table

Similarly, In transient mode:

?setcontact('new_contact','transient');
cse enable transient
cse table
cse time steps
csh enable transient
csh table
csh time steps
enable rse
enable rsh
enabled
fixed contact
force ohmic
name
rse
rse enable transient
rse table
rse time steps
rsh
rsh enable transient
rsh table
rsh time steps
voltage
voltage enable transient
voltage table
voltage time steps

See Also
getcontact

Available in
FDTD Solutions No
MODE Solutions No
INTERCONNECT No
DEVICE Yes

7.9.2 setbc
Sets the properties of the boundary conditions. This command will return an error in analysis mode.

Syntax Description
setbc("bc_name", "global_property", property Sets the global property of the specified boundary condition.
value); Global property can be "name", or "geometry".

setbc("bc_name", "bc_type", "property_name", Sets the property of the specified boundary condition with the

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1561

property value) boundary condition type to the specified property value.


Boundary condition type can be 'steady state' or 'transient'.

There are two groups of properties that belong to each boundary condition. Global properties that are required for all
boundary conditions and local properties that is specific to the type of the boundary condition.

Global property
Global properties include "name" and "geometry" of the boundary condition. The "geometry" property defines where
the boundary condition will be applied. It can be one edge of the simulation region or the intersection of a geometry
with an edge of the simulation region. The convention for defining the geometry follows the format
solid:solver_boundary.

# The following three lines create a boundary condition, set the name of to 'left' and as

addbc;
setbc("new_boundary","left");
setbc("left","geometry",":-x");

# The following line assigns the 'left' boundary condition to the intersection between th

setbc("left","geometry","substrate:-x");

Local property
Local properties include the type (model) of the boundary condition (fixed temperature, convection, ...) and the
different parameters used in the different models. The different models and parameters can be defined for both
'steady state' or 'transient' conditions. To learn about the different boundary condition models and the parameters
used, check the boundary condition pages for the CHARGE 686 and the HEAT 694 solvers.

# The following commands define the 'left' boundary condition to enforce a fixed temperat

setbc(left,steady state,model,fixed temperature);


setbc(left,steady state,temperature,300);

See Also
addbc 1540

7.9.3 deletebc
Deletes named boundary condition in DEVICE.

Supported Product: DEVICE

Syntax Description
deletebc("bc_name"); Deletes the boundary condition named "bc_name".

See Also
Manipulating objects 1556 , deleteallbc 1563

2003 - 2016 Lumerical Solutions, Inc


1562 Lumerical Knowledge Base

7.9.4 getbc
Get the properties of a specific boundary condition in DEVICE.

Supported Product: DEVICE

Syntax Description
?getbc; Returns a list of names of the existing boundary conditions.

?getbc("bc_type"); Returns a list of names of the boundary conditions that fall under
the category defined by the input argument. The options for
"bc_type" are 'thermal boundary', 'voltage boundary', and 'electrical
contact'.

out = get("bc_name", "global Gets the global property (e.g. geometry) of the desired boundary
property_name"); condition.

out = get("bc_name", "bc_mode", Gets the local property of the desired boundary condition for the
"local property_name"); defined mode ("steady state" or "transient").

For example, Lets assume that we have 6 boundary conditions in a DEVICE project. Using the ?getbc command
will return the name of all the boundary conditions,

?getbc;
anode, cathode, top_conv, fixed_temp, cont_1, cont_2

If we want to see a list of a particular type of boundary condition (say, electrical contact),

?getbc("electrical contact");
anode, cathode

To see a global property such as the geometry to which a boundary condition is applied to,

?getbc('anode','geometry');
anode:
?getbc('fixed_temp','geometry');
:-z
?getbc('top_conv','geometry');
waveguide:+z

The notation for the geometry follows the format solid:solver_boundary. Therefore, we can see that the anode BC
applies to the anode geometry, the fixed_temp BC applies to the -z solver boundary, and the top_conv BC applies to
the interface between waveguide geometry and +z solver boundary.

To see a local property such as the voltage applied at the anode BC,

?getbc("anode","steady state","voltage");

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1563

result:
2

See Also
Manipulating objects 1556 , getnamed 1572 , addbc 1540 , setbc 1560

7.9.5 deleteallbc
Deletes all existing boundary conditions in DEVICE.

Supported Product: DEVICE

Syntax Description
deleteallbc; Deletes all the existing boundary conditions.

See Also
Manipulating objects 1556 , deletebc 1561

7.9.6 groupscope
Changes the group scope. Script commands that add or modify simulation object use the groupscope property to
know where to act within the object tree. For example, if you want to delete everything within a particular group, set
the groupscope to that group (i.e. ::model::my_group). If you want to delete all objects in the simulation, set the
group scope the root level (i.e. ::model).

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
?groupscope; returns the current group scope
groupscope("group_name"); changes the group scope

See Also
Manipulating objects 1556 , delete 1563 , selectall 1564 , select 1564

7.9.7 deleteall
Deletes all objects in the current group scope.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
deleteall; Deletes all objects in the current group scope.
This function does not return any data.

See Also
Manipulating objects 1556 , groupscope 1563

7.9.8 delete
Deletes selected objects.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

2003 - 2016 Lumerical Solutions, Inc


1564 Lumerical Knowledge Base

Syntax Description
delete; Deletes selected objects.
This function does not return any data.

See Also
Manipulating objects 1556 , groupscope 1563

7.9.9 selectall
Selects all objects in the current group scope.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
selectall; Selects all objects in the current group scope.
This function does not return any data.

See Also
Manipulating objects 1556 , groupscope 1563

7.9.10 unselectall
Unselect all objects and groups.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
unselectall; Unselects all objects and groups.
This function does not return any data.

See Also
Manipulating objects 1556

7.9.11 select
Selects objects with a given name in the current group scope. A failed select command will have the same result as
the unselectall command.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
select("name"); Selects objects with the name "name" in the current group scope.
This function does not return any data.
select("group name::name"); Selects all objects with the name "name" located in the group named
"group name". The group named "group name" must be in the current
group scope.

See Also
Manipulating objects 1556 , groupscope 1563 , unselectall 1564

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1565

7.9.12 selectpartial
Selects any objects with a given partial name.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
selectpartial("partialname"); Selects any objects where "partialname" can be found in the object
name provided the object is not in a group. To select objects located in
groups see the command below.
This function does not return any data.
selectpartial("partialgroupname::pa Selects any objects where "partialgroupname" can be found in the
rtialname"); group name and "partialname" can be found in the object name.
See Also
Manipulating objects 1556 , groupscope 1563

7.9.13 shiftselect
Same as select, but does not unselect other currently selected objects. Note that only objects from the same
"group" can be selected simultaneously.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
shiftselect("name"); The same as select("name"), but does not unselect currently selected
objects. Can be used to select multiple objects.
This function does not return any data.
shiftselect("group name::name"); The same as select("groupname::name"), but does not unselect
currently selected objects.

See Also
Manipulating objects 1556 , groupscope 1563

7.9.14 shiftselectpartial
Same as selectpartial, but does not unselect other currently selected objects.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
shiftselectpartial("partialname"); The same as selectpartial("partialname"), but does not unselect
currently selected objects. Can be used to select multiple objects.
This function does not return any data.
shiftselectpartial("partialgroupnam The same as selectpartial("partialgroupname::partialname"), but does
e::partialname"); not unselect currently selected objects. Can be used to select multiple
objects.

See Also
Manipulating objects 1556 , groupscope 1563

2003 - 2016 Lumerical Solutions, Inc


1566 Lumerical Knowledge Base

7.9.15 flipelement
Flip element in the schematic editor.

Supported Product: INTERCONNECT

Syntax Description
flipelement("element"); Flips element in the schematic editor.

See Also
Manipulating objects 1556 , rotateelement 1566

7.9.16 rotateelement
Rotates element in the schematic editor.

Supported Product: INTERCONNECT

Syntax Description
rotateelement("element"); Rotates element in the schematic editor.

See Also
Manipulating objects 1556 , flipelement 1566

7.9.17 move
Move selected objects.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
move(dx); In 2D or 3D, move by dx
move(dx,dy); In 2D or 3D, move by dx and dy.
This function does not return any data.
move(dx,dy,dz); In 3D, move by dx, dy, and dz.
In 2D, dz will be ignored.

See Also
Manipulating objects 1556 , copy 1566 , select 1564

7.9.18 copy
Create a copy of the selected objects. The copied objects will typically be identical (same name, position, etc). For
some objects that must have a unique name, '_1' will be appended to the name.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
copy; Copy the selected objects.
copy(dx); Same as copy; but with a specified move of dx.
copy(dx,dy); Same as copy; but with a specified move of dx, dy.

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1567

copy(dx,dy,dz); Same as copy; but with a specified move of dx, dy, dz.

See Also
Manipulating objects 1556 , move 1566 , select 1564 , cp (copy files) 1432 , copytoclipboard 1441

7.9.19 addtogroup
Add selected objects to a group.

Supported Product: FDTD, MODE, DEVICE

Syntax Description
addtogroup("group name"); Adds selected object(s) to a group. If a group with name "group name"
already exists, then the objects are added to the existing group.
Otherwise, a group named "group name" is created.
This function does not return any data.

See Also
Manipulating objects 1556 , addgroup 1535 , addstructuregroup 1536 , addanalysisgroup 1536 , adduserprop 1567 , runsetup 1571

7.9.20 adduserprop
Adds a user defined custom property to the setup user defined structure and analysis groups.

Supported Product: FDTD, MODE, DEVICE

Syntax Description
adduserprop("property name", Adds a user property to a selected structure group. The name is set to
type, value); "property name". The type is an integer from 0 to 5. The corresponding
variable types are
0 number
1 text
2 length
3 time
4 frequency
5 material
The value of the user property is set to value.

See Also
Manipulating objects 1556 , addstructuregroup 1536 , runsetup 1571

7.9.21 addanalysisprop
Adds a user defined custom analysis property to the setup user defined in structure and analysis groups.

Supported Product: FDTD, MODE, DEVICE

Syntax Description
addanalysisprop("property name", Adds a analysis property to a selected object group. The name is set
type, value); to "property name". The type is an integer from 0 to 5. The
corresponding variable types are
0 number
1 text

2003 - 2016 Lumerical Solutions, Inc


1568 Lumerical Knowledge Base

2 length
3 time
4 frequency
5 material
The value of the user property is set to value.

See Also
Manipulating objects 1556 , addstructuregroup 1536 , runsetup 1571

7.9.22 addanalysisresult
Adds a new result to an analysis group object.

Supported Product: FDTD, MODE, DEVICE

Syntax Description
addanalysisresult("A"); Adds a new result called "A" to an analysis group.

See Also
Manipulating objects 1556 , addstructuregroup 1536 , runsetup 1571

7.9.23 set
Set a property of currently selected objects. This command will return an error in analysis mode.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
?set; Returns a list of the properties of the selected object(s).
set("property",value); This will set the properties of a currently selected object, including pull-
downs and check boxes. It cannot be used to set the value of a
selected object in a group.
Value can be a number or string. This function does not return any
data.
set("property",value,i); This form can be used to set the property of the ith selected object
when multiple objects are selected. It cannot be used to set 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 1556 , get 1571 , setnamed 1568 , setmaterial 1672 , addmaterial 1672 , haveproperty 1573 , runsetup 1571 ,
runanalysis 1647

7.9.24 setnamed
Like the set command, except that the object name must be specified. This command will return an error in
analysis mode.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1569

?setnamed("name"); Returns a list of the properties of the objects called name.


setnamed("name", "property", The same as set, but acts on objects with a specific name, instead of
value); selected objects.
setnamed("name", "property", This form can be used to set the property of the ith named object when
value,i); 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", The same as set, but acts on objects within the group named
"property", value); "groupname" that are named "name", instead of selected objects.
setnamed("groupname::name", This form can be used to set the property of the ith object with the
"property", value,i); 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 1556 , set 1568 , get 1571 , getnamed 1572 , getnamednumber 1572

7.9.25 setglobalmonitor
Set global monitor properties. This command will return an error in analysis mode.

Supported Product: FDTD, MODE

Syntax Description
?setglobalmonitor; Returns a list of the global monitor properties
setglobalmonitor("property",value); Set the global monitor property named "property" to a value.
This function does not return any data.

See Also
Manipulating objects 1556 , set 1568 , getglobalmonitor 1573 , setglobalsource 1569 , getglobalsource 1573

7.9.26 setglobalsource
Set global source properties. This command will return an error in analysis mode.

Supported Product: FDTD, MODE

Syntax Description
?setglobalsource; Returns a list of the global source properties
setglobalsource("property",value); Set the global source property named "property" to a value.
This function does not return any data.

See Also
Manipulating objects 1556 , set 1568 , setglobalmonitor 1569 , getglobalmonitor 1573 , getglobalsource 1573

2003 - 2016 Lumerical Solutions, Inc


1570 Lumerical Knowledge Base

7.9.27 setmodes
Set mode labels.

Supported Product: INTERCONNECT

Syntax Description
setmodes (TE,TM); Set a list of comma separated mode labels that will share the same s-
parameters. Orthogonal identifies are associated to each mode from 1
to number of modes.

See Also
Manipulating objects 1556

7.9.28 setposition
Set horizontal and vertical positions of an element.

Supported Product: INTERCONNECT

Syntax Description
setposition("element",x,y); Set an element vertical and horizontal positions.

See Also
Manipulating objects 1556 , getposition 1570 , setrectangle 1570

7.9.29 setrectangle
Set the width or height of an element rectangle.

Supported Product: INTERCONNECT

Syntax Description
setrectangle ("element",w,h); Sets the width (w) and height (h) of an element rectangle.

See Also
Manipulating objects 1556 , getrectangle 1571 , setposition 1570

7.9.30 getposition
Get the current horizontal or vertical position of an element.

Supported Product: INTERCONNECT

Syntax Description
out=getposition("element",x); Returns the current horizontal position of an element.
out=getposition("element",y); Returns the current vertical position of an element.

See Also
Manipulating objects 1556 , setposition 1570 , getrectangle 1571

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1571

7.9.31 getrectangle
Get the width or height of an element rectangle.

Supported Product: INTERCONNECT

Syntax Description
out=getrectangle ("element",w); Returns the width of an element rectangle.
out=getrectangle ("element",h); Returns the height of an element rectangle.

See Also
Manipulating objects 1556 , setrectangle 1570 , getposition 1570

7.9.32 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.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
?get; Returns a list of the properties of the selected object(s).
out = get("property"); Gets the requested property value from the currently selected object. It
cannot be used to get the property value of a selected object in a
group.
If multiple objects are selected get("property") is the same as
get("property",i), where i is the number of the first selected objects with
the requested property.
Out can be a matrix or a string, depending on the property requested.
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 1556 , getnumber 1572 , getnamed 1572 , getnamednumber 1572 , set 1568 , haveproperty 1573 , runsetup 1571

7.9.33 runsetup
Runsetup forces the setup scripts of structure and analysis groups to run.

In most cases, it is not necessary to use this function, as group setup scripts automatically re-run at the end of
script, if the object has been modified. It is only necessary to use this function when you need to force the setup
script to run before the end of your script file.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
runsetup; Forces setup scripts of groups to run.

2003 - 2016 Lumerical Solutions, Inc


1572 Lumerical Knowledge Base

See Also
Manipulating objects 1556 , get 1571 , set 1568 , runanalysis 1647

7.9.34 getnumber
Get the number of objects that are selected.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
out = getnumber; Returns the number of objects that are selected;

See Also
Manipulating objects 1556 , get 1571 , getnamed 1572 , getnamednumber 1572 , set 1568

7.9.35 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.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
?getnamed("name"); Returns a list of the properties of the objects called name.
out = getnamed("name", The same as get, but acts on objects with a specific name, instead of
"property"); selected objects.
out=getnamed("name", "property", Gets the property of the ith named object. Use this to act on a series
i); 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 = The same as get, but acts on objects named "name" located in the
getnamed("groupname::name", group "groupname", instead of selected objects.
"property");
out = Gets the property of the ith object named "name" located in the group
getnamed("groupname::name", "groupname". Use this to act on a series of objects.
"property"); 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 1556 , get 1571 , getnumber 1572 , getnamednumber 1572 , set 1568 , setnamed 1568

7.9.36 getnamednumber
Get the number of objects with a given name.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1573

Syntax Description
out = getnamednumber( "name"); The same as getnumber, but acts on objects with a specific name,
instead of selected objects.
out = The same as getnumber, but acts on all objects named "name" in the
getnamednumber( "groupname::na group "groupname", instead of selected objects.
me");

See Also
Manipulating objects 1556 , get 1571 , getnamed 1572 , getnumber 1572 , set 1568 , setnamed 1568

7.9.37 getglobalmonitor
Set global monitor properties. This command will return an error in analysis mode.

Supported Product: FDTD, MODE

Syntax Description
?getglobalmonitor; Returns a list of the global monitor properties
?getglobalmonitor("property"); Returns the value of the requested property.

See Also
Manipulating objects 1556 , get 1571 , setglobalmonitor 1569 , setglobalsource 1569 , getglobalsource 1573

7.9.38 getglobalsource
Set global monitor properties. This command will return an error in analysis mode.

Supported Product: FDTD, MODE

Syntax Description
?getglobalsource; Returns a list of the global source properties
?getglobalsource("property"); Returns the value of the requested property.

See Also
Manipulating objects 1556 , get 1571 , setglobalmonitor 1569 , getglobalmonitor 1573 , setglobalsource 1569

7.9.39 getsolver
Returns the solver that is currently active.

Supported Product: MODE

Syntax Description
?getsolver; Returns the solver that is currently active.

7.9.40 haveproperty
Returns the number of selected objects with a particular property.

Supported Product: FDTD, MODE, DEVICE

Syntax Description

2003 - 2016 Lumerical Solutions, Inc


1574 Lumerical Knowledge Base

out = haveproperty("property"); Returns the number of selected objects with the specified property.

See Also
Manipulating objects 1556 , get 1571 , set 1568

7.9.41 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.

Supported Product: FDTD, MODE

Syntax Description
out = Import a surface from the file in the string filename in a three dimensional
importsurface(filename,upper_surf simulation. All arguments after filename are optional.
ace,file_units,x0,y0,z0,invertXY);
out = Import a surface from the file in the string filename in a two dimensional
importsurface(filename,upper_surf simulation. All arguments after filename are optional.
ace,file_units,x0,y0,invertXY);

Parameter Default value Type Description


filename required string name of the file with surface data to import. May contain
complete path to file, or path relative to current working
directory
upper_surface 1 number This optional argument should be 1 to import the upper
surface and 0 to import the lower surface.
file_units "m" string The optional string argument file_units can be "m", "cm,
"mm", "microns" or "nm" to specify the units in the file.
x0 0 number The optional arguments x0, y0 and z0 specify the data
origin in the global coordinates of the Graphical Layout
Editor. For example, if you are importing a surface defined
by an AFM that is on a slab of Si that ranges from 0 to 2
microns, you should set z0 to 2 microns.
y0 0 number
z0 0 number
invertXY 0 number The optional argument invertXY can be used to reverse how
the x and y axes are read from the file.

See Also
Manipulating objects 1556 , importsurface2 1574

7.9.42 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.

Supported Product: FDTD, MODE

Syntax Description

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1575

out = Import a surface from the variables Z, x and y in three dimensional


importsurface2(Z,x,y,upper_surfac simulations. The upper_surface argument is optional.
e);

Parameter Default value Type Description


Z required matrix The two dimensional matrix that defines the surface.
x required matrix If Z is an NxM matrix, then x should have dimension Nx1.
For two dimensional simulation, if Y is an Nx1 matrix then x
should have dimension Nx1.
y required matrix If Z is an NxM matrix, then y should have dimension Mx1.
upper_surface 1 number This optional argument should be 1 to import the upper
surface and 0 to import the lower surface.
Y required matrix This argument should be an Nx1 matrix that defines the
surface for two dimensional simulations.

See Also
Manipulating objects 1556 , importsurface 1574

7.9.43 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. It is possible to import anisotropic nk data.

Supported Product: FDTD, MODE

Syntax Description
out = importnk(filename,file_units Import n (and k) data from filename in three dimensional simulations. All
,x0,y0,z0,reverse_index_order); arguments after the filename are optional.
out = importnk(filename,file_units Import n and k data from filename in two dimensional simulations. All
,x0,y0,reverse_index_order); arguments after the filename are optional.

Parameter Default value Type Description


filename required string name of the file with n (and k) data to import. May contain
complete path to file, or path relative to current working
directory
file_units "m" string The optional string argument file_units can be "m", "cm,
"mm", "microns" or "nm" to specify the units in the file.
x0 0 number The optional arguments x0, y0 and z0 specify the data
origin in the global coordinates of the Graphical Layout
Editor. For example, if you defined your volume with respect
to a particular point in space, for example (0,0,-5) microns,
then you should set z0 to -5 microns.
y0 0 number
z0 0 number
reverse_index_order 0 number The optional argument reverse_index_order can be set to 1
to reverse how the indices are interpreted in the file. It is
best to verify the correct setting with a graphical import
before using the script command.

2003 - 2016 Lumerical Solutions, Inc


1576 Lumerical Knowledge Base

Examples
Import object - Spatial (n,k) data 492

See Also
Manipulating objects 1556 , importnk2 1576

7.9.44 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. It is possible to import
anisotropic nk data.

Supported Product: FDTD, MODE

Syntax Description
out = importnk2(n,x,y,z); Import n (and k) data from script variables in three dimensional simulations. All
arguments are required.
out = importnk2(n,x,y); Import n (and k) data from script variables in two dimensional simulations. All
arguments are required.

Parameter Default value Type Description


n required matrix The refractive index. If it is complex-valued, then the
imaginary part is interpreted as k. For isotropic material,
this should be an NxMxP matrix in three dimensions and
an NxM matrix in two dimensions. For anisotropic material,
this should be an NxMxPx3 matrix in three dimensions and
an NxMx3 matrix in two dimensions.
x required matrix If n is an NxMxP matrix, then x should have dimension
Nx1. For two dimensional simulation, if n is an NxM matrix
then x should have dimension Nx1. Values of x must be
uniformly spaced.
y required matrix If n is an NxMxP matrix, then y should have dimension
Mx1. For two dimensional simulation, if n is an NxM matrix
then y should have dimension Mx1. Values of y must be
uniformly spaced.
z 1 number If n is an NxMxP matrix, then z should have dimension
Px1. Values of z must be uniformly spaced.

Examples
Import object - Spatial (n,k) data 492

See Also
Manipulating objects 1556 , importnk 1575

7.9.45 importnkobfuscated
This command is identical to importnk but makes it possible to import data from a file that has been obfuscated. For
details on how to obfuscate the data files, please see the Online Help in the User Guide, Structures section.

Supported Product: available in FDTD Solutions only, for versions 8.6.3 and higher

Syntax Description
out = Import n (and k) data from filename in three dimensional simulations. All arguments

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1577

importnkobfuscated(key,fil after the filename are optional.


ename,file_units,x0,y0,z0,
reverse_index_order);

Parameter Default value Type Description


key required string The key that is used to decrypt the obfuscated file.
filename required string name of the file with n (and k) data to import. May contain
complete path to file, or path relative to current working
directory
file_units "m" string The optional string argument file_units can be "m", "cm,
"mm", "microns" or "nm" to specify the units in the file.
x0 0 number The optional arguments x0, y0 and z0 specify the data
origin in the global coordinates of the Graphical Layout
Editor. For example, if you defined your volume with respect
to a particular point in space, for example (0,0,-5) microns,
then you should set z0 to -5 microns.
y0 0 number
z0 0 number
reverse_index_order 0 number The optional argument reverse_index_order can be set to 1
to reverse how the indices are interpreted in the file. It is
best to verify the correct setting with a graphical import
before using the script command.

See Also
Manipulating objects 1556 , importnk 1575

7.9.46 importbinary
Import binary data (1s and 0s) over an entire volume from a file. The object will be present wherever the binary data is
1 and not when it is 0. 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.

Supported Product: FDTD, MODE

Syntax Description
out = Import binary data from filename in three dimensional simulations. All
importbinary(filename,file_units,x0, arguments after the filename are optional.
y0,z0,reverse_index_order);

Parameter Default value Type Description


filename required string name of the file with binary data to import. May contain
complete path to file, or path relative to current working
directory
file_units "m" string The optional string argument file_units can be "m", "cm,
"mm", "microns" or "nm" to specify the units in the file.
x0 0 number The optional arguments x0, y0 and z0 specify the data
origin in the global coordinates of the Graphical Layout
Editor. For example, if you defined your volume with respect
to a particular point in space, for example (0,0,-5) microns,

2003 - 2016 Lumerical Solutions, Inc


1578 Lumerical Knowledge Base

then you should set z0 to -5 microns.


y0 0 number
z0 0 number
reverse_index_order 0 number The optional argument reverse_index_order can be set to 1
to reverse how the indices are interpreted in the file. It is
best to verify the correct setting with a graphical import
before using the script command.

See Also
Manipulating objects 1556 , importbinary2 1578

7.9.47 importbinary2
Import binary data (1s and 0s) over an entire volume from script variables. The object will be present wherever the
binary data is 1 and not when it is 0. 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.

Supported Product: FDTD, MODE

Syntax Description
out = importbinary2(binary,x,y,z); Import binary data from script variables in three dimensional simulations. All
arguments are required.

Parameter Default value Type Description


binary required matrix The binary data This should be an NxMxP matrix in three
dimensions and an NxM matrix in two dimensions. It should
have only values of 0 or 1. If other values are present, all
non-zero values will be interpreted as 1.
x required matrix If n is an NxMxP matrix, then x should have dimension
Nx1. For two dimensional simulation, if n is an NxM matrix
then x should have dimension Nx1. Values of x must be
uniformly spaced.
y required matrix If n is an NxMxP matrix, then y should have dimension
Mx1. For two dimensional simulation, if n is an NxM matrix
then y should have dimension Mx1. Values of y must be
uniformly spaced.
z 1 number If n is an NxMxP matrix, then z should have dimension
Px1. Values of z must be uniformly spaced.

See Also
Manipulating objects 1556 , importbinary 1577

7.9.48 importbinaryobfuscated
This command is identical to importbinary but makes it possible to import data from a file that has been obfuscated.
For details on how to obfuscate the data files, please see the Online Help in the User Guide, Structures section.

Supported Product: available in FDTD Solutions only, for versions 8.6.3 and higher

Syntax Description

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1579

out = Import binary data from filename in three dimensional simulations. All arguments after
importbinaryobfuscated(k the filename are optional.
ey,filename,file_units,x0,
y0,z0,reverse_index_orde
r);

Parameter Default value Type Description


key required string The key that is used to decrypt the obfuscated file.
filename required string name of the file with binary data to import. May contain
complete path to file, or path relative to current working
directory
file_units "m" string The optional string argument file_units can be "m", "cm,
"mm", "microns" or "nm" to specify the units in the file.
x0 0 number The optional arguments x0, y0 and z0 specify the data
origin in the global coordinates of the Graphical Layout
Editor. For example, if you defined your volume with respect
to a particular point in space, for example (0,0,-5) microns,
then you should set z0 to -5 microns.
y0 0 number
z0 0 number
reverse_index_order 0 number The optional argument reverse_index_order can be set to 1
to reverse how the indices are interpreted in the file. It is
best to verify the correct setting with a graphical import
before using the script command.

See Also
Manipulating objects 1556 , importbinary 1577

7.9.49 updatesourcemode
Updates the mode profile of selected 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. Note that the mode source must be selected before running this
command.

Syntax Description
?updatesourcemode; Updates mode profile of the selected Mode source.
Returns the fraction of electromagnetic fields that overlap
between the old and the new mode
?updatesourcemode(mode_number); Updates the mode source and selects the desired mode number.
For example, updatesourcemode(1); will calculate the
fundamental mode. Please note that making this call will force a
recalculation of a mode, even if the same mode has previously
been calculated. In addition, making this call will force the mode
selection method to become "user select". This optional
argument was introduced in FDTD Solutions 8.6.3 and MODE
Solutions 6.5.3.

Supported Product: FDTD, MODE

NOTE: Saving simulation files before using updatesourcemode

2003 - 2016 Lumerical Solutions, Inc


1580 Lumerical Knowledge Base

If you have a script file which updates the simulation mesh, then you should use the save script command 1430
before updating the source mode. This will ensure that the mesh has been updated before the new mode is
calculated.

NOTE: overlap
The fraction of electromagnetic fields that overlap between the two modes is given by the expression below. It is
also the fraction of power from mode2 that can propagate in mode1. For more information, please see overlap
script command 1608 .
r r r r r r
overlap = Re
( )(
E1 H 2* dS E 2 H 1* dS ) 1
r r* r r r r

E1 H 1 dS
(
Re E 2 H 2* dS )
See Also
Manipulating objects 1556 , addmode 1544 , clearsourcedata 1581 , clearmodedata 1582 , getresult 1647 , overlap 1608 , expand 1507

, seteigensolver 1582 , geteigensolver 1582 , updatemode 1580

7.9.50 setsourcesignal
Loads a custom source time signal into a source. This advanced source property allows users to create a custom
source source time signal and spectrum. Custom source time signals are required for some types of nonlinear
simulations. This feature is not recommended for most types of linear simulations.

The custom time signal must be defined in terms of the signal Amplitude and Phase. This is a convenient definition
because the Amplitude and Phase are generally slowly varying as a function of time (compared with the actual time
signal), meaning a lower sampling rate can be used to define the custom signal. The actual time domain signal
injected by the source is given by:
Real valued time domain fields (ie. most simulations): Complex valued time domain fields (eg. Bloch
Signal (t ) = Amplitude(t ) sin( phase(t )) boundary conditions)
ip
i* phase( t ) -
2
Signal (t ) = Amplitude(t )e

Supported Product: FDTD, MODE

Syntax Description
setsourcesignal("name", t, Sets the time domain signal of source named "name".
amplitude, phase); t, amplitude, and phase are 1D vectors with the same length.
setsourcesignal("name", t, Allows you to specify the precise center frequency and bandwidth that
amplitude, phase, fcentre, will be used for all simulations. These values are used for materials fits,
bandwidth); calculating the mesh, and source limits.
If fcentre and bandwidth are not specified, they will be automatically
estimated from the time signal.

See Also
sourcepower 1601

7.9.51 updatemodes
Updates the mode profile(s) of selected mode expansion monitor If there are no mode profiles stored in the mode
expansion monitor, then the mode with the highest effective index will be selected. If mode profiles are already
stored in the mode expansion monitor, then the modes with the best overlap with the old modes will be selected.
Note that the mode expansion monitor must be selected before running this command.

Syntax Description

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1581

updatemodes; Updates mode profile of the selected mode expansion monitor.


Returns 1 if the update was successful and -1 if not.
updatemodes(mode_number); Updates the mode expansion monitor and selects the desired
mode numbers. For example, updatemodes(1:10); will calculate
the 10 modes with the highest refractive index. Please note that
making this call will force a recalculation of a modes, even if the
same modes have previously been calculated. In addition, making
this call will force the mode selection method to become "user
select". This optional argument was introduced in FDTD
Solutions 8.6.3 and MODE Solutions 6.5.3.

Supported Product: FDTD, MODE

NOTE: Saving simulation files before using updatesourcemode


If you have a script file which updates the simulation mesh, then you should use the save script command 1430
before updating the source mode. This will ensure that the mesh has been updated before the new mode is
calculated.

NOTE: overlap
The fraction of electromagnetic fields that overlap between the two modes is given by the expression below. It is
also the fraction of power from mode2 that can propagate in mode1. For more information, please see overlap
script command 1608 .
r r r r r r
overlap = Re
( )(
E1 H 2* dS E 2 H 1* dS ) 1
r r* r r r r

E1 H 1 dS
(
Re E 2 H 2* dS )
See Also
Manipulating objects 1556 , addmode 1544 , addmodeexpansion 1551 , clearsourcedata 1581 , clearmodedata 1582 , getresult 1647

, overlap 1608 , expand 1507 , seteigensolver 1582 , geteigensolver 1582

7.9.52 clearsourcedata
Clears source data for an imported source, or the selected mode for a mode source.

Supported Product: FDTD, MODE

Syntax Description
clearsourcedata; Clears source data for the selected source.

Example
Clear source data from an imported source. This will make the file much smaller, which can be convenient when
emailing simulation files.

select("source3");
clearsourcedata;

See Also
updatesourcemode 1579 , asapimport 1441 , asapload 1440 , asapexport 1440 , clearmodedata 1582 , getresult 1647 , overlap 1608 ,
expand 1507 , seteigensolver 1582 , geteigensolver 1582

2003 - 2016 Lumerical Solutions, Inc


1582 Lumerical Knowledge Base

7.9.53 clearmodedata
Clears mode data for a mode expansion monitor. This is mainly useful to reduce file sizes when saving.

Supported Product: available in FDTD and MODE, as of versions 8.6.3 and 6.5.3 respectively

Syntax Description
clearmodedata; Clears mode data for the selected mode expansion mnoitor.

See Also
updatesourcemode 1579 , asapimport 1441 , asapload 1440 , asapexport 1440 , clearsourcedata 1581 , getresult 1647 , overlap 1608 ,
expand 1507 , seteigensolver 1582 , geteigensolver 1582

7.9.54 seteigensolver
Mode sources and mode expansion monitors in FDTD and MODE have embedded eigensolvers. This script
command makes it possible to set the properties of that eigensolver without using the GUI.

Changing any values of the embedded eigensolver with this command will automatically invalidate any existing mode
data. This means that new updates based on overlap calculations with previous modes will fail after using this
command. Therefore please call this command before making any calls to updatesourcemode or updatemodes.

Supported Product: FDTD, MODE

Syntax Description
?seteigensolver; Returns a list of the properties of the embedded eigensolver
seteigensolver("property",value); This will set the eigensolver properties of the currently selected
objects.
Value can be a number or string. This function does not return any
data.

See Also
Manipulating objects 1556 , addmode 1544 , addmodeexpansion 1551 , clearsourcedata 1581 , clearmodedata 1582 , getresult 1647

, overlap 1608 , expand 1507 , seteigensolver 1582 , geteigensolver 1582 , updatemodes 1580 , updatesourcemode 1579

7.9.55 geteigensolver
Mode sources and mode expansion monitors in FDTD and MODE have embedded eigensolvers. This script
command makes it possible to get the properties of that eigensolver without using the GUI.

Supported Product: FDTD, MODE

Syntax Description
?geteigensolver; Returns a list of the properties of the embedded eigensolver
geteigensolver("property"); This will get the eigensolver properties of the currently selected
objects. The returned value may be a number or a string, depending on
the property.

See Also
Manipulating objects 1556 , addmode 1544 , addmodeexpansion 1551 , clearsourcedata 1581 , clearmodedata 1582 , getresult 1647

, overlap 1608 , expand 1507 , seteigensolver 1582 , geteigensolver 1582 , updatemodes 1580 , updatesourcemode 1579

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1583

7.9.56 redraw
Force the graphical viewports of the CAD or the schematic layout drawing to update. The viewports update
automatically by default, so this command is only required after using the redrawoff command.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
redraw; Redraws graphics.
This function does not return any data.

See Also
Manipulating objects 1556 , redrawon 1583 , redrawoff 1583 , redrawmode 1583

7.9.57 redrawoff
Disable automatic updating of the graphical viewports in the CAD or the schematic layout drawing. This can greatly
increase the speed of scripts that add large numbers of objects.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
redrawoff; Prevents redrawing of graphics.
This function does not return any data.
Cannot use this command in group setup scripts since redrawing is
automatically turned off.

See Also
Manipulating objects 1556 , redrawon 1583 , redraw 1583 , redrawmode 1583

7.9.58 redrawon
Enable automatic updating of the graphical viewports in the CAD or the schematic layout drawing. Automatic
updating is the default behavior, so this command is only required after using the redrawoff command.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
redrawon; Turns redrawing back on.
This function does not return any data.

See Also
Manipulating objects 1556 , redraw 1583 , redrawoff 1583 , redrawmode 1583

7.9.59 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.

Supported Product: FDTD, MODE, DEVICE

2003 - 2016 Lumerical Solutions, Inc


1584 Lumerical Knowledge Base

Syntax Description
out = redrawmode; The value of out indicates if automatic redrawing is off or on
out=1: automatic redrawing is on
out=0: automatic redrawing is off
out = redrawmode(in); Set the automatic redrawing off or on. To turn it on, use in=1. To turn it
off, use in=0. The value of out is set after executing the command so
that out=in once this command has been executed.

See Also
Manipulating objects 1556 , redraw 1583 , redrawoff 1583

7.9.60 setview
This command allows the viewing properties of the Layout Editor to be modified.

Supported Product: FDTD, MODE, DEVICE

Syntax Description
outstring = setview; Returns a list of the view properties that can be set. The command
?setview;
will return
extent, zoom, theta, phi
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); Sets the values to of any property for viewing.

The following table describes the properties that can be set


Property Description
extent Control the view extent. In this case, value should be a 2x1, 4x1 or 6x1
matrix representing the view range min x, max x, min y, max y, min z
and max z respectively.
zoom Controls the relative zoom of the perspective view compared to the
default level. To zoom in by a factor of 2 in the perspective view, use
setview("zoom",2);
theta Controls the polar angle of the perspective view, in degrees.
phi Controls the azimuthal angle of the perspective view, in degrees.

See Also
Manipulating objects 1556 , getview 1584 , orbit 1585 , redraw 1583

7.9.61 getview
This command allows the viewing properties of the Layout Editor to be retrieved.

Supported Product: FDTD, MODE, DEVICE

Syntax Description
outstring = getview; Returns a list of the view properties that can be set. The command
?getview;

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1585

will return
extent, zoom, theta, phi
out = getview("property"); Returns the current value of any of the view properties. For example,
zoom_level = getview("zoom");
will return the current zoom setting of the perspective view relative to
the default level.

The properties that can be obtained with getview are described in setview 1584 .

See Also
Manipulating objects 1556 , setview 1584 , orbit 1585 , redraw 1583

7.9.62 orbit
This command performs an elliptical viewing orbit of the structure in the perspective view. Note that the commands
setview 1584 , getview 1584 and redraw 1583 make it possible to create any type of orbit you would like in your own script
file.

Supported Product: FDTD, MODE, DEVICE

Syntax Description
orbit; Performs an orbit of the current perspective view.
orbit(zoom_factor); Performs an orbit with the specified minimum zoom factor. By default
the zoom factor is 1.5.
orbit(zoom_factor, frame_rate); Performs an orbit with the specified frame rate specified in frames per
second. The default frame rate is 15.
orbit(zoom_factor, frame_rate, "filename"); The orbit will be streamed to the mpeg file filename for later viewing.

See Also
Manipulating objects 1556 , setview 1584 , getview 1584 , framerate 1585

7.9.63 framerate
Orbits the perspective view and returns the framerate. This can be useful for estimating your graphics performance.
If comparing the performance of two computers, be sure to use exactly the same simulation file.

Supported Product: FDTD

Syntax Description
fr = framerate(num_frames, zoom); num_frames - Number of frames to draw
zoom - Zoom factor used in perspective view
fr - number of frames / wall time required to complete orbit.

See Also
Manipulating objects 1556 , setview 1584 , getview 1584 , orbit 1585

7.9.64 undo
Undo the last command that modified any objects, you can undo the last 5 commands.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description

2003 - 2016 Lumerical Solutions, Inc


1586 Lumerical Knowledge Base

undo; Undo last modify object command.


This function does not return any data.

See Also
Manipulating objects 1556 , redo 1586

7.9.65 redo
Redo a command after a previous undo.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
redo; Redo command after previous undo.
This function does not return any data.

See Also
Manipulating objects 1556 , undo 1585

7.9.66 addport
Add a port to a compound/script element (Note that this command does not apply for primitive elements).

Supported Product: INTERCONNECT

Syntax Description
addport("element", "port", "type", Adds a new port to the element with the specified properties.
"data"); Returns the name of the port that is created.

Property Default Type Description


value
element required string Name of the element to add a port to.
port required string Name of the port to add. The named will be modified if
there is already a port of the same name.
type required string The type of port to add. The options are: Bidirectional,
Input, Output, Analyzer Input
data required string The type of data for the port. The options are: Variant,
Optical Signal, Electrical Signal, Digital Signal

Manipulating objects 1556 , removeport 1586

7.9.67 removeport
Remove a port from a compound/script element (Note that this command does not apply for primitive elements).

Supported Product: INTERCONNECT

Syntax Description
removeport("element", "port"); Removes "port" from "element".
Returns 1 if the port is successfully removed, 0 otherwise.

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1587

Manipulating objects 1556 , addport 1586

7.9.68 connect
Connects one element to another via the specified ports.

Supported Product: INTERCONNECT

Syntax Description
connect("element1", "port1", Connects "port1" of "element1" to "element2" or "port2".
"element2", "port2");

Manipulating objects 1556 , disconnect 1587

7.9.69 disconnect
Disconnect one element to another via the specified ports.

Supported Product: INTERCONNECT

Syntax Description
connect("element1", "port1", Deletes the connection between "port1" of "element1" and "port2" of
"element2", "port2"); "element2".

Manipulating objects 1556 , connect 1587

7.9.70 setexpansion
Associates a DFT monitor with a mode expansion monitor.

Supported Product: FDTD, MODE

Syntax Description
?setexpansion; List all monitors under the "Monitors for expansion" list for the selected
mode expansion monitor.
setexpansion("name", Adds the "dft_monitor" to the "Monitors for expansion" list of the
"dft_monitor"); selected mode expansion monitor, with the specified name.

addmodeexpansion 1551 , removeexpansion 1587 , Using Mode Expansion Monitors 651

7.9.71 removeexpansion
Removes a DFT monitor from a mode expansion monitor.

Supported Product: FDTD, MODE

Syntax Description
removeexpansion("name"); Removes the DFT monitor with the specified name from the "Monitors
for expansion" list of the selected mode expansion monitor.

addmodeexpansion 1551 , setexpansion 1587 , Using Mode Expansion Monitors 651

2003 - 2016 Lumerical Solutions, Inc


1588 Lumerical Knowledge Base

7.9.72 getactivesolver
Get the active solver. This could be the FDE, varFDTD, or EME solvers in MODE Solutions.

Supported Product: MODE Solutions

Syntax Description
?getactivesolver; List the active solver.

See Also
setactivesolver 1588

7.9.73 setactivesolver
Set the specified solver as the active solver. For example, this can be used to toggle between the FDE, varFDTD,
and EME simulations in MODE Solutions.

Supported Product: MODE Solutions

Syntax Description
?setactivesolver; Lists all the possible solver choices
setactivesolver('solver_name'); Set the solver with the specified name as the active solver.

See Also
getactivesolver 1588

7.9.74 getname
The script command getname is used to get the name of a datset.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
?getname(a); Returns the name of the dataset of the variable a.
?a.getname; Returns the name of the dataset of the variable a.

See Also
setname 1588

7.9.75 setname
The script command setname is used to set the name of a datset.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
a.setname("test"); Returns the name of the dataset of the variable a.

See Also
getname 1588

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1589

7.9.76 autoarrange
The script command arranges port positions and dimensions of compound or scripted elements automatically.
Equivalently it can also be done by pressing Arrange on the element port editor tab.

Supported Product: INTERCONNECT

Syntax Description
autoarrange (name); Arrange port positions and dimensions of compound or scripted
elements automatically.

See Also
createcompound 1589

7.9.77 createcompound
The script command creates a compound element with the currently selected elements.

Supported Product: INTERCONNECT

Syntax Description
createcompound; Creates a compound element with the currently selected
elements.

See Also
autoarrange 1589 , addproperty 1589 , setexpression 1589

7.9.78 addproperty
The script command adds a property to a compound or to a scripted element.

Supported Product: INTERCONNECT

Syntax Description
addproperty(name,property=new_pr Adds a new property named property to a compound element or
operty,category=,type=Number,fr to a scripted element named name. Category defines the folder
om=0,to=0,kind=FixedUnit,unit=) when the property will be stored in the properties view window.
string, logical and number are valid values for the parameter
type. The parameter range is defined by parameters from and
to. Parameter kind is typically set to FixedUnit, other valid
values are Power, Frequency, etc. Parameter unit is the unit of
the new property.

See Also
Manipulating objects 1556 , autoarrange 1589 , setexpression 1589 , createcompound 1589

7.9.79 setexpression
The script command sets the selected element's specified property to the mentioned expression.

Supported Product: INTERCONNECT

Syntax Description

2003 - 2016 Lumerical Solutions, Inc


1590 Lumerical Knowledge Base

setexpression (name,p,expr); Set the property p of element name to an expression expr.

See Also
autoarrange 1589 , addproperty 1589 , setexpression 1589 , createcompound 1589

7.9.80 importdataset
This command can be used to import a rectilinear or unstructured dataset into a simulation object.

Supported Product: FDTD, MODE, DEVICE

Syntax Description
importdataset("filename") Imports the dataset the specified Matlab file from the current working
directory. The object to load data into must be selected.
importdataset(charge) Imports the data from the specified dataset in the script workspace.
Dataset can be loaded from a Matlab file to the script workspace using
the matlabload 1642 command. The object to load data into must be
selected.

There are three cases where this command can be used

1. Import data into a grid attribute (data could be from charge monitor or temperature monitor in DEVICE).
2. Import doping data into a selected 'import doping' object.
3. Import optical generation data into a selected 'import generation' object.

The command can be used in two ways. The dataset can be saved inside a matlab (.mat) file which can be called to
load the data or, the command can directly call the dataset from the script workspace to load it into the simulation
object. In both cases, the dataset need to have the following properties:

Data Simulation Dataset type Name for variables Name for variables
object defining coordinate data defining actual data
Liquid crystal 'lc orientation' grid Rectilinear x, y, z u
orientation (3 attribute
element unit
vector)
Rotation angles 'permittivity Rectilinear x, y, z theta, phi, psi
in radians rotation' grid
attribute
Unitary 'matrix transform' Rectilinear x, y, z U
transform matrix grid attribute
(3x3 tensor)
Charge density 'np density' grid Unstructured x, y, z, C n, p
attribute
Doping profile 'Import doping' Unstructured or x, y, z, C (unstructured); x, N
object rectangular y, z (rectangular)
Optical Import generation' Rectangular x, y, z G
generation rate object
Temperature in 'temperature' grid Unstructured x, y, z, elements (see N
Kelvin attribute Dataset builder 375 for more
information)

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1591

See Also
Manipulating objects 1556 , cleardataset 1591 , matlabload 1642 , Mach Zehnder 2206 , Import/export np Density 402 ,
addgridattribute 1550 , unstructureddataset 1466

7.9.81 cleardataset
This command clears the dataset from any current 'np Density' grid attribute. This is only useful for keeping file size
small.

Supported Product: FDTD, MODE, DEVICE

Syntax Description
cleardataset; Clears the dataset from the selected grid attribute.

See Also
Manipulating objects 1556 , importdataset 1590 , addgridattribute 1550

7.9.82 getcelllist
Returns the list of cells associated with the gds file that has been loaded into a layer builder object. There needs to
be a layer builder object selected, with a gds file loaded.

Supported Product: FDTD, MODE, DEVICE

Syntax Description
getcelllist; Returns the list of cells associated with the loaded gds file.

See Also
addlayerbuilder 1553 , getlayerlist 1591 , setlayer 1591 , loadgdsfile 1592 , addlayer 1552 , getlayerlist 1591 , setlayer 1591

7.9.83 getlayerlist
Returns the list of layers associated with the loaded gds file. There needs to be a layer builder object selected, with
a gds file loaded.

Supported Product: FDTD, MODE, DEVICE

Syntax Description
getlayerlist; Returns the list of layers associated with the loaded gds file.

See Also
addlayerbuilder 1553 , getlayerlist 1591 , setlayer 1591 , loadgdsfile 1592 , addlayer 1552 , getcelllist 1591 , setlayer 1591

7.9.84 setlayer
Sets the properties of the specified layer of the selected layer builder object. There needs to be a layer builder object
selected.

Supported Product: FDTD, MODE, DEVICE

Syntax Description
setlayer("layer name", "property Sets the properties of a specified layer of the selected layer builder
name", "property value"); object.

2003 - 2016 Lumerical Solutions, Inc


1592 Lumerical Knowledge Base

Example
setlayer("abc","name","abc123");
setlayer("abc","thickness",0.5e-6);
setlayer("abc","material","Ag");
setlayer("abc","layer number","layer_0");
setlayer("abc","pattern material","Ag");

See Also
addlayerbuilder 1553 , getlayerlist 1591 , setlayer 1591 , loadgdsfile 1592 , addlayer 1552 , getcelllist 1591 , getlayerlist 1591

7.9.85 loadgdsfile
Loads a gds file to a layer builder object. The command only functions properly when a layer builder object is
included in the simulation and is selected.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
loadgdsfile("gds_example.gds"); Loads the gds file named "gds_example" to the layer builder object.

See Also
addlayerbuilder 1553 , getlayerlist 1591 , setlayer 1591 , addlayer 1552 , getcelllist 1591 , getlayerlist 1591 , setlayer 1591

7.9.86 setcompositionfraction
This command is used to set the composition fraction of two materials in an alloy.

Supported Product: DEVICE

Syntax Description
setcompositionfraction(name, Set the composition fraction of two materials in an alloy.
property, value);
This command only works if the material of the specified structure is
an alloy.

Property Value
name Name of the structure
property Can be set to fixed, linear x, linear y, linear z, or custom
value fixed: scalar number
linear: [value at min, value at max]
custom: string with function, e.g (w-0.2)^2 using variables u,v,w

See Also
Manipulating objects 1556 , getcompositionfraction 1592

7.9.87 getcompositionfraction
This command is used to set the composition fraction of two materials in an alloy.

Supported Product: DEVICE

Syntax Description

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1593

getcompositionfraction(name, Get the composition fraction of two materials in an alloy. Property can
property); be fixed, linear x, linear y, linear z, or custom.

This command only works if the material of the specified structure is


an alloy.

See Also
Manipulating objects 1556 , setcompositionfraction 1592

7.9.88 seticon
Set a user defined icon for an element.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
seticon (name,icon)); Set a user defined icon for element name. Parameter icon should be
a vector image format SVG (Scalable Vector Graphics) file.

See Also
Manipulating objects 1556

7.10 Running simulations


Moving between tabs
Command Description
switchtolayout 1534 Closes the analysis window and allows you to manipulate simulation objects
for a new simulation.
layoutmode 1535 Used to determine if the simulation file is open in layout or in analysis mode.

Running Simulations
Command Description
run 1593 Launch the simulation. (Options available)
runparallel 1594 Launch the simulation in parallel mode.
addjob 1594 Add a simulation to the job queue.
runjobs 1594 Run all simulations in the job queue.
clearjobs 1595 Remove all simulations from the job queue.
runsweep 1595 Runs a parameter sweep or optimization task

Command Description
run 1593 Launch the simulation. (Options available)
runsweep 1595 Runs a parameter sweep or optimization task

7.10.1 run
Run the current simulation. When the simulation finishes, all simulation data will be saved to the current file, then
the file is re-loaded.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

2003 - 2016 Lumerical Solutions, Inc


1594 Lumerical Knowledge Base

For FDTD,
Syntax Description
run; Launch the simulation in parallel mode as defined in the resource
manager. This function does not return any data.
run(option1); Option1 (default: 3) can be:
1: run FDTD in single processor mode avoiding any use of MPI.
2: run FDTD in single processor mode (legacy issues). Pop-up
dialogs no longer take focus.
3: run FDTD in parallel mode as defined in the resource manager.
For MODE, DEVICE, and INTERCONNECT,
Syntax Description
run; Launch the simulation. The simulation will be run using the settings
from the first active resource in the resource manager. This function
does not return any data.

See Also
runparallel 1594 , runanalysis 1647 , addjob 1594 , runjobs 1594

7.10.2 runparallel
Launch the simulation in parallel mode. Equivalent to run and run(3). When the simulation finishes, all simulation
data will be saved to the current file. This command has been deprecated. Use run.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
runparallel; Launch the simulation in parallel mode as defined in the resource
manager. This function does not return any data.

See Also
run 1593 , runanalysis 1647

7.10.3 addjob
Adds a simulation file to the job manager queue.

Supported Product: FDTD, MODE, DEVICE

Syntax Description
addjob(filename); Add the simulation file "filename" to the job manager queue.

See Also
run 1593 , runsweep 1595 , runjobs 1594 , clearjobs 1595 , currentfilename 1434

7.10.4 runjobs
Run all simulations in the job manager queue. The script execution will be paused while the jobs run, then resume
when all of the simulations have complete successfully. If errors occur, the script will not proceed.

Supported Product: FDTD, MODE, DEVICE

Syntax Description

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1595

runjobs; Run jobs in the Job queue. Use the computer resources and parallel
settings that are specified in the Resource Manager.
runjobs(option); option=0: run jobs in single process mode using only the local
computer.
option=1: run jobs using the computer resources and parallel settings
that are specified in the Resource Manager. (default)

See Also
run 1593 , runsweep 1595 , addjob 1594 , clearjobs 1595 , save 1430 , load 1430

7.10.5 clearjobs
Remove all jobs from the job manager queue.

Supported Product: FDTD, MODE, DEVICE

Syntax Description
clearjobs; Remove all jobs from the Job queue.

See Also
run 1593 , addjob 1594 , runjobs 1594

7.10.6 runsweep
Runs a parameter sweep or optimization task.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
runsweep; Runs all sweeps and optimization tasks.
runsweep("taskname"); Runs only the sweep or optimization named taskname.

See Also
run 1593 , getsweepdata 1645 , addjob 1594 , runjobs 1594

7.11 FDTD Measurements and Normalization


Command Description
transmission 1596 Returns the power transmission through a monitor.
transmission_avg 1597 Returns the total spectral average power through a monitor surface,
normalized to the total spectral average of the source.
transmission_pavg 1597 Returns the partial spectral average power through a monitor surface,
normalized to the partial spectral average of the source.
getsourceangle 1598 Get source angle.

These commands are used for normalization of frequency domain data obtained from a time domain FDTD
simulation.
Command Description
nonorm 1598 Use no normalization.
cwnorm 1598 Use CW normalization.

2003 - 2016 Lumerical Solutions, Inc


1596 Lumerical Knowledge Base

sourcenorm 1599 Returns the normalization used in the cwnorm state.


sourcenorm2_avg 1599 Returns the source normalization spectrum used to normalize data in the
cwnorm state for the total spectral averaged quantities
sourcenorm2_pavg 1600 Returns the source normalization spectrum used to normalize data in the
cwnorm state for the partial spectral averaged quantities
dipolepower 1600 Returns the power injected into the simulation by a dipole source.
sourcepower 1601 Returns the source power.
sourcepower_avg 1602 Returns the total spectral average power injected into the simulation by the
source.
sourcepower_pavg 1603 Returns the partial spectral average power injected into the simulation by the
source.
sourceintensity 1603 Returns the source intensity.
sourceintensity_avg 1604 Returns the total spectral average intensity injected into the simulation by the
source.
sourceintensity_pavg 1604 Returns the partial spectral average intensity injected into the simulation by
the source.

7.11.1 transmission
The transmission function returns the amount of power transmitted through power monitors and profile monitors,
normalized to the source power. A value of 0.5 means that half of the optical power injected by the source passed
through the monitor. Negative values mean the power is flowing in the negative direction.

The transmission is calculated with the following formula.

1 r r
real P ( f() Monitor
d S )
T( f ) = 2
sourcepower

where T(f) is the normalized transmission as a function of frequency


P(f) is the Poynting vector
dS is the surface normal

The normalization state (cwnorm or nonorm) does not affect the result because of the source power normalization.

Supported Product: FDTD, MODE

Syntax Description
out = transmission( "mname"); Transmission through monitor mname. It must be obvious from the
shape of the monitor which axis is normal to the monitor surface.
out = transmission( "mname", The additional argument, option, can have a value of 1 or 2. If it is 2,
option); 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.

See Also
sourcepower 1601 , dipolepower 1600 , transmission_avg 1597 , transmission_pavg 1597 , integrating Poynting vector 865

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1597

7.11.2 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 120 section for more information.

1
2
(
real P
Monitor
total
dS)
Tavg =
sourcepower _ avg

where Tav g is the normalized total spectral average transmission


<P> is the total spectral average Poynting vector
dS is the surface normal

The normalization state (cwnorm or nonorm) does not affect the result because of the source power normalization.

Supported Product: FDTD, MODE

Syntax Description
out = Returns the total spectral average transmission through monitorname.
transmission_avg( "monitorname") It must be obvious from the shape of the monitor which axis is normal
; to the monitor surface.
out = The additional argument, option, can have a value of 1 or 2. If it is 2,
transmission_avg( "monitorname", the data is unfolded where possible according to the symmetry or anti-
option); 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.

See Also
sourcepower_avg 1602 , transmission 1596 , transmission_pavg 1597 , Units and Normalization 116 , Spectral averaging 120

7.11.3 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 120 section for more information.

1
2 (
real P( f ) Monitor
partial
dS )
T pavg ( f ) =
sourcepower _ pavg( f )

where Tpav g is the normalized partial spectral average transmission


<P> is the partial spectral average Poynting vector
dS is the surface normal

The normalization state (cwnorm or nonorm) does not affect the result because of the source power normalization.

Supported Product: FDTD, MODE

Syntax Description
out = Returns the partial spectral average transmission through
transmission_pavg( "monitorname" monitorname. It must be obvious from the shape of the monitor which
); axis is normal to the monitor surface.
out = The additional argument, option, can have a value of 1 or 2. If it is 2,
transmission_pavg( "monitorname" the data is unfolded where possible according to the symmetry or anti-

2003 - 2016 Lumerical Solutions, Inc


1598 Lumerical Knowledge Base

, option ); 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.

See Also
sourcepower_pavg 1603 , transmission 1596 , transmission_avg 1597 , Units and Normalization 116 , Spectral averaging 120

7.11.4 getsourceangle
Broadband sources inject fields that have a constant in-plane wavevector at all frequencies. This implies 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 (fSIM) will match the source angle theta (thetaSIM) specified in the source
properties. Higher frequencies will be injected at smaller angles, while lower frequencies will be injected at larger
angles. This 'theta vs wavelength' plot in the beam source edit window shows the same function.

sin( q SIM ) f SIM


q ( f ) = a sin
f

Supported Product: FDTD, MODE

Syntax Description
theta = Returns the source angle theta (degrees) as a function of frequency. f is
getsourceangle( "sourcename", a vector of frequencies (Hz).
f);

See Also
sourcepower 1601 , Broadband injection angles 536

7.11.5 nonorm
Do not normalize the data to the source power. The actual field intensities will be used in all calculations. This
function controls the checkbox located in Settings - Normalization state.

Supported Product: FDTD, MODE

Syntax Description
nonorm; Use no normalization.
This function does not return any data.

See Also
cwnorm 1598 , Units and Normalization 116

7.11.6 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 - Normalization state.

Supported Product: FDTD, MODE

Syntax Description
cwnorm; Use CW normalization.

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1599

This function does not return any data.

See Also
nonorm 1598 , Units and Normalization 116

7.11.7 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 s j(t), and N is the number of active sources then

1
s ( w ) = sourcenorm ( w ) =
N
exp (i wt )s (t )dt
sources
j

Supported Product: FDTD, MODE

Syntax Description
out = sourcenorm(f); Returns the source normalization used to normalize data in the
cwnorm state at the vector of frequency points f. (f is the frequency in
Hz)
out = sourcenorm(f, name); This function makes it possible to perform the normalization using the
spectrum of one source, rather than the sum of all the sources.

See Also
sourcenorm2_avg 1599 , sourcenorm2_pavg 1600 , sourcepower 1601 , cwnorm 1598 , nonorm 1598 , Units and Normalization 116

7.11.8 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 120 section for more information.

The script function sourcenorm is defined as

1
s ( w ) = sourcenorm ( w ) = exp (i wt )s j (t )d w
N sources

If sourcenorm2_avg is called without any arguments, it returns

+
2
sourcenorm 2 _ avg = s( w ' ) d w'
-

Supported Product: FDTD, MODE

Syntax Description
out = sourcenorm2_avg; This function returns the source normalization for total spectral
averaged quantities.
out = This function makes it possible to perform the normalization using the
sourcenorm2_avg( "sourcename"); spectrum of one source, rather than the sum of all the sources.

See Also

2003 - 2016 Lumerical Solutions, Inc


1600 Lumerical Knowledge Base

sourcenorm 1599 , sourcenorm2_pavg 1600 , sourcepower_avg 1602 , cwnorm 1598 , nonorm 1598 , Units and Normalization 116 ,
Spectral averaging 120

7.11.9 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 120 section for more information.

If the source time signal of the jth source in the simulation is s j(t), and N is the number of active sources then

1
s ( w ) = sourcenorm ( w ) = exp (i wt )s j (t )d w
N sources

Partial spectral averaging uses a Lorentzian weighting of the following form. Delta is the FWHM of |h|2.

2 d 1
hi ( w , w ' ) =
2 p ( w - w ' ) 2 + ( d / 2) 2
2
h( w , w ' ) d w' = 1

If this function is called without any arguments, it returns

+
2 2
sourcenorm 2 _ pavg = h( w , w ' ) s( w ' ) d w '
-

Supported Product: FDTD, MODE

Syntax Description
out = sourcenorm2_pavg( f, This function returns the source normalization for partial spectral
delta); averaged quantities.
out = sourcenorm2_pavg( f, delta, This function makes it possible to perform the normalization using the
"sourcename"); spectrum of one source, rather than the sum of all the sources.

See Also
sourcenorm 1599 , sourcenorm2_avg 1599 , sourcepower_pavg 1603 , cwnorm 1598 , nonorm 1598 , Units and Normalization 116 ,
Spectral averaging 120

7.11.10 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/Hertz 2 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 1601 will return
the power that the dipole would radiate in a homogeneous material. dipolepower and sourcepower are equivalent for
dipoles in a homogeneous medium.

Advanced notes:
If the dipole is located within a dispersive medium (with a non-zero imaginary part of the refractive index), then the
results of this function are not reliable. In such situations, using a box of monitors around the dipole is
recommended.
Numerical errors in this calculation may become noticeable when very small simulation mesh sizes are used. If
the mesh step is the order of, or smaller than, l/1000, verifying the dipolepower results by measuring the radiated

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1601

power with a small box of monitors surrounding the dipole is recommended.

Please contact support@lumerical.com for more assistance if you are using a dipole in dispersive medium.

Supported Product: FDTD, MODE

Syntax Description
out = dipolepower(f); Returns the amount of power radiated by the dipole source, at
frequency points f. (f in Hz)
out = dipolepower(f, name); This option allows you to obtain the power radiated by a single dipole,
rather than the sum of all dipoles. This option is only needed for
simulations with multiple dipoles.

See Also
sourcenorm 1599 , sourcepower 1601 , sourcepower_avg 1602 , sourcepower_pavg 1603 , transmission 1596 , cwnorm 1598 ,
nonorm 1598

7.11.11 sourcepower
Returns the power injected into the simulation by the source.

Dipole sources
The sourcepower script function returns the power the dipole source would radiate in a homogeneous medium. This
quantity can be calculated analytically (see Dipoles - Radiated Power 511 ). The actual radiated power is not given by
the sourcepower function. The actual radiated power is highly dependant on the surrounding materials, since the
reflections from the structures will interfere with the fields from the dipole, changing the actual radiated power. To
get the actual radiated power, see the dipolepower 1600 script function. For additional information, please see the
Dipoles - Radiated Power 511 page.

Beam sources (Gaussian, plane wave, mode, etc)

The sourcepower is determined from the equation below. Note that


P ( f ) Source is the Poynting vector determined
from the E,H fields injected by the source. The integral is evaluated over the injection plane of the source.

sourcepowernonorm ( f ) =
1
2 (
real P ( f ) Source dS )
1
(
real P ( f ) Source dS )
sourcepowercwnorm ( f ) = 2
2
sourcenorm

As stated above, sourcepower gives the amount of power injected into the simulation. The only exception is if the
simulation is setup such that there is radiation which travels through the injection plane of the source in the source
injection direction (pink arrow). In such cases, the actual amount of power injected by the source will not be given by
sourcepower. In this situation, the incident radiation interferes with the source, changing the amount of injected
power (similar to what happens for the dipole source). In almost all cases, this means your simulation is not setup
properly.

Additional notes
In the case of multiple sources, the sourcepower(f) command will return the sum of all sourcepowers from all
sources.
In 3D simulations, the units will be in Watts if CW norm is used, and Watts/Hertz 2 if no norm is used.

Supported Product: FDTD, MODE

2003 - 2016 Lumerical Solutions, Inc


1602 Lumerical Knowledge Base

Syntax Description
out = sourcepower(f); Returns the source power used to normalize transmission calculations
at the vector of frequency points f. (f is the frequency in Hz)
out = sourcepower(f, option); The additional argument, option, can have a value of 1 or 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 = sourcepower(f, option, This option allows you to obtain the spectrum of one source, rather
name); than the sum of all sources. This option is only needed for simulations
with multiple sources.

See Also
sourcenorm 1599 , sourcepower_avg 1602 , sourcepower_pavg 1603 , dipolepower 1600 , transmission 1596 , sourceintensity 1603 ,
cwnorm 1598 , nonorm 1598

7.11.12 sourcepower_avg
Returns the total spectral average power injected into the simulation by the source. See the Units and normalization
- Spectral averaging 120 section for more information.

This script function calculates the following quantities, depending on whether the normalization state is cwnorm or
nonorm:

+
sourcepower _ avgnonorm = sourcepower nonorm ( w )d w
0
+
2
s( w )
0
sourcepowercwnorm ( w )d w
sourcepower _ avgcwnorm ( f ) = +
2
s( w )
0
dw

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.

Supported Product: FDTD, MODE

Syntax Description
out = sourcepower_avg; Returns the spectrally averaged source power as defined above.
out = sourcepower_avg(option); The additional argument, option, can have a value of 1 or 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 = sourcepower_avg(option, This option allows you to obtain the spectrum of one source, rather
"sourcename"); than the sum of all sources. This option is only needed for simulations
with multiple sources.

See Also
sourcenorm2_avg 1599 , sourcepower 1601 , sourcepower_pavg 1603 , transmission_avg 1597 , sourceintensity_avg 1604 ,
cwnorm 1598 , nonorm 1598 , Units and Normalization 116 , Spectral averaging 120

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1603

7.11.13 sourcepower_pavg
Returns the partial spectral average power injected into the simulation by the source. See the Units and
normalization - Spectral averaging 120 section for more information.

Partial spectral averaging uses a Lorentzian weighting of the form

2 d 1
hi ( w , w ' ) =
2 p ( w - w ' ) + ( d / 2) 2
2

2
h( w , w ' ) d w' = 1

This script function calculates the following quantities, depending on whether the normalization state is cwnorm or
nonorm:

+
2
sourcepower _ pavgnonorm ( f ) = h( w , w ' ) sourcepowernonorm ( w )d w
-
+
2 2
h( w , w ' ) s ( w ) sourcepowercwnorm ( w ' )d w '
sourcepower _ pavgcwnorm ( f ) = 0
+
2 2
h( w , w ' ) s( w ' ) d w '
0

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.

Supported Product: FDTD, MODE

Syntax Description
out = sourcepower_pavg(f,df); Returns the spectrally averaged source power as defined above. The
quantity f is the frequency and the quantity df is the frequency range
around which the averaging is performed, both in Hz.
out = sourcepower_pavg(f, The additional argument, option, can have a value of 1 or 2. If it is 2,
df,option); 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 = sourcepower_pavg(f,df, This option allows you to obtain the spectrum of one source, rather
option, "sourcename"); than the sum of all sources. This option is only needed for simulations
with multiple sources.

See Also
sourcenorm2_pavg 1600 , sourcepower 1601 , sourcepower_avg 1602 , transmission_pavg 1597 , sourceintensity_pavg 1604 ,
cwnorm 1598 , nonorm 1598 , Units and Normalization 116 , Spectral averaging 120

7.11.14 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/Hertz 2 if No norm is used. This function is often used when
normalizing power measurements from simulations with a TFSF source.

In the case of multiple sources, the sourceintensity(f) command will return the sum of all sourceintensity from all

2003 - 2016 Lumerical Solutions, Inc


1604 Lumerical Knowledge Base

sources.

Supported Product: FDTD, MODE

Syntax Description
out = sourceintensity(f); Returns the source intensity at the vector of frequency points f (f is the
frequency in Hz).
out = sourceintensity(f, option); The additional argument, option, can have a value of 1 or 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(f, option, This function makes it possible to perform the normalization using the
name); spectrum of one source, rather than the sum of all the sources.

See Also
sourcenorm 1599 , sourcepower 1601 , sourceintensity_avg 1604 , sourceintensity_pavg 1604 , dipolepower 1600 , transmission
1596 , cwnorm 1598 , nonorm 1598 , Units and Normalization 116

7.11.15 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 1603 command and the Units and
normalization - Spectral averaging 120 section for more information.

Supported Product: FDTD, MODE

Syntax Description
out = sourceintensity_avg; Returns the spectrally averaged source intensity as defined above.
out = sourceintensity_avg(option); The additional argument, option, can have a value of 1 or 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, This function makes it possible to perform the normalization using the
"sourcename"); spectrum of one source, rather than the sum of all the sources.

See Also
sourcenorm2_avg 1599 , sourceintensity 1603 , sourcepower 1601 , transmission_avg 1597 , cwnorm 1598 , nonorm 1598 , Units
and Normalization 116 , Spectral averaging 120

7.11.16 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 1603 command and the
Units and normalization - Spectral averaging 120 section for more information.

Supported Product: FDTD, MODE

Syntax Description
out = sourceintensity_pavg (f,df); Returns the spectrally averaged source power as defined above. The
quantity f is the frequency and the quantity df is the frequency range
around which the averaging is performed, both in Hz.

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1605

out = sourceintensity_pavg(f,df, The additional argument, option, can have a value of 1 or 2. If it is 2,


option); 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_pavg(f,df, This function makes it possible to perform the normalization using the
option, "sourcename"); spectrum of one source, rather than the sum of all the sources.

See Also
sourcenorm2_pavg 1600 , sourcepower 1601 , sourcepower_avg 1602 , transmission_pavg 1597 , cwnorm 1598 , nonorm 1598 ,
Units and Normalization 116 , Spectral averaging 120

7.12 FDE Solver Measurements


Command Description
setanalysis 1605 Set calculation parameters in analysis window.
getanalysis 1605 Return calculation parameters in analysis window.
mesh 1606 Mesh the physical structures.
findmodes 1606 Calculates the modes supported by the structure.
nummodes 1610 Returns the number of modes found.
selectmode 1606 Select a mode from the mode table.
frequencysweep 1607 Performs a frequency sweep.
coupling 1607 Calculates the complex coupling coefficient
overlap 1608 Calculates the overlap between two modes.
bestoverlap 1609 Determines which mode has the largest overlap with another mode.
propagate 1609 Propagates an arbitrary mode down a waveguide.
optimizeposition 1610 Calculates the x shift, y shift, and z shift resulting in maximum overlap
between the specified mode and d-card when using the FDE solver.

7.12.1 setanalysis
Set calculation parameters in MODE Solutions' FDE and DEVICE analysis window.

Supported Product: MODE Solutions, DEVICE

Syntax Description
?setanalysis; Lists all the parameters in the analysis window.
setanalysis("property", value); Sets"property" to value.

See Also
Measurements 1644 , mesh 1606 , findmodes 1606 , frequencysweep 1607 , analysis 1606 , getanalysis 1605

7.12.2 getanalysis
Set calculation parameters in MODE Solutions' FDE and DEVICE analysis window.

Supported Product: MODE Solutions, DEVICE

Syntax Description

2003 - 2016 Lumerical Solutions, Inc


1606 Lumerical Knowledge Base

?getanalysis; Lists all the parameters in the analysis window.


getanalysis("property"); Returns the current value for the particular property on the analysis
window

See Also
Measurements 1644 , mesh 1606 , findmodes 1606 , frequencysweep 1607 , analysis 1606 , setanalysis 1605

7.12.3 analysis
Opens the MODE Solutions analysis window corresponding to the active solver.

Supported Product: MODE Solutions

Syntax Description
analysis; opens the analysis window corresponding to the active solver.

See Also
Measurements 1644 , setanalysis 1605 , runanalysis 1647 , getanalysis 1605

7.12.4 mesh
Produces a mesh of the current structure that is required to perform a subsequent calculation (either to calculate the
modes, or to perform a frequency sweep). Produces a d-card called "material" which contains the material properties
of the meshed object.

Supported Product: MODE

Syntax Description
mesh; Mesh the current simulation.

See Also
setanalysis 1605 , mesh 1606 , findmodes 1606

7.12.5 findmodes
Calculates the modes supported by the structure using the current calculation settings. This function is the script
equivalent to the calculate modes button. Each mode will be saved as a D-CARD named "modeX", where X is the
xth mode found. The D-CARD saves data such as effective index and mode profile.

Supported Product: MODE

Syntax Description
n=findmodes; n will be equal to the number of modes found.

See Also
setanalysis 1605 , mesh 1606 , selectmode 1606 , frequencysweep 1607 , coupling 1607 , overlap 1608 , bestoverlap 1609 , propagate
1609

7.12.6 selectmode
All modes found in a simulation are numbered based on their effective index. They are displayed in the mode table
of the Analysis tab. The selectmode command will select the Nth mode in the mode table.

Supported Product: MODE

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1607

Syntax Description
selectmode(N); where N is the number of the desired mode.
selectmode(name); where name is a string containing the name of a mode. Modes are
named mode1, mode2, ..modeN. This form of the command is
compatible with the bestoverlap 1609 function

See Also
setanalysis 1605 , mesh 1606 , findmodes 1606 , frequencysweep 1607

7.12.7 frequencysweep
Performs a frequency sweep using the current settings within the frequency analysis tab. Produces a D-CARD
called "frequencysweep" that contains dispersion, effective index, and other data for as a function of frequency.

Supported Product: MODE

Syntax Description
frequencysweep; Perform a frequency sweep with the current settings.
This function does not return any data.

See Also
setanalysis 1605 , mesh 1606 , findmodes 1606 , selectmode 1606

7.12.8 coupling
The coupling command returns the complex coupling coefficient between two modes. The power coupling can be
calculated with the overlap function, or by the following formula.

2
Power _ Coupling = coupling

Reference: Allan W. Snyder and John D. Love, Optical Waveguide Theory. Chapman & Hall, London, England, 1983.

See the overlap function for more details about overlap and coupling calculations.

Supported Product: MODE

Note: coupling command is deprecated, consider using expand 1507

Syntax Description
out = coupling(mode2, mode1); mode2, mode1: the mode names
out: the coupling coefficient
out = coupling(mode2, mode1, x, Mode alignment can be adjusted before coupling is calculated.
y); x offset
y offset

Examples
This example shows how to use the overlap command to calculate the overlap and power coupling between two
modes.

copydcard("mode1","test_mode1");
copydcard("mode2","test_mode2");

2003 - 2016 Lumerical Solutions, Inc


1608 Lumerical Knowledge Base

out = overlap("test_mode1","test_mode2");
?out(1); # overlap
?out(2); # power coupling

?coupling("test_mode1","test_mode2"); # the complex coupling coefficient


?abs(coupling("test_mode1","test_mode2"))^2; # same as out(2), the power coupling

See Also
copydcard 1649 , findmodes 1606 , coupling 1607 , overlap 1608 , bestoverlap 1609 , propagate 1609 , expand 1507

7.12.9 overlap
In MODE, the command returns the overlap and power coupling between two modes calculated by the Eigensolver or
recorded by frequency monitors from the Propagator. In FDTD, it calculates the overlap and power coupling between
the field profiles (modes) recorded by two frequency monitors.

Overlap
Overlap measures the fraction of electromagnetic fields that overlap between the two field profiles (modes). This is
also the fraction of power from mode2 that can propagate in mode1 (for both forward and backward propagating
fields). The absolute value of the entire formula is to ensure it is positive.
r r r r r r
overlap = Re
(
E1 H 2* dS E2 H1* dS

r r* r
)( ) r
1
r r
1 H1 dS
E (
Re E2 H 2* dS )
Note: Comparison with Mode expansion monitor
This overlap calculation is similar to the calculations provided by the Expansion monitor, but it is designed for use
in a slightly different situation.
- The expansion monitor is intended for situations where the input file profile (mode2) is known within the same
waveguide structure where mode1 exists.
- The overlap calculation is intended for situations where the input field profile (mode2) is known in a different
waveguide structure than the one where mode1 exists. For example, mode1 and mode2 are the fundamental
modes of two different waveguide structures, and the overlap function is being used to estimate the efficiency of
an end-fire coupling arrangement between the two waveguides.
The overlap calculation can provide accurate results in many situations, but it is worth noting that it is an
approximate technique. One key assumption is that both mode1 and mode2 only contain fields that are
propagating in a single direction.

The overlap calculation defined above can be written in terms of the quantities provided by the expansion monitor,
as shown below. This represents the total power carried by the ith mode, including both the forward and backward
propagating fields, normalized to the input power. See the online help for more information on Using Mode
Expansion Monitors 651 .

(a - b)* (a + b) N i2 1
overlap = Re
Ni Re (Pin )

In the event that real(N) or real(P) is 0, the "real" can be replaced with "abs".

Power Coupling
Power Coupling measures the amount of power that can couple from mode2 into a forward propagating wave with the
mode profile of mode1. The remaining power that can propagate in this mode will couple into the backwards
propagating mode. Therefore, the power coupling is always less than or equal to the overlap. If the two modes have
the same effective index, then the power coupling will be equal to the overlap.

A dielectric interface is a simple example. The modes (i.e. a plane wave) on each side of the interface have an
overlap of 1, but the power coupling will be less than one. This is due to reflections caused by the index change at
the interface.

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1609

These calculations are based on the methods described in Snyder and Love "Optical Waveguide Theory", Chapman
& Hall, London, England, 1983.

Note:
For an exact power coupling result at an interface, it is necessary to know the complete set of waveguide modes
on both the input and output sides, and the MODE Solutions' EME solver can be used. See Overlap analysis 763
for more information.

Supported Product: FDTD, MODE

Syntax Description
out = overlap(mode2, mode1); mode2, mode1: the mode names (in FDTD, use the names of the
frequency monitors, "m1" and "m2" instead)
out(1): the mode overlap
out(2): the mode power coupling
out = overlap(mode2, mode1, x, Mode alignment can be adjusted before overlap is calculated.
y,z); x offset
y offset
z offset
The offset is applied to the second mode listed.

See Also
copydcard 1649 , findmodes 1606 , coupling 1607 , bestoverlap 1609 , propagate 1609 , expand 1507 , expand2 1508 , optimizeposition
1610

7.12.10 bestoverlap
Finds the best overlap between the D-CARD called "test_mode" and the currently calculated modes. It returns the
name of the mode with the best overlap. This function is mainly used for tracking the desired mode during parameter
sweeps.

See the overlap function for more details about overlap and coupling calculations.

Supported Product: MODE

Syntax Description
out = bestoverlap("test_mode"); Calculates the best overlap.
out: a string containing the name of the mode with the best overlap
test_mode: a string containing the name of a D-CARD mode

See Also
findmodes 1606 , coupling 1607 , overlap 1608 , propagate 1609

7.12.11 propagate
The propagate command calculates the resulting mode profile of an arbitrary mode after it has propagated through a
waveguide for some distance. This is done by decomposing the mode into modes supported by the waveguide.
Each supported mode is then propagated through the waveguide. The resulting modes are then added coherently to
give the final mode profile. The modes used in this calculation are obtained from one or more Eigensolver
simulations.

See the overlap function for more details about overlap and coupling calculations.

2003 - 2016 Lumerical Solutions, Inc


1610 Lumerical Knowledge Base

Supported Product: MODE

Syntax Description
out = propagate(mode, d, n1, n2); mode: the name of the monitor containing the mode to propagate
d: distance to propagate
n1: minimum index
n2: maximum index
out: the name of the resulting dataset created by the propagate
command
out = propagate(mode, d, n1, n2, Mode alignment can be adjusted before propagate is calculated.
x, y); x offset
y offset

7.12.12 nummodes
Returns the number of modes in the Eigenmode solver mode list.

Supported Product: MODE

Syntax Description
n=nummodes; n will be equal to the number of modes found.

See Also
setanalysis 1605 , mesh 1606 , selectmode 1606 , frequencysweep 1607 , coupling 1607 , overlap 1608 , bestoverlap 1609 , propagate
1609

7.12.13 optimizeposition
The optimizeposition command calculates the x shift, y shift, and z shift resulting in maximum overlap between the
specified mode and d-card when using the FDE solver.

The x shift, y shift, and z shift correspond to the offset in the d-card profile in x, y, and z.

This function also populates the overlap and power coupling as well as the x shift, y shift, and z shift positions in the
Overlap analysis tab of the Eigensolver Analysis window, similarly to when you click on the "Optimize position"
button in the GUI.

See the overlap 1608 function for more details about overlap and coupling calculations.

Supported Product: MODE

Syntax Description
out = optimizeposition(mode mode number: the mode number in the mode list
number, d-card number); d-card number: the number of the d-card in the deck

Note that the "shift d-card center" option must be selected in order to
use this function.

Examples
This example shows how to use the optimizeposition command to calculate the x shift, y shift, and z shift between a
specified mode and d-card resulting in maximum overlap, print out the shift values and the optimal overlap and power
coupling with the applied shift.

setanalysis("shift d-card center",1);

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1611

shift = optimizeposition(4,1); # find x, y, z shift resulting in optimal overlap between


# the 4th mode in the mode list and the 1st mode in the dec
?"x shift:"+num2str(shift(1));
?"y shift:"+num2str(shift(2));
?"z shift:"+num2str(shift(3));

out = overlap("mode4","global_mode1",shift(1),shift(2),shift(3));
?"maximum overlap:"+num2str(out(1));
?"maximum power coupling:"+num2str(out(2));

See Also
copydcard 1649 , findmodes 1606 , coupling 1607 , overlap 1608 , bestoverlap 1609 , propagate 1609 , expand 1507 , setanalysis 1605

7.13 EME Solver Analysis


Command Description
setemeanalysis 1611 Set properties in EME analysis window.
getemeanalysis 1611 Get properties in EME analysis window.
emesweep 1612 Run EME solver analysis propagation sweep tool.
emepropagate 1611 Propagate fields and s-matrix results with EME solver.
getemesweep 1612 Get the user S matrix result from an emesweep 1612 .

7.13.1 setemeanalysis
Set calculation parameters in MODE Solutions' EME analysis window.

Supported Product: MODE Solutions

Syntax Description
?setemeanalysis; Lists all the parameters in the analysis window.
setemeanalysis("property", value); Sets"property" to value.

See Also
EME solver analysis 1611 , Spot size converter 2053

7.13.2 getemeanalysis
Get calculation parameters in MODE Solutions' EME analysis window.

Supported Product: MODE Solutions

Syntax Description
?getemeanalysis; Lists all the parameters in the analysis window.
getemeanalysis("property"); Gets"property" to value in EME solver analysis window.

See Also
EME solver analysis 1611 , Spot size converter 2053

7.13.3 emepropagate
Propagate fields and s-matrix results when in Analysis mode using EME solver.

Supported Product: MODE Solutions

2003 - 2016 Lumerical Solutions, Inc


1612 Lumerical Knowledge Base

Syntax Description
emepropagate; Propagate fields and s-matrix results. This is equivalent to the eme
propagate button in the graphical user interface.

See Also
EME solver analysis 1611 , Spot size converter 2053

7.13.4 emesweep
Run propagation sweep tool when in Analysis mode using EME solver.

Supported Product: MODE Solutions

Syntax Description
emesweep; Run propagation sweep.

See Also
EME solver analysis 1611 , Spot size converter 2053

7.13.5 getemesweep
Get the user S matrix result from emesweep 1612 .

Supported Product: MODE Solutions

Syntax Description
getemesweep("S"); Gets the user S matrix result from an EME propagation sweep

See Also
EME solver analysis 1611 , Spot size converter 2053

7.14 INTERCONNECT Element library


Command Description
library 1613 Returns a list of elements available in the currently installed element libraries,
including custom elements.
addtolibrary 1613 Adds an element to the currently selected custom library.
customlibrary 1613 Returns the path of the custom library.
autoplace 1614 Automatically arranges element positions inside of a compound element.
saveelement 1614 Saves an element to file.
loadelement 1614 Loads an element from file.
probe 1614 Places a probe analyzer at a specified port.
loadcustom 1616 Redirects the location of the element library Custom folder and reloads the
contents of the folder.
setvalue 1615 Sets an internal value for an element internal parameter.
replacelibrary 1617 Replaces all instances of the current library in the Element Library.

Design Kit Commands

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1613

Command Description
exportschematic 1615 Export the schematic contents of a design kit element to a file.
importschematic 1615 Import the schematic contents from a file into an existing design kit element.
loaddesignkit 1615 Loads a design kit and directs its contents to a user defined path.
removedesignkit 1616 Removes a design kit from the element library Design kits folder.
reloaddesignkit 1616 Reloads the contents of a design kit from the element library Design kits
folder.
packagedesignkit 1616 Create a design kit file from a Custom folder.
installdesignkit 1617 Install a design kit file to the Design Kits folder.

7.14.1 library
The script command returns a list of elements available in the currently installed element libraries, including custom
elements.

Supported Product: INTERCONNECT

Syntax Description
out = library; Returns a list of elements available in the currently installed element
libraries, including custom elements.

See Also
Element library 1612 , addtolibrary 1613 , customlibrary 1613

7.14.2 addtolibrary
The script command adds an element to the currently selected custom library.

Supported Product: INTERCONNECT

Syntax Description
addtolibrary ("name"); Adds an element, to the currently selected custom library.

See Also
Element library 1612 , library 1613 , customlibrary 1613

7.14.3 customlibrary
This command returns the location (path) of custom library.

Supported Product: INTERCONNECT

Syntax Description
out = customlibrary; Returns the directory of the custom library.

See Also
Element library 1612 , library 1613 , addtolibrary 1613

2003 - 2016 Lumerical Solutions, Inc


1614 Lumerical Knowledge Base

7.14.4 autoplace
This command automatically arranges element positions inside of a compound element.

Supported Product: INTERCONNECT

Syntax Description
autoplace (name); Arrange element positions inside of a
compound element automatically.

See Also
Element library 1612 , library 1613 , addtolibrary 1613 , saveelement 1614 , probe 1614

7.14.5 saveelement
This command saves an element to file.

Supported Product: INTERCONNECT

Syntax Description
saveelement (name); Save an element to file. The element will be
saved with the current element name in the
current working directory with extension ICE.

See Also
Element library 1612 , library 1613 , addtolibrary 1613 , autoplace 1614 , probe 1614 , loadelement 1614

7.14.6 loadelement
This command loads an element from a file created using the saveelement command.

Supported Product: INTERCONNECT

Syntax Description
loadelement (name); Load an element from file in the current
working directory with extension ICE.

See Also
Element library 1612 , library 1613 , addtolibrary 1613 , autoplace 1614 , probe 1614 , saveelement 1614

7.14.7 probe
This command places a probe analyzer at a specified port.

Supported Product: INTERCONNECT

Syntax Description
probe (name,port); Places a probe analyzer at a given element
name and port.

See Also
Element library 1612 , library 1613 , addtolibrary 1613 , saveelement 1614 , autoplace 1614

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1615

7.14.8 setvalue
Sets an internal value for an element internal parameter.

Supported Product: INTERCONNECT

Syntax Description
setvalue(element, parameter Set an internal value for an element internal parameter. Different
,value); from set or setnamed, setvalue can have direct access to internal
element parameters. Currently only the Optical N Port S-Parameter
support this function for the internal s parameters value. The s
parameters parameter is a cell that contains a complete description
of the element s-parameters.

See Also
Element library 1612 , addtolibrary 1613 , customlibrary 1613

7.14.9 exportschematic
This command exports the schematic contents of a design kit element to a file.

Supported Product: INTERCONNECT

Syntax Description
exportschematic (name, filename); Export the schematic contents of a design kit element to a file.

See Also
Element library 1612 , importschematic 1615

7.14.10 importschematic
This command imports the schematic contents from a file into an existing design kit element.

Supported Product: INTERCONNECT

Syntax Description
importschematic (name, filename); Import the schematic contents from a file into an existing design
kit element.

See Also
Element library 1612 , exportschematic 1615

7.14.11 loaddesignkit
This command loads a design kit and directs its contents to a user defined path.

Supported Product: INTERCONNECT

Syntax Description
loaddesignkit (name, path); Loads a design kit named name and directs its contents to a
user defined path. The design kit will be available in the element
library Design kits folder.

2003 - 2016 Lumerical Solutions, Inc


1616 Lumerical Knowledge Base

See Also
Element library 1612 , removedesignkit 1616 , reloaddesignkit 1616

7.14.12 removedesignkit
This command removes a design kit from the element library Design kits folder.

Supported Product: INTERCONNECT

Syntax Description
removedesignkit(name); Removes a design kit named name from the element library
Design kits folder.

See Also
Element library 1612 , loaddesignkit 1615 , reloaddesignkit 1616

7.14.13 reloaddesignkit
This command reloads the contents of a design kit from the element library Design kits folder.

Supported Product: INTERCONNECT

Syntax Description
reloaddesignkit (name); Reloads the contents of a design kit named name from the
element library Design kits folder.

See Also
Element library 1612 , loaddesignkit 1615 , removedesignkit 1616

7.14.14 loadcustom
This command redirects the location of the element library Custom folder and reloads the contents of the folder.

Supported Product: INTERCONNECT

Syntax Description
loadcustom (path); Redirect the location of the element library Custom folder to a
user defined path. It also reloads the contents of the Custom
folder in the element library.

See Also
Element library 1612

7.14.15 packagedesignkit
This command creates a design kit file from a Custom folder.

Supported Product: INTERCONNECT

Syntax Description
packagedesignkit(name, filename, key, Creates a design kit file named filename.ldk from the custom
overwrite); folder named name using an optional obfuscation key key. If
'key' = "none", it will packaged without encryption. The default

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1617

value for 'key' is the first key available. If overwrite is true, it will
overwrite an existing design kit file with the same name, if
overwrite is false, it will ask the user for confirmation before
overwriting. The default setting for 'overwrite' is false.

See Also
Element library 1612 , installdesignkit 1617 , Custom Library & Design Kit 1331

7.14.16 installdesignkit
This command installs a design kit file to the Design Kits folder.

Supported Product: INTERCONNECT

Syntax Description
installdesignkit(filename, path, Installs a design kit file named filename.ldk and directs its
overwrite); contents to a user defined path. The design kit will be available in
the element library Design kits folder. If overwrite is true, it will
overwrite an existing design kit with the same name, if overwrite
is false, it will ask the user for confirmation before overwriting.

See Also
Element library 1612 , packagedesignkit 1616 , Custom Library & Design Kit 1331

7.14.17 replacelibrary
This command replaces all instances of the current library in the Element Library.

Supported Product: INTERCONNECT

Syntax Description
replacelibrary(previous,new); Replace all instances of the current library previous by the new
library new.

See Also
Element library 1612

7.15 INTERCONNECT Measurements


These commands allow users to validate/retrieve results from analyzers.
Command Description
validate 1619 Reruns the analysis of an analyzer.
validateall 1619 Reruns the analysis of all analyzers in the simulation.
getresult 1647 Gets the result from an analyzer.

These commands allow users to set the result for scripted elements and compound elements.
Command Description
setresult 1619 Sets the result of a scripted/compound element.

These commands allow users to get internal value for edacosimulation elements and N Port S-Parameter element.

2003 - 2016 Lumerical Solutions, Inc


1618 Lumerical Knowledge Base

Command Description
getvalue 1620 Get an internal value for an element internal parameter.

These commands are used for creating scripted elements.


Command Description
popportdata 1620 Extracts the fist available data value from the input port.
pushportdata 1620 Sends the data to the output port.
cloneportdata 1621 Clones an existing data value.
popportframe 1621 Returns a frame structure containing the input signal for a given input port.
pushportframe 1622 Writes a frame structure containing the output signal for a given output port.
popportframedata 1622 Returns a data structure containing the input signal for a given input port.
pushportframedata 1623 Writes a data structure containing the output signal for a given output port.
getportframeheader 1623 Returns a header structure containing the input signal properties for a given
input port.
setportframeheader 1623 Writes a header structure containing the output signal properties for a given
output port.
getmonitorframe 1623 Reads the available frames from an analyzer input port.
getmonitorwaveform 1624 Returns a structure containing a waveform from an analyzer input port.
getdigitaldata 1628 Gets digital data.
getdigitalwaveform 1628 Gets digital waveform.
setdigitaldata 1629 Sets digital data.
getelectricaldata 1629 Gets electrical data.
getelectricalwaveform 1630 Gets electrical waveform.
setelectricaldata 1631 Sets electrical data.
getopticaldata 1625 Gets optical data.
getopticalwaveform 1626 Gets optical waveform.
setopticaldata 1627 Sets optical data.
portdatasize 1625 Returns the number of data values available at the input port.
setsparameter 1631 Sets the s-parameter between output and input port.
setfir 1633 Initializes a FIR filter using the current s-parameters.
getports 1635 Returns a list of ports in an element.

These commands allow users to create user defined settings


Command Description
setsetting 1633 Sets the value a user defined setting.
getsetting 1634 returns the value a user defined setting.

These commands allow users to run optimization under user defined settings.
Command Description

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1619

runoptimization 1634 Runs optimization of a property from a chosen element under specified
condition.

These commands allow users to export the image of the current circuit schematic.
Command Description
exportimage 1635 Exports an image of the current circuit schematic.

7.15.1 validate
Updates the results for the specified analyzer.

Supported Product: INTERCONNECT

Syntax Description
validate("analyzer"); Updates the results for "analyzer". If the name is not provided, the
selected analyzer will be updated.

See Also
validateall 1619

7.15.2 validateall
Updates the results for all the analyzers in the current simulation.

Supported Product: INTERCONNECT

Syntax Description
validateall; Updates the results for all the analyzers in the current simulation.

See Also
validate 1619

7.15.3 setresult
Sets the result of a scripted/compound element. Note that this command is not available from the script prompt or
script file editor.

Supported Product: INTERCONNECT

Syntax Description
setresult("result",value); Sets the "result" for the scripted/compound element to the specified
value.
setresult("result",value,"kind Sets the "result" for the scripted/compound element to the specified
(unit)"); value with the given description. Note that units should be placed in
parenthesis.
setresult("result",x,y,"x title",'y Sets the x, y parameters of the "result" for the scripted/compound
title'); element. This is useful for visualization.

See Also
getresult 1647

2003 - 2016 Lumerical Solutions, Inc


1620 Lumerical Knowledge Base

7.15.4 getresultdata
Gets results from an analyzer. This differs from the "getresult" function in that the results are returned as matrices,
not Datasets 1461 .

Supported Product: INTERCONNECT

Syntax Description
?getresultdata; Returns the names of all elements in the current simulation that
contain results.
?getresultdata("analyzer"); Returns all available results for "analyzer".
out = getresultdata("analyzer", Returns the result "result" for "analyzer".
"result");

See Also
setresult 1619 , getresult 1647

7.15.5 getvalue
Get an internal value for an element internal parameter.

Supported Product: INTERCONNECT

Syntax Description
value=getvalue(element, Get an internal value for an element internal parameter. Different from
parameter) set or getnamed, getvalue can have direct access to internal
value=getvalue(element, parameter element parameters. type allows for variations for a given parameter.
,type)

7.15.6 popportdata
Extract the first available data value from the input port.

Supported Product: INTERCONNECT

Syntax Description
data_out = Returns the first available data value from "input_port".
popportdata('input_port");

See Also
pushportdata 1620 , cloneportdata 1621 , portdatasize 1625

7.15.7 pushportdata
Sends the data value to the specified output port.

Supported Product: INTERCONNECT

Syntax Description
pushportdata("output_port",data); Sends the data value to "output_port".

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1621

See Also
popportdata 1620 , cloneportdata 1621 , portdatasize 1625

7.15.8 cloneportdata
Clones an existing data value.

Supported Product: INTERCONNECT

Syntax Description
data_destination = Clones "data_source", returns the data destination.
cloneportdata(data_source);

See Also
popportdata 1620 , pushportdata 1620 , portdatasize 1625

7.15.9 popportframe
Extract the first available data value from the input port.

Supported Product: INTERCONNECT

Syntax Description
signalIn = popportframe(port); For a scripted element, this command returns a frame structure
containing the input signal for a given input port (data) and its
properties (header).

Implementation Details
Digital signal frame:
The data contains the current time instant and the value of the signal, where the header contains the signal bitrate,
the frequency grid spacing and the type. The type for a digital signal is 3.

#digital signal frame


data.time
data.value
header.bitrate
header.frequency_grid_spacing
header.type

Electrical signal frame:


The data contains the current time instant and the value of the signal, where the header contains the sample rate,
the frequency grid spacing and the type. The type for a digital signal is 2.

#electrical signal frame


data.time
data.value
header.sample_rate
header.frequency_grid_spacing
header.type

Optical signal frame:


The data contains the current time instant and the value of the signal, where the header contains the sample rate,
the frequency grid spacing and the type. The type for a digital signal is 1. The header also contains a vector of
modes. For each mode a vector of channels is defined. Typically a single channel is used.

#optical signal frame

2003 - 2016 Lumerical Solutions, Inc


1622 Lumerical Knowledge Base

data.time
data.signal{1}.orthogonal_identifier
data.signal{1}.value
data.signal{2}.orthogonal_identifier
data.signal{2}.value
. . .

signalIn.header.type
header.frequency_grid_spacing
header.sample_rate
header.signal{1}.frequency
header.signal{1}.label
signalIn.header.signal{1}.orthogonal_identifier;
signalIn.header.signal{1}.uid
signalIn.header.signal{2}.frequency
signalIn.header.signal{2}.label
signalIn.header.signal{2}.orthogonal_identifier
signalIn.header.signal{2}.uid
. . .

See Also
popportdata 1620 , pushportdata 1620 , cloneportdata 1621 , portdatasize 1625 , pushportframe 1622 , popportframedata 1622 ,
pushportframedata 1623 , getportframeheader 1623 , setportframeheader 1623 , getmonitorframe 1623 , getmonitorwaveform 1624

7.15.10 pushportframe
Writes a frame structure containing the output signal for a given output port.

Supported Product: INTERCONNECT

Syntax Description
pushportframe(port); For a scripted element, this command writes a frame structure
containing the output signal for a given output port (data) and its
properties (header). Refer to popportframe for the list of supported
frame types and examples.

See Also
popportdata 1620 , pushportdata 1620 , cloneportdata 1621 , portdatasize 1625 , popportframe 1621 , popportframedata 1622 ,
pushportframedata 1623 , getportframeheader 1623 , setportframeheader 1623 , getmonitorframe 1623 , getmonitorwaveform 1624

7.15.11 popportframedata
Returns a data structure containing the input signal for a given input port.

Supported Product: INTERCONNECT

Syntax Description
signalIn = popportframedata (port); For a scripted element, this command returns a data structure
containing the input signal for a given input port (data).
Refer to popportframe for the list of supported data types and
examples.

See Also
popportdata 1620 , pushportdata 1620 , cloneportdata 1621 , portdatasize 1625 , popportframe 1621 , pushportframe 1622 ,
pushportframedata 1623 , getportframeheader 1623 , setportframeheader 1623 , getmonitorframe 1623 , getmonitorwaveform 1624

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1623

7.15.12 pushportframedata
Writes a data structure containing the output signal for a given output port.

Supported Product: INTERCONNECT

Syntax Description
pushportframedata (port); For a scripted element, this command writes a data structure
containing the output signal for a given output port (data). Refer to
popportframe for the list of supported data types and examples.

See Also
popportdata 1620 , pushportdata 1620 , cloneportdata 1621 , portdatasize 1625 , popportframe 1621 , pushportframe 1622 ,
popportframedata 1622 , getportframeheader 1623 , setportframeheader 1623 , getmonitorframe 1623 , getmonitorwaveform 1624

7.15.13 getportframeheader
Returns a header structure containing the input signal properties for a given input port.

Supported Product: INTERCONNECT

Syntax Description
getportframeheader(port); For a scripted element, this command returns a header structure
containing the input signal properties for a given input port (header).
Refer to popportframe for the list of supported header types and
examples.

See Also
popportdata 1620 , pushportdata 1620 , cloneportdata 1621 , portdatasize 1625 , popportframe 1621 , pushportframe 1622 ,
popportframedata 1622 , pushportframedata 1623 , setportframeheader 1623 , getmonitorframe 1623 , getmonitorwaveform 1624

7.15.14 setportframeheader
Writes a header structure containing the output signal properties for a given output port.

Supported Product: INTERCONNECT

Syntax Description
setportframeheader(port); For a scripted element, this command writes a header structure
containing the output signal properties for a given output port (header).
Refer to popportframe for the list of supported header types and
examples.

See Also
popportdata 1620 , pushportdata 1620 , cloneportdata 1621 , portdatasize 1625 , popportframe 1621 , pushportframe 1622 ,
popportframedata 1622 , pushportframedata 1623 , getportframeheader 1623 , getmonitorframe 1623 , getmonitorwaveform 1624

7.15.15 getmonitorframe
Reads the available frames from an analyzer input port.

Supported Product: INTERCONNECT

Syntax Description

2003 - 2016 Lumerical Solutions, Inc


1624 Lumerical Knowledge Base

signalIn = For a scripted element, this command reads the available frames from
getmonitorframe(port,start,count); an analyzer input port. Analyzer input ports store the signal frames in
an internal buffer. This function allows for accessing these frames from
a starting point start with length defined by count. Different from
popportrame where header and data contains one structure each, the
data member returned from this function is cell containing multiple data
values.
Refer to popportframe for the list of supported frame types and
examples.

See Also
popportdata 1620 , pushportdata 1620 , cloneportdata 1621 , portdatasize 1625 , popportframe 1621 , pushportframe 1622 ,
popportframedata 1622 , pushportframedata 1623 , getportframeheader 1623 , setportframeheader 1623 , getmonitorwaveform
1624

7.15.16 getmonitorwaveform
Returns a structure containing a waveform from an analyzer input port.

Supported Product: INTERCONNECT

Syntax Description
signalIn = For a scripted element, this command returns a structure containing a
getmonitorwaveform(port,domain= waveform from an analyzer input port. Results can be provided in time
time); or frequency domains. This command is specific for building
analyzers.

Implementation Details
Digital signal waveform:
The waveform contains the signal bitrate and two vectors: the time and amplitude values.

#digital signal waveform


bitrate
time=matrix;
value=matrix;

Electrical signal frame:


The waveform contains the signal and its bandwidth. Frequency or time domain values are available.

#electrical signal frame


bandwidth.center
bandwidth.lower
bandwidth.range
bandwidth.spacing
bandwidth.upper
signal.frequency=matrix or signal.time=matrix
signal.value=matrix

Optical signal frame:


The data contains the current time instant and the value of the signal, where the header contains the sample rate,
the frequency grid spacing and the type. The type for a digital signal is 1. The header also contains a vector of
modes. For each mode a vector of channels is defined. Typically a single channel is used.

#optical signal frame


data.time
data.signal{1}.orthogonal_identifier
data.signal{1}.value

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1625

data.signal{2}.orthogonal_identifier
data.signal{2}.value
. . .

signalIn.header.type
header.frequency_grid_spacing
header.sample_rate
header.signal{1}.frequency
header.signal{1}.label
signalIn.header.signal{1}.orthogonal_identifier;
signalIn.header.signal{1}.uid
signalIn.header.signal{2}.frequency
signalIn.header.signal{2}.label
signalIn.header.signal{2}.orthogonal_identifier
signalIn.header.signal{2}.uid
. . .

See Also
popportdata 1620 , pushportdata 1620 , cloneportdata 1621 , portdatasize 1625 , popportframe 1621 , pushportframe 1622 ,
popportframedata 1622 , pushportframedata 1623 , getportframeheader 1623 , setportframeheader 1623 , getmonitorframe 1623

7.15.17 portdatasize
Returns the number of data values available at the input port.

Supported Product: INTERCONNECT

Syntax Description
size = portdatasize("input_port"); Returns the number of data values available at the input port.

See Also
popportdata 1620 , pushportdata 1620 , cloneportdata 1621

7.15.18 getopticaldata
For a scripted element optical input port, this command returns properties of signalIn or a specified mode of signalIn
depending on the specified options.
This command is typically used in scripted element go functions.

Supported Product: INTERCONNECT

Syntax Description
out=getopticaldata(signalIn,n, m, Returns properties of signalIn or specified modes of signalIn depending
"option1", b, "option2", p); on specified input parameters.

Parameter Description Acceptable values Output


signalIn required input port signal If no other parameters
specified, returns size of
signalIn
n optional index If no other options
specified, returns number
of modes of signalIn at
index n

2003 - 2016 Lumerical Solutions, Inc


1626 Lumerical Knowledge Base

m optional mode number of signalIn


option1 optional property of mode m to return "uid" Unique identifier
"oid" Orthogonal identifier
"label" Label
"signalband" Number of signal bands
or channels at index n if
option 2 not specified
b optional band, used when option1 is
"signalband" and option2 is
specified.
option2 optional property to return, used "frequencyrange" Frequency range
when option1 is "signalband" parameter value
depending on p
"time" Single time value
"amplitude" Single amplitude value
p optional parameter, used when "center" Baseband center
option2 is "frequencyrange" frequency
"upper" Lower frequency limit
"lower" Upper frequency limit
"bandwidth" Signal sample rate
"spacing" Frequency grid spacing
or inverse of the
simulation time window

See Also
getdigitaldata 1628 , getdigitalwaveform 1628 , setdigitaldata 1629 , getopticalwaveform 1626 , setopticaldata 1627 ,
getelectricaldata 1629 , getelectricalwaveform 1630 , setelectricaldata 1631

7.15.19 getopticalwaveform
For a scripted element optical input port, this command returns number of modes of signalIn or properties of a
specified mode of signalIn depending on the specified options.
This command is typically used in scripted element wrapup functions.

Supported Product: INTERCONNECT

Syntax Description
out=getopticalwaveform(signalIn, Returns properties of signalIn or specified modes of signalIn depending
m, "option1", b, "option2", p); on specified input parameters.

Parameter Description Acceptable values Output


signalIn required input port signal If no other parameters
specified, returns number
of modes of signalIn
m optional mode number of signalIn
option1 optional property of mode m to return "uid" Unique identifier

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1627

"oid" Orthogonal identifier


"label" Label
"signalband" Number of signal bands
or channels at index n if
option 2 not specified
b optional band, used when option1 is
"signalband" and option2 is
specified.
option2 optional property to return, used "frequencyrange" Frequency range
when option1 is "signalband" parameter value
depending on p
"time" Single time value
"amplitude" Single amplitude value
p optional parameter, used when "center" Baseband center
option2 is "frequencyrange" frequency
"upper" Lower frequency limit
"lower" Upper frequency limit
"bandwidth" Signal sample rate
"spacing" Frequency grid spacing
or inverse of the
simulation time window

See Also
getdigitaldata 1628 , getdigitalwaveform 1628 , setdigitaldata 1629 , getopticaldata 1625 , setopticaldata 1627 , getelectricaldata
1629 , getelectricalwaveform 1630 , setelectricaldata 1631

7.15.20 setopticaldata
For a scripted element optical input port, this command sets properties of signalIn or a specified mode of signalIn
depending on the specified options.
This command is typically used in scripted element go functions.

Supported Product: INTERCONNECT

Syntax Description
setopticaldata(signalIn,n, m, Sets properties of signalIn or specified modes of signalIn depending on
"option1", b, "option2"); specified input parameters.

Parameter Description Acceptable values Parameter which is set


signalIn required input port signal
n required index
m required mode number of signalIn
option1 required property of mode m to set "uid" Unique identifier
"oid" Orthogonal identifier
"label" Label
"signalband"

2003 - 2016 Lumerical Solutions, Inc


1628 Lumerical Knowledge Base

b optional band, used when option1 is


"signalband" and option2 is
specified.
option2 optional property of mode m to set, "amplitude" Single amplitude value
used when option1 is
"time" Single time value
"signalband"

See Also
getdigitaldata 1628 , getdigitalwaveform 1628 , setdigitaldata 1629 , getopticaldata 1625 , getopticalwaveform 1626 ,
getelectricaldata 1629 , getelectricalwaveform 1630 , setelectricaldata 1631

7.15.21 getdigitaldata
For a scripted element digital input port, this command returns a single bitrate, time, or amplitude value for signalIn
at index n. Parameter n is typically zero.
This command is typically used in scripted element go functions.

Supported Product: INTERCONNECT

Syntax Description
out=getdigitaldata(signalIn,n,"optio Returns a single bitrate, time, or amplitude value for a digital signal
n"); signalIn at index n depending on specified option. If no option is
specified, amplitude will be returned.

n is the "sampleIndex" in the buffer. By default, if the element is not an


analyzer, the buffer size is 1 and n should be 0.

Options can be:


"bitrate"
"time"
"amplitude"

See Also
getdigitalwaveform 1628 , setdigitaldata 1629 , getopticaldata 1625 , getopticalwaveform 1626 , setopticaldata 1627 ,
getelectricaldata 1629 , getelectricalwaveform 1630 , setelectricaldata 1631

7.15.22 getdigitalwaveform
For a scripted element digital input port, this command returns the bitrate value, time values, or amplitude values for
signalIn waveform.
This command is typically used in scripted element wrapup functions.

Supported Product: INTERCONNECT

Syntax Description
out=getdigitalwaveform(signalIn,"o Returns a the bitrate value, time values, or amplitude values for signalIn
ption"); waveform depending on specified option. If no option is specified,
amplitude values will be returned.

Options can be:


"bitrate"
"time"
"amplitude"

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1629

See Also
getdigitaldata 1628 , setdigitaldata 1629 , getopticaldata 1625 , getopticalwaveform 1626 , setopticaldata 1627 , getelectricaldata
1629 , getelectricalwaveform 1630 , setelectricaldata 1631

7.15.23 setdigitaldata
For a scripted element digital output port, this command sets a single bitrate value for signalOut at index n.
Parameter n is typically zero.
This command is typically used in scripted element go functions.

Supported Product: INTERCONNECT

Syntax Description
setdigitaldata(signalOut,n,"option", Sets a single bitrate, time, or amplitude value for signalOut at index n
data); depending on specified option. Parameter n is typically zero.
This command is typically used in scripted element go functions.

n is the "sampleIndex" in the buffer. By default, if the element is not an


analyzer, the buffer size is 1 and n should be 0.

Option must be specified. Options can be:


"bitrate"
"time"
"amplitude"

Data is the bitrate, time, or amplitude value to set.

See Also
getdigitaldata 1628 , getdigitalwaveform 1628 , getopticaldata 1625 , getopticalwaveform 1626 , setopticaldata 1627 ,
getelectricaldata 1629 , getelectricalwaveform 1630 , setelectricaldata 1631

7.15.24 getelectricaldata
For a scripted element electrical input port, this command returns the size, single frequency range, single time
value, or single amplitude value for signalIn.
This command is typically used in scripted element go functions.

Supported Product: INTERCONNECT

Syntax Description
out=getelectricaldata(signalIn,n,"o For a scripted element electrical input port, this command returns the
ption1","option2"); size, single frequency range, single time value, or single amplitude
value for signalIn depending on option1.

n is the "sampleIndex" in the buffer. By default, if the element is not an


analyzer, the buffer size is 1 and n should be 0.

If no options are specified, and n is not specified, the size of signalIn is


returned. If this value is zero, there are no available signals to be
processed by the element.

Option1 can be:


"frequencyrange"
"time"

2003 - 2016 Lumerical Solutions, Inc


1630 Lumerical Knowledge Base

"amplitude"

Option2 is used when option1 is "frequencyrange". Option2 can be:


"center"
"lower"
"upper"
"bandwidth"
"spacing"

For electrical signals the center frequency value is zero, the bandwidth
is the signal sample rate, the spacing is the frequency grid spacing or
the inverse of the simulation time window, lower is the lower frequency
limit or bandwidth/2 and upper is the upper frequency limit or
+bandwidth/2.

See Also
getdigitaldata 1628 , getdigitalwaveform 1628 , setdigitaldata 1629 , getopticaldata 1625 , getopticalwaveform 1626 , setopticaldata
1627 , getelectricalwaveform 1630 , setelectricaldata 1631

7.15.25 getelectricalwaveform
For a scripted element electrical input port, this command returns the frequency range parameter value, time values,
frequency values, or amplitude values for signalIn.
This command is typically used in scripted element wrapup functions.

Supported Product: INTERCONNECT

Syntax Description
out=getelectricalwaveform(signalIn Returns the frequency range parameter value, time values, frequency
,"option1","option2"); values, or amplitude values for signalIn depending on option1.

Option1 is required. Values for option1 can be:


"frequencyrange"
"time"
"frequency"
"amplitude"

If "time" is specified, this command also converts the signal waveform


to time domain, affecting subsequent calls to retrieve the amplitude of
the signal.

If "frequency" is specified, this command also converts the signal


waveform to frequency domain, affecting subsequent calls to retrieve
the amplitude of the signal.

If "amplitude" is specified, signalIn can be in time or frequency domain.

Option2 is used when option1 is "frequencyrange". Option2 can be:


"center"
"lower"
"upper"
"bandwidth"
"spacing"

For electrical signals the center frequency value is zero, the bandwidth
is the signal sample rate, the spacing is the frequency grid spacing or

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1631

the inverse of the simulation time window, lower is the lower frequency
limit or bandwidth/2 and upper is the upper frequency limit or
+bandwidth/2.

See Also
getdigitaldata 1628 , getdigitalwaveform 1628 , setdigitaldata 1629 , getopticaldata 1625 , getopticalwaveform 1626 , setopticaldata
1627 , getelectricaldata 1629 , setelectricaldata 1631

7.15.26 setelectricaldata
For a scripted element electrical output port, this command sets a single time or amplitude value for signalOut at
index n.
Parameter n is typically zero.
This command is typically used in scripted element go functions.

Supported Product: INTERCONNECT

Syntax Description
setelectricaldata(signalOut,n,"opti Sets a single time, or amplitude value for signalOut at index n
on",data); depending on specified option. Parameter n is typically zero.
This command is typically used in scripted element go functions.

n is the "sampleIndex" in the buffer. By default, if the element is not an


analyzer, the buffer size is 1 and n should be 0.

Option must be specified. Options can be:


"time"
"amplitude"

Data is the time, or amplitude value to set.

See Also
getdigitaldata 1628 , getdigitalwaveform 1628 , setdigitaldata 1629 , getopticaldata 1625 , getopticalwaveform 1626 , setopticaldata
1627 , getelectricaldata 1629 , getelectricalwaveform 1630

7.15.27 setsparameter
Sets the s-parameters between output port and input port.

IMPORTANT: the filter transfer function depends on the sample rate when providing filter coefficients.

Supported Product: INTERCONNECT

Syntax Description
setsparameter("output_port", Sets the s-parameter between "output_port" and "input_port" as a
"input_port", "constant", value); single complex constant value (frequency independent).
setsparameter("output_port","mod Sets the s-parameter between "output_port" and "input_port" as a
e_label", output_mode_ID, single complex constant value (frequency independent).
"input_port", input_mode_ID, "output_mode_ID" and "input_mode_ID" are numbers (i.e., 1, 2, 3...).
"constant", value);
setsparameter("output_port", Sets the s-parameter between "output_port" and "input_port", where

2003 - 2016 Lumerical Solutions, Inc


1632 Lumerical Knowledge Base

"input_port", "transmission", the transmission is a matrix with 3 columns: frequency (Hz), amplitude
transmission); and angle (rad). The number of rows of the matrix is the number of
frequency points. If only two columns are provided, it is assume that
the angle values are zero.
setsparameter("output_port","mod Sets the s-parameter between "output_port" and "input_port", where
e_label", output_mode_ID, the transmission is a matrix with 3 columns: frequency (Hz), amplitude
"input_port", input_mode_ID, and angle (rad). The number of rows of the matrix is the number of
"transmission", transmission); frequency points. If only two columns are provided, it is assume that
the angle values are zero. "output_mode_ID" and "input_mode_ID" are
numbers (i.e., 1, 2, 3...).
setsparameter("output_port", Sets the frequency dependent propagation parameters between
"input_port", "propagation", "output_port" and "input_port", where the propagation is a matrix with
propagation, length, digital); up to 6 columns: frequency (Hz), absorption (dB/m), effective index,
group velocity (m/s), disperstion (m/s/s) and digital filter. The number of
rows of the matrix is the number of frequency points. Group velocity,
dispersion and digital filter are optional. The length (m) is the
propagation length. Digital is a boolean value which defines whether the
model will use a FIR filter or not (default is true).
setsparameter("output_port","mod Sets the s-parameter between "output_port" and "input_port", where
e_label", output_mode_ID, the propagation is a matrix with up to 6 columns columns: frequency
"input_port", input_mode_ID, (Hz), absorption (dB/m), effective index, group velocity (m/s),
"propagation", propagation, length, disperstion (m/s/s) and digital filter. The number of rows of the matrix is
digital); the number of frequency points. Group velocity, dispersion and digital
filter are optional. The length (m) is the propagation length. Digital is a
boolean value which defines whether the model will use a FIR filter or
not (default is true). "output_mode_ID" and "input_mode_ID" are
numbers (i.e., 1, 2, 3...).
setsparameter("output_port","mod Sets the s-parameter between "output_port" and "input_port", where
e_label", output_mode_ID, the coefficients is a matrix with 2 columns: complex numerators and
"input_port", input_mode_ID, complex denominators. The number of rows of the matrix is the
"coefficient", coeff, frequency); number of coefficients points. If the number of numerators are different
from the number of denominators, set the missing values to zero.
frequency is the center frequency of the transmission described by the
coefficients. Coefficients decrease in powers of z (increase in powers
of 1/z). "output_mode_ID" and "input_mode_ID" are numbers (i.e., 1, 2,
3...).

Example
#Filter coefficients for a Bessel filter of order 4, centered at 193.1 THz:
Frequency=193.1e12;
trans = matrix(5,2);

#numerator coefficients (real or complex)


#with the constant terms of the polynomial and decrease in powers of z (increase in power
trans(1,1) = 0.0016146343489959229;
trans(2,1) = 0.0064585373959836915;
trans(3,1) = 0.0096878060939755359;
trans(4,1) = 0.0064585373959836915;
trans(5,1) = 0.0016146343489959229;

#denominator coefficients (real or complex)


#with the constant terms of the polynomial and decrease in powers of z (increase in power
trans(1,2) = 1.0000000000000000;
trans(2,2) = 2.6335032369252369;
trans(3,2) = -2.6909323201054560;
trans(4,2) = 1.2572856503799887;

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1633

trans(5,2) = -0.22569071678370439;

setsparameter("port 2", "port 1", "coefficients", trans, frequency );

Below is a simple example of the usage of the 'coeffieicnt' option, where the user can enter z-transform numerator
and denominator complex coefficients directly. User should provide the complex coefficients and the center
frequency. If the number of numerators and denominators are different, simply provide zero values for the missing
coefficients.
trans = matrix(5,2);

#numerator coefficients (real or complex) - with the constant terms of the polynomial and
trans(1,1) = 0.0016146343489959229;
trans(2,1) = 0.0064585373959836915;
trans(3,1) = 0.0096878060939755359;
trans(4,1) = 0.0064585373959836915;
trans(5,1) = 0.0016146343489959229;
#denominator coefficients (real or complex) - with the constant terms of the polynomial a
trans(1,2) = 1.0000000000000000;
trans(2,2) = 2.6335032369252369;
trans(3,2) = -2.6909323201054560;
trans(4,2) = 1.2572856503799887;
trans(5,2) = -0.22569071678370439;

setsparameter("port 2", "port 1", "coefficients", trans, frequency );


setsparameter("port 1", "port 2", "coefficients", trans, frequency );

7.15.28 setfir
Initialize a FIR filter using the current s-parameters.

Supported Product: INTERCONNECT

Syntax Description
setfir("window",taps); Initialize a FIR filter (with the specified number of taps) using the
current s-parameters. "window" is the window function used by the
FIR. The options are: "rectangular", "hamming", "hanning".

See Also
setsparameter 1631

7.15.29 setsetting
Set the value of a user defined setting. User settings are saved permanently and available even closing the
application.

Supported Product: INTERCONNECT

Syntax Description
setsetting("name","string_value") Set the value of a user defined setting.

Parameter Type Description


name string name of the setting.
string_value string value of the setting.

2003 - 2016 Lumerical Solutions, Inc


1634 Lumerical Knowledge Base

See Also
Measurements 1617 , getsetting 1634

7.15.30 getsetting
Returns the value of a user defined setting. This command can be used with setsetting 1633 .

Supported Product: INTERCONNECT

Syntax Description
getsetting("name") get the value of a user defined setting.

Parameter Type Description


name string name of the setting.

See Also
Measurements 1617 , setsetting 1633

7.15.31 getports
Returns a list of ports available in an element.

Supported Product: INTERCONNECT

Syntax Description
out = getports("name") get a list of available ports.

Parameter Type Description


name string name of the element.

See Also
Measurements 1617

7.15.32 runoptimization
This command optimizes a property from a chosen element under specified condition.

Supported Product: INTERCONNECT

Syntax Description
x=runoptimization(element,property,min,max,analyzer,result, Optimize property from element until a target
target,target,tolerance=1e-9,iterations=2000) for an analyzer result is reached. Function
returns an array with two columns, the firs
column contains the property values and the
second column contains the result values.
x=runoptimization(element,property,min,max,analyzer,result, Optimize property from element until a
minimize,tolerance=1e-9,iterations=2000) minimum value for an analyzer result is
reached. Function returns an array with two

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1635

columns, the firs column contains the


property values and the second column
contains the result values.
x=runoptimization(element,property,min,max,analyzer,result, Optimize property from element until a
maximize,tolerance=1e-9,iterations=2000) maximum value for an analyzer result is
reached. Function returns an array with two
columns, the firs column contains the
property values and the second column
contains the result values.

Example
Optimize for target
x=runoptimization("PIN Photodetector","thermal noise",1e-20,1e-17,"Eye Diagram","measurem

Search for minimum


x=runoptimization("LP Bessel Filter","cutoff frequency",1e+09,1e+10,"Eye Diagram","measur

Search for maximum


x=runoptimization("LP Bessel Filter","cutoff frequency",1e+09,1e+10,"Eye Diagram","measur

7.15.33 exportimage
This command export an image of the current circuit schematic.

Supported Product: INTERCONNECT

Syntax Description
exportimage(filename); Exports an image of the current circuit schematic. If the file has png
or no extension, a PNG (Portable Network Graphics) will be created. If
the file has svg extension, a SVG (Scalable Vector Graphics) file will
be created.

See Also
Measurements 1617

7.16 Interoperability
This topic lists all commands related to Lumerical interoperability with other Lumerical products and 3rd party tools
such as MATLAB.

Lumerical automation API


Command Description
opensession 1636 Open server session in any Lumerical product from your current
simulation(client)
closesession 1637 Close opened session
putremotedata 1637 Send a variable from the client workspace to the server workspace
getremotedata 1638 Get a variable from the server workspace to the client workspace
evalremote 1639 Send and execute script command(s) on the server

See the following example for more information about the Lumerical automation API: MZI API automation example
2221

2003 - 2016 Lumerical Solutions, Inc


1636 Lumerical Knowledge Base

Matlab automation API (to be used in Matlab)


Command Description
appopen 1639 Open Lumerical session from Matlab
appclose 1641 Close opened Lumerical session from Matlab
appevalscript 1641 Send Lumerical script command(s) from Matlab to the Lumerical and execute
appgetvar 1640 Get a variable from Lumerical workspace to Matlab workspace

See the following example for more information about the Matlab automation API: Matlab Optimization Example 2085

MATLAB functions (to be used in Lumerical)


Command Description
matlabsave 1642 Save workspace data to a Matlab .mat file.
matlabsavelegacy 1642 Save workspace data to a legacy Matlab .mat file format.
matlab 1642 Execute a MATLAB command
matlabget 1643 Get a variable from the MATLAB workspace
matlabput 1644 Send a variable to the MATLAB workspace
matlabload 1642 Load from MATLAB .mat file into workspace.

7.16.1 opensession
A command that opens a server session of selected Lumerical product via automation API. Once the session is
opened, client product can call the server to execute arbitrary Lumerical script command(s) and execute them.
Opened Lumerical session also allows to send and get variables from/to workspace.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
s2=opensession('device'); When executed, this command will open a session of Device via the
automation API.

Accepted parameters:
fdtd
mode
device
interconnect

Example
The following code example opens Device as a server, sends local variable 'x' to Device workspace followed by a
command to manipulate the variable and the retrieves the result before closing the session:

#Opend Device session


s2=opensession('device');

#Declare local variable x


x=2;

#Send the local variable to Device workspace via API


putremotedata(s2,'x_device',x);

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1637

#Send script command to Device via API andsquare the variable


evalremote(s2,"y_device=x_device^2;");

#Get the variable from Device worksapace via API


?y=getremotedata(s2,'y_device');

#Close the session


closesession(s2);

See Also
closesession 1637 , putremotedata 1637 , getremotedata 1638 , evalremote 1639

7.16.2 closesession
A command that will close an active server session of a specified Lumerical product previously opened via
automation API.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
closesession(s); Closes an active session s

Example
The following code example opens Device as a server, sends local variable 'x' to Device workspace followed by a
command to manipulate the variable and the retrieves the result before closing the session:

#Opend Device session


s2=opensession('device');

#Declare local variable x


x=2;

#Send the local variable to Device workspace via API


putremotedata(s2,'x_device',x);

#Send script command to Device via API andsquare the variable


evalremote(s2,"y_device=x_device^2;");

#Get the variable from Device worksapace via API


?y=getremotedata(s2,'y_device');

#Close the session


closesession(s2);

See Also
opensession 1637 , putremotedata 1637 , getremotedata 1638 , evalremote 1639

7.16.3 putremotedata
A command that will send a variable from the client workspace into the server workspace via an active session

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
putremotedata(s,'y',x); Creates variable y in the server workspace that has value of x in the

2003 - 2016 Lumerical Solutions, Inc


1638 Lumerical Knowledge Base

client workspace via an active session s

Example
The following code example opens Device as a server, sends local variable 'x' to Device workspace followed by a
command to manipulate the variable and the retrieves the result before closing the session:

#Opend Device session


s2=opensession('device');

#Declare local variable x


x=2;

#Send the local variable to Device workspace via API


putremotedata(s2,'x_device',x);

#Send script command to Device via API andsquare the variable


evalremote(s2,"y_device=x_device^2;");

#Get the variable from Device worksapace via API


?y=getremotedata(s2,'y_device');

#Close the session


closesession(s2);

See Also
opensession 1637 , closesession 1637 , getremotedata 1638 , evalremote 1639

7.16.4 getremotedata
A command that will get a variable from the server workspace into the client workspace via an active session

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
y=getremotedata(s,'x'); Creates variable y in the local client workspace that has value of x in
the server workspace via an active session s

Example
The following code example opens Device as a server, sends local variable 'x' to Device workspace followed by a
command to manipulate the variable and the retrieves the result before closing the session:

#Opend Device session


s2=opensession('device');

#Declare local variable x


x=2;

#Send the local variable to Device workspace via API


putremotedata(s2,'x_device',x);

#Send script command to Device via API andsquare the variable


evalremote(s2,"y_device=x_device^2;");

#Get the variable from Device worksapace via API


?y=getremotedata(s2,'y_device');

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1639

#Close the session


closesession(s2);

See Also
opensession 1638 , closesession 1637 , putremotedata 1637 , evalremote 1639

7.16.5 evalremote
A command that will send a script commnad(s) to the server product and executes it there

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
evalremote(s,"y=x^2;"); Sends command y=x^2; to the server via an open session s and
executes it

Example
The following code example opens Device as a server, sends local variable 'x' to Device workspace followed by a
command to manipulate the variable and the retrieves the result before closing the session:

#Opend Device session


s2=opensession('device');

#Declare local variable x


x=2;

#Send the local variable to Device workspace via API


putremotedata(s2,'x_device',x);

#Send script command to Device via API andsquare the variable


evalremote(s2,"y_device=x_device^2;");

#Get the variable from Device worksapace via API


?y=getremotedata(s2,'y_device');

#Close the session


closesession(s2);

See Also
opensession 1639 , closesession 1637 , putremotedata 1637 , getremotedata 1638

7.16.6 appopen
A Matlab command that opens a session of selected Lumerical tool via the Matlab interoperability API. Once the
session is opened, Lumerical can be called from Matlab to execute Lumerical script command(s) and execute them.
Opened Lumerical session also allows Matlab to get variables from Lumerical workspace.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
h=appopen('fdtd'); When executed in Matlab, this command will open a session of FDTD
via the interoperability API.

Accepted parameters:
fdtd
mode

2003 - 2016 Lumerical Solutions, Inc


1640 Lumerical Knowledge Base

device
interconnect

Example
The following Matlab code example opens FDTD session, loads an existing simulation file "MySimulation.fsp", runs
the simulation, retrieves transmission from the monitor into Matlab workspace and closes FDTD.

path(path,'C:\Program Files\Lumerical\FDTD\api\matlab'); %add Lumerical API path to Mat

h=appopen('fdtd');

appevalscript(h,'load("MySimulation.fsp");');
appevalscript(h,'run;');
appevalscript(h,'T=transmission("monitor");');
appevalscript(h,'T=T.T;');

x=appgetvar(h,'T');

appclose(h);

See Also
appclose 1641 , appevalscript 1641 , appgetvar 1640

7.16.7 appgetvar
A Matlab command that will retrieve a variable from Lumerical workspace into Matlab workspace via Matlab
interoperability API.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
x=appgetvar(h,'T'); Retrieves variable T from Lumerical workspace via an active session h
and adds it into Matlab workspace as variable x

Example
The following Matlab code example opens FDTD as a client, loads an existing simulation file "MySimulation.fsp",
runs the simulation, retrieves transmission from the monitor into Matlab workspace and closes FDTD.

path(path,'C:\Program Files\Lumerical\FDTD\api\matlab'); %add Lumerical API path to Mat

h=appopen('fdtd');

appevalscript(h,'load("MySimulation.fsp");');
appevalscript(h,'run;');
appevalscript(h,'T=transmission("monitor");');
appevalscript(h,'T=T.T;');

x=appgetvar(h,'T');

appclose(h);

See Also
appopen 1640 , appclose 1641 , appevalscript 1641 ,

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1641

7.16.8 appevalscript
A Matlab command that will execute Lumerical script command(s) in an active Lumerical session opened via Matlab
interoperability API.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
appevalscript(h,'scriptcommand'); Executes an arbitrary Lumerical script command in an active session h

Example
The following Matlab code example opens FDTD as a client, loads an existing simulation file "MySimulation.fsp",
runs the simulation, retrieves transmission from the monitor into Matlab workspace and closes FDTD.

path(path,'C:\Program Files\Lumerical\FDTD\api\matlab'); %add Lumerical API path to Mat

h=appopen('fdtd');

appevalscript(h,'load("MySimulation.fsp");');
appevalscript(h,'run;');
appevalscript(h,'T=transmission("monitor");');
appevalscript(h,'T=T.T;');

x=appgetvar(h,'T');

appclose(h);

See Also
appopen 1641 , appclose 1641 , appgetvar 1640

7.16.9 appclose
A Matlab command that will close an active Lumerical session opened via Matlab interoperability API.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
appclose(h); Closes an active session h

Example
The following Matlab code example opens FDTD as a client, loads an existing simulation file "MySimulation.fsp",
runs the simulation, retrieves transmission from the monitor into Matlab workspace and closes FDTD.

path(path,'C:\Program Files\Lumerical\FDTD\api\matlab'); %add Lumerical API path to Mat

h=appopen('fdtd');

appevalscript(h,'load("MySimulation.fsp");');
appevalscript(h,'run;');
appevalscript(h,'T=transmission("monitor");');
appevalscript(h,'T=T.T;');

x=appgetvar(h,'T');

2003 - 2016 Lumerical Solutions, Inc


1642 Lumerical Knowledge Base

appclose(h);

See Also
appopen 1641 , appevalscript 1641 , appgetvar 1640

7.16.10 matlabsave
Save workspace data to Matlab .mat data files.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT


Syntax Description
matlabsave(""); Save all workspace variables to a .mat file that has the same name as
the simulation file.
This function does not return any data.
matlabsave("filename"); Saves all workspace variables to the specified .mat file.
matlabsave("filename", var1, ..., Saves the specified workspace variables to the .mat file.
varN);

See Also
System level 1426 , matlabput 1644 , matlabsavelegacy 1642 , matlabload 1642 , vtksave 1442

7.16.11 matlabsavelegacy
Save workspace data to Matlab .mat data using a legacy Matlab file format required for Matlab version 7.2 and
earlier. This file format does not support matrices larger than 2GB.
The command syntax is the same as the standard matlabsave command. See matlabsave 1642 for details.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

See Also
System level 1426 , matlabsave 1642

7.16.12 matlabload
Load Matlab .mat data into workspace

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
matlabload("filename"); Load to the workspace the data of the specified .mat file.

See Also
System level 1426 , matlabput 1644 , matlabsavelegacy 1642 , matlabsave 1642 ,

7.16.13 matlab
Runs a MATLAB command from the Lumerical script prompt. This gives access to extended mathematical and
visualization functionality from the Lumerical script environment. If the MATLAB script integration is not enabled,
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 the
Lumerical script variable workspaces are completely separate and independent. A MATLAB command cannot act

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1643

on a variable defined in the Lumerical 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 working directory of
the MATLAB instance is always set to match the working directory of the Lumerical application.

The output from the MATLAB commands will be printed at the Lumerical script prompt. One limitation of the matlab
function is that no error reporting is provided to either the Lumerical script prompt or the MATLAB prompt. MATLAB
commands should be tested by typing them directly into the MATLAB prompt before they are called from a
Lumerical script. The output buffer length is roughly 1e5 characters. Additional output will be truncated.

When you have a long sequence of MATLAB commands, you may find it more convenient to save them in a
MATLAB m-file. Then, you can simply call the m-file by running a single command.

Setup instructions and system requirements for the MATLAB script integration feature can be found in the online
Knowledge Base. See the Setup and Configuration section of the Installation Guide. Additional tips (particularly
for plotting data in Matlab) can be found in the MATLAB 1410 section of the online help.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
matlab("command"); command: a string containing one or more valid MATLAB commands.
matlab(" Multi-line strings can be used in script files to contain a block of
command_1 MATLAB commands. Multi-line strings are not supported at the script
command_2 command prompt.
");

See Also
System level 1426 , matlabget 1643 , matlabput 1644

7.16.14 matlabget
Copies a variable from the MATLAB workspace to the script variable workspace. The resulting variable will have the
same name as the MATLAB variable, 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.

Note: Matlab script integration must be enabled in order to use this command. For more information on how to set
this up see the Matlab script integration 1411 page.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
matlabget(var1, var2,...varN); The arguments to this command are one or more variable names that
refer to variables in the MATLAB workspace.
This function does not return any data.

See Also
System level 1426 , matlab 1642 , matlabput 1644

2003 - 2016 Lumerical Solutions, Inc


1644 Lumerical Knowledge Base

7.16.15 matlabput
Copies a variable from Lumerical's Script Workspace to the MATLAB workspace. The resulting variable in the
MATLAB workspace will have the same name as in Lumerical, and will overwrite any existing variable with the same
name. If the variable does not exist in the Lumerical workspace, the command will return an error.

For more information, please see the matlab command description.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
matlabput(var1, var2,...varN); The arguments to this command are one or more variable names that
exist in the Lumerical variable workspace.
This function does not return any data.

See Also
System level 1426 , matlab 1642 , matlabget 1643

7.17 Measurement and optimization data


The following commands are used to access data from simulation objects.

Most raw data is recorded in multi-dimensional form. For example, monitors in FDTD and MODE Solutions typically
return data in 4D matrices. The first three dimensions of the matrix correspond to the spatial dimensions X, Y, Z. The
4th dimension corresponds to the frequency or time dimension, depending on the type of monitor. For example,
suppose you have a FDTD Solutions simulation with a frequency monitor in the XY plane that records 20 frequency
points. Assuming the monitor spans 100 mesh points in the x direction and 55 mesh points in the y direction, the
size of the Ex field component data matrix will be 100x55x1x20. Notice that the 3rd dimension (corresponding to Z)
has a size of 1, since the monitor only recorded data at one Z position.

Command Description
getresult 1647 Get results from simulation objects.
getdata 1646 Get raw data from simulation objects.
getelectric 1650 Get raw |E|2 data matrix from monitor
getmagnetic 1651 Get raw |H|2 data matrix from monitor
runanalysis 1647 Runs the analysis script in analysis objects
clearanalysis 1650 Clears d-card data obtained by running analysis scripts.
havedata 1648 Used to see if there is any available data stored within an object.
haveresult 1648 Used to see if there are any available results within an object.
read and write data to file 1651 Read and write data to a file.
copydcard 1649 Creates a copy of a d-card.
cleardcard 1650 Clears a d-card.
mcfit 1652 Runs the multi-coefficient fitting for a file containing multiple frequency
dependent transmission values.
simulationdiverged 1656 In layout mode, check whether the simulation reached the divergence
checking auto shutoff threshold.

Parameter sweep,optimization, and yield analysis data is saved with the simulation file and is not cleared when
switching the current simulation to layout mode. These results can be accessed with the following commands:

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1645

Command Description
getsweepdata 1645 Gets raw data from parameter sweeps, optimizations, and yield analysis.
getsweepresult 1646 Gets results from parameter sweeps and optimizations.
havesweepdata 1648 Used to check if parameter sweep and optimizations have data.
havesweepresult 1649 Used to check if parameter sweep and optimizations have results.
loadsweep 1651 Loads previously generated sweep result
savesweep 1651 Saves the generated sweep result
issweep 1652 Checks if the simulation is in sweep mode.
copysweep 1652 Copies a sweep/yield/optimization analysis item to clipboard.
pastesweep 1652 Pastes a sweep/yield/optimization analysis item from clipboard.
addsweep 1653 Adds a sweep/yield/optimization item as the top-most item.
insertsweep 1653 Inserts a sweep/yield/optimization item as a child to a parent item.
getsweep 1653 Gets a property from a sweep/yield/optimization item.
setsweep 1654 Sets a property in a sweep/yield/optimization item.
deletesweep 1645 Deletes a specified parameter sweep, optimization, or yield task.
addsweepparameter 1655 Adds a parameter to a sweep/yield/optimization item.
addsweepresult 1655 Adds a result to a sweep/yield/optimization item.
removesweepparameter 1656 Removes a parameter from a sweep/yield/optimization item.
removesweepresult 1656 Removes a result from a sweep/yield/optimization item.

7.17.1 deletesweep
Deletes a specified parameter sweep, optimization, or yield task.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
deletesweep("name"); Deletes the sweep, optimization, or yield task with the specified name.

See Also
Measurements 1644 , addsweep 1653 , copysweep 1652 , pastesweep 1652 , insertsweep 1653 , getsweep 1653 , setsweep 1654

7.17.2 getsweepdata
Gets raw data from a parameter sweep, optimization, or yield analysis. In most cases, it is more convenient to a
complete dataset with getsweepresult, rather than getting individual data elements with getsweepdata.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
?getsweepdata; Returns names of all sweep, optimization, and yield analysis objects.
?getsweepdata("sweep_name"); Returns all the names of the available data which is stored in the
sweep, optimization, or yield analysis object.
out = Returns parameter sweep, optimization, or yield analysis data.

2003 - 2016 Lumerical Solutions, Inc


1646 Lumerical Knowledge Base

getsweepdata("sweep_name",
"data"); The following data can be obtained from an optimization:
fomTrend - Figure of merit as a function of generation
fomHistory - Figure of merit history (for each generation there will be
generation size number)
bestFom - Best figure of merit obtained during sweep
bestParameter - Parameter which corresponds to bestFom
paramHistory - Parameter history

For a parameter sweep and yield analysis, this command returns both
parameters and results.

See Also
getdata 1646 , runsweep 1595 , havesweepdata 1648 , savedata 1439 , getsweepresult 1646 , savesweep 1651 , loadsweep 1651

7.17.3 getsweepresult
Get parameter sweep or optimization results in the form of a dataset.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
?getsweepresult; Returns names of all sweep or optimization objects with available
results.
?getsweepresult("sweep_name"); Returns names of the available results from the sweep or optimization
task.
out = Returns parameter sweep or optimization dataset.
getsweepresult("sweep_name",
"result");

See Also
Dataset introduction 1461 , runsweep 1595 , havesweepresult 1649 , getresult 1647 , savedata 1439 , getsweepdata 1645 ,
savesweep 1651 , loadsweep 1651

7.17.4 getdata
Get raw data from a simulation object. In most cases, it is more convenient to get a complete dataset with
getresult, rather than getting individual data elements with getdata.

Remember to run the simulation before using getdata.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

For FDTD and MODE,


Syntax Description
?getdata; Returns names of all objects with data.
?getdata("monitor") Returns list of of data within the simulation object.
out = getdata( "monitor", Gets data from a monitor. For example, you can use
"dataname"); Ex = getdata("monitor1","Ex");
to get the Ex field data from monitor1.
out = getdata( "monitor", The optional argument, option, can have a value of 1 or 2. If it is 2, the
"dataname", option); data is unfolded where possible according to the symmetry or anti-
symmetric boundaries if it comes from a monitor that intersect such a

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1647

boundary at x min, y min or z min. The default value of option is 2.

For Propagator simulations in MODE Solutions, this options also allow


users to choose whether to expand the data to the correct size for
dimensions where the field component is zero. Option 1 will return a
singleton value of 0 for the field component in that dimension, and
option 2 will return a matrix (composed of zeros) that matches the size
of the other field components.
For DEVICE,
Syntax Description
?getdata; Returns names of all objects with data.
?getdata("monitor") Returns list of of results within the simulation object.
?getdata( "monitor", "result"); Returns list of of data within the simulation object result.
out = getdata( "monitor", "result", Gets the simulation data.
"dataname");

The getdata command is available in INTERCONNECT for compatibility with other Lumerical products, but it's best to
use the getresult script function to access INTERCONNECT simulation data.

See Also
Measurements 1644 , getresult 1647 , havedata 1648 , getelectric 1650 , getmagnetic 1651 , nonorm 1598 , cwnorm 1598 ,
getsweepdata 1645 , getsweepresult 1646

7.17.5 getresult
Get results from simulation objects. Results will be returned as datasets.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
?getresult("monitor_name"); Returns the names of all the results for the monitor. All the dataset and
scalar matrix results will be returned in this case.
R = getresult("monitor_name","T"); Returns the result T from the monitor. T is a dataset.

See Also
Measurements 1644 , haveresult 1648 , Dataset introduction 1461 , "." operator 1484 , visualize 1529 , getdata 1646 ,
rectilineardataset 1459 , matrixdataset 1459 , getattribute 1461 , addattribute 1460 , splitstring 1492

7.17.6 runanalysis
Runs the analysis script in analysis objects.

Note: Scripts that already have data are not re-run; to re-run a script, first clear data using clearanalysis.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
runanalysis; Runs the analysis scripts in all analysis objects in the simulation file.
This function does not return any data.
runanalysis("group name"); Runs the analysis script in the analysis object named "group name".
This function does not return any data.

2003 - 2016 Lumerical Solutions, Inc


1648 Lumerical Knowledge Base

See Also
run 1593 , getdata 1646 , getresult 1647 , havedata 1648 , clearanalysis 1650 , runsetup 1571

7.17.7 havedata
Used to see a simulation object (such as a monitor) has any data. This command is very similar to haveresult, but is
intended to be used with the getdata command, rather than getresult.

Supported Product: FDTD, MODE, DEVICE

Syntax Description
havedata; Returns 1 if any simulation objects have raw data, and 0 if none have
any raw data.
havedata("name"); Returns 1 if "name" has raw data, and 0 if it does not have any raw
data.
havedata("name","data"); Returns 1 if "name" has the raw data named "data", and 0 if it does not
have that data.

See Also
Measurements 1644 , getdata 1646 , haveresult 1648 , getresult 1647 , copydcard 1649 , cleardcard 1650 , workspace 1457 ,
havesweepdata 1648

7.17.8 haveresult
Used to see a simulation object (such as a monitor) has any results.

Note: This command is very similar to havedata, but is intended to be used with the getresult command, rather than
getdata.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
haveresult; Returns 1 if any simulation objects currently have any results.
haveresult("name"); Returns 1 if "name" has any results, and 0 if it does not.
haveresult("name","data"); Returns 1 if the "name" has a result named "data", and 0 if it does not.

See Also
Measurements 1644 , getresult 1647 , havedata 1648 , getdata 1646 , copydcard 1649 , cleardcard 1650 , workspace 1457 ,
havesweepdata 1648

7.17.9 havesweepdata
Used to check if parameter sweep and optimizations have data. Similar to havedata, but for sweeps and optimization
tasks.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
havesweepdata; Returns 1 if any sweeps or optimizations have data. Returns 0 if data
is not available.
havesweepdata("name"); Returns 1 if the specified sweep or optimization has data.

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1649

havesweepdata("name","data"); Returns 1 if the sweep or optimization "name" has the specified data.

See Also
Measurements 1644 , runsweep 1595 , getsweepdata 1645 , getdata 1646 , havedata 1648

7.17.10 havesweepresult
Used to check if parameter sweep and optimizations have results. Similar to haveresult, but used for checking if
sweeps and optimization tasks have available results.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
havesweepresult; Returns 1 if any sweeps or optimizations have results. Returns 0 if
data is not available.
havesweepresult("name"); Returns 1 if the specified sweep or optimization has results.
havesweepresult("name","data"); Returns 1 if the sweep or optimization "name" has the specified result.

See Also
Measurements 1644 , runsweep 1595 , getsweepresult 1646 , getresult 1647 , haveresult 1648

7.17.11 copydcard
Will create a global copy of any d-card currently in memory.

Supported Product: FDTD, MODE

Syntax Description
copydcard( "name"); Will create a global copy of any d-card currently in memory called
"name". By default, the new name will be "::global_name". For
example, copydcard("mode1"); sends mode1 to the deck, named
global_mode1.
This function does not return any data.
copydcard( "name", "newname"); Will create a global copy of any d-card currently in memory called
"name". The new name will be "::newname".

Examples
Sending modes to the d-card and run overlap analysis, eg, in the FDE solver

copydcard("mode1","test_mode1");
copydcard("mode2","test_mode2");
?overlap("test_mode1","test_mode2");

Sending field profiles to the d-card and run overlap analysis, eg, in the FDTD solver

copydcard("::model::R","test_mode1"); # for the fields recorded by R, where R is the moni


copydcard("model::T","test_mode2"); # for the fields recorded by T, where T is the monito
?overlap("test_mode1","test_mode2");

See Also
Measurements 1644 , havedata 1648 , cleardcard 1650 , overlap 1608 , savedcard 1439

2003 - 2016 Lumerical Solutions, Inc


1650 Lumerical Knowledge Base

7.17.12 clearanalysis
Clears analysis object results. This data is also cleared by switching from Analysis Mode to Layout Mode.

Note: The analysis object results are calculated with the runanalysis command.

Supported Product: FDTD, MODE, DEVICE

Syntax Description
clearanalysis; Clears analysis object results.
This function does not return any data.
clearanalysis( "name1", Clears data from specific analysis objects.
"name2", ...);

See Also
Measurements 1644 , switchtolayout 1534 , getdata 1646 , runanalysis 1647 , havedata 1648

7.17.13 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.

Supported Product: FDTD, MODE

Syntax Description
cleardcard; Clears all the global d-cards.
This function does not return any data.
cleardcard( "name1", Clears any number of specified d-cards.
"name2", ...);

See Also
Measurements 1644 , havedata 1648 , copydcard 1649

7.17.14 getelectric
Returns the sum of the amplitude squares for all electric field components, i.e. it returns |Ex|2+|Ey|2+|Ez|2.

Supported Product: FDTD, MODE

Syntax Description
out = getelectric( "monitorname"); Returns |Ex|2+|Ey|2+|Ez|2 from the monitor.
getelectric( "monitorname", The optional argument, option, can have a value of 1 or 2. If it is 2, the
option); 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.

See Also
Measurements 1644 , getdata 1646 , getmagnetic 1651 , cwnorm 1598 , nonorm 1598

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1651

7.17.15 getmagnetic
Returns the sum of the amplitude squares for all magnetic field components, i.e. it returns |Hx|2+|Hy|2+|Hz|2.

Supported Product: FDTD, MODE

Syntax Description
out = Returns |Hx|2+|Hy|2+|Hz|2 from the monitor.
getmagnetic( "monitorname");
getmagnetic( "monitorname", The optional argument, option, can have a value of 1 or 2. If it is 2, the
option); 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.

See Also
Measurements 1644 , getdata 1646 , getelectric 1650 , cwnorm 1598 , nonorm 1598

7.17.16 Read and write data to files


Please see the following section for file I/O commands.
System level commands: File input and output 1426

7.17.17 loadsweep
The script command loads the sweep object with the previously generated sweep result.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
loadsweep; Loads previously generated sweep result to all the sweep objects in
simulation.
loadsweep("name"); Loads previously generated sweep result to the specified sweep
objects in simulation.

See Also
Measurements 1644 , getdata 1646 , runsweep 1595 , havesweepdata 1648 , savedata 1439 , getsweepresult 1646 , savesweep 1651

7.17.18 savesweep
The script command saves the sweep object results.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
savesweep; Saves the sweep result of all sweep objects in simulation.
savesweep("name"); Saves the sweep result of the specified sweep object.

See Also
Measurements 1644 , getdata 1646 , runsweep 1595 , havesweepdata 1648 , savedata 1439 , getsweepresult 1646 , loadsweep 1651

2003 - 2016 Lumerical Solutions, Inc


1652 Lumerical Knowledge Base

7.17.19 issweep
The script command checks if the simulation is in sweep mode.

Supported Product: INTERCONNECT

Syntax Description
out = issweep; Returns true (1 or 0) if the simulation is currently in sweep mode.

See Also
Measurements 1644 , runsweep 1595 , havesweepdata 1648 , getsweepresult 1646 , loadsweep 1651 , savesweep 1651

7.17.20 mcfit
The script command runs the multi-coefficient fitting for a file containing multiple frequency dependent transmission
values.

Supported Product: INTERCONNECT

Syntax Description
mcfit(filenamein,filenameout,npole Runs the multi-coefficient fitting for a file containing multiple frequency
s,tolerance,automatic) ; dependent transmission values (filenamein), where each transmission
depends on an operating point, and generates a file containing the
fitting data (filenameout). The number of poles and the fitting tolerance
are defined by parameters npoles and tolerance respectively. The
parameter automatic define if the fitting will use the user defined
npoles or estimate the number of poles automatically.

See Also
Measurements 1644

7.17.21 copysweep
The script command copies a sweep/yield/optimization analysis item to clipboard.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
copysweep("name"); Copies a sweep/yield/optimization analysis item to clipboard.

"name" is the absolute name of a sweep/optimization/yield analysis


(eg. ::optimization::sweep1)

See Also
Measurements 1644 , deletesweep 1645 , pastesweep 1652 , addsweep 1539 , insertsweep 1653 , getsweep 1653 , setsweep 1633 ,
addsweepparameter 1655 , addsweepresult 1655 , removesweepparameter 1656 , removesweepresult 1656

7.17.22 pastesweep
The script command pastes a sweep/yield/optimization analysis item from clipboard.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1653

pastesweep("name"); Pastes a sweep/yield/optimization analysis item from clipboard.

"name" is the absolute name of the parent item where the new
analysis item will be pasted as a child. If the name is empty, paste the
new analysis item as a top-most item.

Returns the absolute name of the new item. Returns empty string if
paste got failed.

See Also
Measurements 1644 , deletesweep 1645 , copysweep 1652 , addsweep 1539 , insertsweep 1653 , getsweep 1653 , setsweep 1633 ,
addsweepparameter 1655 , addsweepresult 1655 , removesweepparameter 1656 , removesweepresult 1656

7.17.23 addsweep
The script command adds a sweep/yield/optimization item as the top-most analysis item.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
addsweep(type); adds a sweep/yield/optimization item as the top-most analysis item.

'type' = 1 for optimization


'type' = 2 for yield
'type' = others for sweep

7.17.24 insertsweep
The script command inserts a sweep/yield/optimization item as a child to a parent analysis item.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
insertsweep("name"); Inserts a sweep/yield/optimization item as a child to a parent analysis
item.

"name" is the absolute name of a parent analysis item.

See Also
Measurements 1644 , deletesweep 1645 , copysweep 1652 , pastesweep 1652 , addsweep 1539 , getsweep 1653 , setsweep 1633 ,
addsweepparameter 1655 , addsweepresult 1655 , removesweepparameter 1656 , removesweepresult 1656

7.17.25 getsweep
The script command gets a property from a sweep/yield/optimization item.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
getsweep("name", Gets a property from a sweep/yield/optimization item.
"property_name");
"name" is the absolute name of an analysis item.

"property_name" is the property showed in the edit window.

2003 - 2016 Lumerical Solutions, Inc


1654 Lumerical Knowledge Base

Returns the value of the property.

See Also
Measurements 1644 , deletesweep 1645 , copysweep 1652 , pastesweep 1652 , addsweep 1539 , insertsweep 1653 , setsweep 1633 ,
addsweepparameter 1655 , addsweepresult 1655 , removesweepparameter 1656 , removesweepresult 1656

7.17.26 setsweep
The script command sets a property in a sweep/yield/optimization item.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
setsweep("name", Sets a property in a sweep/yield/optimization item.
"property_name", property_value);
"name" is the absolute name of an analysis item.

"property_name" is the property showed in the edit window.

For a sweep analysis:


Argument Description
property_name = "name" Sets the name of the sweep.
property_name = "type" Sets the type of the sweep. The value of "type" could be "Ranges" or
"Values"
property_name = "number of Sets the number of points of the sweep. The default number of points
points" is 10.
property_name = "resave file after Defines whether or not to re-save the file after analysis.
analysis"

For an optimization analysis:


Argument Description
property_name = "name" Sets the name of the optimization.
property_name = "Type" "Type" = "Maximum", "Minimum"
property_name = "algorithm" "algorithm" = "Particle Swarm", "User Defined"
property_name = "maximum Sets the maximum generation number.
generations"
property_name = "reset random Checks the box of "Reset random generation".
generator"
property_name = "tolerance" Sets the tolerance value.
property_name = "first generation Sets the "first generation script" in the "Advanced" tab.
script"
property_name = "next generation Sets the "next generation script" in the "Advanced" tab.
script"
property_name = "use figure of Checks the box of "use figure of merit" in the "Figure of merit script"
merit script" tab.
property_name = "figure of merit Sets the "figure of merit script" in the "Figure of merit script" tab.
script"

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1655

For a yield analysis:


Argument Description
property_name = "name" Sets the name of the yield.
property_name = "number of Sets the number of trials for the yield. The default number of trials is
trials" 10.

Additional Notes:
Except for the listed default properties of the sweep/optimization/yield, any
added sweep parameters can be edited by the setsweep command by setting the
"property_name" to the parameter name.

See Also
Measurements 1644 , deletesweep 1645 , copysweep 1652 , pastesweep 1652 , addsweep 1539 , insertsweep 1653 , getsweep 1653 ,
addsweepparameter 1655 , addsweepresult 1655 , removesweepparameter 1656 , removesweepresult 1656 , Sweep scripting
commands 703 , Optimization scripting commands 722 , yield scripting commands 734

7.17.27 addsweepparameter
The script command adds a parameter to a sweep/yield/optimization item.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
addsweepparameter("name", Adds a parameter to a sweep/yield/optimization item.
"parameter");
"name" is the absolute name of an analysis item.

"parameter" could be a string (i.e. create a parameter with default


values. eg. ::model::rectangle::index) or a struct which counld contain
parameter, type, start, stop, unit, etc.

Returns the parameter name.


See Also
Measurements 1644 , copysweep 1652 , pastesweep 1652 , addsweep 1539 , insertsweep 1653 , getsweep 1653 , setsweep 1633 ,
addsweepresult 1655 , removesweepparameter 1656 , removesweepresult 1656 , Sweep scripting commands 703 ,
Optimization scripting commands 722 , yield scripting commands 734

7.17.28 addsweepresult
The script command adds a result to a sweep/yield/optimization item.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
addsweepresult("name", "result"); Adds a result to a sweep/yield/optimization item.

"name" is the absolute name of an analysis item.

"result" could be a string (i.e. create a result with default values) or a


struct which could contain results and operations.

Returns the result name.

2003 - 2016 Lumerical Solutions, Inc


1656 Lumerical Knowledge Base

See Also
Measurements 1644 , copysweep 1652 , pastesweep 1652 , addsweep 1539 , insertsweep 1653 , getsweep 1653 , setsweep 1633 ,
addsweepparameter 1655 , removesweepparameter 1656 , removesweepresult 1656 , Sweep scripting commands 703 ,
Optimization scripting commands 722 , yield scripting commands 734

7.17.29 removesweepparameter
The script command removes a parameter from a sweep/yield/optimization item.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
removesweepparameter("name", Removes a parameter from a sweep/yield/optimization item.
"parameter_name");
"name" is the absolute name of an analysis item.

"parameter_name" is the parameter name.

See Also
Measurements 1644 , copysweep 1652 , pastesweep 1652 , addsweep 1539 , insertsweep 1653 , getsweep 1653 , setsweep 1633 ,
addsweepparameter 1655 , addsweepresult 1655 , removesweepresult 1656 , Sweep scripting commands 703 , Optimization
scripting commands 722 , yield scripting commands 734

7.17.30 removesweepresult
The script command removes a result from a sweep/yield/optimization item.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
removesweepresult("name", Removes a result from a sweep/yield/optimization item.
"result_name");
"name" is the absolute name of an analysis item.

See Also
Measurements 1644 , copysweep 1652 , pastesweep 1652 , addsweep 1539 , insertsweep 1653 , getsweep 1653 , setsweep 1633 ,
addsweepparameter 1655 , addsweepresult 1655 , removesweepparameter 1656 , Sweep scripting commands 703 ,
Optimization scripting commands 722 , yield scripting commands 734

7.17.31 simulationdiverged
In layout mode, check whether the simulation reached the divergence checking auto shutoff threshold.

Supported Product: FDTD

Syntax Description
out=simulationdiverged; Returns 1 if the simulation reached the auto shutoff max threshold, 0
otherwise.

See Also
Measurements 1644

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1657

7.18 Near to far field projections


Far field projections
Command Description
farfieldfilter 1658 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.
farfield2d 1658 Projects a given power or field profile monitor to the far field.
farfieldvector2d 1659 Farfieldvector2d is identical to farfield2d, however the data is returned as
matrix of Nx1x3, where the last index refers to Ex, Ey and Ez.
farfieldpolar2d 1659 Farfieldpolar2d is identical to farfield2d, however the data is returned as matrix
of Nx1x3, where the last index refers to Er, Eq and Ez, in cylindrical
coordinates.
farfieldangle 1659 For 2D simulations. It returns the matrix of angles, in degrees, corresponding
to the data in farfield2d.
farfield3d 1661 Projects a given power or field profile monitor to the far field.
farfieldvector3d 1661 Farfieldvector3d is identical to farfield3d, however the data is returned as
matrix of NxMx3, where the last index refers to Ex, Ey and Ez.
farfieldpolar3d 1662 Farfieldpolar3d is identical to farfield3d, however the data is returned as matrix
of NxMx3, where the last index refers to Er, Eq and Ef, in spherical
coordinates.
farfieldux 1662 For 3D simulations. It returns the matrix of ux corresponding to the data in
farfield3d.
farfielduy 1662 For 3D simulations. It returns the matrix of uy corresponding to the data in
farfield3d.
farfieldspherical 1663 Interpolates far field projection data from E(ux,uy) to E(theta,phi).
farfieldexact2d 1664 Calculates the far field at any specified position.
farfieldexact3d 1664 Calculates the far field at any specified position.
farfieldexact 1665 Similar to farfieldexact2d and farfieldexact3d, however the far field is only
evaluated at positions explicitly specified by the vector list.
farfield2dintegrate 1660 Calculates the integral of the far field projection over some range of theta in 2D
simulation
farfield3dintegrate 1663 Calculates the integral of the far field projection over a specified cone in 3D
simulation

See Also
Far field projection toolbox 126 , Far field change index analysis object 814 , Grating projection script functions 1666

2003 - 2016 Lumerical Solutions, Inc


1658 Lumerical Knowledge Base

7.18.1 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 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 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).

Supported Product: FDTD, MODE

Syntax Description
out = farfieldfilter; Get the current far field filter setting.
farfieldfilter(a); Set the current far field filter setting. a=(a)/(a+b). 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.

Note: Periodic structures


The far field filter option should not be used for periodic structures. Set it to zero when using the 'assume periodic'
option.

Examples
Far field projection - spatial filtering 134

See Also
farfield2d 1658 , farfield3d 1661

7.18.2 farfield2d
Projects a given power or field profile monitor to the far field. The electric field intensity |E|2 is returned.

Supported Product: FDTD, MODE

Syntax Description
E2 = farfield2d("mname", f, n, Projects a given power or field profile monitor to the far field.
illumination, periods, index,
direction);

Parameter Default Type Description


value
mname required string Name of the monitor
f optional 1 number Index of the desired frequency point.

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1659

n optional 2000 number The number of points in the far field.


illumination optional 1 number For periodic structures
Gaussian illumination: 1
Plane wave illumination: 2
periods optional 1 number number of periods to be used
index optional value at number The index of the material to use for the projection.
monitor
center
direction optional direction of number Direction: this can be +1 or -1.
max power
flow

See Also
Far field projections 1657 , farfield3d 1661 , farfieldangle 1659 , farfieldvector2d 1659 , farfieldpolar2d 1659 , farfieldexact2d 1664 ,
farfieldfilter 1658 , farfieldexact 1665 , farfield2dintegrate 1660

7.18.3 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.

Supported Product: FDTD, MODE

Syntax Description
out = Returns the cartesian complex electric fields. Same arguments as
farfieldvector2d( "mname",...); farfield2d.

See Also
farfield2d 1658

7.18.4 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.

Supported Product: FDTD, MODE

Syntax Description
out = Returns the polar complex electric fields. Same arguments as
farfieldpolar2d( "mname",...); farfield2d.

See Also
farfield2d 1658 , farfieldvector2d 1659

7.18.5 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.

2003 - 2016 Lumerical Solutions, Inc


1660 Lumerical Knowledge Base

Supported Product: FDTD, MODE

Syntax Description
theta = farfieldangle( "mname", f, Returns the matrix of angles corresponding to the data in farfield2d
n, index);

Parameter Default Type Description


value
mname required string Name of the monitor from which far field is calculated
f optional 1 number Index of the desired frequency point.
n optional 2000 number The number of points in the far field.
index optional value at number The index of the material to use for the projection.
monitor
center

See Also
farfield2d 1658

7.18.6 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.

2
E (q )d q
q

Supported Product: FDTD, MODE

Syntax Description
out = farfield2dintegrate(E2, Integrate 2D far field projection data.
theta, halfangle, theta0);

Parameter Default Type Description


value
E2 required matrix E field data from farfield2d
theta required matrix Theta from farfieldangle
halfangle optional 90 vector Half angle (in degrees) of the integration region. Must
have same length as theta0 or length 1. Half angle
should be between 0 to 90 degrees.
theta0 optional 0 vector Center angle (in degrees) theta of the integration region.
Must have same length as halfangle or length 1. Theta0
should be between 0 to 90 degrees.

See Also
Near to far field projections 1657 , farfield2d 1658 , farfieldangle 1659

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1661

7.18.7 farfield3d
Projects a given power or field profile monitor to the far field. The electric field intensity |E|2 is returned.

Supported Product: FDTD, MODE

Syntax Description
out = farfield3d("mname",f, na, nb, Projects a given power or field profile monitor to the far field.
illumination, periodsa, periodsb,
index, direction);

Parameter Default Type Description


value
mname required string Name of the monitor
f optional 1 number Index of the desired frequency point.
na optional 150 number The number of points in the far field.
nb optional 150 number The number of points in the far field.
illumination optional 1 number For periodic structures.
Gaussian illumination: 1
Plane wave illumination: 2
periodsa optional 1 number number of periods to be used for periodic illumination
periodsb optional 1 number number of periods to be used for periodic illumination
index optional value at number The index of the material to use for the projection.
monitor
center
direction optional direction of number Direction: this can be +1 or -1.
max power
flow

The following table summarizes how to interpret the ux, uy coordinate vectors and periods input properties for various
monitor orientations.
Monitor orientation Monitor surface normal 'na', 'ux', 'periods a' 'nb', 'uy', 'periods b'
correspond to correspond to
XY plane Z x axis y axis
XZ plane Y x axis z axis
YZ plane X y axis z axis

See Also
Far field projections 1657 , farfield2d 1658 , farfieldvector3d 1661 , farfieldpolar3d 1662 , farfieldux 1662 , farfielduy 1662 ,
farfieldexact3d 1664 , farfieldfilter 1658 , farfield3dintegrate 1663

7.18.8 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. See the
farfield3d documentation for information on interpreting ux, uy, na, nb for various monitor orientations.

2003 - 2016 Lumerical Solutions, Inc


1662 Lumerical Knowledge Base

Supported Product: FDTD, MODE

Syntax Description
out = Returns the cartesian complex electric fields. Same arguments as
farfieldvector3d( "monitorname",...) farfield3d.
;

See Also
farfield3d 1661

7.18.9 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.
See the farfield3d documentation for information on interpreting ux, uy, na, nb for various monitor orientations.

Note: When viewing far fields from the GUI with the visualizer, three Attributes are availabe: E2, Ep, Es. E2
corresponds to |E|^2, Ep to Etheta, and Es to Ephi.

Supported Product: FDTD, MODE

Syntax Description
out = Returns the spherical complex electric fields. Same arguments as
farfieldpolar3d( "monitorname",...); farfield3d.

See Also
farfield3d 1661 , farfieldvector3d 1661 , Far field projections - Field polarization 136

7.18.10 farfieldux
Used for 3D simulations. It returns the matrix of ux corresponding to the data in farfield3d. See the farfield3d
documentation for information on interpreting ux, uy, na, nb for various monitor orientations.

Supported Product: FDTD, MODE

Syntax Description
farfieldux("mname",f,na,nb,index); See farfield3d help. Arguments are same as for farfield3d.

See Also
farfield3d 1661 , farfielduy 1662 , farfieldspherical 1663 , farfieldexact 1665

7.18.11 farfielduy
Used for 3D simulations. It returns the matrix of uy corresponding to the data in farfield3d. See the farfield3d
documentation for information on interpreting ux, uy, na, nb for various monitor orientations.

Supported Product: FDTD, MODE

Syntax Description
farfielduy("mname",f,na,nb,index); See farfield3d help. Arguments are same as for farfield3d.

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1663

See Also
farfield3d 1661 , farfieldux 1662 , farfieldspherical 1663 , farfieldexact 1665

7.18.12 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. See the farfield3d documentation for information on
interpreting ux, uy, na, nb for various monitor orientations.

Supported Product: FDTD, MODE

Syntax Description
out = farfieldspherical( E2, ux, interpolate far field data to spherical coordinates.
uy, theta, phi);

Parameter Default Type Description


value
E2 required matrix E field data from farfield3d
ux required vector ux data from farfieldux
uy required vector uy data from farfielduy
theta required vector theta vector, in degrees. Must have length L or 1.
phi required vector phi vector, in degrees. Must have length L or 1.

See Also
Far field projections 1657 , direction cosine units 132 , farfield3d 1661 , farfieldux 1662 , farfielduy 1662

7.18.13 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. See the farfield3d documentation for information on interpreting
ux, uy, na, nb for various monitor orientations.

E (ux, uy )sin( q )d qd f
2

q ,f

Supported Product: FDTD, MODE

Syntax Description
out = farfield3dintegrate(E2, ux, Integrate 3D far field projection data.
uy, halfangle, theta0, phi0);

Parameter Default Type Description


value
E2 required matrix E field data from farfield3d
ux required vector ux data from farfieldux
uy required vector uy data from farfielduy

2003 - 2016 Lumerical Solutions, Inc


1664 Lumerical Knowledge Base

halfangle optional 90 vector Half angle of the integration cone. unit in degrees. must
have length L or 1. Half angle should be between 0 to 90
degrees.
theta0 optional 0 vector Center angle theta of the integration cone. unit in
degrees. must have length L or 1. Theta0 should be
between 0 to 90 degrees.
phi0 optional 0 vector Center angle phi of the integration cone. unit in degrees.
must have length L or 1. Phi0 should be between 0 to
360 degrees.

See Also
Near to far field projections 1657 , farfield3d 1661 , farfieldux 1662 , farfielduy 1662 , farfieldspherical 1663

7.18.14 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.

Supported Product: FDTD, MODE

Syntax Description
out = farfieldexact2d( "mname", x, Projects a given power or field profile monitor to the far field at grid
y, f, index); points specified by the vectors x,y.

Paramete Default Type Description


r value
mname required string name of the monitor from which far field is calculated
x required vector x coordinates of the grid points where far field is calculated
y required vector y coordinates of the grid points where far field is calculated
f optional 1 number Index of the desired frequency point.
index optional index at number The index of the material to use for the projection.
monitor
center

See Also
farfield2d 1658 , farfieldexact3d 1664 , farfieldexact 1665

7.18.15 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.

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1665

Supported Product: FDTD, MODE

Syntax Description
out = farfieldexact3d( "mname", x, Projects a given power or field profile monitor to the far field at grid
y, z, f, index); points specified by the vectors x,y,z.

Parameter Default Type Description


value
mname required string name of the monitor from which far field is calculated
x required vector x coordinates of the grid points where far field is
calculated
y required vector y coordinates of the grid points where far field is
calculated
z required vector z coordinates of the grid points where far field is
calculated
f optional 1 number Index of the desired frequency point.
index optional value at number The index of the material to use for the projection.
monitor
center

See Also
farfield3d 1661 , farfieldexact2d 1664 , farfieldexact 1665

7.18.16 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.

Supported Product: FDTD, MODE

Syntax Description
out = farfieldexact("mname", x, y, 2D far field exact projection
f, index)
out = farfieldexact("mname", x, y, 3D far field exact projection
z, f, index);

2003 - 2016 Lumerical Solutions, Inc


1666 Lumerical Knowledge Base

Parameter Default Default Type Description


value
mname required string name of the monitor from which far field is calculated
x required vector x coordinates of points where far field is calculated.
must have length L or 1.
y required vector y coordinates of points where far field is calculated.
must have length L or 1.
z required vector z coordinates of points where far field is calculated.
must have length L or 1.
f optional 1 number Index of the desired frequency point.
index optional value at number The index of the material to use for the projection.
monitor
center

See Also
farfield2d 1658 , farfield3d 1661 , farfieldexact2d 1664 , farfieldexact3d 1664

7.19 Grating projections


Grating calculations
Command Description
grating 1666 Returns the strength of all physical grating orders.
gratingn 1667 Returns a vector of the grating order numbers.
gratingm 1668 Returns a vector of the grating order numbers.
gratingpolar 1668 Returns the relative strength of all physical grating orders in spherical
coordinates.
gratingvector 1669 Returns the relative strength of all physical grating orders in cartesian
coordinates.
gratingperiod1 1669 Returns grating period a1.

gratingperiod2 1670 Returns grating period a2.

gratingbloch1 1671 Returns bloch vector (k in_1).

gratingbloch2 1671 Returns bloch vector (k in_2).

gratingu1 1670 Returns first component of the unit vector u1.

gratingu2 1670 Returns second component of the unit vector u2.

gratingangle 1670 Returns the angle of each order.

See Also
Grating projection toolbox 150 , Far field projection toolbox 126 , Far field projection script functions 1657

7.19.1 grating
Returns the fraction of transmitted power to each physical grating orders for a given simulation. Results are
normalized such that the sum of all the orders is equal to 1. To convert these values into fractions of the source
power, multiply by the the transmission script function.

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.

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1667

Supported Product: FDTD, MODE

Syntax Description
out = grating("monitorname",f, Returns the strength of all physical grating orders from monitorname.
index, direction );

Parameter Default Type Description


value
monitorname required string name of the monitor from which far field is calculated
f optional 1 number Index of the desired frequency point.
index optional value at number The index of the material to use for the projection.
monitor
center
direction optional direction of number Direction: this can be +1 or -1.
max power
flow

The following table summarizes how to interpret the coordinate vector properties for various monitor orientations.
Monitor orientation Monitor surface normal 'N', 'ux', 'gratingn', 'M', 'uy', 'gratingm',
'gratingperiod1', 'gratingperiod2',
'gratingu1', 'gratingu2',
'gratingbloch1', 'gratingbloch2'
correspond to correspond to
XY plane Z x axis y axis
XZ plane Y x axis z axis
YZ plane X y axis z axis

See Also
Grating projections 1666 , gratingn 1667 , gratingperiod1 1669 , gratingbloch1 1671 , gratingu1 1670 , gratingangle 1670 , gratingpolar
1668 , gratingvector 1669

7.19.2 gratingn
Returns a vector of the grating order numbers (i.e. zeroeth order, first order) corresponding to the data from the
grating function. gratingn gives the order numbers for the first dimension of the data (2D and 3D). gratingm gives the
order numbers for the 2nd dimension (3D only). See the grating function documentation for information on
interpreting N, M, ux, uy for various monitor orientations.

Supported Product: FDTD, MODE

Syntax Description
out = gratingn( "monitorname",...); Same arguments as grating function.

See Also
Grating projections 1666 , grating 1666 , gratingm 1668

2003 - 2016 Lumerical Solutions, Inc


1668 Lumerical Knowledge Base

7.19.3 gratingm
Returns a vector of the grating order numbers (i.e. zeroeth order, first order) corresponding to the data from the
grating function. gratingn gives the order numbers for the first dimension of the data (2D and 3D). gratingm gives the
order numbers for the 2nd dimension (3D only). See the grating function documentation for information on interpreting
N, M, ux, uy for various monitor orientations.

Supported Product: FDTD, MODE

Syntax Description
out = Same arguments as grating function.
gratingm( "monitorname",...);

See Also
Grating projections 1666 , grating 1666 , gratingn 1667

7.19.4 gratingpolar
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. The data is normalized such that the sum of |Er|^2+|Etheta|^2+
|Ephi|^2 over all grating orders equals 1. See the grating function documentation for information on interpreting N, M,
ux, uy for various monitor orientations.

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.

Supported Product: FDTD, MODE

Syntax Description
out = gratingpolar( "mname", f, Returns the strength of all physical grating orders from the monitor.
index, direction); Output is in spherical coordinates.

Parameter Default Type Description


value
mname required string name of the monitor from which far field is calculated
f optional 1 number Index of the desired frequency point.
index optional value at number The index of the material to use for the projection.
monitor
center
direction optional direction of number Direction: this can be +1 or -1.
max power
flow

See Also
Grating projections 1666 , grating 1666 , gratingn 1667 , gratingperiod1 1669 , gratingbloch1 1671 , gratingu1 1670 , gratingangle 1670 ,
gratingvector 1669

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1669

7.19.5 gratingvector
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. The data is normalized such that the sum of |Ex|^2+|Ey|^2+ |
Ez|^2 over all grating orders equals 1. See the grating function documentation for information on interpreting N, M,
ux, uy for various monitor orientations.

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.

Supported Product: FDTD, MODE

Syntax Description
out = gratingvector( "mname", f, Returns the strength of all physical grating orders from monitorname.
index, direction); Output is in Cartesian coordinates.

Parameter Default Type Description


value
mname required string name of the monitor from which far field is calculated
f optional 1 number Index of the desired frequency point.
index optional value at number The index of the material to use for the projection.
monitor
center
direction optional direction of number Direction: this can be +1 or -1.
max power
flow

See Also
Grating projections 1666 , grating 1666 , gratingn 1667 , gratingperiod1 1669 , gratingbloch1 1671 , gratingu1 1670 , gratingangle 1670 ,
gratingpolar 1668

7.19.6 gratingperiod1
Returns the grating period (i.e. the simulation span) used in the grating calculations. gratingperiod1 gives the grating
period for the first dimension (2D and 3D). gratingperiod2 gives the period of the 2nd dimension (3D only). See the
grating function documentation for information on interpreting N, M, ux, uy for various monitor orientations.

Supported Product: FDTD, MODE

Syntax Description
out = Same arguments as grating function.
gratingperiod1( "monitorname", ...)
;

See Also
Grating projections 1666 , grating 1666 , gratingperiod2 1670

2003 - 2016 Lumerical Solutions, Inc


1670 Lumerical Knowledge Base

7.19.7 gratingperiod2
Returns the grating period (i.e. the simulation span) used in the grating calculations. gratingperiod1 gives the grating
period for the first dimension (2D and 3D). gratingperiod2 gives the period of the 2nd dimension (3D only). See the
grating function documentation for information on interpreting N, M, ux, uy for various monitor orientations.

Supported Product: FDTD, MODE

Syntax Description
out = Same arguments as grating function.
gratingperiod2( "monitorname", ...)
;

See Also
Grating projections 1666 , grating 1666 , gratingperiod1 1669

7.19.8 gratingangle
Returns the angle vector corresponding to the values returned by grating, in degrees, for 2D simulations. For 3D
simulations, use gratingu1 and gratingu2.

Supported Product: FDTD, MODE

Syntax Description
out = Same arguments as grating function.
gratingangle( "monitorname", ...);

See Also
Grating projections 1666 , grating 1666 , gratingu1 1670 , gratingu2 1670

7.19.9 gratingu1
Returns the grating order direction unit vectors (u1 and u2) corresponding to the data from the grating function from
3D simulation. For 2D simulations, use the gratingangle function. See the grating function documentation for
information on interpreting N, M, ux, uy for various monitor orientations.

Supported Product: FDTD, MODE

Syntax Description
out = Same arguments as grating function.
gratingu1( "monitorname", ...);

See Also
Grating projections 1666 , grating 1666 , gratingu2 1670 , gratingangle 1670

7.19.10 gratingu2
Returns the grating order direction unit vectors (u1 and u2) corresponding to the data from the grating function from
3D simulation. For 2D simulations, use the gratingangle function. See the grating function documentation for
information on interpreting N, M, ux, uy for various monitor orientations.

Supported Product: FDTD, MODE

Syntax Description

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1671

out = Same arguments as grating function.


gratingu2( "monitorname", ...);

See Also
Grating projections 1666 , grating 1666 , gratingu1 1670 , gratingangle 1670

7.19.11 gratingbloch1
Returns the bloch vector (k in_1 and k in_2) used in the grating calculation. This corresponds to the bloch vector setting
in the simulation region. gratingbloch1 gives the bloch vector for the first dimension (2D and 3D). gratingbloch2
gives the bloch vector for the 2nd dimension (3D only). See the grating function documentation for information on
interpreting N, M, ux, uy for various monitor orientations.

Supported Product: FDTD, MODE

Syntax Description
out = Same arguments as grating function.
gratingbloch1( "monitorname", ...);

See Also
Grating projections 1666 , grating 1666 , gratingbloch2 1671

7.19.12 gratingbloch2
Returns the bloch vector (k in_1 and k in_2) used in the grating calculation. This corresponds to the bloch vector setting
in the simulation region. gratingbloch1 gives the bloch vector for the first dimension (2D and 3D). gratingbloch2
gives the bloch vector for the 2nd dimension (3D only). See the grating function documentation for information on
interpreting N, M, ux, uy for various monitor orientations.

Supported Product: FDTD, MODE

Syntax Description
out = Same arguments as grating function.
gratingbloch2( "monitorname", ...);

See Also
Grating projections 1666 , grating 1666 , gratingbloch1 1671

7.20 Material database


The following commands are used to add or copy materials in the material database, as well as to set any material
property and verify the resulting complex index of a given material at any frequency. (The permittivity can be easily
obtained by squaring the index.) Please see the chapter on the material database to understand the usage of these
commands.
This section is not relevant for INTERCONNECT.

Command Description
addmaterial 1672 Adds a new material into the material database.
copymaterial 1672 Copies an existing material in the material database
setmaterial 1672 Sets any property of an existing material in the material database.
getmaterial 1673 Returns properties of a material in the material database.
getindex 1673 Returns the complex index of a material.

2003 - 2016 Lumerical Solutions, Inc


1672 Lumerical Knowledge Base

getfdtdindex 1673 Returns the material index as it will be in an actual FDTD simulation.
getmodeindex 1674 Returns the material index as it will be in an actual MODE simulation.
getnumericalpermittivity 1674 An advanced function that returns permittivity, taking into account the effect of
finite size of dt in an FDTD simulation.
deletematerial 1675 Deletes a material from the material database.
materialexists 1676 Returns if or not a material exists in the material database.
getsurfaceconductivity 1676 Returns surface conductivity of specified material which uses the surface
conductivity model.
getfdtdsurfaceconductivity 1676 Returns surface conductivity of specified material which uses the surface
conductivity model as will be used in a simulation.

7.20.1 addmaterial
Adds a new material to the material database.

Supported Product: FDTD, MODE

Syntax Description
?addmaterial; Displays all types of materials that can be added into the material
database.
out = addmaterial("materialtype"); Adds a new material and returns the name of the new material. The
argument "materialtype" is has to match correct string exactly.

See Also
Material database 1671 , setmaterial 1672 , getindex 1673 , getfdtdindex 1673

7.20.2 copymaterial
Makes a copy of a material in the material database.

Supported Product: FDTD, MODE

Syntax Description
out = Creates a copy of the material "materialname". The new name is
copymaterial("materialname"); returned.

See Also
Material database 1671 , setmaterial 1672 , getindex 1673 , getfdtdindex 1673

7.20.3 setmaterial
Modifies properties of a material in the material database.

Supported Product: FDTD, MODE

Syntax Description
?setmaterial("materialname"); Displays the property names of the specified material that can be
modified.

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1673

setmaterial( "materialname", Sets the property named "propertyname" of the material with the name
"propertyname", newvalue); "materialname" to newvalue. The argument 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 1671 , addmaterial 1672 , getmaterial 1673 , getindex 1673 , getfdtdindex 1673 , importing arbitrary dispersive
material 231

7.20.4 getmaterial
Returns properties of a material in the material database.

Supported Product: FDTD, MODE

Syntax Description
?getmaterial( "materialname"); Displays the property names of the specified material that can be
modified.
out = getmaterial( "materialname", Returns the property named "propertyname" of the material with the
"propertyname"); name "materialname". The returned variable is either a matrix or a
string, depending on the property in the query.

See Also
Material database 1671 , addmaterial 1672 , setmaterial 1672 , getindex 1673 , getfdtdindex 1673

7.20.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.

Supported Product: FDTD, MODE

Syntax Description
out = getindex( "materialname", f); Returns the complex index of the material with the given name. The
index is returned for the specified frequency f. Frequency f is in Hz.
getindex( "materialname", f, Optional argument component can be 1, 2 or 3 to specify the x, y or z
component); component for anisotropic materials. The default is 1.

See Also
Material database 1671 , getfdtdindex 1673 , getmodeindex 1674 , addmaterial 1672 , setmaterial 1672

7.20.6 getfdtdindex
This function returns the material index of a material in the database as it will be used in an actual FDTD simulation.

Many materials (such as Sampled 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.

Supported Product: FDTD, MODE

2003 - 2016 Lumerical Solutions, Inc


1674 Lumerical Knowledge Base

Syntax Description
out = Returns the complex index of the material with the given name. The
getfdtdindex( "materialname", f, index is returned for the specified frequency f. Similar to getindex, but
fmin, fmax); you also specify fmin and fmax, the span of frequency of the FDTD
simulation. All frequency units are in Hz.
getfdtdindex("materialname", Optional argument component can be 1, 2 or 3 to specify the x, y or z
f,fmin, fmax, component); component for anisotropic materials. The default is 1.

See Also
Material database 1671 , getindex 1673 , getmodeindex 1674 , addmaterial 1672 , setmaterial 1672

7.20.7 getmodeindex
This function returns the material index of a material in the database as it will be used in an actual MODE
simulation.

Many materials (such as Sampled Materials) have properties that depend on frequency. Using getmodeindex, you
can obtain the refractive index as a function of the specified frequency, f, as it will be used in MODE calculations.
Note that when multi-coefficient models are used, the fit result depends on the fit parameters, Max coefficients and
Tolerance set for the material.

Supported Product: FDTD, MODE

Syntax Description
out = Returns the complex index of the material with the given name. The
getmodeindex( "materialname", f); index is returned for the specified frequency f. This result is identical to
getindex unless the optional arguments fitsampled and fitanalytic are
used. All frequency units are in Hz.
getmodeindex("materialname", Optional argument component can be 1, 2 or 3 to specify the x, y or z
f,component); component for anisotropic materials. The default is 1.
getmodeindex("materialname", Optional arguments to specify if Sampled Materials or Analytic
f,component, fitsampled, Materials should be fitted using Lumerical's multi-coefficient model
fitanalytic, fmin, fmax); (MCM), which is commonly used in FDTD simulations. If either of
these options are set to 1 (true) then you must supply a minimum and
maximum frequency for fitting. The MCM is typically used in MODE
Solutions for
Sampled Materials when calculating waveguide dispersion, and for
Analytic Materials only for the purpose of using precisely the same
materials in both FDTD and MODE simulations.
The default values are 0 (false) for fitsampled and fitanalytic.
See Also
Material database 1671 , getindex 1673 , getfdtdindex 1673 , addmaterial 1672 , setmaterial 1672

7.20.8 getnumericalpermittivity
This advanced function returns the permittivity of a material in the database as it will be used in an actual FDTD
simulation, including the effects of a finite time step, dt. In FDTD, the relationship between the displacement field, D,
and the electric field, E, is given by
r r
D(w ) = e 0 e r (w , dt )E (w )
In the limit where dt tends to zero, we have
lim dt 0 e r (w , dt ) = n 2 (w )
where n(w) is the refractive index returned by the script function getfdtdindex, or shown in the Materials Explorer. If
you set dt to zero when calling this function, it will return exactly the same result as the square of getfdtdindex.

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1675

The name of the function is a reminder that it returns the numerical permittivity, i.e., the ratio of D and E, which is
different from the refractive index, i.e. the ratio of the speed of light in a vacuum to the phase velocity of light in the
medium. To understand the relationship between them, we must consider the full, numerical dispersion relation
between w and k, which is given by
2 2 2 2
1 wdt 1 k dx 1 k y dy 1 k dz
e r (w , dt ) sin = sin x + sin + sin z
cdt 2 dx 2 dy 2 dz 2

In the limit where dt, dx, dy and dz tend to zero, it is easy to show that we have the expected result
ck ck
w= =
e r ( w , dt = 0) n( w )
The spatial FDTD mesh and time step are generally chosen to obtain a desired level of simulation accuracy,
essentially by ensuring that the arguments of the sine functions are sufficiently small that sin(x)~x and that the
simulation is stable. For some materials, it may be desired to further reduce the value of the time step, dt, without
modifying the spatial FDTD mesh, in order to obtain a higher level of accuracy for er(w,dt). This script function makes
it possible to calculate, in advance, the value of dt required to obtain the desired accuracy for the permittivity.

The results from getnumericalpermittivity will be different if the Broadband Fixed Angle Source Technique (BFAST) is
used. Since the script function does not require a calculation being performed beforehand, the user needs to specify
if the computation uses BFAST or not. See the BFAST page 590 for more details about this technique.

Supported Product: FDTD, MODE

Syntax Description
out = getnumericalpermittivity Returns the complex permittivity of the material with the given name.
( "materialname", f, fmin, fmax, The permittivity is returned for the specified frequency f. This is similar
dt); to getfdtdindex except for the additional parameter dt. All frequency
units are in Hz.
getnumericalpermittivity("materialn Optional argument component can be 1, 2 or 3 to specify the x, y or z
ame", f,fmin, fmax, dt, component for anisotropic materials. The default is 1.
component);
getnumericalpermittivity("materialn Optional argument use_bfast can be 0 or 1. It indicates whether the
ame", f,fmin, fmax, dt, component, simulation is performed using the Broadband Fixed Angle Source
use_bfast); Technique (BFAST) or not. The default is 0.

See Also
Material database 1671 , getindex 1673 , addmaterial 1672 , setmaterial 1672 , getfdtdindex 1673

7.20.9 deletematerial
Deletes a material from the material database.

Supported Product: FDTD, MODE

Syntax Description
deletematerial("material_name"); Deletes a material named "material_name" from the material database.

See Also
Material database 1671 , setmaterial 1672

2003 - 2016 Lumerical Solutions, Inc


1676 Lumerical Knowledge Base

7.20.10 materialexists
Returns if or not a material exists in the material database.

Supported Product: FDTD, MODE, DEVICE

Syntax Description
materialexists("material_name"); Returns 1 if the material named "material_name" is present in the
material database. Otherwise return 0.

See Also
Material database 1671

7.20.11 getfdtdsurfaceconductivity
For materials which use a surface conductivity material model (such as Graphene), this function returns the surface
conductivity of the material in the database as it will be used in an actual simulation.

The conductivity evaluated at the specified f is returned. Note that the fit result depends on the fit parameters, Max
coefficients and Tolerance set for the material, thus getfdtdsurfaceconductivity result depends on those parameters
as well.

Supported Product: FDTD, MODE

Syntax Description
out = Returns the surface conductivity of the material with the given name.
getfdtdsurfaceconductivity( "materi The surface conductivity is returned for the specified frequency f.
alname", f, fmin, fmax); Similar to getsurfaceconductivity, but you also specify fmin and fmax,
the span of frequency range of the simulation. All frequency units are in
Hz.
getfdtdsurfaceconductivity("materi Optional argument component can be 1, 2 or 3 to specify the x, y or z
alname", f,fmin, fmax, component for anisotropic materials. The default is 1.
component);

See Also
Material database 1671 , addmaterial 1672 , setmaterial 1672 , getsurfaceconductivity 1676

7.20.12 getsurfaceconductivity
For materials which use a surface conductivity material model (such as Graphene), this function returns the complex
index of any material that is in the material database. The surface conductivity at the specified frequency is
interpolated from the neighboring frequencies where the conductivity data is available.

Supported Product: FDTD, MODE

Syntax Description
out = Returns the surface conductivity of the material with the given name.
getsurfaceconductivity( "materialn The surface conductivity is returned for the specified frequency f.
ame", f); Frequency f is in Hz.
getsurfaceconductivity( "materialn Optional argument component can be 1, 2 or 3 to specify the x, y or z
ame", f, component); component for anisotropic materials. The default is 1.

See Also

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1677

Material database 1671 , addmaterial 1672 , setmaterial 1672 , getfdtdsurfaceconductivity 1676

7.21 GDSII
The following commands can be used to import and export GDSII files.

Command Description
gdsopen 1677 Opens a GDSII file for writing.
gdsclose 1677 Closes a GDSII file for writing.
gdsbegincell 1678 Starts a new cell in a GDSII file.
gdsendcell 1678 Finishes a cell in a GDSII file.
gdsaddpoly 1679 Adds a polygon element to a GDSII file stream.
gdsaddcircle 1679 Adds an approximation of a circle to a GDSII file stream.
gdsaddrect 1680 Adds a rectangle element to a GDSII file stream.
gdsaddref 1680 Adds a reference to another cell to the current cell in the GDSII file stream.
gdsimport 1681 Imports a cell from a .gds file into the layout environment.

See Also
GDSII import / export functionality and example 480

7.21.1 gdsopen
This function creates a new .gds file and returns a file handle that can be used with the other GdsWriter functions to
write the file. The default database units are in 0.1nm and the user units are microns. The GDSII export function
works as a group of commands, shown below as an example. For more information, please see Userguide - GDSII -
Import and export 480 .

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
f = gdsopen("filename", "userUnit", Opens a .gds file in the current directory, specifies the size of user units
"dataBaseUnit") and size of the GDSII file units. f is a file handle to open the GDSII file.

Parameter Type Description


filename string name of the GDSII file to export, may also contain a file
path.
userUnit number size of user units in GDSII file units.
databaseUnit number size of the GDSII file units in meters.
An example of script code is available on the webpage.
See Also
gdsclose 1677 , gdsbegincell 1678 , gdsendcell 1678 , gdsaddpoly 1679 , gdsimport 1681

7.21.2 gdsclose
This function closes a GDSII file for writing. Before calling this command, a .gds file has to be previously opened,
see gdsopen 1677 .

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

2003 - 2016 Lumerical Solutions, Inc


1678 Lumerical Knowledge Base

Syntax Description
gdsclose("filename") closes a .gds file in the current working directory.

Parameter Type Description


filename string name of the GDSII file to export, may also contain a file
path.

See Also
gdsopen 1677 , gdsbegincell 1678 , gdsendcell 1678 , gdsaddpoly 1679 , gdsimport 1681

7.21.3 gdsbegincell
This function creates a cell in a GDSII file. All GDS elements (polygons, boxes, references, array references, etc)
must be placed inside a cell, so this function must be called before adding any elements. When finished adding
elements, gdsendcell can be called to finish the cell. Cells cannot be nested, so after calling gdsbegincell, a
new cell cannot be called again until the first called cell has been closed. Although the GDSII file is a flat list of cells,
cells can reference other cells, thus creating a nested hierarchy. See gdsaddref 1680 for more details. A GDS "cell"
exists as a "structure group" when imported to FDTD, see gdsimport 1681 for more details.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
gdsbegincell(f, "cellname") Creates a new cell in a GDSII file.

Parameter Type Description


f string a file handle that was previously opened with gdsopen.
cellname string name of the cell.

Note: Just to clarify, a GDS cell is different from a Cell Array 1465 in FDTD.

See Also
gdsopen 1677 , gdsclose 1677 , gdsendcell 1678 , gdsaddpoly 1679 , gdsaddref 1680 , gdsimport 1681 , cell 1465

7.21.4 gdsendcell
This function finishes a cell in a GDSII file. This function ends the current cell in the GDSII file stream. The
command gdsbegincell has to be called before closing a cell.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
gdsendcell(f) Finishes the previously created cell in a GDSII file.

Parameter Type Description


f string a file handle that was previously opened with gdsopen.

See Also
gdsopen 1677 , gdsclose 1677 , gdsbegincell 1678 , gdsaddpoly 1679 , gdsimport 1681

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1679

7.21.5 gdsaddpoly
This function adds a polygon element to a GDSII file stream. Polygons are also known as boundary elements in
GDS terminology. This command can be called only if a cell has been created.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
gdsaddpoly(f, layer, [vertices]) Adds a polygon element on a layer with vertices.

Parameter Type Description


f string a file handle that was previously opened with gdsopen.
layer number layer number for this structure.
vertices matrix vertices of the polygon, in a Nx2 matrix where the first
column represents x and the second column represents y,
e.g., [x1,y1; x2,y2;...xn,yn]. The values are in meters. The
first and last values should not be the same, the polygon
will be automatically closed.

See Also
gdsopen 1677 , gdsclose 1677 , gdsbegincell 1678 , gdsendcell 1678 , gdsaddcircle 1679 , gdsaddref 1680 , gdsimport 1681

7.21.6 gdsaddcircle
This function adds an approximation of a circle to a GDSII file stream. GDSII files do not support circles, so this is
just a convenient function to create a polygon representation of a circle. Polygons can only be added in a GDSII cell,
so this command can be called only if a cell has been created.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
gdsaddcircle(f, layer, x, y, r, n) Adds an approximation of a circle on a layer with x-, y-coordinates,
radius and number of polygon sides.

Parameter Type Description


f string a file handle that was previously opened with gdsopen.
layer number layer number for this structure.
x number x-coordinate of the center position in meters.
y number y-coordinate of the center position in meters.
r number radius of the circle in meters.
n number number of sides to use in the polygon approximation. It is
64 by default.

See Also
gdsopen 1677 , gdsclose 1677 , gdsbegincell 1678 , gdsendcell 1678 , gdsaddpoly 1679 , gdsaddref 1680 , gdsimport 1681

2003 - 2016 Lumerical Solutions, Inc


1680 Lumerical Knowledge Base

7.21.7 gdsaddrect
This function adds a rectangle element to a GDSII file stream. This is just a convenient function to create a polygon
for the case of a rectangle. Other element type for rectangle (such as, box) is not supported at this moment.
Polygons can only be added in a GDSII cell, so this command can be called only if a cell has been created.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
gdsaddrect(f, layer, x, y, width, Adds a rectangle element on a layer with x-, y-coordinates, width and
height) height.

Parameter Type Description


f string a file handle that was previously opened with gdsopen.
layer number layer number for this structure.
x number x-coordinate of the center position in meters.
y number y-coordinate of the center position in meters.
width number width of the rectangle in meters.
height number height of the rectangle in meters.

See Also
gdsopen 1677 , gdsclose 1677 , gdsbegincell 1678 , gdsendcell 1678 , gdsaddpoly 1679 , gdsaddref 1680 , gdsimport 1681

7.21.8 gdsaddref
This function adds a reference to another cell to the current cell in the GDSII file stream. This function replicates the
referenced cell (has to be previously opened and finished) to the current cell, to create a nested hierarchy. The layer
numbers of the replicated structures follow the referenced cell. References can only be added in a GDSII cell, so this
command can be called only if a current cell has been created. In addition, the cell to be replicated has to exist
before it is referenced.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
gdsaddref(f, "cellname", dx, dy) Adds a reference to another cell ("cellname") to the current cell, with a
specified move of dx and dy.

Parameter Type Description


f string a file handle that was previously opened with gdsopen.
cellname string name of the referenced cell.
dx number x-movement of the replicated cell in the current cell.
dy number y-movement of the replicated cell in the current cell.

See Also
gdsopen 1677 , gdsclose 1677 , gdsbegincell 1678 , gdsendcell 1678 , gdsaddpoly 1679 , gdsaddcircle 1679 , gdsaddrect 1680 ,
gdsimport 1681

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1681

7.21.9 gdsimport
This command imports a cell from a .gds file into the layout environment. This is equivalent to performing a GDSII
import through the FILE->IMPORT menu. See the Layout editor reference guide on GDSII import 480 for more
information.

Supported Product: FDTD, MODE, DEVICE

Syntax Description
n = gdsimport("filename", Imports the specified layer from the specified cell in the specified file into
"cellname", layer); the current simulation environment. The objects created will have their
material set to an object defined dielectric. In 3D, the 2D geometric data
will be extruded to default values in the Z dimension. The optional
returned value, n, is the number of objects that were imported from the
gds file.
n = gdsimport("filename", Same as the above command, but the material of the imported object
"cellname", layer, "material"); will be set to the value specified.
n = gdsimport("filename", This form of the command is only allowed in 3D layouts. The behavior is
"cellname", layer, "material", the same as the above command, but the structures will be extruded in
zmin, zmax); the Z dimension to the specified z min and z max values

Parameter Type Description


filename string name of the GDSII file to import. It can contain a complete
path to file, or path relative to the current working directory.
cellname string name of the cell to import from the GDSII file.
layer number or the layer number from the GDSII file to import. If only
string elements matching a certain data type are desired, this
can be specified by using a string of the form:
"6:2"
where the desired layer is 6 and the desired data type is 2.
material string a valid name of a material in your current layout
environment. Partial names of materials can be matched
starting at the beginning of the string. For example, "Al (3"
would match "Al (300nm)".
zmin number the minimum z value for extruding 2D GDSII data into 3D
objects
zmax number the maximum z value for extruding 2D GDSII data into 3D
objects

Example:
This command imports "cell_1", on the first layer in the GDS_export.gds file, with a specified material, z min and
z max assigned. For more examples, please visitthe Layout editor reference guide on GDSII import 480 .
gdsimport("GDS_export.gds", "cell_1", 1, "Ag (Silver) - CRC", 0, 1e-6);

See Also
System level 1426 , setnamed 1568 , fileexists 1433 , gdsopen 1677

2003 - 2016 Lumerical Solutions, Inc


1682 Lumerical Knowledge Base

7.22 HDF5
The following commands can be used to read Hierarchical Format Data, version 5 (HDF5) files.

Command Description
h5info 1682 Returns information about the structure of an HDF5 file.
h5read 1683 Reads data from an HDF5 file.
h5readattr 1683 Reads attributes from an HDF5 file.

See Also
Reading HDF5 files 792

7.22.1 h5info
Returns information about the structure of an HDF5 file.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
info = h5info("filename"); Returns a struct "info" that contains information about the structure of
the HDF5 file named "filename."

Parameter Type Description


filename string name of the HDF5 file.

The struct containing the information about the HDF5 file has the following fields:

Belongs to Field Description


File Attributes structure containing a list of the attributes of the file.
Datasets structure containing a list of the datasets in the file.
Datatypes structure containing a list of the datatypes in the file.
Filename string containing the name of the file.
Groups structure containing a list of the top-level groups.
Name string containing the path to the root. The value is always "/".
Groups Attributes structure containing a list of the attributes of the group.
Datasets structure containing a list of the datasets in the group.
Datatypes structure containing a list of the datatypes in the group.
Groups structure containing a list of the sub-groups within the group.
Name string containing the name (path) of the group.
Datasets Attributes structure containing a list of the attributes of the dataset.
Dataspace structure containing information about the size of the dataset.
Datatype structure containing information about the dataset type.
Name string containing the name (path) of the dataset.
Propertylist structure containing various properties of the dataset such as fill
value, filter, etc.

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1683

Datatypes Class string containing the HDF5 class of the datatype.


Name string containing the name of the datatype.
Size size of the datatype in bytes.
Type string describing the type of the datatype.

See Also
h5read 1683 , h5readattr 1683 , Reading HDF5 files 792

7.22.2 h5read
Reads data from an HDF5 file. The command supports a large number of dataset types such as integer, float,
double, string, compound, etc.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
data = h5read("filename", Reads data in the dataset named "dataset_name" within the
"dataset_name"); HDF5 file named "filename."

Parameter Type Description


filename string name of the HDF5 file.
datasetname string name (path) of the dataset to be read.

See Also
h5info 1682 , h5readattr 1683 , Reading HDF5 files 792

7.22.3 h5readattr
Reads attributes from an HDF5 file.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
attr = h5readattr("filename", "attr_path", Reads the attribute named "attr_name" at the location "attr_path"
"attr_name"); within the HDF5 file named "filename."

Parameter Type Description


filename string name of the HDF5 file.
attr_path string name (path) of the dataset or group to which the attribute
belongs to.
attr_name string name of the attribute to be read.

See Also
h5info 1682 , h5read 1683 , Reading HDF5 files 792

2003 - 2016 Lumerical Solutions, Inc


1684 Lumerical Knowledge Base

7.23 User defined GUIs


Custom GUIs can be created with the following commands.

Command Description
message 1684 Creates a message window that displays some text.
newwizard 1684 Used to create a new user defined wizard.
newwizardpage 1685 This creates a page for the wizard.
wizardwidget 1685 Adds a new widget to the current wizard window.
runwizard 1686 Runs the wizard and returns a value indicating which button was pressed.
wizardgetdata 1686 Returns data entered into a specific widget.
killwizard 1686 This closes the wizard window.
wizardoption 1687 Sets some options for wizard widgets and labels.
fileopendialog 1687 Calls the standard windows file open dialog.
filesavedialog 1687 Calls the standard windows file save dialog.

Typically, a wizard will be created with the following steps


1. Open a new wizard with newwizard 1684
2. Add a new wizard page with newwizardpage 1685
3. Add widgets to the wizard page with wizardwidget 1685
4. Call runwizard 1686 to run the wizard
5. Use wizardgetdata 1686 to obtain values entered into widgets by the user
6. Depending on the values returned by runwizard 1686 , the wizard can be closed with killwizard 1686 , or a new wizard
page is started with newwizardpage 1685 .

7.23.1 message
Creates a message window that displays some text. The user must hit Enter, or click the OK button to continue.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
message("text"); Creates a window that displays text.
This function does not return any data.

See Also
User defined GUI 1684 , newwizard 1684

7.23.2 newwizard
Used to create a new user defined wizard. Opens a new wizard window.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
newwizard( w, h, "title"); w and h (width and height) are specified in pixels. The minimum
values for w and h are 200.
title is the wizard window title.

See Also

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1685

User defined GUI 1684 , message 1684

7.23.3 newwizardpage
This creates a page for the wizard and should be done before adding any widgets.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
newwizardpage( "label1"); Creates a button with the label "label1". Typically, this will be "Done"
or "OK".
newwizardpage( "label1", "label2"); Creates two buttons with labels "label1" and "label2". These will
typically be "Next" and "Back" or "Done" and "Back".

See Also
User defined GUI 1684 , newwizardpage 1685

7.23.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.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

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, checkboxes,
defaultValue); menu items or strings.
wizardwidget( "type", "label", If the "type" of widget is a "menu", then the menu choices must be
"choices", defaultValue); provided. These choices should be separated by the character "|". For
example, to create a pulldown widget with the name "simulation type"
and 3 choices "TE","TM","3D", with the default choice "3D", the
command is
wizardwidget("menu","simulation type","TE|TM|3D",3);

See Also
User defined GUI 1684 , newwizardpage 1685

7.23.5 wizarddata
This command will cause the wizard window to wait until the user selects OK or Cancel. It then returns value data
from the matrix in a N+1 length matrix, where N is the number of widgets (excluding labels) in the current wizard
page.

Supported Product: MODE

2003 - 2016 Lumerical Solutions, Inc


1686 Lumerical Knowledge Base

Syntax Description
out = wizarddata; The values of out are
out(1) = 0, 1 or -1. 0 means the user pressed Cancel, 1 means the
user pressed the first button (typically "OK" or "Next") and -1 means
the user pressed the second button (typically "Back")
out(2:N+1) gives the numeric values that the user entered for each
input field when out(1) is 1. Note that check boxes return 1 if
checked and 0 if unchecked. Menu items return a number between 1
and M where M is the number of choices in the menu. If out(1) is 0
or -1, all the values out(2:N+1) are zero.

See Also
User defined GUI 1684 , newwizard 1684

7.23.6 runwizard
Runs the wizard and returns a value indicating which button was pressed.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
out = runwizard; Returns either 0, +1 or -1.
0 means the user pressed Cancel, 1 means the user pressed the first
button (created by calling newwizardpage) and -1 means the user
pressed the second button (created by calling newwizardpage).

See Also
User defined GUI 1684 , newwizardpage 1685

7.23.7 wizardgetdata
Returns data entered into a specific widget.

Supported Product: MODE

Syntax Description
out = wizardgetdata(N); 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.

See Also
User defined GUI 1684 , newwizardpage 1685

7.23.8 killwizard
This closes the wizard window. It should only be called after a wizard window has been created with the newwizard
command.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
killwizard; This closes the wizard window.

See Also
User defined GUI 1684 , newwizardpage 1685

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1687

7.23.9 wizardoption
Sets some options for wizard widgets and labels.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
wizardoption The options are
("optionname",setting); "fontsize" sets the font size to any value between 8 and 40
"fieldwidth" sets the width of each widget field to any value between
20 and the full width of the wizard window.
"fieldheight" sets the height of each field to any value between 8 and
the full height of the wizard window.
"margin", sets size of the left margin to any value between 0 and full
width of the wizard window.

See Also
User defined GUI 1684 , newwizard 1684

7.23.10 fileopendialog
Calls the standard windows file open dialog.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
out = fileopendialog; Brings up the open file dialog box and returns the path that the user
selects.
out = fileopendialog(".ext"); Brings up the open file dialog box, displaying only files with the
extension .ext. Returns the path of the file that the user selects.

See Also
User defined GUIs 1684 , filesavedialog 1687

7.23.11 filesavedialog
Calls the standard windows file save dialog.

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

Syntax Description
out = filesavedialog; Brings up the save file dialog box and returns the path that the user
selects.
out = filesavedialog(".ext"); Brings up the save file dialog box, displaying only files with the
extension .ext. Returns the path of the file that the user selects.

See Also
User defined GUIs 1684 , fileopendialog 1687

7.24 Creating your own script commands


Running a script file from the script prompt
You can run any script file simply by typing the name of the file (without the .lsf extension). For example, if you
create the file create_array.lsf, you can run this file from the command prompt, or another script file, with the

2003 - 2016 Lumerical Solutions, Inc


1688 Lumerical Knowledge Base

command
create_array;

The current working directory is always in the Lumerical script path, and is the most common location for your script
files. You can add additional locations to the path with the addpath 1436 script function. The following location
(within the installation directory) is also always in the path, making it a convenient place to put script functions that
may be needed my all users of the computer. It will be necessary to have admin access to save files in this
location.
C:\Program Files\Lumerical\FDTD\scripts (Windows)
/usr/local/lumerical/scripts (Linux)

Note: Saving script files with the same name as built in script functions
It is generally not recommended to create script files that have the same name as the standard script functions.
In such cases, where there is a conflict between a script file and standard script function, the script file will run.
In other words, this allows you to override the behavior of a standard script function. This can be helpful, but it
can also lead to confusing behavior when done unintentionally.

Calling one script file from another


Once you start creating complex scripts, it may be convenient to split them up into a number of simpler scripts that
call one another. If you have multiple scripts in the same directory then they can call each other just as you would
use any other scripting command.

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
for(i=1:10) {
# do something
}

Defining helper function


Calling one script file from another can also help define some simple custom functions. For example, you can define
you own function in a custom_function.lsf. Then define the variables in main.lsf and call the helper
function.

main.lsf
clear;
a=1;
b=1;
custom_function;
?x;
custom_function.lsf
x=3*a+b;

Formatting tips
Multiple commands are allowed on a single line.
Blank lines, space and tabs will be ignored. Therefore you can format your script files any way you choose.
Each command must be terminated with a semicolon.
On any line, all characters after a # symbol are ignored.

2003 - 2016 Lumerical Solutions, Inc


Scripting Language 1689

Finally, you can not define a variable or assign values to a variable that has the same name as one of the script
commands. For example, the following lines
sum = matrix(1,2);
angle = acos(pi/2);
are not valid statements since 'sum' and 'angle' are script functions.

2003 - 2016 Lumerical Solutions, Inc


1690 Lumerical Knowledge Base

8 Applications
Lumerical's photonic design and simulation products can be used to design, analyze and optimize a wide array of
optical and photonic technologies relevant to numerous applications spanning many industries. To learn more about
how Lumerical's products can be used for various applications, please select from one of the following topics:

Nanophotonic 1694

Nanophotonics describes the field


of study that examines how light in
the wavelength band from 300nm
to approximately 2000nm interacts
with structures at a sub-
wavelength scale. At these
geometries, photons are confined
within the nanoscale structures
and the resulting electromagnetic
field confined within the structure
can be defined by solving the
boundary conditions of Maxwells
equations. With innovative
structures capable of confining,
guiding or slowing light a wide
array of optical functions can be
engineered.

Metamaterials 1984

Photonic metamaterials are


periodic optical nanostructures
often composed of metallic
elements on a dielectric or
semiconducting substrate, where
the period is shorter than the
wavelength of light. They are of
large scientific interest as the
dielectric response of those
materials can be engineered
through semiconductor
manufacturing to yield interesting
physical phenomena at optical
wavelengths.

Photonic Integrated Circuits 2016

Photonic integrated circuit (PIC)


technology is undergoing a growth
rate very similar to the one seen
by electronic integrated circuits
over the last half century. Much
like electronic chip design, in
order to keep up with the
increasing number of components
and circuit complexity, efficient
and reliable automated design
tools are necessary to sustain this
growth. These tools give engineers
the ability to carry out virtual

2003 - 2016 Lumerical Solutions, Inc


Applications 1691

prototyping, improve yields, lower


development costs and shorten
design cycles.

CMOS Image Sensors 2510

As CMOS image sensor pixels


sizes shrink to pixel diameters of
1 micron and below, there has
been continued research into
overcoming technical challenges
related to the production of images
of sufficient quality, color depth
and resolution sufficient for
demanding consumer and
commercial applications. With the
goal of producing CMOS imagers
capable of capturing an incident
light signal, and efficiently
propagating that signal through
sophisticated multilayer structures
manufactured with CMOS
fabrication processes, rigorous
optical and electrical simulations
that account for absorption,
scattering, and diffraction from
sub-wavelength features as well as
steady state and transient
electrical behavior of the sensor
are required. .

Solar Cells 2594

With the goal of reducing


manufacturing costs and material
inputs and increasing solar cell
efficiencies, research into solar
cells is increasingly focused on
new cell design concepts including
thin film, organic, and textured
surface solar cells. When
incorporating nanophotonic
elements like metallic
nanoparticles with plasmon
resonances tuned to efficiently
scatter the light into the absorbing
layer, or nanotextured surface anti-
reflection coatings to reduce
undesirable back reflections that
degrade cell performance, solar
cell performance can be
dramatically improved.

Simulation of solar cells is


essential to predict the behavior of
these devices. As the design of
photovoltaic cells increase in
complexity, it becomes more

2003 - 2016 Lumerical Solutions, Inc


1692 Lumerical Knowledge Base

difficult to obtain analytic solutions


for their performance. In the real
device, non-ideal processes such
as bulk and surface recombination
of electrical charge carriers
(electrons and holes) reduce the
electrical efficiency of the solar
cell. A combination of optical and
electrical simulations which
account for these non-ideal
processes are necessary to
accurately characterize the
photovoltaic efficiency of the solar
cell.

Heat Assisted Magnetic Recording (HAMR) 2669

The shift towards a knowledge-


based economy is resulting in an
ever increasing quantity of
information that must be stored,
and conventional hard disk
technology is under increasing
strain to meet the demand for
increased storage capacity. That
continued demand for higher
capacity and faster information
storage media has triggered
worldwide research activity into
new design concepts to realize
ultrahigh density storage devices.

In turn, those design concepts


employ optical storage media like
holographic media, optical read/
write capabilities including
delivering of optical signals via
state-of-the-art optical pick-up
designs, utilizing optical signals to
achieve heat-assisted magnetic
recording, or developing optical
characterization and processing
methods to identify and repair
defects, conduct failure analysis,
or fabricate and characterize
optical media. These optical
design, analysis, fabrication and
characterization steps require
sophisticated and flexible optical
simulation tools to understand the
role of imperfections and design
variables on data storage media
and system performance.

OLEDs 2682

2003 - 2016 Lumerical Solutions, Inc


Applications 1693

In the search for higher efficiency,


bright light sources, researchers
are investigating how
nanophotonics can be used within
light emitting diode (LED) and
organic light emitting diode
(OLED) structures. Nanophotonic
elements including textured
metallic electrodes, periodic
patterning within the active layer,
and microscale anti-reflection
layers like moths eye film can
improve the price performance of
solid state lighting, and offer long
lifetimes, small form factors, high
lumens output per watt input, and
robust packaging. As a result,
LED/OLED structures are of
intense research interest for a
diverse set of applications
including automotive headlamps,
high brightness/long lifetime street
lamps, and other applications.

Nonlinear and Gain 2716

Advanced material models for


dispersive, nonlinear and gain
modeling using finite-difference
time-domain (FDTD) methods are
challenging due to the diversity of
problems to be solved. A nonlinear
model may be as simple as an
instantaneous (2) or (3) effect,
or may involve additional dispersive
and anisotropic nonlinear terms.
While it is relatively straightforward
to provide a particular nonlinear
material model appropriate for a
specific application, it is a
challenge to provide the wide
range of different nonlinear material
models that are required.

Lumericals Flexible Material


Plugins enable end users to
develop new electric and magnetic
FDTD material models. Users have
the ability to modify the FDTD
update equations in C++ to create
materials with arbitrary nonlinearity
and dispersion. These material
models can then be complied as a
plugin and added to the materials
database.

Other Applications 2771

2003 - 2016 Lumerical Solutions, Inc


1694 Lumerical Knowledge Base

Other applications including


graphene based devices, solid-
state electronic devices, magneto
optical kerr effect, Faraday effect,
etc.

8.1 Nanophotonics
Motivation
Nanophotonics describes the field of study that examines how light in the wavelength band from 300nm to
approximately 2000nm interacts with structures at a sub-wavelength scale. At these geometries, photons are
confined within the nanoscale structures and the resulting electromagnetic field confined within the structure can be
defined by solving the boundary conditions of Maxwells equations. With innovative structures capable of confining,
guiding or slowing light a wide array of optical functions can be engineered.

Computational methods for accurately solving Maxwells equations for arbitrary 3D geometries such as the Finite
Difference Time Domain method combined with computer aided design and analysis provide a powerful platform
research and development in nanophotonics. Research and development activities span a wide array of applications
from telecommunications and datacom to biomedical, analog computing and imaging.

Simulating nanophotonic devices


Lumerical's FDTD Solutions is a 3D Maxwell solver, capable of analyzing the interaction of UV, visible, and IR
radiation with complicated structures employing wavelength scale features. FDTD Solutions can be used across a
wide array of nanophotonic research areas, please select from one of the following topics to learn more:

Plasmonics 1881

Plasmonics is a field of study that


explores the interaction of light
waves and metallic surfaces, and
the resulting density waves of
electrons that can be generated
from this interaction. The resulting
electron density wave that
propagates along the surface of
the metal is referred to as a
surface plasmon polariton, or a
surface plasmon. Owing to the
strong frequency dependence of
the complex permittivity of the
metal, plasmons themselves
exhibit strong variations with
frequency, and this frequency
dependence results in surface
plasmon resonances.

Photonic Crystals and Diffractive Optics 1757

2003 - 2016 Lumerical Solutions, Inc


Applications 1695

For nanophotonic structures that


are comprised of periodic
elements of different permittivity in
one dimension (gratings) or two/
three dimensions (photonic
crystals), the periodic variation in
the refractive index inhibits the
propagation of electromagnetic
waves of specific frequency,
resulting in photonic band gaps
corresponding to the band of
frequencies over which radiation
cannot propagate.

Particle and Surface Scattering 1722

FDTD Solutions can be used to


simulate light scattering in the
presence of wavelength scale
and sub-wavelength scale
geometries. Since the
scattering intensity is usually
very weak compared to the
illumination, a differential
method is often used. The total
field scattered field method
(TFSF) is a convenient
technique to get the scattered
field, which can remove the
mirror reflection.

Microscopy and Lithography 1696

Simulating the lithographic


process prior to manufacture can
help ensure that severe proximity
effects do not compromise the
manufacturing process.
Ultimately, it is advantageous to
employ semiconductor metrology
techniques to ensure that the
manufacturing process performed
as expected. Advanced optical
critical dimension metrology offers
a means by which high-throughput
wafer inspection can be used to
identify surface defects and
manufacturing (e.g. bridging)
imperfections. Understanding the
interplay of optical test conditions
like polarization, incident angle,
and wavelength and the specifics
of the defect (size, orientation,
etc) is a key capability of a
rigorous optical simulation

2003 - 2016 Lumerical Solutions, Inc


1696 Lumerical Knowledge Base

solution.

Liquid Crystals 1953

Liquid crystals are optical


materials whose molecules can be
oriented via the application of a
static or low-frequency electric
field. Given the anisotropic optical
properties of these materials
depending on their orientation,
designers can use them to
electrically tune the response of a
wide class of photonic
components including display and
communications components
including optical switches,
couplers, shutters, modulators
and beam steering devices. A
rigorous Maxwell solver is required
to predict the broadband response
of photonic components
incorporating liquid crystals and
when the molecule orientation is
varied over wavelength-scale
distances.

For other applications, please see


Photonic Integrated Circuits 2016
OLEDs 2682
Solar Cells 2594
CMOS Image Sensors 2510
Heat assisted Magnetic Recording 2669

Nonlinear optics 2716


More... 1941

8.1.1 Microscopy and Lithography


Motivation
The drive to create faster and lower power processors while reducing manufacturing costs requires that critical
dimensions continue to shrink in size. This in turn requires detailed investigations into how existing photolithography
can be extended to ever-shorter wavelengths by using very high numerical aperture exposure tools, resolution
enhancement techniques like optical proximity correction, phase shift masks, or some other technique. All such
approaches require detailed optical models of how exposure light interacts with sub-wavelength features either on
mask, or on wafer.

Alternatively, ongoing research and development into nanolithography and next generation lithography including
DUV, EUV, nanoimprint lithography, and surface plasmon resonant interference lithography may offer promise to
fabricate nanoscale features beyond the diffraction limit. Detailed investigation into such techniques often requires
the use of advanced optical simulation techniques. Lithography simulation can assist with improving device yields
and reducing the number of reticle iterations, allowing a fabrication facility to ramp products faster and save
substantially in production costs.

Simulating the lithographic process prior to manufacture can help ensure that severe proximity effects do not
compromise the manufacturing process. Ultimately, it is advantageous to employ semiconductor metrology
techniques to ensure that the manufacturing process performed as expected. Advanced optical critical dimension
metrology offers a means by which high-throughput wafer inspection can be used to identify surface defects and
manufacturing (e.g. bridging) imperfections. Understanding the interplay of optical test conditions like polarization,

2003 - 2016 Lumerical Solutions, Inc


Applications 1697

incident angle, and wavelength and the specifics of the defect (size, orientation, etc) is a key capability of a rigorous
optical simulation solution.

Simulating microscopy and lithograpy


FDTD Solutions uses the finite difference time domain technique to rigorously solve for the object fields at the mask
or specimen plane, correctly accounting for all the phase delay and diffractive effects even for wavelength scale
structures. All diffraction, refraction, interference, absorption and polarization effects are calculated in the near field
without approximation. For lithography, one can calculate the aerial image at the wafer by post-processing the FDTD
simulation data. For microscopy, one can calculate the equivalent bright field microscope image and the phase
contrast image can be reconstructed at the image plane. In the case of the phase contrast microscope, the image
can be calculated for an arbitrary phase delay due to the phase plate without having to re-simulate the fields at the
specimen.

Features
Compare results with experimental images obtained from a micrscope with an arbitrary numerical aperture.
Calculate the bright field and phase contrast image for an arbitrary phase delay due to the phase plate.
Rigorously calculate the aerial image printed on the wafer for a variety of illumination schemes as well as
resolution enhancement techniques (RETs)
Lumericals conformal mesh technology can achieve sub-mesh cell accuracy for wavelength scale features.
Multi-coefficient materials (MCMs) can accurately model dispersive materials across wide wavelength
ranges
Built-in parameter sweep and optimization algorithms make it easy to analyze and optimize parameterized
designs

Getting started
Download relevant products:
FDTD Solutions

Product introductory videos:


FDTD Solutions

Product introductory examples:


(FDTD Solutions) Particle scattering tutorial 1724

More ... 171

Application examples
Solvers 101 Description

FDTD Imaging 1697

FDTD Phase contrast microscope 1700

FDTD Fresnel Lens 1705

FDTD Lithography 1707

FDTD Propagating the fields from periodic structures 1715

FDTD Binary phase grating mask for MOEMS processing 1718

8.1.1.1 Imaging
Introduction
A microscope's Numerical Aperture (NA) limits the finest details that can be resolved. A very simplified imaging
system is shown in the figure below. A lens system takes light from the specimen and focuses it onto an image
plane. At some point in the system, an aperture limits the angles of light that can travel through the lens system to
create the final image.

2003 - 2016 Lumerical Solutions, Inc


1698 Lumerical Knowledge Base

The goal of this example is to provide an analysis script that will post-process simulation monitor data such that it
can be compared to experimental images obtained from a microscope with a given numerical aperture. To do this,
near field monitor data is decomposed into a series of plane waves, which propagate at different angles. Any plane
waves with angles outside of the NA are then discarded. Finally, the remaining light is re-focused onto an image
plane. The script microscopy_imaging.lsf does this calculation, and produces an image of the final result. This
example does not include a magnification factor for the lens system, but that can be added and is used in some
other examples. It does include a defocus setting which allows us to consider the imaged light at a specified
distance from the focal plane.

A set of 2D example files are also provided.

Solvers 101

FDTD
In this topic
Image Gaussian Beam propagating through
free space 1698
Image Fields above Photonic Crystal Cavity
1699

Associated files
microscopy_imaging_beam.fsp
microscopy_imaging.lsf
microscopy_imaging_2D.fsp
microscopy_imaging_2D.lsf

See also
Microscopy 1696

Image Gaussian Beam propagating through free space


The first example (microscopy_imaging_beam.fsp) images a Gaussian beam propagating through free space.
The beam is 3 microns from the waist and the beam center is offset in space by 1um in X. The beam is propagating
at a 30 degree angle.

The left figure below shows electric field intensity at the monitor (near field). In this image, the spatial offset of the
source is visible but it is impossible to discern the direction of propagation. The right figure shows the far field

2003 - 2016 Lumerical Solutions, Inc


Applications 1699

projection of the light. In this case, the direction of propagation is visible. We can see that the source is a highly
focussed beam that contains plane waves at many angles, but centered at 30 degrees.

The left figure below shows the result from the imaging script with Numerical Aperture (NA) = 1. It looks very much
like the near field because all of the light in the near field image is being collected at the image plane. The right figure
shows the image when NA = 0.3. Much of the detail of the original near field has been lost but the beam spot is still
small. If we continue to reduce the NA, for example, to 0.05, then the imaged beam will become much larger than
the original near field beam.

Image Fields above Photonic Crystal Cavity


Looking at a resonant mode of the cavity, we expect the near field to be quite different from the far field because
most of the energy is trapped in the cavity. The light tends to be traveling in the plane of the PC, reflecting back and
forth. Therefore, when the light finally does leave the cavity, it tends to be at grazing angles to the surface, rather
than at normal incidence. This is a very important consideration when using an imaging system with NA<1, which
will not collect this grazing light.

More information about this cavity and its modes can be found in the Photonic crystals 1821 section. This example
uses the mode at 243.4 THz.

2003 - 2016 Lumerical Solutions, Inc


1700 Lumerical Knowledge Base

The left figure below shows electric field intensity at the monitor (near field). Many sub-wavelength features are
visible.The right figure shows the far field projection of the light. The majority of the power is radiating at 45 degrees.

The left figure below shows the output of the imaging script with NA=1. The profile is quite different from the near
field because much of the near field energy is bound, rather than propagating. The right figure shows the output of
the imaging script with NA=0.5. The smaller aperture causes more loss of detail. However, some key features such
as the zero at the center are still preserved.

8.1.1.2 Phase Contrast Microscope


Introduction
In many specimens such as living cells there is only a small difference in transparency between the structure being
imaged and the surrounding medium. In these cases, conventional bright field microscopy often fails to create an
image with sufficient contrast. Phase contrast microscopy can be used to create a image with a strong contrast
ratio by coherently re-interfering a reference, or surround beam (S), with a diffracted beam (D) from the specimen.
The index contrast between the specimen and the surrounding medium creates a phase delay between the two
beams, which can be augmented by a phase plate in the S beam. The resulting image, where the phase difference
is translated into an amplitude variation at the image plane by interference, can have a high contrast ratio,

2003 - 2016 Lumerical Solutions, Inc


Applications 1701

particularly if both beams have the same amplitude at the image plane.

A standard phase contrast microscope design is shown below. The S beam is shown in yellow, and the D beam is
shown in blue.

FDTD Solutions uses the finite difference time domain technique to rigorously solve for the object fields at the
specimen plane, correctly accounting for all the phase delay and diffractive effects even for wavelength scale
structures. All diffraction, refraction, interference, absorption and polarization effects are calculated in the near field of
the specimen without approximation. By post-processing the FDTD simulation data, the equivalent bright field
microscope image and the phase contrast image can be reconstructed at the image plane. In the case of the phase
contrast microscope, the image can be calculated for an arbitrary phase delay due to the phase plate without having
to re-simulate the fields at the specimen.

Solvers 101

FDTD
In this topic
Simulation 1701
Analysis 1702
Results 1703
Associated files
phase_contrast1.fsp
phase_contrast_batch_run.lsf
phase_constrast_analysis.lsf

See also
Microscopy 1696

The example on the following pages will show how to use FDTD Solutions to calculate the image of a complex, low
index, structure with a phase contrast microscope. We will compare the results to the image obtained by bright field
microscope of the same specimen.

In this example, FDTD only simulates the blue region (from Specimen to Image). The simulation and analysis will
proceed with the assumptions listed below. Most of the above assumptions can be modified easily.

1. We will model the specimen illuminated by plane waves at a polar angle of 30 degrees. This angle depends on
the dimensions and properties of the condenser annulus and condenser lens and is determined using other ray
tracing programs.
2. We will assume that the specimen is periodically replicated, but we will only image one period in at the image
plane.
3. We assume that the plane waves at different azimuthal angles are incoherent. Ideally, we would simulate a large
number of azimuthal angles, but in this example we will consider only 4 azimuthal angles.
4. We assume that the plane waves are unpolarized.
5. We assume that the collection optics has a numerical aperture of 0.8.
6. We assume that the magnification factor is 4.

8.1.1.2.1 Simulation
For the FDTD simulations, we consider a complex shape as shown in the screenshot below. The specimen is a
rectangle of glass of index n=1.5 and dimension 4mmx4mmx0.25mm. The specimen is etched with half toroid hole,
inside of which is an ellipsoid of glass of index n=1.4 and axes 1mm, 1mm and 0.25mm in the x, y and z directions
respectively.

2003 - 2016 Lumerical Solutions, Inc


1702 Lumerical Knowledge Base

The light source is a plane wave of polar angle 30 degrees and wavelength 500 nm.

The fsp file phase_contrast1.fsp contains the template of the structure and source. The script file
phase_contrast_batch_run.lsf will run simulations for 4 azimuthal angles. For each angle, it will calculate 2
orthogonal polarization states for a total of 8 simulations. It will then repeat the simulations without the structure in
order to calculate the precise phases of the surround (S) beam. Each simulation will be saved as an fsp file with a
different name for later analysis.

The simulations with the specimen will re-use the mesh from the first simulation, thereby saving computation time.

8.1.1.2.2 Analysis
After running the script file phase_contrast_batch_run.lsf, the script file
phase_constrast_analysis.lsf can be used to calculate the fields at the image plane. This script will do the
following analysis:

1. The near field image is decomposed into grating order (gratingpolar 1668 command). This is similar to the near
to far field projection, but in a periodic situation, which calculates the angular distribution of the fields. The end
result is is Er(ux ,uy ), Eq(ux ,uy ) and Ef(ux ,uy ) where r, q, f refer to a spherical coordinate system and ux and uy
are the direction cosines that describe the angle of the light. The in-plane wave vectors for each plane wave are
given by k x = k * ux and k y = k * uy , where k = 2*pi/l. Now that we have E(kx,ky) we can do Fourier optics!

2. We assumed periodic boundaries for this example (or Bloch boundaries). This is not strictly necessary (please
see the Imaging 1697 section for an example with a finite sized beam). However, since we used a plane wave
source with Bloch boundaries, we know that light can only diffract at specific angles given by the Bragg
condition. We use the internal function gratingpolar to calculate the strength of each order in spherical
coordinates.

3. The magnification factor is applied. A lens system that provides magnification is only modifying the angle of the
light. So it is as simple as multiplying the direction cosines, ux and uy by a desired factor. Normally, this would
lead to a lot of complications because of the vectorial nature of the E field. However, the beauty of working in
spherical coordinates (Er, Eq, Ef) is that the vectorial components do not changes when ux and uy are modified

2003 - 2016 Lumerical Solutions, Inc


Applications 1703

because they are a local coordinate system that is tied to the value of ux and uy .

4. We can also apply a numerical aperture which clips any light that has too steep an angle, (ie would not be
collected by the lens system). This means that all beams with ux 2 + uy 2 > NA2 are clipped.

5. We return to Cartesian coordinates because this is what we want at the image plane. This is a straightforward
coordinate change.

6. We calculate the inverse of the original far field projection. This is easier with plane waves than the original
calculation because we only need to sum all the plane waves multiplied by the correct phase factor:

ik x x + ik y y + ik z z
E _ image = E (k x , k x )e
,

The focal plane is where z = 0, so we simply have a Fourier transform to calculate. This is achieved with the
chirped z-transform (czt), which is just a more convenient form of fft.

7. The bright field images E2_image and E2_ref_image are calculated by incoherently summing the contribution
from each azimuthal angle and polarization.

8. The phase contrast image E2_pc_image can be calculated by coherently summing the scattered and reference
beams, with some desired phase offset. The script calculates the image for 5 different phase ofsets. The
contribution from each azimuthal angle and polarization are then added incoherently.

8.1.1.2.3 Results
The script phase_constrast_analysis.lsf will generate the following figures.

The Near field (object field) at one polar angle, azimuthal angle and polarization.

|E|2 angle(Ex)

Image plane of the phase contrast microscope for various phase delays of the S beam. We see that a significantly
better image resolution can be achieved with the phase contrast microscope for the appropriate phase delay of the S
beam.

2003 - 2016 Lumerical Solutions, Inc


1704 Lumerical Knowledge Base

|E|2 |E|2

|E|2 |E|2

|E|2

For comparison purposes, the script also calculates an image of the specimen as produced by a bright field
microscope. It is clear that the bright field image does not resolve the structure as well as the phase contrast
microscope.

2003 - 2016 Lumerical Solutions, Inc


Applications 1705

|E|2

8.1.1.3 Fresnel Lens

Introduction
In this example, we study a spherical Fresnel lens. The lens has a radius of curvature of 100cm and a diameter of
4.8cm. Due to the large size of this structure, we must use a 2D approximation of the structure. The focal point of
the lens can be studied with FDTD Solutions far field projection functions.

Solvers 101

FDTD
In this topic
Introduction 1705
Lens design 1705
Results 1706
Associated files
fresnel1.fsp
fresnel1.lsf

See also
Microscopy 1696

Lens design and setup


We'll consider a Fresnel lens based on a simple spherical design. We assume the radius of curvature of the lens is
100cm and a lens diameter of 4.8cm. The lens is made of a material of index 1.5 and is in air. Ideally, the lens would
have a shape defined by
y = R2 - x2
In our simple Fresnel design, we assume that we can create a discontinuity in the surface of the lens when y
changes by more than l0/(n2-n1). Since we operate at a wavelength of 500nm, n2=1.5 and n1=1, we can create a
discontinuity in y when y changes by more than 1 micron.

This can be accomplished in several ways. One method is to create a surface object and define the lens by the
following formula
x 2

y = mod R 1 - 1 - 2 ,1micron
R
We can choose the units of our surface object equation to be in microns. Therefore the correct formula to use in the
custom "equation" field is
mod(1e5*(1-sqrt(1-(u*1e-5)^2)),1)
This object is difficult to visualize in the layout editor because it is on 1 micron in height, and 5 cm wide. However,

2003 - 2016 Lumerical Solutions, Inc


1706 Lumerical Knowledge Base

we will verify using an index monitor that it is correct.

Results
The structure is defined in the fsp file fresnel1.fsp. After running the file, the script file fresnel1.lsf can be
run and will produce the following results.

The index monitor image showing the shape of the Fresnel lens is shown below. Please note that for better viewing
we have resized the figure window and zoomed in.

The electric field intensity. Note the sharp lines due to discontinuities in the lens

The phase of the electric field, in degrees. When we look near a region with a discontinuity in the lens we see an
additional feature in the phase, as shown below.

2003 - 2016 Lumerical Solutions, Inc


Applications 1707

The script then does a near to far field projection to calculate the focal length. We do this projection in air, which will
take into account the reflection and refraction that occurs at a flat glass-air interface at the back of the lens. We
predict that the the focal length should be approximately R/(n2-n1) = 200 mm.

The projection does a low resolution calculation over a range of values of x and y to create the following figure.
Please note that the calculation takes several minutes because there are such a large amount of near field data. We
see that the focal plane is indeed at approximately -200mm, as predicted. We confirm this by plotting the E field
intensity (|E|2) along the x = 0 line. This shows the following result and the peak intensity is at -200mm.

We then perform a high resolution projection at y=-200mm in order to plot the field at the focal plane. We see a
highly focussed spot and we can zoom into the center to see that the spotsize is approximately 20 microns.

The results presented above are for TM polarization. The polarization dependence could be studied by repeating the
simulation with TE polarization.

While this 2D example will not reproduce exactly the results expected for a 3D Fresnel lens, it can help identify the
origins of different features in a real lens, and suggest possible design improvements for a 3D lens.

8.1.1.4 Lithography
The demand for smaller, faster and lower power semiconductor devices continues to drive improvements in optical
lithography. Currently very high numerical aperture (NA) exposure tools combined with resolution enhancement
techniques (RET) are used to produce state of the art devices with critical dimensions (CD) less than 100 nm. For
example, at the 45 nm node, some of the features to be imaged are less than a quarter of the wavelength of the 193
nm light source used, requiring the use of alternating phase shift masks (APSM). The associated pitches are sub-
wavelength (~130 nm), which leads to severe proximity effects requiring optical proximity correction (OPC). These
effects need to be understood using lithography simulation so that they may be taken into account during reticle
design in order to achieve a predictable and reliable process. Lithography simulation can assist with improving device
yields and reducing the number of reticle iterations, allowing a fabrication house to ramp products faster and save

2003 - 2016 Lumerical Solutions, Inc


1708 Lumerical Knowledge Base

substantially in production costs.

As optical lithography techniques have continued to improve, so too have lithography simulation techniques. FDTD
Solutions uses the finite difference time domain technique to rigorously solve for the object fields at the mask. All
diffraction, refraction, interference, absorption and polarization effects are calculated in the near field of the mask
without approximation. FDTD Solutions also incorporates an automatic graded meshing, which greatly reduces
memory requirements and time per simulation. By post-processing the FDTD simulation data, the aerial image at
the wafer may be calculated.

Solvers 101

FDTD
See also
Microscopy 1696

Imaging 1697

Magnification and Coherence


In DUV lithography, the light source typically has a wavelength of 248 nm (KrF laser) or 193 nm (ArF excimer laser).
At these wavelengths, the photomask pattern is normally etched into a chrome layer on a glass substrate. The
numerical aperture of the imaging optics (NAo) can range from 0.5 to greater than 1 for immersion lithography
techniques. A demagnification factor M = 4 or 5 is used, such that the aerial image is is reduced by a factor of M
relative to the pattern on the photomask.

The numerical aperture of the illumination (NAi) optics can be used to adjust the degree of coherence of the
illuminating beam. The degree of partial coherence s is given by s = NAi/(M*NAo). Partial coherence values ranging
from 0.3 to 0.7 are commonly used to optimize a particular lithographic process.

Resolutions and Depth of Focus


Two figures of merit are often discussed for such a projection lithography system: the resolution and the depth of
focus. The resolution, W, is the minimum printable feature size and is determined by W=k1*/NA. The depth of
focus, DOF, is the range over which the image is adequately sharp, and is given by DOF=k2* /NA. The two
constants k1 and k2 are characteristics of the given lithography process, both ranging from 0.4 to 1.0.

One can see that these figures of merit can lead to different strategies for printing progressively smaller and smaller
features. However, it is clear that printing subwavelength features on a wafer requires wavelength (and possibly sub-
wavelength) scale features on the photomask. And as mask features get smaller, approximate techniques for
simulating the lithographic process breakdown. Thus, accurate prediction of the aerial image on the wafer requires
rigorous simulation of the interaction of the source light with the photomask. Such rigorous simulation is possible
using FDTD Solutions.

Rigorous solution of light propagating through the photomask


FDTD Solutions allows for the rigorous simulation of the illumination light interaction with the mask, from which the
aerial image on the wafer can be calculated. We will consider a few illustrative examples that show some of the
issues of projection lithography such as the resolution limits, corner rounding and line shortening. We will then
briefly discus two reticle enhancement techniques (RET) that improve resolution and reduce corner rounding and
line-shortening. These are alternating phase shift masks and optical proximity correction using assist features.

Source and Illumination Optics

2003 - 2016 Lumerical Solutions, Inc


Applications 1709

To use FDTD Solutions to rigorously calculate the aerial image printed on the wafer, we assume Kohler illumination
for the source and illumination optics. With Kohler illumination, points on an extended source are assumed to
radiate incoherently. The optics are arranged so that any point on the extended source arrives at the photomask as
a plane wave, each with slightly different angle of incidence. Thus, for a circular illumination pupil, one simulation
must be performed for each orthogonal polarization state, and the results are added in intensity. Other more
complex illumination schemes (e.g. annular) may also be treated rigorously by performing a larger set of
simulations.

This section contains the following examples


Binary Mask Cross 1709
Alternating Phase Shift Mask 1712

SPR Nanolithography 1713


Projection to photoresist 1715

8.1.1.4.1 Binary Mask Cross

Introduction
This page shows how to use FDTD to accurately predict the aerial images produced by masks used in DUV
lithography.

Solvers 101

FDTD
Associated files
litho_cross.fsp
plot_incoherent.lsf

See also
Microscopy 1696

Imaging 1697

A binary mask consists of a transparent plate covered with a patterned film of opaque material. The transmission
characteristic is "binary" in the sense that the field transmitted is approximately "1" in the transparent region and "0"
in the opaque region. This is an approximate description known as the scalar, thin-mask model. FDTD Solutions
allows for the exact calculation of the transmitted field, and we can determine to what extent the scalar, thin-mask
approximation is valid by examining the transmitted field intensity across the mask. DUV lithography masks are
typically constructed from fused quartz for the transparent plate (or "blank") and a thin chrome layer for the opaque
material.

Lithography Simulation Setup


We first consider the simulation of a chrome binary mask that contains a periodic array of cross shapes with CD =
2. Load the simulation project file litho_cross.fsp to review the setup of a chrome binary mask in the Layout
Editor as above.

2003 - 2016 Lumerical Solutions, Inc


1710 Lumerical Knowledge Base

A plane wave source at a wavelength of =193 nm is incident on the mask at normal incidence. The chrome mask
layer is 100 nm thick, on top of a fused quartz layer with n = 1.55. The material properties for chrome are defined in
the material database (n=0.85; k=1.63 at =193 nm). The mask is periodic in x and y, with period 10. The FDTD
simulation region has periodic boundary conditions in x and y, and absorbing boundaries/PML in z. A graded mesh
is used with conformal variant 1 to very accurately resolve the extent of the chrome mask. A profile monitor is used
to record the field transmitted through the mask as this is the object field to be imaged onto the wafer. The sweep
module contains sweep settings so that both polarizations can be performed concurrently.

Note to advanced users


For this particular mask and its symmetric pattern, the memory requirements can be further reduced by a factor of 4
by using the appropriate symmetric boundary conditions in conjunction with periodic boundary conditions. Keep in
mind that the symmetry settings must be changed between source polarizations.

Results
Load the script file plot_incoherent.lsf and change the variable 'sn' to the appropriate sweep name. Set the
magnification M=1 and run the script file to run the sweep and plot the results.

Object field intensity


After running the simulation we can look at the object field intensity at the mask. The rigorously calculated object
field is shown here for x polarized incident illumination. Note that there is significant variation across the cross-
shaped opening in the chrome mask layer. This is due to two common issues in DUV lithography, the feature sizes
on the mask are on the order of the illumination wavelength and the thickness of the chrome layer itself (~100nm) is
no longer "thin" relative to the wavelength. A scalar, thin-mask model may not accurately describe many of the types
of masks used in DUV lithography.

x-polarization

Calculate the aerial image intensity for M=1, =0, NA= 0.85
Using the complementary simulation for the plane wave polarized in the y direction, the aerial image is calculated
just above the wafer in air using a simple Fourier optics model of the lithography projection system. The script file
performs the necessary analysis to calculate the aerial image for illumination with partial coherence =0 (coherent)
and imaging optics with numerical aperture NAo= 0.85 and demagnification M=1. The resulting aerial image is
plotted in the figure below.

One can see that even when imaging photomasks with no reduction (at M=1) when the CD is at 2, there is

2003 - 2016 Lumerical Solutions, Inc


Applications 1711

significant corner rounding and some line shortening in the aerial image.

M=1

Aerial image intensity, M=4


Many projection lithography systems use a reduction factor of 4 times from the object to the image. If we re-run the
analysis script with a demagnification factor M=4, then we obtain the following aerial image for incoherent
illumination.

Note that images for M=1 and M=4 are plotted on the same scale. While we can see the 4x reduction in the aerial
image (i.e. four bright spots in each field in both the x and y directions), it does not faithfully reproduce the mask
object; due to diffraction, the line shortening and corner rounding are extreme and the spots in the aerial image are
round rather than cross-shaped. In addition, interference and proximity effects lead to non-zero intensity between the
bright intensity spots. Clearly the cross-shape with CD = 2 (on mask) is beyond the resolution limit of a binary
mask in this type of 4X reduction project lithography system. This is because with 4X reduction, the CD feature size
at the wafer is only /2.

M=4

2003 - 2016 Lumerical Solutions, Inc


1712 Lumerical Knowledge Base

In the next section we will consider a different type of mask that can produce these small feature sizes.

8.1.1.4.2 Alternating Phase Shift Mask

Introduction
This page shows how to use FDTD to image sub-wavelength features that may be created using an APSM mask.

Solvers 101

FDTD
Associated files
litho_4sq.fsp
plot_incoherent.lsf

See also
Microscopy 1696

Imaging 1697

Reticle Enhancement Technique: Alternating Phase Shift Mask


The binary masks considered so far consisted of an opaque chromium layer, in which the desired object pattern is
etched, on a transparent fused quartz substrate. Binary masks modulate the intensity of the incident light without
significantly affecting its phase. But as we have seen, these binary masks are limited in the size of patterns that
may be correctly projected as an aerial image.

Another type of mask, the alternating phase shift mask (APSM), controls the phase of the incident light by changing
the thickness of the transparent regions of the mask, as well as modulating the intensity using an etched chrome
layer. Here we consider a simple APSM design that exploits the optical phase to improve the resolution of the
lithographic process.

Layout Editor
We now consider the simulation of a chrome APSM that contains a checkerboard array of squares windows, each
square having an edge CD = 2 and also being separated by the same CD = 2. For alternating squares, a portion of
the underlying quartz substrate has been etched away. The depth of the etch is chosen so that there is a phase
difference between the optical wave propagating through the alternately etched windows. Load the simulation project
file litho_4sq.fsp to review the setup in the Layout Editor as shown above. The phase-shift wells marked with
the symbols are those which introduce the phase shift to the transmitted light.

APSM Object Field: Intensity & Phase


Run the plot_incoherent.lsf script file with the plot_fields value set to 1. We can look at the object field intensity at
the lower surface of the mask. The left image below shows the field intensity transmitted through the APSM mask
for a plane wave at normal incidence with x polarization, clearly illustrating that the field variation across each
individual aperture is significant. The image on the right shows the phase of the field transmitted through the phase
shift mask, and the phase difference between adjacent wells.

2003 - 2016 Lumerical Solutions, Inc


Applications 1713

x-polarization

Aerial Image Intensity, M=5


Next, run the script file with M=5. Using the same Fourier optics model, the aerial image is calculated just above
the wafer in air. The resulting aerial image is plotted below for illumination conditions =0 (coherent), and imaging
conditions NA= 0.85 and demagnification M=5.

M=5

8.1.1.4.3 SPR Nanolithography


This example shows how to create the FDTD Solutions model of the surface plasmon resonant nanolithography
contact mask. A 2D cross-section through the quartz substrate (blue), silver contact mask (grey), photoresist (pink)
and silicon wafer (red) is shown here in the FDTD Solutions layout editor, along with the sources and monitors used
in the simulation.

2003 - 2016 Lumerical Solutions, Inc


1714 Lumerical Knowledge Base

Solvers 101

FDTD
Associated files
lithography_nano_spr.fsp
lithography_nano_spr.lsf

See also
Surface Plasmons 1881

To reproduce the following results, open and run the simulation file. Use the script file to create the following plots.

A plot of the near field intensity in cross-section through the silver mask layer (y = 0 to 60 nm) and the photoresist
layer (y = -50 to 0 nm) is shown on a logarithmic scale. Surface plasmon modes are clearly seen at the silver mask/
photoresist interface. The periodic structure allows the normal incidence beam to couple to counter-propagating
surface plasmon waves, which gives rise to subwavelength variation in the nearfield intensity inside the photoresist
layer.

The nearfield optical intensity in the middle of the photoresist layer, 30 nm below the contact mask, is plotted as a
function of position. The high contrast ratio shown allows for patterns with minimum size about 80 nm to be
transferred to the photoresist. This sub-wavelength result achieved with surface plasmons is well below the diffraction
limit for a 436 nm source and is therefore amenable to nanolithography applications.

2003 - 2016 Lumerical Solutions, Inc


Applications 1715

8.1.1.4.4 Projection to photoresist

Objective
In this example, we will project the fields from the a periodic structure to a distance of 100 microns and then use the
resulting fields to create a new FDTD source to study the electric field intensity in a layer of photoresist on silicon.
This involves 3 steps:

1. FDTD simulation 1 where we simulate the periodic structure


2. Field projection stage where we propagate the fields 100 microns and create an fld file
3. FDTD simulation 2 where we create a source from the fld file and simulate the light as it enters the photoresist
layer.

Solvers 101

FDTD
In this topic
Step 1: FDTD Simulation 1 1715
Step 2: Propagate the fields and create new
source 1716
Step 3: FDTD Simulation 2 1716
Results 1717
Associated files
propagate_periodic1.fsp
propagate_periodic2.fsp
propagate_periodic.lsf
usr_create_fld_EandH.lsf
See also
Solvers - Far field projections from periodic
structures 152

Step 1: FDTD simulation 1


The example file propagate_periodic1.fsp shows a thin film of gold on glass which has a circular etch hole in

2003 - 2016 Lumerical Solutions, Inc


1716 Lumerical Knowledge Base

it. The simulation volume represents one unit cell of a periodic structure which has a period of 1.5 microns in both
the x and y directions. The source covers a wavelength range of 0.4 to 0.6 microns, and is polarized with the E field
along the x-axis. We take advantage of the symmetry of the structure to reduce the simulation volume to 1/4 of the
unit cell. This is the same structure as shown in the previous section, but now we simulate only a small z-span of
the structure because we can propagate the light using the plane wave decomposition method. In addition, we have
a mesh override region to force a 10nm mesh around the hole for more accurate results. Please note that this
simulation file can record the fields at many different wavelengths from 0.4 to 0.6 microns. In this case, we have
recorded information at 3 wavelengths. Please run this fsp file.

Step 2: Propagate the fields and create new source


Once the simulation is complete, we can run the script file propagate_periodic.lsf is used to project the field
to a distance of 100 microns from the periodic structure surface. To do this, we set the variable z_project to 99.83
microns because the monitor recording the fields is 70nm above the surface of the structure, and the source we
eventually use will be 100nm below the surface of the photoresist.

Please note that the projection can only be done for one wavelength at a time. The desired wavelength is set in the
variable lambda_target and the closest recorded wavelength point will be used. The field intensity pattern can look
very different at different wavelengths. After projecting the fields, a new fld file will be created that can be used to
import the source into the second FDTD simulation. The default name for this file is
source_after_propagation.fld.Please note that the script file usr_create_fld_EandH.lsf must be
saved into your current working directory for this to work.

The fields 100nm below the surface of the photoresist are shown below:

Step 3: FDTD simulation 2


Open the simulation file propagate_periodic2.fsp. This file contains a simple 1 micron thick layer of
photoresist on Silicon. For simplicity, we use an index of 1.7 for the photoresist and assume that it has no loss. Of
course, more realistic material models can easily be created. This simulation file also uses a mesh override region
to force dz of 10nm in the resist. This is useful to obtain a higher resolution on the field distribution in the resist.

Edit the source in this simulation region, and press the "Import Source" button. Browse to the fld file that was saved
in the previous step and import the source. You can verify that the source field matches what was created in the
previous step by pressing the "Plot current field button".

2003 - 2016 Lumerical Solutions, Inc


Applications 1717

Run this simulation. It contains a monitor called volume_monitor that records the 3D field intensity inside the
photoresist. Please note that this simulation should only be run for one wavelength at a time because the source
profile is very wavelength dependent.

Results
Using the Visualizer, you can easily image different cross sections of the monitor called volume_monitor. For
example, a cross section of |E|2 in the x-z plane at y=0 is shown below.

Similarly, a cross section of |E|2 in the x-y plane at z=0.5 microns depth is shown below.

2003 - 2016 Lumerical Solutions, Inc


1718 Lumerical Knowledge Base

8.1.1.5 Binary phase grating mask for MOEMS processing

Introduction
In this example, we study a binary phase grating mask suitable for MOEMS (Micro-Opto-Electro-Mechanical
Systems) processing, or any lithographic process where an analog intensity profile is required on the wafer. This
example is based on the paper by Sung et al., "Refractive micro-optics fabrication with a 1-D binary phase grating
mask applicable to MOEMS processing".

The concept for this mask is to use a periodic pattern where the period has been chosen to be sufficiently small that
only the 0th order is captured in the imaging system. Instead of controlling the intensity at the object plane, we
simply have to control the transmission to the 0th order. This gives a great deal more flexibility since the 0th order
transmission can be modified between about 0% and 100% by changing the duty cycle of the grating. By modifying
the duty cycle in a continuous manner across the surface of the mask, we can therefore create an analog variation in
the transmission to the 0th order. Since the 0th order is the only order that will be imaged, we can create an analog
intensity pattern at the image plane, on the wafer.

By modifying the duty cycle across the grating, we break the periodicity of the grating. However, if the modification of
the period is sufficiently slow, the grating remains locally periodic. The validity of this approximation can be tested by
performing full 2D and 3D FDTD simulations to compare the image at the wafer.

Solvers 101

FDTD
In this topic
Introduction 1718
Mask design 1719
Verification of the design 1720

Associated files
binary_phase_mask_duty_cycle_sweep.fsp
binary_phase_mask_design.lsf
binary_phase_mask_design_verification_2D.f
sp
construct_2d_verification_mask.lsf
binary_phase_mask_design_verification_3D.f
sp
construct_3d_verification_mask.lsf
See also
Microscopy 1696

Related publications
Sung J, Hockel H, Brown J, Johnson EG,
"Refractive micro-optics fabrication with a 1-D

2003 - 2016 Lumerical Solutions, Inc


Applications 1719

binary phase grating mask applicable to


MOEMS processing", J. Micro/Nanolith.
MEMS MOEMS. 0001;4(4):041603-041603-7
http://nanolithography.spiedigitallibrary.org/
article.aspx?articleid=1097835.

Mask design
The file binary_phase_mask_duty_cycle_sweep.fsp contains a grating structure design for a 436nm stepper
with 420nm thick PMMA (n=1.52) on sapphire. The structure is parameterized in an analysis group called "structure"
which makes it easy to change the period and duty cycle. For this design, the period is set to be 3 microns which is
below the cutoff period of the stepper, meaning that only the 0th diffracted order will be imaged.

There is an analysis group called "0th" order which calculates the 0th order efficiency and, more importantly, the
normalized transmission to the 0th order. This is important because the total transmission of the grating can change
for different duty cycles so the normalized transmission to the 0th order measures the actual power in the 0th order
for different duty cycles.

There is parameter sweep object called "polarization". It contains a child parameter sweep element called
"duty_cycle". This object will sweep both duty cycle and polarization to calculate the normalized transmission to the
0th order and the 0th order efficiency as a function of both duty cycle and polarization. The polarization is either 0
degrees or 90 degrees which allows us to calculate all results for unpolarized light.

After running the sweep, the transmission to the 0th order, T0, can be visualized by right clicking on the parameter
sweep object. To see both polarizations on the same curve, as well as the unpolarized results, the following lines of
script can be pasted into the script prompt.
T0 = getsweepresult("polarization","T0");
T0_0 = pinch(T0.T0,2,1);
T0_90 = pinch(T0.T0,2,2);
T0_unpolarized = (T0_0+T0_90)/2;
plot(T0.duty_cycle,T0_0,T0_90,T0_unpolarized,"duty cycle","T0");
legend("polarization 0","polarization 90","unpolarized");
which will create the following figure of the normalized transmission to the 0th order (rather than the 0th order
efficiency). This figure is very similar to the figure 4 of Sung et al. but there are some differences because it is based
on a fully vectorial calculation. In particular, it shows some polarization dependent effects. Overall, these effects are
quite small but could be expected to be much more significant if a metal mask were used.

To compare with the publication, we want to design a mask with a target intensity pattern that is similar to the
pattern shown in figure 5. For this, we set the target intensity to be I(x) = x^2/L^2, where L=45 microns. To create
the mask, we sample x every period (3 microns). To achieve the target intensity, we can use a duty cycle that is
either larger or smaller than 0.5, and here we choose to use a duty cycle smaller than 0.5. For each value of the
target intensity, we need to look up the duty cycle that yields that target intensity. The script file
binary_phase_mask_design.lsf will do this. It first loads the fsp file

2003 - 2016 Lumerical Solutions, Inc


1720 Lumerical Knowledge Base

binary_phase_mask_duty_cycle_sweep.fsp to extract the unpolarized 0th order transmission as a function


of duty cycle. It then calculates the duty cycle as a function of x (sampled at every period) required to meet the
target intensity pattern. It saves this result to a matlab file target_profile.mat.

Verification of the design


We can first verify the design in 2D. The fsp file binary_phase_mask_design_verification_2D.fsp
contains the target design. If changes are desired, the script file construct_2d_verification_mask.lsf will
load the target profile from target_profile.mat and recreate the design. If we run the simulation (which takes a
few seconds) we can look at the far field projection of the monitor analysis::field. We can clearly see the diffracted
orders, and this would help ensure that we have correctly chosen the period to prevent capturing of anything but the
0th order in the imaging system.

The parameter sweep object called "polarization" will sweep both polarizations and calculate the unpolarized image
intensity. After running it, we can visualize the result in the visualizer. This is using a magnification factor of 4, an NA
of 0.4, and a defocus (specified in global coordinates) of 0.5 microns. It is important to note that the NA is applied
after magnification because it comes from the pupil aperture inside the stepper. To compare with the target intensity,
we use the following lines of script
E2_image = getsweepresult("polarization","image_intensity_unpolarized");
matlabload("target_profile");
plotxy(E2_image.x*1e6,E2_image.E2/max(E2_image.E2),x_mask*1e6/4,Itarget,"x (microns)","Im
legend("simulated","target");
which creates the following plot

and we can see that our image profile is very close to the target intensity profile.

2003 - 2016 Lumerical Solutions, Inc


Applications 1721

Finally, we can create a design similar to the 3D design shown in the paper. If we open the fsp file called
binary_phase_mask_design_verification_3D.fsp and run the script file
construct_3d_verification_mask.lsf it will construct the figure shown below. This simulation region is
91x91x0.6 microns 3 so we use symmetric and antisymmetric boundaries to reduce the simulation time and
memory. In addition, we use a mesh override to increase the size of dx and dy which is acceptable since the light is
propagating primarily along the z axis. The total memory required for the simulation is then 6GB to mesh and about
3GB to run. It runs in about 15 minutes on a good workstation. Only one simulation is required to fully characterize
the polarization dependence because of the cylindrical symmetry of the structure.

After running the simulation, we can run the analysis script (which can take a few seconds due to the 3D near to far
field calculations required) and visualize the image intensity with the visualizer. The result for a magnification of 4, an
NA of 0.4, and a defocus (specified in global coordinates) of 0.5 microns can be immediately visualized from the
"analysis" analysis group.

2003 - 2016 Lumerical Solutions, Inc


1722 Lumerical Knowledge Base

To construct the unpolarized result, consider polarization effects and compare with the target intensity profile we can
use the following lines of script:
E2_image = getresult("analysis","image_intensity");
x = E2_image.x;
y = E2_image.y;
E2_0 = pinch(E2_image.E2);
E2_0 = E2_0/max(E2_0);
E2_90 = transpose(E2_0);
E2_unpolarized = (E2_0+E2_90)/2;
image(x*1e6,y*1e6,E2_unpolarized,"x (microns)","y (microns)","image intensity");

p0 = find(y,0);
nx = length(x);
plot(x*1e6,E2_unpolarized(1:nx,p0),E2_0(1:nx,p0),E2_90(1:nx,p0),"x (microns)","image inte
legend("unpolarized","0 degrees","90 degrees");

matlabload("target_pprofile");
plotxy(x*1e6,E2_unpolarized(1:nx,p0),x_mask*1e6/4,Itarget,"x (microns)","image intensity
legend("unpolarized","target");
which will create the following 3 figures

We can actually get closer to target by reducing the NA of the stepper. This reduces the amount of light collected at
angles other than 0 degrees which occurs because the structure is not truly periodic. We can repeat the analysis
with a different NA and defocus without having to repeat the FDTD simulation. For example, with an NA of 0.3
instead of 0.4 we find much smoother results that are closer to the target intensity profile.

8.1.2 Particle and Surface Scattering


Simulating particle and surface scattering effects
FDTD Solutions can be used to simulate light scattering in the presence of wavelength scale and sub-wavelength
scale geometries. Since the scattering intensity is usually very weak compared to the illumination, a differential
method is often used. The total field scattered field method (TFSF) is a convenient technique to get the scattered
field, which can remove the mirror reflection.

2003 - 2016 Lumerical Solutions, Inc


Applications 1723

The simulation methodology can be very different depending on whether one is interested in simulating light
scattering from standalone particles, particles on a substrate, or light scattering from a surface with nanoscale
structures:

Standalone particles
For standalone objects such as particles suspended in a fluid, the typically quantity of interest is the absorption/
scattering cross sections. We may also want to look at the near field enhancement around the particles, as well as
the far field angular distribution.

Particles and detects on a surface


For particles and defects on a substrate, we often want to study light scattering into specific regions in the far field,
and calculate results such as the differential scattering cross section and the degree of circular polarization can be
calculated using far field monitors.

Rough surfaces
A surface with nanoscale structure can be characterized a bidirectional scattering distribution function (BSDF). This
function relates the intensity of an incoming ray to an outgoing ray for all angles of incidence and reflection/
transmission.

Features
Construct and parametrized complex 3D geometry using structure groups
Use Lumericals multi-coefficient materials to accurately model highly dispersive materials such as metals.
Obtain accurate broadband results at multiple wavelengths in a single simulation
Use a large variety of illumination conditions, such as unpolarized light, circularly polarized light or a dark
field beam source
Use a total field/scattered field source to calculate the absorption and scattering cross section of a particle.
Calculate the bidirectional scattering distribution function for a rough surface.
Use a fully vectorial far field calculator to determine the amount of light scattered into various regions of the
far field.
Lumericals conformal mesh technology can provide sub-mesh cell modeling accuracy important for
resolving the shape of wavelength and sub-wavelength scale geometry
Built-in parameter sweep and optimization algorithms make it easy to analyze and optimize parameterized
designs

Getting started
Relevant videos (login required):
TFSF source

Download relevant products:


FDTD Solutions

2003 - 2016 Lumerical Solutions, Inc


1724 Lumerical Knowledge Base

Product introductory videos:


FDTD Solutions

Product introductory examples:


(FDTD Solutions) Particle scattering tutorial 1724

More ... 171

Application examples
Solvers 101 Description

FDTD Cross section calculation: PSL and CU sphere scattering 1732

FDTD Determination of feature size correlated to a strong modulated signal: DVD surface 1735

FDTD Study scattering from isolated small particles on a surface: Defect scattering and
detection 1737
FDTD Examine a surface with nanoscale structure: BSDF 1742

FDTD Mie scattering examples: 2D 1751 , 3D 1752

8.1.2.1 Getting Started


Problem definition
For light incident on metallic nanoparticles, resonant interactions with the electronic charge density near the surface,
called surface plasmon polaritons, play an important role. Here we determine, for a silver nanowire with diameter 50
nm, the surface plasmon polariton resonance and calculate the scattering, extinction and absorption cross sections
as a function of wavelength near this resonance.

Solvers 101

FDTD
Associated files
nanowire.fsp
plotcs.lsf
nanowire_theory.csv

In this topic
Simulation set up 1730
Results 1731
Modeling instructions 1725

See also
Online Help -> Surface Plasmons 1881

Problem definition: More details


The scattering cross-section is defined as
Pscat( w )
sscat( w ) =
Isource( w ) ,
where Pscat is the total scattered power [W] and Iinc is the incident intensity [W/m2]. In 2D, power is described per
unit length [W/m], and thus the scattering cross-section has dimensions of length. The total scattered power can be

2003 - 2016 Lumerical Solutions, Inc


Applications 1725

calculated by summing the power flowing outward through the four power monitors located in the scattered field
region of the Simulation Area.

The absorption cross-section is similarly defined as


Pabs( w )
sabs( w ) =
Iinc( w ) ,
where Pabs is the total power absorbed by the particle. The power absorbed by the particle can be calculated by
calculating the net power flowing inward through the four monitors located in the total field region of the Simulation
Area.

The extinction cross-section is the sum of the absorption and scattering cross-sections
sext ( w ) = sabs( w ) + sscat( w ) .

8.1.2.1.1 Modeling instructions


This page contains 2 independent sections. The simulation can be set up from a new 2D simulation, beginning at the
Set up Model section. Otherwise the associated files (which you can find at the locations given on the first page of
the tutorial) can be used to start at the second section.

In this topic
Set up model 1725
Run simulation, plot cross sections 1727

Compare with theoretical results 1729


Plot near field data 1729

Set up model
Open a blank simulation file. For instructions see the FDTD Solutions GUI page 314 in the Introduction to the
Getting Started Examples.

Press the arrow on the STRUCTURES button and select a CIRCLE from the pull-down menu. Set the
properties of the circle according to the following table.
tab property value
name nanowire
Geometry x (nm) 0
y (nm) 0
z (nm) 0
radius (nm) 25
Material material Ag (Silver) - Palik (0-2um)

Press the SIMULATION button to add a simulation region. Note that if your button does not look like
the button to the left, you will need to press on the arrow to get the simulation region. Set the properties according
to the following table.
tab property value
General simulation time (fs) 200
dimension 2D
Geometry x (nm) 0
y (nm) 0

2003 - 2016 Lumerical Solutions, Inc


1726 Lumerical Knowledge Base

z (nm) 0
x span (nm) 800
y span (nm) 800
Mesh Settings mesh accuracy 4
mesh refinement conformal variant 1

Note that since we are using a 2D simulation region, properties such as "z span" are irrelevant. The setting for
these properties will be omitted for the remainder of the modeling instructions, and the default values (at z = 0) can
be used.

Press the arrow on the SIMULATION button and select the MESH region from the pull-down
menu. Set the properties according to the following table.
tab property value
General dx (nm) 1
dy (nm) 1
Geometry x (nm) 0
y (nm) 0
x span (nm) 110
y span (nm) 110

Press the arrow on the SOURCES button and select the Total-field scatter-field (TFSF) source from the
pull-down menu. Set the properties according to the following table:
tab property value
General polarization angle 0
Geometry x (nm) 0
y (nm) 0
x span (nm) 100
y span (nm) 100
Frequency/Wavelength Wavelength start (nm) 300
Wavelength stop (nm) 400

Press the arrow on the ANALYSIS button and select OPTICAL POWER from the pull-down menu. This
will open the object library window.
Insert a CROSS SECTION analysis group and set the properties of this group according to the following table.
tab property value
name scat
Setup Variables x (nm) 0
y (nm) 0
x span (nm) 110

2003 - 2016 Lumerical Solutions, Inc


Applications 1727

y span (nm) 110


z span (nm) 110*
* The Z span value is not important, since this is a 2D simulation in the XY plane.

Make a copy of "scat" with the COPY button and set the properties of this group according to the following
table.
tab property value
name total
Setup Variables x (nm) 0
y (nm) 0
x span (nm) 90
y span (nm) 90

Press the arrow on the MONITORS button and select GLOBAL PROPERTIES from the pull-down
menu. Set the FREQUENCY POINTS to 100.
Press the arrow on the MONITORS button and select the FIELD TIME monitor from the pull-down menu. Set the
monitor properties according to the following table.
tab property value
name time
Geometry x (nm) 28
y (nm) 26

Run simulation, plot cross sections.

Press on the CHECK button to open the MATERIAL EXPLORER. To obtain a plot of the refractive index
as a function of wavelength, press the FIT AND PLOT button.
Press the arrow next to the CHECK button and select the "Check simulation and memory requirements" button

to view the simulation and memory report.

Next, check if the mesh is fine enough using the VIEW SIMULATION MESH button and ZOOM button in the
toolbars. For more information about how to use these tools, see the Layout editor section of the reference guide
197 .

Press the Resources button and check the number of processes (number of cores) for the local
machine. Then, press the "Run Tests" button to make sure the simulation engine is configured correctly. The
first time you run this test, it may fail and ask you to register your username and password for your operating
system account. If it does, fill in the appropriate text fields, press "Register", then "OK", and re-run the tests.

Run the simulation by pressing the RUN button .


Once the simulation finishes running, all the monitors and analysis groups in the object tree will be populated with
data. The Results View 213 window will show all the results and their corresponding dimensions/values for the
selected object. Plot the time domain data by right-clicking on the time monitor and selecting Visualize -> E.

2003 - 2016 Lumerical Solutions, Inc


1728 Lumerical Knowledge Base

You can then select which components of the E field data you want to plot in the Visualizer. The screenshot
below shows how to plot the real part of the x component of the electric field.

To plot the cross section results, right-click on the "scat" and "total" analysis groups, and select "Run analysis".
This will run the analysis scripts in the analysis groups to calculate the cross section results.
Right-click again on the "scat analysis group", and you will see an option to Visualize->sigma, which will plot the
scattering cross section as a function of frequency in the Visualizer. To plot the result as a function of wavelength,
simply change the "Parameter" option (near the bottom of the Visualizer) from "f" to "wavelength". You can also
change the "Units" to nanometers on the right side of the Parameters section.
Without closing the Visualizer, go back to the object tree and right-click on the "total' analysis group, and select
add to visualize1->sigma, which will plot the 2 cross section results in the same Visualizer.
Note that the absorption cross section is actually the negative of the result returned by "total", since we want the
power flowing into the box, rather than out of the box. You can add a negative sign to the result in the Visualizer
under "Scalar operation".

2003 - 2016 Lumerical Solutions, Inc


Applications 1729

Compare with theoretical results


Even though we can plot everything we need with the Visualizer, comparisons with theoretical calculations will
have to done through the scripting environment.
Open the script file editor (for instructions on how to do this see the Introduction section of Script 1385 .
Get the "plotcs.lsf" script file from the first page of this application example.

Then use the OPEN SCRIPT button to browse to and open the "plotcs.lsf" script file.

Run the script file using the RUN SCRIPT button which is found on the Script File Editor window This will
create the two plots of the cross sections seen in the discussion and results section.

Plot near field data

Switch the simulation back into layout mode the SWITCH button .
Edit the mesh. Set dx = dy = 0.5nm.
Press on the arrow on the MONITORS button and select a FREQUENCY DOMAIN FIELD PROFILE monitor from
the pull down menu. Set the properties according to the following table.
tab property value
name profile
General override global monitor settings check
use source limits uncheck
frequency points 1
wavelength center (nm) 345
Geometry monitor type 2D Z-normal
x (nm) 0

2003 - 2016 Lumerical Solutions, Inc


1730 Lumerical Knowledge Base

y (nm) 0
x span (nm) 90
y span (nm) 90

Run the simulation again by pressing on the RUN button


Once the simulation has run to completion, plot the profile monitor data with the Visualizer (right-click -> Visualize
-> E). You can plot the image in a new widow by clicking the "Plot in new window" button.
Go to the SETTINGS menu in the new figure and set the colorbar limits. To obtain the exact same plot as in the
discussion and results section, set the colorbar min was to 0, and the colorbar max to 5.

8.1.2.1.2 Discussion and results

Simulation set up
Once the simulation has been set up, it will look as in the screen shot below. The nanowire is the circle in the center
of the simulation region. There are two yellow boxes of monitors which surround the nanowire. In between the two
monitor boxes is a third box drawn with of grey lines. This box shows the Total-field scattered-field (TFSF) source.

TFSF sources are type of plane wave source, mostly used to particle scattering. The pink arrow shows the direction
of propagation (k vector), and the blue arrow shows the polarization (E field vector). In the region inside the grey box,
the total fields (incident plane wave field + any fields scattered by particle) are calculated. At the boundary of the
source, the incident plane wave fields are substracted, leaving only fields scattered by the particle inside the source.
You can find more information about TFSF sources in the Sources section of the online user guide.

Because we use the TFSF source, the power scattered by the nanowire can be computed by measuring the power
flow through a box of monitors located outside of the source (ie. in the scattered field region). The power absorbed by
the nanowire is equal to the power flowing into the box of monitors in the total field region.

In the graphical user interface (CAD), orange lines show the FDTD mesh if desired. There are two different regions: A
graded mesh region (automatic mesh) and a mesh override region. When using automatic meshing, the mesh size
is based on the refractive index. A higher index material will have a smaller step size, inversely proportional to the
index. When a material has a complex index, both the real and imaginary parts are considered by the automatic
mesh algorithm. However, accurate modeling of small geometric features, particularly when there is a high index
contrast between materials combined with curved or angled interfaces, sometimes requires a finer mesh than is
created by the automatic mesh algorithm. In these cases, a mesh override region can be used, as in this example,
to manually define a finer mesh where it is needed.

The above screen shot does not show the full simulation region. Although we are not interested in obtaining any data
outside of the largest yellow monitor box shown above, the simulation span is set to be much larger. We set the
simulation to be larger because the boundaries are PML. PML absorbs incident radiation, but can also absorb

2003 - 2016 Lumerical Solutions, Inc


Applications 1731

energy from evanescent fields. Hence, the PML should be placed far enough away from the structure so that it does
not interact with evanescent fields. In this case, the PML is about a full wavelength from the structure.

The Ag (Silver) material used for the nanowire is defined with experimental data, rather than an analytic model. A
material model is automatically calculated based on the experimental refractive index data over the source
bandwidth. We can check the material fit (see image below) in the Material Explorer before running the simulation.
The material fit, named FDTD model in the legend, can be adjusted by changing the Max coefficients and Tolerance
parameters in the Material Explorer.

We can see from the above plot that the material data has an index that is on the same order of magnitude as the
background index of 1. Also, we are able to simulate this problem at a small mesh size of 1nm or less. For this
reason, we can change the mesh refinement option to "conformal variant 1" to take full advantage of the conformal
meshing feature, even for a metal like silver. Note that "conformal variant 1" is a good option here because there is
low index contrast, however "conformal variant 1" is not always a good option for metals (the default conformal mesh
will revert to staircasing for interfaces involving metals and PECs). Please see Mesh refinement and Conformal mesh
443 for more detail.

Note that in the screenshot of the simulation above, there is a yellow cross. This cross gives the location of a time
domain monitor. Time domain monitors are used in FDTD simulations to check that the fields have decayed by the
end of the simulation. If the fields have not properly decayed, the simulation results can be incorrect. By default,
FDTD Solutions has a simulation time of 1000fs and shuts off the simulations early if the field strength has decayed
to a user defined fraction of the peak field strength. Below, you can see a plot of the x component of the E field.
Notice that the simulation shut off early at 32fs.

Results

2003 - 2016 Lumerical Solutions, Inc


1732 Lumerical Knowledge Base

Scattering, absorption and extinction cross-sections can be computed analytically for the nanowire. We have
precalculated the theory for this specific material and saved it in the associated file, nanowire_theory.csv, from
the first page of this getting started example.

Below, the leftmost figure shows the cross-sections obtained with from the FDTD simulation in comparison with the
analytic results. Clearly there is very good agreement. The second figure shows the same results from FDTD, but
analytic results for a radius of 24 and 26 nm. Since the simulation used a 1nm mesh, it is reasonable to expect the
FDTD results to be accurate to within these results. We can see from the figure that this is true.

The above image shows that the maximum extinction occurs near 345nm. We can plot |Ey|^2 as shown in the image
below calculated with a 0.5nm mesh.

8.1.2.2 PSL and Cu Sphere Scattering


We calculate the Differential scattering cross section, Degree of circular polarization and Principal angle of
polarization for light scattered from PSL and Copper spheres on a Si substrate. Results are compared to those
published by Kim et al.

2003 - 2016 Lumerical Solutions, Inc


Applications 1733

Solvers 101

FDTD
In this topic
Simulation setup 1733

Analysis 1733
Results 1734
Associated files
PSL_Cu_scattering.fsp
PSL_Cu_scattering.lsf
PSL_Cu_scattering_helper.lsf

See also
Defect scattering and detection 1737

TFSF sources 546


Related publications
J. H. Kim, S. H. Ehrman, G. W. Mulholland,
and T. A. Germer, "Polarized Light Scattering
by Dielectric and Metallic Spheres on Silicon
Wafers," Appl. Opt. 41, 5405-5412 (2002)
http://www.opticsinfobase.org/abstract.cfm?
URI=ao-41-25-5405

Simulation setup
The simulation technique is similar to that described in the Defect scattering and detection example. The challenge
in this example is the very thin layer SIO2 of 1.5nm. If we use a mesh override of two cells in resolving the thickness,
the simulation time is much longer, but the results are not significantly different from without SiO2 layer. For fast
result, we will ignore this layer.

Analysis
Differential scattering cross section
Kim et al. state "the differential scattering cross section relates the intensity on a single particle to the power
scattered by it per solid angle" In FDTD Solutions, this is easily calculated with the standard far field projection.

Degree of circular polarization Pc


The degree of circular polarization is defined as
I c+ - I c-
Pc =
I c+ + I c-
where Ic+ and Ic- are the intensities of the left and right handed circular polarization components. The far field
projection function farfieldpolar3d returns the linear vector field components Eq and Ef. Before calculating
Pc, we must convert Eq, Ef to Ec+, Ec- with the following relations.
r r r
E = au q + bu J
r r r
E = au c + + b u c -
where
r 1
r r
uc + = 2
(u q + iu J )
r 1
r r
uc - = 2
(u q - iu J )
Solving for a and b , we get
2
a= 2 (a - ib )
2
b= 2 (a + ib )

2003 - 2016 Lumerical Solutions, Inc


1734 Lumerical Knowledge Base

The formulas for alpha and beta allow us to convert the linear polarization component to their equivalent circular
polarization components. In the far field, intensity is proportional to abs(E)^2.

Principal angle of polarization h


Kim et al. measure the polarization angle from S-polarization in a right-handed fashion (counterclockwise, looking
into the beam).

Results
The analysis script will produce the following figures, which can be compared to Figure 7 and 8 from Kim et al. To
reproduce the results from figure 7, open PSL_Cu_scattering.lsf and set the variable fig8 equal to 0. To
reproduce figure 8, set this variable equal to 1.

The agreement is quite good, even though the simulation region is small and uses a coarse mesh. Because the
sphere is metal, we use the mesh refinement option "Conformal Variant 1" to achieve a better approximation of its
shape. The accuracy can further be improved by increasing the X and Y simulation span to 10 um, increasing the
mesh accuracy slider to 3, and by setting the "def" mesh override region to use an effective index of 5, rather than 3.

92, 123 and 155 nm diameter Cu sphere scattering 155nm diameter radius PSL sphere scattering as
at 442 nm wavelength. Figure 7 of Kim et al. a function of wavelength. Figure 8 of Kim et al.

2003 - 2016 Lumerical Solutions, Inc


Applications 1735

For a comparison, we add the 1.5nm SiO2 layer back to the simulation with 2 cells in z direction using override
mesh, for the 155nm PSL sphere with different illumination wavelengths, the results are shown below:

Please note that since the differential scattering cross sections are in logarithm scale, the difference between with
and without the thin SiO2 layer is small. Therefore, for initial test, it is proper to ignore the very thin layer. However,
for final simulations, the thin layer should be included.

8.1.2.3 DVD Surface


In this example, we construct a complete three-dimensional model of the interaction of a focused optical beam and
the structured, gold surface of a typical DVD disc. The goal is to determine the minimum feature size of the gold
post that results in a strong modulated signal, such that maximum information can be stored on the surface of the
DVD.

2003 - 2016 Lumerical Solutions, Inc


1736 Lumerical Knowledge Base

Solvers 101

FDTD
Associated files
dvd.fsp
dvd_width.lsf

See also
Defect Detection 1737

To reproduce the following results, open the simulation file, then run the analysis script.

First, we calculate and plot the near field with and without the metallic bump.

Without the gold post present, the reflected beam looks almost identical to the incident beam. Once the post
moves under the beam, the reflected beam contains a lot of structure. From the near-field profile plotted, we can see
that only the central part of the beam interacts with the gold post strongly.

Next, we look at the far field radiation pattern for the same two simulations.

2003 - 2016 Lumerical Solutions, Inc


Applications 1737

Without the bump, the majority of the reflected power is would be collected with a NA=0.6 objective. With the metal
post present, there is significant scattered field in the y direction, greatly reducing the amount of power that would be
collected by the objective.

To quantify this, we use the "signal" analysis group, which returns the result "signal" calculated from integrating the
far field results over the cone corresponding to the specified numerical aperture.

thetarad = asin(NA);

# far field projection


e2 = farfield3d("reflection",1,200,200,1,1,1,1);
ux = farfieldux("reflection",1,200,200,1);
uy = farfielduy("reflection",1,200,200,1);

# calculate the portion of E field within acceptance angle of the lens NA=0.6
signal=farfield3dintegrate(e2,ux,uy,thetarad*180/pi)/farfield3dintegrate(e2,ux,uy);

Then, we can set up a parameter sweep that varies the dimension of the metallic bump in order to determine when
the minimum signal is returned. We calculate the signal as a function of the post width for a fixed post length (click
on the sweep project and select Visualize -> signal to plot the following result in the Visualizer).

8.1.2.4 Defect Scattering and Detection


In this topic, we describe a simulation technique for studying scattering from isolated small particles on a surface.
The incident beam is a plane wave at a grazing angle of incidence injected from TFSF source.

We will test this technique by calculating the far field scattering intensity profile from a PSL sphere on a Si

2003 - 2016 Lumerical Solutions, Inc


1738 Lumerical Knowledge Base

substrate, as shown in the figure below. Scattering from PSL (PolyStyrene Latex) spheres can be used to calibrate
and test defect detection systems. The simulation results can be compared to those published by S. Stokowski.

Solvers 101

FDTD

In this topic
Simulation technique 1738

Results 1741
Associated files
psl.fsp
psl_analysis.lsf

See also
PSL and Cu sphere scattering 1732

TFSF sources 546


Related publications
S. Stokowski and Vaez-Iravani, "Wafer Inspection
Technology Challenges for ULSI Manufacturing,"
KLA-Tencor.

In the above screenshot, the Si substrate is shown in red and the PSL sphere in cyan. The TFSF source is
represented by a box in light-grey, with its injection plane at the top plane of the box. The pink arrow and the blue
arrows represent the light propagation direction and the polarization, respectively. This type of simulation can be
challenging due to the large difference in the refractive indices of the particle and the substrate.

8.1.2.4.1 Simulation technique

Simulation setup
Physical Structures
A PSL sphere (index 1.6) is located in air above a Si substrate.

Simulation region
We are interested in the far field intensity in this example. The farf field is calculated from the near field recorded by
a power monitor. The required size of the monitor strongly depends on the scattering property of the structures and
should be large enough to collect as much light as possible from the near field. However, this will inevitably result in
a large memory requirement and a longer simulation time. Some test runs might be necessary to find out an
appropriate monitor size and the simulation spans.
In this example, a large simulation span of 7 um is used and, due to the large incidence angle of 70 , the monitor is
positioned very close to the source in order to collect the scattered light propagating almost parallel to the substrate.
Current settings allow the monitor to pick up field components propagating at angles of up to 86.5 with respect to
the surface normal. Since most of scattered near field lies on the right side of the particle, the simulation region is
shifted to the right. Below is the near field of the sphere with a radius 0.11um sphere with P polarization of 70 degree
incidence:

2003 - 2016 Lumerical Solutions, Inc


Applications 1739

Near field intensity of the sphere w ith a radius 0.11um , P polarization at 70 deg incidence.

In general, conformal technique should be used to reduce the error of material interface. However, for the very
coarse mesh of the smallest sphere with a radius of 0.03um, its performance is degraded since it ha only 5 meshes
in each direction. In addition, for such small sphere, its scattering is relatively uniform and a little stronger backward,
the shifted monitor may not collect all the near field information. To increase the accuracy, one may further increase
the monitor size.

The simulation region uses PML absorbing boundary conditions on all boundaries. Note that for P- and S-
polarizations, since the incidence is angled only in XZ plane, to speed up the simulation, symmetric/anti-symmetric
boundary condition in y min can be used, which is included in the script. For circular polarization at normal
incidence, neither symmetric nor anti-symmetric boundary condition can be applied, since there are two different
polarizations on the symmetric line of the object, please refer symmetric/anti-symmetric boundary condition 466
section for more details.

Source
The source is initially P polarized with a wavelength of 488nm. The angle of incidence is 70 degrees. The source
polarization can be changed to S by editing the script file settings, which sets the polarization to 90 degrees. A
normally incident circularly polarized beam can also be created by editing the script file. First, it sets the source
angle theta to 0. Then, it creates a second source with identical settings, except with a polarization angle of 90
degrees and a phase of 90 degrees. Each source will have a different name.

Monitors
The 2D power monitor located above the source will be used to calculate far field scattering. Only light that passes
through this monitor will be included in the far field projection, so it is important that it is as close as possible to the
sphere. However, we are only interested in scattered field, so it should be above the source. In order to calculate
the far field projection, an analysis group is used, in which the script calculates and output the far field projection
parameters.

2003 - 2016 Lumerical Solutions, Inc


1740 Lumerical Knowledge Base

Tips:
1: Run a test without particle
To have an initial test, you should run a simulation without the particle. The noise intensity should be less than 1e-
12.
2: Simulation Mesh
Even though the incident angle is large, light inside the silicon substrate travels very close to Z axis, due to large
the large refractive index of silicon at this wavelength. To accelerate the simulation, we use a relatively coarse
mesh in XY for Si by use of the override mesh. In addition, we use fine mesh for the TFSF region including the
particles.
3: TFSF region
The TFSF region can be as small as to enclose the particle, but it should be in a uniform mesh, in particular in the
directions parallel to the injection plane. As like other sources, no monitor can penetrate or pass through the grey
lines.
4: Angle dependence of broadband source
Similar to plane wave, if a broadband source is injected, the real incidence angle
changes with frequency, please refer the description for broadband injection 536 .
Therefore, angled TFSF is usually used for single wavelength illumination.
5: Auto shutoff min
You may notice that the simulation ends at the auto shutoff larger than the default 1e-5. But the result is still
accurate, since in this case, the equivalent intensity inside the simulation region is relative to the TFSF injection
power, which is small. Increasing the simulation time to reach the default auto shutoff min does not improve the
results.
6: Initial simulation vs. final results
It is always a good practice to have relatively low accuracy to speed up the
simulation initially. To get the final results, we strongly recommend to use
larger simulation region, and do converging test 847 .

2003 - 2016 Lumerical Solutions, Inc


Applications 1741

8.1.2.4.2 Results
We are interested in the scattering profile from the PSL sphere. Open psl.fsp and run the script
psl_analysis.lsf. It will run a series of simulations, calculating the scattering for various polarizations.
Results for the other polarizations can be obtained by modifying psl_analysis.lsf and re-running the script.
The following figures show the normalized scattering profile as a function of defect diameter and source settings.
Please note that for comparison purpose, the far field intensity is normalized to its maximum.

Diameter 70o incidence, P polarization 70o incidence, S 0o incidence, circular


(nm) polarization polarization.
60

100

140

180

2003 - 2016 Lumerical Solutions, Inc


1742 Lumerical Knowledge Base

220

The scattering profile is clearly a function of particle diameter when using a 70o angle of incidence. This is not the
case when using a normally incident beam. When using a 70oangle of incidence, it is possible to estimate the
defect size by knowing the scattering profile. These results are very similar to Figure 3 from S. Stokowski.

Next, we calculated the scattered power in the far field within an angular cone between 25 and 72 degrees. The
following plot is generated by changing the plot_scattering flag in the script file. These results are similar to
Figure 5 from S. Stokowski.

P polarized light at grazing angles of incidence is best for detecting small defects because the scattering profile is a
strong function of defect size and has a relatively large scattering intensity.

8.1.2.5 BSDF
Introduction
In this example, we will consider a surface with nanoscale structure. The surface can be characterized using a
Bidirectional Scattering Distribution Function (BSDF). This function relates the intensity of an incoming ray to an
outgoing ray for all angles of incidence and reflection/transmission.

Solvers 101

FDTD
See also
Rough surface object 364
Grating projection toolbox 150

2003 - 2016 Lumerical Solutions, Inc


Applications 1743

BRDF and BTDF


Generally, we can split the problem into one of calculating the Bidirectional Reflectance Distribution Function
(BRDF) to characterize the reflection of the surface and the Bidirectional Transmittance Distribution Function (BTDF)
to characterize the transmission of the surface. In addition, for this example, we will consider that the structure has
azimuthal symmetry and therefore the BSDF does not depend on the incident azimuthal angle.

For many surfaces, the specular reflection and transmission is much larger than the diffuse scattering. It can be
useful to separate these two contributions, as shown in the figure below. In this case, we can treat the BRDF and
BTDF as a relatively smooth function for many surfaces, which makes interpolation near the specular directions
much easier.

Simulation methods
There are two approaches that can be used for calculating the BSDF, the gaussian beam and the plane wave.

Gaussian beam with PML boundaries on all sides. Plane wave with Bloch boundary conditions on the x and y
boundaries.

2003 - 2016 Lumerical Solutions, Inc


1744 Lumerical Knowledge Base

The gaussian beam approach uses a finite-size gaussian beam as the incident field with PML boundaries on all
sides. The disadvantage of this approach is that the diffraction of the gaussian beam will always be included in the
calculation of the BSDF. This means that the BSDF cannot be accurately determined near the specular directions
because we see the diffraction of the finite-size gaussian beam which generally dominates non-specular scattering
from the surface. However, for surfaces that lead to very diffused light, it can be a good method.

The plane wave uses Bloch-periodic boundary conditions. This means that the structure is treated as a periodic
repetition of the surface. The angular distribution of reflection and transmission is only calculated for directions
corresponding to the grating orders of the periodic structure. As long as the period is large enough, this provides
enough angular resolution. The rough surface structure from the object library will create a periodic structure with no
discontinuities when periodic boundary conditions are used. The advantage of this method is that there is no inherent
diffraction of the source beam. For example, a completely flat surface will show that light is purely scattered
specularly, whereas the gaussian beam method will show that the beam spreads due to diffraction of the beam. In
addition, the plane wave method allows the specular intensity to be perfectly separated from the non-specular
scattering, which can be useful if some smoothing of the non-specular scattering is required. The disadvantage of
this method is that the number of scattered orders depends on the angle of the incident beam, which makes data
processing somewhat more complicated. Furthermore, the number of layers of PML absorbing boundaries generally
needs to be increased to account for the poor performance of PML at steep angles of incidence.

In the remainder of this application example, we will use the plane wave method.

8.1.2.5.1 BRDF theory

Introduction
In this example, we will consider a weakly scattering, thin grating at normal incidence and compare the calculated
BRDF with the theoretical result using the Born approximation. We will study this surface using the plane wave
method.

Solvers 101

FDTD
Associated files
bsdf_simple.fsp
bsdf_simple.lsf

Generating a rough surface with a correlation length


The fsp file bsdf_simple.fsp has a structure with a rough surface that is generated to have a specified sigma

2003 - 2016 Lumerical Solutions, Inc


Applications 1745

RMS (s) and correlation length (Lc). In this example, these quantities are related to the correlation function by
2
r r r d
H (r ) H (r + d ) = s 2 exp -
Lc

where the average is carried out over all positions on the surface, r, and H is the surface height defined such that
<H(r)> = 0.

The rough surface structure can optionally generate some figures as shown below. To produce these plots, right-
click the 'rought_surface' structure group and enter '1' in the 'make plots' parameter, and then click 'ok.' When a
warning message pops up, reading "This requires a czt of a 2d matrices of size 401x401! Do you want to proceed?",
click 'Yes.'

For this simple case, we will run a single simulation at normal incidence.

Rough surface in k-space Rough surface in real space

Correlation function calculated num erically com pared w ith Correlation function calculated num erically com pared w ith
theory theory (zoom ed in)

Analysis of results
The script file bsdf_simple.lsf can be used to perform the analysis. It first calculates the angular distribution of

2003 - 2016 Lumerical Solutions, Inc


1746 Lumerical Knowledge Base

scattered orders, which is shown on a log scale below. Note the resemblance to the original random surface in k
space.

It then uses the script function farfield3dintegrate to integrate over a series of collection angles, with an
integration area corresponding to a cone with a 5 degree half-angle. We average over 50 azimuthal angles. We then
can compare to the theoretical result for angles away from normal incidence.

The agreement between theory and simulation is very good above 10 degrees. The agreement below 10 degrees is
not so good because the results come from only a few data points. To improve this agreement, we would need to
simulate a beam that is incident on several different regions of the surface and average the results. This will be done
in the following section.

8.1.2.5.2 BSDF calculation

Introduction
We now want to generate the BRDF and BTDF for a particular surface. In this example, we will use the same
surface from BRDF theory to generate a BRDF and BTDF but any surface could be used. In this study, we will use
the plane wave method.

2003 - 2016 Lumerical Solutions, Inc


Applications 1747

Solvers 101

FDTD
Associated files
bsdf_simple.fsp
bsdf_calculation_bloch.lsf

Simulation
The starting fsp file is bsdf_simple.fsp. The script file bsdf_calculation_bloch.lsf will calculate the
BRDF and BTDF for 5 different incident polar angles. We assume that the surface roughness has azimuthal
symmetry, and we can rotate the structure by 90 degrees. In addition, we average over 9 random surfaces generated
with the same settings. This is similar to averaging over 9 different locations on the surface in an experiment. To
obtain unpolarized results, we will average the response of S and P polarization on the input. The total number of
simulations is therefore 5 x 2 x 9 x 2 = 180. The user can choose to rerun the simulations, or simply rerun the
analysis when running the script file.

Analysis
For each angle of incidence, we calculate the angular distribution of reflected and transmitted orders. In this
example, there are approximately 50x50 orders, although the number in transmission is different than the number in
reflection due to the different refractive index. This number can be increased by increasing the area of the simulation.

We can then separate the specular transmission and reflection by identifying the 0th order in each case. We
assume that the specular is much stronger than the other orders and that is indeed the case. To separate the
specular light from the diffused light, we assume that the diffused light in the specular direction is the average of the
light diffused to the (+1,0),(0,+1),(-1,0) and (0,-1) orders. To conserve energy, we also subtract this small amount
from the specular power already identified. This separation at precisely the specular angle is somewhat arbitrary, but
provides a smooth function for the diffuse component of the BSDF. We can then calculate the BRDF and BTDF by
integrating the diffused light over various output angles. In this study, we assume that we can integrate over a 5
degree half angle cone, and this helps provide some additional smoothing of the results in addition to the smoothing
that occurs from averaging the different incident positions and incident azimuthal angles. The user can also specify
the half-angle size of the integration region, to modify it as desired.

Advanced note: when using the farfield3dintegrate function, we need to multiply by a factor of
cos(theta_out). This is because our angular distribution represents the relative power carried in each diffracted order,
and not the time averaged Poynting vector.

The user can choose which range of input angles (theta), and output angles (theta_out, phi_out) to calculate. Note
that phi_out represents the difference in input azimuthal angle and output azimuthal angle because we have
assumed that the surface has azimuthal symmetry.

Results
The angular distribution of scattered light is shown below for each of the five angles of incidence.

Reflected fields
0 degrees 15 degrees

2003 - 2016 Lumerical Solutions, Inc


1748 Lumerical Knowledge Base

30 degrees 45 degrees

60 degrees

Transmitted fields

2003 - 2016 Lumerical Solutions, Inc


Applications 1749

0 degrees 15 degrees

30 degrees 45 degrees

60 degrees

2003 - 2016 Lumerical Solutions, Inc


1750 Lumerical Knowledge Base

Extracted BRDF and BTDF


In this example, the BRDF and BTDF are calculated for an azimuthal angle of 0. The resulting BRDF and BTDF
functions are shown below.
BRDF BTDF

The script also outputs the specular strengths for reflection and transmission, the total reflected and scattered
power, and the total power
incident angle, specular R, specular T, total R, total T, total R+T
0, 0.00404571, 0.911121, 0.0257424, 0.974054, 0.999796
15, 0.004939, 0.907587, 0.0257847, 0.973971, 0.999756
30, 0.00841839, 0.893595, 0.0276189, 0.972104, 0.999723
45, 0.0176576, 0.860782, 0.0348971, 0.964782, 0.999679
60, 0.0403746, 0.806879, 0.0528771, 0.944788, 0.997665
Note that the total power is not exactly 1 due to numerical errors. If it is substantially different than 1, it means that
there is an error in the simulation setup, or that more layers of PML may be required.

The BRDF, BTDF and specular data is saved to an *.ldf file and can be reloaded as required.

8.1.2.5.3 BSDF export to ASAP


We can export the results from the previous section to ASAP *.inr files for use in ASAP simulations. The BRDF and
BTDF can be exported with the script file bsdf_export_asap.lsf. This creates 2 *.inr files with the rawdata models.
For example, the file brdf_simple.inr or btdf_simple.inr looks like

$CASE LOWER
models
rawdata

!! begin incidence 0 degrees

0 0
-0.996195 0 0
-0.993136 0 0
-0.989185 0 0
-0.984345 0 0
-0.978622 0 1.08113e-007
-0.972019 0 9.73739e-008
-0.964543 0 9.73739e-008
...

!! end incidence 0 degrees

2003 - 2016 Lumerical Solutions, Inc


Applications 1751

...

!! begin incidence 60 degrees

...

0.866025 0
-0.996195 0 3.01866e-008
-0.993136 0 3.01866e-008
-0.989185 0 3.01866e-008

!! end incidence 60 degrees

return
$case upper

8.1.2.6 Mie Scattering 2D


Introduction
We simulate Mie scattering from a two dimensions dielectric cylinder. Angular scattering results from the FDTD
simulation are compared to the analytic solution.

Solvers 101

FDTD
Associated files
mie_theory_2d.fsp
mie_theory_2d.lsf
mie_cylinder.txt

See also
Surface Plasmons 1881
Mie scattering 3D 1752
TFSF sources 546
Related publications
H C van de Hulst, "Light Scattering by Small
Particles", John Wiley, Ch. 15 (1957)

The 1981 edition is available on Google


Books: http://books.google.com/books?
id=6ivW_TgIdjIC

Results
Open and run the simulation file named mie_theory_2d.fsp. The simulation creates the mpeg movie below.
The Total-Field Scattered-Field (TFSF) source is used to create a plane wave incident on a dielectric cylinder. Only
light scattered by the cylinder propagates beyond the TFSF boundary.

2003 - 2016 Lumerical Solutions, Inc


1752 Lumerical Knowledge Base

After running the simulation, run the script file named mie_theory_2d.lsf. The script file computes a series of
far field projections at 2 wavelengths, and compares the results to the analytic data for scattering from a dielectric
cylinder that are stored in the file cylinder.txt. Note that the monitors record 25 wavelengths, but the script in
the analysis group selects the monitor data at 1 and 2 microns. The resultant plot (logarithmic scale) is shown
below. The analytic and simulated results agree very well at all angles, over more than 5 orders of magnitude.

The script can also calculate the scattering and absorption cross sections. The absorption will be zero, since the
cylinder is a composed of a dielectric with no absorption. To calculate the cross sections, edit the script and set
the do_cross_sections variable to 1.

8.1.2.7 Mie Scattering 3D


We address Mie scattering in three dimensions from a gold nano-particle and compare the scattering and absorption
cross sections to the analytic solution. We also show how to calculate the angular scattering in a plane around the
particle.

2003 - 2016 Lumerical Solutions, Inc


Applications 1753

Solvers 101

FDTD
In this topic
Simulation setup 1753
Cross sections 1754
Far field 1755
Field enhancement 1756
Associated files
mie_example_3d.fsp
mie_analysis_3d.lsf
mie_au_jc_raw.txt
mie_au_jc_fdtd.txt

See also
Surface Plasmons 1881
Mie scattering 2D 1751
TFSF sources 546
Simulations with Silver 274
Projections from a monitor box 817

Related publications
Bohren, C.F., and D.R. Huffman,
1983: Absorption and Scattering of
Light by Small Particles (Wiley-
Interscience, New York).

H C van de Hulst, "Light Scattering


by Small Particles", John Wiley,
(1957)
The 1981 edition is available through
Google Books: http://
books.google.com/books?
id=6ivW_TgIdjIC

Simulation setup
The file mie_example_3d.fsp contains an example of the Mie problem in 3D, using a total-field scattered-field
source(TFSF) that surrounds a gold particle. There are two analysis groups, each of which consist of a box of power
monitors: one in the total field region and one in the scattered field region. These analysis groups can be used to
calculate the absorption and scattering cross sections, as well as the angular distribution of scattered radiation. In
addition, 3 frequency profile monitors are added in the total field region to calculate the electric field enhancement.
The total scattered field source covers a wavelength range of 300 to 600 nm.

The gold material is a copy of the "Au (Gold) - Johnson and Christy" material that is contained in the default material
database. Since the default number of coefficients is not sufficient to provide a good fit to the sampled data over the
source bandwidth, the maximum coefficients is set to 10. The theoretical Mie scattering cross sections (absorption
and scattering) have been calculated for both the material fit and the sampled data and are stored in the files
mie_au_jc_fdtd.txt and mie_au_jc_raw.txt, respectively.

With the default settings (simulation span is 1x1x1 um3 and a mesh accuracy of 3, plus an override region of 5nm at
the sphere) the simulation will require about 234 MB of memory.

Once the simulation is finished, mie_analysis_3d.lsf will perform the following analysis.

Note: Mesh override region


For simulations with metals, the mesh override region is often used to more accurately resolve the locations of the
metal interface, especially with curved surfaces. In this simulation, the mesh override region is large enough to

2003 - 2016 Lumerical Solutions, Inc


1754 Lumerical Knowledge Base

encompass not only the gold sphere, but also the entire TFSF region. This was done intentionally; the TFSF
sources work best in uniformly meshed regions.
Also note that the mesh spacing of the override region effects the location of the analysis boxes. Sources require a
certain amount of space to inject the fields. The amount of space required is ~2 mesh cells and is depicted
graphically by light white shading that surrounds the source. Within this region, the fields are not physically
meaningful. Hence monitors should not be placed in this region.

Absorption and Scattering cross sections


The absorption cross section (the rate at which energy is removed from the incident plane wave by absorption) is
calculated by an analysis group located inside the TFSF source. The analysis group calculates the net power flow
into the particle and hence the absorption cross section using the optical theorem. Similarly, the scattering cross
section is calculated by an analysis group located outside the TFSF source. This group measures the net power
scattered from the particle.

The MIe efficiency is defined as the ratio of cross_section of scattering/absorption and the geometrical area pi*r^2;
and the size parameter is 2*pi*r/lambda.

The above plots compare the FDTD results with the results from theory which were computed using the Gold data
from the material fit. In the script file, change the name of the file from which to plot the theoretical results from
mie_au_jc_fdtd.txt to mie_au_jc_raw.txt to compare the FDTD results with the results from theory that
were computed using the raw Gold data. Running the script file results in the following two plots for the cross
sections.

Note: Power normalization with the TFSF source


Power normalization with the TFSF source can slightly confusing. Rather than normalizing results to the source

2003 - 2016 Lumerical Solutions, Inc


Applications 1755

power (which is infinite for an ideal plane wave since it has infinite extent), it is best to normalize by the source
intensity. This leads to power measurements being returned in cross section type units. For more information,
see the Power normalization page of the TFSF sources 546 section.

Higher accuracy results


The default settings for this simulation are designed to give reasonably accurate results while minimizing the
simulation time. If higher accuracy is desired, make the following modifications. These modifications will increase
the memory requirements to around 1.7 GB.

Mesh refinement Set the mesh refinement to 'conformal variant 1' to achieve sub-cell resolution for the
gold particle boundary. Care must be taken when selecting this setting if the mesh is
coarse and there is a large difference in permittivity between the metal and
surrounding medium at the frequencies of interest. It is best to perform some
convergence testing. A more detailed discussion on convergence testing can be found
on the convergence testing page 847 .
Mesh size Set the mesh override mesh size to 0.8nm
Simulation span Set the simulation span to 2um in all directions.
When the simulation region is too small, evanescent tails of the resonant surface
plasmon modes will interact with the PML boundary conditions.
PML reflections Any light reflecting from the PML boundary conditions may affect the results. More
PML layers will reduce reflections. However, if you are using the "stretched coordinate
pml" with its default 8 layers, no need to change it, except you need much higher
accuracy.
Symmetry Set the X min boundary condition to Symmetric
Set the Z min boundary condition to Anti-Symmetric
We can take advantage of the symmetry of the simulation to reduce the simulation
memory and time by a factor of 4.

The following figures show the cross sections from the higher accuracy simulation. Agreement between the FDTD
and theoretical results is clearly much better.

Far field angular scattering


In the majority of scattering experiments, measurements of the scattered field (radiation pattern) are made far away
from the scatterer. We will, therefore, examine the behavior of the scattered field in the far zone in the X-Y plane and
the Y-Z plane. The image on the right shows how the numerical angles are oriented in 3D space.

2003 - 2016 Lumerical Solutions, Inc


1756 Lumerical Knowledge Base

Note: Particles on a substrate


This example studies a particle surrounded by a homogeneous material. If the particle is on a substrate, the far
field part of the analysis must be modified. The technique used in this example (projecting from a closed box of
monitors) only works when all of the monitors are in a homogeneous material. When a substrate is present, the
best way to calculate the far field scattering pattern is to use one monitor, located above or below the particle
(depending if you want scattering in the forward or backwards direction). You can then use the standard farfield3d
function. When using a single monitor, it's important to make the simulation span large enough that most of the
scattered light will pass through the monitor before hitting the PML absorbing boundary conditions.
This issue only applies to the farfield analysis. It is not necessary to change the analysis for the power absorption
and scattering measurements, because the technique used to calculate power flow is valid even when the monitor
box spans several materials.

Field enhancement
We use a series of profile monitors to image the field profile |E|^2 in the YZ, XZ and XY planes through the center of
the particle. Notice that the edge of the TFSF source is visible in the plots. These figures were created with the
higher accuracy settings.

2003 - 2016 Lumerical Solutions, Inc


Applications 1757

8.1.3 Photonic Crystal and Diffractive Optics


Simulating photonic crystals and diffractive optics
For nanophotonic structures that are comprised of periodic elements of different permittivity in one dimension
(gratings) or two/three dimensions (photonic crystals), the periodic variation in the refractive index inhibits the
propagation of electromagnetic waves of specific frequency, resulting in photonic band gaps corresponding to the
band of frequencies over which radiation cannot propagate.

Bloch modes are the name given to optical modes which can propagate through the photonic crystal lattice. The
corresponding photonic bandstructure for a particular photonic crystal structure illustrate photonic band gaps where
Bloch modes do not exist, and where such Bloch modes can propagate.

FDTD Solutions is a high performance optical solver that can capture the effects of wavelength-scale photonic
crystal patterning
and solve scientific issues related to the design, analysis and optimization of photonic crystal cavities, devices and
components.

Features
Optimize a wide variety of grating designs 1788
Calculation of photonic crystal bandstructure and band gaps 1843 , waveguide Bloch mode profiles 1871 and
photonic crystal cavity modes and quality factors 1807 for those modes in 2D and 3D
Propagation in photonic crystal waveguides 1856 without and with imperfections 499 , including calculation of
effective index, propagation constant, propagation loss, dispersion, bending loss, group velocity, group
dispersion of photonic crystal waveguide components

2003 - 2016 Lumerical Solutions, Inc


1758 Lumerical Knowledge Base

Propagation in and performance of photonic crystal based devices including switches 1873 , splitters, bends,
resonators 1804 , filters, cavities 1804 , and input/output couplers
Effect of photonic crystal patterning on the performance of devices including photonic crystal light emitting
diodes (OLEDs) 2682 , VCSELs, and photonic crystal enhanced solar cells 2635
Lumericals conformal mesh technology can provide sub-mesh cell modeling accuracy important in photonic
crystal modeling
Multi-Coefficient Materials (MCMs) can accurately model dispersive materials across wide wavelength
ranges
Built-in parameter sweep 699 and optimization algorithms 716 make it easy to analyze and optimize
parameterized designs

MODE Solutions can be used to analyze photonic crystal fiber and planar photonic crystal components.

Features
For photonic crystal fiber and other microstructured optical fibers:
Photonic crystal fiber (PCF) 1770 mode profiles, effective index, propagation constant, propagation loss,
dispersion, bending loss, group velocity, group dispersion
Sensitivity of PCFs to size and other environmental factors that result in changes in the refractive index
profile
Photonic crystal fiber macrobending loss 1781
Far field radiation profiles of photonic crystal fiber modes and modes of other microstructured optical fibers
Coupling efficiency 2185 between photonic crystal fiber modes and other waveguide modes

For planar photonic crystals:


Fast calculation of bandstructure, band gaps, waveguide Bloch mode profiles and photonic crystal cavity
modes and quality factors using the 2.5D variational FDTD solver.
Propagation in photonic crystal line defect waveguides 1879 , including calculation of propagation constant,
loss and other propagation characteristics
Propagation in and performance of photonic crystal based devices
Calculation of relevant input/output quantities, including far field radiation profiles 1661 , overlap quantities 1608 ,
and coupling efficiencies between different waveguide modes 763
Lumericals conformal mesh technology can provide sub-mesh cell modeling accuracy important in photonic
crystal modeling
Multi-Coefficient Materials (MCMs) can accurately model dispersive materials across wide wavelength
ranges
Built-in parameter sweep 699 and optimization algorithms 716 make it easy to analyze and optimize
parameterized designs

Getting started
Relevant videos (login required):
Bandstructure calculations
Cavities and resonators

Download relevant products:


FDTD Solutions
MODE Solutions

Watch a product introductory video


FDTD Solutions
MODE Solutions

Product introductory examples:


(FDTD Solutions) PC Micro Cavity 1759
(MODE Solutions) Photonic Crystal Fiber 1770

2003 - 2016 Lumerical Solutions, Inc


Applications 1759

More ... 171

Application examples
Solvers 101 Description

FDTD Cavities and resonators 1804

FDTD 1D multilayer stacks 1781

FDTD Gratings 1788

FDTD Photonic crystals 1821

varFDTD Waveguides - Photonic crystal 1876

8.1.3.1 Getting Started


Following are the two getting started examples in this section. The PC Micro Cavity example employs the FDTD 101

solver and the Photonic Crystal Fiber example uses the FDE 101 solver.

PC Micro Cavity Tutorial (FDTD) 1759


Photonic Crystal Fiber (MODE) 1770

8.1.3.1.1 PC Micro Cavity Tutorial

Problem definition
The goal of this example is to demonstrate how FDTD Solutions may be used to analyze photonic crystal cavities.
We want to determine the resonant frequency, Quality factor, and mode profile of the cavity modes. Once we learn
how to find the mode of interest and measure its Q-factor, we will use a particle swarm optimization to find the inner
hole radius which provides the maximum Q factor.

Note: The screen shots in this example were created with the Mac version of FDTD Solutions. The graphical user
interface looks a slightly different than it does on Windows and Linux.
Solvers 101

FDTD

Associated files
ppc_cavity.fsp

In this topic
Simulation set up 1759
Simulation results 1762
Further analysis: Symmetry 1763
Further analysis: Optimization of inner hole radius 1764

See also
Cavities and Resonators 1804

Photonic Crystals 1821

8.1.3.1.1.1 Discussion and results

Simulation set up
The cavity is constructed by perforating a slab of Ta2O5 (which has an index of 2.0995) with air holes forming a
hexagonal lattice. The lattice constant is 575 nm, and the air hole radius within the photonic crystal lattice is 194
nm. The cavity itself is formed by removing a central hole, by reducing the radius of the inner six holes to 100 nm,
and by removing holes along the outer edge of the cavity to form the structure shown in the figures below.

2003 - 2016 Lumerical Solutions, Inc


1760 Lumerical Knowledge Base

When we construct this structure in FDTD Solutions, we create the slab out of a rectangle. Then we add cylinders to
the simulation for the holes. In the locations where the holes and the slab overlap, we use the mesh order property to
make sure that FDTD Solutions uses the refractive index data from the holes (cylinders) instead of from the slab
(rectangle). For more details about mesh order, refer to the mesh order 271 page in the Reference Guide.

Two dipole sources (depicted with green arrows to show the direction of the H field) are used to excite the modes of
the cavity. These dipoles are not located in the center of the PC structure in order to reduce the chance that they are
located at a zero of the cavity mode. The dipole sources are used to inject energy into the simulation volume. Some
of the dipole radiation will be coupled into the cavity modes and decay slowly. The radiation which does not get
coupled into the cavity modes will be scattered and quickly exit the simulation volume.

The frequency domain monitors in FDTD simulations calculate the mode profile by taking a discrete Fourier
Transform of the time domain data. Obviously, we do not want to include the portion of the time signal at the
beginning of the simulation, since it contains radiation which does not excite the modes; we are only interested in
the later portion of the time signal when all the energy left in the cavity is in the resonant modes. As you can see in
the modeling instructions on the next page, we can use monitor apodization to select only the portion of the time
data at which all the energy left in the simulation is in the resonant modes. A more in depth discussion of monitor
apodization (also based on a PC cavity) can be found in the Apodization 660 .

The rest of this set up section discusses some important simulation settings, namely the boundary conditions, the
mesh and the simulation time.

Boundary Conditions
The orange boundaries which can be seen in the screenshot above are Perfectly Matched Layer (PML) boundary
conditions. PML boundaries absorb incident radiation, and are intended to absorb all radiation propagating away from
the cavity. It is important to leave some distance between the cavity and the PML boundaries. If the boundaries are
too close to the cavity, they will start to absorb the non-propagating local evanescent fields that exist within the
cavity. A simple rule is to leave at least half a wavelength of distance above and below the structure.

Next, notice that the lower half of the simulation (z<0) is shaded blue. This is because we used a symmetric
boundary condition on the z min boundary in order to reduce the computation time by a factor of two. The drawback
of using the symmetric boundary condition is that it will forbid certain modes from appearing in the results (modes
that do not exhibit the same symmetry relation as the boundary condition). For this PC cavity, there is a plane of
symmetry through the center of the slab (z=0 plane). Using a symmetric boundary condition on this plane will only
allow TE-like modes and eliminate TM-like modes from the results.

Note that the reason the dipoles are located z=0 is because this is the ideal location for the sources. Magnetic
dipoles will have an E field pointing along the z=0 plane. The blue color of the symmetric boundary condition is
intentional; it indicates that the E field should lie along (be parallel to) this boundary. Most sources in FDTD
Solutions contain blue arrows which show the E field. These should always lie on blue boundaries.

Mesh
To get good results for cavity simulation, it is important to include an integer number of mesh cells per lattice

2003 - 2016 Lumerical Solutions, Inc


Applications 1761

constant in the two directions. The wavelength in the material is on the order of l = c / f / n = 3e8 / 160e12 / 2.0995
= 890 nm. We can expect reasonable accuracy with a l/10 mesh. 8 points per period in the x direction gives a mesh
size of 575nm/ 8 = 71.875nm. The mesh size will be smaller in the y direction since the lattice constant is
575*sin(60) nm. This should give reasonable accuracy while keeping the simulation time to a minimum.

To make sure that the mesh can actually be an integer number of mesh cells, the simulation (FDTD) span has to fit
exactly an integer number of mesh cells inside the boundaries. For this reason we set the x span of the FDTD region
to 575*12 nm and the y span of the FDTD region to 575*sin(60)*12 nm

By clicking the 'View mesh' button, it is possible to view the mesh around the structure. It is important that each
hole is meshed in the same way. If the mesh lines fall at different locations with respect to the holes, each hole will
have a slightly different size and shape in the simulation.

Before running simulations with periodic structures, it is good practice to use an index monitor to check that the
structure actually looks periodic when it is meshed. The index monitor results below show that each of the holes
looks like a cross. This is because the mesh is a bit coarse. However, each cross (except for the 6 inner holes)
looks identical. It is important to make sure that the holes all are meshed the same way, if we want to obtain good
results. It is possible to view the meshed structure with the index monitor in layout mode (i.e. before the simulation
has been run).
The modeling instructions section on the next page contains step by step instructions of how to create index
monitor plots.

Simulation time
To obtain accurate frequency domain data, it is generally required to run the simulation until the time domain fields
have decayed to zero. High quality factor cavity simulations are one exception to this rule. This is fortunate, since

2003 - 2016 Lumerical Solutions, Inc


1762 Lumerical Knowledge Base

high Q modes decay very slowly. Running high Q cavity simulations long enough for the fields to fully decay would
be very slow.

A combination of time domain analysis and frequency domain apodization allow us to accurately calculate the Q-
factor and profile of cavity modes without running the simulation until the fields decay. However, some care should
still be taken when using this technique. Other measurements like power transmission and field amplitudes will not
necessarily be correct when the simulation is stopped early.

Simulation Results
The simulation contains a Q analysis group, which contains a script that finds the resonance peaks and Q factors of
the cavity modes. We have placed the Q factor group, which contains a time monitor, away from the origin of the
simulation for exactly the same reason the dipoles are not placed at the origin.

We can use the analysis script to obtain the largest two resonance peaks in the source bandwidth and their Q
factors. It is easy to obtain more resonance peaks: Simply change the "number_resonances" parameter in the
Analysis-> Variables tab of the Q analysis object.

We can also obtain a plot of the E fields as a function of time (below right) and a plot of the resonance peaks. The Q
factor calculations are discussed in detail in the Cavities and Resonators 1804 section of the Online Help.

Once we know the resonance frequencies, the corresponding E field profiles can be plotted.

2003 - 2016 Lumerical Solutions, Inc


Applications 1763

The image below shows real(Ey) for the mode at 201 THz.

Further analysis: Symmetric boundary conditions


We will need to run quite a few simulations in order to find the inner hole radius which maximizes the Q factor of the
mode at 201 THz. Since the mode profile possesses symmetry about the x and y axes, we can use anti-symmetric/
symmetric boundary conditions to reduce the simulation time by an additional factor of 4.

From the above image and the discussion on the Choosing between symmetric and anti-symmetric BCs 466 page in
the User Guide - Simulation section, we can see that the E fields for the mode of interest have a plane of anti-
symmetry at X=0, and a plane of symmetry at Y=0.

Whenever the EM fields have a plane of symmetry through the middle of the simulation region, using symmetrical
boundary conditions will give the same results as running the full simulation. The plot below shows real(Ey) after we
set the x min and y min boundary conditions to anti-symmetric/symmetric. This plot looks identical to the one above
except for the magnitude. The change in magnitude arises because the sources have been mirrored, i,e in the full
simulation there are only two sources, but by using symmetry we have mirrored these sources so that there are now
8.

2003 - 2016 Lumerical Solutions, Inc


1764 Lumerical Knowledge Base

Further analysis: Optimization of inner hole radius


FDTD Solutions contains a built in optimizer. We choose to use the particle swarm optimization algorithm which is
included with the optimizer, but it is also possible to define a different optimization algorithm. For more details about
the optimizer, see the Optimization 716 section of the online User Guide.

In this case, we choose to try to find the radius of the 6 inner holes of the PC Cavity which optimizes the Q factor of
the first resonance. The sweep below shows an optimal radius corresponding to 0.167*0.575 um = 96 nm.

8.1.3.1.1.2 Modeling instructions


This page contains 4 independent sections. The first section describes how to setup the cavity structure and the
FDTD simulation region. Section 2 describes the source and monitor setup, and some initial analysis. Section 3
provides further information on using symmetry boundaries, and section 4 describes how to use the optimization
feature of FDTD Solutions.

In this topic
Create PC and check material index 1765
Add sources and monitors. Run simulation and get data. 1767

Symmetry 1769
Optimize inner hole radius 1769

2003 - 2016 Lumerical Solutions, Inc


Applications 1765

Create PC and check material index


Open a blank simulation file. For instructions see the FDTD Solutions GUI page 197 in the Introduction to the
Getting Started Examples.

Press on arrow on the STRUCTURES button and select a RECTANGLE from the pull-down menu.
Set the properties of the ring according to the following table.
tab property value
Geometry x ( m) 0
y ( m) 0
z ( m) 0
x span ( m) 10
y span ( m) 10
z span ( m) 1
Material index 2.0995

Press on arrow on the COMPONENTS button and select PHOTONIC CRYSTALS from the pull-
down menu. This will open the object library window.
Select HEXAGONAL LATTICE PC H-CAVITY from the list and press the INSERT button.
Set the properties of the PC Cavity according to the following table.
tab property value
Properties x ( m) 0
y ( m) 0
z ( m) 0
material etch
H number 2
z span ( m) 1
n side 6
a ( m) .575
radius .194

Press the DUPLICATE button to create a second copy of the hexagonal lattice PC cavity. Edit the
properties according to the following table
tab property value
name inner
Setup Variables x ( m) 0
y ( m) 0
z ( m) 0
H number 1
n side 2

2003 - 2016 Lumerical Solutions, Inc


1766 Lumerical Knowledge Base

radius ( m) .100

Press on the SIMULATION button to add a simulation region. Note that if your button does not look
like the button to the left, you will need to press on the arrow to get the simulation region. Set the properties
according to the following table.
tab property value
General simulation time (fs) 1500
Geometry x ( m) 0
y ( m) 0
z ( m) 0
x span ( m) 12 * .575
y span ( m) 12 * .575 * sqrt(3) / 2
z span ( m) 3
Boundary conditions z min bc Symmetric
Advanced options force symmetric x mesh check
force symmetric y mesh check
force symmetric z mesh check
Note: Forcing a symmetric x mesh ensures that a mesh line lies at x=0, and therefore the mesh does not change
when we switch the x min boundary condition from PML to symmetric or anti-symmetric. Strictly speaking we do not
need this option for this particular simulation since we have set up the mesh in this example so that there will be a
mesh line at x=0 anyways.
Press on the arrow next the the SIMULATION button and select MESH OVERRIDE from the pull-down menu. Set
the properties according to the following table.
tab property value
General dx ( m) .575 / 8
dy ( m) .575 * sqrt(3) / 2 / 8
override z mesh uncheck
Geometry x ( m) 0
y ( m) 0
z ( m) 0
x span ( m) 10
y span ( m) 10
z span ( m) 1

Press on the arrow on the MONITORS button and select the INDEX monitor from the pull-down menu.
Set the properties according to the following table.
tab property value
name index
Geometry x ( m) 0

2003 - 2016 Lumerical Solutions, Inc


Applications 1767

y ( m) 0
x span ( m) 10
y span ( m) 10
Get the index monitor data: you can use visualizer 740 Visualize->index to get the index distribution or verify the
structure without running the simulation.

Add sources and monitors. Run simulation and get data.


Add sources and Q analysis object

Press the arrow on the on the SOURCES button and select the DIPOLE source from the pull-down
menu. Set the properties according to the following table:
tab property value
name dipole1
General dipole type Magnetic dipole
Geometry x ( m) .1
y ( m) .2
Frequency/Wavelength frequency start (THz) 160
frequency stop (THz) 250

While the dipole is still selected, click the DUPLICATE button on the toolbar (or, use the keyboard shortcut
key D). Set the name to dipole2 and the x location of the dipole to 0.3 microns.

Press the arrow on the on the ANALYSIS button and select RESONATORS from the pull-down menu.
This will open the object library window.
Insert the Q ANALYSIS analysis group. Set the location of the monitor to x = .4 m, y = .2 m and z = 0 m.

Run simulation and get data: Get Q analysis data

Press the Resources button and check the number of processes (number of cores) for the local
machine. If you have additional computers on the network with FDTD installed as well as extra engine licenses,
you can add them to the resource list. Click "Add" and set the appropriate properties.
Press the "Run Tests" button to make sure the simulation engines on the resources are configured correctly. The
first time you run this test, it may fail and ask you to register your username and password for your operating
system account. If it does, fill in the appropriate text fields, press "Register", then "OK", and re-run the tests. If
there are any errors or warnings, they will appear in the "Result" field.

Run the simulation by pressing the RUN button . For more information about setting the parallel computing
options see the Running simulations chapter.
To get the Q factor of the cavity, right-click on the Qanalysis group and select "runanalysis". Alternatively, open
the edit window for the Qanalysis group, and under the Analysis->Script window, press the RUN ANALYSIS
button to run the script.

Add profile monitor (now that we know the resonance frequencies for the structure)

Press the arrow on the MONITORS button and select the FREQUENCY DOMAIN FIELD PROFILE

2003 - 2016 Lumerical Solutions, Inc


1768 Lumerical Knowledge Base

monitor from the pull-down menu. Set the monitor properties according to the following table.
tab property value
name profile
General override global monitor settings check
use source limits uncheck
frequency points 2
minimum frequency (THz) 201
maximum frequency (THz) 209.5
Geometry x ( m) 0
y ( m) 0
x span ( m) 10
y span ( m) 10
Spectral averaging and apodization Full
apodization
apodization center (fs) 1000
apodization time width (fs) 250

Run simulation and get data: Get profile monitor data

Press the SWITCH TO LAYOUT button to the objects tree 208 window.

Press the RUN button.


Once the simulation has run to completion, plot the profile monitor data by right-clicking on the monitor and
selecting Visualize->E. Set the scalar operation to "Abs^2" to plot the electric field intensity.
This image corresponds to the result at the first frequency point. To plot the electric field intensity at other
frequencies, simply move the frequency slider as shown below.

2003 - 2016 Lumerical Solutions, Inc


Applications 1769

To plot real(Ey), simply select "Y" for Vector operation and "Re" for Scalar operation.

SYMMETRY
To reduce memory requirement and speed up simulation, we can use the symmetry boundaries.

Press the SWITCH TO LAYOUT .


Edit the FDTD simulation region. In the BOUNDARY CONDITIONS tab, set "x min bc" to be "Anti-Symmetric" and
"y min bc" to be "Symmetric" to get the mode with specified symmetry.
Press the RUN FDTD button to re-run the simulation.
Visualize real(Ey) as shown in the visualizer screenshot above.

For more information on using symmetry boundaries, see the Symmetry boundaries 466 page.

Optimize inner hole radius


Set the following variables in the Q analysis group:
tab property value
Setup Variables make_plots 0
number_resonances 1
Switch to/open the optimization and parameter sweep window
Press on the CREATE NEW OPTIMIZATION button . Set up the optimization as shown in the following
screen shot. Warning: These settings will run Maximum Generations*Generation size = 20*10 = 200 simulations
(set the "make plot" option in Qanalysis to 0 to avoid generating hundreds of figures). You can reduce the
maximum generation size to run less simulations and therefore a faster optimization.

2003 - 2016 Lumerical Solutions, Inc


1770 Lumerical Knowledge Base

Each generation of the optimization will create a temporary set of simulations to be run before being replaced by
the next generation. The job monitor will show the individual progress for each simulation of a generation set. In
the screenshot below, the simulation is using both Local Host and Laptop to run through the iterations in parallel.
Note that in distributed mode, the source fsp file must be stored on the network, accessible by all the computing
resources.

8.1.3.1.2 Photonic Crystal Fiber

Problem definition
In this example, we show how to use MODE Solutions to study a photonic crystal fiber (PCF). Using the built-in
analysis tools, we will calculate the effective index and dispersion of the PCF, as well as estimate how efficiently
light can be coupled in to the PCF, and how much loss can result from bending the fiber.

2003 - 2016 Lumerical Solutions, Inc


Applications 1771

Solvers 101

FDE
Associated files
LMA-35.lms

In this topic
Modeling instructions 1775
Discussion and results 1771

Problem definition: More details


Consider a micro-structured silica fiber that uses a PCF of air holes with pitch = 23.2 microns and hole radius = 5.8
microns, with the central air hole missing. Here, the user will learn to:

Create a PCF using the Object Library


Find the effective index of the fundamental mode at 1550 nm using Modal Analysis
Measure both the waveguide and the total (including material) dispersion of the PCF using Frequency
Analysis
Analyze the total loss, including both the propagation loss and the macro-bending loss, in 90 degree bend using
Bend Analysis

8.1.3.1.2.1 Discussion and results

Simulation set up
The PCF is constructed by perforating a circular fiber of radius 300 um with air holes forming a hexagonal lattice.
The lattice constant is 23.2 um, and the air hole radius within the photonic crystal lattice is 5.8 um. The cavity itself
is formed by removing a central hole. Since the material of the air hole is specified as "etch" (with mesh order 1),
whereas the mesh order of the fiber is 2, MODE Solutions will use the refractive index data from the air holes in
regions where the two objects overlap. For more details about mesh order, refer to the mesh order 271 page in the
Reference Guide.

It is always a good idea to start with a relatively coarse mesh (a good rule of thumb is 50 grid points in each of the x
and y direction). This way the simulation will run quickly and still provide reasonable results. When high accuracy is
required, increase the number of grid points. Note that the more grid points you use, the more memory required.

It is important to make sure that periodic structures are properly discretized in order to get accurate results. In
general, it is always good to ensure that you can fit an integer number of mesh cells within each period of the device,
and within the span of the simulation region. In this example, the x and y span are both 12 times the period of the
structure along the respective axis, and there are 60/12=5 mesh cells per period.
In the screen shot below (or if you view the mesh in MODE Solutions by clicking on VIEW SIMULATION MESH

), it is possible to see that there is a mesh cell at the same point at each period of the hole array. If the mesh
lines fall at different locations, each hole will have a slightly different size and shape, reducing the accuracy of the
simulation.

2003 - 2016 Lumerical Solutions, Inc


1772 Lumerical Knowledge Base

Note that by setting the y min boundary condition to symmetric the lowest order mode with electric field polarized
along the x axis has been chosen.

Modal Analysis Results


Before beginning Modal Analysis, one should always mesh the structure to see that the material properties that will
be used in the calculation are correct. Next, we provide an estimate of the mode effective index to the solver. In
this case, we use the SEARCH IN RANGE option because we do not yet know the effective index of the
fundamental mode. With this setting, MODE Solutions will iteratively move through the effective index range (n1 to
n2) specified, and locate any modes where the majority of the optical energy is located in the interior (and not along
the boundaries) of the computation region. Once you see a number (say, more than 5) modes appear in the index
table, press the STOP button on the progress window.

You should now have in front of you the following results:

By selecting various modes within the table, the spatial intensity profile of the mode will be plotted in the window.
Note that mode #1, with the highest effective refractive index, consists of a central intensity lobe - this is the

2003 - 2016 Lumerical Solutions, Inc


Applications 1773

fundamental mode that we are looking for (with effective index of approximately 1.4436). We can now use this value
to speed up the calculation process when using a finer mesh with the SEARCH NEAR N option. Note that the
fundamental mode is found in the first attempt, but now with a higher spatial resolution. The effective index may shift
slightly due to the higher resolution meshing.

The modes of interest are typically those that have energy near the center of the photonic crystal fiber (and away
from the PML boundary layers). Modes found near the PML boundary conditions tend to be artificial, and are
automatically hidden. The ADVANCED OPTIONS tab can be set so that MODE Solutions returns all of the modes
found should you be interested in doing so.

For each mode listed in the mode table, the effective index, propagation loss and polarization properties (see Mode
List and Deck 751 for a more precise definition) are shown.

Frequency Analysis Results


The frequency dependence of the effective index and propagation loss of a particular mode can be calculated with
the frequency analysis tool. From this the associated modal group velocity, group effective index, modal delay and
dispersion can also be determined. This type of analysis is done in the Frequency Analysis Tab. Here we determine
the waveguide dispersion of the lowest order mode over a broad range in frequency (or wavelength).

We can get the dispersion plot below by following the instructions in the "Modeling instructions" section. Note that
this is the plot of the total dispersion (i.e. material dispersion + waveguide dispersion), which at 1.55 microns is
equal to 25.8 ps/(nmkm). To calculate the dispersion to greater precision, the number of grid points could be
increased. It is good practice to double the number of grid points and see if the results change significantly.

Now, to determine the fraction of the total measured dispersion results from the waveguide itself, we need to remove
the material dispersion from the Corning material. To do this, we need to determine the refractive index of the
Corning material at the wavelength of interest (1550nm) using the MATERIAL EXPLORER (press the MATERIAL
EXPLORER button in the Material Database):

2003 - 2016 Lumerical Solutions, Inc


1774 Lumerical Knowledge Base

Note that the material is set to "Corning 7980 Silica". To determine the refractive index, set the min and max
wavelengths to 1.55 microns and press "Fit and plot", and read off the real part of the effective index (1.4440) from
the Re(index) plot. Once we set the index of the fiber to be a non-dispersive material of index 1.4440 and re-perform
the sweep, the frequency sweep plot will show that the (waveguide only) dispersion is equal to about 1.3 ps/
(nmkm). Thus, the material dispersion is the dominant component of the total dispersion for this micro-structured
fiber design.

Bend Analysis Results


The plot below shows that at around .3 meters the loss arising from the bend begins to increase dramatically. For
smaller radius of curvature bends, the fundamental mode of interest begins to couple significantly to cladding modes
within the photonic crystal fiber, leading to a complicated loss versus bend radius relationship.

2003 - 2016 Lumerical Solutions, Inc


Applications 1775

8.1.3.1.2.2 Modeling instructions


This page is divided into 4 sections. The first section describes how to set up the model (PCF structure + simulation
parameters). Sections 2 and 3 describe how to perform Modal analysis and Frequency analysis, and section 4
demonstrates how to use the built-in parameter sweeping tool to study the loss as function of bending.

In this topic
Set up model 1775
Modal analysis 1777
Frequency analysis 1778

Bend analysis 111

Set up model
The physical structures to be modeled are created using the STRUCTURES tab in the Layout Editor. The first step
is to create the fiber with the air holes.

Begin by starting MODE Solutions. You can save the MODE Simulation Project file (extension *.lms) at any point
in this process. To do so, choose SAVE in the FILE menu.

Press the MATERIAL DATABASE button and add a new sellmeier material with the following
properties:
section property value
name Corning 7980 Silica
color dark blue
Material Properties A0 1
B1 0.68374
C1 0.00460353
B2 0.420324

2003 - 2016 Lumerical Solutions, Inc


1776 Lumerical Knowledge Base

C2 0.0133969
B3 0.585027
C3 64.4933

Press on arrow on the STRUCTURES button and select a CIRCLE from the pull-down menu. Set the
properties of the circle according to the following table.
tab property value
name fiber
Geometry x ( m) 0
y ( m) 0
z ( m) 0
z min ( m) -0.5
z max ( m) 0.5
radius ( m) 300
Material Corning 7980 Silica

Press on arrow on the COMPONENTS button and select PHOTONIC CRYSTALS from the pull-
down menu. This will open the object library window.
Select HEXAGONAL LATTICE PC H-CAVITY from the list and press the INSERT button.
Set the properties of the PC Cavity according to the following table.
tab property value
name pc cavity
Properties - Origin x ( m) 0
y ( m) 0
z ( m) 0
Properties - User Properties material etch
H number 1
z span ( m) 1
n side 6
a ( m) 23.2
radius ( m) 5.8

Press on the SIMULATION button to add an EIGENMODE SOLVER simulation region. Note that if
your button does not look like the button to the left, you will need to press on the arrow to get the simulation
region. Set the properties according to the following table.
tab property value
General solver type 2D Z normal
Geometry x ( m) 0
y ( m) 0
z ( m) 0

2003 - 2016 Lumerical Solutions, Inc


Applications 1777

x span ( m) 12 * 23.2
y span ( m) 12 * 23.2 * sin(60*pi/180)
Mesh settings - Number of mesh mesh cells x 60
cells without override regions
mesh cells y 60
Boundary conditions x min bc PML
x max bc PML
y min bc Symmetric*
y max bc PML

Press the Zoom EXTENT button to resize the view in the Layout Editor.

Modal Analysis
Select the ANALYSIS tab with the RUN ACTIVE SIMULATION button .
Under the Modal analysis tab, enter the following parameters:
tab property value
Modal analysis wavelength (um) 1.55
number of trial modes 20
search in range
n1 1.44399 (max n)
n2 1.4
Click the MESH STRUCTURE button to see the meshed PCF.
Press the CALCULATE MODES button. Once you see a few modes appear in the index table, press the STOP
button on the progress window.
Once we determine the effective index of the fundamental mode to be near 1.4436, return to the layout editor by

LAYOUT button . Select the MODE object and set the number of mesh cells in x and y to be 120. This will
make the simulations slower, but more accurate.
Back to the MODAL ANALYSIS tab, now select the SEARCH NEAR N option, uncheck use max index, and enter
the effective index of 1.4436. Then press the CALCULATE MODES button.
In addition to the Modal Analysis tab, one can also view the calculated modes using the Visualizer 740 . In the
Object tree as shown below, under the Eigensolver simulation region there is a EigensolverDataGroup called
"data", which contains a material monitor as well as all the modes in the current mode list. One can then right
click on the object and choose to Visualize the different datasets corresponding to each object.

2003 - 2016 Lumerical Solutions, Inc


1778 Lumerical Knowledge Base

For example, one can visualize the Electromagnetic fields of mode1:

Frequency Analysis
Under the Frequency analysis tab, select the mode that you want to track (by clicking on it in the mode table),
and enter the following parameters:
tab property value
Frequency analysis stop wavelength (um) 1.4
number of points 10
number of test modes 3
track selected mode on
detailed dispersion calculation on
Click on the FREQUENCY SWEEP button to begin the scan. The scan will take about a minute.
To plot the calculated dispersion as a function of wavelength, select the FREQUENCY PLOT tab in the bottom
righthand corner of the frequency analysis window. Then select "Dispersion" in the plot pull down menu. The plot

2003 - 2016 Lumerical Solutions, Inc


Applications 1779

can be seen above the frequency plot tab. If you press the PLOT IN NEW WINDOW you will get a new window.
To determine the fraction of the total measured dispersion results from the waveguide geometry, as opposed to
bulk material dispersion, we need to return to the layout editor and change the material properties of the fiber.

Return to the layout editor by clicking the LAYOUT button , MODE Solutions will automatically close the
Analysis Tab.
Select the fiber structure, set the material from "Corning 7980 Silica" to "<Object defined dielectric>" and set the
INDEX to 1.444, rerun the frequency sweep.

Bend Analysis
In the following step of analyzing the photonic crystal fiber, we examine how the total loss in a 90 degree bend varies
as a function of the radius of curvature. Before running the sweep, switch back to LAYOUT and set the material for
the fiber back to "Corning 7980 Silica" and recalculate the modes. To perform a series of simulations to investigate
the effect of systematic changes on cavity performance, it is convenient to take advantage of the built-in parameter
sweep tool in MODE Solutions. There are 3 steps to setting up the bend analysis parameter sweep:

Step 1: Make data available to parameter sweep


We are interested in obtaining the loss from the fundamental mode, but the mode solver generally finds multiple
modes. In order to keep track of the desired mode, we need to store a reference copy of the fundamental mode as a
D-CARD (the D-CARD is a convenient data storage system which allows you to define, analyze, and transport data
between analysis routines and applications). Within the MODE LIST, highlight the fundamental mode, right click
and "Add selected modes to global deck", a D-CARD with the default name "global_mode1" will be created. Double
click on this D-CARD and change the name to "FUND" (note that the name should be entered in capitals).

Next, we want to save the loss of the fundamental mode at each bend radius setting.

Switch back to LAYOUT and edit the MODE data group by right clicking on the object with your mouse. Select
the Edit object option from the list as shown in the figure above.
In the Analysis->Variables tab click the bottom ADD button. This will add a result which the data group can give to
the parameter sweep. Rename the result to "loss" as shown in the bottom left window.
Switch to the Analysis_>Script tab shown in the right part of the image below. Then add the following lines of
script commands which will add data to the "loss" result once a simulation has run. Press OK to save your
changes.

fund = bestoverlap("FUND"); # find the mode that best overlaps with "FUND"

2003 - 2016 Lumerical Solutions, Inc


1780 Lumerical Knowledge Base

loss = getdata(fund,"loss"); # save the loss result for this mode

Step 2: Create a sweep


Open the Optimization and Sweeps window using the VIEW menu at the top of the graphical user interface, or by
right clicking on the top title bar 198 of the MODE Solutions GUI.
Press on the CREATE NEW PARAMETER SWEEP button to add a new sweep to the simulation. Right
click on the parameter sweep and choose to edit the parameter sweep. Set the properties according to the
following screenshot. Notice that the only results you can chose are the results which are seen in the screenshot
of the Analysis->Variables tab above.
Here, the values specified for "roc" (radius of curvature) follow the equation roc = 2/linspace(1,5.5,10)^2,
so we select "Values" as shown below and enter each value one by one. If we wish to sweep the parameter in
evenly spaced intervals, it would be easier to select "Range" and enter the Start/Stop values instead.

Step 3: Run the sweep and plot the data


In the Modal analysis window, select the "bent waveguide" option under modal analysis, and click "Calculate
Modes". This will enable the sweep to change the value for the bend radius.
Press the RUN SWEEP button in the Optimizations and Sweeps Window to run the sweep.
Just like in Modal Analysis 1777 , we can use the Visualizer 740 to plot the results.

2003 - 2016 Lumerical Solutions, Inc


Applications 1781

p
loss roc
However, here it is more useful to plot 2 (instead of just loss), since we want to determine the loss in a
90 degree bend. Note that this is the actual bend angle, not the bend orientation 111 .

To do this, open the script prompt window using the VIEW menu at the top of the graphical user interface, or by
right clicking on the top title bar 211 of the MODE Solutions GUI. Copy and paste the following commands into the
script prompt and press ENTER on the keyboard to execute them.

result = getsweepresult('sweep','loss');
loss = result.loss;
roc = result.roc;
plot(roc*1e3,loss*roc*pi/2,"radius (mm)","loss in 90 degree bend (dB)","","logplot");

8.1.3.2 1D Multilayer Stacks


Multi-layer stacks can have complicated reflection and transmission patterns. In the case of unpatterned slabs,
there are simple analytic formulas for R and T as a function of angle for each polarization. These example show how
to measure the reflection and transmission of a multilayer stack with an FDTD simulation.

In many cases, a 1D stack simulation is used an an initial starting point to verify the accuracy of the FDTD solution,
since an analytic solution exists.

Solvers 101

FDTD

See also
Transfer matrix RT calulator 156

2003 - 2016 Lumerical Solutions, Inc


1782 Lumerical Knowledge Base

Two approaches are available for studying 1D systems: Use the analytic 1D stack RT script function or use a direct
FDTD simulation.

Analytic 1D stack RT script function


The stackrt script function uses an analytic transfer matrix approach to calculate the complex reflection and
transmission coefficients of a 1D stack.

For more information, see the Transfer matrix RT calulator 156 page.

Direct FDTD simulation


When the stackrt script function described above is not sufficient, an FDTD simulation can be used to study a 1D
stack. See the following pages for examples and more information.

RT of a 4 layer stack 1782


Dipole technique 1784
Evanescent coupling 1785
Surface plasmon resonance 1881

8.1.3.2.1 RT of a 4 layer stack


We use the plane wave source technique to calculate the transmission and reflection from an n = 1:1.5:2.5:1.5
dielectric stack as a function of angle. Results for s-polarization (TM) are shown here. The simulation can be easily
modified to calculate the p-polarization.

Solvers 101

FDTD
Associated files
plane_4layer.fsp
plane_4layer.lsf

See also
Analytic solution 156

Dipole technique 1784

Simulation setup
The above figure shows the simulation file plane_4layer.fsp. The n = 1:1.5:2.5:1.5 dielectric stack is visible,
along with the plane wave source (white line, 1 um single wavelength) and profile monitors (yellow line). A plane
wave source with Bloch boundary conditions is the typical setup for this type of simulation, which makes the
simulation volume is basically 1D. Each simulation will provide R and T at a single angle. A series of simulations
must be run to calculate R and T vs theta. After opening the fsp file, run the parameter sweep followed by the
plane_4layer.lsf script file to reproduce the following results.

Advantages:
This technique can easily be extended to periodic gratings

2003 - 2016 Lumerical Solutions, Inc


Applications 1783

Simulation volume is very small, so each simulation is fast

Disadvantages:
One simulation is required for each angle

An alternate simulation setup is described on the Dipole technique page.

Results
The parameter sweep is set up to run 30 simulations at angles from 0 to 60 degrees. Once the parameter sweep is
complete, the script plots the results from the parameter sweep with the theory. Below you can see the reflection
and transmission for an s-polarized (TM) plane wave.

Note: (fixed as of FDTD 8.11.387)


If you are finding 'engine errors' during the last few iterations, it may be due to the simulation setup being
incompatible with the number of processes enabled. This can happen sometimes for small volumes with angled
sources. To fix, use the Resource Manager 213 to reduce the number of processes used to 1 or 2.

The results shown in the above figure are good, but can be improved upon. The fsp file and script are setup to use a
10 nm mesh, which gives good results while keeping the simulation time reasonably short. Re-running the
calculation with a 5nm mesh will give much better agreement. To use a 5nm mesh, change the following settings.

In the simulation file, go to the objects tree and edit the following objects
FDTD region: Set the "x span" to 5nm. Set "dx","dy" to 5nm.
In the simulation file, go to the optimization and sweeps window, then
Edit the sweep, and set the number of points to 60. As a result the reflection and transmission plots will contain
more points so they will look smoother.

PML
The simulation region boundary conditions in the y-direction use SCPML with the "steep angle" profile to prevent any
reflections from light incident at steep angles. More information on the PML profile settings can be found at PML
boundary conditions 460 .

Detailed comparison with analytic results


The above results were generated with a 10nm mesh. Therefore, the thicknesses of each layer was resolved to

2003 - 2016 Lumerical Solutions, Inc


1784 Lumerical Knowledge Base

within 10 nm. It is interesting to see how sensitive the analytic solution is to variations of 10 nm in the layer
thicknesses.

The figure above shows the same FDTD reflection result as in the previous figure. The other two lines show the
minimum and maximum reflections that will occur by changing the thickness of the two middle layers by +5nm or -
5nm, as calculated with the analytic formula. The results are clearly within the error of the mesh.

8.1.3.2.2 Dipole technique


In this page, we use an alternate simulation setup (compared to the standard planewave source 1782 based method)
with a dipole source to calculate the reflection from a multi-layer stack. In this case, we use an Air - Glass interface.
This technique is appealing because it allows the reflection at all angles to be calculated in a single simulation.
Another advantage is that all the simulation boundaries are set to PML, which can lead to better performance for
angles at or near the critical angle.

Solvers 101

FDTD

Associated files
dipole_2layer.fsp
dipole_2layer.lsf
dipole_4layer.fsp
dipole_4layer.lsf

See also
RT of a 4 layer stack 1782

Analytic solution 156

Simulation setup
The above figure shows the simulation setup of dipole_2layer.fsp. The Air - Glass interface is visible, along
with the dipole source (blue circle) and profile monitor (yellow line). A profile monitor is located just below the

2003 - 2016 Lumerical Solutions, Inc


Applications 1785

stack. Forward and backward far field projections are calculated from the monitor. The reflection can be calculated
by dividing the backward projection by the forward projection. One simulation per polarization is required.

Advantages:
One simulation gives R and T at all angles
Disadvantages:
This technique can only be used for unpatterned slab, not for gratings
As the stack becomes larger, very wide simulation spans may be required

Results
The script dipole_2layer.lsf will run two simulations, and then calculate the analytic solution. The simulated
and analytic reflection and transmission vs. incident angle are plotted for both polarizations.

8.1.3.2.3 Evanescent coupling


In this example, light is incident upon an interface beyond the critical angle. In most situations, such an interface
will have 100% reflection. However, if another high index layer is nearby, light will evanescently couple through the
low index gap into the upper layer.

2003 - 2016 Lumerical Solutions, Inc


1786 Lumerical Knowledge Base

Solvers 101

FDTD
Associated files
evanescent.fsp
evanescent.lsf

Simulation setup
The above figure shows a plane wave propagating at 33 degrees through a material with an index of 2. There is a
0.5um air gap between the two high index layers. The source wavelength is 1um.

The built in parameter sweep is used to change the source angle and run one simulation per source angle. As in the
plane wave R and T calculations, the source angle is set in the model. The model then changes both the source
angle and the minimum number of PML layers to match the source angle. For more details, see the section entitled
PML on the Planewave technique page (go to the R and T calculations link directly above).

Analysis
A quick calculation with Snell's law would lead you to believe that nothing will propagate beyond the first interface,
since 33 degrees is past the critical angle of this interface.
n1 sin q1 = n2 sin q 2
2 sin q1 = 1sin( 90)
q1 = 30
However, the evanescent fields extend some distance through the air and can couple into the third layer.

Results

2003 - 2016 Lumerical Solutions, Inc


Applications 1787

This figure shows a cross-section


of the Ez 2 in the y-direction.
The source is located at y=-
0.9um. The air gap is from 0-
0.5um.
The constant value of 0.9 shows
the reflected wave behind the
source. The sinusoidal region is
caused by interference between
the incident wave and the
reflected wave. The exponentially
decaying line from 0-0.5 shows
the evanescent wave extending
through the air. Past y=0.5, the
wave couples into a propagating
mode in the third layer.

To reproduce this image run


evanescent.fsp and plot the
Ez intensity vs y from the field
monitor.
The transmission and reflection
curves with a 2 layer stack
n=2:1. The critical angle is
clearly visible at 30 degrees.

To reproduce this plot


edit the multilayer stack in the
simulation: set the num_layers
variable in the to 2
run the evanescent.lsf
script file (the sweep will be run
automatically)

Transmission and reflection


curves with a 3 layer stack
n=2:1:2, when the middle layer is
0.5 um thick.
The third layer allows the light to
evanescently couple across the
air gap.

To reproduce this plot


edit the multilayer stack in the
simulation: set the num_layers
variable in the to 3
run the evanescent.lsf
script file (the sweep will be run
automatically)

2003 - 2016 Lumerical Solutions, Inc


1788 Lumerical Knowledge Base

8.1.3.3 Gratings
Please select one of the following topics.

Blaze grating 1788


Grating order transmission 1790
Microwire polarizer 1797
Resonant bio-sensor grating 1801

8.1.3.3.1 Blaze grating

Introduction
This example shows how to calculate the grating orders from a blaze grating. This grating has many grating orders
at each wavelength. In order to capture the signature of the total reflection and transmission, more frequency points
in the monitors are required.

Solvers 101

FDTD

Associated files
grating_blaze.fsp
grating_blaze.lsf

See also
BFAST 590
Gratings 1788
Grating order
transmission 1790
Grating projection
toolbox 150
Broadband Injection
Angles 536

Simulation setup
A blaze grating is shown in the simulation file above. It is composed of a low index (1.4) substrate with a 40nm thick
high index (3.4) coating. The grating angle is 30 degrees. A broadband plane wave source is incident at 15
degrees. We will use the grating order transmission analysis objects described in the Grating order transmission
section to measure the reflection and transmission.

Results
Open grating_blaze.fsp and run the simulation. When it finishes, use the script grating_blaze.lsf to
calculate the reflection and grating orders at a fixed wavelength from the grating. Note that we used BFAST 590
source so all the interested wavelengths have the same incident angle.

2003 - 2016 Lumerical Solutions, Inc


Applications 1789

The first figure shows


the index profile of
the grating.

The second figure


shows the reflection
of all diffraction
orders as a function
of wavelength from
0.4um to 0.7um. As
can be seen from the
figure below, at each
wavelength, there are
many diffraction
orders. In order to get
a smooth reflection
curve, more
frequency points than
usual is required. In
this example, 150
frequency points are
used. However, as
can be seen, even
more frequency
points (such as 200)
are needed to have
smoother result.

2003 - 2016 Lumerical Solutions, Inc


1790 Lumerical Knowledge Base

The third figure


shows the reflection
as a function of angle
for a given wavelength
of 0.5um. If you want
to get this result at
any other wavelength,
just simply modify
the
"target_wavelength"
in the script.

8.1.3.3.2 Grating order transmission

Introduction
This example provides example simulations which use the grating order transmission analysis group to calculate the
fraction of power transmitted into each grating order. It also shows how to calculate the number of grating orders
that exist as a function of wavelength. The grating order transmission analysis group is available from the object
library.

Solvers 101

FDTD
Associated files
grating_order_transmission.fsp
grating_order_transmission.lsf

See also
BFAST 590
Grating examples 1788
Grating projection toolbox 150
Grating and far field projection analysis
objects 813
grating 1666 , find 1489 , pinch 1483 script
commands

Simulation setup
Calculating the total transmitted power through a monitor is very easy to do with the transmission function.
However, it is sometimes necessary to calculate the power scattered into a particular grating order of a periodic
structure. This calculation is more challenging, requiring both the grating and transmission functions, plus a
reasonable amount of matrix manipulation. The analysis object also calculates the number of supported grating
orders.

The associated simulation files use the grating order transmission analysis object to do these calculations. You can
insert this object from the object library in the far field projections section.

Results
To reproduce these results, open grating_order_transmission.fsp, then run
grating_order_transmission.lsf. The script will run the simulation, then run the analysis object scripts and

2003 - 2016 Lumerical Solutions, Inc


Applications 1791

create some final plots, as shown below. Note that we used BFAST 590 source so all the interested wavelengths
have the same incident angle.

Figures created by the analysis objects:


Transmission monitor Reflection monitor
N
u
m
b
er
of
s
u
p
p
or
te
d
gr
at
in
g
or
d
er
s

N
ot
ic
e
th
at
th
e
-Z
di
re
ct
io
n
(r
efl
e
ct
io
n)
s
u
p
p
or
ts
m
or
e
or

2003 - 2016 Lumerical Solutions, Inc


1792 Lumerical Knowledge Base

d
er
s.
T
hi
s
is
d
u
e
to
th
e
hi
g
h
er
in
d
e
x
of
th
e
s
u
b
st
ra
te
.
Al
s
o
n
ot
ic
e
th
at
m
or
e
gr
at
in
g
or
d
er
s
ar
e
s
u
p
p
or

2003 - 2016 Lumerical Solutions, Inc


Applications 1793

te
d
at
s
h
or
te
r
w
av
el
e
n
gt
h
s.
T
ot
al
tr
a
n
s
m
is
si
o
n
th
ro
u
g
h
th
e
m
o
ni
to
r,
a
n
d
th
e
tr
a
n
s
m
is
si
o
n
to
th
e

2003 - 2016 Lumerical Solutions, Inc


1794 Lumerical Knowledge Base

(0
,0
)
gr
at
in
g
or
d
er
.

N
ot
ic
e
th
at
w
h
e
n
th
er
e
is
o
nl
y
o
n
e
s
u
p
p
or
te
d
gr
at
in
g
or
d
er
,
T
_(
to
ta
l)
is
e
q
u
al
to

2003 - 2016 Lumerical Solutions, Inc


Applications 1795

T
_(
0,
0)
Pr
o
p
a
g
at
io
n
di
re
ct
io
n
of
th
e
(0
,0
)
gr
at
in
g
or
d
er
,
in
te
r
m
s
of
th
et
a,
p
hi
.

2003 - 2016 Lumerical Solutions, Inc


1796 Lumerical Knowledge Base

T
h
e
pr
o
p
a
g
at
io
n
di
re
ct
io
n
a
n
d
st
re
n
gt
h
of
th
e
gr
at
in
g
or
d
er
s
at
0.
8
u
m
.

Figures created by the script grating_order_transmission.lsf.


Number of supported grating
orders in both reflection and
transmission.

2003 - 2016 Lumerical Solutions, Inc


Applications 1797

Total reflection and


transmission, and the
reflection and transmission
into the (0,0) grating order.

8.1.3.3.3 Microw ire polarizer

Introduction
High-contrast polarization control devices composed of sub-wavelength metal gratings - nanowire grid polarizers - are
replacing bulk optical elements. Nanowire grid polarizers offer improved extinction ratio contrast, minimal absorption
to address high brightness illumination, and compact form factors to facilitate mass manufacture and integration
within small optical assemblies. However, nanowire grid polarizers are challenging components to design,
especially if manufacturing imperfections are taken into account. In this application example, we show how FDTD
Solutions can be used to maximize the contrast ratio of a nanowire grid polarizer at any angle, while maintaining
high transmission.

Solvers 101

FDTD
Associated files
mwp.fsp
mwp_spectrum.lsf
mwp_dutysweep.lsf
mwp_45deg.lsf

See also
Gratings 1788

References
Ahn et al,. "Fabrication of a 50 nm half-pitch Schematic diagram showing light incident on the top surface of the
wire grid polarizer using nanoimprint nanowire grid polarizer.
lithography", Nanotechnology, 16, 18741877
(2005)

Simulation setup
We will calculate the contrast ratio of a nanowire grid polarizer made of a glass substrate (n=1.4) with an aluminium
nanowire grating of linewidth W and thickness H. The source illuminates the top surface of the grating polarizer. We
anticipate that the polarizer should block S-polarized light, i.e. when the electric field is polarized tangential to the
grating lines as shown in the figure above.

In the first analysis, we will calculate the contrast ratio versus pitch for a 50% duty cycle grating with thickness of
H=140nm and normal incidence light. The pitch will be varied between 40nm and 240nm (corresponding to a variation
in linewidth of W=20nm to W=120nm). We will plot the results at 3 different wavelengths (=450nm, =550nm and
=650nm).

In the second stage of the analysis, we will calculate calculate the contrast ratio at 550nm and a grating pitch of
140nm as a function of the duty cycle, again with light at normal incidence.

The third investigation involves illuminating the nanowire grid polarizer with non-normal incidence light. Efficiency of
the previous structure (550nm wavelength, 140nm pitch) with a 50% duty cycle is measured at a 45 degree

2003 - 2016 Lumerical Solutions, Inc


1798 Lumerical Knowledge Base

incidence angle. Field amplitude and phase plots are also generated.

Contrast ratio vs pitch


The results of the mwp_spectrum.lsf script are shown below. By sampling the contrast of the transmission for
gratings with several different periods we can find the desired results. This result is in good agreement with the
results obtained by Seh-Won Ahn et al..

Tip: Movie monitors


You can add a movie monitor to your simulation to view the time domain fields. To make the movies easier to
interpret, increase the simulation size to include multiple periods of the device. In these simulations, we simulate
5 periods of the device.

2003 - 2016 Lumerical Solutions, Inc


Applications 1799

Movies of P (left) and S (right) polarized simulations

Contrast ratio vs duty cycle


The script mwp_dutysweep.lsf performs a parameter sweep to calculate the contrast ratio versus grating duty
cycle and plots three results: the contrast, the S transmission and the P transmission.
Contrast ratio of
the aluminium
nanowire grid
polarizer as a
function of the
grating duty
cycle.

This plot
apparently
shows that the
contrast ratio
varies over 7
orders of
magnitude and
has a maximum
at a duty cycle
of 0.9. However,
this curve is
misleading
because the
large contrast
ratios are in fact
due to a small S
transmission.
Transmission of
S-polarized light
for the
aluminium
nanowire grid
polarizer as a
function of the
grating duty
cycle.

This S
transmission is
numerically
simulated to be
approximately
2e10^-6 for a
duty cycle of
50% and
decreases to
10^-12 for larger
duty cycles. For
manufactured
devices, S
transmissions
on the order of
10^-3 are more

2003 - 2016 Lumerical Solutions, Inc


1800 Lumerical Knowledge Base

realistic.

Transmission of
P-polarized light
for the
aluminium
nanowire grid
polarizer as a
function of the
grating duty
cycle.

This curve
shows that the
transmission of
P-polarized light
decreases as
the duty cycle
increases.
Based on these
results, an
aluminum
grating with a
duty cycle of
50% has a
transmission of
about 85%.
With an s-
polarized
transmission of
2e10^-6 , an
ideal 50% duty-
cycle aluminum
grating can
achieve a
contrast ratio of
approximately
4e10^6.

The above results demonstrate that contrast ratios on the order of 4e10^6 can be obtained. However, such large
contrast ratios are difficult to achieve in practice due to manufacturing imperfections.

Non-normal incidence
Open mwp.fsp, and run mwp_45deg.lsf. The script will first modify the simulation parameters in the following
way:
The boundary conditions are changed from periodic to Bloch, which are required for non-normal incidence
illumination.
The source is rotated by 45 degrees
The simulation volume along the Y-axis is increased to make the fields easier to visualize.
The source polarization is set to P (or TE)

2003 - 2016 Lumerical Solutions, Inc


Applications 1801

The electric field intensity is plotted for a


cross-section through the nanowire grid
polarizer.

It's interesting to note that there is no


interference pattern visible above the grating
because the angle is exactly 45 deg. For
other angles, an interference pattern would
be observed.

The real part of Ex (left) and Ey (right) field


components. The ripples in the region above
the aluminum metal grating result from
interference between the incoming light and
that reflected from the top surface of the
nanowire grid polarizer.

The phase of the Ex (left) and Ey (right) field


components. The change in angle of the
wavefront results from the higher refractive
index of the silicon substrate relative to the
air region above the aluminum grating
nanowire grid polarizer.

The aluminum grating wiregrid polarizer has a TE transmission of approximately 85% for a normally-incident plane
wave. The transmission is mostly unchanged for a 45 degree incidence.

Note: Multiple periods


Only one period has been simulated, but pictures spanning multiple periods can be generated by concatenating
several copies of the data together, and adjusting the phase accordingly. See image stitching 867 for more
information about this.

8.1.3.3.4 Resonant bio-sensor grating

Introduction
We will calculate the reflectivity of a simple dielectric grating described in Cunningham et al. This grating is
designed to create a narrow resonant reflectivity line that can be used in biosensor applications.

2003 - 2016 Lumerical Solutions, Inc


1802 Lumerical Knowledge Base

Solvers 101

FDTD
In this topic
Introduction 1801
Simulation setup 1802

Results 1802
Associated files
grating_silicon_nitride.fsp
grating_silicon_nitride.lsf
See also
Gratings 1788

Related publications
Cunningham et al,. "A plastic colorimetric
resonant optical biosensor for multiparallel
detection of label-free biochemical
interactions", Sensors and Actuators, B, 85,
219-226 (2002)

Simulation setup
The grating is made from a thin layer (120 nm) of Silicon Nitride deposited on a 200 nm thick grating of epoxy. The
period of the grating is 550 nm and we will consider a wavelength range of 750 nm to 900 nm. This grating is
designed to create a narrow resonant reflectivity line that can be used in biosensor applications.

As a first approach, we will use a dielectric index of 2.05 for the Silicon Nitride and and 1.5 for the epoxy. The grating
itself is immersed in water, which can be set by defining the background index for the simulation to be 1.333. We
will ignore any material dispersion or loss.

In the setup, we have 3 point time monitors to verify that the field decays by the end of the simulation. We use 2
power monitors with 2000 frequency points to measure the transmission and reflection from 750 to 900 nm. We use
a mesh accuracy of 4. However, as with many periodic structures, a mesh override region is required at the grating.
This is used only in the x direction to ensure the structures symmetry.

It is also worth noting that the automatic shutoff is set to 10e-9 for this simulation. This structure has a sharp
resonance that will last a long time, but contain only a very small fraction of the total energy that was injected into
the simulation. The default automatic shutoff setting would terminate the simulation too early, leading to inaccurate
power measurements.

Results
Step 1
Run the simulation. Note that the polarization of the simulation is TE, meaning that the electric field (blue arrows) is
normal to the lines of the grating. After running the simulation, look at the reflection time signal in the grating, and
zoom in, it should look like the following. We can see that the field has decayed and that the simulation has run long
enough, so the data is valid.

2003 - 2016 Lumerical Solutions, Inc


Applications 1803

Step 2
Run the script file grating_silicon_nitride.lsf. This file will calculate and plot the transmission (T) and
reflection (R) and plot the results as a function of wavelength. It will also plot R+T to verify that R+T=1. The maximum
error in R+T=1 is only 0.9% across the entire wavelength range.

The reflection spectrum only is also plotted, as shown below. The figure is nearly identical to the experimental
results shown in Figure 3 of Cunningham et al. The small discrepancies are due to any differences in the actual
material refractive indices and the values used in the simulation, as well as any manufacturing imperfections in
device fabrication.

2003 - 2016 Lumerical Solutions, Inc


1804 Lumerical Knowledge Base

Step 3
We can rerun the simulation with TM polarization (electric field tangential to the grating lines) and obtain this result.
For this polarization, we don't see the narrow resonance.

8.1.3.4 Cavities and Resonators


Please select one of the following topics.

Features and analysis


Quality factor calculations 1807

Correcting field profile amplitudes 1805

Understanding monitor apodization 660

Application examples
Photonic Crystal Cavity Tutorial 1759

2003 - 2016 Lumerical Solutions, Inc


Applications 1805

3D Photonic crystal cavity 1841

Simple High Q example 1813

Whispering gallery modes 1815

Purcell factor 1816

Bragg microcavity 1818

3D PC cavity analysis 1841

Other resources
Webinar - Cavities and resonators video

8.1.3.4.1 Correcting field profile amplitudes

Objective
This example shows how to correct the amplitude of field data recorded by frequency domain monitors when the
simulation does not run long enough for the fields to fully decay.

Solvers 101

FDTD
Associated files
cavity_mode_amplitude.fsp
cavity_mode_amplitude.lsf

See also
Cavities and resonators 1804
Quality factor calculations 1807

Monitor apodization 660

Correcting mode profile amplitudes


The absolute mode profile describes the spatial shape of the fields AND the strength of the coupling between the
source and cavity mode. The absolute mode profile is usually not a quantity of interest because the FDTD source
used to excite the cavity is not representative of the physical source that excites the cavity.

NOTE:
In most cases, it's not necessary to calculate the absolute amplitude of the mode profile. The Quality (Q) factor
and relative mode profile are usually the quantities of interest.

If your FDTD source is representative of the physical source, you may want to know the actual amplitude of the
mode profile. This page shows how to correct the mode profile amplitude for high Q cavities where it's not practical
to run the simulation until the fields decay to zero.

The reason that the amplitude will be incorrect is that the simulation ends before the cavity fields have decayed to
zero, as shown in the following figure. The frequency monitor field normalization is only correct when the entire time
signal is considered. This effect is very similar to configuring the monitor to use End Apodization.

2003 - 2016 Lumerical Solutions, Inc


1806 Lumerical Knowledge Base

Figure 1

It's possible to correct the field amplitude's simply by re-scaling the fields. The field amplitude is proportional to the
area under the curve of the above figure. Therefore, we need to correct the fields by the fraction of the area that was
missed because the simulation stopped too early. The field scale factor is a function of the resonant frequency, the
simulation end time, and the Quality factor of the mode:
1
g=
- wt END
2Q
1- e
r r
E = gEsim

The file cavity_mode_amplitude.fsp contains an analysis group that does this calculation. The group "mode
profile and Q" contains a frequency domain field monitor and a Q analysis group. The Q analysis group is used to
calculate the Q-factor of the mode. Once the Q is known, the group rescales the field data from the field monitor by
gamma, the field scale factor.

To see how it works, run the script file name cavity_mode_amplitude.lsf. The script will run two simulations:
one that is 500fs long and and other that is 3000fs long. The script will plot |E(t)|^2, |E(x,y)|^2 directly from the
monitor, and |E(x,y)|^2 after it has been rescaled.

Simulation time = 500fs Simulation time = 3000 fs


Cavity fields as a function of time at the
center of the cavity.

Notice that the 500 fs simulation is not


long enough for the fields to fully decay.

Figure 2 Figure 5

2003 - 2016 Lumerical Solutions, Inc


Applications 1807

Field profile from the field monitor.

Notice that the field amplitude depends on


the simulation time. If the simulation
doesn't run long enough, the field
amplitude will be smaller than it should
be.

Figure 3 Figure 6
Field profile from the the analysis group,
after the field data has been rescaled.

Notice that the field profile is the same


from the 500 and 3000fs simulations. The
fields from the 500fs was rescaled by a
larger amount to compensate for the
shorter simulation time.
Also notice that the scale factor for the
3000 fs simulation is ~1. There is no
need to re-scale the fields if the simulation
Figure 4 Figure 7 runs long enough for the fields to fully
decay.

The key points to notice are:


1) The 3000fs simulation is long enough for the fields to decay to zero so there is no need to re-scale the fields.
Figure 6 and 7 are basically the same because the scale factor is 1.
2) The 500 fs is too short for the fields to decay. Therefore, the fields from the field monitor need to be rescaled. In
this case, the scale factor is approximately 3.
3) The "absolute field profile and Q" group returns the same field profile from the 500 and 3000fs simulation.
Therefore, there is no need to run a simulation until the fields decay. All information can be extracted from the
shorter simulation.

8.1.3.4.2 Quality factor calculations

Objective
This page describes how to calculate the quality factor (Q) of resonance peaks in a resonant cavity.

There are two classes of cavities for Q factor calculations, low Q cavities and high Q cavities. The 2D example file
includes both the standard (high) Q analysis object, and the low Q analysis object. The 3D example only includes
the standard analysis object because the quality factor of this cavity is too high for the low Q object. Both
simulation files contain a cavity that supports two modes, and a Q analysis group to compute the Q factor. The high
and low Q analysis groups can also be inserted into your simulation from the object library in the resonators section.

2003 - 2016 Lumerical Solutions, Inc


1808 Lumerical Knowledge Base

Solvers 101

FDTD
In this topic
Low Q cavities 1808
Hi Q cavities 1809
Associated files
quality_factor_2D.fsp
quality_factor_3D.fsp

See also
Cavities and resonators 1804

Advanced notes 1811

Low Q cavities
A cavity is called a low Q cavity when the electromagnetic fields decay completely from the simulation in a time that
can be simulated reasonably by FDTD. In this case, the quality factor can be determined from the Fourier transform
of the field by finding the resonance frequencies of the signal and measuring the full width half maximum (FWHM) of
the resonant peaks. We can then use Q = fR /Df where fR is the resonant frequency and Df is the FWHM.

Example:
The low Q analysis group contained in the quality_factor_2D.fsp simulation uses this method to find the Q
factor of resonance frequencies. Run the simulation file. Then choose to edit the low Q analysis object and press the
RUN ANALYSIS button. The analysis script output will contain the location of the resonance frequencies and their
corresponding Q factors.

Resonance 1:
frequency = 230.727THz, or 1299.34 nm
Q = 156.883 +/- 0.82616
Resonance 2:
frequency = 205.814THz, or 1456.62 nm
Q = 77.498 +/- 0.226738

The analysis script also creates two plots. The plot shown below to the left contains one of the field components
(Hz). You can see that the fields have decayed by the end of the simulation time. The second plot shows the
location and relative amplitude of the resonance peaks.

2003 - 2016 Lumerical Solutions, Inc


Applications 1809

Note that the initial transients of the source are neglected by setting the "start time" for the time monitors to 200fs.
The "start time" for the time monitors is the time at which the monitors begin recording data. This setting can be
changed in the user properties for the analysis group. Also, note that in the analysis group, it is possible to use one
time monitor or an array of time monitors for the Q factor calculation. The problem with using one time monitor is
that if the one monitor is placed at or near a null of the cavity mode, then due to the fact that the field intensity is
very low, the Q factor can have a large uncertainty (if it is even possible to obtain a meaningful result).

The quality_factor_3D.fsp simulation file contains a 3D version of the low Q analysis object. This object can
also be added from the object library.

High Q cavities
A cavity is considered to be a high Q cavity when the electromagnetic fields cannot completely decay from the
simulation in a time that can be simulated reasonably by FDTD. In this case, we cannot determine Q from the
frequency spectrum because the FWHM of each resonance in the spectrum is limited by the time of simulation,
Tsim , by FWHM ~ 1/Tsim . Instead, the quality factor should be determined by the slope of the envelope of the
decaying signal using the formula
- 2 pf R log 10 (e)
Q=
2m
where fR is the resonant frequency of the mode, and m is the slope of the decay in SI units.

Derivation of Q factor formula:

The quality factor (Q) is defined as


wr
Q=
FWHM
where wr is the resonant frequency ( r=2 fR) and FWHM is the full width half max of the resonance intensity
spectrum. The time domain signal of the resonance is described by
E (t ) = e - t ( a -i wr )u (t )
where a is the decay constant. The Fourier transform of E(t) is easy to calculate.
2 1
E(w) =
a + (w - w r )
2 2

= r. With a little more work, we can determine that the half


The maximum value of |E( )|^2 is clearly 1/a^2, at

max frequencies occurs at = r + a and = r - a . Therefore, FWHM = 2a . Substituting this value into the
original Q formula and solving for a gives

2003 - 2016 Lumerical Solutions, Inc


1810 Lumerical Knowledge Base

wr
a=
2Q
Now that we know how to relate a to Q, we must determine how the slope of the time signal decay is related to Q.
We must take the log of the time signal to make the envelope a linear function.

- wr t
log 10 (| E (t ) |) = log 10 (e) = mt
2Q
where m is the slope of the log of the time signal envelope. Solving for Q, we get
- wr log 10 (e)
Q=
2m .

Example:

Calculation of the Q factor for high Q cavities is complicated because


separating the decay of the envelope from the underlying sinusoidal signal is difficult since the fields are typically
real-valued
if there are multiple resonant modes, they will interfere with each other in the time domain, making it hard to
estimate the decay rate.

By opening the edit dialog box for the Q factor analysis object located in quality_factor_3D.fsp, you can
see that the analysis object solves these problems by
accurately calculating the envelope of the time-domain field signal
isolating each resonance peak in the frequency domain using a Gaussian filter, and then taking the inverse Fourier
transform to calculate the time decay separately for each peak. The slope of the time decay is then used to
calculate the Q factor and obtain an error estimate.

In addition, note that:


the Q analysis object has setup variables that allow you to choose how many time monitors to use to calculate
the Q factor. It is often a good idea to add a few point monitors at different locations to reduce the chances that a
monitor is placed at a node in the mode profile of a cavity mode yielding a weak signal.
in the analysis tab, there is a parameter that can be set to choose how many resonant peaks to look for
all the field components that are available are used to calculate the Q factor
it is possible to change other parameters, such as the Gaussian filter width and resolution in the frequency
domain. These parameters are set in the analysis script.
in the script, only the part of the time signal lying in 40-60% of the time signal collected is used for the slope
calculation. These percentages can easily be changed. However, setting the upper limit to anything greater than
90% can lead to errors due to the fact that Fourier transforms, and inverse transforms were used when the
Gaussian filter was used to isolate the peak. The Fourier transforms introduce errors to the end of the time signal
due to the fact that discrete Fourier transforms assume periodicity of the signal.

Next, run the simulation. When the simulation is complete, choose to edit the analysis object and press RUN
ANALYSIS button. The analysis script output will contain the location of the resonance frequencies and their
corresponding Q factors.

Resonance 1:
frequency = 178.786THz, or 1676.82 nm
Q = 306.279 +/- 1.41318
Resonance 2:
frequency = 227.307THz, or 1318.89 nm
Q = 274.874 +/- 4.50921

The analysis object also produces the following plots (by modifying make_plots=0 to make_plots=1 before running
the analysis).

2003 - 2016 Lumerical Solutions, Inc


Applications 1811

The time decay of the field components and their The spectrum and the Gaussian filters used to isolate
envelopes. Note that not all the field components have the resonant peaks.
decayed by the end of the simulation time. The image
shown at the top of this topic shows a close-up of the
data for the field drawn in red (Ey).

The spectrum of resonances. Each resonant peak The time decay of the sum of squared field components
appears in a different color. on a logarithmic scale. The slope of these lines is used
in the Q factor calculation.

The quality_factor_2D.fsp simulation file contains a 2D version of the Q analysis object.

8.1.3.4.2.1 Advanced notes

Resonator response to a given source excitation


In a linear system, the response of a resonator is an intrinsic property of the device, independent of the type the
source excitation used. In the frequency domain, the response of the system can be related to the source by

t ( w ) = h( w ) i ( w )

where t is the response (for example, the electric field at a point in space), i is the source signal (for example, the
dipole moment) and h is the transfer function that relates both quantities for each angular frequency w. The quantity
h is an intrinsic property of the resonator and is the impulse response of the system, ie the response when i(w) = 1,
or i(t) is a delta function.

When calculating quality factors, we are interested in the case where h contains a single pole response
r
h( w ) = + b( w )
i (w - w r ) - a

2003 - 2016 Lumerical Solutions, Inc


1812 Lumerical Knowledge Base

where b(w) are additional contributions to h, typically representing much broader features in the frequency domain
that decay very rapidly in the time domain. We know a is related to Q by
wr
a=
2Q

Low Q cavities

The ideal method for calculating Q is to calculate h(w) and extract Q. This is what we do when Q is small enough
that we can run the simulation until the fields have decayed. We then calculate h(w) by

h( w ) = t ( w ) / i ( w )
In FDTD Solutions, with the cw normalization turned on, we are calculating h(w) and therefore obtain the intrinsic
quality factor, independent of the type of the source excitation pulse or spectrum. Repeating Q measurements with
different lengths of source pulses, or even with extremely complicated source pulses will not change the function
h(w) measured except for some numerical error which can become large if i(w) is very small near the resonant
frequency.

High Q cavities

When working with high Q cavities, we want to find a method that is more efficient to calculate Q because it is
impractical to run FDTD simulations long enough to calculate h(w) correctly. As a result, we recognize that if and
only if the source pulse is a delta function, we have

t ( w ) = h( w )
t (t ) = r exp (- at + i wr t )u (t )

We can therefore extract the value of Q by measuring a from the exponential decay in the time domain. It is critical
to note that we only have exponential decay of the time signal if the source pulse is a delta function. If we use any
other function to excite the the resonator, we cannot use this method to extract the quality factor as we cannot
disentangle the contribution of the source pulse and the resonator itself without running the simulation until the fields
have completely decayed. In practice, we cannot use a delta function for the source, but we can make the
approximation that the source is a delta function as long as the function i(w) is nearly constant over the bandwidth of
the resonator. As a result, it is not relevant to try and normalize away the source spectrum as we do in the low Q
case, because we must assume that the source is approximately a delta function to perform this calculation. Using
other source spectra will result in time domain fields that do not necessarily decay exponentially.

By using a near delta function as the source input, we can assume that the time domain fields will decay
exponentially, and we can try to extract the quality factor from that decay. In reality, h(w) is more complex than a
single pole response, due to the contributions of b(w), and we must wait for the other contributions of h to disappear
in the time before we can measure the decay rate. Fortunately, the contributions of b(t) generally decay much faster.
For this reason, we must remove some of the early time signal to measure the exponential decay accurately. The
amount of time that must be removed is somewhat problem dependent.

The majority of the calculation in the high Q cavity calculation is associated with extracting the exponential decay
from a time signal of the form
exp (- at ) cos(wr t )
and eliminating the early part of the time signal where h(t) has other terms that make it difficult to extract the decay.
The more advanced parts of the calculation involve extracting several decay rates from several single pole
resonances at different resonant frequencies by doing some filtering in the frequency domain before returning to the
time domain to calculate the decay.

2003 - 2016 Lumerical Solutions, Inc


Applications 1813

8.1.3.4.3 Simple High Q example

Objective
This page will go through the simulation setup and analysis of results using a 1D multilayer stack cavity device as
an example. There are a broad range of different types of cavities and resonator devices, so the required simulation
setup will be different depending on the device being simulated, and the quantities of interest.

Solvers 101

FDTD
Associated files
high_Q_resonator.fsp
high_Q_resonator.lsf

See also
Quality factor calculations 1807

Multilayer stacks 1781

Introduction
The device in the associated simulation file uses distributed Bragg reflectors (DBRs) that act as mirrors which trap
light in the cavity between them. The script file calculates the theoretical quality factor (Q) of the device, sets up the
simulation structure and mesh override region, runs the simulation, and gets the simulated Q result which is
calculated using the high Q analysis group. The script outputs the theoretical Q and the simulated Q.

The theoretical Q factor for this resonator is approximately 428000 whereas the Q factor achieved by the simulation
is approximately 407000. This agreement (roughly 5% difference) is quite good, given that the performance of these
high Q devices can be extremely sensitive.
Q FDTD: 406864
Q theory: 427854

Note: Detailed information about calculating the analytic reflection/transmission spectrum of a multilayer stack can
be found in the Multilayer stacks 1781 application section.

Simulation setup
Structure
For periodic structures, parameterization of the design makes it simpler to make changes to the device while
reducing the risk of mistakes. In the example, the structure and mesh are automatically set up by the
high_Q_resonator.lsf script, so you can simply change the desired set up parameters (such as the number of
mirror periods) in the script, and the new structure will be set up automatically when the script is run.

Some pre-made structures such as the ring resonator and photonic crystal cavities can be inserted from the object
library.

Simulation region
A simple rule of thumb is to keep PML boundaries at least half a wavelength away from the structures. If the PML
boundaries are too close to the structures they may absorb radiation that would have otherwise remained in the
simulation, and this is an artificial source of loss.

If the device has some periodicity, it is important for the simulation mesh to match the periodicity of the device. If
mesh lines fall at different locations for each period of the structure, each period will be meshed in a slightly different
way, breaking the perfect periodicity required in a high Q system. You can avoid this problem by ensuring there are
an integer number of mesh cells in each period. In the example simulation, the mesh step size in the mesh override
regions is chosen so that there are an integer number of mesh cells per period of the device.

2003 - 2016 Lumerical Solutions, Inc


1814 Lumerical Knowledge Base

When dx, dy, dz and dt are finite, the dispersion relation on the FDTD mesh is not identical to free space and this
results in grid dispersion errors. The errors due to grid dispersion are commonly negligible, but they build up as light
propagates over many mesh cells, so this can become an issue in high Q resonator simulations. The error due to
grid dispersion can be reduced by using a finer simulation mesh. By reducing the target dx for the mesh override
regions in the example script file by half, the resulting simulated Q is closer to the theoretical Q.

If several modes are supported, you can use symmetry boundary conditions to allow particular modes (while
suppressing others). This is particularly useful when studying systems with degenerate modes. As well when
measuring the Q, if multiple modes are allowed, energy can scatter into other modes and lower the measured Q.

Sources
You can also isolate particular modes by setting the source position and polarization such that it excites some
modes but not others.

You can also override the default source pulse to make it more narrow band. By default, the source will inject a
relatively broadband pulse, that may excite many modes. You can override this behavior to create a narrow band
pulse so fewer modes are excited. To do so, go to the Frequency/Wavelength tab of the source and use the time
domain settings to create a longer, more narrow band pulse. Using extremely narrow pulses may require you to
increase the overall simulation time.

Monitors
The type of monitor that is used will depend on the type of measurement that you want to do. See the calculations
section below for more information about different types of analysis.

In the example file we are interested in measuring the Q of the device and a time monitor in the Q analysis group is
used to record the resonant fields over time. The placement of the monitor is inside the cavity between the mirrors
since this is where the resonant fields will be strongest. Several time monitors can be used and the data from each
monitor averaged so that the fields from the resonance will be recorded even if some of the monitors happen to be
located in a node position.

Calculations
The type of analysis that is performed depends on what quantities you would like to extract from the simulation.
Methods for calculating some commonly measured quantities are discussed below.

Resonant frequencies
Resonant frequencies of the device can be found by using time monitors to record the resonant fields over time, then
plotting the spectrum of the time monitor results (this is the Fourier transformed time signal) will result in peaks at
the resonant frequencies. The findpeaks script function can be used to locate the location of the peaks in an array.

Mode profiles
To plot mode profiles of a structure, you need to first isolate the mode of interest. A frequency domain power or
profile monitor will provide the resulting mode profile plot.

To isolate a mode of interest, you may need to use symmetry boundary conditions especially when there are
degenerate modes of the structure. You will also need to plot the results at the resonant frequency of the mode.

The 3D photonic crystal cavity analysis 1841 example is an example where this is done.

Quality factor (Q)


To calculate the Q analytically, we first calculate the transmission as a function of frequency. Next, we use the
following equation to get the Q from the transmission spectrum: Q = fR /Df where fR is the resonant frequency and Df
is the FWHM.

When simulating high Q cavities, it is not possible to measure Q in this way because it would require running the
simulation until fields decay, which is not practical. Instead, we use high Q analysis which uses an equivalent time
domain technique (described in the High Q Cavities section of Quality factor calculations 1807 ).

2003 - 2016 Lumerical Solutions, Inc


Applications 1815

The object library contains high and low Q factor analysis groups that can be used to calculate the Q of your device.

Mode volume
The mode volume of a confined mode can be calculated using different methods. See the page on the mode volume
846 analysis group for information about each method. A mode volume analysis group is available in the Object

library which returns the mode volume calculated using any of the methods discussed.

Purcell factor
The Purcell factor is a measure of the enhancement of the rate of spontaneous emission of a source compared to
3
3 l Q
FP =
the rate in a homogeneous environment. This can be calculated using
4 p 2 n V . For dipole sources in a
resonator, dipolepower(f)/sourcepower(f) is equivalent because the dipolepower script command returns the power
emitted by the dipole source, and the sourcepower script command returns the ideal power emitted by a dipole
source in a homogeneous medium. See the Purcell factor 1816 example for more information.

Scattering parameters
The scattering parameters of the device can be calculated in order to characterize the device so that it can be
simulated using INTERCONNECT. See the ring resonator getting started tutorial for an example where this is done.
For high Q cavities/resonators that take a long time to simulate in FDTD, you can characterize them once using
FDTD and simulate the device quickly using interconnect.

8.1.3.4.4 Whispering gallery modes

Objective
In this example, we determine the resonant frequencies plot the first and second order whispering gallery modes
supported by a GaN microrod.

Solvers 101

FDTD
Associated files
cavity_whispering_gallery.fsp

See also
3D PC cavity modes 1821
Apodization 660
Correcting field profile amplitudes 1805

References
Tang, Y. Mintairov, A.M. Merz, J.L. Tokranov,
V. Oktyabrsky, S., Characterization of 2D-
photonic crystal nanocavities by polarization-
dependent photoluminescence, 5th IEEE
Conference on Nanotechnology, July 2005,
vol. 1, pp 35-38

Introduction
Whispering gallery modes occur when light is trapped in a sphere or disk by total internal reflection. These modes
can have high Q and low mode volume. Applications of these structures include microlasers and optical switches.In
this example we are interested in finding the first and second order whispering gallery modes of a GaN cylinder,
reproducing the resulting field profile from the reference paper by Tamboli et al. (see the References section above).
Here, the resonances of the structure are expected at 418 and 428 nm wavelengths.

2003 - 2016 Lumerical Solutions, Inc


1816 Lumerical Knowledge Base

Method
To start with, we can locate the resonant frequencies of the structure by running an initial simulation using a dipole
source and time monitors. We set the wavelength range injected by the dipole source to be between 400 and 450
nm to excite the resonant frequencies in this range. We have also placed the source near the edge of the structure
since this is where we expect the modal fields to be strong.

To find the resonant frequencies of the structure, we can take the Fourier transform of the field over time from a time
monitor, however, for high Q devices, using a frequency domain monitor with end apodization is preferable since the
fields do not decay fully by the end of the simulation. More information can be found on the apodization 660 page. In
the simulation file, a point monitor is used and is also placed close to the edge of the structure.

After finding the location of the resonant frequencies, we can set the frequency domain profile monitors to record the
field profile at the resonant frequencies by editing the General tab.

Results
The following plot shows the field spectrum from the frequency domain power monitor. Using the findpeaks script
shows that the resonant frequencies are x and y which corresponds to wavelengths of approximately 418.2 nm and
428.6 nm. Using a finer mesh can give more accurate results.

The resulting plots of the magnetic field profile at 418 and 428 nm agree with figure 4 from the reference.

8.1.3.4.5 Purcell factor

Objective
The calculation method for the Purcell factor is discussed and the Purcell factor for a microdisk resonator is
calculated.

2003 - 2016 Lumerical Solutions, Inc


Applications 1817

Solvers 101

FDTD
Associated files
cavity_purcell_factor.fsp

See also
dipolepower 1600
sourcepower 1601
Quality factor calculations 1807

Mode volume 846


Related publications
Ultrasmall Mode Volume Plasmonic Nanodisk
Resonators Martin Kuttge, F. Javier Garcia de
Abajo and Albert Polman Nano Lett., 2010,
10 (5), pp 15371541 DOI: 10.1021/nl902546r

L. Novotny and B. Hecht, "Principles of Nano-


Optics", Cambridge University Press,
Cambridge, (2006).

Philip Kristensen, Cole Van Vlack, Stephen


Hughes, Generalized mode volume for leaky
optical cavities, Published in Optics Letters
(May, 2012)
Calculation method
The Purcell factor is the emission rate enhancement of a spontaneous emitter inside a cavity or resonator. Dipoles in
FDTD Solutions automatically return the Purcell factor as a result that you can directly visualize or access from the
Result View window after a simulation is run.

The Purcell factor result is equivalent to dividing the power emitted by a dipole source in the environment by the
power emitted by the dipole in a homogeneous environment (bulk material) since the emission rate is proportional to
the local density of optical states (LDOS), and the LDOS is proportional to the power emitted by the source. You
can use the following line of code to verify the result.
purcell_factor=dipolepower(f)/sourcepower(f);

The command dipolepower 1600 returns the power actually radiated in the environment, and sourcepower 1601 returns
the power that would be radiated by a dipole in a homogeneous medium. This ratio of power is equal to the decay
rate enhancement, or Purcell factor (please see Fluorescence enhancement where this approach is used to
calculate the decay rate enhancement of fluorphores near metallic particles and the Novotny, "Principles of Nano-
Optics" reference).

Its important to note that this analysis method depends on having the simulation run until the fields have completely
decayed. As well, the dipolepower command only works if your dipole is in a lossless dielectric medium. If the dipole
is embedded in a dispersive medium then instead of using the dipolepower command, you can get the power emitted
by the source by measuring the power flow out of a small box of monitors surrounding the source. The transmission
box analysis object from the Object library can be added for this purpose.

2003 - 2016 Lumerical Solutions, Inc


1818 Lumerical Knowledge Base

Another method for measuring the Purcell factor is by using the following formula, however this method is not
preferred because the definition of mode volume will depend on your structure, and the calculation method is
relatively complex compared to the first method:
3
3 l Q
FP =
4p 2 n V

Q is the quality factor and V is the mode volume. See the quality factor calculations 1807 page and mode volume 846

page for more information about calculating these values.

Example
In this example we calculate the Purcell factor of a microdisk resonator structure using the first method of measuring
the emitted power.

The Purcell factor will depend on location and frequency so we first run a preliminary simulation using a broadband
source to determine the resonant frequency and location of the strongest modal fields. For the preliminary
simulation, make sure the broadband source is enabled, and the dipole source is disabled. The time monitor is set
up to start recording fields after 20 fs when the transient fields have decayed so that only resonant fields of the
structure remain. By plotting the spectrum result from the time monitor, we find that the resonant frequency of the
mode is at 714 nm.

Using this information we can set up the profile monitor to record data at 714 nm. The profile monitor is also set up
to use apodization again to exclude the effect of the source.

The following shows the mode profile at 714 nm.

We then set the dipole source frequency to the resonant frequency and place the dipole in the location where the
modal fields are maximized. With the dipole source enabled, and the broadband source disabled, re-run the
simulation. We find a Purcell factor of about 2354 which is similar to the Purcell factor calculated using the boundary
element method from the reference. Note that we only used one simulation with one dipole orientation to determine
the Purcell factor since this orientation results in the maximum Purcell factor, and the maximum Purcell factor is
what we are looking for. In the case where you want to Purcell factor of an isotropic emitter, you can average the
results from three orthogonal dipole orientations.

8.1.3.4.6 Bragg microcavity

Introduction
Waveguide-based photonic microcavities and their associated high quality factor resonances are of increasing
importance for a number of technological applications, including filtering and sensing. An example of these types of
photonic microcavities is a six air-slot microcavity, with the central semiconductor tooth intentionally widened to

2003 - 2016 Lumerical Solutions, Inc


Applications 1819

introduce a transmission resonance within the stop band of the underlying Bragg structure. This particular photonic
microcavity is designed to be supported by a high index substrate, unlike the alternative air membrane photonic
microcavities.

Solvers 101

FDTD
In this topic
Introduction 1818
Simulation setup 1819

Results 1819
Associated files
waveguide_bragg_microcavity.fsp
waveguide_bragg_analysis.lsf

Related publications
Kleckner, T.C. and Modotto, D. and Locatelli,
A. and Mondia, J.P. and Linden, S. and
Morandotti, R. and De Angelis, C. and
Stanley, C.R. and van Driel, H.M. and
Aitchison, J.S, "Design, fabrication, and
characterization of deep-etched waveguide
gratings," Lightwave Technology 23(11) pp.
3832-3842 (2005)

Simulation setup
The built-in mode solver is used to calculate and launch a waveguide mode into the microcavity.
The microcavity is excited by launching a
TE-polarized guided mode of the input
optical waveguide. The MODE Solutions
mode solver, which is integrated within the
FDTD simulation environment, allows the
end user to easily select the desired
waveguide mode for launch from the
complete set of guided modes. This
waveguide mode is incident upon the
photonic microcavity, and the frequency
response of the microcavity is measured
using field profile simulation monitors.

Although we use the mode source in this


example, its also possible to determine the
resonant frequency and quality factor (Q)
using a different type of source such as
dipole sources which are used in the Q
analysis group. More information on the Q
analysis group can be found at Quality
factor calculations 1807 .

Results
Use a broadband excitation to locate the cavity resonance.

2003 - 2016 Lumerical Solutions, Inc


1820 Lumerical Knowledge Base

By placing a time monitor at the output of


the waveguide microcavity, we can measure
how long it takes for the radiation to
resonate within the structure and radiate
away. By looking at the data to the left, we
can see that the majority of the optical
energy has radiated away 1000 fs after the
start of the simulation. However, because
we want to accurately measure the Q of
these modes, we wait for 2000 fs to ensure
we do not terminate the simulation before all
of the energy has passed through the
monitors and into the PML.
Fast Fourier transform (FFT) of the time-
domain signal shows that the Bragg
structure has a large stop band which
extends from 185 to 215 THz, with a defect
transmission peak within the stop band.
to find the resonance, use broadband
excitation and measure the time
response
via the built-in FFT, look at the frequency
content of the measured time signal
through simple mouse actions. You will
have to zoom into the desired frequency
range.
note the resonance occurs at a frequency
of 196.1 THz

Measure the Q-factor of the waveguide resonance.


Closer examination of the microcavity
transmission resonance, as shown on the
left, allows one to measure the quality (Q)
factor of the transmission peak defined as
the ratio of the peak center frequency to its
full-width half-maximum (FWHM). The
resonance shown has a quality factor of
about 200. As the cavity quality factor
represents the ratio of the energy storage to
the energy loss, achieving higher quality
requires minimizing radiation loss.

Measure the CW field enhancement on (top figure) and off (bottom figure) resonance.

2003 - 2016 Lumerical Solutions, Inc


Applications 1821

To measure the field enhancement within


the microcavity, frequency-domain (CW)
measurement monitors can be used to
measure the steady-state field distribution.
Furthermore, our frequency-domain monitors
provide this data at multiple frequency
points within a single simulation, offering
tremendous advantage over non-FDTD
frequency-domain simulation tools.
on resonance, a six-fold intensity
enhancement is observed
off resonance, it is seen that negligible
radiation propagates through the cavity,
and most is reflected from the Bragg
stack

8.1.3.5 Photonic Crystals


FDTD Solutions can be used to calculate a range of photonic crystal properties such as
Bandstructure
Cavity resonance frequency and Q
Waveguide loss and group velocity
Bloch mode profiles

Please select one of the following topics.


3D PC cavity analysis 1821
Bandstructure 1843
Bloch Mode Profile 1871
PC optical switch 1873
Photonic Crystal Cavity Tutorial 1759

Additional resources
PC bandstructure video

8.1.3.5.1 3D PC cavity analysis

Introduction
The goal of this example is to demonstrate how FDTD Solutions may be used to analyze photonic crystal
nanocavities such as the one shown below. This is accomplished by reproducing the results in the paper by Y.
Tang. This paper contains detailed information on the cavity structure as well as experimental and simulated data to
compare against.

Using the techniques described in this example, it is possible to study other PC cavities. Since FDTD Solutions can
simulate arbitrary geometries and materials, it is possible to adapt the methods presented here to study any micro/
nanoscale cavity.

2003 - 2016 Lumerical Solutions, Inc


1822 Lumerical Knowledge Base

Solvers 101

FDTD
In this topic
Introduction 1821
Simulation setup 1824
Results - H1 cavity 1828
Results - H2 cavity 1833
Results - H2 cavity mode profile 1838

Associated files
pc_3D_cavity.zip
See also
Photonic Crystals 1821

Related publications
Tang, Y. Mintairov, A.M. Merz, J.L. Tokranov,
V. Oktyabrsky, S., Characterization of 2D-
photonic crystal nanocavities by polarization-
dependent photoluminescence, 5th IEEE
Conference on Nanotechnology, July 2005,
vol. 1, pp 35-38

Summary of results
Using FDTD Solutions, we can calculate the resonant spectra of the cavity createdy by removing the center hole
(H1) or by removing the center hole and the next ring of holes (H2).

For the H1 cavity, we compare using a constant dielectric model with a physically realistic GaAs/AlGaAs material
model, as shown below. The peak spectra correspond well with the published results.

For H2 cavity, we can look at the spectrum to identify the 8 resonances found in the paper. Then use symmetry and
anti-symmetric boundaries to isolate degenerate modes.

2003 - 2016 Lumerical Solutions, Inc


Applications 1823

Finally, we show how to calculate and plot all the modes of the H2 cavity. For example, the A11 mode is shown
below.

2003 - 2016 Lumerical Solutions, Inc


1824 Lumerical Knowledge Base

8.1.3.5.1.1 Simulation setup

Solvers 101

FDTD
In this topic
Introduction 1821
Simulation setup 1824
Results - H1 cavity 1828
Results - H2 cavity 1833
Results - H2 cavity mode profile 1838

Associated files
pc_3D_cavity.zip
See also
Photonic Crystals 1821

Related publications
Tang, Y. Mintairov, A.M. Merz, J.L. Tokranov,
V. Oktyabrsky, S., Characterization of 2D-
photonic crystal nanocavities by polarization-
dependent photoluminescence, 5th IEEE
Conference on Nanotechnology, July 2005,
vol. 1, pp 35-38

2003 - 2016 Lumerical Solutions, Inc


Applications 1825

Structure overview
The structure is formed on a thin GaAs / AlGaAs membrane suspended in air. For the purposes of this analysis,
layer structure is assumed to be 170nm of GaAs sandwiched between 45nm layers of Alx Ga1-x As with x=0.3. Note
that in the publication, the layers are 40nm of AlGaAs and an additional 5nm layers of GaAs, however, the 5nm
layers are not expected to modify the results substantially, and yet would required a finer mesh size. For this
reason, we have simply made the AlGaAs layers 45nm thick instead of 40nm. The total layer thickness is 260nm.
This layer structure is contained in a structure group. This group allows you to use a constant dielectric for all the
layers with a value of n=3.4 (the same as the value used in the simulations of the publication) or, alternatively, to use
experimental data for GaAs from Palik, and a theoretical model for Alx Ga1-x As with x=0.3.

The theoretical model is generated by the script AlGaAs_Adachi.lsf, which saves a text file of values of n and k,
which was then imported into the material database as a new material.

The photonic crystal consists of a triangular lattice of air holes in the membrane. The pitch of the lattice, a, is
366nm. For this example we will consider the case where the radius of the holes is 0.37a = 135.4nm.

The cavity is created using one of the structures from the Components Library. This structure is fully parameterized
and allows the user to select the various parameters such as the pitch, H_number, etc. The material for the holes is
set to etch. The layer structure is compose of 3 rectangles, which are grouped and parameterized as described
previously. Finally, key parameters have been added to the model, as shown below. These parameters are set by
the model and will override any direct settings of the children.

The model and it's children, seen in the Objects The model properties. These values will override any values set
Tree in the children.

2003 - 2016 Lumerical Solutions, Inc


1826 Lumerical Knowledge Base

The cavity is created by removing either the center hole (H1) or the center hole plus the next ring (H2). This can be
achieved by setting the H_number in the model to 1 or 2. The H1 cavity is shown below.

Controlling the mesh


For periodic structures it is best to make the mesh size periodic with the structure since this yields the best

2003 - 2016 Lumerical Solutions, Inc


Applications 1827

accuracy for a given mesh size. Setting a small mesh size will increase the calculation time and increase the
accuracy of the result. The approach used here is to start with a coarse mesh to obtain initial results and understand
the physics of the problem and then, if desired, to move to a fine mesh to obtain the final answer. We control the
mesh in the x and y directions by adding a mesh override region and directly setting the value of dx and dy. For the
z direction, we can allow the auto non-uniform meshing to choose an appropriate mesh. Initially, we can set the
mesh accuracy slider of the simulation region to 2, which will control the z mesh. For the x and y meshes, we can
choose a coarse mesh with 10 points per period of the PC (36.6nm grid). Since we are using a triangular lattice, we
set the y mesh cell size to be sqrt(3)/2 times the x grid cell size. This ensures that the FDTD mesh is perfectly
periodic in the y direction and yields better accuracy for a given mesh cell size. This setup is handled by the model
so it is sufficient to choose the "grid points per pitch" property and set it to 10. The model then sets the
corresponding values of dx and dy for you.

The simulation region


The second task is to set the size of the simulation area. The larger the simulation area, the longer the calculation
will take, so we want to choose the smallest area that provides an accurate result. For the lateral dimensions of the
FDTD area, we need to include enough rows of PC lattice to produce a bandgap. Since this is a high index contrast
PC, 3 or 4 rows of holes surrounding the cavity is a good place to start. An X span of 3200nm and a Y span of
3200*sqrt(3)/2 will encompass 3 to 4 rows of PC holes. In the vertical dimension, we need to include some air above
and below the slab since there is an evanescent field that decays into the air. We will start by including ~500nm of
air above and below the slab. Once an initial result has been obtained, we can conduct an error analysis to verify
that the simulation dimensions are sufficiently large. Note that the model will also enforce that the x span and y
span's are integer multiples of the pitch (or sqrt(3)/2 times the pitch in the case of the y span) - you may notice that
if you set the x span to 3200nm, when you re-edit the object it has been adjusted to 3294nm which is 9 times the
pitch of 366nm. This, along with the settings in the mesh override region, will ensure that the FDTD mesh is identical
for each period of the structure. This is important for measuring quality factors (Q) correctly for periodic devices.

Set the simulation time to 2000 fs. The simulation time length will be discussed in the source properties section.

The boundary conditions used for simulating a finite sized object such as the PC cavity are known as the PML
(Perfectly Matched Layer). These boundary conditions absorb incident radiation. The PML boundary condition is the
default when a new simulation area is created. There are 2 key changes that need to be made to the default PML
settings, and these can be done in the Advanced Options of the FDTD Simulation region:
Uncheck the " extend structure through pml" checkbox. For photonic crystals, we can actually get better PML
performance if we allow the PC to extend into the PML. Without this, the last layer of materials at the edge of the
boundary will be automatically extended completely through the PML.
Set the value of "pml kappa" to 5. The pml, in combination with the dispersive materials that we will be using, can
lead to increased numerical instability in the PML. This can be controlled for reasonable simulation times by
increasing the value of PML Kappa.

It is also possible to employ symmetry boundary conditions in cases where the structure itself exhibits symmetry.
Symmetry boundary conditions can reduce computation time, however, the cost is that they will forbid certain
modes from appearing in the results (modes that do not exhibit the same symmetry relation as the boundary
condition). For this PC cavity, there is a plane of symmetry through the center of the slab (z=0 plane). Using a
symmetric boundary condition on this plane will only allow TE modes and eliminate TM modes from the results.
Since this structure has little or no TM bandgap and the cavity modes are expected to be TE, we will use the
symmetric boundary condition on this boundary.

Finally, when studying resonators, it is a good idea to disable to the autoshutoff feature of FDTD Solutions. This is
because a high Q resonator, which traps light over a very small bandwidth, may only trap a small fraction of the
original excitation energy which is broadband. As a result the autoshutoff can trigger too early and cause problems
with our time apodization of monitors. The autoshutoff can be disabled by unchecking the "use early shutoff" in the
Advanced Options tab of the FDTD simulation region.

Source pulses and simulation time


To excite the cavity, we add some dipole sources. These sources are added by an Analysis Group which creates a
random set of dipoles over a given area. The area is controlled by the model and is based on the chosen H number
(for larger cavities, the cloud of dipoles is extended). Also, these dipoles are added in the upper right quadrant only,
in anticipation of simulations with symmetric and anti-symmetric boundary conditions. These sources will inject a

2003 - 2016 Lumerical Solutions, Inc


1828 Lumerical Knowledge Base

short pulse of radiation to excite a broad range of frequencies. In order to effectively excite the cavity modes we need
to ensure that the polarization of the dipole sources is similar to the polarization of the modes we wish to excite. In
this case we want to excite TE modes so we will use a vertically (z) polarized magnetic dipole. We also need to
ensure that the dipole sources are placed in locations where the mode profiles do not exhibit nulls. To accomplish
this we use a random set of dipoles over the desired area. If we wanted to excite TM modes we would use vertically
polarized electric dipoles, and we would have to change or z min boundary condition to Anti-Symmetric.

The final step in setting the sources is defining the excitation pulse. This is done by simply selecting the appropriate
wavelength range that we want to study. In this case, we choose 1000nm to 1400nm. We used the global source
properties to do this, to avoid having to make the changes for each dipole individually. Note that each dipole must be
set to use the global source properties, which is not the default.

The simulation time defined in the simulation region properties is 2000fs and much longer than the pulse length. This
is because we want to monitor the fields in the cavity after the pulse has excited modes. Analyzing the fields in the
cavity after the initial pulse will reveal the frequencies of the cavity modes.

Simulation monitors
There is an analysis group of monitors called "resonance finder". Fourier transform analysis of these time signals will
reveal the cavity mode frequencies. This is handled automatically by the analysis script in the group. By default, we
choose to use 8 total time monitors which are spread randomly over a region of the cavity. The extent of these
monitors is set by the model and depends on the H_number chosen for the cavity. This helps us avoid any nulls of
particular modes.

There are also frequency domain profile monitors to capture the modal fields. These monitors are stored in an
analysis group called mode_profiles. This analysis group can find the mode profiles of up to 12 modes. The user
must specify the resonant frequency of the modes and the desired apodization settings. The apodization settings
are critical to finding the right mode profile. For more details on apodization settings, please see the Apodization 660
in the User Guide under Monitors and Analysis Groups.

8.1.3.5.1.2 Results - H1 cavity

Solvers 101

FDTD
In this topic
Introduction 1821
Simulation setup 1824
Results - H1 cavity 1828
Results - H2 cavity 1833
Results - H2 cavity mode profile 1838

Associated files
pc_3D_cavity.zip
See also
Photonic Crystals 1821

Related publications
Tang, Y. Mintairov, A.M. Merz, J.L. Tokranov,
V. Oktyabrsky, S., Characterization of 2D-
photonic crystal nanocavities by polarization-
dependent photoluminescence, 5th IEEE
Conference on Nanotechnology, July 2005,
vol. 1, pp 35-38

H1 cavity
The H1 cavity is formed by removing a single hole from the photonic crystal, as shown in the figure below. This can

2003 - 2016 Lumerical Solutions, Inc


Applications 1829

be accomplished by setting the H_number property to 1 in the model.

Load and run the simulation file Tang_cavity.fsp. Then edit the "resonance finder" object and press the "Run
Analysis" button which will generate the following figures and results.

2003 - 2016 Lumerical Solutions, Inc


1830 Lumerical Knowledge Base

Plotting the spectrum as a function of normalized units of (a/lambda) is also possible with the script commands
below, which can be pasted into the script prompt, or used to create a new script file:
select("::model");
a = get("a");
mname = "resonance finder";
runanalysis(mname);
f = getdata(mname,"f");
spectrum = getdata(mname,"spectrum");
plot(f*a/c,log10(spectrum),"frequency (a/lambda)","spectrum (a.u., log scale)");
setplot("x min",0.2);
setplot("x max",0.44);
This will generate the following figure

2003 - 2016 Lumerical Solutions, Inc


Applications 1831

In this example there are a number of peaks present in the result. These peaks correspond to cavity modes and
bandgap edges. Often peaks are observed at the bandgap edges since the modes at these frequencies have a very
low group velocity and do not decay away very quickly. The 2 peaks that correspond to the cavity modes appear at
approximately 0.31 and 0.37, in reasonable agreement with the results for the first and second order modes in the Y.
Tang paper, which were also calculated assuming a constant permittivity for the slab.

Note that we can rerun the simulation with using a GaAs and AlGaAs model for the materials. This can be
accomplished by setting the property "use constant dielectric" of the "layer structure" group to 0. The figure below
compares the results.

We can see that the spectra agree well at lower frequencies but there is a shift at higher frequencies. This shift

2003 - 2016 Lumerical Solutions, Inc


1832 Lumerical Knowledge Base

makes sense when we consider that the GaAs makes up 170nm of the 260nm layer and has in index higher than
3.4 at higher frequencies, as shown below.

In the remainder of the example, we will use a constant dielectric model. This should give the best agreement with
the simulated results of Tang et al., however the dispersive model should give better agreement with the
experimental results.

Next steps
To resolve the mode profiles of the cavity modes we can adjust the frequency domain profile monitor settings
(center frequency and apodization) to calculate the mode profiles of these resonances.
To learn more about the symmetries of the modes and look at mode profiles of degenerate modes, we can apply
various combinations of symmetric and anti-symmetric boundary conditions to the x=0 and y=0 planes and repeat
the simulation.
To gain a highly accurate result, we can repeat the simulation with a finer grid size. It may also be useful to
investigate any effects of moving the PML boundaries further from/closer to the cavity.

We will demonstrate most of these steps in the next section when we look for H2 cavity modes.

2003 - 2016 Lumerical Solutions, Inc


Applications 1833

8.1.3.5.1.3 Results - H2 cavity

Solvers 101

FDTD
In this topic
Introduction 1821
Simulation setup 1824
Results - H1 cavity 1828
Results - H2 cavity 1833
Results - H2 cavity mode profile 1838

Associated files
pc_3D_cavity.zip
See also
Photonic Crystals 1821

Related publications
Tang, Y. Mintairov, A.M. Merz, J.L. Tokranov,
V. Oktyabrsky, S., Characterization of 2D-
photonic crystal nanocavities by polarization-
dependent photoluminescence, 5th IEEE
Conference on Nanotechnology, July 2005,
vol. 1, pp 35-38

H2 cavity setup
To study the H2 we simply need to change the H_number in the model to 2.

First results
After running the simulation, the following script can be used to plot the spectrum in normalized frequency units of
(a/lambda):
select("::model");
a = get("a");
mname = "resonance finder";
runanalysis(mname);
f = getdata(mname,"f");
spectrum = getdata(mname,"spectrum");
plot(f*a/c,log10(spectrum),"frequency (a/lambda)","spectrum (a.u., log scale)");
setplot("x min",0.27);

2003 - 2016 Lumerical Solutions, Inc


1834 Lumerical Knowledge Base

setplot("x max",0.36);

Looking at these results we can immediately see that there are 8 peaks in the frequency range of interest (we have
restricted to looking at the approximate frequency range where experimental results exist). The frequencies of the
peaks are within a few percent of the experimental results, although it is not immediately obvious which peak in the
simulated results necessarily matches up with each experimental peak. We also have an extra peak in the
simulated results that is not identified in the experimental data. In general the agreement is quite good for a first
attempt.

We can also see that two of the peaks appear to be split - this is likely because these correspond to theoretically
degenerate peaks where the degeneracy is broken by the cartesian simulation mesh. On a triangular lattice, modes
can be degenerate based on a 60 degree lattice symmetry. The cartesian mesh can artificially break this symmetry,
and this effect will be more apparent on a coarse mesh. We can rerun the simulation on a finer mesh by
Setting the "grid points per pitch" property of the model to 20 instead of 10. This will halve the size of dx and dy.
Increasing the mesh accuracy slider of the FDTD simulation region to 4 instead of 2.
If we rerun the simulation (which now takes significantly longer), we can compare the results on a fine and a coarse
mesh, shown below. We see that there is reasonable agreement between the 2 results, with a frequency shift that
generally becomes larger at higher frequency (shorter wavelength), which is expected. We also see that the splitting
of the peaks disappears with a finer mesh. However, the coarse mesh is surprisingly accurate, especially when
considering that, at a wavelength of 1000nm, lambda0/(n*dx) ~ 8. This is partly a consequence of using Lumerical's
conformal mesh technology which makes it possible to obtain good results at coarser mesh sizes. For the
remainder of this example, we will continue to work at a coarse mesh. For publication quality results, we should
repeat several more simulations to ensure that the results have converged to within our tolerances.

2003 - 2016 Lumerical Solutions, Inc


Applications 1835

Detailed analysis
To understand the problem further, we are going to use symmetry and anti-symmetry to classify the modes. We are
also going to use our frequency domain profile monitors to calculate the mode profiles. The first step is to add the
frequency domain power monitors and adjust their frequency and apodization settings.
Apodization. The simulation runs for 2000fs. We should choose full apodization, a time center of 1000fs, and a
time width of 200fs. This means that the FHWM of the apodization spectrum will be 4*log(2)/(2*pi*200fs) ~ 2 THz.
Choosing this apodization means that peaks should be separated by more than 2THz, and that we will measure
the correct mode profile as long as we choose a frequency for our monitor within about 2THz of the correct peak.
Plotting the spectrum in un-normalized units, we can see that this should not be a problem. For more details on
apodization, please see the Apodization 660 in the User Guide under Monitors and Analysis Groups.

Frequency settings. We want to add 8 monitors with frequencies between 220 and 300 THz. In reality, we will add
9 monitors to account for the artificial double peak at 276 THz.

2003 - 2016 Lumerical Solutions, Inc


1836 Lumerical Knowledge Base

These monitors can be added by hand, but the simulation contains an analysis group called mode_profiles that is
designed to add up to 12 frequency monitors in the x-y plane. This makes it easy to adjust the apodization settings
for all monitors. To simplify calculating the 9 resonant frequencies, the script file
Tang_cavity_setup_profile_monitors.lsf will calculate the 9 resonances within the desired bandwidth
and set the frequencies of the mode_profile analysis group accordingly. The resonant frequencies must be reset
any time there are changes to the mesh accuracy, material settings or any other settings that could cause the
resonant peaks to shift.

Mode Symmetry
The next step is to consider the symmetry of the modes. We will do so by repeating the simulation 4 times using
the different combinations of symmetric and anti-symmetric boundary conditions on the x=0 and y=0 planes of
symmetry. Each of these simulations take ~1/4 of the time to run as the full simulation. This can be accomplished
using the "sweep symmetry" object included with this example. This object can be found in the Optimization and
Sweeps window.

Editing the object shows that it is configured to run 4 parameter sweeps, and each time it will apply a different
symmetry condition to the min x and min y boundaries.

After running the parameter sweep object, the following lines of script will plot all the spectra. These lines are also
saved in the file Tang_cavity_symmetry.lsf.
select("::model");
a = get("a");

2003 - 2016 Lumerical Solutions, Inc


Applications 1837

mname = "resonance finder";


runanalysis(mname);
f = getdata(mname,"f");
spectrum = getdata(mname,"spectrum");

sweepname = "sweep symmetry";


spectrum_sym = pinch(getsweepdata(sweepname,"spectrum"));
plot(f*a/c,log10(spectrum),
log10(pinch(spectrum_sym,2,1))+8,
log10(pinch(spectrum_sym,2,2))+16,
log10(pinch(spectrum_sym,2,3))+24,
log10(pinch(spectrum_sym,2,4))+32,
"frequency (a/lambda)","spectrum (a.u., log scale)");
legend("No symmetry",
"Symmmetric /Symmetric",
"Anti-Symmetric/Symmetric",
"Symmmetric /Anti-Symmetric",
"Anti-Symmetric/Anti-Symmetric");
setplot("x min",0.27);
setplot("x max",0.36);

The figure below shows the resulting plot. The legend indicates if no symmetry was used, or when symmetry was
used at the x min/y min boundary. For example Symmetric/Anti-Symmetric means that the x min boundary
condition was Symmetric, while y min was Anti-Symmetric. In general the results show that certain peaks are
present with only one combination of symmetry boundaries (non-degenerate mode) while other peaks show up for
multiple combinations of symmetry boundaries (degenerate modes). Each peak in the data figure below is marked
with either a "D"or a "N" to indicate a degenerate or non-degenerate mode.

We can now refer back to the experimental results presented in the Y. Tang paper and identify the simulated modes
with the experimental modes. The following table lists the mode frequencies from the Y. Tang paper along with their
degeneracy as determined by the line width/polarization analysis. It is now easy to see which modes in the
simulated data correspond to the experimental data. The results are summarized in the table below.

Peak # (Mode) Degeneracy Experimental freq. Simulated freq.

2003 - 2016 Lumerical Solutions, Inc


1838 Lumerical Knowledge Base

1 (E11) D 0.285 0.276


2 (A11) N 0.306 0.297
D 0.312 / 0.313 0.307
3 (E12. E13) N 0.323 0.316
4 (B2)

5 (A2) N 0.329 0.328

6 (E14) D 0.341 0.337/0.339


7 (A12) N 0.348 0.345

8 D NA 0.354

The results in the preceding table show that the 8th peak in the simulated data was a degenerate mode that was
slightly higher in frequency than the quantum dots could excite in the experiment. Knowing that this mode is there,
you can actually see a very small bump in the experimental data around 0.352 that might correspond to this mode.

The simulation data is in very good agreement with the experiment. The worst case difference in model versus
experiment is ~3.5%, which is consistent with the worst case difference in the plane wave model (as compared to
experiment). The average difference in experimental versus simulated mode frequencies is less than 2%. This is
quite good agreement for the simple model that we have used. The results could certainly be improved by using a
finer mesh, using more realistic material models, and making sure that the simulated structure dimensions is in
agreement with the experimentally fabricated device, for example, by defining the structure using an SEM import.

8.1.3.5.1.4 Results - H2 cavity mode profiles

Solvers 101

FDTD
In this topic
Introduction 1821
Simulation setup 1824
Results - H1 cavity 1828
Results - H2 cavity 1833
Results - H2 cavity mode profile 1838

Associated files
pc_3D_cavity.zip
See also
Photonic Crystals 1821

Related publications
Tang, Y. Mintairov, A.M. Merz, J.L. Tokranov,
V. Oktyabrsky, S., Characterization of 2D-
photonic crystal nanocavities by polarization-
dependent photoluminescence, 5th IEEE
Conference on Nanotechnology, July 2005,
vol. 1, pp 35-38

H2 cavity mode profiles


In the previous step we ran a number of simulations with different symmetry settings. We also configured the
mode_profiles analysis group object to have a monitor recording the electric field at each of the 9 resonant
frequencies, with appropriate time apodization settings.

In addition to collecting the spectrum for each symmetry setting, the parameter sweep object also collected a matrix
of |E|2. In each simulation, this matrix is created by the mode_profiles analysis group. The parameter sweeps
collates all of this data into a single matrix. At the end of the sweep, we have a variable called E2 which is a 4D

2003 - 2016 Lumerical Solutions, Inc


Applications 1839

matrix, of size length(x) X length(y) X 9 X 4. The first 2 dimensions are the x and y axes in the x-y plane. The third
dimension corresponds to the 9 resonant frequencies collected, and the final dimension is the 4 values of parameter
sweep that we ran, corresponding to the 4 possible symmetry/anti-symmetry combinations.

The script file plot_modes.lsf gets the 4D matrix E2. It then interpolates onto a finer mesh, and collects some
structure outline results from the index monitor to create a higher resolution matrix for better imaging of the results.
It then plots different results by choosing specific resonant frequencies, and specific symmetry/anit-symmetry
conditions. Each figure is automatically exported to a jpg file. The results are shown below.

Degenerate modes
E11

E12

E13

2003 - 2016 Lumerical Solutions, Inc


1840 Lumerical Knowledge Base

E14

Non-degenerate modes
A11

A12

2003 - 2016 Lumerical Solutions, Inc


Applications 1841

A2

B2

Unknown

The mode profiles presented here agree very well with those presented in the Y. Tang paper that were calculated
using a plane wave model.

8.1.3.5.1.5 Using the varFDTD solver

Introduction
The goal of this example is to demonstrate how the varFDTD solver in MODE Solutions may be used to analyze
photonic crystal nanocavities such as the one shown below. This is accomplished by reproducing the results in the
paper by Y. Tang. This paper contains detailed information on the cavity structure as well as experimental and
simulated data to compare against.

2003 - 2016 Lumerical Solutions, Inc


1842 Lumerical Knowledge Base

Solvers 101

varFDTD
Associated files
cavities_3Dpcm.lms
See also
PC Micro Cavity Tutorial (FDTD) 1759

Related publications
Tang, Y. Mintairov, A.M. Merz, J.L. Tokranov, V.
Oktyabrsky, S., Characterization of 2D-photonic crystal
nanocavities by polarization-dependent
photoluminescence, 5th IEEE Conference on
Nanotechnology, July 2005, vol. 1, pp 35-38

Setup
The completed simulation file can be downloaded from the above link. See the FDTD Solutions example 1821 for an in
depth discussion on the optimal way to setup the simulation. Overall, the setup of this simulation in MODE
Solutions is very similar to FDTD Solutions. The structures can be copied directly from the FDTD Solutions example
file. The simulation region, sources and monitors should be setup in a similar way. Of course, while the setup is
very similar, a few differences exist:
- Propagator object - Effective index tab: We will use the default settings, including the Narrowband option, which
will neglect any slab dispersion. For improved accuracy, you can try using the Broadband option.

Results
The simulation is very quick and should be finished in a few seconds. Next, run the Qanalysis object to find the
resonant frequencies. This involves a large number of fft's and will take a couple of minutes. The following
commands can be used to output the results to the script prompt. The Qanalysis object can also be used to plot
the spectrum (and filters used for the calculation).
runanalysis;
Q = getresult("Qanalysis","Q");
?Q.f/1e12;
?Q.Q;

result:
192.376
207.302
197.875
result:
202.889 293.017 237.532

2003 - 2016 Lumerical Solutions, Inc


Applications 1843

The amplitude of each resonance is not very meaningful, as it depends on the position of the sources used to excite
the system and the position of the time monitors used to measure the response.

From the calculated resonant frequencies, we can set up two profile monitors in order to obtain their profiles and
each monitor can monitor two frequencies. After re-running and averaging the 3 analysis groups, the results are
summarized as below

Freque 192.4THz 197.9THz 207.3THz


ncy
Q 198 293 239
factor
E
intensit
y

8.1.3.5.2 Bandstructure

Introduction
This topic provides a number of bandstructure calculation examples for different lattice types. (For layered structures
with no patterning, one can also use the technique described in Slab mode analysis of a OLED layer structure 2711 to
obtain the dispersion relation.)

2003 - 2016 Lumerical Solutions, Inc


1844 Lumerical Knowledge Base

In this topic
Simulation Methodology 1844
Square 2D 1848
Triangular 2D 1850
Square 3D 1851
FCC 3D 1852
Planar 3D 1853
Planar 3D Hex 1854
BCC 3D 1855
Waveguide 3D 1856
Magneto-Optical waveguide 1859

Out of Plane 1864


Simulations with Loss 1865
Woodpile 3D 1867
Equi-frequency Contours 1868
See also
Photonic Crystals 1821
Bloch Mode Profile 1871
Bandstructure Calculations

Background
This example assumes that you are familiar with the concepts of bandstructure, Brillouin zones and Bloch's
theorem.

We intend to study structures that are periodic in at least one dimension. For simplicity, consider a structure
periodic in the x direction, with period a. Bloch's theorem tells us that the modes of a periodic structure can be
written as
Ek ( x) = exp( ikx)uk ( x)
where u(x) is a periodic function of x, with period a. This means that u(x+a)=u(x). Another way to write Bloch's
theorem is that
Ek ( x + a ) = exp( ika) Ek ( x)
This defines Bloch boundary conditions in one dimension and this condition can be generalized to two or three
dimensions in a straightforward way. Bloch boundary conditions are used in FDTD Solutions to calculate the
properties of an infinite periodic structure by simulating only one unit cell. The photonic bandstructure is calculated
by determining the angular frequencies, wn(k), as a function of wave vector k for all the Bloch modes in a given

En , k ( w , r )
frequency range. Also, the spatial field information for a particular Bloch mode, in two and three
dimensions can also be determined.

8.1.3.5.2.1 Simulation Methodology

Simulation Setup
In the following example files, the variables used in the simulation including the period of the structure, the
apodization parameters, and bloch vectors (k vectors) are set using the 'model' analysis groups 393 setup script. You
can modify the values of these parameters by editing the 'model' group variables shown below.

2003 - 2016 Lumerical Solutions, Inc


Applications 1845

When setting up your own simulations using the bandstructure analysis group (available from the Object Library),
you can use the 'model' analysis group in a similar fashion. This will make it easier to change the value for each
parameter since this all groups that use that parameter in their setup or analysis will be updated automatically.

Structure
It is only necessary to simulate one unit cell of the structure for bandstructure calculations. Non-rectangular lattices
(i.e. triangular, FCC) are an exception. In such cases, it is necessary to include multiple unit cells to create a
structure that is periodic in the X,Y,Z direction since the FDTD simulation region is always rectangular. For example,
it is necessary to include two unit cells in the simulation for triangular lattices, and the FCC lattice requires 4 unit
cells.

Simulation region
Bloch boundary conditions should be used at each boundary where the structure is periodic. Each simulation will
give the band frequencies for a particular bloch vector. The bloch vector, k, is a property of the Bloch boundary
conditions.

For non-rectangular lattices, the mesh should be adjusted so each unit cell included in the simulation region is
meshed in exactly the same way (ie, the mesh lines fall at the same positions relative to the structure for each unit
cell).

We can also use symmetry in the simulation region boundary conditions in order to restrict the possible modes that
can exist to isolate bands of interest.

In the case of planar structures that are periodic in two dimensions but finite in the third dimension, we use PML
boundaries in the finite-direction and we typically leave a distance of half of the longest wavelength of the source
between the structure and PML boundaries to prevent any artificial loss due to coupling between the evanescent
fields of the structure and the PML material.

Sources
The field profile of the source is not particularly important in bandstructure simulations. The goal is simply to create a
source capable of exciting all modes of interest for the device. A number of randomly oriented and randomly
distributed dipole sources is the most convenient way to do this. Using several dipoles ensures that all modes will
be excited, even if one dipole is located at a node. It is also possible to set the dipole orientations to only excite
certain modes in order to isolate bands of interest.

For structures with non-rectangular lattices, calculating bandstructure is slightly more complex than for rectangular
lattices because the simulation region will necessarily include multiple unit cells. To avoid problems with artificial

2003 - 2016 Lumerical Solutions, Inc


1846 Lumerical Knowledge Base

zone folding, there must be matching dipole sources in each unit cell. The matching dipoles must be in exactly the
same position within each unit cell. The dipole phase must also be adjusted according to the following formula:
r r
D q = - 180
p k Dr

where
= phase offset from reference dipole
r
k = simulation wave vector
r
r = position offset from reference dipole

The Object library contains a dipole cloud object which automatically sets up the correct dipole offsets for various
lattice types. This can be inserted from the Analysis -> Bandstructure category in the Object library.

Monitors
After the dipole sources excite the system, the simulation continues to run for a reasonably long time. Randomly
distributed time monitors collect the fields over time. Destructive interference causes most of the fields to decay
quickly, but some of the fields will excite the modes of the structure and continue to propagate indefinitely. The
frequencies of these modes can then be easily detected from an FFT of the fields vs time.

Bandstructure Calculation
Step 1: Fourier transform
In the bandstructure analysis group, we load the time signals from each time monitor for each field component. Next,
we apodize the signals by applying a Gaussian-shaped windowing function. The parameters defining the
characteristics of the Gaussian, apod_center and apod_width, are set within the model analysis group. By apodizing
the time signal, we are filtering out the beginning and end portions of the time signal so that we only consider a
portion of time signal following the source pulse injection time and before the simulation is cut off. For more
information please refer to Apodization. 660

The Fourier transform of the apodized time signals are then used to calculate the bandstructure.

The following portion of the script from the bandstructure analysis group performs the steps described above for the
time signal of one field component of one monitor. The result, abs(czt(signal,t,2*pi*f))^2 is a spectrum
with peaks at the resonant frequencies.

signal = pinch(getdata("m"+num2str(j),component)); # collect the field data


if(max(abs(signal)) > 0) { signal = signal/max(abs(signal)); } # normalize the data

#apodize the signal with a gaussian, to ignore start and end effects

# fft the time signal and add it to the other fft's


f = linspace(f1,f2,5000);
fs = fs + abs(czt(signal,t,2*pi*f))^2;

Step 2: Summation of FFTs


The Fourier transformed time signal for each field component of every time monitor is summed resulting in "fs". By
summing the results from multiple time monitors we ensure that we will be able to find all the resonant frequencies
even if one time monitor is located in a node of a mode.

Step 3: Repeat for all k


Calculating a typical bandstructure diagram requires a series of simulations: one simulation for each value of k. By
running a parameter sweep, you can sweep over k values and collect results from each simulation. The sweep
collects the result "spectrum" from the model analysis group which is a matrix dataset which contains the parameter
"fs" and attribute "lambda".

2003 - 2016 Lumerical Solutions, Inc


Applications 1847

Step 4: Collect sweep results, find peaks and plot bandstructure


After running a parameter sweep over the bloch vectors, you can directly image "fs" from each sweep by right-
clicking on the sweep and clicking on visualize as shown in the following image.

You can also collect the results and image fs in the script, and plot the bandstructure by finding the peak
frequencies for each k vector.

The following script finds the 10 largest frequency peaks for one k vector and discards the peaks that are below a
minimum value determined by the tolerance. The results are collected in f_band. The bandstructure plot is obtained
by plotting f_band for each k vector.
# set variables
tolerance = 1e-4;
num_band = 10;

temp = findpeaks(fs,num_band);

#collect data for any peaks that are more than 'tolerance' of the maximum peak (to avoid

2003 - 2016 Lumerical Solutions, Inc


1848 Lumerical Knowledge Base

minvalue = fs(temp(1))*tolerance;
f_band=matrix(num_band);
for(bandcount = 1:num_band) {
if( fs(temp(bandcount)) > minvalue) {
f_band(bandcount) = f(temp(bandcount));
}
}

Image of fs (f vs k)
Bandstructure plot

Note: Extracted bandstructure plot color


By default, the plot of the extracted bandstructure (the type of plot shown on the right-hand side above) will be
multi-coloured, but as the colours don't add any useful information it is preferable to plot all points in the plot
using a single color. To do this, edit the plot and select the option "plot all data in same color".

8.1.3.5.2.2 Square 2D
This page provides two bandstructure examples for 2D rectangular structures. First is an array of dielectric rods,
and second is a multi-layer 'wavy' structure described in Ohtera et al.

Solvers 101

FDTD

See also
Triangular 2D 1850
Square 3D 1851
Planar 3D 1853
Associated files
square2D.fsp
square2D.lsf

wavy2D.fsp
wavy2D.lsf

Related publications
Ohtera et al, "multichannel photonic crystal
wavelength filter array for near-infrared
wavelengths", Journal of Lightwave
Technology, vol. 25, no. 2, 499-503, Feb 2007

First we consider a 2D photonic crystal composed of a square lattice or rods with period 500 nm. The rods are

2003 - 2016 Lumerical Solutions, Inc


Applications 1849

composed of a material with refractive index = 2, and radius = 120 nm.

In this example, the dipole cloud analysis group has been modified from the one from the Object library by adding a
"theta" parameter. The "theta" parameter allows us to specify the orientation of the dipoles instead of setting random
dipole orientations. By setting the dipole orientations we can selectively excite the TE or TM bands of the structure.

To begin, load the example file square2D.fsp. Run the script square2D.lsf to complete the parameter sweeps
Gamma-X, X-M, and M-Gamma. This will calculate the bandstructure in these three directions and produce plots of
fs vs k and the bandstructure. If you wish to display all points in the same color as shown on the figure below, open
the chart settings and check the "plot all data in the same color" option.

There are points plotted at zero frequency for every value of k. This is because the script file looks for 10 bands and
sets them all to have zero frequency. If less than 10 bands are found in the data, the remaining bands remain at zero
and appear in the plot. If you don't see any points at zero, you may want to increase the number of bands you are
looking for.

square2D.fsp is setup with TM polarized dipoles. If you want to calculate the TE bandstructure, change the
polarization setting of the dipole cloud object from TM to TE, then re-run the sweeps. The resulting bandstructure is
shown below.

Next, we can calculate the bandstructure of the wavy structure described in Ohtera et al. The stack is composed of
alternating wavy dielectric layers with refractive indices n = 1.47 and 2.28, as illustrated in the figure below. We
assume the structure is uniform in the z direction and periodic in the x and y directions. The goal is to calculate the
symmetric modes of this structure for TM sources. (where electric field points in the z direction)

To begin, run the sweep named ky. The sweep will scan over the bloch wave vector from ky=0 to 0.5. The script file
wavy2d.lsf can be used to plot the sweep results. The FDTD result is in good agreement with figure 2 in the

2003 - 2016 Lumerical Solutions, Inc


1850 Lumerical Knowledge Base

paper by Ohtera.

8.1.3.5.2.3 Triangular 2D

Solvers 101

FDTD
See also
Bandstructure 1843

Square 2D 1848
Square 3D 1851
FCC 3D 1852
Planar 3D Hex 1854

Associated files
tri2D.fsp
tri2D.lsf

Triangular lattice problems can be solved by creating a larger unit cell that is rectangular, from two triangular unit
cells. This means that you must use a pair of sources with the appropriate phase between them. The analysis object
dipole_cloud_tri automatically creates a set of randomly positioned dipoles, with a matching set of dipoles in each
unit cell.

To begin, load the example file tri2D.fsp. Run the script tri2D.lsf to complete the parameter sweeps K-
Gamma, M-K, and Gamma-M. This will calculate the bandstructure in these three directions. Finally, it will plot the
results.

The dipole sources in the file are oriented along the z-direction by default to return the TM bandstructure. In order to
get the TE bandstructure, edit the dipole_cloud analysis group and change the "theta" property from 0 to 90 to
change the orientation of the dipoles so that they are polarized in the xy-plane.

2003 - 2016 Lumerical Solutions, Inc


Applications 1851

TE bandstructure

TM bandstructure

8.1.3.5.2.4 Square 3D

Solvers 101

FDTD

See also
Bandstructure 1843

Square 2D 1848
FCC 3D 1852
Planar 3D 1853
Waveguide 3D 1856

Associated files
square3D.fsp
square3D.lsf

Related publications
H. Szer and J. Haus, "Photonic bands:
simple-cubic lattice," J. Opt. Soc. Am. B 10,
296-302 (1993).
Here we consider a 3D photonic crystal composed of a close-packed simple cubic lattice of air spheres in a
dielectric medium with a permittivity of 13 and lattice period 500 nm.

First, load the example file square3D.fsp. Next, run the square3D.lsf script to complete the sweeps for
calculating the bandstructure along the high symmetry directions. After all the simulations have completed, the

2003 - 2016 Lumerical Solutions, Inc


1852 Lumerical Knowledge Base

script will plot the sweep results. If you wish to display all points in the same color as shown on the figure below,
open the chart settings and check the "plot all data in the same color" option.

This example shows how you can get results quickly by setting a coarse dx, dy and dz. Once you have narrowed in
on the portion of the bandstructure you are interested in, you can reduce the values of dx, dy and dz to obtain more
accurate results. To be certain of your final accuracy, it is worth running some convergence tests. The resulting
bandstructure from this example does match the results published by Szer and Haus in the reference listed
above.

8.1.3.5.2.5 FCC 3D

Solvers 101

FDTD
See also
Bandstructure 1843
Square 3D 1851
Triangular 2D 1850
Associated files
bandstructure_fcc.fsp
bandstructure_fcc.lsf
Related publications
Lopez et al., Effective refractive index and
group velocity determination of three-
dimensional photonic crystals by means of
white light interferometry, Physical Review B
73, 125103, 2006.

Here we consider the 3D photonic crystal described in Lopez et al. The crystal is an FCC close packed lattice of
spheres with diameters of 708nm.

Calculating the bandstructure of triangular type lattices (FCC, BCC, 2D triangular) is a bit more complex than
rectangular latices because the simulation region will necessarily include multiple unit cells. For an FCC lattice, the
simulation region will include 4 unit cells. To avoid problems with artificial zone folding, we must have matching
dipole sources in each unit cell. Each of the matching dipoles must be in exactly the same position within its unit
cell. The dipole phase must also be adjusted according to the following formula:

2003 - 2016 Lumerical Solutions, Inc


Applications 1853

r r
D q = - 180 k Dr
p
where
= phase offset from reference dipole
r
k = simulation wave vector
r
r = position offset from reference dipole

To reproduce the results in Figure 1 of Lopez, open the simulation file, then run the script. The script will run a
series of simulations, calculating the band structure from the Gamma point to the L, W, K, L and U high symmetry
points.

8.1.3.5.2.6 Planar 3D

Solvers 101

FDTD
See also
Bandstructure 1843

Square 2D 1848
Square 3D 1851
Planar 3D Hex 1854

Waveguide 3D 1856

Associated files
planar3D.fsp
planar3D.lsf

In this example, we consider a membrane structure of thickness 200 nm and refractive index =3.4. A square lattice
of holes with radius = 130 nm have been etched into the layer. The lattice period is 500 nm.

In this case, we use symmetric boundary conditions to reduce the computational volume and to consider only TE-
like photonic crystal modes in the slab.

To begin, load the demo file planar3D.fsp. The dipole source group and bandstructure groups are similar to the
Square 3D example. The planar (2D periodic) nature of this device is the only difference, which means there is no
need to sweep kz.

Use the script file planar3D.lsf to run the Gamma-X parameter sweep and create the following plot.

2003 - 2016 Lumerical Solutions, Inc


1854 Lumerical Knowledge Base

8.1.3.5.2.7 Planar 3D Hex

Solvers 101

FDTD
See also
Bandstructure 1843
Square 2D 1848
Square 3D 1851
Triangular 2D 1850
Planar 3D 1853
Waveguide 3D 1856

Associated files
planar3D_hex.fsp
planar3D_hex.lsf

In this example, we consider a membrane structure of thickness 200 nm and refractive index =3.4. A hexagonal
lattice of holes with radius = 130 nm have been etched into the layer. The lattice period is 500 nm.

In this case, we use symmetric boundary conditions to reduce the computational volume and to consider only TE-
like photonic crystal modes in the slab.

To begin, load the demo file planar3D_hex.fsp. The simulation setup very much like the rectangular lattice
planar example, but with a number changes related to the hexagonal lattice. See the 2D triangular lattice example
for more information on simulating Hexagonal / Triangular lattices.

To run the three parameter sweeps: Gamma-M, M-K, K-Gamma, and to plot the results, run the
planar3D_hex.lsf script file.

2003 - 2016 Lumerical Solutions, Inc


Applications 1855

8.1.3.5.2.8 BCC 3D

Solvers 101

FDTD
See also
Bandstructure 1843
FCC 3D 1852
Triangular 2D 1850
Associated files
bandstructure_bcc.fsp
bandstructure_bcc.lsf

Here we consider the 3D BCC photonic crystal. The crystal is composed of dielectric spheres with refractive index 4
and a filling ratio of 10%.

Calculating the bandstructure of triangular type lattices (FCC, BCC, 2D triangular) is a bit more complex than
rectangular latices because the simulation region will necessarily include multiple unit cells. For a BCC lattice, the
simulation region will include 2 unit cells. To avoid problems with artificial zone folding, we must have matching
dipole sources in each unit cell. Each of the matching dipoles must be in exactly the same position within its unit
cell. The dipole phase must also be adjusted according to the following formula:
r r
D q = - 180 k Dr
p
where
= phase offset from reference dipole
r
k = simulation wave vector
r
r = position offset from reference dipole

To reproduce the following bandstructure plot, open the bandstructure_bcc.fsp simulation file, then run the
bandstructure_bcc.lsf script file.

2003 - 2016 Lumerical Solutions, Inc


1856 Lumerical Knowledge Base

8.1.3.5.2.9 Waveguide 3D

Introduction
When photonic crystals are used to make waveguides, the calculation of the photonic bandstructure becomes a 1
dimensional problem since the waveguide structure is only periodic in the direction of propagation. In this example
we calculate the bandstructure and mode loss of the waveguide structure described in K. Ogawa et al.

Solvers 101

FDTD
Associated files
waveguide3D.fsp
waveguide3D.lsf

See also
Photonic Crystals 1821

Bandstructure 1843
Waveguides 1876
Related publications
K. Ogawa et al., "Broadband Variable
Chromatic Dispersion in Photonic-Band
Electro-Optic Waveguide", OThE4, OFC
(2006)

Simulation setup
The waveguide has been drawn up in the simulation file waveguide3D.fsp, and is shown in the figure above. The
waveguide is composed of a rectangular a Si3N4 rectangular core (1 m width and 400nm thickness), shown in green,
on a 100 nm thick layer of Si with a triangular PC lattice of lattice constant a = 400 nm and hole diameter 260 nm.
The holes are filled with SiO2 and the cladding above the waveguide core is also SiO2. The 100 nm thick Si layer is
on a 1 m thick layer of SiO2. The substrate is Si.

We use a different dipole cloud than the one in the Object library. The dipole cloud object that we use in this
simualtion does not set the properties of the dipoles so that we are able to set them directly by modifying the global
source properties. This allows us to easily create a narrowband source when we want to selectively excite the
fundamental mode only.

Analysis
Before calculating the bandstructure, we will consider the type of results we expect. The waveguide is periodic in the

2003 - 2016 Lumerical Solutions, Inc


Applications 1857

direction of propagation, with period = a * sqrt(3), where a is the photonic crystal lattice constant. Since a = 400 nm,
we have a period of approximately 693 nm. However, if we consider the microstructure along the direction of
propagation of the waveguide, the 2D PC consists of alternating rows of holes, each row shifted laterally to the next.
Apart from the lateral shift, there is no difference between the first row of holes and the second one. Therefore the
structure is "nearly periodic" with a pitch of period/2. We can expect to see results that are nearly equivalent to a
waveguide that is periodically modulated at a pitch of period/2=346.5nm. When the guide wavevector, k, equals 2p/
period, there will be a barely observable bandgap. However, when the wavevector is 2p/(period/2) = 2*2p/period, we
expect to see a large bandgap.

It should be noted, however, that the true period of the waveguide is 693 nm. Thus PC waveguide modes near the
large "second order" band gap may have radiation components that contribute to loss. In addition, there may be
some weak coupling at a wavelength of 1550nm to the Si substrate with the SiO2 cladding n=1.45 only 1 micron
thick. Although this coupling mechanism is very weak, it will contribute to the loss over propagation distances of a
large number of periods.

All modes
With the default settings in the simulation file, the sweep named Bandstructure will calculate the bandstructure for
kx = 0-0.5. The script produces the plot below which includes points representing the zone-folded lightline for the
cladding material (n=1.45). In the screenshot below, red lines have been drawn over the points composing the
lightline for clarity. It should be noted that any modes above the lower branch of the lightline are lossy although the
loss is very small, while any modes above the upper branch of the lightline are highly lossy. The waveguide bandgap
is shown on the figure and the lower curve shows that the predicted gap is around f = 0.29. This corresponds to a
wavelength range of approximately 1400nm. There is also a higher order mode supported in the waveguide at higher
frequencies and it exists below the upper lightline. Some care might be required to avoid coupling light into this
mode at the waveguide facet.

Hint: for more accuracy, the waveguide bandstructure can be run again with twice as many grid points in x and y.
This change will lengthen the amount of time required to calculate the bandstructure but will make the calculation of
the bandgap more accurate.

Fundamental mode
The bandstructure calculated above shows the waveguide has many modes. Here, we'll concentrate on the
fundamental mode just below the gap at a normalized frequency of 0.27 (1500 nm, 200THz) for k=0-0.05.

Make the following changes to the simulation file


Simulation region simulation time = 3000fs
Global source settings frequency = 210 THz
We want a narrow source bandwidth to excite a few pulselength = 150

2003 - 2016 Lumerical Solutions, Inc


1858 Lumerical Knowledge Base

modes (ideally only one). This requires a longer time offset = 350
domain pulse and is the reason we increased the length
of the simulation.
Model group In setup -> variables tab
f1 = 200 THz
f2 = 220 THz
Parameter sweep kx end point = 0.05
number of points = 20

If you change the number of bands to 1 in the script file and re-run it with the updated parameter sweep mentioned
above, the following plots will be created.

Dispersion and loss


With changes to the simulation described above, we are exciting a single mode of the device. In addition to
calculating the bandstructure, it is also possible to calculate other properties of the mode, such as group velocity
and loss. The script file automatically does these calculations when the bandstructure object returns data for only
one band.

Loss
We can calculate the intrinsic loss of the photonic crystal waveguide. This is the loss due to the period of
approximately 693 nm which allows weak coupling into the substrate.

The excitation and subsequent decay of the waveguide mode is sampled at various points inside the waveguide and
the associated amplitude time signal, plotted on a log scale. We can see the source pulse and then the slow decay
of the waveguide mode. If we zoom in on the decay region, we see a straight line, indicating the expected
exponential decay of the mode.

2003 - 2016 Lumerical Solutions, Inc


Applications 1859

The analysis object field_decay_slope calculates the slope of the decay. This data is used by the script file to
calculate the loss parameter. In order to translate this into a loss per unit length, we need the group velocity of the
mode. The script file also calculates the group velocity from the bandstructure data. The group velocity is
normalized to the speed of light in a vacuum. The loss is plotted in dB/mm.

In the script file, change the number of bands to 1 and re-run the updated parameter sweep mentioned above with
the the script file. The following curve will be plotted

These results look reasonable, as we expect this loss to increase closer to the band-edge as the group velocity
decreases.

8.1.3.5.2.10 Magneto-Optical w aveguide


For most waveguide that are uniform in the direction of propagation, such as fibers, ridge waveguide, it is easy to find
the dispersion relations using Lumerical's FDE 109 solver. For example, see Dispersion Analysis 2064 and Waveguides
1856 . For waveguides with periodic patterning in the direction of propagation, we can use the FDTD solver to calculate

the dispersion relations and bandstructure, as shown in Waveguides 3D 1856 . In this section, we will use the same
FDTD method to analyze the dispersion of waveguides that are uniform in the direction of propagation. For simple
material systems, the FDE solver is the best solver for studying uniform waveguides, but it is not capable of
simulating waveguides composed of some complex materials such as off-diagonal anisotropic and nonlinear
materials. For these advanced material systems, the FDTD method must be used.

In this example, we start by demonstrating the simulation methodology by calculating the bandstructure of simple
uniform waveguide composed of a simple linear, isotropic material. Next, we repeat the calculation using a diagonal
anisotropic material. Finally, we repeat the calculation again using a magneto-optical material (non-diagonal

2003 - 2016 Lumerical Solutions, Inc


1860 Lumerical Knowledge Base

anisotropic material). It is worth noting that the first two material systems could be studied with the FDE solver, but
not the third.

For periodically patterened waveguides, such as the line-defect photonic crystal waveguide, we simulate one unit cell
along its propagation direction. For any uniform waveguide, any length of the waveguide can be considered as
"periodic" along its propagation direction. Therefore, for these waveguides, we can also simulate one "unit cell". In
this case, the value of the period is "arbitrary". For the sake of simulation efficiency, we use one mesh along the
propagation direction, eg., the span is dx if along x axis. This means that we have only one single FDTD Yee cell in
this direction. The result is to push the edge of the Brillourin zone to k=pi/dx.

To reduce the grid dispersion, this mesh size dx should be typically less than lambda/neff/10 where neff is the
largest effective index we want to study. In the case of index guided structures, we can set dx < lambda/n/10 where
n is the maximum index. In any case, there is little computational cost to making dx smaller UNTIL it becomes
smaller than dy and dz. The single mesh cell should be enforced with a mesh override region. For example if we
want dx = 25nm, we can use a mesh override region that forces dx (but not dy or dz) to be 25nm, and then we set
the x span of the FDTD region to 25nm.

Solvers 101

FDTD
Associated files
nr_waveguide3d.fsp
nr_waveguide3d.lsf

See also
Photonic Crystals 1821
Bandstructure 1843
Waveguides 1876
Line defect 1879 wavegide
Magneto-Opitcal Kerr effect 2879
Creating anisotropic materials 253

Simulation setup
The waveguide has been drawn up in the simulation file nr_waveguide3d.fsp, which is a simple rib waveguide
shown above.The waveguide is composed of a rectangular core (2.6 m wide in y and 1 m thick in z, refractive index
1.5), on a substrate of refractive index 1.4. The anisotropic or nonlinear parameters will be added in the analysis
section.

Suppose the propagation is along x, we can use a "x span" of 50nm or so and a override mesh with dx=50nm to
have only one cell in x. This means we have approximately lambda/dx=1.55microns/1.5/50nm ~ 21 points per
wavelength in the direction of propagation. Such small mesh size makes the additional grid dispersion small(see
details 1674 on grid dispersion in FDTD).

If we have no idea of the mode profiles and want to extract the full bandstructure information then a randomized
dipole cloud should be used as a source, with a bandwidth that covers the full range of frequencies we want to
consider, see the examples in Bandstructure 1843 .
For the current example, we know that the waveguide mode we are looking for is a small perturbation to the
waveguide system (for example for some nonlinear or anisotropy effects), then we can use a mode source that starts
with the solution from the FDE solver. This will converge much faster than a randomized dipole cloud. However, the
user should be cautious because some modes may be completely eliminated by this approach, particularly if they
have a different symmetry from the mode used to excite the system.

2003 - 2016 Lumerical Solutions, Inc


Applications 1861

This waveguide supports two almost degenerate TE and TM modes. With the FDE solver, we can select both the
TE and TM modes and then track these modes in a wavelength sweep of 1.5 m to 1.6 m. Such sources will be
approximately polarized at 45 degrees in the waveguide and will excite both modes equally. We cannot use only one
mode source because the modes are orthogonal. We use the simulation band from 1.4 to 1.7 m. The value of beta
or effective index vs wavelength can then be calculated through sweeping kx. For a fast demonstration, we only
sweep 5 points from kx=5.6e6 to 6.0e6 rad/m.

Analysis
We first simulate the regular waveguide without anisotropy or nonlinear property. Open the nr_waveguide3d.lsf file,
and run the lsf file to sweep different k ( set in the sweep group). Then the effective index can calculated as k/k0
where k0 is the wavenumber in vacuum. The beta and the spectrum vs. wavelength are plotted as follows:

Propagation constant Resonant spectrum

It clearly shows that there is only one resonant peak at each k due to the mode degeneration.

Anisotropic waveguide

We now set the object core to have an anisotropic refractive index of 1.5;1.49;1.51. This will break the degeneracy
of the TE and TM modes. After re-running the sweep and the script file, we see the following figures showing that the
degeneracy is indeed broken. At each k, there are two resonate frequencies corresponding to the two modes.

Propagation constants of the two modes Effctive index of two modes

2003 - 2016 Lumerical Solutions, Inc


1862 Lumerical Knowledge Base

Amplitude of Ey and Ez Resonant spectrum

It is also useful to run the simulation with an intermediate value of kx = 5.9e6 rad/m. We can then plot the E field in
the time monitor waveguide center, and particularly the values of Ey and Ez as shown above (bottom left). We can
see that while we inject both modes, there is no coupling between them which makes sense because the two
modes are orthogonal.

Magneto optical waveguide

Magneto optical material has an anisotrpoic permittivity with off-diagonal components. When light passes through
such material, the polarization plane will rotate, and the left- and right- rotated circular polarization will propagate in
different speed. Such anisotropic permittivity can be diagonalized (please refer "anisotropic materials 253 "). We
enable the grid attribute called faraday_effect and make sure that the object core has the "grid attribute name"
property also set to faraday_attribute. The grid attribute faraday_effect applies a complex unitary transformation of
that was setup with the following script:
# Define U
# EL = (-Ey + 1i*Ez)/sqrt(2);
# ER = (-Ey - 1i*Ez)/sqrt(2);
# E_circular = U * E_cartesian, therefore:
U = [ sqrt(2), 0, 0;
0, -1, 1i;
0, -1, -1i] / sqrt(2);

# Set U as transformation matrix


select("faraday_attribute");
set("U",U);

Now we have a waveguide made of a material with left and right circularly polarized light which have indices of 1.49
and 1.51. This means that our initially injected light which is approximately 45 degree polarized should rotate as the
simulation runs. Additionally, we can extract the neff vs lambda using the same approach for both of the resulting
modes. These results are

2003 - 2016 Lumerical Solutions, Inc


Applications 1863

Propagation constants of the two modes Effctive index of two modes

Amplitude of Ey and Ez Resonant spectrum


We can again run a single simulation with kx = 5.9e-6 m-1 and plot |Ey| and |Ez| from the time monitor
waveguide_center. We indeed see that the polarization rotates with time (above, bottom left).

Finally, if we want to extract the mode profiles for the 2 resulting modes, we need to add a frequency domain monitor
(called "mode profiles") and ensure that the wavelengths chosen correspond to the peak values of the 2 modes. To
find the exact frequency, we can have the time monitor apodized starting from 300fs to 900fs. Run the simulation
and using the following script to extract the frequency:
t=getdata("waveguide center","t");
Ey=getdata("waveguide center","Ey");
f=linspace(190,197,100)*1e12;
eey=czt(pinch((Ey)),t,f*2*pi);
plot(c/f*1e6,abs(eey));
plot(f*1e-12,abs(eey));
n=findpeaks(abs(eey),2);
?c/f(n)*1e6;

For the profile monitor, we also need to use the same apodization, and record the profiles for the found wavelengths
or frequencies. Please note that these mode profiles look very similar when considering |E|. Looking at a line plot of
the phase through the center of the mode, we can see that the phase of Ey and Ez is advanced or retarded by 90
degrees, corresponding mainly to a right or left circularly polarized mode.

Similarly, you may simulate waveguide with nonlinear material.

2003 - 2016 Lumerical Solutions, Inc


1864 Lumerical Knowledge Base

8.1.3.5.2.11 Out of Plane

Introduction
In the previous 2D-periodic photonic crystal bandstructure examples, we have only considered modes that propagate
within the plane of periodicity, where kx and ky vary and kz=0. This example demonstrates how to get bandstructure
plots for out-of-plane propagation where kz is no longer 0.

Solvers 101

FDTD
Associated files
tri_2D_kz.fsp
tri_2D_kz.lsf

See also
Simulation Methodology 1844

Triangular 2D 1850
Related publications
Joannopoulos, J.D. et al. Photonic Crystals:
Molding the Flow of Light. 2nd Ed. Princeton:
Princeton University Press, 2008. 75-8.

Simulation setup
In this example, we want to simulate the out-of-plane bandstructure for a triangular lattice with rods that are uniform
and infinite in the z-direction. By using a 3D simulation with Bloch boundary conditions in the x, y, and z directions,
this allows us to control the values of kz as well as kx and ky. The simulation region only needs to be one mesh cell
thick in the z-direction.

The model analysis group is used to set the value of kz. In order to get the band frequencies over a range of kz
values, we set up a parameter sweep task to sweep the value of kz over the desired range. In this example we are
interested in the out-of-plane bandstructure at point gamma where kx=0 and ky=0, and we sweep kz from 0 to 2 in
bandstructure units (SI*a/(2*pi)). The values of kx and ky in the sweep can be changed in order to get the out-of-
plane bandstructure at a different point on the Brillouin zone.

Running the simulation


Open the simulation file tri_2D_kz.fsp and run the associated script file to run the parameter sweep and plot the
band diagram.

Results

2003 - 2016 Lumerical Solutions, Inc


Applications 1865

The resulting band diagram closely matches the first few bands of a structure of the same material and radius/lattice
constant ratio plotted in Figure 11 in Chapter 5 of Joannopoulos' text.

Plot of fs vs k
Extracted band diagram

8.1.3.5.2.12 Simulations w ith Loss


Extracting the bandstructure for simulations with high loss may require some additional care in the setup and tuning
of the simulation parameters because the field decay quickly which makes it challenging to locate the resonant
modes of the system.

Solvers 101

FDTD
Associated files
bandstructure_1D.fsp
bandstructure_1D_fixed.fsp
bandstructure_1D.lsf

See also
Simulation Methodology 1844

Square 2D 1848

To demonstrate how to extract the bandstructure for simulations with high loss, here we show an example of a 1D-
periodic chain of spheres made of a highly absorbing metal, with PML boundaries on four sides.
bandstructure_1D.fsp contains the simulation set up according to the simulation methodology 1844 page and it
does not yield a clear bandstructure diagram. bandstructure_1D_fixed.fsp has implemented some of the
following solutions listed below, and results in a clear bandstructure plot. The bandstructure plots can be obtained by
running the bandstructure_1D.lsf script file.

Problems associated with simulations with high loss


The fields decay more quickly when more loss is introduced, and the useful part of the time signal that is collected
by the time monitors is shortened. The Fourier transform of the time signal becomes noisy, making it difficult to
extract the resonance peaks.

The following figures compare the sum of the Fourier transforms of the time monitor data, fs, at a particular k vector
for the lossless square 2D 1848 simulation (left), and the lossy 1D-periodic chain example here (right). You can see
that the signal from the simulation with low loss has sharper, narrower peaks and less noise than the signal from the
simulation with high loss. This is why it is more difficult to obtain the correct resonance peaks for simulations with

2003 - 2016 Lumerical Solutions, Inc


1866 Lumerical Knowledge Base

high loss.

Solutions
The following plots show the bandstructure diagram for the unmodified bandstructure_1D.fsp (left) and
modified bandstructure_1D_fixed.fsp (right) simulation files based on the solutions listed below.

Source and monitor placement


If you are interested in looking at a particular mode or set of modes and you have an idea of what the field profiles of
the modes should look like, you can choose to place the dipole sources in optimal positions and orientations for
exciting those modes, while avoiding exciting modes that you are not interested in. In the example here, we are only
interested in looking at the mode with strong fields between the spheres, so we place an x-oriented dipole source on
the x-axis between the spheres.

Similarly, by choosing monitor placement one can also minimize the signal that is recorded from modes you are not
interested in. In our example we have also placed the monitor on the x-axis.

Symmetry
You can use symmetry in the boundary conditions to isolate modes of interest. In our example, we are interested in
a mode that is symmetric across the y and z axes. By setting the y and z boundary conditions to be symmetric, we
eliminate any modes that do not satisfy this symmetry condition.

Apodization
The resonance that we are interested in may only occur for a short period of time and it may not occur at the center
of the recorded time signal. To help determine which portion of the time signal to take the Fourier transform from,
you can run a preliminary simulation and look at time monitor signal, or use a movie monitor to estimate the center
time and duration of the resonance. You can then use this information to adjust the apodization 660 window center
and width settings in the analysis tab of bandstructure object.

2003 - 2016 Lumerical Solutions, Inc


Applications 1867

Source spectrum
You can also adjust the source spectrum to ensure that more energy is coupled into the bands you are interested
in. For example, if you are interested in the high frequency bands, you can adjust the source frequency center and
bandwidth to the range that overlaps with the higher frequency bands. As a result, the strength of the resonance
peaks in the Fourier transformed time signal from the higher frequency modes will increase relative to the lower
frequency resonance peaks, allowing you to extract the higher frequency bands. In the example file that has been
fixed, the minimum and maximum source frequencies have been set to match the apodization frequency range in the
bandstructure object analysis tab variables.

Tolerance
It is also possible that you have a clean signal from which to extract the bandstructure but some of the points are
being excluded from the bandstructure plot because the height of the resonance peak is below tolerance. If the
bands can be seen clearly in a plot of fs vs k, then you will be able to extract more of the points in the bandstructure
by lowering the tolerance setting in your analysis script.

8.1.3.5.2.13 Woodpile 3D

Solvers 101

FDTD
In this topic
Bandstructure 1843

Square 3D 1851
FCC 3D 1852
Associated files
woodpile_bandstructure.fsp
woodpile_bandstructure.lsf
Related publications
"Photonic Crystal Laser-Driven Accelerator
Structures", A dissertation submitted to the
department of physics and the committee on
graduate studies of Stanford University in
partial fulfillment of the requirements for the
degree of Doctor of Philosophy, Benjamin
Cowan, March 2007 - Chapter 3

In this example, we calculate the bandstructure of a woodpile structure described in the above reference. See
chapter 3 of the thesis for details of the structure geometry used in this example, as well as further information on
the woodpile Brillouin zone and location of symmetry points

Due to the geometry of the woodpile structure, the simulation region encompasses two unit cells of the structure.
For this reason, each dipole source must have matching dipole in the second unit cell to avoid artificial zone folding
problems. See the FCC 3D example for more information.

To calculate the bandstructure, open woodpile_bandstructure.fsp and run the associated script. The script
will run a series of parameter sweeps to calculate the bandstructure between selected symmetry points.

2003 - 2016 Lumerical Solutions, Inc


1868 Lumerical Knowledge Base

8.1.3.5.2.14 Equi-frequency Contours


Equi-frequency or isofrequency contour is supplementary in analyzing behaviors of photonic crystals, which is the
intersection of a constant frequency -plane to a dispersion surface [1]. It quantifies all allowed wavevectors in the
photonic crystals and their corresponding frequencies. A perfect circular equi-frequency contour means that light
can travel isotropically. A square-like equi-frequency contour can be used to harvest its collimation property (self-
collimation), and a star-like contour may be used in designing high-dispersive elements (superprism) that can
support many channels in optical communications. In the later two cases the photonics crystal shows strong an-
isotropic property. With several such equi-frequency contours at different frequencies, one can analyze whether the
photonic crystal can have negative refraction or not, depending on the sign of the dispersion slope around Gamma or
around M [3].

Like the band structure construction, in general there are two methods to create the equi-frequency contours. One
method uses frequency-domain "Plane Wave Expansion (PWE) " method, and the other uses the time domain
method which will be described below.This example shows how to use the time domain method with FDTD
Solutions. The EFC is obtained at given frequencies by Fourier-transforming the spatial field at steady-state recorded
from a frequency-domain field monitor.

Solvers 101

FDTD
Associated files
square2D_efc.fsp
square2D_efc.lsf
See also
Photonic Crystals 1821

Bandstructure 1843
References
[1] Dennis W. Prather et al, Photonic crystals:
theory, applications, and fabrication, Wiley, 2009
Jean-Michel Lourtioz, Photonic crystals--Towards
nanoscale photonic devices, Springer, Berlin, 2003
[2] Guilin Sun and Andrew G. Kirk, "On the
relationship between Bloch modes and phase-related
refractive index of photonic crystals," Opt. Express
15, 13149-13154 (2007)
http://www.opticsinfobase.org/abstract.cfm?URI=oe-
15-20-13149
[3] Guilin Sun and Andrew G. Kirk,"Analyses of
negative refraction in the partial bandgap of photonic
crystals," Opt. Express 16, 4330-4336 (2008)

2003 - 2016 Lumerical Solutions, Inc


Applications 1869

http://www.opticsinfobase.org/abstract.cfm?URI=oe-
16-6-4330
[4] Rafif E. Hamam, Mihai Ibanescu, Steven G.
Johnson, J. D. Joannopoulos, and Marin Soljacic,
"Broadband super-collimation in a hybrid photonic
crystal structure," Opt. Express 17, 8109-8118
(2009)
http://www.opticsinfobase.org/oe/abstract.cfm?
URI=oe-17-10-8109

Here we use a 2D square photonic crystal similar to the one illustrated in the 2D bandstructure example. It is
composed of dielectric rods in air. The lattice constant is ax=ay=0.325 um and the refractive index is 1.583. Since
the simulation volume is quite large, and the photonic crystal structures creates strong resonances, the simulation
time is set to 10,000fs, which is longer than usual simulation. To speed up simulation, and to excite only modes
with a given symmetry, we use symmetry BC's to simulate only one quarter of the photonic crystal. To have
accurate spatial Fourier transform, the simulation region is set to be 60 by 60 um, thus an array of 120 by 120 is
created. A mesh override region is used to ensure the mesh has the same periodicity as the structure.

To excite all the possible spatial modes, the dipole source is usually not recommended to be located at a high
symmetry location (i.e. the center of a hole). We set one dipole source off-center. Due to the symmetry BC's, the
dipole source will be mirrored in the other 3 quadrants. A frequency domain field monitor will be used to record the
spatial field profile over the entire domain at a number of frequencies. In this case, we simulate TM polarization, so
we only need to monitor Ez field.

After the simulation we look at the spatial field intensity at given frequency. The left figure below shows |E(x,y)|^2 in
log scale at wavelength 1.5um. We then can use a Fourier transform to look at the same data in reciprocal lattice
space E(kx,ky) where kx,ky are spatial frequencies or wavenumbers.

We can either use fast Fourier transform (fft) or chirped Fourier transform (czt). The standard fft function will work,
but it will give results for a very large range of wave numbers. The czt function is often more convenient as it allows
you calculate the transform only over the wave numbers of interest. This example uses the czt function to get the
transform for Bloch wave numbers from -3*pi/ax to 3*pi/ax. The right figure below shows the Fourier transform of Ez
at a wavelength of 1.5um, corresponding to a normalized frequency of f*a/c= 0.217. The high symmetry points
Gamma, X and M are illustrated on the figure. Other Brillourin zones are clearly shown, which are not plotted when
using the PWE method.

Field profile |Ez(x,y)|^2 at 1.5um in log scale First Brillouin zone and higher-order Brillouin zones |
E(kx,ky)|^2

Below is the bandstructure of this photonic crystal, calculated with FDTD Solutions using the technique described in

2003 - 2016 Lumerical Solutions, Inc


1870 Lumerical Knowledge Base

the Bandstructure 1843 section. The red line corresponds to the normalized frequency of 0.217. The radius of the
circle corresponds to the wavenumber originated from Gamma point. The traditional bandstructure plot only shows
modes along the Gamma-X-M-Gamma line. The EFC allows us to see all the possible wavevectors.

Note: Bandstructure plot


It is worth noting that the x-axis in the above figure is not uniformly sampled in k. The figure uses a fixed the
number of sample points along each arm of the Gamma-X-M-Gamma contour, even though the arms have different
lengths. This can be an important detail when trying to estimate the shape of the contour from the bandstructure
plot. Of course, if you calculate the EFC, it is easy to see the shape of the contour. A circular region means
isotropic propagation, while other shapes indicate anisotropic behaviors.

Users familiar with PWE method may wonder why the equi-frequency contours in the higher-order Brillourin zones
(not surrounding Gamma) do not have the same intensity. The reason is that the system was excited by a single
real dipole. The coupling of the dipole to each spatial harmonics is not the equivalent, which leads to different
amplitudes. This can be an advantage of the time domain method: it can analyze the relative amplitude of each
spatial harmonics contributed to the Bloch modes. Recall that the Bloch modes are expressed as [1]

(
exp( i k r ) Am,n exp i (mG x + nG y ) r ),
where k is the fundamental wave vector, Gx and Gy are reciprocal lattice constants, and Gxax=2 , Gyay=2 .
Depending on the photonic crystal's structure, one spatial harmonic mode may have higher coupling efficiency than
the other.

From other Brillouin zones, one can know the relative amplitude or intensity of other spatial harmonics. The

fundamental mode has m=0,n=0 with amplitude A00. So (m,n)=(1,0) is the spatial harmonic mode with k + G x ,
and its amplitude A10 is smaller than A00. One can easily identify the modes (0,1),(-1,0),(0,-1) , which have the
same amplitude as A10 due to symmetry, and the modes of (1,1),(-1,1),(-1,-1),(1,-1), with smaller amplitude than
A10. If necessary, you can estimate quantitatively the amplitudes of those modes [2] (note that the figure shows
intensity in log-scale). However, please keep in mind that those modes are not isolated, and all such modes
compose of the Bloch waves inside the photonic crystal.

In a homogenous medium, the reciprocal lattice constant is zero, so no Bloch modes can be found, although one
can get similar EFCs for the fundamental wave vectors at different frequencies.

Most often people are only interested in the EFCs at the first band. Figures below shows EFCs at 1.5um, 1.25um,
and 1.0um, or f*a/c=0.216667,0.26 and 0.325, respectively, directly from fft calculation, which are circles in all the

2003 - 2016 Lumerical Solutions, Inc


Applications 1871

cases and all in the first band. This is common for the first band.

Equi-frequency contour at wavelength 1.5um Equi-frequency contour at


wavelength 1.25um

Equi-frequency contour at wavelength 1.0um Equi-frequency contour at 3 different


wavelength

It can be useful to plot multiple EFC's on a single figure, to more clearly see how the contour evolves as a function of
frequency, as shown on above (bottom right). From the equi-frequency contour plots above, you can see that the
radius of the circle increases with frequency, thus the dispersion slope is also positive. This is in consistent (and
equivalent) to the bandstructure data obtained by other means.

EFC plots can be a helpful tool when analyzing some aspects of photonic crystals [2], such as negative refraction
when the fundamental wave numbers decreases as frequency increases (in higher band [2], or the first band at the
partial bandgap [3]), collimation (square-like EFCs [4]), and highly dispersive effects etc.

8.1.3.5.3 Bloch Mode Profile

Objective
The goal of this example is to demonstrate how to simulate the Bloch mode profile of a periodic structure, including
degenerate modes.

2003 - 2016 Lumerical Solutions, Inc


1872 Lumerical Knowledge Base

Solvers 101

FDTD
Associated files
bloch_mode.fsp
bloch_mode_bandstructure.lsf
bloch_mode.lsf

See also
Photonic Crystals 1821
Bandstructure 1843
Making a CW movie 870
Apodization 660
Square 3D 1851

Here we use a 3D cubic lattice structure composed of a simple cubic lattice of spheres with lattice period 500 nm.
The spheres are composed of a material with refractive index = 3, and radius = 130 nm. The bandstructure for this
lattice is shown below. To generate the band diagram, open bloch_mode.fsp run the
bloch_mode_bandstructure.lsf. If there is no sweep data, enable the dipole_cloud and bandstructure
analysis group to run all the sweep. Please refer to bandstructure calculation 1844 for more details.

Now we extract the Bloch modes of the 2 lowest order modes at the Brillouin zone edge (kx = p/a) from a single
simulation. We know that these modes have frequencies 256 THz and 281 THz when (kx, ky, kx) = (0.5, 0, 0), at the
20th sweep point. We also know that the Bloch mode can be written as
Ek ( x) = exp( ika)uk ( x) . Our goal is to
extract uk(x).

Load the file bloch_mode.fsp. This example uses two 3D frequency profile monitors to determine the field profiles
of the modes. Each monitor is set to the frequency of one of the modes and uses the time apodization feature to
correctly extract the field profile information at that frequency using Fourier transforms.

2003 - 2016 Lumerical Solutions, Inc


Applications 1873

Due to the symmetry of the problem, each of the bands calculated in the bandstructure above is doubly degenerate,
one mode for each polarization. Thus care must be taken to excite only one of these Bloch modes. By placing a
point dipole source on a symmetry plane of the lattice, one mode of a specific polarization may be excited directly.
Note that it is very important, when degenerate modes are present, to use symmetry properties to determine where
to place the point dipole sources. Otherwise you will extract the field profile corresponding to a linear combination of
all the degenerate modes!

After running the simulation project, open the script prompt and run the script file bloch_mode.lsf. This will
calculate |uk(x)|2 for the modes at the two frequencies and plot cross sections of them. The results are shown
below:

lower frequency upper frequency


symmetry: sy = +1, sz = -1 symmetry: sy = +1, sz = -1

8.1.3.5.4 PC optical sw itch

Introduction
The self-collimation of light in perfectly periodic photonic crystals (PC) have attracted significant research efforts due
to its potential role in photonic integrated circuits, which have several key advantages over discrete optical
components. The goal of this example is to demonstrate a simple optical switch utilizing self-collimated beams and
line defects in photonic crystals.

2003 - 2016 Lumerical Solutions, Inc


1874 Lumerical Knowledge Base

Solvers 101

FDTD
Associated files
pc_switch.fsp
power_vs_r.lsf
pc_switch_2beams.fsp

See also
Photonic Crystals 1821

Related publications
Lee et al., "Line-defect-induced bending and
splitting of self-collimated beams in two-
dimensional photonic crystals", App Phys
Let 87, 181106 (2005)

Zhang et al., "Optical switches and logic


gates based on self-collimated beams in
two-dimensional photonic crystals", Optics
Express, Vol. 15, Issue 15, pp. 9287-9292
(2007)

Line defect-induced bending and splitting

The 2D photonic crystal is composed of dielectric rods of radius 0.35um and dielectric constant of 12. The lattice
constant is a = 1um and Perfectly Matched Layers (PML) are used on all boundaries. A Gaussian beam (with
FWHM of about 5um) at frequency 0.194c/a is launched from one side of the PC, and the resultant modes have
electric fields parallel to the rod axis. Note that the PC is extended pass the PML boundaries in order to prevent
reflections at these boundaries (see Extending structures through PML 368 ).

As shown in Lee et al. and the figures below, the self-collimated beam can propagate with almost no diffraction along
the PC (left image), and can also be completely reflected at the PC-air interface created by the line defect along the
diagonal (right image).

2003 - 2016 Lumerical Solutions, Inc


Applications 1875

The power_vs_r.lsf script sweeps through the various defect radii and plots the transmission/reflection as a
function of defect radius for the file pc_switch.fsp. The result reproduces figure 2 of the Lee et al. paper,
demonstrating that the power ratio between the two split beams can be very well controlled by varying the radii of the
defect rods.

Optical switch

An optical switch is purposed by Zhang et al. based on the same PC/line defect set up described above. The defect
radius here is 0.274um, which results in about 50% transmitted and reflected power (see the point of intersection in
the figure above). The figures below show the results of the line defect on the self-collimated beam.

I =I =I j j 2 are launched at the same


If two identical Gaussian beams with intensities 1 2 0
and phases 1 and
time, the self-collimated beams will interact and result in output intensities of:

I o1 = I 0 (1 + sin (j1 - j 2 ))
I o1 = I 0 (1 - sin (j1 - j 2 ))

I o1 = 2I 0 Io2 = 0 j1 - j 2 = 2k p + p / 2 and I o1 = 0 , I o 2 = 2I 0 when


Which means that , when
j1 - j 2 = 2k p - p / 2 , as shown in the figures below (figure 4 from Zhang et al).

2003 - 2016 Lumerical Solutions, Inc


1876 Lumerical Knowledge Base

By combining the results for both 1 and 2 Gaussian beams, this PC/line defect device can now operate as a logic
OR and XOR gate, as describe in Table 1 of the Zhang et al paper. These results can be reproduced using
pc_switch_2beams.fsp.

8.1.3.6 Waveguides - Photonic Crystal


3D FDTD is often used to simulate planar photonic crystal (PC) waveguide devices. However, theses devices tend to
be large in size and highly resonant, which means that the simulations typically require large amounts of memory
and simulation time. For the examples in this section, we will use the 2.5D FDTD propagation method in MODE
Solutions to simulate these devices much more efficiently. Please select from the following topics:

PC bandstructure 1876

Line defect 1879

8.1.3.6.1 PC bandstructure
Accurate bandstructure calculations are important for the design and analysis of photonic crystal devices. In this
example, we will focus on how to use MODE Solutions' 2.5D FDTD propagation method to calculate the
bandstructure of a slab photonic crystals device with a square and hexagonal lattice of holes.

For a more general description of how to calculate bandstructures using the FDTD method, please see
Bandstructure calculations 1843

2003 - 2016 Lumerical Solutions, Inc


Applications 1877

Solvers 101

varFDTD
In this topic
Setup 1877
Results and discussions 1878

Hexagonal lattice 1878


Associated files
planar_square.lms
planar_square.lsf
plannar_hex.lms
planar_hex.lsf

See also
Bandstructure calculations 1843
2.5D FDTD propagation method

Simulation Setup
In general, bandstructures can be calculated using a time domain method or using a plane wave expansion method.
One advantage of using the finite-difference time-domain (FDTD) method is that one can calculate slab photonic
crystals without band-folding effects. This technique is very useful for most photonic crystal devices compatible with
CMOS technology, where the geometry is planar, with a non-periodic 3rd dimension. In this example, we use the
2.5D FDTD propagation method in MODE Solutions to calculate the bandstructure of a slab photonic crystal with a
square and hexagonal lattice. We will also compare the results to that of 3D FDTD to show that the 2.5D FDTD
method can give comparable results with a fraction of the memory and simulation time required by 3D FDTD.

This example is the same as the Planar 3D example 1853 from the FDTD Solutions knowledge base. Here, the
membrane structure has thickness 200nm and a refractive index value of 3.4. A square lattice of holes with radius =
130nm have been etched into the layer, with the lattice period ax = 500 nm. Just like in the 3D FDTD example, the
2.5D FDTD "PROP" simulation region will cover exactly one period (unit cell) of the device. Note that the key
parameters such as the period, start/stop frequencies are specified in the "model" analysis group, under Setup-
>Variables. The "dipole_cloud" analysis group contains randomly-distributed electrical dipoles used to excited the
Bloch modes. The bandstrucutre analysis group contains randomly-distributed time monitors, and the time signals
are combined and used to calculate the bandstructure. A sweep project Gamma-X has been created to sweep the
k-vectors and locate the band gap for this square lattice. Note that this slab PC device supports TE and TM-like
modes. By choosing E mode(TE) for the polarization option under the Effective index tab of the "PROP" simulation
region, only the TE-like bandstructure will be calculated.

Since we are interested in the bandstructure over a large frequency range, it is important to verify the slab mode
profile over the entire simulation frequency range. For example, if the start frequency is too small, the slab may not
have a well-supported mode.

2003 - 2016 Lumerical Solutions, Inc


1878 Lumerical Knowledge Base

Correct, the slab mode is supported over the entire Incorrect, the slab is not supported at longer
frequency range wavelengths.

Based on these considerations, we will choose the start/stop frequencies to be 60THz/200THz, which covers most
of the first and the second bands.

Results and discussions


To begin, open planar_square.lms, and change the "bandwidth" option (under the Effective
index tab of the "PROP" simulation region) to "broadband" (the "narrowband" option was used
for the purpose of keeping the file sizes small, but the "broadband" option is necessary for accurate broadband
results). Use the script file planar_square.lsf to run the Gamma-X parameter sweep and create the figures
below. The left figure shows the bandstructure calculated using the 2.5D FDTD propagation method in MODE
Solutions, and the right figure shows the same result using 3D FDTD.

One can see that the results obtained using 2.5D FDTD and 3D FDTD are very similar.

Hexagonal lattice
In this section, we will calculate the bandstructure for a hexagonal lattice similar to the one from the Photonic
Crystal Waveguide 1879 example. To begin, open plannar_hex.lms, and change the "bandwidth" option
(under the Effective index tab of the "PROP" simulation region) to "broadband". Use
the script file planar_hex.lsf to run the Bloch wavevector parameter sweeps. The figures below show the
bandstructure of the TE and TM-like modes. Note that there is no bandgap for the TM-like modes.

2003 - 2016 Lumerical Solutions, Inc


Applications 1879

For comparison, the figure below shows the bandstructure calculated using 3D FDTD, including both the TE and TM-
like modes. One can see that the agreement is very good, and we get a similar band gap between the two methods.

Calculating the bandstructure of a perfect photonic crystal is a good starting point for designing a photonic crystal
waveguide. The fact that we can get comparable results between 2.5D FDTD and 3D FDTD means that we can use
the 2.5D FDTD method to study slab photonic crystals devices efficiently. Depending on the type of defect and
modification on the photonic crystal geometry surrounding the waveguide, the low transmission band will often not
coincide with the band gap calculated for the perfect photonic crystal. In this case, the 2.5D FDTD method can be
very useful for studying how the propagation of light in the photonic crystal waveguide is affected by modifications in
the PC geometry.

In the example 1879 on the next page, we will use the 2.5D FDTD method to study a photonic crystal waveguide with
a line defect and an increased hole radius along the defect (the increased hole radius often leads to the broadening
and shifting of the band gap to higher frequencies).

8.1.3.6.2 Line defect

Introduction
In this example, we use the 2.5D FDTD propagation method ('varFDTD' solver) in MODE Solutions to study the PC
waveguide described in O.V.(Alyona) Ivanova et al.

To accurately model this device, the complex scattering and interference effects from the high index contrast

2003 - 2016 Lumerical Solutions, Inc


1880 Lumerical Knowledge Base

photonic crystal must be precisely modeled. This typically requires a rigorous (but relatively slow) technique like 3D
FDTD. In this example, we show that it is also possible to obtain accurate results using the MODE Solutions' 2.5D
varFDTD propagation method, which is much more efficient and only requires the simulation time and memory of 2D
FDTD.

Solvers 101

varFDTD
In this topic
Setup 1880
Results and discussions 1881

Associated files
PhC_waveguide_L1.lms
Reference
O. V. (Alyona) Ivanova, Remco Stoffer,
Lasse Kauppinen, and Manfred Hammer,
"Variational Effective IndexMethod for 3D
Vectorial Scattering Problems in
Photonics: TE Polarization"

Simulation Setup
The following instructions briefly describe how to setup this simulation. Initially, you may want to skip this section
and proceed to "Results and Discussions" using the completed simulation file PhC_waveguide_L1.lms.

The waveguide described in O.V.(Alyona) Ivanova et al. is deposited on a glass substrate with refractive index 1.445.
The core has refractive index sqrt(12.1) ~ 3.5 with a thickness of 220nm. The hole radius is 135nm, and the modified
hole radius is 170nm. The period 'a' is 440nm. The input/output waveguide width is sqrt(3)*a. The upper cladding is
air. This is a typical one-line defect (L1) PhC waveguide.
To set up the simulation in MODE Solutions, start by creating a new blank simulation. Next, open the "Material

database" , click the Add button and select "Dielectric", set the index parameter to 1.445, and then click
the Color column to choose the color you like. Finally, name the newly created material "Substrate".

Click the Structure button and choose Rectangle , set the name to "SiO2", x and y span = 20um,
z max 0 and z min=-9um, and set the material property to "Substrate". Then add a central core layer "Core"
thickness 220nm, length 18*440nm, width 20um. The width of the input and output waveguides should be sqrt(3)
*440nm. Next, add a circle and array it as required to create the PC array (see Arrays of objects 356 for more detail
on how to use the "array" function). Set the material property to 'etch'. To form the PhC waveguide, delete unused
holes and the central row of the holes, and modify the holes above and below the central row. You can group the
array of holes into a structure group.

Add a varFDTD simulation region and set the span to 15 by 12 by 6 um (x,y, z), set the polarization to "E mode
(TE)", set x0 and y0 in the core region (this point will be used to calculate the vertical slab mode, so you should not
specify a location on top of the etched holes). The location of the 4 test points will not effect the simulation. Set the
simulation time to 20000fs, as this device has strong resonances and the fields will require longer to decay. Un-
select the 'Clamp values to physical material properties" option, set the Bandwidth setting to Broadband.

Add a mode source and set the wavelength range from 1.3 to 2.0 um. The fundamental TE mode that will be injected
by this source is mostly Ey polarized. Due to the symmetry of the mode and structure, set the Y-min boundary
condition to anti-symmetry. This will make the simulation run 2x faster. All other boundaries should be set to PML.
Add an Effective Index monitor, a transmission monitor "T" and reflection monitor "R", as well as a profile monitor
"Profile" with only 3 monitoring frequency points.

2003 - 2016 Lumerical Solutions, Inc


Applications 1881

Results and discussions


First, we can look at the effective index monitor data.

These effective index values are generated by collapsing the vertical dimension based on the methods described in
2.5D FDTD propagation method 107 . One can see that the core index has an effective index of around 2.8. Next, we
can plot the transmission and reflection spectra:

One can see that there is a stop-band from approximately 1.52um to 1.65um, which are comparable to the published
results.

8.1.4 Plasmonics
Motivation
Plasmonics is a field of study that explores the interaction of light waves and metallic surfaces, and the resulting
density waves of electrons that can be generated from this interaction. The resulting electron density wave that
propagates along the surface of the metal is referred to as a surface plasmon polariton, or a surface plasmon. Owing
to the strong frequency dependence of the complex permittivity of the metal, plasmons themselves exhibit strong
variations with frequency, and this frequency dependence results in surface plasmon resonances.

2003 - 2016 Lumerical Solutions, Inc


1882 Lumerical Knowledge Base

While plasmon propagation along metals is very lossy, the plasmon is tightly confined to the metal. This tight
confinement is being studied for application to compact signal routing over very short distances in highly integrated
planar lightwave circuits. This confinement can also lead to associated electromagnetic field enhancement which is
of use in bio/chemical sensing, decay rate engineering, and light absorption for photovoltaics.

Simulating plasmonic devices


FDTD Solutions is a high performance optical solver that can capture the light interaction with wavelength-scale 3D
metal geometries. For plasmonic waveguides, MODE Solutions can be used to calculate the physical properties of
waveguide modes such as the effective index, loss and dispersion. The field of plasmonics is very broad with
numerous applications, and the simulation methodology can be highly dependent on the device operation. This can
often lead to mistakes in the simulation set up and in the interpretation of the results. For this reason, we will
address the simulation methodology 1894 for different types of devices separately.

Local
near
field
enhance
ment of
an array
of
nanohol
es on a
thin gold
film.

Features
Negative index metamaterials 1995 designed with materials that support surface plasmon resonances
Emission and absorption properties of metallic optical antennas
Increased efficiency of surface plasmon enhanced thin film silicon solar cells 2663
Electromagnetic field enhancement 1752 engineering
Frequency analysis of resonant modes for dispersive metal nanoparticles and nanoparticle systems
Decay rate engineering 1915 with metallic nanoparticles
Resonant transmission and subwavelength focusing 1912 through patterned metallic thin films including
plasmonic lenses and bullseye apertures 1910
Propagation along longitudinally-varying surface plasmon waveguides and metal-insulator-metal waveguides
Optical properties of metallic metamaterials 1990
Mode profiles, effective index, propagation constant, propagation loss, dispersion, bending loss, group
velocity, group dispersion of surface plasmon waveguides 1929 and metal-insulator-metal waveguides
Lumericals conformal mesh technology can provide sub-mesh cell modeling accuracy important in photonic
crystal modeling
Multi-coefficient materials (MCMs) can accurately model dispersive materials across wide wavelength
ranges
Built-in parameter sweep 699 and optimization algorithms 716 make it easy to analyze and optimize
parameterized designs

Getting started
Relevant videos (login required):
Introduction to plasmonics
TFSF source

Download relevant products:


FDTD Solutions
MODE Solutions

2003 - 2016 Lumerical Solutions, Inc


Applications 1883

Product introductory videos:


FDTD Solutions
MODE Solutions

Product introductory examples:


(FDTD Solutions) Particle scattering tutorial 1724

(MODE Solutions) Plasmonic waveguide tutorial 1883

More ... 171

Application examples
Solver 101 Description
FDTD Simple Glass-Silver-Air slab 1905 , Simple Gold-Air slab 1907

FDTD Bullseye aperture 1910 , Focusing with subwavelength aperture 1912

FDTD Fluorescence enhancement 1915

FDTD Chromatic polarizers 1920

FDTD Nanohole array 1922

FDTD SERS 1924

FDTD, FDE Waveguide coupled SP mode 1926 , Gap Plasmon Waveguide 1929

8.1.4.1 Getting Started


See the Nanowire Scattering Tutorial in the Particle and surface scattering 1722 section for an FDTD Solutions getting
started tutorial:
Nanowire Scattering Tutorial 1724

For a MODE Solutions tutorial simulating a plamonic waveguides, see:


Plasmonic Waveguide 1883

8.1.4.1.1 Plasmonic Waveguide

Problem definition
Consider a rectangular silver surface plasmon waveguide with dimensions 1000nm x 100nm described in [1].

We want to measure the effective index of the ssb0 mode at 633nm. We will also calculate the effective index of
this mode as a function of waveguide thickness, from 50nm to 200nm.

2003 - 2016 Lumerical Solutions, Inc


1884 Lumerical Knowledge Base

Solvers 101

FDE
Associated files
plasmon.lms
plasmon_plot.lsf

In this topic
Modeling Instructions 1887
Discussion and Results 1884
Related references
1. P. Berini, "Plasmon-polariton
waves guided by thin lossy metal
films of finite width: Bound modes of
symmetric structures", Phys. Rev.
B, 61, 10484-10503 (2000).

Learning objectives
In this example, we show how MODE Solutions can be used to study surface plasmon modes. We will use a non-
uniform mesh to more accurately resolve the fields near the metal interface. The user will learn to:
Create a new material
Use symmetric boundary conditions
Use mesh override regions to create a non-uniform mesh
Use a built in parameter sweep to get the effective index and loss vs. thickness of the waveguide

8.1.4.1.1.1 Discussion and Results

Simulation setup
We are trying to recreate the results in the Berini paper [1], so it is important to use the same material properties.
We will create a new silver material, rather than using the standard silver definitions included with MODE Solutions.
the permittivity of Ag given in the reference paper is -19+0.53j.

The screenshot below shows the plasmon waveguide and the mode solver region.

Notice the shaded green and blue regions. The blue shaded section is a result of the fact that the x min boundary
condition of the simulation region has been set to symmetric. In other words, we have put a magnetic wall (perfect
magnetic conductor) at x = 0. Similarly, the green shaded region indicates that the y min boundary condition is anti-
symmetric. This indicates that we have put an electric wall (perfect electric conductor) at y = 0. See Symmetric and
anti-symmetric BCs 466 for more information about choosing symmetric and anti-symmetric boundary conditions.

Table 1 of the reference shows that the fields from the ssb0 posses this symmetry. The boundary conditions will
need to be changed if you are interested in finding modes which have fields with different symmetry. You can find all
of the modes that the waveguide supports if you set all of the boundary conditions to metal. Note that the time to find
modes and memory required to find modes will increase if all the boundary conditions are metal. This is because the
mode solver can use shortcuts to find the fields in the shaded region if your simulation posseses symmetry/anti-
symmetry about one axis.

2003 - 2016 Lumerical Solutions, Inc


Applications 1885

The orange lines in the screenshot above show the mesh used in the mode calculation. Notice that the mesh is finer
at the edges of the structure. This is because we expect the fields to be concentrated near the edges of the
waveguide. Increasing the mesh here, will increase the rate of convergence of the effective index, loss and field
profiles as you reduce the size of the mesh.

Finally, notice that we use metal boundary conditions instead of PML boundary conditions. The reasons for this are
described in the Starting with metal boundary conditions 464 page.

Find and plot mode SSb0


To find the SSb0 mode, we overrode the default "search near n" settings in the analysis window. This is because
plasmon modes often exhibit a higher effective index than would be predicted by the maximum effective index
estimate. In this case, we set the mode solver to search near an effective index of 2.5, which is slightly above the
guess for the maximum effective index. We knew the effective index from the reference. If you set this number to 5
then you will find the same modes, but it will take the mode solver a bit longer to find the modes.

The following figures show the field components of the SSb0 mode. The phase of the mode automatically determined
from MODE Solutions differs from the Berini figures by 180 degrees. This phase difference can be correct in the
plasmon_plot.lsf script.

2003 - 2016 Lumerical Solutions, Inc


1886 Lumerical Knowledge Base

It is important to notice that most of the field energy is confined to the corners of the waveguide. The following

2003 - 2016 Lumerical Solutions, Inc


Applications 1887

figures show the electric field intensity over the entire waveguide area (left figure), then zoomed in near the waveguide
corner (right figure).

Effective index as a function of waveguide thickness


The plots below show the results of a sweep calculating the ssb0 mode effective index as a function of waveguide
thickness, from 50nm-200nm. The effective index increased from about 2.18 to 2.63. These results are in very good
agreement with Figure 2A and 2B from the reference paper [1].

8.1.4.1.1.2 Modeling Instructions


This page contains 3 independent sections, "Simulation setup", "Find and plot mode SSb0", and "Effective index as
a function of waveguide thickness". The first section describes how to set up the simulation file. You can skip this
step, by downloading the associated plasmon.lms file from the top-level Plasmonic Waveguide 1883 page and
proceeding to the second section. Section 2 describes how to find the SSb0 mode and plot the field profiles. Section
3 describes how to set up a sweep to obtain the effective index as a function of waveguide thickness.

Simulation setup
Start a new simulation. Since we are using a 2D Z-normal Eigenmode solver you can open the simulation up in 2D

2003 - 2016 Lumerical Solutions, Inc


1888 Lumerical Knowledge Base

drawing mode by selecting the menu options below. This hides the z dimension since we are not using it.

Add new material to material database

Press on the MATERIAL database button to open the material database


Click on the Add button and select (n,k) material. This adds a new material named "New Material 1" to the
database. Edit this material according to the following table.
property value
Name Ag Berini :: 633nm
Refractive Index 0.0607893
Imaginary Refractive Index 4.35932

Set up structure and MODE Solver region

Press on the arrow on the STRUCTURES button and select a RECTANGLE from the pull-down
menu. Set the properties according to the following table.
tab property value
name waveguide
Geometry x ( m) 0
x span ( m) 1
y ( m) 0
y span ( m) 0.1
z ( m) 0
z span ( m) 1
Material material Ag Berini :: 633nm

Press on the arrow on the SIMULATION button and select a EIGENMODE SOLVER region. Set the
properties according to the following table.

2003 - 2016 Lumerical Solutions, Inc


Applications 1889

tab property value


General solver type 2D Z normal
background index 2
Geometry x ( m) 0
x span ( m) 2
y ( m) 0
y span ( m) 0.6
z ( m) 0
Mesh Settings mesh cells x 200
mesh cells y 60
Boundary Conditions x min bc Symmetric
x max bc Metal
y min bc Anti-Symmetric
y max bc Metal

Press on the arrow on the SIMULATION button and select a MESH region . Set the properties according to
the following table.
tab property value
General set mesh multiplier yes
x mesh multiplier 100
y mesh multiplier 100
Geometry x ( m) 0.5
x span ( m) 1e-7
y ( m) 0.05
y span ( m) 1e-7
z ( m) 0

Find and plot mode SSb0


Open the analysis window by pressing on the RUN button .
First press the MESH STRUCTURE button to mesh the structure, and obtain a spatial plot of the refractive index
In the MODAL ANALYSIS section set the properties according to the following table. Then press CALCULATE
MODES. The effective index of plasmon modes is often higher than the maximum real part of the effective index.
For this reason we want to search for a n which is higher than the default "use effective index" setting.
property value
wavelength ( m) 0.633
number of trial modes 5
search near n
use max index uncheck
n 2.5
There are 3 different methods which can be used to create the plots of the ssb0 mode

2003 - 2016 Lumerical Solutions, Inc


1890 Lumerical Knowledge Base

Analysis Window You can plot the components of the profile using the mode plot options of the analysis window.
See the mode plot options 753 page in the reference guide for more details.
Script File Open the script file editor, as shown on the MODE Solutions GUI page of the Introduction

section. Next, press on the OPEN button and browse to the plasmon_plot.lsf script
file included in the installation directory for MODE Solutions or on the first page of this example

1883 . Then press on the RUN SCRIPT button . The script will generate the plots on the
previous page.
Visualizer In the analysis window, the mode data appears in a list with mode numbers. Find the mode of
interest and select it in the Object tree as shown below. Choose to Visualize the
electromagnetic fields.

You can then select which components of the E field data you want to plot in the Visualizer.
The screenshot below shows how to plot the real part of the z component of the Electric fields.

2003 - 2016 Lumerical Solutions, Inc


Applications 1891

Effective index as a function of waveguide thickness

Step 1: Make mode1 data available to parameter sweep


We are interested in obtaining the effective index and loss data from the ssb0 mode. Note that when we found
modes in the previous step, the ssb0 was always the first mode in the mode list. In analysis mode we can see the
mode1 data in the MODE data group (left image below). If you switch to layout (right image below), the mode1 data
is no longer available. The first step is to make sure the mode1 data is available for the sweep.

2003 - 2016 Lumerical Solutions, Inc


1892 Lumerical Knowledge Base

Edit the MODE data group by right clicking on the object with your mouse. Select the Edit object option from the
list.
In the Analysis->Variables tab click the bottom ADD button twice. This will add two results which the data group
can give to the parameter sweep. Rename these two results "neff" and "loss" as shown in the bottom left window.
Switch to the Analysis->Script tab shown in the right part of the image below. Then add the following two lines of
script commands which will add data to the "neff" and "loss" results once a simulation has run. Press OK to save
your changes.
neff=getdata("mode1","neff");
loss=getdata("mode1","loss");

Step 2: Create a sweep


Open the Optimization and Sweeps window using the VIEW menu at the top of the graphical user interface, or by
right clicking on the top title bar 201 of the MODE Solutions GUI.

2003 - 2016 Lumerical Solutions, Inc


Applications 1893

Press on the CREATE NEW PARAMETER SWEEP button to add a new sweep to the simulation. Right
click on the parameter sweep and choose to Edit the parameter sweep. Set the properties according to the
following screenshot. Notice that the only results you can chose are the results which are seen in the screenshot
of the Analysis->Variables tab above.

Step 3: Run the sweep and plot the data


Press on the RUN SWEEP button in the Optimizations and Sweeps Window to run the sweep.
Plot the sweep data using one of the methods below. The first method was used to create the plots on the
previous page.
Script Open the Script Prompt Window using the VIEW menu at the top of the graphical user interface, or
Prompt by right clicking on the top title bar 201 of the MODE Solutions GUI.
Copy and paste the following commands into the Script Prompt and press ENTER on the keyboard
to execute them.
thickness = getsweepdata("thickness","waveguide_span");
neff = getsweepdata("thickness","neff");
loss = getsweepdata("thickness","loss");

# plot results
plot(thickness*1e6,neff,"Waveguide thickness (um)","effective index");
plot(thickness*1e6,loss*633e-9/(2*pi*20*log10(exp(1))),"Waveguide thickness (u
Visualizer Right click on the parameter sweep and choosing what data to visualize, as shown in the image
below. Note that the loss will be in dB/cm, and that the script commands above converted the units
of the loss to k.

2003 - 2016 Lumerical Solutions, Inc


1894 Lumerical Knowledge Base

8.1.4.2 Simulation Methodology


Plasmonics is a field of study that explores the interaction of light waves and metallic surfaces, and the resulting
density waves of electrons that can be generated from this interaction. Understanding and predicting the complex
behavior of light in the presence of metal nanostructures remains a key challenge. FDTD Solutions has many
features that makes it an ideal tool for simulating plasmonic structures, providing the opportunity to cheaply and
quickly test ideas, optimize designs and solve problems.
Solvers 101

FDTD
FDE
See also
Surface Plasmons 1881
Common simulation considerations 1895

Standalone objects 1896


Single device on a substrate 1900
Periodic structures 1902

Introduction
The field of plasmonics is very broad with numerous applications, and the simulation methodology can be
complicated and highly dependent on the device operation. This can often lead to mistakes in the simulation set up
and in the interpretation of the results. In this chapter, we focus on three general categories of plasmonic simulations
and discuss the simulation methodology and workflow for each. They include:

Standalone objects 1896 : ex. particle scattering


Single device on a substrate 1900 : ex. antennas, defect detection/scattering
Periodic structures 1902 : ex. nanostructure arrays, multilayer devices

What do we want to calculate with our simulations?


Depending on the application, some typical quantities of interest for plasmonic simulations include:

Local field enhancement

2003 - 2016 Lumerical Solutions, Inc


Applications 1895

Far field angular response


Scattering/absorption properties
Transmission/reflection spectrum (total or into specific regions of the far field)

This chapter will focus on how to obtain these results for the three general categories. For other types of plasmonic
simulations, please click on the links below:

Fluorescence enhancement 1915


Plasmonic waveguide propagation properties 1926

Plasmonic metamaterials 1999


Plasmonic solar cells 2663
OLEDs 2682
Please also refer to the topic specific videos

The common simulation considerations 1895 section contains simulation tips that are important for all plasmonics
simulations. If you are unsure about which category your experiment falls into, please contact
support@lumerical.com.

8.1.4.2.1 Common Simulation Considerations


This section addresses simulation considerations that are important for all plasmonic simulations

In this topic
Mesh refinement 1895
Broadband material dispersion 1896

Covnergence testing 1896


See also
Surface Plasmons 1881
Simulation methodology 1894
Standalone objects 1896
Single device on a substrate 1900

Periodic structures 1902

Mesh refinement
With the FDTD method, it is not possible to resolve interfaces to higher precision than the size of the mesh used.
This is an important issue to consider for plasmonic simulations, since the results are often very sensitive to the size
of the mesh near interfaces.

One solution is to use mesh override regions to force a very small spatial mesh to more accurately resolve the
locations of the metal interface. The disadvantage of this method is that it can greatly increase simulation times and
memory requirements. Lumericals conformal mesh technology can allow you to obtain more accurate results for a
given mesh size, so it is always worth considering this mesh refinement method over the traditional stair-casing
method. Conformal variant 0 443 is the default setting.

Note that with simulations that involve metal structures, the default conformal mesh reverts to stair-casing for all
metal interfaces. In this case, one would need to specify a variant of the default conformal mesh to take advantage
of the conformal mesh technology if necessary.

Please take care when using conformal mesh technology with metals, and do some convergence test to be sure

2003 - 2016 Lumerical Solutions, Inc


1896 Lumerical Knowledge Base

that the conformal mesh technology is appropriate for your precise application. For more detail on the different
variants of the conformal mesh, and how they should be used, please see mesh refinement options 443 .

Broadband material dispersion


Plasmonic devices typically involve metals that are strongly dispersive at optical frequencies. Since the results can
be very sensitive to the dispersion of the metals, it is important to make sure that the models we use to represent
the material dispersion is as close to the experimental values as possible.

Simplified models of idealized materials such as Drude, Debey or Lorentz can offer good insight into the behavior of
optical materials through their characteristic shapes, but fail to accurately capture the dispersive properties of real
materials. Lumericals Multi-Coefficient Model (MCM) can solve for materials with arbitrary dispersion, making it very
useful for plasmonic simulations.

If you are running broadband simulations, you should try to use real data for your metal materials so that the actual
material dispersion used in the simulation is as realistic as possible. Please see creating sampled data materials
226 for detailed instructions on how to import material data into your simulation. Once you have defined the material

data, it is important to check the material fit 272 (in the material explorer) before you run the simulation to make sure
that the error between the MCM fit and your material data is within tolerance:

Convergence Testing
Simulation results will always contain some numerical error. It is important to understand some of the sources of
numerical error and steps that can be taken to reduce the error to an acceptable level. Some common sources of
error for plasmonic simulations are:

Staircasing effect
When dx, dy, dz and dt are finite, it is not possible to resolve geometric features to arbitrary resolution. This is
especially important for plasmonic simulations since the results are often very sensitive to the size of the mesh
near interfaces.
Convergence test: systematically decrease the mesh size around the critical features until the result converges.
This is typically done with mesh override regions, since it is often unnecessary to refine the mesh everywhere in
the simulation region. This convergence test is crucial for making sure that the size of the mesh near metal
interfaces is small enough.

Multi-coefficient model fit


Lumerical's multi-coefficient model makes it possible to obtain good fits even for highly dispersive materials,
however, there is always error in the fit.
Convergence test: decide if this is a significant contribution to the error (raw material data can have significant
error!). If the fit is poor, consider reducing the frequency range of the simulation or modifying the fit.

PML interference with near field


PML will introduce errors if a non-negligible amount of the evanescent field comes in contact with the PML.
Convergence test: systematically move the PML further away from scattering objects until the result converges.
Note: this effect is much more significant when using the legacy uniaxial PML, and a much smaller distance
between the structure and PML is required when using SCPML 460 .

For a complete discussion on how to test convergence, please see Testing convergence 847 .

8.1.4.2.2 Standalone Objects


This section provides a template for plamsonic simulations that involve standalone objects. Please also see the
common simulation considerations 1895 section for other important simulation tips that apply for all plasmonic
simulations.

2003 - 2016 Lumerical Solutions, Inc


Applications 1897

In this topic
Source 1897
Simulation 1897
Monitors and analysis - cross
sections 1898
Monitors and analysis - near/far field
analysis 1899
Examples 1899
See also
Simulation methodology 1894
Common simulation considerations
1895

Mie scattering 2D 1751

Mie scattering 3D 1752

For standalone objects (such as particles suspended in a fluid), we often want to calculate the absorption/scattering
cross sections. We may also want to look at the near field enhancement around the particles, as well as the far field
angular distribution. The following simulation methodology provides a template for how to set up this simulation and
how to obtain these results.

Source
FDTD Solutions provides a Total Field/Scattered Field source, which is useful for particle scattering simulations. A
TFSF source is a type of plane wave source that separates the computation region into two distinct regions:
Total Field region - the sum of the incident plane wave plus the scattered field
Scattered Field region - includes only the scattered field

For more information, see TFSF sources 546 .

Simulation region
PML (absorbing) boundaries should be used on all sides of the simulation region.

Note: Legacy Uniaxial PML


If using the legacy uniaxial PML, PML boundaries must be at least a half wavelength away from any scattering
structure, so that it does not interact with the evanescent fields. However, if using the default SCPML, PML
boundaries can be closer to the structures.

As mentioned in common simulation considerations 1895 , a mesh override region is often used to more accurately
resolve the metal interface of the nanoparticle. When using TFSF sources, the mesh override region should be large
enough to cover the entire TFSF region, since TFSF sources work best in uniformly meshed regions.

2003 - 2016 Lumerical Solutions, Inc


1898 Lumerical Knowledge Base

Monitors and analysis - cross sections


With the TFSF source, we can directly calculate the power absorbed/scattered by the particle.The Object Library

provides a "trans_box" analysis group that returns the net power flow out of a rectangular volume, this
means that we can use
a trans_box outside the TFSF source to calculate the scattered power
a trans_box inside the TFSF source to calculate the absorbed power

Note that the mesh spacing of the override region affects the location of the monitors in the trans_box analysis
group. Sources require a certain amount of space to inject the fields. The amount of space required is ~2 mesh cells
and is depicted graphically by light white shading that surrounds the source. Within this region, the fields are not
physically meaningful. Hence monitors should not be placed in this region.

2003 - 2016 Lumerical Solutions, Inc


Applications 1899

Note that the power returned by the transmission box, T is the net power normalized by the source power. To
calculate the absorption/scattering cross sections, we want to normalize T by the source intensity (source power/
area of source):

Pscat = T*sourcepower(f); # total power in W


sigma=Pscat/sourceintensity(f); # cross section in m^2

The Object Library also provides a specialized "cross_section" analysis group that returns the cross sections
in the correct units.

Monitors and analysis - near/far field analysis

Near field
One can place profile monitors anywhere in the near field region to study the near field enhancement. Once the
simulation finishes running, simply right-click on the monitor and send the results to the Visualizer 740 to study the
near field results.

Far field
For far field results, we cannot simply use a plane monitor for this calculation (as we do for periodic structures) 1902 ,
since we have to consider light scattered into all directions. Fortunately, the fields radiated outside of a closed box
by sources located inside the box can be determined exactly from the field components at the surface of the box.
This means that we can use the approach described in projections from a monitor box 817 to calculate the far field

results. The Object Library provides a "scat_ff" analysis group that calculates the far field projections for
each surface of the monitor box and then sums up each surface to return the final result.

Examples
For some examples that use this simulation methodology for standalone objects, please see:

Mie scattering 2D 1751

Mie scattering 3D 1752

2003 - 2016 Lumerical Solutions, Inc


1900 Lumerical Knowledge Base

8.1.4.2.3 Single Device on a Substrate


This section provides a template for plasmonic simulations that involve a single device on a substrate. Please also
see the common simulation considerations 1895 section for other important simulation tips that apply for all plasmonic
simulations.

In this topic
Source 1897
Simulation 1897
Monitors and analysis 1899

Examples 1899
See also
Simulation methodology 1894
Common simulation considerations
1895

Defect Detection 1737


DVD surface 1735
Bullseye aperture 1910
Focusing with subwavelength
aperture 1912

For a single device on a substrate (such as defect detection/scattering, antenna simulations), we often want to study
scattering into specific regions in the far field (instead of the total scattering cross section). In this case, it makes
more sense to use the concept of differential scattering cross section, or the intensity on a single particle to the
power scattered by it per solid angle. The following simulation methodology provides a template for how to set up
this simulation and how to obtain these results.

Source
The type of source to use will depend on the size of the beam and the size of the device. Whether the device is
uniformly illuminated or not also affects the choice. The TFSF source can be used when the device is uniformly
illuminated by the source. A Gaussian beam source can be used when the source does not uniformly illuminate the
device.

When using a Gaussian beam source, the user has the choice of using scalar approximation or a fully vectorial thin
lens source option (good for tightly focused spots). Please see beam options 521 for more detail. Usually the
illumination on the scatter should be relatively uniform, which means the beam waist size is larger than the scatter.

2003 - 2016 Lumerical Solutions, Inc


Applications 1901

Simulation region

PML (absorbing) boundaries should be used on all sides of the simulation region.

Note: Legacy Uniaxial PML


If using the legacy uniaxial PML, PML boundaries must be at least a half wavelength away from any scattering
structure, so that it does not interact with the evanescent fields. However, if using the default SCPML, PML
boundaries can be closer to the structures.

Gaussian beam source


The PML boundaries need to be far enough away so that it does not truncate the tails of the Gaussian beam.

The TFSF source


As there may be scattered fields at steep angles, wide simulation span and monitors might be required to
accommodate this effect.

Again, irrespective of the source used, mesh override regions should be used in the region near the device.

Monitors and analysis

Near field
One can place profile monitors anywhere in the near field region to study the near field enhancement. Once the
simulation finishes running, simply right-click on the monitor and send the results to the Visualizer 740 to study the
near field results.

Far field
Note that we cannot use the projections from a monitor box 817 technique used for standalone objects 1896 , since the
technique only works when all of the monitors are in a homogeneous material. When a substrate is present, the
best way to calculate the far field scattering pattern is to use one monitor, located above or below the particle
(depending if you want scattering in the forward or backwards direction). Note that the monitor plane should always
be placed in a homogeneous region in the near field. You can then calculate the far field projections from the monitor
directly in the Results View 736 window, or with far field projections 1657 script commands. When using a single
monitor, it's important to make the simulation span large enough so that most of the scattered light will pass through
the monitor before hitting the PML absorbing boundary conditions. Often, a simulation span of more than 10
wavelengths is necessary for good results.

2003 - 2016 Lumerical Solutions, Inc


1902 Lumerical Knowledge Base

Far field integrate


Often, we are interested in how much power is actually transmitted into specific regions in the far field (ex. how
much power can be collected by an objective with an arbitrary numerical aperture?). The script commands
farfield2dintegrate 1660 and farfield3dintegrate 1663 are very useful for calculating the integral of the far field projection
over an arbitrary cone in 3D simulation. For detailed information on how to calculate power integration into specific
regions of the far field, please see power integration 145 .

Examples
For some examples that use this simulation methodology for studying a single device on a substrate, please see:

Defect Detection 1737


DVD surface 1735
Bullseye aperture 1910
Focusing with subwavelength aperture 1912

8.1.4.2.4 Periodic Structures


This section provides a template for plasmonic simulations that are periodic in at least one direction. Please also
see the common simulation considerations 1895 section for other important simulation tips that apply for all plasmonic
simulations.

2003 - 2016 Lumerical Solutions, Inc


Applications 1903

In this topic
Source 1897
Simulation 1897
Monitors and analysis 1899

Examples 1899

See also
Simulation methodology 1894
Common simulation considerations
1895

Nanohole array 1922


Chromatic polarizers 1920
Surface Plasmon Resonance 2D 1905

SPR Nanolithography 1713

For devices that are periodic (such as nanostructure arrays, multilayer devices), we often want to study the resonant
transmission/reflection properties. This includes the total transmission/reflection, or the transmission/reflection into
particular orders.

Source
Plane wave sources should always be used for periodic simulations. When using sources such as dipoles and
Gaussian beams with periodic boundaries, the sources will also be copied across each unit cell in the periodic
directions, which is unphysical.

For sources at normal incidence, or for single frequency simulations with injection at normal incidence, the plane
wave type should be set to "Bloch/Periodic".

For broadband simulations with injection at non-normal angles, the plane wave type can be set to "'BFAST". The
BFAST 590 technique can be used to inject light at a constant angle over all frequencies. For a complete description
on how to set up a simulation with a plane wave source injected at an angle, please see plane waves - angled
injection 529 .

Simulation region
When using the "Bloch/Periodic" plane wave type, periodic boundaries should be used if the source is injected at
normal incidence, and Bloch boundaries should be used when the source is injected at angled incidence in the
directions where the structure is periodic. When using the "BFAST" plane wave type, the boundary conditions in
periodic directions is automatically set to use the BFAST technique, so the boundary conditions in those directions
do not need to be set. In the directions of periodicity, the simulation span must correspond to exactly 1 unit cell of
the device.

When using the For directions that are not periodic, PML (absorbing) boundaries should be used.

2003 - 2016 Lumerical Solutions, Inc


1904 Lumerical Knowledge Base

Note that symmetry can still be used for periodic boundaries by setting the min/max settings to be the same. For
example, the settings below correspond to a periodic simulation.

Monitors and analysis

Near field
One can place profile monitors anywhere in the near field region to study the near field enhancement. Once the
simulation finishes running, simply right-click on the monitor and send the results to the Visualizer 740 to study the
near field results.

Far field
The best way to calculate the far field scattering pattern is to use one monitor, located above or below the structure
(depending if you want scattering in the forward or backwards direction). Note that the monitor plane should always
be placed in a homogeneous region in the near field. Once the simulation finishes running, you can calculate the far
field projections from the monitor directly in the Results View 736 window, or with far field projections 1657 script
commands. Note that it is possible to use the projection functions to calculate the far field distribution of finite sized
periodic arrays (even if the simulation is infinitely periodic). See far field projections -> periodic structures 142 for
more detail.

Transmission/Reflection
In many cases, we are only interested the total transmission/reflection of the device. This can be easily calculated
by placing power monitors above and below the structure, and then plotting the transmission in the Results View 736
window. Note that power flowing towards the -x/-y/-z directions will carry a negative sign.

2003 - 2016 Lumerical Solutions, Inc


Applications 1905

For structures that support multiple grating orders, we may want to look at the transmission/reflection into particular
orders. FDTD Solutions has built-in grating projection calculations 1666 that can be used to calculate the direction and
intensity of light reflected or transmitted through a periodic structure. The Object Library also provides a

"grating_transmission" analysis group can be used to find the transmission into any order. For a list of
examples, see the gratings 1788 section of the applications library.

Examples
For some examples that use this simulation methodology for studying periodic structures, please see:

Nanohole array 1922


Chromatic polarizers 1920
Surface Plasmon Resonance 2D 1905

SPR Nanolithography 1713

8.1.4.3 Simple Glass-Silver-Air Slab


Introduction
We will locate the Surface Plasmon Resonance of a 50 nm silver film on glass at 500nm by analyzing the reflection
and transmission as a function of the source angle of incidence. Angles with low reflection and transmission (high
absorption) indicate that power from the source is exciting (coupling into) the SPR mode. We also calculate the
dispersion relation of the SPR modes.

2003 - 2016 Lumerical Solutions, Inc


1906 Lumerical Knowledge Base

Solvers 101

FDTD
Associated files
sp_film_resonance.fsp
sp_film_resonance.lsf
sp_film_dispersion.fsp
sp_film_dispersion.lsf

See also
Surface Plasmons 1881

Bandstructure 1843

Finding the SPR mode at 500nm


For this simulation, we do a parameter sweep over the source incidence angle. We are looking for the source angle
that excites the SPR mode (this happens when the y component of the source wave vector matches the wave vector
of the SPR mode. We measure absorption in the Silver to determine the angle with the strongest coupling (since
SPR modes have very high loss).
This is a convenient test case because an analytic solution exists.

Important settings to notice:


The PML profile is set to "steep angle" to better absorb light propagating at large angles away from normal
incidence.
A mesh override region is used to force a finer mesh step size in the y direction (normal the silver film).

Results
The plot to the left below shows the simulated reflection spectrum as a function of source angle in comparison with
the analytic solution. The resonance angle for both the analytic solution and FDTD simulation are found at
approximately 47 degrees. The plot on the right shows the E field intensity as a function of x for all of the angles of
incidence. For a higher resolution of the E field intensity over x, the mesh accuracy setting in the FDTD simulation
region object can be increased.

To recreate the plot, open sp_film_resonance.fsp. Run sp_film_resonance.lsf script file to run the
parameter sweep, plot the results and compare them with theory.

2003 - 2016 Lumerical Solutions, Inc


Applications 1907

Dispersion relation
Next, we calculate the dispersion relation of the SPR mode(s) using a technique described in the Bandstructure 1843
section. Basically, we do a parameter sweep over the wave vector ky and look for frequencies with strong
resonances. To reproduce the following results, open spr_film_dispersion.fsp, run the parameter sweep,
then run the script spr_film_dispersion.lsf.

In the following figures, two SPR modes are visible (Air:Ag:Glass and Glass:Ag:Air) as well as the Air and Glass
light lines.

Dispersion data after peak finding routine.


Raw dispersion data.

8.1.4.4 Simple Gold-Air Slab


Introduction
This topic compares the analytical solutions and results simulated with MODE Solutions for surface plasmon modes
on the air/gold interface at a wavelength of 632.8nm.

2003 - 2016 Lumerical Solutions, Inc


1908 Lumerical Knowledge Base

Solvers 101

FDE
Associated files
surface_plasmon.lms
surface_plasmon.lsf
surface_plasmon.ldf

Simulation setup
The figure above shows the structure and physical constants of air/gold interface. The gold layer is many
nm
wavelengths thick, with a refractive index of = 0.238+3.385i at a wavelength of 632.8nm.

Analysis
The analytical solutions for the effective index and propagation loss for the surface plasmon modes are given by the
following expressions:
k sp
N sp =
ko
40 p imag ( N sp )
Lsp =
l log( 10) 1000
where

k02 e i e m
k sp =
( ei + e m )
e i = 1, e m = nm2
These will be used in the evaluation of the MODE Solutions results.

Results
The script surface_plasmon.lsf finds the TM1 mode and plots the effective index and propagation loss as well
as the corresponding % errors as a function of the number of grid points. The script also analyzes the improvements
in performance of using a graded mesh instead of a uniform mesh.

2003 - 2016 Lumerical Solutions, Inc


Applications 1909

The left figure show s Effective index and the right figure show s propagation loss calculated for air/gold interface at a
w avelength of 632.8nm . The blue curves denote the MODE Solutions calculations, and the horizontal green lines show the
analytic results. The x axis show s the num ber of grid points used in the calculation.

The left figure show s the error in percentage of MODE Solutions calculation for fundam ental surface plasm on m ode of air/
gold interface at a w avelength of 632.8 nm . The x-axis is the num ber of grid points in the one-dim ensional calculation
region.

2003 - 2016 Lumerical Solutions, Inc


1910 Lumerical Knowledge Base

It can be shown that if Staircase in the "mesh refinement" setting is used, the errors are much higher than with
the Conformal Variant 1 mesh refinement setting.

8.1.4.5 Bullseye Aperture

Introduction
We will calculate the transmission through a sub-wavelength aperture in a thin silver film. Surface plasmon modes
created by a series of rings around the aperture are used to enhance the transmission. Simulation results will be
compared to the experimental results published by Lezec et al.

Solvers 101

FDTD
Associated files
sp_bullseye.fsp
sp_bullseye_analysis.lsf

See also
Surface Plasmons 1881
Focusing with subwavelength aperture 1912

TFSF source 546


Related publications
H. J. Lezec, et al., "Beaming light from a
subwavelength aperture", Science 297, 802
(2002).

Simulation setup
The file sp_bullseye.fsp contains a simulation of the structure shown in Figure 1 from Lezec. A bullseye
pattern is etched from a free standing 300nm thick silver layer. The central hole has a radius of 150nm, and goes
completely through the silver layer. Four 60nm deep grooves are etched in both the top and bottom of the layer
surround the hole. Please note that the silver material fitting needs to be adjusted.

A mesh override region is used to force a small mesh around the structures and TFSF region.

A broadband Total Field Scattered Field (TFSF) plane wave source (400-1000nm) is incident on the lower surface. A
frequency domain power monitor is located above the upper surface and will be used to measure transmission
through the aperture. Note that we need unpolarized result, usually it needs at least two simulations, each for one
polarization. For this particular structure, since it has rotational symmetry, so the unpolarized result can be
obtained from a single simulation, see the script in the analysis group. For more information on calculating
response for unpolarized an incoherent illumination, see the Coherence 596 page.

Results
Two simulations are required, with and without the grooves. In the structure group Thin Film, the variable
"make_grooves" allows you to choose if the grooves should be added to the simulation. Set "make_grooves" to 1 to
add the grooves, and 0 to leave them out. By comparing the simulations, enhancement due to the groves can be
determined. For initial results, the mesh override region can be deleted. This will make the simulation faster and
require less memory, but produce less accurate results. As soon as each of the simulations are complete, run the
script sp_bullseye_analysis.lsf. It will calculate a series of far field projections for that simulation and
create three figures. Results for the simulation with grooves are shown on the left, and without grooves on the right.

2003 - 2016 Lumerical Solutions, Inc


Applications 1911

Fig.1a Transm ission at various collection angles Fig.1b Transm ission at various collection angles

Fig.1 produced by the script shows the far field projection of the transmission monitor as a function of frequency at a
series of collection angles. It is important to note the difference in scale in the two cases. The peak transmission
with the bullseye grooves is about 1.2e-11 at 660 nm. Without the grooves, the transmission at 660 nm is about
2.5e-14. This shows that the grooves improve transmission by three orders of magnitude. This result shows very
good agreement with Figure 1.B in Lezec, et al.

Fig.2a far field projection at the w avelength w ith the peak


transm ission
Fig.2b far field projection at the w avelength w ith the peak
transm ission

2003 - 2016 Lumerical Solutions, Inc


1912 Lumerical Knowledge Base

Fig.3a far field projection at the w avelength w ith the peak Fig.3b far field projection at the w avelength w ith the peak
transm ission transm ission

The second figure from the analysis script shows the far field projection at the wavelength with the peak
transmission. The third figure shows a 1D slice of the same data. The above figures show the far field projections at
660 nm. It is clear that adding the grooves results in a much more focused beam. The divergence angle with the
grooves is 5 degrees, compared to 45 degrees without the grooves.

Fig. 4 poynting vector in the xy plane

The above image is a vector plot of the poynting vector in the xy plane, above the feature. It is often more meaningful
to plot the poynting vector rather than the fields, as is the case here (plots of the electric field will often contain
vectors pointing in different directions representing the oscillation in the field direction). With a vector plot of the the
poynting vector you can see the direction of power flow. It can be helpful to create an electric field vector plot to
study circularly polarized or elliptically polarized beams.

8.1.4.6 Focusing with Subwavelength Aperture


Introduction
The goal of this example is to show how FDTD Solutions can be used to investigate the focusing properties of a
single subwavelength aperture surrounded by grooves on the output surface. This is accomplished by reproducing
theoretical results from a paper by Garcia-Vidal et al.

2003 - 2016 Lumerical Solutions, Inc


Applications 1913

Solvers 101

FDTD
Associated files
Garcia_Vidal.fsp
Garcia_Vidal.lsf

See also
Surface Plasmons 1881
Bullseye aperture 1910
Related publications
F. J. Garcia-Vidal, L. Martin-Moreno, H. J.
Lezec, and T. W. Ebbesen, Focusing light
with a single subwavelength aperture flanked
by surface corrugations, Appl. Phys. Lett.
83, 4500 (2003).

Simulation setup
As shown above, the simulation contains a structure with a subwavelength aperture surrounded by grooves.

In order to reproduce the results from figure 2 of Garcia-Vidal et al, the structure in Garcia_Vidal.fsp has 20
groves on the output surface with a period of 500nm. The groove width and depth are 40nm and 83.5nm respectively.
Since the authors of the publication assume perfect metal boundary conditions in their theoretical calculations, the
PEC material is used for the structure.

The structure is contained in a group so that it is easy to modify geometrical parameters such as the groove depth
or width.

A 500-600nm TE plane wave impinges on the structure from the left and a monitor is place in the near field to the
right. The near field data from this monitor is used to get the fields as a function of x and y to the right of the
aperture.

Note: Plane wave with PML


Usually we do not recommend using plane wave with PML to avoid artificial diffraction and edge effect 526 . This
example is an exception. The edge effect will probably still present but the PEC material, thanks to its high
reflectivity, will block all the unphysical light from propagating to the monitor for result analysis.

Results
After the simulation Garcia_Vidal.fsp has run to completion, run the script file, Garcia_Vidal.lsf. The
script file uses far field projections of the data from the monitor to calculate the fields to the right of the aperture. The
time that it takes to run the script file will depend on how many points are desired in the far field projection. The
results below can be obtained by using 1000 points in x and 500 points in y. The attached script file is set to less in
order to reduce the time it takes to run the script file.

Note that due to grid dispersion, using the far field projections is more accurate than simulating a large area at the
output of the aperture and using a 2D monitor to measure the fields.

Once complete, the script file produces the three figures below. The script also calculates the focal width and length,
and prints the results to the command prompt. The focal length is the distance from the aperture to the focal point
and the focal width is the full width half maximum of the fields in the direction perpendicular to the field propagation.
For the attached simulation, the focal length and width are

2003 - 2016 Lumerical Solutions, Inc


1914 Lumerical Knowledge Base

Focal length: 48.034 microns


Focal width: 3.28657 microns

E field intensity profile as a function of x and y at 532nm.

Cut along the line y=0 from the previous picture. The peak occurs at the focal length determined to be 47.58
microns.

2003 - 2016 Lumerical Solutions, Inc


Applications 1915

Cut along the line x = 47.58 microns

8.1.4.7 Fluorescence Enhancement


We will calculate the radiative and non-radiative decay rate enhancement for dipoles near a metal particle. We will
compare with the theoretical results of Gersten and Nitzan which are valid for particles much smaller than the
wavelength.

We gratefully acknowledge collaborative development of this example with Joseph Lakowicz and Mustafa Chowdhury
at the Center for Fluorescence Spectroscopy, Medical Biotechnology Center, University of Maryland School of
Medicine (http://cfs.umbi.umd.edu/jrl/index.html), Stephen Gray at Argonne National Labs (http://
anchi8.chm.anl.gov/staff/chem-dyn/gray.html), and discussions with David Ginger at the University of Washington
(http://depts.washington.edu/gingerlb/).

2003 - 2016 Lumerical Solutions, Inc


1916 Lumerical Knowledge Base

Solvers 101

FDTD
Associated files
fluorescence_decay.fsp
fluorescence_decay_setup.l
sf
fluorescence_decay_analysi
s.lsf

See also
Surface Plasmons 1881
Mie scattering 3D 1752
dipolepower 1600 script function
Source - Dipole 511
Related publications
J. Gersten and A. Nitzan,
"Spectroscopic properties of
molecules interacting with small
dielectric particles", J. Chem. Phys.
75, 1139 (1981).
L. Novotny and B. Hecht, "Principles
of Nano-Optics", Cambridge
University Press, Cambridge,
(2006).
Chowdhury, et al, Systematic
Computational Study of the Effect of
Silver Nanoparticle Dimers on the
Coupled Emission from Nearby
Fluorophores, J. Phys. Chem. C.,
112(30), 11236-11249 (2008).
P. Bharadwaj and L. Novotny,
"Spectral dependence of single
molecule fluorescence
enhancement," Opt. Express 15,
14266-14274 (2007).

Backgroud
The analysis of the FDTD results rely on the fact that, for an atomic dipole transition that can only occur through
radiation, the quantum mechanical decay rate in an inhomogeneous environment can be related to the classical
power radiated by the dipole in the same environment [Novotny and Hecht]. Specifically, we have the relationship
g P
=
g 0 P0
where
g and P are the decay rate and radiated power in an inhomogeneous environment (with the nanoparticle near the
dipole source),
g0 and P0 are the decay rate and power radiated in a homogeneous environment (without the nanoparticle, but just
the dipole source).

The quantum efficiency (QE) is defined as,


rad

QE =
g
rad non- rad
g +g
where grad and gnon-rad are the radiative and non-radiative decay rate.

2003 - 2016 Lumerical Solutions, Inc


Applications 1917

Simulation setup
The fsp file fluorescence_decay.fsp should be used as the starting fsp file. Note that we use symmetric and/
or anti-symmetric boundary conditions to reduce the simulation time and memory. After opening this file, run the
script file fluorescence_decay_setup.lsf. At the start of this script file, the dipole orientation, material,
sphere radius, distance between the dipole and the sphere, the mesh size and mesh accuracy can be chosen. The
mesh size is applied using a mesh override region and will only be used over the sphere and dipole. Outside this
region, automatic graded meshing will be used with the specified mesh accuracy setting.
perpendicular = 0; # set to 0 for parallel orientation
material = "Au (Gold) - Palik";
a = 20e-9; # sphere radius
d = 15e-9; # distance between dipole and sphere surface
dx = 5e-9; # mesh size used over sphere and dipole region
mesh_accuracy = 2; # used outside the sphere and dipole region
After running the setup script, run the simulation.

Results
The script file file fluorescence_decay_analysis.lsf can be used to analyze the FDTD results and compare
to theoretical values. The theoretical values are calculated for a dipole distance of d-dx and d+dx. The FDTD result
should lie between these two theoretical calculations, since the position of the dipole (and the sphere radius) can
only be accurately defined to within about dx. If you modify the dipole orientation, sphere radius, distance between
the dipole and sphere or the mesh size, dx, in the setup script, you must also make the same modification in the
analysis script.

The normalized decay rate is the ratio of the decay rate for the fluorophore (dipole) near the nanoparticle to the
decay rate of the fluorophore (dipole) in free space. The script file creates three figures:
1. The normalized radiative decay rate vs wavelength. ( grad / g0rad )
2. The normalized non-radiative decay rate vs wavelength. ( gnon-rad / g0rad )
3. The quantum efficiency (QE) vs wavelength

Coarse mesh results


The initial settings use a mesh size of dx=5nm for a dipole-sphere distance of only 15nm. Clearly, we cannot expect
these results to be very accurate, however, it is a reasonable first step because the simulations will take less than a
minute to complete on most computers.

Fig. 1 Sim ulation and theoretical results for parallel orientation (x polarized)

Fig. 2 Sim ulation and theoretical results for perpendicular orientation (z polarized)

2003 - 2016 Lumerical Solutions, Inc


1918 Lumerical Knowledge Base

In the above figures, for both parallel and perpendicular dipole orientations, we see that the FDTD results are
between the theoretical results for d-dx and d+dx, with d=15nm and dx=5nm.

Fine mesh results


We can improve the results by using dx=2.5nm and a mesh accuracy setting of 4. In the analysis script,
fluorescence_decay_analysis.lsf, change the variable use_dipole_box from 0 to 1. For the coarse mesh,
the dipolepower 1600 script function was used to obtain the power emitted by the dipole in order to calculate the decay
rate. The dipolepower script function is especially useful for finding the power emitted by a dipole when using coarse
meshes since the mesh may not be fine enough to fit a box of monitors around the dipole. However, there can be
some numerical errors in this calculation that become significant when small mesh sizes are used. Since this
simulation is especially sensitive to these errors, for small mesh sizes we measure the power emitted by the dipole
using a small box of power monitors 841 surrounding the dipole.

Below, we see the results for parallel and perpendicular orientations in this case. Again, the agreement between
FDTD and the theoretical calculations is good, particularly when we consider the difference between theoretical
values for dipoles-sphere distances of d-dx and d+dx. The FDTD results for the perpendicular orientation are
sometimes slightly outside the expected range. This is partly due to errors in the FDTD calculations and partly due
to the approximations made when calculating the theoretical results.

Fig. 3 Sim ulation and theoretical results for parallel orientation (x polarized) w ith higher m esh accuracy

Fig. 4 Sim ulation and theoretical results for parallel orientation (z polarized) w ith higher m esh accuracy

Advanced settings:
Simulation auto-shutoff
The simulation auto-shutoff is used to terminate simulations when the fields have decayed. The default setting is 1e-
5, meaning that the simulation will shutoff when the electromagnetic energy has decayed to 1e-5 of it's peak value.
For broadband simulations and resonant structures, this can sometimes lead to ripples in the frequency domain
monitors at certain wavelengths because the simulation can terminate too early for some resonance. In this
example, the default settings lead to small ripples for wavelengths above approximately 650nm. To avoid the
problem, this setup script sets the auto-shutoff limit to 1e-8.

Lightning rod effects


In this example, we are studying a dipole that is very close to a curved metal surface. The curved surface is meshed
on a cartesian mesh. In other words, the sphere must be represented as a group of rectangular metal regions and
this is often called "staircasing". When the structure is metal, this can lead to strong local fields near the sharp
corners, or points. If the dipole is located near a sharp point of metal, we find that we must use a very small mesh to

2003 - 2016 Lumerical Solutions, Inc


Applications 1919

get good results. While this is very unlikely to occur in general, in some unfortunate geometries it can lead to very
slow convergence.

This situation will most likely occur when the radius, a, is an integer multiple of dx/2. In this case, the mesh cell at
(0,0,a) may be counted as inside the metal sphere, while neighboring cells, for example (dx,0,a) are in air. This
sharp "point" near the dipole at (0,0,a+d) can make the simulation slower to converge. To avoid this, the setup script
sets the radius to be a-0.01nm. By reducing the radius by 0.01nm, we avoid a sharp point of metal possibly
appearing near the dipole.

If you are interested in testing your own structures, use an index monitor and disable the spatial interpolation, as
shown below.

You can then look at all three components of the index (x, y and z). If you see an image like the one below, you
should consider making a small change to the object dimensions or mesh settings.

Alternatively, if you see an image like this, then the surface of the sphere appears flat near the dipole and you will
get faster convergence.

2003 - 2016 Lumerical Solutions, Inc


1920 Lumerical Knowledge Base

In most cases, the results should converge as dx is reduced, and the rate of convergence is faster when lightning
rod effects are avoided.

8.1.4.8 Chromatic Polarizers


Introduction
We will calculate the properties of chromatic plasmonic polarizers for color filtering and polarimetry. We will try to
reproduce figures 2b, 2d, 3 of Ellenbogen et al., "Chromatic Plasmonic Polarizers for Active Visible Color Filtering
and Polarimetry", Nano Lett.12(2):1026-31 (2012).

Solvers 101

FDTD
Associated files
sp_filter.fsp
sp_filter.lsf

See also
Surface Plasmons 1881

Related publications
Tal Ellenbogen et al, "Chromatic Plasmonic
Polarizers for Active Visible Color Filtering and
Polarimetry", Nano Lett.12(2):1026-31 (2012)

Simulation setup
The file sp_filter.fsp can be used to simulate an array of chromatic plasmonic polarizers (CPPs). The
simulation file contains one unit cell of the periodic structure. The polarization angle of the source can be set in the
polarization Analysis Group. If set to 0 or 90 degrees, the group will automatically use either symmetric or anti-

2003 - 2016 Lumerical Solutions, Inc


Applications 1921

symmetric boundaries to reduce the simulation volume.

To obtain the polarization information required for figure 2, two simulations are necessary, which is done by the
figure2 object in the Optimization and Sweeps window. To obtain information on the transmission minima to
recreate figure 3, we use the figure3 sweep object which will record the transmission minimum as a function of
CPP horizontal length.

Results
The results of the sweeps should already be saved into the file. However, it is a good idea to try rerunning each
parameter sweep. The script file sp_filter.lsf will then analyze the results and plot them as they are displayed
in figures 2b, 2d and 3 of Ellenbogen et al. Please modify figre2 and figure3 to be 1 as to run the sweep and 0 not to
run the sweep.

We can see that there is good agreement with the published results. To improve the results, it would be possible to
use a smaller mesh size (here we use 5nm over the Al CPP), replace the ITO with a better material model (here we
used a dielectric with n=1.9), and draw the structure in a way that is closer to what has been fabricated. Also, it
should be noted that the polarization angle definition was reversed between figures 2b and 2d of the publication.

2003 - 2016 Lumerical Solutions, Inc


1922 Lumerical Knowledge Base

8.1.4.9 Nanohole Array

Introduction
We will calculate the transmission and reflection spectrum from an array of nanoholes in a metallic film. We will also
consider the near field profiles at the surface of the film and the local field enhancements.

Solvers 101

FDTD
Associated files
sp_array.fsp
sp_array.lsf

See also
Surface Plasmons 1881

Simulation setup
The file sp_array.fsp can be used to simulate an array of nanoholes of radius 100 nm and pitch 400 nm in a 100
nm thick layer of gold. The gold layer uses the "Au (Gold) - CRC" model included in the default material database.
The plane wave source covers a wavelength range of 400 to 750 nm. A single unit cell of the array is modeled, and
symmetric/anti-symmetric boundary conditions are used to further reduce the simulation volume by a factor of 4.
(Please note that symmetric/anti-symmetric boundaries must be consistent with the source polarization.) With an
FDTD mesh accuracy of 2, and a 10 nm mesh override in the gold, the simulation runs in a few seconds on a single
computer. Some convergence testing of the mesh size should be done for each simulation and typically mesh sizes
of 5 nm or less should be used for the final results.

Results
After running the simulation, run the script file sp_array.lsf. It will perform a series of representative calculations
and create the figures shown below. We can see that there are a number of resonances with the strongest at
approximately 675nm. The script also creates a figure of the transmission normalized to the area of the hole divided
by the unit cell area, which makes it easy to see where we have extraordinary transmission.

Transmission and reflection vs wavelength

2003 - 2016 Lumerical Solutions, Inc


Applications 1923

Verification of the material properties


It is sometimes useful to verify that the gold material used in the FDTD simulation had the desired properties over the
entire wavelength range. The following plot shows the index of the gold material used in the simulation as a function
of wavelength.

Near field plots


The following images show |E|2 at the surface of the gold, on the transmitted and reflected side. We can see that the
local near field enhancement is very significant because the incident field intensity is 1 V/m.

Reflected surface Transmitted surface

2003 - 2016 Lumerical Solutions, Inc


1924 Lumerical Knowledge Base

The cross section in the x-z plane shown below has the colorbar adjusted to a range of 1 to 10. This makes it
possible to easily see the region where the near field intensity enhancement is at least 10.

The simulation will also make an mpeg movie called sp_array_nanohole_movie.mpg.

8.1.4.10 Surface Enhanced Raman Scattering


Introduction
Raman scattering is an inelastic scattering of a photon, meaning that scattered photons will have a different
frequencies from the excitation. When the scattering molecules are on textured surface, the Raman scattering can
be greatly enhanced (thus the term Surface Enhanced Raman scattering (SERS)). Direct simulation of this non-
linear Raman scattering is quite challenging (as are most other non-linear processes). Most often, FDTD simulations
are used to measure the scattering enhancement. This can be done with a linear simulation, making the calculation
far easier to setup and analyze. The enhancement factor (EF) is usually defined as (E/E0)^4 where E is the local
maximum electric field, and E0 is the amplitude of input source electric field in a linear simulation.

In the following application example, we will measure the local enhancement factor near a Pt nanoparticle on a
smooth Ag surface.

2003 - 2016 Lumerical Solutions, Inc


Applications 1925

Solvers 101

FDTD
Associated files
sers_pt_ag.fsp
sers_pt_ag.lsf

See also
Surface Plasmons 1883
Mie scattering 3D 1752
Related publications
Kim K, Choi JY, Lee HB, Shin KS.,Raman scattering of
4-aminobenzenethiol sandwiched between Ag
nanoparticle and macroscopically smooth Au substrate:
effects of size of Ag nanoparticles and the excitation
wavelength.,J Chem Phys. 2011 Sep 28;135(12):124705
Kwan Kima, Hyang Bong Leea,Kuan Soo Shinb,
Surface-enhanced Raman scattering characteristics of
nanogaps formed by a flat Ag substrate and spherical
Pt nanoparticles, Spectrochimica Acta Part A100(2013)
10-14
Kwan Kim,Dongha Shin,Hyang Bong Leea and Kuan
Soo Shin, Surface-enhanced Raman scattering of 4-
aminobenzenethiol on gold: the concept of threshold
energy in charge transfer enhancement, Chem.
Commun., 2011,47, 2020-2022
Wen-Di Li, Fei Ding, Jonathan Hu, and Stephen Y.
Chou, Three-dimensional cavity nanoantenna coupled
plasmonic nanodots for ultrahigh and uniform surface-
enhanced Raman scattering over large area, Optics
Express, Vol. 19, Issue 5, pp. 3925-3936 (2011)

Simulation challenge
Under proper conditions, both the metallic nanoparticle and the plasmonic surface can produce localized surface
plasmon and surface plasmon polariton (SPP). When the two geometric objects are very close but not in touch, the
positive interference between their surface plasmons can create huge field intensity in the "hot spot" inside the gap.
Typical size of the gap is in a few naometers or even smaller. This can lead to large memory requirement and long
simulation times. We use TFSF source, and simulate only a small piece of the structure, in order to find the
maximally possible EFs.

Simulation setup and Results


In this example, the Pt particle has a radius of 40 nm. The particle is located 1nm above a silver substrate. The
interaction between the particle and surface will create a strong local field enhancement where the particle almost
touches the surface. To resolve such a tiny gap, we use mesh override named "mesh_gap" with mesh size 0.4nm in
z and 1nm in xy plane (see tips). We use another coarser override to force a 5nm mesh around the rest of the
particle.

The profile monitors "xz" and "yz" are used to record the local field profile at 50 frequency points.

After running this simulation, run the script file sers_pt_ag.lsf to calculate the enhancement factor (E^4). The
following figures show E^4 in the XZ plane. The coarse simulation runs in about 40 minutes on a reasonable
computer and requires about 1.5 GB of memory. The higher accuracy simulation (0.2nm gap z mesh, 0.5nm gap x/
y mesh), the time and memory increase by roughly a factor of 10.

2003 - 2016 Lumerical Solutions, Inc


1926 Lumerical Knowledge Base

Coarse mesh results Fine mesh results

Tips:
- Convergence testing: The localized EF may be strongly dependent on the mesh, you may need to have
convergence test.
- Mesh size: We are most interested in making the z mesh small at the gap, to help resolve the very small (1nm)
gap distance). It is less important to force a small mesh in the X/Y directions, since the structure is not changing
so rapidly in those directions. However, if the aspect ratio of the mesh (ie. the difference in size between the X/Y
and Z mesh) become too large, the simulation can become unstable. In such situation, it may be necessary to
force a smaller X/Y mesh. Another possible solution is to slightly reduce the 'dt stability factor' (property can be
found in the FDTD region - mesh settings tab).

8.1.4.11 Waveguide Coupled SP Mode


Introduction
In this example we calculate the loss and resonant frequency of a waveguide coupled surface plasmon mode as
described in Lavers and Wilkinson, "A waveguide-coupled surface-plasmon sensor for an aqueous environment",
Sensors and Actuators, B 22, 75-81, (1994).

2003 - 2016 Lumerical Solutions, Inc


Applications 1927

Solvers 101

FDE
Associated files
sp_waveguide.lms

See also
Surface Plasmons 1881

Related publications
C.R. Lavers and J.S. Wilkinson, "A
waveguide-coupled surface-plasmon sensor
for an aqueous environment", Sensors and
Actuators, B 22, 75-81, (1994)

Simulation setup
The file sp_waveguide.lms is setup as described in Lavers and Wilkinson.

The Silver material properties are defined with the silver material "Ag (silver) - Johnson and Christy" included with
MODE Solutions, rather than the values specified in Lavers and Wilkinson. This could account for some of the
differences between these simulations and the results given in the paper.

Results
Mode profile
Select the Analysis - Modal Analysis tab. Set the wavelength to 500nm. Click the Calculate Modes button to
search for propagating modes in this structure. Three modes will be found. The first, with an effective index of
approximately 1.57, is the surface plasmon mode. We can tell that this is the surface plasmon mode because it has
a high loss and most of the field intensity is near the silver layer. The second and third modes, with effective indices
close to 1.52, are the waveguide modes. These modes have much lower loss and are primarily confined to the
waveguide layer. The following figure show the mode profiles.

The figure on the left shows |E|^2 as a function of y while the right figure shows |Ey|^2 as a function of y. Notice that

2003 - 2016 Lumerical Solutions, Inc


1928 Lumerical Knowledge Base

the fields in Mode 1 and Mode 3 are TM polarized (Ey and Ez only) while Mode 2 is TE (Ex only). This is important
because it means the surface plasmon mode (Mode 1) can only couple to one of the waveguide modes (Mode 3).

Effective index vs wavelength


Next, we can calculate the effective index of each mode vs wavelength. Select the Analysis - Frequency analysis
tab. Set the Stop wavelength to 600nm. Uncheck the "track selected mode" option, then perform the frequency
sweep. The following figure on the left will be created. The figure on the right shows a close up of the crossing region.
Note, before doing the frequency sweep, make sure that the material fitting is continuous and reasonably accurate.

The line with the steep slope is the surface plasmon mode. At approximately 547nm, the effective index of the
surface plasmon mode becomes equal to the effective index of the waveguide modes. At this point, the TM modes
will have the highest coupling efficiency. We expect the TM waveguide mode to suffer from high loss at this
wavelength because energy from the waveguide mode will couple into the high loss surface plasmon mode.

It is also interesting to notice the drastic change in slope of the surface plasmon mode at 555nm. At this point, the
effective index is 1.512; the value of the substrate index. The mode is no longer confined to the metal layer and
begins radiating power into the substrate.

Due to the implementation of the frequency sweep, color coding of the modes becomes mixed up at crossing points.
This problem usually does not occur with the "track selected mode" option, as we will see in the loss section
below. However, the "track selected mode" option only allows for one mode to be tracked at a time. Therefore three
frequency sweeps would be required.

Loss vs wavelength
Still in the Analysis - Frequency analysis tab, select Set calculation parameters from the options menu. Select the
TM waveguide mode (mode 3). Select "track selected mode", then start the frequency sweep. Once the sweep is
finished, select "Loss" from the list of Plot options below the figure. The following figure will be displayed.

2003 - 2016 Lumerical Solutions, Inc


Applications 1929

As expected, the mode has much higher loss at approximately 550nm because it can couple to the surface
plasmon mode. This result matches Figure 3 from Lavers and Wilkinson.

8.1.4.12 Gap Plasmon Waveguide


Introduction
In this example, we analyze the mode structure of a gap surface plasmon waveguide, and determine the propagation
loss of that structure at a wavelength of 1,550nm. In conjunction with the the scripting environment of MODE
Solutions, and built-in overlap calculator, we also investigate different mechanisms including end-fire coupling with
high NA lens and an optical antenna structure to determine the optimum way to couple light into the gap surface
plasmon waveguide.

Solvers 101

FDTD
FDE
Associated files
GPW.lms
GPW.fsp
MODE_simulation_endfire.lsf
MODE_simulation_width.lsf
MODE_transmission_vs_NA.ldf
FDTD_sweep_plot_results.lsf
FDTD_helper.lsf
FDTD_transmission_vs_NA.ldf
See also
Surface Plasmons 1881

Related publications
Jing Wen, Sergei Romanov, and Ulf Peschel,
"Excitation of plasmonic gap waveguides by
nanoantennas," Opt. Express 17, 5925-5932
(2009)

2003 - 2016 Lumerical Solutions, Inc


1930 Lumerical Knowledge Base

A. Kriesch, S. P. Burgos, D. Ploss, H.


Pfeifer, H. A. Atwater, and U. Peschel,
"Functional plasmonic nanocircuits with low
insertion and propagation losses.," Nano Lett.
13, 453945 (2013)

Simulation setup
The file GPW.lms sets up the gap surface plasmon waveguide model as shown in the screenshot below. Here the
graded mesh capability is particularly powerful for the rapid field variations present in surface plasmon devices.

In the Analysis window (shown below), one can easily find the mode(s) of interest by scanning through a specific
refractive index range, or searching near the maximum refractive index at the wavelength of operation.

To find the modes of interest, scan over refractive indices between the low-index core and the high-index cladding
layers.
Each mode found is expressed in terms of effective index, propagation loss configured in length units expressed

2003 - 2016 Lumerical Solutions, Inc


Applications 1931

by the user, and the TE fraction of the mode.


The user interface allows one to quickly plot the individual electric and magnetic field components, electric and
magnetic field intensities, the energy density, and the x, y, z Poynting vectors.

In the script MODE_simulation_endfire.lsf, we

1. Calculate the coupling efficiency of end-fire coupling a high NA source into the gap surface plasmon waveguide
2. Analyze the efficiency of the optical antenna structure as an alternative in-coupler for the gap surface plasmon
waveguide

We use MODE_simulation_width.lsf to calculate how the imaginary part of the gap surface plasmon
waveguide propagation constant varies with waveguide width.

These steps are described in detail in the Results section below.

Results
1. Calculate how the imaginary part of the gap surface plasmon waveguide propagation constant varies
with waveguide width

The width of the waveguide metal layers are varied from 50 to 150nm, and the imaginary part of the propagation
constant is recorded. In the limit of very wide waveguides, a propagation constant of 1.65 - 0.024i is calculated, in
good agreement with the work of Wen et al.

2. Calculate the coupling efficiency of end-fire coupling a high NA source into the gap surface plasmon
waveguide

A series of high numerical aperture modes ranging from NA=0.5 to NA=0.9 are recorded, with the overlap calculation
performed for each combination.

2003 - 2016 Lumerical Solutions, Inc


1932 Lumerical Knowledge Base

The figure above shows that only 2.5% - 5.9% (depending on the NA) of the incoming light is coupled into the gap
surface plasmon waveguide mode, owing to the very high confinement of light within the air region between the two
metal electrodes

3. Analyze the efficiency of the optical antenna structure as an alternative in-coupler for the gap surface
plasmon waveguide

To analyze the coupling efficiency of the optical antenna structure, a 3D model GPW.fsp is constructed in FDTD
Solutions (shown below). The optical antenna consists of two electrodes with 90 degree stub sections, illuminated
with a high NA beam focused on the center of the antenna.

The polarization of the high NA source is oriented perpendicular to the direction of waveguide propagation
A monitor plane is established at the end of the antenna to measure the power flow through that surface, which
normalized to the source power provides the coupling efficiency of the antenna

The "beam_position" parameter sweep project in GPW.fsp finds the optimal position along the length of the gap
surface plasmon waveguide to focus the light beam by iteratively running a series of simulations at different source
locations. A planar transmission monitor at the entrance of the waveguide measures the power transmission, taking
into account both the optimum location to couple light into the waveguide, and propagate it along the length of the
gap surface plasmon waveguide which has losses on the order of 1 dB/micron.

2003 - 2016 Lumerical Solutions, Inc


Applications 1933

The "NA" parameter sweep project calculates the coupling efficiency of injecting light into the gap surface plasmon
waveguide (for NA=0.5 to NA=0.9, as in step 2). We store this data in FDTD_transmission_vs_NA.ldf and
compare this result with that of the end-fire coupling case in step 2 using FDTD_sweep_plot_results.lsf.

One can see that comparable coupling efficiencies on the order of 2-5% are obtained with high NA objectives.
However, the integration benefits of coupling into the gap surface plasmon waveguide from the surface demonstrates
the promise of utilizing such optical antenna structures to achieve high-density integrated optical components. In the
case of the optical antenna, normalizing the coupled light to the power contains in a 1 micron diameter spot, as is
done in Wen et al. yield coupling efficiencies in excess of 10%, as reported in that paper

8.1.4.13 Photothermal Heating in Plasmonic Nanostructures


Introduction
In this example, we investigate the effect of photothermal heating in plasmonic nanostructures based on the
published work in the referenced article [1]. Using Lumerical's FDTD Solutions for optical simulation and Heat
Transport Solver for thermal simulation, we look at two types of thermoplasmonic antennae; dipole and diabolo. In
the first part of this example we consider arrays of both these antennae under varying optical intensity and compare
their performance. In the second part of this example we look at a single diabolo antenna and demonstrate how its
performance can be greatly enhanced by employing a plasmonic lens.

2003 - 2016 Lumerical Solutions, Inc


1934 Lumerical Knowledge Base

Solvers 101

FDTD
HEAT
Associated files
Part 1:
diabolo_array.fsp
dipole_array.fsp
diabolo_array.ldev
dipole_array.ldev
get_Pin_sweep_result
.lsf
Part 2:
diabolo_superstructu
re.fsp
diabolo_single.fsp
diabolo_superstructu
re.ldev
diabolo_single.ldev

See also
Surface Plasmons 1881

Related publications
[1] Z. J. Coppens, W. Li,
D. G. Walker, and J. G.
Valentine, "Probing and
Controlling Photothermal
Heat Generation in
Plasmonic
Nanostructures," Nano
Letters, vol. 13, pp. 1023-
28, 2013.

Part 1: Dipole vs. Diabolo Arrays


Simulation Setup
Optical (FDTD)
Based on the experimental setup of Ref. [1], in this part of the example we consider two arrays of antennae,
one using diabolo antennae and the other one using dipole antennae, both made out of gold. Open the
diabolo_array.fsp project file in FDTD Solutions. The array of diabolo antennae is sitting on top of a thick
Sapphire (Al2O3) substrate. The dimensions of each antenna are taken from Ref. [1]. The array has a pitch of
340 nm in both X and Y axes [1]. The FDTD simulation region covers one unit cell centered on one diabolo
antenna and has a width equal the period of the array in both X and Y direction. The length (along Z) of the
simulation region is kept at 1 micron. A plane wave source is used to illuminate the antennae array at an
wavelength of 1064 nm. The symmetric nature of the antenna structure is used to reduce the simulation region
to 1/4 th of its volume by using symmetric and anti-symmetric boundary conditions at the appropriate
boundaries.

An (advanced) "Power absorbed" analysis group is used to measure and save the absorbed optical power in the
antenna. The analysis group is modified so that it can calculate the absorbed power for a certain input power
defined by the "input_power" parameter and can save the data in a .mat file whose name is defined by the
"filename" parameter.

2003 - 2016 Lumerical Solutions, Inc


Applications 1935

Optical sim ulation setup in FDTD Solutions

The dipole_array.fsp project file uses a similar setup using dipole antennae where each antenna is 215
nm long, 50 nm wide, and 50 nm thick [1].

Thermal (HEAT)
Open the diabolo_array.ldev project file in DEVICE. The thermal simulation is performed for one unit cell
centered on one gold diabolo antenna and so the structure in the project file contains a single antenna on top of
a Sapphire (Al2O3) substrate. The dimensions of the antenna is identical to the setup in FDTD Solutions. The
thickness of the substrate is set to 250 micron which is a typical value for commercially available sapphire
wafers. An Import heat source is used to import the optical absorption data saved by FDTD Solutions to be
used as heat input to the simulation. Two temperature monitors are placed surrounding the antenna to record
the temperature profile. A sweep (Pin) is set up in the project file to apply a scaling factor on the heat source to
perform multiple simulations under varying input powers.

The fixed temperature thermal boundary condition is applied at the bottom of the simulation region to set it at
room temperature (300 K). The top of the simulation region is covered by air which has a convective boundary
condition defined at its interface with gold and sapphire to model heat loss at the top surface of the structure
through convection. The model for convection is chosen to be constant with a convective heat transfer
coefficient h = 10 W/m2K from the Material Interfaces.

2003 - 2016 Lumerical Solutions, Inc


1936 Lumerical Knowledge Base

Convective boundary condition at the m aterial interfaces w ith air

Results and Discussion


Optical (FDTD)

Optical Resonance
Open the diabolo_array.fsp project file in FDTD Solutions. Open the property editor for the plane wave
source (incident) and change the frequency range to start from 0.9 micron and stop at 1.2 micron. Run the
simulation and visualize the Transmission from the "transmission" DFT monitor. Use scalar operation "-Re" to
make the sign of the real part of transmission positive. The plot will show that the transmission has a minima
around 1064 nm which is consistent with the findings of Ref. [1]. Alternatively, right click on the analysis group
and plot Pabs_total to visualize the absorbed power which also shows a maxima around 1064 nm indicating that
the diabolo antenna has a resonance at a wavelength of 1064 nm. The same simulation can be done for the
dipole antenna using the dipole_array.fsp project file.

Transm ission past the diabolo antenna as a function of w avelength

2003 - 2016 Lumerical Solutions, Inc


Applications 1937

Optical absorption
Next, edit the property of the plane wave source again (in the diabolo_array.fsp project file) and change it
back to a single wavelength of 1064 nm by setting both the start and stop wavelengths at 1.064 micron. Run the
simulation again and once the simulation is run, right click on the analysis group and click "Run analysis". The
analysis group will calculate the absorbed power in the antenna and save it in a .mat file whose name can be
defined under from the Analysis tab. By default the name of the .mat file is set to be
Pabs_diabolo_array_1mW.mat. The input power is scaled in the analysis group to an input power of 1mW
for the entire array. Consistent with the experimental setup of Ref. [1], we assume that the incident beam has a
FWHM of 19.5 micron covering 2583 antennae. Thus, in the analysis group, we use an input power of 1/2583
mW or 3.87147e-07 W for the unit cell to scale the absorbed optical power. After the analysis is done, we can
right click on the analysis group to visualize the absorbed power (Pabs).

Absorbed pow er at a certain depth (Z value) inside the diabolo antenna

Following the same approach, simulate and save the absorbed power for the dipole antenna array using the
dipole_array.fsp project file.

Thermal (HEAT)
Open the diabolo_array.ldev project file in DEVICE. The heat source (heat) already has the optical
absorption data loaded but you can also load the Pabs_diabolo_array_1mW.mat file onto the heat source
and select the Pabs attribute to import the data saved by FDTD simulation. Set the scaling factor in the heat
source to 55 corresponding to an optical input of 55 mW and run the simulation. Once the simulation is run, the
results will be loaded in the HEAT solver region and in the temperature monitors. Right click on the first monitor
(monitor_1) and visualize temperature to see the temperature profile.

2003 - 2016 Lumerical Solutions, Inc


1938 Lumerical Knowledge Base

Tem perature profile at the antenna and the top surface of the
substrate

Next, from the optimizations and sweep window, run the "Pin" sweep to vary the input optical power from 5 mW
to 125 mW in 7 steps and run the simulations. The sweep saves the "boundary" dataset available in the HEAT
solver region as a result which records the power flow at the boundaries. However, the result that we are
interested in is the temperature rise in the simulation structure under different optical intensities. The script file
get_Pin_sweep_result.lsf script file can be used to read the temperature profile from each of the
simulation files and calculate the average increase in temperature so that it can be plotted against input optical
power. Make sure that the "project_name" variable in the script is set to the name of the .ldev file and run the
script.

The script will load the temperature data in monitor_2 of each simulation file to get the surface temperature for
each incident power. We then assume that the 2583 antennae in the center of the array that gets illuminated by
the incident light are at an uniform temperature given by the peak temperature in monitor_2 and the surrounding
region where the antennae are not illuminated is at a constant temperature equal to the room temperature (300
K). the temperature distribution is thus assumed to have the top-hat profile shown below (left). The total surface
area is considered to be 85 micron x 85 micron as per Ref. [1]. By comparing the ratio of the illuminated and
unilluminated area, the increment in average surface temperature is found to be equal to 0.0413*(Tsim - 300). The
script calculates this rise in average temperature and plots it as a function of input optical power. This averaging
is done so that the simulation result for a single unit cell can be compared against the measured temperature of
the entire experimental setup. The figure below (right) shows the temperature rise for both the diabolo and dipole
arrays as a function of input power. The plot is in agreement with Fig. 4(b) of Ref. [1].

2003 - 2016 Lumerical Solutions, Inc


Applications 1939

Tem perature rise versus input optical pow er for both


Tem perature profile for the entire array of antennae
antenna arrays

Part 2: Single Diabolo with Plamonic Lens


Simulation Setup
Optical (FDTD)
Open the diabolo_superstructure.fsp project file in FDTD Solutions. The simulated structure now
contains the Sapphire substrate with a single gold antenna and a plasmonic lens surrounding the antenna (also
referred to as the 'superstructure' in Ref. [1]). The material for the plasmonic lens is also gold and it has a pitch
of 720 nm [1]. The setup is illuminated with a Gaussian beam source with a FWHM of 4.44 micron which
translates to a beam radius of 3.774 micron at 1/e2 power which is the input parameter for the source. The
span of the simulation region in X and Y dimension is much larger in this setup so that the intensity of the
Gaussian source goes to zero at the simulation boundaries. PML boundary condition has been used in all
three dimensions. The Pabs analysis group calculates the power absorbed in the antenna for an input power of
110 mW for comparison with Ref. [1]. The diabolo_single.fsp project file contains a similar setup but
without the plasmonic lens so that we can see the effect of the lens on the amount of heating from the single
antenna.

Optical sim ulation setup for the diabolo antenna w ith plasm onic lens (superstructure)

Thermal (HEAT)
Open the diabolo_superstructure.ldev project file in DEVICE. The setup contains the single antenna
on top of the Sapphire substrate. The thickness of the substrate is kept at 250 micron. However, the X and Y
span of the simulation region has been made larger (4.44 micron) in this simulation to match the FWHM of the

2003 - 2016 Lumerical Solutions, Inc


1940 Lumerical Knowledge Base

incident beam in order to account for the spreading of the heat in the surrounding area. The same two
temperature monitors are used to capture the temperature and the same fixed temperature thermal boundary
condition is used at the bottom surface of the substrate to keep it at 300 K. The top of the simulation region if
filled with Air with convective boundary conditions defined in the Material Interfaces. The import heat source has
been loaded with the result saved by FDTD simulation of the diabolo_superstructure.fsp project file.
The diabolo_single.ldev project file also has an identical setup with the difference that the heat source
has been loaded with result from the simulation of the diabolo_single.fsp project file.

Results and Discussion


Optical (FDTD)
Run the diabolo_superstructure.fsp project file and then run the analysis. The analysis group is set up
to save the power data in a .mat file named Pabs_diabolo_superstructure.mat. Similarly, open and run
the diabolo_single.fsp project file and run the analysis. The power absorption data will be saved in a .mat
file named Pabs_diabolo_single.mat. After the analysis in both files are done, right click on the analysis
groups and visualize Pabs to compare the absorbed power between the two cases. As can be seen in the figure
below, the absorbed power increased approximately by a factor of 4 in the superstructure due to the plasmonic
lens.

NOTE: Due to the large simulation volume, the run time of these simulations will be quite long as compared to
the periodic array simulations.

Pabs for the single antenna and the superstructure at Z= 0.00785 m icron

Thermal (HEAT)
Open and run the diabolo_superstructure.ldev project file in DEVICE. Once the simulation is run right
click on monitor_1 and visualize temperature. Similarly, run the diabolo_single.ldev project file and
visualize the temperature profile from monitor_1. The figure below shows that the peak temperature in the
superstructure is considerably larger than in the single antenna. The peak rise in temperature in the
superstructure (antenna with lens) is approximately 280 K where the peak rise in temperature for the single
antenna is about 70 K. These results are in agreement with the simulation results from Ref. [1].

2003 - 2016 Lumerical Solutions, Inc


Applications 1941

Tem perature profile for the single antenna and the superstructure w ith the plasm onic lens

8.1.5 Other Nanophotonic Applications


This section focuses on nanophotonic device simulation using the FDTD and FDE solvers. Arrow waveguides,
Antennas, Liquid crystals and optical tweezers are studied.

Getting started
Download relevant products:
FDTD Solutions
MODE Solutions

Product introductory videos:


FDTD Solutions
MODE Solutionss

Product introductory examples:


(FDTD Solutions) Particle scattering tutorial 1724
(MODE Solutions) Plasmonic waveguide tutorial 1883

More ... 171

Application examples
Solvers 101 Description

FDE ARROW waveguides 1941

FDTD Green's function and LDOS 1947

FDTD Antenna 1951

FDTD Liquid crystals 1953

FDTD Optical polymer curing 1965

FDTD Optical tweezers 1967

FDTD Thermal emission 1978

8.1.5.1 ARROW Waveguide


Introduction
In this example, we use MODE Solutions to study a multilayer planar waveguide that takes advantage of the Anti-
Resonant Reflecting Optical Waveguide (ARROW) described in F. Prieto et. al. The goal is to plot the propagation

2003 - 2016 Lumerical Solutions, Inc


1942 Lumerical Knowledge Base

loss from 0.5 to 1 microns.

Solvers 101

FDE
Associated files
arrow_rib.lms

Reference
F. Prieto, L. M. Lechuga, A. Calle,
A. Llobera, and C. Dominguez.
"Optimized silicon antiresonant
reflecting optical waveguides for
sensing applications," IEEE J.
Lightwave Tech., 19, 75-83 (2001)

Set up ARROW A Structure


The structure in this example is based on the optimized ARROW A Structure for sensing applications from the
Prieto reference.

We construct the core of the waveguide with a rectangle. To make the coating 1 layer, we take the same rectangle,
change the material and make it a bit larger. Then we set the mesh order property. This acts like a Boolean
operation so that when the core and the coating rectangle overlap, the FDE solver uses only the material properties
from the core.

2003 - 2016 Lumerical Solutions, Inc


Applications 1943

The coating 2 layer is created similarly. We use an even larger rectangle, and place it on top of the core and first
coating layer. Then we set the mesh order so that where the three materials overlap, the eigenmode solver uses only
the material data from the core. When the two coating layers overlap, the eigenmode solver uses only the material
data from the first coating layer.

The medium to which this structure is exposed, in this case water, is modeled by setting the background index of
the FDE solver to 1.3325.

Find TM Mode at 632.8nm


First, we will find the fundamental TM mode for this structure at the wavelength of a He-Ne laser source which is
632.8nm.

Because we are looking for the fundamental TM mode, we know that we can use symmetric boundary conditions.
This filters out the modes which do not have the correct symmetry, for example the fundamental TE mode. You can
get a complete list of the modes the structure supports by setting all the boundary conditions to PML. You can find
more information about symmetric/anti-symmetric boundary conditions on the Symmetric and anti-symmetric BCs
466 page.

2003 - 2016 Lumerical Solutions, Inc


1944 Lumerical Knowledge Base

Note that the simulation x span is 3


times the width of the core. Also the
y span is large enough to include
both the silicon substrate and a bit
of the solution above the top coating
layer. This is done to ensure that the
location of the PML does not affect
the mode profile, and hence the loss
and effective index. Some
convergence testing should be done
to find the optimal size of the
simulation span.

Three mesh override regions were


added in this example to resolve the
thin coating layer deposited on top of
the core. The image shows a close
up of the xy view when the view

mesh button has been


selected. You can see that there are
four mesh cells in the coating layers.

The reason that the boundary conditions have been set to PML is because this waveguide is expected to have
attenuation loss. The loss returned by the FDE solver is equal to the loss to dispersive materials plus the loss
through the PML.

The loss returned for this mode is 2.07 dB/cm. Figure 12a of the reference contains a plot of loss versus structure
size for a slightly different structure. Nevertheless, the loss from the FDE solver is close to what would be expected
from the plot in the paper.

2003 - 2016 Lumerical Solutions, Inc


Applications 1945

Loss as a function of Wavelength


In the Frequency analysis tab, select the mode that you want to track on the mode list
Set the calculation parameters as shown in the screenshot below
Press the Frequency Sweep button. You will see a progress bar appear.
To plot the results of the frequency sweep, set the plot drop-down on the Frequency plot tab to "loss", or visualize
the result from the object tree (see below).

2003 - 2016 Lumerical Solutions, Inc


1946 Lumerical Knowledge Base

The following plot shows the loss for this mode as a function of wavelength. You can see that the loss increases
quickly as the wavelength increases.

2003 - 2016 Lumerical Solutions, Inc


Applications 1947

8.1.5.2 Green's Function and LDOS

Objective
This page reviews how one can calculate Green's function components, local density of states and spontaneous
decay rate and discusses how the aforementioned quantities relate to the dipolepower command in FDTD Solutions.
The derivation of the equations are for the most part taken from Novotny's "Principles of nano-optics".

Solvers 101

FDTD
Associated files
dipole_gf.fsp
dipole_gf.lsf
dipole_field.fsp
dipole_field.lsf
dipole_field_advanced
.fsp
dipole_field_advanced
.lsf

See also
Dipolepower 1600
Sourcepower 1601
Transmission box 841
Source - Dipole 511
Fluorescence enhancement
1915

References
L. Novotny and B. Hecht,
Principles of Nano-Optics,
Cambridge (2006).

Green's Function calculations


The dyadic Greens function G, is defined by the electric field at point r, generated by a point source at point r0 with
dipole moment u:
E ( r )c 2 e 0 e r
G (r , r0 ) =
w2 m
G is a 3x3 symmetric matrix and so each component of G can be calculated using the corresponding dipole
orientation and electric field component:
Gxx Gxy Gxz

G = Gxy G yy G yz
Gxz G yz Gzz

For example, Gzz can be calculated from a dipole oriented along the z direction:
Ez c 2 e 0 e r
Gzz =
mw 2
Open and run dipole_gf.fsp and once the simulation is run, run the script dipole_gf.lsf . This first part of the script will
calculate the real and imaginary parts of the Green's function for a range of frequencies. The real part of the Green's
function approaches infinity at the location of the dipole.

NOTE: To observe the behaviour of the real part of the electric field as a function of position, open and run
dipole_field.fsp and dipole_field.lsf. Both the real and imaginary parts are plotted. The real part

2003 - 2016 Lumerical Solutions, Inc


1948 Lumerical Knowledge Base

approaches infinity at the location of the dipole. However, when it is averaged over one mesh cell, it is a finite
negative value, as shown in the figure below. To achieve closer agreement between the FDTD result and the
theoretical average, special care must be taken to set-up the simulation appropriately. For more information, see the
note below for advanced users.

Note: For advanced users


The real part of the electric field at the location of the dipole is carefully simulated by placing the dipole at the Ez
point on the Yee Cell located at the origin. This ensures that the dipole is implemented at a single point. To observe
its behaviour, open and run dipole_field_advanced.fsp and dipole_field_advanced.lsf. The following
changes are applied in this simulation file:
- The FDTD mesh type is set to uniform. The span is set so that there is a mesh point at (0,0,0).
- The dipole is shifted to the Ez point on the Yee Cell (half a mesh step in the +z direction)
- The monitors spatial interpolation is set to none (see Advanced Tab).
The script file is modified to account for the half mesh step shift in the dipole position. The resulting plot is shown
below.

When the mesh size is reduced, the relative error between the FDTD real part of the field and theoretical average at
the dipole location decreases, however the absolute error increases.

2003 - 2016 Lumerical Solutions, Inc


Applications 1949

Local Density of States ( LDOS) and the decay rate:


The partial local density of states along one direction, say z, can be obtained from the imaginary part of Green's
function:
6w
r z (r0 , w ) = [Im{ Gzz (r0 , r0 ; w )}]
pc 2

From this, the spontaneous decay rate for a two-level quantum system at r0 and w0 can be calculated:

2w
g= | m |2 r z (r0 , w )
3h e 0

The total local density of states is obtained by averaging over the different orientations which translates to averaging
the three diagonal G components:

1 6w 6w 6w 2w t
r (r0 , w ) = 2 Im{Gxx (r0, , r0, ; w )} + 2 Im{G yy (r0, , r0, ; w )} + 2 Im{Gzz (r0, , r0, ; w )} = 2 Im{Tr[G (r0, , r0, ; w
3 pc pc pc pc

Rate of energy dissipation and the built-in dipolepower command:


Starting from the poynting theorem, the rate of energy dissipation can be written in terms of the Green's function :
dW w 3 | m |2
= 2 [Im{ G (r0 , r0 ; w )}]
dt 2c e 0 e r
In FDTD Solutions, there is a built-in command , dipolepower, which will calculate the radiated power of a dipole and
is readily available over the range of injected frequencies. See Dipolepower 1600 for more details.
The dipolepower command returns a quantity that is related to the imaginary part of the Green's function:
dW Im{G (r0 , r0 ; w)}w 3 | m |2
dipolepowe r = | sourcenorm |2 =
dt 2c 2 e 0 e r
sourcenorm is the source normalization spectrum used to normalize data in the cwnorm state for standard Fourier
transform quantities. See sourcenorm 1599 for more details.

2003 - 2016 Lumerical Solutions, Inc


1950 Lumerical Knowledge Base

The second part of the script, dipole_gf.lsf, calculates the power radiated by the dipole next to a dielectric sphere
normalized to the power that would be radiated by a dipole in a homogenous medium.
This calculation is done using the dipolepower function, the Green's function formulation as well as a box of monitors
enclosing the dipole. The box of monitors is useful for dispersive or lossy media where the results of dipolepower are
not reliable. All results are in close agreement as shown in the figure below:

Given the close agreement of the dipolepower command with the green's function formulation, when we are
interested in calculating LDOS or the decay rate, we can directly use the dipolepower function instead of calculating
the imaginary part of Green's function first:
12 e 0 e r (dipolepowe r ( f )) | sourcenorm ( f ) |2
r z (r0 , w0 ) =
pw 2 | m |2
8 e r (dipolepowe r ( f )) | sourcenorm ( f ) |2
g (w) =
pwh

The last part of the script dipole_gf.lsf, calculates and plots these. Note that both the decay rate and the LDOS
quantities are for the zz direction only. One would need to sum up the results in all three orientations for the total
rates.

2003 - 2016 Lumerical Solutions, Inc


Applications 1951

8.1.5.3 Linear Antenna


Introduction
In this example, we calculate the far field radiation pattern of a center-fed, linear antenna in free space. The antenna
is created in FDTD Solutions with a large number of electric dipole sources with appropriate amplitude and phase
values.

Solvers 101

FDTD
Associated files
antenna_linear.fsp
antenna_do_far_field.lsf

See also
Low frequency simulations 627

Related publications
J. D. Jackson, "Classical Electrodynamics,
Second Edition", John Wiley & Sons, 1975,
p. 401

Simulation setup
The above screenshot shows a thin, center fed, linear antenna of length d, oriented in the z direction. When driven
with a sinusoidal input, the current density is approximately

2003 - 2016 Lumerical Solutions, Inc


1952 Lumerical Knowledge Base

r kd r
J ( x ) = I sin - k z d ( x) d ( y ) e
2 for |z|<d/2, k=2*pi/lambda.

In FDTD Solutions, we can create such a current density with a series of dipoles. The amplitude of each dipole is
set based on the above formula.

A box of power monitors records the radiation pattern from the antenna, and calculates the far field radar cross
sections.

The group called "linear antanna" is a construction group that creates the linear antenna from a number of electric
dipoles.

Far field radiation pattern


After running the simulation, use antenna_do_far_field.lsf to plot the far field radiation pattern as calculated
by the analysis group called "scat_ff". The cross sections are measured in the x-z plane, and phi=0 corresponds to
the x-axis. The far field radiation pattern is plotted both is both on linear and polar scales.

There is a simple analytic formula for the radiation cross section when the antenna length is equal to 1/2 lambda, or
lambda. The script will plot the FDTD result together with the theoretical result. As the figures show, the agreement
is very good.

1/2 wavelength antenna full wavelength antenna

XZ far field radiation cross section XZ far field radiation cross section

XZ radiation pattern XZ radiation pattern

2003 - 2016 Lumerical Solutions, Inc


Applications 1953

8.1.5.4 Liquid Crystals


Liquid crystals are optical materials whose molecules can be oriented via the application of a static or low-frequency
electric field. Given the anisotropic optical properties of these materials depending on their orientation, designers
can use them to electrically tune the response of a wide class of photonic components including display and
communications components including optical switches, couplers, shutters, modulators and beam steering devices.
A rigorous Maxwell solver is required to predict the broadband response of photonic components incorporating liquid
crystals and when the molecule orientation is varied over wavelength-scale distances.

Getting started
Download a free trial of FDTD Solutions and MODE Solutions
Download free trial

Watch a product introductory video


FDTD Solutions
MODE Solutions

Watch a liquid crystal simulation video


Liquid crystal video

Advanced analysis and examples


Simple LCD 1953

Twisted Nematic LCD 1955

Optical switch 1959

Tuning of SOI ring resonator 1956

Optical phased array 1962

Liquid Crystal grid attribute 255

Anisotropic materials 253

8.1.5.4.1 Simple LCD

Introduction
In this example, we will model a simple uniaxial LCD layer. For more complex LC orientations, see Twisted Nematic
LCD 1955 .

2003 - 2016 Lumerical Solutions, Inc


1954 Lumerical Knowledge Base

Solvers 101

FDTD
Associated files
LCD.fsp
See also
LC rotation 263
Twisted Nematic LCD 1955
Tuning of SOI ring resonator 1956

Optical switch 1959


Optical phased array 1962

Simulation setup
The anisotropy resulting from the orientation of liquid crystals cause light polarized along the LC director to
propagate at a different velocity than light polarized along the perpendicular direction. This birefringence leads to a
change in polarization between the incident light and the light that is transmitted through the LC layer.

To model this effect in FDTD Solutions, we will use an anisotropic material and a LC grid attribute object, which
allows us to specify an arbitrary orientation for the LC layer. All we have to do in this case is to set the angles theta
and phi in the LC attribute object corresponding to the desired LC orientation. In LCD.fsp, we start with a plane
wave polarized at 45 degrees in the x-y plane, and use the polarization ellipse analysis group to study the change in
polarization for the transmitted light. The polarization ellipse analysis object can be found in the object library

in the far field projections section.

Results
We will look at the results for two types of LC orientation: the first with the LC director pointing along the z axis
(theta = 0, phi = 0), and the second with the director pointing along the y axis (theta = 90, pi = 0). In the first case,
the light polarized along the x and y directions will still propagate at the same velocity, so we do not see any change
in the polarization of the output light. In the second case, the light polarized in the y direction will propagate at a
different velocity than x, and we will see a change in the polarization as a result of the difference in phase between
the two components. This phase difference is directly proportional to the thickness of the LC layer:

2 phDn
Df =
l

To determine the optimal thickness required to change the polarization by 90 degrees (ie. from 45 degrees to -45
degrees), we set up a parameter sweep project to sweep the thickness of the LCD layer from 2 to 3 microns, and
track the ellipticity (ie. the ratio between the major and minor axis) as a function of this change. The result of the
parameter sweep is shown below (you can see this by right-clicking on the sweep project, and selecting Visualize-
>ratio) .We can see that the optimal thickness is around 2.75um.

2003 - 2016 Lumerical Solutions, Inc


Applications 1955

l
h= = 2.75 mm
This is the expected result for
D f = p , since 2Dn .

8.1.5.4.2 Tw isted Nematic LCD

Introduction
In this example, we will model a Twisted Nematic LCD (TN-LCD). For a simple uniaxial LCD, see Simple LCD 1953 .

Solvers 101

FDTD
Associated files
LCD_twist.fsp
LCD_twist.lsf
LCD_twist_analysis.lsf
See also
LC rotation 263
Simple LCD 1953
Tuning of SOI ring resonator 1956

Optical switch 1959


Optical phased array 1962

Simulation setup
When no voltage is applied across the TN-LCD, the liquid crystals are oriented in a twisted configuration, and the LC
director makes a homogeneous turn of 90 degrees from the bottom surface of the LC layer to the top. As the light
enters the LC with a polarization parallel the bottom director (x axis in this example), the linear polarization of the
light will roughly follow the rotation of the director, and as a result the light transmitted will be polarized in the y
direction. When a voltage is applied, the external electric field forces the LC director to become homogeneous and
parallel to the propagation direction, and there will be no change in the polarization state of the light.

2003 - 2016 Lumerical Solutions, Inc


1956 Lumerical Knowledge Base

To model the 90 degree twist in the LC orientation in FDTD Solutions, we will use an anisotropic material combined
with a LC import grid attribute. The script LCD_twist.lsf sets up the LC orientation in the helical twist
configuration, as can be seen in the file LCD_twist.fsp. We start with a plane wave source that has the same
polarization as the bottom LC director (along the x axis), and use a 2D DFT monitor to track the change in
polarization of the light as it propagates through the TN-LCD .

Results
Here, we can define the polarization (at each point along z) by the TE fraction:
2
Ex
2 2
Ex + Ey
The script LCD_twist_analysis.lsf plots the "TE fraction vs z" in the TN-LCD layer:

When operating in a real situation, the TN-LCD layer will be sandwiched between two polarizers (with a 90 degree
polarization difference). Without an external field, the light will go through a 90 degree polarization change in the
LCD layer and will therefore be allowed to pass through the top polarizer (hence the ON state). When an external
field is applied, the crystal will become aligned with the field, and as a result, there will be no change in the
polarization of the incident light, and the top polarizer will not allow any light through (hence the OFF state).

8.1.5.4.3 Tuning of SOI Ring Resonator

Introduction
In this example, we will model tuning of an SOI ring resonator filter using liquid crystals (LCs).

2003 - 2016 Lumerical Solutions, Inc


Applications 1957

Solvers 101

FDTD
VarFDTD
Associated files
LC_ring_resonator.fsp
LC_ring
resonator_setup.lsf
LC_waveguide.lms
See also
LC rotation 263
Simple LCD 1953
Twisted nematic LCD 1955
Optical switch 1959
Optical phased array 1962
Related publications
W. D. Cort, J. Beeckman, T. Claes,
K. Neyts, and R. Baset, "Wide
tuning of silicon-on-insulator ring
resonators with a liquid crystal
cladding" Opt. Lett. Vol. 36, No. 19,
pp. 3876-3878 (2011)

W. D. Cort, J. Beeckman, R. James,


F. A. Fernandez, R. Baets, and K.
Neyts, "Tuning silicon-on-insulator
ring resonators with in-plane
switching liquid crystal" J.Opt. Soc.
Am. B Vol. 28, No. 1, pp. 79-85
(2011)

Simulation setup
The ring resonator covered with LCs is considered here. The evanescent tail of the propagating mode outside the
waveguide feels different refractive index depending on the direction of LCs, which result in the change of the effective
index of a mode. By modifying the mode effective index, we can tune the resonant wavelength of the ring resonator.

The script file LC_ring resonator_setup.lsf sets up the distribution of LC orientations. Then you can set up
the distribution of LC orientations. The variable "alignment" in the script file controls the orientation. If you set
"alignment=0" or "alignment=1", the LCs align along the waveguide or align vertically, respectively. The ordinary
index no and extraordinary index ne of the LC is, respectively, no =1.53 and ne =1.71.

Results
To calculate the change of the effective index for different LC orientations, we also prepare MODE Solutions
simulation file LC_waveguide.lms. In the material database in this simulation file, we define LC materials named
LC_x, LC_y and LC_z where the LC is aligned x-, y-, and z- axis, respectively. The figure below shows the mode
profile for x-aligned LC and we can see that there exists electric field distribution outside the waveguide. When the
orientation of LCs which cover the waveguide is changed, the evanescent field feels different refractive index, which
results in the change of the effective index of a waveguide mode.

2003 - 2016 Lumerical Solutions, Inc


1958 Lumerical Knowledge Base

Using MODE Solutions, we can also calculate effective indices and evaluate the amount of the change of the
effective index for different LC orientations. The figure below shows the effective indices for the fundamental TE
modes for different LC orientations together with those for isotropic materials with no and ne.

The figures below show the transmission of the drop and through port for different LC orientations. After setting up
the LC orientation using the script file LC_ring resonator_setup.lsf and running the simulation
LC_ring_resonator.fsp, you can use Visualizer to plot these figures. The left figure below shows the
transmission when LCs are aligned along the waveguide and the right figure shows the transmission when LCs are
aligned vertically. As we can see, the resonant wavelength around 1.55 m shifts by 10nm, from 1550nm to 1540nm.

2003 - 2016 Lumerical Solutions, Inc


Applications 1959

8.1.5.4.4 Optical Sw itch

Introduction
In this example, we will model a directional coupler based optical switch using liquid crystals (LCs).

2003 - 2016 Lumerical Solutions, Inc


1960 Lumerical Knowledge Base

Solvers 101

FDTD
Associated files
LC_optical_switch.fsp
LC_optical_switch.lsf
See also
LC rotation 263
Simple LCD 1953
Twisted nematic LCD 1955
Tuning of SOI ring resonator 1956

Optical phased array 1956


Related publications
G. Ntogari, D. Tsipouridou, and E. E.
Kriezis, "A numerical study of optical
switches and modulators based on
ferroelectric liquid crystal" J. Opt. A:
Pure Opt. Vol. 7, pp. 82-87 (2005)

Simulation setup
A directional coupler based optical switch is considered in this example. Two identical single-mode slab polymeric
waveguides sandwiches an LC layer which control the level of coupling between the waveguides. Fundamental TE
mode (Electric field has y component Ey) is injected into waveguide 1 as shown below. The level of coupling is
adjusted by the orientation distribution of the LCs. Ferroelectric liquid crystals with the the ordinary index no =1.462
and the extraordinary index ne =1.546 is assumed in this example.

When the LC orientations are distributed as the "state1" as shown right below, the electric field Ey feels smaller
index averagely and the light guidance into LC region is reinforced, which means weak coupling between two
waveguide. Due to the weak coupling, the light injected into the waveguide 1 can propagate in the waveguide 1 for a
long distance, which can be used as a bar state. On the other hand, when the the LC direction is distributed as
show in the "state2" below, the electric field Ey feels larger index averagely and the light leakage into LC region is
promoted, which means strong coupling between two waveguide. Due to the strong coupling, the light can travel
between the waveguide back and forth in a shot distance, which can be used as a cross sate.

2003 - 2016 Lumerical Solutions, Inc


Applications 1961

If you run the script file LC_optical_switch.lsf on the script editor of simulation file
LC_optical_switch.fsp, you can set up the LCs orientation. The variable "state" in the script file controls the
LC state. If you set "state=1" or "state=-1", then you can set up "cross state" or "bar state", respectively.

When we choose "state=1", i.e. the cross state, the angle linearly increases toward the center of the LC region,
and then linearly decreases toward the end of the other side.On the other hand, when we choose "state=-1", i.e. the
bar state, the angle linearly decreases toward the center of the LC region, and then linearly increases toward the
end of the other side as shown in the figure below.

Results
The figures below show the field distribution in the waveguide. The left ant the right is the distribution of |Ey| for cross
and bar state, respectively.

2003 - 2016 Lumerical Solutions, Inc


1962 Lumerical Knowledge Base

Cross state Bar state

The movies below show the pulse propagation for both states.
Cross state Bar state

8.1.5.4.5 Optical Phased Array

Introduction
In this example, we will model an optical phased array using liquid crystals (LCs).

2003 - 2016 Lumerical Solutions, Inc


Applications 1963

Solvers 101

FDTD
Associated files
LC_phased_array.fsp
LC_phased_array.lsf
See also
LC rotation 263
Simple LCD 1953
Twisted nematic LCD 1955
Tuning of SOI ring resonator 1956

Optical switch 1959


Related publications
X. Wang, B. Wang, P. J. Bos, J. E. Anderson, J. J.
Pouch, and F. A. Miranda, "Finite-difference time-domain
simulation of a liquid-crystal optical phased array" J.
Opt. Soc. Am. A Vol. 22, No. 2, pp. 346-354, (2005)

Simulation setup
Beam steering using LC optical phased array is considered in this example. The figure above shows the model of the
phased array in FDTD Solutions. In this model, the orientations of the LCs rotate anti-clockwise from the bottom to
the top as a function of y. Due to the change of the LC orientation, the light passing through the LC region feels
different refractive index depending on the position y, which results in an optical path length difference as shown blow
at the exit surface. As a result, the phase from is tilted and the beam steering can be achieved.

2003 - 2016 Lumerical Solutions, Inc


1964 Lumerical Knowledge Base

Results
A pulse propagation in LC phased array when a Gaussian beam is injected is shown below. We can see that the
light propagates with varying velocity as a function of y and the tilted wavefront at the exit surface.

Applying far field transformation to the power monitor located just in front of the exit surface, which is named far field
in the simulation file, we can get the angular distribution of far field intensity at 1m away from the device. The result
is show below and we can see that the beam is steered about 0.8 degrees in this case.

2003 - 2016 Lumerical Solutions, Inc


Applications 1965

8.1.5.5 Optical Polymer Curing


Objective
This page provides a simple example that describes how to simulate a polymer curing process where the refractive
index of the polymer changes as a beam propagates through it.

As light propagates through the polymer, a small fraction of power is absorbed, which changes the refractive index.
The changing index affects the beam propagation, which in turn alters the absorption profile. A series of FDTD
simulations are required to simulate this system.

Solvers 101

FDTD
Associated files
polymer_curing.fsp
polymer_curing.lsf

See also
Material science 215
User Guide - Materials 215
Import object - n,k material 492

Simulation setup
The primary assumption required by this technique is that the time scale of the curing process is many orders of
magnitude slower than 1/f. If this assumption holds, then the material properties change much slower than the time
it takes any one photon to pass through the device. This allows us to approximate the system with a series of
simulations with fixed refractive index profiles. The absorption profile from one simulation is used to update the
refractive index profile for the next simulation, and so on.

In this example, we assume a very simple curing process. The index increases linearly with the absorbed power.
Initially, the index is 1.5, and it can increase to a maximum of 1.6. Obviously real materials will have more complex
behavior, but the basic idea is the same.

2003 - 2016 Lumerical Solutions, Inc


1966 Lumerical Knowledge Base

To reproduce these results, open the simulation file and run the script. It will run a series of 5 simulations and create
the following figures. Initially, the index of the polymer is 1.5 everywhere. By the end of the simulation, the index
has increased to 1.6 at the center of the beam.

Refractive index |E|^2 Absorption

2003 - 2016 Lumerical Solutions, Inc


Applications 1967

Note: Time step size


It's important to use a time step size sufficiently small to ensure good convergence. In this example, we only use
5 time steps (dt=0.25) to keep the example quick. If the number of time steps is increased to 11 (dt=0.1), the
results will change by 5-10%. However, increasing the number of time steps further does not have a significant
effect on the results, suggesting that 11 points is sufficient.

Note: Symmetry
The recommended procedure for using symmetry boundary conditions is to draw the entire physical structure, even
if only 1/4 of the structure will actually be simulated.

In this example, you will notice that the polymer object is only defined in 1/4 of the volume. This is slightly unusual
and not generally recommended. We decided to draw only 1/4 of the polymer so the index profile was clearly
visible from the main CAD viewports. It also makes the simulation file smaller, since we only need to store the
material properties in 1/4 of the volume.

If you choose to draw only one quarter of your device when using symmetry boundaries, it is very important that
the structure extend at least 1 full mesh cell beyond the symmetry boundary. This is required for the symmetry
boundaries to function properly. In this example, if you look closely, you will see the polymer extends 0.5um
beyond the planes of symmetry.

Note: Conformal mesh


The default conformal mesh setting is used for this simulation. However, the material properties used for the
polymer are imported as a function of x,y,z using an (n,k) import object and are meant to represent an index that
varies continuously as a function of space. In this type of (n,k) import object, there is no interface and so the
conformal meshing is not applied, except at the interfaces between objects such as the fiber core and cladding.
For this reason, very similar results can be achieved using the staircase meshing.

8.1.5.6 Optical Tweezers


A highly focused laser beam can apply a small force on micro- and nano-particles. The resultant force depends on
the laser beam parameters and the size, shape and refractive index of the particle, and the location of the particle
within the beam. This photonic force is used in applications such as optical tweezers, levitation of particles and near-
field scanning optical microscopy. The Optical force analysis objects can be found in the Object library under the
Advanced analysis category.

Getting started
Download a free trial of FDTD Solutions
Download free trial

Watch a product introductory video


FDTD Solutions

2003 - 2016 Lumerical Solutions, Inc


1968 Lumerical Knowledge Base

Advanced analysis and examples


Maxwell stress tensor technique 1968

Volumetric technique 1969

Particle force (2D) 1971

Particle motion (2D) 1973

Particle force 1975

Force on a wall 1976

8.1.5.6.1 Maxw ell Stress Tensor

Introduction
This page shows how to calculate the photonic force on a particle from the Maxwell Stress Tensor (MST).

Solvers 101

FDTD
Associated files
tweezer.fsp

See also
Optical tweezers 1967
Particle force (2D) 1971
Particle motion (2D) 1973
Particle force 1975
Force on a wall 1976
Related publications
Rockstuhl and Herzig, J. Opt. A: Pure Appl.
Opt. 6 (2004) p. 921
Jackson, Classical Electrodynamics, p. 239

The time averaged force F on a particle due to harmonic fields may be calculated from the Maxwell Stress Tensor
(MST). The net force can be found by integrating the MST over a closed surface surrounding the particle. We use a
box of power monitors ( four 1D monitors in 2D simulations, six 2D monitors in 3D simulations) to record the fields
on this surface.
F = 12 Re (Tab n b )
S b
,
where the elements of the Maxwell stress tensor for harmonic fields are given by
r2 r2
Tab = eEa E *b + mH a H *b - 12 d ab e E + m H
,
and n , is the unit normal of S.

The tweezer.fsp simulation contains an analysis group named optical_force_2D. This analysis group can
be inserted from the Object library in the Advanced analysis category. The analysis group contains four identical
subgroups, whose analysis scripts calculate the components of the stress tensor from the simulation. The analysis
script of the main group integrates the stress tensor to provide the total force on the particle.

Note: MST vs Volumetric technique

2003 - 2016 Lumerical Solutions, Inc


Applications 1969

The optical force can be calculated with either the MST or Volumetric analysis groups. The two techniques give
the same result within numerical error, but each has its own strengths and weaknesses.

- Memory
The MST technique requires less memory because it only collects field data on the surface of the box.

- Numerical noise
The Volumetric technique is less sensitive to numerical noise, making it the better choice when the force is very
small (small index contrast, very tiny particles).

-Mesh
The Volumetric technique is sensitive to the number of mesh points. The results become less reliable if the mesh
is too coarse.

8.1.5.6.2 Volumetric Technique

Introduction
This page shows how to calculate the photonic force on a particle by calculating the force per unit volume and
integrating over the entire volume to obtain the total force.

Solvers 101

FDTD
Associated files
tweezer.fsp

See also
Optical tweezers 1967
Particle force (2D) 1971
Particle motion (2D) 1973
Particle force 1975
Force on a wall 1976
Related publications
Rockstuhl and Herzig, J. Opt. A: Pure Appl.
Opt. 6 (2004) p. 921
Jackson, Classical Electrodynamics, p. 239

The force on a charged particle in the presence of an electric and magnetic field is given by
r r r r
F = qE + qv B
where q, v, E, and B are, respectively, the charge, velocity, electric field and magnetic field.

In a medium with charge per unit volume and current density, the force per unit volume is given by
r r r r r r r
Fv = rE + rv B = rE + J B
where r is the total charge per unit volume and J is the total current density. These quantities are given by
r r
r = e 0 E
r
r P
J =-
t
where P is the polarization.

In Lumerical's FDTD solver, all the material properties are included in the permittivity. As a result there is no free
r r
current density and no free charge, therefore D = 0 . This is an arbitrary choice without physical consequence.

For example, in a conductor with conductivity s, it is possible to solve Maxwell's equations using a relative

2003 - 2016 Lumerical Solutions, Inc


1970 Lumerical Knowledge Base

r r
permittivity of 1 and a free current density of J = sE . It is physically equivalent, however, to solve a system with no
er = 1+ i s
we 0
free current and relative permittivity of . Both methods will give the same physical results.
r r r r
P ( w ) = e i wt P (t )dt J ( w ) = i w P (w)
In the frequency domain, and with Lumerical's sign convention of , we have
the final expression for the force per unit volume is therefore given by
r r r r r r
(
Fv = e 0 E
r r
)Er + i wP B r r
(
= e0 E )E + i w ( e - e ) E B
0

In a medium with a background index that is not 1, it is most numerically efficient and accurate to get the net optical
force that will result in motion of the particle by rescaling the background permittivity, yielding a final equation
r r r r r r
( )
Fv = e b e 0 E E + i we 0 ( e r - e b ) E B
where eb is the background relative permittivity, and er is the relative background permittivity throughout the volume.

Note that the equation for net force without rescaling with the background permittivity will give the total force on the
volume including force on the background material which does not result in motion of the particle.

The volumetric technique is typically more accurate because many interpolation errors can be avoided. However, it
can require a significant amount of memory because the electromagnetic fields and the permittivity must be recorded
throughout the volume.

Note: MST vs Volumetric technique


The optical force can be calculated with either the MST or Volumetric analysis groups. The two techniques give
the same result within numerical error, but each has its own strengths and weaknesses.

- Memory
The MST technique requires less memory because it only collects field data on the surface of the box.

- Numerical noise
The Volumetric technique is less sensitive to numerical noise, making it the better choice when the force is very
small (small index contrast, very tiny particles).

-Mesh
The Volumetric technique is sensitive to the number of mesh points. The results become less reliable if the mesh
is too coarse.

2003 - 2016 Lumerical Solutions, Inc


Applications 1971

8.1.5.6.3 Particle Force (2D)


The following example shows how to calculate the photonic force from FDTD Simulations. The optical force is
calculated by integrating the Maxwell Stress Tensor over a closed boxed that surrounds the particle.
Solvers 101

FDTD
In this topic
Simulation setup 1971

Force on particle 1971

Force vs position 1972

Associated files
tweezer.fsp
tweezer_position.lsf

See also
Optical tweezers 1967
Maxwell stress tensor 1968
Particle motion (2D) 1973
Particle force 1975
Force on a wall 1976
Related publications
Rockstuhl and Herzig, J. Opt. A: Pure Appl.
Opt. 6 (2004) p. 921
Jackson, Classical Electrodynamics, p. 239

Simulation setup
Consider a Gaussian laser beam with wavelength =1000nm with NA=0.7, focused on to a dielectric rod in 2D with
radius r=40nm and refractive index n=1.5. The background index is 1. The rod is located at (x,y) = (0,-100nm)
relative to the center of the focused Gaussian beam.

Four 1D field profile monitors are used to define the closed surface S. An additional 2D field profile monitor is used
to observe the focused laser beam path.

The analysis script located in the optical force MST analysis group integrates the stress tensor to provide the total
force on the particle. The optical force MST analysis group contains four subgroups which are used to calculate the
components of the stress tensor from the simulation.

Force on a particle
After running the simulation, the field profile can be plotted with the following script commands:
x=getdata("field","x");
y=getdata("field","y");
E2=getelectric("field");
image(x*1e6,y*1e6,E2,"x (um)","y (um)","E2");
The following figures show the field profile for simulations without and with the dielectric rod. The first figure, without
the rod, shows the beam has a focal point at x=0, Y=0. The second figure shows the field when the rod is present.

2003 - 2016 Lumerical Solutions, Inc


1972 Lumerical Knowledge Base

The light is seen to refract through and reflect off the rod. This small change in photon momentum applies a force to
the rod. Using the field data collect by the monitors forming the closed surface S, we can calculate the components
of the Maxwell Stress Tensor and then integrate the components normal to S over the surface.
F= getresult("optical force MST","F_total");
?F.F_totalx;
?F.F_totaly;
result:
3.9735e-021
result:
2.04787e-021

We can run the same analysis script on the simulation without the sphere. In principle, the force should be zero,
but the simulation will always measure a non-zero force due to numerical errors. Running a reference simulation
without a particle is a good way to estimate the numerical error, since you know the force should be zero. The
Volumetric technique for measuring optical force tends to have smaller numerical errors than the MST technique.

Force vs position
To calculate the optical force as a function of x position relative to the focal point of the beam, run the script file
tweezer_position.lsf. The particle is offset by -50nm in the Y direction. This script actually changes the
beam focal point, rather than the rod position. This technique of modifying the source focal point is more efficient
since the simulation X span can be kept small. The following figure will be created.

The negative slope of the force vs position data near X=0um suggest the presence of a stable trapping region.

2003 - 2016 Lumerical Solutions, Inc


Applications 1973

NOTE: Accuracy of the Maxwell Stress Tensor


Calculating the net force on a particle with the Maxwell Stress Tensor involves taking the difference of very large
numbers to get a very small number. Such calculations are numerically difficult because of the limited precision of
floating point numbers used to represent the electromagnetic fields in the simulation. The Volumetric technique is
less sensitive to numerical errors, but will require more memory when running the simulation.

NOTE: Focused Beams


These simulations use a highly focused beam with a focal point that may not be at the source injection plane.
This can lead to source field profiles that have a large Y extent. If the field does not decay to zero at the edge of
the source, the beam profile will be truncated. The field profile can be seen by editing the source properties and
selecting the Beam options Tab. Click on the Show/Refresh button to view the field profile. As the distance from
focus parameter is increased, the Y extent of the beam will increase significantly. To ensure that the simulations
are accurate, the Y extent of the simulation region may need to be increased to ensure the beam is correctly
injected.

8.1.5.6.4 Particle Motion (2D)

Introduction
We continue to use the example from the previous section to calculate the dynamic motion of the rod. The previous
example showed how to calculate the force on a particle. Once the force on the rod at a particular position is
known, it is possible to determine the rod motion as a function of time.

Solvers 101

FDTD
In this topic
Introduction 1973
Simulation setup 1973

Analysis 1973
Results 1974
Associated files
tweezer.fsp
tweezer_motion.lsf

See also
Optical tweezers 1967
Maxwell stress tensor 1968

Particle force (2D) 1971


Particle force 1975
Force on a wall 1976

Simulation setup
The simulation volume needs to be slightly modified. In the previous simulations, the beam focal point was changed,
rather than actually moving the rod. This was more efficient for scanning over a large range of X positions because
the simulation volume could be kept small. In these simulations, we will leave the focal point fixed, and actually
move the rod.

The script tweezer_motion.lsf will make the necessary modifications before starting the simulation.

Analysis
The following equations are used to calculate the rod motion resulting from the optical force.

2003 - 2016 Lumerical Solutions, Inc


1974 Lumerical Knowledge Base

r r r
F = mA - tV
r r r
V = V0 + At
r r
X = X 0 + V0t + 12 At 2

The first simulation gives the initial force on the rod. Once the force is known, acceleration is easily calculated.
Assuming constant acceleration for a short period of time, we can calculate the future position of the rod. At this
point, another simulation is run, calculating the force on the rod at this new position. Once again, the acceleration
and future position can be calculated. This process can be repeated as many times as required.

Results
Open tweezer.fsp and run tweezer_motion.lsf. The script will first modify the simulation region as
described above. It then runs a series of simulations. The rod position at time step i+1 is calculated from the time
step i position, velocity, and force. The following figures will be generated, showing the particle position and force
as a function of time.

The rod is trapped at a point 0.4um in front of the focal point of the beam.

Once tweezer_motion.lsf is complete, we can watch the particle motion as a function of time in the GUI with
the following script commands.
# recreate particle motion in GUI
setview("extent",view);
for (i=1:length(T)) {
switchtolayout;
select("circle");
set("x",X_t(i,1)+focal_point);
set("y",X_t(i,2));
pause(0.3);
}

2003 - 2016 Lumerical Solutions, Inc


Applications 1975

8.1.5.6.5 Particle Force


The following example shows how to calculate the photonic force on a spherical particle illuminated by a plane wave.
We expect a 1/w^4 force dependence.

Solvers 101

FDTD
In this topic
Simulation setup 1975

Force on particle 1975

Associated files
tweezer3D.fsp
tweezer3D.lsf

See also
Optical tweezers 1967
Maxwell stress tensor 1968
Particle force (2D) 1971
Particle motion (2D) 1973
Force on a wall 1976

Simulation setup
A TFSF source is used to simulate a plane wave incidence upon the sphere. The wavelength range is 400-1500nm.
The dielectric sphere has an index of 1.1 and a radius of 40nm. The background index is 1. A mesh override region
forces a 10nm mesh around the sphere, monitors and source. In this simulation, we use the volumetric optical force
analysis object because the forces generated in this simulation are near the limit of the MST technique. The
optical_force analysis objects can be inserted from the Object library under the Advanced analysis section.

Force on a particle
When the simulation is finished, you can plot the force on the particle as calculated by the optical force volumetric
analysis object. The following figure will be created.

From the symmetry of the system, we expect that Fx and Fy (the force in the X and Y directions) is zero. The force
should only be in the + Z direction, and it should have a strong frequency dependence (1/w^4). The simulation
confirms these points. Use the associated script file to confirm the w^4 dependence. The script file will also plot the

2003 - 2016 Lumerical Solutions, Inc


1976 Lumerical Knowledge Base

force as calculated with the MST analysis object. The result is clearly less linear. This discrepancy is due to the
fact that the force generated in this example is near the numerical limit of the MST technique. For situations with
larger forces (ie. a larger particle, or larger index contrast), the volumetric and MST techniques should agree.

8.1.5.6.6 Force on a Wall

Introduction
We have calculated the optical force on a particle in the previous examples. In this example, we will look at the
optical force on a metal wall as well as a dielectric wall and compare the results to the easily calculated theoretical
predictions to further confirm the validity of this technique.

Solvers 101

FDTD
In this topic
Introduction 1976
Simulation setup 1976
Analysis and Results 1977

Associated files
force_wall.fsp
force_wall.lsf

See also
Optical tweezers 1967
Maxwell stress tensor 1968
Particle force (2D) 1971
Particle Motion (2D) 1973
Particle force 1975

Simulation setup
A planewave source with wavelength 0.5 um is used. The metal wall is simulated as a perfect electric conductor.
The background index is 1. A box of two 2D power monitors are used to define the closed surface S. The reason for

2003 - 2016 Lumerical Solutions, Inc


Applications 1977

this is that periodic boundary conditions are used and all of the light is assumed to eventually either reflect back to
transmit through.

The analysis script located in the optical_force_slab analysis object integrates the stress tensor to provide the total
force on the particle. There are two analysis groups contained in the optical_force_slab analysis group (one for each
of the two z power monitors) which are used to calculate the stress tensor.

Analysis and Results


When the simulation is finished, run force_wall.lsf to run the analysisgroup and calculate the optical force on
the wall at 0.5 um. Note that the power monitor above the conductor wall will have zero reading because no light is
supposed to be transmitted through the perfect conductor.

The force_wall.lsf script also calculates the theoretical prediction of the same force. For a perfect metal slab,
the reflection coefficient is 1.
In every second, the source emits N photons each with energy E and momentum p, for a total power of P.

P P
N= = ,
E hn
r h nh
p= =
l l0
(Note that this momentum is the Minkowski or canonical momentum which is appropriate for the calculation of
optical force, for details see http://rsta.royalsocietypublishing.org/content/368/1914/927.full.)

The force on the wall is equal to the change in the momentum of all the photons. Since the photons hit the wall and
return with the same speed, the change in their momentum is 2p:

r Pl nh 2nP
F = 2 Np = ( 0 ) 2 ( ) =
hc l c

Once the script is run, both the theoretical and FDTD analysis method results are calculated. The values are in
agreement as expected.

The same procedure can be carried out for a dielectric wall. The only difference in this case is that not all the
photons are reflected back, and so both of the power monitors above and below the wall will have non zero readings.

The reflection coefficient of the dielectric is extracted from the Fresnel equations. The fraction of the intensity of the
reflected field to that of the incident field can then easily be calculated:

2003 - 2016 Lumerical Solutions, Inc


1978 Lumerical Knowledge Base

nair - nwall
R=
nair + nwall

2 pd wall nwall
4 R sin 2 ( )
Ir l
=
I i (1 - R) 2 + 4 R sin 2 ( 2 pd wall nwall )
l

The force is then:

2P I r
F=
c Ii

Edit the rectangle object so that the material is a user defined dielectric with index 1.5. In the script, the variable
PEC to 0 and rerun the script. Again the analysis group results and the theoretical results are in agreement as
expected.

8.1.5.7 Thermal Emission


Objective.
This page provides provides a set of simple example files that demonstrate how thermal emission can be simulated
with FDTD Solutions.

Solvers 101

FDTD
Associated files
thermal_emission.fsp
thermal_emission.lsf

See also
Monitors and analysis groups 668

References
David L. C. Chan, Marin Solja?cic and J. D.
Joannopoulos, "Thermal emission and design
in 2D-periodic metallic photonic crystal slabs,"
Optics Express, Vol 14, 8785-8796 (2006).
http://dx.doi.org/10.1364/OE.14.008785

Thermal emission simulation based on Kirchhoff's law


The simulation methodology is based on Kirchhoffs law which states that the absorptivity and emissivity are equal
when a system is at equilibrium. We calculate the absorption of the system with the FDTD simulation, then
calculate the thermal emission as a post-processing step by using Kirchoff's law.

Here, we calculate the thermal emission of periodic structure consisting of a tungsten slab and a dielectric slab with
a periodic array of holes. The emission is calculated for hole periods of 2um and 3um. The thickness of the tungsten

2003 - 2016 Lumerical Solutions, Inc


Applications 1979

slab is chosen as 1.0a while the thickness of the dielectric is chosen as 0.2a with holes of radius 0.4a. In this
simulation, we use a linearly polarized plane wave as an incident wave, although in the actual situation the thermally
emitted light is unpolarized. Regarding with how to perform simulation for unpolarized incident wave, please see the
"Unpolarized beam" page. We study the thermal emission which is radiated into the perpendicular direction to the
periodic structure.

The Multi-coefficient material model gives an accurate material fit over a large wavelength range, allowing us to
collect very broadband results from a single simulation.

To calculate absorptivity, i.e. emissivity, we put 2 power monitors located above and below the structure, and
calculate the power absorbed in the region between the monitors. The left figure below shows the emissivity for
periods a=2 m and 3 m. The thermal emission spectrum can be obtained by multiplying the emissivity by the black
body emission spectrum. They are shown in the right figure below together with the blackbody spectrum.

Emissivity Thermal emission spectrum

2003 - 2016 Lumerical Solutions, Inc


1980 Lumerical Knowledge Base

To reproduce these results, run the script file thermal_emission.lsf. It will run 2 simulations (one for a=2 m and the
other for a=3 m) and create figures of the above results. Details of the thermal emission calculation can be found in
the "thermal emission" analysis group.

8.1.5.8 Electron Beam Spectroscopy


Introduction
In this example, we look at the scattering spectrum of light from an electron beam.

Solvers 101

FDTD
Associated files
sp_ebeam.fsp
sp_ebeam.lsf

Related publications
Pratik Chaturvedi et al,
"Imaging of Plasmonic
Modes of Silver
Nanoparticles Using High-
Resolution
Cathodoluminescence
Spectroscopy", ACS Nano
3 (10), 2965-2974 (2009)

Pabitra Das and Tapas


Kumar Chini, "Spectroscopy
and Imaging of Plasmonic
Modes Over a Single
Decahedron Gold
Nanoparticle: A Combined
Experimental and Numerical
Study", The Journal of
Physical Chemistry C 116
(49), 25969-25976 (2012)

Pabitra Das, Tapas Kumar


Chini, and James Pond,

2003 - 2016 Lumerical Solutions, Inc


Applications 1981

"Probing Higher Order


Surface Plasmon Modes on
Individual Truncated
Tetrahedral Gold
Nanoparticle Using
Cathodoluminescence
Imaging and Spectroscopy
Combined with FDTD
Simulations", The Journal of
Physical Chemistry C 116
(29), 15610-15619 (2012)
See also
nonorm 1598

Creating the ebeam source


A screenshot of sp_ebeam.fsp is shown above. The simulation consists of a gold particle on a glass surface. The
electron beam is represented by a series of dipoles with phase delay that is related to the electron velocity. Note
that, we are simulating a single electron (as you can see in the movie). The actual experiment is a continuous beam,
our results can be scaled by the beam intensity. The current density due to the electron is given by
r r
J (t , r ) = -evu z d ( z - vt) d ( x - x0 ) d ( y - y0 )

where e is the electron charge and v is the velocity of the electron. In the frequency domain, this corresponds to a
current density of

r r - i wz
J ( w , r ) = ev 2u z exp d ( x - x0 ) d ( y - y0 )
v

This current density can be simulated by using a large number of closely space dipoles along the electron trajectory,
of the form

r r p i wz
p ( w , r ) = 0 u z exp
iw v

Since the system is linear, we can study a system of dipoles of the form

r r i wz
p ( w , r ) = p0u z exp
v

and multiply the electromagnetic fields by a factor of 1/iw during the post processing phase. We will not be
concerned with the overall normalization factor p0. In the time domain, we can create the desired sources by
delaying the source pulses by z/v.

In the absence of any structure, similarly to how a constant DC current through a wire will not produce any radiation,
the electron beam will not generate any radiation because it is moving at a constant velocity. In FDTD, we are
obliged to simulate only a finite portion of the electron path and the sudden appearance and disappearance of the
electron will generate radiation. To minimize this problem, a raised-cosine filter is introduced to turn on and off the
dipoles' amplitude gradually. We are also running a reference simulation (without the nanoparticle and substrate) to
subtract anything that can potential obscure the signal from the nanoparticle. Although this makes the analysis
slightly more complex, we can calculate the electromagnetic fields at frequency w by taking the difference in fields
between the simulations, using sp_ebeam.lsf. To get an accurate difference, we must force the simulation mesh
to be exactly the same with and without the structure. For this reason, we use mesh override regions over all the

2003 - 2016 Lumerical Solutions, Inc


1982 Lumerical Knowledge Base

structures.

Setup scripts
We use a setup script contained in the ebeam group to create all the sources with the correct pulse delays and
positions. In this example, we use an electron velocity of 0.2*c. A raised-cosine filter is also introduce to gradually
turn on and off the dipoles.

Results
To reproduce the plots below, open the sp_ebeam.fsp simulation and run the sp_ebeam.lsf script file. The
script file will run two simulations, take the difference in electromagnetic fields and calculate the scattering
spectrum. This means that it will calculate the total power scattered into the upper z half space due to the presence
of the gold particle and substrate.

Note that the CW normalization with a large number of sources leads to a variety of complications. Instead, we use
the no normalization 1598 state, and remove the spectrum of the source pulse by calculating the sourcenorm for a
single source pulse, rather than a sum of all the dephased source pulses.

The total scattering


into the upper half-
space.
Transmission has
been normalized by
the maximum value.

Poynting vector at
the first peak
wavelength.

2003 - 2016 Lumerical Solutions, Inc


Applications 1983

Angular distribution
of the electric field
intensity in the far
field calculated at
the first peak
wavelength.

Movie of simulation.
A number of
interesting
phenomena are
visible, including:

-We can see the


strong influence of
the nanoparticle on
the scattering
direction as well as
on the scattering
spectrum

- The width of the


pulse gives some
indication about the
spatial extent of the
e-beam field profile.

- Injection errors
that occur at the
beginning and end
of the simulation.
These errors exist
because we only
inject a finite length
portion of the
electron beam and
are already
minimized using a
filter to control the
dipoles' amplitude.

Convergence testing
This example was run with a mesh size of only 10nm. Some convergence testing should be done. Typically, a mesh
size of 1-5 nm is required to obtain acceptable accuracy for gold nanoparticles in this wavelength range. The z span
is also important in convergence testing where the injection error can be further reduced for longer z span.

2003 - 2016 Lumerical Solutions, Inc


1984 Lumerical Knowledge Base

8.2 Metamaterials
Motivation
Natural materials exhibit only a small part of electromagnetic properties which are available in theory. Researchers
have made great efforts to explore new materials that are having some specific desired properties. Electromagnetic
metamaterials are artificially engineered materials that are designed to interact and control electromagnetic waves at
the beginning of the new era. "Meta" in Greek means "beyond", or "higher", "alerted", or "changed". That says,
metamaterials are not found in nature. However, they are composed of natural materials. The designers' role is to
engineer the composite "atoms" of the metamaterials from natural materials with different shapes or structures. In
most cases, metamaterials are composed of sub-wavelength, periodic structures. The goal of many metamaterial
simulations is to design and measure the effective material properties of these devices. The operation frequency
range can be at RF, microwave 1997 , terahertz 1995 (THz) and optics 1999 .

Photonic metamaterials are periodic optical nanostructures often composed of metallic elements on a dielectric or
semiconducting substrate, where the period is shorter than the wavelength of light. They are of large scientific
interest as the dielectric response of those materials can be engineered through semiconductor manufacturing to
yield interesting physical phenomena at optical wavelengths.

Effects of interest include realizing synthetic optical structures with an effective negative index of refraction, resulting
in so-called negative refraction. Negative refraction can be used to realize superlenses which offer enhanced spatial
resolution beyond that available via diffraction-limited focusing. Photonic metamaterials can be used to assess split-
ring resonators and optical antennas that can be designed to efficiently capture and emit optical radiation.

Simulating metamaterials
FDTD Solutions can be used to study sub-wavelength periodic and highly-diffractive optical metamaterial elements
and the interesting optical characteristics they exhibit. One can directly measure various quantities of interest,
including:
Field enhancement at different parts of the structures
Transmission and reflection spectrum
Scattering and absorption cross sections
Chirality and circular dichroism

The effective material properties are also a typical quantity of interest and can be calculated with some post-
processing of the simulation results. This includes:
S parameters
Effective material properties such as the refractive index, impedance permittivity and permeability

In addition, a combination of optical solvers and electrical solvers can be used to characterize active metamaterials.
For example, DEVICE can be used to simulate the effect of bias-induced carrier density variations on the refractive
index of the metamaterial, and FDTD Solutions can be used to calculate the corresponding optical response.

2003 - 2016 Lumerical Solutions, Inc


Applications 1985

Features
Simulate metamaterials at RF, microwave 1997 , terahertz 1995 (THz) and optical 1999 frequencies and provide
simulation results across wide bandwidths in a single calculation for 2D and 3D metamaterials
FDTD Solutions can easily calculate the power reflection, power transmission, field enhancements, resonant
frequencies and associated quality factors, and s-parameters 1987 for metamaterials
Flexible post-processing allows for the extraction of bulk/effective material properties 1989 like effective
refractive index including the negative index response of metamaterials, effective permittivity and
permeability, circular dichroism 1999 , scattering and absorption cross sections
Lumericals conformal mesh technology can provide sub-mesh cell accuracy of common materials used in
metamaterials, including perfect electrical conductors (PECs), metals, and other dispersive materials
Multi-coefficient materials (MCMs) can accurately model dispersive materials across wide wavelength
ranges
Simulate metamaterial microbolometers 2012 with FDTD Solutions and the heat transport solver in DEVICE.
Simulate active metamaterials 2005 with FDTD Solutions and the charge transport solver in DEVICE.
Built-in parameter sweep 699 and optimization algorithms 716 make it easy to analyze and optimize
parameterized designs

Getting started
Relevant videos (login required):
Metamaterials

Download relevant products:


FDTD Solutions
DEVICE

Product introductory videos:


FDTD Solutions
DEVICE

Product introductory examples:


(FDTD Solutions) Particle scattering tutorial 1724

(DEVICE) PN junction diode tutorial 2802


More ... 171

Application examples
Solver 101 Description
FDTD Bulk metamaterials 2002

FDTD Effective parameters - Smith 1990

FDTD Chiral materials - Kwon 1999

FDTD THz - metamaterial 1995

FDTD GHz - wire Pairs 1997

FDTD, Active Terahertz Resonator 2005

DEVICE
FDTD, Metamaterial Absorbers 2007

DEVICE

2003 - 2016 Lumerical Solutions, Inc


1986 Lumerical Knowledge Base

8.2.1 Methodology
This section mainly deals with simulating the the artificial "atoms" such as wire pairs and split rings of metal that
can be used to create unusual effective bulk properties, such as a negative refractive index, and we will discuss the
details of effective parameter extraction. For an example of creating bulk electric and magnetic media, please see
the bulk metamaterials 2002 example.

Solvers 101

FDTD
DEVICE
See also
S Parameter extraction 1987
Effective bulk properties 1989
Effective parameters - Smith 1990
Low frequency simulations 627

Simulation setup tips


To ensure your metamaterial simulations are setup in the most efficient manner, consider applying some of the
following techniques to your simulations. These tips are most important for devices that operate at low frequencies
(relative to optical frequencies).

Perfect metal approximation


For 3D objects at low frequencies, where metals behave in an 'ideal' fashion (100% reflection, 0% absorption), use
the Perfect Electrical Conductor (PEC) material model, rather than Sampled 3D data, Conductive 3D or other
material models. The PEC model is the most numerically efficient option since it does not require as fine of a
simulation mesh.
If your device operates at a frequency where the metal is not ideal (i.e. in visible range), then the PEC model should
not be used.

Thin layers
Some metamaterials have extremely thin layers compared to wavelength. It is possible to represent a thin layer
using a 2D rectangle or 2D polygon object and specifying the material using a conductive material model 241 .

If using a 3D object to represent the thin layer, for accurate simulation results it's important to to have at least a
couple of mesh cells to resolve the thickness of the layer. When the layer is very thin, this requires an extremely
small mesh, which significantly increases the total memory and time requirements of the simulation. In such cases,
it is possible to use a much thicker layer in your simulations. For example, if the layer is actually 1/1000 of a
wavelength thick, setup your simulation with a layer thickness of 1/10 or 1/50. This allows you to use a much larger
mesh size, without a significant loss of accuracy.

Check the default settings for low frequency simulations


The default settings in FDTD Solutions are setup for optical frequencies. If you are working at much lower
frequencies, some defaults will not be correct. In particular, check the following settings:
Units - In the Settings menu. You may want to change the units settings. For example, from THz to GHz.
Simulation time - The default value of 1000fs will not be long enough for low frequency simulations. The time
must be sufficient for the fields to decay back to zero after the source pulse.
Mesh size - In most cases, the mesh size will default to reasonable values, even for very low frequency
simulations. However, in some cases (such as copying a mesh override region from a different simulation file), it is
possible to end up with a mesh size that is unreasonably large or small.

Use periodic (or Bloch) boundary conditions


Most metamaterials are periodic, which means you only need to simulate ONE unit cell. Use periodic (if the source
is at normal incidence) or Bloch (if the source is at an angle) boundary conditions. There is no reason to simulate
multiple periods of the device when using periodic or bloch boundary conditions. If you re-run the simulation with two
unit cells, you will end up with exactly the same answer, but it will take at least twice as long to run!

2003 - 2016 Lumerical Solutions, Inc


Applications 1987

Quantities of interest
It is possible to directly measure many quantities of interest from an FDTD simulation of a metamaterial device,
including
field enhancement throughout the structure
transmission and reflection spectrum
scattering and absorption cross sections
circular dichroism

In addition, the effective material properties are often of interest. Parameter extraction is possible, but requires
additional post-processing of the simulation results. See the following page for more information on calculating:
S parameters
effective material parameters: refractive index, impedance, permittivity and permeability

8.2.2 S Parameter extraction


This page describes how to calculate the meta-material S-parameters of a metamaterial device.

See also
Methodology 1986
Effective bulk properties 1989
Effective parameters - Smith 1990

Related publications
D. R. Smith et al., "Electromagnetic
parameter retrieval from inhomogeneous
metamaterials", Phys Rev E 71, 036617
(2005)
Szab, Z., G.-H. Park, R. Hedge, and E.-P.
Li, "A unique extraction of metamaterial
parameters based on kramers-kronig
relationship," IEEE MTT, vol. 58, no. 10,
2010, pp. 2646-2653

S parameters measurements
Understanding S-parameters
S parameters describe behaviors of a 2 by 2 network or transmission lines (see the figure at the right below):

S parameters for a 2 port network Phase compensation for source and monitors

2003 - 2016 Lumerical Solutions, Inc


1988 Lumerical Knowledge Base

for two given input signals a1 and a2, the outputs b1 and b2 can be calculated as

b1 S11 S12 a1
=
b 2 S 21 S 22 a 2

Measuring S-parameters from your FDTD simulation


S parameters are complex amplitude reflection and transmission coefficients (in contrast to the power reflection
and transmission coefficients). For example, S11 is the reflection coefficient and S21 is the transmission coefficient
for a1 incidence; and S22 is the reflection coefficient and S12 is the transmission coefficient for a2 incidence.

Recognizing that the a,b coefficients are directly proportional to the electric fields, the S parameters can be
calculated from the definition above, eg, S11=b1/a1=E_r/E_i and S21=b2/a1=E_t/E_i where E_i, E_r, E_t are the
incident, reflected and transmitted electric fields. This technique makes it very simple to obtain S-parameters for a
given device, but it does make a number of assumptions. It's important to ensure that all of the assumptions are valid
for your simulation.

This analysis assumes that the structure does not significantly affect the polarization of the incident fields, and
that the fields are polarized along one of the major axes (X,Y,Z). For example, if the incident fields are X polarized,
this analysis assumes the reflected and transmitted fields are primarily X polarized. This analysis selects the
largest field component to do the parameter extraction.
If the polarization is important, this analysis must be generalized to treat each polarization separately. If you have
interest, please contact support@lumerical.com .
To measure the S-parameters in the near field (as done in the S-parameter analysis object), the transmitted and
reflected fields must be propagating like a simple plane wave at the point of measurement. The measurements
will not be correct if evanescent fields are present, or if the structure supports multiple grating orders. To avoid the
evanescent fields, make sure the monitor is sufficiently far from the structure. Multiple grating orders are rare,
since the structures are usually sub-wavelegth, but if they do exist, the S-parameters must be extracted from far
field measurements. Contact support@lumerical.com for more information on this calculation.
In your simulation, the sources and monitors are always some distance from the surface of the metamaterial (for
example, the monitors must be far enough from the structure to avoid evanescent fields). The fields will
accumulate additional phase as they propagate from the source to the metamaterial, and from the metamaterial to
the monitors. The S parameters are intended to characterized only the metamaterial, without this additional
propagation phase, thus we must compensate this additional phase. Suppose the wavenumber in the incidence
space is k i, and the wavenumber in transmission space is k t, the extra phase in Monitor T from source S is k irs
+k trt where rs and rt are distances (so they are positive). For reflection Monitor R, the extra phase from source S
is k irs +k irr .

Based on the above discussion, a ready-to-use S Parameter analysis group is available in the Object Library. In
most cases you only need to set the slab thickness, the locations of the slab center and source position along x
axis, and the background refractive index in Analysis--Variables. The phase compensation is done in the Script. The
phase compensation assumes that the background index is the same on both sides of the metamaterial. Also note
that because the reflected and transmitted waves must be propagating like plane waves, we use a point frequency-
domain monitor to record the electric field component. The analysis group also contains two 2D surface-monitors,
which are used to measure the power transmission and to check that the fields are in fact propagating like a single
plane wave.

2003 - 2016 Lumerical Solutions, Inc


Applications 1989

8.2.3 Effective bulk properties


This page describes how to calculate the effective bulk material properties of a metamaterial using the S-parameters
of the material.

Solvers 101

FDTD
See also
Methodology 1986
S Parameter extraction 1987
Effective parameters - Smith 1990

Related publications
D. R. Smith et al., "Electromagnetic
parameter retrieval from inhomogeneous
metamaterials", Phys Rev E 71, 036617
(2005)
Szab, Z., G.-H. Park, R. Hedge, and E.-P.
Li, "A unique extraction of metamaterial
parameters based on kramers-kronig
relationship," IEEE MTT, vol. 58, no. 10,
2010, pp. 2646-2653

Effective material properties (from S-parameters)


We use technique described in Smith et al. to extract the effective material parameters from S-parameter
measurements. In particular, the following technique assumes the device behaves symmetrically for forward and
backward propagation. If the device does not have this symmetry, the analysis must be modified appropriately as
discussed further down.

From Eq. (9) in the reference paper, the effective refractive index neff is calculated as:
1 1 - S112 + S 212
neff = cos -1

kd 2 S 21
and the effective impedance is
2
(1 + S11 ) 2 - S 21
z= 2
(1 - S11 ) 2 - S 21

Once the effective refractive index and the effective impedance are obtained, it is easy to retrieve the effective
permittivity and the effective permeability as following:

e eff = nz
meff = n / z

Important note:
It is important to remember that parameter extraction is non-trivial. Determining n and z (and therefore epsilon and
mu) unambiguously is one of the challenges in this field, and is still an area of active research. One issue is that
the above functions are multi-valued. Selecting the wrong root will lead to incorrect results. The above calculation,
which is implemented in the S parameter analysis object, works in some situations, but it certainly does not work
in all cases. The implementation provided in the Effective parameters - Smith 1990 example should be viewed as a
starting point for your parameter extraction work, rather than a robust analysis that will work in all situations. For
an alternate extraction method, see the Szab reference provided at the top of this page.

Effective material properties in the non-symmetric (or inhomogeneous)

2003 - 2016 Lumerical Solutions, Inc


1990 Lumerical Knowledge Base

case
This section will give a brief overview of the method for calculating the effective material properties that applies when
the device behaves differently in the forward and backward source propagation directions. In other words, when the
scattering parameter S11 is not equal to S22. This may be the case if there is a substrate on one side of the
metamaterial. In this non-symmetric case, the following equations still apply:
e eff = nz
meff = n / z
And we can use the following equations to obtain n and z:
1
cos(nkd ) =
2 S 21
(1 - S11S 22 + S 21
2
)
(T22 - T11 ) (T22 - T11 )2 + 4T12T21
z=
2T21
The values of the T matrix can be calculated from the S parameters as well:

T11 =
(1 + S11 )(1 - S 22 ) + S 21S12
2 S 21

T12 =
(1 + S11 )(1 + S 22 ) - S 21S12
2 S 21

T21 =
(1 - S11 )(1 - S 22 ) - S 21S12
2 S 21

T22 =
(1 - S11 )(1 + S 22 ) + S 21S12
2 S 21

The above method is also discussed in the Smith et al. reference. Since these equations require us to know S21
and S22, we need to run two simulations, one with the source propagating in the forward direction, and the other with
the source propagating in the backward direction in order to get these values. The analysis in the S-parameters
analysis group is set up to perform the analysis for the symmetric case. As with the symmetric case, parameter
extraction is non-trivial due to challenges with choosing the correct roots of the equation.

8.2.4 Effective parameters - Smith


Introduction
We will calculate and plot the magnitude and phase of the the scattering (S) parameters for a negative index
metamaterial. The metamaterial is comprised of a split ring resonator (SRR) and a wire and yields a band of negative
refractive index at microwave frequencies. Simulation results will be compared to the results published by D.R.
Smith et al.

2003 - 2016 Lumerical Solutions, Inc


Applications 1991

Solvers 101

FDTD
Associated files
s_parameters_effective_eps
_mu.fsp
s_parameters_test.fsp
s_parameter_test.lsf
s_using_extracted_paramete
rs.fsp
See also
Methodology 1986
S Parameter extraction 1987

Effective bulk properties 1989

Related publications
D. R. Smith et al., "Electromagnetic
parameter retrieval from
inhomogeneous metamaterials",
Phys Rev E 71, 036617 (2005)

Simulation setup
The file s_parameters_effective_eps_mu.fsp contains the simulation of the structure shown in Figure 2
from Smith et al. As shown in the image above, the simulation contains a cubic unit cell of length 2.5mm. Periodic
boundary conditions are used to extend the structure in the y and z directions, and a plane wave source operating at
5-20GHz is injected in the x direction.

The substrate is 0.25 mm thick and composed of FR4 which has a permittivity of 4.4 and a loss tangent of 0.02. A
copper split ring resonator (SRR) and wire are positioned on opposite sides of the substrate. The width of the wire is
0.14 mm, and it runs the length of the unit cell. The outer ring length of the SRR is 2.2 mm and both rings have a
linewidth of 0.2 mm. The gap in each ring is 0.3 mm, and the gap between the inner and outer rings is 0.15 mm.
The thickness of the copper is given as 0.017mm in Smith, but since this is much smaller than the wavelength, we
use a 2D sheet to represent it.

Since in the GHz range most metals act like perfect electrical conductors (PEC), the PEC material model is used
for the copper elements. Also, note that the material fit for FR4 deviates from a straight line as given by the
permittivity and loss tangent. This is due to the fact that materials cannot be fit by a straight line over the whole
frequency range. However, this does not noticeably affect the frequency dependence of the S parameters. In
addition, a straight line model for the material properties is not completely accurate since in practice FR4 material
properties are frequency dependent.

The conformal variant 1 mesh refinement option is used in this example to take full advantage of the conformal
meshing technology to accurately represent the ring widths. In addition, the autoshutoff min in the advanced tab of
the FDTD region is reduced to 1e-7. This ensures that the fields decay sufficiently at the resonance frequencies
before the simulation automatically shuts off. Relatively coarse mesh settings are used for demonstration purpose
due to the properties of PEC. Results with finer mesh are presented in a later section on this page.

Results
Using the parameter extraction techniques described in the Parameter extraction 1987 page, we will calculate the
effective refractive index, and related properties, for this structure. First, let us check if the transmitted wave can be
regarded as plane wave, as required by the parameter extraction analysis. The intensities of Ey field component from
the T Monitor are shown below at two wavelengths:

2003 - 2016 Lumerical Solutions, Inc


1992 Lumerical Knowledge Base

Plane w ave verification - abs(Ey)^2 from T m onitor at Plane w ave verification - abs(Ey)^2 from T m onitor at
w avelength 60 m m w avelength 15 m m

It can be seen that the Intensity variation in the near field is only on the order to 1e-3, which can be considered as
uniform, thus justifies the use of near field point monitor. The uniformity of the intensity can be further increased if the
finer override mesh is extended.

Results with finer mesh (dx=dy=0.03mm, dz=0.025mm in the mesh override)


When the simulation is finished, run the script in the S parameters analysis group to calculate the S parameters and
reproduce figures 3a-3f from Smith et al.

2003 - 2016 Lumerical Solutions, Inc


Applications 1993

S-param eters, index, im pedence, perm ittivity, perm eability plots from the s_param s analysis group. These plots are
obtained w ith finer m esh (dx=dy=0.03m m , dz=0.025m m in the m esh override).

Advanced note: Calculating the phase of the S parameters


The S parameter are defined assuming that the incident phase is 0 at the left edge of the substrate, and the
reflected and transmitted phases are measured at the left and right sides of the substrate respectively. In the
simulation setup, the source is placed at approximately -4.2mm, the monitor measuring reflection is at -5mm and
the monitor measuring transmission is measured at +5mm. This results in a phase offset of the measured field
compared to the desired result for the S parameters, however this can be easily corrected as long as the positions
of the source, the substrate and the monitors are known. The script makes this phase correction but the user must
enter some of the parameters to define the source position, background index and the position of the substrate.

To test both the amplitude and phase, the simulation file s_parameters_test.fsp can be used. in this file, we
simply have a planar substrate with no metallic components so the S parameters can be easily calculated
theoretically. After running this fsp file, the script file s_parameter_test.lsf can be used to compare the S
parameters with the theoretical results. It will display the following figures.

2003 - 2016 Lumerical Solutions, Inc


1994 Lumerical Knowledge Base

Simulation using the extracted material parameters

We can simulate the electromagnetic response of the metamaterial using the extracted material parameters.
Although Smith's paper mentions that for this example the effective method does not rigorously satisfy an effective
medium limit, we can still get some results reasonably agreed with the original metamaterial which is inherently
inhomogeneous.

Before setting up the simulation file, we need some analytical parameters from the extracted data in order to use the
magnetic electric Lorentz (MEL) model since it has dispersive and lossy permeability. By some analysis, we can
use the permeability in MEL model, which is relatively easy to have analytical expression, whereas for the extracted
permittivity, we can import it into the material database, which is used as the base material for the MEL model.
Some estimated parameters for the analytical permeability are listed below:
delta_mu = 0.6 (H/m)
wm = 6.1e10 (rad Hz)
delta_m = 1.43e9 (rad Hz)

To set up the simulation file with minimum effort, we can modify the structure in the original file to be a bulk slab with
material of MEL created from above description. Since now it is a bulk material, we can simulate only in 2D. What
we want to compare is its transmission and reflection, thus in the analysis group s_params, only R and T are kept
and all others are deleted. You can run the file s_using_extracted_parameters.fsp which is ready to use.

After simulation, we can plot the results with the original transmission/reflection for comparison as follows:

2003 - 2016 Lumerical Solutions, Inc


Applications 1995

From the above figure, we can see that the results using the extracted/simplified effective data agree well in certain
degree with those using the original metamaterial.

About the magnetic electric Lorentz model and the permeability


analytical parameters
Since the imaginary part of the extracted permittivity is negative, we chose a little wider absorption of the
permeability for the MEL model named "mel".

Once the extracted permittivity is imported as the base material (named "bulk") of the MEL model, the default
setting of the material fitting can lead to a good fitting. However, due to its large imaginary part, the simulation can
diverge at late time. To avoid this, we simply chose the simplest two-coefficient fitting, which neglects the imaginary
part and the anti-resonance of the real part. Even with such simplification, the result is reasonably good with the
original transmission and reflection. Since the main purpose of this section is to validate the extracted data, we do
not pursue highly agreed results. With careful adjustment, you may get a better agreement with your own
metamaterial design.

For the magnetic electric Lorentz model, please refer the Material Database section in the Reference Guide 243 to
get more information.

8.2.5 THz device - Chen


Introduction
In this example, we'll show how to recreate the results of H.-T. Chen et al. This meta material exhibits a negative
index of refraction in the THz range.

2003 - 2016 Lumerical Solutions, Inc


1996 Lumerical Knowledge Base

Solvers 101

FDTD
DEVICE
Associated files
negative_index_chen.fsp
negative_index_chen_analys
is.lsf
See also
Bulk metamaterials 2002
Retrieving S parameters 1987

Wire Pairs - Zhou 1997


Related publications
H.-T. Chen et al., "Active terahertz
metamaterial devices", Nature 444,
597-600 (2006)

Simulation setup
The file negative_index_chen.fsp contains an example of the structure as described in Figure 1 from Chen'
paper.

Metamaterial structure here is composed of gold patterning on a GaAs substrate. Gold can be represented using a
plasma material model (with plasma resonance ( ) and collision frequency (vc)), and this can be expressed as a
simple conductive model in the low frequency limit when << c. In this limit, the material can be approximated
using the PEC (perfect electrical conductor) material.

The physical thickness of the gold is 200 nm, but this would require a very small mesh size for dz. However, since
the thickness of the material is much less than the wavelength of about 130-1200 um, the metal can be represented
using 2D sheets which do not require a fine mesh in the z-direction.

For the GaAs substrate, a simple constant refractive index (dielectric) model was used. It may be possible to
account for a free carrier model by adding a conductivity that depends on bias voltage.

Results (using dx = 1 nm, dy = 1 nm)


In the file provided, the mesh override region uses a coarser mesh which gives initial results in a shorter simulation
time. More accurate results can be obtained by specifying a finer mesh step size. The following results are achieved
by changing the mesh step size in the x and y directions in the mesh override region to 1 nm.

When the simulation is finished, run negative_index_chen_analysis.lsf to produce the results.

The transmission as seen in Figure 3 from Chen. The


peak and dip just above 1.4 THz in the spectrum is a
Wood's anomaly due which occurs as the number of
supported grating orders changes at this frequency.

2003 - 2016 Lumerical Solutions, Inc


Applications 1997

The |E| field is similar to Figure 2a. Rerunning the


simulation with a smaller mesh size would produce a
higher resolution image.

The vector plot of the surface current density at


resonance. Similar to figure 2b of the paper.

Once you have run the script to generate the vector plot,
modify the plot properties as follows:

8.2.6 Wire Pairs - Zhou


Introduction
This example shows how to recreate the results of J. Zhou et al. This metamaterial exhibits a negative index of
refraction in the GHz range.

2003 - 2016 Lumerical Solutions, Inc


1998 Lumerical Knowledge Base

Solvers 101

FDTD
Associated files
negative_index_zhou.fsp
negative_index_zhou_analys
is.lsf
See also
Bulk metamaterials 1984
Retrieving S parameters 1987

THz device - Chen 1995


Related publications
J. Zhou et al., "Negative index
materials using simple short wire
pairs", Physical Review B 73 (2006)

Simulation setup
The file negative_index_zhou.fsp contains an example of the structure shown in Figure 1 from Zhou.

The material properties (plasma resonance and collision frequency) were estimated from copper data in the visible.
This should be a reasonable estimate of the properties in the microwave range. Initially, this simulation was quite
numerically unstable. This turns out to be due to the fact that the permittivity is approximately -2.3e4 + 1.6e7 * i. In
other words, the properties are completely dominated by the complex permittivity. To control the instability, the
plasma model was replaced by a simple conductive model which can be obtained by an expansion of the plasma
model when the collision resonance frequency is much larger than the source frequency. Further testing showed that
the results were not sensitive to the precise value of the real permittivity. At the 10-20 GHz frequencies, the
imaginary permittivity is so large that the metal behaves like a perfect electrical conductor. The penetration depth is
only lambda/10000, which would never be resolved in FDTD anyway. It is surprising that in the paper they explicitly
say that they use a Drude model, unless they mean a conductive model which is the limit of the Drude model when
w << nu_c. In this simulation, we have used the PEC (Perfect electrical conductor) material model which is
appropriate for such situations.

To prevent coupling between the PML above and below the structure and any evanescent fields of the structure, a
distance of half a wavelength is left between the structure and PML.

The copper thickness is meant to be 10 um, but this would require a very small mesh size for dz, so we represent
the material using 2D sheets.

The conformal variant 1 mesh refinement option is used in this example to take full advantage of the conformal
meshing technology to accurately represent the spacing between the wires, and the width of the wires.

Note that some of the dimensions were not well defined in the paper, so the simulation results are similar but do not
match exactly. Additionally, the source and receiver used in the experiment are angled at 7.5 degrees from normal,
whereas the source in the simulation is injected at normal incidence and the reflection monitor measures the
reflected power at angles.

Results
When the simulation is finished, run negative_index_zhou_analysis.lsf to produce the following results.

2003 - 2016 Lumerical Solutions, Inc


Applications 1999

The transm ission plot w hich is sim ilar to Figure 2a from Zhou.

The reflection spectrum w hich is sim ilar to Figure 2b from Zhou.

8.2.7 Chiral materials - Kwon


Introduction
On this page, we calculate the circular dichroism (CD) of a gammadion shaped structure, then optimize the structure
dimensions to maximize the CD at 1.1um.

2003 - 2016 Lumerical Solutions, Inc


2000 Lumerical Knowledge Base

Solvers 101

FDTD
Associated files
gammadion_dichroism.fsp
See also
Circular polarization 540

Related publications
Do-Hoon Kwon et al., "Optical planar chiral
metamaterial designs for strong circular dichroism
and polarization rotation," Opt. Express 16, 11802
(2008).

We consider a gammadion shaped periodic structure shown in Fig. 1. In this structure, an aluminum layer is
sandwiched by silver layers and the excitation of surface plasmon leads to the enhancement of the circular
dichrosim.

(c)Side view

(a) Geom etry of one unit cell (b) Top view

Figure 1 Gam m adion shaped planar chiral m aterial

Calculation of the circular dichroism for four-fold symmetrical structure


The circular dichroism CD is defined by
CD = TR - TL
(1)
where TR and TL is a transmittance w hen the right- and the left- circularly polarized plane wave is incident on the
device, respectively. To get the transmittance for circularly polarized incidence, we have two alternatives as follows.

1. Use two plane wave sources to generate circularly polarized illumination, as described in the circular polarization
540 page. In this case, two FDTD simulations will be required to get the CD; One for right-circular polarization and

the other for left-circular polarization. This approach is not used in the associated example simulation file.

2. Use one plane wave source (as in the example simulation file gammadion_dichrosim.fsp). By taking
advantage of the four-fold rotational symmetry of the structure, the transmittance can be obtained from a single
simulation, as explained below:

The field distributions F (E or H) for circular illumination can be obtained from a single linearly polarized simulation by

2003 - 2016 Lumerical Solutions, Inc


Applications 2001

FR ( x, y, z ) = Fx ( x, y, z ) + Fy ( x, y, z )e j p / 2
FL ( x, y, z ) = Fx ( x, y, z ) + Fy ( x, y, z )e - j p / 2
(2)
where FR (FL) is the field distribution for right- (left-) circularly polarized incident wave, and Fx (Fy) is the field
distribution for a x (y) linearly polarized plane wave. If we assume four-fold rotational symmetry of the structure, the
field distribution for y-polarized plane wave is incident on the structure, Fy, is given by that for x-polarized incident
plane wave, Fx, as
Fx _ y ( x, y, z ) = - Fy _ x ( y,- x, z )
Fy _ y ( x, y, z ) = Fx _ x ( y,- x, z )
Fz _ y ( x, y, z ) = Fz _ x ( y,- x, z )
(3)
where FU_V (u=x, y, z; v=x, y) is the u-component of the field distribution for v-polarized incident wave.
Once we get the field distribution FU (U=R or L) for circularly polarized plane wave using the relation Eqs.(2) and (3)
from one FDTD simulation (simulation for x- or y- polarized incident wave), the power traveling down in the substrate
over a unit cell is given by
1 *
PU = Re( EU H U )dS
S _ u n itcell 2 (4)
If we normalize the power P by incident power using script function "sourcepower", we obtain transmittance T as
TU = PU / sourcepower
(5)
The simulation file gammadion_dichrosim.fsp uses a single x-polarized source. The field distribution on a plane
under the gammadion structure (in the substrate) is recorded in a power monitor named "T", within the analysis
group named "CD". The script in the "Analysis" tab => "Script" tab of this analysis group calculates the
transmittance of circular polarizations following the way mentioned above (method 2). From the CD analysis object,
you can plot the CD vs wavelength by use of the "visualizer". In the figure below, we can see a peak in the CD
around 1.1um.

2003 - 2016 Lumerical Solutions, Inc


2002 Lumerical Knowledge Base

8.2.8 Bulk metamaterials


Introduction
On this page, we show how to set up bulk electric and magnetic properties to have a negative index medium over a
range of wavelengths.

Solvers 101

FDTD
Associated files
negative_index.fsp
magnetic_electric_lorentz.lsf
See also
Metamaterials 1984
magnetic-electronic model 243

Permittivity models 223

Material setup
FDTD Solutions includes a magnetic and electric Lorentz medium, described at Permittivity models 223 . We can use
this material model to create a bulk negative index medium where both real(e) and real(m) are negative at the same
wavelength.

The media have a relative permittivity and permeability given by


D ew e2
e ( w ) = e base ( w ) + c e + 2
we - 2i d e w - w 2
D mw m2
m (w ) = 1 + cm + 2
wm - 2i d m w - w 2
where the subscript e and m refer to the electric and magnetic properties respectively and w is the angular
frequency. In this example, we choose the following properties:
We use no base material. This has the effect that ebase = 1. In other words, the base material is actually the
vacuum.
De=Dm=1
we=wm =2e15
de=dm =1e13

Note: model coefficients


In real materials (and real metamaterials), the permittivity and permeability are obviously different. However, for
the purposes of simplicity in this example, we have used the same model coefficients for both eps and mu.

We can open the file negative_index.fsp which includes this material and can then use the script file
magnetic_electric_lorentz.lsf to plot the resulting properties. The relative permittivity (which in this case is equal to
the relative permeability) is shown below.

2003 - 2016 Lumerical Solutions, Inc


Applications 2003

Above, we see the real and imaginary parts of the In this figure, we see that from 700nm to 800nm, the
permittivity. permittivity (and permeability) are negative while the
imaginary part is less than 0.1. We further expect that
near 760nm, the real part of the refractive index will be
close to -1.
Simulation setup
We setup a simulation with a beam at 45 degrees incidence on a 2 micron slab of our negative index medium in a
background of air. In addition, we have added a mesh override region over the slab, and set the equivalent index for
the mesh to 2. The reason is that the magnetic electric Lorentz medium is included with FDTD Solutions but is
implemented as a plugin. At mesh time the software will base the target mesh size for this material on the
background material (which defaults to the vacuum if none is selected). Therefore we may want to use a mesh
override region to force a smaller mesh size if we know that the material will need it. In this case, for safety, we
override the mesh with an equivalent index of 2, which is more than sufficient for the electric and magnetic properties
over the wavelength range of 700 to 800nm.

Additionally, since the beam is incident at 45 degrees, which is relatively steep, we increased the minimum number
of layers of PML from 12 to 24 in the Advanced Options of the FDTD simulation region.

Note, the PML default settings are modified to overcome possible diverging simulation, which need some knowledge

2003 - 2016 Lumerical Solutions, Inc


2004 Lumerical Knowledge Base

on PML.

Results
After running the simulation, we can visualize the E field over the entire structure from the monitor called 'profile', as
shown below.

We can select the Parameter lamba and the drag the slider on the lower right to look at the profiles at different
wavelength. The profile at approximately 761nm has the lowest reflection and highest transmission, as we would
expect from the curve permittivity data. We can see this result, which clearly shows the unusual refractive properties
of a bulk negative index medium.

2003 - 2016 Lumerical Solutions, Inc


Applications 2005

8.2.9 Terahertz Resonator


Introduction
In this example, we will study the effect of bias-induced carrier density variations on the refractive index of the
individual materials and hence the overall transmission of the metamaterial. The unperturbed metamaterial has been
analyzed optically in the FDTD Solutions metatmaterial example 1995 . Here, the structure is analyzed electrically
using the DEVICE (CHARGE) first and optically using FDTD Solutions later.

Solvers 101
FDTD
CHARGE
Associated files
active_thzmaterial.ldev
active_thzmaterial.fsp
active_thzmaterial_np.lsf
Reference
H.-T. Chen et al., "Active terahertz metamaterial
devices", Nature 444, 597-600 (2006)

NOTE: If you are using an older version of DEVICE (v.4.6.631 or older) then please download the simulation
(.ldev) file from this archived KB page as the current files may not run with the older DEVICE.

Theory
A range of voltages are applied to the metamaterial via contacts and the corresponding carrier densities are
calculated and recorded. The effect of the carrier densities on the refractive index of the GaAs layer is then
calculated.

To calculate the effect of the change in the carrier density on the refractive index, an FDTD Solutions simulation will

2003 - 2016 Lumerical Solutions, Inc


2006 Lumerical Knowledge Base

be run. The np density grid attribute in FDTD Solutions will take the carrier density information and calculate the
corresponding changes in the real and imaginary parts of refractive index of the material according to the Plasma-
Drude formulation. For a more detailed description of this grid attribute and the formula, please visit the Charge to
index conversion 402 .

CHARGE Simulation
The metamaterial including the GaAs epilayer and the gold stripes can be set up in DEVICE. Open the
active_thzmaterial.ldev file in DEVICE. The dimensions of the structure reflect the structures in the
referenced paper by Chen et al.

In this example, The CHARGE solver uses a 2D simulation domain, several x-normal cross sections of the structure
are simulated individually for a full picture of the carrier density profile across the entire metamaterial. A parameter
sweep 699 task has been set up under the sweeps and optimizations tab to sweep over the position of the simulation
region for 5 different cross sections. The electron density is then collected for each of the cross sections, simulating
voltages between 0 and 16 volts for every one of the cross sections. A charge monitor will record the n and p
distributions and save them to .mat files for the corresponding cross sections, which will be imported into the
npdensity grid attribute in FDTD Solutions.

Note:
1. When sweeping the simulation positions of x=0 um, 3.5 um, 9.5 um, 16 um and 21.5 um, resulting data from
the charge monitor will be recorded in different output .mat files, which is set in the script in "model".
2. Since no other output is needed, in the "Results" of the sweep, we set the current to output, which is arbitrary.
If you do not set any result, after sweep, you will need to manually close the sweep dialogue.
3. The sweep of applied voltages is set in the Boundary Conditions table for the electrical contact named
"emitter".

If the sweep task in CHARGE solver is run, the location of the simulation region object is varied from the center to
the edge of the structure sweeping over 33 voltage points at each cross section. Once the sweep is run, we can
open the different sweep files in the newly created folder and look at results such as the charge distribution,
electrostatic feild etc at different bias for different position.

FDTD Simulation
In FDTD Solutions, to symmetry boundaries are used and so only the first quarter of the simulation region is
included, as shown in THz device 1995 . We only create the npdensity objects in that quarter as well. Carrier densities
are used to calculate the corresponding refractive index of GaAs according to the Plasma-Drude model explained of
Charge to index conversion 402 . Note that the x span has to be specified according to the cross section of the
device. This has already been done in the provided .fsp file so you can skip this.

To calculate the overall device transmission as a function of the applied voltage, a parameter sweep 699 is used in
FDTD Solutions under the sweeps and optimizations task. The file is set to only sweep voltage of 0 V, 8 V, and 16 V
when the emitter voltage has been changed to positive in "model". Users with multi-processor computers or access
to concurrent computing resources (e.g. a compute cluster) can take advantage of these extra processors by
configuring the resources 213 in FDTD Solutions to utilize all available cores during the parameter sweep.

2003 - 2016 Lumerical Solutions, Inc


Applications 2007

Run the sweep task in the .fsp file. The sweep will run simulations for all three bias values at a range of frequencies
from 0.25 THz to 2.5 THz. Use the following lines of script to plot the results once the sweep is done. The plot is
similar with the curve in Figure 3a of the referenced paper.

f = pinch(getsweepdata("sweep","f"));
T = pinch(getsweepdata("sweep","T"));
V = pinch(getsweepdata("sweep","V"));
plot(f(1:100,1)*1e-12, T(1:100,1),T(1:100,2),T(1:100,3), "Frequency (THz)",
"Transmission");
legend("V=0 volts", "V=8 volts", "V=16 volts");

Discussion

Compared to the reference paper, one may find there are some differences from the above result. For example at
higher frequency, the transmission is higher than the paper. This is because, we approximate the structure as
symmetric not only in x direction, but also in y direction. If removing the symmetry in y, the transmission at higher
frequency will be much lower. However, since the paper did not give complete information on the refractive index of
GaAs, the doping concentration and doping profile/region, and we simplified the simulation of n-GaAS and SI-GaAs
as GaAS with a constant refractive index of 3.5 in FDTD Solutions and set electric properties in CHARGE, we
simplified the structure as cross sections, and doping causes loss even without bias voltage, the differences are
reasonable.

8.2.10 Metamaterial Absorbers


Motivation
Electromagnetic absorbers based on metamaterial have attracted significant interest as a way of improving the
performance of thermal imaging sensors, solar cells, photodectectors. While absorbers with broadband, polarization-
insensitive, omni-directional absorption characteristics are highly desirable for many applications, there are also
areas where wavelength selectivity and tunability can be of great importance. Due to its versatility in tailoring the
electromagnetic responses over arbitrary frequency ranges, metamaterial has become a promising candidate for
absorbers with enhanced performances.

In this section, we will look at three examples where a combination of solvers (optical, thermal and electrical) are
used to address the complex design requirements for metamaterial absorbers.

2003 - 2016 Lumerical Solutions, Inc


2008 Lumerical Knowledge Base

Plasm onic m etam aterial absorber 2008


Tunable graphene m etam aterial Metam aterial m icrobolom eter 2012

(simple example, optical only) absorber 2010 (optical + heat transport + charge
(charge transport + optical) transport )

8.2.10.1 Plasmonic Metamaterial Absorber

Introduction
In this example, we will calculate the absorption characteristics of a plasmonic metamaterial absorber based on [1].
The absorption mechanism for these devices is mostly governed by the excitation of localized electromagnetic
resonances, and is highly dependent on the geometry of the top metal layer and the thickness of the dielectric layer.

Solvers 101

FDTD
Associated files
plasmonic_absorber.fsp
plasmonic_absorber_RTA.lsf
plasmonic_absorber_angle_sweep.lsf

See also
Unpolarized beam 602
Source - BFAST 590
Related publications
[1] J. Hao et al., "Nearly total absorption of light and
heat generation by plasmonic metamaterials," Phys.
Rev. B 83, 165107 (2011).

Simulation setup
The plasmonic absorber is composed of a periodic array of subwavelength metal patches on top of a thin dielectric
layer and a highly reflecting thick metal layer. For the optical simulation, we only need to simulate a single unit cell.
The file plasmonic_absorber.fsp contains the structure shown in Fig. 1. The design parameters of the device
can be defined in the 'Setup' tab of the 'model' object in the object tree.

2003 - 2016 Lumerical Solutions, Inc


Applications 2009

Unit cell of MIM plasm onic m etam aterial absorber

Both symmetric and anti-symmetric boundary conditions 466 are used to reduce the simulation time. The two power
monitors, 'R' and 'T', are used to calculate the transmission and reflection (and therefore, absorption) spectrum of the
device. To be consistent with the simulations in reference 1, a Plasma (Drude) 223 material called 'silver' was added
to the material database and assigned to the top and bottom metal layers and a refractive index of 1.75 was used for
the dielectric layer.

Results
When the simulation (plasmonic_absorber.fsp) finishes, run plasmonic_absorber_RTA.lsf to create the
images shown below.

R / T / A spectra (Fig. 2 from [1]) Magnetic field intensity at resonance

For these type of metamaterial absorbers, the spectral location of the resonance does not shift with the angle of
incidence when the correct mode is excited. This is a highly desirable feature for infrared sensing applications as the
detected light usually comes from many different angles. To verify that the desired absorption spectrum is robust for
non-normal incident angles, one can take advantage of the broadband fixed angle source technique (BFAST) 590 to
simulate the absorption spectrum for a range of incident angles. The script
plasmonic_absorber_angle_sweep.lsf uses BFAST 590 to sweep the incidence angle for a broadband
plane wave source. One can see from the figure below that the absorption spectrum has little dependence on the
illumination angle, as expected.

Absorption as a function of w avelength and the angle of incidence for TE-polarization

2003 - 2016 Lumerical Solutions, Inc


2010 Lumerical Knowledge Base

(Fig. 3 from [1])

8.2.10.2 Tunable Graphene Metamaterial Absorber


Introduction
In this example, we will consider a graphene metamaterial absorber where the absorption spectrum can be tuned by
changing the chemical potential applied to the graphene. The structure of the device is similar to the plasmonic
metamaterial absorber 2008 , apart from the the fact the top metal layer has been replaced with a 2D graphene sheet.

Solvers 101

FDTD
Associated files
graphene_absorber_uniform.fsp
graphene_absorber_fishnet.fsp
graphene_absorber_ef_sweep.lsf

See also
Graphene modeling methodology 2774
Graphene electro-optical modulator 2795
Related publications
[1] A. Andryieuski and A. V. Lavrinenko, "Graphene
metamaterials based tunable terahertz absorber:
effective surface conductivity approach," Opt.
Express 21, 9144 (2013).

Simulation setup
The absorption spectrum of the graphene absorber can be tailed by changing the key geometric parameters. Below
are the two types of structures we will consider: uniform graphene sheet and graphene fishnet metamaterial.

We use a 2D graphene material model 2774 based on the surface conductivity of the graphene. For this example, a
conductivity scaling of 2 is used for the graphene model to account for the two layers of graphene sheets used in [1].
A 2D rectangle object is used to model the sheet, and there is no need to add a mesh override region over the
graphene to resolve the thin layer. For the fishnet geometry, polygon objects with the refractive index of 1.53
(corresponding to the background index for dielectric) were used to pattern the 2d graphene sheet.

2003 - 2016 Lumerical Solutions, Inc


Applications 2011

On the 'z min' boundary of the simulation region, a PEC (perfect electrical) boundary was used to mimic the perfect
mirror. A background index of 1.53 was used.

Results
The absorption spectra of the uniform and fishnet structures as a function of the chemical potential can be obtained
by opening each of the simulation file (graphene_absorber_uniform.fsp and
graphene_absorber_fishnet.fsp) and running the script file (graphene_absorber_ef_sweep.lsf). The
key results from the simulation can be summarized as follows:

The absorption spectrum of the graphene absorber is strongly dependent on the chemical potential
A broader absorption spectrum can be obtained with the fishnet structure. Furthermore, this spectrum can be
tuned by changing the geometry of the fishnet metamaterial.

2003 - 2016 Lumerical Solutions, Inc


2012 Lumerical Knowledge Base

Absorption spectra as a function of chem ical potential (Fig. 5 and Fig. 6 from [1])

If you happen to know the chemical potential of the graphene, you can directly enter the value in the graphene
material model. If not, you can use the charge transport solver to obtain the chemical potential as a function of
applied voltage. Additional information on how to extract the chemical potential as a function of applied voltage can
be found in the graphene electro-optical modulator 2795 example.

8.2.10.3 Metamaterial Microbolometer


Introduction
On this page, we will calculate the temperature changes in a metamaterial microbolometer sensor as a result of IR
absorption.

Solvers 101

FDTD
Associated files
meta_microbolo.fsp
meta_microbolo_r.lsf
meta_microbolo_steady.lde
v
meta_microbolo_transient.
ldev
meta_microbolo_extract.ls
f

See also
Photothermal Heating in
Plasmonic Nanostructures 1933

Source - Import Heat 692


Related publications
Kaikai Du et al., "Wavelength and
thermal distribution selectable
microbolometers based on
metamaterial absorbers," IEEE
Photonics Journal, 7, 6800908
(2015).

The main elements of metamaterial microbolometer are an absorber and a thermistor. The absorber is composed of
a silicon layer sandwiched between a periodic gold disks and a gold mirror. Under the absorber, there is a thin
silicon nitride (Si3N4) film followed by the vanadium oxide (VOx) thermistor layer. The thin silicon nitride layer
delivers heat from the absorber to the thermistor layer and serves as electrical insulation. The device is suspended

2003 - 2016 Lumerical Solutions, Inc


Applications 2013

by a Si3N4 bridge for thermal isolation.

Typical design goal for metamaterial microbolometers is to reduce the pixel size without sacrificing detector
sensitivity and the thermal time constant. This requires both optical and thermal simulations. We first carried out an
optical simulation to calculate the absorption due to IR radiation. Then we take the optical absorption profile and use
it as a heat source in the subsequent heat transport simulation in DEVICE to calculate the temperature change in
the thermistor layer. In addition, because the heat transport solver in DEVICE solves the coupled system of
equations for heat transport and conductive electrical transport, we can also look at the electrothermal effect due to
an applied voltage and calculate the IV response for the microbolometer.

Optical simulation
Since the absorption is mostly confined in the absorber region, we can consider only this part of the device in optical
simulation and ignore the rest of the underlying layer. Assuming that the optical behavior of each pixel is identical ,
we can further reduce the simulation volume by only including a single unit cell of the array and impose periodic
boundary conditions as if there are infinite number of such arrays. This will significantly reduce the simulation time
required. If the radiation has a non-uniform distribution and each pixel experiences different amount of absorption,
then more unit cells in the device will need to be included in the optical simulation.

When applicable, the simulation time can be further reduced by taking advantage of the symmetry 466 of the
structure. As seen in the figure below, a mesh override 440 region is used to resolve the thin layers as the thickness
of the dielectric layer is critical to the absorption.

After running the simulation file meta_microbolo.fsp, run the meta_microbolo_RTA.lsf to create the
following plots.

f = getdata('R','f');
T = -transmission('T');
R = transmission('R');
plot(c/f*1e6,R,T,1-R-T,"Wavelength (um)","R/T/A");
legend('R','T','A');

The cross-sectional electric/magnetic field profiles can be visualized from the 'xz' and 'yz' monitors. The spatial
distribution of absorption can be visualized by right-clicking 'pabs' analysis group and selecting 'Pabs'. You can set
the 'Parameter' setting as below and use the slicer to get the cross-sectional view at the desired locations. The
results show that the magnetic field is confined mainly in the dielectric layer, and this strong magnetic resonance is
responsible for the high absorption.

2003 - 2016 Lumerical Solutions, Inc


2014 Lumerical Knowledge Base

Reflection/transm ission/absorption spectra, the m agnetic field (Fig 2. (a) and (d) of the referenced paper) and absorption
profile at resonance

The absorption resonance of this device can be tailored by changing the radius of the metal disk as shown in the
following plot, which can be created by running the meta_microbolo_r.lsf. With a radius of 530nm, the
absorption resonance peaks at around 9.3um, which corresponds to the human body radiation.

Absorption as a function of radius and w avelength (Fig 2. (b) and (a) of the referenced paper)

Heat transport simulation


For the heat transport simulation, we will be considering the following structure based on the paper by Du, where the
metamaterial absorber is rooted on a silicon substrate by two legs. To take advantage of the symmetry for shorter
simulation time, only half of the 5x5 pixel structure is simulated in DEVICE , as marked by the orange simulation
region.

Schem atic diagram of integrated m icrobolom eter on substrate and its perspective view in DEVICE

The 'pabs' analysis group in the optical simulation automatically saves the absorption profile into a .mat file. This file
can be imported into the heat transport simulation by using the 'Import source' option from the main menu and
selecting the specified file. Note that because we only included 1 unit cell in the optical simulation, we have to copy

2003 - 2016 Lumerical Solutions, Inc


Applications 2015

heat source into each pixel. One can do this easily with the "copy" or "array" function.

We are going to study both the steady-state and transient characteristics of the system in response to the heat
source. In both cases, a fixed temperature of 293.15 K is applied to the two pillars supporting the microbolometer as
shown in the following figure.

The boundary condition settings in DEVICE

For the steady-state simulation, meta_microbolo_steady.ldev, the solver type is set to 'steady state' in the
Edit Heat Solver window. After running simulation, right-click on the 'HEAT' object and visualize the 'thermal' result.
In the visualizer, select 'T' in the attribute. Since the absorbed power is relatively small, the resulting temperature
change in the microbolometer is very small and is almost uniform in the absorber region. The plot below shows the
change in temperature as a function of pixel size, and one can see that, as expected, dT increases quadratically as
a function of pixel size

2003 - 2016 Lumerical Solutions, Inc


2016 Lumerical Knowledge Base

Steady-state therm al distribution and the tem perature change as a function of the pixel size (Fig. 6 (b) of the referenced
paper)

For the transient simulation, meta_microbolo_transient.ldev, the solver type is set to 'transient' in the Edit
Heat Solver window. The on/off setting of the import source can be adjusted in the 'Transient' tab of the same
window. To obtain the transient temperature response, run the meta_microbolo_extract.lsf. The following
plot was obtained by running optical and heat transfer simulations for pixel sizes of 5 and 10 um. It is worth noting
that while a larger pixel size gives a larger temperature change, it take longer to reach a steady state level.

8.3 Photonic Integrated Circuits


Motivation
Photonic integrated circuit (PIC) technology is undergoing a growth rate very similar to the one seen by electronic
integrated circuits over the last half century. Much like electronic chip design, in order to keep up with the increasing
number of components and circuit complexity, efficient and reliable automated design tools are necessary to sustain
this growth. These tools give engineers the ability to carry out virtual prototyping, improve yields, lower development
costs and shorten design cycles.

Simulation and design of photonic integrated circuits (PICs)


Lumericals product suite aims to provide a comprehensive PIC design flow similar to that of a traditional electronic
design automation (EDA) environment. This includes the ability to:
Perform component-level design and optimization accurately and efficiently
Develop compact model libraries (CML) for process design kits (PDK)
Preform circuit-level simulation and optimization of large scale PICs
Integrate PIC design into common EDA tool flows

2003 - 2016 Lumerical Solutions, Inc


Applications 2017

Component-level design and optimization


Integrated photonic component design is highly dependent on rigorous numerical analysis such as eigenmode
solving, finite difference time domain (FDTD) and eigenmode expansion (EME) methods. For many active
components (e.g., electro-optic modulators, photodetectors, thermally-tuned waveguides), optical solvers are often
combined with electrical and thermal solvers to model how the optical characteristics change over voltage and
temperature. To learn more about component-level simulations with Lumericals component-level tools (FDTD
Solutions, MODE Solutions and DEVICE), please select from one of the following topics:
Passive Components 2018
Electro-optic Modulators 2204
Photodetectors 2268
Thermal Tuning 2503

Compact model library (CML) generation for PDK


Component-level simulations are computationally intensive and analysis times often scale poorly with component
size and count. To facilitate efficient simulation of photonic integrated circuits, the individual components are
represented by compact models at the circuit level. The results of component-level simulations, combined with
experimentally measured results, provide the input parameters to define the compact models for a wide range of
components that can be manufactured by a given foundry process. To learn more about how to create compact
models, please see:
Compact Model Libraries (CMLs) 2474 .

Circuit-level simulation and optimization


With INTERCONNECT and validated CMLs, one can preform circuit-level simulations of PICs in both the frequency
and time domain to calculate important quantities such as circuit S parameters, eye diagrams, and bit error rates.
Circuits and Systems 2291

Integration with third-party tools


To learn more about how Lumericals product suite integrates with third-party tools, please see:
Integrated Photonics Design Partners

Book: Silicon Photonics Design


In addition to Lumerical Knowledge Base, you can also find many useful and practical resources (e.g., tutorials,
examples, and script files) in the book: Silicon Photonics Design From Devices to Systems, written by Lukas

2003 - 2016 Lumerical Solutions, Inc


2018 Lumerical Knowledge Base

Chrostowski and Michael Hochberg and published by Cambridge University Press.

Example scripts are available for download: http://siepic.ubc.ca/


siliconphotonicsdesign.

Getting started
Relevant videos (login required):
PIC Design Methodologies
Passive Building Blocks
Optimization
Modulators and Detectors
Thermally Tuned Waveguide
Compact Model Library Creation
Circuit Simulations and Applications

Download relevant products:


FDTD Solutions
MODE Solutions
DEVICE
INTERCONNECT

Product introductory videos:


FDTD Solutions
MODE Solutions
DEVICE
INTERCONNECT

8.3.1 Passive components


Simulating passive components
The combination of FDTD Solutions and MODE Solutions provides users with a versatile and comprehensive
design environment suitable for all passive components such as waveguides, fibers, couplers and tapers.

2003 - 2016 Lumerical Solutions, Inc


Applications 2019

The 3D finite-difference time-domain (FDTD) solver in FDTD Solutions is one of the most versatile and rigorous
methods for simulating light interaction with nanoscale components. However, when applied to three-dimensional
structures, FDTD is highly computationally intensive, making it difficult to treat large integrated optical components
efficiently.

MODE Solutions provide several alternative methods for simulating wave propagation over large distances. The 2.5D
variational FDTD (varFDTD) solver and the eigenmode expansion (EME) solver can simulate how waveguide
modes propagate along longitudinally-varying waveguide geometries over long distances. For planar geometries
where there is negligible coupling between vertical modes, varFDTD can achieve accuracy comparable to 3D FDTD
with computation times comparable to 2D FDTD. For 3D geometries where there is coupling between vertical modes,
EME is a frequency domain method that offers a good alternative to 3D FDTD because its computational
requirements scale exceptionally well with distance.

Both FDTD Solutions and MODE Solutions have built-in finite-difference eigenmode (FDE) solver, which can be
used for modal analysis of waveguides and fiber cross-sections of arbitrary cross section.

Users have the ability to streamline their design process by being able to select and run different solvers using the
same CAD environment, geometry and analysis tools. For example, the design of a ring resonator can be quickly
optimized using varFDTD, with final verification and S parameters extraction done in a full 3D FDTD simulation. Or,
the design of a polarization converter can start with modal analysis and follow up with propagation using the 2D or
3D EME solver.

Features
FDTD Solutions:
Waveguides and passive routing elements including splitters, mode converters and crossovers
Input/output couplers based on grating couplers 2075
Resonators analysis with integrated Q-factor Analysis Object 1807 for low- and high-Q resonator structures
including, for example, ring resonators 2039
3D photonic-crystal cavities 1821 , photonic crystal waveguide 1856 , and photonic crystal bandstructure 1843
Plasmonic waveguides

MODE Solutions:
Waveguide structure design including, for example, effective index, dispersion, group index, and propagation
loss for straight and bent waveguides
Coupling efficiency between different waveguide sections using the built-in overlap calculator 763
Optimize large planar waveguide geometries quickly and efficiently using the 2.5D variational FDTD solver
Optimize long passive devices such as tapers, Bragg gratings and MMI couplers efficiently using the
eigenmode expansion solver
Plasmonic waveguides 1883 and components arrayed waveguide gratings (AWGs) 2119

FDTD Solutions and MODE Solutions:


Finite-difference Eigenmode solver 109 automatically calculates the physical properties of guided modes,
including the mode profiles, effective index, propagation constant, propagation loss, dispersion, bending
loss, group velocity, group dispersion

2003 - 2016 Lumerical Solutions, Inc


2020 Lumerical Knowledge Base

Passive S parameters can be easily extracted to be used in a circuit-level simulation in INTERCONNECT.


Lumericals conformal mesh technology can provide sub-mesh cell modeling accuracy.
Multi-Coefficient Materials (MCMs) can accurately model dispersive materials across wide wavelength
ranges
Built-in parameter sweep 699 and optimization algorithms 716 make it easy to analyze and optimize
parameterized designs

Getting started
Relevant videos (login required):
Passive components and electro-optic modulators
Grating couplers design and optimization
Bragg waveguide gratings and resonators
Eigenmode expansion solver and applications

Download relevant products:


FDTD Solutions
MODE Solutions

Product introductory videos:


FDTD Solutions
MODE Solutions

Product introductory examples:


(FDTD Solutions) Ring resonator tutorial 2039
(MODE Solutions) Plasmonic waveguide 1883
(MODE Solutions) Spot size converter 2053
More ... 171

Application examples
Solvers Description
101

FDTD Grating couplers 2075

FDE, Waveguide couplers 2108

varFDTD
FDE, Tapers 2124

EME,
varFDTD
FDE Impedance 2141

FDE Waveguides 2163

FDE Polarization control 2171

FDE, Fibers 2177

EME

8.3.1.1 Getting Started


The passive components getting started guide provides several tutorials with step by step instructions on how to
simulate a variety of passive components. An introduction to the basic functionality of the relevant solver is given
followed by application specific examples. All simulation and script files used in the tutorials are available for
download.

Passive component design

2003 - 2016 Lumerical Solutions, Inc


Applications 2021

Ring resonator MODE (design and initial simulation) 2021

The example will show how to design and simulate a ring resonator using the
FDE solver to achieve a desired free spectral range (FSR) and quality factor
(Q factor) for a silicon on insulator (SOI) based waveguide design targeting
on-chip communication applications.

The user will learn to:


Insert a ring resonator object from the components library
Use the Eigenmode Solver to choose the waveguide spacing, coupling
length and ring length for the desired FSR and Q factor
Compare results with the theoretical design and 3D FDTD results

Ring resonator MODE (parameter extraction and yield


analysis) 2033

This example will use the initial design introduced in Ring Resonator (design
and initial simulation) 2021 to perform additional analysis with the varFDTD
solver.

The user will learn to:


Use Mode Expansion Monitors 649 to extract the parameters for interfacing
with circuit level simulations in INTERCONNECT.
Compare the S parameter results with 3D FDTD.
Use the Yield Analysis 728 feature to track the effect of fabrication errors on
the free spectral range (FSR) of the ring resonator.

Ring resonator FDTD (final parameter extraction with 3D


FDTD) 2039

The example will show how to set up the same ring resonator simulation in
3D FDTD and extract the S parameter results.

Ring Resonator INTERCONNECT (circuit simulation) 2053

See how to design and simulate a ring resonator using INTERCONNECT.

Spot size converter 2053

This example will show how to design and simulated a spot size
converter that can efficiently couple light from a strongly confined high
index contrast silicon waveguide into an optical fiber, using the EME
solver.

The user will learn to:


Set up an EME simulation
Quickly scan the length of the spot size converter to find the optimal design
Compare results with 3D FDTD results

8.3.1.1.1 Ring resonator MODE (design and initial simulation)

Problem definition
This is Part 1 of the ring resonator getting started tutorial. Here, we will consider how MODE Solutions can be used
to design and simulate a ring resonator. We will use the software to achieved a desired free spectral range (FSR)
and quality factor (Q factor) for a silicon on insulator (SOI) based waveguide design targeting on-chip communication

2003 - 2016 Lumerical Solutions, Inc


2022 Lumerical Knowledge Base

applications. In Part 2, Ring resonator (parameter extraction and yield analysis) 2033 , we will consider how to carry
out the parameter extraction and yield analysis process for this design.

Solvers 101
FDE
varFDTD
Associated files
ring_resonator.lms
ring_resonator.fsp
fdtd_results.ldf
ring_resonator.lsf
ring_resonator_fdtd.
lsf

In this topic
Discussion and results 2028
Modeling instructions 2022

References
Hammer, M. and Hiremath,
K.R. and Stoffer, R. (2004)
Analytical approaches to
the description of optical
microresonator devices.
(Invited) In: Microresonators
as Building Blocks for VLSI
Photonics, 18-25 October
2003, Erice, Italy. pp. 48-71.
AIP Conference
Proceedings 709. Springer.
ISSN 0094-243X ISBN 978-
0-7354-0184-6

Learning objectives
In this example, we show how MODE Solutions can be used to design a ring resonator. The user will learn to:
Insert a ring resonator object from the components library
Use the Eigenmode Solver to choose the waveguide spacing, coupling length and ring length for the desired FSR
and Q factor
Compare results with the theoretical design and 3D FDTD results

8.3.1.1.1.1 Modeling instructions


This page contains 6 independent sections. The first section describes how to setup the model. You can skip this
step, open the associated .lms file and proceed to the following steps if you want to know the results first. Section 2
and section 3 use the eigenmode solver and the analytical results from the discussion and results section to design
the ring resonator. The fourth and sixth sections discuss how to set up the propagator simulation. The fifth section
shows how to compare the propagator results with analytical and 3D FDTD results.

In this topic
Create Ring Resonator 2022
Add Eigenmode Solver and Find group index 2023
Determine Coupling Length 2024
Update Ring Resonator properties and Run Propagator Simulation 2024

Compare dropped optical power with 3D FDTD and theory 2027


Add other monitors to the propagator simulation 2027

Create Ring Resonator


Begin by starting MODE Solutions. You can save the MODE Simulation Project file (.lms) at any point in this

2003 - 2016 Lumerical Solutions, Inc


Applications 2023

process. To do so, choose SAVE in the FILE menu.

Press on arrow on the STRUCTURES button and select a RECTANGLE from the pull-down menu.
Set the properties of the insulator substrate rectangle according to the following table.
tab property value
Geometry x ( m) 0
x span ( m) 16
y ( m) 0
y span ( m) 16
z ( m) -2
z span ( m) 4
Material material SiO2 (Glass) - Palik

Press on arrow on the COMPONENTS button and select INTEGRATED OPTICS from the pull-
down menu. This will open the object library window.
Select RING RESONATOR from the list and press the INSERT button.
Set the properties of the ring resonator according to the following table. The coupling length and radius used for
the first part of the simulation are just an initial guess and will be modified to the correct values later.
tab property value
Properties x, y, z ( m) -7,0,0.09
Lc ( m) 0
gap ( m) 0.1
radius ( m) 4
material Si (Silicon) - Palik
base width ( m) 0.4
base height ( m) 0.18
x span ( m) 14
base angle 90

Add Eigenmode Solver and Find group index

Press on the arrow on the on the SIMULATION button and select the EIGENSOLVER from the pull-
down menu. Set the properties according to the following table. This will place the eigensolver region at the input
bus for the ring resonator.
tab property value
General solver type 2D X normal
Geometry x ( m) -5
y ( m) 3.6
y span ( m) 4
z ( m) 0.075

2003 - 2016 Lumerical Solutions, Inc


2024 Lumerical Knowledge Base

z span ( m) 1
Mesh settings mesh cells z 100
mesh cells y 200

Press on the RUN button to open the eigenmode solver analysis window. Press on the MESH STRUCTURE
button to plot the meshed structure. Set the wavelength to 1.5 microns.
Click the "Calculate Modes" button and then, select the mode of interest (mode #1) in the Mode list
Switch to the frequency analysis tab and set the following parameters:
property value
track selected mode yes
stop wavelength (um) 1.6
number of points 4
detailed dispersion calculation yes
Click on the FREQUENCY SWEEP button to begin the scan. The scan will take about a minute.
To plot the calculated dispersion as a function of wavelength, select the FREQUENCY PLOT tab in the bottom
righthand corner of the frequency analysis window. Then select "group index" in the plot pull down menu. The plot
can be seen above the frequency plot tab. If you press the PLOT IN NEW WINDOW you will get a new window. If
you zoom into the plot, you can see that at 1.55 microns, the group index is about 4.63.

Determine Coupling Length

Press the SWITCH TO LAYOUT button . This deletes all the mode data and allows us to edit the
eigenmode solver.
Move the center of mode solver to x = 0 so that the mode solver is located in a region where two waveguides cross
the mode solver.

Press on the RUN button to open the eigenmode solver analysis window. Press on the MESH STRUCTURE
button to plot the meshed structure. Set the wavelength to 1.55 microns, and press FIND MODES.
The neff values for the first and second modes are given in the mode list. We can plug in these neff values into an
analytical formula (see the discussion and results page) in order to determine the coupling length.

Update Ring Resonator properties and Run Propagator Simulation

Press the SWITCH TO LAYOUT button so that it is possible to edit the simulation.
Set the properties of the ring resonator using the values of the coupling length and the radius determined from the
previous steps, ie
tab property value
Setup Variables radius ( m) 3.1

Press the arrow on the on the SIMULATION button and select the varFDTD from the pull-down
menu.
Set the properties according to the following table.
tab property value
General simulation time (fs) 5000

2003 - 2016 Lumerical Solutions, Inc


Applications 2025

Geometry x ( m) 0
x span ( m) 10
y ( m) 0
y span ( m) 10
z ( m) 0
z span ( m) 1
Effective index bandwidth broadband
There is a green cross in the graphical user interface which sets the location of the core slab mode for the
propagator. Click on PROP object to select the cross and then drag it so that it overlaps with the Silicon portion of
the ring resonator.
Since the effective index is a broadband material, the propagator finds a material fit to the effective index data

before running the simulation. Press on the arrow next to the CHECK button and select the MATERIAL
EXPLORER. This will open the material explorer, where you can check the fit to the slab mode at the location you
just selected. You can also see the material fit for the test materials (which are shown by blue crosses in the
graphical user interface).
Next, re-edit the propagator region and select the EFFECTIVE INDEX tab. The plot of the slab mode should look
like the image below.

Press the arrow on the on the SOURCES button and select the MODE source from the pull-down
menu. Set the properties according to the following table.
tab property value
Geometry x ( m) -4.5
y ( m) 3.6
y span ( m) 3
Frequency/Wavelength wavelength start ( m) 1.5
wavelength stop ( m) 1.6
In the previous step we calculated the coupling length from the effective index difference from the mode solver. You
can see the effective index difference which the propagator sees by setting x = 0 so that the mode source is in
between two waveguides. Then choose to user select the modes. This technique is shown in a bit more detail in
the waveguide couplers application example in the MODE Solutions online help.

Add monitors for the propagator simulation

2003 - 2016 Lumerical Solutions, Inc


2026 Lumerical Knowledge Base

Press on the arrow on the on the Monitors button and select the frequency domain field and power

monitor from the pull-down menu. Set the properties according to the following table
tab property value
name drop
Geometry monitor type Linear Y
x ( m) -4.2
y ( m) -3.6
y span ( m) 2
General override global monitor settings yes
frequency points 500

Press the DUPLICATE button to create a copy of the monitor. Set the properties according to the following
table.
tab property value
name through
Geometry x ( m) 4.2
y ( m) 3.6

Press on the arrow on the on the Monitors button and select the field time monitor from the pull-down menu.
Set the properties according to the following table
tab property value
name time_drop
Geometry x ( m) -4.2
y ( m) -3.6

Press the DUPLICATE button to create a copy of the monitor. Set the properties according to the following
table
tab property value
name time_through
Geometry x ( m) 4.2
y ( m) 3.6

Run simulation and plot results

Press on the RUN button to run the propagator simulation. The job manager will appear and show the
progress for the simulation.
Once the simulation finishes running, all the monitors and analysis groups in the object tree will be populated with
data. The Results View window (which can be opened by clicking on the "Show result view" button) will display all
the results and their corresponding dimensions/values for the selected object. Plot the time signal and spectrum
Ey by right-clicking on the "time_drop" time monitor and selecting Visualize -> E or spectrum. (The field profiles
can also be visualized in the same way.)

2003 - 2016 Lumerical Solutions, Inc


Applications 2027

Compare dropped optical power with 3D FDTD and theory


The files which are mentioned in this section can be found in the Examples subdirectory of the installation directory,
or downloaded from the online MODE Solutions Knowledge base.

Open the script file editor.

Press on the OPEN button and browse to the ring_resonator.lsf script file.
Save the fdtd_results.ldf file in the same folder. This lumerical data file (*.ldf) contains the results from
the 3D FDTD simulation. This data file can also be created by running the ring_resonator.fsp 3D FDTD
simuluation followed by the ring_resonator_fdtd.lsf script file. The aforementioned script file will
automatically generate the data file.

Press on the RUN SCRIPT button . The script will calculate the theory and send a data set to the visualizer.
The data set contains the analytical, the 3D FDTD and the propagator transmission through the drop channel (or
output bus).
By default there will only be one copy of the data set. Press on the duplicate button twice to create two more
copies of the data set. You can see the duplicate button in the left part of the screenshot below.
As shown in the screenshot below, set the attributes of each copy of the data set so that they plot a different
transmission. Once you have done this, you will see the three transmission plots in one figure in the Visualizer.

Add other monitors to the Propagator simulation


The ring_resonator.lms simulation which is included in the Examples subdirectory of the installation directory,
or can be downloaded from the online MODE Solutions Knowledge base contains three additional monitors which
have not been included in the above instructions.

The three additional monitors are


a field profile monitor
a movie monitor
an effective index monitor

2003 - 2016 Lumerical Solutions, Inc


2028 Lumerical Knowledge Base

Field profile monitor


The field profile can be created similar to the add and drop monitors which were created earlier. The field profile
monitor in this example was set up after the simulation ran to completion once. That way, we can only set the
monitor to record data exactly at a frequency which corresponds to the maximum power dropped through the drop
monitor.

Movie monitor
To add a movie monitor to the simulation, press on the arrow on the on

the Monitors button and select the movie monitor from the
pull-down menu.
Movie monitors are always 2 dimensional and show the progress of the
2D portion of the propagator simulation, which is run after the
propagator compresses the z-dimension of the propagator region.
In the ring_resonator.lms simulation, note that the general tab is
set up to plot the Ey component of the field (since the TE slab mode is
chosen for the propagator). Also, notice that the scale is reduced from a
default of 1 to a setting of 0.1 so the fields are more visible in the movie
By default the movie monitor is set as inactive. It is possible to activate/
deactivate the movie monitor by right clicking on the object with the
mouse as shown in the screenshot to the right. When the movie
monitor is active, a movie with the same name as the movie monitor is
saved in the current working directory. The movie monitors are disabled
in the simulation because the simulation takes longer to run when
movie monitors are enabled.

Effective index monitor


The effective index monitor is also created similar to the other monitors in the simulation. It shows how the
simulation volume is compressed in the z dimension. In contrast, an index monitor will only plot the refractive index
of the structure. Further details can be found in the Simulation Objects 637 chapter.

8.3.1.1.1.2 Discussion and results

Basic concepts of Ring Resonators from a designer's point of view


The most basic configuration of the microring resonator is shown in the image below. It consists of a ring-shaped
waveguide coupled to two optical waveguides. The cavity mode is excited by evanescent coupling between closely
spaced optical waveguides.

2003 - 2016 Lumerical Solutions, Inc


Applications 2029

The major defining quantities are the average (effective) ring length L, the complex propagation constant of the
circulating mode, the field transmission coefficients of the waveguide coupler t11 and t12, and the bend loss.

The real part of the propagation constant is the phase constant. The total ring loss is due to the imaginary part of
beta, the bend loss, and other scattering losses at the coupling region. For the high index contrast waveguides we
are considering, at wavelengths around 1550nm, the propagation loss and bend loss are small. For this analysis we
will neglect all losses, but the different loss contributions could easily be considered in a more detailed analysis.

For the case of the ring-shaped waveguide coupled to two optical waveguides, the dropped optical power can be
expressed as
4
t12
PD = PIN 2
1 - t112 e i bL

On resonance, the phase acquired by the wave after a complete round-trip is an integer multiple of 2 , i.e., L =
2 N, with N as the mode number. If the effective refractive index is independent of wavelength, then ring length (also
called the perimeter) is an integer multiple of the effective wavelength on resonance, or L = N0/neff, where the
effective refractive index is defined as neff = c/ and 0 = c/f0 is the free-space wavelength at the resonance
frequency f0.

In reality, the effective index does depend on wavelength and the resonances are separated by the free spectral
range (FSR) which, in wavelength units, is given by
l2
FSR =
ng L
where ng = c(d/d ) is the group index.

Since the bending loss is low for high index waveguides, and we are ignoring other sources of loss, the Q factor is
approximately given by

l ng L p t11
Q= =
2 dl l 1 - t11 2

We will now use the above formulas to design a ring resonator for a WDM system with a channel spacing of 200GHz
(1.6nm at 1550nm). We want to design the system to drop every 16th channel. The FSR should therefore be
3200GHz (25.6nm at 1550nm). We would like the FWHM of the drop to be 100GHz, corresponding to a Q of

2003 - 2016 Lumerical Solutions, Inc


2030 Lumerical Knowledge Base

approximately 1550nm/0.8nm ~ 2000.

We will use a system made of an SOI waveguide. The waveguide is 400nm wide and 180nm high.

Ring resonator design


Step 1: Find total length of the ring needed to obtain desired FSR
We use the Eigenmode Solver on the 3D waveguide cross section to calculate the group index from 1500nm to
1600nm. We see that the group index is approximately 4.63 at 1550nm. This is significantly larger than the effective
index at this wavelength.

Now that we know the group index, we can easily calculate the total desired ring length.
c
L= 20.2 mm
ng FSR

Step 2: Find the length and gap of the coupler segment


We want to design a resonator with a Q factor of 1.55mm/0.8nm ~ 2000. We can solve for the amplitude of t for a
given Q with
2

t11
n Lp
= g
+1 -
ng L p
2Q l
2Q l
Using our known group index, ring length and center wavelength, we find t11 ~ 0.95 and therefore t12 ~ 0.31

If we use the Eigenmode Solver to calculate the index of the coupled waveguide system, we know that the coupling
length can be determined from the difference in effective index of the symmetric and anti-symmetric coupled modes
by the formula
l
Lcoupler = sin -1 ( t12 )
pDn

2003 - 2016 Lumerical Solutions, Inc


Applications 2031

Symmetric mode (Ey) Anti-Symmetric mode (Ey)

Using a 100nm gap between the waveguides, we find delta-n = 0.109 at 1550nm. This gives a coupling length of
approximately 1427nm. In reality, we will use a coupling length of 0 and will obtain enough coupling from the bent
section of the ring near the straight waveguide.

The radius of the ring can be chosen such that we have the desired coupling length and the desired total ring length.
For the remainder of the example, we will use a radius of 3.1 microns, and we will use this design for the Propagator
simulation in the next step.

Propagator Simulation
In this Propagator simulation, the MODE source will calculate the fundamental TE mode of the waveguide,and use
this to inject a guided mode into the upper waveguide. For an overview of the 2.5D variational FDTD solver, see the
Lumericals 2.5D FDTD Propagation Method whitepaper on our website.

The ring resonator is a high Q device which traps the light for many round trips in the ring. These high Q devices
require longer simulation times in the time domain than non-resonant devices. We will start with a simulation time of
5000fs, although more time may be necessary. Note that this is longer than our default simulation time (1000fs). It is
important to increase the simulation time because the frequency domain monitor results are incorrect if the
simulation time is not set long enough for the fields to decay.

After running the simulation, we can consider the E field intensity near a drop resonance.

2003 - 2016 Lumerical Solutions, Inc


2032 Lumerical Knowledge Base

Results
We can compare the result with the theoretical curve based on our target FSR and Q. Note that we have adjusted
the phase of the coupling coefficient to align the peaks near 1550nm, since only the amplitude of the coupling
coefficient is given by Q.

The results are in reasonable agreement for the theoretical FSR but the Q factor is incorrect. This is due to
neglecting all sources of loss in the theoretical curve calculation
not achieving exactly the desired value of t12

The 3D FDTD simulation shows lower total transmission because it accounts for more sources of loss.

Note that we have adjusted the theoretical peaks to give a maximum at 1550nm. The precise position of this peak is
very sensitive to the exact optical length of the ring.

Next Steps
Please see Part 2 of the ring resonator tutorial: Ring resonator (parameter extraction and yield analysis) 2033 , where
we will consider how to carry out the parameter extraction and yield analysis process for this design.

2003 - 2016 Lumerical Solutions, Inc


Applications 2033

8.3.1.1.2 Ring resonator MODE (parameter extraction and yield analysis)

Problem definition
This is Part 2 of the ring resonator getting started tutorial. Here, we will consider how to carry out the parameter
extraction and yield analysis process for the design that we introduced in Ring resonator (design and initial
simulation) 2021 . Please go through this example before proceeding.

Solvers 101
varFDTD
Associated files
ring_resonator2.lms
ring_resonator2_yield.lms

In this topic
Discussion and results 2036
Modeling instructions 2033
References
Hammer, M. and Hiremath, K.R. and Stoffer, R. (2004)
Analytical approaches to the description of optical
microresonator devices. (Invited) In: Microresonators as
Building Blocks for VLSI Photonics, 18-25 October 2003,
Erice, Italy. pp. 48-71. AIP Conference Proceedings 709.
Springer. ISSN 0094-243X ISBN 978-0-7354-0184-6

Learning objectives
In this example, the user will learn to:
Use Mode Expansion Monitors 649 to extract the parameters for interfacing with circuit level simulations in
INTERCONNECT.
Compare the S parameter results with 3D FDTD.
Use the Yield Analysis 728 feature to track the effect of fabrication errors on the free spectral range (FSR) of the
ring resonator.

8.3.1.1.2.1 Modeling instructions


This page contains 3 independent sections. The first section (Parameter extraction) describes how to setup the
mode expansion monitors for parameter extraction. If you prefer to skip this section,the completed simulation files
are provided on the first page of the tutorial. The second section describes how to use the S parameter results from
the first section in a circuit level simulation in INTERCONNECT. The final section shows how to track the effect of
fabrication errors on the free spectral range (FSR) of the ring resonator by performing yield analysis.

In this topic
Parameter extraction 2033

Yield analysis 2035

Parameter extraction

Mode expansion monitors


We will start with the file ring_resonator.lms from Ring resonator (design and initial simulation) 2021 .

Open the ring_resonator.lms file and run the simulation.


Before adding the mode expansion monitor, please read the following page on the calculations behind mode
expansion monitors: Mode Expansion Monitors 649 .

Add a mode expansion monitor by pressing on the arrow on the Monitors button and select the Mode

2003 - 2016 Lumerical Solutions, Inc


2034 Lumerical Knowledge Base

expansion monitor from the pull-down menu. Set the properties according to the following table. (Note that you can
add mode expansion monitors in layout or analysis mode, so it is not necessary to switchtolayout if the
simulation has already been ran.)
tab property value
name expansion
Geometry monitor type Linear Y
x ( m) -4.2
y ( m) 3.6
y span ( m) 3
z (um) 0
z span (um) 2
We have positioned this monitor directly in front of the MODE source, and we will use the fundamental mode of the
top waveguide to expand the field at the 4 ports of the ring resonator.
In the Mode expansion tab, select the fundamental mode for "Mode calculation". You can use the Visualize Mode
Data button to study the field profile for this mode.
In the "Monitors for expansion table", select the 4 power monitors we have set up at the 4 ports of the Ring
Resonator as follows:

Plot results
Once the mode expansion monitor has been defined, you will see the list of results in the Result
VIew panel. Multi-select the modal expansion results and select "Calculate". Once the calculations
are complete, one can plot the results in the Visualizer.

Note that when the Visualizer first opens up, you will see a list of all the attributes of all the results. One can use the
"Remove" button on the right side of the attribute panel to remove any unwanted attributes, keeping only the relevant
ones. For a complete description of all the results from the mode expansion monitors, please refer to Mode
Expansion Monitors 649 .

S parameter calculations
In ring_resonator2.lms, the model analysis group in the provided pre-made simulation file has been set up to

2003 - 2016 Lumerical Solutions, Inc


Applications 2035

calculate the S parameters. Since the expansion monitor automatically returns the expansion coefficients for the
forward and backward propagating light (a and b), we can calculate the S parameters very straightforwardly. The
calculations can be found in the script under the Analysis tab of the "model" group, this script will also export the S
parameter results into a .txt file, which can be imported directly by INTERCONNECT.

As shown in the figures above, the Results View will automatically show the S parameters result returned by the
model analysis group. One can then visualize this result by right-clicking on "S" and selecting Visualize.

Yield analysis
To test how our design is affected by fabrication errors, we can use either a parameter sweep or an yield analysis
project.
In ring_resonator2_yield.lms, a "FSR" analysis group has been added, which will return the FSR by finding
the peaks in the transmission spectrum of the "through" monitor. We will track the change in the FSR as a function
of the waveguide width and height, assuming a fabrication error of 10nm.

Parameter sweep
A nested parameter sweep project has been set up to track the change in FSR as a function of the width of the
waveguide (from 0.39 to 0.41 microns) and the height of the waveguide (from 0.17 to 0.19 microns). Once the sweep
is complete, one can plot the map of the FSR as a function of the waveguide height and width to see how the result
deviates from the original design as a result of this 10nm fabrication error.

Yield analysis
An yield analysis project has also been set up to vary the width of the waveguide based on a Gaussian distribution
centered at 0.4 microns, with a standard deviation of 0.01 microns. Once this is run, we will be able to see whether
the FSR falls within our target specification range of 27nm to 27.5nm.

2003 - 2016 Lumerical Solutions, Inc


2036 Lumerical Knowledge Base

8.3.1.1.2.2 Discussion and results

Parameter extraction results


The ring resonator is a 4 port device, which we we can label 1 through 4, as shown below. We can use a mode
expansion monitor to calculate the complex mode expansion coefficient for both forward and propagating modes in
each waveguide. This allows us to easily construct the 16 parameter S matrix which can be exported for use in
INTERCONNECT. In reality, this device is so symmetric, that only 4 coefficients of the S matrix need to be
calculated - for example, S11=S22=S33=S44.

The mode expansion monitor is setup to calculate the amount of forward and backward propagating power in the
fundamental TE mode for the 4 monitors at the input and output ports. First, we can look at this in the Visualizer.
Note that this analysis takes several seconds because each waveguide mode is recorded over 500 frequency points.
To speed up the calculation, we have used a single mode at the center frequency for the expansion, however we
could calculate more mode profiles over the device bandwidth to obtain a more accurate expansion. Once
calculated, the expansion is stored in memory and will be saved to the .lms file for quick future reference. The figure
below shows the amount of power reflected in port 1 and transmitted through ports 2, 3 and 4 (T forward/T
backward).

2003 - 2016 Lumerical Solutions, Inc


Applications 2037

It is interesting to note the resonant reflection and transmission that is occurring at port 1 and port 4 (blue and
green). The power reflected and leaking out port 4 is equivalent. These are due to weak coupling between forward
and backward propagating modes in the ring, which can have a substantial effect due to the high Q of the device.

As mentioned in the Modeling instructions 2033 section, the model itself is an analysis group that is setup to calculate
the S parameters. Select the model and use the Results Manager to calculate the S matrix. During the calculation,
S11, S21, S31 and S41 are saved to the text file FDTDtoINTERCONNECT.txt which can be used to create a ring
resonator element in INTERCONNECT. The different S parameters can be easily visualized. For example, below we
see the phase of S21 and S31. We can see the effect of the resonances which lead to sudden changes in the slope
of the phase which indicates the sudden change in group delay at resonance.

Comparing with 3D FDTD

2003 - 2016 Lumerical Solutions, Inc


2038 Lumerical Knowledge Base

The same ring resonator is modeled using 3D FDTD in the Ring Resonator FDTD section 2039 , and the results are
shown below:

These are in reasonable agreement with the Propagator results shown in the previous section (especially in the
FSR). There are some differences in the Q factors, which is not too surprising as FDTD accounts for more sources
of loss. That being said, one can go a long way towards optimizing the design with only Propagator simulations.
Below is a summary of the simulation requirements for the two types of solvers:

Note that this is a relatively small simulation (10x10um span in the x/y directions). Typical simulations with ring
resonators or other silicon photonic devices require much larger simulation regions and much longer simulation
times. In that case, it is even more important to consider using MODE Solutions' Propagator, which may lead to a
significant amount of time savings.

Yield analysis
To make sure that the actual device will work as expected, it is often necessary to consider imperfections that can
result from the fabrication process. To do this, we first set up a nested parameter sweep to track change in FSR as
a function of the waveguide height and width (assuming fabrication error of 10nm). The following figure shows the
map of the FSR vs waveguide height and width:

2003 - 2016 Lumerical Solutions, Inc


Applications 2039

Then, in the yield analysis, we can define the target range for the FSR. Once the simulations finishes running, the
log at the bottom of the "Yield analysis status" window will show the calculated yield percentage which corresponds
to the percentage of trials that falll within the specified yield estimate range. One can also plot the FSR histogram as
shown below. (Note that even though we are only considering the FSR in this example, it is very straightforward to
extend this analysis to take into account other properties such as the shift in the resonance peaks, the Q factors ...
etc using the same methodology.)

The parameter sweep and yield analysis shown in this example required more than 100 simulations. More
simulations will be necessary if we want to change more parameters. This is another reason to consider using the
Propagator instead of running 3D FDTD simulations.

8.3.1.1.3 Ring resonator FDTD (final parameter extraction)

Problem definition
The device being studied in this example is a ring resonator filter. It consists of two waveguides (through and

2003 - 2016 Lumerical Solutions, Inc


2040 Lumerical Knowledge Base

drop channels) connected by a ring. As the input mode propagates past the ring, a fraction will couple into the ring.
Due to the circular nature of a ring, the mode will circulate around the ring many times. As the mode circulates, it
will interfere with itself. The interference pattern is strongly wavelength dependent, which is why these devices can
be used as filters. Some wavelengths will pass through the device, while other wavelengths will be re-directed into
the drop channel.

We will use FDTD Solutions to study the same ring resonator in 3D that was designed in a varFDTD simulation
using MODE Solutions. We will then show how we can extract S parameters that can be used for circuit level
simulations in INTERCONNECT.

We will start with the geometric parameters determined in the MODE Solutions getting started example.

Solvers 101

FDTD
Associated files
ring_resonator.fsp
ring_resonator_fdtd.lsf
fdtd_results.ldf
ring_resonator.lsf

In this topic
Discussion and results 2047
Modeling instructions 2040
See also
Making a cw movie 644

8.3.1.1.3.1 Modeling instructions


This page contains 4 independent sections. The first section (Object setup) describes how to setup the simulation
from a blank simulation file. If you prefer to skip this section, a copy of the completed simulation file is provided on
the first page of the tutorial. The final three sections describe how to run the simulation, plot simulation results like
field profiles and transmission spectra, and calculate the S parameters for this ring resonator device.

In this topic
Object setup 2040
Run simulation 2044
Plot results 2044
Calculate S parameters 2046

Object setup
We will start with the geometric parameters determined in the MODE Solutions getting started example.

Structure
Open a blank simulation file.
Press on aarrow on the STRUCTURES button and select a RECTANGLE from the pull-down menu. Set the
properties of the insulator substrate rectangle according to the following table.
tab property value
Geometry x ( m) 0
x span ( m) 22
y ( m) 0
y span ( m) 16
z ( m) -2

2003 - 2016 Lumerical Solutions, Inc


Applications 2041

z span ( m) 4
Material material SiO2 (Glass) - Palik

Press on arrow on the COMPONENTS button and select INTEGRATED OPTICS from the pull-down
menu. This will open the object library window.
Select RING RESONATOR from the list and press the INSERT button.
Set the properties of the ring resonator according to the following table. The coupling length and radius used for
the first part of the simulation are just an initial guess and will be modified to the correct values later. The value of
the index property of the ring resonator is not used unless the material is specified as <Object defined dielectric>,
so it's value can be arbitrary.
tab property value
Properties x, y ( m) -12.5, 0
z ( m) 0.09
Lc ( m) 0
gap ( m) 0.1
radius ( m) 3.1
material Si (Silicon) - Palik
base width ( m) 0.4
base angle (degrees) 90
base height ( m) 0.18
x span ( m) 25

FDTD Region

Press on the SIMULATION button to add a simulation region. Note that if your button does not look
like the button to the left, you will need to press on the arrow to get the simulation region. Set the properties
according to the following table.
tab property value

General simulation time (fs) 4000


Geometry x ( m) 0
x span ( m) 9
y ( m) 0
y span ( m) 10
z ( m) 0
z span ( m) 1
Mesh settings mesh accuracy 1 or 2

Source

Press the arrow on the on the SOURCES button and select the MODE source from the pull-down
menu. Set the properties according to the following table.
tab property value

2003 - 2016 Lumerical Solutions, Inc


2042 Lumerical Knowledge Base

General mode selection fundamental TE mode


Geometry x ( m) -4.5
y ( m) 3.6
y span ( m) 3
z (um) 0
z span (um) 2
Frequency/ wavelength start ( m) 1.5
Wavelength
wavelength stop ( m) 1.6

Monitors

We will set up power monitors at the 4 ports of the ring resonator to calculate the transmission through each port,
and the S parameters.

Press on the arrow on Monitors button and select the frequency domain field and power monitor
from the pull-down menu. Set the properties according to the following table
tab property value
name drop
Geometry monitor type 2D X-normal
x ( m) -4.2
y ( m) -3.6
y span ( m) 3
z (um) 0
z span (um) 2

Use the DUPLICATE button to create three copies of the monitor. Set the properties according to the
following tables.
tab property value
name drop2
Geometry x ( m) 4.2
y ( m) -3.6

tab property value


name in
Geometry x ( m) -4.2
y ( m) 3.6

tab property value


name through
Geometry x ( m) 4.2
y ( m) 3.6

2003 - 2016 Lumerical Solutions, Inc


Applications 2043

We will also place time monitors at each port to study the field as a function of time.

Press on the arrow on the on the Monitors button and select the field time monitor from the pull-down menu.
Set the properties according to the following table
tab property value
name t_drop
Geometry x ( m) -4.2
y ( m) -3.6

Use the DUPLICATE button to create three copies of the monitor. Set the properties according to the
following tables.
tab property value
Name t_drop2
Geometry x ( m) 4.2
y ( m) -3.6

tab property value


name t_in
Geometry x ( m) -4.2
y ( m) 3.6

tab property value


name t_through
Geometry x ( m) 4.2
y ( m) 3.6
We will also add a profile monitor to study the field distribution at different frequencies. Press on the arrow on the

Monitors button and select the frequency domain field monitor from the pull-down menu. Set the
properties according to the following table.
tab property value
name full_profile
General override global monitor settings select check box
frequency points 5
Geometry monitor type 2D Z-normal
x ( m) 0
y ( m) 0
x span ( m) 16
y span (um) 12
z (um) 0

Lastly, we will add the Mode expansion monitor for the S parameters calculation. Press on the arrow on the

2003 - 2016 Lumerical Solutions, Inc


2044 Lumerical Knowledge Base

Monitors button again and select the Mode expansion monitor from the pull-down menu. Set the properties
according to the following table.
tab property value
name expansion
Geometry monitor type 2D X-normal
x ( m) -4.2
y ( m) 3.6
y span ( m) 3
z (um) 0
z span (um) 2

We have positioned this monitor directly in front of the MODE source, and we will use the fundamental mode of the
top waveguide to expand the field at the 4 ports of the ring resonator.
In the Mode expansion tab, select the fundamental TE mode for "MODE calculation". You can use the Visualize
Mode Data button to study the field profile for this mode.
In the "Monitors for expansion tabl"e, select the 4 power monitors we have set up at the 4 ports of the Ring
Resonator as follows:

Setup resources. Run simulation

Press the Resources button and check the number of processes (number of cores) for the local
machine. If you have additional computers on the network with FDTD installed as well as extra engine licenses,
you can add them to the resource list. Click "Add" and set the appropriate properties.
Press the "Run Tests" button to make sure the simulation engines on the resources are configured correctly. The
first time you run this test, it may fail and ask you to register your username and password for your operating
system account. If it does, fill in the appropriate text fields, press "Register", then "OK", and re-run the tests. If
there are any errors or warnings, they will appear in the "Result" field.

Run the simulation by pressing the RUN button .

Plot results
Once the simulation finishes running, all the monitors and analysis groups in the object tree will be populated with
data. The Results View window (which can be opened by clicking on the "Show result view" button) will display all
the results and their corresponding dimensions/values for the selected object. Plot the time signal and spectrum
Ey by right-clicking on the "t_drop" time monitor and selecting Visualize -> E or spectrum.

2003 - 2016 Lumerical Solutions, Inc


Applications 2045

You can then select which components of the E field data you want to plot in the Visualizer. The screenshot
below shows how to plot the real part of the y component of the electric field.

To plot the transmission through the through monitor, right-click on the "through" power monitor and select
Visualize->T.
To plot the magnetic field intensity at 1.52 microns, right-click on the full_profile monitor and select Visualize->H
and select the appropriate wavelength.

2003 - 2016 Lumerical Solutions, Inc


2046 Lumerical Knowledge Base

Calculate S Parameters
The model analysis group in the provided pre-made simulation file has been set up to calculate the S parameters.
Since the expansion monitor automatically returns the expansion coefficients for the forward and backward
propagating light (a and b), we can calculate the S parameters very straightforwardly. The calculations can be found
in the script under the Analysis tab of the "model" group, this script will also export the S parameter results into a
.txt file, which can be imported directly by INTERCONNECT.

2003 - 2016 Lumerical Solutions, Inc


Applications 2047

As shown in the figures above, the Results View will automatically show the S parameters result returned by the
model analysis group. One can then visualize this result by right-clicking on "S" and selecting Visualize.

8.3.1.1.3.2 Discussion and results

Simulation set up
FDTD Solutions contains a mode source with an integrated mode solver. This source will be used to inject a guided
mode into the upper waveguide. The mode source is set to calculate the fundamental TE mode of the waveguide.

In the screen shot shown to the left below, the mode source injection plane is drawn with a white outline and grey
shaded region where it is inside the FDTD simulation region. The injection direction is depicted with the pink arrow.
The line on the image on the right shows the mode profile |E|^2 that will be injected by the mode source. The mode
profiles can be viewed simply by right clicking on the mode source object, or using the Results Manager window
when the mode source is selected. You can also view the mode profile by editing the mode source object.

Notice that the mode profile goes to zero at each edge of the image. For accurate simulations, it is important that
the mode source be large enough to contain the entire mode. If the mode source is too small, the mode will be
truncated, leading to simulation errors. Similar rules apply to the FDTD simulation region, shown as an orange box.
The absorbing PML boundaries of the simulation region can not be placed too close to the structure, or they will clip
the mode.

2003 - 2016 Lumerical Solutions, Inc


2048 Lumerical Knowledge Base

The ring resonator is a high Q device which traps the light for many round trips in the ring. These high Q devices
require longer simulation times in the time domain than non-resonant devices. Based on the MODE Solutions
example, we will start with a simulation time of 4000fs, although more time may be necessary.

This is longer than our default simulation time (1000fs). It is important to increase the simulation time because the
frequency domain monitor results are incorrect if the simulation time is not set long enough for the fields to decay.

Results
Initially, we set the mesh accuracy to 1 and run the simulation. It is a good idea to run simulation at very low mesh
accuracy while they run quickly to be sure that most settings are correct and that we are obtaining reasonable
results. The simulation will run in about 5 minutes or less on a modern workstation. Please refer to the Modeling
Instructions 2040 page for detailed information on how to generate some of the plots below.

The plot to the left below shows the Ey field in the drop channel. Notice that the initial peaks are rapidly distorted
due to dispersion. The figure on the right shows the associated spectrum at the drop channel. As expected, we see
resonances approximately every 25.6nm. We also notice that some of the resonances are split. This is in fact an
effect of coupling between forward and backward propagating modes in the ring which are weakly coupled and which
leads to a Rabbi splitting. In principle, the backward propagating modes should not be excited, however, there is
some scattering to backward propagating modes each time the waveguides are close together. This effect is made
worse by the very low mesh accuracy, which can also introduce backscattering throughout the ring due to
staircasing effects. We will see that these effects are significantly reduced as we increase the mesh accuracy.
Nonetheless, backscattering effects can have important consequences in real devices.

The figure below shows the magnetic field intensity at 1.52 microns in the device. Here we clearly see the standing

2003 - 2016 Lumerical Solutions, Inc


Applications 2049

wave pattern from forward and backward propagating modes, which leads to the Rabbi splitting observed at the 1.53
micron resonance. Note that this causes light to be reflected back into the source and to output both forward and
backward at the drop waveguide.

We can rerun the simulation with a mesh accuracy of 2. This will take 25 minutes or less on a modern workstation
to run the full 4000fs.

We can select the through and drop channels to quickly plot the transmission in these waveguides using a
visualizer. The ripples in the result are an indication that the fields in the ring have not fully decayed before the end of
the simulation, as these ripples are characteristic of the fourier transform of a time signal that is truncated. We also
notice that the splitting of the peaks has disappeared, indicating that the coupling to backward propagating modes
was artificially large due to the extremely coarse mesh used. However, we will see that there is still backward
propagating light generated and it would be worth doing some convergence testing of the mesh size, particularly
around the waveguide coupling region, to determine how significant a problem this might be for an actual device.

2003 - 2016 Lumerical Solutions, Inc


2050 Lumerical Knowledge Base

The following lines of script will also export the drop results in a format that can be used for MODE Solutions to
compare with the MODE Solutions results.

Tdrop_3DFDTD = -transmission("drop");
lambda_3DFDTD = c/getdata("drop","f");
savedata("fdtd_results.ldf",Tdrop_3DFDTD,lambda_3DFDTD);

We can also obtain the spatial field profiles at various frequencies. The right image below shows |E|^2 at 1.6
microns, where almost all the light is transmitted to the through channel. The left image is shown at 1.5238
microns, where we begin to see light resonate more strongly in the ring. Once the spectrum is determined of course,
we can adjust the wavelength of our profile monitor to capture the fields precisely on and off resonance.

Parameter extraction
The ring resonator is a 4 port device, which we we can label 1 through 4, as shown below. We can use a mode
expansion monitor to calculate the complex mode expansion coefficient for both forward and propagating modes in
each waveguide. This allows us to easily construct the 16 parameter S matrix which can be exported for use in

2003 - 2016 Lumerical Solutions, Inc


Applications 2051

INTERCONNECT. In reality, this device is so symmetric, that only 4 coefficients of the S matrix need to be
calculated - for example, S11=S22=S33=S44.

The mode expansion monitor is setup to calculate the amount of forward and backward propagating power in the
fundamental TE mode for the 4 monitors at the input and output ports. First, we can look at this in the Visualizer.
Note that this analysis takes several seconds because each waveguide mode is recorded over 500 frequency points.
To speed up the calculation, we have used a single mode at the center frequency for the expansion, however we
could calculate more mode profiles over the device bandwidth to obtain a more accurate expansion. Once
calculated, the expansion is stored in memory and will be saved to the fsp file for quick future reference. The figure
below shows the amount of power reflected in port 1 and transmitted through ports 2, 3 and 4. It is interesting to note
the resonant reflection and transmission that is occurring at port 1 and port 4. The power reflected and leaking out
port 4 is equivalent. As discussed above, these are due to weak coupling between forward and backward propagating
modes in the ring, which can have a substantial effect due to the high Q of the device.

The model itself is an analysis group that is setup to calculate the S parameters. Select the model and use the

2003 - 2016 Lumerical Solutions, Inc


2052 Lumerical Knowledge Base

Results Manager to calculate the S matrix. During the calculation, S11, S21, S31 and S41 are saved to the text file
FDTDtoINTERCONNECT.txt which can be used to create a ring resonator element in INTERCONNECT. The
different S parameters can be easily visualized. For example, below we see the phase of S21 and S31. We can see
the effect of the resonances which lead to sudden changes in the slope of the phase which indicates the sudden
change in group delay at resonance. There is still a reasonable amount of ripple in S21 that could clearly lead to
incorrect interpretations of the group delay of the ring, these could be removed by running a longer simulation.

Note on convergence testing


The following issues may affect the convergence and should be investigated more extensively:
The proximity of the PML. To save time, the simulation uses very little space vertically between the waveguide
layer and the PML. The z span of the simulation region should be increased.
The simulation time should be increased. Once the correct time of the simulation has been determined to achieve
convergence of key results, time apodization of the frequency domain monitors may be used to remove any ripple
that remains in the spectra.
The mesh size should be tested at a mesh accuracy of 3 and possibly even 4. It may also be necessary to use a
mesh override region near the waveguide coupling regions to force a fine mesh in those regions because the
coupling of the forward and backward propagating modes appears to be sensitive to the mesh used in this region.

2D Approximation to 3D Geometries
3D simulations are much more CPU-time and memory intensive than 2D simulations. The ring resonator example we
reference using MODE Solutions collapses the z dimension in a physically meaningful way and is then able to run a
2D FDTD simulation much more quickly, while still maintaining the accuracy of important results like the filter FSR.
It is also possible run a 2D simulation in FDTD, using a material with the effective index of the slab modes supported
in the Si layer. However, using a constant effective index will not give the correct FSR for the device, which depends
on the group index of the waveguide modes. Therefore, we recommend doing the initial design and optimization in
MODE Solutions, then moving to 3D FDTD for final optimization and accurate parameter extraction.

2003 - 2016 Lumerical Solutions, Inc


Applications 2053

8.3.1.1.4 Ring resonator INTERCONNECT


See how to design and simulate a ring resonator using INTERCONNECT: Circuits and systems - Ring Resonator
Tutorial 2301

8.3.1.1.5 Spot size converter

Problem definition
The design of the spot-size converter is based on reference [1]. The goal of this design is to efficiently couple light
from a strongly confined high index contrast silicon waveguide into an optical fiber, which has a much larger mode
field size. In this design, the spot-size conversion is achieved by using an Si adiabatic taper covered by a low-index
waveguide. Once the mode is converted from the silicon waveguide to that of the larger low-index waveguide, it can
be coupled much more efficiently into the optical fiber.

The EME method is ideal for taper designs because one can sweep the taper lengths quickly without having to
calculate any additional modes. In this case, FDTD-based methods are not as efficient because not only does the
simulation time increase with taper length exponentially, separate simulations are required for each taper length.

Solvers 101

EME
Associated files
spot_size_converter.lms
spot_size_converter.lsf

In this topic
Discussion and results 2054
Modeling instructions 2059
See also
EME Solver Analysis 1611

References
[1] T. Tsuchizawa et al, Microphotonics
devices based on silicon microfabrication
technology, IEEE J. Select. Topics Quantum
Electron., 11, 2005, 232-240

Learning objectives
In this example, we show how MODE Solutions' eigenmode expansion (EME) solver 114 can be used to design a
spot size converter. The user will learn to:
Set up an EME simulation
Quickly scan the length of the spot size converter to find the optimal design
Compare results with 3D FDTD results

2003 - 2016 Lumerical Solutions, Inc


2054 Lumerical Knowledge Base

Spot size converter Getting Started video

8.3.1.1.5.1 Discussion and results

Simulation setup
The EME solver in MODE Solutions is a fully vectorial bi-directional Maxwell's equations solver. The solver relies on
modal decomposition of electromagnetic fields into a basis set of eigenmodes, which are computed by dividing the
geometry into multiple cells and solving for the modes at the interface between adjacent cells. This method accounts
for multiple-reflection events, and only one simulation is needed for all input/output modes and polarization so it is
ideal for simulating tapers and performing length scanning.

In the EME solver setup, we define the cross sections where the modes are solved by defining cell groups. For
uniform regions where the cross section of the structure does not change in the propagation direction (ex. cell group
1 and 3, or the input/output waveguide regions), only one cell is necessary in the cell group since using additional
cells will not affect the results.

For regions such as a taper where the cross section of the device varies, you can specify a number of cells within
the cell group where the modes of the structure will be calculated, and in these regions we want to set the subcell
method to CVCS which reduce the staircasing effect due to the discrete changes in cross section of the structure
between each adjacent cell. The number of basis modes to use for the calculation can also be set in the EME solver
object. It is recommended to start with a small number of modes for the initial calculation. Once everything is

2003 - 2016 Lumerical Solutions, Inc


Applications 2055

working as expected, one can increase the number of modes until the result converges 857 .

The cell boundaries of the structure can be seen in the CAD view below.

The modes at the center each cell are calculated on a finite mesh transverse mesh. Mesh override regions can be
added to force a finer mesh where necessary. For this spot size converter, we add a mesh override region over the
tapered silicon waveguide to better resolve the geometry. The view mesh button displays the transverse mesh in the
CAD view as shown below.

We can select the mode (or a set of modes by multi-selecting) of interest by editing the ports and choosing the
desired modes. The user s-matrix result that is calculated by the EME solver will return the results for the selected
mode(s) only. For this device we are interested in the fraction of power transmitted from the fundamental mode of the
silicon waveguide at port 1 to the fundamental polymer mode at port 2 which is given by |S21|^2 with port 1 at the
input side, and port 2 at the output. However, since the device behaves symmetrically, we can get the same result
by looking at |S12|^2. For more information about the S-matrix index mapping see EME solver analysis 774 .

Analysis and Results


Pressing the run button will calculate the modes at each cell. You can visualize the calculated modes by expanding
the EME solver and cell group in the Objects Tree, then right-clicking the individual cell and selecting the result to

2003 - 2016 Lumerical Solutions, Inc


2056 Lumerical Knowledge Base

visualize.

To see the final field profile of the device as well as the S-matrix results, press the EME PROPAGATE button in the
EME analysis window. Once the propagation is complete, profile monitor results and S-matrix results will be
available, and can be visualized by right-clicking on the objects in the Objects Tree. The results for different
propagation lengths can also be changed without having to re-calculate any modes. The field profile for a tapered
region of length 10 um and 100 um are shown below.

10 um taper (xz plot) 100 um taper (xz plot)

Scattering parameters relate the transmission and reflection coefficients for each port and input/output modes of the
device. This is automatically calculated by the EME solver, and returned as the result of an EME solver region. The
internal s-matrix includes all of the s-parameters for all the modes of all the ports, whereas the user s-matrix will
contain only the s-parameters for the modes selected in the ports. Since we have 2 ports, and we are only interested
in the fundamental mode at each port, the user s-matrix will be a 2 by 2 matrix, with elements S11, S12, S21 and
S22.

Length scanning
The propagation sweep widget allows you to scan the length of any cell group and calculate s-matrix results
automatically. The S-matrix index mapping table allows you to quickly identify which s-matrix components
correspond to which port and mode.

2003 - 2016 Lumerical Solutions, Inc


Applications 2057

Below, the transmission through the taper is plotted over taper lengths from 10 um to 200 um.

EME vs 3D FDTD
We also compare the EME results with 3D FDTD. The results between two solvers agree reasonably well, however
they are done with completely different time scale. The EME simulation takes 3 minutes to simulate 101 different
taper lengths (blue squares), whereas 3D FDTD takes 6 hours to simulate 11 different taper lengths (green squares).

2003 - 2016 Lumerical Solutions, Inc


2058 Lumerical Knowledge Base

None vs CVCS subcell method


To see the effect of staircasing, change the subcell method for group span 2 from "CVCS" to "none" and re-run the
eme sweep.

One can see that when the CVCS subcell method is not used for the tapered portion of the structure in cell group 2,
the staircasing effect will result in a transmission curve that is much less smooth than before.

2003 - 2016 Lumerical Solutions, Inc


Applications 2059

8.3.1.1.5.2 Modeling instructions


The first two sections (Create the structure, and Add EME Solver and monitors) describe how to setup the
simulation from a blank simulation file. If you prefer to skip this section, a copy of the completed simulation file is
provided on the first page of the tutorial.

Create the structure


The structure will consist of a substrate, the input high index waveguide with uniform y span, the tapered portion of
the high index waveguide with varying y span, and the low index polymer waveguide.

Begin by starting MODE Solutions. You can save the MODE Simulation Project file (.lms) at any point in this
process. To do so, choose SAVE in the FILE menu.

Add the substrate

Press on arrow on the STRUCTURES button and select a RECTANGLE from the drop-down menu.
Set the properties of the substrate rectangle according to the following table. To open the edit properties window

for an object, click on the edit tool button on the side toolbar, or right click on the object in the Objects Tree
and select EDIT OBJECT from the right-click menu.
tab property value
name substrate
Geometry x ( m) 0
x span ( m) 20
y ( m) 0
y span ( m) 10
z ( m) -2.5
z span ( m) 5
Material index 1.465
Graphical rendering override colour opacity from material database selected
alpha 0.3

Add the input high index waveguide

Press on arrow on the STRUCTURES button and select a RECTANGLE from the drop-down menu.
Set the properties of the rectangle according to the following table.
tab property value
name input
Geometry x ( m) -7.5
x span ( m) 5
y ( m) 0
y span ( m) 0.4
z ( m) 0.1
z span ( m) 0.2
Material material Si (Silicon) - Palik

2003 - 2016 Lumerical Solutions, Inc


2060 Lumerical Knowledge Base

Add the tapered section of the high index waveguide

Press on arrow on the COMPONENTS button and select EXTRUDED POLYGONS from the pull-
down menu. This will open the object library window.
Select ISOSCELES TRAPEZOID from the list and press the INSERT button.
Set the properties of the isosceles trapezoid according to the following table.
tab property value
name taper
Properties x, y ( m) 0
z ( m) 0.1
material Si (Silicon) - Palik
z span ( m) 0.2
y span ( m) 10
lx top ( m) 0.4
lx base ( m) 0.08
Rotations first axis z
rotation 1 (degrees) 90

Add the low index polymer waveguide

Press on arrow on the STRUCTURES button and select a RECTANGLE from the drop-down menu.
Set the properties of the rectangle according to the following table.
tab property value
name SiON
Geometry x ( m) 2
x span ( m) 16
y ( m) 0
y span ( m) 3
z ( m) 1.5
z span ( m) 3
Material index 1.5
override mesh order from material database selected
mesh order 3
Graphical rendering override colour opacity from material database selected
alpha 0.3

By setting the mesh order of one material to be larger than that of another material, the material will have lower mesh
priority in the regions where objects overlap.

Select the model analysis group in the Objects Tree. Click on the zoom extent button on the side view

2003 - 2016 Lumerical Solutions, Inc


Applications 2061

toolbar to zoom the view ports around the completed structure.

Add EME Solver and monitors

Press on the arrow on the on the SIMULATION button and select the EME SOLVER from the drop-
down menu. Set the properties according to the following table.
tab property value
General background index 1.465
wavelength ( m) 1.5
EME setup x min ( m) -8
number of cell groups 3
cell group definition See table below
display cells selected
y ( m) 0
y span ( m) 5.5
z ( m) 0.5
z span ( m) 7

Set the properties of the table in the CELL GROUP DEFINITION section of the EME setup tab of the simulation
region object according to the following table.
group spans ( m) cells subcell method
1 3 1 none
2 10 19 CVCS
3 3 1 none

The number of cell groups is set to 3 for the three distinct regions of the structure, the input waveguide, the tapered
region, and the output waveguide. In each cell group we can specify the span of the region the cell group will cover,
and the number of cells to use in the cell group. The number of cells corresponds to the number of locations where
the modes of the device will be solved.

In the cell group regions where the cross section of the device does not change (ex. the input/output waveguide
regions), it is not necessary to use more than 1 cell, and the subcell method should be set to "none". In regions
where the cross section of the structure changes, more cells are required to resolve the change in the geometry. In
cases where the cross section is changing continuously over the region, the CVCS subcell method is recommended
since it will give better results by reducing the staircasing effect from using a finite number of cells.

The DISPLAY CELLS option in the EME setup tab shows the cell boundaries in the CAD view. We can ignore the
section in the EME setup tab for periodicity since this structure does not include any periodic regions.

Set up Ports
Expand the EME object in the Objects Tree by clicking on the triangle symbol next to the object name. Then
expand the Ports group under the EME object. Edit the properties of both port_1 and port_2 according to the
following table.
tab property value
Geometry use full simulation span selected
y ( m) 0

2003 - 2016 Lumerical Solutions, Inc


2062 Lumerical Knowledge Base

y span ( m) 5.5
z ( m) 0
z span ( m) 7
EME port mode selection fundamental mode

The selected modes will be the ones the user S-matrix will return results for.

Add Mesh Override


The mesh override region is used to set a finer transverse mesh over the tapered section of the high index waveguide
Select the model analysis group at the top of the Objects Tree. Press on the arrow on the on the SIMULATION

button and select MESH from the drop-down menu to add a mesh override region. Set the
properties of the mesh override region according to the following table.
tab property value
General Set mesh multiplier selected
y mesh multiplier 5
z mesh multiplier 5
Geometry x ( m) 0
x span ( m) 20
y ( m) 0
y span ( m) 0.45
z ( m) 0.1
z span ( m) 0.2

Press the VIEW MESH button in the side toolbar to display the transverse mesh in the CAD.

Add Monitors

Press on the arrow on Monitors button and select EME INDEX from the drop-down menu. Set the
properties according to the following table.
tab property value
name index
Geometry x ( m) 0
x span ( m) 20
y ( m) 0
y span ( m) 6
z (um) 0.1

Press on the arrow on Monitors button and select EME PROFILE from the drop-down menu. Set the
properties according to the following table.

2003 - 2016 Lumerical Solutions, Inc


Applications 2063

tab property value


name profile_xz
Geometry monitor type 2D Y-normal
x ( m) 0
x span ( m) 20
y ( m) 0
z (um) 0
z (um) 8

Calculate and extract results


Run

Press on the RUN button . This will calculate the supported modes in each cell and switch the simulation
from the layout to analysis mode. When the simulation finishes running, the EME Analysis window will be opened.

Propagate fields
In the EME Analysis window, set the SOURCE PORT setting to PORT 1. This will use the fundamental mode from
PORT 1 as the source when generating profile monitor results.
Note that since we are not using periodicity we can ignore the warning in the CELL GROUP SEQUENCE section
of the EME Analysis window.
Press the EME PROPAGATE button.

Plot refractive index and field profile


Once the propagation is complete, the EME object and the monitors in the Objects Tree will be populated with
data. The Results View window (which can be opened by clicking on the "Show result view" button) will display all
the results and their corresponding dimensions/values for the selected object. Plot the refractive index by right-
clicking on the "index" monitor and selecting Visualize -> index profile. The field profiles can also be visualized in
the same way.
To see the values of the user S-matrix, right click on the EME object, select Visualize -> user s-matrix. Then in
the visualizer under the Attributes section, double click on the "VIEW DATA" cell for the EME:user s-matrix
dataset. The values of the rows and columns correspond to the S-matrix. For example, the value in row 1, column
1 corresponds to S11, and the value in row1, column 2 corresponds to S12. And abs(S(21))^2 is the transmission.
Since the device behaves symmetrically, S12=S21.

Change taper length


To recalculate results for a longer taper, go to the CELL GROUP DEFINITION section of the EME Analysis
window and change the GROUP SPAN of the second cell group region. Change this from 10um to 100um, which
will correspond to the same device geometry but now with a 100um long taper region.
Press the EME PROPAGATE button to re-calculate the results, then visualize the new results for the longer taper.
Note that this calculation is almost instant since it does not require any additional mode calculations.

Scan taper length


To scan the taper length over a range of values, the propagation sweep widget in the EME analysis window can be
used.
In the EME Analysis window, select the PROPAGATION SWEEP checkbox, and set the settings of the
propagation sweep according to the following table.
setting value
parameter group span 2
start 10

2003 - 2016 Lumerical Solutions, Inc


2064 Lumerical Knowledge Base

stop 200
number of points 191
Press the EME SWEEP button to run the sweep over taper lengths.

Plot sweep results


After the sweep is complete, press the VISUALIZE EME SWEEP button. The S-parameters will be plotted in a
new visualizer.
The transmission corresponds to |S12|^2. To plot this, remove the other results from the list of attributes in the
Visualizer, and set the SCALAR OPERATION of the result to Abs^2.

8.3.1.2 Dispersion Analysis


Introduction
In this section, MODE solutions will be utilized to study the modes of a SOI waveguide and analyze its dispersion
properties.

Solvers 101

FDE
Associated files
waveguide_dispersion.lms
See also
Passive components 2018

Group delay analysis 2067

Schematic of a simple SOI waveguide

Simulation setup
The file waveguide_dispersion.lms contains a simple silicon on SiO2 ridge waveguide with a ridge width of 500 nm
and a ridge height of 180 nm. The simulation area is defined in the XY plane with perfectly matched boundary
conditions. The eigensolver is used to solve for the modes of this waveguide. The refractive index values of Si and
SiO2 are sampled data that have been entered in the materials library.

Frequency Sweep Analysis


Any single frequency analysis of the mode, can be done with the sampled data model obtained by simply
interpolating the data points for the available wavelengths. For the waveguide defined above a TE mode with refractive
index

2003 - 2016 Lumerical Solutions, Inc


Applications 2065

Problem
however, if this data is used directly to sweep over a range of frequencies for calculations that involve the derivative of
the refractive index function with respect to wavelength, such as dispersion, any discontinuities from the
experimental data will lead to artificial peaks in the resulting plots as seen in the figure below:

Material fit using sampled data interpolation

2003 - 2016 Lumerical Solutions, Inc


2066 Lumerical Knowledge Base

Warning message - discontinuity of the matereial fit

Dispersion of the mode as a function of


wavelength with discontinuous material
fit model

Solution
To overcome this problem, the index data can be modeled using Lumerical's Multi Coefficient Model feature. The
screenshot shows the Material Explorer 272 to modify the fit. This tells the software to fit and use the smooth curve
for simulation. Make sure you save the parameters and setting before closing the Material Explorer.

Results
This fit will generate smooth dispersion curves. Using the eigen solver frequency sweep tab, several mode properties
such as loss, effective index, group velocity and dispersion curves can be calculated for a specified range of
frequencies.

2003 - 2016 Lumerical Solutions, Inc


Applications 2067

Material fit using multi-coefficient model

Dispersion and refractive index of the mode as a


function of wavelength with multi coefficient
material fit model

Note: Accuracy (mesh and the detailed dispersion calculation option)


The number of mesh cells in the solver region could be increased to get slightly better accuracy. Also, the
DETAILED DISPERSION CALCULATION option is turned on to obtain more accurate results, but the downside is
a slower simulation. To run a quicker simulation, simply turn off this check box. For more information, please see
the frequency analysis 760 page.

8.3.1.3 Group Delay Analysis


Introduction
In this example, we use the SParameter extraction method to calculate the group delay in a waveguide ring
resonator. The same methodology can be applied to calculate the group delay of any passive device.

Solvers 101
varFDTD
FDTD
In this topic
Introduction 2067
Simulation setup 2068

Results 2068
Improvements 2069
Associated files

2003 - 2016 Lumerical Solutions, Inc


2068 Lumerical Knowledge Base

ring_group_delay_fdt
d.fsp
ring_group_delay_fdt
d.lsf
ring_group_delay_mod
e.lms
ring_group_delay_mod
e.lsf
See also
Ring resonator MODE
(design and initial
simulation) 2021
Ring resonator FDTD (final
parameter extraction) 2039
Passive components 2018
Dispersion Analysis 2064
Simulation time and
Frequency domain monitors
668

Simulation setup
The ring_group_delay_fdtd.fsp and ring_group_delay_mode.lms files are for simulation using FDTD
and MODE Solutions respectively. Each file contains a single straight silicon waveguide coupled to a ring resonator.
These examples are based on the ring resonator in the FDTD and MODE getting started example section except
that there is only a single waveguide, making it a 2-port rather than a 4-port device. The gap between waveguides,
simulation time and source bandwidth have also been modified to work for this example.

This example is particularly interesting for an analysis of group delay because this ring modulator is an all-pass filter.
In the ideal device, without any loss or reflection mechanisms, there should be 100% transmission of the incident
power. The effect of the wavelength dependent ring resonances will therefore be seen in the group delay. Indeed, we
can expect to see peaks in the group delay for resonant wavelengths of the ring, since the light will stay trapped in
the ring for a long time.

Results
In the examples below, the Hz-field data is extracted from a time monitor and a Fourier transform is performed. This
approach is valid for single mode waveguides and the H field was selected because we are using a TE-like mode.
For multi-mode waveguides, modal decomposition would be necessary. The phase information is extracted after the
Fourier transform and subsequently the derivative is taken to generate the group delay plot. The plots below are
obtained from the above associated files with FDTD and MODE separately. 3D FDTD has more accurate results but
slower in simulation speeds than 2.5D Propagator. Therefore, MODE allows a longer simulation time and a broader
bandwidth with a faster simulation speed in this comparison. The FDTD plots are based on a higher loss (reduced
gap distance) configuration just to increase simulation speed for demonstration purposes.

3D FDTD Simulation: 2.5D MODE Propagator:


Gap: 0.02 um Gap: 0.1 um
Simulation time: 1.5 ps Simulation time: 12 ps
wavelength range: 1.5 - 1.6 um wavelength range: 1.4 - 1.7 um

2003 - 2016 Lumerical Solutions, Inc


Applications 2069

H
z
vs
ti
m
e

ph
as
e
vs
w
av
el
en
gt
h

gr
ou
p
de
la
y
vs
w
av
el
en
gt
h
* note that the X axis of the left/right hand figures is different

The resonant wavelengths can stay in the ring for many cycles, compared to those wavelengths that do not resonate
in the ring. The group delay plots show this feature and indicate the position of the peaks. There are some losses in
the system, especially at the coupling point. In each cycle, light from the ring can be scattered at the coupling point
either in a backwards direction or into radiation modes. This explains why the transmission is less than 100% at
resonant wavelengths at the "through" port.

The simulation time is an important factor for these simulations, especially for shorter wavelengths. This is because
shorter wavelengths experience less attenuation for a given bend radius and have lower coupling for a given gap
distance, resulting in higher Q factors and consequently longer simulation times. When the simulation time is too
short, the time signal is truncated which leads to errors in the frequency domain results after Fourier transform and
incorrect results such as negative group delay may be seen (see more information Simulation time and Frequency
domain monitors 668 ). If the simulation time is too long in MODE, the simulation can diverge due to numerical
instabilities created by the PML boundaries.

Improvements
The above results can be generated quickly and are useful for demonstration purposes. If the settings below are

2003 - 2016 Lumerical Solutions, Inc


2070 Lumerical Knowledge Base

used instead, the accuracy is significantly improved. However, this increases the required simulation times by 10-
100 times, which is particularly noticeable in the 3D FDTD simulations.

3D FDTD Simulation:
Gap: 0.1 um
Simulation time: 30 ps
wavelength range: 1.5 - 1.6 um
Mesh accuracy: 3

2.5D MODE Propagator:


Gap: 0.1 um
Simulation time: 50 ps
wavelength range: 1.4 - 1.7 um
Mesh accuracy: 3

2003 - 2016 Lumerical Solutions, Inc


Applications 2071

8.3.1.4 Facet Calculations


Introduction
In this example, we will consider how Mode Expansion Monitor can be used for analyzing the fraction of power
transmitted into the fundamental mode in FDTD Solutions, particularly for calculating the power reflection and
transmission of a waveguide facet. Many calculations involving waveguide modes can also be accomplished with
MODE Solutions.

Solvers 101

FDTD
In this topic
Introduction 2071
Simulation setup 2071

Results 2072
Associated files
waveguide_facet.fsp
See also
Mode Expansion Monitors 649

Simulation setup
We will consider a high index contrast waveguide on Silicon-on-insulator (SOI) at a wavelength of 1.55 microns. It is
instructive to use a high index contrast waveguide since it is one of the cases where many assumptions commonly
used by mode solvers, such as scalar fields or effective index models, break down. We will consider a waveguide
that supports several modes. The waveguide is 200 nm in height and 800 nm wide.

The file waveguide_facet.fsp has the structure drawn and the fundamental mode is already selected. The
mode profile can be seen by editing the source properties, as shown below. The mode expansion monitor must be

2003 - 2016 Lumerical Solutions, Inc


2072 Lumerical Knowledge Base

placed over the cross section of the waveguide/fiber that supports the modal fields as shown in the simulation file.
Please refer to the page Mode Expansion Monitors 649 for more information.

Result
After the simulation has finished, using the Mode Expansion Monitor, a set of expansion results can be obtained.
Right click on the Mode expansion monitor object and visualize the expansion data. The collected results include
the forward transmission of the selected mode, the reflected power of the mode selected, and the net power of the
selected power. The following is the result obtained from the monitor.

Following script commands were used to obtain the result:

#get the data


expansion_for_R = getresult("modeExpansion","expansion for R");
Ttotal = getattribute(expansion_for_R,"T_total");
Tforward = getattribute(expansion_for_R,"T_forward");
Tbackward = getattribute(expansion_for_R,"T_backward");
Tnet = getattribute(expansion_for_R,"T_net");

#display the data


?"T total, the total reflected power is simulated to be " + num2str(-Ttotal);
?"T forward, the forward power into the original source mode is simulated to be " + num2s
?"T backward, the backward power into the original source mode is simulated to be " + num
?"T net, the total reflected power into the original source mode is simulated to be " + n

#Confirm the result


T = getresult("transmission","T");
R = getresult("reflection","T");

2003 - 2016 Lumerical Solutions, Inc


Applications 2073

y1 = getresult("y1","T");
y2 = getresult("y2","T");
z1 = getresult("z1","T");
z2 = getresult("z2","T");
gIncidence = -y1.T + y2.T - z1.T + z2.T;

#Display the confirmation


?"Transmitted power is " + num2str(T.T);
?"Reflected power is " + num2str(-R.T);
?"Unaccounted power at grazing incidence is " + num2str(gIncidence);
?"The total power in the system is " + num2str(T.T - R.T + gIncidence);

8.3.1.5 Bent Waveguide Analysis


Introduction
In this section, MODE solutions will be utilized to study the modes of a SOI waveguide and analyze its dispersion
properties.

Solvers 101

FDE
In this topic
Introduction 2073
Simulation setup 2073
Loss Analysis 2073
Associated files
waveguide_bend.lms
Related publications
1). A. Sakai, G. Hara, and
Toshihiko Baba, "Sharply
bent optical waveguide on
silicon-on-insulator
substrate", Proc. SPIE
physics simulation of
optoelectronic devices,
OE09-562 (2001)

Fig.1 Schematic of a SOI grating coupler

Simulation setup
The SOI waveguide in the previous example can be further analyzed using MODE eigensolver. Under the modal
analysis tab, there is the option to analyze the modes of a bent waveguide for user defined radius of curvature and
bend orientation. The results are those of a doughnut shaped waveguide and can be incorporated in the analysis of a
bent waveguide. In this example, losses in a waveguide with one 90 degree bend are analyzed and the bend position
is optimized for minimal losses.

Loss Analysis
Since the propagation loss in the straight SOI waveguide is negligible, there are two major sources that contribute to
the losses of a waveguide depicted in Fig.1 above:

-Propagation losses of the mode in the bent region


-Mode overlap losses between the bent and the straight sections of the waveguide

2003 - 2016 Lumerical Solutions, Inc


2074 Lumerical Knowledge Base

By checking the "Bent waveguide" option in the modal analysis tab, we can locate the same TE mode we found for a
straight waveguide previously. The propagation losses of this mode in the bent waveguide are much greater and
about dB/um.

In order to calculate the overlap mismatch losses between the two modes in the straight and bent sections of the
waveguide, we need to first calculate the modes for the straight waveguide by unchecking the bent waveguide option,
locating the desired mode, right clicking on the mode and selecting " Add selected mode to global D-card". Doing so
will add the selected mode to the table on the right where the mode can be used later on for overlap analysis with
another mode.

Next, we can check the "bent waveguide" option, and calculate the mode in the bent section of the waveguide. For
this example, the bent radius is chosen to be 1.5 um and since the bend is in the same plane as the straight
section, the orientation angle is zero. The propagation loss of this mode in this case is about 0.0012 dB/um .

Once this mode is located, we can switch to the overlap analysis tab. In order to compare the profile of this mode to
that of the straight waveguide, we can click on the Deck window and to pick the d-card we had previously added to
the deck. Finally we can calculate the overlap between the two modes to be about 98.8%.

Therefore the total loss of the structure is obtained by adding the contributions of the overlap mismatch at the two
interfaces between the quarter ring and the two straight waveguides with the propagation loss of the mode in the
curved section:

p
Loss = 2interfaces 10 log( 0.988)[ dB ] + (1.5[um] )(0.009[dB / um]) = 0.126dB
2

Since the mode mismatch loss is the more prominent cause of the total loss, optimizing the structure to lead to
higher overlap between the two modes can drastically improve the losses. By checking the shift d-card center, one
can new position values for the straight waveguide. Alternatively, we can check the optimize position option to let
MODE calculate and optimize the position that leads to maximum overlap.

2003 - 2016 Lumerical Solutions, Inc


Applications 2075

In doing so, we find that if we shift the straight waveguide section by 0.02 um in the x-direction, power overlap
increases to 99.7%. The leads to a total loss of :
p
Loss = 2interfaces 10 log( 0.998)[ dB ] + (1.5[um] )(0.0009[dB / um]) = 0.039dB
2
Hence, optimizing the positions of the end waveguides can give about an order of magnitude improvement in the
overall loss.

8.3.1.6 Grating Couplers


Both grating couplers and fiber-chip edge couplers are commonly used in integrated optics for coupling light between
planar SOI waveguides and optical fibers. While grating couplers have the advantage of being able to couple light to
and from the chip at any location from the chip, the bandwidth can be limited due to the dispersive operating
principle of grating couplers. When a large operating bandwidth is desired, edge couplers provide a good alternative.

2003 - 2016 Lumerical Solutions, Inc


2076 Lumerical Knowledge Base

Please select from the following topics:


Grating Coupler 2D-FDTD 2076
Grating Coupler 3D-FDTD 2091
Grating Coupler Circuits INTERCONNECT 2318

Relevant video(s)
Grating couplers design and optimization

References
"Silicon Photonics Design", Lukas Chrostowski, Michael Hochberg, 2013.

8.3.1.6.1 Grating Coupler 2D-FDTD

Introduction
In this example, the grating coupler component of a silicon photonics system will be studied to demonstrate how
FDTD Solutions can be used to optimize the coupling efficiency via adjusting the grating parameters.

Solvers 101

FDTD
In this topic
Introduction 2076
Simulation setup 2077
Simulation results 2079
Optimization results 2083
S-Parameters 2084
Associated files
grating_coupler_2D.f
sp
parameter_extraction
_2D.lsf
See Also
S Parameter extraction 1987
Mode Expansion Monitors
649

Particle Swarm Optimization


727

Grating Coupler 3D-FDTD Figure1: Schem atic of a grating coupler


2091

Matlab Driven Optimization


of 2D Grating Coupler 2085
Related Video
Grating coupler

2003 - 2016 Lumerical Solutions, Inc


Applications 2077

Related publications
1). D. Vermeulen, S.
Selvaraja, P. Verheyen, G.
Lepage, W. Bogaerts, P.
Absil, D. Van Thourhout,
and G. Roelkens, "High-
efficiency fiber-to-chip
grating couplers realized
using an advanced CMOS-
compatible Silicon-On-
Insulator platform," Opt.
Express 18, 18278-18283
(2010). See also
http://www.imec.be/
ScientificReport/
SR2010/2010/1159336.html

2). S. K. Selvaraja, D.
Vermeulen, M. Schaekers,
E. Sleeckx, W. Bogaerts,
G. Roelkens, P. Dumon, D.
Van Thourhout, and R.
Baets, "Highly Efficient
Grating Coupler between
Optical Fiber and Silicon
Photonic Circuit," in
Conference on Lasers and
Electro-Optics/International
Quantum Electronics
Conference, OSA (2009).

3). D. Taillaert, F. Van


Laere, M. Ayre, W.
Bogaerts, D. Van Thourhout,
P. Bienstman, R. Baets,
"Grating Couplers for
Coupling between Optical
Fibers and Nanophotonic
Waveguides", Japanese
Journal of Applied Physics,
vol. 45 (8A), 6071 (2006).

Simulation setup
The file grating_coupler_2D.fsp contains a grating coupler consisting of an SOI waveguide structure with a
220 nm thick silicon layer and a 2um thick oxide layer. The grating has a period of 630 nm, an etch depth of 100 nm
and a fill factor of 0.508.

The multiple sources in the file can be enabled/disabled for the following cases:

For the case of the structure used as an output grating, mode source located on the output side of the coupler as
shown in figure 2 is used. Maximum output coupling can be achieve by optimizing the etch depth and the period of
the grating.

2003 - 2016 Lumerical Solutions, Inc


2078 Lumerical Knowledge Base

Figure 2: Screenshot of the grating coupler structure utilized as an output grating

For the case of the structure used as an input grating, the source is at a 13 degree angle with respect to the y-axis
in order to avoid second order reflections as shown in figure 3. The horizontal position of the source can be adjusted
for optimized transmission through the grating. Similarly, the grating period and fill parameters can be swept to
maximize transmission.

Figure 3: Screenshot of layout editor of the grating coupler structure utilized as input grating

For the case of the structure used as an input grating, simulating fiber coupling is shown in figure 4. The horizontal
position of the source can be adjusted for optimized transmission through the grating. Similarly, the grating period
and fill parameters can be swept to maximize transmission.

2003 - 2016 Lumerical Solutions, Inc


Applications 2079

Figure 4: Screenshot of layout editor of the grating coupler structure utilized as input grating

Simulation results
Output grating
In order to get better insight of the propagation of light in the structure, a movie monitor can be placed around the
structure to monitor the behaviour of the light. It is better to disable this monitor once the movie has been recorded in
order to prevent slowing down of the rest of the simulations.

The transmitted field intensity exiting the top of the structure can be plotted using a frequency domain field and
power monitor placed just above the grating (right-click on the "above" monitor and select Visualize -> E). Both 1D
and 2D plots can be obtained, as shown. The transmission out of the coupler can also be plotted (Visualize -> T).

2003 - 2016 Lumerical Solutions, Inc


2080 Lumerical Knowledge Base

The far field profile of the propagating mode is also of interest. In FDTD Solutions, the data recorded by a frequency
monitor can be used to plot the far field intensity. In this case, the monitor placed just above the grating that records
the data for the light exiting the grating will be used for the far field projection. Right-click on the "above" monitor,
select Visualize -> farfield, and then select all. From the 1D and 2D plots that have been generated, we note that the
peak emission angle changes nearly linearly with wavelength, as expected, which makes the collection of broadband
light more challenging.

2003 - 2016 Lumerical Solutions, Inc


Applications 2081

Alternatively, if you wish to generate the above far field plots using script commands, the following scripts can be
used. The following script commands can be executed in the script prompt window. The commands generate a plot
of several far field intensity profiles of different frequencies on the same plot as well as a 2D image plot of the
intensities for a range of wavelengths.

m_name = "above";
f = getdata(m_name,"f");
phi = farfieldangle(m_name,1,500);
E_farfield = matrix(500,length(f));

for(i=1:length(f)) {
E_farfield(1:500,i) = farfield2d(m_name,i,500);
}

plot(phi,E_farfield,"theta_x(degrees)","wavelength","Far Field Intensity vs theta for a r


image (phi, c/f, E_farfield, "theta_x(degrees)", "wavelength", "Far Field Intensity");

Input grating

2003 - 2016 Lumerical Solutions, Inc


2082 Lumerical Knowledge Base

A similar movie can be generated to get a better insight of the mode coupling into the structure. Alternatively, a
frequency monitor can be placed to provide an image plot of the field profile superimposed on the structure.

Using a frequency domain field and power monitor placed at the end of the grating section and perpendicular to the
direction of propagation, the transmission along the y-axis can be plotted.

In addition to the frequency domain field and power monitor, a mode expansion monitor can be used to analyze how
much of the power is forward or backward propagating, in the fundamental or higher order modes. The monitor can
be used to expand the fields to see the fraction of power propagating in the fundamental mode. The image below
shows that almost all are propagating in the fundamental mode.

2003 - 2016 Lumerical Solutions, Inc


Applications 2083

Optimization results
Fiber coupling
Using a fibre source, as shown in the figure above, first the optimal beam position is found through the usage of the
sweep task, then the optimal pitch and duty cycle for a fixed beam position (that maximizes the figure of merit) are
found using the optimization object. The figure of merit used is the average transmission over the wavelength range.
From the sweep and optimization results, we see that the maximum average transmission is achieved at around the
source position of 1 um, pitch of 660 nm, and duty cycle of 0.66. Average transmission of 39% can be achieved in
this case.

2003 - 2016 Lumerical Solutions, Inc


2084 Lumerical Knowledge Base

Having calculated the optimum grating parameters, we can rerun the simulation to observe the new optimized
transmission values:

S-Parameters
S-parameters tell us how much of the light is coupled into and reflected in both the input and output modes. Treating
this grating coupler as a black box component with s-parameters, the complex s-parameters will be extracted
(complex s-parameters will give the phase of coupling, in addition to the power coupling efficiency). The extraction
involves two simulations, as the structure is not a symmetric device in the input and the output. The fibre source will
be used for the input mode and the mode source will be used for the output mode. This calculation is done in
parameter_extraction_2D.lsf, where the s-parameter data is collected and exported into a file, should we
need to use the data for further post processing (in the 3D example, the exported file gets used for the
INTERCONNECT simulation).

2003 - 2016 Lumerical Solutions, Inc


Applications 2085

8.3.1.6.2 Matlab Driven Optimization

Introduction
In this example, we will demonstrate how MATLAB can be used to drive a multi-variable nonlinear optimization of a
grating coupler in FDTD Solutions via Lumerical's Automation API. In addition, we will demonstrate how to setup a
MATLAB function based on arbitrary simulation parameters to specify a nonlinear constraint for the optimization.
While we focus on a specific example of a grating coupler in FDTD, the target audience includes anyone who is
interested in driving and controlling Lumerical applications directly from MATLAB.
Solvers 101

FDTD
In this topic
MATLAB API Setup and Workflow 2085

Optimization Goal 2086


Optimization Setup 2087
Optimization Results 2089
Optimization Tips 2091
Figure 1: Matlab API workflow
Associated files
grating_coupler_2D_Matlab_Optimizati
on.fsp
Coupler_Optimization_Main_Script.m
Coupler_Optimization.m
confun.m

See Also
Interoperability Commands 1635
Grating Coupler 2D-FDTD 2076
Particle Swarm Optimization 727
Grating Coupler 3D-FDTD 2091

MATLAB API Setup and Workflow


The key component required to drive simulations from MATLAB is the automation API that comes with 2016B or
newer versions of Lumerical products. To allow for correct functionality, OS must know the location of Lumerical
applications. On Windows machines this setup is executed automatically during the installation process, but it
might be necessary for Linux users to add the install directory of given Lumerical product to their system path as
described in step 9 on this page 36 .

The second step required for smooth functionality involves telling MATLAB where to look for the API before using any
interoperability related commands. The MATLAB API is located in the Lumerical installation folder. In our example

2003 - 2016 Lumerical Solutions, Inc


2086 Lumerical Knowledge Base

when we use FDTD Solutions on a Windows machine this would be typically under the following location:
C:\Program Files\Lumerical\FDTD\api\matlab
One option is to run the following command every time after MATLAB is launched and prior to using API related
commands:
path(path,'C:\Program Files\Lumerical\FDTD\api\matlab');
The other, more convenient option is to add the path permanently to the startup.m file that is loaded every time
MATLAB is launched.

Once the MATLAB API setup is completed we can use the related interoperability commands referenced in the "See
Also" section. The basic API workflow is depicted in figure 1 and it consists of four operations:
1. Open one or more Lumerical session
2. Send and execute Lumerical script commands to one of the active sessions
3. Transfer variables from the Lumerical workspace to the MATLAB workspace via an active session
4. Close Lumerical session

Note that operations 2,3 and 4 can be executed only by referencing to an active session otherwise they will result in
an error. The session referencing is done by using an unique ID that is assigned to each session during its initiation.
This ID system allows the users to open and control multiple sessions at the same time.

Optimization Project Goal


For this optimization project we use the FDTD simulation file from the Grating Coupler 2D-FDTD example referenced
above. This will allow us to compare the results from the MATLAB optimization with the results obtained by using a
combination of Lumerical's built-in parameter sweep and particle swarm optimization utility. The goal of the
optimization is to maximize the average transmission into the SOI waveguide mode in the wavelength range of
1500nm to 1600nm.

For this example, the following four parameters are chosen as the optimization variables:
Angle theta representing the source injection angle in respect to y axis
Source position in respect to the grating in x direction
Grating pitch
Grating duty cycle

In addition, this example demonstrates how to use a nonlinear constraint function that requires a specific FDTD
simulation parameter as an input in addition to the variables used for optimization. To do this, we will constrain the x
position of the source (x s ) so the beam axis at the surface of the grating does not extend beyond the end of the
grating itself (x 0). This cannot be handled by a simple boundary condition since both angle theta and x position of
the source are changing during the optimization. Moreover, we will use the MATLAB API to obtain the information
about the distance between the source and the surface of the grating, both being inputs to the constraint function as
follows:

x s tan (q ) * gap

2003 - 2016 Lumerical Solutions, Inc


Applications 2087

Figure 3: Visualization of the nonlinear constraint related to the source position and angle theta.

Optimization Project Setup


This project takes advantage of MATLAB "fmincon" multivariable nonlinear constrained optimization algorithm and it
consists of four files:
grating_coupler_2D_MATL 2D FDTD simulation file. This file is launched from the main MATLAB script via
AB_Optimization.fsp automation API and it returns the average transmission as a function of the input
parameters provided by the optimization script
Coupler_Optimization_Mai Main MATLAB script file used to:
n_Script.m Open, control and close Lumerical client session
Specify the optimized function
Setup, run and evaluate the optimization
Extract simulation parameters for the constraint function
Coupler_Optimization.m MATLAB function that is called during the optimization. It receives set of parameters
from fmincon and sets up the FDTD simulation accordingly. Once the simulation is
completed in FDTD, this function extracts the average transmission and passes it
back to the optimization routine. Note that since fmincon searches for the global
minimum, we specify the figure of merit as fval=1-T_avg;
confun.m Nonlinear constraint function. Its variables are angle theta, x position of the source
and the gap between the source and the grating as shown on figure 3.

To run the example, download all three MATLAB files and the FDTD simulation file into the same folder. Open
Coupler_Optimization_Main_Script.m and modify the path in line 9 to the folder containing all downloaded simulation
files to specify the location of the FDTD simulation file. Once the path is updated, simply run the simulation file and
wait until MATLAB runs multiple optimization iterations. The final values of the optimized parameters and average
transmission will be displayed in the MATLAB command window. The MATLAB script files are commented for clarity
and can be reviewed in the section below:
Coupler_Optimization_Main_Script.m
clear;
%Add Lumerical Matlab API path
path(path,'C:\Program Files\Lumerical\FDTD\api\matlab');

%Open FDTD session


h=appopen('fdtd');

%Load the FDTD simulation file and get simulation parameters


code=strcat('cd("C:\Users\mbenes\Desktop\Matlab API\Grating Coupler");',...

2003 - 2016 Lumerical Solutions, Inc


2088 Lumerical Knowledge Base

'load("grating_coupler_2D_Matlab_Optimization.fsp");',...
'select("grating_coupler_2D");',...
'coupler_y_pos=get("y");',...
'coupler_thickness=get("h total");',...
'select("fiber::source");',...
'source_y_pos=get("y");',...
'select("fiber");',...
'fiber_y_pos=get("y");',...
'gap=abs(fiber_y_pos+source_y_pos-coupler_y_pos-coupler_thickness);',...
'select("FDTD");',...
'FDTD_span=get("x span");');
%send the script in 'code' to Lumerical FDTD Solutions
appevalscript(h,code);

%Get variables 'FDTD_span' and 'gap' from FDTD workspace to Matlab


%workspace
global gap
gap=appgetvar(h,'gap');
FDTD_span=appgetvar(h,'FDTD_span');

%Function to be optimized x(x_position,theta,pitch,dc)


f=@(x,y)Coupler_Optimization(x(1),x(2),x(3),x(4),h);

%Optimization starting points, constraints and boundaries


%The format is [x_position in um/10, theta in degrees/10, pitch in um, duty
cycle]
x0=[0.5,1.7,0.75,0.75];
A=[];
b=[];
Aeq = [];
beq=[];
lb=[0,1.1,0.5,0.5];
ub=[FDTD_span/2e-5,2,0.8,0.8];
nonlcon=@confun;

%Optimization settings
options = optimoptions('fmincon');
options = optimoptions(options,'FiniteDifferenceStepSize',1e-3);
options = optimoptions(options,'Algorithm','sqp'); %alt: interior-point
options = optimoptions(options,'MaxIter', 100);
options = optimoptions(options,'PlotFcns', { @optimplotfval });
options = optimoptions(options,'Display','iter-detailed');
options = optimoptions(options,'StepTolerance',1e-3);

%Run optimization
[x,fval]=fmincon(f,x0,A,b,Aeq,beq,lb,ub,nonlcon,options);
T_avg=1-fval;

%Display optimization results


disp(strcat({'Optimized x position: '},num2str(x(1)*10),{' um'}));
disp(strcat({'Optimized angle theta: '},num2str(x(2)*10),{' degrees'}));
disp(strcat({'Optimized pitch: '},num2str(x(3)),{' um'}));
disp(strcat({'Optimized Duty cycle: '},num2str(x(4))));
disp(strcat({'Optimized T_avg: '},num2str(T_avg)));

%Close session
appclose(h);

2003 - 2016 Lumerical Solutions, Inc


Applications 2089

Coupler_Optimization.m
function y=Coupler_Optimization(x_position,theta,pitch,dc,h)

%Modify fiber position, theta, duty cycle, pitch and run the
%simulation
code=strcat('switchtolayout;',...
'select("grating_coupler_2D");',...
'set("pitch",',num2str(pitch*1e-6,16),');',...
'set("duty cycle",',num2str(dc,16),');',...
'select("fiber");',...
'set("x",',num2str(x_position*1e-5,16),');',...
'set("theta0",',num2str(theta*10,16),');',...
'run;');
appevalscript(h,code);

%Get the coupled power from T monitor to


%FDTD workspace as variable 'T_avg_FDTD'
code=strcat('T_avg_FDTD=getresult("model","T_avg");');
appevalscript(h,code);

%Get the average transmission(figure of merit) from FDTD workspace to


%MATLAB workspace
T_MATLABFun=appgetvar(h,'T_avg_FDTD');
y=1-abs(T_MATLABFun);

%Uncommnet this section to display the optimized parameters and


%figure of merit for each run in FDTD
%disp(strcat('x_pos= ',num2str(x_position,10),'...theta=
',num2str(theta,10),'...pitch= ',num2str(pitch,10),'...DC= ',num2str(dc,10)));
%disp(strcat('1-abs(T)= ',num2str(y,10)));
end

confun.m
function [c, ceq] = confun(x)

% Nonlinear inequality constraints x(x_pos,theta,pitch,dc)


global gap
c = tan(x(2)*pi/180)*gap-x(1)*1e-5;

% Nonlinear equality constraints is left empty


ceq = [];

Optimization Results
The maximum average transmission achieved with the MATLAB driven optimization is ~40%, which is in good
agreement with the value obtained using the Lumerical built-in parameter sweep/particle swarm optimization
routines. The optimized values for all parameters shown in table 1 are close to the reference example demonstrating
that we are able to reliably find the optimal parameters using this methodology. Note that the exact values might
slightly change in each optimization run as the function minimum can be achieved with a range of parameter values
rather than with one exact set of values.
Parameter MATLAB Reference
optimization example value
value

2003 - 2016 Lumerical Solutions, Inc


2090 Lumerical Knowledge Base

Theta [degrees] 12.21 13.45 (fixed)


Source x position 3.15 3 um (from
[um] parameter sweep)
Pitch [um] 0.6475 0.66
Duty Cycle 0.67 0.66
Optimized 0.394 0.388
average
transmission
Table 1: Com parison betw een the optim ized param eters and the reference exam ple

The time required for the four-variable optimization is comparable to the time required for the two-variable optimization
with the particle swarm method, and it can be considerably influenced by setting the starting points, boundaries and
the optimization parameters. Figure 4 shows comparison of two identical optimization setups that differ only in the
finite difference step size (FDSS). It is clear that smaller step takes longer to estimate the trends and close in on the
optimal values. As a result, we were able to achieve the optimized transmission within 8 iterations with FDSS=1e-3,
while 14 iterations were required with FDSS=1e-4.

2003 - 2016 Lumerical Solutions, Inc


Applications 2091

Figure 4: Tracking of the figure of m erit(fval=1-Average Transm ission) for different finite difference step size (left show s
1e-3 and right show s 1e-4)

Optimization tips
If the finite difference step size is too small, the simulation result might not change significantly and the
optimization algorithm might terminate prematurely. For example, in our 2D FDTD simulation, moving the source
by 1nm in x direction will have minimal to no impact on the resulting average transmission.
It is a good idea to run the optimization multiple times with slightly different starting points and boundaries to verify
that the results are comparable.
If the optimization ends with one or more parameters having the boundary value, it is likely that the minimum is
artificial and the boundary should be moved.
Sometimes it can be useful to have the optimization parameters within the same order of magnitude.

8.3.1.6.3 Grating Coupler 3D-FDTD

Introduction
In this 3D example, we use the optimized grating parameters including pitch and duty cycle from the 2D grating
coupler simulation 2076 , use the circular etch lines to focus the light down into the waveguide and optimize the shape
of the tapering section.
We then obtain and compare the S-parameters for the coupler.

2003 - 2016 Lumerical Solutions, Inc


2092 Lumerical Knowledge Base

Solvers 101

FDTD
In this topic
Introduction 2091
Taper Optimization 2092

S-Parameters 2092
Associated files
taper_design.lms
grating_coupler_3D_i
nput.fsp
grating_coupler_3D_o
utput.fsp
parameter_extraction
_3D.lsf

See Also
S Parameter extraction 1987
Mode Expansion Monitors
649

Particle Swarm
Optimization 727
Grating Coupler 2D-FDTD
2076

Grating Coupler
INTERCONNECT 2318

Related Video
Grating coupler

Taper Optimization
The tapering section has a fixed width at the input and output, where the waveguide connected to the tapering
section has a width of 500 nm. Open the file taper_design.lms and use the sweep object to optimize the
tapering section. Using the sweep object, the value of m (the key variable that will determine the shape of the
tapering section, determined and found in the script of the taper structure group object) is optimized to be around
1.15. From the figure below, it appears that the beam is being clipped by the simulation boundary; however, if the
precise fields of the beam out to the simulation boundary are plotted (disable all the objects and monitors other than
the full profile monitor and enable the slab object and run the simulation), we see that the value of |E| is below 1e-3
at the edge of the simulation and we can ignore the small amount of diffraction that will occur due to this clipping.

S-Parameters
S-parameters tell us how much of the light is coupled into and reflected in both the input and output modes. Treating
this grating coupler as a black box component with s-parameters, the complex s-parameters will be extracted
(complex s-parameters will give the phase of coupling, in addition to the power coupling efficiency). The extraction
involves two simulations, as the structure is not a symmetric device in the input and the output. The fibre source will
be used for the input mode and the mode source will be used for the output mode. This calculation is done in

2003 - 2016 Lumerical Solutions, Inc


Applications 2093

parameter_extraction_3D.lsf. Open the script file and run, as the script file loads the simulation files
grating_coupler_3D_input.fsp and grating_coupler_3D_output.fsp, then collects the s-parameter
data, and exports the data into INTERCONNECT files to be used for further post processing. Below figures show the
comparison between 2D and 3D results. The two results agree well. The 3D results appear to be lower; one of the
possible sources of the difference is the fact that the taper section is included with coupling efficiency of ~90%.

8.3.1.6.4 Broadband Grating Coupler

Introduction
This 2D FDTD example shows how to obtain broadband characteristics of a grating coupler and compares the
results to experimental data. Furthermore, this application example demonstrates correct use and benefits of the
multi-frequency beam calculation and compares the results with standard single frequency beam calculation. To
better understand the differences between single and multi-frequency beam calculation visit this page 543 .

2003 - 2016 Lumerical Solutions, Inc


2094 Lumerical Knowledge Base

Solvers 101

FDTD
MODE
In this topic
Introduction 2093
Setup 2094
Results and Discussion 2096

Associated files
Broadband Grating
Coupler.fsp
Broadband Grating
Coupler.lms
Broadband Grating
Coupler.lsf
Broadband Grating
Coupler Injection
Angle Sweep.lsf

See Also
Grating Coupler 2D-FDTD 2076

Grating Coupler 3D-FDTD 2091 Figure 1: Schem atic of the sim ulation setup
Multifrequency Beam
Calculation 543
Related Publications
Vivien et al., Light injection
in SOI microwaveguides
using high-efficiency grating
couplers, Journal of
Lightwave Technology, Vol.
24, No. 10, 2006

Setup
Grating coupler structure
The simulated SOI structure is optimized for maximum coupling efficiency at 1310nm and it consists of a 200nm
thick Si waveguide that is placed on 700nm thick SiO2 layer. The waveguide is then covered by a 700nm thick SiO2
cladding as depicted on figure 2. The grating itself has duty cycle of 50%, grating period of 500nm and the etching
depth of the groves is 30nm as shown on figure 3.

Figure 3: Grating profile

2003 - 2016 Lumerical Solutions, Inc


Applications 2095

Figure 2: Index profile of the sim ulated structure

Gaussian beam setup


Correct source setup representing the laser beam is as important as optimizing the grating coupler structure in order
to achieve the maximum coupling efficiency. In particular, we need to determine the optimal incident angle in, laser
beam waist radius w0 and the distance d between the center of the input laser beam and the end of the grating
coupler(beginning of the waveguide).

The optimal incident angle can be obtained by sweeping a range of angles and recording the power coupled into the
waveguide at the optimized single frequency of 1310nm. To do this, open the Broadband Grating
Coupler.fsp and launch the "Sweep Injection Angle" sweep. Once the sweep is finished, you can visualize the
"Coupled power" sweep result and observe that the maximum coupled power is achieved around 13.9 degrees, which
is well aligned with the experimental results from the paper.

The optimal beam waist diameter can be calculated by the following equation:

w 0 = 1.37 Lc cos( q in )

where Lc is grating characteristic length. Lc calculated in the paper is 13 +/-1um, which gives us optimal beam waist
radius between 16 and 18.6 um. Alternative method how to estimate the optimal beam waist is to use MODE
solutions, specifically the FDE solver. To do this, simply copy the simulated structure to MODE or use the
associated file Broadband Grating Coupler.lms and search for modes around effective index of 2.86 obtained
by the following equation:

p2p
k sin( q ) +
in in L
n =
eff k
in

where
p is the diffraction order
L is the grating period
k in is the module of the incident wave vector

The Finite-Difference Eigenmode solver finds and calculates the spatial profile of the grating coupler mode(Figure 4)
at 1310nm and gives us better understanding of the optimal beam profile. This information is helpful during the FDTD
simulation setup when we need to determine the Gaussian beam properties. Note that since we are using fully
vectorial beam profile(thin lens option), the beam waist is determined by the Numerical Aperture. The beam profile
related to specific beam NA can be shown by the "Visualize beam data" button(Figure 5). Additionally, the beam
options tab allows us to define the distance from focus and position the beam waist near the grating coupler plane
rather than at the source injection plane.

Figure 4: Grating coupler m ode profile at 1310nm

Figure 5: Gaussian beam source settings

2003 - 2016 Lumerical Solutions, Inc


2096 Lumerical Knowledge Base

The last missing parameter that is needed to build the FDTD simulation is the optimal distance between the center
of the beam and the end of the grating d. This distance is given by a simple relationship d=Lc, which is between 12
and 14um. This property is in our simulation defined by the source position relative to the grating couple structure.

Monitor setup
In the paper, the coupled power is measured indirectly as:
P
coupled
=P
injected
(
- Preflected + Ptransmitted )
We reproduced this approach by placing power transmission monitors below and above the grating coupler to
measure the reflection and transmission that is later subtracted from the injected power during post processing. In
addition to this approach, we used also a direct measurement method when we placed a power transmission
monitor at the end of the waveguide in order to directly measure the power coupled into the waveguide. Note that the
modal fields extend beyond the waveguide interface and therefore the monitor must be extended as well in order to
measure 100% of the coupled power. The extend of the modal fields can be obtained by the mode expansion
monitor.

Results and Discussion


Coupled power as a function of wavelength
In order to plot the wavelength dependence of the coupled power it is necessary to run a broadband simulation with
angled injection. This type of simulation can benefit from using the multifrequency beam calculation and we
demonstrate this by comparing the results of two simulations with multifrequency beam calculation on and off. In
addition, we will investigate the difference between the indirect and direct measurement of the coupled power. To run
the simulation, first open the Broadband Grating Coupler.fsp and then run script Broadband Grating
Coupler.lsf. The following plot will be produced once the simulations are completed:

Figure 6: Sim ulated coupled pow er as function of w avelength betw een 1280 - 1340 nm

The maximum simulated coupled power at =13.9 degrees is 55.7%, which is well aligned with the measured

2003 - 2016 Lumerical Solutions, Inc


Applications 2097

maximum of 56%. Moreover, the multifrequency beam calculation delivered better accuracy when compared to the
results obtained with beam source calculated at single frequency, which showed 10% narrower bandwidth at FWHM.
Notice that the results are nearly identical at 1310nm. This is a result of the single frequency simulation being
centered at 1310nm and therefore, the calculated beam is accurate at this specific wavelength.
The comparison of direct measurement of power coupled into the waveguide and the indirect calculation using
reflected and transmitted power shows nearly identical results. Hence, using the direct method seems to be more
convenient since it requires only one monitor and no post processing.

Coupled power as function of injection angle


To simulate the coupled power as function of injection angle we use a parameter sweep to collect the values of
coupled power at the predefined range of wavelengths. To do this simply run the script Broadband Grating
Coupler Injection Angle Sweep.lsf. The script sets the simulation into single frequency mode as we are
interested to obtain this characteristics at the optimized frequency of 1310nm. Additionally, the simulation with
single frequency calculation is slightly faster, which is convenient as we need to run multiple simulations during the
parameter sweep. Finally, the scrip will collect the sweep results and plot the characteristics shown on figure 7.
Again, the results show maximum coupling efficiency of 55.7% at 13.9 degrees, which is well aligned with the
measured values.

Figure 7: Sim ulated coupled pow er as function of injection angle betw een 11 - 18 degrees at 1310nm

8.3.1.7 Edge Couplers


Both grating couplers 2075 and fiber-chip edge couplers are commonly used in integrated optics for coupling light
between planar SOI waveguides and optical fibers. While grating couplers have the advantage of being able to couple
light to and from the chip at any location from the chip, the bandwidth can be limited due to the dispersive operating
principle of grating couplers. When a large operating bandwidth is desired, edge couplers provide a good alternative.

2003 - 2016 Lumerical Solutions, Inc


2098 Lumerical Knowledge Base

Please select from the following topics:


Initial EME simulation 2098
Optimization of SMF-Fiber Position 2103
Final EME simulation 2103
3D FDTD simulation 2107

Relevant video(s)
Edge Coupler Optimization (Optimization using eigenmodes and eigenmode expansion chapter)

References
Fiber-chip edge coupler with large mode size for silicon photonic wire waveguides, Martin Papes, Pavel Cheben,
Winnie N. Ye, Jens H. Schmid, Dan-Xia Xu, et al., Proc. SPIE 9516, Integrated Optics: Physics and Simulations II,
95160K (2015)
Fiber-Chip Edge Coupler with Large Mode Size for Silicon Photonic Wire Waveguides, Martin Papes, Daniel
Benedikovic, Pavel Cheben, Jens H. Schmid, James Pond, Winnie N. Ye, Dan-Xia Xu, Siegfried Janz, Robert Halir,
Alejandro Ortega-Moux and Vladimir Vasinek, Optics Express, Vol. 24, 5026-5038 (2016)

8.3.1.7.1 Initial EME simulation

Introduction
In this example, we will demonstrate how to optimize the taper length of the edge coupler with MODE Solutions'
eigenmode expansion (EME) method. It is recommended that you to go over the spot size converter 2053 getting
started example before proceeding with this example. To optimize the location of the input fiber, see Optimization of
SMF-28 Fiber 2103 .

For this initial simulation, we will ignore the lower silicon substrate in order to reduce the simulation time. The final
simulation 2103 will include the lower silicon substrate, and a relatively large number of modes will be required.

Solvers 101

EME
In this topic
Introduction 2098
Simulation setup 2099
Simulation results 2100
Convergence testing 2101
Associated files
Edge_coupler_EME.lms
L_total_sweep_eme.lsf
See Also
Optimization of SMF-Fiber Position 2103

Final EME simulation 2103


3D FDTD simulation 2107
Related publications Figure1: Schem atic of a grating coupler

2003 - 2016 Lumerical Solutions, Inc


Applications 2099

1) Fiber-Chip Edge Coupler with Large Mode


Size for Silicon Photonic Wire Waveguides,
Martin Papes, Daniel Benedikovic, Pavel
Cheben, Jens H. Schmid, James Pond,
Winnie N. Ye, Dan-Xia Xu, Siegfried Janz,
Robert Halir, Alejandro Ortega-Moux and
Vladimir Vasinek, Optics Express, Vol. 24,
5026-5038 (2016)

Simulation setup
The corss-section and schematic of the edge coupler is shown below (taken from reference [1]).

The EME simulation setup is in Edge_coupler_EME.lms, and the "taper" structure has the following parameters:
Taper Parameters
L1, L2, L_buffer refer to the different portions of the Si waveguide and are the lengths of the untapered input
section, the tapered section, and the untapered end section, respectively
L_lower_nitride_L_upper_nitride are the lengths of the 2 silicon nitride layers
W is the width of ridge waveguide
Wwindow is the width of the entire slab should be larger than simulation region
d is the etch depth
fine_dx is the finer mesh size (used in key regions). It controls dy and dz around the silicon waveguide, and
dz in the nitride layers. It should never be larger than the thickness of the nitride layers or the conformal
meshing will not work.
height is the height of the silicon waveguide
include_input_buffer: if 1 (true), it will add an input waveguide of silicon of length L_buffer. This is useful to
study the taper without the fiber. If the full design is desired, the fiber should be enabled and this should be
set to 0 (false).
nSi, nSi3N4, nSiO2 are the refractive indices used for Si, Si3N4 and SiO2 (note that these could be
changed to use a model from the database, but it does speed up the calculation to use a lossless dielectric
and these materials have negligible loss at 1550nm)
tBOX is the thickness of the bottom oxide
tSi3N4 is the thickness of the silicon nitride layers (20nm in publications)
tSiO2_1,tSiO2_2,tSiO2_3 are the thicknesses of the SiO2 layers from the top of the BOX to the bottom of
the first nitride layer, between the 2 nitride layers, and from the upper nitride layer to the top of the
waveguide.
tw1 and tw2 are the widths of the input and output silicon waveguides, respectively

Note that at this stage, we do not simulate the subwavelength grating (SWG) for Si3N4 directly and assume that the
desired graded index has been achieved with a SWG. The spatially graded index from nSi3N4 to nSiO2 can be set
by using a formula for the refractive index of the form nSi3N4-(nSi3N4-nSiO2)*(x+L/2)/L where L is the length of the
nitride layer.

To begin the design:

2003 - 2016 Lumerical Solutions, Inc


2100 Lumerical Knowledge Base

Disable the SMF-28 for now and set include_input_buffer to 1


Set the BOX thickness to 10 microns, which will push the silicon substrate outside the simulation region
In the EME setup tab of the EME simulation region: Set the number of modes for all cell groups to 5, uncheck
"allow custom eigensolver settings", set the number of cells to 21 and set all boundaries to Metal except y-min,
which should be "Anti-Symmetric"
In the left and right ports, under the "EME port" tab, set the mode selection to "fundamental mode"

Simulation results
Once the simulation finishes running, in the EME analysis window, make sure that include fast diagnostics and
update monitors are checked and press eme propagate. Once the propagation is complete, you can visualize the
fields from the monitors.

To sweep the length of the taper, set "group_span_1" of in the "Propagation sweep" portion of the EME analysis
window to be from 10 to 1000 microns with 100 points. Once the propagation sweep is complete, visualize abs(S21)
^2 as shown below. This is the basic result and can be obtained in a few seconds. The remaining work is essentially
convergence testing and adding in the effects of the substrate, which will shift these results by a few percent.

2003 - 2016 Lumerical Solutions, Inc


Applications 2101

Convergence testing
For EME simulations, there are several factors that can affect convergence:

1) The number of cells used


2) The resolution of the transverse mesh, including the value of fine_dx
3) The number of modes used

Ideally, we can get to the point where increasing any of these properties has a negligible impact on results. For
example, the figure below shows several results for different numbers of modes and cells. Clearly, using 10 modes
and 21 cells is sufficient at this point, and even 5 modes with 21 cells could be used for optimization.

2003 - 2016 Lumerical Solutions, Inc


2102 Lumerical Knowledge Base

The script file L_total_sweep_eme.lsf will reproduce the same length sweep from the previous step, but it can
be used even when more than 1 cell group is included. This script can be useful for convergence testing as it is
possible to loop over different numbers of modes, cells or transverse mesh settings in an automated way. Also, with
the nominal length, it can be useful to look at the coefficients of forward propagating modes. This shows which
higher order modes are used when propagating. Note that the colorbar is oversaturated since the majority of the light
travels in the fundamental mode.

2003 - 2016 Lumerical Solutions, Inc


Applications 2103

8.3.1.7.2 Optimization of SMF-28 Fiber


MODE Solutions' finite difference eigenmode (FDE) solver can be used to optimize the position of the input fiber with
respect to the taper.

Solvers 101

FDE

Associated files
Edge_coupler_EME.lms

See Also
Overlap analysis 763
Initial EME simulation 2098
Final EME simulation 2103
3D FDTD simulation 2107
Related publications
1) Fiber-Chip Edge Coupler with Large Mode
Size for Silicon Photonic Wire Waveguides,
Martin Papes, Daniel Benedikovic, Pavel
Cheben, Jens H. Schmid, James Pond,
Winnie N. Ye, Dan-Xia Xu, Siegfried Janz,
Figure1: Schem atic of a grating coupler
Robert Halir, Alejandro Ortega-Moux and
Vladimir Vasinek, Optics Express, Vol. 24,
5026-5038 (2016)

The overlap analysis 763 utility in MODE Solutions' FDE solver can be used to optimize the position of the fiber with
respect to the taper. In Edge_coupler_EME.lms, set the include_input_buffer to 0 (false) for the edge coupler
and follow the instructions described here (go to "Optimization using eigenmodes and eigenmode expansion"
chapter).

8.3.1.7.3 Final EME simulation


This is a continuation of the initial EME simulation 2098 . Here, we will include the effect of the silicon substrate.

Solvers 101

EME
In this topic
Simulation setup 2104
Simulation results 2105
Convergence testing 2105
Associated files
Edge_coupler_EME_final.lms

See Also
Initial EME simulation 2098
Optimization of SMF-Fiber Position 2103

3D FDTD simulation 2107


Related publications
1) Fiber-Chip Edge Coupler with Large Mode
Size for Silicon Photonic Wire Waveguides, Figure1: Schem atic of a grating coupler
Martin Papes, Daniel Benedikovic, Pavel
Cheben, Jens H. Schmid, James Pond,
Winnie N. Ye, Dan-Xia Xu, Siegfried Janz,
Robert Halir, Alejandro Ortega-Moux and
Vladimir Vasinek, Optics Express, Vol. 24,
5026-5038 (2016)

2003 - 2016 Lumerical Solutions, Inc


2104 Lumerical Knowledge Base

Simulation setup
The key difference between the initial EME simulation 2098 and the final EME simulation is the following:

Silicon substrate. The majority of the loss in this device will come from leakage into the silicon substrate when the
mode is very large, near the edge of the chip. It is therefore necessary to include the silicon substrate to optimize
the device. Including the substrate makes the EME simulation much more complicated. The reason is that the
modes with the highest refractive index found by the eigenmode solver will be the modes fully confined to the
silicon substrate. For this reason, we can no longer identify the modes of interest based on those with the highest
refractive index. We therefore have to explicitly choose the effective index region of interest. We find that if we look
for modes around neff=1.6 we find the desired modes. In addition, we have to explicitly choose the the intput and
output modes at the ports because we can no longer simply ask for the fundamental mode.
PML typically for tapers we simply use metal boundary conditions. This is counter-intuitive as it is possible for
light to reflect from the metal and then recouple back into the fundamental mode of a waveguide. In practice
however, there is generally negligible light that recouples back into the fundamental mode and it propagates in
higher order, unbound modes outside of the structure. Furthermore, once we have achieved the adiabatic limit,
there is very little light that is scattered from the structure because the transmission is close to 100%. The PML
does add additional computation complexity, takes longer to run simulations, and can lead to problems with some
of the unphysical modes that are supported in the PML. However, it can be worthwhile at a final stage to include
PML in the simulation but it should be done only after all optimization steps are completed. Typically, the
inclusion of PML might reduce the transmission by a few percent.

In order include these effects, we need to make the following changes to the initial simulation (you can also start
directly with the file Edge_coupler_EME_final.lms):

Change all boundaries to PML except for the y-min boundary which should stay anti-symmetric
Set the tBOX in the taper structure to the correct 3 micron value.
Use the user select mode for BOTH ports (Edit EME port->EME port->mode selection), and search for the
correct fundamental mode. This is most easily accomplished by unchecking use max index and setting n to 1.6.
This will search for modes around n=1.6.

Port 1 Mode Port 2 Mode

In the EME setup tab of the EME solver region, check allow custom eigensolver settings. Then select the first
cell group and click the Custom settings for cell group 1.
In the eigensolver analysis window that appears, uncheck use max index and set n to 1.6. Also, set the number
of trial modes to 10. This will now search near neff=1.6. You can click calculate modes and ensure that you find
many of the desired modes. Click "Take settings".

2003 - 2016 Lumerical Solutions, Inc


Applications 2105

Simulation results
After running the simulation, plot the taper transmission as a function of length as described in the initial EME
simulation - simulation results 2100 .

Now it is clear that a shorter device is more optimal because of the substrate leakage.

Convergence testing
As in the initial EME simulation, here will will follow the same steps to test the convergence properties. A few curves
are shown below.

2003 - 2016 Lumerical Solutions, Inc


2106 Lumerical Knowledge Base

We can use 10 modes and 21 cells for devices longer than 100 microns. The results published in reference [1] were
calculated with 30 modes, PML boundaries, the Si substrate and 42 total cells however, the cells were not
uniformly distributed over the entire taper region in that case. It is clear that 30 modes is required for the very short
devices, but beyond 100 microns in total length 10 modes is sufficient. The higher order modes become less
important as we approach the adiabatic limit.

We can again look at the image of forward propagating modal coefficient amplitudes as a function of length to gain
insight into where the taper could be improved to preserve the adiabatic limit. Again, the colorbar is overstaturated.

2003 - 2016 Lumerical Solutions, Inc


Applications 2107

8.3.1.7.4 3D FDTD simulation


In this section, we will compare the results from the previous EME simulations of the edge coupler against the
results from a 3D FDTD simulation of the same geometry.

Solvers 101

FDTD
Associated files
Edge_coupler_FDTD.fsp
Edge_coupler_FDTD_results.ldf

See Also
Initial EME simulation 2098

Final EME simulation 2103

Related publications
1) Fiber-Chip Edge Coupler with Large Mode
Size for Silicon Photonic Wire Waveguides,
Martin Papes, Daniel Benedikovic, Pavel
Cheben, Jens H. Schmid, James Pond,
Winnie N. Ye, Dan-Xia Xu, Siegfried Janz,
Robert Halir, Alejandro Ortega-Moux and
Vladimir Vasinek, Optics Express, Vol. 24, Figure1: Schem atic of a grating coupler
5026-5038 (2016)

The file Edge_coupler_FDTD.fsp is set up to scan the length of the edge coupler. The taper structure is the
same as in the EME simulations except that it has one additional property which is called the Length_scale_factor.
This factor will scale L1, L2, L_upper_nitride and L_lower nitride. This allows us to easily stretch or compress the
entire device from the nominal 255 microns in length.

In the Model structure, we have a property called L_total. Changing this will automatically calculate the scale factor

2003 - 2016 Lumerical Solutions, Inc


2108 Lumerical Knowledge Base

for the taper and set it. It will also adjust the size of the FDTD simulation region and the position of the output
monitor.
The parameter sweep object sweep_length will sweep the length and calculate the transmission to the fundamental
mode. Currently it is set for only 3 points at 20, 30 and 40 microns but this could be easily changed.

Some of the simulation results are stored in Edge_coupler_FDTD_results.ldf and the results are published
in reference [1].

8.3.1.8 Waveguide Couplers


Please select from the following topics:

Evanescent
waveguide
couplers 2108

MMI couplers 2114

AWGs and Star


couplers 2119

8.3.1.8.1 Evanescent w aveguide couplers

Introduction
One method to make waveguide or fiber couplers is to use straight sections of the guides where the evanescent
modes of one guide overlap with the modes of a second guide. The light from one guide slowly transfers back and
forth between the guides. By choosing the distance between the guides and the length of the coupling region, it is
possible to couple any desired fraction of the light from one waveguide to the other. The coupling strength can be

2003 - 2016 Lumerical Solutions, Inc


Applications 2109

very sensitive to the distance between the guides and it is important to ultimately choose a design that can function
acceptably given the types of imperfections that are expected for your manufacturing process.

Solvers 101

FDE
varFDTD
In this topic
Simulation setup 2109
Results: Eigenmode solver and analytical formula 2109

Propagator simulation 2113


Associated files
waveguide_couplers.lms
waveguide_couplers.lsf

See also
Ring resonator MODE (design and initial simulation) 2021

Simulation setup
The file waveguide_coupler.lms has two Silicon on Insulator (SOI) waveguides that are 500nm wide and 200nm
thick. The space between the waveguides is 50nm. There are two mesh override regions used:
1. One region covers both guides and extends about 100nm outside them, that reduces the size of the mesh by a
factor of 4 in order to accurately resolve the modes inside the guides and in the evanescent field; and
2. A second region that sets the values of dy between the guides to 2nm. This is important because the coupling of
the guides can be quite sensitive to the space between them.

Results: Eigenmode solver and analytical formula


We can first calculate the coupling length by considering the difference in index between the 2 coupled modes, as
shown below.

2003 - 2016 Lumerical Solutions, Inc


2110 Lumerical Knowledge Base

The index difference is


Dn = n1 - n2 = 2.378022 - 2.317864 = 0.0601584
and, if we initially have 100% of the power in waveguide 1, then the power in waveguide 2 is given by

pLDn
P2 ( L) = P0 sin 2
l0
where L is the length of the coupling region, P0 is the input power, and l0 is the free space wavelength. It is easy, for
example, to calculate the coupling length to achieve any desired power coupling to waveguide 2 by solving for L:
l0 P
L= sin -1 2
pDn P0

For example, the length required to couple 100% of the light from waveguide 1 to waveguide 2 is simply

l0 1.55 mm
L100% = = = 12.8827 mm
2Dn 2 0.0601584

How does this work?

Consider the situation where light is propagating in waveguide 1 and we introduce a second waveguide abruptly, as

2003 - 2016 Lumerical Solutions, Inc


Applications 2111

shown in the left image below. The Ey component of the mode propagating in waveguide 1 initially is shown in the
plot on the right. The effective index of the initial mode is n0 = 2.329497.

Once the second waveguide is introduced, we now have 2 modes, which are approximately given by the sum and
difference of the modes of the original waveguides, and have effective indices n1 = n0 + Dn/2 and n2 = n0 - Dn/2. If we
consider the sum of these modes we have

+ =
so we see that the original waveguide mode matches well with the sum of the 2 modes that exist when both
waveguides are present. The original waveguide mode therefore excites both of these modes equally, but they
propagate with different phase velocities. The E field at a distance L from the point where the second waveguide is
introduced is given by

r r 2 pin1 r 2 pin2
E ( L) = E1 exp L + E2 exp L
l0 l0
r r 2 pin1 r 0 r 0 2 pin2
( )
E 10 + E20 exp ( )
L + E 1 - E2 exp L
l0 l0
r 2 pin0 pDn r 2 pin0 pDn
= 2 E 10 exp L cos L + 2iE20 exp L sin L
l0 l0 l0 l0

where E1 and E2 are the modes of the coupled waveguide system, and E10 and E20 are the unperturbed modes of the
single waveguide positioned at location 1 or location 2 respectively. We see that the light propagates like the
unperturbed waveguide system, but the oscillates back and forth between the 2 guides periodically due to the sine
and cosine terms.

In reality, we rarely introduce a second waveguide abruptly and we generally don't remove it abruptly. A real device
might look something like this

2003 - 2016 Lumerical Solutions, Inc


2112 Lumerical Knowledge Base

In many cases, the effect of the bent region can be ignored. The effect of the bent region can be investigated in detail
either using the propagator in MODE Solutions, or if the waveguide is small enough, it may be possible to run a 3D
FDTD simulation.

Reconstructing an image of the propagating field

It may be useful to reconstruct the image of the field as it propagates over large distances. The script file
waveguide_couplers.lsf can be used to do this after opening the file waveguide_couplers.lms. It first
deletes the right waveguide and calculates the field of the input guide which is copied to a global dcard called "E0",
and looks like the mode below.

The right waveguide is then re-introduced by the script and the modes of the coupled waveguide system are
calculated. The mode "E0" is then decomposed onto the 2 modes of the coupled system and propagated an
arbitrary distance using the propagate command. This is repeated for 100 different lengths from 0 to 40 microns,
and the final figure is created which shows the electric field intensity vs x and L at y=0.1 microns.

We can see that the length for 100% coupling is indeed the 12.552 microns expected.

2003 - 2016 Lumerical Solutions, Inc


Applications 2113

Propagator simulation
Note: Accuracy
The eigenmode solver gives a more accurate result because it calculates full 2D mode profiles, whereas the
varFDTD solver is less accurate since it neglects the coupling in the z dimension.

It is also possible to simulate the same structure using the propagator. The simulation file
waveguide_coupler.lms also contains a propagator region which can be activated by right clicking on the
propagator region on the object tree.

The propagator simulation contains a mode source. If you choose to user select a mode, you will get the mode
solver shown below. As shown in the eigenmode solver example above, the propagation length is related to the
effective index.

From the screen shot below you can see that the index difference is
Dn = n1 - n2 = 2.475423 - 2.391182 = 0.084241
Notice that this effective index difference is slightly higher than when we used the eigenmode solver. Clearly the
eigenmode solver gives a more accurate effective index difference for this structure because it calculates full 2D
mode profiles. In contrast, the propagator first compresses the z dimension and then calculates the modes using the
compressed data.

We can slightly modify the spacing between the two waveguides in order to get the correct effective index difference
and propagation length. A index difference of 0.0626 can be attained by setting the waveguide spacing to 70nm.

2003 - 2016 Lumerical Solutions, Inc


2114 Lumerical Knowledge Base

Then, we can set the x max of the right waveguide to 20 microns, and set the integrated mode source so that it
selects the fundamental mode. If we run the simulation, and send the monitor1 data to the frequency monitor, we
can see that the coupling length is approximately 13 microns, as expected.

The oscillations seen in the electric field intensity above are due to the fact that there is an additional mode excited.
The Effective Index tab for the propagator contains an option to clamp the effective index values to the physical
material properties. The extra mode which is excited in the image above can be removed by unchecking this option.

Since removing the material clamping changes the variational effective index method, the difference between the real
part of the effective indices of the modes changes again. Therefore, in order to obtain the image below, the mode
solver was used to find the correct spacing between the waveguides. After removing the clamping a spacing of 90nm
gave a refractive index difference of 0.063.

8.3.1.8.2 Simple MMI coupler

Introduction
In this example, we will demonstrate how to simulate a multi-mode interference (MMI) coupler with the bi-direction
EME solver, the omni-directional 2.5D varFDTD solver, as well the uni-directional eigenmode expansion 114 method

2003 - 2016 Lumerical Solutions, Inc


Applications 2115

using the FDE solver, and compare the different methods.

Solvers 101
EME
FDE
varFDTD
In this topic
EME solver simulation 2115

Propagator simulation 2116

FDE solver simulation 2117

Discussion 2118
Associated files
MMI_simple.lms
MMI_expansion_results.ls
f
MMI_propagate.lsf

See also
Ring Resonator Getting Started
Example 2039
MMI coupler with tapered
waveguides 2118

The file MMI_simple.lms contains a SOI MMI structure, as well as an EME solver, FDE solver and Propagator
simulation region.

EME solver simulation


In the MMI_simple.lms file, the EME solver region should be active to start with. Run the simulation, then in the
EME Analysis window click the "eme propagate" button to calculate the profile monitor results. You can then right-
click on the profile monitor and visualize the E field intensity. You can also use the following code to run the
simulation, perform the eme propagate step and plot the E intensity from the script using the following code.

# run simulation and propagate fields


run;
emepropagate;

# collect monitor data


monitor_data = getresult("eme_profile","field profile");
E2 = monitor_data.E2;
x = monitor_data.x;
y = monitor_data.y;

# plot E intensity profile


image(x*1e6,y*1e6,E2,"x (um)","y (um)","E intensity");

The resulting E intensity profile is shown below.

2003 - 2016 Lumerical Solutions, Inc


2116 Lumerical Knowledge Base

The transmission and reflection of the fundamental mode can be determined from the user s-matrix result from the
EME solver region object. The following image shows the absolute value squared of the user s-matrix. The total
transmission through port 2 from port 1 is the S21 element. Since the device is symmetric, the amount of power
through each output waveguide is half the amount of the total transmission, or about 31.6%.

2.5D varFDTD simulation


It is also possible to simulate the same MMI structure using the 2.5D varFDTD solver, which supports omni-
directional, in-plane propagation.

The simulation file MMI_simple.lms also contains a 2.5D varFDTD solver region, which can be activated by right
clicking on the 2.5D varFDTD region on the object tree. The simulation contains a mode source, as well as different
monitors for obtaining different simulation results. Once the simulation finishes running, one can plot the electric field
intensity vs x from the profile monitor:

2003 - 2016 Lumerical Solutions, Inc


Applications 2117

With the mode expansion monitors, we can calculate the forward/backward transmission into the fundamental
waveguide mode of the input waveguide, as well as the two output waveguides. The script
MMI_expansion_results.lsf will output the results from the mode expansion monitors in the script prompt.
> MMI_expansion_results;
Reflection into the fundamental mode of input waveguide is 6.03694 %
Transmission into the fundamental mode of output waveguide 1 is 31.7867 %
Transmission into the fundamental mode of output waveguide 2 is 31.7877 %

For more information on how to use mode expansion monitors for this analysis, please see Using Mode Expansion
Monitors 649 in the User Guide.

FDE solver simulation


The script MMI_propagate.lsf will first place the Eigenmode solver region across the input waveguide, and then
calculate the modes of this input waveguide. After storing the fundamental mode as "E0", the Eigenmode solver is
then moved to the center of the wider, multi-mode waveguide. "E0" is then decomposed onto the modes of the multi-
mode waveguide, and propagated an arbitrary distance using the propagate 1609 command. This is repeated for 100
sections from 0 to 6 microns (ie. the length of the multi-mode waveguide). The final figure is created showing the
electric field intensity vs x inside the multi-mode waveguide:

2003 - 2016 Lumerical Solutions, Inc


2118 Lumerical Knowledge Base

We can see that the field profile inside the coupling region is different then the profile from the EME and 2.5D
varFDTD solver simulations. The reason for this discrepancy is due to the interference caused by the reflected fields,
which are not account for by the Eigenmode solver simulation.

Discussion
Both the EME solver method and 2.5D varFDTD method give good results for the transmission, taking less than a
minute to run on a standard 4 core workstation. The field profile using the 2.5D varFDTD method may be less
accurate since it does not calculate the full 2D mode profiles, whereas the EME solver simulates the full 3D
structure. Since the simulation can be completed in a comparable amount of time the EME method is preferable.

The FDE solver method is not suitable for simulating the MMI coupler device as it is a uni-directional technique
which does not account for reflected fields, and there is a non-trivial amount of reflection at the interfaces (between
the waveguides of different widths).

8.3.1.8.3 MMI coupler w ith tapered w aveguides

Introduction
In this example we calculate the optical loss through a 1x2 port multi-mode interference (MMI) coupler for different
linear taper widths at the input and output ports of the device.

Solvers 101

EME

Associated files
MMI_tapered.lms
MMI_tapered.lsf

Related publication
D.J. Thomson et al, Low
Loss MMI Couplers for High
Performance MZI
Modulators, IEEE
Photonics Technology
Letters, Vol. 22, No. 20,
October 2010.

See also
Simple MMI coupler 2114

EME result analysis 774

Background
Optical loss through MMI coupler devices can occur due to mismatch between the input waveguide mode and the
modes supported in the interference region. Based on the design in the publication listed above by Thomson et al,
linear tapers are introduced at the input and output ports of the device to reduce the mode mismatch and reduce
loss. We analyze the loss for a range of taper widths.

Setup
Structure
The MMI structure with 10 micron long linear tapers between the input and output waveguides and the interference
region is set up automatically using a structure group.

2003 - 2016 Lumerical Solutions, Inc


Applications 2119

Simulation region
Since were interested in collecting the transmission of the fundamental mode, the fundamental mode is selected in
the EME solver region's ports. Here, since the structure and has symmetry across the y-direction, the y min
boundary condition is set to anti-symmetric to reduce the simulation time and memory. Since only positive y half of
the structure is simulated due to the symmetry condition, only 1 of the 2 output ports is included in the simulation
region, so there are only 2 ports set up in the EME solver (the input port and one of the output ports). The total
transmission is calculated after running the simulations by doubling the transmission through the output port that is
simulated.

In the EME setup tab, 5 cell group regions are set up. In the cell group regions that contain the tapers, 10 cells are
used in the x-direction to resolve the tapers, and mesh override regions are used to increase the resolution of the
transverse mesh over the tapers. The CVCS subcell method is also used in the taper regions to avoid artifacts due to
discretization of the structure in the x-direction. The CVCS method is recommended in cell group regions where the
structure cross section is continuously varying.

Because the interference region supports many modes compared to the input and output waveguides, we use an
increased number of modes to represent the propagation in this region.

Parameter sweep
In the "Optimizations and Sweeps" window, a parameter sweep task is set up to sweep the taper width property of
the structure group between 0.4 microns and 1.1 microns and collect the user s-matrix.

Results
The script file is used to run the parameter sweep and collect the user s-matrix results. The transmission in the
fundamental mode through port 2 from port 1 is then calculated from the S21 element from the user s-matrix, and the
value is doubled to give the transmission through both output ports. The result is plotted below.

8.3.1.8.4 AWGs and Star couplers

Introduction
Arrayed waveguide gratings (AWGs) are essential for dense wavelength division multiplexing/de-multiplexing in
optical networks. The sensitivity of these devices to phase errors means that a rigorous design process and
simulation tool is required. However, the size and complexity of AWGs make them very challenging for most
simulation tools. In this example, we will provide a basic template for a typical AWGs simulation, where the size of
the full device can be on the order of 10s of millimeters (or larger).

If you are not familiar with Propagator simulations, you may want to go through the Ring Resonator Getting Started

2003 - 2016 Lumerical Solutions, Inc


2120 Lumerical Knowledge Base

Example 2021 before proceeding.

Solvers 101
varFDTD

In this topic
Introduction 2119

Associated files
input_star.lms
expansion_results.ls
f
output_star.lms
set_source_star.lsf
plot_profile.lsf

See also
Ring Resonator Getting
Started Example 2021

Due to the size of AWGs, it is often not possible to model this device using 3D finite-difference time-domain (FDTD).
Some common alternatives for simulating wave propagation at large distances include the Beam Propagation
Method (BPM), the Eigenmode Expansion Method and 2D FDTD. However, the approximations required for these
methods make them ill-suited for treating AWGs devices. For these devices, the variational FDTD technique used by
the Propagator can take into account the important dispersion effects, while only requiring the simulation time and
memory of a 2D FDTD simulation.

Simulation setup
Very often, AWGs designs are on the order of 10s of millimeters, which make them too large to be simulated as a
whole even in a 2.5D calculation method. The recommended approach is to break the device into 3 different
sections:

First we have the input star


coupler, which takes the light
from an input waveguide and
allows it to propagate through
the free space propagation
(FSP) region. At the end of
the FSP region, the light is
spread among the output
arrayed waveguides following
a Gaussian-shaped

2003 - 2016 Lumerical Solutions, Inc


Applications 2121

distribution.
The light then propagates
along each arrayed waveguide
over a large distance. The
length of each waveguide is
designed such that they have
a constant length increment
L, resulting in a constant
phase change across
each successive channel.
Once the light reaches the
output star coupler, it will
enter another FSP region,
where it refocuses at one of
the output waveguides.
Depending on the wavelength,
the light will be focused on to
the different output channels.

Input star coupler


The input_star.lms file contains the input star coupler. The star coupler has been parameterized using a
structure group, allowing us to change design parameters such as the number of input/output channels, the angle
and the radius for the star coupler. Here, we can use a MODE source to launch the fundamental mode along any of
the input waveguides. The simulation region is about 600x200 microns, which can be simulated reasonably quickly
using a 2.5D Propagator method. Once the simulation finishes running, we can plot the electric field profile using the
Visualizer, as shown below:

2003 - 2016 Lumerical Solutions, Inc


2122 Lumerical Knowledge Base

We can see how the input waveguide mode spreads out in the FSP region, and distributes among the different
output array waveguides. In the Visualizer, it is very easy to plot a slice of this image along the x direction. However,
this image alone does not give us enough information about how much power is actually transmitted into the output
waveguides.Mode expansion monitors are ideal for this calculation. In the same file, the mode expansion monitors
and transmission monitors have been set up at each output waveguide (rotated at the same angle). This will allow us
to determine how much power is transmitted into the fundamental mode of each output waveguide. For more
information on how to use mode expansion monitors for this analysis, please see Using Mode Expansion Monitors
649 in the User Guide.

The script expansion_results.lsf will plot the transmission into the fundamental mode of each output
waveguide, as well as the total transmission into each waveguide.

Since the total transmission is calculated by simply integrating the Poynting vector along the monitor plane, we can
see that it is very easy to over-estimate how much light is actually transmitted into the arrayed waveguides. This is
why it is very important to carry out mode expansion calculations, instead of simply looking at the total

2003 - 2016 Lumerical Solutions, Inc


Applications 2123

transmission.

Arrayed waveguides
The propagation in the arrayed waveguide can be treated analytically. The AWGs are designed such that the length
DL = m l0 / neff
difference between successive channels is (where m is an integer).
D j = bDL = m l0 w / c
The phase difference between each channel is , which corresponds to a time delay of
Dt = m l0 / c
between each channel. This means that in order to get the correct phase difference in a time domain
simulation, we will need to set this time delay for each input mode of the output star coupler.

This time delay can be


specified in the "offset" value
under the "Edit source ->
Frequency/Wavelength" tab
(with the "set time domain"
option is selected).

Output star coupler


The output star coupler in output_star.lms contains the output star coupler. The script
set_source_star.lsf will automatically add a mode source for each input channel, rotated at the same angle
m l0
Dt =
as the input waveguide, with the time delay c . For this simulation, we will use a broadband source so we
can see how interference in the output star coupler changes as a function of wavelength. Once the simulation
finishes running, we can plot the electric field profile at different wavelengths. Note that due to the size of the profile
monitor, it may be difficult to plot the results for all frequencies in the Visualizer. If you find that this is the case, you
can use the script plot_profile.lsf to plot the profile 1 frequency at a time. Alternatively, you can also reduce
the resolution of this monitor by setting the "Geometry -> down sample X/Y/Z" properties inside the Edit window of
the profile monitor.

2003 - 2016 Lumerical Solutions, Inc


2124 Lumerical Knowledge Base

We can see that, at wavelengths near the center wavelength, the light is mostly coupled into the center output
waveguide . As we change the wavelength of the sources from shorter to longer wavelengths, we can see the
position where the light focuses move along the right edge of the output star coupler, coupling into different channels
depending on the wavelength. This de-multiplexing functionality is the result of the phase difference from the time
delay that we specified.

Even though this is a very simple example. One can easily extend this basic template to more complex designs. If
you would like to discuss how to approach your AWGs design with Lumerical's technical support team, please
email support@lumerical.com.

8.3.1.9 Tapers
For planar tapers where there is negligible coupling between the different slab modes supported by the vertical
waveguide structure (ex. SOI taper), the 2.5D variational FDTD solver 107 can be used. For an example, see

SOI taper design 2125

For tapers where there is coupling between the different slab modes modes, or if the geometry is not planar (ex.
tapered fiber), the eigenmode expansion (EME) solver 114 should be used. For an example, see

Spot size converter


(getting started) 2053

2003 - 2016 Lumerical Solutions, Inc


Applications 2125

Polarization converter
2130

8.3.1.9.1 SOI taper design


In this example, we will determine the optimal shape of a SOI taper using MODE Solutions 2.5D variational FDTD
solver 107 . Note that this taper can be simulated using the eigenmode expansion (EME) solver 114 as well.

Solvers 101
varFDTD
Associated files
taper_design.lms

See also
Tapered waveguides 2124
Grating Coupler Design and
Optimization video

We will start by parameterizing the design of this taper as follows:

w( x) = a ( L - x) m + w2
w(0) = w1
w( L) = w2
a = ( w1 - w2 ) / Lm
The taper design in this case will be proportional to x to the power of exponent m . At the two ends of the taper,

we are constrained to the waveguide width of


w1 and w2 .

2003 - 2016 Lumerical Solutions, Inc


2126 Lumerical Knowledge Base

m = 0.5 corresponds to a square root shaped taper. m = 2 corresponds to a parabolic shaped taper.

The file taper_design.lms contains a 2.5D propagator simulation region with a slab gaussian beam as the
source. The slab gaussian beam is set up to focus at a distance 25um away from the source position.

A parameter sweep project has been set up to track the transmission into the output waveguide as a function of the
exponent m. You can use the animate function to see how the shape of the taper changes as a function of m.

The result of the parameter sweep for the exponent m from 0.1 to 4 is shown below. One can see that the
transmission changes quite significantly as m changes from 0.1 to 4. The peak value is close to 1 (corresponding to
a linear taper), but if we run the parameter sweep project again, which sweeps m over a much narrower range from
0.8 to 1.7, we find that the optimal value is at around 1.15.

2003 - 2016 Lumerical Solutions, Inc


Applications 2127

We can also look at the propagation of light in this taper (form=1.15) with the movie monitor.

It is important to note that this simulation (~30um by 30um by 2um) would have taken a very long time to run with 3D
FDTD. The 2.5D Propagator is ideal here in that it allows us to find the optimal shape of this SOI taper very quickly.
On the next page, we will calculate the transmission into individual modes of the output waveguide and show that the
results are very close to the 3D FDTD results.

8.3.1.9.1.1 Comparing results w ith 3D FDTD


In the previous page, we found the optimal shape of the SOI taper by parameterizing it an exponential function and
using a parameter sweep to find the optimal parameter values. Now we will demonstrate how to calculate the
transmission from the input waveguide into individual modes of the output waveguide, and compare the results with
3D FDTD.

2003 - 2016 Lumerical Solutions, Inc


2128 Lumerical Knowledge Base

Solvers 101
varFDTD
FDTD
Associated files
taper.lms
taper.fsp

See also
SOI taper design 2125

We will use the same taper with the optimal value m = 1.15 found in the previous page. Here, we will inject the mode
source from the left waveguide "w1", and measure the transmission into the TE modes of the right waveguide "w2".
The figure below shows the simulation model and resultant field profile.

To measure the transmission into the modes of the output waveguide, we added a transmission monitor and a Mode
Expansion Monitor at w2. The mode expansion monitor allows one to select an arbitrary number of modal fields with
the "user select" mode selection option. One can then shift-select the desired modes from the mode list. For this
example, we will select the first 5 even TE modes for the expansion, which are modes #2, 6, 10, 14, 18.

2003 - 2016 Lumerical Solutions, Inc


Applications 2129

Once the simulation finishes running, right-click on the expansion monitor to visualize the results. The Visualizer
screen shot below shows the forward transmission into the first 5 even TE modes of the output waveguide.

Because collapsing the vertical structure into an effective slab works very well in a wide region like that of the taper,
no approximations are made for light propagation in the waveguide slab and one can get results very close to 3D
FDTD with this 2.5D FDTD treatment. The figure below compares the results between 2.5D FDTD and 3D FDTD
(using taper.fsp), and you can see that the results are almost identical to 3D FDTD.

2003 - 2016 Lumerical Solutions, Inc


2130 Lumerical Knowledge Base

8.3.1.9.2 Polarization converter


In this topic, we demonstrate how to design a polarization converter based on reference [1]. We will start with MODE
Solutions' finite difference eigenmode (FDE) solver 109 to quickly narrow down the design choices prior to running full
simulations of the entire device using the eigenmode expansion (EME) solver 114 .

Solvers 101

FDE
EME
Associated files
taper_width_sweep.lm
s
taper_width_sweep.ls
f
pol_converter.lms

See also
Spot size converter (getting
started) 2053
Related publications
[1] D. Dai et al, Mode
conversion in tapered
submicron silicon ridge
optical waveguides, Optics
Express. Vol. 20, No. 12,
2012.

Initial design using FDE


The design of the polarization converter is based on reference [1]. For this design, it is useful to start the FDE solver
to quickly narrow down the design choices (varying the waveguide width in this case) prior to running full simulations
of the entire device using the EME solver. For the polarization converter, the FDE solver can be used to identify the
regions where mode-crossings occur. This design will convert the TE1 mode into the TM0 mode, where the mode-
crossing occurs at around 0.9um.

Open taper_width_sweep.lms and run taper_width_sweep.lsf. The script will run a number of FDE
simulations, varying the waveguide width from 3um to 0.5um. At each step, the effective index (neff) for the first 5
modes will be stored. The neffs are subtracted by the neff of the slab mode (without the ridge). When the simulations
are finished, the script will create the following figure, which can be used to identify the regions where mode-

2003 - 2016 Lumerical Solutions, Inc


Applications 2131

crossings occur and which waveguide widths are required to achieve polarization conversion. For the subsequent
simulation using the EME solver, we will use an input and output waveguide width of 1.5um and 0.8um respectively.

Length scanning using EME


We will simulate light propagation in this device using the EME solver. The simulation set up is similar to the spot
size converter getting started example 2053 . It is recommended that you go through the getting started example in
detail before running pol_converter.lms.

pol_converter.lms contains the input and output ridge waveguides, connected by a taper with 1.5um and 0.8um
as the waveguide input and output respectively. We track 3 modes and note that the modes are listed based on their
neff, i.e., (TE0, TE1, TM0) at 1.5um waveguide width and (TE0, TM0, TE1) at 0.8um waveguide width. The order can
be visualized by drawing a vertical line on the above figure at the particular waveguide width. We will scan the length
of this taper and track how efficiently the TE1 mode can be converted into the fundamental TM mode. Run the
simulation to calculate the modes at each cell. Once the simulation is complete, use the "Propagation sweep"
widget in the EME analysis window to scan the taper length (group span 2) from 5um to 500um and then click on
the eme sweep button.

Clicking on visualize eme sweep will display the results of all the S parameter elements (6x6) in the visualizer.
The S matrix index mapping table can be used to see which S element maps to which port. Since there are 2 ports
(with 3 modes each), S42, S52, S62 will give us the conversion efficiency from TE1 to TE0, TE1 to TM0 and TE1 to
TE1 respectively. One can click on the Remove button to reserve the Attribute of interest. Then select Abs^2 in the
"Scalar operation" drop-down list. In the plot below, one can see that there is no energy transferred from TE1 to TE0.

2003 - 2016 Lumerical Solutions, Inc


2132 Lumerical Knowledge Base

At the taper length of around 250um, the TE1 mode is almost completely transferred to the TM0 mode.

The EME method is ideal for taper designs because one can scan the taper lengths very quickly without having to
recalculate any modes. Not only does the simulation time required for FDTD-based methods increase with the taper
length squared, the accuracy also decreases due to numerical grid dispersion.

8.3.1.10 Bragg Gratings


In this chapter we will focus on the design and optimization of Bragg waveguide gratings (for fiber Bragg gratings,
see Fiber Bragg Gratings) 2182 . We will start with 3D finite-difference time-domain (FDTD) simulations of the infinitely
long device to access how the performance of the grating is affected by geometric parameters such as the
corrugation depth and misalignment. We will then use the eigenmode expansion (EME) solver in MODE Solutions to
calculate the full transmission spectrum of the device. Finally, we will use the EME solver to study the effect of
adding a phase shift to the Bragg grating to create a resonance peak within the stop band. This design can be used
as a filter in an integrated optics circuit, as well as a sensor for biological sensing applications.

Initial design with


FDTD 2133

2003 - 2016 Lumerical Solutions, Inc


Applications 2133

Full device
simulation with
EME 2135

Phase-shifted
Bragg grating 2138

8.3.1.10.1 Initial design w ith FDTD

Introduction
In this example, we will use 3D FDTD simulations to access how the performance of the Bragg grating is affected by
geometric parameters such as the corrugation depth and misalignment.

Solvers 101

FDTD
Associated files
Bragg_FDTD_unit_cell.fsp

See also
Full device simulation with EME 2135

Phase-shifted Bragg grating 774


Related publication
1. X. Wang, et al., "Precise control of the
coupling coefficient through destructive
interference in silicon waveguide Bragg
gratings", Opt. Lett. 39, 5519-5522 (2014).

Background
A waveguide Bragg grating is an example of a 1D photonic bandgap structure where periodic perturbations to the
straight waveguide forms a wavelength specific dielectric mirror. These devices are often used as optical filters for
achieving wavelength selective functions.

Simulation Setup
For this example, we will use a 3D FDTD simulation of a single unit cell of the grating to find the center wavelength
and bandwidth of the infinitely periodic device. In Bragg_FDTD_unit_cell.fsp, the simulation region contains
exactly 1 unit cell of the grating. Bloch boundaries are used for the x min/max boundaries, which allows us to set
the kx value for the infinitely periodic device. A mode source is used as the excitation, and the bandstructure

2003 - 2016 Lumerical Solutions, Inc


2134 Lumerical Knowledge Base

analysis group 806 is used to calculate the spectrum. For this simulation, we are interested in the spectrum at the
p
kx =
band edge a , which will give us the size and location of the band gap of the grating.

Simulation Results
p
kx =
Once the simulation finishes running, the spectrum at a is returned by the bandstructure analysis group and
is shown below. The two peaks in the spectrum gives the size and location of the band gap, which corresponds to
the bandwidth and center wavelength of the Bragg grating.

Coupling coefficient as a function of grating depth


Even though this FDTD method applies for an infinitely periodic grating, it can still be very useful for designing finite
length gratings. With this approach, one can quickly access how the performance of the grating is altered by
various design parameters. For example, we can run a parameter sweep of the corrugation depth and calculate the
grating coupling coefficient
png D l
k=
l20
l n l
where D l is the bandwidth, 0 is the center wavelength, g is the group index at 0 .

Coupling coefficient as a function of misalignment in the sidewall corrugations


In[1], the same FDTD method was applied to access how the grating strength can be tuned by varying the
misalignment between the corrugations on the two sidewalls.

2003 - 2016 Lumerical Solutions, Inc


Applications 2135

8.3.1.10.2 Full device simulation w ith EME

Introduction
In this example, we will use the eigenmode expansion (EME) solver in MODE Solutions to calculate the full
transmission spectrum of the waveguide Bragg grating with an arbitrary number of periods. Note that in many cases,
the center wavelength and bandwidth of the grating will give enough information about the performance of the grating,
and a full transmission spectrum is not always necessary. In that case, it is recommended to use the much simpler
FDTD approach shown in the previous example 2133 .

It is also recommended to go through the Eigenmode expansion solver introduction video and the spot size converter
2053 getting started example to familiarize yourself with the EME solver before proceeding with the rest of this

example.

Solvers 101

EME
Associated files
Bragg_EME.lms
period_sweep.lsf

See also
Initial design with FDTD 2133
Phase-shifted Bragg grating
774

Spot size converter 2053


Eigenmode expansion
solver introduction
1. X. Wang, Silicon
photonic waveguide Bragg
gratings, Ph.D. Thesis,
University of British
Columbia (2013).

Background
A waveguide Bragg grating is an example of a 1D photonic bandgap structure where periodic perturbations to the
straight waveguide forms a wavelength specific dielectric mirror. These devices are often used as optical filters for
achieving wavelength selective functions.

2003 - 2016 Lumerical Solutions, Inc


2136 Lumerical Knowledge Base

Simulation Setup
When simulating periodic structures using EME, only 1 unit cell of the geometry needs to be defined. In
Bragg_EME.lms, the EME solver covers a single unit cell of the grating as shown below.

1 port is set up at each end of the solver to calculate the transmission and reflection into the fundamental TE mode.
Under the EME setup tab, we define 2 cell groups for the EME solver, one for the region with the larger waveguide
width and one for the smaller waveguide width. Since the refractive index and geometry is uniform within each cell
group, we only need to use 1 cell for each cell group. For the initial simulation, we will use 10 modes for each cell
group in the EME calculation. Note that symmetry is used here to reduce the number of modes required for this
calculation.

To set the periodicity of the grating, we will define 1 periodic group under the "periodic group definition" table on the
right side of the EME setup tab. The start and end cell groups are set to 1 and 2 respectively, and the number of
periods is set to 500. This means that the unit cell (composed of 2 cell groups) will be propagated 500 times, and
the final length of the device will be 160um.

Since EME is a frequency-domain method, we will need to run 1 simulation for each wavelength of interest. This can
be very time consuming since all the modes need to be re-calculated for each wavelength, and a large number of
simulations are often required to accurately describe the full transmission spectrum. A useful trick to avoid re-
calculating the modes is to scan the length of the period instead of the wavelength, since scanning the length of the
period does not require re-calculating the modes. To do this, we need to be able to relate the grating period to the
wavelength. This relation can be obtained with a Taylor series expansion for
a( l )

2003 - 2016 Lumerical Solutions, Inc


Applications 2137

l0 n
a = a0 + a0 ( - 1) g
l neff
Explanation
Note that this equation is different from taking the derivative of the Bragg wavelength equation (see Eq. 2.1 in
[1]).

However, this means that each grating period corresponds to one peak Bragg wavelength. In EME simulation,
this could be time consuming. What we want is the phase change for different wavelengths, and convert the
phase change to an effective period change. The phase for one grating period ( ) at different wavelengths:

If we want to get the same phase change by changing the grating period at the original wavelength:

By combining the above equations, we can get the following relationship

Notes:
and are the effective indices ( ) at wavelength and

is the group index:


a l n n
Here, 0 and 0 are the reference period and wavelength, and the effective index/group index eff / g can be
calculated with the Eigenmode (FDE) solver. The script period_sweep.lsf will calculate the modes at the
reference wavelength, scan the length of the period based on the relation above, and plot the transmission spectrum
of the waveguide Bragg grating.

Simulation Results
The transmission spectrum of the waveguide Bragg grating with 500 periods is shown below. Alternatively, the same
transmission/reflection spectrum can also be obtained by using a parameter sweep 699 to scan the wavelength
directly. This approach is much more time consuming than scanning the length of the period, and should only be
used when the number of wavelengths is small.

2003 - 2016 Lumerical Solutions, Inc


2138 Lumerical Knowledge Base

The EME method is ideal for simulating the transmission spectrum of a finite-length waveguide Bragg grating since
the full device can be challenging for FDTD-based methods due to the amount of computational time and memory
required.

8.3.1.10.3 Phase-shifted Bragg grating

Introduction
In this example, we will use MODE Solutions' EME solver to study the effect of adding a phase shift to the Bragg
grating to create a resonance peak within the stop band. This design can be used as a filter in an integrated optics
circuit, as well as a sensor for biological sensing applications.

It is recommended to go through the Eigenmode expansion solver introduction video and the spot size converter 2053
getting started example to familiarize yourself with the EME solver before proceeding with the rest of this example.

Solvers 101

EME

Associated files
shift_Bragg_eme.lms
shift_period_sweep.l
sf

See also
Initial design with FDTD 2133
Full device simulation with
EME 2135
Spot size converter 2053
Eigenmode expansion
solver introduction
Related publication
1. P. Prabhathan, et al.,
Compact SOI nanowire
refractive index sensor using
phase shifted Bragg
grating", Optics Express,
Vol. 17, No. 17, 2009

Background
In this Bragg grating design, a phase shift is introduced at the center of the device to create a Fabry-Perot cavity
with mirrors formed by the gratings on each side. This phase shift will lead to a sharp resonance peak within the

2003 - 2016 Lumerical Solutions, Inc


Applications 2139

stop band of the transmission spectrum.

Simulation Setup
The setup for the phase-shifted Bragg grating in shift_Bragg_eme.lms is similar to that of the waveguide Bragg
grating example 2135 , with a few modifications required to accommodate the cavity region at the center of the grating,

Under the EME setup tab, we define 5 cell groups for the EME solver, 2 for the input and output waveguides, 1 for
the center phase shift region and 2 for the gratings on each side. Note that 2 cells are used for cell groups 2 and 4, 1
for each waveguide width. For the initial simulation, we will use 10 modes for each cell group in the EME calculation.
Symmetry is used here to reduce the number of modes required for this calculation.

To set the periodicity of the grating, we will define 2 periodic groups under the "periodic group definition" table, 1 for
the gratings on each side of the cavity. This means that cell groups 2 and 4 will be propagated 100 times, and the
final length of the device will be 66.32um.

Since EME is a frequency-domain method, we will need to run 1 simulation for each wavelength of interest. The
script shift_period_sweep.lsf will calculate the results at each wavelength and plot the transmission
spectrum of the phase-shifted Bragg grating.

Simulation Results
The transmission spectrum of the phase-shifted Bragg grating with 100 pairs of gratings on each side of the cavity is
shown below. One can see the sharp resonance peak in the middle of the stop band, which is consistent with the
experimental results in [1].

2003 - 2016 Lumerical Solutions, Inc


2140 Lumerical Knowledge Base

The script shift_period_sweep.lsf can also calculate the spectrum for a different number of grating periods.
Since scanning the number of periods does not require re-calculating the modes, one can obtain the transmission
spectrum for an arbitrary number of grating periods with very little additional computation time. The figure below
shows the transmission for the same Bragg grating with different numbers of grating periods. One can see that the
resonance peak becomes sharper as the number of periods increases, but eventually disappears when the number
of periods is very large.

2003 - 2016 Lumerical Solutions, Inc


Applications 2141

8.3.1.11 Transmission Lines


Please select one of the following topics.

Co-axial cable 2160

Stripline 2142

Microstrip 2146

2003 - 2016 Lumerical Solutions, Inc


2142 Lumerical Knowledge Base

Coplanar Waveguide 2154

Microstrip with a Lumped RLC element 2149

Coupled Microstrip 2156

8.3.1.11.1 Stripline

Introduction
A stripline is formed by a conducting strip in a substrate sandwiched by ground planes above and below the strip.
The characteristic impedance of a mode supported by a stripline can be calculated using the built-in Power and
impedance integration tool in MODE Solutions FDE solver. In this example, we consider a device with an inner strip
of perfect electrical conductor with a finite thickness, as well as a 2D strip which can be more easily compared with
analytic results where the strip is assumed to have zero thickness.

2003 - 2016 Lumerical Solutions, Inc


Applications 2143

Solvers 101

FDE
Associated files
stripline_3D.lms
stripline_2D.lms
stripline_Z0.lsf

See also
Power and Impedance Integration 755

Impedance 2141
Co-axial cable 2160
Microstrip 2146
Coplanar Waveguide 2154
Coupled Microstrip 2156
Related references
[1] D.M. Pozar, Microwave
Engineering, Fourth Edition. John
Wiley & Sons (2012).

Background
The characteristic impedance is calculated in the FDE solver by using a surface integral to calculate the power
carried by the mode, and loop integral to calculate the current flow through the loop.
P = P dS
S

I = H dl
c

Then the characteristic impedance is calculated using


P
Z0 =
I2
An example integration path and area for the loop and surface integrals are illustrated below.

This calculation method requires the user to specify the integration region. You can specify the integration region
before you run the simulation from the FDE solvers Impedance calculation tab.

2003 - 2016 Lumerical Solutions, Inc


2144 Lumerical Knowledge Base

Or, the FDE solver also includes a built-in Power and impedance integration tool which allows you to specify the
integration region after solving for the modes and selecting the desired mode from the mode list. When the
integration quantity is set to current, the tool will calculate the characteristic impedance using the specified
integration region.

Simulation Setup
Comparing with analytic results
We can verify the calculated characteristic impedance returned using the Power and impedance integration tool by
comparing it against the characteristic impedance of an infinitely thin conductor calculated from equation 3.179 from
the text by Pozar [1].

Run the stripline_Z0.lsf script file which prints out expected characteristic impedance of approximately 51.63
ohms for the given strip width, relative permittivity of the substrate, and substrate thickness. Note that the equation
from Pozar which is used is not an exact solution, but it is quoted as being accurate to about 1% of the exact
results.

Next, run the stripline_2D.lms file. After calculating the modes, select the first mode in the mode list, and from
the options drop down menu select Power and Impedance Integration. Then under the integrate drop down
menu, select current to perform the characteristic impedance calculation. You can specify the integration region by
setting the x1, x2, y1, and y2 parameters, or you can also use your mouse to click and drag on the plot on the right-
hand side to select the integration region from the plot.

2003 - 2016 Lumerical Solutions, Inc


Applications 2145

The size of the integration region should be set so that it fully encloses the central strip which carries the current.
The calculated characteristic impedance returned by the tool is approximately 51.1 ohms. You can get an even more
accurate result by using a finer mesh over the structure, and this particular structure can require a relatively fine
mesh to get an accurate field profile because the fields are strongly concentrated at the points on the left and right
edges of the strip.

3D strip with finite thickness


Run the stripline_3D.fsp file. Using the same method as before, you can calculate the characteristic
impedance of about 48.5 ohms for the 3D strip with thickness of 35 microns. To get the results to be closer than the
one from Pozar and stripline_2D.lms, you can reduce the thickness of the strip and use a finer mesh. In
general, it is more efficient to use 2D geometries to represent very sub-wavelength layers like in this example.

2003 - 2016 Lumerical Solutions, Inc


2146 Lumerical Knowledge Base

8.3.1.11.2 Microstrip

Introduction
A microstrip is a type of transmission line which uses a conducting metal strip on top of a substrate with a ground
plane below the substrate. The characteristic impedance of the supported mode is calculated using the FDE solver
in MODE Solutions. In this example, we perform convergence testing of the mesh step size and extrapolate the data
to get an accurate value of the characteristic impedance.

Solvers 101

FDE
Associated files
microstrip.lms
microstrip_Z0.lsf
microstrip_convergence.lsf

See also
Power and Impedance Integration 755

Impedance 2141
Co-axial cable 2160
Stripline 2142
Coplanar Waveguide 2154
Coupled Microstrip 2156
Related references
[1] D.M. Pozar, Microwave
Engineering, Fourth Edition. John
Wiley & Sons (2012).

2003 - 2016 Lumerical Solutions, Inc


Applications 2147

Background
Using the FDE solver of MODE Solutions, we can find the Eigenmodes supported by a microstrip transmission line.
The characteristic impedance of a microstrip mode can be calculated using the equation Z0=P/(I*conj(I). P is the
power carried by the mode which can be calculated by integrating the normal component of the Poynting vector over
the area of the mode,
P = P dS
S

And I is the current carried by the strip which can be calculated by integrating the H fields around a loop around the
conductor
I = H dl
c

The characteristic impedance calculated using this method is returned as a result from the FDE solver. For
comparison, an approximate characteristic impedance can be calculated for this structure using an equation from
Pozar [1].

Simulation setup
The stripline structure in this example is composed of a copper strip with thickness of 34.1 um. This is modeled
using a 2D rectangle, and the material of the rectangle is specified using the 2D conductive material model given a
surface conductivity for copper of 5.8e7 S/m at RF frequencies [1]. The substrate is a dielectric material with
permittivity 4.34001 and a thickness of 0.5 mm, with metal below the substrate.

We can use a metal boundary condition for y max boundary which is in the air above the structure. This gives a good
result as long as the position of the boundary is far enough above the structure that the modal fields dont reach the
boundary. However, it is also possible to use the PML boundary condition to obtain the same result.

To enable the calculation of Z0 characteristic impedance result by the FDE solver, the calculate characteristic
impedance option has been selected and the integration region is specified under the Impedance tab of the FDE
solver object. The integration region x1, x2, y1 and y2 settings are set so that the region encloses the copper strip.

A mesh override region is placed over the copper strip both to resolve the width of the strip, and to resolve the modal
fields since the intensity of the fields have a sharp feature near the left and right edges of the strip.

To perform convergence testing of the mesh, a parameter sweep task in the Optimizations and Sweeps 699 window
has been set up to collect the Z0 result from the first mode in the mode list as the dx and dy mesh step size is
reduced.

2003 - 2016 Lumerical Solutions, Inc


2148 Lumerical Knowledge Base

Running Simulation and Analysis


To calculate an approximate characteristic impedance for this structure, run the microstrip_Z0.lsf script file
which uses an analytic expression from the text by Pozar [1]. The script gives an approximate characteristic
impedance of about 77.58 ohms.

Open the microstrip.lms simulation file. Run the simulation and calculate modes to view the field profile of the
mode supported by the microstrip. The mode profile is plotted below in linear and log scale.

Next, run the microstrip_convergence.lsf script file with the microstrip.lms simulation file. The script
file will run the parameter sweep which records the characteristic impedance of the microstrip mode as the mesh is
made finer. The dx and dy for each point in the sweep, the ratio of the mesh step size in the x and y directions are
constant, and the results appear to converge linearly towards an answer.

2003 - 2016 Lumerical Solutions, Inc


Applications 2149

By fitting a line to the results using the polyfit script function, we can get the intercept position for a mesh step size
of 0 in order to find an accurate final result for the characteristic impedance and loss. This technique of extrapolating
the results is called Richardson extrapolation and gives a higher order accuracy.

Note that when there are singularities in the mode profile, the results may not always converge linearly.

The final characteristic impedance is approximately 76.9 ohms which is less than 1% different from the approximate
result calculated using an analytic equation.

8.3.1.11.3 Microstrip w ith a Lumped RLC element

Introduction
In this example we study a microstrip transmission line with a lumped RLC element in the middle. We calculate the
reflected power for different settings of the RLC element 241 in a 3D FDTD simulation and we compare with analytical
results. We also show how the results can be visualized in a Smith chart.
Solvers 101

FDE
FDTD

Associated files
microstrip_rlc_Z0.lms
microstrip_rlc.fsp
microstrip_rlc.lsf

See also
Power and Impedance
Integration 755
Impedance 2141
Co-axial cable 2160
Stripline 2142
Microstrip 2146
Coplanar Waveguide 2154
Coupled Microstrip 2156
Related references
[1] D.M. Pozar, Microwave
Engineering, Fourth Edition.
John Wiley & Sons (2012).

2003 - 2016 Lumerical Solutions, Inc


2150 Lumerical Knowledge Base

Background
For a transmission line terminated in a load impedance ZL, the reflection coefficient at the position of the load is
Z L - Z0
GL =
Z L + Z0
where Z0 is the characteristic impedance of the transmission line. The lumped RLC element is formed by a sum in
parallel of a resistance (R), an inductance (L) and a capacitance (C); therefore, the load impedance is given by
-1
1 1
Z L= Z 0 + + + j wC
R j wL
where is the angular frequency of the incident wave. For a lossless transmission line the reflected power at any
position along the line is given by ||2 = |L|2.

The characteristic impedance Z0 can be found using a FDE simulation as explained in the microstrip example 2146 , so
it is possible to calculate the power reflected by the load analytically and compare it with the results from a FDTD
simulation.

FDE simulation setup


First we estimate the characteristic impedance of the transmission line in the file microstrip_rlc.lms. The
transmission line is formed by a metal strip 2.4mm wide on top of FR4 substrate (permittivity 4.3) with thickness 1.2
mm. For the metal strip we use a 2D rectangle primitive with Perfect Electric Conductor (PEC) material. The
propagation direction is assumed to be the z direction and we use metal boundary conditions.

FDE results
The fundamental mode of the transmission line at 1GHz is shown in Fig.1. This is a quasi-TEM mode (waveguide
TE/TM fraction = 100/99.7%) with no loss (since the strip material is PEC). The characteristic impedance can be
calculated with the rectangular box shown in Fig.1. The value Z0 = 41.1 will be used in the analysis of the FDTD
results discussed in the next sections.

Fig.1 Screenshot of Eigenm ode solver show ing the transm ission line m ode and its characteristic im pedance.

2003 - 2016 Lumerical Solutions, Inc


Applications 2151

Note: Mesh accuracy


The mesh used for the cross section of the transmission line is relatively coarse in order to reduce the execution
time for the FDTD simulation. To obtain a more accurate value of the characteristic impedance use the
convergence testing procedure described in the microstrip example 2146 .

FDTD simulation setup


The full structure of the transmission line in microstrip_rlc.fsp is composed of two metal traces 40mm long,
with a lumped RLC element 2 mm long placed in between; the metal traces and the substrate have the same
properties as in the FDE simulation. The lumped element is modeled using the RLC material available in the Material
tab of the 2D rectangle primitive (see Fig.2 below, for more details visit this page 241 ). The length of the lumped
element should be electrically small, which means that the length should be small compared to the wavelength.

Fig.2 Snapshot of the Material tab for 2D rectangle show ing the RLC settings.
.

We use PML boundary conditions for the propagation direction (z axis) and metal boundaries everywhere else. In the
PML settings we increase the number of layers of the standard profile to 28 in order to improve the absorption of the
reflected waves at the PML. We use the mesh override regions "trace mesh" and "load mesh" in order to control the
mesh for the cross section of the transmission line and the 2mm gap where the RLC element is located. For
consistency of the characteristic impedance, the mesh of the cross section should be the same as the one used in
the FDE simulation. The simulation region is shown in Fig. 3.

2003 - 2016 Lumerical Solutions, Inc


2152 Lumerical Knowledge Base

Fig.3 FDTD sim ulation setup (XZ view )


.

The desired mode is injected with a mode source. We use a mode expansion monitor 651 to collect the backward
transmission at the monitor "R" behind the source and the forward transmission at the monitor "T_in" in front of the
source. The reflected power is the ratio between these two transmission values.

Running the FDTD simulation and analysis


The script microstrip_rlc.lsf calculates the reflected power from the FDTD simulation and compares it with
the analytical results. The results for four different RLC configurations are shown in Fig. 4: a pure resistance R = 1.5
Z0, a pure inductance L=6.5nH, a pure capacitance C = 2pF, and a parallel combination of these three components.
Besides the numerical and analytical results for the reflected power, we include two curves ("upper bound" and
"lower bound") that correspond to the analytical results with a variation of +/- 10% in the values of R, L and C. We
also show the normalized impedance and corresponding reflected power for each case at the center frequency
(1GHz) in a Smith chart.

2003 - 2016 Lumerical Solutions, Inc


Applications 2153

Fig.4 Reflected pow er calculated in FDTD and com parison w ith analytical results (left colum n). The im pedance values in
each case at 1GHz are also plotted (right colum n).

Note that the slope of the numerical results agrees well with that of the analytical results, which shows that the
resistive, capacitive and inductive behaviors are correctly reproduced; furthermore, the numerical results are within
+/-10% of the analytical ones. The agreement can be improved by reducing the mesh steps in the mesh override
regions and increasing the number of PML layers; the latter improves the slope of the results.

The Smiths charts shown in Fig.4 can be obtained by opening the Visualizer for the variable Zcent in the Script
workspace. It is important to set the normalizing impedance in the visualizer settings 741 to be the characteristic
impedance Z0.

2003 - 2016 Lumerical Solutions, Inc


2154 Lumerical Knowledge Base

8.3.1.11.4 Coplanar Waveguide

Introduction
In this example, the impedance a coplanar conductor-backed waveguide is calculated using the FDE solvers Power
and Impedance Integration 755 tool, and the result is compared with the approximate analytic result from an online
impedance calculator [1].

Solvers 101

FDE
Associated files
coplanar.lms

See also
Power and Impedance Integration 755

Impedance 2141
Co-axial cable 2160
Stripline 2142
Microstrip 2146
Coupled Microstrip 2156
Related references
[1] http://chemandy.com/calculators/
coplanar-waveguide-with-ground-
calculator.htm

Simulation Setup
The cross section of the coplanar waveguide is illustrated in the image above.

In this simulation, we use 2D PEC rectangles for the central microstrip and left and right ground planes. The central
strip has a width of 2.5 mm with a gap of 1.5 mm between the strip and ground planes on either side.

The dielectric substrate has a thickness of 0.5 mm and permittivity of 4.34001, and the y min boundary condition is
set to metal to represent the lower ground plane. A metal boundary is also used for the y max boundary condition
and this is possible since the boundary is placed far enough from the structure that there is no coupling between the
mode and the y max boundary. PML can also be used for the y max boundary.

A mesh override region is used to make sure that the width of the central strip and the width of the gaps between the
central strip and ground planes are accurately resolved.

Running Simulation and Result Analysis


Run the coplanar.lms simulation file and solve for the modes. Select the first mode in the mode list.

2003 - 2016 Lumerical Solutions, Inc


Applications 2155

Then under the integrate drop down menu, select current to perform the characteristic impedance calculation. You
can specify the region to integrate over by setting the x1, x2, y1, and y2 parameters, or you can also use your
mouse to click and drag on the plot on the right-hand side to select the integration region from the plot.

The integration region should be chosen to fully enclose the central conducting strip but not include the ground
planes. Since the fields change sharply near the left and right sides of the central conductor, to avoid interpolation
error of the fields, its best to make sure that the edges of the integration region is a few mesh cells away from the
hot spots of the fields. Using the integration region settings shown on the following image, the calculated
characteristic impedance is approximately 26.6 ohms. This result is consistent with the results calculated using an
online calculator [1] of about 26.7 ohms.

2003 - 2016 Lumerical Solutions, Inc


2156 Lumerical Knowledge Base

8.3.1.11.5 Coupled Microstrip

Introduction
In this example, the impedance of both odd and even mode of a coupled microstrip is calculated and compared with
published results from Collin [1].

Solvers 101

FDE
Associated files
coupled_microstrip.lms

See also
Power and Impedance Integration 755

Impedance 2141
Co-axial cable 2160
Stripline 2142
Microstrip 2146
Coplanar Waveguide 2154
Related references
[1] Robert E. Collin, Foundations for
Microwave Engineering, Second
Edition. Wiley-Interscience (2001).

Simulation Setup
The cross section of the coupled microstrip waveguide is illustrated in the image above. This structure supports both
an even and an odd mode.

The structure is composed of 2D PEC microstrips on a 1 mm thick substrate. The substrate has a relative
permittivity of 9.7, and a metal boundary condition is used to simulate the ground plane below the substrate. The
microstrips have a width of 4 mm and a gap of 0.25 mm between them.

A mesh override region is placed over the microstrip structures to ensure that the width of microstrips and the width
of the gap are accurately resolved.

No symmetry 466 is enforced across the x=0 plane, however the even or odd modes of the coupled waveguide could
be selectively found by the solver if symmetric or anti-symmetric boundaries are used for the x min boundary
condition.

Running Simulation and Result Analysis


Run the coupled_microstrip.lms simulation file and solve for the modes. Modes 1 and 2 in the mode list are
the even and odd modes respectively. A simple way to determine whether the mode is even or odd is to visualize the
E dataset from the mode as a vector plot.

Even mode Odd mode

2003 - 2016 Lumerical Solutions, Inc


Applications 2157

Vector Plot Vector Plot

The following image shows how to generate a vector plot of the E fields from the visualizer.

2003 - 2016 Lumerical Solutions, Inc


2158 Lumerical Knowledge Base

Select the even or odd mode in the mode list and calculate the characteristic impedance of the mode by choosing
the Power and Impedance Integration option and integrating the current term.

2003 - 2016 Lumerical Solutions, Inc


Applications 2159

2003 - 2016 Lumerical Solutions, Inc


2160 Lumerical Knowledge Base

For this device, the integration region should be chosen to fully enclose only one of the microstrips. There can be
some field interpolation errors if the edges of the integration region is too close to the microstrip since there are
singularities in the modal fields at the edges of the microstrips, so using a larger integration region where the edges
of the integration region are further from the singularities can help avoid the errors.

The calculated characteristic impedance agrees with the reported characteristic impedance for the even mode of 47
ohms and for the odd mode of 33 ohms from figure 3.31 of the text by Collin [1].

8.3.1.11.6 Co-axial Cable

Introduction
This topic describes a technique for calculating the impedance of a waveguide. The example structure is a standard
RG6 coaxial cable.

To calculate impedance, we first calculate the voltage between conductors and the current flowing in the inner
conductor. V is calculated by integrating the electric field along a path from the inner conductor to the outer
conductor. I is calculated by integrating H around the inner conductor. Once V and I are known, it is trivial to
calculate the impedance.

We also calculate the cutoff frequency of this coaxial cable.

Note:
It is also possible to calculate the characteristic impedance using the built-in Power and Impedance Integration

2003 - 2016 Lumerical Solutions, Inc


Applications 2161

755 tool. For an example which uses this method, see Stripline 2142 .

Solvers 101

FDE

In this topic
Introduction 2160
Simulation setup 2161

Analysis 2162
Results 2162
Associated files
coaxial_RG6.lms
coaxial_impedance.ls
f

See also
Impedance 2141
Stripline 2142
Microstrip 2146
Coplanar Waveguide 2154
Coupled Microstrip 2156

Simulation setup
Cable dimensions
RG6 coaxial cable datasheets typically state following information:

Name Value in this example


inner conductor radius (r) 0.512 mm (18 AWG)
propagation velocity (vc ) 0.85 c

impedance (Z) 75 ohm

For the insulator, we use Semi-Solid PE with a relative permittivity of 1.29. Note that in the simulation setup, the
background index is specified, not the background permittivity so we use a value of sqrt(1.29). The outer conductor
radius can be calculated with the second formula below and we set the value to 2.23039 mm.

Coaxial cable standard formulas


L 1 m0 R 138 R
Z= = log log 10
C 2p e0 er r er r
e0 er
2 pZ
m0
R = re
1
er =
vc2
c
fc =
p (R + r ) u r e r

Conductor material definition


At GHz frequencies, most metals act like perfect electrical conductors (PEC) and we use the PEC material in the
default material database. Note that we could use a material such as copper by creating a material with a high
conductivity, and we would obtain similar results for most calculations. However, the penetration depth of the field

2003 - 2016 Lumerical Solutions, Inc


2162 Lumerical Knowledge Base

into the copper is on the order of 10s of microns, so we would need to use a mesh size of smaller than 10 microns
to accurately measure the loss.

Symmetry
The TEM mode of this waveguide is circularly symmetric. Therefore, we can use symmetric boundary conditions in
the X and Y directions. Using symmetric boundary conditions will make the simulation faster.

Analysis
Impedance is defined as Z=V/I. The voltage can be calculated by integrating E between the two conductors.
Similarly, the current can be calculated by integrating H around the inner conductor. These integrals are shown in
the following figures.

Note that the following figures were created with a finer mesh than in the associated file. As a result, the E and H
fields are smoother.
R
V = E dr I= H dS
r loop

Results
Impedance

After calculating the modes of this structure, run the analysis script. It will calculate the impedance by integrating
the electric and magnetic fields, as described above. The theoretical impedance for this device is 75 ohms, the
phase velocity is 0.85 c and the cutoff frequency is 29.5775 GHz. The script gives a calculated impedance of 75.9
ohms, a phase velocity of 0.88c and a cutoff frequency of 30.637 GHz.

Cutoff frequency

The fundamental TEM mode of a coaxial cable does not have a cutoff frequency, unlike all other modes. The TE
mode has the lowest cutoff frequency. Below this frequency, the waveguide will be single mode. The theoretical
cutoff frequency of the TE mode in this structure is 38GHz.

The cutoff frequency can be calculated with the following procedure:


1. Set all boundary conditions to metal. Symmetry can not be used because the TE mode does not have the same
symmetry as the fundamental TEM mode.
2. Set the simulation frequency to 50GHz and calculate the modes. The 2nd and 3rd modes will be the TE modes.
These modes can be identified by their field profile (Ez is zero, but Hz is non-zero) and by the fact they have no

2003 - 2016 Lumerical Solutions, Inc


Applications 2163

loss at this frequency.


3. Select the frequency sweep tab. Set the Stop frequency to 10GHz. Select the 2nd mode and make sure that
"track selected mode" is checked. Run the frequency sweep.
4. The cutoff frequency is easiest to identify by looking at the effective index vs frequency and loss vs frequency.
Below the cutoff frequency, the TE mode will have very high loss and an effective index of 0. Above the cutoff
frequency, the TE mode will have a finite effective index and a loss of 0. A more accurate estimate could be found
by reducing the frequency range around the cutoff point and repeating the calculation. Note that the plot created
by the frequency sweep may show a positive or a negative loss - this occurs because the propagation direction
(forwards or backwards) cannot be clearly defined when the effective index is 0. To create a plot showing only
positive loss, select "Abs" under Scalar operation in the Visualizer.

8.3.1.12 Waveguides
MODE Solutions' Eigenmode Solver can be used to obtain accurate results for a wide range of problems. The
following examples show the comparison between known analytic solutions and the simulated results for a series of
reference test structures.

2003 - 2016 Lumerical Solutions, Inc


2164 Lumerical Knowledge Base

Please select one of the following topics.

ARROW slab
waveguide 2164

Asymmetric slab
dielectric waveguide
2166

Exponential index
profile slab waveguide
2168

Hollow metal
waveguide 2169

8.3.1.12.1 ARROW slab w aveguide

Introduction
This topic compares the analytical solutions and results simulated with MODE Solutions for a ARROW slab
waveguide at a wavelength of 632.8nm.

2003 - 2016 Lumerical Solutions, Inc


Applications 2165

Solvers 101

FDE
Associated files
arrow_waveguide.lms
arrow_waveguide.lsf
arrow_waveguide.ldf

See also
Matlab Script Integration 1642

Related publications
E. Anemogiannis et al.,
"Determination of Guided
and Leaky Modes in
Lossless and Lossy Planar
Multilayer Optical
Waveguides: Reflection Pole
Method and Wavevector
Density Method" IEEE
Journal of Quantum
Electronics, vol. 17, pp. 929-
941, 1999

Simulation setup
The figure above shows the geometry and refractive indices of the multilayer dielectric ARROW slab waveguide at a
wavelength of 632.8nm.

Analysis
Analytical Solutions
Comparison results are taken from E. Anemogiannis et al.

Results
The script arrow_waveguide.lsf finds effective index and propagation loss corresponding to the TE1 mode and
plots the results and the corresponding % errors as a function of the number of grid points.

2003 - 2016 Lumerical Solutions, Inc


2166 Lumerical Knowledge Base

(Left) Effective index (red) and loss (blue) calculations for TE mode of ARROW waveguide at 632.8nm. The symbols
(o) denote MODE Solutions calculations, and the lines show the comparison results. (Middle/Right) The same
figures (effective index/propagation loss) generated using only built-in MODE functions (no Matlab interface).

(Left) Error amplitude of MODE Solutions calculation for ARROW waveguide TE mode at a wavelength of 632.8 nm.
The x-axis is the number of grid points in the calculation region. (Right) The same figure generated using only built-in
MODE functions (no Matlab interface).

8.3.1.12.2 Asymmetric slab dielectric w aveguide

Introduction
This topic compares the analytical solutions and results simulated with MODE Solutions for a asymmetric dielectric
slab waveguide at wavelength1.55m.

2003 - 2016 Lumerical Solutions, Inc


Applications 2167

Solvers 101

FDE
Associated files
slab_wg.lms
slab_wg.lsf
slab_wg.ldf
slab_wg.m

See also
Matlab Script Integration 1642

Simulation setup
The figure above shows the dimensions and refractive indices of the three-layer asymmetric dielectric slab
waveguide. This can be constructed using 3 contiguous rectangular structures representing the air(etch), core(silica)
and substrate(dielectric defined with an index of 1.33) layers.

Analysis
Analytical Solutions
The analytical solution for the effective index of the slab waveguide can be calculated using the MATLAB script
slab_wg.m, and is used in the evaluation of the MODE Solutions results.

Results
The script slab_wg.lsf finds the effective indices of the TE1 and TM1 modes for wavelength1.55m and plots the
results and the corresponding % errors as a function of the number of grid points.

(Left) Effective index values for TE (red) and TM (blue) modes as calculated via MODE Solutions (o) and via analytic
relations (lines) for three-layer, asymmetric slab waveguide. The x-axis shows the convergence of MODE Solutions
on the correct answer as the number of grid points is increased. (Right) The same figure generated using only built-in
MODE functions (no Matlab interface).

2003 - 2016 Lumerical Solutions, Inc


2168 Lumerical Knowledge Base

(Left) Magnitude of error of MODE Solutions calculation for three-layer asymmetric slab waveguide at a wavelength of
1.55m. The x-axis shows the number of grid points in the one-dimensional calculation region. (Right) The same
figure generated using only built-in MODE functions (no Matlab interface).

8.3.1.12.3 Exponential index profile slab w aveguide

Introduction
This topic compares the analytical solutions and results simulated with MODE Solutions for a exponential index
profile slab waveguide at wavelength 633nm.

Solvers 101

FDE
Associated files
exp_wg.lms
exp_wg.lsf
exp_wg.ldf
exp_wg.m

See also
Matlab Script Integration 1642

Equation Interpreter 214

Simulation setup
The figure above shows the dimensions and permittivity as a

You might also like