247
Reference Guide FDTD Release 6.5 Solutions

FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

  • Upload
    others

  • View
    25

  • Download
    0

Embed Size (px)

Citation preview

Page 1: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Reference Guide

FDTD

Release 6.5

Solutions

Page 2: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10
Page 3: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

1Contents

© 2003 - 2009 Lumerical Solutions, Inc

Table of ContentsPart I New Features 10

............................................................................................................ 101 New features for version 6.5

................................................................................................................................................. 10Structure groups

................................................................................................................................................. 10Analysis (monitor) groups

................................................................................................................................................. 10Object tree browser

................................................................................................................................................. 10Built in script file editor

................................................................................................................................................. 11Script syntax highlighting

................................................................................................................................................. 11Copy and Paste

................................................................................................................................................. 11Dipole radiated power calculation

................................................................................................................................................. 11New MODE source script commands

................................................................................................................................................. 11New script functions

................................................................................................................................................. 11Online Help search bar

................................................................................................................................................. 12Simplified installation

................................................................................................................................................. 12Improved material fits

............................................................................................................ 122 New features for version 6.0

................................................................................................................................................. 12Multi coefficient material model

................................................................................................................................................. 12Auto fitting of experimental data

................................................................................................................................................. 12Improved material database GUI

................................................................................................................................................. 13Expanded list of material data

................................................................................................................................................. 13Spectral averaging

................................................................................................................................................. 13More far field analysis

................................................................................................................................................. 13GUI upgrade

................................................................................................................................................. 13User defined source signals

................................................................................................................................................. 14Shorter source pulses

................................................................................................................................................. 14Unicode characters

............................................................................................................ 143 New features for version 5.1

................................................................................................................................................. 14GDSII import

................................................................................................................................................. 14Improved figure windows

................................................................................................................................................. 14n and k import

................................................................................................................................................. 14Set view and orbit

................................................................................................................................................. 15Surface imports

................................................................................................................................................. 15Windows Vista support

............................................................................................................ 154 New features for version 5.0

................................................................................................................................................. 15Graded mesh

................................................................................................................................................. 15Polygon and triangle primitives

................................................................................................................................................. 15Quadrics and Infinipath interconnects

................................................................................................................................................. 15Native support for the Windows x64 platform

................................................................................................................................................. 15Easier installation of parallel FDTD Solutions

................................................................................................................................................. 16Meshing improvements

................................................................................................................................................. 16Faster drawing modes for all primitives

................................................................................................................................................. 16Simulation auto shutoff

................................................................................................................................................. 16Improved movie monitors

Part II The physics of the FDTD algorithm 17

............................................................................................................ 171 FDTD and Maxwell's equations

Page 4: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Reference Guide2

© 2003 - 2009 Lumerical Solutions, Inc

Part III Units and normalization 20

............................................................................................................ 211 Source amplitudes

............................................................................................................ 222 Frequency domain normalization

............................................................................................................ 243 Spectral averaging

............................................................................................................ 304 Calculating and normalizing power in the frequency domain

............................................................................................................ 315 Integrating over lines, surfaces and volumes

Part IV Simulation objects 33

............................................................................................................ 341 Structures tab

................................................................................................................................................. 36Geometry tab

................................................................................................................................................. 36Material tab

................................................................................................................................................. 37Rotations tab

................................................................................................................................................. 37Graphical Rendering tab

................................................................................................................................................. 37Custom tab

................................................................................................................................................. 38Import Data tab

................................................................................................................................................. 41Surface tab

................................................................................................................................................. 42Properties tab

................................................................................................................................................. 43Script tab

............................................................................................................ 432 Simulation tab

................................................................................................................................................. 44General tab

................................................................................................................................................. 44Geometry tab

................................................................................................................................................. 44Mesh settings tab

................................................................................................................................................. 45Boundary conditions tab

................................................................................................................................................. 48Advanced options tab

............................................................................................................ 493 Sources tab

................................................................................................................................................. 52General tab

................................................................................................................................................. 53Geometry tab

................................................................................................................................................. 54Frequency/Wavelength tab

................................................................................................................................................. 55Beam options tab

................................................................................................................................................. 57Advanced tab

............................................................................................................ 584 Monitors tab

................................................................................................................................................. 60Frequency Power/Profile tab

................................................................................................................................................. 60Frequency Power/Profile Advanced tab

................................................................................................................................................. 61General tab

................................................................................................................................................. 62Data to record tab

................................................................................................................................................. 62Geometry tab

................................................................................................................................................. 62Spectral averaging and apodization tab

................................................................................................................................................. 63Advanced tab

................................................................................................................................................. 64Setup tab

................................................................................................................................................. 64Analysis tab

............................................................................................................ 655 Equation interpreter

Part V Integrated mode solver 67

............................................................................................................ 671 Mode analysis

................................................................................................................................................. 68Plot and analysis options

Page 5: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

3Contents

© 2003 - 2009 Lumerical Solutions, Inc

................................................................................................................................................. 70Plot area

............................................................................................................ 712 Advanced options

Part VI Material database 72

............................................................................................................ 721 Material database

................................................................................................................................................. 74Models

................................................................................................................................................. 77Mesh order

................................................................................................................................................. 77Anisotropic materials

............................................................................................................ 782 Material Explorer

Part VII CAD layout editor 81

............................................................................................................ 821 Layout editor tabs and Objects tree

............................................................................................................ 832 Main title bar

................................................................................................................................................. 84GDSII Import

................................................................................................................................................. 86Modifying your default settings

............................................................................................................ 873 Toolbars

................................................................................................................................................. 88Edit

................................................................................................................................................. 89Mouse mode

................................................................................................................................................. 90View

................................................................................................................................................. 91Simulation

............................................................................................................ 924 View ports

............................................................................................................ 935 Script Prompt and Script Editor

............................................................................................................ 936 Changing CAD layout

Part VIII Running a simulation 96

............................................................................................................ 971 Running a simulation from the command line

Part IX Analysis tools 98

............................................................................................................ 981 Analysis tools and the simulation environment

............................................................................................................ 992 The analysis window

................................................................................................................................................. 100Monitor properties tab

................................................................................................................................................. 100Far field settings tab

............................................................................................................ 1013 Analysis groups

............................................................................................................ 1034 Figure windows for plots and images

............................................................................................................ 1045 Data export

Part X Scripting Language 106

............................................................................................................ 1071 System level

................................................................................................................................................. 109del

................................................................................................................................................. 109rm

................................................................................................................................................. 109dir

................................................................................................................................................. 110ls

................................................................................................................................................. 110cd

................................................................................................................................................. 110pwd

................................................................................................................................................. 110cp

Page 6: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Reference Guide4

© 2003 - 2009 Lumerical Solutions, Inc

................................................................................................................................................. 111mv

................................................................................................................................................. 111exit

................................................................................................................................................. 111system

................................................................................................................................................. 112fileexists

................................................................................................................................................. 112currentfilename

................................................................................................................................................. 112filebasename

................................................................................................................................................. 113fileextension

................................................................................................................................................. 113filedirectory

................................................................................................................................................. 113Run script

................................................................................................................................................. 113getpath

................................................................................................................................................. 114addpath

................................................................................................................................................. 114which

................................................................................................................................................. 114pause

................................................................................................................................................. 115break

................................................................................................................................................. 115Excape key

................................................................................................................................................. 115File IO background

................................................................................................................................................. 116format

................................................................................................................................................. 116loaddata

................................................................................................................................................. 116savedata

................................................................................................................................................. 117savedcard

................................................................................................................................................. 117readdata

................................................................................................................................................. 117write

................................................................................................................................................. 118asapexport

................................................................................................................................................. 118asapload

................................................................................................................................................. 119asapimport

................................................................................................................................................. 119gdsimport

................................................................................................................................................. 120matlabsave

................................................................................................................................................. 121lum2mat

................................................................................................................................................. 122lum2mat command line

................................................................................................................................................. 122matlab

................................................................................................................................................. 123matlabget

................................................................................................................................................. 124matlabput

............................................................................................................ 1242 Manipulating variables

................................................................................................................................................. 125=

................................................................................................................................................. 125:

................................................................................................................................................. 125[]

................................................................................................................................................. 126%

................................................................................................................................................. 126linspace

................................................................................................................................................. 126matrix

................................................................................................................................................. 127randmatrix

................................................................................................................................................. 127meshgridx

................................................................................................................................................. 127meshgridy

................................................................................................................................................. 127meshgrid3dx

................................................................................................................................................. 128meshgrid3dy

................................................................................................................................................. 128meshgrid3dz

................................................................................................................................................. 128clear

................................................................................................................................................. 129workspace

................................................................................................................................................. 129Accessing and assigning matrix elements

................................................................................................................................................. 130Matrix operators

................................................................................................................................................. 130Pre-defined constants

Page 7: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

5Contents

© 2003 - 2009 Lumerical Solutions, Inc

............................................................................................................ 1303 Operators

................................................................................................................................................. 132*

................................................................................................................................................. 132/

................................................................................................................................................. 132+

................................................................................................................................................. 132-

................................................................................................................................................. 133^

................................................................................................................................................. 133==

................................................................................................................................................. 133almostequal

................................................................................................................................................. 134!=

................................................................................................................................................. 134<=

................................................................................................................................................. 134>=

................................................................................................................................................. 135<

................................................................................................................................................. 135>

................................................................................................................................................. 135&

................................................................................................................................................. 135and

................................................................................................................................................. 136|

................................................................................................................................................. 136or

................................................................................................................................................. 136!

................................................................................................................................................. 137~

................................................................................................................................................. 137num2str

................................................................................................................................................. 137"

................................................................................................................................................. 138'

................................................................................................................................................. 139endl

................................................................................................................................................. 139?

................................................................................................................................................. 139comments

............................................................................................................ 1394 Functions

................................................................................................................................................. 141sin

................................................................................................................................................. 142cos

................................................................................................................................................. 142tan

................................................................................................................................................. 142asin

................................................................................................................................................. 143acos

................................................................................................................................................. 143atan

................................................................................................................................................. 143atan2

................................................................................................................................................. 143real

................................................................................................................................................. 144imag

................................................................................................................................................. 144conj

................................................................................................................................................. 144abs

................................................................................................................................................. 144angle

................................................................................................................................................. 145unwrap

................................................................................................................................................. 145log

................................................................................................................................................. 145log10

................................................................................................................................................. 145sqrt

................................................................................................................................................. 146exp

................................................................................................................................................. 146size

................................................................................................................................................. 146length

................................................................................................................................................. 146pinch

................................................................................................................................................. 147sum

................................................................................................................................................. 147max

................................................................................................................................................. 147min

................................................................................................................................................. 148interp

Page 8: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Reference Guide6

© 2003 - 2009 Lumerical Solutions, Inc

................................................................................................................................................. 148spline

................................................................................................................................................. 148integrate

................................................................................................................................................. 149find

................................................................................................................................................. 149findpeaks

................................................................................................................................................. 150transpose

................................................................................................................................................. 150ctranspose

................................................................................................................................................. 150fft

................................................................................................................................................. 152fftw

................................................................................................................................................. 153fftk

................................................................................................................................................. 154invfft

................................................................................................................................................. 155czt

................................................................................................................................................. 155round

................................................................................................................................................. 156rand

................................................................................................................................................. 156randreset

............................................................................................................ 1565 Loop and conditional statements

................................................................................................................................................. 157for

................................................................................................................................................. 157if

............................................................................................................ 1586 Plotting commands

................................................................................................................................................. 158plot

................................................................................................................................................. 159legend

................................................................................................................................................. 159image

................................................................................................................................................. 160setplot

................................................................................................................................................. 160selectfigure

................................................................................................................................................. 160exportfigure

................................................................................................................................................. 161closeall

............................................................................................................ 1617 Manipulating objects

................................................................................................................................................. 163deleteall

................................................................................................................................................. 163delete

................................................................................................................................................. 164selectall

................................................................................................................................................. 164unselectall

................................................................................................................................................. 164select

................................................................................................................................................. 164selectpartial

................................................................................................................................................. 165shiftselect

................................................................................................................................................. 165shiftselectpartial

................................................................................................................................................. 166move

................................................................................................................................................. 166copy

................................................................................................................................................. 166addtogroup

................................................................................................................................................. 167adduserprop

................................................................................................................................................. 167set

................................................................................................................................................. 168setnamed

................................................................................................................................................. 168setglobal

................................................................................................................................................. 169get

................................................................................................................................................. 170getnumber

................................................................................................................................................. 170getnamed

................................................................................................................................................. 171getnamednumber

................................................................................................................................................. 171getglobal

................................................................................................................................................. 171haveproperty

................................................................................................................................................. 172importsurface

................................................................................................................................................. 173importsurface2

................................................................................................................................................. 174importnk

Page 9: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

7Contents

© 2003 - 2009 Lumerical Solutions, Inc

................................................................................................................................................. 175importnk2

................................................................................................................................................. 176redraw

................................................................................................................................................. 176redrawoff

................................................................................................................................................. 176redrawon

................................................................................................................................................. 176redrawmode

................................................................................................................................................. 177setview

................................................................................................................................................. 178getview

................................................................................................................................................. 178orbit

................................................................................................................................................. 179undo

................................................................................................................................................. 179redo

............................................................................................................ 1798 Measurement data

................................................................................................................................................. 180showdata

................................................................................................................................................. 180havedata

................................................................................................................................................. 181copydcard

................................................................................................................................................. 181cleardcard

................................................................................................................................................. 181getdata

................................................................................................................................................. 182getelectric

................................................................................................................................................. 182getmagnetic

................................................................................................................................................. 182Read and write data to files

............................................................................................................ 1839 Material database

................................................................................................................................................. 183addmaterial

................................................................................................................................................. 183copymaterial

................................................................................................................................................. 184setmaterial

................................................................................................................................................. 184getmaterial

................................................................................................................................................. 185getindex

................................................................................................................................................. 185getfdtdindex

............................................................................................................ 18610 User defined GUIs

................................................................................................................................................. 186message

................................................................................................................................................. 187newwizard

................................................................................................................................................. 187newwizardpage

................................................................................................................................................. 187wizardwidget

................................................................................................................................................. 188runwizard

................................................................................................................................................. 188wizardgetdata

................................................................................................................................................. 188killwizard

................................................................................................................................................. 189wizardoption

................................................................................................................................................. 189fileopendialog

................................................................................................................................................. 190filesavedialog

............................................................................................................ 19011 FDTD Solutions toolbox

................................................................................................................................................. 194new2d

................................................................................................................................................. 195new3d

................................................................................................................................................. 195load

................................................................................................................................................. 196save

................................................................................................................................................. 196run

................................................................................................................................................. 197runparallel

................................................................................................................................................. 197setparallel

................................................................................................................................................. 198runanalysis

................................................................................................................................................. 198structures

................................................................................................................................................. 198simulation

................................................................................................................................................. 199sources

Page 10: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Reference Guide8

© 2003 - 2009 Lumerical Solutions, Inc

................................................................................................................................................. 199monitors

................................................................................................................................................. 199switchtolayout

................................................................................................................................................. 199layoutmode

................................................................................................................................................. 200addcircle

................................................................................................................................................. 200addcustom

................................................................................................................................................. 200addimport

................................................................................................................................................. 201addpyramid

................................................................................................................................................. 201addpoly

................................................................................................................................................. 201addrect

................................................................................................................................................. 201addring

................................................................................................................................................. 202addsphere

................................................................................................................................................. 202addsurface

................................................................................................................................................. 202addstructuregroup

................................................................................................................................................. 203addfdtd

................................................................................................................................................. 203addmesh

................................................................................................................................................. 203adddipole

................................................................................................................................................. 203addgaussian

................................................................................................................................................. 204addplane

................................................................................................................................................. 204addmode

................................................................................................................................................. 204addtfsf

................................................................................................................................................. 205addimportedsource

................................................................................................................................................. 205addindex

................................................................................................................................................. 205addtime

................................................................................................................................................. 205addmovie

................................................................................................................................................. 206addprofile

................................................................................................................................................. 206addpower

................................................................................................................................................. 206addanalysisgroup

................................................................................................................................................. 207setsourcesignal

................................................................................................................................................. 207updatesourcemode

................................................................................................................................................. 207clearsourcedata

................................................................................................................................................. 208getsourceangle

................................................................................................................................................. 208nonorm

................................................................................................................................................. 208cwnorm

................................................................................................................................................. 209sourcenorm

................................................................................................................................................. 209sourcenorm2_avg

................................................................................................................................................. 210sourcenorm2_pavg

................................................................................................................................................. 211dipolepower

................................................................................................................................................. 211sourcepower

................................................................................................................................................. 212sourcepower_avg

................................................................................................................................................. 213sourcepower_pavg

................................................................................................................................................. 214sourceintensity

................................................................................................................................................. 215sourceintensity_avg

................................................................................................................................................. 215sourceintensity_pavg

................................................................................................................................................. 216transmission

................................................................................................................................................. 217transmission_avg

................................................................................................................................................. 217transmission_pavg

................................................................................................................................................. 218Near to far field projections

................................................................................................................................................. 221farfieldfilter

................................................................................................................................................. 222farfield2d

................................................................................................................................................. 223farfieldvector2d

................................................................................................................................................. 223farfieldpolar2d

Page 11: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

9Contents

© 2003 - 2009 Lumerical Solutions, Inc

................................................................................................................................................. 224farfieldangle

................................................................................................................................................. 224farfield2dintegrate

................................................................................................................................................. 225farfield3d

................................................................................................................................................. 226farfieldvector3d

................................................................................................................................................. 226farfieldpolar3d

................................................................................................................................................. 227farfieldux

................................................................................................................................................. 227farfielduy

................................................................................................................................................. 227farfieldspherical

................................................................................................................................................. 228farfield3dintegrate

................................................................................................................................................. 229farfieldexact2d

................................................................................................................................................. 230farfieldexact3d

................................................................................................................................................. 231farfieldexact

................................................................................................................................................. 232Grating calculations

................................................................................................................................................. 233grating

................................................................................................................................................. 233gratingn

................................................................................................................................................. 234gratingm

................................................................................................................................................. 234gratingpolar

................................................................................................................................................. 235gratingvector

................................................................................................................................................. 236gratingperiod1

................................................................................................................................................. 236gratingperiod2

................................................................................................................................................. 236gratingbloch1

................................................................................................................................................. 236gratingu1

................................................................................................................................................. 237gratingu2

................................................................................................................................................. 237gratingangle

................................................................................................................................................. 237gratingbloch2

............................................................................................................ 23812 Creating your own script commands

Part XI Appendix 240

............................................................................................................ 2401 Software acknowledgement

Index 241

Page 12: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Reference Guide10

© 2003 - 2009 Lumerical Solutions, Inc

1 New Features

FDTD Solutions is constantly being upgraded. See the following sections for a list of thelatest new features.

1.1 New features for version 6.51.1.1 Structure groups

The ability to group structures is one of the main new features in FDTD 6.5. Groups canbe moved, rotated and copied as a single object. In addition to simple grouping, it ispossible 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 inputparameter. When the Pitch parameter is changed, all objects in the group willautomatically move to the appropriate position. For an example of how to create and usea group see the pc micro cavity tutorial in the getting started section.

1.1.2 Analysis (monitor) groups

The ability to group monitors into Analysis groups is one of the main new features inFDTD 6.5. Groups can be moved and copied as a single object. In addition to simplegrouping, it is possible to create parameterized group-objects by adding script code to thegroup. For example, it is possible to create a Scattering Cross-section Analysis group. The groupis composed of 4 monitors that form a box around the structure. One associated scriptadjusts the monitor positions as defined by the input parameters. A second scriptcalculates the scattering cross-section from the monitor data. This analysis group is setup in the monitors section of the Getting Started nanowire resonance tutorial. A secondanalysis group example can be found in the pc micro cavity tutorial.

1.1.3 Object tree browser

The object tree browser provides an alternate view of objects within a simulation. It isespecially useful for complicated simulations with many overlapping objects. In suchcases, it is much easier to select objects from the tree view than directly in the graphicalview ports. It also makes selecting objects within groups possible. For more information,see the layout editor tabs and object tree section of the Layout editor chapter.

1.1.4 Built in script file editor

The Script file editor allows you to create, edit, and run script files directly from withinFDTD Solutions, rather than using another text editor like Notepad. Syntax highlightingmakes it easier to read, write and debug script files. The Run Script button makes runningthe script quick and easy. For more information, see the script prompt and script fileeditor page in the Layout editor section.

81

93

Page 13: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

New Features 11

© 2003 - 2009 Lumerical Solutions, Inc

1.1.5 Script syntax highlighting

The Script File Editor and Script Prompt have syntax highlighting to make the commandseasier to read, write and debug. Comments are green, strings are red, and loop/controlstatements are blue.

1.1.6 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 intoa different simulation. This is especially useful with the new structure and analysisgroups.

1.1.7 Dipole radiated power calculation

The dipolepower script command returns the actual power radiated by a dipolesource. This greatly simplifies calculations that require knowledge of the radiated power,such as enhancement and efficiency measurements.

1.1.8 New MODE source script commands

The updatesourcemode script command automatically updates the mode profile ofthe MODE source. This makes it much easier to automate some types of parametersweeps. The get script command now returns the mode profile stored in the MODE source, inaddition to the other object properties.The clearsourcedata script command clears the mode profile from the MODESource.

1.1.9 New script functions

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.

system , almostequal , not , square brackets , singlequotes , format , updatesourcemode , clearsourcedata ,setglobal , getglobal , addstructuregroup , addanalysisgroup

, adduserprop , addtogroup , getmaterial , havedata ,layoutmode , sourceintensity , sourceintensity_avg ,sourceintensity_pavg , dipolepower , runanalysis , runwizard

, wizardgetdata , setplot .

1.1.10 Online Help search bar

The Online Help search toolbar provides easy access to the FDTD Solutions Online Helpwebsite. The toolbar will open your default web browser and search the Online Help forthe requested term. This is particularly useful when searching for script function syntax. For more information, see the toolbars page in the layout editor section.

211

207

169

207

111 133 136 125

138 116 207 207

168 171 202

206 167 166 184 180

199 214 215

215 211 198

188 188 160

87

Page 14: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Reference Guide12

© 2003 - 2009 Lumerical Solutions, Inc

1.1.11 Simplified installation

Simplified licensing: The USB hardware keys now contain much of the licensinginformation (expiry dates, quotas). In many cases, license files are no longer required.

Matlab script integration: FDTD Solutions automatically detects MATLAB. The MATLABscript integration step of the FDTD installation has been removed.

MATLAB is a registered trademark of The Mathworks, Inc.

1.1.12 Improved material fits

The fitting functions used to generate material models from Sampled data materials havebeen improved to give more control over the fits that can be generated. For example, youcan specify a custom wavelength range or force the fit to give priority to the real orimaginary part of the permittivity.

1.2 New features for version 6.01.2.1 Multi coefficient material model

In the past, FDTD Solutions supported single Plasma, Lorentz, Debye or combinations ofthese dispersive models. FDTD Solutions 6 has a new generalized multi-coefficientmodel that allows more complicated data to be fit. The accuracy of the model can becontrolled with the number of coefficients. More coefficients will give a better fit toexperimental data, but at the expense of more memory and longer simulation times.

This model is only available when using the Sampled data material definition. Thecoefficients are automatically calculated from the sampled material data over the sourcebandwidth. See the chapter on the Material Database for details.

1.2.2 Auto fitting of experimental data

The Sampled data material definition (for importing experimental data) uses an automaticfitting routine to calculate broadband model parameters from experimental data. Thismakes importing experimental data much easier, since manually calculating modelparameters can be very difficult. See Material Database for more information.

1.2.3 Improved material database GUI

The Material Database interface has been completely redesigned and simplified. TheDatabase provides an interface to modify the properties of existing materials and to addnew materials. The Material Explorer is used to view the index/permittivity profile ofmaterial in the database. See the Material Database chapter for more information.

72

72

72

Page 15: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

New Features 13

© 2003 - 2009 Lumerical Solutions, Inc

1.2.4 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 deepUV to far infrared.

1.2.5 Spectral averaging

The Spectral averaging feature of Power and Profile monitors calculates the incoherentspectral average of the electromagnetic fields or the Poynting vector as the simulationruns. The technique is much more efficient than measuring many frequencies andaveraging after the simulation.

Two types of averaging are available. Total spectral averaging uses the source inputspectrum as the weighting function. This is most useful when the source spectrum of thesimulation matches the actual illumination conditions. Partial spectral averaging uses aLorentzian weighting function multiplied by the source spectrum. Partial spectralaveraging is useful to extract the average response of the system to a variety of differentillumination conditions from a single simulation. See the Spectral averaging section of the Units and Normalization chapter for moredetails.

1.2.6 More far field analysis

A number of new far field projection and grating script functions have been added. Threeof the new functions are described here. For more information, see the far field functionsection of the Reference Guide: Near to far field projections .

The farfield3dintegrate function makes integrating portions of the far fieldmuch easier. The farfieldspherical function converts direction cosine units (returned from thefar field projection functions) into more familiar spherical coordinates. The gratingvector function can be used to study the polarization of grating ordersof periodic structures.

1.2.7 GUI upgrade

The entire Graphical User Interface has been updated. It is now possible to undockindividual sub-windows from the main application. This can be very helpful when trying tomake one sub-window very large. Another new feature is the ability to show/hide andrearrange toolbars.

1.2.8 User defined source signals

The source time signal is normally generated by FDTD Solutions based on the frequencyrange specified by the user. While the automatically generated pulse is usuallyappropriate, 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

24

218

228

227

235

Page 16: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Reference Guide14

© 2003 - 2009 Lumerical Solutions, Inc

command setsourcesignal for more information.

1.2.9 Shorter source pulses

FDTD Solutions 6.0 uses a new algorithm to generate the source time pulse from thefrequency range specified by the user. The new algorithm generates a much shorter timepulse, while still ensuring that most of the pulse energy is contained within thefrequencies 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 bythe source pulse length, will not experience this speedup.

1.2.10 Unicode characters

FDTD Solutions now supports Unicode file names and file paths. This allows users towork in directories and save simulation files with names that include characters fromJapanese, Chinese, or other languages that are supported by the Unicode format.

1.3 New features for version 5.11.3.1 GDSII import

FDTD Solutions can now import GDSII files. The GDSII files use a standard data formatto store 2D geometric data. These files can be imported to create complex multi-layeredstructures in your simulations. For more information, see the GDS Import section.

1.3.2 Improved figure windows

Control over the figure window color map has been expanded. The color map limits cannow be adjusted. This is useful when creating several images with a consistent colormap. A grey scale color map is also available, which is useful when creating figures to beprinted in black and white. See the figure window page for more details.

1.3.3 n and k import

The import structure, used to import physical structure data from a file, has beenexpanded. Refractive index (n and k) data as a function of space (3D) can be importedfrom a file or matrix. See the nk import page in the simulation objects chapter formore details.

1.3.4 Set view and orbit

The setview command gives the user complete control over the perspective viewwindow. The orbit command will view the current simulation objects in an ellipticalorbit. This can make viewing the simulation objects easier. Movies of the orbits can alsobe created.

207

84

103

39

177

178

Page 17: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

New Features 15

© 2003 - 2009 Lumerical Solutions, Inc

1.3.5 Surface imports

The import structure, used to import physical structure data from a file, has beenexpanded. Surface data of the form y = f(x) or z = f(x,y) can be imported from a file ormatrix. This data can be generated from an analytic formula or from an experimentalsource such as an AFM. See the surface import page in the simulation objectschapter for more details.

1.3.6 Windows Vista support

Windows Vista has been added to the list of supported systems. For details on installingthe correct version for your hardware and operating system (OS), please see theInstallation Manuals.

1.4 New features for version 5.01.4.1 Graded mesh

FDTD Solutions now supports a non-uniform, or graded, mesh. This can dramaticallyincrease speed and accuracy for many problems, as well as reducing the memoryrequirements. Please refer to the simulation tab section of the simulation objectschapter.

1.4.2 Polygon and triangle primitives

FDTD Solutions now supports extruded N-sided polygons and triangles. For details,please see the physical structures section of the simulation objects chapter.

1.4.3 Quadrics and Infinipath interconnects

FDTD Solutions now supports even more high performance computing (HPC) networkinginterconnects, including Quadrics and Infinipath. Please see the Installation Manual fordetails on configuring your installation for your HPC hardware.

1.4.4 Native support for the Windows x64 platform

FDTD Solutions has added a full Windows x64 application to the current Windows 32-bitand Linux 32- and 64-bit versions. For details on installing the correct version for yourhardware and operating system (OS), please see the Installation Manuals.

1.4.5 Easier installation of parallel FDTD Solutions

Get your parallel FDTD Solutions up and running faster! The easy installation lets youimmediately take full advantage of your multi-core and multiprocessor systems, as well aslarger scale clusters.

40

33

34

Page 18: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Reference Guide16

© 2003 - 2009 Lumerical Solutions, Inc

1.4.6 Meshing improvements

Each physical structure primitive can control its own mesh order (priority), making iteasier to draw complex, overlapping structures. Please see Mesh order for details onmaterial meshing order.

Advanced users can now store the mesh from previous simulations and re-use it to savemeshing time. Please see Using the non-uniform mesh for details.

1.4.7 Faster drawing modes for all primitives

All physical structure primitives now support wireframe, vertex wireframe and pixeldrawing modes which can make the manipulation of large numbers of primitives moreconvenient in the Layout Editor. Please see Physical Structures for details.

1.4.8 Simulation auto shutoff

Simulations can detect when the electromagnetic fields have decayed and automaticallyterminate the simulation early.

1.4.9 Improved movie monitors

The movie monitors now support mpeg movies of |E|2 and |H|2 and well as the usualelectromagnetic field components. The user can now choose the final movie resolution inpixels for better viewing. Please see the monitors section of the simulation objectschapter for details.

77

34

58

Page 19: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

The physics of the FDTD algorithm 17

© 2003 - 2009 Lumerical Solutions, Inc

2 The physics of the FDTD algorithm

The finite-difference time-domain (FDTD) method1,2 has recently become thestart-of-the-art method for solving Maxwell's equations in complex geometries. Being adirect time and space solution, it offers the user a unique insight into all types of problemsin electromagnetics and photonics. In addition, FDTD can also obtain the frequencysolution by exploiting Fourier transforms, thus a full range of useful quantities can becalculated, such as the complex Poynting vector and the transmission / reflection of light.

This section will introduce the basic mathematical and physics formalism behind theFDTD algorithm, starting from the linear Maxwell's equations. The simulator can be usedfor advanced research and development or as an ideal teaching and learningenvironment in photonics, optics, and electromagnetics.

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-DomainMethod. Boston: Artech House, (2005).

2.1 FDTD and Maxwell's equationsConsider Maxwell's curl equations in non-magnetic materials:

where H, E, and D are the magnetic, electric, and displacement fields, respectively, while

is the complex relative dielectric constant ( , where n is the refractiveindex).

In three dimensions, Maxwell equations have six electromagnetic field components: Ex, E

y, Ez and Hx, Hy, and Hz. If we assume that the structure is infinite in the z dimension and

that the fields are independent of z, specifically that

then Maxwell's equations split into two independent sets of equations composed of three

Page 20: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Reference Guide18

© 2003 - 2009 Lumerical Solutions, Inc

vector quantities each which can be solved in the x-y plane only. These are termed theTE (transverse electric), and TM (transverse magnetic) equations. We can solve bothsets of equations with the following components:TE: Ex, Ey, Hz

TM: Hx, Hy, Ez

For example, in the TM case, Maxwell's equations reduce to:

FDTD Solutions can solve two and three dimensional Maxwell equations in linear andnon-linear dispersive media, where the user can specify arbitrary geometric structuresand various input excitation sources. The two dimensional FDTD simulator solves the TEand/or TM Maxwell equations.

FDTD is a time domain technique, meaning that the electromagnetic fields are solved asa function of time. In general, FDTD Solutions is used to calculate the electromagneticfields as a function of frequency or wavelength by performing Fourier transforms duringthe simulation. This allows it to obtain complex-valued fields and other derived quantitiessuch as the complex Poynting vector, normalized transmission, and far field projectionsas a function of frequency or wavelength. The field information can be returned in twodifferent normalization states, please see the section on frequency domain normalization

for more details.

Dispersive materials with tabulated refractive index (n,k) data as a function of wavelengthcan be solved using the multi-coefficient models with auto-fitting. Alternatively, specifictheoretical models such as Plasma (Drude), Debye or Lorentz can be used. See thechapter on the Material Database for details.

Boundary conditions are very important in electromagnetics and simulation techniques. FDTD Solutions supports a range of boundary conditions, such as PML, periodic, andBloch. See the boundary conditions section here for the complete list.

Sources are another important component of a simulation. FDTD Solutions supports anumber of different types of sources such as point dipoles, beams, plane waves, atotal-field scattered-field (TFSF) source, a guided-mode source for integrated opticalcomponents, and an imported source to interface with external photonic design

22

72

45

Page 21: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

The physics of the FDTD algorithm 19

© 2003 - 2009 Lumerical Solutions, Inc

softwares. Detailed information about each of these sources is contained in the Radiationsources section.

Unless otherwise specified, all quantities in FDTD Solutions are calculated in SI units.Please see Units and Normalization for more information.

The online User Guide at www.lumerical.com/fdtd_online_help has many more detailsabout the physics of FDTD and how to obtain advanced results. Please see, for example,the sections on coherence, and far field calculations in the online User Guide.

49

20

Page 22: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Reference Guide20

© 2003 - 2009 Lumerical Solutions, Inc

3 Units and normalization

Unless specified explicitly in a GUI window, FDTD Solutions uses SI Units at all times.The following table summarizes the units used in FDTD.

Please note that some quantities can be returned in either the Continuous WaveNormalization state (cwnorm) or the No Normalization state (nonorm). Please see Frequency domain normalization for details on the different normalization states. Formost applications, the default cwnorm state is the best choice.

To see the data available in a source or monitor, use the script command?showdata ("monitorname");

All data can be obtained in scripting, with commands such as getdata , getelectric ,getmagnetic and transmission .

Quantity Description Normstate

Units Unit description

E(t) Electric field as functionof time

N/A V/m Volts per meter

|E(t)|2 Electric field intensity asa function of time

N/A (V/m)2 Volts squared permeter squared

H(t) Magnetic field as afunction

N/A A/m Amperes per meter

|H(t)|2 Magnetic field intensityas a function of time

N/A (A/m)2 Amperes squared permeter squared

p Electric dipole in 3D N/A Cm Coulomb meters

m Magnetic dipole in 3D N/A Am2 Ampere meterssquared

p Electric field in 2D N/A Cm/m Coulomb meters permeter

m Magnetic dipole in 2D N/A Am2/m Ampere meterssquared per meter

f=w/2p Frequency N/A Hz Hertz

E(w) Electric field as a functionof angular frequency

cwnorm V/m Volts per meter

|E(w)|2 Electric field intensity asa function of angularfrequency

cwnorm (V/m)2 Volts squared permeter squared

22

180

181 182

182 216

Page 23: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Units and normalization 21

© 2003 - 2009 Lumerical Solutions, Inc

H(w) Magnetic field as afunction of angularfrequency

cwnorm A/m Amperes per meter

|H(w)|2 Magnetic field intensityas a function of angularfrequency

cwnorm (A/m)2 Amperes squared permeter squared

P(w) Poynting vector as afunction of angularfrequency

cwnorm W/m2 Watts per metersquared

Power(w) Power as a function ofangular frequency

cwnorm W Watts

Power(w) 2D Power as a functionof angular frequency

cwnorm W/m Watts per meter

E(w) Electric field as a functionof angular frequency

nonorm V/m/Hz Volts per meter perHertz

|E(w)|2 Electric field intensity asa function of angularfrequency

nonorm (V/m/Hz)2 Volts squared permeter squared perHertz squared

H(w) Magnetic field as afunction of angularfrequency

nonorm A/m/Hz Amperes per meterper Hertz

|H(w)|2 Magnetic field intensityas a function of angularfrequency

nonorm (A/m/Hz)2 Amperes squared permeter squared perHertz squared

P(w) Poynting vector as afunction of angularfrequency

nonorm W/m2/Hz2 Watts per metersquared per Hertzsquared

Power(w) Power as a function ofangular frequency

nonorm W/Hz2 Watts per Hertzsquared

Power(w) 2D Power as a functionof angular frequency

nonorm W/Hz2/m Watts per Hertzsquared per meter

3.1 Source amplitudesDipole sourcesDipole source amplitudes are· Cm for 3D electric dipole sources· Am2 for 3D magnetic dipole sources· Cm/m for 2D electric dipole sources· Am2/m for 2D magnetic dipole sources

Page 24: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Reference Guide22

© 2003 - 2009 Lumerical Solutions, Inc

Other sourcesWhen specifying the amplitude for non-dipole sources, the "amplitude" refers to the peakelectric field amplitude in units of V/m. For example, if a Gaussian beam has the followingelectric field distribution in time and space:

Then the "amplitude" refers to the value of E0 and has units of V/m.

3.2 Frequency domain normalizationThe frequency power and frequency profile monitors record the electric and magneticfields at a series of user-defined frequencies. These can be returned in either theContinuous Wave Normalization state (cwnorm), or the No Normalization state (nonorm). For most applications, the default cwnorm state is the best choice.

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

Quantity Definition Normalizationstate

Esim(w) nonorm

Hsim(w) nonorm

Psim(w) nonorm

Eimp(w) cwnorm

Himp(w) cwnorm

Pimp(w) cwnorm

Page 25: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Units and normalization 23

© 2003 - 2009 Lumerical Solutions, Inc

s(w)

, where sj(t) is the

source time signal of the jth source and N is the numberof active sources in the simulation volume

N/A

Understanding Continuous Wave Normalization (cwnorm)Impulse responseFDTD is a time domain method. The electromagnetic fields are calculated as a functionof 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 apulse. For example, this could be

and the Fourier transform of s(t) is s(w)

Ideally, s(t) would be a dirac delta function (in which case s(w) = 1). This would allow usto obtain the response of the system at all frequencies from a single simulation. For avariety of reasons, it is more efficient and numerically accurate to excite the system with ashort pulse such that the spectrum, |s(w)|2, has a reasonably large value over allfrequencies of interest.

In the nonorm state, power and profile monitors in FDTD Solutions return the responseof the system to the simulated input pulse s(t):

The simulated electric field as a function of angular frequency, Esim(w), depends on both

the source pulse used, s(t), and the system under study.

In the default cwnorm state, power and profile monitors in FDTD Solutions return theimpulse response of the system.

The impulse response of the system is a much more useful quantity because it iscompletely independent of the source pulse used to excite the system.

ExampleConsider a beam source injected into free space at z=z0. The source signal is

Page 26: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Reference Guide24

© 2003 - 2009 Lumerical Solutions, Inc

The electric field at the source injection plane has the following form:

In the cwnorm state,

In other words, the field returned in the cwnorm state is the field that would exist if a CWsource 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 thereturned fields are the same as time domain fields.

3.3 Spectral averagingFor some simulations, it is useful to calculate the incoherent spectral average of theelectromagnetic fields or the Poynting vector. For example, we might want to calculate

where W(w) is a weighting function and Pimp(w) is the Poynting vector returned in the

cwnorm state, in other words, the impulse response of the system. (Please seeFrequency domain normalization for an explanation of the impulse response.) Wecould calculate the Pimp(w) at many different angular frequencies and then perform the

spectral average after the simulation. FDTD Solutions, however, allows for two methodsof more efficient spectral averaging during the simulation which can significantly reducethe memory requirements and increase the speed of the simulation. These methods arecalled "total spectral averaging" and "partial spectral averaging".

The frequency power and frequency profile monitors can record spectral averages ofvarious quantities during the simulation. Like the other quantities calculated by thesemonitors, these can be returned in the Continuous Wave Normalization state (cwnorm),or the No Normalization state (nonorm). For most applications, the default cwnorm stateis the best choice. In the tables below, we use the subscripts sim and imp to refer to thequantities returned in the nonorm and cwnorm states respectively. Please refer to Frequency domain normalization for more details on the two normalization states, andobtaining the impulse response of the system.

Total spectral averagingFDTD Solutions supports a spectral average that uses the source input spectrum as theweighting function. Total spectral averaging can be useful when the source spectrum ofthe simulation matches the actual illumination conditions. The following table gives theprecise definitions of the quantities available using total spectral averaging.

22

22

Page 27: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Units and normalization 25

© 2003 - 2009 Lumerical Solutions, Inc

Quantity Definition Normalizationstate

<|Esim|2>totalnonorm

<|Hsim|2>totalnonorm

<Psim>total nonorm

<|Eimp|2>total cwnorm

<|Himp|2>total cwnorm

<Pimp>total cwnorm

s(w)

, where sj(t) is the

source time signal of the jth source and N is thenumber of active sources in the simulation volume

N/A

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

Page 28: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Reference Guide26

© 2003 - 2009 Lumerical Solutions, Inc

To see the data available in a monitor, use the script command?showdata ("monitorname");

All data can be obtained in scripting, with commands such as getdata andtransmission_avg . The available components for total spectral averaging are shown inthe following table.

Quantity Data name Example script command

<|Exsim|2>total E2x_avg nonorm;E2x = getdata("monitor1","E2x_avg");

<|Eysim|2>total E2y_avg nonorm;E2y = getdata("monitor1","E2y_avg");

<|Ezsim|2>total E2z_avg nonorm;E2z = getdata("monitor1","E2z_avg");

<|Hxsim|2>total H2x_avg nonorm;H2x = getdata("monitor1","H2x_avg");

<|Hysim)|2>total H2y_avg nonorm;H2y = getdata("monitor1","H2y_avg");

<|Hzsim)|2>total H2z_avg nonorm;H2z = getdata("monitor1","H2z_avg");

<Pxsim>total Px_avg nonorm;Px = getdata("monitor1","Px_avg");

<Pysim>total Py_avg nonorm;Py = getdata("monitor1","Py_avg");

<Pzsim>total Pz_avg nonorm;Pz = getdata("monitor1","Pz_avg");

<|Eximp|2>total E2x_avg cwnorm;

E2x = getdata("monitor1","E2x_avg");

180

181

217

Page 29: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Units and normalization 27

© 2003 - 2009 Lumerical Solutions, Inc

<|Eyimp|2>total

E2y_avg cwnorm;E2y = getdata("monitor1","E2y_avg");

<|Ezimp|2>total E2z_avg cwnorm;

E2z = getdata("monitor1","E2z_avg");

<|Hximp|2>total H2x_avg cwnorm;

H2x = getdata("monitor1","H2x_avg");

<|Hyimp|2>total H2y_avg cwnorm;

H2y = getdata("monitor1","H2y_avg");

<|Hzimp|2>total

H2z_avg cwnorm;H2z = getdata("monitor1","H2z_avg");

<Pximp>total Px_avg cwnorm;Px = getdata("monitor1","Px_avg");

<Pyimp>total Py_avg cwnorm;Py = getdata("monitor1","Py_avg");

<Pzimp>total Pz_avg cwnorm;Pz = getdata("monitor1","Pz_avg");

Partial spectral averagingFDTD Solutions supports a spectral average that uses a Lorentzian weighting functionmultiplied by the source spectrum. Partial spectral averaging is useful to extract theaverage response of the system to a variety of different illumination conditions from asingle simulation. The following table gives the precise definitions of the quantitiesavailable using partial spectral averaging.

Quantity Definition Normalization state

<|Esim(w)|2>partial

nonorm

<|Hsim(w)|2>partial

nonorm

<Psim(w)>partial nonorm

Page 30: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Reference Guide28

© 2003 - 2009 Lumerical Solutions, Inc

<|Eimp(w)|2>partial

cwnorm

<|Himp(w)|2>partial

cwnorm

<Pimp(w)>partial cwnorm

|h(w,w')|2 N/A

s(w)

, where sj(t) is the

source time signal of the jth source and N is the number ofactive sources in the simulation volume

N/A

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

Page 31: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Units and normalization 29

© 2003 - 2009 Lumerical Solutions, Inc

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

Please note that when considered as a function of angular frequency, the FWHM of |h(w,w')|2 is 2pd rad/seconds.

To see the data available in a monitor, use the script command?showdata ("monitorname");

All data can be obtained in scripting, with commands such as getdata andtransmission_pavg . The available components for total spectral averaging are shownin the following table.

Quantity Data name Example script command

<|Exsim(w)|2>partial

E2x_pavg nonorm;E2x = getdata("monitor1","E2x_pavg");

<|Eysim(w)|2>partial

E2y_pavg nonorm;E2y = getdata("monitor1","E2y_pavg");

<|Ezsim(w)|2>partial

E2z_pavg nonorm;E2z = getdata("monitor1","E2z_pavg");

<|Hxsim(w)|2>partial

H2x_pavg nonorm;H2x = getdata("monitor1","H2x_pavg");

<|Hysim(w)|2>partial

H2y_pavg nonorm;H2y = getdata("monitor1","H2y_pavg");

<|Hzsim(w)|2>partial

H2z_pavg nonorm;H2z = getdata("monitor1","H2z_pavg");

<Pxsim(w)>partial Px_pavg nonorm;Px = getdata("monitor1","Px_pavg");

<Pysim(w)>partial Py_pavg nonorm;Py = getdata("monitor1","Py_pavg");

<Pzsim(w)>partial Pz_pavg nonorm;Pz = getdata("monitor1","Pz_pavg");

180

181

217

Page 32: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Reference Guide30

© 2003 - 2009 Lumerical Solutions, Inc

<|Eximp(w)|2>partial

E2x_pavg cwnorm;E2x = getdata("monitor1","E2x_pavg");

<|Eyimp(w)|2>partial

E2y_pavg cwnorm;E2y = getdata("monitor1","E2y_pavg");

<|Ezimp(w)|2>partial

E2z_pavg cwnorm;E2z = getdata("monitor1","E2z_pavg");

<|Hximp(w)|2>partial

H2x_pavg cwnorm;H2x = getdata("monitor1","H2x_pavg");

<|Hyimp(w)|2>partial

H2y_pavg cwnorm;H2y = getdata("monitor1","H2y_pavg");

<|Hzimp(w)|2>partial

H2z_pavg cwnorm;H2z = getdata("monitor1","H2z_pavg");

<Pximp(w)>partial Px_pavg cwnorm;Px = getdata("monitor1","Px_pavg");

<Pyimp(w)>partial Py_pavg cwnorm;Py = getdata("monitor1","Py_pavg");

<Pzimp(w)>partial Pz_pavg cwnorm;Pz = getdata("monitor1","Pz_pavg");

3.4 Calculating and normalizing power in thefrequency domainThe complex Poynting vector

can be used to calculate the power flow in a particular direction; the user can alsocalculate this quantity from the frequency-dependent fields of frequency monitors. Thetime-averaged power flowing across a surface is given by

Note that the propagating power is proportional to the real part of the Poynting vectoronly, which is related to the conservation of energy for the time-averaged quantities. Thefactor of 1/2 is related to the time averaging of the CW fields. The imaginary part of thePoynting vector relates to the non-propagating reactive or stored energy, such as onemight find in the evanescent tail of light being reflected by total internal reflection (TIR).Please see J. D. Jackson, "Classical Electrodynamics, Second Edition", John Wiley &Sons, 1975 for further details.

As an example, if one simulates a y-propagating source such as a Gaussian bream

Page 33: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Units and normalization 31

© 2003 - 2009 Lumerical Solutions, Inc

striking a circular rod in a 2D TM simulation, then by placing a frequency power or profilemonitor on the opposite side of the rod, the normalized transmission, T, as a function offrequency can be calculated with:

FDTD Solutions provide many GUI and scripting functions to make transmissioncalculations easily at the press of a button or using a single command. The transmissionscript command will perform this particular calculation.

3.5 Integrating over lines, surfaces andvolumesThe electric and magnetic fields are recorded on the FDTD mesh, as shown below for a2D monitor, where the grey dots represent the positions where the fields are recorded.The thick black outline shows the limits of the surface monitor as seen in the LayoutEditor. This monitor has an x-span of 12dx and a y-span of 5dy. This monitor records atotal of 13x6 data points.

A typical calculation with this monitor might be to integrate the total power flow across thesurface of the monitor, or

In order to calculate this quantity, we provide the scripting function integrate. If Pz is avariable of dimension 13x6x1, and x and y are the corresponding position vectors, thenthe desired quantity is: power = 0.5*integrate(real(Pz),1:2,x,y);

The integrate script command can be used to integrate over spatial dimensions evenwhen several frequency points have been recorded. For example, if Pz is a variable ofdimension 13x6x1x10, representing 10 frequency points, then the following can be used

Page 34: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Reference Guide32

© 2003 - 2009 Lumerical Solutions, Inc

to integrate over y (ie dimension 2) and then x (ie dimension 1) power = 0.5*integrate(real(Pz),1:2,x,y);power will be a matrix of dimension 10x1.

Page 35: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Simulation objects 33

© 2003 - 2009 Lumerical Solutions, Inc

4 Simulation objects

There are four types of simulation objects:Physical structures Structure objects are used to model the physical structure

of the device.Simulation objects The simulation region defines simulation parameters like

boundary conditions and mesh size. Radiation sources Radiation sources create the incident radiationMeasurement monitors Monitors, located on the fourth tab, are used to collect data

from the simulation.

The CAD environment for FDTD solutions contains four main tabs: one for each group ofsimulation objects. A simulation object can be added from by selecting the tab of thegroup to which it belongs, and then clicking on the button for that simulation object. Thebuttons for the simulation objects are located along the top of the tab. For example, in the

screen shot below, the monitor group tab is selected. Clicking on the button wouldadd a time monitor object.

Once the object is selected (refer to the Getting Started section for more information),

pressing the EDIT button will bring up a window where it is possible to modify theproperties of the simulation object. The corresponding window for the time monitor isshown below.

TIP: In-field equation interpreter

Page 36: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Reference Guide34

© 2003 - 2009 Lumerical Solutions, Inc

The fields for numeric parameters can be used as a simple calculator. For instance, ifyou wish to set a value to the square root of 3 divided by e, just enter sqrt(3)/exp(1) intothe field. For more information, see the Equation interpreter section.

Notes:· Structure objects support Multi-object editing. If you select multiple objects then click

EDIT, you can edit all properties that are common to all selected objects.· Monitors and sources have global properties. For example, the global source frequency

range will apply to all sources. The global properties can be edited with the GLOBAL

PROPERTIES button. See the first figure above.· Structures and monitors can be organized in groups. Groups are created using the

GROUP icon, located to the right of the simulation object buttons.

The purpose of this section of the Reference Guide is to describe all of the availablesimulation objects and groups, and their properties. This section is organized as follows.There are five subsections. The first four subsections correspond to the four types ofobject groups. Each of these sections begins with a brief overview of the simulationobjects that are available. Then, the properties of the simulation objects are described.The properties are organized according to the tab that they are located in when the EDITbutton is pressed. The last of the five subsections describes the syntax for the equationinterpreter.

4.1 Structures tabThe layout tab includes options to add the following physical structures:

TriangleTriangular objects denote physical objects that appear triangular from above. For 2Dsimulations, these objects represent triangles while in 3D these objects are extruded inthe z direction to a specific height. They are actually polygon objects, with the number ofvertices set to 3.

RectangleRectangular regions denote physical objects that appear rectangular from above. For 2Dsimulations, these objects represent rectangles while in 3D these objects are cubes ofspecific height.

Polygon Polygons allow the user to define a custom object with a variable number of vertices. Thelocation of each vertex can be independently positioned within a plane, and the vertices

65

Page 37: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Simulation objects 35

© 2003 - 2009 Lumerical Solutions, Inc

are connected with straight lines. For 3D simulations, the object is extruded in the zdimension.

CircleCircles denote physical objects which appear circular or ellipsoid from above. They areeither circles/ellipses in 2D, or circular/ellipsoid cylinders in 3D.

RingRing regions represent physical objects that consist of full or partial rings when viewedfrom above. Rings in 3D simulations are extruded in the z direction to a specific height.

Custom Primitives Custom primitives can be used to create customized surfaces, specified via parametricequations. The resulting surfaces can either exist on one or more faces of the object, orcan be used to define a cylindrically-symmetric surface of revolution.

Import Objects Import primitives can be used to import material data from external data files. There arethree types of data that can be imported using links in the Import Data tab :

· SURFACES, for example from an atomic force microscope (AFM). In two dimensionalsimulations, the data must be defined as y = f(x). In three dimensional simulations, itmust be defined as z = f(x,y). Both upper and lower surfaces can be imported.

· IMAGES in JPG or PNG format, for example from an scanning electron microscope(SEM). In three dimensions, the imported data is extruded along the z axis.

· The REFRACTIVE INDEX (N AND K) as a function of space, for example, to representdoped material where the doping concentrations and optical loss are calculated inanother software package. In two dimensions, the data is defined as n(x,y), k(x,y) andin three dimensions as n(x,y,z), k(x,y,z). Please note that the value of k is translatedinto a conductive (or plasma) model and is only valid at a the center frequency of thesimulation. It should therefore only be used with single frequency simulations.

Surface Surface primitives can be used to define complex material volumes that exist above orbelow analytically defined surfaces. In 3D simulations, a surface (S) is defined as afunction 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 isdefined as a function of u (S = S(u)) where u can represent x or y.

38

Page 38: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Reference Guide36

© 2003 - 2009 Lumerical Solutions, Inc

Sphere In 3D simulations, users can define spherical regions of constant refractive index throughthe spherical physical object. Spherical objects only exist in 3D simulations.

Pyramid Pyramids can be configured to half flat tops and/or flat bottoms, and either narrow orexpand in the vertical z direction. Pyramids are only available for 3D simulations.

Structure Group Structure groups are used to organize, edit and set up composite systems of objects.Structure groups contain variables and scripts that can be utilized to edit and set up partsof the structure. See the Properties tab and Script tab sections for moreinformation. It is possible to create groups of groups.

4.1.1 Geometry tab

The geometry tab contains options to change the size and location of the structure.

4.1.2 Material tab

The material options are as follows

· MATERIAL: This field can be set to any material included in the material database. If<Object defined dielectric> is selected, then the index property must be set. It ispossible to include new materials in the database, or edit the materials alreadyincluded. See the material database section for more information.

· INDEX: The refractive index of the structure, when the material type is <Object defineddielectric>. The index must be greater than one, and can be specified in terms of anequation in terms of x, y, z, f, w, l0, and k0 (which are defined in the Equationinterpreter section).

· INDEX UNITS: This setting is only used when INDEX is entered as an equation. Theunits of the spatial variables when the index is specified with a formula. The origin is thecenter of the object. The units will affect the interpretation of l0 and k0.

· OVERRIDE MESH ORDER FROM MATERIAL DATABASE: Select to override themesh order from the material database and manually set a mesh order. The meshorder is used by the simulation engine to select which material to use when twomaterials overlap. See the mesh order section for more details.

· MESH ORDER: Set the mesh order in this field if the OVERRIDE MESH ORDERFROM MATERIAL DATABASE option is selected. If the option is not selected, the fielddisplays the mesh order for the currently chosen material from the material database.

42 43

65

77

Page 39: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Simulation objects 37

© 2003 - 2009 Lumerical Solutions, Inc

4.1.3 Rotations tab

Rotate objects by setting the following variables:

· FIRST, SECOND, THIRD AXES: 3D simulation only. Select rotation axis. Up to threedifferent rotations can be applied.

· ROTATION 1,2,3: The rotation of the object in a clockwise direction about each axis,measured in degrees. In 2D simulation, only one angle (rotated around z axis) isrequired.

4.1.4 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 OVERRIDECOLOR 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. Thissetting has no effect on the simulation.

· OVERRIDE COLOR OPACITY FROM MATERIAL DATABASE: When unselected theopacity is determined from the material database. When selected, you can specify avalue for ALPHA between 0 and 1 for the object, depending on how transparent youwant the object to be.

4.1.5 Custom tab

The custom tab is only available for custom primitives. Custom primitives are objects thatare defined by equations describing the boundaries of the physical object. The customprimitive defaults to a rectangular region upon creation, and is shaped via entry of one ormore equations in the edit window. Custom primitives in 3D simulations are extruded inthe z direction to a specific height, or can be rotated about the x-axis to create a surfaceof revolution.

· EQUATION 1: The equation, expressed as a function of x, which defines the upper yedge of the physical object. The origin of equation is the center of the object. Suitablesyntax for the equations is shown in the Equation interpreter section.

Note: Equation definition changed between release FDTD 6.0 and FDTD 6.5The location of the origin for custom objects was changed between FDTD 6.0 and 6.5. Equations in custom objects created with FDTD 6.0 or earlier will be automaticallyconverted to the new definition.

· MAKE NONSYMMETRIC: Uncheck this if you want to define the lower edge with adifferent equation.

· EQUATION 2: The equation, expressed as a function of x, which defines the lower

65

Page 40: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Reference Guide38

© 2003 - 2009 Lumerical Solutions, Inc

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 inmicrons.

· CREATE 3D OBJECT BY: Options include "extrusion", and "revolution". Extrusionresults in an object that is extruded along the z-axis (i.e. invariant in z). The revolutionobject is created by revolving the equation around the x-axis, resulting in a surface ofrevolution.

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 leftblank results in a custom primitive of zero height everywhere. Equations that go largerthan the span of the object will be clipped at the edge of the object. Equations that gonegative will be clipped at zero. In the following figure, notice how the equations areclipped at the edge of the object.

4.1.6 Import Data tab

The import data tab is only available for import objects. Data is imported by the buttonslocated in the Import region of this tab. All related options are described below:

Import

· IMPORT TYPE: This field is inactive, but tells the user which data has been imported.· SURFACE: This button opens the surface import window, which is described in the

Surface import section.· IMAGE: This button is used to launch the image import wizard which provides a simple

interface to import, threshold, crop and scale the image. The image is used to definethe objects shape in the XY plane. The object is extruded in the Z direction. Images canbe imported from JPG (*.jpg) or PNG (*.png). Other image types can be exported tothese two formats in most image viewing software. Detailed instructions for the ImportWizard can be found on the Import object images page in the User Guide section of theOnline help.

· (N,K) MATERIAL: This button is used to launch the n,k import window, which isdescribed in the nk material import section.

· CLEAR ALL DATA: Deletes any previously imported data. This returns the primitive tothe state it was in prior to importing any data.

40

39

Page 41: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Simulation objects 39

© 2003 - 2009 Lumerical Solutions, Inc

Fine scale adjustments

· XSCALE, NOT UNIFORM SCALING, Y SCALE, Z SCALE: These parameters are usedto scale the overall imported data by either a constant value in both the x and ydirections, or in different amounts for each direction. This can be used to correction fora tilted image, for example.

· ADJUST IMAGE SCALE: This button is used to launch the fine tune image scalewizard. This allows you to graphically retune the scale for image imports, and adjust forimage tilt. The fine tune image scale wizard is explained in detail below and can only beused after importing image data.

Data size

· DATA X POINTS, DATA Y POINTS, DATA Z POINTS: The number of pixels in eachdirection contained in the original file read in.

· DX, DY,DZ: The size of each pixel, scaled to the overall dimension of the simulationregion.

Image only

· THRESHOLD: This is the threshold used to import the data for image imports

Surface only

· LOWER REF HEIGHT: When surface data is imported, it is defined with respect to areference height or zero plane. This zero plane can be changed in the globalcoordinates of the Layout Editor. This field is only active if surface data has beenimported.

· UPPER REF HEIGHT: The same as the LOWER REF HEIGHT but for the uppersurface.

· REF HEIGHT SPAN: The distance between the LOWER REF HEIGHT and the UPPERREF HEIGHT. This is useful for conformal layers to ensure that the layer thickness iscorrect. This field is only active if surface data has been imported

4.1.6.1 nk material import window

Options in the (n,k) material import window include:

· SELECT FILE: let the user specify the data file to be imported.· X0, Y0, Z0: the data origin in the global coordinates of the Graphical Layout Editor.· X SPAN, Y SPAN, Z SPAN: This defines the size of volume that you are importing.

These fields are inactive and help to determine that the file units have been properlychosen.

· 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 buttonallows you to reverse the order easily. Typically, it is very easy to see in the figurewindow when you have the order incorrect.

· IMPORT AS Mkji INSTEAD OF Mijk: 3D simulation only. It is often easy to cyclethrough the array indices in the wrong order when exporting the file, and this check

Page 42: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Reference Guide40

© 2003 - 2009 Lumerical Solutions, Inc

button allows you to reverse the order easily. Typically, it is very easy to see in thefigure 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-zplane to be sure that it is correctly imported. Use this menu chooser to switch betweenplanes.

· Z (or X or Y): Depending on the PLOT PLANE chosen, you can view cross sections atany depth into the structure. Use this slider or the value input field to choose the depthof cross section.

· IMAGE N, IMAGE K: Choose to view n or k in the figure window.

For detailed information and example text import files, as well as script files that generatethe example files, see the Import object spatial (n,k) data page in the User Guide sectionof the Online help.

4.1.6.2 Surface import window

Options in the surface import window include:

· SELECT FILE: let the user specify the data file to be imported.· X0, Y0, Z0: the data origin in the global coordinates of the Graphical Layout Editor.· X SPAN: This defines the length of surface that you are importing. If the x data was

contained in the file (file format type 1), then this field is inactive. If the x data was not inthe file, then this field is active and should be set to the desired data span.

· YSPAN: 3D simulation only. This defines the size of surface area that you areimporting.

· INVERT X AND Y AXIS: It is often easy to invert the x and y axis when exporting thefile. Selecting this checkbox means that the x and y axes are automatically reversed.

· UPPER SURFACE, LOWER SURFACE: Choose which surface is being imported.· FILE UNITS: Select units for the data in your file.

For detailed information and example text import files, as well as script files that generatethe example files, see the Import object surfaces page in the User Guide section of theOnline help.

Page 43: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Simulation objects 41

© 2003 - 2009 Lumerical Solutions, Inc

4.1.7 Surface tab

The diagrams below show how the surface is used to create a volume of desiredmaterial.

The surface equation can contain up to three terms, conic, polynomial and custom whichare added together to create the total surface. Not all terms have to be included.

Conic term:

· c = 1/Rc 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 in 3D simulations and r = u in 2D simulations.

Polynomial term:

· There are 6 M coefficients in 2D simulations and 36 in 3D simulations

Custom term:

Page 44: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Reference Guide42

© 2003 - 2009 Lumerical Solutions, Inc

· You can choose any analytic function of u in 2D simulations and (u,v) in 3Dsimulations.

· The syntax and functions available to specify the index are found in the Equationinterpreter section.

For example, you could use

The surface tab contains the options:

· ORIENTATION: The surface determines if S is a function of (x,y), (x,z) or (y,z) in 3Dsimulations and (x) or (y) in 2D simulations.

· ZERO PLANE: This determines if surface is measured from the lower edge of therectangular volume or the upper edge. See diagrams above.

· MATERIAL POSITION: This determines if the material fills the regions above thesurface or below the surface. See diagrams above.

· SET UNDEFINED TERMS TO: It is possible that the surface equation becomesundefined. For example, it could be sqrt(-1) for some values of (u,v). In this case, thesurface function will become either zero or the maximum value allowed by therectangular 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 willoffset the origin by a desired amount.

· SURFACE UNITS: All quantities defining the surface must be measured in the sameunits. You can choose these units with this menu.

· CONIC: Check this option to include the conic term in the surface equation. If this ischecked, then set

· RADIUS OF CURVATURE: curvature of the surface at the origin. This is equal tothe 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 of u in 2D simulations or u and v in 3Dsimulations.

· 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 atable.

4.1.8 Properties tab

The properties tab is only available for structure groups. The properties tab is used to setthe origin of the group, and to create the custom properties of the group that are theinputs of the group script. Custom user property variables may be added with the ADDbutton, and removed with the REMOVE button. Each user property has a name and atype (number, frequency ect). The user properties can be set manually in the edit gui orthrough script commands. For more information and examples, see the Structure groups

65

Page 45: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Simulation objects 43

© 2003 - 2009 Lumerical Solutions, Inc

page of the User Guide section of the Online Help.

4.1.9 Script tab

The script tab is only available for structure groups. The script tab can contain scriptcommands that are used to set up a structure or edit the properties of structures locatedwithin the structure group. The structure group has access to the user variables defined inthe PROPERTIES tab, and can change properties of any objects that are contained in thegroup. The script does not have access to objects which are not located in the group, anddoes not share the same variable space as the script prompt.

The script is run every time the TEST or OK button is pressed, or when one of the userproperties is changed with a script command.

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 section of the Reference Guide.· 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>.

For more information and examples, see the Structure groups page of the User Guidesection of the Online Help.

4.2 Simulation tabSimulation objects are used to define simulation parameters like boundary conditions andmesh size.

The simulation region defines most simulation parameters including the size,boundary conditions, mesh size, and simulation time.

The mesh override region is used to override the default mesh size in some part ofthe simulation region. Normally the meshing parameters are set based on the Meshaccuracy slider in the Simulation region setup. However, if some specific meshingconditions are required in part of the simulation region, a mesh override region can bespecified. For example, some simulations with metals are very sensitive to meshing, anda mesh override region may be required at the metal surface.

Note that only one simulation region per simulation is supported, but multiple meshoverride regions may be used.

TIP: Objects which lie outside the simulation region.Any simulation objects contained or partly contained within the simulation region areincluded in the simulation, while any objects which fall completely outside of the

106

Page 46: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Reference Guide44

© 2003 - 2009 Lumerical Solutions, Inc

simulation region are not included in the simulation. Those physical structures (andportions thereof) lying within the simulation region are included in the simulation (i.e. thesimulation is performed on that portion of the physical structure lying within thesimulation region). Physical monitors and sources are treated in a similar fashion, suchthat any portion of a monitor or source lying within a simulation region will be used. Theuser is warned when at least one source or monitor falls completely outside thesimulation region.

4.2.1 General tab

The options in the general tab depend on whether the item being edited is a simulationregion or a mesh refinement region.

Simulation regionThe simulation region contains two settings:· 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 thismaximum simulation time is exceeded. For more information about how to choose thesimulation time see set the simulation region section of the introduction in the GettingStarted guide.

Mesh override region For the mesh override region the general tab includes options to override the mesh indifferent directions, and enter the desired maximum mesh spacing. Alternatively, sincethe mesh spacing is usually determined by the refractive index of the materials in thesimulation, it is possible to set an EQUIVALENT INDEX that will be used to determine themesh spacing. A higher index will lead to a finer mesh.

4.2.2 Geometry tab

The geometry tab contains options to change the size and location of the simulation ormesh refinement region.

4.2.3 Mesh settings tab

The mesh settings tab includes settings which control the mesh geometry and thediscretization of time. There are three different types of meshes. The options for each aredescribed in more detail below. Then, the time step options are discussed.

Auto non-uniformThe default setting. A non-uniform mesh is automatically generated based on the meshaccuracy slider bar and the material properties. Areas with a high index will have asmaller mesh step size.

The MESH ACCURACY parameter is an integer from 1-8, where 1 is low accuracy, and 8

Page 47: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Simulation objects 45

© 2003 - 2009 Lumerical Solutions, Inc

is high accuracy. It is strongly recommended that you start with a low accuracy setting soyour simulation is fast. Once the simulation is setup properly, you should perform someconvergence testing with different mesh sizes to ensure your result is converged.

Custom non-uniformThis setting allows the user to fully customize how the non-uniform mesh is generated. Ifsetting 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. Forexample, 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).

UniformA uniform mesh is applied to the entire simulation volume, regardless of any materialproperties.

Time Step Options

· DT STABILITY FACTOR: A setting which determines the size of the time step usedduring the simulation, defined as a fraction of the Courant numerical stability limit. Alarger number will result in faster simulation times, and a smaller number will result inslower simulation times. The Courant stability condition requires that this setting mustbe less than 1 for the FDTD algorithm to remain numerically stable.

· DT: The time step of the FDTD simulation. This is determined by the values of thespatial grid to ensure numerical stability and cannot be directly set by the user.

4.2.4 Boundary conditions tab

The boundary conditions that are supported by FDTD Solutions are listed below with animage showing how that particular boundary condition is drawn in the CAD window.

PMLMany simulations employ absorbing boundary conditions that allow radiation to propagateout of the computational area without interfering with the fields inside. Perfectly matchedlayer (PML)3 boundaries absorb electromagnetic energy incident upon them. PML is mosteffective when absorbing radiation at normal incidence; it can have significant reflection atgrazing incidence. Increasing the PML thickness (number of layers) will reducereflections, but increase the simulation time and memory requirements.

MetalMetal boundary conditions are used to specify boundaries which are perfectly reflecting,allowing no energy to escape the simulation volume along that boundary.

Page 48: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Reference Guide46

© 2003 - 2009 Lumerical Solutions, Inc

PeriodicPeriodic BC should be used when both the structures and EM fields are periodic. Periodicboundary conditions can be used in one or more directions (i.e. only in the x direction) tosimulate a structure which is periodic in one direction but not necessarily other directions.

BlochBloch BC should be used when the structures are periodic, and the EM fields periodic,except for a phase shift between each period. Bloch boundary conditions are usedpredominantly 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 agiven simulation.

· Calculating the bandstructure of a periodic object – in this situation, a broadband pulseis injected via a dipole source into a periodic structure.

SymmetricSymmetric boundary conditions are used when the user is interested in a problem thatexhibits one or more planes of symmetry. Both the structure and source must besymmetric. Symmetric boundaries are mirrors for the electric field, and anti-mirrors forthe magnetic field. A visual explanation of a symmetric boundary condition is shown in thefigure below. Careful consideration must be given to whether symmetric or asymmetricboundary conditions are required, given the vector symmetry of the desired solution. Formeaningful results, the sources used must have the same symmetry as the boundaryconditions. Further information about symmetric and asymmetric boundary conditions canbe found in the online help in the section user guide - simulation - Choosing betweensymmetric and anti-symmetric BCs.

Page 49: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Simulation objects 47

© 2003 - 2009 Lumerical Solutions, Inc

AsymmetricAsymmetric boundary conditions are used when the user is interested in a problem thatexhibits one or more planes of symmetry. Asymmetric boundaries are anti-mirrors for theelectric field, and mirrors for the magnetic field.

3 J. P. Berenger, J. Comput. Phys. 114, 185 (1994).

Boundary condition tab options

· XMIN, XMAX, YMIN, YMAX, ZMIN, ZMAX BOUNDARIES: These fields describe theboundary conditions to be applied along the perimeter of the simulation region.Symmetric and asymmetric boundary conditions should be applied to the lowerboundary conditions.

· ALLOW SYMMETRY ON ALL BOUNDARIES: By default, symmetric andanti-symmetric conditions can only be used on the lower boundaries (x min, y min and zmin). This box allows you to also use symmetry and anti-symmetric conditions on theupper boundaries in order to simulate periodic structures that exhibit symmetry.

· SET BASED ON SOURCE ANGLE: Bloch boundary conditions are often used to injectplane 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 thanone 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 andkz:

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 forbandstructure calculations.

o SI: In SI units, kx,y,z are defined in units of m-1. This is generally more convenient for

injection of plane waves on angles.

Page 50: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Reference Guide48

© 2003 - 2009 Lumerical Solutions, Inc

· KX, KY, KZ: The wavevector setting in the x, y and z direction for the Bloch boundary inthe units specified above.

4.2.5 Advanced options tab

WARNING: This tab includes options which should only be changed if you are quitefamiliar with the FDTD technique.· USE MESH REFINEMENT: Mesh refinement can be used to average the material

properties near interfaces. Increasing the mesh parameter improves the accuracy fordielectric structures, but also increases the time required to mesh. Default value is off.The MESHING REFINEMENT parameter determines how accurately the physicalstructures are discretized near interfaces. Each cell within the grid is subdivided into asub-grid over which the average permittivity is determined. The number of sub-cellsalong each side of the cell is given by the meshing precision parameter. Increasing themesh parameter improves the accuracy for dielectric structures, but also increases thetime required to mesh. The default meshing precision value is 5 in 3D and 10 in 2D.

· FORCE SYMMETRIC X, Y, Z MESH: Will force a symmetric mesh about the x, y or zaxis. When this option is enabled, the meshing algorithm ONLY considers objects inthe positive half of the simulation region. The mesh in the negative half is simply acopy of the positive half mesh. All physical structures and mesh override regions in thenegative half will not be considered by the meshing algorithm. This option also forces amesh point at the center of the simulation region. Forcing a symmetric mesh ensuresthat the mesh does not change when going from a simulation with symmetry to asimulation without symmetry.

· ALWAYS USE COMPLEX FIELDS: This checkbox forces the algorithm to use complexfields during simulation. This will result in slower simulation times and increasedmemory requirements and should only be used when necessary. Without this, complexfields are only used when there are Bloch boundary conditions.

· USE EARLY SHUTOFF: Will automatically end the simulation when most of the energyhas left the simulation volume. o AUTO SHUTOFF MIN: The simulation will end when the total energy in the

simulation volume drops to this fraction of the maximum energy injected. Thesimulation data will automatically save.

· USE DIVERGENCE CHECKING: Will automatically end the simulation when the totalenergy in the simulation volume is this many times larger than maximum energyinjected. o AUTO SHUTOFF MAX: The simulation will end when the total energy in the

simulation volume rises to this many times the maximum energy injected. Thesimulation data will automatically save.

· DOWN SAMPLE TIME: Check the auto shutoff conditions every down sample timenumber of dT time steps

· PML KAPPA: The normalized imaginary electric and magnetic conductivity used in thePML boundaries.

· PML SIGMA: The maximum normalized electric and magnetic conductivity used in thePML boundaries.

· PML LAYERS: The number of cells which are used for PML boundary conditions.

Page 51: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Simulation objects 49

© 2003 - 2009 Lumerical Solutions, Inc

Increasing this number will reduce the back-reflection arising from the PML boundariesbut will also increase time and memory requirements for simulations. Defaults to asetting of 12.

· PML POLYNOMIAL: The polynomial power which determines how rapidly the electricand magnetic conductivity increases as radiation propagates at normal incidence intothe PML. The default setting of 3 denotes a cubic increase of electric and magneticconductivity with increasing depth into the PML.

· TYPE OF PML: The type of PML used can be STANDARD, STABILIZED or DEFAULTCHOICE. In some cases, STABILIZED PML provides more numerical stability,although the performance is slightly reduced.

· MAX SOURCE TIME SIGNAL LENGTH: This is the maximum length of data used bysources to store the “time” and “time_signal” properties of sources. If a large number ofsources 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 takenwith source normalization. In particular, in most cases, nonorm option should be used.

· SET DEFAULTS: Can be used to reset the settings back to their original defaultsettings.

4.3 Sources tabThe layout tab includes options to add the following sources:

Global source optionsThe global source options window is where the user can specify the frequency-domainparameters. These settings can be used by any of the frequency domain sources.

Point sourcesPoint sources are oscillating dipoles that act as sources in Maxwell's equation to produceelectromagnetic fields. Their position and direction are specified in terms of the centerposition (x, y, and z for 3D simulations) and their orientation through angles phi(measured in the x-y plane with respect to the x-axis) and theta (measured from thez-axis). They can be placed at one or more points anywhere in the simulation area.

For two-dimensional simulations, the behavior of point sources depends on whether youare performing a TE or a TM simulation. For a TE simulation, a magnetic dipole isoriented in the z-direction, while an electric dipole is oriented in the x-y plane by theANGLE argument, which specifies the angle measured with respect to the x-axis. For aTM simulation, an electric dipole is oriented in the z-direction, while a magnetic dipole isoriented in the x-y plane with the same ANGLE argument describing the direction of thedipole vector.

Page 52: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Reference Guide50

© 2003 - 2009 Lumerical Solutions, Inc

Gaussian and thin lens sourcesA Gaussian source defines a beam of electromagnetic radiation propagating in a specificdirection, with the amplitude defined by a Gaussian cross-section of a given width. Bydefault, the Gaussian sources use a scalar beam approximation for the electric fieldwhich is valid as long as the waist beam diameter is much larger than the diffraction limit. The scalar approximation assumes that the the fields in the direction of propagation arezero. For highly focused beam, FDTD Solutions provides a thin lens source which willinject a fully vectorial beam. The cross section of this beam will be a Gaussian if the lensis not filled, and will be a sinc function if the lens is filled. In each case, the beams areinjected along a line perpendicular to the propagation direction, and are clipped at theedges of the source.

Note: References for the thin lens sourceThe field profiles generated by the thin lens source are described in the followingreferences. For uniform illumination (filled lens), the field distribution is precisely thesame as in the papers. For non-uniform illumination at very high NA, there are somesubtle differences. This is due to a slightly different interpretation of whether theincident beam is a gaussian in real space or in k-space. This difference is rarely of anypractical importance because other factors such as the non-ideal lens propertiesbecome important at these very high NA systems.

M. Mansuripur, "Distribution of light at and near the focus of high-numerical-apertureobjectives," 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-apertureobjectives: erratum, Certain computational aspects of vector diffraction problems:erratum" J. Opt. Soc. Am. A 10, 382-383 (1993).

Plane wave sourcesPlane wave sources are used to inject laterally-uniform electromagnetic energy along oneside of the source region. In two-dimensional simulations, the plane wave source injectsalong a line, while in three-dimensional simulations the plane wave source injects along aplane. It is possible to inject a plane wave at an angle. The plane wave source is actuallythe same object as the gaussian source. The only difference is the SOURCE SHAPEsetting.

Total-field scattered-field sources Total-field scattered-field sources are used to separate the computation region into twodistinct regions – one contains the total field (i.e. the sum of the incident field and thescattered field) while the second region contains only the scattered field. The incident fieldis a plane wave with a wavevector normal to injection surface. This source type is

Page 53: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Simulation objects 51

© 2003 - 2009 Lumerical Solutions, Inc

particularly useful to study the scattering behavior of objects, as the scattered field can beisolated from the incident field.

In 2D, the TFSF source injects along one edge of a rectangle as specified by the user.The other three boundaries subtract the incident field (allowing for the wave propagation).Everything inside the TFSF boundary is total field (i.e. incident + scattered field), whileeverything outside is only scattered field. In the absence of any objects, the wavepropagates within the TFSF region and is subtracted out at the other end; this of courseresults in no scattered field. However, if one places an object in the path of the TFSFwave, this introduces scattered fields that then propagate outside the total field area.Consequently, one can then measure the total or scattered transmission, by placingmonitors inside or the total field region, respectively. Currently, only normal incidenceplane waves are supported as the incident field.

TIP: Using TFSF sourcesTFSF sources can be used when:· the source can completely surround the scattering objects in a homogeneous

material (including materials with complex index).· the scattering object is on or in a multilayer slab that is illuminated from above.Certain boundaries of the TFSF can be dragged outside the simulation areaboundaries, for example, when symmetric or anti-symmetric boundary conditions areused in the simulation. For advanced use of TFSF sources, please consult anapplication example or technical support at [email protected].

Note:Some care is needed when using the TFSF source. The concept of total/scattered fieldis complex and can lead to misinterpretation of results, particularly with regards toenergy conservation.

Mode sourcesThe mode source is used to inject a guided mode into the simulation region. The extent ofthe region defining the mode source (i.e. center location, and span) is that used in thecomputation of the guided modes for the structure. In three-dimensional simulations, themode source defines a plane across which the guided modes are computed, while intwo-dimensions the mode source defined a line across which the guided modes arecomputed. From the computed guided modes, a single mode is selected for injection intothe FDTD simulation region. For additional details on the operation of the mode solver,consult the integrated mode solver section .

Imported sourcesThe imported source allows the user to input field profile data as a radiation source withinthe three-dimensional FDTD Solutions design environment. Currently, ASAP sources

67

Page 54: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Reference Guide52

© 2003 - 2009 Lumerical Solutions, Inc

(produced with Breault Research Organization’s ASAP ray-tracing design environment)can be used as an imported source.

Imported sources are only available in 3D simulations.

4.3.1 General tab

The information located on the general tab depends on the type of monitor chosen. Thesettings in these tabs are outlined below.

Dipole sources

· DIPOLE TYPE: A pull-down menu in which the point source can be configured as anelectric dipole or a magnetic dipole.

· AMPLITUDE: The amplitude of the point source. The units of the source depend on thedipole type, as explained in the Units and normalization section.

· BASE AMPLITUDE: This is the amplitude that will generate a radiated CW power of 10nW/m in 2D simulations and 1 fW in 3D simulations.

· TOTAL AMPLITUDE: This is the amplitude actually used in the simulations, it is theproduct of the AMPLITUDE and the BASE AMPLITUDE.

· PHASE: The phase of the point source, measured in units of degrees. Only useful forsetting relative phase delays between multiple radiation sources.

· THETA: 3D simulations only. The angle with respect to the z axis of the dipole vector· PHI: 3D simulations only. Angle with respect to positive x axis of the dipole vector.· POLARIZATION: 2D simulations only. The polarization of the simulation to be

performed. The user has the option of either a TE simulation in which the electric fieldlies within the plane of the drawing palette, or a TM simulation in which the magneticfield lies within the plane of the simulation region.

Gaussian, plane wave and TFSF sources(Some of the options below are not available for the TFSF source) · SOURCE SHAPE: The shape of the beam. This setting defaults to Gaussian, but for

convenience can be changed to that of a Cauchy/Lorentzian, or a plane wave. · AMPLITUDE: The amplitude of the source as explained in the Units and normalization

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. · DIRECTION: This field specifies the direction in which the radiation propagates.

FORWARD corresponds to propagation in the positive direction, while BACKWARDcorresponds to propagation in the negative direction.

· ANGLE: 2D simulations only. The angle of propagation, in degrees, with respect to theinjection axis defined above. The angle must be between -89.9 and 89.9 degrees.

· POLARIZATION: 2D simulations only. The polarization of the simulation to beperformed. The user has the option of either a TE simulation in which the electric fieldlies within the plane of the drawing palette, or a TM simulation in which the magneticfield lies within the plane of the simulation region.

20

20

Page 55: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Simulation objects 53

© 2003 - 2009 Lumerical Solutions, Inc

· ANGLE THETA: 3D simulations only. The angle of propagation, measured in degrees,with respect to the injection axis defined below.

· ANGLE PHI: 3D simulations only. The angle of propagation, in degrees, rotated aboutthe injection axis in a right-hand context.

· POLARIZATION ANGLE: 3D simulations only. The polarization angle defines theorientation of the injected electric field, and is measured with respect to the planeformed by the direction of propagation and the normal to the injection plane. Apolarization angle of zero degrees defines P-polarized radiation, regardless of directionof propagation while a polarization angle of 90 degrees defines S-polarized radiation.

· THETA VS WAVELENGTH PLOT: This plot shows the actual injection angle theta foreach source wavelength as used in the simulation.

Mode and imported sources

· 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 BACKWARDcorresponds to propagation in the negative direction.

· AMPLITUDE: The amplitude of the mode source as explained in the Units andnormalization section.

· SELECT MODE: Mode source only. Launches the mode solver and allows the user toselect the desired mode for injection. For more information on using the mode source,consult the integrated mode solver section of the reference guide.

· CLEAR SOURCE DATA: Clears the selected mode for mode sources, or clears theimported data for imported sources

· PLOT: This menu allows you to choose which component of the field profile you wouldlike to plot.

· PLOT CURRENT MODE/FIELD: This button will plot the field profile selected in thePLOT pull down menu for the currently selected mode.

· PLOT IN NEW WINDOW: This is the same as PLOT CURRENT MODE/FIELD butopens a new window for the graphics that stays open even after property edit window isclosed.

Also for imported sources the following Imported source settings are available· X0, Y0, Z0: Displays the location in the imported source where the field was recorded. · IMPORTED INDEX: The refractive index of the background medium where the

imported field was recorded. · IMPORTED POWER: The power of the source recorded in imported. · IMPORTED WAVELENGTH: The wavelength of the imported source data. · IMPORT SOURCE: load an interface file (*.fld).

4.3.2 Geometry tab

The geometry tab contains options to change the size and location of the sources.

20

67

Page 56: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Reference Guide54

© 2003 - 2009 Lumerical Solutions, Inc

4.3.3 Frequency/Wavelength tab

The Frequency/Wavelength tab is shown below. This tab can be accessed through theindividual source properties, or the global source properties. Note that the plots on theright-hand side of the window update as the parameters are updated, so that you caneasily observe the wavelength (top figure), frequency (middle figure) and temporal(bottom figure) content of the source settings.

At the top of the tab, it is possible to chose to either SET FREQUENCY / WAVELENGTHor SET TIME-DOMAIN. If you choose to set the frequency or wavelength ranges to defineyour sources, then FDTD Solutions tries to find the optimum time domain settings that willcover the desired frequency/wavelength range without compromising accuracy. If youchoose to directly modify the time domain settings, please keep the following tips inmind:

· Pulse durations: Choose a pulse duration that can accurately span your frequency orwavelength range of interest. However, keep in mind that very short pulses containmany frequency components and therefore disperse quickly. As a result, short pulsesrequire more points per wavelength for accurate simulation.

· Pulse offset: This parameter defines the temporal separation between the start of thesimulation and the center of the input pulse. To ensure that the input pulse is nottruncated, the pulse offset should be at least 2 times the pulse duration. This willensure that the frequency distribution around the center frequency of the source isclose to symmetrical, and the initial fields are close to zero at the beginning of thesimulation.

· Source type: In general, you can choose between ‘standard’ and ‘broadband’ source

Page 57: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Simulation objects 55

© 2003 - 2009 Lumerical Solutions, Inc

types. Standard sources consist of a Gaussian pulse at a fixed optical carrier, while thebroadband sources consist of a Gaussian pulse with an optical carrier which variesacross the pulse envelope. Broadband sources can be used to perform simulations inwhich wideband frequency data is required – for instance, from 200 to 1000 THz. Thistype of frequency range cannot be accurately simulated using the standard sourcetype.

Set frequency wavelengthIf the SET FREQUENCY / WAVELENGTH option was chosen, this section makes itpossible to either set the frequency or the wavelength and choose to either set the centerand span or the minimum and maximum frequencies of the source.

Set time domainThe 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 afixed frequency and a Gaussian envelope. The broadband source, which contains amuch 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 "userinput".

· 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 whichreaches its peak amplitude N seconds after the start of the simulation.

· BANDWIDTH: The FWHM frequency width of the time-domain pulse.

Advanced

· ELIMINATE DISCONTINUITY: Ensures the function has a continuous derivative(smooth transitions from/to zero) at the start and end of a user defined source timesignal. By default, this option is enabled.

4.3.4 Beam options tab

This tab is only available for Gaussian sources. In the general tab, set the source shapeoption to the desired shape (Gaussian, plane wave or Cauchy/Lorentzian) before enteringdata in the beam options tab because the beam options that are available will changedepending on the source shape.

Beam options for all source shapes

· CURRENT INDEX: This field shows the refractive index at the x,y (and z) position ofthe beam.

· BEAM PROFILE, PLOT: This menu allows you to choose which component of the fieldprofile you would like to plot.

· SHOW/REFRESH: This button will update the current plot and the current index. The

Page 58: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Reference Guide56

© 2003 - 2009 Lumerical Solutions, Inc

plot is not automatically updated because the thin lens calculations can be long. · PLOT IN NEW WINDOW: This is the same as SHOW/REFRESH but opens a new

window for the graphics that will persist after you close the property edit window.

Beam options for Gaussian and Cauchy/Lorentizian sources USE SCALAR APPROXIMATION / USE THIN LENS: These checkboxes allow the userto choose whether to use the scalar approximation for the electric field or the thin lenscalculation. Gaussian sources can be defined using either the scalar approximation orthin lens calculation, whereas Cauchy/Lorentzian sources can only be defined using thescalar approximation.

Scalar approximationBEAM PARAMETERS: This menu is used to choose to define the scalar beam by theWAIST SIZE AND POSITION or the BEAM SIZE AND DIVERGENCE ANGLE. If WAIST SIZE AND POSITION is chosen, the options are: · WAIST RADIUS: 1/e field (1/e2 power) radius of the beam for a Gaussian beam, or a

half-width half-maximum (HWHM) for the Cauchy/Lorentzian beam. · DISTANCE FROM WAIST: The distance, d, as shown in the figure below. A positive

distance corresponds to a diverging beam, and a negative sign corresponds to aconverging 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 anegative angle corresponds to a converging beam.

Thin Lens

· NA: This is nsin(a) where n is the refractive index of the medium in which the source isfound and a is the half angle as shown in the figure below. Please note that the indexwill not be correctly defined in dispersive media and lenses should only be used innon-dispersive media. The refractive index for the source is determined at X, Y (andZ).

· DISTANCE FROM FOCUS: The distance d from focus as shown in the figure below. Anegative distance indicates a converging beam and a positive distance indicates adiverging beam.

· FILL LENS: Checking this box indicates that the lens is illuminated with a plane wavewhich is clipped at the lens edge. If FILL LENS is checked, then it is possible to set thediameter of the thin lens (LENS DIAMETER) and the beam diameter prior to strikingthe lens (BEAM DIAMETER), as shown in the figure below. A beam diameter muchlarger than the lens diameter is equivalent to a filled lens.

· NUMBER OF PLANE WAVES: This is the number of plane waves used to constructthe beam. The beam profile is more accurate as this number increases but thecalculation takes longer. The default value in 2D is 1000.

Page 59: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Simulation objects 57

© 2003 - 2009 Lumerical Solutions, Inc

The figure below shows the beam parameter definitions for the scalar approximationbeam.

The figure below shows the beam parameter definitions for the thin lens, fully-vectorialbeam.

TIP: Setting Gaussian source parametersGaussian spot size: The beam spot sizecan be set independently of the sourcespan. The source span should be chosento be larger than the beam spot size. Ifthere is significant intensity at the edges ofthe source, as shown in this figure, thebeam will scatter on injection. If the spot size is larger than the simulationregion, the beam profile will be truncatedat the simulation boundary.

4.3.5 Advanced tab

This tab only appears for the dipole source. The tab contains a RECORD LOCAL FIELDcheckbox. When checked, the fields around the dipole are saved; this box must bechecked in order to use the dipolepower script function.

Page 60: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Reference Guide58

© 2003 - 2009 Lumerical Solutions, Inc

4.4 Monitors tabThe layout tab includes options to add the following monitors:

Global Monitor PropertiesThe global monitor options window is where the user can specify the range and resolutionwith which to measure frequency-domain information. These settings can be used by anyof the frequency domain monitors.

Index MonitorsIndex monitors records the n and k value as a function of frequency/wavelength in asimulation. Index monitors are only available in two or three dimensions; there is nooption for linear or point index monitors. In the future, the index monitor will be able tocapture the time-evolution of the physical properties profile for nonlinear media.

Time-domain monitorsTime-domain monitors provide time-domain information for field components over thecourse of the simulation. Time-domain monitors can consist of point, line, or areamonitors to capture this information over different spatial extents within the FDTDsimulation region. For the purposes of extracting line widths of resonant structuresthrough Fourier analysis, point time monitors with a down sample time of 1 are sufficient.

TIP: Using time monitorsCheck the memory requirements when using 1D, 2D or 3D time monitors, since theywill generate large amounts of data. Consider using the temporal or spatialdownsampling options.

Movie monitorsMovie monitors capture a desired field component over the region spanned by the moviemonitor for the duration of the simulation. Movie monitors are only available in the twodimensional variety. The resultant movies are saved with the same name as the monitorin the current working directory.

TIP: CW MoviesIt is possible to create a CW movie from profile or power monitor data. For moreinformation, see the online help at http://www.lumerical.com/fdtd_online_help/ and go tothe User Guide - Data Analysis section.

Note: Movie monitors are ignored when running parallel simulations. When running a simulation in parallel, all movie monitors will be ignored. Constructing

Page 61: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Simulation objects 59

© 2003 - 2009 Lumerical Solutions, Inc

the movies from multiple processes running on different computers would add extracommunication and computation overhead, as well as be difficult to implement. Thereis no workaround, except to run the simulation as a single process. This is generally nota problem, since movie monitors are most useful for qualitative understanding only,where a low resolution simulation is sufficient.

Frequency-domain profile monitorsFrequency-domain profile monitors provide a means to collect field profile and data in thefrequency domain from simulation data across some spatial region within the simulation. Individual field components, poynting vector, and power flow can be collected as afunction of frequency and position.

These monitors are ideally used to collect field profile data for visualization andcustomized analysis. Profile monitors will record field profiles exactly where they arepositioned. If highly accurate power measurements are required, power monitors shouldbe used, rather than profile monitors.

Tip: Using frequency monitors Beware that frequency-domain field-profile monitors are computationally-intensive andthey can increase the simulation time considerably. When possible, try to use 1D or 2Drather than than 3D monitors; if it is necessary to use the latter, try to restrict thenumber of frequency points. We suggest experimenting with the spatial downsamplevalue(s) before doing long simulations and watch how long your simulation takes. If youare only interested in the power flux, you can select only OUTPUT POWER in the Datato record tab.

Frequency-domain power monitorsFrequency-domain power monitors provide a means to collect high-accuracy power flowinformation in the frequency domain from simulation data across some spatial regionwithin the simulation. These monitors are identical to Frequency-domain profile monitorsexcept that they automatically snap to the nearest FDTD mesh cell boundary when thesimulation runs due to a different default setting of the SPATIAL INTERPOLATIONproperty in the advanced option. This is important when accurate power flow calculationsare required. Less interpolation is required in this case, which results in slightly moreaccurate power measurements. Unfortunately, this means that the exact position wherethe data is recorded will change whenever the mesh changes. If it is more important tomeasure the field at a particular position, profile monitors should be used.

The precise location of where the monitor measures data during the simulation isrecorded with the monitor data in the x, y and z vectors.

Tip: When to use profile and power monitors

Page 62: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Reference Guide60

© 2003 - 2009 Lumerical Solutions, Inc

Profile monitors: when it is most important to measure the fields at a very specific pointin space.Power monitors: when it is most important to get the most accurate powermeasurements.

TIP: Switching between power monitor and profile monitorYou can switch between frequency-domain power monitors and frequency-domainprofile monitors by changing the SPATIAL INTERPOLATION setting in the AdvancedOptions tab. When the SPATIAL INTERPOLATION is set to NEAREST MESH CELL orNONE, the monitor becomes a frequency-domain power monitor.

Analysis groupsAnalysis groups are used to group, setup monitor groups and/or process monitor data.The group object has a section that can contain code to set up the monitors, as well as asection that can contain code to process monitor data once a simulation has been run(this is why they are called analysis groups and not monitor groups). It is possible tocreate groups of groups.

4.4.1 Frequency Power/Profile tab

This tab only appears for the global monitor settings, but includes the same options asthe 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 linearlyspaced points with respect to wavelength.

· USE SOURCE LIMITS: When checked these monitors use the source limits. Whenunchecked, the frequencies/wavelengths at which to record data can be set using thepull down menus and boxes below them.

· FREQUENCY POINTS: Set to choose the number of frequency points at which torecord data.

4.4.2 Frequency Power/Profile Advanced tab

This tab only appears for the global monitor settings. It contains advanced global settingsfor frequency-domain monitors. Only the MIN SAMPLING PER CYCLE can be modifiedby 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.

· DESIRED SAMPLING: This converts the minimum points per optical cycle into anactual sampling rate in Hz.

· NYQUIST LIMIT: The Nyquist sampling limit is calculated based on the maximumfrequencies that may be present in the simulation volume.

· ACTUAL SAMPLING: The actual sampling rate is the rate that will actually be used for

Page 63: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Simulation objects 61

© 2003 - 2009 Lumerical Solutions, Inc

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.

4.4.3 General tab

The information located on the general tab depends on the type of monitor chosen. Thereare 3 different possibilities. The settings in these tabs are outlined below.

Movie monitor

· 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 themovie, while a scale factor too large will result in very faint radiation patterns. Thisparameter 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 itsmaximum 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 resultin a perfectly scaled movie.

· DRAW STRUCTURE OUTLINE: A toggle which allows the user to superimpose anoutline of the refractive index profile on top of the movie. This can be used to aid invisualization of where the radiation is located within the dielectric structure.

· TM, TE FIELD COMPONENT: 2D simulations. The field component to be captured inthe 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 TMfield component is captured to the movie, whereas if a TE simulation is beingperformed, the TE field component is captured. Can also be ELECTRIC FIELDINTENSITY (|E|2) or MAGNETIC FIELD INTENSITY (|H|2).

· FIELD COMPONENT: 3D simulations. The field component to be captured in themovie. Can also be ELECTRIC FIELD INTENSITY (|E|2) or MAGNETIC FIELDINTENSITY (|H|2).

Time-domain monitorThe general tab for the time domain monitor includes options to edit the amount of data,and time period over which data is collected.

Index, frequency domain profile and frequency domain power monitors

· OVERRIDE GLOBAL MONITOR SETTINGS: A toggle to override the global monitorsettings. If checked, the user can specify the frequency range and number of points atwhich frequency-domain information will be recorded (using the options describedbelow). If unchecked the options below are set from the global monitor settings.

· USE LINEAR WAVELENGTH SPACING: By default, data is recorded at linearlyspaced points with respect to frequency. Selecting this option spaces data at linearlyspaced points with respect to wavelength.

· USE SOURCE LIMITS: When checked these monitors use the source limits. When

Page 64: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Reference Guide62

© 2003 - 2009 Lumerical Solutions, Inc

unchecked, the frequencies/wavelengths at which to record data can be set using thepull down menus and boxes below them.

· FREQUENCY POINTS: Set to choose the number of frequency points at which torecord data.

4.4.4 Data to record tab

· STANDARD FOURIER TRANSFORM: The monitor outputs data at specificfrequencies.

· PARTIAL SPECTRAL AVERAGE:The monitor outputs the partial spectral averagepower through a monitor surface, normalized to the partial spectral average of thesource.

· TOTAL SPECTRAL AVERAGE:The monitor outputs the total spectral average powerthrough 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 canselect 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 tofacilitate easy change between TE and TM simulations.

· OUTPUT POWER: For surface monitors (3D) and line monitors (2D) only. You cancalculate the integrated power over the monitor surface. This requires much lessmemory after the simulation is completed and is particularly suitable for large parallelsimulations where only the integrated power across a surface is required.

4.4.5 Geometry tab

The geometry tab contains options to change the size and location of the monitors.

The DOWNSAMPLE X, Y, Z option is used to set the spatial averaging performed on thedata. A down sample value of N corresponds to averaging over N grid points. Setting thedown sample value to 1 gives the most detailed spatial information (i.e. information ateach grid point).

4.4.6 Spectral averaging and apodization tab

· PARTIAL SPECTRAL AVERAGING, DELTA: FWHM of the Lorentzian weightingfunction.

· APODIZATION: Specifies the window function of the apodization. Options includenone, start (i.e. beginning of time signature apodized), end (i.e. end of time signatureapodized, 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 accuratepower measurements.

· APODIZATION CENTER, TIME WIDTH, FREQ WIDTH: See the diagram below for thedefinition of these terms. The FREQ WIDTH corresponds to the effective bandwidth ofthe full apodization window, as described under APODIZATION.

Note: Apodization functions

Page 65: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Simulation objects 63

© 2003 - 2009 Lumerical Solutions, Inc

‘Full’ apodization involves windowing the time-domain data on both the start and endside. The resulting “windowed” data is then processed to produce frequency-domaininformation. ‘Start’ apodization involves windowing the front side of the time-domain data. This canbe 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 usefulfor ramping down the time-domain signal in devices where the radiation lives a longtime, like cavities.

4.4.7 Advanced tab

Time-domain monitors

· SPATIAL INTERPOLATION: In FDTD generally, the electromagnetic field componentsare not recorded at the same point in space. Instead each component of the vectorialelectric and magnetic fields are recorded at different locations in the Yee cell. In orderto properly calculate the Poynting vector and electromagnetic energy density, the fieldsare interpolated to the same location in the Yee cell. This setting controls how the fieldsare interpolated. Currently, the supported options for time monitors are NEARESTMESH CELL and NONE. With NEAREST MESH CELL, the fields are interpolated tothe nearest FDTD mesh cell boundary. With NONE, no interpolation is performed andeach electromagnetic field component is recorded at a different position within the Yeecell.

· MIN SAMPLING PER CYCLE: This parameter determines the minimum amount ofsampling 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.

Frequency domain profile and power monitors

· SPATIAL INTERPOLATION: This option is as described above for time domainmonitors

· OVERRIDE ADVANCED GLOBAL MONITOR SETTINGS: When this option is selectedMIN SAMPLING PER CYCLE can be set. The other options cannot be altered, they arethere to display settings. For further details, see the descriptions in FrequencyPower/Profile Advanced tab .

Movie monitors

· MIN SAMPLING PER CYCLE: This parameter determines the desired amount of

60

Page 66: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Reference Guide64

© 2003 - 2009 Lumerical Solutions, Inc

sampling per optical cycle. · SAMPLING RATE: This converts the minimum points per optical cycle into an actual

sampling rate in Hz. · DOWN SAMPLE TIME: This is the time step downsampling. · FRAME RATE: The speed at which frames are displayed on the screen, in units of

frames per second. The default is 30.

Index monitors:

· SPATIAL INTERPOLATION: There are three options for index monitors. The defaultoption, SPECIFIED POSITION returns the index that that the field sees at the locationwhere the monitor is placed. The next two options. NEAREST MESH CELL and NONEare as described for time-domain monitors. In simulations with mesh refinement turnedon, the default option does not show the averaging of the indices, but the other optionsdo.

4.4.8 Setup tab

The setup tab is only available for analysis groups. The setup tab contains two furthertabs: the variables tab, and the script tab. The variables tab is identical to the propertiestab for structure groups and the script tab is identical to the script tab for structuregroups.

For more information and examples, see the Analysis groups page of the User Guidesection of the Online Help.

4.4.9 Analysis tab

The analysis tab is only available for analysis groups. The analysis tab contains twofurther tabs, the variables and the script tab. The variables tab is used to define the inputand output parameters of the script, and the script command contains script that can beused to process the monitor data.

Variables tab

· PARAMETERS: These are input parameters to the analysis script. · RESULTS: The output parameters are defined here. The analysis script must calculate

these quantities. Once the analysis script has been run, the results become monitordata, that can be accessed using script commands in the same manner that monitordata is accessed for simple monitors.

Script tabThe script has access to the input parameters defined in the variables tab, and can getdata from any of the monitors located in the group. However, it cannot get data frommonitors or sources not located inside that group. The script in the analysis groups doesnot use the global variable space from the script prompt and script file editor. The resultsfrom the script can be obtained in the script prompt by setting up output parameters in thevariables tab.

42 43

Page 67: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Simulation objects 65

© 2003 - 2009 Lumerical Solutions, Inc

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 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 <scriptcomplete>. 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 savesthe results. This button can only be pressed when the simulation is in analysis mode.

· SAVE ANALYSIS: Pressing this button saves changed made to the analysis script(even when in analysis mode).

For more information and examples, see the Analysis groups page of the User Guidesection of the Online Help.

4.5 Equation interpreterThe fields for numeric parameters can be used as a simple calculator. For instance, if youwish to set a value to the square root of 3 divided by e, just enter sqrt(3)/exp(1) into thefield. The expression will be automatically evaluated when you press Enter or click on adifferent field. Equations which become undefined (i.e. 1/0) should be avoided.

The following two tables provide a list of available operators and constants.

Operator category Syntax

Algebraic +, -, *, /

Trigonometric sin(), cos(), tan()

Inverse trigonometric asin(), acos(), atan(), atan2()

Hyperbolic trigonometric sinh(), cosh(), tanh()

Power ^ or **

Exponential exp()

Logarithmic (base 10, natural) log10(), log()

Square root sqrt()

Absolute abs()

Mod mod()

Variable or predefinedconstant

Description Units

106

Page 68: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Reference Guide66

© 2003 - 2009 Lumerical Solutions, Inc

c The speed of light in avacuum

m/s

pi The variable p none

Examples

· 2^10· sqrt(3)/exp(1)· sin(45*pi/180)

Index profile for <Object defined dielectric>An additional set of variables are available when specifying the index profile of the<Object defined dielectric> material definition. They are described in the following table.

Variable or predefinedconstant

Description Units

x, y, z Position variables as defined by user

f The simulation centerfrequency f = (fmin+fmax)/2

Hz

w The simulation centerangular frequencyw = 2*pi*f

Hz

l0 The free space wavelengthl0 = c/f

Length units as defined byuser

k0 The free spacewavenumberk0 = 2*pi/I0

The inverse of the lengthunits defined by the user

Examples

· sin(x)^2 · exp(-x^2-y^2)· f/1e14

Page 69: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Integrated mode solver 67

© 2003 - 2009 Lumerical Solutions, Inc

5 Integrated mode solver

This section describes the operation of the integrated mode solver to inject guided wavesinto FDTD simulations. The mode solver itself uses the same discretization mesh as theFDTD algorithm, so the profile of the guided modes as computed with the mode solvernaturally interface with the underlying FDTD mesh. Overall, this facilitates the injection ofguided modes with minimal back-reflection.

This section describes the operation of the mode solver once the physical structure andthe simulation region defining the structure of interest have been defined within the layouteditor. The mode source is launched by pressing the SELECT MODE button within themode source edit window. Following this, the mode source window appears with differenttabs. The following sections detail each tab within the mode solver window, and theinformation which it contains.

Also see the MODE source description in the Simulation objects chapter.

5.1 Mode analysisThe MODE ANALYSIS window is shown in the screenshot below. The upper left-handportion of the window contains the MODE PARAMETERS section, where the modenumber, effective index, propagation loss, and polarization (percentage of the modepolarized TE; not valid for 3D simulations) are shown. The lower left-hand corner showsthe CALCULATION, ANALYSIS AND SELECTION OPTIONS; upon launch, the lowerleft-hand portion of the window shows the default calculation parameters to be used tosimulate the structure. The right-hand portion of the window contains the PLOT AREAwhere the simulation data is plotted, and the two drop-down boxes at the top of the plotarea are used to specify which data to plot in the plot window, while the region at thebottom right can be used to modify the current mode plot options. Upon launch, the plotarea shows the refractive index profile of the structure being analyzed.

49

Page 70: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Reference Guide68

© 2003 - 2009 Lumerical Solutions, Inc

Mode ParametersThe mode parameters portion of the window displays simulation data relevant to thedifferent modes calculated for the structure of interest. This portion of the window showsthe modes, arranged from top to bottom in terms of the highest effective index andnumbered sequentially. For each mode, this portion of the window shows the effectiveindex of the mode, the calculated loss (measured in dB per millimeter of propagation; onlyvalid for lossy materials), and the TE or TM fraction corresponding to the definition of TEand TM in 2D FDTD. For 3D simulations, the TE or TM fraction is not displayed.

See the following sections for more information about the analysis and plot sections.

5.1.1 Plot and analysis options

The different plot and analysis options are shown in the partial screenshot below.Available options include: · Set Calculation Parameters · View Current Parameters · Select Mode for Injection

Page 71: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Integrated mode solver 69

© 2003 - 2009 Lumerical Solutions, Inc

Set Calculation ParametersWith the option pull-down box set to SET CALCULATION PARAMETERS, the lowerleft-hand portion of the window displays the calculation parameters. A portion of thescreenshot which shows the calculation parameters is shown below. The parametersare: · 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 NEAR N: Allows you to look for modes near a desired effective index. o USE MAX INDEX: Search for modes near the maximum index found in the meshed

cross section. o N: Choose the effective index to search for.

· SEARCH IN RANGE: Allows you to search for modes in a desired range of indices. o N1, N2: Define the range of indices to search over.

· BENT WAVEGUIDE: Allows the user to specify a current radius of curvature for themode and solver for the modes of a bent waveguide. o BEND RADIUS: the bend radius of the waveguide o BEND ORIENTATION: the orientation of the radius of curvature. For example, for

propagation in the z direction, a bend orientation of 0 means that the waveguide is

Page 72: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Reference Guide70

© 2003 - 2009 Lumerical Solutions, Inc

bent in the x-z plane. A bend orientation of 90 means that the waveguide is bent inthe y-z plane.

· CALCULATE MODE: by clicking this button the mode solver will start the calculation forthe waveguide modes given the criteria above.

Note: Any desired changes to the boundary conditions must be done by editing the simulationregion via the layout editor.

View current parametersWith the option pull-down box set to VIEW CURRENT PARAMETERS, the lowerleft-hand portion of the window displays the current simulation parameters correspondingto the modes that have been calculated. A portion of the screenshot which shows thecurrent parameters is shown below. The parameters are the same as for the SETCURRENT PARAMETERS with the exception of: · CURRENT NUMBER OF MODES: the number of modes that have actually been

calculated · X, Y BOUNDARY MIN, MAX: the boundary conditions used on the x and y boundaries

Select Mode for InjectionWith the option pull-down box set to SELECT MODE FOR INJECTION, the lowerleft-hand portion of the window contains a button labeled SELECT MODE FOR FDTDSOURCE. Pressing this button will initialize the mode source with the current modeselected within the mode table in the upper left-hand portion of the window.

5.1.2 Plot area

The plot area portion of the window is where the simulation data is plotted, and where theend user specified which simulation data to plot. The plot area consists of · Plot control pull-down boxes· Figure window· Mode plot options

Plot control boxesThe plot control portion of the plot area of the window is where the user specifies whatsimulation data should be plotted within the plot area. The content to plot is specified bytwo pull-down boxes: · PLOT: This pull-down allows the user to specify what general class of data to plot.

Available options include: o MODAL FIELDS: allows the user to select various field quantities such as electric

and magnetic field amplitudes and intensities and Poynting vectors using theCOMPONENT pull-down

o MATERIAL PROPERTIES: allows the user to select various physical quantities suchas refractive index, permittivity, and conductivity using the COMPONENT pull-down

· COMPONENT: This pull-down allows the user to specify which specific component is tobe plotted within the plot area. The available options depend on the setting of the PLOT

Page 73: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Integrated mode solver 71

© 2003 - 2009 Lumerical Solutions, Inc

pull-down.

Figure windowThe plot itself where the data appears is automatically labeled and scaled to fit thesimulation data. As with the layout editor, the plot can be zoomed using the standardmouse actions. Note, however, that the mouse is automatically in the zoom state whenover the plotted data and therefore the keyboard shortcut Z is not necessary.

Mode plot optionsThe MODE PLOT OPTIONS can be set in the bottom right of the MODE ANALYSISwindow, the options are · LINEAR/LOG SCALE: determines whether the simulation data is plotted on a linear or

a log plot · SUPERIMPOSE STRUCTURE: toggles whether a black outline showing the physical

structure is superimposed on the simulation data · PLOT: indicates which part of complex-valued simulation data is to be plotted. Available

options include: o AMPLITUDE o PHASE o REAL PART o IMAGINARY PART

· COORDINATES: currently supports only CARTESIAN coordinate system.

5.2 Advanced optionsThe ADVANCED OPTIONS tab has the following parameters: · MAXIMUM NUMBER OF MODES TO STORE: When searching for modes in a range

of effective indices from n1 to n2, it is possible to fill your available memory if too manymodes are found. For this reason, the maximum number of modes is limited and thecalculation will stop when this number of modes is exceeded.

· USE SINGLE PRECISION: this can be used to save some memory during thecalculation of the modes but the results are less accurate.

· AUTOMATICALLY REMOVE PML MODES/THRESHOLD FOR PML MODEREMOVAL: In the future PML boundary conditions will be permitted in the integratedmode solver. This setting can then be used, as in MODE Solutions, to removeunphysical PML modes.

· CONVERGENCE TOLERANCE: the convergence tolerance used for the calculations.The default value corresponds to 1e-12 but can be increased by the user to speedconvergence or decreased to improve accuracy.

Page 74: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Reference Guide72

© 2003 - 2009 Lumerical Solutions, Inc

6 Material database

This chapter details operation of the Material Database and Material Explorer.

Material DatabaseThe Materials Database allows for the definition of complex materials using experimentaldata or parametrized models. It can be accessed by clicking the material database buttonon the Structures tab. The Material Database stores the material data to be used in thesimulation. It also provides an interface to change material properties like color, meshorder, and model parameters. Experimental data can also be loaded into the database. To view the resulting index profile, use the Material Explorer.

Material Explorer The Material Explorer is used to check the material fits that will be used in the simulation.It is most important to check the fits when using the Sampled data material type, but theMaterial Explorer can be used to check the fits for any material type. The MaterialExplorer can be accessed through the Simulation menu.

6.1 Material databaseThe Materials Database allows for the definition of complex materials using experimentaldata or parametrized models. It can be accessed by clicking the material database buttonon the physical object layout editor tab. The Material Database stores the material data tobe used in the simulation. It also provides an interface to change material properties likecolor, mesh order, and model parameters. Experimental data can also be loaded into thedatabase. To view the resulting index profile, use the Go to Material Explorer button onthe bottom left hand corner of the window to open the Material Explorer.

Page 75: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Material database 73

© 2003 - 2009 Lumerical Solutions, Inc

Import / Export material fileThe import and export material file buttons can be used to import/export MaterialDatabase Files (.mdf) files. mdf files can be used to transfer material data betweensimulation files.

Material list The material list shows all of the materials that are defined in the database. Many of thematerial properties are editable. Double click on the table entry to change its value.

Property Description

No modification These materials can not be modified. The default materialsincluded with the installation package can not be modified .

No delete These materials can not be deleted. Materials that arecurrently used in a simulation can not be edited.

Name The material name.

Mesh order The mesh order. See the mesh order section for moreinformation.

Color The color used to draw the objects in the CAD.

Anisotropy The type of anisotropy. See the Anisotropic materials

77

77

Page 76: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Reference Guide74

© 2003 - 2009 Lumerical Solutions, Inc

section.

Type The type of material model used. See the material modelssection for more information.

Last modified The last modified date.

Add New materials can be added to the database. The material model must be selected.

Delete Delete an existing material. Objects with the No delete flagcan not be deleted.

Copy Copy an existing material. The materials included with theinstallation package can not be modified. If a modification isrequired, create a copy of the material. Copies of the materialscan be modified.

Material PropertiesMaterial properties related to the model type are shown in the Model properties panel. See the material models section for more information about these properties.

6.1.1 Models

This section describes the material models supported by the Material Database. Modelparameters can be edited in the Material property panel of the Material Database window.

Sampled dataThe Sampled data model is used to import experimental material data. The experimentaldata can be imported from a text file with the Import data... button.

The Sampled data material definition uses an automatic fitting routine to generate a multi-coefficient material model of the experimental data over the frequency range specified bythe source.The fitting routine can use one of the models described below, or a moregeneralized model. The fits can be checked and adjusted in the Material Explorer.

Tolerance - The desired RMS error between the permittivity of the experimental data andthe material fit. The fitting routine will use the least number of coefficients that produce afit with an RMS error less than the tolerance. Max coefficients - The maximum number of coefficients allowed to be used in thematerial fit. More coefficients can produce a more accurate fit, but will make thesimulation 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. Bydefault this is true in order to prevent diverging simulations.Improve Stability - If this setting is true, the fitting routine restricts the range of coefficients

74

74

Page 77: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Material database 75

© 2003 - 2009 Lumerical Solutions, Inc

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 partof the permittivity when calculating a fit. A weight of 1 gives equal weight to the imaginaryand real parts of the permittivity.Specify Fit Range - Set to true to decouple the bandwidth used to generate the material fitand the source bandwidth. This option is used in parameter sweeps where the sourcefrequency is changed, and where it is important to keep the material parameters constantover 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.

DielectricThe Dielectric model is used to create a material with a constant real index. This materialwill have the specified index at all frequencies (non-dispersive).

Refractive index - The refractive index of the material. Must be >= 1.

(n,k) materialThe (n,k) material model is used to create a material with a specific value of n and k at asingle frequency.

Refractive index - Real part of the index at the center frequency of the simulation. Mustbe > 0. Imaginary refractive index - Imaginary part of the index at the center frequency of thesimulation. Positive values correspond to loss, negative values will produce gain.

NOTE: Single frequency simulations only!This type of material model should only be used for single frequency simulations. Theimplementation of the (n,k) material model is such that the material properties will onlybe correct at the center frequency of the simulation.

ConductiveThe Conductive model is used to create a material defined by the following formula.

PlasmaThe Plasma model is used to create a material defined by the following formula.

DebyeThe Debye model is used to create a material defined by the following formula.

Page 78: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Reference Guide76

© 2003 - 2009 Lumerical Solutions, Inc

LorentzThe Lorentz model is used to create a material defined by the following formula.

SellmeierThe Sellmeier model is used to create a material defined by the following formula. The Ccoefficients have dimensions of micrometers squared (mm2).

NOTE: Single frequency simulations only!This type of material model should only be used for single frequency simulations. Theimplementation of the Sellmeier model is such that the material properties will only becorrect at the center frequency of the simulation.

PECA Perfect Electrical Conductor (PEC). There are no parameters for this model.

Kerr nonlinearIn the Kerr nonlinear model, the electric polarization field P will depend on the electric fieldE in the following manner.

Solving for the displacement field D gives

The relative permittivity and Chi3 values must be specified by the user.

PDLC (backwards compatibility mode)The addition of combined Plasma, Debye, Lorentz and Conductivity (PDLC) models is nolonger supported in FDTD Solutions. For backwards compatibility with older versions,these combined models will be created if an older fsp file containing a combined PDLCmaterial is opened. In most cases, these combined models were used to try and improvefits to real experimental data or analytical models. Much better fits can now be obtainedautomatically using the Sampled material models. The data used in these models can beeither experimental or created analytically.

To see an example of converting a PDLC model to the Sampled Data model, see the "

Page 79: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Material database 77

© 2003 - 2009 Lumerical Solutions, Inc

Importing arbitrary dispersive models" section of the FDTD Online Help (User Guide -Structure and Materials)

6.1.2 Mesh order

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 thematerial level (in the material database), or the object object level (in the objectproperties).

Materials with a lower mesh order take priority over materials with a higher prioritynumber (i.e. order 1 takes priority over 2). Areas which overlap are assigned thematerial properties of the higher priority material (see the following figure).

A typical example of the firstscenario is creating an "etch"material which describes thephysical location where materialhas been removed. In this case, theuser can define a material thatmatches the background index. The mesh order of this materialshould have a lower numericalvalue than the other materials.

In the event that both overlapping materials have the same order, the mesh order will beinferred from the Object tree. Objects at the bottom of the tree will take priority overobjects at the top of the tree. To ensure your simulation is well defined, it isrecommended that you avoid situations where two different overlapping structure havethe same mesh order.

Tip: Use an index monitor to confirm that the structures are meshed as intended.

6.1.3 Anisotropic materials

In general, anisotropic materials can be represented by a 9 element permittivity tensor eij

such that the electric and displacement fields are related by

where summation over j is implied on the right hand side. The full anisotropy tensor canbe written as

Page 80: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Reference Guide78

© 2003 - 2009 Lumerical Solutions, Inc

FDTD Solutions currently allows for a diagonal permittivity tensor of the following form

To define an anisotropic material, set the Anisotropy field in the Material database toDiagonal. The Material property editor will then have a property field for each direction. When using the Material Explorer, you can select the component (x,y,z) of the permittivityor index to plot.

Note:When you rotate a geometric primitive, the permittivity tensor is not rotated.

6.2 Material ExplorerThe 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 beused to check material properties for all material types.If the fit for a Sampled data material is not good enough, the Tolerance and Maxcoefficient properties and the wavelength range of the source can be edited in theMaterial Explorer.

Page 81: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Material database 79

© 2003 - 2009 Lumerical Solutions, Inc

Plot windowsThe two figure windows at the top of the Material Explorer window show the real andimaginary parts of the material index.

Fit and plot controlsProperty 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 toSampled data materials.

Max Coefficients The Max coefficients setting of the material. Only applies toSampled data materials.

Show/Hide Advanced Show or hide the advanced options.

Imaginary weight Increasing the weight increases the importance of theimaginary part of the permittivity when calculating a fit. A

Page 82: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Reference Guide80

© 2003 - 2009 Lumerical Solutions, Inc

weight of 1 gives equal weight to the imaginary and real partsof the permittivity.

Make fit passive Check to prevent the material fit from having gain at anyfrequency. By default this is checked in order to preventdiverging simulations.

Improve stability Check to restrict the range of coefficients in the material fit inorder to reduce numerical instabilities which cause simulationsto diverge.

Specify fit range Decouple the bandwidth used to generate the material fit andthe source bandwidth.

Bandwidth range of fit The frequency/wavelength range used for the fit if specify fitrange is selected. The bandwidth of the fit should cover thesimulation bandwidth.

Save fit parameters Update the Material Database with the new Tolerance andMax coefficients values.

Bandwidth units Specify range in units of wavelength or frequency. Specifyrange by Min/Max or Center/Span.

Bandwidth range The frequency/wavelength range of interest. By default, this isthe source limits.

Save source bandwidth Update the source limits with these values.

Vertical axis Plot permittivity or index

Show extended spectrum Plot the fit over a wider range.

Show material data Show the experimental data on the plot windows

Fit and plot Calculate the fit and plot data.

Plot in new window Plots fit and data in a new window

Fit analysisProperty Description

RMS error The RMS error of the fit. The fitting algorithm will use theminimum number of coefficients required to achieve an RMSerror less than the value specified by the Tolerance property ofthat material.

Number of coefficients The number of coefficients used in the fit.

Page 83: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

CAD layout editor 81

© 2003 - 2009 Lumerical Solutions, Inc

7 CAD layout editor

The image below shows the graphical CAD Layout Editor of FDTD Solutions. CAD is thegraphical interface to FDTD Solutions. It is used to setup, and analyze simulations, andto run all scripts.

In the screenshot below, different regions of the Layout Editor are circled. They include· Layout editor tabs and object tree· Main title bar · Toolbars· Script Prompt and Script Editor· View ports · Analysis Window

The following five section describe the first 5 regions. The Analysis window is discussedin more detail in the analysis tools section of the user guide. The final sectiondescribes how to customize the window layout of CAD.

NOTE: Layout mode and Analysis modeFDTD Solutions has two modes: Layout mode and Analysis mode. Layout mode isused for setting up your simulation. Objects can be added, edited, and deleted inLayout mode. After a simulation runs, CAD automatically switches to Analysis mode.Once in Analysis mode, objects can not be edited, since we want the object settings tomatch the values used in the simulation. In Analysis mode, data recorded by monitors

99

Page 84: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Reference Guide82

© 2003 - 2009 Lumerical Solutions, Inc

in the simulation can be accessed and analyzed.

In order to edit an object, press the SWITCH TO LAYOUT button. This will deleteall the simulation data, and return the simulation to layout mode. The image belowshows the CAD layout editor in analysis mode. Notice that the COPY, MOVE, DELETE,etc, buttons are disabled.

7.1 Layout editor tabs and Objects treeAs previously discussed, a simulation requires that the user define a set of physicalstructures, simulation region, radiation sources, and monitors. As a complete simulationmay contain a large number of objects, the layout tabs have been designed to facilitateeasy object manipulation by the end-user. There is one tab for each class of objects. When one tab is selected, (eg sources), then all source objects are selectable andeditable. All other objects are inactive. This allows the user to more easily select aparticular object from the complete set of simulation objects. For example, a user wishingto modify the location of the structure can select the Structures tab and thereby avoidinadvertently selecting any other objects, such as radiation sources or monitors that maybe in close proximity to the dielectric structure of interest. See Simulation objects forlists of objects that can be added in each tab.

If a tab is selected, the corresponding group of objects will be visible in the objects tree. Inthe same manner, if the name of the groups of objects is selected in the object tree, thattab will be selected in the layout editor.

In the image below, the monitors tab is selected, and the monitor objects are visible in theobjects tree. Note that there are buttons located at the top of the objects tree. Thesebuttons can be used to hide or display objects, and move them up/down the tree or into

33

Page 85: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

CAD layout editor 83

© 2003 - 2009 Lumerical Solutions, Inc

and out of groups.

When objects are selected, they are highlighted blue in the objects tree and the verticesare marked with red squares in the view ports. Objects can always be selected by clickingon their name in the object tree with the mouse. In the image below, monitor2 is selected.

7.2 Main title barThe menus on the main title bar are listed below. If any of the options can be selectedusing a button on a toolbar, the icon is drawn to the left of the name. Similarly, shortcutkeys are located to the right.

File The file menu includes options to create new files and save or load existing files. Notethat when creating a new file, there are three choices to determine how default settingsare chosen. More information regarding the default settings is provided in the followingsections. The import option in the menu allows structures stored in GDSII files to beimported into the simulation.

EditThe edit menu allows users to undo/redo their actions, and copy, paste and an option toselect all the objects in all of the tabs. It also contains all the options that are in the edittoolbar. Note that in the edit bar, the copy and paste options are available, but theduplicate option is not. Conversely in the edit toolbar the duplicate option is available,copy and paste option is not. The duplicate tool has the same effect as copying and thensubsequently pasting.

View

86

84

Page 86: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Reference Guide84

© 2003 - 2009 Lumerical Solutions, Inc

The view menu includes · the ability to choose the default layout of CAD · the ability to choose which windows, toolbars and structures are visible · the mouse mode toolbar options· the view toolbar options

SettingThis setting menu contains options to change the units used and the normalization of thefrequency domain data. More information regarding normalization is given in the Frequency domain normalization section in chapter3

Simulation This menu is important since it contains option to change the settings used for parallelcomputations. It also contains all of the options given in the simulation toolbar.

HelpThe help menu contains update links and tells you which version of FDTD Solutions youare running, including the expiry date of the license file in use. It also contains links to the FDTD Online Help. The getting started and reference guide links will launch the .pdf copyof these guides. Since the online version is the most current, we recommend that you usethe online version if you are connected to the internet.

7.2.1 GDSII Import

The GDSII import function allows you to import structures from a GDSII file into the layouteditor. The GDSII file format is commonly used to store 2-dimensional geometric data.This data can be directly imported into a 2D layout environment in FDTD Solutions, or itcan be used to import 3D objects into a 3D layout environment by extruding the 2D datain the Z dimension.

Characteristics of the GDSII fileFDTD Solutions supports most, but not all features of the GDSII file format. Unsupportedfeatures should not prevent the file from being imported, however, the results may not beas 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

22

Page 87: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

CAD layout editor 85

© 2003 - 2009 Lumerical Solutions, Inc

Polygon Yes

Path (see note below) 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 symbolicreferences

No

Rotations and mirroring in array andsymbolic references

No

Note: Path cornersPath objects in GDSII files are piecewise linear lines plus a width and optionally someinformation on how to handle the corners and ends. GDSII files support several cornerstyle options (rounded, squared, etc). The GDSII import function has limited support forcorner styles. All corners will be imported using the squared corner style.

Note: Flattened GDSII filesIf you encounter problems importing a GDSII file, you may find better results if youcreate a flattened GDSII file with the original software that you use to create the GDSIIfile. Flattening a GDSII file removes features such as cell references, array references,magnifications, and rotations.

GDSII Import GDSII import is initiated by accessing the IMPORT->GDSII option from the FILE menu.This will bring up a standard file browser which will allow you to select a GDSII file withthe extension .gds or .db. Selecting a GDSII file will bring up the Single layer GDSIIImport window as shown below.

Page 88: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Reference Guide86

© 2003 - 2009 Lumerical Solutions, Inc

The following 3 input parameters control how the GDSII data is imported to FDTDSolutions structures:

· Cell Name: This selection menu contains the valid cells available in the GDSII library.Select the cell you wish to import.

· Layer number: This selection menu contains all of the layer number present in theGDSII file. Only structures with the selected layer number will be imported by thisoperation.

· Material: This selection menu contains a list of the valid materials in your currentsimulation environment. This material will be assigned to the imported structures.

Selecting the Import layer button imports all the structures with the selected layer numberin the selected cell into the FDTD Solutions layout environment. These structures areautomatically put in a structure group. The material is set as an input parameter for thestructure code, and the script in the structure group sets all the objects to the desiredmaterial. The name of the structure group includes the layer number from which theycame. For 3D simulations, the structure group contains a variable "z span". This used toset the width of the layer in the z direction. The origin of the structures, as well as theirorientation, can be changed by changing the properties of the structure group.

7.2.2 Modifying your default settings

When creating a new simulation project using FILE -> NEW, there are three choices todetermine how default settings are chosen:· from default project: The settings for the new simulation project, including the default

materials, are loaded from the defaults settings files created when FDTD Solutions isinstalled.

· from current project: The settings for the new simulation project are preserved fromwhatever is currently set before starting a new project. This includes any materials inthe current material database.

· from existing project: A file browser allows you to select an existing *.fsp file to use as atemplate for any default settings, including materials existing in that particular .fsp file.

Users may want to create a standard fsp file with all the settings and materials that arenormally used for their simulations. When starting FDTD Solutions, they can either · open this file and then select New->from current project, or · choose New->from existing project and then select this file to be used as a template.

Page 89: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

CAD layout editor 87

© 2003 - 2009 Lumerical Solutions, Inc

Finally, it is sometimes useful to run a default script each time you start up FDTDSolutions, for example, to change working directories to your home directory. Users cansave a script .lsf file called· C:\Program Files\Lumerical\FDTD\defaults\default.lsf (Windows)· /usr/local/Lumerical/defaults/default.lsf (Linux)that will be automatically run each time FDTD Solutions opens.

7.3 ToolbarsThere are 6 toolbars in CAD. For more information on the first four toolbars see thefollowing sections For information on the alignment toolbar see the User Guide in theOnline Help. The online help toolbar is self explanatory.

Edit toolbar The edit toolbar contains tools used to edit simulation objects.

Mouse mode toolbar The mouse mode toolbar changes what the mouse place holder looks like on the screen.Depending on the mode of the mouse, the user can edit objects, move or zoom in on anobject in one or more view ports or measure the size of objects.

View toolbarThe view toolbar contains tools to zoom to the extents of objects, draw a grid and viewthe mesh used for the simulation.

Simulation toolbarThe simulation toolbar contains tools to run the simulation and switch back to layoutmode.

Alignment toolbarAlignment tools are only available when the structure tab is selected. The alignmenttoolbar consists of six buttons that control the way in which objects can be accuratelypositioned with respect to other objects. For example, these functions were used to alignthe left edge of the circular objects with the left edge of the rectangle in the figure below.

Page 90: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Reference Guide88

© 2003 - 2009 Lumerical Solutions, Inc

Online help toolbarThe online help toolbar can be used to quickly access the online help. Simply enter aquery in the online help toolbar and press on the magnifying glass. This will bring up thesearch results in a new tab in current default browser if an instance of the browser exists,and opens a new browser window otherwise.

7.3.1 Edit

The view tools are described below. When applicable, the shortcut key used to run thefunction from the keyboard is given in brackets next to the name of the tool. An objectmust be selected in order to use these tools.

Edit properties (E) This command opens the edit properties window. See the Simulation objects chapterfor information about the properties of each object.

Tip: Group edit of multiple objectsThe properties of multiple structure objects can be edited together by selecting multipleobjects prior to entering edit mode. This option is only available for structure objects,not sources or monitors. Any properties which are identical between all of the selectedobjects 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 arecreated are identical to the originals, apart from a one grid cell offset in their x positionwhich allows the user to distinguish between the original and the copy. When multipleobjects are selected, all of the selected objects will be copied. When copying sourcesand monitors, it is important to rename the copies so that each object has a unique name.

MoveThe move command allows shifting a single or multiple selected objects by a specified

33

Page 91: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

CAD layout editor 89

© 2003 - 2009 Lumerical Solutions, Inc

distance in each of the x,y,z dimensions. A pop-up window that appears has field entriesto specify the shift amount.

ArrayThe array command allows the user to create an array or arrays of objects.

The array edit window that pops up contains several array properties :· A1 LATTICE: the distance between the grid in the a1 direction· A2 LATTICE: the distance between the grid in the a2 direction· ANGLE BETWEEN A1 AND X-AXIS: the angle (in degrees) between the a1 direction

and the x-axis· ANGLE BETWEEN A1 AND A2: the angle (in degrees) between the a1 and the a2

directions. · COLUMNS, ROWS: fields which define the number of rows and columns which

comprise the array.· AZ LATTICE: the distance between elements in the z direction (valid for 3D simulations

only)· LAYERS: the number of elements in the z direction (valid for 3D simulations only)

The definition of these parameters in terms of the resulting array is shown in the diagrambelow along with an example array properties edit window.

Delete (Del)The delete command removes the currently selected object, or objects, from thesimulation.

7.3.2 Mouse mode

The four mouse modes are described below. When applicable, the shortcut key used torun the function from the keyboard is given in brackets next to the name of the tool. Onlyone mouse mode may be selected at a time.

Page 92: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Reference Guide90

© 2003 - 2009 Lumerical Solutions, Inc

Select (S)This functions puts the mouse into the select mode. This allows objects to be selectedthrough the view ports (objects may be selected in the objects tree regardless of whetherthe select tool is pressed or not).

For reference, the current location of the mouse within the view ports is shown in thefields at the bottom left-hand corner of the CAD window (see the image below). The >and < buttons at the right increase or decrease the number of decimal places shown inthese fields.

Zoom (Z)This function sets the mouse to be in the zoom tool mode. The aspect ratio of the 2Dview port, and the XY view 3D, is maintained at 1:1, so there is no distortion and circlesare plotted as circles.

Pan view (P)The pan view mode allows the user to drag the view. In the Perspective window, the panmode can be used to rotate the view.

Scrolling in the view portsThe other method of adjusting the view ports is by using the arrow buttons on yourkeyboard. Each press of a button results in the view shifting in the direction indicated bythe arrow.

Ruler (R)Once the ruler mode is selected, a distance measurement can be made by pressing theleft mouse button and then dragging the mouse. A non-permanent triangle is drawnbetween the locations where the mouse button was pressed (A) and released (B). Thedistances are given in the lower right hand corner of the CAD window (see the imageabove under the select mouse mode). The dx and dy fields correspond to the horizontaland vertical distance between A and B, and the AB field corresponds to the length of thehypotenuse.

7.3.3 View

The view tools are described below. When applicable, the shortcut key used to run thefunction from the keyboard is given in brackets next to the name of the tool.

Page 93: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

CAD layout editor 91

© 2003 - 2009 Lumerical Solutions, Inc

Zoom Extent (X)Selecting this submenu item centers and scales the current view of the palette to show allof the simulation objects that correspond to the current layout tab. For instance, selectingzoom extent while the Structures tab is selected arranges the palette view such that allthe physical structures are shown, while other simulation objects may appear outside theextent of the palette view. As mentioned above, this function is also accessed viadouble-clicking either the left- or right-hand mouse button while in the zoom tool mode.

Drawing GridClicking on the drawing grid brings up a window in which the following options can beedited

· SHOW GRID: when checked, the grid will be plotted in the drawing palette· SNAP TO GRID: when checked, objects can only be moved so that their centers align

with intersection points of the grid· A1 LATTICE: the distance between the grid in the a1 direction· A2 LATTICE: the distance between the grid in the a2 direction· AZ LATTICED: the distance between the grid in the z direction· ANGLE BETWEEN A1 AND X-AXIS: the angle (in degrees) between the a1 direction

and the x-axis· ANGLE BETWEEN A1 AND A2: the angle (in degrees) between the a1 and the a2

directions.

View simulation meshSelecting the "View simulation mesh" button will show the simulation mesh. Becauserecalculating the mesh is somewhat computationally intensive, it is not continuouslyupdated. For example, the mesh will not update immediately if a physical structure ismoved. To have FDTD Solutions recalculate the mesh, click the "Recalculate simulationmesh button" directly below the "View simulation mesh" button. The mesh is alwaysrecalculated before a simulation starts.

Recalculate simulation mesh (F5)This function will calculate and redraw the simulation mesh based on the currentsimulation setup. The mesh is always recalculated before running a simulation.

7.3.4 Simulation

The simulation tools are:

Check memory requirements This function will estimate the memory requirements for the current simulation. The total

Page 94: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Reference Guide92

© 2003 - 2009 Lumerical Solutions, Inc

requirements are broken down into categories such as Simulation fields and Monitor data.

Material Explorer The Materials Explorer can be used to check the material properties that will be used in asimulation. For more information, please see the section on Material Explorer .

Run FDTD Run the current simulation in single process mode. If the current simulation project is notsaved, the application will prompt the user to save the project to a simulation project (.fsp)file. For more information on running a simulation, consult the Running a simulationsection.

Run parallel FDTD Run the current simulation in parallel mode. If the current simulation project is not saved,the application will prompt the user to save the project to a simulation project (.fsp) file. Before running a parallel simulation, the parallel options must be setup. The parallelsimulation feature is not available in the trial version of the program.

Run scripts This function will allow the user to run a Lumerical script file (*.lsf) to performautomated commands to, for example, run a series of simulations for parameter sweepsor optimized device performance. This button is located in the CAD environment twice ifthe script editor is open: once in the simulation toolbar and once at the top of the scripteditor. Pressing on button on the toolbar brings up an open file dialog, so that a file canbe chosen. Pressing the version of this button on top of the script editor runs the scriptthat is open in the script editor.

Switch to layout editor This function returns the simulation environment back to the layout editor when inanalysis mode. If you switch to layout editor and then save the file, the data from thesimulation will be overwritten and lost.

7.4 View portsThe view ports show a graphical representation of all the simulation objects.

When running the mouse over the view port, it will either have the shape of an arrow, ahand, a magnifying glass or a ruler. You can toggle between these by selecting a mousemode as described in detail in the toolbars section.

78

96

Page 95: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

CAD layout editor 93

© 2003 - 2009 Lumerical Solutions, Inc

Selecting objects in the view portsIn order to select an object in a view port using the mouse, the layout editor must be inthe correct tab and the mouse must be in select mode (ie the mouse looks like an arrow).When objects are selected, the vertices are drawn with red squares (also, the names arehighlighted in blue in the object tree).

Copying and Pasting from other simulationsIt is possible to copy and paste between different CAD windows using the Ctrl+C and Ctrl+V shortcut keys. If, the incorrect tab for the type of simulation object is selected in theCAD window into which the object gets pasted, the correct one will automatically be setwhen the paste command is carried out.

7.5 Script Prompt and Script EditorThe scripting language is useful for setting up complex structures, for data manipulationand for parameter sweeps. Chapter 10 of the reference guide gives a list of all the scriptcommands, as well as examples of how to use them.

By default the script editor is located on the right hand side of the view ports and sharesthe same frame as the analysis window. When both windows are open, it is possible totoggle between the two through tabs located at the bottom left hand corner of the frame.The script file editor contains buttons to create, open, save and run script files. Whenmultiple script files are open, pressing on the run script button runs the one in theforefront. Note that when entering script commands in the script file editor, eachcommand must be followed with a semicolon.

When running a script file in the a different directory using the GUI, the current workingdirectory 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 thecurrent directory first, and then any other folders in the path, then the directory of thescript file.

By default the script prompt is located at the bottom of the CAD window. Scriptcommands 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, the script prompt interpreterautomatically inserts it for you. Multiple lines can be pasted into the script prompt, and willrun as in the script editor. In this case though, only the last semicolon can be neglected.

7.6 Changing CAD layoutThere are five pre-defined CAD layouts that can be accessed through main title toolbar.Change between the default layouts by selecting the menu VIEW->SET DEFAULTLAYOUT, and choosing one of them. In addition, users can hide or show more windows,change the location of the the toolbars and some of the windows, and undock thewindows. The current window layout is saved when CAD closes so the next time youopen CAD, your previous window layout will be used.

Hiding/showing windows and toolbars

Page 96: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Reference Guide94

© 2003 - 2009 Lumerical Solutions, Inc

There are two methods to hide or show windows and toolbars1) In the main title toolbar select VIEW->WINDOWS or VIEW->TOOLBARS. The visiblewindows/toolbars have a check mark next to their name; the hidden ones do not havecheck marks.2) By clicking the right button anywhere on the main title bar or the toolbar, the followingpop up menu will show up. As before, check marks indicate when windows and toolbarsare 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 anddrag and drop the toolbar. If you reach a region where you can place a toolbar, the CADenvironment makes room for the toolbar, creating a blue void.

Moving and undocking windows

The object tree, script prompt, view ports and script editor may be undocked (theperspective view port is undocked in the image below) by double clicking the name withthe left mouse button. This is particularly useful for the script file editor, since it can beconvenient to make the window quite large when writing script files. The object tree, scripteditor and analysis window can be docked on top of each other either to the right or to theleft of the view ports. If they are placed on top of each other, they gain tabs on theirbottom left corner so that you can toggle between them.

Tip: Moving undocked windows in LinuxTo reposition an undocked window on Linux operating systems, hold down the Alt keybefore attempting to move the window.

Page 97: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

CAD layout editor 95

© 2003 - 2009 Lumerical Solutions, Inc

Page 98: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Reference Guide96

© 2003 - 2009 Lumerical Solutions, Inc

8 Running a simulation

When the desired physical structure, sources, monitors and simulation area have beendefined, it is possible to run the simulation. Selecting Run FDTD in the Simulation menuor clicking on the RUN button in the toolbar will launch the simulation progress window. Ifyou have not already saved your simulation, you will be prompted to do so as you musthave a saved simulation project file in order to run a simulation.

The simulation progress window allows you to start, pause and exit simulations. Anymovie monitors will save to the filename you chose for the movie monitor. Closing thesimulation progress window or pressing the EXIT button will launch the data analysiswindow (for further information, consult the section entitled The analysis tools ).

The elements of the simulation launch window are as follows:· FDTD simulation file: This field tells you which file is currently being simulated.· GO: Use this button to launch or resume a simulation.· PAUSE: Use this button to pause a simulation that is in progress.· EXIT: Use this button to exit the current simulation. It will allow you to terminate a

simulation early, while still saving the data obtained up to that point.· Simulation status: This field updates the status of the simulation. Status values include

“not started”, “running”, “paused” or “completed and saved”.· Simulation time: This field tells you the current time of the simulation between time 0

and the maximum time set for the simulation.· Maximum time: This field reminds you of the maximum simulation time you set for the

simulation.· Maximum time remaining: This field tells the maximum REAL time, in hours, minutes

and seconds, that you have remaining. It is based on the time the simulation has takenup to date.

Progress bar: The progress bar indicates how much of the simulation is complete, withthe length of the progress bar is determined by the “maximum simulation time” that youhave specified. The red line within the progress bar shows the amplitude of the radiationpulse as a function of the simulation time. This is a useful visual guide to know when thepulse has been injected, and how long the total simulation time is compared to the pulselength.

98

Page 99: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Running a simulation 97

© 2003 - 2009 Lumerical Solutions, Inc

Note: More informationFor more information about running FDTD simulations, including running on clusters,using a job scheduler, preparing batch files, and using extra engine licenses, see theOnline Help. Go to the User Guide - Running Simulations section.

8.1 Running a simulation from the commandlineSometimes it is convenient to run FDTD Solutions simulations that you have prepared inadvance without the CAD layout editor. You can run the FDTD simulation engine directlyfrom the command line with the commandFDTD [–nw] [–fullinfo] filename.fsp

The options are· -nw: run in “no windows”, or non-graphical interface mode. In “no windows” mode, the

following option is available:· -fullinfo: this will print more detailed time benchmarking information to the log file based

on walltime and cpu time measurements

Extra options for FDTD-parThe parallel executable of FDTD (FDTD-par) always runs in “no windows” or non-graphical mode so the –nw flag does nothing.FDTD-par also supports one additional flag:· -logall: this forces each process in the simulation to create a log file. Logfiles are

named filename_p0.log, filename_p1.log, filename_p2.log,... By default, onlyfilename_p0.log is created.

Page 100: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Reference Guide98

© 2003 - 2009 Lumerical Solutions, Inc

9 Analysis tools

This section describes the way in which the integrated analysis routines are used tovisualize and analyze simulation data. The manner in which the analysis routine interactswith the overall simulation environment is described in the next section: Analysis toolsand the simulation environment . This is followed by two sections to familiarize the userwith the operation of the analysis routines. The first section entitled The analysis window

describes the analysis routine window and its various components. The secondentitled Analysis groups describes the analysis tab of an analysis object. Finally, thetwo general ways in which data can be visualized and analyzed is detailed. The plottingfunctions, a central component to the overall analysis routines, are described in Figurewindows section. The section entitled Data export describes how data can beexported to plot in other software packages for further analysis or formal presentation.More advanced analysis can be performed with the extensive scripting language, asdescribed in the Scripting language section.

9.1 Analysis tools and the simulationenvironmentBefore describing how the analysis routines are used for data visualization, it is importantto understand the way in which the integrated analysis tool interacts with the simulationenvironment. Following the completion of a simulation, the simulation data is written intothe FDTD simulation project (.fsp) file; even premature termination of a simulation resultsin a partial dataset being written to the .fsp file. When the simulation completes and theEXIT button is pressed, or the simulation is prematurely terminated by pressing the EXITbutton, the analysis tool is automatically launched.

In Analysis mode, simulation object properties can be viewed, but not edited. Thisensures that at any given time, the simulation data results corresponds to theconfiguration of the simulation project. Once in the analysis tool, the user continues toanalyze the simulation data until they either wish to close the application, or they decidethey would like to alter the simulation objects and re-perform the simulation. By exiting theanalysis routines and returning to the layout editor, existing simulation data will be erased.

98

99

101

103 104

106

Page 101: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Analysis tools 99

© 2003 - 2009 Lumerical Solutions, Inc

9.2 The analysis windowAn example analysis window is shown in the screenshot below.

As can be seen, the window itself is divided into four different sections where each isdescribed in turn below, together with the File item.· DATA TO ANALYZE: In this section, the user specifies which monitor data to analyze.

The top field, labeled Monitor consists of a pull-down menu in which the user selectsthe simulation monitor to be analyzed. Depending on the monitor selected, variousother input fields in the analysis window will be active or inactive depending on itsrelevance to the current monitor. For example, selecting a time-domain field monitorwill result in the frequency field becoming inactive as it is not relevant.

· NORMALIZE MONITOR TO SOURCE POWER(DFT ONLY): Only applicable tofrequency-domain field monitors and power monitors. This option, when checked,normalize the transmission data to the source power, rather than having the resultsreturned in Watts.

· CONVERT FREQUENCY TO WAVELENGTH: This checkbox toggles betweendisplaying the data in wavelength or frequency units.

· MONITOR PROPERTIES / FAR FIELD SETTINGS:o MONITOR PROPERTIES – The monitor properties contain information as to how the

particular monitor is to be analyzed. The monitor properties tab is more fullydiscussed in the Monitor properties tab section.

o FAR FIELD SETTINGS – The far field settings tab is where the end-user sets theproperties that govern the far field transformation, including the resolution, which

100

Page 102: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Reference Guide100

© 2003 - 2009 Lumerical Solutions, Inc

direction to project in, and so on. When plotting far field data, the data to outputsetting in the monitor properties tab must be set to far field. The contents of the farfield settings tab is more fully discussed in the Far field settings tab section.

· PLOT DATA: The plot data section of the analysis window contains a button which,when pressed, generates the desired plot in a new window as specified in the Data toanalyze and Monitor properties sections of the analysis window. Within the plot datasection of the analysis window, the user can specify whether to plot linear or log data.

· EXPORT DATA: The export data section of the analysis window contains a filenamefield in which the user specifies the filename to which the data subset is exported whenthe Export button is pressed. For more information about this function, please contactLumerical Support.

9.2.1 Monitor properties tab

The monitor properties tab contains the following items:· DATA TO OUTPUT : This is where the user specifies what type of plot to generate.

Options include distributions as a function ofo space (line plots as a function of x, y, or z, or image plots in the x-y, x-z, or y-z

planes)o time – only available with time monitorso frequency (via FFT of time monitors, or via frequency-domain monitors)o far-field projection versus angle – only available with frequency-domain monitors; the

settings for the far field projection are set via the far field settings tab, as discussed inthe next section

· COMPONENT : This is the particular field component (|E|^2, |Ex|^2, |Ey|^2, |Ez|^2, |H|^2, |Hx|^2, |Hy|^2, |Hz|^2, or the Poynting vectors real(Px), real(Py), real(Pz) for powerflow)

· X, Y, Z : This is the spatial location at which to plot the data.· FREQUENCY : This is the frequency at which to plot the data (valid for frequency-

domain monitors, only) Updated automatically with the wavelength below.· WAVELENGTH: This is the wavelength at which to plot the data (valid for frequency-

domain monitors, only) Updated automatically with the frequency above.· TIME : This is the time at which to plot the data (valid for time-domain monitors only)

9.2.2 Far field settings tab

The far field settings tab is the location where the end-users specifies the parameterswhich govern the projection of near field and Poynting vector data into the far field. Thefar field data is plotted as a function of angle, measured from the projection direction in apolar plot overlaid with circles which indicate the far field diffraction angle of the near fieldradiation. All far field data is projected onto a hemisphere with a radius of 1 meter. The farfield data is scaled so that if it is integrated over the far field, you obtain the same integralas if you were to perform a similar integration over the near field data.

A screenshot of the far field settings tab is shown in the figure below.

100

Page 103: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Analysis tools 101

© 2003 - 2009 Lumerical Solutions, Inc

Available settings include:· PROJECTION DIRECTION: this is the axis direction in which the fields are projected,

and is specified in terms of positive or negative directions. With the default AUTOsetting, this will be automatically set to be perpendicular to the line/plane over which thedata is measured, in the direction of positive power flow.

· MATERIAL INDEX: this is the refractive index of the material in which the field isprojected. For instance, to project in air set the index to 1; to project in SiO2 set theindex to 1.44. By default it is set to auto.

· FAR FIELD FILTER: reduces ripple in the far field projection caused by truncation ofthe near field data.

· X, Y, Z POINTS: this is the spatial resolution of the projection in the far field. Thesenumbers represent the number of points to spread across the 180o span of theprojection.

· ASSUME PERIODIC: this checkbox is used to determine the far field projection of aperiodic structure from a simulation with periodic or Bloch boundary conditions. Ifchecked, the following settings apply:o ILLUMINATION: can be either “GAUSSIAN SPOT”, or “TOP HAT”.§ Gaussian spot refers to a situation where the extent of the periodic structure is

large with respect to the spot size.§ Top hat refers to a situation where the illumination is large with respect to the

physical extent of the structure.o X, Y, Z PERIODS: this governs the extent of the effective structure. The extent of the

structure is limited by either the illumination conditions (i.e. Gaussian spot) or by thestructure itself (i.e. Top hat). For a Gaussian spot, the x, y, z periods refers to theFWHM of the Gaussian beam, measured in the number of periods. For a Top hat,the x, y, z periods refers to the number of periods in the structure.

9.3 Analysis groupsAnalysis groups are objects that contain monitors and associated script functions whichcan be used to create customize data analysis. For example, an absorption monitorgroup can be created with a power monitor, index monitor, and the a script function thatcalculates absorption from the fields and index.

Page 104: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Reference Guide102

© 2003 - 2009 Lumerical Solutions, Inc

An example of the edit window for an analysis group is shown in the screenshot below.

As can be seen above, there is a SETUP tab and an ANALYSIS tab. The SETUP tabcontains all the information needed to edit and set up monitors that are located in theanalysis group. The functionality of the SETUP tab is very similar to the Structure groupsobject. See the Properties and Script tab section for information. It is only possibleto edit information in the SETUP tab in layout mode, but information in the SCRIPT tabcan be edited both in layout and analysis mode (see the note at the top of the windowwhich is highlighted in yellow).

The ANALYSIS tab contains all the information to analyze the monitor data. It is dividedinto two sub-tabs. The VARIABLES tab contains all input parameters in the top half, andthe output parameters (named results) in the bottom half. Parameters can be added andremoved using the respective buttons. Any changes to the variables can be saved usingthe SAVE ANALYSIS button at the bottom of the tab. The RUN ANALYSIS button runsthe analysis script located in the SCRIPT tab.

Once an analysis routine has run, the result (output parameters) become monitor data,that can be accessed from the script prompt or a script file in the same manner thatmonitor data is accessed for simple monitors.

A screenshot of the contents of the SCRIPT tab is given below. There is a section of thewindow that contains the analysis script and a section that contains the results of theanalysis script once the RUN ANALYSIS button has been pressed.

Note that the script below computes the output parameter. Since the script contains thescript command to print the results to the screen, i.e. "?", the value computed for the

42 43

Page 105: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Analysis tools 103

© 2003 - 2009 Lumerical Solutions, Inc

output parameter is printed in the Analysis Script Output portion of the window.

More information concerning Analysis groups is available in the User Guide section of theOnline Help.

9.4 Figure windows for plots and imagesPlots and images can be created from either the scripting language (Plotting commands

) or from the Analysis Window (The analysis window ). Once a figure window hasbeen created, it looks like this:

Plot Image

All of the figure windows support the same zoom functionality as in the layout editor. The

158 99

Page 106: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Reference Guide104

© 2003 - 2009 Lumerical Solutions, Inc

left button zooms in by a factor of two, the right button zooms out by a factor of two,pressing and holding the left-hand mouse button results in a zoom window, and double-clicking either mouse button scales the plot to show all of the data.

The figure window also has functions that are accessible from the top menu, whichcontains the FILE and SETTING.

The FILE submenu contains the following items:· EXPORT TO JPEG: Opens a file browser and to select a filename for a jpeg copy of

the current view of the figure. A window will pop up asking for the figure resolution.

The SETTING submenu contains the following items:Common for Plot and Image:

· AXIS: Allows the following axes properties to be seto SET AXIS LIMITS(Ctrl+A): Opens a GUI window that allows the min and max values

to be set for both the x and y axes. The initial values correspond to the current viewof the figure.

o INVERT AXIS(Ctrl+V): A check box that allows the axis to be inverted: the verticalaxis is drawn on the horizontal and vice versa.

· COLOR MAP: Allows you to choose between a color image (Ctrl+C)or a grey-scalefigure(Ctrl+G).

· SET TITLE(Ctrl+T): allows you to set the x label, y label, and the title of the plot.Plot specific

· SET LEGEND(Ctrl+L): Allows you to set the legend and its position.Image specific

· COLOR BAR:o SET COLOR BAR LIMITS (Ctrl+B): Opens a GUI window that allows the min and

max values to be set for both the color bar. The initial values correspond to thecurrent view of the figure. Any data values larger than the maximum are displayed atthe color (or grey-scale) of the maximum, and similarly for the minimum. This allowsfor over-saturation of the colors to emphasize certain regions of the image, or formore accurate comparison between two images.

o RESET DEFAULT LIMITS(Ctrl+D): Resets the original limits. This corresponds to theminimum and maximum values of the data being imaged.

9.5 Data exportIn some cases, the user may wish to export the FDTD simulation data to take advantageof the advanced plotting and data analysis tools not available in the FDTD Solutions. Dataexport can be done in a number of ways, but in general the use of the scripting languagewill be required. The user can use scripting commands as described in the Scriptinglanguage section to write data into text format, or alternatively use Matlab by directlycalling Matlab functions in FDTD or by exporting data to .mat files.

Export to text filesThe data subset export facility in the analysis view allows the user to save to a specified

106

Page 107: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Analysis tools 105

© 2003 - 2009 Lumerical Solutions, Inc

filename, a subset of the total simulation data for quick plotting in other softwarepackages. For x-y plots, the data subset export facility generates a two-column ASCIIdata file, with a header which specifies where the data was taken from and the columnheadings with units. For image plots, the data subset consists of two columns whichspecify the x and y positions in the units specified within the CAD layout editor, and amatrix of data which consists of the field quantities being exported. The user may alsowrite a script file and utilize the write script function to custom create a text file.

MatlabMATLAB has a number of specialized plotting functions useful for visualizing FDTDsimulation data. For example, contour plot or vector plot, which are not available in theFDTD Solutions but found in MATLAB, are suitable for visualizing the electric field orpower flow. FDTD Solutions provides two interfaces for users wishing to use MATLAB intheir analysis:1. The first option allows MATLAB commands to be called directly from within the FDTDSolutions scripting environment. Data can be moved between FDTD workspace andMATLAB workspace, so the user can take advantage of the combined functionalityprovided by both programs. This is accomplished by using the script commands, matlab , matlabput , and matlabget . To use this option, both FDTD andMATLAB must be installed on the same computer.2. The second option allows simulation data to be exported to MATLAB .mat files forsubsequent data analysis in MATLAB. For more information, see the matlabsavecommand.

The FDTD Solutions Online Help provides an example of how each option can be used. See the User Guide - Scripting language section.

MATLAB is a registered trademark of The Mathworks, Inc.

117

122 124 123

120

Page 108: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Reference Guide106

© 2003 - 2009 Lumerical Solutions, Inc

10 Scripting Language

Lumerical provides a powerful scripting language to manipulate simulation objects, launchsimulations and analyze results. Script commands can be entered directly into a scriptprompt, be run from a saved script file, or entered into a group object. Group objects runsetup scripts every time they are edited, and analysis scripts when these are called.

To view the script prompt, select VIEW->WINDOWS-> SCRIPT PROMPT from VIEWmenu on the main title bar. You can type and execute commands in the script region.

Script files can be created and edited in the script file editor, which is opened by selectingVIEW->WINDOWS-> SCRIPT FILE EDITOR from VIEW menu on the main title bar.They can also be created and edited in another text editor. All files with the extension .lsfare recognized as script files. To run a saved script file, open a file in the script file editorand press the run script button, or select RUN SCRIPT from the SIMULATE menu on themain title bar. Scripts can also be run by typing their file name at the script prompt or inanother script file.

When running a script file in the a different directory using the GUI, the current workingdirectory 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 thecurrent directory first, and then any other folders in the path, THEN the directory of thescript file.

Structure and analysis groups both have associated set up scripts. These script are runwhenever the group is edited, or the when the TEST button located below the scripts inthe edit GUI is pressed. In addition, analysis groups have an analysis script. The analysisscript is not run automatically. It can be run using the runanalysis script command, or bychoosing to edit the properties of the script, selecting the ANALYSIS tab, and pressingthe RUN ANALYSIS button just below where the script is.

The script functions have been organized into the following sections.

Section

System level

Manipulating variables

Operators

Functions

Loop and conditional statements

Plotting commands

Manipulating objects

107

124

130

139

156

158

161

Page 109: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Scripting Language 107

© 2003 - 2009 Lumerical Solutions, Inc

Material database functions

User defined GUIs

FDTD Solutions toolbox

Creating your own scriptcommands

The online help version of the Scripting Language section includes examples for many ofthe script functions.

10.1 System levelSystem level commands for interacting with the OS file system, running script files, etc.

System commands

Command Description

delrm

Deletes a file.

ls dir

Lists the files in a directory.

cd Changes the working directory.

pwd Returns the current working directory.

cp Copy a file.

mv Move a file

exit Exit the application.

system Run command prompts.

fileexists Check if a file exists.

currentfilename Get the current filename.

filebasename Get the file base name from a string.

filedirectory Get the file directory from a string.

fileextension Get the file extension from a string.

Starting and stopping scripts

Command Description

running a script Type the script name to run it.

183

186

190

238

109

109

110

109

110

110

110

111

111

111

112

112

112

113

113

113

Page 110: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Reference Guide108

© 2003 - 2009 Lumerical Solutions, Inc

getpath Get the current path.

addpath Add a directory to the path.

which Where in the path is a file.

pause Pauses program for a time.

break Will stop a script file from executing at that line.

ESCAPE key To interrupt a script file from running or a long blockof commands from executing

File input and output

Command Description

format Set the precision of the script interpreter.

STD OUT

write Writes strings to text files or to standard output.

LDF files

loaddata Load variables or d-card data from ldf file.

savedata Save variables to ldf file.

savedcard Saves d-card data to an ldf file.

Text files

readdata Read text files.

write Writes strings to text files or to standard output.

fld (field) files

asapexport Export monitor data to fld file.

asapload Load data from fld file.

asapimport Import data from fld file to Import source.

See Also exportfigure , load , save

MATLAB functions

Command Description

matlabsave Save workspace data to a Matlab .mat file.

lum2mat Convert data from an .ldf file to a Matlab .mat file.

113

114

114

114

115

115

115

116

117

116

116

117

117

117

118

118

119

160 195 196

120

121

Page 111: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Scripting Language 109

© 2003 - 2009 Lumerical Solutions, Inc

lum2mat command line Run lum2mat from the command line.

matlab Execute a MATLAB command

matlabget Get a variable from the MATLAB workspace

matlabput Send a variable to the MATLAB workspace

10.1.1 del

Delete a file.

Syntax Description

del("filename"); rm("filename");

Deletes the file "filename".This function does not return any data.

See AlsoSystem level , delete

10.1.2 rm

Delete a file.

Syntax Description

del("filename"); rm("filename");

Deletes the file "filename".This function does not return any data.

See AlsoSystem level , delete

10.1.3 dir

List files in a directory.

Syntax Description

out = dir; out = ls;

The output is a string.Use ?dir; to write the value to the screen.

out = dir("directory"); out = ls("directory");

Lists the files in the specified directory.

See AlsoSystem level

122

122

123

124

107 163

107 163

107

Page 112: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Reference Guide110

© 2003 - 2009 Lumerical Solutions, Inc

10.1.4 ls

List files in a directory.

Syntax Description

out = dir; out = ls;

The output is a string.Use ?dir; to write the value to the screen.

out = dir("directory"); out = ls("directory");

Lists the files in the specified directory.

See AlsoSystem level

10.1.5 cd

Change directory.

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". Wheneveryou open an fsp file or run a script file, it will set theworking directory to the directory of the file opened.

See AlsoSystem level

10.1.6 pwd

Returns the current working directory.

Syntax Description

out = pwd; Returns the current working directory as a string.

See AlsoSystem level , currentfilename

10.1.7 cp

Copy a file.

Syntax Description

107

107

107 112

Page 113: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Scripting Language 111

© 2003 - 2009 Lumerical Solutions, Inc

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 AlsoSystem level , mv , pwd , copy (objects)

10.1.8 mv

Move a file.

Syntax Description

mv("file1","file2"); Moves file1 to file2. This function does not return any data.

cp("path1\file1","path2\file2");

Moves file1 in path1 to file2 in path2.

See AlsoSystem level , cp , pwd

10.1.9 exit

Exit the application.

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 AlsoSystem level

10.1.10 system

The system command is used to have the Operating System execute a command, ratherthan the script prompt.

Only available in FDTD Solutions.

107 111 110 166

107 110 110

107

Page 114: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Reference Guide112

© 2003 - 2009 Lumerical Solutions, Inc

Syntax Description

system("command"); Run the command prompt "command".

See AlsoSystem level

10.1.11 fileexists

Check if a file exists. The file extension must be specified. By default, the entire path willbe searched.

Syntax Description

out = fileexists("filename"); Returns 1 if the file existsReturns 0 if the file does not exist.

out =fileexists("c:\temp\file.txt");

Search for a file not in the path

See AlsoSystem level , getpath , which , pwd

10.1.12 currentfilename

Get the current filename and directory.

Syntax Description

out = currentfilename; Returns the current filename as a string. If the current filename is not defined, this function returnsan empty string "".

See AlsoSystem level , fileexists , getpath , which , pwd , fileextension ,filebasename , filedirectory

10.1.13 filebasename

Get the file basename from a string.

Syntax Description

out = filebasename("location/filename.ext" );

Returns the file basename as a string.

See Also

107

107 113 114 110

107 112 113 114 110 113

112 113

Page 115: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Scripting Language 113

© 2003 - 2009 Lumerical Solutions, Inc

System level , currentfilename , getpath , which , pwd

10.1.14 fileextension

Get the file extension from a string.

Syntax Description

out = fileextension("name.ext");

Returns the file extension as a string.

See AlsoSystem level , currentfilename , getpath , which , pwd

10.1.15 filedirectory

Get the file directory from a string.

Syntax Description

out = filedirectory("location/filename.ext" );

Returns the file directory as a string.

See AlsoSystem level , currentfilename , getpath , which , pwd

10.1.16 Run script

Run a script by typing its name. The file must be in the current path. The path alwayssearches the current directory first. A script file is not passed variables, and does notreturn variables. All scripts have access to all of the variables defined in the currentworkspace.

Syntax Description

filename; Run the script file filename.lsf, if it exists in the currentpath.A script does not have a return type.

See AlsoSystem level , getpath , addpath , which

10.1.17 getpath

Get the current path. The path always contains the current working directory.

Syntax Description

107 112 113 114 110

107 112 113 114 110

107 112 113 114 110

107 113 114 114

Page 116: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Reference Guide114

© 2003 - 2009 Lumerical Solutions, Inc

out = getpath; Returns the current path as a string. Use ?getpath; to print it to the screen.

See AlsoSystem level , addpath , which , pwd

10.1.18 addpath

Add a directory to the path.

Syntax Description

addpath("directory"); Adds a directory to the path. This function does not return any data.

See AlsoSystem level , getpath , which , pwd

10.1.19 which

Returns the full file pathname for the specified file. This is useful when checking whatscript file will run.

Syntax Description

out = which("filename"); Returns the pathname of the file "filename.lsf" as a string. Use ?which("filename"); to display the result to thescreen.

See AlsoSystem level , getpath , addpath , pwd , currentfilename , fileexists

10.1.20 pause

Pause program for a time.

Hit the space bar to force the script to continue. Hit the ESCAPE key to break the scriptat this point.

Syntax Description

pause(time); Pauses script for time, measured in seconds.This function does not return any data.

See Also

107 114 114 110

107 113 114 110

107 113 114 110 112 112

Page 117: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Scripting Language 115

© 2003 - 2009 Lumerical Solutions, Inc

System level , break , ESCAPE key

10.1.21 break

Stops a script from executing.

Syntax Description

break; Will stop a script file from executing at that line. A warningwill be generated.This function does not return any data.

See AlsoSystem level , ESCAPE key , pause

10.1.22 Excape key

Interrupts a script or long block of commands.

Syntax Description

ESCAPE key To interrupt a script file from running or a long block ofcommands 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 AlsoSystem level , break , pause

10.1.23 File IO background

The following commands are used to read and write data between files and FDTDSolutions. By defualt, FDTD Solutions saves its data in ldf (Lumerical Data Files) files. Anumber of other file formats are also supported, including text files, matlab files, andASAP files.

Data exported from FDTD Solutions is provided in the base units described in the Unitsand normalization section. When exporting the entire simulation dataset, the data isnot normalized to its continuous-wave response. The following units are used:· Distance in m

· Time in s

· Frequency in Hz

· E(t) in V/m

· H(t) in A/m

· E(w) in V/(m Hz)

· H(w) in A/m/Hz

· P(w) in W/(m2 Hz2)

107 115 115

107 115 114

107 115 114

20

Page 118: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Reference Guide116

© 2003 - 2009 Lumerical Solutions, Inc

See AlsoSystem level

10.1.24 format

The two format commands toggle the script interpreter between 2 output precision states.The commands print (?) and num2str() use this state to determine how many digits ofprecision to output.

Only available in FDTD Solutions.

Syntax Description

format long; Set script interpreter to 16 digits of precision.

format short; Set script interpreter to 6 digits of precision.

See AlsoSystem level , num2str , ?

10.1.25 loaddata

Loads workspace variables or d-card data from a Lumerical data file (ldf) file. If anycurrent variables exist with the same names as those in the file, the current values will beoverwritten.

Syntax Description

loaddata("filename"); Reads data script variables or d-card data from thespecified file. This function does not return any data.

See AlsoSystem level , savedata , savedcard , workspace , showdata

10.1.26 savedata

Saves workspace variables to a Lumerical data file (ldf) file.

Syntax Description

savedata("filename"); Saves all current variables to the specified file. This function does not return any data.

savedata("filename", var1,var2,...);

Saves only variables with the specified names to file.

107

107 137 139

107 116 117 129 180

Page 119: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Scripting Language 117

© 2003 - 2009 Lumerical Solutions, Inc

See AlsoSystem level , savedcard , loaddata , workspace , lum2mat

10.1.27 savedcard

Saves d-card data to a Lumerical data file (ldf) file. D-cards are generally used to storemonitor data.

Syntax Description

savedcard("filename"); Saves all current d-cards (local and global) to thespecified ldf file.This function does not return any data.

savedcard("filename","name1", "name2",...);

Saves only the d-cards with the specified names,"name1", "name2", etc.

See AlsoSystem level , savedata , loaddata , showdata , lum2mat

10.1.28 readdata

You can import numerical values stored in text files with the readdata command. Thiscommand will read a file with data in a row/column format. The data must be correctlyformatted so each row has the same number of columns. Readdata will ignore any linethat begins with a letter.

Syntax Description

M=readdata("filename.txt"); Will load the text file filename into matrix variable M. Anylines starting with a letter are ignored.

See AlsoSystem level , rm , write

10.1.29 write

Writes string variables to text files or to standard output.

Typically the write command is used to output data to a text file. If the specified file doesnot exist, it will be created. If it does exist, then the output string will be appended to theend of the file. The write command will automatically add a new line character at the endof the string.

On Linux systems only, the write command will output to the standard output (stdout) if afilename is not specified. The write command can only write to standard output in FDTDSolutions.

107 117 116 129 121

107 116 116 180 121

107 109 117

Page 120: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Reference Guide118

© 2003 - 2009 Lumerical Solutions, Inc

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 totestfile.txt.This function does not return any data.

See AlsoSystem level , readdata , rm , num2str , ? , endl , format

10.1.30 asapexport

Exports the desired monitor to a file for interfacing with BRO's ASAP. These files arecalled fld files. The monitor must be a frequency power or a frequency profile monitor.

Syntax Description

asapexport("monitorname");

Export data from monitorname. By default, the firstfrequency 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, "filename");

Exports to the specified "filename" without opening a filebrowser window.

See AlsoSystem level , asapload , asapimport , addimportedsource

10.1.31 asapload

Load data from an fld file from BRO's ASAP. asapload creates a d-card structure called"fld_data" which contains all the data in the file. If "fl_data" exists, it will be called"fl_data_2". After loading an asapfile with asapload, you can extract any desired data.Data can be · Ex, Ey, Ez, Hx, Hy, Hz, x, y, z · power, frequency, wavelength, index

Syntax Description

asapload; 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 filebrowser.

107 117 109 137 139 139 116

107 118 119 205

Page 121: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Scripting Language 119

© 2003 - 2009 Lumerical Solutions, Inc

See AlsoSystem level , asapexport , asapimport , addimportedsource

10.1.32 asapimport

Import an ASAP fld file into an ASAP source. This is equivalent to editing the propertiesof the ASAP source, and clicking on the READ ASAP SOURCE button.

Syntax Description

asapimport( "sourcename"); Imports the fld file into the sourcename source. A filebrowser will open to select the file.This function does not return any data.

asapimport( "sourcename","filename");

Specify the file to open.

See AlsoSystem level , asapexport , asapload , addimportedsource

10.1.33 gdsimport

Import a layer from a GDSII file into the layout environment. This is equivalent toperforming a GDSII import through the FILE->IMPORT menu. See the Reference Guide- Layout editor chapter for more information.

Syntax Description

gdsimport("filename","cellname", layer);

Imports the specified layer from the specified cell in thespecified file into the current simulation environment. Theobjects created will have their material set to an objectdefined dielectric. In 3D, the 2D geometric data will beextruded to default values in the Z dimension

gdsimport("filename","cellname", layer,"material");

Same as the above command, but the material of theimported object will be set to the value specified.

gdsimport("filename","cellname", layer,"material", zmin, zmax);

This form of the command is only allowed in 3D layouts.The behavior is the same as the above command, but thestructures will be extruded in the Z dimension to thespecified z min and z max values

Parameter Type Description

filename string name of GDSII file to import. May contain completepath to file, or path relative to current workingdirectory

107 118 119 205

107 118 118 205

Page 122: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Reference Guide120

© 2003 - 2009 Lumerical Solutions, Inc

cellname string the name of the cell to import from the GDSII file

layer numberor string

the layer number from the GDSII file to import. Ifonly elements matching a certain data type aredesired, this can be specified by using a string ofthe form:

"6:2"where the desired layer is 6 and the desired datatype is 2.

material string a valid name of a material in your current layoutenvironment. Partial names of materials can bematched starting at the beginning of the string. Forexample, "Al (3" would match "Al (300nm)".

z min number the minimum z value for extruding 2D GDSII datainto 3D objects

z max number the maximum z value for extruding 2D GDSII datainto 3D objects

See AlsoSystem level , setnamed

10.1.34 matlabsave

Save workspace data to Matlab .mat data files.

Matlab has recently changed its .mat file format. The primary advantage is that the newformat supports files larger than 2GB. Matlab 7.3 is the first version to support the newformat, but can also read the previous file format. All Matlab Pre 7.3 cannot read the newformat.

There is currently no option to this function to cause a version 7.3 Matlab .mat file to bewritten. This command can only produce the older format .mat file. For more informationabout the Matlab file formats and how to save to a version 7.3 .mat file refer to thelum2mat script commmand.

Only available in FDTD Solutions.

Syntax Description

matlabsave("filename"); Saves all current variables to the specified .mat file. This function does not return any data.

matlabsave("filename",var1, ..., varN);

Saves only variables with the specified names to the .matfile.

107 168

Page 123: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Scripting Language 121

© 2003 - 2009 Lumerical Solutions, Inc

See Also System level , lum2mat , lum2mat command line , matlabput

10.1.35 lum2mat

Convert Lumerical .ldf, .fsp, .lms files into Matlab .mat data files.

The name of the Matlab file will be the same name as the input file, but with a .mat fileextension. Within the Matlab file, source/monitor data is stored in named variables. All ofthe names of variables associated with a particular monitor/source are prefixed with themonitor/source name, as set in the monitor/source properties. The remainder of thevariable name describes the contents of the data, such as EM field components, spatialcoordinates, time vectors and frequency vectors.

When exporting script variables to Matlab file, they will appear in the Matlab workspacewith the same name as in the Lumerical scripting workspace.

Matlab has recently changed its .mat file format. The primary advantage is that the newformat supports files larger than 2GB. Matlab 7.3 is the first version to support the newformat. Matlab 7.3 can also read the previous file format. All Matlab Pre 7.3 canhgnotread the new format.

The 64-bit version of FDTD Solutions exports to the new Matlab file format by default. The 32-bit version of FDTD Solutions exports to the Matlab Pre 7.3 file format by default.The defaults can be overridden with an extra option added to the command.

For more information about Matlab, please see:http://www.mathworks.com/products/matlab/For information on how to use the Matlab output file please see:http://www.mathworks.com/access/helpdesk/help/techdoc/ref/load.shtml#

Syntax Description

lum2mat ("filename"); Will convert the data in a lumerical file named "filename"to a Matlab .mat file with the same name. The filenameshould specify the extension, valid extensions are "ldf","fsp", and "lms".This function does not return any data.

lum2mat("filename",option);

Option · 1 : export to new Matlab file format · 2 : export to Matlab Pre 7.3 file format

See AlsoSystem level , lum2mat command line , matlab , loaddata , savedata ,savedcard , showdata

107 121 122 124

107 122 122 116 116

117 180

Page 124: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Reference Guide122

© 2003 - 2009 Lumerical Solutions, Inc

10.1.36 lum2mat command line

Convert Lumerical .ldf, .fsp, .lms files into Matlab .mat data files.

By default, the command line version of lum2mat uses the Matlab Pre 7.3 file formatwhen creating .mat files. If the option -v73 is included, the new file format is used.

For more information, please see the lum2mat help.

Syntax Description

lum2mat filename Convert the data in a Lumerical file named "filename" to aMatlab .mat file with the same name. filename should include the file extension; validextensions are "ldf", "fsp", and "lms".

lum2mat -nw filename No graphical window option.

lum2mat -v73 filename Use the new Matlab file format introduced in version 7.3. The default option is the previous file format.

See AlsoSystem level , lum2mat

10.1.37 matlab

Runs a MATLAB command from the FDTD Solutions script prompt. This gives access toextended mathematical and visualization functionality from the FDTD Solutions scriptenvironment. If MATLAB is not installed, this function will return an error.

The first time a MATLAB function (matlab, matlabget or matlabput) is called, a MATLABsession will be started and a connection will be established with the Lumerical scriptingenvironment. Once this connection is established, MATLAB commands can be run usingthe matlab function. It is important to understand that the MATLAB and FDTD Solutionsworkspaces are completely separate and independent. A MATLAB command cannot acton a variable defined in the FDTD Solutions workspace, and vice-versa. Variables mustbe passed between the workspaces using the matlabget and matlabput functions. At anytime you may examine the MATLAB workspace or interact with the MATLAB environmentby typing commands at the MATLAB script prompt.

The output from the MATLAB commands will be printed at the FDTD Solutions scriptprompt. One limitation of the matlab function is that no error reporting is provided to eitherthe FDTD script prompt or the MATLAB prompt. MATLAB commands should be testedby typing them directly into the MATLAB prompt before they are used in FDTD Solutions.

When using a number of MATLAB commands together, it is recommended that thecommands are stored in a MATLAB m-file. Instead of embedding many commands into asingle matlab script function call, you may simply call the m-file with the matlab script

107 121

Page 125: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Scripting Language 123

© 2003 - 2009 Lumerical Solutions, Inc

command. Using MATLAB m-files in this way will allow you to interactively test yourMATLAB code at the MATLAB script prompt before running it from FDTD Solutions.

Supported MATLAB versionsThis function requires that MATLAB version 7.0 (2004) or newer to be installed on thecomputer. Also, please remember that 32 bit and 64 bit applications can not be mixed. For example, if you have the 32 bit version of MATLAB, then you MUST use the 32 bitversion of FDTD. NOTE: The student version of MATLAB is 32 bit.To check if the Matlab script integration is enabled, select the Help - Matlab integrationstatus menu option. This window will report that the script integration is active or inactive. If FDTD is unable to establish a connection with MATLAB, even when a supportedversion is installed, try re-installing MATLAB, then reinstalling FDTD in their respectivedefault directories. This usually fixes the problem. If not, please contact Lumericalsupport.

Syntax Description

matlab("command"); command: a string containing one or more valid MATLABcommands.

matlab(" command_1 command_2");

Multi-line strings can be used in script files to contain ablock of MATLAB commands. Multi-line strings are notsupported at the script command prompt.

See AlsoSystem level , matlabget , matlabput , lum2mat

10.1.38 matlabget

Copies a variable from the MATLAB workspace to the FDTD Solutions workspace. Theresulting variable in the FDTD Solutions workspace will have the same name as inMATLAB, and will overwrite any existing variable with the same name. If the variable doesnot exist in MATLAB, the command will return an error. For more information, please seethe matlab command description.

Syntax Description

matlabget(var1,var2,...varN);

The arguments to this command are one or more variablenames that refer to variables in the MATLAB workspace.This function does not return any data.

See AlsoSystem level , matlab , matlabput

107 123 124 121

107 122 124

Page 126: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Reference Guide124

© 2003 - 2009 Lumerical Solutions, Inc

10.1.39 matlabput

Copies a variable from the FDTD Solutions workspace to the MATLAB workspace. Theresulting variable in the MATLAB workspace will have the same name as in FDTDSolutions, and will overwrite any existing variable with the same name. If the variabledoes not exist in FDTD Solutions, the command will return an error. For more information,please see the matlab command description.

Syntax Description

matlabput(var1,var2,...varN);

The arguments to this command are one or more variablenames that refer to variables in the Mode Solutionsworkspace.This function does not return any data.

See AlsoSystem level , matlab , matlabget

10.2 Manipulating variablesThe following commands are used to create and access variables.

Command Description

= Assignment operator.

: Array operator.

[] Create matrix.

% Create variable with space in the name

linspace Creates a linear spaced array.

matrix Creates a matrix filled with zeros.

randmatrix Creates a matrix with all elements randomly setbetween 0 and 1

meshgridx Create a 2D meshgrid in x direction.

meshgridy Create a 2D meshgrid in y direction.

meshgrid3dx Create a 3D meshgrid in x direction.

meshgrid3dy Create a 3D meshgrid in y direction.

meshgrid3dz Create a 3D meshgrid in z direction.

clear Clears all stored script variables from memory.

workspace Returns a string of all the currently defined scripting

107 122 123

125

125

125

126

126

126

127

127

127

127

128

128

128

129

Page 127: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Scripting Language 125

© 2003 - 2009 Lumerical Solutions, Inc

variables.

Matrix elements How to assign and access matrix elements.

Matrix operations Describes how operators and functions act onmatrices.

Pre-defined constants List of pre-defined constants.

10.2.1 =

Assignment operators.

Syntax Description

x = 5+2i; Assign a value to a variable.

See AlsoManipulating variables , ==

10.2.2 :

Array operator.

Syntax Description

x = 2 : 10; x will be an array of numbers that start at 2 and increaseby 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, andconsecutive elements decrease by 1.5. All elements willbe >=2. In this example, the array will be [6, 4.5, 3].

See AlsoManipulating variables , linspace

10.2.3 []

Specify matrix element by element.

Only available in FDTD Solutions.

Command Description

x = [u11,...,u1N; u21,...,u2N;uM1,...,uMN]

Create an N by M matrix. Columns are separatedwith semicolons. Elements in a row are separatedwith commas. The entries can either be scalars or

129

130

130

124 133

124 126

Page 128: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Reference Guide126

© 2003 - 2009 Lumerical Solutions, Inc

matrices of compatible dimension.

See AlsoManipulating variables , linspace , matrix

10.2.4 %

Used to create variables with spaced in the names.

Only available in FDTD Solutions.

Command Description

%variable with space% To create a variable name that contains spaces,such as "variable with space", put a percentage signbefore and after the variable name.

See AlsoManipulating variables ,

10.2.5 linspace

Creates a linearly spaced array.

Syntax Description

x = linspace(min,max,num); x will be an array with num elements, linearly spacedbetween min and max. If num is set to 1, then x will be theaverage of min and max.

See AlsoManipulating variables , : , []

10.2.6 matrix

Initialize a matrix. All elements are set to zero.

Syntax Description

x = matrix(i,j,k,....); Initializes an i x j x k x .... matrix.

See AlsoManipulating variables , linspace , []

124 126 126

124

124 125 125

124 126 125

Page 129: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Scripting Language 127

© 2003 - 2009 Lumerical Solutions, Inc

10.2.7 randmatrix

Initialize a matrix. All elements are random numbers between 0 and 1.

Syntax Description

x = randmatrix(i,j,k,....); Initializes an i x j x k x .... matrix. The elements are allrandom numbers between 0 and 1.

See AlsoManipulating variables , matrix , rand , randreset

10.2.8 meshgridx

Create a 2D meshgrid in the x direction

Syntax Description

out = meshgridx(x,y); If x and y are single column (or single row vectors), ofdimension nX1 and mX1 respectively, the command · X = meshgridx(x,y); Will create a 2D matrix of dimension nXm whereX(i,j)=x(i).

See AlsoManipulating variables , image , meshgridy , meshgrid3dx

10.2.9 meshgridy

Create a 2D meshgrid in the y direction

Syntax Description

out = meshgridy(x,y); If x and y are single column (or single row vectors), ofdimension nX1 and mX1 respectively, the command · Y = meshgridy(x,y); Will create a 2D matrix of dimension nXm whereY(i,j)=y(j).

See AlsoManipulating variables , image , meshgridx , meshgrid3dx

10.2.10 meshgrid3dx

Create a 3D meshgrid in the x direction

Syntax Description

124 126 156 156

124 159 127 127

124 159 127 127

Page 130: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Reference Guide128

© 2003 - 2009 Lumerical Solutions, Inc

out = meshgrid3dx(x,y,z); The 3D version of meshgridx and meshgridy.

See AlsoManipulating variables , meshgridx , meshgridy , meshgrid3dy , meshgrid3dz

10.2.11 meshgrid3dy

Create a 3D meshgrid in the y direction

Syntax Description

out = meshgrid3dy(x,y,z); The 3D version of meshgridx and meshgridy.

See AlsoManipulating variables , meshgridx , meshgridy , meshgrid3dx , meshgrid3dz

10.2.12 meshgrid3dz

Create a 3D meshgrid in the z direction

Syntax Description

out = meshgrid3dz(x,y,z); The 3D version of meshgridx and meshgridy.

See AlsoManipulating variables , meshgridx , meshgridy , meshgrid3dx , meshgrid3dy

10.2.13 clear

Clears all stored workspace variables. This will not clear any simulation data stored ind-cards. The variables c, pi, eps0, mu0 will be reset to their default values.

Syntax Description

clear; Clears all workspace variables.This function does not return any data.

See AlsoManipulating variables , cleardcard

124 127 127 128

128

124 127 127 127

128

124 127 127 127

128

124 181

Page 131: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Scripting Language 129

© 2003 - 2009 Lumerical Solutions, Inc

10.2.14 workspace

Returns a list of all the currently defined variables in the scripting workspace.

Syntax Description

out = workspace; Returns a string that lists all currently defined variables inthe workspace.Use ?workspace; to print this to the screen.

See AlsoManipulating variables , showdata

10.2.15 Accessing and assigning matrix elements

Accessing and assigning matrix elements.

The square brackets method of defining matrices is only available in FDTD solutions.

Command Description

x = [u; v; w] Create a column vector. u,v,w can either be scalarsor matrices of compatible dimension.

x = [u, v, w] Create a row vector. u,v,w can either be scalars ormatrices 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 theassignment A(I,...) = B, if B is not a scalar, thesub-matrix A(I,...) must be the same same size asB. If B is a scalar, then all the values of thesub-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);x(4)=7;

Multi-dimension matrices can be accessed with asingle index.

x=y(z); Indices stored in matrix (z) used to select elementsof matrix y. length(x) will equal length(z).

See AlsoManipulating variables

124 180

124

Page 132: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Reference Guide130

© 2003 - 2009 Lumerical Solutions, Inc

10.2.16 Matrix operators

Almost all the scripting functions will act element by element on matrices. Single numbersare treated as matrices of dimension 1x1. The following table provides some examples.

Dimension ofx

Dimension ofy

Operation Dimension ofz

Value of z

1x1 N/A z = sin(x) 1x1 z11 = sin(x11)

1x1 1x1 z = x * y 1x1 z11 = x11 * y11

10x10 1x1 z = x * y 10x10 Zij = xij * y11

10x10 10x10 z = x * y 10x10 Zij = xij * yij

10x10 11x11 z = x * y Error Error

See AlsoManipulating variables

10.2.17 Pre-defined constants

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.

See AlsoManipulating variables

10.3 OperatorsStandard mathematical and string operators.

Algebraic operators

Command Description

* Multiplication. Ex: y = x * z;

/ Division. Ex: y = x / z;

+ Addition. Ex: y = x + z;

124

124

132

132

132

Page 133: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Scripting Language 131

© 2003 - 2009 Lumerical Solutions, Inc

- Subtraction. Ex: y = x – z;

- Negative. Ex: y = -x;

^ Power. Ex: y = x^3;In expression A^B, if B is complex, the phase of A isevaluated from -p to p.

Logical and relational operators

Command Description

== Comparison.

almostequal Almost equal comparison operator.

!= Not equal.

<= Less than or equal to.

>= Greater than or equal to.

< Less than.

> Greater than.

& AND.

and AND.

| OR.

or OR.

! NOT.

~ NOT.

String operators

Command Description

num2str Convert number to a string.

" Create a string variable.

' Create a string variable.

+ Add strings

endl end of line character.

Output to screen

132

132

133

133

133

134

134

134

135

135

135

135

136

136

136

137

137

137

138

132

139

Page 134: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Reference Guide132

© 2003 - 2009 Lumerical Solutions, Inc

Command Description

? Display output on screen.

script file comments Comment script files with #

10.3.1 *

Multiplication.

Syntax Description

y = x * z; Multiply x and z.

See AlsoOperators , * , / , + , - , ^

10.3.2 /

Division.

Syntax Description

y = x / z; Divide x by z.

See AlsoOperators , * , / , + , - , ^

10.3.3 +

Addition.

Syntax Description

y = x + z; Add x and z.

y = string1 + string2; Concatenate strings together.

See AlsoOperators , * , / , + , - , ^ ,

10.3.4 -

Subtraction, or negative.

Syntax Description

y = x - z; Subtract z from x.

139

139

130 132 132 132 132 133

130 132 132 132 132 133

130 132 132 132 132 133

Page 135: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Scripting Language 133

© 2003 - 2009 Lumerical Solutions, Inc

y = -x; Negative

See AlsoOperators , * , / , + , - , ^

10.3.5 ^

Power. In expression A^B, if B is complex, the phase of A is evaluated from -p to p.

Syntax Description

y = x^3; x cubed.

See Also Operators , * , / , + , - , ^

10.3.6 ==

Logical comparison. This operators can be used with complex numbers and strings.

Syntax Description

out = y == x; Returns 1 if x and y are equal. Returns 0 otherwise.

See AlsoOperators , = , almostequal , != , <= , >= , < , > , & , and , |, or , ! , ~

10.3.7 almostequal

Almost equal comparison operator. When using floating point numbers (rather thanintegers), two values that are meant to be equal may not be exactly equal due to roundingerrors that are always present in floating point calculations. In such cases, the almostequal function can be useful.

Only available in FDTD Solutions.

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 diff);

Returns 1 if ½A - B½ is less than or equal to ½A + B½/2times relative diff. Returns 0 otherwise.

out = almostequal(A, B,relative diff, absolute diff);

Returns 1 if ½A - B½ is less than or equal to ½A + B½/2times relative diff or if ½A - B½ is less than or equal toabsolute diff. Returns 0 otherwise.

130 132 132 132 132 133

130 132 132 132 132 133

130 125 133 134 134 134 135 135 135 135 136

136 136 137

Page 136: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Reference Guide134

© 2003 - 2009 Lumerical Solutions, Inc

See AlsoOperators , = , == , != , <= , >= , < , > , & , and , | , or , !

, ~

10.3.8 !=

Not equal to comparison operator. Returns 1 if values are not equal. Returns 0 if valuesare equal. This operator can be used in matrix operations. This operators can be usedwith complex numbers.

Syntax Description

out = a!=b; If a is not equal to b, then out equals 1. Otherwise outequals 0.

See AlsoOperators , == , almostequal , <= , >= , < , > , & , and , | , or

, ! , ~

10.3.9 <=

Logical less than or equal to. Imaginary components of x and y are ignored.

Syntax Description

out = y <= x; Less than or equal to.

See AlsoOperators , == , != , almostequal , >= , < , > , & , and , | , or

, ! , ~

10.3.10 >=

Logical greater than or equal to. Imaginary components of x and y are ignored.

Syntax Description

out = y >= x; Greater than or equal to.

See AlsoOperators , == , != , <= , almostequal , < , > , & , and , | , or

, ! , ~

130 125 133 134 134 134 135 135 135 135 136 136

136 137

130 133 133 134 134 135 135 135 135 136

136 136 137

130 133 134 133 134 135 135 135 135 136

136 136 137

130 133 134 134 133 135 135 135 135 136

136 136 137

Page 137: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Scripting Language 135

© 2003 - 2009 Lumerical Solutions, Inc

10.3.11 <

Logical less than. Imaginary components of x and y are ignored.

Syntax Description

out = y < x; Less than.

See AlsoOperators , == , != , <= , >= , almostequal , > , & , and , | , or

, ! , ~

10.3.12 >

Logical greater than. Imaginary components of x and y are ignored.

Syntax Description

out = y > x; Greater than.

See AlsoOperators , == , != , <= , >= , < , almostequal , & , and , | , or

, ! , ~

10.3.13 &

Logical AND. Imaginary components of x and y are ignored.

Syntax Description

out = y & x; If the real part of either or both of x,y are zero, then return0. Otherwise return 1.

y and x; Same as &.

See AlsoOperators , == , != , <= , >= , < , > , & , and , | , or , ! , ~

10.3.14 and

Logical AND. Imaginary components of x and y are ignored.

Syntax Description

out = y & x; If the real part of either or both of x,y are zero, then return0. Otherwise return 1.

130 133 134 134 134 133 135 135 135 136

136 136 137

130 133 134 134 134 135 133 135 135 136

136 136 137

130 133 134 134 134 135 135 135 135 136 136 136

137

Page 138: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Reference Guide136

© 2003 - 2009 Lumerical Solutions, Inc

y and x; Same as &.

See AlsoOperators , == , != , <= , >= , < , > , & , and , | , or , ! , ~

10.3.15 |

Logical OR. Imaginary components of x and y are ignored.

Syntax Description

out = y | x; If the real part of either or both of x,y is non-zero, thenreturn 1. Otherwise return 0.

y or x; Same as |.

See AlsoOperators , == , != , <= , >= , < , > , & , and , | , or , ! , ~

10.3.16 or

Logical OR. Imaginary components of x and y are ignored.

Syntax Description

out = y | x; If the real part of either or both of x,y is non-zero, thenreturn 1. Otherwise return 0.

y or x; Same as |.

See AlsoOperators , == , != , <= , >= , < , > , & , and , | , or , ! , ~

10.3.17 !

Logical NOT operator. If a value is 0, then NOT returns 1. For all other values, NOTreturns 0. NOT(A) is equivalent to A==0, where == is the comparison operator.

Only available in FDTD Solutions.

Syntax Description

out = !a; applies logical not operator to a

out = ~a; applies logical not operator to a

130 133 134 134 134 135 135 135 135 136 136 136

137

130 133 134 134 134 135 135 135 135 136 136 136

137

130 133 134 134 134 135 135 135 135 136 136 136

137

Page 139: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Scripting Language 137

© 2003 - 2009 Lumerical Solutions, Inc

See AlsoOperators , == , != , <= , >= , < , > , & , and , | , or , ! , ~

10.3.18 ~

Logical NOT operator. If a value is 0, then NOT returns 1. For all other values, NOTreturns 0. NOT(A) is equivalent to A==0, where == is the comparison operator.

Only available in FDTD Solutions.

Syntax Description

out = !a; applies logical not operator to a

out = ~a; applies logical not operator to a

See AlsoOperators , == , != , <= , >= , < , > , & , and , | , or , ! , ~

10.3.19 num2str

Convert an integer, floating point number, or matrix into a string. Use the format scriptcommand to change the precision of the output.

Syntax Description

out = num2str(x); Converts the number x into a string. x can also be a 1Dor 2D matrix.

See AlsoOperators , " , + , ? , endl , write , format

10.3.20 "

String operator. Strings can be created with single or double quotes.

The following escape sequences are recognized when creating strings with doublequotes:\" double quotes in string\n newline (linefeed) character in string\\ backslash in string

Double quotes within strings are only available in FDTD Solutions.Strings created with single quotes are only available in FDTD Solutions.

Syntax Description

out="my string"; use double quotes to create strings

130 133 134 134 134 135 135 135 135 136 136 136

137

130 133 134 134 134 135 135 135 135 136 136 136

137

130 137 132 139 139 117 116

Page 140: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Reference Guide138

© 2003 - 2009 Lumerical Solutions, Inc

NOTE: Literal backslashes and double quotesIt is always possible to create a literal backslash in a string with \\. However, \ alsoresults in a literal backslash, IF it it will not be interpreted as part of an escapesequence (\n, \", \\). This note is important when storing paths in strings.

Suppose we want to create the string C:\Program Files\Lumerical. Thefollowing three commands are valid and equivalent:mystring = 'C:\Program Files\Lumerical'; # use single quotesmystring = "C:\Program Files\Lumerical"; # use double quotesmystring = "C:\\Program Files\\Lumerical"; # use double quotesand \\ 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 followingtwo commands are valid and equivalent:mystring = 'C:\Program Files\Lumerical\'; # use singlequotesmystring = "C:\\Program Files\\Lumerical\\"; # use doublequotes and \\ escape character

The other potential command, where we use a single backslash, is not valid syntax andwill result in an error.mystring = "C:\Program Files\Lumerical\"; # use doublequotes

The problem is that the script interpreter will interpret the final \" as an escape characterfor 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 nodouble quote character closing the string.

See AlsoOperators , ' , num2str , + , endl , write

10.3.21 '

String operator. Strings can be created with single or double quotes.

The following escape sequences are recognized when creating strings with single quotes:'' single quote in string

Only available in FDTD Solutions.

Syntax Description

out='my string'; use single quotes to create strings

See Also

130 138 137 132 139 117

Page 141: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Scripting Language 139

© 2003 - 2009 Lumerical Solutions, Inc

Operators , " , num2str , + , endl , write

10.3.22 endl

Add an end of line character to a string

Syntax Description

out = "line1"+endl+"line2"; Add an end of line character to the string.

See AlsoOperators , num2str , + , " , write

10.3.23 ?

Print output to the screen. Use the format script command to change the precision of theoutput.

Syntax Description

?command; Displays the output of the command on the screenThis function does not return any data.

See AlsoSystem level , write , format

10.3.24 comments

Use the # character to comment script files. Anything after the # character is ignored. The comments are not displayed when the script file is run. Comments can not be usedwhen typing commands directly into the script prompt.

Syntax Description

x=1; # set x to 1 Anything after the # character is ignored.

See AlsoSystem level ,

10.4 FunctionsStandard mathematical and matrix functions.

Trigonometric and complex

Command Description

sin Trigonometric sin function.

130 137 137 132 139 117

130 137 132 137 117

107 117 116

107

141

Page 142: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Reference Guide140

© 2003 - 2009 Lumerical Solutions, Inc

cos Trigonometric cos function.

tan Trigonometric tan function.

asin Inverse trigonometric sin function.

acos Inverse trigonometric cos function.

atan Inverse trigonometric tan function.

atan2Same as atan, but returns angle in correct quadrant.

real Returns the real part of variable

imag Returns the imaginary part of variable

conj Complex conjugate

abs Absolute value

angle Phase of a complex number.

unwrap Removes phase difference of more than 2p

Logarithmic, exponential and power

Command Description

log The natural logarithm. Input can be complex ornegative.

log10 The log, base 10. Input can be complex ornegative.

sqrt The square root.

exp The exponential.

Matrix functions

Command Description

size Returns the dimensions of a matrix.

length Returns the total number of elements in a matrix.

pinch Remove singleton dimensions from a matrix

sum The sum of a matrix

max The max value in a matrix

min The min value in a matrix

142

142

142

143

143

143

143

144

144

144

144

145

145

145

145

146

146

146

146

147

147

147

Page 143: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Scripting Language 141

© 2003 - 2009 Lumerical Solutions, Inc

dot The dot product of two vectors

cross The cross product of two vectors

flip Flip a matrix in one dimension

interp Linear interpolation function

spline Cubic spline interpolation

integrate Integrate a matrix

find Find values that satisfy a condition in a matrix

findpeaks Find peaks in a matrix

transpose Transpose a matrix

ctranspose Transpose a matrix, and do complex conjugate.

See alsoManipulating variables

Frequency and time-domain

Command Description

fft Fast Fourier transform.

fftw Returns the angular frequency vector.

fftk Returns the spatial wavevector kx.

invfft Inverse fft.

czt Chirped z-transform.

Miscellaneous

Command Description

round Rounds to the nearest integer.

rand Returns a uniformly distributed random numberbetween 0 and 1.

randreset Resets the random number seed.

10.4.1 sin

Trigonometric sine function. Angle units are in radians. Function is defined for complexangles. Phase of a complex number is evaluated between -p and p.

Syntax Description

148

148

148

149

149

150

150

124

150

152

153

154

155

155

156

156

Page 144: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Reference Guide142

© 2003 - 2009 Lumerical Solutions, Inc

out = sin(x); Returns the complex sine of x.

See Also Functions , asin

10.4.2 cos

Trigonometric cosine function. Angle units are in radians. Function is defined forcomplex angles. Phase of a complex number is evaluated between -p and p.

Syntax Description

out = cos(x); Returns the complex cosine of x.

See Also Functions , acos

10.4.3 tan

Trigonometric tangent function. Angle units are in radians. Function is defined forcomplex angles. Phase of a complex number is evaluated between -p and p.

Syntax Description

out = tan(x); Returns the complex tangent of x.

See Also Functions , atan , atan2

10.4.4 asin

Inverse trigonometric sine function. Angle units are in radians. Function is defined forcomplex values. Phase of a complex number is evaluated between -p and p. If x iscomplex, or abs(x) > 1, the following equation is used: asin(x) = -i ln( ix + sqrt(1-x^2))

Syntax Description

out = asin(x); Returns the complex arcsine of x.

See Also Functions , sin

139 142

139 143

139 143 143

139 141

Page 145: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Scripting Language 143

© 2003 - 2009 Lumerical Solutions, Inc

10.4.5 acos

Inverse trigonometric cosine function. Angle units are in radians. Function is defined forcomplex values. Phase of a complex number is evaluated between -p and p. If x iscomplex, or abs(x) > 1, the following equation is used: acos(x) = -i ln( x + i sqrt( 1-x^2))

Syntax Description

out = acos(x); Returns the complex arccosine of x.

See Also Functions , cos

10.4.6 atan

Inverse trigonometric tangent function. Angle units are in radians. Function is defined forcomplex values. Phase of a complex number is evaluated between -p and p. If x iscomplex, or abs(x) > 1, the following equation is used: atan(x) = 0.5 i ln( (i+x)/(i-x) )

Syntax Description

out = atan(x); Returns the complex arctangent of x.

See Also Functions , atan2 , tan

10.4.7 atan2

Inverse trigonometric tangent function, calculates the arctangent of y/x, but returns theangle in the correct quadrant. Angle units are in radians. Function is defined for realvalues only.

Syntax Description

out = atan2(y,x); x,y must be real.

See Also Functions , atan , tan

10.4.8 real

Returns the real part of a number or matrix.

Syntax Description

139 142

139 143 142

139 143 142

Page 146: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Reference Guide144

© 2003 - 2009 Lumerical Solutions, Inc

out = real(x); Returns the real part of x.

See Also Functions , imag

10.4.9 imag

Returns the imaginary part of a number or matrix.

Syntax Description

out = imag(x); Returns the imaginary part of x.

See Also Functions , real , conj

10.4.10 conj

Returns the complex conjugate of a number or matrix.

Syntax Description

out = conj(x); Returns the complex conjugate of x.

See Also Functions , real , imag

10.4.11 abs

Returns the absolute value of a number or matrix.

Syntax Description

out = abs(x); Returns the absolute value of x.

See Also Functions , real , imag

10.4.12 angle

Returns the angle or phase of a complex number or matrix in radians.

Syntax Description

out = angle(x); Returns the phase of x.

See Also

139 144

139 143 144

139 143 144

139 143 144

Page 147: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Scripting Language 145

© 2003 - 2009 Lumerical Solutions, Inc

Functions , real , imag , unwrap

10.4.13 unwrap

Removes changes of more than 2p from a 1D array. It can be useful after angle(x) to seephase without discontinuities.

Syntax Description

out = unwrap(x); Return the values of x without discontinuities.

See Also Functions , real , imag , angle

10.4.14 log

The natural logarithm. Input can be complex or negative.

Syntax Description

out = log(x); The natural logarithm. Input can be complex or negative.

See Also Functions , log10

10.4.15 log10

The log, base 10. Input can be complex or negative.

Syntax Description

out = log10(x); The log, base 10. Input can be complex or negative.

See Also Functions , log

10.4.16 sqrt

The square root.

Syntax Description

out = sqrt(x); The square root.

See Also Functions , ^

139 143 144 145

139 143 144 144

139 145

139 145

139 133

Page 148: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Reference Guide146

© 2003 - 2009 Lumerical Solutions, Inc

10.4.17 exp

The exponential.

Syntax Description

out = exp(x); The exponential.

See Also Functions , log , ^

10.4.18 size

Returns the size of a matrix.

Syntax Description

y = size(x); y is a matrix which shows the dimensions of x.

See Also Functions , length , flip

10.4.19 length

Returns the number of elements in a matrix.

Syntax Description

y = length(x); y the number of elements in a matrix. For example, if x isan n by m matrix, y = length( x ) = n * m.

See AlsoFunctions , size

10.4.20 pinch

Removes all singleton dimensions from a matrix.

Syntax Description

out = pinch(x); Removes all singleton dimensions. For example, if x is amatrix 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

139 145 133

139 146

139 146

Page 149: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Scripting Language 147

© 2003 - 2009 Lumerical Solutions, Inc

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 specificindex for the dimension being removed. If x is anNxMxKxP matrix then · y=pinch(x,2,4); will return an NxKxP matrix where · y(i,j,k) = x(i,4,j,k)

See AlsoFunctions , find , size , flip

10.4.21 sum

Sum of elements in a matrix.

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.

See AlsoFunctions

10.4.22 max

The maximum value in a matrix.

Syntax Description

out = max(x); The maximum value in a matrix.

See AlsoFunctions

10.4.23 min

The minimum value in a matrix.

Syntax Description

out = min(x); The minimum value in a matrix.

139 149 146

139

139

Page 150: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Reference Guide148

© 2003 - 2009 Lumerical Solutions, Inc

See AlsoFunctions

10.4.24 interp

Linear interpolation of a data set.

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 does not have to be within the bounds ofxold.

interp(Ex, xold, yold, xnew,ynew);

The 2D version of interp.

interp(Ex, xold, yold, zold,xnew, ynew, znew);

The 3D version of interp.

See Also Functions , spline

10.4.25 spline

Does a cubic spline interpolation of a data set.

Syntax Description

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 does not have to be within the bounds ofxold.

See Also Functions , interp

10.4.26 integrate

Returns the integral over the specified dimension of a matrix. For more details on the useof this function, see also Integrating over lines, surfaces and volumes .

Integrals over singleton dimension will return zero (i.e. the area under a single point iszero).

139

139 148

139 148

31

Page 151: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Scripting Language 149

© 2003 - 2009 Lumerical Solutions, Inc

Syntax Description

out = integrate(A, 1, x1); Integrates A over the first dimension in the matrix. x1 is the corresponding position vector.

out = integrate(A, d, x1, x2,...);

Calculates the integral of A over the specifieddimension(s) d.d is a vector containing the dimensions over which tointegrate.xi is the position vector corresponding to the dimensionsof A over which the integration is occurring. If any of the xivectors only have 1 element, integrate returns 0.For example· power = integrate(A,1:2,x,y) will integrate A over an x-y

surface.

See Also Functions , max , min , interp , find , pinch , round , getdata

10.4.27 find

This function will search for entries in a matrix that meet some condition. The indices ofthose values are returned.For multi-dimensional matrixes, the find function will still return a single index. This isuseful when using the output from find in a loop.

Syntax Description

out = find(x,5e-6); Will return the index of x that corresponds to the closestvalue to 5e-6.

out = find(x>5); Will return indices of all values of x that are greater than5.

See AlsoFunctions , pinch , findpeaks

10.4.28 findpeaks

Returns the position of peaks in a matrix. A peak is defined as a data point that is largerthan its nearest neighbors.

Syntax Description

out = findpeaks(y); Returns the position of the peak with the largest value iny. The length of y must be at least 2. If no peak is found in

139 147 147 148 149 146 155 181

139 146 149

Page 152: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Reference Guide150

© 2003 - 2009 Lumerical Solutions, Inc

the data, a value of 1 is returned.

findpeaks(y,n); Returns a matrix containing the positions of the largest npeaks found in the data. The returned values are orderedfrom largest to smallest. The returned matrix is always ofdimension nX1. If less than n peaks are found, theremaining values of the returned matrix are 1.

See AlsoFunctions , find

10.4.29 transpose

Transpose a 1D or 2D matrix.

Syntax Description

y = transpose(x); If x is an N x M matrix, then y will be M x N, where theentries are y(j,i)=x(i,j).

See AlsoFunctions , ctranspose , flip

10.4.30 ctranspose

Transpose a 1D or 2D matrix and take the complex conjugate of each element.

Syntax Description

y = ctranspose(x); If x is an N x M matrix, then y will be M x N, where theentries are y(j,i)=x(i,j)*.

See AlsoFunctions , transpose

10.4.31 fft

Compute the 1D, 2D or 3D Fast Fourier Transform (fft) of a matrix. In the 1D case thetransform is given by

The fft, inverse fft and all associated functions have an option (option 1 below) thatcontrols the format used to store the frequency domain data. When working with spectraldata it is not possible to switch between formats; there are no functions to convert

139 149

139 150

139 150

Page 153: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Scripting Language 151

© 2003 - 2009 Lumerical Solutions, Inc

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 getthe proper frequency vector corresponding to your spectrum. invfft and fftk work in thesame way.

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 thefrequency 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. Thisoption is only useful for real valued, 1D time/spatialsignals.

· 3 : the fft is shifted so zero frequency is the centralelement of the spectrum (precisely, this means the zerofrequency point is at element floor(N/2 + 1), where N isthe number of samples).

option2 This option is either a 1, 2 or 3 element vector dependingon whether Ex is 1D, 2D or 3D. For each dimension,specify a value of either 0, 1 or N to obtain the desired 0padding 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 2longer than the length of Ex. For the fastest results, Nshould be a power of 2 and can be entered, forexample, as 2^12.

Note: FFT ConventionsThere are different, but equivalent conventions for defining Fourier transforms.Lumerical defines the forward FFT using a positive sign in the exponential term, and theinverse FFT using a negative sign in the exponential term. However, some otherpackages (e.g. Matlab) use the opposite convention, with a negative sign in theexponential for the forward FFT and a positive sign in the exponential for the inverse

Page 154: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Reference Guide152

© 2003 - 2009 Lumerical Solutions, Inc

FFT. To convert between the different FFT conventions, switch the invfft and fft andrescale the results. For a signal y with N elements this can be done as follows: Lumerical codefft(y,1,0)invfft(y,1,0)

Matlab codeifft(y)*N fft(y)/N

See Also Functions , invfft , fftw , fftk , czt

10.4.32 fftw

Returns the angular frequency vector corresponding to time vector t.

,where N=length(t).

fftw and all related functions have an option (option 1 below) that controls the format usedto store the frequency domain data. When working with spectral data it is not possible toswitch between formats; there are no functions to convert between formats. This impliesthat if you use option 1=n to produce a spectrum with fft, then you must also use option1=n if you want to pass that same spectral data to invfft. Similarly, if you use option 1=nfor fft, then you also need to use option 1=n with fftw to get the proper frequency vectorcorresponding to your spectrum. Invfft and fftk work in the same way.

Syntax Description

out = fftw(t); Returns the angular frequency vector corresponding totime 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(Ex). If N <=

length(Ex), it will zero pad up to the next power of 2longer than the length of Ex. For the fastest results, Nshould be a power of 2 and can be entered, for

139 154 152 153 155

Page 155: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Scripting Language 153

© 2003 - 2009 Lumerical Solutions, Inc

example, as 2^12.

See Also Functions , fft , fftk , invfft

10.4.33 fftk

Returns the spatial wavevector kx associated with a fourier transform of a function of x.

,where N=length(x).

fftk and all related functions have an option (option 1 below) that controls the format usedto store the frequency domain data. When working with spectral data it is not possible toswitch between formats; there are no functions to convert between formats. This impliesthat if you use option 1=n to produce a spectrum with fft, then you must also use option1=n if you want to pass that same spectral data to invfft. Similarly, if you use option 1=nfor fft, then you also need to use option 1=n with fftw to get the proper frequency vectorcorresponding to your spectrum. Invfft and fftk work in the same way.

Syntax Description

out = fftk(x); Returns the spatial wavevector kx associated with afourier 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 · 1: zero padding up to the next power of 2 longer than

the length of Ex (default)· N: zero pad up to length N if N > length(Ex). If N <=

length(Ex), it will zero pad up to the next power of 2longer than the length of Ex. For the fastest results, Nshould be a power of 2 and can be entered, forexample, as 2^12.

See Also Functions , fft , fftw , invfft

139 150 153 154

139 150 152 154

Page 156: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Reference Guide154

© 2003 - 2009 Lumerical Solutions, Inc

10.4.34 invfft

Compute the 1D,2D or 3D inverse Fast Fourier Transform (fft) of a matrix. In the 1D casethe transform is given by

The inverse fft, fft and all related functions have an option (option 1 below) that controlsthe format used to store the frequency domain data. When working with spectral data it isnot possible to switch between formats; there are no functions to convert betweenformats. This implies that if you use option 1=n to produce a spectrum with fft, then youmust also use option 1=n if you want to pass that same spectral data to invfft. Similarly, ifyou use option 1=n for fft, then you also need to use option 1=n with fftw to get the properfrequency vector corresponding to your spectrum. Invfft and fftk work in the same way.

Syntax Description

out = invfft(x); Returns the inverse fast Fourier transform of x. x can1D,2D or 3D.

invfft(x,option1,option2); option1 This option controls the format used to store thefrequency 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. Thisoption is only useful for real valued, 1D time/spatialsignals.

· 3 : the fft is shifted so zero frequency is the centralelement of the spectrum (precisely, this means the zerofrequency point is at element floor(N/2 + 1), where N isthe number of samples).

option2 This option is either a 1, 2 or 3 element vector dependingon whether Ex is 1D, 2D or 3D. For each dimension,specify a value of either 0, 1 or N to obtain the desired 0padding 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

Page 157: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Scripting Language 155

© 2003 - 2009 Lumerical Solutions, Inc

longer than the length of Ex. For the fastest results, Nshould be a power of 2 and can be entered, forexample, as 2^12.

See Also Functions , fft , fftw , fftk

10.4.35 czt

Returns the chirped z-transform of a set of data. The czt function is often moreconvenient than the standard fft functions because you can specify an arbitrary range ofk.

Syntax Description

out = czt(Ex,t,w) Returns the chirped z-transform of Ex, function of t, ateach desired angular frequency w. Note that w must be alinearly spaced set of angular frequencies but can coverany range.

czt(Ex,x,y,kx,ky); The two dimensional chirped z-transform. kx and ky mustbe linearly spaced sets of wavenumbers but can coverany range.

See Also Functions , fft

10.4.36 round

Rounds a number to the nearest integer.

Syntax Description

out = round(x); Rounds x to the nearest integer.

See AlsoFunctions

139 150 152 153

139 150

139

Page 158: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Reference Guide156

© 2003 - 2009 Lumerical Solutions, Inc

10.4.37 rand

Generate a uniform random number between 0 and 1.

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. Bydefault, min and max are 0 and 1 respectively.

out = rand(min,max,option); option = 1: output is a double precision number betweenmin and max (default)option = 2: output is an integer between min and max.

See AlsoFunctions , randreset , randmatrix

10.4.38 randreset

Resets the random number generator seed.

Syntax Description

out = randreset; Resets the random number seed based on the clock time.This function returns the random number seed that wasused.

out = randreset(seed); Set the seed to a specific value

See AlsoFunctions , rand , randmatrix

10.5 Loop and conditional statementsThe scripting language currently supports FOR loops and IF statements. Other controlstructures such as while loops or case statements must be constructed from these.

Command Description

for For loop.

if If statement.

while A for loop must be used. See the for loop section.

139 156 127

139 156 127

157

157

157

Page 159: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Scripting Language 157

© 2003 - 2009 Lumerical Solutions, Inc

10.5.1 for

for loops allow some operations to be repeated a number of times. A while loop can beimplemented when using the three argument version of for.

Syntax Description

for(x=1:100) { ?x; } Single argument for loop.The loop will be sequentially executed for eachvalue of x.

for(x=1; x<= 100; x=x+1) { ?x; }

Three argument for loop. x=1 at the start of the loop. The loop continueswhile x <=100 and sets x=x+1 at each pass.

x=1;for(0; x<10; 0) { ?x; x=x+1;}

This is equivalent to a while loop that will executewhile x<10.

See Also Loops , if

10.5.2 if

The scripting language supports if statements in the following forms:

Syntax Description

if(x < 5) { y = x^2; } Simple if statement on one line.

if(x < 5) { y = x^2; }

Multi-line if statement

if(x < 5) { y = x^2; } else { y = x^3; }

If else statement.

if(x < 5) { if(x > 0) {y = x^2; } } else { y = x^3; }

Nested if statement with else.

See Also

156 157

Page 160: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Reference Guide158

© 2003 - 2009 Lumerical Solutions, Inc

Loops , for

10.6 Plotting commandsLine and image plots are supported. These figures can be exported to jpeg images.

Plotting functions.

Command Description

plot Makes line plots

legend Makes a legend on a figure with line plots.

image Makes 2D image plots

setplot Set figure properties.

Miscellaneous plotting functions.

Command Description

selectfigure Selects a figure.

exportfigure Exports a figure.

closeall Closes all figure windows.

10.6.1 plot

Create line plots.

Syntax Description

out = plot(x,y); Creates a plot of y vs x, y and x are both 1D vectors withthe 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 thesame length, returns the figure number.

plot(x,y, "x label", "y label","title");

Creates a plot of y vs x with axis labels and a title, returnsthe figure number.

plot(x,y, "x label", "y label","title", "options");

Creates a plot with desired options. Options can be be · logplot · plot lines OR plot points · greyscale OR color

156 157

158

159

159

160

160

160

161

Page 161: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Scripting Language 159

© 2003 - 2009 Lumerical Solutions, Inc

· polar (used for imaging far field projections)· any comma separated list of the above, for example

"logplot,greyscale,polar"Returns the figure number.

See Also Plotting commands , legend , image , closeall , setplot , exportfigure

10.6.2 legend

Add a legend to a line plot.

Syntax Description

legend("legend1","legend2",...,"legendn");

Adds a legend to the selected figure.This function does not return any data.

See Also Plotting commands , legend , plot , closeall

10.6.3 image

Create 2D image plots.

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", "ylabel", "title");

Creates a 2D image plot with axis labels, returns thefigure number.

image(x,y,z, "x label", "ylabel", "title", "options");

Creates a 2D image plot with axis labels and options,options can be · logplot · polar · any comma separated list of the above

See Also Plotting commands , plot , closeall , setplot , exportfigure

158 159 159 161 160 160

158 159 158 161

158 158 161 160 160

Page 162: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Reference Guide160

© 2003 - 2009 Lumerical Solutions, Inc

10.6.4 setplot

Set figure properties.

Only available in FDTD Solutions.

Syntax Description

?setplot; Creates a string which lists all figure properties for thefigure that is currently selected. Unless the setfigure()command was called, the most recently created plot willbe selected.

setplot("property", "propertyvalue");

Set the desired property of the currently selected figure toproperty value.

See Also Plotting commands , image , plot

10.6.5 selectfigure

Selecting a figure will show the figure on screen (give it focus). A warning will begenerated if the figure does not exist.

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 , exportfigure , image , plot , setplot , closeall

10.6.6 exportfigure

Exports the current figure to a JPG image. If the file extension is not specified, ".jpg" willbe used.

If a file is overwritten, a warning will be generated. If an export fails, a warning will begenerated.

Syntax Description

exportfigure("filename"); Exports the current figure to a JPG image with the name"filename".This function does not return any data.

exportfigure("filename", width and height specify the size in pixels of the resulting

158 159 158

158 160 159 158 160 161

Page 163: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Scripting Language 161

© 2003 - 2009 Lumerical Solutions, Inc

width, height); image. 100 pixels is the minimum value

See Also Plotting commands , selectfigure , image , plot , setplot , closeall

10.6.7 closeall

Close all open figure windows.

Syntax Description

closeall; Close all open figure windows.This function does not return any data.

See Also Plotting commands , plot , image

10.7 Manipulating objectsPhysical structures, sources, monitors, and the simulation volume itself are consideredobjects. Objects generally have properties that can be modified.

Selecting and deleting objects

Command Description

deleteall Deletes all objects in the current TAB.

delete Deletes the selected objects in the current TAB.

selectall Selects all objects in the current TAB.

unselectall Unselects all objects in the current TAB.

select Selects all objects with the name "name", in thecurrent TAB.

selectpartial Selects any objects where partialname can be foundin the name, in the current TAB.

shiftselect The same as select("name"); but does not unselectcurrently selected objects. Can be used to selectmultiple objects.

shiftselectpartial The same as selectpartial("partialname"); but doesnot unselect currently selected objects. Can be usedto select multiple objects.

Moving and copying objects

158 160 159 158 160 161

158 158 159

163

163

164

164

164

164

165

165

Page 164: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Reference Guide162

© 2003 - 2009 Lumerical Solutions, Inc

Command Description

move Move an object.

copy Copy an object.

addtogroup Add an object/objects into a group.

Object properties

Command Description

adduserprop Add a user property to a structure group.

set Set a property of selected objects.

setnamed Set a property of any objects with a given name.

setglobal Used to set the global variables in the current tab.

get Get a property of selected objects.

getnumber Get the number of selected objects.

getnamed Get a property of any objects with a given name.

getnamednumber Get the number of objects with a given name.

getglobal Get the value of global variables in the current tab.

haveproperty Returns the number of selected objects with aparticular property.

importsurface Import surface data from a file. Only applies toimport primitives.

importsurface2 Import surface data from script variables. Onlyapplies to import primitives.

importnk Import n and k data from a file. Only applies toimport primitives.

importnk2 Import n and k data from script variables. Onlyapplies to import primitives.

Controlling the view

Command Description

redraw Redraw graphics.

redrawoff Turn automatic redraw off.

redrawon Turn automatic redraw on.

166

166

166

167

167

168

168

169

170

170

171

171

171

172

173

174

175

176

176

176

Page 165: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Scripting Language 163

© 2003 - 2009 Lumerical Solutions, Inc

redrawmode Get the current status of automatic redrawing; turn itoff or on

setviewControl how the graphics are drawn in the LayoutEditor

getview Get the current view control properties from theLayout Editor.

orbit A built in function to do an orbit of the perspectiveview with option of creating a movie.

Undo and redo commands

Command Description

undo Undo last modify object command.

redo Redo command after an undo.

10.7.1 deleteall

Deletes all objects in the current TAB.

Syntax Description

deleteall; Deletes all objects in the current TAB.This function does not return any data.

See Also Manipulating objects , delete , selectall , select

10.7.2 delete

Deletes selected objects in the current TAB.

Syntax Description

delete; Deletes selected objects in the current TAB.This function does not return any data.

See Also Manipulating objects , deleteall , select , selectall , del

176

177

178

178

179

179

161 163 164 164

161 163 164 164 109

Page 166: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Reference Guide164

© 2003 - 2009 Lumerical Solutions, Inc

10.7.3 selectall

Selects all objects in the current TAB.

Syntax Description

selectall; Selects all objects in the current TAB.This function does not return any data.

See Also Manipulating objects , unselectall , select , set , deleteall

10.7.4 unselectall

Unselect all objects in the current TAB.

Syntax Description

unselectall; Unselects all objects in the current TAB.This function does not return any data.

See Also Manipulating objects , select , selectall

10.7.5 select

Selects objects with a given name, in the current TAB.

Syntax Description

select("name"); Selects all objects with the name "name", in the currentTAB.This function does not return any data.

select("groupname::name");

Selects all objects with the name "name" located in thegroup named "group name" in the current TAB. Groupsare only available in FDTD Solutions.

See Also Manipulating objects , set , delete , deleteall , selectall , unselectall ,selectpartial , shiftselect , shiftselectpartial

10.7.6 selectpartial

Selects any objects with a given partial name, in the current TAB.

Syntax Description

selectpartial("partialname"); Selects any objects where "partialname" can be found in

161 164 164 167 163

161 164 164

161 167 163 163 164 164

164 165 165

Page 167: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Scripting Language 165

© 2003 - 2009 Lumerical Solutions, Inc

the object name provided the object is not in a group, inthe current TAB. To select objects located in groups seethe command below.This function does not return any data.

selectpartial("partialgroupname::partialname");

Selects any objects where "partialgroupname" can befound in the group name and "partialname" can be foundin the object name. Groups are only available in FDTDSolutions.

See Also Manipulating objects , select

10.7.7 shiftselect

Same as select, but does not unselect other currently selected objects.

Syntax Description

shiftselect("name"); The same as select("name"), but does not unselectcurrently selected objects. Can be used to select multipleobjects.This function does not return any data.

shiftselect("groupname::name");

The same as select("groupname::name"), but does notunselect currently selected objects. Groups are onlyavailable in FDTD Solutions.

See Also Manipulating objects , select

10.7.8 shiftselectpartial

Same as selectpartial, but does not unselect other currently selected objects.

Syntax Description

shiftselectpartial("partialname");

The same as selectpartial("partialname"), but does notunselect currently selected objects. Can be used to selectmultiple objects. This function does not return any data.

shiftselectpartial("partialgroupname::partialname");

The same as selectpartial("partialgroupname::partialname"), but does not unselectcurrently selected objects. Can be used to select multipleobjects. Groups are only available in FDTD Solutions.

See Also Manipulating objects , select

161 164

161 164

161 164

Page 168: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Reference Guide166

© 2003 - 2009 Lumerical Solutions, Inc

10.7.9 move

Move selected objects.

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 , copy , select

10.7.10 copy

Copy selected objects.

Syntax Description

copy; Copy the selected objects. The new objects will havehave the same name. Their position will be shifted by adefault amount.This function does not return any data. This syntax is onlyavailable in FDTD Solutions.

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.

copy(dx,dy,dz); Same as copy; but with a specified move of dx, dy, dz. In 2D, dz is ignored.

See Also Manipulating objects , move , select , cp (copy files)

10.7.11 addtogroup

Add selected objects to a group.

Only available in FDTD Solutions.

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 addedto the existing group. Otherwise, a group named "group

161 166 164

161 166 164 110

Page 169: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Scripting Language 167

© 2003 - 2009 Lumerical Solutions, Inc

name" is created.This function does not return any data.

See AlsoManipulating objects

10.7.12 adduserprop

Add user properties to a structure group.

Only available in FDTD Solutions.

Syntax Description

adduserprop("propertyname", type, value);

Adds a user property to a selected structure group. Thename is set to "property name". The type is an integerfrom 0 to 5. The corresponding variable types are0 number1 text2 length3 time 4 frequency5 materialThe value of the user property is set to value.

See AlsoManipulating objects

10.7.13 set

Set a property of currently selected objects. This command will return an error in analysismode.

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 usedto set the value of a selected object in a group. Value can be a number or string. This function does notreturn any data.

set("property",value,i); This form can be used to set the property of the ithselected object when multiple objects are selected. Itcannot be used to set the value of a selected object in agroup. The objects are ordered by their location in the object

161

161

Page 170: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Reference Guide168

© 2003 - 2009 Lumerical Solutions, Inc

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 , get , setnamed , setmaterial , addmaterial ,haveproperty

10.7.14 setnamed

Like the set command, except that the object name must be specified. This commandwill return an error in analysis mode.

Syntax Description

?setnamed("name"); Returns a list of the properties of the objects called name.

setnamed("name","property", value);

The same as set, but acts on objects with a specificname, instead of selected objects.

setnamed("name","property", value,i);

This form can be used to set the property of the ith namedobject when multiple objects have the same name. The objects are ordered by their location in the objecttree. The uppermost selected object is given the index 1,and the index numbers increase as you go down the tree.

setnamed("groupname::name", "property", value);

The same as set, but acts on objects within the groupnamed "groupname" that are named "name", instead ofselected objects.Groups are only available in FDTDSolutions.

setnamed("groupname::name", "property", value,i);

This form can be used to set the property of the ith objectwith the name "name" in the group "groupname" whenmultiple objects have the same name. The objects are ordered by their location in the objecttree. The uppermost selected object is given the index 1,and the index numbers increase as you go down the tree.

See Also Manipulating objects , set , get , getnamed , getnamednumber

10.7.15 setglobal

Used to set the global variables in the current tab. Only applicable in the Sources andMonitors tabs.

Only available in FDTD Solutions.

Syntax Description

161 169 168 184 183

171

161 167 169 170 171

Page 171: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Scripting Language 169

© 2003 - 2009 Lumerical Solutions, Inc

?setglobal; Returns a list of the properties of the global properties inthe current tab.

out = setglobal("name",value);

Sets the global variable called "name" for the current tabto value. Set global returns 1 if it was successful in settingthe values.

See Also Manipulating objects , getglobal , set , get

10.7.16 get

Get a property from selected objects. The property names for the get command are thesame as the property names in the Edit dialogue box. For example, if you see a propertycalled "mesh accuracy", then you can use the command get("mesh accuracy"); to get thatproperty. It is possible to get numeric, string, drop down and checkbox properties.

Note: Beam profilesIn addition to the properties available through the Edit dialogue, it is possible to get thebeam profile for gaussian, planewave and mode sources. The property names are "xvector","y vector","z vector","Ex","Ey","Ez","Hx","Hy", and "Hz". In addition, for modesources, the real part of the effective index for the mode can be obtained. This property isnamed "neff".

Syntax Description

?get; Returns a list of the properties of the selected object(s).

out = get("property"); Gets the requested property value from the currentlyselected object. It cannot be used to get the propertyvalue of a selected object in a group. If multiple objects are selected get("property") is the sameas get("property",i), where i is the number of the firstselected objects with the requested property. Out can be a matrix or a string, depending on the propertyrequested.

get("property",i); Gets the property of the ith selected object. Use this to acton a series of objects. It cannot be used to get the valueof a selected object in a group. The objects are ordered by their location in the objecttree. The uppermost selected object is given the index 1,and the index numbers increase as you go down the tree.

See Also Manipulating objects , getnumber , getnamed , getnamednumber , set ,haveproperty

161 171 167 169

161 170 170 171 167

171

Page 172: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Reference Guide170

© 2003 - 2009 Lumerical Solutions, Inc

10.7.17 getnumber

Get the number of objects that are selected.

Syntax Description

out = getnumber; Returns the number of objects that are selected;

See Also Manipulating objects , get , getnamed , getnamednumber , set

10.7.18 getnamed

Get a property from objects with a given name.

If multiple objects are selected, and the values are different, the smallest value isreturned. To be certain of the results, be sure that only one object is selected, or use theform of getnamed that allows a specific object to be selected.

Syntax Description

?getnamed("name"); Returns a list of the properties of the objects called name.

out = getnamed("name","property");

The same as get, but acts on objects with a specificname, instead of selected objects.

out=getnamed("name","property", i);

Gets the property of the ith named object. Use this to acton a series of objects.The objects are ordered by their location in the objecttree. The uppermost selected object is given the index 1,and the index numbers increase as you go down the tree.

out = getnamed("groupname::name","property");

The same as get, but acts on objects named "name"located in the group "groupname", instead of selectedobjects. Groups are only available in FDTD Solutions.

out = getnamed("groupname::name","property");

Gets the property of the ith object named "name" locatedin the group "groupname". Use this to act on a series ofobjects.The objects are ordered by their location in the objecttree. The uppermost selected object is given the index 1,and the index numbers increase as you go down the tree.

See Also Manipulating objects , get , getnumber , getnamednumber , set , setnamed

161 169 170 171 167

161 169 170 171 167

168

Page 173: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Scripting Language 171

© 2003 - 2009 Lumerical Solutions, Inc

10.7.19 getnamednumber

Get the number of objects with a given name.

Syntax Description

out = getnamednumber( "name");

The same as getnumber, but acts on objects with aspecific name, instead of selected objects.

out = getnamednumber( "groupname::name");

The same as getnumber, but acts on all objects named"name" in the group "groupname", instead of selectedobjects. Groups are only available in FDTD Solutions.

See Also Manipulating objects , get , getnamed , getnumber , set , setnamed

10.7.20 getglobal

Get the value of global properties in the current tab. Only applicable in the Sources andMonitors tabs.

Only available in FDTD Solutions.

Syntax Description

?getglobal; Returns a list of the properties of the global properties inthe current tab.

out = getglobal("name"); Returns the value of the global property called "name".Out can be a matrix or a string, depending on the propertyrequested.

See Also Manipulating objects , setglobal , set , get

10.7.21 haveproperty

Returns the number of selected objects with a particular property.

Syntax Description

out = haveproperty("property");

Returns the number of selected objects with the specifiedproperty.

See Also Manipulating objects , get , set

161 169 170 170 167 168

161 168 167 169

161 169 167

Page 174: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Reference Guide172

© 2003 - 2009 Lumerical Solutions, Inc

10.7.22 importsurface

Import surface data. This command only applies to import primitives. The function returns1 if the data is successfully imported. Example script files showing how to use thesefunctions can be found in the Online Help. See the User Guide, Structures section.

Syntax Description

out = importsurface(filename,upper_surface,file_units,x0,y0,z0,invertXY);

Import a surface from the file in the string filenamein a three dimensional simulation. All argumentsafter filename are optional.

out = importsurface(filename,upper_surface,file_units,x0,y0,invertXY);

Import a surface from the file in the string filenamein a two dimensional simulation. All arguments afterfilename are optional.

Parameter Default value Type Description

filename required string name of the file with surface datato import. May contain completepath to file, or path relative tocurrent working directory

upper_surface 1 number This optional argument should be1 to import the upper surface and0 to import the lower surface.

file_units "m" string The optional string argumentfile_units can be "m", "cm, "mm","microns" or "nm" to specify theunits in the file.

x0 0 number The optional arguments x0, y0and z0 specify the data origin inthe global coordinates of theGraphical Layout Editor. Forexample, if you are importing asurface defined by an AFM that ison a slab of Si that ranges from 0to 2 microns, you should set z0 to2 microns.

y0 0 number

z0 0 number

invertXY 0 number The optional argument invertXYcan be used to reverse how the xand y axes are read from the file.

Page 175: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Scripting Language 173

© 2003 - 2009 Lumerical Solutions, Inc

See Also Manipulating objects , importsurface2

10.7.23 importsurface2

Import surface data from script variables. This command only applies to import primitives.The function returns 1 if the data is successfully imported. Example script files showinghow to use these functions can be found in the Online Help. See the User Guide,Structures section.

Syntax Description

out = importsurface2(Z,x,y,upper_surface);

Import a surface from the variables Z, x and y inthree dimensional simulations. The upper_surfaceargument is optional.

out = importsurface2(Y,x,upper_surface);

Import a surface from the variables Y and x in twodimensional simulations. The upper_surfaceargument is optional.

Parameter Default value Type Description

Z required matrix The two dimensional matrix thatdefines the surface.

x required matrix If Z is an NxM matrix, then xshould have dimension Nx1. Fortwo dimensional simulation, if Y isan Nx1 matrix then x should havedimension Nx1.

y required matrix If Z is an NxM matrix, then yshould have dimension Mx1.

upper_surface 1 number This optional argument should be1 to import the upper surface and0 to import the lower surface.

Y required matrix This argument should be an Nx1matrix that defines the surface fortwo dimensional simulations.

See Also Manipulating objects , importsurface

161 173

161 172

Page 176: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Reference Guide174

© 2003 - 2009 Lumerical Solutions, Inc

10.7.24 importnk

Import the refractive index (n and k) over an entire volume or surface from a file. Thiscommand only applies to import primitives. The function returns 1 if the data issuccessfully imported. Example script files showing how to use these functions can befound in the Online Help. See the User Guide, Structures section.

Syntax Description

out = importnk(filename,file_units,x0,y0,z0,reverse_index_order);

Import n (and k) data from filename in threedimensional simulations. All arguments after thefilename are optional.

out = importnk(filename,file_units,x0,y0,reverse_index_order);

Import n and k data from filename in twodimensional simulations. All arguments after thefilename are optional.

Parameter Default value Type Description

filename required string name of the file with n (and k)data to import. May containcomplete path to file, or pathrelative to current workingdirectory

file_units "m" string The optional string argumentfile_units can be "m", "cm, "mm","microns" or "nm" to specify theunits in the file.

x0 0 number The optional arguments x0, y0and z0 specify the data origin inthe global coordinates of theGraphical Layout Editor. Forexample, if you defined yourvolume with respect to aparticular point in space, forexample (0,0,-5) microns, thenyou 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 setto 1 to reverse how the indicesare interpreted in the file. It is bestto verify the correct setting with a

Page 177: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Scripting Language 175

© 2003 - 2009 Lumerical Solutions, Inc

graphical import before using thescript command.

See Also Manipulating objects , importnk2

10.7.25 importnk2

Import the refractive index (n and k) over an entire volume or surface from scriptvariables. This command only applies to import primitives. The function returns 1 if thedata is successfully imported. Example script files showing how to use these functionscan be found in the Online Help. See the User Guide, Structures section.

Syntax Description

out = importnk2(n,x,y,z); Import n (and k) data from script variables in threedimensional simulations. All arguments arerequired.

out = importnk2(n,x,y); Import n (and k) data from script variables in twodimensional simulations. All arguments arerequired.

Parameter Default value Type Description

n required matrix The refractive index. This shouldbe an NxMxP matrix in threedimensions and an NxM matrix intwo dimensions. If it is complex-valued, then the imaginary part isinterpreted as k.

x required matrix If n is an NxMxP matrix, then xshould have dimension Nx1. Fortwo dimensional simulation, if n isan NxM matrix then x shouldhave dimension Nx1.

y required matrix If n is an NxMxP matrix, then yshould have dimension Mx1. Fortwo dimensional simulation, if n isan NxM matrix then y shouldhave dimension Mx1.

z 1 number If n is an NxMxP matrix, then zshould have dimension Px1.

See Also

161 175

Page 178: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Reference Guide176

© 2003 - 2009 Lumerical Solutions, Inc

Manipulating objects , importnk

10.7.26 redraw

Redraws graphics.

Syntax Description

redraw; Redraws graphics.This function does not return any data.

See Also Manipulating objects , redrawon , redrawoff , redrawmode

10.7.27 redrawoff

This command will prevent redrawing while a script file is executing, unless you explicitlyrequest a redraw with the redraw command. This can speed up the execution of a scriptfile if you are manipulating many objects.

Syntax Description

redrawoff; Prevents redrawing of graphics.This function does not return any data.

See Also Manipulating objects , redrawon , redraw , redrawmode

10.7.28 redrawon

This command turns the redrawing back on. The graphics will be redrawn after any scriptcommand that may change the properties of a graphical object.

Syntax Description

redrawon; Turns redrawing back on.This function does not return any data.

See Also Manipulating objects , redraw , redrawoff , redrawmode

10.7.29 redrawmode

This command can be used to determine the current status of automatic redrawing. It canalso be used to set the current status of automatic redrawing. The graphics will beredrawn after any script command that may change the properties of a graphical object.

161 174

161 176 176 176

161 176 176 176

161 176 176 176

Page 179: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Scripting Language 177

© 2003 - 2009 Lumerical Solutions, Inc

Syntax Description

out = redrawmode; The value of out indicates if automatic redrawing is off oron· 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, usein=1. To turn it off, use in=0. The value of out is set afterexecuting the command so that out=in once thiscommand has been executed.

See Also Manipulating objects , redraw , redrawoff

10.7.30 setview

This command allows the viewing properties of the Layout Editor to be modified.

Syntax Description

outstring = setview; Returns a list of the view properties that can be set. Thecommand?setview;

will returnextent, zoom, theta, phi

setview("property"); Sets the default value for any of the view properties. Forexample,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 a2x1, 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 viewcompared to the default level. To zoom in by a factor of 2in the perspective view, use setview("zoom",2);

theta Controls the polar angle of the perspective view, indegrees.

161 176 176

Page 180: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Reference Guide178

© 2003 - 2009 Lumerical Solutions, Inc

phi Controls the azimuthal angle of the perspective view, indegrees.

See Also Manipulating objects , getview , orbit , redraw

10.7.31 getview

This command allows the viewing properties of the Layout Editor to be retrieved.

Syntax Description

outstring = getview; Returns a list of the view properties that can be set. Thecommand?getview;

will returnextent, 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 viewrelative to the default level.

The properties that can be obtained with getview are described in setview .

See Also Manipulating objects , setview , orbit , redraw

10.7.32 orbit

This command performs an elliptical viewing orbit of the structure in the perspective view.Note that the commands setview , getview and redraw make it possible tocreate any type of orbit you would like in your own script file.

Syntax Description

orbit; Performs an orbit of the current perspective view.

orbit(zoom_factor); Performs an orbit with the specified minimum zoomfactor. By default the zoom factor is 1.5.

orbit(zoom_factor, frame_rate); Performs an orbit with the specified frame ratespecified in frames per second. The default framerate is 15.

orbit(zoom_factor, frame_rate,"filename");

The orbit will be streamed to the mpeg file filenamefor later viewing.

161 178 178 176

177

161 177 178 176

177 178 176

Page 181: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Scripting Language 179

© 2003 - 2009 Lumerical Solutions, Inc

See Also Manipulating objects , setview , getview

10.7.33 undo

Undo the last command that modified any objects, you can undo the last 5 commands.

Syntax Description

undo; Undo last modify object command.This function does not return any data.

See Also Manipulating objects , redo

10.7.34 redo

Redo a command after a previous undo.

Syntax Description

redo; Redo command after previous undo.This function does not return any data.

See Also Manipulating objects , undo

10.8 Measurement dataMeasurement and simulation data is stored within data structures called d-cards that areeither created by the user or created automatically to record and store appropriatecalculation data. D-cards can be: · Local: This means that they are a generated by the current simulation and will be lost

when switching back to layout mode.· Global: This means that they persist until deliberately cleared with a call to cleardcard.

Global d-cards are not saved with the file, and should be saved separately in an ldffile.

The following commands are used to take inventory of which data structures exist, and todetermine the types of data available within each data structure.

Command Description

showdata Provides a list of existing d-cards, or shows the datacontained in a specific d-card.

havedata Used to see if there is any data stored within a d-

161 177 178

161 179

161 179

180

180

Page 182: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Reference Guide180

© 2003 - 2009 Lumerical Solutions, Inc

card.

copydcard Creates a copy of a d-card.

cleardcard Clears a d-card.

The following commands are used to retrieve data from d-cards.

Command Description

getdata Gets specific data from a d-card.

getelectric Get |E|2

getmagnetic Get |H|2

read and write data to file Read and write data to a file.

10.8.1 showdata

Provides a list of existing d-cards, or shows the data contained in a specific d-card. Toretrieve data from the d-card, use getdata.

Syntax Description

out = showdata; Creates a string which lists all of the d-cards currently inmemory.Use ?showdata; to display the list of data structures.

showdata("name"); Used to see the data stored within a particular d-card.Creates a string with the names of all the variablesassociated with a given data structure called "name".

See AlsoMeasurements , getdata , havedata , copydcard , cleardcard , workspace

10.8.2 havedata

Used to see if there is any data stored within a d-card.

Only available in FDTD Solutions.

Syntax Description

havedata; Returns 1 if any of the d-cards currently in memory havedata, and 0 if none of the d-cards have any data.

havedata("name"); Returns 1 if the d-card named "name" has data, and 0 if itdoes not have any data.

181

181

181

182

182

182

179 181 180 181 181

129

Page 183: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Scripting Language 181

© 2003 - 2009 Lumerical Solutions, Inc

See AlsoMeasurements , getdata , copydcard , cleardcard , workspace

10.8.3 copydcard

Will create a global copy of any d-card currently in memory.

Syntax Description

copydcard( "name"); Will create a global copy of any d-card currently inmemory called "name". By default, the new name will be"global_name".This function does not return any data.

copydcard( "name","newname");

Will create a global copy of any d-card currently inmemory called "name". The new name will be"newname".

See AlsoMeasurements , showdata , havedata , cleardcard

10.8.4 cleardcard

Clears global d-cards. Only global d-cards are cleared. Local d-cards are associatedwith the current simulation and can only be cleared by switching from Analysis Mode toLayout Mode.

Syntax Description

cleardcard; Clears all the global d-cards. This function does not return any data.

cleardcard( "name1","name2", ...);

Clears any number of specified d-cards.

See AlsoMeasurements , showdata , havedata , copydcard

10.8.5 getdata

Gets monitor data from a d-card. To see what data is available, use showdata. Theoutput of this function will be normalized if the CW norm option is enabled.

Syntax Description

out = getdata( "monitorname","dataname");

Gets data from a d-card. For example, you could use· Ex = getdata("Monitor1","Ex");To get the Ex field data from a data structure called

179 181 181 181 129

179 180 180 181

179 180 180 181

Page 184: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Reference Guide182

© 2003 - 2009 Lumerical Solutions, Inc

"Monitor1".

getdata( "monitorname","dataname", option);

The optional argument, option, can have a value of 1 or 2.If it is 2, the data is unfolded where possible according tothe symmetry or anti-symmetric boundaries if it comesfrom a monitor that intersect such a boundary at x min, ymin or z min. The default value of option is 2.

See AlsoMeasurements , showdata , havedata , getelectric , getmagnetic , nonorm

, cwnorm

10.8.6 getelectric

Returns the sum of the amplitude squares for all electric field components, i.e. it returns |Ex|2+|Ey|2+|Ez|2.

Syntax Description

out = getelectric( "monitorname");

Returns |Ex|2+|Ey|2+|Ez|2 from the monitor.

See AlsoMeasurements , showdata , getdata , getmagnetic , cwnorm , nonorm

10.8.7 getmagnetic

Returns the sum of the amplitude squares for all magnetic field components, i.e. it returns|Hx|2+|Hy|2+|Hz|2.

Syntax Description

out = getmagnetic( "monitorname");

Returns |Hx|2+|Hy|2+|Hz|2 from the monitor.

See Also Measurements , showdata , getdata , getelectric , cwnorm , nonorm

10.8.8 Read and write data to files

Please see the following section for file I/O commands.System level commands: File input and output

179 180 180 182 182

208 208

179 180 181 182 208 208

179 180 181 182 208 208

107

Page 185: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Scripting Language 183

© 2003 - 2009 Lumerical Solutions, Inc

10.9 Material databaseThe following commands are used to add or copy materials in the material database, aswell as to set any material property and verify the resulting complex index of a givenmaterial 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 thesecommands.

Command Description

addmaterial Adds a new material into the material database.

copymaterial Copies an existing material in the material database

setmaterial Sets any property of an existing material in thematerial database.

getmaterial Returns properties of a material in the materialdatabase.

getindex Returns the complex index of a material.

getfdtdindex Returns the material index as it will be in an actualFDTD simulation.

10.9.1 addmaterial

Adds a new material to the material database.

Syntax Description

?addmaterial; Displays all types of materials that can be added into thematerial database.

out = addmaterial("materialtype");

Adds a new material and returns the name of the newmaterial. The argument "materialtype" is has to matchcorrect string exactly.

See AlsoMaterial database , setmaterial , getindex , getfdtdindex

10.9.2 copymaterial

Makes a copy of a material in the material database.

Only available in FDTD Solutions.

Syntax Description

183

183

184

184

185

185

183 184 185 185

Page 186: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Reference Guide184

© 2003 - 2009 Lumerical Solutions, Inc

out = copymaterial("materialname");

Creates a copy of the material "materialname". The newname is returned.

See AlsoMaterial database , setmaterial , getindex , getfdtdindex

10.9.3 setmaterial

Modifies properties of a material in the material database.

Syntax Description

?setmaterial; Displays the common property names of the basematerial that can be modified.

setmaterial( "materialname");

Displays the property names of the specified material thatcan be modified.

setmaterial( "materialname","propertyname", newvalue);

Sets the property named "propertyname" of the materialwith the name "materialname" to newvalue. The argumentnewvalue can be a number or a string. The arguments"propertyname" and "materialname" have to matchcorrect string exactly. For example, setmaterial("Si","Mesh order",4);will set the property "mesh order" of the materials "Si" to4.

See AlsoMaterial database , addmaterial , getmaterial , getindex , getfdtdindex

10.9.4 getmaterial

Returns properties of a material in the material database.

Syntax Description

?getmaterial( "materialname");

Displays the property names of the specified material thatcan be modified.

out = getmaterial( "materialname","propertyname");

Returns the property named "propertyname" of thematerial with the name "materialname". The returnedvariable is either a matrix or a string, depending on theproperty in the query.

See AlsoMaterial database , addmaterial , setmaterial , getindex , getfdtdindex

183 184 185 185

183 183 184 185 185

183 183 184 185 185

Page 187: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Scripting Language 185

© 2003 - 2009 Lumerical Solutions, Inc

10.9.5 getindex

Returns the complex index of any material that is in the material database. The index atthe specified frequency is interpolated from the neighboring frequencies where the indexdata is available.

Syntax Description

out = getindex( "materialname", f);

Returns the complex index of the material with the givenname. The index is returned for the specified frequency f.Frequency f is in Hz.

getindex( "materialname", f,component);

Optional argument component can be 1, 2 or 3 to specifythe x, y or z component for anisotropic materials. Thedefault is 1.

See AlsoMaterial database , getfdtdindex , addmaterial , setmaterial

10.9.6 getfdtdindex

This function returns the material index of a material in the database as it will be used inan actual FDTD simulation.

In FDTD Solutions, many materials (such as Experimental materials) have properties thatdepend on frequency. Using getfdtdindex, you can specify frequency range, and the fittingroutine will find a best fit of the material data over that range. The index evaluated at thespecified f is then returned. Note that the fit result depends on the fit parameters, Maxcoefficients and Tolerance set for the material, thus getfdtdindex result depends on thoseparameters as well.

Syntax Description

out = getfdtdindex( "materialname", f, fmin,fmax);

Returns the complex index of the material with the givenname. The index is returned for the specified frequency f.Similar to getindex, but you also specify fmin and fmax,the span of frequency of the FDTD simulation. Allfrequency units are in Hz.

getfdtdindex("materialname", f,fmin,fmax, component);

Optional argument component can be 1, 2 or 3 to specifythe x, y or z component for anisotropic materials. Thedefault is 1.

See AlsoMaterial database , getindex , addmaterial , setmaterial

183 185 183 184

183 185 183 184

Page 188: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Reference Guide186

© 2003 - 2009 Lumerical Solutions, Inc

10.10User defined GUIsCustom GUIs can be created with the following commands.

Command Description

message Creates a message window that displays sometext.

newwizard Used to create a new user defined wizard.

newwizardpage This creates a page for the wizard.

wizardwidget Adds a new widget to the current wizard window.

runwizard Runs the wizard and returns a value indicatingwhich button was pressed.

wizardgetdata Returns data entered into a specific widget.

killwizard This closes the wizard window.

wizardoption Sets some options for wizard widgets and labels.

fileopendialog Calls the standard windows file open dialog.

filesavedialog Calls the standard windows file save dialog.

Typically, a wizard will be created with the following steps1. Open a new wizard with newwizard2. Add a new wizard page with newwizardpage3. Add widgets to the wizard page with wizardwidget4. Call runwizard to run the wizard5. Use wizardgetdata to obtain values entered into widgets by the user6. Depending on the values returned by runwizard , the wizard can be closed with

killwizard , or a new wizard page is started with newwizardpage .

10.10.1 message

Creates a message window that displays some text. The user must hit Enter, or click theOK button to continue.

Syntax Description

message("text"); Creates a window that displays text. This function does not return any data.

See AlsoUser defined GUI , newwizard

186

187

187

187

188

188

188

189

189

190

187

187

187

188

188

188

188 187

186 187

Page 189: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Scripting Language 187

© 2003 - 2009 Lumerical Solutions, Inc

10.10.2 newwizard

Used to create a new user defined wizard. Opens a new wizard window.

Syntax Description

newwizard( w, h, "title"); · w and h (width and height) are specified in pixels. Theminimum values for w and h are 200.

· title is the wizard window title.

See AlsoUser defined GUI , message

10.10.3 newwizardpage

This creates a page for the wizard and should be done before adding any widgets.

Syntax Description

newwizardpage( "label1"); Creates a button with the label "label1". Typically, this willbe "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 AlsoUser defined GUI , newwizardpage

10.10.4 wizardwidget

Adds a new widget to the current wizard window. This command should only be doneafter creating a new wizard page with the command newwizard.

Syntax Description

wizardwidget( "type","name");

type can be· "number" for a numeric input field· "string" for a alphanumeric field· "checkbox" for a checkbox· "menu" for a pulldown menu field· "label" to add a string label (wizardgetdata does not

return information for labels)name is a string used to give the input field, checkbox,menu item or label a name.

wizardwidget( "type", "label",defaultValue);

defaultValue provides a default value for numeric inputs,checkboxes, menu items or strings.

186 186

186 187

Page 190: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Reference Guide188

© 2003 - 2009 Lumerical Solutions, Inc

wizardwidget( "type", "label","choices", defaultValue);

If the "type" of widget is a "menu", then the menu choicesmust be provided. These choices should be separated bythe character "|". For example, to create a pulldownwidget with the name "simulation type" and 3 choices"TE","TM","3D", with the default choice "3D", thecommand iswizardwidget("menu","simulation type","TE|TM|3D",3);

See AlsoUser defined GUI , newwizardpage

10.10.5 runwizard

Runs the wizard and returns a value indicating which button was pressed.

Syntax Description

out = runwizard; Returns either 0, +1 or -1.0 means the user pressed Cancel, 1 means the userpressed the first button (created by callingnewwizardpage) and -1 means the user pressed thesecond button (created by calling newwizardpage).

See AlsoUser defined GUI , newwizardpage

10.10.6 wizardgetdata

Returns data entered into a specific widget.

This function is only available in MODE Solutions.

Syntax Description

out = wizardgetdata(N); Returns the value that the user entered into the Nthwidget. Out will be a number or a string, depending on thetype of widget.

See Also User defined GUI , newwizardpage

10.10.7 killwizard

This closes the wizard window. It should only be called after a wizard window has beencreated with the newwizard command.

Syntax Description

186 187

186 187

186 187

Page 191: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Scripting Language 189

© 2003 - 2009 Lumerical Solutions, Inc

killwizard; This closes the wizard window.

See AlsoUser defined GUI , newwizardpage

10.10.8 wizardoption

Sets some options for wizard widgets and labels.

Syntax Description

wizardoption ("optionname",setting);

The options are· "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 wizardwindow.

· "fieldheight" sets the height of each field to any valuebetween 8 and the full height of the wizard window.

· "margin", sets size of the left margin to any valuebetween 0 and full width of the wizard window.

See AlsoUser defined GUI , newwizard

10.10.9 fileopendialog

Calls the standard windows file open dialog.

This function is only available in MODE Solutions.

Syntax Description

out = fileopendialog; Brings up the open file dialog box and returns the paththat the user selects.

out = fileopendialog(".ext"); Brings up the open file dialog box, displaying only fileswith the extension .ext. Returns the path of the file thatthe user selects.

See Also User defined GUIs , filesavedialog

186 187

186 187

186 190

Page 192: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Reference Guide190

© 2003 - 2009 Lumerical Solutions, Inc

10.10.10 filesavedialog

Calls the standard windows file save dialog.

This function is only available in MODE Solutions.

Syntax Description

out = filesavedialog; Brings up the save file dialog box and returns the paththat the user selects.

out = filesavedialog(".ext"); Brings up the save file dialog box, displaying only fileswith the extension .ext. Returns the path of the file thatthe user selects.

See Also User defined GUIs , fileopendialog

10.11FDTD Solutions toolboxThe Lumerical scripting language is designed to be the same throughout all Lumericalproducts. However, each product has an additional set of specialized functions that willdiffer from product to product. Creating a workspace and working with fsp files

Command Description

new2d Creates a new 2D layout environment.

new3d Creates a new 3D layout environment.

load Loads an fsp file.

save Saves the current environment as an fsp file.

run Launch the simulation.

runparallel Launch the simulation in parallel mode.

setparallel Sets options for parallel simulations.

runanalysis Runs the analysis script in analysis objects

Moving between tabs

Command Description

structures Switch to the STRUCTURES TAB.

simulation Switch to the SIMULATION TAB.

sources Switch to the SOURCES TAB.

monitors Switch to the MONITORS TAB.

186 189

194

195

195

196

196

197

197

198

198

198

199

199

Page 193: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Scripting Language 191

© 2003 - 2009 Lumerical Solutions, Inc

switchtolayout Closes the analysis window and allows you tomanipulate simulation objects for a new simulation.

layoutmode Used to determine if the simulation file is open inlayout or in analysis mode.

Adding objects

Command Description

addcircle Add a circle primitive.

addcustom Add a custom primitive.

addimport Add an import primitive.

addpyramid Add a pyramid primitive.

addpoly Add a polygon primitive

addrect Add a rectangle primitive.

addring Add a ring primitive.

addsphere Add a sphere primitive.

addsurface Add a surface primitive.

addstructuregroup Add a structure group.

addfdtd Add an FDTD simulation area.

addmesh Add a mesh override region.

adddipole Add a dipole source.

addgaussian Add a Gaussian source.

addplane Add a plane source.

addmode Add a mode source.

addtfsf Add a TFSF source.

addimportedsource Add an imported source.

addindex Add an index monitor.

addtime Add a time monitor.

addmovie Add a movie monitor.

addprofile Add a profile monitor.

addpower Add a power monitor.

199

199

200

200

200

201

201

201

201

202

202

202

203

203

203

203

204

204

204

205

205

205

205

206

206

Page 194: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Reference Guide192

© 2003 - 2009 Lumerical Solutions, Inc

addanalysisgroup Add an analysis group.

Source settings, normalization and measurements

Command Description

setsourcesignal Set a custom source time signal.

updatesourcemode Updates the mode for a mode source.

clearsourcedata Clears source data for an imported source, or theselected mode for a mode source.

getsourceangle Get source angle.

nonorm Use no normalization.

cwnorm Use CW normalization.

sourcenorm Returns the normalization used in the cwnorm state.

sourcenorm2_avg Returns the source normalization spectrum used tonormalize data in the cwnorm state for the totalspectral averaged quantities

sourcenorm2_pavg Returns the source normalization spectrum used tonormalize data in the cwnorm state for the partialspectral averaged quantities

dipolepower Returns the power injected into the simulation by adipole source.

sourcepower Returns the source power.

sourcepower_avg Returns the total spectral average power injectedinto the simulation by the source.

sourcepower_pavg Returns the partial spectral average power injectedinto the simulation by the source.

sourceintensity Returns the source intensity.

sourceintensity_avg Returns the total spectral average intensity injectedinto the simulation by the source.

sourceintensity_pavg Returns the partial spectral average intensityinjected into the simulation by the source.

transmission Returns the power transmission through a monitor.

transmission_avg Returns the total spectral average power through amonitor surface, normalized to the total spectralaverage of the source.

206

207

207

207

208

208

208

209

209

210

211

211

212

213

214

215

215

216

217

Page 195: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Scripting Language 193

© 2003 - 2009 Lumerical Solutions, Inc

transmission_pavg Returns the partial spectral average power througha monitor surface, normalized to the partial spectralaverage of the source.

Near to far field projections

Command Description

farfieldfilter The far field filter is used to remove ripples in the farfield projection due to clipping of the near fields. Itshould be used when the near fields at the edge ofthe monitor are small but not precisely zero.

farfield2d Projects a given power or field profile monitor to thefar field.

farfieldvector2d Farfieldvector2d is identical to farfield2d, howeverthe data is returned as matrix of Nx1x3, where thelast index refers to Ex, Ey and Ez.

farfieldpolar2d Farfieldpolar2d is identical to farfield2d, however thedata is returned as matrix of Nx1x3, where the lastindex refers to Er, Eq and Ez, in cylindrical

coordinates.

farfieldangle For 2D simulations. It returns the matrix of angles,in degrees, corresponding to the data in farfield2d.

farfield3d Projects a given power or field profile monitor to thefar field.

farfieldvector3d Farfieldvector3d is identical to farfield3d, howeverthe data is returned as matrix of NxMx3, where thelast index refers to Ex, Ey and Ez.

farfieldpolar3d Farfieldpolar3d is identical to farfield3d, however thedata is returned as matrix of NxMx3, where the lastindex refers to Er, Eq and Ef, in spherical

coordinates.

farfieldux For 3D simulations. It returns the matrix of uxcorresponding to the data in farfield3d.

farfielduy For 3D simulations. It returns the matrix of uycorresponding to the data in farfield3d.

farfieldspherical Interpolates far field projection data from E(ux,uy) toE(theta,phi).

farfieldexact2d Calculates the far field at any specified position.

217

218

221

222

223

223

224

225

226

226

227

227

227

229

Page 196: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Reference Guide194

© 2003 - 2009 Lumerical Solutions, Inc

farfieldexact3d Calculates the far field at any specified position.

farfieldexact Similar to farfieldexact2d and farfieldexact3d,however the far field is only evaluated at positionsexplicitly specified by the vector list.

farfield2dintegrate Calculates the integral of the far field projection oversome range of theta in 2D simulation

farfield3dintegrate Calculates the integral of the far field projection overa specified cone in 3D simulation

Grating calculations

Command Description

grating Returns the strength of all physical grating orders.

gratingn Returns vector of integers corresponding to datafrom grating function.

gratingm Returns vector of integers corresponding to datafrom grating function

gratingpolar Returns the relative strength of all physical gratingorders in spherical coordinates.

gratingvector Returns the relative strength of all physical gratingorders in Cartesian coordinates.

gratingperiod1 Returns grating period ax.

gratingperiod2 Returns grating period ay.

gratingbloch1 Returns bloch vector (kin)x.

gratingbloch2 Returns bloch vector (kin)y.

gratingu1 Returns first component of the unit vector ux.

gratingu2 Returns first component of the unit vector uy.

gratingangle Returns the angle of each order.

10.11.1 new2d

Creates a new 2D layout environment.

Syntax Description

new2d; Creates a new 2D layout environment.This function does not return any data.

230

231

224

228

232

233

233

234

234

235

236

236

236

237

236

237

237

Page 197: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Scripting Language 195

© 2003 - 2009 Lumerical Solutions, Inc

new2d(option); The options are · 1: use default fsp file and material database as

template · 2: use current fsp file and material database as

template · 3: open a file browser to select and existing fsp file as a

template The default option is 1.

See Also FDTD toolbox , new3d

10.11.2 new3d

Creates a new 3D layout environment.

Syntax Description

new3d; Creates a new 3D layout environment.This function does not return any data.

new3d(option); The options are · 1: use default fsp file and material database as

template · 2: use current fsp file and material database as

template · 3: open a file browser to select and existing fsp file as a

template The default option is 1.

See Also FDTD toolbox , new2d

10.11.3 load

Loads an fsp file. These files contain all the simulation setup such as physical structures,source position, etc. If the simulation has already been run, the file will also containsimulation results.

Syntax Description

load("filename.fsp"); Loads the fsp file.This function does not return any data.

See Also FDTD toolbox , loaddata , save , savedata , savedcard

190 195

190 194

190 116 196 116 117

Page 198: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Reference Guide196

© 2003 - 2009 Lumerical Solutions, Inc

10.11.4 save

Saves an fsp file. These files contain all the simulation setup such as physical structures,source position, etc. If the simulation has already been run, the file will also containsimulation results.

Syntax Description

save; Open a file browser to save the fsp file.This function does not return any data.

save("filename.fsp"); Save with the specified name

See Also FDTD toolbox , load , loaddata , savedata , savedcard

10.11.5 run

Launch the simulation. When the simulation finishes, all simulation data will be saved tothe current file.

Syntax Description

run; Launch the simulation.This function does not return any data.

run(option1); The option1 can be:· 1: run fdtd with GUI progress tool (default)· 2: run non-graphical fdtd. This is useful to prevent

warning windows from interrupting your simulations. · 3: run parallel fdtd. equivalent to runparallel .

run(option1,option2); option2 can be:· 0: When it is 0 no temporary material files are created

or saved.· 1: When it is 1, a temporary material file called

filename.lmf (or filename_pN.lmf in parallel simulations)is created, where the simulation file is called filename.fsp.

· >= 2: When it is greater than or equal to 2, thetemporary material file called called filename.lmf (orfilename_pN.lmf in parallel simulations) is read. Thedefault value is 0.

run(option1,option2,filename);

The optional filename argument allows you to specify afilename for the temporary material files, instead of thedefault filename. This file will be forced automatically have

190 195 116 116 117

197

Page 199: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Scripting Language 197

© 2003 - 2009 Lumerical Solutions, Inc

the extension ".lmf".

See Also FDTD toolbox , runparallel , runanalysis

10.11.6 runparallel

Launch the simulation in parallel mode. Equivalent to run(3). When the simulationfinishes, all simulation data will be saved to the current file.

Syntax Description

runparallel; Launch the simulation in parallel mode.This function does not return any data.

See Also FDTD toolbox , run , setparallel , runanalysis

10.11.7 setparallel

Sets the options required for parallel simulations. The property to be set has the samename as shown in the Parallel Computing Options Window, as shown below. Theproperty name is not case sensitive and does not have to be complete: for example,"command line arguments <args>" can be replace with "command line".

Syntax Description

190 197 198

190 196 197 198

Page 200: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Reference Guide198

© 2003 - 2009 Lumerical Solutions, Inc

setparallel("number ofnodes",8);

Sets any available option in the Parallel ComputingOptions window to the desired value.This function does not return any data.

See Also FDTD toolbox , runparallel

10.11.8 runanalysis

Runs the analysis script in analysis objects.

Syntax Description

runanalysis; Runs the analysis scripts in all analysis objects in thesimulation 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.

See Also FDTD toolbox , run

10.11.9 structures

Switch to the STRUCTURES TAB.

Syntax Description

structures; Switch to the STRUCTURES TAB.This function does not return any data.

See AlsoFDTD toolbox , switchtolayout

10.11.10 simulation

Switch to the SIMULATION TAB.

Syntax Description

simulation; Switch to the SIMULATION TAB.This function does not return any data.

See AlsoFDTD toolbox , switchtolayout

190 197

190 196

190 199

190 199

Page 201: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Scripting Language 199

© 2003 - 2009 Lumerical Solutions, Inc

10.11.11 sources

Switch to the SOURCES TAB.

Syntax Description

sources; Switch to the SOURCES TAB.This function does not return any data.

See AlsoFDTD toolbox , switchtolayout

10.11.12 monitors

Switch to the MONITORS TAB.

Syntax Description

monitors; Switch to the MONITORS TAB.This function does not return any data.

See AlsoFDTD toolbox , switchtolayout

10.11.13 switchtolayout

Closes the analysis window and allows you to manipulate simulation objects for a newsimulation. If a simulation file is open in ANALYSIS mode, any commands to modifyobjects will return errors. You must switch to LAYOUT mode before modifying any ob jects.

Syntax Description

switchtolayout; Switches to LAYOUT mode.This function does not return any data.

See AlsoFDTD toolbox , layoutmode

10.11.14 layoutmode

Used to determine if the simulation file is open in layout or in analysis mode.

Syntax Description

?layoutmode; Returns 1 if in layout mode, and 0 if in analysis mode.

190 199

190 199

190 199

Page 202: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Reference Guide200

© 2003 - 2009 Lumerical Solutions, Inc

See AlsoFDTD toolbox , switchtolayout

10.11.15 addcircle

Adds a circle primitive to the simulation environment. If necessary, the structures TABwill be selected before adding the object.

Syntax Description

addcircle; Adds primitive to the simulation environment.This function does not return any data.

See AlsoFDTD toolbox

10.11.16 addcustom

Adds a custom primitive to the simulation environment. If necessary, the structures TABwill be selected before adding the object.

Syntax Description

addcustom; Adds primitive to the simulation environment.This function does not return any data.

See AlsoFDTD toolbox

10.11.17 addimport

Adds an import primitive to the simulation environment. If necessary, the structures TABwill be selected before adding the object.

Syntax Description

addimport; Adds primitive to the simulation environment.This function does not return any data.

See AlsoFDTD toolbox

190 199

190

190

190

Page 203: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Scripting Language 201

© 2003 - 2009 Lumerical Solutions, Inc

10.11.18 addpyramid

Adds a pyramid primitive to the simulation environment. If necessary, the structures TABwill be selected before adding the object.

Syntax Description

addpyramid; Adds primitive to the simulation environment.This function does not return any data.

See AlsoFDTD toolbox

10.11.19 addpoly

Adds a polygon primitive to the simulation environment. If necessary, the structures TABwill be selected before adding the object.

Syntax Description

addpoly; Adds primitive to the simulation environment.This function does not return any data.

See AlsoFDTD toolbox

10.11.20 addrect

Adds a rectangle primitive to the simulation environment. If necessary, the structuresTAB will be selected before adding the object.

Syntax Description

addrect; Adds primitive to the simulation environment.This function does not return any data.

See AlsoFDTD toolbox

10.11.21 addring

Adds a ring primitive to the simulation environment. If necessary, the structures TAB willbe selected before adding the object.

Syntax Description

addring; Adds primitive to the simulation environment.

190

190

190

Page 204: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Reference Guide202

© 2003 - 2009 Lumerical Solutions, Inc

This function does not return any data.

See AlsoFDTD toolbox

10.11.22 addsphere

Adds a sphere primitive to the simulation environment. If necessary, the structures TABwill be selected before adding the object.

Syntax Description

addsphere; Adds primitive to the simulation environment.This function does not return any data.

See AlsoFDTD toolbox

10.11.23 addsurface

Adds a surface primitive to the simulation environment. If necessary, the structures TABwill be selected before adding the object.

Syntax Description

addsurface; Adds primitive to the simulation environment.This function does not return any data.

See AlsoFDTD toolbox

10.11.24 addstructuregroup

Adds a structure group to the simulation environment. If necessary, the structures TABwill be selected before adding the object.

Syntax Description

addstructuregroup; Adds a structure group to the simulation environment.This function does not return any data.

See AlsoFDTD toolbox , addtogroup , adduserprop , addanalysisgroup

190

190

190

190 166 167 206

Page 205: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Scripting Language 203

© 2003 - 2009 Lumerical Solutions, Inc

10.11.25 addfdtd

Adds a FDTD simulation area to the simulation environment. If necessary, the simulationTAB will be selected before adding the object.

Syntax Description

addfdtd; Adds a simulation area to the simulation environment.This function does not return any data.

See AlsoFDTD toolbox

10.11.26 addmesh

Adds a mesh override region to the simulation environment. If necessary, the simulationTAB will be selected before adding the object.

Syntax Description

addmesh; Adds a mesh override region to the simulationenvironment.This function does not return any data.

See AlsoFDTD toolbox

10.11.27 adddipole

Adds a dipole source to the simulation environment. If necessary, the sources TAB willbe selected before adding the object.

Syntax Description

adddipole; Adds source to the simulation environment.This function does not return any data.

See AlsoFDTD toolbox

10.11.28 addgaussian

Adds a gaussian source to the simulation environment. If necessary, the sources TABwill be selected before adding the object.

Syntax Description

190

190

190

Page 206: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Reference Guide204

© 2003 - 2009 Lumerical Solutions, Inc

addgaussian; Adds source to the simulation environment.This function does not return any data.

See AlsoFDTD toolbox

10.11.29 addplane

Adds a plane wave source to the simulation environment. If necessary, the sources TABwill be selected before adding the object.

Syntax Description

addplane; Adds source to the simulation environment.This function does not return any data.

See AlsoFDTD toolbox

10.11.30 addmode

Adds a mode source to the simulation environment. If necessary, the sources TAB willbe selected before adding the object.

Syntax Description

addmode; Adds source to the simulation environment.This function does not return any data.

See AlsoFDTD toolbox

10.11.31 addtfsf

Adds a Total Field Scattered Field (tfsf) source to the simulation environment. Ifnecessary, the sources TAB will be selected before adding the object.

Syntax Description

addtfsf; Adds source to the simulation environment.This function does not return any data.

See AlsoFDTD toolbox

190

190

190

190

Page 207: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Scripting Language 205

© 2003 - 2009 Lumerical Solutions, Inc

10.11.32 addimportedsource

Adds an imported source to the simulation environment. If necessary, the sources TABwill be selected before adding the object.

Syntax Description

addimportedsource; Adds source to the simulation environment.This function does not return any data.

See AlsoFDTD toolbox , asapimport , asapload , asapexport

10.11.33 addindex

Adds an index monitor to the simulation environment. If necessary, the monitors TAB willbe selected before adding the object.

Syntax Description

addindex; Adds monitor to the simulation environment.This function does not return any data.

See AlsoFDTD toolbox

10.11.34 addtime

Adds a time monitor to the simulation environment. If necessary, the monitors TAB willbe selected before adding the object.

Syntax Description

addtime; Adds monitor to the simulation environment.This function does not return any data.

See AlsoFDTD toolbox

10.11.35 addmovie

Adds a movie monitor to the simulation environment. If necessary, the monitors TAB willbe selected before adding the object.

Syntax Description

addmovie; Adds monitor to the simulation environment.

190 119 118 118

190

190

Page 208: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Reference Guide206

© 2003 - 2009 Lumerical Solutions, Inc

This function does not return any data.

See AlsoFDTD toolbox

10.11.36 addprofile

Adds a profile monitor to the simulation environment. If necessary, the monitors TAB willbe selected before adding the object.

Syntax Description

addprofile; Adds monitor to the simulation environment.This function does not return any data.

See AlsoFDTD toolbox

10.11.37 addpower

Adds a power monitor to the simulation environment. If necessary, the monitors TAB willbe selected before adding the object.

Syntax Description

addpower; Adds monitor to the simulation environment.This function does not return any data.

See AlsoFDTD toolbox

10.11.38 addanalysisgroup

Adds an analysis group to the simulation environment. If necessary, the monitors TABwill be selected before adding the object.

Syntax Description

addanalysisgroup; Adds an analysis group to the simulation environment.This function does not return any data.

See AlsoFDTD toolbox , addtogroup , addstructuregroup

190

190

190

190 166 202

Page 209: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Scripting Language 207

© 2003 - 2009 Lumerical Solutions, Inc

10.11.39 setsourcesignal

Sets a custom source time signal.

This is an advanced source setting for users wanting a custom source time signal. Forthe vast majority of simulations, a custom time signal is not required. If this function is notused, the time signal will be automatically generated by FDTD Solutions.

Syntax Description

setsourcesignal("name", t,amplitude, phase);

Sets the time domain signal of source named "name". t,amplitude, and phase are 1D vectors with the same length.

setsourcesignal("name", t,amplitude, phase, fcentre,bandwidth);

Allows you to specify the precise center frequency andbandwidth that will be used for all simulations. Thesevalues are used for materials fits, calculating the mesh, andsource limits.If fcentre and bandwidth are not specified, they will beautomatically estimated from the time signal.

See AlsoFDTD toolbox , sourcepower

10.11.40 updatesourcemode

Updates the mode profile of a MODE source. If there is no mode profile stored in thesource, then the mode with the highest effective index will be selected. If a mode isalready stored in the source, then the mode with the best overlap with the old mode willbe selected.

Syntax Description

updatesourcemode; Updates mode profile of a MODE source.

See AlsoFDTD toolbox , addmode , clearsourcedata

10.11.41 clearsourcedata

Clears source data for an imported source, or the selected mode for a mode source.

Syntax Description

clearsourcedata; Clears source data for the selected source.

See AlsoFDTD toolbox , updatesourcemode , asapimport , asapload , asapexport

190 211

190 204 207

190 207 119 118 118

Page 210: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Reference Guide208

© 2003 - 2009 Lumerical Solutions, Inc

10.11.42 getsourceangle

Broadband sources inject fields that have a constant in-plane wavevector at allfrequencies. Therefore, the injection angle must change as a function of frequency. Thein-plane wavevector is chosen such that the incidence angle at the center frequency ofthe simulation will match the source angle theta specified in the source properties. Higher frequencies will be injected at smaller angles, while lower frequencies will beinjected at larger angles.

This function returns the injection angle as a function of frequency.

Syntax Description

theta = getsourceangle("sourcename", f);

Returns the source angle theta (degrees) as a function offrequency. f is a vector of frequencies (Hz).

See AlsoFDTD toolbox , sourcepower , Online Help-User Guide-Sources-Broadbandinjection angles

10.11.43 nonorm

Do not normalized the data to the source power. The actual field intensities will be usedin all calculations. This function controls the checkbox located in Settings - Frequency domain.

Syntax Description

nonorm; Use no normalization.This function does not return any data.

See AlsoFDTD toolbox , cwnorm , Units and Normalization

10.11.44 cwnorm

Use CW normalization. All simulation data will be normalized to the injected sourcepower. Most users prefer to do their analysis in the CW normalization state, since itremoves any effect caused by the finite pulse length of the source. It also converts theunits of all electromagnetic fields to be the same as in the time domain.

This function controls the checkbox located in Settings - Frequency domain.

Syntax Description

cwnorm; Use CW normalization.This function does not return any data.

190 211

190 208 20

Page 211: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Scripting Language 209

© 2003 - 2009 Lumerical Solutions, Inc

See AlsoFDTD toolbox , nonorm , Units and Normalization

10.11.45 sourcenorm

Returns the source normalization spectrum used to normalize data in the cwnorm statefor standard fourier transform quantities. See the Units and normalization chapter formore information.

If the source time signal of the jth source in the simulation is sj(t), and N is the number of

active sources then

Syntax Description

out = sourcenorm(f); Returns the source normalization used to normalize datain the cwnorm state at the vector of frequency points f. (fis the frequency in Hz)

out = sourcenorm(f, name); This function makes it possible to perform thenormalization using the spectrum of one source, ratherthan the sum of all the sources.

See AlsoFDTD toolbox , sourcenorm2_avg , sourcenorm2_pavg , sourcepower ,cwnorm , nonorm , Units and Normalization

10.11.46 sourcenorm2_avg

Returns the source normalization spectrum used to normalize data in the cwnorm statefor the total spectral averaged quantities. See the Units and normalization - Spectralaveraging section for more information.

The script function sourcenorm is defined as

If sourcenorm2_avg is called without any arguments, it returns

Syntax Description

190 208 20

190 209 210 211

208 208 20

24

Page 212: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Reference Guide210

© 2003 - 2009 Lumerical Solutions, Inc

out = sourcenorm2_avg; This function returns the source normalization for totalspectral averaged quantities.

out = sourcenorm2_avg("sourcename");

This function makes it possible to perform thenormalization using the spectrum of one source, ratherthan the sum of all the sources.

See AlsoFDTD toolbox , sourcenorm , sourcenorm2_pavg , sourcepower_avg ,cwnorm , nonorm , Units and Normalization , Spectral averaging

10.11.47 sourcenorm2_pavg

Returns the source normalization spectrum used to normalize data in the cwnorm statefor the partial spectral averaged quantities. See the Units and normalization - Spectralaveraging section for more information.

If the source time signal of the jth source in the simulation is sj(t), and N is the number of

active sources then

Partial spectral averaging uses a Lorentzian weighting of the following form. Delta is theFWHM of |h|2.

If this function is called without any arguments, it returns

Syntax Description

out = sourcenorm2_pavg( f,delta);

This function returns the source normalization for partialspectral averaged quantities.

out = sourcenorm2_pavg( f,delta, "sourcename");

This function makes it possible to perform thenormalization using the spectrum of one source, ratherthan the sum of all the sources.

See AlsoFDTD toolbox , sourcenorm , sourcenorm2_avg , sourcepower_pavg ,

190 209 210 212

208 208 20 24

24

190 209 209 213

Page 213: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Scripting Language 211

© 2003 - 2009 Lumerical Solutions, Inc

cwnorm , nonorm , Units and Normalization , Spectral averaging

10.11.48 dipolepower

Returns the power injected into the simulation region by a dipole source. In 3Dsimulations, the units will be in Watts if cw norm is used, and Watts/Hertz2 if no norm isused.

The dipolepower script command returns the power that was injected into the simulationregion, and is equivalent to measuring the power transmitted out of a small boxsurrounding the dipole. In contrast, sourcepower will return the power that an idealdipole would radiate in a homogeneous material. dipolepower and sourcepower areequivalent for homogeneous materials.

Advanced notes:· There can be some numerical errors in this calculation that become significant when

small mesh sizes are used. If the mesh step is the order of, or smaller than, l/500, itmay be necessary to measure this quantity using a small box of power monitorssurrounding the dipole.

· If the dipole is injected into a dispersive medium with a non-zero imaginary part of therefractive index, then the results of this function are not reliable.

Please contact [email protected] for more assistance if you are using a dipole indispersive medium, or in a fine mesh region, and would like to calculate the total poweremitted by the dipole.

Syntax Description

out = dipolepower(f); Returns the dipole power used to normalize transmissioncalculations at the vector of frequency points f. (f is thefrequency in Hz)

out = dipolepower(f, name); This function makes it possible to perform thenormalization using the spectrum of one source, ratherthan the sum of all the sources.

See AlsoFDTD toolbox , sourcenorm , sourcepower , sourcepower_avg ,sourcepower_pavg , transmission , cwnorm , nonorm , Units andNormalization

10.11.49 sourcepower

Returns the power injected into the simulation by the source. In 3D simulations, the unitswill be in Watts if CW norm is used, and Watts/Hertz2 if No norm is used.

The exact output of sourcepower depends on the type of source used.

For beam sources (plane wave, gaussian, etc), each source records the poynting vector

208 208 20 24

211

190 209 211 212

213 216 208 208

20

Page 214: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Reference Guide212

© 2003 - 2009 Lumerical Solutions, Inc

at its position, which is integrated to give the sources injected power.

For point sources (dipoles), sourcepower will return the power that an ideal dipole wouldinject into homogeneous material. Use the dipolepower script function to obtain thepower that was actually injected into the simulation region.

Syntax Description

out = sourcepower(f); Returns the source power used to normalize transmissioncalculations at the vector of frequency points f. (f is thefrequency in Hz)

out = sourcepower(f,option);

The additional argument, option, can have a value of 1 or2. If it is 2, the data is unfolded where possible accordingto the symmetry or anti-symmetric boundaries if it comesfrom a monitor that intersect such a boundary at x min, ymin or z min. The default value of option is 2.

out = sourcepower(f, option,name);

This function makes it possible to perform thenormalization using the spectrum of one source, ratherthan the sum of all the sources.

See AlsoFDTD toolbox , sourcenorm , sourcepower_avg , sourcepower_pavg ,dipolepower , transmission , cwnorm , nonorm , Units and Normalization

10.11.50 sourcepower_avg

Returns the total spectral average power injected into the simulation by the source. Seethe Units and normalization - Spectral averaging section for more information.

This script function calculates the following quantities, depending on whether thenormalization state is cwnorm or nonorm:

211

190 209 212 213

211 216 208 208 20

24

Page 215: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Scripting Language 213

© 2003 - 2009 Lumerical Solutions, Inc

where sourcepower is the quantity returned by the sourcepower script function, s(w) isreturned by sourcenorm, and w=2pf. Typically, this function should be used in the cwnormstate. Also see the sourcenorm2_pavg script function.

Syntax Description

out = sourcepower_avg; Returns the spectrally averaged source power as definedabove.

out =sourcepower_avg(option);

The additional argument, option, can have a value of 1 or2. If it is 2, the data is unfolded where possible accordingto the symmetry or anti-symmetric boundaries if it comesfrom a monitor that intersect such a boundary at x min, ymin or z min. The default value of option is 2.

out =sourcepower_avg(option,"sourcename");

This function makes it possible to perform thenormalization using the spectrum of one source, ratherthan the sum of all the sources.

See AlsoFDTD toolbox , sourcenorm2_avg , sourcepower , sourcepower_pavg ,transmission_avg , cwnorm , nonorm , Units and Normalization , Spectralaveraging

10.11.51 sourcepower_pavg

Returns the partial spectral average power injected into the simulation by the source. Seethe Units and normalization - Spectral averaging section for more information.

Partial spectral averaging uses a Lorentzian weighting of the form

This script function calculates the following quantities, depending on whether thenormalization state is cwnorm or nonorm:

190 209 211 213

217 208 208 20

24

24

Page 216: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Reference Guide214

© 2003 - 2009 Lumerical Solutions, Inc

where sourcepower is the quantity returned by the sourcepower script function, s(w) isreturned by sourcenorm, and w=2pf. Typically, this function should be used in the cwnormstate. Also see the sourcenorm2_pavg script function.

Syntax Description

out = sourcepower_pavg(f); Returns the spectrally averaged source power as definedabove. The quantity f is the frequency in Hz.

out = sourcepower_pavg(f,option);

The additional argument, option, can have a value of 1 or2. If it is 2, the data is unfolded where possible accordingto the symmetry or anti-symmetric boundaries if it comesfrom a monitor that intersect such a boundary at x min, ymin or z min. The default value of option is 2.

out = sourcepower_pavg(f,option, "sourcename");

This function makes it possible to perform thenormalization using the spectrum of one source, ratherthan the sum of all the sources.

See AlsoFDTD toolbox , sourcenorm2_pavg , sourcepower , sourcepower_avg ,transmission_pavg , cwnorm , nonorm , Units and Normalization , Spectralaveraging

10.11.52 sourceintensity

Sourceintensity returns the source power divided by the area of the source. In 3Dsimulations, the units will be in Watts/m2 if CW norm is used, and Watts/m2/Hertz2 if Nonorm is used. For more information see the sourcepower script command.

Syntax Description

out = sourceintensity(f); Returns the source intensity at the vector of frequencypoints f (f is the frequency in Hz).

out = sourceintensity(f,option);

The additional argument, option, can have a value of 1 or2. If it is 2, the data is unfolded where possible according

190 210 211 212

217 208 208 20

24

211

Page 217: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Scripting Language 215

© 2003 - 2009 Lumerical Solutions, Inc

to the symmetry or anti-symmetric boundaries if it comesfrom a monitor that intersect such a boundary at x min, ymin or z min. The default value of option is 2.

out = sourceintensity(f,option, name);

This function makes it possible to perform thenormalization using the spectrum of one source, ratherthan the sum of all the sources.

See AlsoFDTD toolbox , sourcenorm , sourcepower , sourceintensity_avg ,sourceintensity_pavg , dipolepower , transmission , cwnorm , nonorm ,Units and Normalization

10.11.53 sourceintensity_avg

Returns the total spectral average intensity injected into the simulation by the source. Theaverage intensity is equal to the average power divided by the source area. See the sourcepower_pavg command and the Units and normalization - Spectral averagingsection for more information.

Syntax Description

out = sourceintensity_avg; Returns the spectrally averaged source intensity asdefined above.

out =sourceintensity_avg(option);

The additional argument, option, can have a value of 1 or2. If it is 2, the data is unfolded where possible accordingto the symmetry or anti-symmetric boundaries if it comesfrom a monitor that intersect such a boundary at x min, ymin or z min. The default value of option is 2.

out =sourceintensity_avg(option,"sourcename");

This function makes it possible to perform thenormalization using the spectrum of one source, ratherthan the sum of all the sources.

See AlsoFDTD toolbox , sourcenorm2_avg , sourceintensity , sourcepower ,transmission_avg , cwnorm , nonorm , Units and Normalization , Spectralaveraging

10.11.54 sourceintensity_pavg

Returns the partial spectral average intensity injected into the simulation by the source.The partial average intensity is equal to the partial average power divided by the sourcearea. See the sourcepower_pavg command and the Units and normalization -Spectral averaging section for more information.

190 209 211 215

215 211 216 208 208

20

213 24

190 209 214 211

217 208 208 20

24

213

24

Page 218: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Reference Guide216

© 2003 - 2009 Lumerical Solutions, Inc

Syntax Description

out =sourceintensity_pavg(f);

Returns the spectrally averaged source power as definedabove. The quantity f is the frequency in Hz.

out =sourceintensity_pavg(f,option);

The additional argument, option, can have a value of 1 or2. If it is 2, the data is unfolded where possible accordingto the symmetry or anti-symmetric boundaries if it comesfrom a monitor that intersect such a boundary at x min, ymin or z min. The default value of option is 2.

out =sourceintensity_pavg(f,option, "sourcename");

This function makes it possible to perform thenormalization using the spectrum of one source, ratherthan the sum of all the sources.

See AlsoFDTD toolbox , sourcenorm2_pavg , sourcepower , sourcepower_avg ,transmission_pavg , cwnorm , nonorm , Units and Normalization , Spectralaveraging

10.11.55 transmission

The transmission function returns the amount of power transmitted through powermonitors and profile monitors, normalized to the source power. The transmission iscalculated with the following formula.

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 thesource power normalization.

Syntax Description

out = transmission("monitorname");

Calculate transmission through monitorname. It must beobvious from the shape of the monitor which axis isnormal to the monitor surface.

out = transmission("monitorname", option);

The additional argument, option, can have a value of 1 or2. If it is 2, the data is unfolded where possible accordingto the symmetry or anti-symmetric boundaries if it comesfrom a monitor that intersect such a boundary at x min, ymin or z min. The default value of option is 2.

190 210 211 212

217 208 208 20

24

Page 219: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Scripting Language 217

© 2003 - 2009 Lumerical Solutions, Inc

See AlsoFDTD toolbox , sourcepower , dipolepower , transmission_avg ,transmission_pavg

10.11.56 transmission_avg

Returns the total spectral average power through a monitor surface, normalized to thetotal spectral average of the source. See the Units and normalization - Spectral averaging

section for more information.

where Tavg 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 thesource power normalization.

Syntax Description

out = transmission_avg("monitorname");

Returns the total spectral average transmission throughmonitorname. It must be obvious from the shape of themonitor which axis is normal to the monitor surface.

out = transmission_avg("monitorname", option);

The additional argument, option, can have a value of 1 or2. If it is 2, the data is unfolded where possible accordingto the symmetry or anti-symmetric boundaries if it comesfrom a monitor that intersect such a boundary at x min, ymin or z min. The default value of option is 2.

See AlsoFDTD toolbox , sourcepower_avg , transmission , transmission_pavg , Unitsand Normalization , Spectral averaging

10.11.57 transmission_pavg

Returns the partial spectral average power through a monitor surface, normalized to thepartial spectral average of the source. See the Units and normalization - Spectralaveraging section for more information.

where Tpavg is the normalized partial spectral average transmission

<P> is the partial spectral average Poynting vector

190 211 211 217

217

24

190 212 216 217

20 24

24

Page 220: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Reference Guide218

© 2003 - 2009 Lumerical Solutions, Inc

dS is the surface normal

The normalization state (cwnorm or nonorm) does not affect the result because of thesource power normalization.

Syntax Description

out = transmission_pavg("monitorname" );

Returns the partial spectral average transmission throughmonitorname. It must be obvious from the shape of themonitor which axis is normal to the monitor surface.

out = transmission_pavg("monitorname", option );

The additional argument, option, can have a value of 1 or2. If it is 2, the data is unfolded where possible accordingto the symmetry or anti-symmetric boundaries if it comesfrom a monitor that intersect such a boundary at x min, ymin or z min. The default value of option is 2.

See AlsoFDTD toolbox , sourcepower_pavg , transmission , transmission_avg , Unitsand Normalization , Spectral averaging

10.11.58 Near to far field projections

FDTD Solutions allows you to perform projections of the near field electromagnetic field tothe far field with simple script commands. The far field projections can be performed intwo cases:

Case 1The electromagnetic fields are known on asurface, for example at z=0. The field can beprojected to any point in the half-space abovethe surface (z>0). This will be accurate when· The electromagnetic fields are zero at the

edges of the surface used for the projection.· The surface is one unit cell of a periodic

structure and periodicity is assumed in thefar field projection.

Symmetric and anti-symmetric boundaries canbe used in the simulation because the data isunfolded prior to performing the projection.

In this case, we typically project the field as afunction of angle into the half-space above thesurface. This projection is fast because it canmake use of ffts to perform the projection. Thisprojection cannot be used to calculate thefields at an intermediate distance of a few

190 213 216 217

20 24

Page 221: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Scripting Language 219

© 2003 - 2009 Lumerical Solutions, Inc

wavelengths.

Case 2The electromagnetic fields are known on thesurface of a box. The field can be projected toany point outside the box.

It is necessary to surround the scatteringobject with 6 surface monitors and add theresults of 6 projections coherently using anexact far field projection. This projection isslow because it does not make use of ffts. Thisprojection can be used to calculate the fieldsas close as a few wavelengths from wherethey were recorded.

Field normalizationThe far field projection functions farfield2d, farfield3d, farfieldvector2d,farfieldvector3d, farfieldpolar2d and farfieldpolar3d return either the

complex electric field( ) or electric field intensity (|E|2) at a distance of 1m. To scale thefield to a different distance we can recognize that the electric field intensity decreases like1/R in 2D and 1/R2 in 3D. This means that· |E(R)|2 = |E0|

2/R in 2D

· |E(R)|2 = |E0|2/R2 in 3D

where E0 is the field at a distance of 1 m as returned by the far field scripting functions

and R is measured in meters. The electric field will scale as

· in 2D

· in 3D

Power IntegralsIn general, we want to integrate power over a given solid angle in the far field. There are 2ways this can be done1. 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 themonitor in the near field.

2. We calculate the Poynting vector in the far field and integrate the power over a givensolid angle. We then normalize to the original source power. In the far field, we can useplane wave relationships between E and H. Therefore the Poynting vector is simply

Both methods will give the same result.

Page 222: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Reference Guide220

© 2003 - 2009 Lumerical Solutions, Inc

Coordinate SystemsFor some far field projections, it is important to calculate the vectorial components of theelectric field in order to determine the polarization properties. In 3D, the commands farfieldvector3d and farfieldpolar3d will return the vector field components. In2D, use farfieldvector2d and farfieldpolar2d.

These commands return three complex components of the electromagnetic field. All theproperties of the polarization of the field can be determined from the amplitudes andphases of these components.

The difference between farfieldvector3d and farfieldpolar3d is the coordinatesystem for defining the components of the electric field. farfieldvector3d uses aCartesian coordinate system and farfieldpolar3d uses a spherical coordinatesystem.

farfieldvector3d farfieldpolar3d

Note on performing integralsWe typically want to perform integrals in spherical coordinates such as the following

where P is the poynting vector and R is the radius. The far field projections in FDTDSolutions return the electric field as a function of the variables ux and uy which are the x

and y components of the unit direction vector. The unit direction vector is related to theangular variables by

Page 223: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Scripting Language 221

© 2003 - 2009 Lumerical Solutions, Inc

When changing integration variables from (q,j) to (ux,uy), it can be shown that

Care must be taken to avoid numerical errors due to the cos(q) term. Examples can befound in the FDTD Online Help - User Guide - Analysis - Far Field Projections sectionof Lumerical's website.

See AlsoFDTD toolbox , farfield2d , farfield3d

10.11.59 farfieldfilter

The far field filter is used to remove ripples in the far field projection due to clipping of thenear fields. It should be used when the near fields at the edge of the monitor are small butnot precisely zero. The far field filter has a single input parameter, which is a numberbetween 0 and 1. By default, it is 0, which turns the filter off. This filter is applied to all farfield projections.

190 222 225

Page 224: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Reference Guide222

© 2003 - 2009 Lumerical Solutions, Inc

The bumpy blue line of the figure shows thenear field electric field that will be used for afar field projection. In this case, the fielddoes not go to zero at the edge of themonitor, which will lead to ripples in the farfield projection. The green line shows thethe spatial filter that will be applied to thefields, ensuring they go to zero. The filterparameter defines the width of the filter bythe following formula: a=(a)/(a+b).

Syntax Description

out = farfieldfilter; Get the current far field filter setting.

farfieldfilter(alpha); Set the current far field filter setting.

Note: Periodic structuresThe far field filter option should not be used for periodic structures. Set it to zero whenusing the 'assume periodic' option.

See AlsoFDTD toolbox , farfield2d , farfield3d

10.11.60 farfield2d

Projects a given power or field profile monitor to the far field. The electric field intensity|E|2 is returned.

Syntax Description

E2 = farfield2d("mname", f,n, illumination, periods,index, direction);

Projects a given power or field profile monitor to the farfield.

Parameter Defaultvalue

Type Description

mname required string Name of the monitor

f optional 1 number Index of the desired frequencypoint.

190 222 225

Page 225: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Scripting Language 223

© 2003 - 2009 Lumerical Solutions, Inc

n optional 2000 number The number of points in thefar field.

illumination optional 1 number For periodic structuresGaussian illumination: 1Plane wave illumination: 2

periods optional 1 number number of periods to be used

index optional value atmonitorcenter

number The index of the material touse for the projection.

direction optional direction ofmax power

flow

number Direction: this can be +1 or-1.

See AlsoFDTD toolbox , Far field projections , farfield3d , farfieldangle , farfieldvector2d

, farfieldpolar2d , farfieldexact2d , farfieldfilter , farfieldexact

10.11.61 farfieldvector2d

The function farfieldvector2d is similar to farfield2d, but it returns the complex electricfields, rather than field intensity. The data is returned as matrix of Nx3, where the lastindex refers to Ex, Ey and Ez which are the complex components of the electric fieldvector.

Syntax Description

out = farfieldvector2d("mname",...);

Returns the cartesian complex electric fields. Samearguments as farfield2d.

See AlsoFDTD toolbox , farfield2d

10.11.62 farfieldpolar2d

The function farfieldpolar2d is similar to farfield2d, but it returns the complex electricfields, rather than field intensity. The data is returned as matrix of Nx3, where the lastindex 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 isEz.

Syntax Description

out = farfieldpolar2d("mname",...);

Returns the polar complex electric fields. Samearguments as farfield2d.

190 218 225 224

223 223 229 221 231

190 222

Page 226: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Reference Guide224

© 2003 - 2009 Lumerical Solutions, Inc

See AlsoFDTD toolbox , farfield2d , farfieldvector2d

10.11.63 farfieldangle

Used for 2D simulations. It returns the matrix of angles, in degrees, corresponding to thedata in farfield2d. This is required because the projection does not use a set of linearlyspaced angles for the projection. It is often useful to re-interpolate the data onto a set oflinearly spaced angles using the interp or spline functions.

Syntax Description

theta = farfieldangle("mname", f, n, index);

Returns the matrix of angles corresponding to the data infarfield2d

Parameter Defaultvalue

Type Description

mname required string Name of the monitor fromwhich far field is calculated

f optional 1 number Index of the desired frequencypoint.

n optional 2000 number The number of points in thefar field.

index optional value atmonitorcenter

number The index of the material touse for the projection.

See AlsoFDTD toolbox , farfield2d

10.11.64 farfield2dintegrate

Used in 2D simulations, this function integrates the far field projection over some range oftheta. Angles are specified in degrees, but the integral is done in radians.

Syntax Description

out =farfield2dintegrate(E2,

Integrate 2D far field projection data.

190 222 223

190 222

Page 227: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Scripting Language 225

© 2003 - 2009 Lumerical Solutions, Inc

theta, halfangle, theta0);

Parameter Defaultvalue

Type Description

E2 required matrix E field data from farfield2d

theta required matrix Theta from farfieldangle

halfangle optional 90 vector Half angle (in degrees) of theintegration region. Must havesame length as theta0 orlength 1.

theta0 optional 0 vector Center angle (in degrees)theta of the integration region.Must have same length ashalfangle or length 1.

See AlsoFDTD toolbox , Near to far field projections , farfield2d , farfieldangle

10.11.65 farfield3d

Projects a given power or field profile monitor to the far field. The electric field intensity|E|2 is returned.

Syntax Description

out = farfield3d("mname",f,na, nb, illumination,periodsa, periodsb, index,direction);

Projects a given power or field profile monitor to the farfield. For directions, when projecting in · x: a is y and b is z · y: a is x and b is z · z: a is x and b is y

Parameter Defaultvalue

Type Description

mname required string Name of the monitor

f optional 1 number Index of the desired frequencypoint.

na optional 150 number The number of points in thefar field.

nb optional 150 number The number of points in thefar field.

190 218 222 224

Page 228: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Reference Guide226

© 2003 - 2009 Lumerical Solutions, Inc

illumination optional 1 number For periodic structures.Gaussian illumination: 1Plane wave illumination: 2

periodsa optional 1 number number of periods to be usedfor periodic illumination

periodsb optional 1 number number of periods to be usedfor periodic illumination

index optional value atmonitorcenter

number The index of the material touse for the projection.

direction optional direction ofmax power

flow

number Direction: this can be +1 or -1.

See AlsoFDTD toolbox , Far field projections , farfield2d , farfieldvector3d ,farfieldpolar3d , farfieldux , farfielduy , farfieldexact3d , farfieldfilter

10.11.66 farfieldvector3d

The function farfieldvector3d is similar to farfield3d, but it returns the complex electricfields, rather than field intensity. The data is returned as matrix of NxMx3, where N andM are spatial indices and the last index refers to Ex, Ey and Ez. The components Ex, Eyand Ez are the complex components of the electric field vector.

Syntax Description

out = farfieldvector3d("monitorname",...);

Returns the cartesian complex electric fields. Samearguments as farfield3d.

See AlsoFDTD toolbox , farfield3d

10.11.67 farfieldpolar3d

The function farfieldpolar3d is similar to farfield3d, but it returns the complex electricfields, rather than field intensity. The data is returned as matrix of NxMx3, where N andM are spatial indices and the last index refers to Er, Eq and Ej, in spherical coordinates.

The components Er, Eq and Ej are the complex components of the electric field vector.

Syntax Description

out = farfieldpolar3d("monitorname",...);

Returns the spherical complex electric fields. Samearguments as farfield3d.

190 218 222 226

226 227 227 230 221

190 225

Page 229: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Scripting Language 227

© 2003 - 2009 Lumerical Solutions, Inc

See AlsoFDTD toolbox , farfield3d , farfieldvector3d

10.11.68 farfieldux

Used for 3D simulations. It returns the matrix of ux corresponding to the data in farfield3d.When projecting in · x: ux corresponds to y · y: ux corresponds to x · z: ux corresponds to x

Syntax Description

farfieldux("mname",f,na,nb,index);

See farfield3d help. Arguments are same as forfarfield3d.

See AlsoFDTD toolbox , farfield3d , farfielduy , farfieldspherical , farfieldexact

10.11.69 farfielduy

Used for 3D simulations. It returns the matrix of uy corresponding to the data in farfield3d.When projecting in · x: uy corresponds to z · y: uy corresponds to z · z: uy corresponds to y

Syntax Description

farfielduy("mname",f,na,nb,index);

See farfield3d help. Arguments are same as forfarfield3d.

See AlsoFDTD toolbox , farfield3d , farfieldux , farfieldspherical , farfieldexact

10.11.70 farfieldspherical

This functions interpolates far field data (3D simulations) from E(ux,uy) to E(theta,phi). The far field projections functions generally return the projection as a function of ux,uy(direction cosines). farfieldspherical can be used to interpolate this data into the morecommon units of theta, phi.

Syntax Description

out = farfieldspherical( E2,ux, uy, theta, phi);

interpolate far field data to spherical coordinates.

190 225 226

190 225 227 227 231

190 225 227 227 231

Page 230: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Reference Guide228

© 2003 - 2009 Lumerical Solutions, Inc

Parameter Defaultvalue

Type Description

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. Musthave length L or 1.

phi required vector phi vector, in degrees. Musthave length L or 1.

See AlsoFDTD toolbox , Far field projections , farfield3d , farfieldux , farfielduy

10.11.71 farfield3dintegrate

Used in 3D simulations, this function integrates the far field projection over a conecentered at theta0 and phi0, with a width specified by halfangle. The far field electric fieldis a function of the direction cosines (ux,uy), but farfield3dintegrate automatically does thechange of variables. Similarly, angles are specified in degrees, but converted to radiansbefore the integral is calculated.

Syntax Description

out =farfield3dintegrate(E2, ux,uy, halfangle, theta0,phi0);

Integrate 3D far field projection data.

Parameter Defaultvalue

Type Description

E2 required matrix E field data from farfield3d

ux required vector ux data from farfieldux

uy required vector uy data from farfielduy

halfangle optional 90 vector half angle of the integrationcone. unit in degrees. musthave length L or 1.

190 218 225 227 227

Page 231: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Scripting Language 229

© 2003 - 2009 Lumerical Solutions, Inc

theta0 optional 0 vector center angle theta of theintegration cone. unit indegrees. must have length Lor 1.

phi0 optional 0 vector center angle phi of theintegration cone. unit indegrees. must have length Lor 1.

See AlsoFDTD toolbox , Near to far field projections , farfield3d , farfieldux , farfielduy

, farfieldspherical

10.11.72 farfieldexact2d

This function projects complete complex vector fields to specific locations. It is expectedto be correct down to distances on the order of one wavelength. The projections frommultiple 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. Thedata is returned in the form of a matrix that is of dimension NxMx3 where N is the lengthof the x vector, M is the length of the y vector and the final index represents Ex, Ey, andEz. Note that N and M can be 1; when they are both 1, the function is the same asfarfieldexact.

Syntax Description

out = farfieldexact2d("mname", x, y, f, index);

Projects a given power or field profile monitor to the farfield at grid points specified by the vectors x,y.

Parameter

Defaultvalue

Type Description

mname required string name of the monitor from which far field iscalculated

x required vector x coordinates of the grid points where far field iscalculated

y required vector y coordinates of the grid points where far field iscalculated

f optional 1 number Index of the desired frequency point.

index optional index atmonitorcenter

number The index of the material to use for theprojection.

190 218 225 227

227 227

Page 232: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Reference Guide230

© 2003 - 2009 Lumerical Solutions, Inc

See AlsoFDTD toolbox , farfield2d , farfieldexact3d , farfieldexact

10.11.73 farfieldexact3d

The three dimension form of farfieldexact2d. This function projects complete complexvector fields to specific locations. It is expected to be correct down to distances on theorder of one wavelength. The projections from multiple monitors can be added to create atotal 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 thevector x, M the length of the vector y, K is the length of the vector z and the final indexrepresents Ex, Ey, and Ez. Note that N, M and K can be 1, and when they are all 1, thefunction is the same as farfieldexact.

Syntax Description

out = farfieldexact3d("mname", x, y, z, f, index);

Projects a given power or field profile monitor to the farfield at grid points specified by the vectors x,y,z.

Parameter Defaultvalue

Type Description

mname required string name of the monitor fromwhich far field is calculated

x required vector x coordinates of the grid pointswhere far field is calculated

y required vector y coordinates of the grid pointswhere far field is calculated

z required vector z coordinates of the grid pointswhere far field is calculated

f optional 1 number Index of the desired frequencypoint.

index optional value atmonitorcenter

number The index of the material touse for the projection.

See AlsoFDTD toolbox , farfield3d , farfieldexact2d , farfieldexact

190 222 230 231

190 225 229 231

Page 233: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Scripting Language 231

© 2003 - 2009 Lumerical Solutions, Inc

10.11.74 farfieldexact

This function projects complete complex vector fields to specific locations. It is expectedto be correct down to distances on the order of one wavelength. The projections frommultiple 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. Thex,y, z coordinates of each evaluation point are taken element-by-element from the vectorlists. i.e., the i-th point in a 2D simulation would be at [x(i),y(i)].

3DVectors lists x,y,z must have the same length L or be length 1. The data is returned in amatrix of dimension Lx3. The first index represents positions defined by one elementfrom each of x,y, z. [x(i),y(i),z(i)]; the second index represents Ex, Ey, and Ez. 2DVector lists x, y must have the same length L or be length 1. The data is returned in theform of a matrix that is of dimension Lx3. The first index represents positions defined byone element from each of x,y. [x(i),y(i)]; The second index represents Ex, Ey, and Ez.

Syntax Description

out =farfieldexact("mname", x, y,f, index)

2D far field exact projection

out =farfieldexact("mname", x, y,z, f, index);

3D far field exact projection

Parameter Default Defaultvalue

Type Description

mname required string name of the monitor fromwhich far field is calculated

x required vector x coordinates of points wherefar field is calculated. musthave length L or 1.

y required vector y coordinates of points wherefar field is calculated. musthave length L or 1.

z required vector z coordinates of points wherefar field is calculated. musthave length L or 1.

f optional 1 number Index of the desired frequencypoint.

Page 234: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Reference Guide232

© 2003 - 2009 Lumerical Solutions, Inc

index optional value atmonitorcenter

number The index of the material touse for the projection.

See AlsoFDTD toolbox , farfield2d , farfield3d , farfieldexact2d , farfieldexact3d

10.11.75 Grating calculations

The following commands are used to obtain information on the strengths of orders fromgratings. They should be used for periodic structures that were simulated using periodicor Bloch boundary conditions.

To understand the meaning of these functions, consider a grating as shown below:

The grating orders are defined by:

where ax and ay are the grating periods in the x and y directions respectively and (n,m)

are any integers where the condition can be satisfied. In thefollowing grating functions, the x and y components of the incoming k vector aredetermined from the Bloch boundary conditions (or periodic boundary conditions) usedduring the simulation. They should also correspond to the x and y components of thesource k vector.

See AlsoFDTD toolbox

190 222 225 229 230

190

Page 235: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Scripting Language 233

© 2003 - 2009 Lumerical Solutions, Inc

10.11.76 grating

Returns the relative strength of all physical grating orders for a given simulation. Theresult corresponds to the fraction of power that is reflected or transmitted into a particularorder. Results are normalized such that the sum of all the orders is equal to 1.

3D simulations: Data is returned in a N x M matrix where N,M are the number of gratingorders.2D simulations: Data is returned in a N matrix where N is the number of grating orders.

Syntax Description

out =grating("monitorname",f,index, direction );

Returns the strength of all physical grating orders frommonitorname.

Parameter Defaultvalue

Type Description

monitorname

required string name of the monitor fromwhich far field is calculated

f optional 1 number Index of the desired frequencypoint.

index optional value atmonitorcenter

number The index of the material touse for the projection.

direction optional direction ofmax power

flow

number Direction: this can be +1 or-1.

See AlsoFDTD toolbox , Grating calculations , gratingn , gratingperiod1 , gratingbloch1

, gratingu1 , gratingangle , gratingpolar , gratingvector

10.11.77 gratingn

Returns the vector of integers, n, corresponding to the values returned by grating.

Syntax Description

out = gratingn("monitorname",...);

Same arguments as grating function.

See AlsoFDTD toolbox , grating , gratingm

190 232 233 236

236 236 237 234 235

190 233 234

Page 236: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Reference Guide234

© 2003 - 2009 Lumerical Solutions, Inc

10.11.78 gratingm

Returns the vector of integers, m, corresponding to the values returned by grating. Onlyused in 3D simulations.

Syntax Description

out = gratingm("monitorname",...);

Same arguments as grating function.

See AlsoFDTD toolbox , grating , gratingn

10.11.79 gratingpolar

Returns the relative strength of all physical grating orders for a given simulation. Theresult corresponds to the fraction of power that is reflected or transmitted into a particularorder. Results are normalized such that the sum of all the orders is equal to 1. Verysimilar to the basic grating function, except that the vector field information is returned inspherical coordinates. This is useful when studying the polarization effects.

3D simulations: Data is returned in a N x M x 3 matrix where N,M are the number ofgrating 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 gratingorders. The second dimension is Er, Etheta, Ephi.

Syntax Description

out = gratingpolar("mname", f, index,direction);

Returns the strength of all physical grating orders fromthe monitor. Output is in spherical coordinates.

Parameter Defaultvalue

Type Description

mname required string name of the monitor fromwhich far field is calculated

f optional 1 number Index of the desired frequencypoint.

index optional value atmonitorcenter

number The index of the material touse for the projection.

direction optional direction ofmax power

number Direction: this can be +1 or-1.

190 233 233

Page 237: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Scripting Language 235

© 2003 - 2009 Lumerical Solutions, Inc

flow

See AlsoFDTD toolbox , Grating calculations , grating , gratingn , gratingperiod1 ,gratingbloch1 , gratingu1 , gratingangle , gratingvector

10.11.80 gratingvector

Returns the relative strength of all physical grating orders for a given simulation. Theresult corresponds to the fraction of power that is reflected or transmitted into a particularorder. Results are normalized such that the sum of all the orders is equal to 1. Verysimilar to the basic grating function, except that the vector field information is returned inCartesian coordinates. This is useful when studying the polarization effects.

3D simulations: Data is returned in a N x M x3 matrix where N,M are the number ofgrating orders. The third dimension is Ex, Ey, Ez.2D simulations: Data is returned in a N x3 matrix where N is the number of grating orders.The second dimension is Ex, Ey, Ez.

Syntax Description

out = gratingvector("mname", f, index,direction);

Returns the strength of all physical grating orders frommonitorname. Output is in Cartesian coordinates.

Parameter Defaultvalue

Type Description

mname required string name of the monitor fromwhich far field is calculated

f optional 1 number Index of the desired frequencypoint.

index optional value atmonitorcenter

number The index of the material touse for the projection.

direction optional direction ofmax power

flow

number Direction: this can be +1 or-1.

See AlsoFDTD toolbox , Grating calculations , grating , gratingn , gratingperiod1 ,gratingbloch1 , gratingu1 , gratingangle , gratingpolar

190 232 233 233 236

236 236 237 235

190 232 233 233 236

236 236 237 234

Page 238: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Reference Guide236

© 2003 - 2009 Lumerical Solutions, Inc

10.11.81 gratingperiod1

Returns the grating period ax based on the value from the simulation area.

Syntax Description

out = gratingperiod1("monitorname", ...);

Same arguments as grating function.

See AlsoFDTD toolbox , grating , gratingperiod2

10.11.82 gratingperiod2

Returns the grating period ax based on the value from the simulation area. Only used in3D simulations.

Syntax Description

out = gratingperiod2("monitorname", ...);

Same arguments as grating function.

See AlsoFDTD toolbox , grating , gratingperiod1

10.11.83 gratingbloch1

Returns the value of the bloch vector (kin)x used for the calculation, based on the value for

the simulation area.

Syntax Description

out = gratingbloch1("monitorname", ...);

Same arguments as grating function.

See AlsoFDTD toolbox , grating , gratingbloch2

10.11.84 gratingu1

Returns first component of the unit vector (ux) corresponding to the values returned by

grating.

Syntax Description

out = gratingu1("monitorname", ...);

Same arguments as grating function.

190 233 236

190 233 236

190 233 237

Page 239: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Scripting Language 237

© 2003 - 2009 Lumerical Solutions, Inc

See AlsoFDTD toolbox , grating , gratingu2

10.11.85 gratingu2

Returns first component of the unit vector (uy) corresponding to the values returned by

grating. Only used in 3D simulations

Syntax Description

out = gratingu2("monitorname", ...);

Same arguments as grating function.

See AlsoFDTD toolbox , grating , gratingu1

10.11.86 gratingangle

Returns the angle of each order corresponding to the values returned by grating, indegrees. Only available for 2d simulations.

Syntax Description

out = gratingangle("monitorname", ...);

Same arguments as grating function.

See AlsoFDTD toolbox , grating

10.11.87 gratingbloch2

Returns the value of the bloch vector (kin)y used for the calculation, based on the value for

the simulation area. Only used in 3D simulations.

Syntax Description

out = gratingbloch2("monitorname", ...);

Same arguments as grating function.

See AlsoFDTD toolbox , grating , gratingbloch1

190 233 237

190 233 236

190 233

190 233 236

Page 240: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Reference Guide238

© 2003 - 2009 Lumerical Solutions, Inc

10.12Creating your own script commandsYou can run any script file simply by typing the name of the file (without the .lsfextension), as long as the file is in your current working directory or in the current path(see getpath and addpath ). 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 commandcreate_array;

The directory· C:\Program Files\Lumerical\FDTD\scripts (Windows)· /usr/local/lumerical/scripts (Linux)is always in the path. Therefore, you can save any script files to that directory and theywill always be in the path.

Script files must follow these formatting rules: · 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 should terminate with a semicolon. · On any line, all characters after a # symbol are ignored. · The last line in the script file must have a carriage return.

Finally, you can not define a variable or assign values to a variable that has the samename as one of the script commands. For example, the following lines

sum = matrix(1,2);

angle = acos(pi/2);

are not valid statements and will return an error.

Note: All script files use a common variable space. As a consequence, variables defined inthe scripts are global, and the script files have access to all variables defined in thesimulation project file.

This can lead to problems when two script files use the same variable names. Forexample, script_1.lsf (defined below) will print the value 10 to the command linesince script_2.lsf modified the variable i.script_1.lsfi=1;script_2;?i;

script_2.lsf

113 114

Page 241: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Scripting Language 239

© 2003 - 2009 Lumerical Solutions, Inc

for(i=1:10) { # do something}

Page 242: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Reference Guide240

© 2003 - 2009 Lumerical Solutions, Inc

11 Appendix

11.1 Software acknowledgementLumerical Solutions, Inc. gratefully acknowledges the inclusion of software developed bythe following third-parties:

Arnoldi Package (ARPACK)R. Lehoucq, K. Maschhoff, D. Sorensen and C. Yang http://www.caam.rice.edu/software/ARPACK/The user’s guide can be found on the Society for Industrial and Applied Mathematics(SIAM) site: http://www.ec-securehost.com/SIAM/SE06.html

Message Passing Interface Chameleon (MPICH and MPICH2)MPICH is a freely available, portable implementation of MPI, the Standard formessage-passing libraries. MPICH2 is a high-performance and widely portable implementation of the MessagePassing Interface (MPI) standard (both MPI-1 and MPI-2). W. Gropp: (630) 252-4318; FAX: (630) 252-5986; e-mail: [email protected]. Lusk: (630) 252-7852; FAX: (630) 252-5986; e-mail: [email protected] and Computer Science Division, Argonne National Laboratory, Argonne IL60439 MPICH: http://www.mcs.anl.gov/research/projects/mpi/mpich1/MPICH2: http://www.mcs.anl.gov/research/projects/mpich2/

Quadratic Programming Routines (Quadprog)Release 1.4 by Berwin A Turlach. Used under the terms of the GNU Library GeneralPublic LicenseQuadprog is a Fortran77 routines for solving quadratic programming problems.For more information, please see: http://www.maths.uwa.edu.au/~berwin/software/quadprog.html

Unsymmetric MultiFrontal Package (UMFPACK)UMFPACK, Copyright (c) 1995-2006 by Timothy A. Davis. All Rights Reserved.Used by permission without modification under the GNU Lesser General Public License. UMFPACK is a set of routines for solving unsymmetric sparse linear systems, Ax=b,using the Unsymmetric MultiFrontal method. For more information, please see: http://www.cise.ufl.edu/research/sparse/umfpack/

Page 243: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Index 241

© 2003 - 2009 Lumerical Solutions, Inc

Index' 138

- 132

! 136, 137

!= 134

" 137

# 139

% 126

& 135

* 132

/ 132

: 125

? 139

[] 125

^ 133

| 136

~ 137

+ 132

< 135

<= 134

= 125

== 133

> 135

>= 134

abs 144

absolute 144

access 129

acos 143

addanalysisgroup 206

addcircle 200

addcustom 200

adddipole 203

addfdtd 203

addgaussian 203

addimage 200

addimportedsource 205

addindex 205

addition 132

addmaterial 183

addmesh 203

addmode 204

addmovie 205

addpath 114

addplane 204

addpoly 201

addpower 206

addprofile 206

addpyramid 201

addrect 201

addring 201

addsphere 202

addstructuregroup 202

addsurface 202

addtfsf 204

addtime 205

addtogroup 166

adduserprop 167

almostequal 133

analysis group 58, 101

analysis tools 98

and 135

angle 144

anisotropic 77

apodization 62

arccos 143

arcsin 142

arctan 143

array 125, 129, 130

asap 49, 118, 119

asapexport 118

asapimport 119

asapload 118

asin 142

assign 129

assignment 125

atan 143

Page 244: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Reference Guide242

© 2003 - 2009 Lumerical Solutions, Inc

atan2 143

boundary conditions 45

break 115

c 130

cd 110

clear 128

cleardcard 181

clearsourcedata 207

closeall 161

command line 122

comment 139

comparison 133

conductivity 74

conj 144

conjugate 144

copy 110, 166

copydcard 181

cos 142

cosine 142

cp 110

ctranspose 150

currentfilename 112

custom primitive 37

cwnorm 208

czt 155

data export 104

default settings 86

del 109

delete 163

deleteall 163

Dielectric 74

dipolepower 211

dir 109, 110

division 132

double quote 137

drude 74

else 157

endl 139

eps0 130

equal 125

equal to 133

equation interpreter 65

escape 115

exit 111

exp 146

exponential 146

exportfigure 160

farfield2d 222

farfield2dintegrate 224

farfield3d 225

farfield3dintegrate 228

farfieldangle 224

farfieldexact 231

farfieldexact2d 229

farfieldexact3d 230

farfieldfilter 221

farfieldpolar2d 223

farfieldpolar3d 226

farfieldspherical 227

farfieldux 227

farfielduy 227

farfieldvector2d 223

farfieldvector3d 226

fft 150

fftk 153

fftw 152

filebasename 112

filedirectory 113

fileexists 112

fileextension 113

fileopendialog 189

filesavedialog 190

find 149

findpeaks 149

for 157

format 116

gds 119

gdsii 84, 119

Page 245: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Index 243

© 2003 - 2009 Lumerical Solutions, Inc

get 169

getdata 181

getelectric 182

getfdtdindex 185

getglobal 171

getindex 185

getmagnetic 182

getmaterial 184

getnamed 170

getnamednumber 171

getnumber 170

getpath 113

getsourceangle 208

getview 178

grating 233

gratingangle 237

gratingbloch1 236

gratingbloch2 237

gratingm 234

gratingn 233

gratingperiod1 236

gratingperiod2 236

gratingpolar 234

gratingu1 236

gratingu2 237

gratingvector 235

greater than 135

greater than or equal to 134

havedata 180

if 157

imag 144

image 159

imaginary 144

import 84, 119

import object 34

importnk 174

importnk2 175

importsurface 172

importsurface2 173

integrate 148

integration 31

interp 148

interpolate 148

inverse 154

invfft 154

Kerr nonlinear 74

killwizard 188

layout 81

layoutmode 199

legend 159

length 146

less than 135

less than or equal to 134

linspace 126

ln 145

load 116, 195

loaddata 116

log 145

log10 145

loop 157

lorentz 74

ls 110

lum2mat 121, 122

mat 121

material database 72

material models 74

matlab 104, 121, 122

matlabget 123

matlabput 124

matlabsave 120

matrix 126, 130

max 147

Max coefficients 74

mesh 77

mesh refinement region 43

meshgrid3dx 127

meshgrid3dy 128

meshgrid3dz 128

Page 246: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Reference Guide244

© 2003 - 2009 Lumerical Solutions, Inc

meshgridx 127

meshgridy 127

message 186

min 147

mod 155

mode solver 67

monitor 58

monitors 199

move 111, 166

mu0 130

multiplication 132

mv 111

natural 145

negative 132

new2d 194

new3d 195

newwizard 187

newwizardpage 187

nonorm 208

normalization 20

not 134, 136, 137

num2str 137

or 136

orbit 178

order 77

output 139

path 113, 114

pause 114

PEC 74

permeability 130

permittivity 130

phase 144

pi 130

pinch 146

plasma 74

plot 158

power 133

priorities 77

pwd 110

quit 111

rand 156

randmatrix 127

random 156

randreset 156

readdata 117

real 143

redo 179

redraw 176

redrawmode 176

redrawoff 176

redrawon 176

rm 109

round 155

run 113, 196

runanalysis 198

running a simulation 96

runparallel 197

runwizard 188

sampled data 74

save 116, 117, 196

savedata 116

savedcard 117

screen 139

script 113

seed 156

select 164

selectall 163, 164

selectfigure 160

selectpartial 164

Sellmeier 74

set 167

setglobal 168

setmaterial 184

setnamed 168

setparallel 197

setplot 160

setsourcesignal 207

setview 177

Page 247: FDTD Solutions Reference Guide - DANASdanas.kr/download.php?filename=1330324545_l6.pdf · sourceintensity_pavg, dipolepower, runanalysis, runwizard, wizardgetdata, setplot. 1.1.10

Index 245

© 2003 - 2009 Lumerical Solutions, Inc

shiftselect 165

shiftselectpartial 165

showdata 180

simulation 198

simulation region 43

sin 141

sine 141

single quote 138

size 146

source 49

sourceintensity 214

sourceintensity_avg 215

sourceintensity_pavg 215

sourcenorm 209

sourcenorm2_avg 209

sourcenorm2_pavg 210

sourcepower 211

sourcepower_avg 212

sourcepower_pavg 213

sources 199

spectral averaging 62

speed of light 130

spline 148

sqrt 145

square root 145

strings 137, 138

structure 34

structures 198

structures group 34

subtraction 132

sum 147

surface 41

surface object 41

switchtolayout 199

system 111

tan 142

tangent 142

Tolerance 74

toolbar 87

transmission 216

transmission_avg 217

transmission_pavg 217

transpose 150

undo 179

units 20

unselectall 164

unwrap 145

updatesourcemode 207

variables with spaces 126

which 114

wizardgetdata 188

wizardoption 189

wizardwidget 187

workspace 129

write 117

z-transform 155