FDTD_reference_guide.pdf



Comments



Description

FDTD S olu tion sReference Guide Release 8.0 Contents 1 Table of Contents Part I New Features 1 2 3 4 5 New New New New New 12 13 15 16 18 20 features ............................................................................................................ for version 8.0 features ............................................................................................................ for version 7.5 features ............................................................................................................ for version 7.0 features ............................................................................................................ for version 6.5 features ............................................................................................................ for version 6.0 Part II Solver physics 23 1 FDTD ............................................................................................................ 23 FDTD ................................................................................................................................................. and Maxw ell's equations 24 Meshing ................................................................................................................................................. in FDTD 26 2 Eigenmode ............................................................................................................ Solver 26 Meshing ................................................................................................................................................. in the Eigenm ode solver 27 3 Propagator ............................................................................................................ 28 Variational ................................................................................................................................................. FDTD 28 Eigenm ................................................................................................................................................. ode expansion 30 Meshing ................................................................................................................................................. in the propagator 30 4 INTERCONNECT ............................................................................................................ 31 Tim................................................................................................................................................. e Dom ain Sim ulator 31 Frequency ................................................................................................................................................. Dom ain Sim ulator 32 5 DEVICE ............................................................................................................ 32 System ................................................................................................................................................. of Equations 33 Meshing ................................................................................................................................................. in DEVICE 35 Part III Units and normalization 37 1 Time domain ............................................................................................................ solvers 37 Frequency ................................................................................................................................................. dom ain norm alization 39 Spectral ................................................................................................................................................. averaging 41 Source ................................................................................................................................................. am plitudes 48 2 Frequency ............................................................................................................ domain solvers 48 3 Calculating ............................................................................................................ and normalizing power in the frequency domain 48 4 Integrating ............................................................................................................ over lines, surfaces and volumes 49 Part IV CAD layout editor 51 1 Main title ............................................................................................................ bar 52 2 Toolbars ............................................................................................................ 52 Main ................................................................................................................................................. 52 Edit ................................................................................................................................................. 54 Mouse ................................................................................................................................................. m ode 55 View ................................................................................................................................................. 57 Sim................................................................................................................................................. ulation 58 © 2003 - 2012 Lumerical Solutions, Inc 2 Reference Guide Alignm ................................................................................................................................................. ent 59 Search ................................................................................................................................................. bar 59 3 View ports ............................................................................................................ 60 4 Object............................................................................................................ Tree 60 Enable/Disable ................................................................................................................................................. Sim ulation Object 61 5 6 7 8 9 10 11 Object............................................................................................................ Library Results ............................................................................................................ View Optimization ............................................................................................................ and Sweeps Script ............................................................................................................ Prompt and Script Editor Script ............................................................................................................ Workspace and Script Favorites Changing ............................................................................................................ the CAD layout Converting ............................................................................................................ from 2D to 3D 62 62 63 63 63 64 65 Part V Simulation objects 68 1 Structures ............................................................................................................ 70 Prim ................................................................................................................................................. itives 71 Attributes ................................................................................................................................................. 72 Com ................................................................................................................................................. ponents 73 Geom ................................................................................................................................................. etry tab 74 Material ................................................................................................................................................. tab 74 Rotations ................................................................................................................................................. tab 74 Graphical ................................................................................................................................................. Rendering tab 74 Custom ................................................................................................................................................. tab 75 Im port ................................................................................................................................................. Data tab 76 Surface ................................................................................................................................................. tab 80 Properties ................................................................................................................................................. tab 82 Script ................................................................................................................................................. tab 82 2 Simulation ............................................................................................................ 83 General ................................................................................................................................................. tab 83 Geom ................................................................................................................................................. etry tab 84 Mesh ................................................................................................................................................. settings tab 84 Boundary ................................................................................................................................................. conditions tab 86 Advanced ................................................................................................................................................. options tab 89 3 Sources ............................................................................................................ 91 General ................................................................................................................................................. tab 93 Geom ................................................................................................................................................. etry tab 95 Frequency/Wavelength ................................................................................................................................................. tab 95 Beam ................................................................................................................................................. options tab 97 Advanced ................................................................................................................................................. tab 99 Integrated ................................................................................................................................................. m ode source 100 4 Monitors ............................................................................................................ 104 Frequency ................................................................................................................................................. Pow er/Profile tab 106 Frequency ................................................................................................................................................. Pow er/Profile Advanced tab 106 General ................................................................................................................................................. tab 107 Data ................................................................................................................................................. to record tab 108 Geom ................................................................................................................................................. etry tab 108 © 2003 - 2012 Lumerical Solutions, Inc Contents 3 Spectral ................................................................................................................................................. averaging and apodization tab 108 Advanced ................................................................................................................................................. tab 109 Setup ................................................................................................................................................. tab 110 Analysis ................................................................................................................................................. tab 110 Mode ................................................................................................................................................. expansion tab 112 5 Equation ............................................................................................................ interpreter 114 Part VI Material database 116 1 Material ............................................................................................................ database 116 2 Permittivity ............................................................................................................ models 117 Anisotropic ................................................................................................................................................. m aterials 121 3 User-defined ............................................................................................................ models 122 4 Material ............................................................................................................ explorer 125 5 Mesh............................................................................................................ order 127 Part VII Running simulations and analysis 129 1 Resource ............................................................................................................ Manager 129 Resources ................................................................................................................................................. Advanced Options 131 2 Running ............................................................................................................ a simulation 132 3 Analysis ............................................................................................................ tools 133 Analysis ................................................................................................................................................. tools and the sim ulation environm ent 134 Analysis ................................................................................................................................................. groups 134 Figure ................................................................................................................................................. w indow s for plots and im ages 136 Data ................................................................................................................................................. export 138 Visualizer ................................................................................................................................................. 139 Results ................................................................................................................................................. Manager 142 4 Optimization ............................................................................................................ and parameter sweeps 146 Optim ................................................................................................................................................. ization 148 Particle ................................................................................................................................................. Sw arm Optim ization 150 Param ................................................................................................................................................. eter Sw eeps 152 Nested ................................................................................................................................................. Sw eeps 153 Part VIII Scripting Language 155 1 System ............................................................................................................ 156 new ................................................................................................................................................. project 158 new ................................................................................................................................................. 2d 159 new ................................................................................................................................................. 3d 159 new ................................................................................................................................................. m ode 160 save ................................................................................................................................................. 161 load ................................................................................................................................................. 161 del ................................................................................................................................................. 162 rm................................................................................................................................................. 162 dir................................................................................................................................................. 162 ls ................................................................................................................................................. 163 cd ................................................................................................................................................. 163 pw................................................................................................................................................. d 164 © 2003 - 2012 Lumerical Solutions, Inc 4 Reference Guide cp ................................................................................................................................................. 164 mv ................................................................................................................................................. 165 exit ................................................................................................................................................. 165 system ................................................................................................................................................. 166 fileexists ................................................................................................................................................. 166 currentfilenam ................................................................................................................................................. e 167 filebasenam ................................................................................................................................................. e 167 fileextension ................................................................................................................................................. 168 filedirectory ................................................................................................................................................. 168 getcom ................................................................................................................................................. m ands 169 Run ................................................................................................................................................. script 169 getpath ................................................................................................................................................. 170 addpath ................................................................................................................................................. 170 w hich ................................................................................................................................................. 171 pause ................................................................................................................................................. 171 break ................................................................................................................................................. 172 Excape ................................................................................................................................................. key 172 form ................................................................................................................................................. at 173 loaddata ................................................................................................................................................. 173 savedata ................................................................................................................................................. 174 savedcard ................................................................................................................................................. 174 readdata ................................................................................................................................................. 175 w rite ................................................................................................................................................. 175 asapexport ................................................................................................................................................. 176 asapload ................................................................................................................................................. 176 asapim ................................................................................................................................................. port 177 gdsim ................................................................................................................................................. port 178 m atlabsave ................................................................................................................................................. 179 m atlab ................................................................................................................................................. 179 m atlabget ................................................................................................................................................. 181 m atlabput ................................................................................................................................................. 181 debug ................................................................................................................................................. 182 2 Manipulating ............................................................................................................ variables 182 = ................................................................................................................................................. 183 : ................................................................................................................................................. 183 [] ................................................................................................................................................. 184 % ................................................................................................................................................. 184 linspace ................................................................................................................................................. 185 m atrix ................................................................................................................................................. 185 randm ................................................................................................................................................. atrix 186 m eshgridx ................................................................................................................................................. 186 m eshgridy ................................................................................................................................................. 187 m eshgrid3dx ................................................................................................................................................. 187 m eshgrid3dy ................................................................................................................................................. 188 m eshgrid3dz ................................................................................................................................................. 188 m eshgrid4d ................................................................................................................................................. 188 clear ................................................................................................................................................. 189 w orkspace ................................................................................................................................................. 189 Accessing ................................................................................................................................................. and assigning m atrix elem ents 190 Matrix ................................................................................................................................................. operators 191 © 2003 - 2012 Lumerical Solutions, Inc Contents 5 Pre-defined ................................................................................................................................................. constants 191 3 Operators ............................................................................................................ 192 . ................................................................................................................................................. 193 * ................................................................................................................................................. 194 / ................................................................................................................................................. 194 + ................................................................................................................................................. 195 - ................................................................................................................................................. 195 ^ ................................................................................................................................................. 196 == ................................................................................................................................................. 196 alm ................................................................................................................................................. ostequal 196 != ................................................................................................................................................. 197 <= ................................................................................................................................................. 198 >= ................................................................................................................................................. 198 < ................................................................................................................................................. 198 > ................................................................................................................................................. 199 & ................................................................................................................................................. 199 and ................................................................................................................................................. 200 | ................................................................................................................................................. 200 or ................................................................................................................................................. 201 ! ................................................................................................................................................. 201 ~ ................................................................................................................................................. 202 " ................................................................................................................................................. 202 ' ................................................................................................................................................. 203 endl ................................................................................................................................................. 204 ? ................................................................................................................................................. 204 com ................................................................................................................................................. m ents 205 4 Functions ............................................................................................................ 205 sin ................................................................................................................................................. 209 cos ................................................................................................................................................. 209 tan ................................................................................................................................................. 210 asin ................................................................................................................................................. 210 acos ................................................................................................................................................. 211 atan ................................................................................................................................................. 211 atan2 ................................................................................................................................................. 212 real ................................................................................................................................................. 212 im ag ................................................................................................................................................. 212 conj ................................................................................................................................................. 213 abs ................................................................................................................................................. 213 angle ................................................................................................................................................. 214 unw ................................................................................................................................................. rap 214 log ................................................................................................................................................. 215 log10 ................................................................................................................................................. 215 sqrt ................................................................................................................................................. 215 exp ................................................................................................................................................. 216 size ................................................................................................................................................. 216 length ................................................................................................................................................. 217 pinch ................................................................................................................................................. 217 sum ................................................................................................................................................. 218 m ax ................................................................................................................................................. 218 m in ................................................................................................................................................. 219 © 2003 - 2012 Lumerical Solutions, Inc 6 Reference Guide dot ................................................................................................................................................. 219 cross ................................................................................................................................................. 220 eig ................................................................................................................................................. 220 m ult ................................................................................................................................................. 221 flip ................................................................................................................................................. 222 perm ................................................................................................................................................. ute 222 reshape ................................................................................................................................................. 223 inv................................................................................................................................................. 223 interp ................................................................................................................................................. 224 interptri ................................................................................................................................................. 224 spline ................................................................................................................................................. 225 integrate ................................................................................................................................................. 225 integrate2 ................................................................................................................................................. 226 find ................................................................................................................................................. 227 findpeaks ................................................................................................................................................. 228 transpose ................................................................................................................................................. 228 ctranspose ................................................................................................................................................. 229 num ................................................................................................................................................. 2str 229 str2num ................................................................................................................................................. 230 eval ................................................................................................................................................. 230 feval ................................................................................................................................................. 231 substring ................................................................................................................................................. 231 findstring ................................................................................................................................................. 232 replace ................................................................................................................................................. 232 replacestring ................................................................................................................................................. 233 fft ................................................................................................................................................. 233 fftw ................................................................................................................................................. 235 fftk ................................................................................................................................................. 236 invfft ................................................................................................................................................. 237 czt................................................................................................................................................. 238 polyarea ................................................................................................................................................. 239 centroid ................................................................................................................................................. 240 polyintersect ................................................................................................................................................. 240 inpoly ................................................................................................................................................. 241 polygrow ................................................................................................................................................. 241 polyand ................................................................................................................................................. 242 polyor ................................................................................................................................................. 242 polydiff ................................................................................................................................................. 243 polyxor ................................................................................................................................................. 244 lineintersect ................................................................................................................................................. 244 linecross ................................................................................................................................................. 245 ceil ................................................................................................................................................. 246 floor ................................................................................................................................................. 246 m od ................................................................................................................................................. 246 sign ................................................................................................................................................. 247 round ................................................................................................................................................. 247 rand ................................................................................................................................................. 248 randreset ................................................................................................................................................. 248 finite ................................................................................................................................................. 249 solar ................................................................................................................................................. 249 stackrt ................................................................................................................................................. 250 © 2003 - 2012 Lumerical Solutions, Inc ........................... 268 addtriangle .......................................................................................................... 274 addtfsf .......................................................................................................................................................................................................................................................................... age 257 legend ............................................................................................................................................................................................................................... 277 © 2003 ..... ode 271 addpropagator ......................................................................................................................................................................................................................................................................... Inc .................................................................................................. 270 addsurface .......................................................................................... 254 polar ................................................................ 265 addanalysisgroup .........................................Contents 7 5 Loop ........................................................................................................................................................................................................................................................................................................... e 276 addm ........................ Objects 261 sw........................................................................................................................................................................................................... 255 polar2 ......................................... 270 addeigenm ....................................................................................................................................................................................................... 264 addstructuregroup ........................................................................................................................................................ 253 plotxy ............................................... ovie 276 addprofile ........................................................................................................................................................................................... 260 exportfigure ............................................................. 266 addcircle .............................................. ode 272 addm .... 273 addplane ........................................................................................................................................................................................................................................................................................................................................ 265 addobject ...................................... 259 selectfigure ................................................................................................................ commands 252 plot ................................................................................................................................................................................................. 276 addpow .............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................. 273 addgaussian ....................................................................................................................................................................................................................................... port 267 addpyram ......................................................................................................... 251 if ...................... 271 addm .............................................................2012 Lumerical Solutions..................... odesource 273 adddipole .............................. 266 addcustom ............................................................... id 267 addpoly ..................................................................................................................................................... 275 addtim .................................................................................. 257 im age ........................... 269 addring .......................................................................................................................................................................................................................................................................................................................................................................................................... 256 polarim ........................................................................................................................................................................................................................................................................................................................................................................................................................................ er 277 createbeam ............................................................................................................................................................................................................................................... portedsource 275 addindex .................................................................................... esh 272 addm ............................................................................................ itchtolayout 264 layoutm ...................... 261 7 Adding ............................................................................................................................................................................................................................................................................................................................. 268 addrect .............................................................................................................................................................................................................................................................. 260 closeall ............................ ode 264 addgroup ............................................................ 269 addsphere .............................................................................................................................................................................. 267 addim . 270 addfdtd .............................................. and conditional statements 251 for.......................................................................................................................................................................................... 259 setplot ..................................................................................................................................................................................................... 274 addim ..................................................................................................... 258 visualize ......................................... 252 6 Plotting .............................................................................. ............................................................................................................................................................................................................................................................................................................. 286 unselectall ...................................................................................................................................................................................................................................................................... 278 adddiffusion .................................................. 302 im portnk2 .................................................................................................................................................................................................................................................................................................................................................................................2012 Lumerical Solutions......................................................................................................................... 290 addtogroup ................................................................................................................. 299 haveproperty ....................................................................... 295 getnum ................................................................................................................................................................... 311 orbit .. 299 im portsurface ..... portdope 279 addbulkgen .............................................................................................................................................................. ode 306 clearsourcedata .................................................................................................................. 285 delete .................................................................................................................................................................................................................................. onitor 298 getglobalsource ............................................................................................................................................................................................................................................................................................................................................................................................................................ ed 296 getnam ................................................................................... 294 get ................................................................................................... on 308 redraw ....................................................................................................................... 289 copy ....................................................................... 279 addim ..........................................................................................................................................................................................8 Reference Guide adddevice ........ 280 addim ............................................................................. erate 312 © 2003 . m ode 309 setview ......................................................................................................................................................................................................................... 307 redraw ................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ ber 296 getnam ........................................................... 288 shiftselectpartial ................................................................................................................................................................................................................................................................................................................................................................................................................................................................................. 294 runsetup ................................................................................... 286 select .......................................................................... 284 deleteall ........................... 300 im portsurface2 .................. ednum ber 297 getglobalm ................................................................... 292 setnam ......................................................................................................................................................................................................................................... ed 292 setglobalm ... portgen 280 addgridattribute ............................................................................ Inc ..................................................................................................................................................................................................... 287 shiftselect ............................................................................................................................................................................... 311 fram .............................................................................. 287 selectpartial ........................................................................................................................................... 301 im portnk ........................................................................................................................... ent 281 8 Manipulating ............................................................................................................................................................................................... 278 adddope .................................................................................................................................................. 291 set . off 308 redraw ............................................................................................................................................................................................................................................................................................................................................................................. 285 selectall ................................................................................................................................................................................................................................................................................... 310 getview ..................... objects 282 groupscope .......................... 289 m ove ............................. 298 getsolver ............... 307 redraw .................................................................................................................... 280 addelem ........................................... onitor 293 setglobalsource ........................................................................................................................................................... 305 updatesourcem ................... 304 setsourcesignal ................................................................................................... 290 adduserprop .............................................................................................. ............... 314 rem .............................. ission_pavg 323 getsourceangle ..................................... 316 9 Running ............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ 323 nonorm ............................... 317 runparallel ............................... 333 sourceintensity_pavg ............. 313 addport ......................................................................................................................................................................................................................................................................... 333 sourceintensity_avg ........................................................... 319 runsw ...................... 313 redo .......................... 343 popportdata ..................................................................................................................... 315 disconnect ............................................................................................................................................................... 335 analysis ..................................................Contents 9 undo .................................................................. er_avg 330 sourcepow ... Inc .... 342 getresult .................................. 342 validateall .................... oveport 315 connect .................................................................................................... 2_avg 326 sourcenorm .............................................................. 338 overlap ....................................................................... eep 338 coupling ............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................... ission_avg 322 transm .......................................................................................................................... er 328 sourcepow ......................................................... odes 337 selectm ................................ 341 12 INTERCONNECT .............................................................................................................................................................................................................................................................................................................................. er_pavg 331 sourceintensity .................................................................................................................................................. 339 bestoverlap ............................................................................................................................................................................................ 344 © 2003 ....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................... 2_pavg 327 dipolepow .............................................. 325 sourcenorm ........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................... 343 pushportdata ................................................................................................................................................................................................................................................................................................................. 340 propagate ......................................................... 318 runjobs ........... 342 setresult .............................................................................................................................................................. 334 11 Eigenmode ................................................................................................................. ode 337 frequencysw ........................................................................................................................................................................................................................ 336 m esh .............. er 329 sourcepow ......................................................................................................... Measurements 341 validate .......................................................................................2012 Lumerical Solutions....................... 324 cw............................................................................................................................................................................................. 318 clearjobs ..................................................................................... Solver Measurements 335 setanalysis ................ 317 addjob ............................................................................................................................................................ simulations 316 run .................................................................. norm 325 sourcenorm ............................................................ 335 getanalysis ................................................................................................................ eep 319 10 FDTD........................................................................................................................................................................................................................................................................................................................................................................ 336 findm ............................................... Measurements and Normalization 320 transm ................ ission 321 transm ................................................................... ................................. 370 farfieldspherical ................................................................................................................. system s 361 farfieldfilter ........................................................................................... and w rite data to files 354 rectilineardataset ........................................................................................ 367 farfieldvector3d ............................................................................ eter 345 setfir ................................................................................................................................................................................................................................................................................................... 364 farfieldpolar2d ......................................................... 351 copydcard ...................................................................................................................................................................................................................................................................................................................................................................................................................................................... 369 farfielduy .........................................................................................2012 Lumerical Solutions.................................................................................................................................................................................................................................................................................... 365 farfieldangle ................ 366 farfield3d ........... 363 farfieldvector2d ......................... 356 getparam .............................. 374 15 Grating .................................................................................................................................................................... eter 356 addattribute ........ 368 farfieldpolar3d ...................................................................................................... 379 gratingpolar ...................................................................................................... 346 13 Measurement ............................................................................................................................. 379 gratingm ........................................................................................................................................................................................................................................................................ 378 gratingn .................... 373 farfieldexact .................................................................................................................................... 382 gratingperiod2 ............................................................................................................................................................................................................. 344 portdatasize ............................................................................................................................................................ field projections 359 Coordinate ............ 354 m atrixdataset ....................................................... 369 farfieldux ............................................................................................................................................................................................................................................ 349 getresult ............................................................................................................................................................................................................................................................................................................... 382 © 2003 ............................................................................................................................... Inc ........................................................................................................... projections 376 Grating ..............................................................................................10 Reference Guide cloneportdata ......................................................................................................................................................................................................................................... eepdata 348 getdata .......................................................................................................................................................................................................................................................................... 344 setsparam ............................................ and optimization data 347 getsw ..... to far field projections 358 Far ... 351 clearanalysis ...................................................................................................... 381 gratingperiod1 ...................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................... 372 farfieldexact3d ...................................................................................................................................................................................................................................................................... 357 14 Near ... 350 runanalysis .................................................................................................................... 370 farfield3dintegrate ..... 365 farfield2dintegrate ................................... 352 cleardcard ..................................................... agnetic 354 Read .................................................................................... calculations 376 grating .............................................................................................. eter 357 getattribute ..... 353 getm ..... 353 getelectric ........................................................................ 371 farfieldexact2d .................................................................................................................................................................................................................... 350 havedata ....................................................................................................... 362 farfield2d ...................................................................................... 380 gratingvector .......................................................................................................................................................... 355 addparam .................................................................................................................................................................................................................................................................................................... ...................................... 383 gratingu2 .............................................................................................................................................................................................................................................................................................................................................. aterial 387 getindex .................................................................... GUIs 392 m essage .............. 397 fileopendialog ..........2012 Lumerical Solutions............................................................................................................................................. Inc ............................................................................................................................................................................................................................ 396 killw .............................................. 384 gratingbloch1 .................................................................................................................................................................................................................................................................................................................................................... w izardpage 393 w izardw .... 397 filesavedialog ....................................................................................................................................................... izard 395 w izardgetdata ................................................................Contents 11 gratingangle ...................................................................................................................................................................................... 398 18 Creating ........................................................... 395 runw ............................................................................................. 383 gratingu1 ......................................................................................................................................................... your own script commands 398 Index 401 © 2003 .. aterial 387 getm ................................................................................................................................................................................................................................................................................................................................................................................................................. 388 getm .................................................................................................................. izard 396 w izardoption ................................. ericalperm ittivity 390 17 User defined ...................................................................................................................................................................................................................................................................................................................................... idget 394 w izarddata .......................................................................................................................................... 388 getfdtdindex ................................. odeindex 389 getnum ...................... aterial 386 copym ............................................................................................ 385 16 Material ............................................................................................................................................................................................................................................................................................................... w izard 393 new ............................... 384 gratingbloch2 ........................................ 392 new ................................................................................................................................................. database 385 addm ...................................................................................................................................................................................... aterial 386 setm ............................ 5 Structure groups 18 Analysis (monitor) groups 18 Object tree browser 18 Built in script file editor 18 Script syntax highlighting 18 Copy and Paste 18 Dipole radiated power calculation 19 New MODE Source script commands Other new script commands 19 15 17 19 © 2003 .0 Parameter sweeps 16 Optimization 16 Object library 16 Mac OS X support 16 Windows 7 support 16 Conformal mesh 16 Simplified installation and licensing 17 More flexible PML configuration options Improved GDSII import 17 Analytic material model 17 Other new script commands 17 New features for version 6.5 Ability to distribute optimizations and parameter sweeps Movie monitors in parallel simulations 15 New script commands 15 New features for version 7. See the following sections for a list of the latest new features. New features for version 8.2012 Lumerical Solutions.12 Reference Guide 1 New Features FDTD Solutions is constantly being upgraded.0 User defined material models 13 Non-diagonal anisotropic media 13 Results manager and Visualizer 14 3D only user interface 14 Mode expansion monitors 14 Rotatable mode sources 15 Material fitting improvements 15 New script commands 15 New features for version 7. Inc . negative index materials and many other forms of electric and magnetic field updates. Inc .New Features Online Help search bar 19 Simplified installation 19 Improved material fits 20 New features for version 6.0.0 Multi coefficient material model 20 Auto fitting of experimental data 20 Improved material database GUI 20 Expanded list of material data 20 Spectral averaging 20 More far field analysis 21 GUI upgrade 21 User defined source signals 21 Shorter source pulses 21 Unicode characters 22 13 1. Paramagnetic materials: users can now specify both the Permittivity and Permeability to simulate magnetic materials.0 User-defined material models In FDTD Solutions 8. in which case the added polarization will be in addition to the polarization of any base material that is selected. This will allow for arbitrary nonlinear materials. / ( 2) ( 2) ( 3) Non-diagonal anisotropic media FDTD Solutions 8. . 2.2012 Lumerical Solutions. An arbitrary dispersive base material can also be specified. the following new material models have been added to the Material database 117 (and more material models will be introduced in the future): ( 2) ( 3) 1. Please see the User-defined models 122 section of the Reference Guide for more detail. users now have the ability to create plugin materials and directly modify the update equations. In addition.1 New features for version 8. materials: users can now specify the and terms for nonlinear simulations.0 supports the full 9 element permittivity tensor: Di ij Ej where summation over j is implied on the right hand side. The full anisotropy tensor can be written as © 2003 . Please see the Anisotropy and Magneto-Optics section of the Application Library for some examples. Then. The 2 dimensional drawing mode looks very similar to the 2 dimensional drawing environment from 2D FDTD or MODE 4.0 features new mode expansion monitors. This includes a Results View window which displays all the results for the simulation object that is currently selected in the Object Tree. Mode expansion monitors FDTD Solutions 8. The Mode Expansion monitor greatly facilitates the interoperability between FDTD Solutions and INTERCONNECT as it returns the S parameters. greatly reducing the need for scripting. Results manager and Visualizer The Results Manager 142 is a tool for analyzing simulation data. see Overlap analysis.0 allows users to perform 2D and 3D simulations on the same 3D structure by defining 2D and 3D simulation regions in the same project file. Also featured in FDTD Solutions 8.2012 Lumerical Solutions. and the results that are returned. as well as arbitrary Liquid Crystals orientations. Results Manager and the Visualizer provide a very useful and intuitive way of analyzing and visualizing variables and results through the GUI. users will start by specifying the diagonal elements of the tensor. which significantly simplifies the process of visualizing simulation data. Inc . Please see Anisotropic materials 121 for more information on how to define this tensor.14 Reference Guide 11 21 31 12 22 32 13 23 33 To define this tensor. arbitrary rotations to this tensor can be applied through a Grid Attribute 72 object to induce the correct rotation. 3D only user interface FDTD Solutions 8. The Results Manager also includes a Script Workspace and a Script Favorites window. For more information. A 2 dimensional drawing mode is provided so that it is possible to work only with a 2 dimensional slice of the structure. which can be imported into © 2003 . When used in conjunction. This new feature allows users to simulate magneto-optical effects. These monitors allow users to expand an arbitrary field profile (from a monitor) into a specific mode (or a set of modes). For more information on this expansion calculation. providing additional GUI-based functionalities.0 is a Visualizer 139 . see Converting from 2D to 3D 65 . getresult 350 .5. runsweep 319 addjob 318 . Users should make sure to extend the waveguide/fiber through the PML boundaries.5. Material fitting improvements The material fitting routine has been optimized to improve material fits for dispersive sampled materials with low losses. . In the past. operator 193 . see the function description in the scripting section of the Reference Guide. For more information. addattribute 356 . reducing the time to complete the sweep by a factor of 3. movie monitors only worked when the simulation was run in single processor mode.5 provides a simple way to run multiple simulations at the same time. suppose you have 30 simulations from an optimization or parameter sweep task. reshape 223 . eig 220 .) With FDTD 7. FDTD can run three concurrent simulations (one on each computer). mult 221 . 1. Inc . each of the 30 simulations would run consecutively on the local computer.0. see the function descriptions in the scripting section of the Reference Guide. permute 222 rectilineardataset 354 . clearjobs 319 © 2003 . Extra FDTD simulation engine licenses will be required to run additional simultaneous simulations. Other new script commands The following script functions were added in FDTD Solutions 8. In previous versions. Other new script commands The following script functions were added in FDTD Solutions 7. getattribute 357 . and make sure that the "extend structure through pml" property under Edit FDTD Simulation -> Advanced options is unselected. (It was also possible for the user to manually distribute the jobs in some other manner. runjobs 318 . getparameter 357 . 15 Rotatable mode sources MODE sources can now be injected along an angled plane by setting the rotation angles (see Sources -> General Tab 93 ). Movie monitors in parallel simulations Movie monitors now work in parallel (multi-process) simulations. matrixdataset 355 . For more information. debug 182 . integrate2 226 . the jobs can be automatically sent to several computers in your local network.2 New features for version 7. For example. If there are three computers in the network.2012 Lumerical Solutions.New Features INTERCONNECT directly.5 Concurrent simulations FDTD 7. addparameter 356 . The new object library includes complex structure groups like waveguide components. etc. curved surfaces and high index contrast materials. cavity Q calculators. such as surface plasmon or silicon on insulator waveguides. Mac OS X support Mac OS X v10.5 Leopard and above has been added to the list of supported systems.0 Optimization is important when there is a large parameter space. photonic crystal arrays. Object library A library of complex structure groups and analysis objects have been incorporated into the graphical CAD environment. S-parameter monitors. randomized clouds of particles.16 Reference Guide 1. many of these objects were available via the Online Help.2012 Lumerical Solutions. © 2003 .0 includes a new optimization feature which provides a graphical interface to a built in Particle Swarm based optimization algorithm. One of the major new features in FDTD 7 is the ability to do parameter sweeps in a completely graphical way. but making them available directly from within the product is much more efficient. where simple parameter sweeps require too many simulations to be practical. it was possible to implement your own optimization algorithms via the scripting language. Conformal mesh Achieve higher accuracy for a given mesh size with conformal meshing.0. etc.0.0 Optimization Optimization is a key component of FDTD Solutions 7. without the use of the scripting language. It also includes analysis objects like power transmission boxes. The conformal meshing technique can resolve interfaces to much higher precision than the standard staircase meshing. In the past. Inc . making it an ideal method to solve structures with thin layers.3 New features for version 7. Parameter sweeps Parameter sweeps are a very common task. due to the complexity of optimization algorithms. creating parameter sweeps required the scripting language. Prior to FDTD 7. FDTD 7. Windows 7 support Windows 7 has been added to the list of supported systems. Prior to FDTD 7. It is also possible to create your own custom optimization algorithms within this graphical optimization feature. but this can be a difficult task. polyand 242 . lineintersect 244 . findstring 232 . polyor 242 . setglobalmonitor 293 . flip are now supported. meshgrid4d 188 .0.2012 Lumerical Solutions. expiry dates. linecross 245 © 2003 . addgroup 264 . etc) can now be stored directly on the USB hardware key. In practice. the default behavior is to automatically extend the material properties through the PML boundaries. However. it is important to remember that the specified equations are not used directly in the simulation. Many users are unaware of this issue. More flexible PML configuration options PML boundaries are intended to absorb all incident light. even if they were not drawn that way. replacestring 233 . An FDTD material model must still be generated. polyintersect 240 . rotate. For more information. although this makes the simulation run slower. see the function description in the scripting section of the Reference Guide. Path types 0 and 2 are now supported. getsweepdata 348 . This should result in better PML performance (absorption) for these users. clearanalysis 352 . with zero reflection. eval 230 . All licensing information (quotas. Improved GDSII import The GDSII file import 77 functionality has been improved. It is now possible to specify the desired PML reflection directly. The behavior of the key (portable or floating) can be changed at any time without assistance from Lumerical. making it a common setup mistake. It's important to check the FDTD model with the Material Explorer before running a simulation. Other new script commands The following script functions were added in FDTD Solutions 7. rather than having to specify the number of PML layers.New Features 17 Simplified installation and licensing The Portable and Floating license options have been merged into a single licensing option. replace 232 . polar 255 . GDSII operation scale. Inc . substring 231 . In FDTD 7. much like the Sampled data material model. groupscope 284 . Analytic material model The analytic material model allows the user to enter an equation for the real and imaginary part of the permittivity or refractive index which can depend on the predefined variables listed below. inpoly 241 . setglobalsource 294 . polyarea 239 . getglobalmonitor 298 . polygrow 241 . PML boundaries perform best when the surrounding structures extend completely through the boundary condition region. This reflection can be minimized by using more PML layers. It is no longer necessary to install the stand-alone Lumerical License Manager. centroid 240 . getglobalsource 298 . polyxor 244 . there is always some reflection. The Run Script button makes running the script quick and easy.4 New features for version 6. Script syntax highlighting The Script File Editor and Script Prompt have syntax highlighting to make the commands easier to read. Object tree browser The object tree browser provides an alternate view of objects within a simulation. it is possible to create a Scattering Cross-section Analysis group.5 Structure groups The ability to group structures is one of the main new features in FDTD 6. Groups can be moved and copied as a single object. Syntax highlighting makes it easier to read. see the layout editor tabs and object tree section of the Layout editor chapter. Comments are green. rather than using another text editor like Notepad. Built in script file editor The Script file editor allows you to create. When the Pitch parameter is changed. it is possible to create parameterized group-objects by adding script code to the group. it is possible to create parameterized group-objects by adding script code to the group. it is possible to create a Photonic Crystal Array group with a Pitch input parameter. One associated script adjusts the monitor positions as defined by the input parameters.2012 Lumerical Solutions. rotated and copied as a single object. This analysis group is set up in the monitors section of the Getting Started nanowire resonance tutorial. write and debug. edit. In such cases. For more information. Inc . For example.5. Copy and Paste FDTD Solutions now supports Copy and Paste operations. see the script prompt and script file editor 63 page in the Layout editor section. Analysis (monitor) groups The ability to group monitors into Analysis groups is one of the main new features in FDTD 6. In addition to simple grouping. For example. In addition to simple grouping. it is much easier to select objects from the tree view than directly in the graphical view ports. all objects in the group will automatically move to the appropriate position.18 Reference Guide 1. The group is composed of 4 monitors that form a box around the structure. and run script files directly from within FDTD Solutions. A second script calculates the scattering cross-section from the monitor data. Groups can be moved. It also makes selecting objects within groups possible. For an example of how to create and use a group see the pc micro cavity tutorial in the getting started section. write and debug script files. For more information. It is especially useful for complicated simulations with many overlapping objects. and loop/control statements are blue. This allows you to copy (Ctrl-C) © 2003 .5. strings are red. A second analysis group example can be found in the pc micro cavity tutorial. square brackets 184 . format 173 . almostequal 196 . Online Help search bar The Online Help search toolbar provides easy access to the FDTD Solutions Online Help website. not 201 . © 2003 . quotas). runanalysis 350 . This greatly simplifies calculations that require knowledge of the radiated power. clearsourcedata 307 .2012 Lumerical Solutions. sourceintensity 333 . dipolepower 328 . For more information. The MATLAB script integration step of the FDTD installation has been removed. license files are no longer required.New Features a group of objects from one simulation and paste (Ctrl-V) a copy of those objects into a different simulation. setplot 260 . getmaterial 387 .5. single quotes 203 . This is especially useful with the new structure and analysis groups. havedata 351 . In many cases. The toolbar will open your default web browser and search the Online Help for the requested term. such as enhancement and efficiency measurements. The clearsourcedata 307 script command clears the mode profile from the MODE Source. Other new script commands The following script functions were added in FDTD Solutions 6. Matlab script integration: FDTD Solutions automatically detects MATLAB. 19 Dipole radiated power calculation The dipolepower 328 script command returns the actual power radiated by a dipole source. This makes it much easier to automate some types of parameter sweeps. in addition to the other object properties. Simplified installation Simplified licensing: The USB hardware keys now contain much of the licensing information (expiry dates. addtogroup 290 . sourceintensity_avg 333 . see the toolbars 52 page in the layout editor section. This is particularly useful when searching for script function syntax. addstructuregroup 265 . wizardgetdata 396 . system 166 . runwizard 395 . Inc . adduserprop 291 . sourceintensity_pavg 334 . For more information. The get 294 script command now returns the mode profile stored in the MODE source. updatesourcemode 306 . New MODE Source script commands The updatesourcemode 306 script command automatically updates the mode profile of the MODE source. layoutmode 264 . addanalysisgroup 265 . see the function description in the scripting section of the Reference Guide. This makes importing experimental data much easier. Most materials have data at least from deep UV to far infrared. Pt. but at the expense of more memory and longer simulation times. GaAs. Auto fitting of experimental data The Sampled data material definition (for importing experimental data) uses an automatic fitting routine to calculate broadband model parameters from experimental data. The Database provides an interface to modify the properties of existing materials and to add new materials. Debye or combinations of these dispersive models. Spectral averaging The Spectral averaging feature of Power and Profile monitors calculates the incoherent spectral average of the electromagnetic fields or the Poynting vector as the simulation runs. Inc. FDTD Solutions supported single Plasma.2012 Lumerical Solutions.20 Reference Guide MATLAB is a registered trademark of The Mathworks. Expanded list of material data The number of materials included in the Material Database has been increased.0 Multi coefficient material model In the past. Ni. you can specify a custom wavelength range or force the fit to give priority to the real or imaginary part of the permittivity. Cr. W.5 New features for version 6. AlN. See the Material Database 116 chapter for more information. Inc . The accuracy of the model can be controlled with the number of coefficients. See Material Database for more information. Ge. More coefficients will give a better fit to experimental data. Improved material database GUI The Material Database interface has been completely redesigned and simplified. In. Ti. FDTD Solutions 6 has a new generalized multi-coefficient model that allows more complicated data to be fit. Cu. © 2003 . since manually calculating model parameters can be very difficult. 1. Co. The Material Explorer is used to view the index/permittivity profile of material in the database. The frequency range of the data has also been expanded. This model is only available when using the Sampled data material definition. Improved material fits The fitting functions used to generate material models from Sampled data materials have been improved to give more control over the fits that can be generated. Lorentz. The coefficients are automatically calculated from the sampled material data over the source bandwidth. H20 are some of the new materials. For example. See the chapter on the Material Database for details. 2012 Lumerical Solutions. This is most useful when the source spectrum of the simulation matches the actual illumination conditions. Total spectral averaging uses the source input spectrum as the weighting function. The new algorithm generates a much shorter time pulse. User defined source signals The source time signal is normally generated by FDTD Solutions based on the frequency range specified by the user. Partial spectral averaging is useful to extract the average response of the system to a variety of different illumination conditions from a single simulation. Three of the new functions are described here. FDTD Solutions 6. It is now possible to undock individual sub-windows from the main application. while still ensuring that most of the pulse energy is contained within the frequencies of interest. see the far field function section of the Reference Guide: Near to far field projections 358 .0 now supports user defined source time signals. there are some simulations where a custom source time signal is desirable. See the script command setsourcesignal 305 for more information. See the Spectral averaging section of the Units and Normalization chapter for more details. While the automatically generated pulse is usually appropriate. More far field analysis A number of new far field projection and grating script functions have been added.0 uses a new algorithm to generate the source time pulse from the frequency range specified by the user. GUI upgrade The entire Graphical User Interface has been updated. The farfield3dintegrate 371 function makes integrating portions of the far field much easier. This can be very helpful when trying to make one sub-window very large. The gratingvector 381 function can be used to study the polarization of grating orders of periodic structures. The farfieldspherical 370 function converts direction cosine units (returned from the far field projection functions) into more familiar spherical coordinates. Partial spectral averaging uses a Lorentzian weighting function multiplied by the source spectrum. Two types of averaging are available. Shorter source pulses FDTD Solutions 6. Inc . Another new feature is the ability to show/hide and rearrange toolbars. © 2003 . For more information.New Features 21 The technique is much more efficient than measuring many frequencies and averaging after the simulation. © 2003 . Unicode characters FDTD Solutions now supports Unicode file names and file paths. Simulations with resonant structures. These simulations will experience a significant speedup because of the shorter pulse. where the total simulation time is not dominated by the source pulse length. will not experience this speedup. Chinese. or other languages that are supported by the Unicode format.2012 Lumerical Solutions.22 Reference Guide The total simulation time of many simulations is dominated by the source pulse length. Inc . This allows users to work in directories and save simulation files with names that include characters from Japanese. thus a full range of useful quantities can be calculated. Inc . 2 Allen Taflove. In addition. such as the complex Poynting vector and the transmission / reflection of light. INTERCONNECT DEVICE 31 The method behind Lumerical's INTERCONNECT circuit simulator 32 The method behind Lumerical's DEVICE electronic device simulator 2. © 2003 .3 is a state-of-the-art method for solving Maxwell's equations in complex geometries. Sullivan. (2005). 1 Dennis M. and electromagnetics. (2000). it offers the user a unique insight into all types of problems in electromagnetics and photonics. The simulator can be used for advanced research and development or as an ideal teaching and learning environment in photonics. FDTD can also obtain the frequency solution by exploiting Fourier transforms. Being a direct time and space solution. optics.2012 Lumerical Solutions. Computational Electromagnetics: The Finite-Difference Time-Domain Method.2. This section will introduce the basic mathematical and physics formalism behind the FDTD algorithm used in FDTD Solutions and MODE Solutions' propagator.Solver physics 23 2 Solver physics This chapter describes the basic physics and algorithms used in Lumerical's various 'Physics' based solvers: FDTD Solutions 23 The Finite-Difference Time-Domain method. starting from the linear Maxwell's equations. Electromagnetic simulation using the FDTD method.1 FDTD The finite-difference time-domain (FDTD) method1. which is the method behind both FDTD Solutions and MODE Solutions' Propagator MODE Solutions Eigenmode Solver 26 The method behind MODE Solutions' Eigenmode Solver and FDTD Solutions' Integrated MODE Solver MODE Solutions Propagator 28 The method behind MODE Solutions' omnidirectional propagator for planar integrated systems. Boston: Artech House. New York: IEEE Press Series. In three dimensions. (2011). while r is the complex relative dielectric constant ( r ( ) n2 . If we assume that the structure is infinite in the z dimension and that the fields are independent of z. Ez and Hx . where n is the refractive index). and TM (transverse magnetic) equations. Maxwell equations have six electromagnetic field components: Ex . These are termed the TE (transverse electric). z ) r ( . specifically that r ( . and D are the magnetic. We can solve both sets of equations with the following components: TE: Ex . Morgan & Claypool publishers. Introduction to the Finite-Difference Time-Domain (FDTD) Method for Electromagnetics. x. y .1. 2. electric. x.24 Reference Guide 3 Stephen D. in the TM case. E. Ey . Ey . and displacement fields. Hz TM: Hx .2012 Lumerical Solutions. Gedney. Hy . and Hz. Inc . Maxwell's equations reduce to: Dz t Dz ( ) Hy x 0 r Hx y ( ) Ez ( ) © 2003 . respectively.1 FDTD and Maxwell's equations FDTD solves Maxwell's curl equations in non-magnetic materials: D t H 0 r D( ) ( )E( ) H t ( ) 1 0 E where H. Ez For example. y ) E z H z 0 then Maxwell's equations split into two independent sets of equations composed of three vector quantities each which can be solved in the x-y plane only. Hy . Dispersive materials with tabulated refractive index (n. and an imported source to interface with external photonic design softwares.html has many more details about the physics of FDTD and how to obtain advanced results. please see the section on frequency domain normalization for more details. The online User Guide at http://docs. all quantities in FDTD Solutions/propagator are calculated in SI units. The two dimensional FDTD simulator solves the TE and/or TM Maxwell equations. See the boundary conditions 86 section here for the complete list. periodic. Sources are another important component of a simulation. Alternatively. a total-field scattered-field (TFSF) source. Debye or Lorentz can be used. Unless otherwise specified. for example. specific theoretical models such as Plasma (Drude). FDTD is a time domain technique. beams. normalized transmission. The field information can be returned in two different normalization states. This allows it to obtain complex-valued fields and other derived quantities such as the complex Poynting vector. plane waves. meaning that the electromagnetic fields are solved as a function of time. FDTD Solutions is used to calculate the electromagnetic fields as a function of frequency or wavelength by performing Fourier transforms during the simulation. FDTD Solutions/propagator supports a number of different types of sources such as point dipoles.2012 Lumerical Solutions. FDTD Solutions/propagator supports a range of boundary conditions. In general. where the user can specify arbitrary geometric structures and various input excitation sources. Please see Units and Normalization for more information. the sections on coherence.com/en/fdtd/knowledge_base. © 2003 . such as PML. See the chapter on the Material Database 116 for details. Inc .lumerical. and Bloch. and far field projections as a function of frequency or wavelength. Boundary conditions are very important in electromagnetics and simulation techniques.Solver physics 25 Hx t 1 0 Ez y Hy t 1 0 Ez x FDTD Solutions can solve the two and three dimensional Maxwell's equations in dispersive media and some simple non-linear media. Detailed information about each of these sources is contained in the Radiation sources 91 section.k) data as a function of wavelength can be solved using the multi-coefficient models with auto-fitting. and far field calculations in the online User Guide. Please see. a guided-mode source for integrated optical components. the simulation mesh is automatically generated. 2. the meshing algorithm will create a smaller mesh in high index (to maintain a constant number of mesh points per wavelength) and highly absorbing (resolve penetration depths) materials. like the one shown in the following screenshot. y )e ( i t z) © 2003 . but at a substantial cost. Usually. Obviously.2 Eigenmode Solver The Eigenmode Solver (Eigensolver) solves for optical modes in a cross-section of an arbitrary waveguide geometry. The waveguide mode as a transverse field distribution that propagates along the waveguide without changing shape. In some cases. Inc . this involves forcing the mesh to be smaller near complex structures (often metal) where the fields are changing very rapidly. By default. even when using a relatively coarse mesh.26 Reference Guide 2. it is also necessary to manually add additional meshing constraints. that allow you to obtain accurate results. To maintain accuracy. using a smaller mesh allows for a more accurate representation of the device. FDTD Solutions provides a number of features. we have the vector fields: and where ω is the angular frequency and β is the propagation constant. the simulation time and memory requirements will increase. electric and magnetic fields) are calculated at each mesh point.2 Meshing in FDTD FDTD Solutions uses a rectangular. The modal effective E ( x. In the z-normal eigenmode solver simulation example shown in the figure above. Cartesian style mesh. It's important to understand that of the fundamental simulation quantities (material properties and geometrical information.1. y )e ( i t z) H ( x. As the mesh becomes smaller.2012 Lumerical Solutions. including the conformal mesh algorithm. with proprietary modifications and extensions. but at a substantial cost.” Opt.Solver physics 27 neff index is then defined as c . “Full-vectorial finite-difference analysis of microstructured optical fibers. This method is based on Zhu and Brown1 . The finite difference algorithm is the current method used for meshing the waveguide geometry.2012 Lumerical Solutions. the simulation time and memory requirements will increase. It's important to understand that of the fundamental simulation quantities (material properties and geometrical information. As the mesh becomes smaller. Cartesian style mesh. G.1 Meshing in the Eigenmode solver The MODE Solutions Eigenmode Solver uses a rectangular. Z.2. like the one shown in the following screenshot. Express 10. and has the ability to accommodate arbitrary waveguide structure. MODE Solutions provides a number of features. Zhu and T. Obviously. MODE Solutions find these modes by solving Maxwell's equations on a cross-sectional mesh of the waveguide. 853–864 (2002).opticsexpress. http://www. using a smaller mesh allows for a more accurate representation of the device. including the conformal mesh algorithm. Inc . Maxwell's equations are then formulated into a matrix eigenvalue problem and solved using sparse matrix techniques to obtain the effective index and mode profiles of the waveguide modes. Brown. © 2003 .org/abstract. even when using a relatively coarse mesh. electric and magnetic fields) are calculated at each mesh point.cfm? URI=OPEX-10-17-853 2. Once the structure is meshed. that allow you to obtain accurate results. Inc . long tapers and other devices where the propagation can be assumed to be essentially unidirectional. This script based.2012 Lumerical Solutions. This works best with waveguides made from planar structures. Note: In FDTD-based simulations. The propagator can model devices on the scale of hundreds of microns quickly. it is necessary to add additional meshing constraints.3 Propagator MODE Solutions currently supports 2 methods of propagating fields.1 Variational FDTD The variational FDTD propagator is based on collapsing a 3D geometry into a 2D set of effective indices that can be solved with 2D FDTD 23 . from ridge waveguide-based systems to more complex geometries such as photonic crystals. this involves forcing the mesh to be smaller near complex structures where the fields are changing very rapidly. The main assumption of this method is that there is little coupling between different supported slab modes. which allows for structures like ring resonators and photonic crystal cavities to be efficiently modeled – devices that have been traditionally treated with 3D FDTD. Identification of the vertical slab modes of the core waveguide structure. In some cases. 2. over a desired © 2003 . it's important to use a smaller mesh in high index materials. 1) The variational FDTD 28 (varFDTD) propagator. such as SOI based slab waveguide structures. You simply set the number of mesh points along each axis. this is an excellent assumption. 2) The eigenmode expansion 30 propagator. 2. It is useful for waveguide couplers. This propagator accurately describes the propagation of light in planar integrated optical systems. unidirectional eigenmode expansion propagator allows you to decompose one input or waveguide mode onto the modes of another waveguide section and propagate the modes an arbitrary distance.3. that only support 2 vertical modes with different polarizations. For many devices. and to maintain a minimum number of mesh points per wavelength. This constraint does not exist for the Eigenmode solver. The calculation steps involve: 1.28 Reference Guide By default. The propagator allows for planar (omni-directional) propagation without any assumptions about an optical axis. the simulation will use a uniform mesh. Usually. © 2003 . y . Inc . the effective permittivities of the TE and TM-like modes have the form: 2 TE eff ( x. where the dispersion comes both from the original material properties (material dispersion) and the slab waveguide geometry (waveguide dispersion). as described in Snyder and Love2: 1 2 ( x. There are currently two approaches to doing this in the Propagator: 29 Variational A variational procedure based on Hammer and Ivanova1. Simulation of the structure in 2D by FDTD 23 . y . ) dz 2 neff ( x. z ) z 1 2 M dz ( x. z ) z r ( z . ) dz 2 2 ( x. 2. z ) 2 where εr. y . 3. Here. M and βr are the 1-D reference permittivity profile. y. ) r k z M ( z . ) E ( z . These new materials are then fitted using Lumerical Solutions' multi-coefficient model into a time-domain form that can be used in the 2D FDTD simulation in step 3. z ) z r ( z . In this case. ) M ( z . re-expansion of the fields into 3D. having an artificial negative imaginary index). y . the generated effective materials are also dispersive. 4. one has the option of restricting the range of generated indices to the min/max values defined by the physical material properties of the original materials. Reciprocity Based This is a procedure based on the reciprocity theorem.2012 Lumerical Solutions. ) dz 1 2 TM eff | M | dz z 2 1 r ( x. y . If desired. z ) k2 z 1 M dz ( x. All of these settings can be found under the Effective index tab of the Propagator simulation region. y .Solver physics range of wavelengths. the associated guided slab mode and the propagation constant. Meshing of the structure and collapse of the 3rd dimension by calculation of the corresponding effective 2D indices (taking into account the vertical slab mode profile). Note that the effective index treatment may lead to generated materials that have properties that are unphysical (for example. ) r z r k z 1 | M |2 dz ( x. ) r 0 0 k P ndz z Note that in both cases. y . Obviously. Please see MODE Solutions' applications library for some use case examples: Evanescent waveguide couplers Tapered waveguides Polarization rotator 2. © 2003 . As the mesh becomes smaller. the simulation time and memory requirements will increase. long tapers and other devices where the propagation can be assumed to be essentially uni-directional. Ivanova.Volume 41. Optical Waveguide Theory. Love. The Netherlands "Effective index approximation of photonic crystal slabs: a 2-to-1-D assessment". 267-283. Chapman & Hall. Cartesian style mesh. including the conformal mesh algorithm. London. Optical and Quantum Electronics . 2. Snyder and John D. Each supported mode is then propagated through the waveguide.30 Reference Guide The Ring resonator getting started example contains step-by-step instructions and discussions on how to carry out a propagator simulation using the variational FDTD method.1007/s11082-009-93493 2 Allan W. The resulting modes are then added coherently to give the final mode profile. that allow you to obtain accurate results. The propagate command calculates the resulting mode profile of an arbitrary mode after it has propagated through a waveguide for some distance. using a smaller mesh allows for a more accurate representation of the device. Number 4. DOI: 10.2 Eigenmode expansion This unidirectional eigenmode expansion method is implemented in the propagate 341 command. MODE Solutions provides a number of features. Enschede. like the one shown in the following screenshot.3 Meshing in the propagator The MODE Solutions Propagator uses a rectangular. It's important to understand that of the fundamental simulation quantities (material properties and geometrical information. 1983. even when using a relatively coarse mesh. Inc . electric and magnetic fields) are calculated at each mesh point. England. 1 Manfred Hammer and Olena V. MESA Institute for Nanotechnology. the currently calculated modes) using overlap integrals 339 .2012 Lumerical Solutions. This is done by decomposing the mode into modes supported by the waveguide (ie. This technical is useful for waveguide couplers. but at a substantial cost.3.3. University of Twente. © 2003 . as well as create custom elements from pre-defined primitives or via Lumerical’s powerful script language. The signals can propagate fully bidirectionally through the circuit topology for both Time Domain 31 and Frequency Domain 32 simulations. 2. In addition. 31 2. the meshing algorithm will create a smaller mesh in high index (to maintain a constant number of mesh points per wavelength) and highly absorbing (resolve penetration depths) materials. The simulator scheduler calculates each element in order to generate time domain waveform samples and propagate them bidirectionally. In this case. Usually. To maintain accuracy. the meshing can be accomplished much faster. the simulation mesh is automatically generated.Solver physics By default. Very close coupling between components can be simulated allowing. it is also necessary to manually add additional meshing constraints. Inc . Note: meshing time The general meshing algorithm can take a reasonable amount of time compared to the simulation because the mesh must be effectively completed in 3D. this involves forcing the mesh to be smaller near complex structures (often metal) where the fields are changing very rapidly. the analysis of optical resonators.that is structures that are extruded along z with perfectly vertical sidewalls. elements can also be characterized accurately using results directly from Lumerical's electromagnetic simulators (FDTD Solutions and MODE Solutions).4 INTERCONNECT INTERCONNECT is a circuit simulator that can support mixed signal representation of optical single and multi-mode signals as well as electrical signals. allowing for more flexibility than using traditional discrete time or time-driven simulators. Users can choose elements from an extensive list of pre-defined PIC elements.1 Time Domain Simulator Time domain simulation is performed using a data flow system simulator. for example.4. It is possible for the user to specify if the structure is composed of purely extruded structures . In some cases.2012 Lumerical Solutions. 2 Frequency Domain Simulator Frequency domain simulation is performed using scattering data analysis to calculate the overall circuit response. INTERCONNECT carries out the scattering data analysis for the entire circuit by solving a sparse matrix that represents the circuit as connected scattering matrices.5 DEVICE DEVICE is an physics-based electrical simulation tool for semiconductors. © 2003 . DEVICE solves the drift-diffusion equation to describe the spatial distribution of electrons and holes.2012 Lumerical Solutions. This section will introduce the basic mathematical and physics formalism behind the selfconsistent algorithm used in DEVICE.32 Reference Guide 2. which selfconsistently solves the system of equations describing the electrostatic potential and density of free charge (electrons and holes). and solves the Poisson equation to establish the electrostatic potential. Once all the ports are defined.4. The circuit is composed a series of elements connected by an arbitrary number of input/ output (or bidirectional) ports. Users can define all the modes supported by the device and their frequency dependent properties. The simulator can be used for advanced research and development or as an ideal teaching and learning environment in semiconductor electronics and optoelectronics. 2. each one of them representing the frequency response of an individual element. Inc . Solving the drift-diffusion (DD) equations is an established and robust method that will produce accurate results for a wide range of semiconductor devices under common operating conditions. starting from the non-linear Poisson and driftdiffusion equations. Solver physics 33 2. and electric field. V the electrostatic potential net charge density. The mobility µ n. Poisson's equation is solved: V q (E V) and ρ the where ε is the dielectric permittivity. and random thermal diffusion due to the gradient in the density. p n C which includes the contribution C from the ionized impurity density. p k BT q where kB is the Boltzmann constant. To solve the drift-diffusion equations. the electric field must be known. please see the section on material models. the auxiliary continuity equations are required to account for charge conservation n t p t 1 q 1 q Jn Jp Rn Rp where Rn. Finally. To determine the electric field.2012 Lumerical Solutions. The mobility is a key property of the material. For further details.p is the mobility.p is the diffusivity.p is the net recombination rate (the difference between the recombination rate © 2003 . carrier concentration. impurity (doping) concentration. Inc .p through the Einstein relation Dn .p describes the ease with which carriers can move through the semiconductor material. µ n.p is the current density (A/cm2). and may be modeled as a function of temperature.1 System of Equations DEVICE solves the drift-diffusion equations for electrons and holes (carriers) Jn Jp q q n n E qDn n p E qD p p p where Jn. respectively (the subscripts n and p indicate quantities that are specific to the carrier type).5. p n. and n and p are the densities of the electrons and holes. Each carrier (electron or hole) moves under the influence of two competing processes: drift due to the applied electric field. These processes are represented in the drift-diffusion equations as the sum of two terms. E is the electric field. Dn. q is the positive electron charge. and is related to the diffusivity Dn. DEVICE discretizes and solves the drift-diffusion and Poisson’s equations on an unstructured finite-element mesh in one and two dimensions. Poisson’s equation and the drift-diffusion equations are second-order partial differential equations (PDE). The system of equations solved by DEVICE admits both a steady-state and time-varying result. carrier concentration. the majority carrier concentration is set to its equilibrium value at the interface between a contact and the © 2003 . the Dirichlet condition takes the form of a boundary (internal or external) with a fixed voltage specified. please see the section on material models. For further details.34 Reference Guide and generation rate). and recombination processes inherent to that material. In particular. for frequency response analysis). V ( x) V1 as is typical of an electrical contact. Multiple recombination and generation processes are modeled. the equations can be solved in a sequence of discrete times. For the electrostatic potential. Boundary conditions are very important in an accurate semiconductor device simulation. The simulation region is partitioned into multiple domains along boundaries between materials with unique physical descriptions.2012 Lumerical Solutions. Alternately. This is known as a Dirichlet boundary condition. impurity (doping) concentration. Two categories of boundary condition are present in DEVICE: those that relate to the electrostatic potential (Poisson’s equation) and those that relate to the carrier densities (the drift-diffusion equations). which may depend on temperature. The physical processes associated with the material are assumed to act equivalently when applied to electrons or holes. and as a result. and current density.g. Steady-state simulations can be used to examine the system’s behavior at a fixed operating point. The materials used in the simulation may be categorized as insulators. semiconductors. the carrier density and electrostatic potential can be solved at steady-state. and each requires that the solution be explicitly specified for at least one location. Inc . by specifying an initial condition for the carrier density and electrostatic potential. specialized multicoefficient models are provided for semiconductors that describe the fundamental properties. The recombination and generation processes are important factors in the material-specific calculation of carrier behavior. By enforcing the condition n t p t 0 in the continuity equations. For the carrier densities. mobility. electric field. or conductors. and are also useful when extracting small-signal parameters for a component (e. R = Rn = Rp. The time-dependent behavior of the component can then be used to directly evaluate its large-signal time-domain response or extract large-signal AC parameters. each type of material has an associated user-specified model or collection of models that describe its behavior. this corresponds to an insulating boundary across which no charge can flow. © 2003 . Inc .2012 Lumerical Solutions. where the electron energy E is related to the local electrostatic potential (voltage) as E = -qV. the boundary conditions are determined from the physical properties of the interface. At the external (open) boundaries of the simulation domain.5. Energies are calculated in electron Volts (eV). For the electron and hole densities. electrostatic potential. boundary conditions between the semiconductor and adjacent materials may be specified in terms of a surface recombination current density. which will default to zero (no carrier flux across the boundary) for insulators or an infinite recombination velocity (forcing the carrier density to its equilibrium value) for contacts. By convention. geometry information. In the case of the electrostatic potential. Consequently. it's important to understand that of the fundamental simulation quantities (material properties. 2. finite-element mesh.Solver physics semiconductor. like the one shown in the following screenshot. such that 35 p n C 0 At internal boundaries between two domains that are not contacts. and carrier concentrations) are calculated at each mesh vertex. Physically. The solution to the system of equations used to determine the physical quantities of interest is estimated from the discrete formulation of those equations. the electric flux density must be continuous across the boundary in the absence of a surface charge. All energies (and voltages) are referenced from the (equilibrium) Fermi level of an electrical contact in the system. the length units in semiconductor models are chosen to be centimeters. and in the parameter coefficients for the material models. This is reflected in the semiconductor device literature. homogenous Neumann boundary conditions are applied: the electric field normal to the boundary is set to zero as is the surface recombination current density.2 Meshing in DEVICE DEVICE uses an unstructured. Inc . DEVICE provides a number of tools. As the mesh features become smaller. the simulation time and memory requirements will increase. but at a substantial cost. that allow you to obtain accurate results.2012 Lumerical Solutions. © 2003 . while minimizing computational effort.36 Reference Guide A finer mesh (with shorter edge lengths and smaller elements) will better approximate the exact solution to the system of equations. including the automatic and guided mesh refinement. Quantity E(t) |E(t)|2 H(t) |H(t)|2 p m Description Electric field as function of time Electric field intensity as a function of time Magnetic field as a function Norm state N/A N/A N/A Units V/m (V/m)2 A/m (A/m)2 Cm Am2 Unit description Volts per meter Volts squared per meter squared Amperes per meter Amperes squared per meter squared Coulomb meters Ampere meters squared Magnetic field intensity as N/A a function of time Electric dipole in 3D Magnetic dipole in 3D N/A N/A © 2003 .2012 Lumerical Solutions. To see the data available in a source or monitor. with commands such as getdata 349 . For most applications. All data can be obtained in scripting. the default cwnorm state is the best choice. use the script command ?getdata 349 ("monitorname"). Please note that some quantities can be returned in either the Continuous Wave Normalization state (cwnorm) or the No Normalization state (nonorm).1 Time domain solvers Unless specified explicitly in a GUI window. Please see Frequency domain normalization 39 for details on the different normalization states. SI Units are used at all times. FDTD Solutions and MODE Solutions' Propagator).Units and normalization 37 3 Units and normalization This chapter contains information on the units and normalization scheme corresponding to the different type of solvers that Lumerical Solutions provides: Time domain solvers 37 : This section applies to FDTD Solutions and MODE Solutions' Propagator Frequency domain solvers 48 : This section applies to MODE Solutions' Eigenmode Solver and FDTD Solutions' Integrated MODE Solver 3. The following table summarizes the units used in time domain solvers (ex. getmagnetic 354 and transmission 321 . getelectric 353 . Inc . 2012 Lumerical Solutions.38 Reference Guide p m f= /2 E( ) |E( )|2 Electric field in 2D Magnetic dipole in 2D Frequency N/A N/A N/A Cm/m Am2/m Hz V/m (V/m)2 Coulomb meters per meter Ampere meters squared per meter Hertz Volts per meter Volts squared per meter squared Amperes per meter Electric field as a function cwnorm of angular frequency Electric field intensity as a function of angular frequency Magnetic field as a function of angular frequency cwnorm H( ) cwnorm A/m |H( )|2 Magnetic field intensity as cwnorm a function of angular frequency Poynting vector as a function of angular frequency Power as a function of angular frequency cwnorm (A/m)2 Amperes squared per meter squared Watts per meter squared Watts Watts per meter Volts per meter per Hertz Volts squared per meter squared per Hertz squared Amperes per meter per Hertz Amperes squared per meter squared per Hertz squared Watts per meter squared per Hertz P( ) W/m2 Power( ) Power( ) E( ) |E( )|2 cwnorm W W/m V/m/Hz (V/m/Hz)2 2D Power as a function of cwnorm angular frequency Electric field as a function nonorm of angular frequency Electric field intensity as a function of angular frequency Magnetic field as a function of angular frequency nonorm H( ) nonorm A/m/Hz |H( )|2 Magnetic field intensity as nonorm a function of angular frequency Poynting vector as a function of angular nonorm (A/m/Hz)2 P( ) W/m2/Hz 2 © 2003 . Inc . and we use a subscript imp to refer to these fields in the table below. In the cwnorm state. In the nonorm state. or the No Normalization state (nonorm ). These can be returned in either the Continuous Wave Normalization state (cwnorm ). Inc . the fields are normalized by the Fourier transform of the source pulse.Units and normalization frequency Power( ) Power( ) Power as a function of angular frequency nonorm W/Hz 2 W/Hz 2/m squared Watts per Hertz squared Watts per Hertz squared per meter 39 2D Power as a function of nonorm angular frequency 3. For most applications. and we use the subscript sim to refer to these fields in the table below.2012 Lumerical Solutions. the default cwnorm state is the best choice. Quantity Esim (w) Hsim (w) Psim (w) Eimp(w) Definition Normalization state Esim ( ) H sim ( ) exp i t E (t )dt exp i t H (t )dt * Esim ( ) H sim ( ) nonorm nonorm nonorm cwnorm Psim ( ) Eimp ( ) 1 exp i t E (t )dt s( ) 1 exp i t H (t )dt s( ) * Eimp ( ) H imp ( ) Esim ( ) s( ) H sim ( ) s( ) Himp(w) cwnorm H imp ( ) Pimp(w) Pimp ( ) * Esim ( ) H sim ( ) 2 | s( ) | cwnorm © 2003 . thereby yielding the impulse response of the system.1 Frequency domain normalization The frequency power and frequency profile monitors record the electric and magnetic fields at a series of user-defined frequencies.1. the returned fields are simply the Fourier transform of the simulated time domain fields. Eimp ( ) Esim ( ) s( ) The impulse response of the system is a much more useful quantity because it is completely independent of the source pulse used to excite the system. s(t) would be a dirac delta function (in which case s(w) = 1).40 Reference Guide s(w) s( ) 1 N exp i t s j (t )dt sources th N/A . it is more efficient and numerically accurate to excite the system with a short pulse such that the spectrum. Here. the electromagnetic fields are calculated as a function of time. For example. s(t). and the system under study. This would allow us to obtain the response of the system at all frequencies from a single simulation. Inc . has a reasonably large value over all frequencies of interest. the system being simulated is excited by a dipole.2012 Lumerical Solutions. ie. power and profile monitors return the response of the system to the simulated input pulse s(t): Esim ( ) exp i t E (t )dt The simulated electric field as a function of angular frequency. power and profile monitors return the impulse response of the system. is a pulse. depends on both the source pulse used. this could be s (t ) sin 0 (t t0 ) exp (t t0 ) 2 2( t ) 2 and the Fourier transform of s(t) is s(w) s( ) exp i t s (t )dt Ideally. Example © 2003 . mode or imported source. In the nonorm state. For a variety of reasons. |s(w)|2. where s j(t) is the source time signal of the j source and N is the number of active sources in the simulation volume Understanding Continuous Wave Normalization (cwnorm) Impulse response FDTD is a time domain method. Esim (w). and the time signal of the source. In the default cwnorm state. s(t). beam. E ( x. or the No Normalization state (nonorm ). These methods are called "total spectral averaging" and "partial spectral averaging". y . z0 ) s (t ) In the cwnorm state. y . these can be returned in the Continuous Wave Normalization state (cwnorm ). in other words. Like the other quantities calculated by these monitors.Units and normalization Consider a beam source injected into free space at z=z 0. It removes any frequency dependence due to the finite pulse length of the source. y . z . and the units of the returned fields are the same as time domain fields. Total spectral averaging FDTD Solutions/Propagator supports a spectral average that uses the source input © 2003 . z 0 . the default cwnorm state is the best choice. we use the subscripts sim and imp to refer to the quantities returned in the nonorm and cwnorm states respectively. The source signal is 41 s (t ) sin t0 ) exp 0 (t (t t0 ) 2 2( t ) 2 The electric field at the source injection plane has the following form: E ( x.1. we might want to calculate P W ( ) Pimp ( )d where W( ) is a weighting function and Pimp( ) is the Poynting vector returned in the cwnorm state.2012 Lumerical Solutions.2 Spectral averaging For some simulations. FDTD Solutions. ) E 0 ( x. however. z ) In other words. Please refer to Frequency domain normalization 39 for more details on the two normalization states. Inc . and obtaining the impulse response of the system. the field returned in the cwnorm state is the field that would exist if a CW source of amplitude E0 had been used at the angular frequency . allows for two methods of more efficient spectral averaging during the simulation which can significantly reduce the memory requirements and increase the speed of the simulation. y.) We could calculate the Pimp( ) at many different angular frequencies and then perform the spectral average after the simulation. The frequency power and frequency profile monitors can record spectral averages of various quantities during the simulation. 3. For example. In the tables below. For most applications. the impulse response of the system. (Please see Frequency domain normalization 39 for an explanation of the impulse response. t ) E0 ( x. it is useful to calculate the incoherent spectral average of the electromagnetic fields or the Poynting vector. Inc . Quantity <|Esim |2> total Definition Normalization state Esim 2 total 0 Esim ( ) d nonorm 2 nonorm <|Hsim |2> total H sim 2 total 0 H sim ( ) d nonorm 2 <Psim > total Psim total Psim ( )d 0 <|Eimp|2> total Eimp 2 total s ( ) Eimp ( ) d 0 2 2 cwnorm s( ) d 0 2 <|Himp|2> total H imp 2 total s ( ) H imp ( ) d 0 2 2 cwnorm s( ) d 0 2 <Pimp> total s ( ) Pimp ( )d Pimp 0 total 0 2 cwnorm s( ) d 2 © 2003 .2012 Lumerical Solutions.42 Reference Guide spectrum as the weighting function. Total spectral averaging can be useful when the source spectrum of the simulation matches the actual illumination conditions. The following table gives the precise definitions of the quantities available using total spectral averaging. "H2z_avg"). To see the data available in a monitor. The available components for total spectral averaging are shown in the following table. use the script command ?getdata 349 ("monitorname"). nonorm."E2z_avg"). with commands such as getdata 349 and transmission_avg 322 . Quantity <|Ex sim |2> total <|Ey sim |2> total <|Ez sim |2> total <|Hx sim |2> total <|Hy sim )|2> total <|Hz sim )|2> total Data name E2x_avg E2y_avg E2z_avg H2x_avg H2y_avg H2z_avg Example script command nonorm. nonorm. where s j(t) is the source time signal of the jth source and N is the number of active sources in the simulation volume Total spectral averaging can be turned on by selecting total spectral average as shown in the screenshot below.2012 Lumerical Solutions. © 2003 . H2x = getdata("monitor1". E2y = getdata("monitor1".Units and normalization s(w) 43 s( ) 1 exp i t s j (t )dt N sources N/A . Inc ."H2y_avg"). All data can be obtained in scripting. nonorm. E2x = getdata("monitor1"."E2x_avg"). H2z = getdata("monitor1"."H2x_avg")."E2y_avg"). H2y = getdata("monitor1". nonorm. nonorm. E2z = getdata("monitor1". "E2y_avg")."Px_avg"). E2z = getdata("monitor1". E2x = getdata("monitor1". cwnorm. Partial spectral averaging FDTD Solutions/Propagator supports a spectral average that uses a Lorentzian weighting function multiplied by the source spectrum.44 Reference Guide <Px sim > total <Py sim > total <Pz sim > total <|Ex imp|2> total <|Ey imp|2> total <|Ez imp|2> total <|Hx imp|2> total <|Hy imp|2> total <|Hz imp|2> total <Px imp> total <Py imp> total <Pz imp> total Px_avg Py_avg Pz_avg E2x_avg E2y_avg E2z_avg H2x_avg H2y_avg H2z_avg Px_avg Py_avg Pz_avg nonorm."Pz_avg"). Pz = getdata("monitor1"."H2x_avg"). E2y = getdata("monitor1". The following table gives the precise definitions of the quantities available using partial spectral averaging. Pz = getdata("monitor1"."E2x_avg"). cwnorm."H2y_avg"). cwnorm. Px = getdata("monitor1". cwnorm. cwnorm. cwnorm. H2x = getdata("monitor1". H2z = getdata("monitor1". Partial spectral averaging is useful to extract the average response of the system to a variety of different illumination conditions from a single simulation."H2z_avg")."Py_avg"). nonorm. Py = getdata("monitor1". cwnorm. Px = getdata("monitor1"."Px_avg")."Pz_avg"). nonorm. cwnorm. H2y = getdata("monitor1". Quantity Definition Normalization state © 2003 . Py = getdata("monitor1"."Py_avg"). cwnorm."E2z_avg"). Inc .2012 Lumerical Solutions. ' ) Esim ( ' ) d ' 2 2 2 nonorm <|Hsim (w)|2> partial H sim ( ) 2 2 partial h( . ' ) s ( ' ) d ' cwnorm 2 2 2 2 2 cwnorm <|Himp(w)|2> partial H imp ( ) 2 partial h( .w')|2 N/A 2 2 hi ( . ' ) s ( ' ) Pimp ( ' )d ' Pimp ( ) partial 2 2 h( . ' ) d ' 1 s(w) s( ) 1 exp i t s j (t )dt N sources th N/A . ' ) s ( ' ) d ' cwnorm 2 2 2 2 2 <Pimp(w)> partial h( . ' ) s ( ' ) Eimp ( ' ) d ' h( . Inc . ' ) s ( ' ) d ' |h(w.2012 Lumerical Solutions. ' ) H sim ( ' ) d ' nonorm 2 nonorm <Psim (w)> partial Psim ( ) h( . where s j(t) is the source time signal of the j source and N is the © 2003 . ' ) s ( ' ) H imp ( ' ) d ' h( .Units and normalization <|Esim (w)|2> partial 45 Esim ( ) 2 partial h( . ' ) 2 2 ( ' )2 ( )2 h( . ' ) Psim ( ' )d ' partial 2 <|Eimp(w)|2> partial Eimp ( ) 2 partial h( . the FWHM of |h(w. with commands such as getdata 349 and transmission_pavg 323 . Please note that when considered as a function of angular frequency. w')|2 is 2 rad/seconds To see the data available in a monitor. <|Ey sim (w)|2> partial <|Ez sim (w)|2> partial © 2003 ."E2z_pavg"). and can be modified as shown below."E2x_pavg"). The FWHM of |h(f. All data can be obtained in scripting. Quantity <|Ex sim (w)|2> partial Data name E2x_pavg E2y_pavg E2z_pavg Example script command nonorm. Inc .f')|2 is called . nonorm. use the script command ?getdata 349 ("monitorname"). E2z = getdata("monitor1".46 Reference Guide number of active sources in the simulation volume Partial spectral averaging can be turned on by selecting partial spectral average as shown in the screenshot below. The available components for total spectral averaging are shown in the following table. E2x = getdata("monitor1". E2y = getdata("monitor1".2012 Lumerical Solutions."E2y_pavg"). nonorm. H2y = getdata("monitor1". H2x = getdata("monitor1"."H2x_pavg"). E2z = getdata("monitor1". H2z = getdata("monitor1". nonorm. H2z = getdata("monitor1"."Py_pavg")."Px_pavg"). Px = getdata("monitor1". H2y = getdata("monitor1"."Pz_pavg"). cwnorm. <|Hy sim (w)|2> partial <|Hz sim (w)|2> partial <Px sim (w)> partial <Py sim (w)> partial <Pz sim (w)> partial <|Ex imp(w)|2> partial <|Ey imp(w)|2> partial <|Ez imp(w)|2> partial <|Hx imp(w)|2> partial <|Hy imp(w)|2> partial <|Hz imp(w)|2> partial <Px imp(w)> partial <Py imp(w)> partial <Pz imp(w)> partial © 2003 . H2x = getdata("monitor1". nonorm.Units and normalization <|Hx sim (w)|2> partial 47 H2x_pavg H2y_pavg H2z_pavg Px_pavg Py_pavg Pz_pavg E2x_pavg E2y_pavg E2z_pavg H2x_pavg H2y_pavg H2z_pavg Px_pavg Py_pavg Pz_pavg nonorm.2012 Lumerical Solutions. Py = getdata("monitor1". nonorm."Pz_pavg"). E2y = getdata("monitor1". Pz = getdata("monitor1"."Px_pavg")."H2y_pavg"). cwnorm."Py_pavg")."E2y_pavg")."H2x_pavg"). cwnorm."E2z_pavg"). cwnorm."H2z_pavg"). cwnorm. cwnorm. cwnorm."H2z_pavg"). E2x = getdata("monitor1". nonorm. nonorm. Py = getdata("monitor1". Inc ."E2x_pavg"). cwnorm."H2y_pavg"). cwnorm. Px = getdata("monitor1". Pz = getdata("monitor1". t ) E 0 sin t 0 ) exp 0 (t (t t 0 ) 2 exp 2( t ) 2 (x2 2 w0 y2) Then the "amplitude" refers to the value of E0 and has units of V/m. Unlike time domain solvers 37 .3 Calculating and normalizing power in the frequency domain The complex Poynting vector P E( ) H ( ) can be used to calculate the power flow in a particular direction. the "amplitude" refers to the peak electric field amplitude in units of V/m. Inc . SI Units are used at all times. z . 3.3 Source amplitudes Dipole sources For dipole sources. and total amplitude refers to the amplitude actually used in the simulations which is the product of the amplitude and the base amplitude. The time-averaged power flowing across a surface is given by © 2003 . For example.1. The fields are normalized such that the maximum electric field intensity is 1.2012 Lumerical Solutions. the user can also calculate this quantity from the frequency-dependent fields of frequency monitors.48 Reference Guide 3. MODE Solutions' Eigenmode Solver and FDTD Solutions' Integrated MODE Solver). amplitude refers to the amplitude of the point source whose units are listed below. Dipole source amplitudes are Cm for 3D electric dipole sources Am2 for 3D magnetic dipole sources Cm/m for 2D electric dipole sources Am2/m for 2D magnetic dipole sources Other sources When specifying the amplitude for non-dipole sources. no sources are used in frequency domain solvers (ex. if a Gaussian beam has the following electric field distribution in time and space: E ( x. 3. Base amplitude refers to the amplitude that will generate a radiated CW power of 10 nW/m in 2D simulations and 1 fW in 3D simulations.2 Frequency domain solvers Unless specified explicitly in a GUI window. y . 1975. then by placing a frequency power or profile monitor on the opposite side of the rod. "Classical Electrodynamics. which is related to the conservation of energy for the time-averaged quantities. where the grey dots represent the positions where the fields are recorded.2012 Lumerical Solutions. This monitor records a total of 13x6 data points. as a function of frequency can be calculated with: T( ) 1 real PyMonitor ( ) dx 2 1 real PySource ( ) dx 2 FDTD Solutions/Propagator provide many GUI and scripting functions to make transmission calculations easily at the press of a button or using a single command. The thick black outline shows the limits of the surface monitor as seen in the Layout Editor. As an example.4 Integrating over lines. This monitor has an x-span of 12dx and a y-span of 5dy. 1 J. the normalized transmission. The imaginary part of the Poynting vector relates to the non-propagating reactive or stored energy. The factor of 1/2 is related to the time averaging of the CW fields.Units and normalization 49 power ( ) 1 real ( P) dS 2S Note that the propagating power is proportional to the real part of the Poynting vector only 1. Second Edition". Jackson. John Wiley & Sons. © 2003 . if one simulates a y-propagating source such as a Gaussian bream striking a circular rod in a 2D TM time-domain simulation. surfaces and volumes The electric and magnetic fields are recorded on the finite-difference mesh. T. D. as shown below for a 2D monitor. such as one might find in the evanescent tail of light being reflected by total internal reflection (TIR). 3. Inc . The transmission script command will perform this particular calculation. or Power ( ) 1 real P ( ) dS 2 In order to calculate this quantity. power will be a matrix of dimension 10x1. and x and y are the corresponding position vectors. The integrate script command can be used to integrate over spatial dimensions even when several frequency points have been recorded.50 Reference Guide A typical calculation with this monitor might be to integrate the total power flow across the surface of the monitor. then the following can be used to integrate over y (ie dimension 2) and then x (ie dimension 1) power = 0. Inc . we provide the scripting function integrate.y). If Pz is a variable of dimension 13x6x1.5*integrate(real(Pz).1:2. if Pz is a variable of dimension 13x6x1x10. representing 10 frequency points. then the desired quantity is: power = 0.1:2. For example. © 2003 .2012 Lumerical Solutions.x.5*integrate(real(Pz).x.y). FDTD Solutions 8. it is not possible to edit the simulation objects. the Layout Editor automatically switches to Analysis mode.0 features a new Results View 62 window. since we want the object settings to match the data from the simulation. To edit simulation objects. They include: Main title bar 52 Toolbars 52 View ports 60 Object Tree 60 Optimization and Sweeps 63 Script Prompt 63 The Layout Editor has two modes of operation: Layout mode and Analysis mode. switch back to layout mode with the button. modified and deleted in this mode. it provides a very useful and intuitive way of analyzing and visualizing results through the GUI. This tool is used to setup and analyze all simulations.2012 Lumerical Solutions. Simulation objects can be added. which shows all the current results for the simulation object that is currently selected in the Object Tree. In analysis mode. and to run all script files. different regions of the CAD in Layout mode are highlighted.CAD layout editor 51 4 CAD layout editor The image below shows a typical Lumerical CAD Layout Editor. When used in conjunction with the Visualizer 139 . Inc . In this screenshot. © 2003 . After a simulation runs. Layout mode is used to setup your simulation. Simulation This menu contains settings for configuring resources and running simulations. These option only apply to the GUI. open the Material database 116 and import files.52 Reference Guide 4. the icon is drawn to the left of the name. Scripts always use SI units. Inc . If one of the related buttons is pressed. Toolbars visibility can be controlled in the View .2. Material Database © 2003 .2 Toolbars The following sections describe the various toolbars. View The view menu provides options to control the layout and visibility windows and toolbars. it replaces the default button in the toolbar. clicking the arrow to the right of the icon expands a drop-down menu containing related buttons.1 Main title bar The menus on the main title bar are listed below. Similarly. and to copy/paste/edit object in the simulation.2012 Lumerical Solutions. 4.Toolbars menu. See the Simulation objects chapter for information about specific objects. as described below. Edit The edit menu allows users to undo/redo their actions. save and load simulation files. Setting This setting menu contains options to change the unit setting within the graphical interface. File The file menu includes options to create. When available.1 Main The main toolbar contains buttons to add various Simulation objects. The Import menu allows users to import structural data stored in GDSII files 77 files. Help The help menu provides links to local PDF copies of the product documentation and links to the larger set of online documentation. shortcut keys are located to the right. 4. If any of the options can be selected using a button on a toolbar. as well as options for checking which version of the software is installed. Groups This button will add an analysis. Monitors This button will insert various monitors into the simulation. Components This button will open the component object library window. For more information. Attributes This button will insert the shown grid attribute into the simulation. 53 Structures This button will insert the shown structure primitive into the simulation. Simulation This button will insert simulation or mesh override regions.CAD layout editor This button opens material database window. Pressing the arrow will allow selection of which source to add. Pressing the arrow will show common component categories that the library window can open with.2012 Lumerical Solutions. Pressing the arrow will show all available primitives. Inc . Pressing the arrow will allow © 2003 . Pressing the arrow will show all available primitives. Pressing the arrow will allow selection of which simulation object to add. Pressing the arrow will allow selection of which group to add. Sources This button will insert different sources into the simulation. container or structure group into the simulation. see the Material database 116 chapter. 2. Move © 2003 . Pressing the arrow will allow selection of which kind of import.2 Edit The edit toolbar contains tools used to copy. Tip: Group edit of multiple objects The properties of multiple structure objects can be edited together by selecting multiple objects prior to entering edit mode. See the Simulation objects chapter for information about specific properties for each object. it is important to rename the copies so that each object has a unique name. An object must be selected in order to use these tools. Pressing the arrow will show common analysis categories that the library window can open with.. or modify settings of simulation objects. Duplicate (D) This command makes a duplicate of the currently selected object.2012 Lumerical Solutions. 4. not sources or monitors. The copies that are created are identical to the originals.54 Reference Guide selection of which monitor to add. Inc . Analysis This button will open the component object library window. Edit properties (E) This command opens the edit properties window. apart from a one grid cell offset in their x position which allows the user to distinguish between the original and the copy. When copying sources and monitors. This option is only available for structure objects. Import This button will open a window for importing files from other programs. When applicable. delete. Any properties which are identical between all of the selected objects results in the common value being displayed in the edit dialog box. When multiple objects are selected. the shortcut key used to run the function from the keyboard is given in brackets next to the name of the tool. all of the selected objects will be copied. Depending on the mode. pan or zoom in the view ports or measure the distance from one point to another.y. or objects. COLUMNS. the shortcut key used to run the function from the keyboard is given in brackets next to the name of the tool.z dimensions. Only one mouse mode may © 2003 . 4. When applicable. from the simulation.2012 Lumerical Solutions. A pop-up window appears with field entries to specify the shift amount. AZ LATTICE: the distance between adjacent elements in the z direction (valid for 3D simulations only) LAYERS: the number of elements in the z direction (valid for 3D simulations only) The parameters in the edit window below produce the resulting array shown in the diagram.CAD layout editor The move command allows shifting a single or multiple selected objects by a specified distance in each of the x.3 Mouse mode The mouse mode allows you to control the behavior of the mouse. Delete (Del) The delete command removes the currently selected object. Inc . the user can edit objects. The array edit window that pops up contains several properties : A1 LATTICE: the distance between adjacent elements in the a1 direction A2 LATTICE: the distance between adjacent elements in the a2 direction ANGLE BETWEEN A1 AND X-AXIS: the angle (in degrees) between the a1 direction and the x-axis ANGLE BETWEEN A1 AND A2: the angle (in degrees) between the a1 and the a2 directions.2. 55 Array The array command allows the user to create an array or arrays of objects. ROWS: the number of rows and columns that comprise the array. Finally. © 2003 . Select (S) This function puts the mouse into the select mode. Zoom (Z) This function sets the mouse to be in the zoom mode. In the Perspective window. The default aspect ratio of the XY view and perspective views are locked at 1:1. A non-permanent triangle is drawn between the locations where the mouse button was pressed (A) and released (B). The dx and dy fields correspond to the horizontal and vertical distance between A and B. drag diagonally across the desired region. Use the left click to zoom in and the right click to zoom out. it's easiest to set the XY view first. The distances are given in the lower left-hand corner of the CAD window (see the image below). Inc . double clicking either button zooms to extent. The aspect ratio for the XZ and YZ is not locked. and the AB field corresponds to the length of the hypotenuse.2012 Lumerical Solutions. Pan view (P) The pan view mode allows the user to drag the view in the plane of the view port. The < and > buttons at the right decrease or increase the number of decimal places shown. the current location of the mouse within the view ports is shown in the field at the bottom right-hand corner of the CAD window (see the image below). the pan mode is used to rotate the view. which means circles always appear round (rather than as ovals). To zoom to a particular area. Scrolling in the view ports The other method of adjusting the view ports is by using the arrow buttons on your keyboard. For reference. This allows objects to be selected through the view ports (objects may be selected in the objects tree regardless of whether the mouse is in select mode or not). To adjust the view. a distance measurement can be made by pressing the left mouse button and then dragging the mouse. then adjust the Z view in the XZ or YZ views. Each press of a button results in the view shifting in the direction indicated by the arrow. Ruler (R) Once the ruler mode is selected.56 Reference Guide be selected at a time. Drawing Grid Clicking on the drawing grid brings up a window in which the following options can be edited: SHOW GRID: when checked. This function is also accessed via double-clicking either the left. For instance.2. objects can only be moved so that their centers align with intersection points of the grid A1 LATTICE: the distance between grid lines in the a1 direction A2 LATTICE: the distance between grid lines in the a2 direction AZ LATTICED: the distance between grid lines in the z direction ANGLE BETWEEN A1 AND X-AXIS: the angle (in degrees) between the a1 direction and the x-axis ANGLE BETWEEN A1 AND A2: the angle (in degrees) between the a1 and the a2 directions View simulation mesh Selecting the "View simulation mesh" button will show the simulation mesh. it is not continuously updated. the mesh will not update immediately if a physical structure is moved. the grid will be plotted in the drawing palette SNAP TO GRID: when checked. located next to the "View simulation mesh" button. Inc . To have FDTD Solutions recalculate the mesh. edit grid settings and view the mesh used for the simulation.4 View The view toolbar contains tools to zoom to the extents of objects. Because recalculating the mesh is somewhat computationally intensive.CAD layout editor 57 4. it is usually turned off. When no objects are selected. When applicable.2012 Lumerical Solutions. the shortcut key used to run the function from the keyboard is given in brackets next to the name of the tool. pressing this button zooms to the the largest object in the model. click the "Recalculate simulation mesh button". Recalculate simulation mesh (F5) © 2003 .or right-hand mouse button while in zoom mode. Zoom Extent (X) Selecting this tool centers and scales the view ports around the selected simulation objects. pressing zoom extent while a structure is selected arranges the view such that only the structure are shown. For visibility of other objects. The mesh is always recalculated before a simulation starts. while other simulation objects may appear outside the extent of the view. For example. please see the section on Material Explorer 125 . Check memory requirements This function will estimate the memory requirements for the current simulation.5 Simulation The simulation tools are: Resources Opens the resource configuration manager. This window can add/remove and enable/ disable computational resources. Switch to layout editor © 2003 . The mesh is always recalculated before running a simulation. Inc . Run scripts This function will allow the user to run a Lumerical script file (*. The total requirements are broken down into categories such as Simulation fields and Monitor data. This button is located in the CAD environment twice if the script editor is open: once in the simulation toolbar and once at the top of the script editor. Run parallel FDTD Run the current simulation in parallel mode.2012 Lumerical Solutions. Material Explorer The Materials Explorer can be used to check the material's optical properties that will be used in a simulation. It also contains a useful configuration test tool to check the resource setup.58 Reference Guide Mesh generation is too computationally intensive to be done constantly as the simulation setup is modified. 4. Pressing the button in the script editor runs the script that is selected in the editor window. use this option to update and recalculate the mesh. Run FDTD Run the current simulation in single process mode. Pressing the button on the toolbar brings up an open file dialog.lsf) to perform automated commands such as plotting and saving data. For more information on how to run simulation. see Running a simulation. If you wish to see the current mesh. For more information.2. first select a reference object (the rectangle in the screenshot below). © 2003 . some product documentation is available in the Help .CAD layout editor This function returns the simulation environment from analysis mode back to the layout editor mode.7 Search bar The search toolbar can be used to quickly search for topics in the online product documentation knowledge base. select another object and use one of the alignment options to align the second object with respect to the first. 59 4. Alignment toolbar To use the alignment functions. The first button on the toolbar is used to select the reference object. Next.2012 Lumerical Solutions. Online help toolbar Search the online knowledge base for the specified term. In the following screenshot. the data from the simulation will be overwritten and lost.2. 4. the top edge of the circular objects were aligned with the top edge of the rectangle.Reference Guide menu. Requires internet connection.2. If you switch to layout editor and then save the file. This will bring up the search results in a new tab in your default browser. Inc . If an internet connection is not available.6 Alignment The alignment toolbar provides options to control the relative alignment of simulation objects. 2012 Lumerical Solutions. You can toggle between these options with the mouse mode toolbar. which represents the current simulation. All simulation objects are within the group.4 Object Tree As previously discussed. objects are listed as they are inserted by the user. a magnifying glass (zoom) or a ruler (measurement). sources and monitors. It is possible to copy and paste selected objects between different CAD windows using the standard Ctrl+C and Ctrl+V shortcut keys. 4. When objects are selected. Depending on the current mouse mode.60 Reference Guide 4. model. the object will be highlighted in the Object tree. simulation region. the vertices are drawn with red squares (also. © 2003 . Press F2 or double-click to change the name.3 View ports The view ports show a graphical representation of the simulation from an XY. YZ and 3D perspective view. the mouse pointer will either have the shape of an arrow (select). Within 'model'. a simulation requires that the user define a set of objects. the object tree was designed to allow for organization and easy selection. XZ. a hand (pan). Inc . As a complete setup may contain a large number of objects. Structure groups can only contain structures and likewise. they will have no effect on the simulation. we use the orange arrows at the top of the window. while the left and right arrows move them out of and into groups. we use the button called groups in the main toolbar. Inc . "Containers" act like folders and can hold any type of object.4.CAD layout editor 61 To move the objects up and down the tree as well as into groups. the 'Sources/Monitors' container group has both individual sources and monitors as well as an analysis group. © 2003 . 4. In the image above. Note that there are buttons with green crosses at the top of the objects tree. These buttons can be used to hide or display certain types of objects. Objects can always be selected by left-clicking on their name in the object tree or edited by right-clicking. To add groups. Using the tree is the preferred method of selection especially in complicated simulation setups with many overlapping elements.2012 Lumerical Solutions. The up and down arrows shift the objects relative to each other. is selected. In the image above. analysis groups can only contain monitors. Disabled simulation objects will remain in the object tree (and can be re-enabled). The third group.1 Enable/Disable Simulation Object User can enable/disable simulation objects by right-clicking on each and selecting "Enable/Disable". above. See the online user guide section for more information and examples about Structure groups and Analysis groups. When objects are selected. the power monitor. they are highlighted blue in the objects tree and the vertices are marked with red squares in the view ports. At the bottom-right of the window. waveguide) RESET: Sets the category to display 'all' and deletes any text in the keywords text box SEARCH: Activates the search for objects that match the keywords (the same function as pressing enter while in the text box) INSERT: Pastes the object into the simulation region centered at the current view port settings (same function as double-clicking the object) 4.g. To insert an object into the simulation.g. simply double-click the object and click the insert button at the bottom of the window. hemisphere. Inc .5 Object Library The object tree and the object library windows help organize and find simulation objects.6 Results View See the Results View 143 section of the Reference Guide for more information. a larger image of the object is displayed at the bottom along with its object tree ID name and a more detailed description. The center portion of the window shows the available objects in a tree format. the library will switch to Offline mode.62 Reference Guide 4. analysis groups) KEYWORDS: The object window will only show objects that match your keyword (e. CATEGORY: Choose to only display components of a certain category (e. When selected by the mouse. For users who are not connected to the Internet. extruded polygon. The object library can be opened to specific categories by choosing any option in the components or analysis button in the main toolbar. structures. The object library provides additional simulation objects that can be used in your simulations. it will indicate whether you are using the local copy of the library (Offline) or viewing the online version (Online).g. photonic crystals) TYPE: Choose to display the type of simulation object (e. © 2003 .2012 Lumerical Solutions. which accesses a reduced version of library included with the local installation. any files called by that script will be found. 4. save and run script files. pressing on the run script button runs the one in the forefront. By default the script editor is located on the right hand side of the view ports and shares the same frame as the analysis window. and will run as in the script editor. © 2003 . Script commands are executed as soon as the ENTER button is pressed on the command line. However. Note that when entering scripting code in the script file editor.9 Script Workspace and Script Favorites See the Script Workspace and Script Favorites 144 section of the Reference Guide for more information. Inc .2012 Lumerical Solutions. only the last semicolon can be neglected. When both windows are open. then any other folders in the path. it is possible to toggle between the two through tabs located at the right side of the frame. 4. By default the script prompt is located at the bottom of the CAD window. open. the current working directory is unchanged. If a semicolon is missing at the end of the command line. Multiple lines can be pasted into the script prompt. and then the directory of the script file. When running a script file in the a different directory using the GUI. the search order is the current directory first. as well as examples on how to use them.CAD layout editor 63 4. The script file editor contains buttons to create. but the directory of the script file is added to the scripting path.7 Optimization and Sweeps See the Optimization and parameter sweeps 146 section of the Reference Guide for more information. This way. each command must be followed with a semicolon. In this case though. When multiple script files are open. it is automatically inserted it for you. See the Scripting chapter for a list of all the script commands.8 Script Prompt and Script Editor The scripting language is useful for setting up complex structures and advanced data analysis. the hidden ones do not. © 2003 . Change between the default layouts by selecting the drop-down menu VIEW->SET DEFAULT LAYOUT. check marks indicate when windows and toolbars are visible. Inc . have control over hiding and docking location of the the windows and toolbars.10 Changing the CAD layout There are pre-defined CAD layouts that can be accessed through main title toolbar. As before. Hiding/showing windows and toolbars There are two methods to hide or show windows and toolbars 1) In the main title toolbar select VIEW->WINDOWS or VIEW>TOOLBARS. The visible windows/ toolbars have a check mark next to their name. the following pop up menu will show up.2012 Lumerical Solutions. your previous layout will be used. and choosing one of them.64 Reference Guide 4. In addition. 2) By clicking the right button anywhere on the main title bar or the toolbar. The current layout is saved when CAD closes so the next time the program is opened. 0 support 3D objects in the CAD. Converting form old 2D files to 3D One can open existing 2D files from previous versions with FDTD Solutions 8. the corresponding simulation region will cut along the appropriate 1D/2D section of the 3D structures to generate the correct mesh. the CAD environment makes room for the toolbar indicated by a blue void. since such objects cannot be created form a 3D © 2003 .0 and MODE Solutions 5. When a simulation type is selected. press the left mouse button and drag-and-drop the toolbar. one can see shadows along the curvature on the outer edges).2012 Lumerical Solutions. hover the mouse over the top of the toolbar. 65 4. the 2D to 3D conversion is more complicated since these structures do not have a straightforward 3D counterpart. If you reach a region where you can place a toolbar. When the mouse cursor becomes a four-headed arrow. Inc . Non-view-port windows can be docked on top of each other either to the right or to the left of the view ports. 3D structures will be automatically created by extruding the 2D structures in the z direction. If they are placed on top of each other.CAD layout editor Moving and undocking windows Windows can be undocked by double clicking the name with the left mouse button. Mesh override regions are now always specified in 3D. Moving toolbars To move a toolbar. Tip: To reposition an undock ed window on Linux.0. tabs on the sides allow toggling between them.11 Converting from 2D to 3D FDTD Solutions 8. Note that for certain structures. The following lists some special cases: Surface objects • The orientation as well as the polynomial coefficient matrix will be updated so that the slice at the default z location is identical to the surface in the original file. hold down the Alt k ey before attempting to move the window. • Note that the resultant 3D surface is not a perfect extrusion (ie. This is particularly useful when you want to make the script file editor window larger.0 and MODE Solutions 5. and the simulation region will adjust to the mesh accordingly whenever there is an overlap with override regions. where the dotted line is. Import surfaces • Since import surfaces are now defined as z(x. The simulation region will be placed at the center of the object in the z direction and the resultant meshed structure (in the simulation region) will be identical to the original 2D file. 2D DRAW MODE One can use the 2D draw mode to enable a layout that looks very similar to that of 2D FDTD Solutions or MODE Solutions 4. New simulation objects are created based on the default values set in Setting->Set default object placement.0. The default option sets the z location at 0 and the z span as 1 unit length. or the CAD may slow down significantly. and all but the selected view port will be closed. there will be some changes to the Geometry tab as well as an additional rotation so that the 3D object looks like an extrusion in the z direction.2012 Lumerical Solutions. Note that since 3D objects require more memory to render. Structure groups • A new property “z_span” is added in the User properties section with the default setting of 1 unit length. Inc . This option can be selected from View->Set default layout -> 2D -> XY/XZ/YZ. it is important not to use too high of a resolution for the graphical rendering.66 Reference Guide surface.y) instead of y(x). © 2003 . Inc . and it is important to verify (either by switching back to the default 3D view or using the “Mesh structure” setting) that the meshed structure in the region of interest is correct. the underlying simulation objects are still three dimensional.2012 Lumerical Solutions. © 2003 .CAD layout editor 67 It is important to note that even though 2D draw mode allows for a 2D CAD view. For example. if you © 2003 . The corresponding window for the circle object is shown below. Inc . define the solver region. pressing the EDIT button will bring up a window where it is possible to modify the properties of the simulation object. Once the object is selected. The following sections provide detailed descriptions of each simulation object. in the screen shot on the right. MODE Solutions' Eigenmode Solver and DEVICE. MODE Solutions' propagator. TIP: In-field equation interpreter The fields for numeric parameters can be used as a simple calculator. any sources of light or doping/generation regions as well as monitors to collect data. These objects are used to model the physical structure.2012 Lumerical Solutions. clicking on the button would add a circle physical structure object. For instance.68 Reference Guide 5 Simulation objects There are several types of simulation objects in FDTD Solutions. Each simulation object can be added by clicking on the corresponding icon in the GUI. the top level object 'model' that represents the entire simulation.Simulation objects wish to set a value to the square root of 3 divided by e. © 2003 . the global source frequency range can be applied to all sources. This object acts like a simple folder allowing the user to collapse and expand its contents in the object tree. Structure groups can contain other structure groups. Container Group A container group is the simplest type and can contain all object types as well as other groups. It is a two-part group: setup and analysis. It is possible for analysis groups to contain other groups. you can edit properties that are common to all of the selected objects. User can create a script that modifies a simulation region span. Structure Group Structure groups are one step above container groups in that they allow scripting commands of structures properties.y. Please see the Online User Guide section on Analysis groups for more information. Monitors and sources have some global properties that apply to many objects. For example. Notes: Structure objects support Multi-object editing. In the analysis portion. Its only user setting is a position offset in x. See the Properties tab 82 and Script tab 82 sections for more information. If you select multiple objects then click EDIT. is an analysis group. Inc . see the Equation interpreter 114 section. In the setup portion. For more information.z for all contained objects. 69 Groups Simulation objects can be organized into various types of groupings. it is used to process monitor data and create output data variables once a simulation has been run. This group contains user-generated variables and scripts that can be utilized to edit and set up parts of the structure. Analysis Group Analysis groups are the most advanced of the three groups.2012 Lumerical Solutions. For example. it acts like a structure group allowing users to insert and edit structures through a script except that it has been extended to include all objects. a script can be set up to insert many circles to create a photonic crystal cavity of a certain shape and size. just enter sqrt(3)/exp(1) into the field. As an example. The global properties can be edited with the GLOBAL PROPERTIES button. source locations and analysis monitor properties. They form a collection of samples from which to build your own structure groups. The properties are organized according to the tab that they are located in when the EDIT button is pressed. The last of the five subsections describes the syntax for the equation interpreter. Imports These options open windows that can be used to import structure data from other sources such as pictures or text files. This section is organized as follows. The first four subsections correspond to the four types of object categories.1 Structures Structures in a simulation interact with light/electrical sources to produce interesting effects. Components are built using the group script and have user settable parameters.70 Reference Guide The purpose of this section of the Reference Guide is to describe all of the available simulation objects and their properties. © 2003 .2012 Lumerical Solutions. Components These are preset structures and more complicated structure groups that are commonly used in a variety of research areas. Attributes These are the additional attributes that can be associated with any structure. Inc . Each of these sections begins with a brief overview of the simulation objects followed by a description of their property settings. 5. There are five subsections. They are split into 3 groups: Structures (Primitives) These are the primitive shapes that make up all structure setups. Custom Primitives Custom primitives can be used to create customized surfaces.1. They are either circles/ellipses in 2D. these objects represent triangles while in 3D these objects are extruded in the z direction to a specific height. specified via parametric equations. Rectangle Rectangular regions denote physical objects that appear rectangular from above. Circle Circles denote physical objects which appear circular or ellipsoid from above. the object is extruded in the z dimension. Inc . © 2003 . For 2D simulations. For 3D simulations. with the number of vertices set to 3. Rings in 3D simulations are extruded in the z direction to a specific height. and the vertices are connected with straight lines. or can be used to define a cylindrically-symmetric surface of revolution. Ring Ring regions represent physical objects that consist of full or partial rings when viewed from above.1 Primitives The button includes options to to add the following primitive structures: Triangle Triangular objects denote physical objects that appear triangular from above.Simulation objects 71 5. They are actually polygon objects. or circular/ellipsoid cylinders in 3D. The location of each vertex can be independently positioned within a plane. The resulting surfaces can either exist on one or more faces of the object.2012 Lumerical Solutions. Polygon Polygons allow the user to define a custom object with a variable number of vertices. For 2D simulations. these objects represent rectangles while in 3D these objects are extruded to a specific height. 2012 Lumerical Solutions.v). Pyramids are only available for 3D simulations. and either narrow or expand in the vertical z direction. The main parameter is the unitary matrix U. a surface (S) is defined as a function of variables u and v. and the dielectric tensor will be set accordingly.72 Reference Guide Surface Surface primitives can be used to define complex material volumes that exist above or below analytically defined surfaces. a surface is defined as a function of u (S = S(u)) where u can represent x or y. Pyramid Pyramids can be configured to half flat tops and/or flat bottoms. The variables (u. Spherical objects only exist in 3D simulations.1.2 Attributes The button includes options to add the following attributes: Permittivity rotation The permittivity rotation grid attribute allows users to add an arbitrary Euler rotation to the dielectric tensor. The main parameters are the angles theta/pi (specifying the LC orientation). Inc . (x.e.v) can represent (x. i. 5.z) depending on the surface orientation. S = S(u. © 2003 . see the Anisotropy and Magneto-Optics section of the Applications Library. For examples on how to use the grid attributes listed above. LC orientation The LC orientation grid attribute allows users to specify arbitrary orientations for the Liquid Crystal director. The main parameters are the "angle convention" and the Euler angles theta/phi/psi. Similarly. Matrix transform The matrix transform grid attribute allows users to add an arbitrary unitary matrix to the dielectric tensor.y).z) or (y. users can define spherical regions of constant refractive index through the spherical physical object. In 3D simulations. in 2D simulations. Sphere In 3D simulations. Common parameters are available to be adjusted. Components are more complicated structures that are built from one or several primitives. simulation environments. The preset categories are: Extruded polygons Polygons allow the user to define a custom object with a variable number of vertices. The location of each vertex can be independently positioned within a plane. the sidewalls can be vertical or angled. reflecting. Surface This category contains examples of surface objects defined by equations.1. or coupling effects.3 Components The button includes options to open the object library with a few preset categories. © 2003 . Inc . These pre-built structure groups enable users to quickly setup common (but often difficult to construct). These shapes are extruded in the z dimension.2012 Lumerical Solutions. For 3D simulations. Gratings Gratings are a regularly spaced set of elements which can have polarizing. Integrated optics This category includes various shapes of waveguide paths. and the vertices are connected with straight lines. Photonic crystals Photonic crystals are optical nanostructures that are either rectangular or hexagonal periodic.Simulation objects 73 5. This category includes PC waveguides and PC cavities. More choices There are many more categories of components available that are constantly being updated. and can be specified as an equation in terms of x. or edit the materials already included. 5.4 Geometry tab The geometry tab contains options to change the size and location of the structure. Select rotation axis. 5. OVERRIDE MESH ORDER FROM MATERIAL DATABASE: Select to override the mesh order from the material database and manually set a mesh order. Eg. ROTATION 1. 1. SECOND. MESH ORDER: Set the mesh order in this field if the OVERRIDE MESH ORDER FROM MATERIAL DATABASE option is selected. If the option is not selected. The units will affect the interpretation of l0 and k0. Up to three different rotations can be applied. See the material database section for more information.74 Reference Guide 5.1. See the mesh order 127 section for more details. 5. y.5. If <Object defined dielectric> is selected.7 Graphical Rendering tab The graphical rendering tab is used to change how objects are drawn in the layout editor.1. For example. THIRD AXES: 3D simulation only.3: The rotation of the object in a clockwise direction about each axis. z(defined in the Equation interpreter 114 section). The options are: RENDER TYPE: The options for drawing the objects are detailed or wireframe. when the material type is <Object defined dielectric>. In 2D simulation.5 Material tab The material options are as follows: MATERIAL: This field can be set to any material included in the material database. measured in degrees. a material of mesh order 1 will take precedence over a material of mesh order 2.6 Rotations tab Rotate objects by setting the following variables: FIRST.y.1.1. Inc .1. INDEX: The refractive index of the structure.1 INDEX UNITS: The field specifies the units of the spatial variables only when the index is specified with a formula (the origin is the center of the object). Detailed © 2003 . The index must be greater than one. then the index property must be set.2012 Lumerical Solutions. use a semicolon to separate the x. If specifying an anisotropic material. The mesh order is used by the simulation engine to select which material to use when two materials overlap.2.z indices. the field displays the material's default mesh order from the database. It is possible to include new materials in the database. only one angle (rotated around z axis) is available. For example. a setting of microns means that both x and y are expressed in microns. © 2003 . Suitable syntax for the equations is shown in the Equation interpreter 114 section. The custom primitive defaults to a rectangular region upon creation. Inc . This setting has no effect on the simulation.8 Custom tab The custom tab is only available for custom primitives.0) corresponds to the center of the object. Equations which result in undefined values (1/0) result in a zero height. EQUATION 2: The equation.2012 Lumerical Solutions. notice how the equations are clipped at the edge of the object. expressed as a function of x. The z position is obtained via extrusion or revolution of the y edge. Equation 1 and 2 are bound such that they are only defined over specific regions. Equations that go negative will be clipped at zero. (X. which defines the lower edge of the physical object. The custom object allows you to define the y position of the object as a function of the x position. The revolution object is created by revolving the equation around the x-axis. resulting in a surface of revolution. Custom primitives are objects that are defined by equations describing the boundaries of the physical object.5. DETAIL: This is a slider which takes values between 0 and 1. depending on how transparent you want the object to be. 5. CREATE 3D OBJECT BY: Options include "extrusion". you can specify a value for ALPHA between 0 (transparent) and 1 (opaque) for the object. The origin of equation is the center of the object. which defines the upper y edge of the physical object. When selected. Higher detail shows more detail.e. Extrusion results in an object that is extruded along the z-axis (i. Equations that go larger than the span of the object will be clipped at the edge of the object.1. EQUATION 1: The equation. In the following figure. MAKE NONSYMMETRIC: Uncheck this if you want to define the lower edge with a different equation. invariant in z). but increases the time required to draw objects. expressed as a function of x. OVERRIDE COLOR OPACITY FROM MATERIAL DATABASE: When unselected the opacity is determined from the material database. By default it is set to 0.Y)=(0. any equation left blank results in a custom primitive of zero height everywhere. EQUATION UNITS: The default units in which x and y are expressed in equation 1 and 2. and "revolution".Simulation objects 75 objects are shaded and their transparency can be set using OVERRIDE COLOR OPACITY FROM MATERIAL DATABASE. and is shaped via entry of one or more equations in the edit window. In two dimensions.y). this tool is useful for importing data from an atomic force microscope (AFM). It © 2003 . to represent doped material where the doping concentrations and optical loss are calculated in another software package. (n. Both upper and lower surfaces can be imported. For example. it must be defined as z = f(x. Surfaces For example.1. this tool is useful for importing from a scanning electron microscope (SEM) image. k(x.9 Import Data tab The button includes options to import from a variety of formats: GDSII This file format is commonly used to store 2-dimensional geometric data. Inc .k) material The REFRACTIVE INDEX (N AND K) as a function of space.z).y.2012 Lumerical Solutions.y. k(x. For details. the imported data is extruded along the z axis.y) and in three dimensions as n(x. the data is defined as n(x. Images In either JPG or PNG format. see GDSII Import 77 . In two dimensional simulations. Please note that the value of k is translated into a conductive (or plasma) model and is only valid at a the center frequency of the simulation. the data must be defined as y = f(x). In three dimensional simulations.76 Reference Guide 5. for example.z). In three dimensions.y). The following table details the supported and unsupported features. The GDSII file format is commonly used to store 2-dimensional geometric data. the results may not be as expected.9. 77 5. or it can be used to import 3D objects into a 3D layout environment by extruding the 2D data in the Z dimension. Unsupported features should not prevent the file from being imported.1 GDSII Import The GDSII import function allows you to import structures from a GDSII file into the layout editor.2012 Lumerical Solutions.1. Inc . Features General Multiple cells in GDSII library file Layer numbers for drawing objects Yes Yes Supported Primitives/Objects Box/Rectangle Polygon Path (see note below) Node Text Symbolic cell reference Array cell reference Yes Yes Yes No No Yes Yes Advanced Cell references in external library/file Magnifications in array and symbolic No Yes © 2003 . but not all features of the GDSII file format. however.Simulation objects should therefore only be used with single frequency simulations. Characteristics of the GDSII file Lumerical products support most. This data can be directly imported into a 2D layout environment. Note: Flattened GDSII files While we do include scale. Inc .78 Reference Guide references Rotations and mirroring in array and symbolic references Yes Note: Path corners Path objects in GDSII files are piecewise linear lines plus a width and optionally some information on how to handle corners and ends. GDSII Import GDSII import is initiated by accessing the IMPORT->GDSII option from the FILE menu.gds or . This will bring up a standard file browser. This material will be assigned to the imported structures. The following 3 input parameters control how the GDSII data is imported: Cell Name: This selection menu contains the valid cells available in the GDSII library. or by pressing the Import GDS button located on the main toolbar. In general. Material: This selection menu contains a list of the valid materials in your current simulation environment. and automatic flattening of references. you may have better results by flattening the file first. rotate. Select the cell you wish to import. Layer number: This selection menu contains all of the layer number present in the GDSII file. not all features of GDSII are currently supported.2012 Lumerical Solutions. rounded. Selecting a GDSII file will bring up the Single layer GDSII Import window as shown below. flip. extended squared. Our import function supports type 0 (squared ends flush to the end-point) and will default to type 2 (square ends with 1/2 the width added to the end-point) for all other types. If you run into any problems. which will allow you to select a file with the extension . GDSII files support several types of corner style options (squared. Only structures with the selected layer number will be imported by this operation. © 2003 . etc).db. X0. © 2003 . This used to set the width of the layer in the z direction. 5. Inc . and this check button allows you to reverse the order easily. PLOT PLANE: You can image the data in either the x-y plane.2012 Lumerical Solutions. IMPORT AS Mji INSTEAD OF Mij: 2D simulation only. and this check button allows you to reverse the order easily. Typically. Y SPAN. Y0.k) material import window include: SELECT FILE: let the user specify the data file to be imported. Z0: the data origin in the global coordinates of the Graphical Layout Editor. FILE UNITS: Select units for the data in your file. Z (or X or Y): Depending on the PLOT PLANE chosen.2 nk material import window Options in the (n. you can view cross sections at any depth into the structure. These structures are automatically inserted into a structure group.9. For 3D simulations. It is often easy to cycle through the array indices in the wrong order when exporting the file. it is very easy to see in the figure window when you have the order incorrect. see the Import object spatial (n.1. These fields are inactive and help to determine that the file units have been properly chosen. IMAGE K: Choose to view n or k in the figure window. The material is set as an input parameter for the structure code. Use this slider or the value input field to choose the depth of cross section. IMPORT AS Mkji INSTEAD OF Mijk: 3D simulation only. It is often easy to cycle through the array indices in the wrong order when exporting the file. the x-z plane or the y-z plane to be sure that it is correctly imported. it is very easy to see in the figure window when you have the order incorrect. The origin of the structures. can be changed by changing the properties of the structure group.Simulation objects 79 Selecting the Import layer button imports all the structures with the selected layer number in the selected cell into the layout environment. For detailed information and example text import files. and the script in the structure group sets all the objects to the desired material. Z SPAN: This defines the size of volume that you are importing. IMAGE N.k) data page in the User Guide section of the Online help. as well as script files that generate the example files. Typically. as well as their orientation. the structure group contains a variable "z span". Use this menu chooser to switch between planes. The name of the structure group includes the original number of layers. X SPAN. 2012 Lumerical Solutions. then this field is active and should be set to the desired data span. conic.9. If the x data was not in the file. INVERT X AND Y AXIS: It is often easy to invert the x and y axis when exporting the file.10 Surface tab The diagrams below show how the surface is used to create a volume of desired material. This defines the size of surface area that you are importing. Selecting this checkbox means that the x and y axes are automatically reversed. polynomial and custom which are added together to create the total surface. Y0. see the Import object surfaces page in the User Guide section of the Online help.1.80 Reference Guide 5. Inc . The surface equation can contain up to three terms. S S conic S polynomial S custom Conic term: © 2003 . 5. LOWER SURFACE: Choose which surface is being imported. UPPER SURFACE.1. If the x data was contained in the file (file format type 1). Not all terms have to be included. Z0: the data origin in the global coordinates of the Graphical Layout Editor. as well as script files that generate the example files. For detailed information and example text import files.3 Surface import window Options in the surface import window include: SELECT FILE: let the user specify the data file to be imported. X SPAN: This defines the length of surface that you are importing. FILE UNITS: Select units for the data in your file. YSPAN: 3D simulation only. X0. then this field is inactive. v) in 3D simulations. then (u. you could use S custom sin( u v) The surface tab contains the options: ORIENTATION: The surface determines if S is a function of (x.z) in 3D simulations and (x) or (y) in 2D simulations. Inc . it could be sqrt(-1) for some values of (u. r2 = u2 + v2 in 3D simulations and r = u in 2D simulations. the surface function will become either zero or the maximum value allowed by the rectangular volume encompassing the surface object.0) will © 2003 . j 0 There are 6 M coefficients in 2D simulations and 36 in 3D simulations Custom term: S custom f (u . In this case. When k=0 we have a spherical surface. The syntax and functions available to specify the index are found in the Equation interpreter 114 section.z) or (y. V0 are zero. k is the conic constant. v) You can choose any analytic function of u in 2D simulations and (u. If U0. See diagrams above.v) = (0. For example. Polynomial term: 5 M iu i S polynomial i 0 5 2d 3d M ij u i v j i. For example. ZERO PLANE: This determines if surface is measured from the lower edge of the rectangular volume or the upper edge.y). V0: The origin of the (u.v).Simulation objects 81 S conic cr 2 1 1 ( 1)c 2 r 2 c = 1/R. (x. U0. c is the inverse of the radius of curvature of the surface at r = 0.2012 Lumerical Solutions. When k=-1 we have a parabolic surface.v) coordinate system. See diagrams above. SET UNDEFINED TERMS TO: It is possible that the surface equation becomes undefined. MATERIAL POSITION: This determines if the material fills the regions above the surface or below the surface. Setting these values to non-zero will offset the origin by a desired amount. and removed with the REMOVE button. If there are no syntax errors in the script the SCRIPT OUTPUT will read <script complete>. frequency ect). The script is run every time the TEST or OK button is pressed.12 Script tab The script tab is only available for structure groups.11 Properties tab The properties tab is only available for structure groups. or when one of the user properties is changed with a script command. and to create the custom properties of the group that are the inputs of the group script. The script tab can contain script commands that are used to set up a structure or edit the properties of structures located within the structure group. see the Scripting Language 155 section of the Reference Guide. Inc .1. To find a list of script commands. CONIC: Check this option to include the conic term in the surface equation. CONIC CONSTANT: The constant. and can change properties of any objects that are contained in the group. If this is checked. If this option is checked. The script does not have access to objects which are not located in the group. For more information and examples. 5. see the Structure groups page of the User Guide section of the Online Help. For more information and examples.1. This is equal to the inverse of the parameter c described in the definition of Sconic . and does not share the same variable space as the script prompt. the M coefficients as explained above can be entered into a table. The following buttons and regions are available in the script tab: SCRIPT: This is where the script commands are written. POLYNOMIAL: Check this option to include a polynomial term in the surface equation. see the Structure groups page of the User Guide © 2003 . Each user property has a name and a type (number. The properties tab is used to set the origin of the group. 5.82 Reference Guide correspond to the center of the surface object. Custom user property variables may be added with the ADD button. The structure group has access to the user variables defined in the PROPERTIES tab. TEST/SCRIPT OUTPUT: Press the TEST button to run the script. The user properties can be set manually in the edit GUI or through script commands. 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 3D simulations. You can choose these units with this menu.2012 Lumerical Solutions. then set RADIUS OF CURVATURE: curvature of the surface at the origin. SURFACE UNITS: All quantities defining the surface must be measured in the same units. but multiple mesh override regions may be used.2 Simulation Simulation objects are used to define simulation parameters like boundary conditions and mesh size. Simulation region The simulation region contains three settings: © 2003 . For example. Mesh override region The mesh override region is used to override the default mesh size in some part of the simulation region. Simulation region The simulation region defines most simulation parameters including the size and mesh size. if some specific meshing conditions are required in part of the simulation region. 83 5. the simulation is performed on that portion of the physical structure lying within the simulation region). Normally the meshing parameters are set in the Simulation region. The user is warned when at least one source or monitor falls completely outside the simulation region. Any simulation objects contained or partly contained within the simulation region are included in the simulation. a mesh override region can be specified. some simulations with metals are very sensitive to meshing. Inc . Note that only one simulation region per simulation is supported. and a mesh override region may be required at the metal surface.2012 Lumerical Solutions. such that any portion of a monitor or source lying within a simulation region will be used.2.e. while any objects which fall completely outside of the simulation region are not included in the simulation. Physical monitors and sources are treated in a similar fashion.1 General tab The options in the general tab depend on whether the item being edited is a simulation region or a mesh refinement region. Those physical structures (and portions thereof) lying within the simulation region are included in the simulation (i. However. 5.Simulation objects section of the Online Help. TIP: Objects which lie outside the simulation region. This formula works for dielectrics. SIMULATION TIME: The maximum duration of the simulation to be performed. Auto non-uniform The default setting. There are three different types of meshes. background medium in the simulation region. Areas with a high index will have a smaller mesh step size. Alternatively. The options for each are described in more detail below. but metals are meshed a bit finer.3 Mesh settings tab The mesh settings tab includes settings that control the mesh geometry and the discretization of time when relevant.2 Geometry tab The geometry tab contains options to change the size and location of the simulation or mesh refinement region. the time step options are discussed for FDTD Solutions/Propagator simulations. Inc . the more mesh cells are used per wavelength.84 Reference Guide DIMENSION: The dimension of the simulation region (2D or 3D). the source wavelength inside the current material of index (n). BACKGROUND INDEX: The refractive index of the surrounding. It is strongly recommended that you start with a low accuracy setting so your simulation is fast.2. you should perform some convergence testing with different mesh sizes to ensure your result is consistent.2. it is possible to set an EQUIVALENT INDEX that will be used to determine the mesh spacing. and the division factor listed below. © 2003 . and enter the desired maximum mesh spacing. For more information about how to choose the simulation time see set the simulation region section of the introduction in the Getting Started guide. The actual number the FDTD algorithm uses depends on lambda(lambda_0/n). Once the simulation is setup properly. A non-uniform mesh is automatically generated based on the mesh accuracy slider bar and the material properties.2012 Lumerical Solutions. 5. The actual simulation may be shorter if the autoshutoff criteria are satisfied before this maximum simulation time is exceeded. 5. The higher the accuracy. Mesh override region For the mesh override region the general tab includes options to override the mesh in different directions. since the mesh spacing is usually determined by the refractive index of the materials in the simulation. A higher index will lead to a finer mesh. Then. where 1 is low accuracy. and 8 is high accuracy. The MESH ACCURACY parameter is an integer from 1-8. Uniform A uniform mesh is applied to the entire simulation volume. This setting will override all other settings. regardless of any material properties. then 1/(GRADING FACTOR) <= <= GRADING FACTOR. Min Mesh Step The MIN MESH STEP sets the absolute minimum mesh size for the entire solver region. The grading factor determines the maximum rate at which the mesh can be modified. This is determined by the values of the spatial grid to ensure numerical stability and cannot be directly set by the user. If setting the mesh cells using wavelength. The Courant stability condition requires that this setting must be less than 1 for the FDTD algorithm to remain numerically stable. defined as a fraction of the Courant numerical stability limit. Inc . A larger number will result in faster simulation times. See the Mesh refinement options page for more information. DT: The time step of the FDTD/Propagator simulation. © 2003 . the default setting of 10 is sufficient in general. and a smaller number will result in slower simulation times. The default setting is sqrt(2).2012 Lumerical Solutions. This is the only mesh option available for an eigenmode solver simulation region in MODE Solutions. For example. Mesh Refinement Mesh refinement can give sub-cell accuracy for a simulation. The grading factor should be between 1 and 2. Time Step Options DT STABILITY FACTOR: A setting which determines the size of the time step used during the simulation. but may be reduced to 6-8 for coarse simulations. if dx(i+1) = *dx(i).Simulation objects 85 Step-size lambda/6 lambda/10 lambda/14 : lambda/34 Accuracy 1 2 3 : 8 Custom non-uniform This setting allows the user to fully customize how the non-uniform mesh is generated. including the mesh size specified in a mesh override region. Comput.) The number of layers depends on the mesh size at the particular boundary. Inc .2. 114. as seen in the image above. P. PML boundaries perform best when the surrounding structures extend completely through the boundary condition region. 185 (1994) © 2003 . Phys. which will automatically set the number of PML layers independently for each side. (In Eigenmode solver simulation regions. This will be the default behavior of structures whether or not they were drawn to end inside or outside the PML region. J. the number of PML layers is set under the Advanced options tab 89 . PML is most effective when absorbing radiation at normal incidence. 1 J.86 Reference Guide 5. (Note that more layers will cause the simulation to use more memory.2012 Lumerical Solutions. but can have significant reflection at grazing incidence. Perfectly matched layer (PML)1 boundaries absorb electromagnetic energy incident upon them. PML Many simulations employ absorbing boundary conditions that allow radiation to propagate out of the computational area without interfering with the fields inside.) Furthermore. Berenger.4 Boundary conditions tab The boundary conditions that are supported by FDTD/MODE Solutions are listed below with an image showing how that particular boundary condition is drawn in the CAD window. In FDTD Solutions/Propagator simulation regions. the user can specify a desired PML reflection value. Symmetric boundaries are mirrors for the electric field. A visual explanation of a symmetric boundary condition is shown in the figure below. and anti-mirrors for the magnetic field. but a phase shift exists between each period.2012 Lumerical Solutions. Both the structure and source must be symmetric. For meaningful results. accurate reflection and transmission data can be measured at a single frequency point for a given simulation. given the vector symmetry of the desired solution.simulation . Bloch (FDTD Solutions/Propagator) Bloch BC should be used when the structures and the EM fields are periodic. Further information about symmetric and asymmetric boundary conditions can be found in the online help in the section User guide . Inc . Bloch boundary conditions are used in FDTD Solutions and propagator simulations predominantly for the following two simulations: Launching a plane wave at an angle to a periodic structure – in this situation. Symmetric Symmetric boundary conditions are used when the user is interested in a problem that exhibits one or more planes of symmetry. a broadband pulse is injected via a dipole source into a periodic structure. only in the x direction) to simulate a structure which is periodic in one direction but not necessarily other directions. allowing no energy to escape the simulation volume along that boundary. Periodic Periodic BC should be used when both the structures and EM fields are periodic. © 2003 .e. Careful consideration must be given to whether symmetric or asymmetric boundary conditions are required.Simulation objects 87 Metal Metal boundary conditions are used to specify boundaries which are perfectly reflecting. the sources used must have the same symmetry as the boundary conditions. Periodic boundary conditions can be used in one or more directions (i.Choosing between symmetric and anti-symmetric BCs. Calculating the bandstructure of a periodic object – in this situation. 2012 Lumerical Solutions. XMAX.y or z span of the FDTD simulation region. ky and kz for you based on the source in your current simulation. o SI: In SI units. k x.y. ky and kz: o bandstructure: In these units kx. y min and z min).y .z are defined in units of (2 /ax. © 2003 . SET BASED ON SOURCE ANGLE: Bloch boundary conditions are often used to inject plane waves on angles into periodic structures. Note that if more than one source is defined. Symmetric and asymmetric boundary conditions should be applied to the lower boundary conditions. you should set kx. This option will determine the values kx. BLOCH UNITS: Two types of units are allowed for specifying the values of kx. YMAX.88 Reference Guide Asymmetric Asymmetric boundary conditions are used when the user is interested in a problem that exhibits one or more planes of symmetry. ZMIN. symmetric and anti-symmetric conditions can only be used on the lower boundaries (x min. Inc . ky and kz directly.z are defined in units of m-1. all sources must require consistent Bloch settings. and mirrors for the magnetic field. Boundary condition tab options XMIN. This is generally more convenient for injection of plane waves on angles. ALLOW SYMMETRY ON ALL BOUNDARIES: By default.z) where ax. YMIN. ZMAX BOUNDARIES: These fields describe the boundary conditions to be applied along the perimeter of the simulation region. By default. this box is checked. These units are very convenient for bandstructure calculations.y . Asymmetric boundaries are anti-mirrors for the electric field.y . This box allows you to also use symmetry and anti-symmetric conditions on the upper boundaries in order to simulate periodic structures that exhibit symmetry. If you uncheck the box.z is the x. y and z direction for the Bloch boundary in the units specified above. When this option is enabled. By default. 5. Inc . Forcing a symmetric mesh ensures that the mesh does not change when going from a simulation with symmetry to a simulation without symmetry.com ALWAYS USE COMPLEX FIELDS: This checkbox forces the algorithm to use complex fields during simulation. USE EARLY SHUTOFF: This will automatically end the simulation when most of the energy has left the simulation volume. AUTO SHUTOFF MAX: The simulation will end when the total energy in the simulation volume rises to this many times the maximum energy injected. USE DIVERGENCE CHECKING: This will automatically end the simulation when the total energy in the simulation volume is this many times larger than maximum energy injected. please contact support@lumerical. All physical structures and mesh override regions in the negative half will not be considered by the meshing algorithm. FDTD Solutions and MODE Solutions Propagator: FORCE SYMMETRIC X. The simulation data will automatically save. the mesh is generated based on the source properties. DOWN SAMPLE TIME: Check the auto shutoff conditions every down sample time number © 2003 . KY.2012 Lumerical Solutions. To achieve this.2. The mesh in the negative half is simply a copy of the positive half mesh. complex fields are only used when there are Bloch boundary conditions. The simulation data will automatically save. This will result in slower simulation times and increased memory requirements and should only be used when necessary. For more information. AUTO SHUTOFF MIN: The simulation will end when the total energy in the simulation volume drops to this fraction of the maximum energy injected. SNAP PEC TO YEE CELL BOUNDARY: This option forces any structures defined as PEC to have interfaces that are aligned with the Yee cell boundaries.5 Advanced options tab WARNING: This tab includes options which should only be changed if you are quite familiar with the meshing algorithm and techniques used .Simulation objects 89 KX. OVERRIDE SIMULATION BANDWIDTH FOR MESH GENERATION: This option allows the simulation mesh to be generated following a custom wavelength or frequency range. This setting avoids complications that can result in some circumstances if normal electric field components are set to 0 at a PEC interface. Z MESH: This will force a symmetric mesh about the x. the specified PEC interface may be shifted by as much as dx/2 when creating the simulation mesh. This ensures that all electric field components at the PEC interface are tangential to the interface. Without this. Y. the meshing algorithm ONLY considers objects in the positive half of the simulation region. where dx is the size of the Yee cell. This option also forces a mesh point at the center of the simulation region. y or z axis. KZ: The wavevector setting in the x. Increasing PML layers will reduce the back-reflection arising from the boundaries but will also increase time and memory requirements for simulations. for 20 regions. STABILIZED PML provides more numerical stability. PML POLYNOMIAL: The polynomial power which determines how rapidly the electric and magnetic conductivity increases as radiation propagates at normal incidence into the PML. Increasing PML layers will reduce the back-reflection arising from the boundaries but will also increase time and memory requirements for simulations. MINIMUM PML LAYERS: The minimum number of cells which are used for PML boundary conditions. NX. In particular. NZ: The process layout for parallel simulations. MAX SOURCE TIME SIGNAL LENGTH: This is the maximum length of data used by sources to store the “time” and “time_signal” properties of sources. otherwise there could be some unwanted back reflection. However. In some cases. © 2003 . sourcenorm. PML SIGMA: The maximum normalized electric and magnetic conductivity used in the PML boundaries. Defaults to a setting of 64. we want the structures to extend through the PML so that fields exiting the simulation region are completely absorbed. and the normalization for the transmission functions. nonorm option should be used. in most cases. SET DEFAULTS: Can be used to reset the settings back to their original default settings. although the performance is slightly reduced. EXTEND STRUCTURE THROUGH PML: In most cases. SET PROCESS GRID: The division of of the simulation volume into sub-regions. TYPE OF PML: The type of PML used can be STANDARD or STABILIZED. The default setting of 3 denotes a cubic increase of electric and magnetic conductivity with increasing depth into the PML. which are then run as a separate processes. Defaults to a setting of 12.2012 Lumerical Solutions. Inc . 5x2x2 is more efficient than 20x1x1. can be manually set for more efficient computation. NY. If a large number of sources are used and the simulation time is on the order of 100ps (which is very rare). This option automatically extends structures through the region even if they were not drawn as such in the CAD. advanced users may want to reduce this to save memory. care must be taken with source normalization. Better performance will be achieved when the regions are square e. MAXIMUM PML LAYERS: The maximum number of cells which are used for PML boundary conditions.g.90 Reference Guide of dT time steps PML KAPPA: The normalized imaginary electric and magnetic conductivity used in the PML boundaries. since the “time” and “time_signal” properties of sources are important for calculating the sourcepower. They can be placed at one or more points anywhere in the simulation area. This is due to a slightly different interpretation of whether the incident beam is a Gaussian in real space or in k-space. an electric dipole is oriented in the z-direction. the Gaussian sources use a scalar beam approximation for the electric field which is valid as long as the waist beam diameter is much larger than the diffraction limit. Gaussian and thin lens sources A Gaussian source defines a beam of electromagnetic radiation propagating in a specific direction. and will be a sinc function if the lens is filled. Their position and direction are specified in terms of the center position (x.Simulation objects 91 5. the behavior of point sources depends on whether you are performing a TE or a TM simulation. The cross section of this beam will be a Gaussian if the lens is not filled. and z for 3D simulations) and their orientation through angles phi (measured in the x-y plane with respect to the x-axis) and theta (measured from the z-axis). the beams are injected along a line perpendicular to the propagation direction. For two-dimensional simulations. "Distribution of light at and near the focus of high-numerical-aperture © 2003 .3 Sources The following types of sources are available in FDTD Solutions and MODE Solutions' Propagator: Point sources (dipole) Oscillating dipoles act as sources in Maxwell's equation to produce electromagnetic fields. The scalar approximation assumes that the the fields in the direction of propagation are zero. For uniform illumination (filled lens). For a TE simulation. with the amplitude defined by a Gaussian cross-section of a given width. there is also a thin lens source that will inject a fully vectorial beam. For a highly focused beam. which specifies the angle measured with respect to the x-axis. In each case. This difference is rarely of any practical importance because other factors such as the non-ideal lens properties become important at these very high NA systems. a magnetic dipole is oriented in the z-direction. Inc . For non-uniform illumination at very high NA (numerical aperture). Note: References for the thin lens source The field profiles generated by the thin lens source are described in the following references. while an electric dipole is oriented in the x-y plane by the ANGLE argument. By default. the field distribution is precisely the same as in the papers.2012 Lumerical Solutions. M. while a magnetic dipole is oriented in the x-y plane with the same ANGLE argument describing the direction of the dipole vector. Mansuripur. For a TM simulation. there are some subtle differences. y. and are clipped at the edges of the source. Mansuripur. this introduces scattered fields that then propagate outside of the total field area. Consequently.e. respectively. the TFSF source injects along one edge of a rectangle as specified by the user. 382-383 (1993). if one places an object in the path of the TFSF wave. This source type is particularly useful to study the scattering behavior of objects. the sum of the incident field and the scattered field).2086-2093 (1986). the wave propagates within the TFSF region and is subtracted out at the other end. Soc. A 3. Am. incident + scattered field). Plane wave sources Plane wave sources are used to inject laterally-uniform electromagnetic energy from one side of the source region. of course. © 2003 . Opt. However. 786-805 (1989). Certain computational aspects of vector diffraction problems: erratum" J. one can then measure the total or scattered transmission. M. only normal incidence plane waves are supported as the source field. while everything outside is only scattered field. Currently. The other three boundaries subtract the incident field (allowing for the wave propagation). Certain boundaries of the TFSF can be dragged outside the simulation area boundaries. with the only difference being the SOURCE SHAPE setting. It is also possible to inject a plane wave at an angle. The plane wave source is actually the same object as the Gaussian source. The incident field is a plane wave with a wavevector normal to injection surface. Total-field scattered-field sources Total-field scattered-field sources are used to separate the computation region into two distinct regions – one contains the total field (i. "Certain computational aspects of vector diffraction problems. In 2D. while in three-dimensional simulations the plane wave source injects along a plane. "Distribution of light at and near the focus of high-numerical-aperture objectives: erratum. the scattering object is on or in a multilayer slab that is illuminated from above. M. Am.2012 Lumerical Solutions. In the absence of any objects. as the scattered field can be isolated from the incident field. Everything inside the TFSF boundary is total field (i. the plane wave source injects along a line. results in there being no scattered field. by placing monitors inside or outside the total field region. Am. Soc. Opt. while the second region contains only the scattered field. In two-dimensional simulations. A 10.92 Reference Guide objectives. Soc.e. TIP: Using TFSF sources TFSF sources can be used when: the source can completely surround the scattering objects in a homogeneous material (including materials with complex index). Inc ." J. Mansuripur." J. A 6. Opt. this. sources in propagator simulations are the same as sources in FDTD Solutions. The concept of total/scattered field is complex and can lead to misinterpretation of results. These settings can be used by any of the frequency domain sources by unchecking the 'override global source settings' checkbox in the source's Frequency/Wavelength tab. or imported from other simulation tools such as Breault Research Organization’s ASAP ray tracer. © 2003 . Note that the POLARIZATION option is disabled for propagator simulations. please consult an application example or technical support at support@lumerical. From a list of possible modes. 5. Global source options The global source options window adjusts default frequency-domain parameters. For additional details on the operation of the mode solver. under the effective index tab. The geometry of the mode source (i. consult the integrated mode source 100 section.3. a single mode is selected for injection into the simulation region. while in two-dimensions they are computed across a line. Dipole sources DIPOLE TYPE: A pull-down menu in which the point source can be configured as an electric dipole or a magnetic dipole. Mode sources The mode source is used to inject a guided mode into the simulation region. Otherwise.e. In three-dimensional simulations. particularly with regards to energy conservation.2012 Lumerical Solutions. Some care is needed when using the TFSF source. The custom field profile can be calculated from an analytic formula.Simulation objects 93 for example. Imported sources are only available in 3D FDTD simulations. Import sources (FDTD Solutions only) The import source allows the user to specify a custom field profile for the source injection plane. the modes are computed across a plane.1 General tab The information located on the general tab depends on the type of monitor chosen. imported from another FDTD simulation.com. For advanced use of TFSF sources. where the actual polarization of the source is determined in the propagator simulation region. when symmetric or anti-symmetric boundary conditions are used in the simulation. and span) is used to compute the guided modes for the structure. center location. Inc . 2012 Lumerical Solutions. POLARIZATION ANGLE: The polarization angle defines the orientation of the injected electric field. PHASE: The phase of the point source. regardless of direction of propagation while a polarization angle of 90 degrees defines S-polarized radiation. plane wave and TFSF sources (Some of the options below are not available for the TFSF source. ANGLE THETA: The angle of propagation.) SOURCE SHAPE: The shape of the beam. while BACKWARD corresponds to propagation in the negative direction. BASE AMPLITUDE: This is the amplitude that will generate a radiated CW power of 10 nW/m in 2D simulations and 1 fW in 3D simulations. measured in degrees. PHASE: The phase of the point source. © 2003 . measured in units of degrees.94 Reference Guide AMPLITUDE: The amplitude of the point source. while BACKWARD corresponds to propagation in the negative direction. it is the product of the AMPLITUDE and the BASE AMPLITUDE. DIRECTION: This field specifies the direction in which the radiation propagates. INJECTION AXIS: Sets the axis along which the radiation propagates. measured in units of degrees. Only useful for setting relative phase delays between multiple radiation sources. with respect to the injection axis defined above. This setting defaults to Gaussian. but for convenience can be changed to that of a Cauchy/Lorentzian. THETA: The angle with respect to the z axis of the dipole vector PHI: Angle with respect to positive x axis of the dipole vector. FORWARD corresponds to propagation in the positive direction. FORWARD corresponds to propagation in the positive direction. Mode and imported sources (Note that imported sources are only supported in FDTD Solutions. in degrees. A polarization angle of zero degrees defines P-polarized radiation. THETA VS WAVELENGTH PLOT: This plot shows the actual injection angle theta for each source wavelength as used in the simulation.) INJECTION AXIS: Sets the axis along which the mode source will propagate. and is measured with respect to the plane formed by the direction of propagation and the normal to the injection plane. The units of the source depend on the dipole type. Only useful for setting relative phase delays between multiple radiation sources. Gaussian. as explained in the Units and normalization 37 section. TOTAL AMPLITUDE: This is the amplitude actually used in the simulations. Inc . AMPLITUDE: The amplitude of the mode source as explained in the Units and normalization 37 section. DIRECTION: This field specifies the direction in which the TFSF source propagates. rotated about the injection axis in a right-hand context. or a plane wave. AMPLITUDE: The amplitude of the source as explained in the Units and normalization 37 section. ANGLE PHI: The angle of propagation. in degrees. Launches the mode solver and allows the user to select the desired mode for injection. Only useful for setting relative phase delays between multiple radiation sources. This tab can be accessed through the individual source properties. Inc . PLOT CURRENT MODE/FIELD: This button will plot the field profile selected in the PLOT pull down menu for the currently selected mode. consult the integrated mode solver 100 section of the reference guide. IMPORTED INDEX: The refractive index of the background medium where the imported field was recorded. PLOT IN NEW WINDOW: This is the same as PLOT CURRENT MODE/FIELD but opens a new window for the graphics that stays open even after property edit window is closed. so that you can easily observe the wavelength (top figure). IMPORTED POWER: The power of the source recorded in imported. CLEAR SOURCE DATA: Clears the selected mode for mode sources.3 Frequency/Wavelength tab The Frequency/Wavelength tab is shown below. rotated about the injection axis in a right-hand context. PHI: The angle of propagation. THETA: The angle of propagation. frequency (middle figure) and temporal (bottom figure) content of the source settings. measured in units of degrees.2 Geometry tab The geometry tab contains options to change the size and location of the sources. Z0: Displays the location in the imported source where the field was recorded. measured in degrees. 5.3. Y0. IMPORTED WAVELENGTH: The wavelength of the imported source data. with respect to the injection axis defined above. Note that the plots on the right-hand side of the window update as the parameters are updated.3. SELECT MODE: Mode source only. OFFSET: Allows users to set an offset to the plane where the mode is calculated. For more information on using the mode source.Simulation objects 95 PHASE: The phase of the point source. Also for imported sources the following Imported source settings are available X0. or clears the imported data for imported sources PLOT: This menu allows you to choose which component of the field profile you would like to plot. IMPORT SOURCE: load an interface file (*.fld). 5.2012 Lumerical Solutions. or the global source properties. This is useful for ensuring that mode sources at an angle do not intersect with structures that are not part of the waveguide/fiber. © 2003 . please keep the following points in mind: Pulse durations : Choose a pulse duration that can accurately span your frequency or wavelength range of interest. from 200 to 1000 THz. you can choose between ‘standard’ and ‘broadband’ source types. If you choose to directly modify the time domain settings. Source type: In general. it is possible to chose to either SET FREQUENCY / WAVELENGTH or SET TIME-DOMAIN.2012 Lumerical Solutions. This will ensure that the frequency distribution around the center frequency of the source is close to symmetrical. However. As a result. Broadband sources can be used to perform simulations in which wideband frequency data is required – for instance. and the initial fields are close to zero at the beginning of the simulation. the pulse offset should be at least 2 times the pulse duration. short pulses require more points per wavelength for accurate simulation. Pulse offset: This parameter defines the temporal separation between the start of the simulation and the center of the input pulse. very short pulses contain many frequency components and therefore disperse quickly.96 Reference Guide At the top-left of the tab. To ensure that the input pulse is not truncated. © 2003 . This type of frequency range cannot be accurately simulated using the standard source type. Inc . Standard sources consist of a Gaussian pulse at a fixed optical carrier. while the broadband sources consist of a Gaussian pulse with an optical carrier which varies across the pulse envelope. then FDTD Solutions/Propagator tries to find the optimum time domain settings that will cover the desired frequency/wavelength range without compromising accuracy. If you choose to set the frequency or wavelength ranges to define your sources. Simulation objects Set frequency wavelength If the SET FREQUENCY / WAVELENGTH option was chosen. SHOW/REFRESH: This button will update the current plot and the current index. The broadband source.2012 Lumerical Solutions. Beam options for Gaussian and Cauchy/Lorentizian sources USE SCALAR APPROXIMATION / USE THIN LENS: These checkboxes allow the user to © 2003 . When the user uses the script function setsourcesignal. In the general tab. The standard source consists of an optical carrier with a fixed frequency and a Gaussian envelope. BANDWIDTH: The FWHM frequency width of the time-domain pulse.4 Beam options tab This tab is only available for Gaussian sources. measured relative to the start of the simulation. Beam options for all source shapes CURRENT INDEX: This field shows the refractive index at the x. PULSELENGTH: The full-width at half-maximum (FWHM) power temporal duration of the pulse. this option is enabled.y (and z) position of the beam. OFFSET: The time at which the source reaches its peak amplitude. 5. set the source shape option to the desired shape (Gaussian. By default. The plot is not automatically updated because the thin lens calculations can be long. Inc . which contains a much wider spectrum. 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. FREQUENCY: The center frequency of the optical carrier. An offset of N seconds corresponds to a source which reaches its peak amplitude N seconds after the start of the simulation.3. 97 Set time domain The options in the time domain section are: SOURCE TYPE: This setting is used to specify whether the source is a standard source or a broadband source. BEAM PROFILE. this section makes it possible to either set the frequency or the wavelength and choose to either set the center and span or the minimum and maximum frequencies of the source. Advanced ELIMINATE DISCONTINUITY: Ensures the function has a continuous derivative (smooth transitions from/to zero) at the start and end of a user defined source time signal. this field will be set as "user input". PLOT: This menu allows you to choose which component of the field profile you would like to plot. consists of a chirped optical carrier with a Gaussian envelope. plane wave or Cauchy/Lorentzian) before entering data in the beam options tab because the beam options that are available will change depending on the source shape. FILL LENS: Checking this box indicates that the lens is illuminated with a plane wave which is clipped at the lens edge. NUMBER OF PLANE WAVES: This is the number of plane waves used to construct the beam. the options are: BEAM RADIUS: 1/e field (1/e2 power) radius of the beam for a Gaussian beam. If FILL LENS is unchecked. A positive angle corresponds to a diverging beam and a negative angle corresponds to a converging beam. A negative distance indicates a converging beam and a positive distance indicates a diverging beam. d. © 2003 . A beam diameter much larger than the lens diameter is equivalent to a filled lens. Inc . A positive distance corresponds to a diverging beam. the options are: WAIST RADIUS: 1/e field (1/e2 power) radius of the beam for a Gaussian beam. or a halfwidth half-maximum (HWHM) for the Cauchy/Lorentzian beam. The refractive index for the source is determined at X. as shown in the figure below. as shown in the figure below. DIVERGENCE ANGLE: Angle of the radiation spread as measured in the far field.2012 Lumerical Solutions. then it is possible to set the diameter of the thin lens (LENS DIAMETER) and the beam diameter prior to striking the lens (BEAM DIAMETER). If BEAM SIZE AND DIVERGENCE ANGLE is chosen. and a negative sign corresponds to a converging beam. Scalar approximation BEAM PARAMETERS: This menu is used to choose to define the scalar beam by the WAIST SIZE AND POSITION or the BEAM SIZE AND DIVERGENCE ANGLE.98 Reference Guide choose whether to use the scalar approximation for the electric field or the thin lens calculation. whereas Cauchy/Lorentzian sources can only be defined using the scalar approximation. or a halfwidth half-maximum (HWHM) for the Cauchy/Lorentzian beam. DISTANCE FROM FOCUS: The distance d from focus as shown in the figure below. Gaussian sources can be defined using either the scalar approximation or thin lens calculation. The figure below shows the beam parameter definitions for the scalar approximation beam. The default value in 2D is 1000. Y (and Z). If WAIST SIZE AND POSITION is chosen. DISTANCE FROM WAIST: The distance. The beam profile is more accurate as this number increases but the calculation takes longer. NA: This is nsin( ) where n is the refractive index of the medium in which the source is found and is the half angle as shown in the figure below. Please note that the index will not be correctly defined in dispersive media and lenses should only be used in nondispersive media. Thin Lens References for the thin lens approximation are listed on the Sources 91 page. as shown in the figure below. The source span should be chosen to be larger than the beam spot size. Inc . the beam profile will be truncated at the simulation boundary. TIP: Setting Gaussian source parameters Gaussian spot size: The beam spot size can be set independently of the source span.3.Simulation objects 99 The figure below shows the beam parameter definitions for the thin lens. the fields around the dipole are saved. If there is significant intensity at the edges of the source. © 2003 . The tab contains a RECORD LOCAL FIELD checkbox. If the spot size is larger than the simulation region.2012 Lumerical Solutions. this box must be checked in order to use the dipolepower script function. the beam will scatter on injection. When checked.5 Advanced tab This tab only appears for the dipole source. as shown in this figure. fully-vectorial beam. 5. The following sections detail each tab within the mode solver window. The mode solver itself uses the same discretization mesh as the FDTD/propagator algorithm. The upper portion of the window contains the MODE LIST where the mode number. and polarization (percentage of the mode polarized TE.100 Reference Guide 5. The lower left-hand corner shows the calculation parameters.3.6. The right-hand portion of the window contains the PLOT AREA where the simulation data is plotted. not valid for 3D simulations) are shown. This section describes the operation of the integrated mode solver once the physical structure and the simulation region defining the structure of interest have been defined within the layout editor. propagation loss. and the information which it contains. Upon launch. and the two drop-down boxes at the top of the plot area are used to specify which data to plot in the plot window. so the profile of the guided modes as computed with the mode solver naturally interface with the underlying FDTD/propagator mesh. © 2003 . the mode source window appears with different tabs.6 Integrated mode source This section describes the operation of the integrated mode solver to inject guided waves into FDTD simulations or the Propagator in MODE Solutions. Following this. The mode source is launched by pressing the SELECT MODE button within the mode source edit window. Overall.3. upon launch. effective index.2012 Lumerical Solutions. while the region at the bottom right can be used to modify the current mode plot options. 5. this facilitates the injection of guided modes with minimal back-reflection. the lower left-hand portion of the window shows the default calculation parameters to be used to simulate the structure. the plot area shows the refractive index profile of the structure being analyzed. Inc .1 Mode analysis The MODE ANALYSIS window is shown in the screenshot below. the calculated loss (measured in dB per millimeter of propagation. only valid for lossy materials). arranged from top to bottom in terms of the highest effective index and numbered sequentially. the TE or TM fraction is not displayed. this portion of the window shows the effective index of the mode. © 2003 . please see Mode List and Deck page in the MODE Solutions Knowledge Base for the latter case. Select Mode Pressing this button (located on the lower right corner of the window) will initialize the mode source with the current mode selected within the mode table in the upper left-hand portion of the window. and the TE or TM fraction corresponding to the definition of TE and TM in 2D FDTD. This portion of the window shows the modes. Inc .Simulation objects 101 Modal analysis The modal analysis portion of the window displays simulation data relevant to the different modes calculated for the structure of interest.2012 Lumerical Solutions. For 3D FDTD simulations. See the following section for more information about the analysis and plot sections. Note that there are small differences between FDTD Solutions and the Propagator in MODE Solutions. For each mode. WAVELENGTH: the wavelength at which the modes are solved for.1.USE MAX INDEX: Search for modes near the maximum index found in the meshed cross section.3. The default value corresponds to 1e-12 but can be increased by the user to speed convergence or decreased to improve accuracy.6. the available options are: o NEAR N: Allows you to look for modes near a desired effective index. The left portion of the window displays the calculation parameters: FREQUENCY: the frequency at which the modes are solved for. . NUMBER OF TRIAL MODES: the number of modes to be calculated.1 Plot and Analysis Options The plot and analysis windows are shown in the screenshot below. the maximum number of modes is limited and the calculation will stop when this number of modes is exceeded. Inc . © 2003 . MAXIMUM NUMBER OF MODES TO STORE: When searching for modes in a range of effective indices from n1 to n2.N: Choose the effective index to search for. it is possible to fill your available memory if too many modes are found. 5. USE SINGLE PRECISION: this can be used to save some memory during the calculation of the modes but the results are less accurate. . For this reason. SEARCH: this pull-down allows the user to specify which option to search for modes in.102 Reference Guide Advanced Options The ADVANCED OPTIONS button (located on the left right corner of the window) brings up the "Mode Advanced Options" window with the following parameters: CONVERGENCE TOLERANCE: the convergence tolerance used for the calculations.2012 Lumerical Solutions. Figure window The plot itself where the data appears is automatically labeled and scaled to fit the simulation data. however.Simulation objects 103 o IN RANGE: Allows you to search for modes in a desired range of indices. o BEND RADIUS: the bend radius of the waveguide measured from the center of the mode solver region o BEND ORIENTATION: the orientation of the radius of curvature. As with the layout editor. that the mouse is automatically in the zoom state when over the plotted data and therefore the keyboard shortcut Z is not necessary. The available options depend on the setting of the PLOT pull-down. .2012 Lumerical Solutions. RESTORE LAST SETTINGS: restores the calculation parameters to the current simulation parameters corresponding to the modes that have been calculated. and conductivity using the COMPONENT pull-down Box 2 specifies which part of complex-valued simulation data is to plot: o AMPLITUDE o PHASE o REAL PART o IMAGINARY PART COMPONENT: This pull-down allows the user to specify which specific component is to be plotted within the plot area.N1. the options are PLOT: This pull-down allows the user specifies what simulation data should be plotted within the plot area. CALCULATE MODE: by clicking this button the mode solver will start the calculation for the waveguide modes given the criteria above. Mode plot options The MODE PLOT OPTIONS can be set in the bottom right of the MODE ANALYSIS window. permittivity. Box 1 specifies what general class of data to plot: o MODAL FIELDS: allows the user to select various field quantities such as electric and magnetic field amplitudes and intensities and Poynting vectors using the COMPONENT pull-down o MATERIAL PROPERTIES: allows the user to select various physical quantities such as refractive index. 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 © 2003 . Inc . N2: Define the range of indices to search over. COORDINATES: currently supports only the CARTESIAN coordinate system. the plot can be zoomed using the standard mouse actions. BENT WAVEGUIDE: Allows the user to specify a current radius of curvature for the mode and solver for the modes of a bent waveguide. Note. the index monitor will be able to capture the time-evolution of the physical properties profile for nonlinear media. or area monitors to capture this information over different spatial extents within the FDTD simulation region.2012 Lumerical Solutions. Movie monitors Movie monitors capture a desired field component over the region spanned by the monitor for the duration of the simulation. 2D or 3D time monitors. since they will generate large amounts of data. In the future. and power flow can be collected as a function of frequency and position. © 2003 . point time monitors with a down sample time of 1 are sufficient. line.Data Analysis section of the online Knowledge Base. For the purposes of extracting line widths of resonant structures through Fourier analysis. Time-domain monitors These monitors provide time-domain information for field components over the course of the simulation. The resultant movies are saved with the same name as the monitor in the current working directory. Frequency-domain profile monitors Frequency-domain profile monitors collect the field profile in the frequency domain from simulation results across some spatial region within the simulation.104 Reference Guide 5. Movie monitors are only available in the two dimensional variety (and only z-normal for propagator simulations). These monitors will record field profiles exactly where they are positioned. Poynting vector. For more information. Individual field components. there is no option for linear or point index monitors. TIP: Using time monitors Check the memory requirements when using 1D. see the User Guide . Index monitors are only available in two or three dimensions. Consider using the temporal or spatial down-sampling options.4 Monitors The following types of monitors are available in FDTD Solutions and MODE Solutions' Propagator: Index monitors Index monitors records the n and k value as a function of frequency/wavelength in a simulation. Inc . TIP: CW Movies It is possible to create a CW movie from profile or power monitor data. Time-domain monitors can consist of point. When possible. try to use 1D or 2D rather than than 3D monitors. If you are only interested in the power flux. which results in slightly more accurate power measurements. Unfortunately.Simulation objects 105 Profile monitors are ideally used to collect field data for visualization and customized analysis. rather than profile monitors. These monitors are identical to Frequency-domain profile monitors except that they automatically snap to the nearest FDTD mesh cell boundary when the simulation runs due to a different default setting of the SPATIAL INTERPOLATION property in the advanced option. We suggest experimenting with the spatial downsample value(s) before doing long simulations and watch how long your simulation takes. power monitors should be used. TIP: Switching between power monitor and profile monitor You can switch between frequency-domain power monitors and frequency-domain profile monitors by changing the SPATIAL INTERPOLATION setting in the Advanced Options tab. Power monitors: when it is most important to get the most accurate power measurements. Less interpolation is required in this case. This is important when accurate power flow calculations are required. if it is necessary to use the latter.2012 Lumerical Solutions. you can select only OUTPUT POWER in the Data to record tab. the monitor becomes a frequency-domain power monitor. Tip: Using frequency monitors Beware that frequency-domain field-profile monitors are computationally-intensive and they can increase the simulation time considerably. Inc . Tip: When to use profile and power monitors Profile monitors: when it is most important to measure the fields at a very specific point in space. profile monitors should be used. If highly accurate power measurements are required. © 2003 . Frequency-domain power monitors Frequency-domain power monitors collect high-accuracy power flow information in the frequency domain from simulation results across some spatial region within the simulation. try to restrict the number of frequency points. When the SPATIAL INTERPOLATION is set to NEAREST MESH CELL or NONE. y and z vectors. If it is more important to measure the field at a particular position. The precise location of where the monitor measures data during the simulation is recorded with the monitor data in the x. this also means that the exact position where the data is recorded will change whenever the mesh changes. FREQUENCY POINTS: Set to choose the number of frequency points at which to record data. DESIRED SAMPLING: This converts the minimum points per optical cycle into an actual sampling rate in Hz. the Nyquist limit and the time step. ACTUAL SAMPLING: The actual sampling rate is the rate that will actually be used for the discrete fourier transforms (DFTs). taking into account the desired sampling rate.2012 Lumerical Solutions. Inc . It contains advanced global settings for frequency-domain monitors. 5. dt. which can be imported into INTERCONNECT directly.106 Reference Guide Mode Expansion Monitors Mode Expansion Monitors use overlap analysis to calculate the forward/backward propagating components of any mode of a waveguide or fiber at an arbitrary location in the simulation region.4.1 Frequency Power/Profile tab This tab only appears for the global monitor settings. Global Monitor Properties The global monitor options window is where the user can specify the range and resolution with which to measure frequency-domain information. © 2003 .2 Frequency Power/Profile Advanced tab This tab only appears for the global monitor settings. Selecting this option spaces data at linearly spaced points with respect to wavelength. These settings can be used by any of the frequency domain monitors by unchecking the 'override global monitor settings' checkbox in the monitor's General tab. When unchecked. USE SOURCE LIMITS: When checked these monitors use the source limits. By default. data is recorded at linearly spaced points with respect to frequency. USE LINEAR WAVELENGTH SPACING: By default. The Mode Expansion monitor facilitates the interoperability between FDTD Solutions and INTERCONNECT as it returns the S parameters. MIN SAMPLING PER CYCLE: This parameter determines the minimum amount of sampling per optical cycle that can be used. Only the MIN SAMPLING PER CYCLE can be modified by the user. it is set at 2 (the Nyquist limit) for optimum efficiency. but includes the same options as the general tab does for frequency domain power and profile monitors. the frequencies/wavelengths at which to record data can be set using the pull down menus and boxes below them. 5.4. NYQUIST LIMIT: The Nyquist sampling limit is calculated based on the maximum frequencies that may be present in the simulation volume. 3 General tab The information located on the general tab depends on the type of monitor chosen. the user can specify the frequency range and number of points at which frequency-domain information will be recorded (using the options described below). with the tendency that a scale factor too small will result in saturation of the movie. Can also be ELECTRIC FIELD INTENSITY (|E|2) or MAGNETIC FIELD INTENSITY (|H|2).Simulation objects DOWN SAMPLE TIME: This is the time step downsampling. Movie monitor HORIZONTAL RESOLUTION: The horizontal width of the final movie. DRAW STRUCTURE OUTLINE: A toggle which allows the user to superimpose an outline of the refractive index profile on top of the movie. VERTICAL RESOLUTION: The vertical height of the final movie. If a TM simulation is being performed. Time-domain monitor The general tab for the time domain monitor includes options to edit the amount of data. Can also be ELECTRIC FIELD INTENSITY (|E|2) or MAGNETIC FIELD INTENSITY (|H|2). The monitor outputs its maximum intensity at the end of the simulation in the variable Monitor Name_maxI. this is best set to unity. USE LINEAR WAVELENGTH SPACING: By default.01 to 0. For dipole sources. which are outlined below. Index. If unchecked the options below are set from the global monitor settings.2012 Lumerical Solutions. USE SOURCE LIMITS: When checked these monitors use the source limits.4. The field component to be captured in the movie. in pixels. as set out in the FDTD simulation region. Selecting this option spaces data at linearly spaced points with respect to wavelength. data is recorded at linearly spaced points with respect to frequency. the TE field component is captured. whereas if a TE simulation is being performed. This parameter may not be less than zero. frequency domain profile and frequency domain power monitors OVERRIDE GLOBAL MONITOR SETTINGS: A toggle to override the global monitor settings. This can be used to aid in visualization of where the radiation is located within the dielectric structure. If checked.05. The choices depend on whether a TE or TM simulation is being performed. the TM field component is captured to the movie. Setting the scale factor to Monitor Name_maxI and rerunning the simulation will result in a perfectly scaled movie. FIELD COMPONENT: 3D simulations. There are three different possibilities. while a scale factor too large will result in very faint radiation patterns. TE FIELD COMPONENT: 2D simulations. SCALE: A dimensionless variable which defines how to scale the capture of the field data. The field component to be captured in the movie. 107 5. the frequencies/wavelengths at which to record data can be set using the © 2003 . and time period over which data is collected. Inc . TM. When unchecked. it is typically on the order of 0. in pixels. Tip: for Gaussian pulses. 5 Geometry tab The geometry tab contains options to change the size and location of the monitors. Setting the down sample value to 1 gives the most detailed spatial information (i. normalized to the total spectral average of the source. 5. 5.4. Inc .e. normalized to the partial spectral average of the source. as described under APODIZATION. or full (i.4. Options include none. PZ) to measure. Z option is used to set the spatial averaging performed on the data. EY. The FREQ WIDTH corresponds to the effective bandwidth of the full apodization window. HY. HY.e. only some components are non-zero (i. only EX. All the field quantities remain active to facilitate easy change between TE and TM simulations.e. EZ. PZ: A set of fields with which the user can select what field components (EX. The DOWNSAMPLE X. EZ. Y. TOTAL SPECTRAL AVERAGE: The monitor outputs the total spectral average power through a monitor surface. A down sample value of N corresponds to averaging over N grid points. information at each grid point). OUTPUT POWER: For surface monitors (3D) and line monitors (2D) only. EY. beginning of time signature apodized). in general. OUTPUT EX. You can calculate the integrated power over the monitor surface. both start and end). end (i. PARTIAL SPECTRAL AVERAGE:The monitor outputs the partial spectral average power through a monitor surface. invalidate any source normalization performed and is therefore not suitable for accurate power measurements.e. EY.6 Spectral averaging and apodization tab PARTIAL SPECTRAL AVERAGING. HZ. FREQ WIDTH: See the diagram below for the definition of these terms. FREQUENCY POINTS: Set to choose the number of frequency points at which to record data.4. HX. start (i. 5. This requires much less memory after the simulation is completed and is particularly suitable for large parallel simulations where only the integrated power across a surface is required. APODIZATION CENTER. PX. Note that apodization will. Note: Apodization functions © 2003 . HX.4 Data to record tab STANDARD FOURIER TRANSFORM: The monitor outputs data at specific frequencies.2012 Lumerical Solutions. In 2D simulations.e. DELTA: FWHM of the Lorentzian weighting function. APODIZATION: Specifies the window function of the apodization. HZ) or Poynting vector (PX. PY. TIME WIDTH. and HZ are applicable for TE simulations).108 Reference Guide pull down menus and boxes below them. PY. end of time signature apodized. Currently. no interpolation is performed and each electromagnetic field component is recorded at a different position within the Yee cell. START apodization involves windowing the front side of the time-domain data. By default. Inc .4. With NONE. the fields are interpolated to the same location in the Yee cell. SAMPLING RATE: The actual sampling rate in Hz. like cavities. This setting controls how the fields are interpolated. The other options cannot be altered. Frequency domain profile and power monitors SPATIAL INTERPOLATION: This option is as described above for time domain monitors OVERRIDE ADVANCED GLOBAL MONITOR SETTINGS: When this option is selected MIN SAMPLING PER CYCLE can be set. 5. the fields are interpolated to the nearest FDTD mesh cell boundary. see the descriptions in Frequency Power/ Profile Advanced tab 106 . END apodization involves windowing the last part of the simulation.2012 Lumerical Solutions. With NEAREST MESH CELL. Movie monitors MIN SAMPLING PER CYCLE: This parameter determines the desired amount of © 2003 . The resulting “windowed” data is then processed to produce frequency-domain information.Simulation objects 109 FULL apodization involves windowing the time-domain data on both the start and end side. the electromagnetic field components are not recorded at the same point in space. they are there to display settings. For further details. Instead each component of the vectorial electric and magnetic fields are recorded at different locations in the Yee cell. MIN SAMPLING PER CYCLE: This parameter determines the minimum amount of sampling per optical cycle that can be used. it is set at 10. This can be useful for ramping down the time-domain signal in devices where the radiation lives a long time. In order to properly calculate the Poynting vector and electromagnetic energy density.7 Advanced tab Time-domain monitors SPATIAL INTERPOLATION: In FDTD generally. This can be useful to exclude the initial source excitation from the frequency-domain data. DOWN SAMPLE TIME: This is the time step downsampling. the supported options for time monitors are NEAREST MESH CELL and NONE. For more information and examples. the variables and the script tab. RESULTS: The output parameters are defined here. Once the analysis script has been run. that can be accessed using script commands in the same manner that monitor data is accessed for simple monitors. The setup tab contains two further tabs: the variables tab. © 2003 .110 Reference Guide sampling per optical cycle. The next two options. FRAME RATE: The speed at which frames are displayed on the screen. However.2012 Lumerical Solutions. In simulations with mesh refinement turned on. and the script command contains script that can be used to process the monitor data. it cannot get data from monitors or sources not located inside that group. The default option. NEAREST MESH CELL and NONE are as described for time-domain monitors. but the other options do. Inc .9 Analysis tab The analysis tab is only available for analysis groups. SPECIFIED POSITION returns the index that that the field sees at the location where the monitor is placed. 5. The script in the analysis groups does not use the global variable space from the script prompt and script file editor. the default option does not show the averaging of the indices. 5. The default is 30. The results from the script can be obtained in the script prompt by setting up output parameters in the variables tab. SAMPLING RATE: This converts the minimum points per optical cycle into an actual sampling rate in Hz. Index monitors: SPATIAL INTERPOLATION: There are three options for index monitors. and the script tab.4. The variables tab is identical to the properties tab 82 for structure groups and the script tab is identical to the script tab 82 for structure groups. in units of frames per second. The analysis tab contains two further tabs.8 Setup tab The setup tab is only available for analysis groups.4. and can get data from any of the monitors located in the group. the results become monitor data. The variables tab is used to define the input and output parameters of the script. DOWN SAMPLE TIME: This is the time step downsampling. The analysis script must calculate these quantities. Variables tab PARAMETERS: These are input parameters to the analysis script. Script tab The script has access to the input parameters defined in the variables tab. see the Analysis groups page of the User Guide section of the Online Help. the analysis script output will contain any results from the "?" script command. If there are no syntax errors in the script the SCRIPT OUTPUT will read <script complete>. ANALYSIS SCRIPT OUTPUT: Press the RUN ANALYSIS button to run the script. In addition. For more information and examples.Simulation objects 111 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. RUN ANALYSIS: Pressing the run analysis prompt runs the analysis script and saves the results.2012 Lumerical Solutions. Inc . © 2003 . SAVE ANALYSIS: Pressing this button saves changed made to the analysis script (even when in analysis mode). This button can only be pressed when the simulation is in analysis mode. see the Scripting Language 155 section of the Reference Guide. see the Analysis groups page of the User Guide section of the Online Help. The "Mode calculation" section allows users to select a mode (or a set of modes) to expand the monitor data with. The Mode Expansion tab contains two main sections. Mode Calculation MODE SELECTION: Allows users to select the modes to use for the mode expansion calculation. The "Monitors for expansion" section allows users to choose a field profile from an arbitrary monitor in the simulation to expand. © 2003 . see Overlap analysis.4. and the results that are returned. Inc .112 Reference Guide 5.10 Mode expansion tab This tab only appears for the Mode Expansion monitors.2012 Lumerical Solutions. The "user select" option allows users to select multiple modes. For more information on this expansion calculation. SELECT MODE: If the "user selected" option has been chosen. The "Add" and "Remove" buttons on the side can be used to add/remove monitors. VISUALIZE MODE DATA: This will bring up the Visualizer. CLEAR MODE DATA: Clears all the mode data. FREQUENCY POINTS: Set to choose the number of frequency points at which to calculate the modes. THETA: The angle of propagation. USE SOURCE LIMITS: When checked these monitors use the source limits. the frequencies/wavelengths at which to record data can be set using the pull down menus and boxes below them. This is useful for ensuring that monitors at an angle do not intersect with unwanted structures. measured in degrees. OVERRIDE GLOBAL MONITOR SETTINGS: A toggle to override the global monitor settings. OFFSET: Allows users to set an offset to the plane where the modes are calculated. PHI: The angle of propagation. Inc . the user can specify the frequency range and number of points at which the modes will be calculated at (using the options described below). USE LINEAR WAVELENGTH SPACING: By default. If checked. Selecting this option spaces the points with respect to wavelength. © 2003 . this will bring up the Mode analysis tab 100 for the user select from a calculated list of modes. When unchecked.Simulation objects 113 Following the "mode selection" combo box is a frame for choosing the frequencies to calculate the modes for. The mode expansion monitor will automatically perform the necessary interpolation between different frequency points. If unchecked. Monitors for expansion After the modes have been selected. the options below are set from the global monitor settings. showing all the profiles for the selected modes. and users can choose the desired monitor from the monitor drop down list. the monitor will automatically update the chosen modes when necessary. modes are calculated at linearly spaced points with respect to frequency. Rotations This frame allows user to apply an arbitrary rotation to the calculate modes. Advanced AUTO UPDATE BEFORE ANALYSIS: If selected. rotated about the normal axis in a right-hand context. Note that this does not have to correspond to the frequency points for the monitors in the "Monitors for expansion" table.2012 Lumerical Solutions. in degrees. the next step is to choose the monitor with the input field profile. with respect to the normal axis. tanh ^ or **. ==. atan. asin.y. users can user position variables when specifying the index profile of the <Object defined dielectric> material definition. acos. sqrt >.0) refers to the center of the object.Speed of light in m/s pi . cosh. atan2. log. != abs. © 2003 . cos.5 Equation interpreter The fields for numeric parameters can be used as a simple calculator. The expression will be automatically evaluated when you press Enter or click on a different field.z) = (0. Examples sin(x)^2 exp(-x^2-y^2) x>0 Note: Formulas The position variables here are relative to object space. Inc .0.114 Reference Guide 5. Equations which become undefined (i. exp. <. Category Algebraic operators Trigonometric operators Syntax +. *. if you wish to set a value to the square root of 3 divided by e. sinh. The following table provides a list of available operators and constants. log10. mod c . just enter sqrt(3)/exp(1) into the field. >=. <=. (x. tan.e. -. 1/0) should be avoided.2012 Lumerical Solutions. not the origin of world space. For instance.The value of Pi Power operators Logical operators Other operators Constants Examples 2^10 sqrt(3)/exp(1) sin(45*pi/180) Index profile for <Object defined dielectric> In addition to the above parameters. / sin. Inc .Simulation objects 115 Material database variables The following table describes variables or constants supported by many fields in the material database. Variable or predefined constant f Description The simulation center frequency f = (fmin+fmax)/2 The simulation center angular frequency w = 2*pi*f The free space wavelength l0 = c/f The free space wavenumber k0 = 2*pi/I0 Units Hz w Hz l0 Length units as defined by user The inverse of the length units defined by the user k0 © 2003 .2012 Lumerical Solutions. most of which do not support position variables. 116 Reference Guide 6 Material database This chapter explains the Material Database. etc. The Material Explorer can be accessed through the Simulation menu. It also provides an interface to change material properties like color. See the following pages for details. mesh order.2012 Lumerical Solutions. which defines the meshing behavior (priority) for overlapping objects. use the Material Explorer. © 2003 . Experimental data can also be loaded into the database. Inc . delete) the materials that are available for use in your simulations. Material explorer 125 The Material Explorer is used to check the material fits that will be used in the simulation. Material database 116 The Materials Database allows for the definition of complex materials using experimental data or parametrized models. A change to the database in one file does not automatically change the materials in any other files. It can be accessed by clicking the material database button on the Structures tab. Permittivity models 117 See this section for information on the available material models. Mesh order 127 See this section for information on the mesh order property. To view the resulting index profile. plasma. It is most important to check the fits when using the Sampled data material type. A copy of the database is stored in each simulation file. 6. The Material Database stores the material data to be used in the simulation. To modify the default materials that appear when you create a new simulation. such as Sampled data. edit the simulation file in the Defaults subdirectory of the installation directory. lorentz. modify. but the Material Explorer can be used to check the fits for any material type. and model parameters.1 Material database The Materials Database allows you to manage (create. To delete these materials.2 Permittivity models This section describes the permittivity (or refractive index) material models supported by the Material Database. Materials currently used in the simulation can not be deleted. and can not be directly modified. Inc . 6. The second column of the list shows which materials are in use. etc) in the list view.The maximum number of coefficients allowed to be used in the material fit.mdf) files. color. Sampled data The Sampled data model is used to import experimental material data. The first column of the list shows which materials are write protected. A number of materials are provide with the product installation. Material Properties Use the Material properties window to view and edit the material model parameters.2012 Lumerical Solutions. Max coefficients . Tolerance . The copy will be unlocked. use the Add button.The desired RMS error between the permittivity of the experimental data and the material fit. To modify the properties of a default material. first modify the simulation so they are not used.The fitting routine can use one of the models described below. The experimental data can be imported from a text file with the Import data button. To create additional materials. mesh order. but will make the simulation slower. simply use the Copy button to duplicate the material. You can also modify some of the material properties (name. Model parameters can be edited in the Material property panel of the Material Database window. The fitting routine will use the least number of coefficients that produce a fit with an RMS error less than the tolerance. © 2003 . The fits can be check ed and adjusted in the Material Explorer. Material list The material list shows the materials stored in the material database. or a more generalized model. see the material models section.Material database 117 Import / Export The import and export buttons allow you to transfer material data between simulation files via Material Database Files (. The Sampled data material definition uses an automatic fitting routine to generate a multicoefficient material model of the experimental data over the frequency range specified by the source. More coefficients can produce a more accurate fit. For model parameter definitions. Default materials provided with the product installation are write protected. The fit range should cover the simulation bandwidth. negative values will produce gain. Imaginary Weight . Refractive index .118 Reference Guide The following advanced options can be set in the Material Explorer: Mak e Fit Passive . Refractive index .Set to true to decouple the bandwidth used to generate the material fit and the source bandwidth. Dielectric The Dielectric model is used to create a material with a constant real index. This material will have the specified index at all frequencies (non-dispersive).Imaginary part of the index at the center frequency of the simulation.Bandwidth to be used for the fit when Specify Fit Range is true. Specify Fit Range . Must be > 0.Set to be true to prevent the fit from having gain at any frequency. Inc . Must be >= 1.k) material The (n. Conductive The Conductive model is used to create a material defined by the following formula. the fitting routine restricts the range of coefficients in the fit in order to reduce numerical instabilities which cause simulations to diverge. and where it is important to keep the material parameters constant over the whole parameter sweep.The refractive index of the material.k) material model is such that the material properties will only be correct at the center frequency of the simulation. The implementation of the (n. By default this is true in order to prevent diverging simulations.If this setting is true. (n. Imaginary refractive index . Positive values correspond to loss. A weight of 1 gives equal weight to the imaginary and real parts of the permittivity. This option is used in parameter sweeps where the source frequency is changed.k) material model is used to create a material with a specific value of n and k at a single frequency. NOTE: Single frequency simulations only! This type of material model should only be used for single frequency simulations. Improve Stability .Increasing the weight increases the importance of the imaginary part of the permittivity when calculating a fit.2012 Lumerical Solutions.Real part of the index at the center frequency of the simulation. Bandwidth range . total (f) i 2 f o Plasma (drude) © 2003 . The implementation of the Sellmeier model is such that the material properties will only be correct at the center frequency of the simulation. "On the Lorentz-Lorenz formula and the Lorentz model of dielectric dispersion." Opt. This material sets the fields to 0. There are no parameters for this model.2012 Lumerical Solutions. total (f) lorentz 2 O 2 O 2i O 2 f (2 f )2 NOTE: Lorentz model reference: Kurt Oughstun and Natalie Cartwright. PEC A Perfect Electrical Conductor (PEC). total ( ) 2 2 2 A1 B1 2 B2 2 B3 2 C1 C2 C3 NOTE: Single frequency simulations only! This type of material model should only be used for single frequency simulations. Inc . total ( f ) 2 P 119 2 f i C 2 f Debye The Debye model is used to create a material defined by the following formula.Material database The Plasma model is used to create a material defined by the following formula. Express 11. 1541-1546 (2003) Sellmeier The Sellmeier model is used to create a material defined by the following formula. total (f) C debye C i2 f Lorentz The Lorentz model is used to create a material defined by the following formula ( > 1). Analytic material The analytic material model allows the user to enter an equation for the real and imaginary part of the permittivity or refractive index which can depend on the predefined variables © 2003 . The C coefficients have dimensions of micrometers squared ( m2). Chi2 ( 2) This nonlinear model allow users to define the value for the term directly.x10: numeric values that represent a parameter of interest Kerr nonlinear In the Kerr nonlinear model. (1) 0 ( 3) P (t ) D(t ) | E (t ) |2 E (t ) Solving for the displacement field D gives ( 3) 0 r | E (t ) |2 E (t ( 3) The relative permittivity and values must be specified by the user.. Note that higher orders terms can also be modeled via the User-defined models 122 .2012 Lumerical Solutions.l0: the free space wavelength in the specified length units .c: the speed of light in a vacuum. ie..k0: 2*pi/l0 where l0 is in the specified length units . Inc .x1. If the (default).w: 2*pi*f in the specified units . © 2003 .pi: the number pi . The predefined variables that can be used in the equations for "real" and "imaginary" are: . the polarization will be added to the vacuum.. ALWAYS in SI units.. term is 0 Chi3/Chi2 The usage for the Chi3/Chi2 material is the same as the Chi2 material. in which case the added polarization will be (1) in addition to the polarization of any base material that is selected. Paramagnetic The paramagnetic material model allows the user to specify both the permittivity and permeability of the material to simulate magnetic materials. always equal to 3e8 . An arbitrary dispersive base material can also be specified.f: the frequency in the specified frequency units . the electric polarization field P will depend on the electric field E in the following manner.120 Reference Guide listed below. but with the addition of the Chi3 term. 2. anisotropic materials can be represented by a 9 element permittivity tensor such that the electric and displacement fields are related by ij Di ij Ej where summation over j is implied on the right hand side.y. When using the Material Explorer. Once you can write D U U† where U is a unitary matrix. set the Anisotropy field in the Material database to Diagonal.2012 Lumerical Solutions. The relevant objects should associated with both the material and the matrix transform grid attribute. The full anisotropy tensor can be written as 11 21 31 12 22 32 13 23 33 The input of anisotropic materials is simple when the permittivity tensor is diagonal x 0 y 0 0 0 0 z 0 To define an anisotropic material. you must define a rotation grid attribute that has the same rotation as the object and associate the object with that grid attribute. © 2003 .z) of the permittivity or index to plot. Note: When you rotate a geometric primitive. the permittivity tensor is not rotated. Inc . you can select the component (x.Material database 121 6. then the diagonal values of eD should be entered into the materials database and a matrix transform grid attribute should be added with the transform U. If you have a more general form of anisotropy. In order to do this.1 Anisotropic materials In general. U†=U-1 is the complex conjugate transpose of U and eD is diagonal. The Material property editor will then have a property field for each direction. you must first diagonalize the anisotropy (use the eig script command) and find both the eigenvalues and the unitary transformation that makes the permittivity diagonal. These material models can be compiled as a plugin and added to the materials database.2012 Lumerical Solutions. Pn is the desired polarization at time n t and Un and Vn are input values that we provide. this means that for each component of E in this material. The polarization that we want to add is simply P E In FDTD. Simple example Suppose you want to implement a simple linear. you want to have Pn U nEn En En Vn and therefore you need to solve for En by implementing a method that returns En Vn Un Once this material plugin has been created.) The same approach is used to create new magnetic materials. non-dispersive polarization that is added to Lumerical's default multi-coeffiient model (MCM) for Silicon from Palik. Basic concept To create a new material. you simply add this material to the database and select Silicon as the base material. If no base material is selected. The polarization that is added will be in addition to the polarization of any base material that is selected. the polarization will be added to the vacuum (ie. You will now have a material with a total permittivity of ( ) MCM ( ) © 2003 . you must write a method in C++ that solves the following equation for for En U n E n Pn V n where En is the electric field at time n t. the default relative permittivity or permeability is 1.3 User-defined models Users can define their own plugin material models written in C++. Inc .122 Reference Guide 6. dll or *. and can be added as shown below for the Chi2 material that was created as a plugin. Can I solve for non-linear media? Yes. Inc . FAQ Can I solve dispersive media that include auxilliary fields? Yes. For non-diagonal anisotropy this can often be handled by applying local transformations of the reference frame using matrix transform grid attributes. Can I solve for anisotropic media? Yes. How to use material plugins in the software Once a plugin *. In the future. this is one of the examples we provide. including gain media. The input parameters that are specified as part of the plugin implementation will appear either in isotropic or diagonal anisotropic modes. we may implement additional plugin models that allow the user to see the other field components directly if that becomes important. you can tell us how many storage fields you need and we will allocate the memory and allow you to update the storage fields.so file has been created and is saved into the correct installation folder.Material database where MCM 123 ( ) is the dispersive MCM model for Si from our database. The new material will appear automatically in the materials database. and is the additional non-dispersive susceptibility. In fact the (2) medium that comes with the software is actually created as a plugin. you can introduce materials that involve extremely complicated material models. as shown below: © 2003 . the method is setup to handle diagonal anisotropic media. Can I solve advanced material models that might involve coupling to multi-level electron systems? Yes. as long as you can define a polarization in the manner described above.2012 Lumerical Solutions. 2012 Lumerical Solutions. we can help set you up to write. it may be easier for us to create a plugin and installer package for you based on the equations that you want to solve. In other cases. Finally. we are always interested in collaborating with groups that can provide sophisticated material models that we can redistribute to other users. In many cases.com for more information. with appropriate references and web links.124 Reference Guide Implementation If you want to implement a new material we recommend that you discuss it with us first. © 2003 . Inc . It is still likely easiest eventually to have us compile your final code so that a plugin and plugin installer can be built on all operating systems in a way that is easy to distribute and install on other computers. Please contact us at support@lumerical. compile and use your plugins. The above 2 examples are compiled and distributed with the standard installation package. the Tolerance and Max coefficient properties and the wavelength range of the source can be edited in the Material Explorer.cpp is an example of the header and implementation of the plugin for a paramagnetic material.h and paramagnetic.4 Material explorer The Material Explorer is used to check the material fits that will be used in the simulation. This is most important when using the Sampled data material type. 6. paramagnetic.cpp is an example of the header and implementation of the plugin for a chi2 material. Inc .h is the interface that must be implemented.2012 Lumerical Solutions. Plot windows The two figure windows at the top of the Material Explorer window show the real and imaginary parts of the material index. please look at the following files: 125 imaterialplugin.h and chi2. chi2. If the fit for a Sampled data material is not good enough. although it can be used to check material properties for all material types.Material database To see the interface class. Material settings Property Material Description Select the material to check. © 2003 . and 2 simple examples. Show or hide the advanced options. Only applies to fitted materials. Decouple the bandwidth used to generate the material fit and the source bandwidth. Inc . this is the source limits. By default. Update the Material Database with the new Tolerance and Max coefficients values. Only applies to fitted materials. Make fit passive Improve stability Specify fit range Bandwidth range of fit Save fit parameters Simulation bandwidth settings Property Bandwidth units Bandwidth range Save source bandwidth Description Specify range in units of wavelength or frequency. By default this is checked in order to prevent diverging simulations. select the axis to check. The bandwidth of the fit should cover the simulation bandwidth. Update the source limits with these values.126 Reference Guide Axis Fit Tolerance Max Coefficients Show/Hide Advanced Imaginary weight If the material is anisotropic. Check to restrict the range of coefficients in the material fit in order to reduce numerical instabilities which cause simulations to diverge. Check to prevent the material fit from having gain at any frequency.2012 Lumerical Solutions. The frequency/wavelength range of interest. Specify range by Min/Max or Center/Span. A weight of 1 gives equal weight to the imaginary and real parts of the permittivity. The frequency/wavelength range used for the fit if specify fit range is selected. The Tolerance setting of the material. The Max coefficients setting of the material. View settings Property Vertical axis Description Plot permittivity or index © 2003 . Increasing the weight increases the importance of the imaginary part of the permittivity when calculating a fit. The mesh order can be set at the material level (in the material database). Number of coefficients 6. Materials with a lower mesh order take priority over materials with a higher priority number (i. © 2003 . Areas which overlap are assigned the material properties of the higher priority material (see the following figure).5 Mesh order The mesh order property governs how overlapping objects are meshed in the simulation. The number of coefficients used in the fit. Inc .e.Material database Show material data Standard view Extended view range Specify view range Plot in new window Show the experimental data on the plot windows Plot the fit over the specified bandwidth range Plot the fit over a wider bandwidth range Specify the range to plot the fit Plots fit and data in a new window 127 Fit and plot buttons Property Plot in new window Fit and Plot Description Plot data in a new window Calculate and plot the material fit Fit analysis Property RMS error Description The RMS error of the fit. or the object object level (in the object properties). order 1 takes priority over 2).2012 Lumerical Solutions. It serves no role for objects which do not overlap. The fitting algorithm will use the minimum number of coefficients required to achieve an RMS error less than the value specified by the Tolerance property of that material. the mesh order property defines the material properties in the mesh cells where materials fully overlap one another.128 Reference Guide In the figure to the left. which has a mesh order of 1. the object that is actually being simulated will be different. To ensure your simulation is well defined. you should modify the etch material to match the background index of your simulation. The lower mesh order means that an object using the etch material will override other objects of a different material type. the mesh order will be inferred from the Object tree. the conformal mesh algorithm solves Maxwell's integral equations near these boundaries. Inc . In the event that both overlapping materials have the same order. The etch material has a refractive index of n=1. For simulations using the conformal mesh. In the mesh cells which contain boundaries between two materials. © 2003 . Objects at the bottom of the tree will take priority over objects at the top of the tree. Tip: Use an index monitor to confirm that the structures are meshed as intended. If you are using a different background index. there are two objects that partially overlap. Depending on their mesh orders. The only exception is the etch material.2012 Lumerical Solutions. it is recommended that you avoid situations where two different overlapping structure have the same mesh order. Note: The etch material in the default Material database By default. most materials in the material database have a mesh order of 2. The contents are organization into the following chapters: Resource Manager 129 Running a simulation 132 Analysis tools 133 Visualizer 139 Results View 142 Optimization and parameter sweeps 146 7. the computing resources must be configured.1 Resource Manager Before running any simulations.Running simulations and analysis 129 7 Running simulations and analysis This section describes the general operations of running a simulation and performing an analysis. this only needs to be set once per machine. when all resource/parallel configuration options were saved in each simulation file. Resource Configuration © 2003 . It can be easily accessed by pressing the resources button in the main toolbar. This is done through the resource manager. Information on how to set up optimization and parameter sweep projects is also described here. This is different from earlier versions of the program. Usually.2012 Lumerical Solutions. These settings are now saved on each machine. Inc . Configuration test This section of the window is used to test the communication to the additional resources. they can be added as additional computation resources to perform multiple simulations in parallel. Click the add button. This is especially useful for parameter sweeps and optimization projects where many iterations need to be performed. Set the number of cores that you would like it to use 6. then we can be sure that the current simulation will run. user credentials or communication problems. see Resources Advanced Options 131 . 2. © 2003 . The resources can easily be turned on and off depending on whether they are free to compute at the time. For advanced configuration options. Specify the IP address of the hostname that the computer uses on the network 5. It also performs other checks such as engine path verification. the 'Duplicate' button will be useful.2012 Lumerical Solutions. Set any advanced options. Configuration test Run tests to make sure MPI username and password are set correctly. If the tests pass. Inc . Set a name for that resource 4. It runs a series of tests and will report any warnings or errors that may prevent a distributed simulation from running such as mismatched software versions. If many resources have advanced options that need to be changed. USERS WITH EXTRA ENGINE LICENSES Resources If you have extra engine licenses and Lumerical software installed on other computers on the network. Requirements of each additional resource: Must be the same operating system as localhost Must be the same system type as localhost (cannot mix 32-bit with 64-bit) Must have the same version of Lumerical software as localhost Must have the same version of MPI as localhost Must have a user account with the same login and password as localhost Must have access to the simulation files via a network drive To add a new resource: 1.130 Reference Guide USERS WITH A SINGLE LICENSE Resources This section allows the number of processes for localhost to be changed as well as the name. Set 'active' if you plan to use the resource right away or 'inactive' if you plan to enable it later 3. adds the argument -host <IP/ Hostname>. The default setting is "Bypass mpich daemon on localhost".Running simulations and analysis 131 7. it adds the –binding option with the value computed through the lumnuma class. when mpiexec supports it. SUPPRESS ANY DEFAULT MPIEXEC OPTIONS: removes the default arguments in the mpiexec command SET MPIEXEC ENGINE PATH: Allows the user to specify the path to their mpi executable. The setting "Standard". The last setting "Bypass mpich on localhost" will exclude mpich entirely.2012 Lumerical Solutions. On Windows. Adds the –logall command line option. Resource advanced options MPICH OPTIONS JOB LAUNCHING: Whether or not to tell mpiexec to spawn processes in local session or via remote job launcher. EXTRA MPIEXEC OPTIONS: Allows the user to specify advanced options to mpiexec. © 2003 . If set.1 Resources Advanced Options Advanced Options Each resource can have customized settings if required.1. PRODUCT OPTIONS CREATE LOG FOR ALL PROCESSES: Each parallel process will create a log file. Inc . USE PROCESSOR BINDING: Tells mpiexec to specify which CPU each process will run on. which will add the –localonly command line option and skip the –host command line options (only if the host name is localhost). the specified mpiexec path is used instead of the default mpiexec co-packaged with the software. The job monitor window allows you to see the status of your jobs. it is time to run the simulation.g. the specified path is used instead of the default path which is relative to the executable binary. The program will be in Analysis mode.2012 Lumerical Solutions. Clicking on the RUN button in the toolbar will launch the job monitor window with the simulation already running. that you have remaining. The simulation project file must be saved in order to run after which the data can then be analyzed. It is based on the time taken thus far and the simulation time (in fs) set in the simulation object. finished PROJECT FILE: Shows the location of the file that is being simulated. Inc . The name is specified by the user. STATUS: Shows the state of the job. The bottom window displays the final command which will be used to run the simulation.132 Reference Guide EXTRA COMMAND LINE OPTIONS: Allows the user to specify advanced options to engine. e. Appends the text immediately after the engine command. PROGRESS: Shows the percentage of the time taken so far as compared to the maximum time remaining. Job Manager The elements of the job monitor window are as follows: ENGINE: Shows which computational resource is being used. running. you will be prompted to do so. If set. minutes and seconds. AUTOSHUTOFF LEVEL: Shows the total energy left in the simulation region and is useful for monitoring how close the simulation is to reaching the auto-shutoff MAX value (set in the simulation object). © 2003 . 7. as well as allowing you to pause or quit the jobs. Errors that occur during the simulations are displayed here. paused. If you have not already saved your simulation. QUIT & SAVE: Stops the simulations and saves the data obtained up to that point. SET ENGINE PATH: Allows the user to specify path to product engine. MAX TIME REMAINING: Indicates the maximum REAL time.2 Running a simulation When the simulation setup is complete and the resource setup passes the configuration tests. in hours. using a job scheduler. FORCE QUIT: Forcefully terminates the current simulation job and does not save any data. but not consume CPU) CONTINUE: restarts a paused job QUIT AND SAVE: The engine will stop the current simulation job and attempt to save the data created so far. 7. they may not check-in their license.Running simulations and analysis 133 QUIT & DON'T SAVE: Stops the simulations and does not save any data. Note: More information For more information about running Lumerical simulations. Inc . No simulation data will be saved. The program will be in Layout mode. QUIT AND DON'T SAVE: The engine will stop the current simulation job and does not save any data. FORCE QUIT: Closes the job monitor window and forcefully terminates all simulations.3 Analysis tools This section describes the way in which the integrated analysis routines are used to visualize and analyze simulation data. In the second section. VIEW JOB DETAILS: Opens up a modal dialog that contains the standard output messages from the engine processes. the two general ways in which data can be visualized and © 2003 . The manner in which the analysis routine interacts with the overall simulation environment is described in the next section: Analysis tools and the simulation environment 134 . with the length of the progress bar is determined by the sum of the “maximum simulation times”.Running Simulations. which means you may have to wait several minutes before another simulation can be run. see the Online Help section User Guide . To access actions for each job. preparing batch files. which means you may have to wait several minutes before another simulation can be run. When simulations are stopped with Force Quit. This option should ONLY be used when the other Quit options don't work properly. This is followed by sections to familiarize the user with the operation of the analysis routines. right-clicking anywhere on the row will bring up a context menu with the following options: PAUSE: the engine is signaled to go into a wait mode (it will stay running. including running on clusters. and using extra engine licenses. When simulations are stopped with Force Quit. they may not check-in their license. This options should ONLY be used when other Quit options don't work properly. The first section entitled Analysis groups 134 describes the analysis tab of an analysis object. TOTAL PROGRESS BAR: The progress bar indicates how much of ALL the simulations are complete.2012 Lumerical Solutions. When the simulation completes and the EXIT button is pressed. For example. the project file will be in Analysis mode. 7. Once in the analysis tool. The plotting functions. An example of the edit window for an analysis group is shown in the screenshot below. a central component to the overall analysis routines. as described in the Scripting language 155 section. or the simulation is prematurely terminated by pressing the EXIT button. are described in Figure windows 136 section. the Visualizer 139 and Results View 142 tools are explained. By exiting the analysis routines and returning to the layout editor. More advanced analysis can be performed with the extensive scripting language.1 Analysis tools and the simulation environment Before describing how the analysis routines are used for data visualization. it is important to understand the way in which the integrated analysis tool interacts with the simulation environment. existing simulation data will be erased. meaning that any modification of the data will require switching back to the layout mode. This ensures that at any given time. even premature termination of a simulation results in a partial dataset being written to the file.2012 Lumerical Solutions.2 Analysis groups Analysis groups are container objects that can contain any simulation object and associated script functions which can be used to create customize data analysis.134 Reference Guide analyzed is detailed. In Analysis mode. an index monitor. Finally. the simulation data is written into the simulation project file. © 2003 . simulation object properties can be viewed. or they decide they would like to alter the simulation objects and re-perform the simulation.3. Inc .3. they provide a very useful and intuitive way of analyzing and visualizing results through the GUI. but not edited. One can also automate an optimization/parameter sweep procedure using an analysis group made of structures/simulation regions/sources/monitors. Following the completion of a simulation. and the script function that calculates absorption from these objects. the user continues to analyze the simulation data until they either wish to close the application. the simulation data results corresponds to the configuration of the simulation project. an absorption monitor group can be created with a power monitor. The section entitled Data export 138 describes data can be exported to plot in other software packages for further analysis or formal presentation. 7. and use the script function to update each parameter accordingly. Together. Once an analysis routine has run. The ANALYSIS tab contains all the information used to analyze the monitor data. © 2003 . The SETUP tab contains all the information needed to edit and set up monitors that are located in the analysis group. Any changes to the variables can be saved using the SAVE ANALYSIS button at the bottom of the tab. which can be accessed from the script prompt or a script file in the same manner that monitor data is accessed for simple monitors. but information in the SCRIPT tab can be edited both in layout and analysis mode (see the note at the top of the window which is highlighted in yellow). Parameters can be added and removed using the respective buttons. and the output parameters (named results) in the bottom half. The functionality of the SETUP tab is very similar to the Structure groups object. the results (output parameters) become monitor data. It is only possible to edit information in the SETUP tab in layout mode. The RUN ANALYSIS button runs the analysis script located in the SCRIPT tab. The VARIABLES tab contains all input parameters in the top half. Inc .Running simulations and analysis 135 As can be seen above. there is a SETUP tab and an ANALYSIS tab. It is divided into two sub-tabs.2012 Lumerical Solutions. 136 Reference Guide A screenshot of the contents of the SCRIPT tab is given below. Plot Image © 2003 . More information concerning Analysis groups is available in the User Guide section of the Online Help. There is a section of the window that contains the analysis script and a section that contains the results of the analysis script once the RUN ANALYSIS button has been pressed. Inc . the value computed for the output parameter is printed in the Analysis Script Output portion of the window.3.2012 Lumerical Solutions.3 Figure windows for plots and images Simulation results can be visualized from the Object tree or Results viewer. 7. Since the script contains the script command to print the results to the screen. "?". The scripting language can also be used to visualize simulation results and other data. i. Note that the script below computes the output parameter.e. pressing and holding the left-hand mouse button results in a zoom window. 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. COLOR MAP: Allows you to choose between a color image (Ctrl+C)or a grey-scale figure (Ctrl+G). 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. SET TITLE(Ctrl+T): allows you to set the x label.Running simulations and analysis 137 All of the figure windows support the same zoom functionality as in the layout editor. and the title of the plot. the right button zooms out by a factor of two. Inc . and doubleclicking either mouse button scales the plot to show all of the data. The figure window also has functions that are accessible from the top menu. which contains the FILE and SETTING. The left button zooms in by a factor of two. The initial values correspond to the current view of the figure. o INVERT AXIS(Ctrl+V): A check box that allows the axis to be inverted: the vertical axis is drawn on the horizontal and vice versa. y label. The SETTING submenu contains the following items: Common for Plot and Image: AXIS: Allows the following axes properties to be set o SET AXIS LIMITS(Ctrl+A): Opens a GUI window that allows the min and max values to be set for both the x and y axes.2012 Lumerical Solutions. The initial values correspond to the current view of the figure. Any data values larger than the maximum are displayed at the color (or grey-scale) of the maximum. and similarly for the minimum. Plot specific SET LEGEND(Ctrl+L): Allows you to set the legend and its position. This allows for over- © 2003 . see the matlabsave 179 command.138 Reference Guide saturation of the colors to emphasize certain regions of the image. © 2003 . The second option allows simulation data to be exported to MATLAB . with a header which specifies where the data was taken from and the column headings with units.mat files for subsequent data analysis in MATLAB.2012 Lumerical Solutions. The user can use scripting commands as described in the Scripting language 155 section to write data into text format. The Lumerical Solutions Online Help provides an example of how each option can be used. For image plots. Data export can be done in a number of ways. Lumerical products provide two interfaces for users wishing to use MATLAB in their analysis: 1.Scripting language section. Matlab MATLAB has a number of specialized plotting functions useful for visualizing simulation data. Data can be moved between the Lumerical workspace and MATLAB workspace.3.4 Data export In some cases. but in general the use of the scripting language will be required. 2.mat files. the data subset consists of two columns which specify the x and y positions in the units specified within the CAD layout editor. Inc . the data subset export facility generates a two-column ASCII data file. Export to text files The data subset export facility in the analysis view allows the user to save to a specified filename. or alternatively use Matlab by directly calling Matlab functions in Lumerical or by exporting data to . For more information. For example. so the user can take advantage of the combined functionality provided by both programs. and matlabget 181 . contour plot or vector plot. and a matrix of data which consists of the field quantities being exported. The first option allows MATLAB commands to be called directly from within the scripting environment. To use this option. This corresponds to the minimum and maximum values of the data being imaged. This is accomplished by using the script commands. a subset of the total simulation data for quick plotting in other software packages. matlab 179 . the user may wish to export the simulation data to take advantage of the advanced plotting and data analysis tools not available in Lumerical's products. 7. MATLAB is a registered trademark of The Mathworks. Inc. The user may also write a script file and utilize the write 175 script function to custom create a text file. o RESET DEFAULT LIMITS(Ctrl+D): Resets the original limits. See the User Guide . are suitable for visualizing the electric field or power flow. both the Lumerical product and MATLAB must be installed on the same computer. which are not available in the Lumerical solutions products but found in MATLAB. or for more accurate comparison between two images. matlabput 181 . For x-y plots. monitors.2012 Lumerical Solutions. analysis groups . etc) can have its contents sent to an existing Visualizer or a new Visualizer.3. Any object that contains data (ex.5 Visualizer The Visualizer is a tool for analyzing data.Running simulations and analysis 139 7. Visualizer settings 140 Visualizer attributes 141 Visualizer parameters 141 Visualizer © 2003 . parameter sweeps. This is useful for comparing results across different data sets. The following sections describe the many options available for controlling what data will be displayed in the plot area. Inc . with the "Remove" button or by pressing "X" on the top right corner of the window).. The upper portion of the window is the plot area. Data that gets added to the Visualizer is retained until it is removed (ie. which displays the current data defined by the settings in the lower portion of the window.. These sections can be minimized if more area for plotting is required. Inc . 1D Line plot: plot data as a line or curve 2D Image plot: plot data on a 2D plane with a color bar representing the value of the data Plot: refresh the plot window with the current settings Auto Plot: automatically update the plot window as the settings change Title: add a title to displayed on the plot Y Label: add a vertically oriented label to the y-axis Export JPEG: saves the current plot to a jpg image Log 10: plot data on a log scale Legend: display the legend in the specified position.1 Visualizer settings The settings control the overall type of plot and the labels applied to it. The legend labels are defined in the table of attributes Plot in new window: creates a new window with a snapshot of the current plot View data: allows users to view the data in a table format as shown below © 2003 .3.2012 Lumerical Solutions.5.140 Reference Guide 7. © 2003 . (Ex.g. | E|^2) SCALAR OPERATION: selects a particular component of a scalar attribute e. DATA SET: the collection of data from the monitors. The parameters control which portion or 'slice' of the attributes is displayed as well as the numerical range of the axis.2012 Lumerical Solutions.3. and other objects ATTRIBUTE: information derived from a particular data set e. (a frequency monitor data set can have E. One data set can have multiple attributes.g. (real.3.5. entries can be duplicated and applied with different operations and properties. users can select any portion of the data and "Copy" or "Export" it into a text file. It allows control over the x-axis for line plots and both x and y axes for image plots. angle) SCALE: multiplier for the data being plotted LEGEND: this name will be shown in the legend of the plot NOTES: additional information added by the user about the attribute 7. While in the table. abs. 7.2 Visualizer attributes An attribute is a set of information derived from a particular data set. Inc . and transmission as attributes) VECTOR OPERATION: selects a particular component of a vector attribute e.g. the result is added to the data set list with the chosen attributes. H.5. multiple data sets can have the same attributes. Ey. When we select a result of an object to visualize (by right-clicking).Running simulations and analysis 141 In this table format. Alternatively. and conversely. Also. data sets also contain plotting parameters.3 Visualizer parameters In addition to the attributes. Changing a simulation from analysis back to layout does not delete existing entries. imag. They will remain in the table until they are removed. users can also send any portion of the data into the Script Workspace 144 . frequency sweeps. multiple selected objects can be sent to a Visualizer at the same time as shown in the screenshot below. 2012 Lumerical Solutions. The Script Workspace and Script Favorites 144 windows work in conjunction with the scripting environment to provide additional GUI-based functionalities. the Results Manager provides a very useful and intuitive way of analyzing and visualizing variables and results through the GUI. 7. then a panel to the right will display the various options associated with that action VALUE: displays the value if it is a singular value or is blank if there is a vector of values Plotting multi-dimensional matrices When the available axes are already assigned to certain parameters.3. Inc . When used in conjunction with the Visualizer 139 . When selected. Moving the slider will update the plot in real time (if the auto-plot option is checked) and can be used to step through slices of the matrix data. If an action exists.6 Results Manager The Results Manager is a tool for analyzing simulation data. The Results View 143 window shows all the results for the simulation object that is currently selected in the Object Tree. this panel to the right shows a slider and information about the position of the slider. additional parameters are assigned the action 'slice'. © 2003 .142 Reference Guide ATTRIBUTES: the attribute that the parameter belongs to PARAMETERS: name of the parameter that will be used to plot the attribute ACTION: describes how the parameter affects the plot. 0 introduces the use of datasets. and a associated parameter © 2003 . Any simulation object that have results will be displayed with a symbol on the bottom-right corner.Running simulations and analysis 7. For example. One can right click on any of the results to display them in the Visualizer 139 .6. as in FDTD 7.2012 Lumerical Solutions. and can be obtained using the “getresult” command (these calculations will only be carried out when they are visualized). allowing one to package raw data into meaningful results that can be easily parameterized and visualized. The icons associated with each result reflect the type of result: Matrix : this is a simple matrix result.1 Results View 143 The Results View 143 window shows all the results for the simulation object that is currently selected in the Object Tree. with no associated parameters Matrix dataset: this is a parameterized matrix results that contains at least an attribute (result). The name of the available results. or in dataset form (using getresult). The results for all the standard monitors in FDTD Solutions can be retrieved in the original raw. the results listed under “rawdata” can be obtained using the “getdata” command.5). The results listed under "results" are datasets. in the Results View figure above. FDTD Solutions 8. Inc . or to send the to the Script Workspace 144 for further post-processing.3. un-parameterized matrix form (using getdata. and the corresponding dimensions or are displayed. The raw data results are all un-parameterized. "sigmaext" is a result that we defined in the script. please see Accessing simulation data in the User Guide. The icons in the script workspace above shows that while "sigmaabs" and "sigmascat" are parameterized matrix datasets (since they were the results returned directly by the cross section analysis groups).3. use the "Send to script" option to copy the variable into the Script Workspace. please see Using analysis groups. Users can use the Visualizer 139 to visualize any variable listed in the Script Workspace by right-clicking on the variable and selecting "Visualize".6. and follow the instructions here 144 . simple matrix results.144 Reference Guide Rectilinear dataset: this is a parameterized matrix result that is associated with a rectilinear grid String For more detail on how to work with datasets in the scripting environment. To create parameterized matrix datasets from matrices. The variables' current values as well as the corresponding dimensions are shown in a list format. For example. Inc . simply right-clicking on sigmaext and selecting "Visualize" will generate the following plot in the Visualizer: © 2003 . Analysis group objects from the Object library have been updated to return datasets. and is therefore a simple un-parameterized matrix. 7.2012 Lumerical Solutions. For an example of how to define dataset results in an analysis group.2 Script Workspace and Script Favorites The Script Workspace shows all the variables in the current scripting environment. which will plot the variable as a function of the user specified parameter. Generated Command Generated Figure © 2003 . the visualization creator will generate the commands necessary for creating the parameterized dataset in the Script Favorites window. the extinction cross section is plotted as a function of the index value. Once this is defined. which will open the "Visualization Creator" dialog window: This window allows users to set the name of the parameterized variable (sigmaext_vs_f) and its parameters (f).2012 Lumerical Solutions. To associate it with the corresponding frequency array. Inc . it will send the new parameterized variable to the Visualizer. select the "Create visualization" option. When this command is ran.Running simulations and analysis 145 Here. users now have the additional option of automating the entire process through the GUI.146 Reference Guide In addition to the commands generated by the visualization creator. This is a powerful feature of Lumerical Solutions software and allows users to automate the process of finding desirable parameter values by running a large number of simulations. An example Optimization and Sweeps tab is shown in the screenshot below: © 2003 . 7.2012 Lumerical Solutions. While these scripting options will still be available in the current version. Prior to the current version.4 Optimization and parameter sweeps This section describes the way in which the optimization and parameter sweeping projects are set up. the majority of these procedures could only be carried out through the scripting environment. the Script Favorites window also allows users to define their own favorite commands by selecting "New command" and "Edit". Inc . Inc . Runs the selected sweep or optimization with the resources currently set in the resource manager.Running simulations and analysis At the top of the window is a toolbar containing the following buttons: Creates a parameter sweeping project. 147 The Animate function allows you to view the structures that will be simulated in a parameter sweep or optimization in the CAD before you run the project: © 2003 .2012 Lumerical Solutions. Opens an edit window for the selected project where one can modify its properties. Deletes the selected project. Creates an optimization project. GENERATION SIZE: The generation size (number of child per generation) for this © 2003 . Setup Tab There are three sections in the setup tab: OPTIMIZATION CONFIGURATION: This section contains the choice of algorithm as well as all the input parameters that are needed to set up an optimization project using a built-in algorithm: ALGORITHM: The optimization algorithm used for this project PARTICLE SWARM: The built-in particle swarm algorithm (see Particle Swarm Optimization 150 for more details on the algorithm).4. Inc .148 Reference Guide 7. For examples on how to set up and run an optimization project.1 Optimization An example Edit Optimization window is shown in the screen shot below: The optimization project allows users to use built-in algorithms as well as define their own optimization algorithms. TYPE: Choice of maximizing or minimizing the figure of merit MAXIMUM GENERATIONS: The maximum number of generations for this optimization project. As can be seen from the screenshot above. there is a SETUP tab as well as an ADVANCED tab. please see Optimize a design.2012 Lumerical Solutions. USER DEFINED: The user-defined algorithm specified in the ADVANCED TAB. FIGURE OF MERIT: This section contains the figure(s) of merit (FOM) used for this project. If set to 0. Once the FOMs have been defined. min/max values and units of the selected parameters can also be set in a similar fashion. which can be selected from the simulation model by double-clicking on the selected FOM field.Running simulations and analysis 149 optimization project.2012 Lumerical Solutions. The types. TOLERANCE: The convergence criteria for the optimization to terminate. One can ADD/ REMOVE FOMs via the respective buttons. The parameters can be chosen from the simulation model by double-clicking on the selected parameter field. the random generator is reset to the same initial condition. PARAMETERS: This section contains the optimization parameters and the range of values used for this project. Inc . the optimization will run until the maximum number of generations has been reached. Advanced Tab The ADVANCED tab is shown in the screen shot below: © 2003 . FOMs are typically defined as output variables of monitors or analysis groups. One can ADD/REMOVE parameters via the buttons on the right. Otherwise a new initial condition is chosen every time this optimization project is run. one can select the FOM to be used in this project by clicking SELECT TO OPTIMIZE (note that all other FOMs will be ignored in this optimization). RESET RANDOM GENERATOR: If this option is selected. If there are no syntax errors in the script. For an example that uses a user-defined optimization algorithm. Inc . This test is conducted every time the TEST button is pressed. g. and then move within the parameter search space. The algorithm then follows these steps 1. 3. the potential solutions. Spring force towards the global best position. and a window showing the Optimization Status is displayed.2]. Calculate the new velocities v for each particle based on the forces applied to the particle vt vt 1 c1 1 pt 1 xt xt 1 c2 xt 2 gt 1 xt 1 1 vt 1 (1) 4. ever achieved by that individual particle 2. The Advanced tab is divided into two sub-tabs: USER DEFINED ALGORITHM: This tab contains the scripts which define the customized optimization algorithm (by specifying the first and next generation scripts). and has widely been used for various kinds of design optimization problems [2] including nanophotonic design [3-7]. select the USER FIGURE OF MERIT SCRIPT checkbox.2012 Lumerical Solutions. you will see the line <script complete> in the script output. Evaluate figures of merit (FOM) and find p and g 3. Update the positions x of each particle based on the velocity 1 vt (2) 5. are initialized at random positions. To enable this window. inspired by the social behavior of flocks of birds or schools of fish [1. Repeat from step 2 until convergence is achieved © 2003 . The only variables that can be used in this script are the ones that are defined in the FOM section of the SETUP tab. In PSO. 7. The particles are subject to three forces as they move: 1. see User Guide. ever achieved by any particle. called particles. p. otherwise the location of the error will be given. Spring force towards the personal best position. A frictional force.2 Particle Swarm Optimization Particle Swarm Optimization (PSO) is a population based stochastic optimization technique. FIGURE OF MERIT SCRIPT: This tab contains the script which defines the custom FOM.4. and is only editable if the USER DEFINED option is selected in the SETUP tab. Set the number of particles N and initialize the positions x 2. The SCRIPT OUTPUT shows the output of a test which runs the user defined algorithm with an analytical function.150 Reference Guide This tab allows users to define their own optimization algorithm. proportional to the velocity. Robinson and Y. c 2 and ω that have shown to converge well in many test optimization problems for photonic design problems. Lett. Antennas and Propagat. 2010. Barnett. 52.407 (2004). A. C. 2010. 4." IEEE Trans. 35. c 1 and c 2 are the cognitive and social factors. J. 2010. Prather. 2. 19S1-14." Opt. W. Opt. G. Vrahatis. Honsberg and D. Kawano. G. C. Lumerical's PSO implementation uses default values of c 1. Particle swarm optimization and intelligence : advances and applications. Proc. "Leaky-mode resonant reflectors with extreme bandwidths. Creazzo. S. 1121. 775028 (2010).and E. M. Pond and M. Lett. Magnusson.1117/12. Yokohama. M. 151 respectively. Shokooh-Saremi. Johnson. "Design Optimization of Photonic Crystal Organic Solar Cells using the FDTD method in Combination with Particle Swarm Optimization.Shokooh-Saremi and R. T. K. 6. [1] or [2]. DOI:10. “Virtual prototyping and optimization of novel solar cell designs”. Information Science Reference. Japan. Kawano and J. SPIE 7750. Inc . M. pp. Parsopoulo and M N. 5238. 1.2012 Lumerical Solutions.Running simulations and analysis In Eq.873114 3. R. (1). “Guided-mode resonant wave plates. Magnusson." 7th International Conference on Optics-photonics Design & Fabrication.” Opt. 2472. E. 35. 2010. Rahmat-Samii. and η 1 and η 2 are random number between 0 and 1. "Thin film silicon solar cell design based on photonic crystal and diffractive grating structures". Shi.397 . t is the iteration counter. A detailed description of the algorithm and the difference coefficients can be found in Refs. Mutitu. © 2003 . J. Express 16. J. Pond. "Particle swarm optimization in Electromagnetics. Chen. ω is called the inertial weight. 2008 5. Inc . min/max values and units of the selected parameters can be set in a similar fashion. please see Run a parameter sweep.4. One can ADD/REMOVE parameters via the respective button on the right. The parameters can be chosen from the simulation model by doubleclicking on the selected parameter field. the table above is shown.152 Reference Guide 7. There are two sections in the Edit Parameter Sweep window: PARAMETERS: This section contains all the input parameters that are needed to set up a parameter sweep project. and the types. There are two ways to specify the inputs to the parameter sweep. If VALUES is selected.3 Parameter Sweeps An example Edit Parameter Sweep window is shown in the screen shot below: For examples on how to set up and run a parameter sweep project. If RANGES is selected.2012 Lumerical Solutions. the following table is shown: © 2003 . 4. NOTE: If two or more parameters are specified. they must have the same dimensions. 7. To add. this is not the same as nested parameter sweeps). except here every value of the parameter is shown explicitly and can be edited one-by-one.2012 Lumerical Solutions.4 Nested Sweeps It is also possible to use nested parameter sweeping. simply right click on the current optimization or sweep and select "Insert parameter sweep". Each sweep step will update all parameters values one column at a time (ie. RESULTS: This section contains all the outputs from the parameter sweep. Inc . please see Nested Sweeps 153 . Examples can be found in the User Guide as well as in the application examples. Pressing the SET IN MODEL button automatically sets the parameters in the simulation model to have the same value as the selected one. © 2003 . For information on how to set up nested parameter sweeps.Running simulations and analysis 153 The behaviour is similar to the description for the RANGES option above. Inc .2012 Lumerical Solutions.154 Reference Guide © 2003 . Scripting Language 155 8 Scripting Language Lumerical provides a powerful scripting language to manipulate simulation objects. and scripts when these are called. Inc . be run from a saved script file. The script functions have been organized into the following sections. or entered into a group object. launch simulations and analyze results. Section System 156 Manipulating variables 182 Operators 192 Functions 205 Loop and conditional statements 251 Plotting commands 252 Adding Objects 261 Manipulating objects 282 Running simulations 316 Measurement and optimization data 347 FDTD Measurements and Normalization 320 Near to far field projections 358 Grating projections 376 Material database functions 385 User defined GUIs 392 © 2003 .2012 Lumerical Solutions. This section of the Reference Guide contains the syntax for all the script commands. some examples showing how to export to other file formats and tips for plotting in MATLAB. Script commands can be entered directly into a script prompt. There is also a Scripting section in the User Guide in the online help which contains an introduction to the scripting language. Group objects run setup scripts every time they are edited. Check if a file exists.2012 Lumerical Solutions. 8. Returns the current working directory. Run command prompts. Get the file directory from a string. etc. Loads an fsp file or lms file. Get the file base name from a string. Creates a new 3D FDTD layout environment. Deletes a file.156 Reference Guide Creating your own script commands 398 The online help version of the Scripting Language section includes examples for many of the script functions. Changes the working directory. Move a file Exit the application. running script files. Get the current filename. Saves an fsp file or lms file. Inc . Get the file extension from a string. System commands Command new2d 159 new3d 159 newmode 160 save 161 load 161 del 162 rm 162 ls 163 dir 162 cd 163 pwd 164 cp 164 mv 165 exit 165 system 166 fileexists 166 currentfilename 167 filebasename 167 filedirectory 168 fileextension 168 List of script commands Description Creates a new 2D FDTD layout environment.1 System System commands for interacting with the OS file system. © 2003 . Copy a file. Creates a new MODE layout environment. Lists the files in a directory. © 2003 . Saves d-card data to an ldf file. Read text files. Will stop a script file from executing at that line. Add a directory to the path. Description Returns a list of available script commands 157 To interrupt a script file from running or a long block of commands from executing File input and output Command format 173 STD OUT write 175 LDF files loaddata 173 savedata 174 savedcard 174 Text files readdata 175 write 175 fld (field) files asapexport 176 asapload 176 Export monitor data to fld file.2012 Lumerical Solutions. Inc . Load data from fld file.Scripting Language Command getcommands 169 Starting and stopping scripts Command running a script 169 getpath 170 addpath 170 which 171 pause 171 break 172 ESCAPE key 172 Description Type the script name to run it. Where in the path is a file. Get the current path. Writes strings to text files or to standard output. Load variables or d-card data from ldf file. Save variables to ldf file. Pauses program for a time. Description Set the precision of the script interpreter. Writes strings to text files or to standard output. 1. See Also System level 156 .1 newproject Create a new simulation project file. save 161 MATLAB functions Command matlabsave 179 matlab 179 matlabget 181 matlabput 181 Description Save workspace data to a Matlab . Inc . load 161 . newproject(option).158 Reference Guide asapimport 177 Debugging Command debug 182 See Also exportfigure 260 . Description Creates a new 2D layout environment. Execute a MATLAB command Get a variable from the MATLAB workspace Send a variable to the MATLAB workspace Description Opens the debug utility window.2012 Lumerical Solutions. Syntax newproject.mat file. The options are 1: use default file and material database as template 2: use current file and material database as template 3: open a file browser to select and existing file as a template The default option is 1. new3d 159 Available in © 2003 . Import data from fld file to Import source. This function does not return any data. 8. No No No 8. See Also System level 156 . This function does not return any data. new3d 159 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Deprecated in Version 8. new3d(option). Syntax new2d. Use newproject. Inc . new2d(option). Description Creates a new 2D layout environment.1.Scripting Language FDTD Solutions MODE Solutions INTERCONNECT DEVICE Version 8+ Version 6+ Yes Yes 159 8.2 new2d Creates a new 2D FDTD Solutions layout environment. The options are 1: use default fsp file and material database as template 2: use current fsp file and material database as template © 2003 . 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. Description Creates a new 3D layout environment. This function does not return any data.1.3 new3d Creates a new 3D FDTD layout environment.2012 Lumerical Solutions. Syntax new3d. Use newproject. newmode(option). See Also System level 156 . Use newproject.160 Reference Guide 3: open a file browser to select and existing fsp file as a template The default option is 1. No No © 2003 .4 newmode Creates a new MODE layout environment. No No No 8. Description Creates a new layout environment. See Also System level 156 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE No Deprecated in Version 6. Syntax newmode.1. This function does not return any data. new2d 159 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Deprecated in Version 8. Inc . The options are 1: use default lms file and material database as template 2: use current lms file and material database as template 3: open a file browser to select and existing lms file as a template The default option is 1.2012 Lumerical Solutions. savedcard 174 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes © 2003 . This function does not return any data. Inc .2012 Lumerical Solutions. save(filename). load 161 .5 save Saves an simulation project file.1.Scripting Language 161 8. loaddata 173 . save 161 . loaddata 173 . This function does not return any data. savedcard 174 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 8. See Also System level 156 .6 load Loads an simulation project file. Syntax save. savedata 174 .1. If the simulation has been run. Description Open a file browser to save the file. Save with the specified name See Also System level 156 . Syntax load(filename). savedata 174 . the file will also contain the simulation results. Description Loads the simulation file. If the simulation has been run. the file will also contain the simulation results. delete 285 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes Description Deletes the file "filename".1.8 rm Delete a file. 8. delete 285 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes Description Deletes the file "filename". Description The output is a string. Syntax del("filename"). See Also System level 156 . 8. rm("filename"). rm("filename").7 del Delete a file.9 dir List files in a directory. See Also System level 156 . This function does not return any data.162 Reference Guide 8. Syntax out = dir.2012 Lumerical Solutions. This function does not return any data.1. Inc .1. © 2003 . Syntax del("filename"). Lists the files in the specified directory. See Also System level 156 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes Description The output is a string. 8. Lists the files in the specified directory.1. Use ?dir. Description Opens a window to browse to a directory.2012 Lumerical Solutions. Inc . out = dir("directory").10 ls List files in a directory. Syntax cd. out = ls.Scripting Language out = ls.1. out = dir("directory"). This function does not return any data. to write the value to the screen. to write the value to the screen. out = ls("directory"). 163 8. See Also System level 156 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes Use ?dir. © 2003 . Syntax out = dir.11 cd Change directory. out = ls("directory"). 12 pwd Returns the current working directory. See Also System level 156 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 8. currentfilename 167 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 8."path2 \file2"). Copies file1 in path1 to file2 in path2. Description Returns the current working directory as a string. Changes the working directory to "directory". © 2003 . cp("path1\file1". it will set the working directory to the directory of the file opened.164 Reference Guide cd("directory"). See Also System level 156 . Syntax cp("file1". Inc . This function does not return any data.13 cp Copy a file. See Also Description Makes a copy of file1 called file2."file2"). Whenever you open an fsp file or run a script file. Syntax out = pwd.2012 Lumerical Solutions.1.1. Syntax exit."file2"). See Also System level 156 ."path2 \file2"). Same as exit(1). The default option is 1. pwd 164 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 8. This function does not return any data.1.15 exit Exit the application. Syntax mv("file1". copy (objects) 290 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 165 8. The option can be 1: Prompt user if a file needs saving before exiting. Exits the application. exit(option).1. Description Exits the application. cp 164 . 2: Force the application to exit without prompting the user. mv 165 . Inc .14 mv Move a file. This function does not return any data. © 2003 . cp("path1\file1". Description Moves file1 to file2.Scripting Language System level 156 . pwd 164 . Moves file1 in path1 to file2 in path2.2012 Lumerical Solutions. rather than the Lumerical script interpreter. The system command does not return any data.166 Reference Guide See Also System level 156 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 8. Search for a file not in the path See Also System level 156 .17 fileexists Check if a file exists. By default. getpath 170 . Syntax system("command"). Description Returns 1 if the file exists Returns 0 if the file does not exist. See Also System level 156 . the entire path will be searched. Syntax out = fileexists("filename"). out = fileexists("c:\temp\file. readdata 175 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes Description Run "command" at the OS command prompt. which 171 . The file extension must be specified. 8. txt"). pwd 164 © 2003 .1. Inc .2012 Lumerical Solutions.1.16 system The system command allows you to have the operating system (OS) execute a command. See Also System level 156 . Syntax out = filebasename ( "location/filename.1. filedirectory 168 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 8. getpath 170 . Inc .1. fileexists 166 .19 filebasename Get the file basename from a string. which 171 . filebasename 167 . getpath 170 .18 currentfilename Get the current filename and directory. pwd 164 Available in © 2003 . Description Returns the current filename as a string. fileextension 168 . Syntax out = currentfilename. See Also System level 156 . this function returns an empty string "". which 171 . currentfilename 167 . If the current filename is not defined. Description Returns the file basename as a string.Scripting Language 167 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 8.2012 Lumerical Solutions. pwd 164 .ext" ). currentfilename 167 . which 171 .20 fileextension Get the file extension from a string.2012 Lumerical Solutions. See Also System level 156 . getpath 170 .168 Reference Guide FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 8. Description Returns the file extension as a string. getpath 170 . ext").1. currentfilename 167 .21 filedirectory Get the file directory from a string. Description Returns the file directory as a string. Syntax out = filedirectory( "location/ filename.1. Inc . pwd 164 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes © 2003 . which 171 .ext" ). pwd 164 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 8. Syntax out = fileextension( "name. See Also System level 156 . but it can cause confusion when done unintentionally. plot) for the names of your script files. getpath 170 .22 getcommands Returns the list of available script commands in the current script workspace. See Also System level 156 .Scripting Language 169 8. A script file is not passed variables.lsf. The file must be in the current path. If a script file has the same name as a function. Syntax filename. See Also System level 156 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes Description Returns a list of available script commands 8. Inc .e. All scripts have access to all of the variables defined in the current workspace. which 171 Available in © 2003 . Syntax ?getcommands. and does not return variables.1. A script does not have a return type. This allows you to effectively re-define the behavior of a function. The path always searches the current directory first. addpath 170 .23 Run script Run a script by typing its name. the script will be run (not the function). Description Run the script file filename. It's best to avoid using the names of Lumerical script functions (i.1. if it exists in the current path.2012 Lumerical Solutions. 170 Reference Guide FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 8.1.24 getpath Get the current path. By default, the current working directory and the script sub-directory of the installation (eg. C:\Program Files\Lumerical\FDTD\scripts) are in the path. Syntax out = getpath; Description Returns the current path as a string. Use ?getpath; to print it to the screen. See Also System level 156 , addpath 170 , which 171 , pwd 164 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 8.1.25 addpath Add a directory to the path. Syntax addpath("directory"); Description Adds a directory to the path. This function does not return any data. See Also System level 156 , getpath 170 , which 171 , pwd 164 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes © 2003 - 2012 Lumerical Solutions, Inc Scripting Language 171 8.1.26 which Returns the full file pathname for the specified file. This function can be helpful when you have added several directories to the Lumerical path variable and you want to check which files are being accessed. Syntax out = which("filename"); Description Returns the pathname of the file "filename" as a string. Use ?which("filename"); to display the result to the screen. See Also System level 156 , getpath 170 , addpath 170 , pwd 164 , currentfilename 167 , fileexists 166 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 8.1.27 pause Pause program for a time. Hit the space bar to force the script to continue. Hit the ESCAPE key to break the script at this point. Syntax pause(time); Description Pauses script for time, measured in seconds. This function does not return any data. See Also System level 156 , break 172 , ESCAPE key 172 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes © 2003 - 2012 Lumerical Solutions, Inc 172 Reference Guide 8.1.28 break Stops a script from executing. Syntax break; Description Will stop a script file from executing at that line. A warning will be generated. This function does not return any data. See Also System level 156 , ESCAPE key 172 , pause 171 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 8.1.29 Excape key Interrupts a script or long block of commands. Syntax ESCAPE key Description To interrupt a script file from running or a long block of commands from executing. A warning will be generated. Sometimes you may need to press escape several times, or hold it down to interrupt the script. See Also System level 156 , break 172 , pause 171 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes © 2003 - 2012 Lumerical Solutions, Inc Scripting Language 173 8.1.30 format The two format commands toggle the script interpreter between 2 output precision states. The commands print (?) and num2str() use this state to determine how many digits of precision to output. Syntax format long; format short; Description Set script interpreter to 16 digits of precision. Set script interpreter to 6 digits of precision. See Also System level 156 , num2str 229 , ? 204 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 8.1.31 loaddata Loads workspace variables or d-card data from a Lumerical data file (ldf) file. If any current variables exist with the same names as those in the file, the current values will be overwritten. Syntax loaddata("filename"); Description Reads data script variables or d-card data from the specified file. This function does not return any data. See Also System level 156 , savedata 174 , savedcard 174 , workspace 189 , load 161 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes © 2003 - 2012 Lumerical Solutions, Inc 174 Reference Guide 8.1.32 savedata Saves workspace variables to a Lumerical data file (ldf) file. To save monitor (D-card) data to an ldf file, see the savedcard function. Syntax savedata("filename"); savedata("filename", var1, var2,...); Description Saves all current variables to the specified file. This function does not return any data. Saves only variables with the specified names to file. See Also System level 156 , savedcard 174 , loaddata 173 , workspace 189 , matlabsave 179 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 8.1.33 savedcard Saves d-card data to a Lumerical data file (ldf) file. D-cards are generally used to store monitor data. Data is saved in the no norm state. See the units and normalization section of the reference guide for more information. Syntax savedcard("filename"); Description Saves all current d-cards (local and global) to the specified ldf file. This function does not return any data. Saves only the d-cards with the specified names, "name1", "name2", etc. savedcard("filename", "name1", "name2",...); See Also System level 156 , savedata 174 , loaddata 173 , matlabsave 179 Available in © 2003 - 2012 Lumerical Solutions, Inc Scripting Language FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 175 8.1.34 readdata You can import numerical values stored in text files with the readdata command. This command will read a file with data in a row/column format. The data must be correctly formatted so each row has the same number of columns. Readdata will ignore any line that begins with a letter. Syntax M=readdata("filename.txt"); Description Will load the text file filename into matrix variable M. Any lines starting with a letter are ignored. See Also System level 156 , rm 162 , write 175 , str2num 230 , findstring 232 , replace 232 , replacestring 233 , substring 231 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 8.1.35 write Writes string variables to text files or to standard output. Typically the write command is used to output data to a text file. If the specified file does not exist, it will be created. If it does exist, then the output string will be appended to the end of the file. The write command will automatically add a new line character at the end of the string. On Linux systems only, the write command will output to the standard output (stdout) if a filename is not specified. Syntax write(my_string); write("testfile.txt", Description Write my_string to the standard output (linux only). Will write the contents of the string variable my_string to © 2003 - 2012 Lumerical Solutions, Inc 176 Reference Guide my_string); testfile.txt. This function does not return any data. See Also System level 156 , readdata 175 , rm 162 , num2str 229 , ? 204 , endl 204 , format 173 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 8.1.36 asapexport Exports the desired monitor to a file for interfacing with BRO's ASAP. These files are called fld files. The monitor must be a frequency power or a frequency profile monitor. Syntax Description asapexport( "monitorname"); Export data from monitorname. By default, the first frequency point is exported. This function does not return any data. asapexport( "monitorname", f); asapexport( "monitorname", f, "filename"); Exports the frequency point specified by the index f. Exports to the specified "filename" without opening a file browser window. See Also System level 156 , asapload 176 , asapimport 177 , addimportedsource 275 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes No No 8.1.37 asapload Load data from an fld file from BRO's ASAP. asapload creates a d-card structure called "fld_data" which contains all the data in the file. If "fld_data" exists, it will be called "fld_data_2". After loading an asapfile with asapload, you can extract any desired data., which can be © 2003 - 2012 Lumerical Solutions, Inc Scripting Language Ex, Ey, Ez, Hx, Hy, Hz, x, y, z power, frequency, wavelength, index Syntax asapload; asapload( "filename"); Description Select the file to load with the file browser. This function does not return any data. Loads data from an fld file called "filename" without a file browser. 177 See Also System level 156 , asapexport 176 , asapimport 177 , addimportedsource 275 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes No No 8.1.38 asapimport Import an ASAP fld file into an ASAP source. This is equivalent to editing the properties of the Import source, and clicking on the Import Source button. Syntax asapimport( "sourcename"); Description Imports the fld file into the sourcename source. A file browser will open to select the file. This function does not return any data. Specify the file to open. asapimport( "sourcename", "filename"); See Also System level 156 , asapexport 176 , asapload 176 , addimportedsource 275 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes No No No © 2003 - 2012 Lumerical Solutions, Inc Description Imports the specified layer from the specified cell in the specified file into the current simulation environment. See the Reference Guide . "cellname". "material". If only string elements matching a certain data type are desired. but the material of the imported object will be set to the value specified. the minimum z value for extruding 2D GDSII data into material z min number © 2003 . string a valid name of a material in your current layout environment. "material"). Parameter filename Type string cellname layer string number or the layer number from the GDSII file to import. zmin. the 2D geometric data will be extruded to default values in the Z dimension. This form of the command is only allowed in 3D layouts. This is equivalent to performing a GDSII import through the FILE->IMPORT menu.Layout editor chapter for more information. "Al (3" would match "Al (300nm)".39 gdsimport Import a layer from a GDSII file into the layout environment. The optional returned value. Same as the above command. In 3D. n. zmax). is the number of objects that were imported from the gds file. Partial names of materials can be matched starting at the beginning of the string.1. Inc . or path relative to current working directory the name of the cell to import from the GDSII file n = gdsimport("filename".2012 Lumerical Solutions. May contain complete path to file. "cellname". but the structures will be extruded in the Z dimension to the specified z min and z max values Description name of GDSII file to import. The behavior is the same as the above command. For example. The objects created will have their material set to an object defined dielectric. layer. this can be specified by using a string of the form: "6:2" where the desired layer is 6 and the desired data type is 2. layer). "cellname". Syntax n = gdsimport("filename".178 Reference Guide 8. n = gdsimport("filename". layer. Syntax matlabsave("filename").mat file. it will also save the source and monitor data.mat data files. var1. setnamed 292 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes No Yes 8. This gives access to extended mathematical and visualization functionality from the Lumerical script environment... matlabput 181 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 8.Scripting Language 3D objects z max number the maximum z value for extruding 2D GDSII data into 3D objects 179 See Also System level 156 .1. This function does not return any data. If the MATLAB script integration is not enabled.. varN). Saves only variables with the specified names to the .2012 Lumerical Solutions. matlabsave("filename". © 2003 . See Also System level 156 .41 matlab Runs a MATLAB command from the Lumerical script prompt. . Inc . Description Saves all current variables to the specified .40 matlabsave Save workspace data to Matlab .mat file.1. this function will return an error. If this command is run in analysis mode. Multi-line strings can be used in script files to contain a block of MATLAB commands. Description command: a string containing one or more valid MATLAB commands. When you have a long sequence of MATLAB commands. Once this connection is established. you can simply call the m-file by running a single command. See the Setup and Configuration section of the Installation Guide. Multi-line strings are not supported at the script command prompt. matlabput 181 Available in © 2003 . Syntax matlab("command"). matlab(" command_1 command_2 ").180 Reference Guide The first time a MATLAB function (matlab. matlabget or matlabput) is called. Setup instructions and system requirements for the MATLAB script integration feature can be found in the online Knowledge Base. MATLAB commands should be tested by typing them directly into the MATLAB prompt before they are called from a Lumerical script. At any time you may examine the MATLAB workspace or interact with the MATLAB environment by typing commands at the MATLAB script prompt. Then. and vice-versa. MATLAB commands can be run using the matlab function. you may find it more convenient to save them in a MATLAB m-file. See Also System level 156 . The output from the MATLAB commands will be printed at the Lumerical script prompt. a MATLAB session will be started and a connection will be established with the Lumerical scripting environment. Inc .2012 Lumerical Solutions. A MATLAB command cannot act on a variable defined in the Lumerical workspace. matlabget 181 . Variables must be passed between the workspaces using the matlabget and matlabput functions. It is important to understand that the MATLAB and the Lumerical script variable workspaces are completely separate and independent. One limitation of the matlab function is that no error reporting is provided to either the Lumerical script prompt or the MATLAB prompt. varN). If the variable does not exist in MATLAB.42 matlabget Copies a variable from the MATLAB workspace to the script variable workspace.varN). This function does not return any data.1.Scripting Language FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 181 8.. See Also System level 156 . the command will return an error. If the variable does not exist in the Lumerical workspace. Syntax Description matlabput(var1. var2. please see the matlab command description. The arguments to this command are one or more variable © 2003 .. and will overwrite any existing variable with the same name.2012 Lumerical Solutions. matlab 179 .. The resulting variable will have the same name as the MATLAB variable. the command will return an error. matlabput 181 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 8. The resulting variable in the MATLAB workspace will have the same name as in FDTD/ MODE Solutions..1. Syntax Description matlabget(var1.. var2. please see the matlab command description. Inc ..43 matlabput Copies a variable from the FDTD/MODE Solutions workspace to the MATLAB workspace. The arguments to this command are one or more variable names that refer to variables in the MATLAB workspace. and will overwrite any existing variable with the same name. For more information on how to set this up see the Matlab script integration page. Note: Matlab script integration must be enabled in order to use this command. For more information. For more information. 182 Reference Guide names that exist in the Lumerical variable workspace. Creates a matrix filled with zeros. matlabget 181 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 8.2 Manipulating variables The following commands are used to create and access variables.2012 Lumerical Solutions. Create matrix.44 debug Opens the debug utility window. 8. matlab 179 . This function does not return any data. Syntax debug. Inc . Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Version 8+ No No No Description Opens the debug utility window.1. Command = 183 : 183 [] 184 % 184 linspace 185 matrix 185 randmatrix 186 Description Assignment operator. See Also System level 156 . Array operator. Creates a matrix with all elements randomly set between 0 and 1 © 2003 . Create variable with space in the name Creates a linear spaced array. 183 Returns a string of all the currently defined scripting variables. How to assign and access matrix elements.2 : Array operator. Describes how operators and functions act on matrices. 8. Create a 3D meshgrid in y direction.Scripting Language meshgridx 186 meshgridy 187 meshgrid3dx 187 meshgrid3dy 188 meshgrid3dz 188 meshgrid4d 188 clear 189 workspace 189 Matrix elements 190 Matrix operations 191 Pre-defined constants 191 Create a 2D meshgrid in x direction.1 = Assignment operators. Syntax x = 2 : 10.2. Inc . Syntax x = 5+2i.2012 Lumerical Solutions. Create a 3D meshgrid in x direction. Description x will be an array of numbers that start at 2 and increase © 2003 . Create a 4D meshgrid in any direction Clears all stored script variables from memory. == 196 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 8. List of pre-defined constants.2. Create a 2D meshgrid in y direction. Description Assign a value to a variable. See Also Manipulating variables 182 . Create a 3D meshgrid in z direction. u2N. linspace 185 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 8.2012 Lumerical Solutions. See Also Manipulating variables 182 . In this example.. Inc .10.. Command x = [u11.5. 3].2. Elements in a row are separated with commas...4 % Used to create variables with spaced in the names. All elements will be >=2. x will be the array were the first element is 6.184 Reference Guide by 1 for each consecutive number.9.. and consecutive elements decrease by 1. x = 6 : -1.3. 4. Accessing and assigning matrix elements 190 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 8.u1N. Columns are separated with semicolons. uM1.5 : 2.. linspace 185 .3 [] Specify matrix element by element.2. Command Description © 2003 ... The last entry will be <= 10. See Also Manipulating variables 182 .. matrix 185 .5. the array will be [6. u21.. The entries can either be scalars or matrices of compatible dimension. x will equal 2...uMN] Description Create an N by M matrix..... k.2012 Lumerical Solutions.num). matrix.. Description x will be an array with num elements. Syntax x = linspace(min.. Syntax x = matrix(i. Description Initializes an i x j x k x .5 linspace Creates a linearly spaced array. Inc .. See Also Manipulating variables 182 .Scripting Language %variable with space% 185 To create a variable name that contains spaces. put a percentage sign before and after the variable name. : 183 .. See Also Manipulating variables 182 . See Also Manipulating variables 182 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 8. then x will be the average of min and max.max.j. All elements are set to zero. such as "variable with space". linspace 185 .6 matrix Initialize a matrix. If num is set to 1. [] 184 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 8... [] 184 © 2003 . linearly spaced between min and max.)..2.2. 7 randmatrix Initialize a matrix.j. rand 248 . meshgrid3dx 187 Available in © 2003 .. See Also Manipulating variables 182 . matrix 185 ...2.8 meshgridx Create a 2D meshgrid in the x direction Syntax out = meshgridx(x. Description Initializes an i x j x k x . All elements are random numbers between 0 and 1. Inc .k.y). The elements are all random numbers between 0 and 1.. Description If x and y are single column (or single row vectors). meshgridy 187 . the command X = meshgridx(x.2012 Lumerical Solutions. Syntax x = randmatrix(i. See Also Manipulating variables 182 .j)=x(i). matrix.y)... of dimension nX1 and mX1 respectively. image 258 .186 Reference Guide Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 8.2. Will create a 2D matrix of dimension nXm where X(i..). randreset 248 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 8. Description If x and y are single column (or single row vectors).2012 Lumerical Solutions.Scripting Language FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 187 8. meshgridx 186 . image 258 . the command Y = meshgridy(x. meshgrid3dx 187 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 8.y).9 meshgridy Create a 2D meshgrid in the y direction Syntax out = meshgridy(x. meshgrid3dz 188 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes © 2003 .2.y.z). Description The 3D version of meshgridx and meshgridy. meshgrid3dy 188 .10 meshgrid3dx Create a 3D meshgrid in the x direction Syntax out = meshgrid3dx(x. See Also Manipulating variables 182 .2. Inc . Will create a 2D matrix of dimension nXm where Y(i. See Also Manipulating variables 182 .j)=y (j). meshgridx 186 .y). of dimension nX1 and mX1 respectively. meshgridy 187 . 2012 Lumerical Solutions. meshgrid3dx 187 . x3.11 meshgrid3dy Create a 3D meshgrid in the y direction Syntax out = meshgrid3dy(x.188 Reference Guide 8. Description The 4D meshgrid function.x3.13 meshgrid4d Create a 4D meshgrid in any direction. x2.y.2.2. See Also Manipulating variables 182 .12 meshgrid3dz Create a 3D meshgrid in the z direction Syntax out = meshgrid3dz(x. dim specifies the dimension along which to create the grid x1. See Also Manipulating variables 182 . x1.x4 are the position vectors in each direction © 2003 . Description The 3D version of meshgridx and meshgridy.x2.z). Description The 3D version of meshgridx and meshgridy. meshgrid3dz 188 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 8.y. meshgridy 187 . x4). Syntax out = meshgrid4d(dim. meshgridy 187 .z). meshgrid3dx 187 . Inc . meshgridx 186 .2. meshgrid3dy 188 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 8. meshgridx 186 . pi. See Also Manipulating variables 182 . This function does not return any data. Syntax out = workspace. cleardcard 353 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 8. meshgridy 187 .15 workspace Returns a list of all the currently defined variables in the scripting workspace. Description Clears all workspace variables.2. The variables c.2012 Lumerical Solutions. to print this to the screen. See Also Manipulating variables 182 Available in © 2003 . This will not clear any simulation data stored in dcards. meshgrid3dz 188 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 8. eps0.Scripting Language 189 See Also Manipulating variables 182 . Syntax clear. meshgrid3dy 188 . Use ?workspace. mu0 will be reset to their default values. meshgridx 186 .2. Inc .14 clear Clears all stored workspace variables. Description Returns a string that lists all currently defined variables in the workspace. ) = B.w can either be scalars or matrices of compatible dimension. See Also Manipulating variables 182 Available in © 2003 .v. u. length(x) will equal length(z). The square brackets method of defining matrices is only available in FDTD solutions. In the assignment A(I.) must be the same same size as B.190 Reference Guide FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 8. x(7) = y(2).1:20). if B is not a scalar.. Set the 7th element of x to the 2nd element of y. the submatrix A(I. Multi-dimension matrices can be accessed with a single index. x = y(1:10. w] x = [u. Description Create a column vector. Command x = [u. Set all the values in a sub-matrix of x to 1. x is equal to a sub-matrix of y. x=y(z).. Set the 7th element of x to 5.. x(4)=7. Set a sub-matrix of x to values 1:4. Create a row vector. Set an element of a multidimensional matrix to 3.1.1) = 1:4.. w] x(7) = 5. Inc . x = matrix(2.2.. u.2012 Lumerical Solutions.3).16 Accessing and assigning matrix elements Accessing and assigning matrix elements. v. x(2:5.8) = 3. v..w can either be scalars or matrices of compatible dimension.1) = 1. then all the values of the sub-matrix are set to B. Indices stored in matrix (z) used to select elements of matrix y. x(3. If B is a scalar.2.v. x(2:5. Dimension of x 1x1 1x1 10x10 10x10 10x10 Dimension of y N/A 1x1 1x1 10x10 11x11 Operation z = sin(x) z=x*y z=x*y z=x*y z=x*y Dimension of z 1x1 1x1 10x10 10x10 Error Value of z z 11 = sin(x 11) z 11 = x 11 * y 11 Zij = x ij * y 11 Zij = x ij * y ij Error See Also Manipulating variables 182 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 8.2. © 2003 . The speed of light in a vacuum in m/s. The permeability of free space in SI units. The following table provides some examples. Inc . Single numbers are treated as matrices of dimension 1x1.2012 Lumerical Solutions. The Planck constant.18 Pre-defined constants Name pi c eps0 mu0 h Description The number . The permittivity of free space in SI units.Scripting Language FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 191 8.2.17 Matrix operators Almost all the scripting functions will act element by element on matrices. In expression A^B. Inc . Almost equal comparison operator. Ex: y = x * z. Logical FALSE (0).195 ^ 196 Description Multiplication. Ex: y = x + z. Subtraction.195 . Logical and relational operators Command == 196 almostequal 196 != 197 <= 198 Description Comparison. © 2003 . the phase of A is evaluated from . Algebraic operators Command * 194 / 194 + 195 . Less than or equal to.192 Reference Guide hbar true false e See Also Manipulating variables 182 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes The reduced Planck constant. Power. Negative.to . if B is complex. Ex: y = x – z. Ex: y = x^3. Not equal. Division. The electron volt. Ex: y = x / z. 8. Addition. Ex: y = -x.2012 Lumerical Solutions. Logical TRUE (1).3 Operators Standard mathematical and string operators. AND. AND. Comment script files with # Greater than or equal to. 193 Description Retrieve the parameters and attributes of datasets. NOT. Add strings end of line character. 8. Less than. OR.Scripting Language >= 198 < 198 > 199 & 199 and 200 | 200 or 201 ! 201 ~ 202 Dataset operators Command .2012 Lumerical Solutions. Description Retrieves the parameter or attribute "result" from the © 2003 . Syntax result = A. The dot operator can be used to retrieve the parameters and attributes of datasets. Inc . NOT. Greater than. Description Create a string variable.1 . Create a string variable.3. OR. 193 String operators Command " 202 ' 203 + 195 endl 204 Output to screen Command ? 204 # script file comments 205 Description Display output on screen.result. 195 .2012 Lumerical Solutions. ^ 196 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 8. .3. Syntax y = x / z. getattribute 357 . Description Multiply x and z.195 . Inc . . Description Divide x by z. See Also matrixdataset 355 . + 195 . getparameter 357 .3 / Division. * 194 .3. ^ 196 Available in © 2003 . / 194 . visualize 259 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Version 8+ No No No 8. + 195 . / 194 . rectilineardataset 354 .2 * Multiplication.194 Reference Guide existing dataset A. * 194 . See Also Operators 192 . See Also Operators 192 . The result is a scalar matrix. Syntax y = x * z. Syntax y = x + z.z.Scripting Language FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 195 8. Concatenate strings together. * 194 .195 . y = -x.195 . + 195 . . * 194 . ^ 196 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 8.2012 Lumerical Solutions.4 + Addition. Description Subtract z from x. Negative See Also Operators 192 . + 195 .3. See Also Operators 192 . / 194 . or negative. Inc . . Description Add x and z. Syntax y = x .5 Subtraction. ^ 196 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes © 2003 .3. y = string1 + string2. / 194 . < 198 . and 200 .7 == Logical comparison.3. Syntax out = y == x. * 194 . Syntax y = x^3. ! 201 .195 . This operators can be used with complex numbers and strings. When using floating point numbers (rather than integers). or 201 . if B is complex.2012 Lumerical Solutions. See Also Operators 192 . Description Returns 1 if x and y are equal. two values that are meant to be equal may not be exactly equal due to rounding errors that are always present in floating point calculations.3. In expression A^B.6 ^ Power.8 almostequal Almost equal comparison operator. Description x cubed. Inc . In such cases. != 197 . the almost equal function can be useful.3. <= 198 . ~ 202 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 8. = 183 . & 199 . almostequal 196 . / 194 . > 199 .to . ^ 196 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 8. . the phase of A is evaluated from . | 200 . Returns 0 otherwise. Syntax Description © 2003 . + 195 . >= 198 .196 Reference Guide 8. See Also Operators 192 . B). Description If a is not equal to b. != 197 . | 200 . <= 198 . and 200 . See Also Operators 192 . See Also Operators 192 .B is less than or equal to A + B /2*1e15. ! 201 . >= 198 .2012 Lumerical Solutions. Otherwise out equals 0. This operator can be used in matrix operations. Returns 0 otherwise.9 != Not equal to comparison operator. relative diff. B. 197 Returns 1 if A . > 199 .B is less than or equal to A + B /2 times relative diff or if A . ! 201 .Scripting Language out = almostequal(A. relative diff). ~ 202 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 8. and 200 . Returns 1 if values are not equal.3. Returns 1 if A . or 201 .B is less than or equal to A + B /2 times relative diff. > 199 . Returns 1 if A . | 200 .B is less than or equal to absolute diff. Returns 0 otherwise. <= 198 . then out equals 1. Inc . B. & 199 . Returns 0 otherwise. >= 198 . Returns 0 if values are equal. absolute diff). almostequal 196 . < 198 . == 196 . Syntax out = a!=b. out = almostequal(A. or 201 . ~ 202 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes © 2003 . out = almostequal(A. == 196 . < 198 . = 183 . & 199 . This operators can be used with complex numbers. == 196 . Description Greater than or equal to.2012 Lumerical Solutions. ~ 202 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 8. See Also Operators 192 . Syntax Description © 2003 . Imaginary components of x and y are ignored. or 201 . & 199 .10 <= Logical less than or equal to. & 199 . >= 198 . <= 198 . Imaginary components of x and y are ignored. Syntax out = y <= x. See Also Operators 192 . != 197 . almostequal 196 .11 >= Logical greater than or equal to. ! 201 . Description Less than or equal to. | 200 . and 200 .3. ~ 202 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 8. Syntax out = y >= x. != 197 . Imaginary components of x and y are ignored. ! 201 . or 201 . > 199 . | 200 .3.3.12 < Logical less than. == 196 . and 200 . Inc .198 Reference Guide 8. < 198 . almostequal 196 . < 198 . > 199 . != 197 .Scripting Language out = y < x. != 197 . or 201 . Same as &.3. ! 201 . & 199 .y are zero.3. == 196 . ~ © 2003 . Inc . ! 201 . <= 198 . | 200 . >= 198 . < 198 . Otherwise return 1. Syntax out = y & x.14 & Logical AND. and 200 . Syntax out = y > x. < 198 .2012 Lumerical Solutions. & 199 . Imaginary components of x and y are ignored. Less than. y and x. and 200 . & 199 . See Also Operators 192 . > 199 . or 201 . 199 See Also Operators 192 . ~ 202 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 8. == 196 . ! 201 . almostequal 196 . almostequal 196 . >= 198 . >= 198 . ~ 202 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 8. <= 198 . and 200 . then return 0. See Also Operators 192 . Description Greater than. or 201 . | 200 . > 199 . Description If the real part of either or both of x. Imaginary components of x and y are ignored. <= 198 .13 > Logical greater than. | 200 . == 196 . != 197 . y or x. != 197 . Otherwise return 1. Syntax out = y & x. Imaginary components of x and y are ignored. Description If the real part of either or both of x.16 | Logical OR. or 201 . See Also Operators 192 . != 197 . >= 198 .15 and Logical AND. > 199 . See Also Operators 192 .3. and 200 . ! 201 .2012 Lumerical Solutions. and 200 . | 200 . Description If the real part of either or both of x. & 199 . Syntax out = y | x. > 199 . < 198 . Imaginary components of x and y are ignored. Same as |. == 196 . >= 198 .y is non-zero. < 198 . | 200 . & 199 . y and x. ! 201 . <= 198 .200 Reference Guide 202 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 8. or 201 . Same as &. ~ 202 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 8. == 196 . then return 1. ~ 202 © 2003 . Inc .y are zero. Otherwise return 0. <= 198 . then return 0.3. == 196 . Syntax out = y | x. <= 198 . or 201 . > 199 . NOT returns 0. NOT(A) is equivalent to A==0.y is non-zero. != 197 .3. and 200 .17 or Logical OR. then NOT returns 1.18 ! Logical NOT operator. & 199 . ~ 202 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 8. <= 198 . ! 201 . Same as |. ! 201 . See Also Operators 192 . != 197 . & 199 .Scripting Language Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 201 8. where == is the comparison operator. Otherwise return 0. Inc . Description applies logical not operator to a applies logical not operator to a See Also Operators 192 . >= 198 . If a value is 0. | 200 . or 201 . == 196 .2012 Lumerical Solutions. out = ~a. ~ 202 Available in © 2003 . y or x. < 198 . >= 198 . > 199 . Imaginary components of x and y are ignored. Syntax out = !a.3. < 198 . Description If the real part of either or both of x. | 200 . For all other values. and 200 . then return 1. If a value is 0. ~ 202 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 8. <= 198 . ! 201 . For all other values.202 Reference Guide FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 8. NOT returns 0. then NOT returns 1. \\). Inc . NOT(A) is equivalent to A==0. & 199 . \ also results in a literal backslash. | 200 .3.20 " String operator. < 198 . This note is important when storing paths in strings. IF it it will not be interpreted as part of an escape sequence (\n.2012 Lumerical Solutions. \". Syntax out = !a. The following escape sequences are recognized when creating strings with double quotes: \" double quotes in string \n newline (linefeed) character in string \\ backslash in string Syntax out="my string". > 199 . Description applies logical not operator to a applies logical not operator to a See Also Operators 192 . Strings can be created with single or double quotes. and 200 . != 197 . == 196 . However. out = ~a. © 2003 .19 ~ Logical NOT operator.3. or 201 . Description use double quotes to create strings NOTE: Literal back slashes and double quotes It is always possible to create a literal backslash in a string with \\. where == is the comparison operator. >= 198 . mystring = "C:\Program Files\Lumerical\". where we use a single backslash. + 195 . The only difference is the additional backslash at the end of the string. rather than as a single backslash and a closing double quote. endl 204 . Inc . ' 203 .2012 Lumerical Solutions. 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 © 2003 . suppose we want to create the string C:\Program Files\Lumerical\.21 ' String operator. # use double quotes mystring = "C:\\Program Files\\Lumerical". When interpreted this way. eval 230 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 8. write 175 .3. See Also Operators 192 . num2str 229 .Scripting Language 203 Suppose we want to create the string C:\Program Files\Lumerical. # use double quotes and \\ escape character However. The following three commands are valid and equivalent: mystring = 'C:\Program Files\Lumerical'. The following two commands are valid and equivalent: mystring = 'C:\Program Files\Lumerical\'. is not valid syntax and will result in an error. # use double quotes The problem is that the script interpreter will interpret the final \" as an escape character for a literal double quote. # use single quotes mystring = "C:\\Program Files\\Lumerical\\". # use single quotes mystring = "C:\Program Files\Lumerical". the command results in a syntax error because there is no double quote character closing the string. # use double quotes and \\ escape character The other potential command. 204 Reference Guide Syntax out='my string'. See Also Operators 192 .3. format 173 . endl 204 . eval 230 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 8. Description Add an end of line character to the string. Description Displays the output of the command on the screen This function does not return any data. num2str 229 . + 195 . num2str 229 . Inc . write 175 . Description use single quotes to create strings See Also Operators 192 .22 endl Add an end of line character to a string Syntax out = "line1"+endl+"line2". Use the format script command to change the precision of the output. " 202 .23 ? Print output to the screen. Syntax ?command. See Also System level 156 .2012 Lumerical Solutions. write 175 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 8.3. # 205 © 2003 . " 202 . write 175 . + 195 . Inverse trigonometric cos function. Trigonometric and complex Command sin 209 cos 209 tan 210 asin 210 acos 211 atan 211 atan2 212 Description Trigonometric sin function. # set x to 1 See Also System level 156 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes Description Anything after the # character is ignored. Same as atan. Trigonometric tan function. © 2003 .24 comments Use the # character to comment script files.Scripting Language Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 205 8. Inverse trigonometric tan function. Anything after the # character is ignored. but returns angle in correct quadrant. Trigonometric cos function. Inc . Inverse trigonometric sin function.2012 Lumerical Solutions. Comments can not be used when typing commands directly into the script prompt. The comments are not displayed when the script file is run.4 Functions Standard mathematical and matrix functions.3. Syntax x=1. 8. ignore singleton dimensions. The min value in a matrix. Description The natural logarithm.206 Reference Guide real 212 imag 212 conj 213 abs 213 angle 214 unwrap 214 Returns the real part of variable Returns the imaginary part of variable Complex conjugate Absolute value Phase of a complex number.2012 Lumerical Solutions. exponential and power Command log 215 log10 215 sqrt 215 exp 216 Matrix functions Command size 216 length 217 pinch 217 sum 218 max 218 min 219 dot 219 cross 220 flip 222 interp 224 spline 225 integrate 225 integrate2 226 Description Returns the dimensions of a matrix. Cubic spline interpolation. Input can be complex or negative. Remove singleton dimensions from a matrix. The log. The max value in a matrix. base 10. Returns the total number of elements in a matrix. Integrate a matrix. Integrate a matrix. The square root. The sum of a matrix. Input can be complex or negative. The cross product of two vectors. Flip a matrix in one dimension. © 2003 . Linear interpolation function. Inc . The dot product of two vectors. Removes phase difference of more than 2 Logarithmic. The exponential. Replaces a part of a string with another. Replaces all instances of a substring with another string. Returns a substring of a string. and do complex conjugate. Perform matrix multiplication of two or more matrices. Reshape the matrix to have different dimensions conserving the overall product of the dimensions. Run a Lumerical script file.2012 Lumerical Solutions. Transpose a matrix.Scripting Language find 227 findpeaks 228 transpose 228 ctranspose 229 mult 221 reshape 223 eig 220 permute 222 inv 223 See also Manipulating variables 182 String functions Command num2str 229 str2num 230 eval 230 feval 231 length 217 substring 231 findstring 232 replace 232 replacestring 233 Description Convert number to a string. Returns the total length of the string. Calculate the inverse of a matrix. 207 Frequency and time-domain © 2003 . Calculate the eigenvalues and/or eigenvectors of a matrix. as a specified position and length. Convert a string into a floating point number. Find peaks in a matrix. Transpose a matrix. Rearrange the dimensions of a matrix. Execute string containing Lumerical scripting language. at a specified position. Inc . Returns the position of a substring in a string. Find values that satisfy a condition in a matrix. Returns the intersection of line segments. Combines two polygons into one with an or operation. Chirped z-transform. Inc . Determines if line segments cross each other. Combines two polygons into one with a xor operation. Round down. Returns a uniformly distributed random number Description Returns the area of a polygon. Returns the center of mass of a polygon. © 2003 . Inverse fft. Returns the spatial wavevector kx. Determines if a series of points are inside our outside a polygon. Returns the angular frequency vector. Combines two polygons into one with an and operation. Rounds to the nearest integer.208 Reference Guide Command fft 233 fftw 235 fftk 236 invfft 237 czt 238 Line and polygon functions Command polyarea 239 centroid 240 polyintersect 240 inpoly 241 polygrow 241 polyand 242 polyor 242 polyxor 244 lineintersect 244 linecross 245 Miscellaneous Command ceil 246 floor 246 mod 246 round 247 rand 248 Description Round up. Grows or shrinks a polygon by a specified amount. Modulus after division. Determines if two polygons intersect.2012 Lumerical Solutions. Description Fast Fourier transform. Syntax out = sin(x). randreset 248 finite 249 solar 249 stackrt 250 Resets the random number seed. Syntax out = cos(x).and . Phase of a complex number is evaluated between . Phase of a complex number is evaluated between . Function is defined for complex angles. © 2003 . Angle units are in radians.4. Determines if a number is finite or NaN. Inc . See Also Functions 205 .2 cos Trigonometric cosine function.and .4.2012 Lumerical Solutions. Returns the solar power spectrum 209 Calculates reflection and transmission of multi-layer stacks 8. See Also Functions 205 .1 sin Trigonometric sine function. Angle units are in radians. asin 210 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes Description Returns the complex sine of x. acos 211 Available in Description Returns the complex cosine of x. Function is defined for complex angles.Scripting Language between 0 and 1. 8. 4. See Also Functions 205 . © 2003 . sin 209 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes Description Returns the complex arcsine of x. Function is defined for complex angles. the following equation is used: asin(x) = -i ln( ix + sqrt(1-x^2)) Syntax out = asin(x). atan 211 .and . Angle units are in radians. See Also Functions 205 . Syntax out = tan(x).2012 Lumerical Solutions. Phase of a complex number is evaluated between .4 asin Inverse trigonometric sine function. If x is complex.and . Function is defined for complex values. Description Returns the complex tangent of x.3 tan Trigonometric tangent function. or abs(x) > 1.4. Inc . Angle units are in radians. atan2 212 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 8. Phase of a complex number is evaluated between .210 Reference Guide FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 8. Phase of a complex number is evaluated between . Description Returns the complex arctangent of x.Scripting Language 211 8.4.and . tan 210 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes © 2003 . Phase of a complex number is evaluated between . the following equation is used: acos(x) = -i ln( x + i sqrt( 1-x^2)) Syntax out = acos(x). the following equation is used: atan(x) = 0.5 acos Inverse trigonometric cosine function.2012 Lumerical Solutions. cos 209 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes Description Returns the complex arccosine of x. See Also Functions 205 . Function is defined for complex values. or abs(x) > 1. See Also Functions 205 . or abs(x) > 1. Inc . Function is defined for complex values.5 i ln( (i+x)/(i-x) ) Syntax out = atan(x).4. 8. Angle units are in radians.6 atan Inverse trigonometric tangent function.and . If x is complex. Angle units are in radians. atan2 212 . If x is complex. 2012 Lumerical Solutions.8 real Returns the real part of a number or matrix. Syntax out = atan2(y. Angle units are in radians. imag 212 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes Description Returns the real part of x. atan 211 . Function is defined for real values only. but returns the angle in the correct quadrant. Inc . Syntax out = imag(x).212 Reference Guide 8.9 imag Returns the imaginary part of a number or matrix. tan 210 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes Description x. Description Returns the imaginary part of x.y must be real. See Also Functions 205 .4.4. calculates the arctangent of y/x. 8.x). See Also Functions 205 . 8.7 atan2 Inverse trigonometric tangent function.4. © 2003 . Syntax out = real(x). 10 conj Returns the complex conjugate of a number or matrix.4.2012 Lumerical Solutions. Syntax out = conj(x). real 212 . imag 212 Available in © 2003 . Description Returns the absolute value of x. See Also Functions 205 . See Also Functions 205 . imag 212 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 8. Syntax out = abs(x). conj 213 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 8.Scripting Language 213 See Also Functions 205 . real 212 . Inc . real 212 .11 abs Returns the absolute value of a number or matrix.4. Description Returns the complex conjugate of x. angle 214 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes © 2003 . Syntax out = angle(x). Inc . unwrap 214 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 8.13 unwrap Removes changes of more than 2 from a 1D array. See Also Functions 205 .2012 Lumerical Solutions. Description Return the values of x without discontinuities.214 Reference Guide FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 8. Description Returns the phase of x. See Also Functions 205 .12 angle Returns the angle or phase of a complex number or matrix in radians. imag 212 . real 212 . It can be useful after angle(x) to see phase without discontinuities. Syntax out = unwrap(x).4. real 212 .4. imag 212 . Input can be complex or negative. 8. Input can be complex or negative. ^ 196 Description The square root.15 log10 The log. See Also Functions 205 . See Also Functions 205 .Scripting Language 215 8. base 10. Syntax out = log10(x).2012 Lumerical Solutions.14 log The natural logarithm. Syntax out = sqrt(x). log10 215 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes Description The natural logarithm.4. Input can be complex or negative.4. © 2003 . log 215 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes Description The log. Input can be complex or negative. 8. Syntax out = log(x). Inc . base 10. See Also Functions 205 .16 sqrt The square root.4. 17 exp The exponential.2012 Lumerical Solutions. 8. See Also Functions 205 .4. flip 222 . ^ 196 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes Description The exponential.216 Reference Guide Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 8. Syntax out = exp(x). transpose 228 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes © 2003 .18 size Returns the size of a matrix. length 217 .4. log 215 . Description y is a matrix which shows the dimensions of x. See Also Functions 205 . Syntax y = size(x). Inc . k) = x(i. transpose 228 . Syntax out = pinch(x).j.20 pinch Removes all singleton dimensions from a matrix. findstring 232 .j. will return an NxKxP matrix where y(i.j.k) Removes a specified dimension but keeps a specific index for the dimension being removed.k) = x(i. if x is an n by m matrix.19 length Returns the number of elements in a matrix. will return a Mx1 matrix where y(i) = x(1.k) pinch(x.j.4. replacestring 233 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 8. then y=pinch(x).4). © 2003 . For example. substring 231 . if x is a matrix of dimension 1x1x1xM. For example. If x is an NxMxKxP matrix then y=pinch(x.I. it will return the length of the string.j). replace 232 .2. pinch(x. y = length( x ) = n * m.i). If x is an NxMxKxP matrix then y=pinch(x.1.2). size 216 . If the argument is a string. will return an NxKxP matrix where y(i. Description Removes all singleton dimensions.2012 Lumerical Solutions. Inc .4.4. flip 222 . Syntax y = length(x).i). Removes a specified dimension.Scripting Language 217 8.1. Description y the number of elements in a matrix.1. See Also Functions 205 . 4.21 sum Sum of elements in a matrix. For complex numbers. abs 213 Available in Description The maximum value in a matrix. Sum x over the specified dimension. out = sum(x. flip 222 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 8. over all dimensions. Syntax out = sum(x).4. 8. See Also Functions 205 . Inc . only the real part is considered. Syntax out = max(x).2).2012 Lumerical Solutions.218 Reference Guide See Also Functions 205 .22 max The maximum value in a matrix. find 227 . integrate 225 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes Description Sum of all the elements in a matrix. min 219 . © 2003 . size 216 . See Also Functions 205 . C i A(i ) B (i ) Syntax C = dot(A. * 194 . The dot product will be calculated with the following formula.Scripting Language FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 219 8.24 dot Dot product. 8. Inc .4. Matrix A. See Also Functions 205 . Syntax out = min(x). B must have the same number of elements.4. cross 220 . B). For complex numbers. only the real part is considered.23 min The minimum value in a matrix. length 217 . max 218 . abs 213 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes Description The minimum value in a matrix. size 216 Available in © 2003 .2012 Lumerical Solutions. Description Returns the dot product of A and B See Also Functions 205 . 3) B(i.1) B(i. size 216 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 8. Then the elements of C will be calculated with the standard cross product formulas.25 cross Vector cross product.3) A(i.220 Reference Guide FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 8. B must be the same size.2) C (i. length 217 . Syntax out = eig(A).1) B(i. The cross product will be computed on the first dimension that has a size of 3. out = eig(A. Inc .2) A(i.2) A(i. 1). where the second dimension contains the vector components.2012 Lumerical Solutions.3) Syntax A(i. See Also Functions 205 .2) B(i. Description Returns the eigenvalues of matrix A. C (i.1) Description Returns the cross product of A and B C = cross(A. There must be at least one dimension with a size of 3.1) C (i. B).B are 2D matrices.26 eig Find the eigen value and/or eigen vector of a matrix. The matrix has to be square. © 2003 . dot 219 .4.3) B(i.2) B(i. The size of the second dimension must be 3. Matrix A.1) A(i. * 194 .4. Assume that A.3) A(i. = 183 . == 196 . version 6+ Yes Yes © 2003 . < 198 .2012 Lumerical Solutions. or 201 . & 199 . == 196 . ! 201 . reshape 223 . Returns the eigenvectors of matrix A. != 197 . ~ 202 . ~ 202 . version 8+ Yes.. & 199 . > 199 . Inc . and 200 . != 197 . eig 220 .) Description Returns the matrix multiplication of matrices. or 201 . 221 See Also Operators 192 . mult 221 . See Also Operators 192 .. and 200 . version 6+ Yes Yes 8. <= 198 . | 200 . > 199 . 3). out = eig(A. 2). reshape 223 . inv 223 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes.27 mult Perform matrix multiplication of two or more matrices.. <= 198 . >= 198 . version 8+ Yes. The dimensions of the matrices have to match Syntax out = mult(A. permute 222 .. A x B x C . = 183 . permute 222 . ! 201 . >= 198 ..B. | 200 . < 198 . Returns both the eigenvalues and eigenvectors of matrix A.4.Scripting Language out = eig(A. inv 223 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes. ]) Description Returns a matrix with the same elements as A but with rearranged dimensions i.29 permute This is an advanced version of the transpose function. > 199 . length 217 . etc. = 183 . . Description Flips the matrix A along the dimension dim.222 Reference Guide 8. or 201 . & 199 . <= 198 .. ! 201 .. reshape 223 . size 216 . See Also Operators 192 . dim).4.j. pinch 217 . Syntax C = flip(A. eig 220 .28 flip Flip a matrix along one dimension.j. ~ 202 .4. inv 223 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes.k. >= 198 . Inc . Syntax out = permute(A. != 197 . See Also Functions 205 . transpose 228 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 8.2012 Lumerical Solutions. and 200 . mult 221 . version 8+ Yes. [i. == 196 . < 198 .k. It rearranges the dimensions of a matrix as specified by the second argument. | 200 . version 6+ Yes Yes © 2003 . and 200 . or 201 . must be the same as that of the original matrix A.. mult 221 . Syntax out = reshape(A. & 199 .]) Description Returns an array with the same elements as A but reshaped to have the size i by j by k by . version 6+ Yes Yes 8. permute 222 . = 183 .k. i*j*k*. . eig 220 . >= 198 . & 199 . or 201 . inv 223 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes.2012 Lumerical Solutions.The product of the specified dimensions.. != 197 . Inc . <= 198 .. >= 198 . Syntax out = Inv(A) Description Returns the inverse of matrix A See Also Operators 192 . < 198 . < 198 .4.Scripting Language 223 8. [i..j. ! 201 . == 196 ... ~ 202 . and 200 . eig 220 .. | 200 . mult 221 .31 inv Calculate the inverse of a matrix. version 8+ Yes. == 196 . reshape 223 Available in © 2003 . | 200 .. See Also Operators 192 .. permute 222 . ~ 202 . > 199 . <= 198 . != 197 . . ! 201 . = 183 . The matrix has to be invertible. > 199 .4.30 reshape Reshapes the matrix A to have the size i-by-j-by-k-by-. 4. interp(Ex. Syntax out = interp(Ex. xold.4. The xnew does does not have to be within the bounds of xold. zold. version 8+ Yes.1:nyspan) = interptri(tri. interp(Ex. znew). Inc .33 interptri Triangular to linear interpolation of a data set. Syntax Description © 2003 . version 6+ Yes Yes 8. See Also Functions 205 .ygrid). The data can be complex.32 interp Linear interpolation of a data set. xnew.xgrid.2012 Lumerical Solutions. The 2D version of interp. xnew. # Interpolate from triangular mesh to rectilinear mesh Ec_rect(1:nxspan. ynew. xold. The data can be complex. spline 225 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 8.vtx2. ynew). Description 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 3D version of interp.224 Reference Guide FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes. xnew). yold.Ec(1:nvtx). yold. xold. the area under a single point is zero). Vertices. The xnew does does not have to be within the bounds of xold. x1). xgrid.e. Ex is existing data xgrid/ygrid specifies the points where Ex is to be sampled on the rectilinear mesh Elements are the elements of the triangular mesh taken from the simulation region Vertices are the vertices of the triangular mesh taken from the simulation region 8. Inc .2012 Lumerical Solutions.4.Ex. ygrid). © 2003 . Description Cubic spline interpolation of a 1D function. 225 Does a triangular to linear interpolation of a function. interp 224 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 8.35 integrate Returns the integral over the specified dimension of a matrix.xnew). Syntax out = integrate(A. See Also Functions 205 . Ex is existing data xold specifies the points where Ex is sampled xnew specifies new point to interpolate the data.4.Scripting Language out = interptri(Elements. n. Integrals over singleton dimensions will return zero (i.34 spline Does a cubic spline interpolation of a data set. Description Integrates A over the nth dimension in the matrix. Syntax out = spline(Ex.xold. See integrate2 for an alternate behavior. which avoids the problem of a zero valued integrals due to singleton dimensions.4. integrate2 226 . out = integrate2(A. . xi are the position vectors corresponding to the dimensions of A over which the integration is occurring. d is a vector containing the dimensions over which to integrate. integrating over dimensions with a single value (singleton dimensions) returns zero because the area under a single point is zero.x. round 247 . Description Integrates A over the first dimension in the matrix. interp 224 .1:2.. x2. See Also Functions 205 . d. Inc .. length 217 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 8.226 Reference Guide x1 is the corresponding position vector for that dimension. except that singleton dimensions are treated differently. particularly when you are not sure which dimensions are singleton. x1). As described in the integrate function description. d. For example power = integrate(A. pinch 217 . x2. Calculates the integral of A over the specified dimension(s) . © 2003 . this behavior can cause difficulties. x1. Syntax out = integrate2(A. x1. The integrate2 function automatically ignores all dimensions with a size of one. x1 is the corresponding position vector. d. 1.2012 Lumerical Solutions.. Calculates the integral of A over the specified list of dimension(s) d.36 integrate2 Very similar to the standard integrate function.. sum 218 . max 218 .y) will integrate A over an x-y surface.). min 219 . d is a vector containing the dimensions over which to integrate. out = integrate(A. getdata 349 . In some cases.). find 227 . See Also Functions 205 .Scripting Language 227 xi is the position vector corresponding to the dimensions of A over which the integration is occurring. length 217 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Version 8+ Version 6+ Yes Yes 8. Inc . Syntax out = find(x. sum 218 . max 218 . Will return indices of all values of x that are greater than 5.x. See Also Functions 205 .1:2.4. Description Will return the index of x that corresponds to the closest value to 5e-6. min 219 . For example power = integrate2(A.2012 Lumerical Solutions.y) will integrate A over an x-y surface. pinch 217 . interp 224 . The indices of those values are returned. pinch 217 . out = find(x>5). If any of the xi vectors only have 1 element. This is useful when using the output from find in a loop.37 find This function will search for entries in a matrix that meet some condition. find 227 . For multi-dimensional matrixes. integrate 225 . length 217 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes © 2003 . findpeaks 228 . integrate 225 . integrate returns 0. getdata 349 .5e-6). round 247 . the find function will still return a single index. the remaining values of the returned matrix are 1.2012 Lumerical Solutions. The returned matrix is always of dimension nX1. A peak is defined as a data point that is larger than its nearest neighbors. Syntax out = findpeaks(y). See Also Functions 205 .i)=x(i.j). Description If x is an N x M matrix.39 transpose Transpose a 1D or 2D matrix. find 227 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 8. findpeaks(y.38 findpeaks Returns the position of peaks in a matrix. See Also Functions 205 . The length of y must be at least 2. If less than n peaks are found. then y will be M x N.228 Reference Guide 8.4. ctranspose 229 . Syntax y = transpose(x). Description Returns the position of the peak with the largest value in y. The returned values are ordered from largest to smallest. where the entries are y(j.4.n). Inc . a value of 1 is returned. If no peak is found in the data. Returns a matrix containing the positions of the largest n peaks found in the data. flip 222 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes © 2003 . " 202 . format 173 .Scripting Language 229 8.41 num2str Convert an integer. See Also Operators 192 .4. Syntax y = ctranspose(x).j)* . then y will be M x N. findstring 232 . x can also be a 1D or 2D matrix. transpose 228 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 8.2012 Lumerical Solutions. write 175 . Description If x is an N x M matrix. See Also Functions 205 . replace 232 . ? 204 .40 ctranspose Transpose a 1D or 2D matrix and take the complex conjugate of each element. floating point number. Use the format script command to change the precision of the output. endl 204 . + 195 . replacestring 233 . or matrix into a string. Description Converts the number x into a string. Syntax out = num2str(x). where the entries are y(j. Inc .4.i)=x(i.str2num 230 . substring 231 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes © 2003 . feval 231 .4. replacestring 233 . format 173 . See Also Operators 192 . Description Converts string into a number.43 eval Execute string containing Lumerical scripting language. endl 204 . ? 204 . Description Execute string containing Lumerical scripting language at the Lumerical script prompt.2012 Lumerical Solutions. replace 232 .4. findstring 232 . substring 231 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 8. Inc .42 str2num Convert a string into a floating point number. Use the format script command to change the precision of the output. " 202 . Syntax out = str2num(string). write 175 . num2str 229 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes © 2003 . This function does not return any data. str2num 230 .230 Reference Guide 8. + 195 . See Also Operators 192 . Syntax eval(string). If len is -1 (or any value less than 0) it returns the substring at position pos to the end of s.2012 Lumerical Solutions. starting at position pos.4.pos.len). Syntax s1 = substring(s. replace 232 . str2num 230 . num2str 229 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes © 2003 . See Also Functions 205 .44 feval Evaluates a string as script file.pos). eval 230 . Returns a substring of s. See Also Operators 192 . s1 = substring(s. The default value of len is -1. This function does not return any data. num2str 229 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 8. The position pos can be 1 to length(s). with len characters. length 217 .45 substring Can be used to extract a substring from a string. Description Returns a substring of s. str2num 230 . starting at position pos to the end of s.4. Syntax feval(filename). Inc . Description Execute string containing the name of a script file at the Lumerical script prompt.Scripting Language 231 8. findstring 232 . replacestring 233 . This function is useful for running script files that are not in your path and files with spaces in the name. 46 findstring Returns the position of a given substring in a string.pos. If len is 0. substring 231 . starting at pos. str2num 230 . If s1 is not found in s. See Also Functions 205 . length 217 . Description Returns the position of the first instance substring s1 in s. replacestring 233 . Syntax snew = replace(s.47 replace Replaces a substring of a string with a new string. See Also Functions 205 . findstring 232 . The position pos can be 1 to length(s). length 217 . If s1 is not found in s. starting at position pos. If len is -1 (or any values less than 0) it will replace all remaining characters in s with s1. Inc . it returns -1. starting at position p0. pos = findstring(s.4. Returns the position of the first instance substring s1 in s. with the string in s1.232 Reference Guide 8. it will insert the string s1 between pos-1 and pos. num2str 229 Available in © 2003 . replace 232 . Syntax pos = findstring(s. num2str 229 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 8. it returns -1.p0).len.4. starting from p0. str2num 230 . s1). replacestring 233 . Description Replaces len characters of s. substring 231 .s1.s1).2012 Lumerical Solutions. Inc . In the 1D case the transform is given by N ( 2 i )( n 1)( m 1) N E w [ m] fft( E x ) n 1 E x [ n] e The fft. findstring 232 .49 fft Compute the 1D. invfft and fftk work in the same way. This implies that if you use option 1=n to produce a spectrum with fft.4.2012 Lumerical Solutions. then you also need to use option 1=n with fftw to get the proper frequency vector corresponding to your spectrum. if you use option 1=n for fft.4. Description Replaces all instances of s1 in s with s2. When working with spectral data it is not possible to switch between formats. 2D © 2003 . Similarly. Syntax snew = replacestring(s.48 replacestring Replaces a substring of a string with a new string. there are no functions to convert between formats. 2D or 3D Fast Fourier Transform (fft) of a matrix. replace 232 .s1. Syntax out = fft(Ex). str2num 230 . length 217 . then you must also use option 1=n if you want to pass that same spectral data to invfft. inverse fft and all associated functions have an option (option 1 below) that controls the format used to store the frequency domain data. substring 231 . See Also Functions 205 . num2str 229 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 8.Scripting Language FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 233 8. s2). Description Returns the fast Fourier transform of Ex. Ex can be 1D. 234 Reference Guide or 3D. 1 or N to obtain the desired 0 padding options. as 2^12. this means the zero frequency point is at element floor(N/2 + 1). 2D or 3D. some other packages (e. 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. where N is the number of samples). it will zero pad up to the next power of 2 longer than the length of Ex. For the fastest results. To convert between the different FFT conventions. 1D time/spatial signals. Inc .1. option2 This option is either a 1. The options are: 1 : the standard fft (zero frequency is at the first element of the matrix). Lumerical defines the forward FFT using a positive sign in the exponential term. 2 or 3 element vector depending on whether Ex is 1D. 3 : the fft is shifted so zero frequency is the central element of the spectrum (precisely. for example. However. Note: FFT Conventions There are different. option2).0) invfft(y.option1.0) MATLAB ifft(y)*N fft(y)/N © 2003 . but equivalent conventions for defining Fourier transforms. For a signal y with N elements this can be done as follows: Lumerical fft(y. For each dimension. specify a value of either 0. MATLAB) use the opposite convention.g. This option is only useful for real valued. out = fft(Ex. but only data up to and including the Nyquist frequency is stored.2012 Lumerical Solutions. N should be a power of 2 and can be entered. option1 This option controls the format used to store the frequency domain data. with a negative sign in the exponential for the forward FFT and a positive sign in the exponential for the inverse FFT. and the inverse FFT using a negative sign in the exponential term. If N <= length(Ex). 2 : zero frequency is the first element.1. switch the invfft and fft and rescale the results. If N <= length (t). Syntax out = fftw(t). w fftw(t ) 2 0. dt M . czt 238 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 8.2012 Lumerical Solutions. Description Returns the angular frequency vector corresponding to time vector t. Similarly. invfft 237 . Inc . it will zero pad up to the next power of 2 longer than © 2003 . then you also need to use option 1=n with fftw to get the proper frequency vector corresponding to your spectrum.option2).option1. there are no functions to convert between formats. fftw(t. fftk 236 . Option1 1 : the standard fft (default) 2 : frequencies above the Nyquist frequency are removed 3 : the fft is shifted so both positive and negative frequencies are seen Option2 0: no zero padding 1: zero padding up to the next power of 2 longer than the length of Ex (default) N: zero pad up to length N if N > length(t). Invfft and fftk work in the same way. fftw 235 . When working with spectral data it is not possible to switch 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. where M=length(t). if you use option 1=n for fft.Scripting Language 235 See Also Functions 205 .4.50 fftw Returns the angular frequency vector corresponding to time vector t. ( M 1) . fftw and all related functions have an option (option 1 below) that controls the format used to store the frequency domain data. N should be a power of 2 and can be entered. k fftk( x) 2 0. then you also need to use option 1=n with fftw to get the proper frequency vector corresponding to your spectrum.51 fftk Returns the spatial wavevector kx associated with a fourier transform of a function of x. fftk(x. then you must also use option 1=n if you want to pass that same spectral data to invfft. fftk and all related functions have an option (option 1 below) that controls the format used to store the frequency domain data. Description Returns the spatial wavevector kx associated with a fourier transform of a function of x. dx M . This implies that if you use option 1=n to produce a spectrum with fft. there are no functions to convert between formats. 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) © 2003 . Syntax out = fftk(x). Inc . For the fastest results.option1.. where M=length(x).4.option2).2012 Lumerical Solutions. invfft 237 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 8. if you use option 1=n for fft. for example. fft 233 . fftk 236 . ( M 1) . Similarly. See Also Functions 205 . as 2^12.236 Reference Guide the length of t. When working with spectral data it is not possible to switch between formats. Invfft and fftk work in the same way. there are no functions to convert between formats. In the 1D case the transform is given by E x [ m] invfft( E w ) 1 N N E w [ n] e n 1 ( 2 i )( n 1)( m 1) N The inverse fft.option2). but only data up to and including the Nyquist frequency is stored. fft and all related functions have an option (option 1 below) that controls the format used to store the frequency domain data. N should be a power of 2 and can be entered. This implies that if you use option 1=n to produce a spectrum with fft. Syntax out = invfft(x). Inc .Scripting Language 237 N: zero pad up to length N if N > length(x).option1. If N <= length (x). fftw 235 . See Also Functions 205 .2D or 3D. invfft(x. then you must also use option 1=n if you want to pass that same spectral data to invfft. 1D time/spatial © 2003 . then you also need to use option 1=n with fftw to get the proper frequency vector corresponding to your spectrum. When working with spectral data it is not possible to switch between formats.2012 Lumerical Solutions. x can 1D.2D or 3D inverse Fast Fourier Transform (fft) of a matrix.4. option1 This option controls the format used to store the frequency domain data. Similarly. for example. invfft 237 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 8. The options are: 1 : the standard fft (zero frequency is at the first element of the matrix). Description Returns the inverse fast Fourier transform of x. as 2^12. For the fastest results. Invfft and fftk work in the same way. 2 : zero frequency is the first element. fft 233 .52 invfft Compute the 1D. it will zero pad up to the next power of 2 longer than the length of x. This option is only useful for real valued. if you use option 1=n for fft. k 2) Syntax out = czt(Ex. n 2] e ix[ n1]k [ m1] n1.238 Reference Guide signals. n 2 ix[ n 2 ] k [ m 2 ] E k [m1. For the fastest results. For each dimension. where N is the number of samples).t.53 czt Returns the chirped z-transform of a set of data. x. 3 : the fft is shifted so zero frequency is the central element of the spectrum (precisely. E k [ m] czt ( E x . x 2. fftw 235 . for example. 2D or 3D. Inc . it will zero pad up to the next power of 2 longer than the length of Ex. 2 or 3 element vector depending on whether Ex is 1D. at © 2003 .2012 Lumerical Solutions. 1 or N to obtain the desired 0 padding options. If N <= length(Ex). k ) n E x [n] e ix[ n ]k [ m ] E x [n1. as 2^12. x1. See Also Functions 205 . option2 This option is either a 1.w) Description Returns the chirped z-transform of Ex. N should be a power of 2 and can be entered. where length of Ex is the length in a specific dimension.4. m2] czt ( E x . specify a value of either 0. this means the zero frequency point is at element floor(N/2 + 1). k1. The czt function is often more convenient than the standard fft functions because you can specify an arbitrary range of k. fft 233 . fftk 236 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 8. function of t. 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). polydiff 243 .0.x.Scripting Language 239 each desired angular frequency w. polygrow 241 . kx and ky must be linearly spaced sets of wavenumbers but can cover any range. a valid polygon is V = [ 0.kx. For example. 1.1].ky). Description Returns the area of V. The two dimensional chirped z-transform. The polygon vertices are contained in a single matrix of dimension Nx2 (or 2xN) where N >= 3. inpoly 241 . 1. czt(Ex. 0.4.2012 Lumerical Solutions.y positions. Note that w must be a linearly spaced set of angular frequencies but can cover any range. The second dimension represents the x. polyintersect 240 . centroid 240 . The area is positive if the vertices are defined in a counterclockwise direction. Syntax out = polyarea(V).0.1. fft 233 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 8. Inc . See Also Functions 205 . and negative if the vertices are defined in a clockwise direction. polyxor 244 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes © 2003 . polyor 242 .54 polyarea Returns the area of a polygon. See Also Functions 205 . The sign of the area indicates if V is defined in a counter-clockwise (positive) or clockwise (negative) direction.y. polyand 242 . polyarea 239 .240 Reference Guide 8.0. For example.0. Description Returns 0 if the polygons do not overlap 0.y positions. The second dimension represents the x. Syntax out = centroid(V). polyintersect 240 .0.y positions. Description Returns the center of mass of V. inpoly 241 . Inc . polyor 242 . See Also Functions 205 .1].0. 1. a valid polygon is V = [ 0.V2).56 polyintersect Determines if two polygons intersect. The output is a 2x1 matrix representing the x and y positions.2012 Lumerical Solutions.55 centroid Returns the center of mass of a polygon. The polygon vertices are contained in a single matrix of dimension Nx2 (or 2xN) where N >= 3.1. polyxor 244 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 8. This command is available in FDTD Solutions 7.4.5 if the polygons touch 1 if they overlap 2 if one polygon completely encloses the other See Also © 2003 . assuming uniform density. The second dimension represents the x.1. For example. The polygon vertices are contained in a single matrix of dimension Nx2 (or 2xN) where N >= 3. 0. polygrow 241 . It is not available in MODE Solutions 4. Syntax out = polyintersect(V1. polydiff 243 . a valid polygon is V = [ 0. 0. 1. polyand 242 . 1.0.0. 1.4.1]. polygrow 241 . The second dimension represents the x. Syntax out = inpoly(V.1. polyand 242 . inpoly 241 .y). The polygon vertices are contained in a single matrix of dimension Nx2 (or 2xN) where N >= 3.y positions. The function is vectorized so it can be used to create a mesh of a polygon. 1. a valid polygon is V = [ 0.0. For example.Scripting Language 241 Functions 205 . centroid 240 . Description Returns a matrix of the same dimension of x with 1 if the corresponding point is inside the polygon and 0 otherwise. The second dimension represents the x. polydiff 243 . polyxor 244 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 8. a valid polygon is V = [ 0. polyor 242 . © 2003 .0. 1.1].58 polygrow Returns a polygon that has grown or shrunk by the specified amount. polydiff 243 . polyxor 244 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 8. 0. 1.x. Inc . The matrices x and y must have the same length. centroid 240 .y positions. polyintersect 240 . 0.1. polyarea 239 .57 inpoly Determines if a point is inside our outside a polygon. See Also Functions 205 . polyarea 239 . The polygon is grown in a direction normal to every line segment.0.4.4. polyand 242 .0. polygrow 241 . 1. polyor 242 . The polygon vertices are contained in a single matrix of dimension Nx2 (or 2xN) where N >= 3. For example.1].2012 Lumerical Solutions. or one of them can be a singleton. polygrow 241 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 8. The polygon vertices are contained in a single matrix of dimension Nx2 (or 2xN) where N >= 3. 1.4. 1. polyxor 244 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 8. inpoly 241 . 0. centroid 240 . centroid 240 . See Also Functions 205 . polyarea 239 .2012 Lumerical Solutions. For example.59 polyand Combines two polygons into one using a boolean and operation.y positions. The polygon vertices are contained in a single matrix of dimension Nx2 (or 2xN) where N >= 3. polyor 242 . polyxor 244 . a valid polygon is © 2003 . See Also Functions 205 . Description Returns a new polygon that has grown by dx.dx). V3. polyintersect 240 . polydiff 243 . The second dimension represents the x.y positions. polyor 242 . The second dimension represents the x. Description Returns a new polygon.V2).60 polyor Combines two polygons into one using a boolean or operation. use dx < 0.0. inpoly 241 .1].242 Reference Guide Syntax out = plygrow(V. a valid polygon is V = [ 0. Inc . For example. polyand 242 . To shrink a polygon. polyarea 239 . Syntax V3 = polyand(V1.1. polydiff 243 . polyintersect 240 .0. that is the and of V1 and V2.4. polyxor 244 . that is V1-V2. a valid polygon is V = [ 0. inpoly 241 . Description Returns a new polygon.V2). Inc . polyintersect 240 .61 polydiff Combines two polygons into one by taking the difference.1]. polygrow 241 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes © 2003 . 1. 0. centroid 240 .2012 Lumerical Solutions. 1.0.0. polyarea 239 . V3.1. For example. 1. that is the or of V1 and V2.1]. polyxor 244 .4. 0. polyand 242 .y positions. polyand 242 . Syntax V3 = polyor(V1. V3. polyintersect 240 . polyor 242 . The second dimension represents the x. inpoly 241 . centroid 240 . See Also Functions 205 . polygrow 241 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 8.1. Syntax V3 = polydiff(V1. 243 See Also Functions 205 .V2).0. polydiff 243 .0. polyarea 239 . 1. The polygon vertices are contained in a single matrix of dimension Nx2 (or 2xN) where N >= 3.Scripting Language V = [ 0. Description Returns a new polygon. The value of 1.1. a valid polygon is V = [ 0. The polygon vertices are contained in a single matrix of dimension Nx2 (or 2xN) where N >= 3. Syntax out = lineintersect(L1. V3.62 polyxor Combines two polygons into one using a boolean xor operation. 0.1]. ie the same. centroid 240 . 0.2 for N line segments).1) and another from (0. polydiff 243 . Inc .0.0) to (0.2012 Lumerical Solutions. 1.y points in the form Nx2 representing the intersections of the N lines. represents 2 lines segments. inpoly 241 .1). For example. Syntax V3 = polyxor(V1. Description Returns a new polygon. the position returned is (1. L1 and L2 must have the same size (2*N. 0.0. For example.1. There are special cases when The lines are parallel. Line segments are contained in a single matrix of dimension 2*Nx2. The second dimension represents the x.b). See Also Functions 205 . one from (0.0) to (1. The points in a segment are degenerate. where there are N line segments. polyarea 239 . polygrow 241 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 8.1]. polyintersect 240 . 1.L2). In this case. the matrix L = [ 0.0. polyand 242 .63 lineintersect Returns the intersection points of lines in the x-y plane.4.4. To see if the line segments actually cross the command linecross should be used. Note that the intersection point does not have to lie on the line segments themselves that define the lines.244 Reference Guide 8. In © 2003 . polyor 242 . that is the xor of V1 and V2.#INF.y positions.V2). Description Returns the intersection of the lines represented by the segments in L1 and L2. 1. The result is a sequence of x. The value of b is 0 if the lines are not coincident and 1 if they are coincident.0.#INF can be tested for using the script commands finite. 1.64 linecross Determines if line segments cross each other. See Also Functions 205 .4. the matrix L = [ 0. Syntax out = linecross(L1. 2 if the both line segments are degenerate. 0.1). 1. Inc . Line segments that are coincident and touch also return a value of 0. where b is 0. where there are N line segments.2012 Lumerical Solutions.#INF.0) to (0. finite 249 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes © 2003 . finite 249 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 8. The result is a matrix of length N that is 0 if the segments do not cross. Description Returns a matrix of dimension N which determines if the N line segments in L1 and the N line segments in L2 cross. For example.b).Scripting Language 245 this case.5 See Also Functions 205 . L1 and L2 must have the same size (2*Nx2 for N line segments). 1.1]. the first is degenerate. one from (0. 0. lineintersect 244 . linecross 245 . 1 if they cross and 0.L2).5 if the endpoint of one line touches another. Line segments are contained in a single matrix of dimension 2*Nx2. represents 2 lines segments. or the second is degenerate respectively. the position returned is (1.0.0.0) to (1.1) and another from (0. ceil 246 .4. Description Returns the nearest integer greater than or equal to X. See Also Functions 205 . 8.246 Reference Guide 8.66 floor The floor command rounds the input to the nearest integer less than or equal to itself. See Also Functions 205 .67 mod Modulus after division.*Y where n = floor(X. mod 246 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 8.Y)./Y) if Y is not equal to 0.65 ceil The ceil command rounds the input to the nearest integer greater than or equal to itself.2012 Lumerical Solutions. Syntax out = mod(X. Syntax out = floor(X). © 2003 .4. Inc .4. The input X must be a real array or a real scalar. Description Returns X . floor 246 . Y must be a real scalar. mod 246 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes Description Returns the nearest integer less than or equal to X. Syntax out = ceil(X).n. Description Real values sign = 0 for data=0 sign = 1 for data>0 sign =-1 for data<0 Complex values sign = 0 for data=0+0i sign = data/abs(data) for data!=0 See Also Functions 205 . ceil 246 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Version 8+ Version 6+ Version 2+ Yes 8.X) = 0 See Also Functions 205 .4. Syntax Description © 2003 . Syntax out = sign(data). Inc .2012 Lumerical Solutions. floor 246 . floor 246 .0) = X mod(X.4. ceil 246 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 247 8.68 sign Get the sign of a number.69 round Rounds a number to the nearest integer.Scripting Language The following are true by convention: mod(X. out = rand(min. Inc . See Also Functions 205 . By default.2012 Lumerical Solutions. randreset 248 . out = rand(min.4. 8. randmatrix 186 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 8. Syntax out = randreset. min and max are 0 and 1 respectively.4. This function returns the random number seed that was © 2003 . Description Generates a uniform random number between 0 and 1.option). Description Resets the random number seed based on the clock time.70 rand Generate a uniform random number between 0 and 1.max.max). option = 1: output is a double precision number between min and max (default) option = 2: output is an integer between min and max.71 randreset Resets the random number generator seed. See Also Functions 205 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes Rounds x to the nearest integer.248 Reference Guide out = round(x). Syntax out = rand. Generates a random number between min and max. Description Returns the power of the solar spectrum as a function of wavelength. randmatrix 186 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 8.Scripting Language used. Syntax out = solar(1). Description Returns a matrix of the same size as x.73 solar Returns the solar power spectrum. See Also Functions 205 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 8. in W/m^2/m Returns the corresponding wavelength vector.4. Inc .2012 Lumerical Solutions. For example.INF return 0 (false). rand 248 . finite(1/0) returns 0. in m © 2003 .72 finite The finite command returns 1 (true) if a value is finite. out = solar(0). Set the seed to a specific value 249 See Also Functions 205 . Numbers such as NaN or #1. Syntax out = finite(x). out = randreset(seed). The values are 1 for values of x that are finite and 0 for values that are NaN.4. in Watts/meter^2/meter. Size is either Nlayers. as they are assumed to be infinite. in degrees. integrate 225 8.f).d. The thickness of the first and last layers is not important.d.74 stackrt Calculates reflection and transmission of a plane wave through a multi-layer stack. RT = stackrt(n.theta). f: Frequency vector.4. Description RT is a data set that contains the fraction of reflected and transmitted power.f. Syntax RT = stackrt(n. Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE See Also Functions 205 FDTD 8 No No No © 2003 . Size is Nlayers. Arguments for a stack with Nlayer: n: Refractive index of each layer. Optional. theta: Angle vector. Inc . or Nlayers x length(f) if dispersive materials are involved d: Thickness of each layer.250 Reference Guide Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE No No No Yes See Also plot 253 .t coefficients for both S and P polarizations.2012 Lumerical Solutions. and complex r. The loop continues while x <=100 and sets x=x+1 at each pass.5. } Description Single argument for loop.5 Loop and conditional statements The scripting language currently supports FOR loops and IF statements. } See Also Loops 251 . for(x=1. for(0. x=x+1) { ?x.1 for for loops allow some operations to be repeated a number of times. Syntax for(x=1:100) { ?x.2012 Lumerical Solutions. x<10. If statement. x<= 100. if 252 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes © 2003 . x=x+1. A while loop can be implemented when using the three argument version of for. Three argument for loop. Other control structures such as while loops or case statements must be constructed from these. 0) { ?x. } x=1. Command for 251 if 252 while 251 Description For loop.Scripting Language 251 8. A for loop must be used. Inc . x=1 at the start of the loop. 8. This is equivalent to a while loop that will execute while x<10. The loop will be sequentially executed for each value of x. See the for loop section. © 2003 .252 Reference Guide 8. Inc . for 251 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes Description Simple if statement on one line. 8. Command plot 253 plotxy 254 polar 255 Description Makes line plots. } if(x < 5) { if(x > 0) {y = x^2. Plotting functions. } if(x < 5) { y = x^2. } } else { y = x^3. These figures can be exported to jpeg images.5. Makes polar plots. } else { y = x^3. Multi-line if statement If else statement.6 Plotting commands Line and image plots are supported. Nested if statement with else. } See Also Loops 251 . Makes line plots. when data sets are sampled at different position vectors.2012 Lumerical Solutions.2 if The scripting language supports if statements in the following forms: Syntax if(x < 5) { y = x^2. } if(x < 5) { y = x^2. This will generate a graph with m lines. Sets figure properties.y1. Makes polar plots.1) vs x. "options"). Command selectfigure 259 exportfigure 260 closeall 261 Description Selects a figure. Exports a figure. x is a nx1 matrix.1 plot Create line plots. plot(x.y). y2. All data sets must be sampled on the same position vector. y is a nxm matrix.y).2) vs x. returns the figure number. x. y3 must be the same length. plot(x. Makes a legend on a figure with line plots. "x label". y(1: n. "y label".y. © 2003 .y1. returns the figure number. Inc . Makes a 2D polar image plot.6.y2. Creates a plot with desired options. etc) Creates a plot with 3 curves.y. (y(1:n. "y label".2012 Lumerical Solutions. The figure number is returned. Closes all figure windows. 253 8. "title". Description Creates a plot of y vs x. when data sets are sampled at different position vectors. Pass in simulation data to the visualizer. "x label". Options can be be logplot plot lines OR plot points plot(x. Creates a plot of y vs x with axis labels and a title. plot(x. "title").Scripting Language polar2 256 polarimage 257 legend 257 image 258 setplot 260 visualize 259 Miscellaneous plotting functions. See plotxy for data sets that are sampled on different position vectors. Syntax out = plot(x. Makes 2D image plots.y3). y and x are both 1D vectors with the same length. The figure number is returned. See Also Plotting commands 252 . plotxy 254 .2012 Lumerical Solutions. this function is used when the data sets are sampled on different position vectors.y1. See Also Plotting commands 252 . closeall 261 . "title").polar" Returns the figure number. Creates a plot with multiple curves. "x label". exportfigure 260 . setplot 260 .254 Reference Guide greyscale OR color polar (used for imaging far field projections) any comma separated list of the above. image 258 . visualize 259 Available in © 2003 . legend 257 .x2.6. plot 253 .yn). legend 257 . plotxy(x1. plotxy(x1.x2.greyscale.y).y1. figure number. closeall 261 . setplot 260 . image 258 .y2.2 plotxy Create line plots. x2. Creates line plots with axis labels and a title. visualize 259 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 8. Description Creates a plot of y vs x. returns the "y label". The xn-yn pairs must have the same length. but x1. Inc . In particular. for example "logplot. and xn can have different start-end values and resolutions.y2. y and x are both 1D vectors with the same length. It returns the figure number.xn. Syntax out = plotxy(x. exportfigure 260 . Creates a plot with 3 curves. theta is the angle from the x-axis to the radius vector specified in radians.3 polar Create polar plots. "y label". The figure number is returned. See Also Plotting commands 252 . closeall 261 . Theta and rho can be vectors of the same length.rho3) polar(theta. or if the length of theta is n.rho. for example "logplot.6. legend 257 .2012 Lumerical Solutions. rho3 must be the same length. rho is the length of the radius vector. Creates a plot with desired options. polarimage 257 Available in © 2003 . polar2 256 . then y can be a nxm matrix.rho.Scripting Language FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 255 8. "options"). "y label".rho2."x label".rho) Description Creates a polar coordinate plot of the angle theta versus the radius rho.polar" Returns the figure number. rho2. setplot 260 ."x label". returns the figure number. All data sets must be sampled on the same position vector. Inc . image 258 . theta. Syntax out = polar(theta.greyscale. rho1. Creates a plot of y vs x with axis labels and a title. exportfigure 260 . See polar2 for data sets that are sampled on different position vectors. Options can be be logplot plot lines OR plot points greyscale OR color any comma separated list of the above. polar(theta. returns the figure number. "title") polar(theta. "title".rho1. "title". closeall 261 . exportfigure 260 . Options can be be logplot plot lines OR plot points greyscale OR color any comma separated list of the above. legend 257 .rho1. Creates a plot with 2 curves."x label".4 polar2 Create polar plots. In particular. theta is the angle from the x-axis to the radius vector specified in radians. or if the length of theta is n. rho is the length of the radius vector. The two data sets can be sampled on different theta vectors. returns the figure number. polar 255 . "options"). "title") polar(theta. setplot 260 .rho. polarimage 257 Available in © 2003 . Inc .polar" Returns the figure number.rho) Description Creates a polar coordinate plot of the angle theta versus the radius rho.2012 Lumerical Solutions. rho2) polar(theta.theta2. "y label". Theta and rho can be vectors of the same length. for example "logplot. image 258 ."x label". then y can be a nxm matrix.256 Reference Guide FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 8. See Also Plotting commands 252 . polar(theta1. this function is used when the data sets are sampled on different position vectors. Syntax out = polar(theta.6. Creates a plot of y vs x with axis labels and a title.greyscale. The figure number is returned. Creates a plot with desired options. "y label".rho. This is typically used to plot far field data. Creates a 2D image plot with axis labels and options. "options").uy.Scripting Language FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 257 8. Description Creates a 2D image plot. Near to far field projections 358 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 8.5 polarimage Create 2D polar image plots. "y label". setplot 260 . where ux goes from -1 to 1 uy is of dimension M x 1. where uy goes from -1 to 1 data must be of dimension N x M Creates a 2D image plot with axis labels Optionally returns the figure number. This function does not return any data. If ux is of dimension N x 1.data..data. polar 255 .uy. image(ux. "x label". image 258 . visualize 259 . "legendn"). See Also Plotting commands 252 . "title"). exportfigure 260 .6. Inc . plot 253 .data). "y label".2012 Lumerical Solutions. options can be logplot out = image(ux. © 2003 . "title"."legend2".uy.. "x label". closeall 261 .6 legend Add a legend to a line plot.. Syntax legend ("legend1". Syntax polarimage(ux.. See Also Description Adds a legend to the selected figure.6. Creates a 2D image plot with axis labels. closeall 261 . Description Creates a 2D image plot.z. "title".y. "y label".z). "x label". "x label". visualize 259 . returns the figure number. legend 257 .y. "title").z.y. "options"). closeall 261 . image(x.7 image Create 2D image plots.2012 Lumerical Solutions. 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. polarimage 257 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes © 2003 . setplot 260 . visualize 259 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 8. options can be logplot polar any comma separated list of the above image(x. "y label". Inc . See Also Plotting commands 252 .6. Syntax out = image(x. plot 253 . exportfigure 260 . Creates a 2D image plot with axis labels and options. plot 253 .258 Reference Guide Plotting commands 252 . a2).y.a1. p2. visualize("name". Syntax visualize(R). image 258 . "a1". then data matrix X."p2".additional parameter vectors (vector."p2". visualize("name".6.6. closeall 261 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Version 8+ Version 5+ Yes Yes 8. A warning will be generated if the figure does not exist.z. then parameter name).a1x. then data matrix) Plot vector data "a1".Scripting Language 259 8. "a1".a1 . Description Selects the last figure that was created.a1z ."p2". exportfigure 260 .a1x."a2"."p1".spatial grid vectors p1.a1y. p1. This function does not return any data. Plot data not attached to a spatial grid.y."p1". Plots data on a spatial grid. Description Plots the dataset R in the Visualizer. setplot 260 .2012 Lumerical Solutions. p2. p2.Y. "a1".a1z).y.Z components) See Also Plotting commands 252 .a1x. p1. name ."p1".a1y.a1z). Syntax selectfigure. plot 253 . x.data attributes (data name.8 visualize Send data to the visualizer.z. x. Inc ."p1" .9 selectfigure Selecting a figure will show the figure on screen (give it focus).data attributes (data name.z . p1.a1y. © 2003 . "a1".Visualizer name x. visualize("name". See Also Plotting commands 252 . Selects figure 1. image 258 .260 Reference Guide selectfigure(1). setplot 260 . "property value"). If a file is overwritten. setplot("property". a warning will be generated. ". Set the desired property of the currently selected figure to property value.10 setplot Set figure properties. See Also Plotting commands 252 . visualize 259 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 8. The image size will be the same as the figure window size. Syntax ?setplot.2012 Lumerical Solutions. Description Creates a string which lists all figure properties for the figure that is currently selected. closeall 261 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 8. the most recently created plot will be selected. © 2003 . Unless the setfigure() command was called. a warning will be generated. Inc . If an export fails.6.11 exportfigure Exports the current figure to a JPG image. plot 253 . plot 253 . image 258 .6.jpg" will be used. If the file extension is not specified. exportfigure 260 . Inc .12 closeall Close all open figure windows. image 258 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 8.Scripting Language Syntax exportfigure("filename"). Simulation environment Command Description © 2003 . Description Close all open figure windows.2012 Lumerical Solutions. Syntax closeall. closeall 261 . The exported image will have the same size as the current figure. visualize 259 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 8. plot 253 . setplot 260 . image 258 . Objects are always added to the location specified by the groupscope variable. Description 261 Exports the current figure to a JPG image with the name "filename".7 Adding Objects The following commands can be used to add objects. selectfigure 259 . plot 253 . See Also Plotting commands 252 . This function does not return any data. See Also Plotting commands 252 .6. Add an object from the object library. Add a custom primitive. deletes current simulation data and allows you to manipulate simulation objects for a new simulation. Add an import primitive for a generation region. Adds a container group to the simulation environment. Add a pyramid primitive. Add a ring primitive. Add a constant doping region. © 2003 .2012 Lumerical Solutions. Add a grid attribute object. Add a surface primitive. Changes the group scope. layoutmode 264 groupscope 284 addgroup 264 addanalysisgroup 265 addobject 266 addgridattribute 280 Structures Command addcircle 266 addcustom 267 addimport 267 addpyramid 267 addpoly 268 addrect 268 addring 269 addsphere 270 addsurface 270 addstructuregroup 265 addconstdope adddiffusion 279 addbulkgen 280 addimportdope 279 addimportgen 280 Simulation region Description Add a circle primitive. Add a polygon primitive Add a rectangle primitive. Inc . Add an import primitive. Add a diffusion region.262 Reference Guide switchtolayout 264 Closes the analysis window. Add a structure group. Add a bulk generation region. Used to determine if the simulation file is open in layout or in analysis mode. Add an analysis group. Add a sphere primitive. Add an import primitive for a doping region. Add an imported source. Add a movie monitor. Description Add a dipole source. Add a profile monitor. Adds a propagator simulation object to the MODE Solutions simulation environment. Description Add an FDTD simulation area. Adds a MODE simulation area.Scripting Language Command addfdtd 270 addeigenmode 271 addpropagator 271 addmesh 272 adddevice 278 Sources Command adddipole 273 addgaussian 273 addplane 274 addmode 272 . Add a power monitor. Add a plane source. 263 © 2003 . Add a TFSF source. addmodesource 273 addtfsf 274 addimportedsource 275 Monitors Command addindex 275 addtime 276 addmovie 276 addprofile 276 addpower 277 Create objects in Deck Command createbeam 277 Description Creates a new Gaussian beam that is accessible from the deck. Add a Gaussian source. Add a mode source. Add a time monitor. Add a mesh override region. Description Add an index monitor. Adds a DEVICE simulation area.2012 Lumerical Solutions. Inc . Syntax switchtolayout. layoutmode 264 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 8. Inc .2 layoutmode Used to determine if the simulation file is open in layout or in analysis mode.264 Reference Guide 8. Syntax ?layoutmode. Description Returns 1 if in layout mode. If a simulation file is open in ANALYSIS mode. Description Switches to LAYOUT mode.1 switchtolayout Closes the analysis window and allows you to manipulate simulation objects for a new simulation. Syntax Description © 2003 . See Also Adding Objects 261 . any commands to modify objects will return errors. and 0 if in analysis mode. You must switch to LAYOUT mode before modifying any ob jects. This function does not return any data.7.7. switchtolayout 264 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 8.7.2012 Lumerical Solutions.3 addgroup Adds a container group to the simulation environment. See Also Adding Objects 261 . addtogroup 290 . addstructuregroup 265 . This function does not return any data. See Also Adding Objects 261 .7. Syntax addanalysisgroup. See Also Adding Objects 261 . addgroup 264 .5 addanalysisgroup Adds an analysis group to the simulation environment.2012 Lumerical Solutions.4 addstructuregroup Adds a structure group to the simulation environment. addtogroup 290 . addgroup 264 .7. addtogroup 290 . Description Adds a structure group to the simulation environment. Adds a container group to the simulation environment. addstructuregroup 265 Available in © 2003 . Description Adds an analysis group to the simulation environment. addanalysisgroup 265 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes No Yes 8. Syntax addstructuregroup. addanalysisgroup 265 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes No Yes 8.Scripting Language addgroup. This function does not return any data. This function does not return any data. Inc . 265 See Also Adding Objects 261 . adduserprop 291 . adduserprop 291 . 266 Reference Guide FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes No Yes 8.7.6 addobject Adds a object from the object library. T Syntax addobject("script_ID"); Description Adds an object from the object library. This function does not return any data. See Also Adding Objects 261 , addtogroup 290 , adduserprop 291 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes No No 8.7.7 addcircle Adds a circle primitive to the simulation environment. Syntax addcircle; Description Adds primitive to the simulation environment. This function does not return any data. See Also Adding Objects 261 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE asdd Yes Yes No Yes © 2003 - 2012 Lumerical Solutions, Inc Scripting Language 267 8.7.8 addcustom Adds a custom primitive to the simulation environment. Syntax addcustom; Description Adds primitive to the simulation environment. This function does not return any data. See Also Adding Objects 261 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes No No 8.7.9 addimport Adds an import primitive to the simulation environment. Syntax addimport; Description Adds primitive to the simulation environment. This function does not return any data. See Also Adding Objects 261 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes No No 8.7.10 addpyramid Adds a pyramid primitive to the simulation environment. Syntax addpyramid; Description Adds primitive to the simulation environment. © 2003 - 2012 Lumerical Solutions, Inc 268 Reference Guide This function does not return any data. See Also Adding Objects 261 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes No Yes 8.7.11 addpoly Adds a polygon primitive to the simulation environment. Syntax addpoly; Description Adds primitive to the simulation environment. This function does not return any data. See Also Adding Objects 261 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes No Yes 8.7.12 addrect Adds a rectangle primitive to the simulation environment. Syntax addrect; Description Adds primitive to the simulation environment. This function does not return any data. See Also Adding Objects 261 Available in © 2003 - 2012 Lumerical Solutions, Inc Scripting Language FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes No Yes 269 8.7.13 addtriangle Adds a 3 vertex, triangle shaped polygon primitive to the simulation environment. Syntax addtriangle; Description Adds primitive to the simulation environment. This function does not return any data. See Also Adding Objects 261 , addpoly 268 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes No Yes 8.7.14 addring Adds a ring primitive to the simulation environment. Syntax addring; Description Adds primitive to the simulation environment. This function does not return any data. See Also Adding Objects 261 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes No Yes © 2003 - 2012 Lumerical Solutions, Inc 270 Reference Guide 8.7.15 addsphere Adds a sphere primitive to the simulation environment. Syntax addsphere; Description Adds primitive to the simulation environment. This function does not return any data. See Also Adding Objects 261 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes No Yes 8.7.16 addsurface Adds a surface primitive to the simulation environment. Syntax addsurface; Description Adds primitive to the simulation environment. This function does not return any data. See Also Adding Objects 261 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes No No 8.7.17 addfdtd Adds a FDTD simulation area to the simulation environment. Syntax addfdtd; Description Adds a simulation area to the simulation environment. © 2003 - 2012 Lumerical Solutions, Inc Scripting Language This function does not return any data. See Also Adding Objects 261 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes No No 271 8.7.18 addeigenmode Adds an eigenmode simulation object to the MODE Solutions simulation environment. Syntax addeigenmode; See Also Adding Objects 261 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE No Yes No No Description Add an eigenmode mode simulation region. 8.7.19 addpropagator Adds a propagator simulation object to the MODE Solutions simulation environment. Syntax addpropagator; See Also Adding Objects 261 Available in Description Add a propagator mode simulation region. © 2003 - 2012 Lumerical Solutions, Inc 272 Reference Guide FDTD Solutions MODE Solutions INTERCONNECT DEVICE No Yes No No 8.7.20 addmesh Adds a mesh override region to the simulation environment. Syntax addmesh; Description Adds a mesh override region to the simulation environment. This function does not return any data. See Also Adding Objects 261 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes No No 8.7.21 addmode Adds a mode source to the simulation environment. Syntax addmode; Description Adds source to the simulation environment. This function does not return any data. See Also Adding Objects 261 , updatesourcemode 306 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes No No © 2003 - 2012 Lumerical Solutions, Inc Scripting Language 273 8.7.22 addmodesource Adds a mode source to the simulation environment. Syntax addmodesource; Description Adds source to the simulation environment. This function does not return any data. See Also Adding Objects 261 , addmode 272 , updatesourcemode 306 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE No Yes No No 8.7.23 adddipole Adds a dipole source to the simulation environment. Syntax adddipole; Description Adds source to the simulation environment. This function does not return any data. See Also Adding Objects 261 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes No No 8.7.24 addgaussian Adds a gaussian source to the simulation environment. Syntax addgaussian; Description Adds source to the simulation environment. © 2003 - 2012 Lumerical Solutions, Inc Description Adds source to the simulation environment.7. See Also Adding Objects 261 Available in © 2003 .7. Syntax addtfsf. This function does not return any data. Syntax addplane.25 addplane Adds a plane wave source to the simulation environment. See Also Adding Objects 261 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes No No 8. See Also Adding Objects 261 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes No No 8. Inc .26 addtfsf Adds a Total Field Scattered Field (tfsf) source to the simulation environment.2012 Lumerical Solutions. Description Adds source to the simulation environment.274 Reference Guide This function does not return any data. This function does not return any data. 7. Inc . Description Adds monitor to the simulation environment. asapload 176 . Syntax addimportedsource. asapimport 177 . asapexport 176 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes No No No 8.27 addimportedsource Adds an imported source to the simulation environment. This function does not return any data. See Also Adding Objects 261 . Description Adds source to the simulation environment.2012 Lumerical Solutions. See Also Adding Objects 261 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes No No © 2003 .28 addindex Adds an index monitor to the simulation environment.Scripting Language FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes No No 275 8. This function does not return any data.7. Syntax addindex. Syntax addprofile.7. Description Adds monitor to the simulation environment.276 Reference Guide 8. Syntax addmovie.2012 Lumerical Solutions.30 addmovie Adds a movie monitor to the simulation environment. See Also Adding Objects 261 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes No No 8.29 addtime Adds a time monitor to the simulation environment. This function does not return any data. Inc .7. © 2003 . Description Adds monitor to the simulation environment.7. Syntax addtime. Description Adds monitor to the simulation environment.31 addprofile Adds a profile monitor to the simulation environment. See Also Adding Objects 261 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes No No 8. This function does not return any data. 33 createbeam Creates a new Gaussian beam that is accessible from the deck. which is by default "gaussian#" (# being the total number of Gaussian beams existing in the current deck). Only available in MODE Solutions.2012 Lumerical Solutions.7. See Also Adding Objects 261 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes No No 8.Scripting Language This function does not return any data.32 addpower Adds a power monitor to the simulation environment. Inc . The Gaussian beam has the properties specified in the Overlap analysis->Beam tab of the analysis window Returns the name of the Gaussian beam created.7. © 2003 . Description Adds monitor to the simulation environment. This function does not return any data. Description Creates a Gaussian beam in the deck/global workspace. Syntax createbeam. Syntax addpower. See Also Adding Objects 261 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes No No 277 8. See Also Adding Objects 261 Available in Description Add a constant doping region.7. Inc . 8.35 adddope Adds a region with constant doping to the simulation environment. Syntax adddevice. © 2003 .34 adddevice Adds a Device simulation region to the simulation environment.7. Syntax addconstdope.2012 Lumerical Solutions. See Also Adding Objects 261 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE No No No Yes Description Add a device simulation region.278 Reference Guide See Also Adding Objects 261 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE No Yes No No 8. Inc .Scripting Language FDTD Solutions MODE Solutions INTERCONNECT DEVICE No No No Yes 279 8.2012 Lumerical Solutions.37 addimportdope Adds a doping region to the simulation environment where the doping profile has been or will be imported into DEVICE.7. See Also Adding Objects 261 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE No No No Yes Description Add a diffusion region. © 2003 .7. 8.36 adddiffusion Adds a diffusion region to the simulation environment. Syntax adddiffusion. See Also Adding Objects 261 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE No No No Yes Description Add an import primitive to define a doping region. Syntax addimportdope. 40 addgridattribute Adds a grid attribute object to the simulation environment.7. Syntax Description © 2003 .39 addimportgen Adds a generation region to the simulation environment where the generation profile has been imported into DEVICE.2012 Lumerical Solutions.7. Syntax addbulkgen.280 Reference Guide 8. 8. 8.38 addbulkgen Adds a bulk generation region to the simulation environment. See Also Adding Objects 261 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE No No No Yes Description Add an import primitive to define a generation region. Syntax addimportgen.7. Inc . See Also Adding Objects 261 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE No No No Yes Description Add a bulk generation region. 41 addelement Adds an element from the INTERCONNECT element library to the simulation environment. type: This string defines the type of attribute to be added. 281 addgridattribute(type. etc).Scripting Language ?addgridattribute.e. orientation). where Nx.7. 9 element tensor. this command will add a compound element by default. Description Adds an element from the element library.z). etc. concentration). y. orientation). tensors.2012 Lumerical Solutions. Syntax addelement("element"). the value may be a scalar number (i. concentration). value: the attribute value. See Also Adding Objects 261 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Version 8+ No No No 8. addgridattribute(type. value: the attribute value. Outputs a list of available grid attribute types. Adds a grid attribute object to the simulation. a 3 element vector (i. 9 element tensor. and M is the size of the attribute value (scalar. Adds a grid attribute with spatially varying data. Ny. a 3 element vector (i. If no element name is given.e.y. Inc . the value may be a scalar number (i.z: Vectors that specify the position where the attribute values are specified. x.value.e. The size of the value matrix should be Nx X Ny X Nz X M… . Nz are the sizes of the position vectors.e.value). Depending on the attribute type.x. © 2003 . vector. Depending on the attribute type. etc. type: This string defines the type of attribute to be added. Add an object/objects into a group. Unselect all objects. but does not unselect currently selected objects. The same as selectpartial("partialname"). Selects any objects where partialname can be found in the name. Inc .2012 Lumerical Solutions. Selects all objects in the current group scope. Can be used to select multiple objects. sources. Deletes all objects in the current group scope. Selecting and deleting objects Command groupscope 284 deleteall 285 delete 285 selectall 286 unselectall 286 select 287 selectpartial 287 shiftselect 288 Description Changes the group scope. The same as select("name"). shiftselectpartial 289 Moving and copying objects Command move 289 copy 290 addtogroup 290 Object properties Description Move an object.8 Manipulating objects Physical structures. and the simulation volume itself are considered objects. in the current TAB.282 Reference Guide FDTD Solutions MODE Solutions INTERCONNECT DEVICE No No Yes No 8. Copy an object. Selects objects with a given name in the current group scope. Objects generally have properties that can be modified. © 2003 . but does not unselect currently selected objects. Deletes the selected objects. Can be used to select multiple objects. monitors. Set global source properties. Get global source properties. Import n and k data from a file. Clears source data for an imported source. Only applies to import primitives. Import n and k data from script variables. Only applies to import primitives.Scripting Language Command adduserprop 291 set 292 setnamed 292 setglobalmonitor 293 setglobalsource 294 runsetup 295 get 294 getnumber 296 getnamed 296 getnamednumber 297 getglobalmonitor 298 getglobalsource 298 haveproperty 299 importsurface 300 importsurface2 301 importnk 302 importnk2 304 setsourcesignal 305 updatesourcemode 306 clearsourcedata 307 Description Add a user property to a structure group. Only applies to import primitives. Controlling the view Command redraw 307 Description Redraw graphics. Force group setup scripts to run. Get a property of selected objects. Returns the number of selected objects with a particular property. Set a property of selected objects. Inc . Set global monitor properties. Only applies to import primitives. Get a property of any objects with a given name. or the selected mode for a mode source.2012 Lumerical Solutions. Updates the mode for a mode source. © 2003 . Get the number of objects with a given name. 283 Import surface data from a file. Get global monitor properties. Set a property of any objects with a given name. Import surface data from script variables. Set a custom source time signal. Get the number of selected objects. Redo command after an undo. Description returns the current group scope changes the group scope See Also Manipulating objects 282 . selectall 286 . set the groupscope to that group (i.8. Inc . A built in function to do an orbit of the perspective view with option of creating a movie. Turn automatic redraw off. Script commands that add or modify simulation object use the groupscope property to know where to act within the object tree.2012 Lumerical Solutions. turn it off or on Control how the graphics are drawn in the Layout Editor Get the current view control properties from the Layout Editor. Syntax ?groupscope. groupscope("group_name"). If you want to delete all objects in the simulation. if you want to delete everything within a particular group. Measure graphics performance of your computer. Turn automatic redraw on. :: model::my_group). Get the current status of automatic redrawing.e. 8.284 Reference Guide redrawoff 308 redrawon 308 redrawmode 309 setview 310 getview 311 orbit 311 framerate 312 Undo and redo commands Command undo 313 redo 313 Description Undo last modify object command. set the group scope the root level (i. For example.1 groupscope Changes the group scope. ::model). delete 285 . select 287 Available in © 2003 .e. 8. groupscope 284 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 8. See Also Manipulating objects 282 .Scripting Language FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 285 8. Inc . groupscope 284 Available in © 2003 . See Also Manipulating objects 282 . Description Deletes selected objects. Description Deletes all objects in the current group scope.2 deleteall Deletes all objects in the current group scope.2012 Lumerical Solutions. This function does not return any data. Syntax deleteall.3 delete Deletes selected objects.8. This function does not return any data. Syntax delete. Description Unselects all objects and groups. Syntax selectall.2012 Lumerical Solutions.8.286 Reference Guide FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 8.5 unselectall Unselect all objects and groups. See Also Manipulating objects 282 Available in © 2003 . groupscope 284 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 8. Syntax unselectall.8. Description Selects all objects in the current group scope.4 selectall Selects all objects in the current group scope. This function does not return any data. This function does not return any data. See Also Manipulating objects 282 . Inc . The group named "group name" must be in the current group scope. This function does not return any data. See Also Manipulating objects 282 . Syntax select("name"). Selects all objects with the name "name" located in the group named "group name".7 selectpartial Selects any objects with a given partial name. To select objects located in groups see the command below. Syntax selectpartial("partialname"). in the current TAB. groupscope 284 . This function does not return any data. Inc . select("group name::name").6 select Selects objects with a given name in the current group scope.8.8. Description Selects any objects where "partialname" can be found in the object name provided the object is not in a group.Scripting Language FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 287 8. Description Selects objects with the name "name" in the current group scope. unselectall 286 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 8.2012 Lumerical Solutions. A failed select command will have the same result as the unselectall command. © 2003 . shiftselect("group name:: name"). Selects any objects where "partialgroupname" can be found in the group name and "partialname" can be found in the object name. Inc . Description The same as select("name"). See Also Manipulating objects 282 . but does not unselect other currently selected objects. groupscope 284 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes © 2003 .8 shiftselect Same as select.2012 Lumerical Solutions. but does not unselect currently selected objects.288 Reference Guide selectpartial ("partialgroupname:: partialname"). Syntax shiftselect("name"). Can be used to select multiple objects. but does not unselect currently selected objects.8. See Also Manipulating objects 282 . This function does not return any data. The same as select("groupname::name"). groupscope 284 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 8. shiftselectpartial ("partialgroupname:: partialname"). Inc . Syntax move(dx). Syntax shiftselectpartial ("partialname").10 move Move selected objects. The same as selectpartial("partialgroupname::partialname") . In 3D. See Also Manipulating objects 282 .2012 Lumerical Solutions. groupscope 284 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 8. select 287 Available in © 2003 . copy 290 . Description In 2D or 3D. and dz. This function does not return any data. but does not unselect currently selected objects. dz will be ignored.dy).9 shiftselectpartial Same as selectpartial. This function does not return any data. move by dx. dy. See Also Manipulating objects 282 .8. move(dx. move by dx In 2D or 3D. but does not unselect currently selected objects. but does not unselect other currently selected objects. move(dx. move by dx and dy.dy. Can be used to select multiple objects.8.Scripting Language 289 8.dz). Can be used to select multiple objects. Description The same as selectpartial("partialname"). In 2D. copy(dx). cp (copy files) 164 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 8. Same as copy. but with a specified move of dx. dz. Same as copy.dy). If a group with name "group name" already exists. a group named "group © 2003 .2012 Lumerical Solutions.11 copy Copy selected objects. dy. move 289 . but with a specified move of dx.dy. Otherwise. The new objects will have have the same name. See Also Manipulating objects 282 .8. copy(dx. Inc . Syntax copy. select 287 . Syntax addtogroup("group name").8. Same as copy. dz is ignored.290 Reference Guide FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 8. then the objects are added to the existing group. Their position will be shifted by a default amount. Description Copy the selected objects. dy. This function does not return any data. but with a specified move of dx.dz). Description Adds selected object(s) to a group. In 2D. copy(dx.12 addtogroup Add selected objects to a group. Inc . See Also Manipulating objects 282 . This function does not return any data.2012 Lumerical Solutions. The type is an integer from 0 to 5. Description Adds a user property to a selected structure group. adduserprop 291 . addstructuregroup 265 . Syntax adduserprop("property name".13 adduserprop Add user properties to a structure group. runsetup 295 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes No Yes © 2003 . value). addgroup 264 . type. addstructuregroup 265 . See Also Manipulating objects 282 . addanalysisgroup 265 . The name is set to "property name". The corresponding variable types are 0 number 1 text 2 length 3 time 4 frequency 5 material The value of the user property is set to value.8.Scripting Language name" is created. runsetup 295 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes No Yes 291 8. and the index numbers increase as you go down the tree. haveproperty 299 . Inc .2012 Lumerical Solutions. The objects are ordered by their location in the object tree. set("property". Description Returns a list of the properties of the selected object(s). Syntax ?set.i). setmaterial 387 . value). This command will return an error in analysis mode. but acts on objects with a specific name. runsetup 295 . runanalysis 350 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 8. © 2003 . "property". It cannot be used to set the value of a selected object in a group. The uppermost selected object is given the index 1. setnamed("name". This command will return an error in analysis mode. Value can be a number or string.value.8.292 Reference Guide 8.14 set Set a property of currently selected objects. See Also Manipulating objects 282 . including pull-downs and check boxes. set("property". The same as set. except that the object name must be specified. addmaterial 386 . instead of selected objects.8. This function does not return any data. This form can be used to set the property of the ith selected object when multiple objects are selected. get 294 . This will set the properties of a currently selected object.15 setnamed Like the set command. setnamed 292 .value). Description Returns a list of the properties of the objects called name. It cannot be used to set the value of a selected object in a group. Syntax ?setnamed("name"). This command will return an error in analysis mode. 293 This form can be used to set the property of the ith named object when multiple objects have the same name. setnamed("groupname:: name". value.i). See Also Manipulating objects 282 . set 292 . The same as set. value). The objects are ordered by their location in the object tree. The objects are ordered by their location in the object tree. value). set 292 . get 294 . instead of selected objects.2012 Lumerical Solutions. See Also Manipulating objects 282 . "property".i). This form can be used to set the property of the ith object with the name "name" in the group "groupname" when multiple objects have the same name. and the index numbers increase as you go down the tree. "property". getglobalmonitor 298 . Inc . value. getnamednumber 297 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 8. getglobalsource 298 Available in © 2003 .8. This function does not return any data. but acts on objects within the group named "groupname" that are named "name". The uppermost selected object is given the index 1. setnamed("groupname:: name".Scripting Language setnamed("name". getnamed 296 . Syntax ?setglobalmonitor. and the index numbers increase as you go down the tree. setglobalsource 294 . setglobalmonitor("property". "property".16 setglobalmonitor Set global monitor properties. Description Returns a list of the global monitor properties Set the global monitor property named "property" to a value. The uppermost selected object is given the index 1. and "Hz". the real part of the effective index for the mode can be obtained. Note: Beam profiles In addition to the properties available through the Edit dialogue. getglobalsource 298 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes No No 8. to get that property. This property is named "neff". It is possible to get numeric. In addition. The property names for the get command are the same as the property names in the Edit dialogue box. Inc . planewave and mode sources."y vector".8. for mode sources.2012 Lumerical Solutions. Syntax ?setglobalsource.17 setglobalsource Set global source properties. drop down and checkbox properties."Hy". getglobalmonitor 298 ."Hx".18 get Get a property from selected objects."Ez"."z vector".8. The property names are "x vector"."Ey". This command will return an error in analysis mode. Description Returns a list of the global source properties Set the global source property named "property" to a value. value)."Ex". For example. See Also Manipulating objects 282 . © 2003 . setglobalsource("property". it is possible to get the beam profile for gaussian. setglobalmonitor 293 . string. set 292 .294 Reference Guide FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes No No 8. This function does not return any data. then you can use the command get("mesh accuracy"). if you see a property called "mesh accuracy". 19 runsetup Runsetup forces the setup scripts of structure and analysis groups to run. See Also Manipulating objects 282 .Scripting Language Syntax ?get.i). 295 Gets the requested property value from the currently selected object. depending on the property requested. If multiple objects are selected get("property") is the same as get("property". The uppermost selected object is given the index 1. Syntax Description © 2003 .2012 Lumerical Solutions. Inc . Gets the property of the ith selected object.8. Description Returns a list of the properties of the selected object(s). get("property". Use this to act on a series of objects. It cannot be used to get the property value of a selected object in a group. getnumber 296 . haveproperty 299 . It cannot be used to get the value of a selected object in a group. set 292 . and the index numbers increase as you go down the tree. runsetup 295 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 8. getnamed 296 . getnamednumber 297 . if the object has been modified. where i is the number of the first selected objects with the requested property. as group setup scripts automatically re-run at the end of script. In most cases. The objects are ordered by their location in the object tree.i). it is not necessary to use this function. out = get("property"). It is only necessary to use this function when you need to force the setup script to run before the end of your script file. Out can be a matrix or a string. Inc .20 getnumber Get the number of objects that are selected. the smallest value is returned.8. or use the form of getnamed that allows a specific object to be selected. See Also Manipulating objects 282 . Description Returns the number of objects that are selected. getnamed 296 . If multiple objects are selected. Description Returns a list of the properties of the objects called name. set 292 .21 getnamed Get a property from objects with a given name.296 Reference Guide runsetup.2012 Lumerical Solutions. and the values are different. © 2003 . get 294 .8. Syntax ?getnamed("name"). To be certain of the results. set 292 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 8. be sure that only one object is selected. Syntax out = getnumber. get 294 . getnamednumber 297 . See Also Manipulating objects 282 . Forces setup scripts of groups to run. runanalysis 350 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 8. but acts on all objects named "name" in the group "groupname". out = getnamed ("groupname::name". The same as get. "property"). and the index numbers increase as you go down the tree. set 292 . The uppermost selected object is given the index 1. i). Use this to act on a series of objects. The objects are ordered by their location in the object tree. The objects are ordered by their location in the object tree. Use this to act on a series of objects. but acts on objects with a specific name. Description The same as getnumber. The uppermost selected object is given the index 1.Scripting Language out = getnamed("name". The same as get. setnamed 292 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 8.2012 Lumerical Solutions. The same as getnumber. but acts on objects named "name" located in the group "groupname". Gets the property of the ith object named "name" located in the group "groupname". instead of selected © 2003 .22 getnamednumber Get the number of objects with a given name. get 294 . getnamednumber 297 . instead of selected objects. "property". See Also Manipulating objects 282 . out = getnamed ("groupname::name". instead of selected objects. but acts on objects with a specific name. out=getnamed("name". and the index numbers increase as you go down the tree. "property"). "property").8. out = getnamednumber ( "groupname::name"). 297 Gets the property of the ith named object. instead of selected objects. Syntax out = getnamednumber ( "name"). getnumber 296 . Inc . getnamed 296 .8. setglobalmonitor 293 . Syntax ?getglobalmonitor. Description Returns a list of the global monitor properties Returns the value of the requested property. get 294 . This command will return an error in analysis mode. setnamed 292 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 8. See Also Manipulating objects 282 . getnumber 296 . ?getglobalmonitor ("property").23 getglobalmonitor Set global monitor properties. getglobalsource 298 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes No No 8. This command will return an error in analysis mode. Syntax Description © 2003 . get 294 .8. See Also Manipulating objects 282 .2012 Lumerical Solutions. set 292 . setglobalsource 294 .24 getglobalsource Set global monitor properties. Inc .298 Reference Guide objects. get 294 . See Also Manipulating objects 282 . getglobalmonitor 298 . Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE No Yes No No Description Returns the solver that is currently active. Inc . get 294 . setglobalsource 294 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes No No 8.25 getsolver Returns the solver that is currently active. setglobalmonitor 293 .8. Syntax ?getsolver.2012 Lumerical Solutions.8. Description Returns the number of selected objects with the specified property. See Also Manipulating objects 282 . set 292 Available in © 2003 . Returns a list of the global source properties 299 ?getglobalsource("property"). Returns the value of the requested property.Scripting Language ?getglobalsource.26 haveproperty Returns the number of selected objects with a particular property. 8. Syntax out = haveproperty ("property"). upper_surface. file_units "m" x0 0 number The optional arguments x0. "cm. Parameter filename Description Import a surface from the file in the string filename in a three dimensional simulation. Inc . string The optional string argument file_units can be "m". or path relative to current working directory Default value required upper_surface 1 number This optional argument should be 1 to import the upper surface and 0 to import the lower surface. Type string Description name of the file with surface data to import.file_units. invertXY). For example. Example script files showing how to use these functions can be found in the Online Help.2012 Lumerical Solutions. upper_surface. This command only applies to import primitives. May contain complete path to file.x0.300 Reference Guide FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes No Yes 8.x0.file_units. The function returns 1 if the data is successfully imported. invertXY). Structures section. Syntax out = importsurface(filename. "microns" or "nm" to specify the units in the file. See the User Guide.y0. All arguments after filename are optional. All arguments after filename are optional. y0 and z0 specify the data origin in the global coordinates of the Graphical Layout Editor.8. "mm".27 importsurface Import surface data.z0. if you are importing a surface defined by an AFM that is on a slab of Si that © 2003 .y0. out = importsurface(filename. Import a surface from the file in the string filename in a two dimensional simulation. importsurface2 301 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes No No 8. Import a surface from the variables Y and x in two dimensional simulations. Description Import a surface from the variables Z. Inc . x and y in three dimensional simulations. Example script files showing how to use these functions can be found in the Online Help. Structures section. This command only applies to import primitives. The upper_surface argument is optional.Scripting Language ranges from 0 to 2 microns. See Also Manipulating objects 282 .2012 Lumerical Solutions.8. See the User Guide. Parameter Z © 2003 .y. Default value required Type matrix Description The two dimensional matrix that defines the surface.28 importsurface2 Import surface data from script variables. upper_surface).x. out = importsurface2(Y. The function returns 1 if the data is successfully imported. y0 z0 invertXY 0 0 0 number number 301 number The optional argument invertXY can be used to reverse how the x and y axes are read from the file. Syntax out = importsurface2(Z. you should set z0 to 2 microns. The upper_surface argument is optional. upper_surface).x. importsurface 300 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes No No 8.y0. interpolated values are incorrect. then y should have dimension Mx1. If grid values are non-uniform. Structures section.302 Reference Guide x required matrix If Z is an NxM matrix. matrix This argument should be an Nx1 matrix that defines the surface for two dimensional simulations.y. Inc . This command only applies to import primitives.k import only works for uniform x. If Z is an NxM matrix. Y required See Also Manipulating objects 282 . © 2003 . Syntax out = importnk(filename. See the User Guide.29 importnk Import the refractive index (n and k) over an entire volume or surface from a file. then x should have dimension Nx1. For two dimensional simulation. x0.reverse_index_order). All arguments after the filename are optional.2012 Lumerical Solutions. Example script files showing how to use these functions can be found in the Online Help. Note: Uniform grid The n. The function returns 1 if the data is successfully imported.z0. y upper_surface required 1 matrix number This optional argument should be 1 to import the upper surface and 0 to import the lower surface.8.z grids. if Y is an Nx1 matrix then x should have dimension Nx1.file_units. Description Import n (and k) data from filename in three dimensional simulations. reverse_index_order).0. "microns" or "nm" to specify the units in the file.file_units. importnk2 304 Available in © 2003 . Parameter filename Default value required file_units "m" string x0 0 number The optional arguments x0. "mm". All arguments after the filename are optional.y0. Type string Description name of the file with n (and k) data to import. 303 Import n and k data from filename in two dimensional simulations. y0 z0 reverse_index_order 0 0 0 See Also Manipulating objects 282 . y0 and z0 specify the data origin in the global coordinates of the Graphical Layout Editor.-5) microns. or path relative to current working directory The optional string argument file_units can be "m". x0. Inc . number number number The optional argument reverse_index_order can be set to 1 to reverse how the indices are interpreted in the file. "cm. if you defined your volume with respect to a particular point in space. then you should set z0 to -5 microns. for example (0. For example. It is best to verify the correct setting with a graphical import before using the script command.Scripting Language out = importnk(filename.2012 Lumerical Solutions. May contain complete path to file. z). Import n (and k) data from script variables in two dimensional simulations.y). Syntax out = importnk2(n.8. Note: Uniform grid The n. Description Import n (and k) data from script variables in three dimensional simulations.2012 Lumerical Solutions. All arguments are required. All arguments are required.y. if n is an NxM matrix then x should have dimension Nx1. Inc . Values of x must be uniformly spaced.y. If it is complexvalued. then the imaginary part is interpreted as k.x. interpolated values are incorrect. Example script files showing how to use these functions can be found in the Online Help.304 Reference Guide FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes No No 8.x. then y should have dimension Mx1. For two dimensional simulation. This should be an NxMxP matrix in three dimensions and an NxM matrix in two dimensions. If n is an NxMxP matrix. Default value required Type matrix Description The refractive index. out = importnk2(n. The function returns 1 if the data is successfully imported. See the User Guide.k import only works for uniform x. For Parameter n x required matrix y required matrix © 2003 .30 importnk2 Import the refractive index (n and k) over an entire volume or surface from script variables. This command only applies to import primitives. If n is an NxMxP matrix. then x should have dimension Nx1. Structures section. If grid values are non-uniform.z grids. phase). See Also Manipulating objects 282 . amplitude. z 1 number If n is an NxMxP matrix. For an example script file which uses this script command.31 setsourcesignal Sets a custom source time signal.Scripting Language 305 two dimensional simulation. If fcentre and bandwidth are not specified. and source limits. t. if n is an NxM matrix then y should have dimension Mx1. Inc . fcentre. then z should have dimension Px1. calculating the mesh. If this function is not used. Allows you to specify the precise center frequency and bandwidth that will be used for all simulations. and phase are 1D vectors with the same length. amplitude. they will be automatically estimated from the time signal. phase.8. Values of z must be uniformly spaced. the time signal will be automatically generated. Values of y must be uniformly spaced. setsourcesignal("name". a custom time signal is not required. Description Sets the time domain signal of source named "name".2012 Lumerical Solutions. Syntax setsourcesignal("name". These values are used for materials fits. amplitude. For the vast majority of simulations. t. This is an advanced source setting for users wanting a custom source time signal. bandwidth). t. see Online User Guide>Sources->Custom time signal. © 2003 . importnk 302 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes No No 8. overlap Re * E1 H 2 dS E2 * 1 H 1* dS Re E 2 1 * H2 dS E1 H See Also addmode 272 . This will ensure that the mesh has been updated before the new mode is calculated. clearsourcedata 307 dS © 2003 . NOTE: overlap The fraction of electromagnetic fields that overlap between the two modes is given by the expression below. Description Updates mode profile of the selected MODE source. Returns the fraction of electromagnetic fields that overlap between the old and the new mode NOTE: Saving simulation files before using updatesourcemode If you have a script file which updates the simulation mesh. then the mode with the highest effective index will be selected. Syntax ?updatesourcemode.306 Reference Guide See Also sourcepower 329 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes No No 8. then the mode with the best overlap with the old mode will be selected.8. It is also the fraction of power from mode2 that can propagate in mode1. If there is no mode profile stored in the source. Inc .2012 Lumerical Solutions. Note that the mode source must be selected before running this command.32 updatesourcemode Updates the mode profile of selected mode source. If a mode is already stored in the source. then you should use the save script command 161 before updating the source mode. Inc .8. or the selected mode for a mode source. See Also updatesourcemode 306 . The viewports update automatically by default. which can be convenient when emailing simulation files. This will make the file much smaller.33 clearsourcedata Clears source data for an imported source. so this command is only required after using the redrawoff command. asapexport 176 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes No No 8. Description Clears source data for the selected source.2012 Lumerical Solutions. © 2003 . Description Redraws graphics. Example Clear source data from an imported source.8. Syntax redraw.Scripting Language Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes No No 307 8. clearsourcedata.34 redraw Force the graphical viewports of the CAD to update. select("source3"). asapload 176 . asapimport 177 . This function does not return any data. Syntax clearsourcedata. 36 redrawon Enable automatic updating of the graphical viewports in the CAD.35 redrawoff Disable automatic updating of the graphical viewports in the CAD. This function does not return any data. Description Turns redrawing back on. redraw 307 .308 Reference Guide See Also Manipulating objects 282 . This can greatly increase the speed of scripts that add large numbers of objects.2012 Lumerical Solutions. Description Prevents redrawing of graphics. redrawmode 309 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes No Yes 8. so this command is only required after using the redrawoff command. This function does not return any data. See Also Manipulating objects 282 . redrawoff 308 .8. redrawmode 309 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes No Yes 8. redrawon 308 . redrawon 308 . © 2003 . Automatic updating is the default behavior.8. Inc . Syntax redrawoff. Syntax redrawon. redrawoff 308 . It can also be used to set the current status of automatic redrawing. Inc . use in=0. redraw 307 . The graphics will be redrawn after any script command that may change the properties of a graphical object. To turn it off. Description The value of out indicates if automatic redrawing is off or on out=1: automatic redrawing is on out=0: automatic redrawing is off Set the automatic redrawing off or on.37 redrawmode This command can be used to determine the current status of automatic redrawing. To turn it on. redrawmode 309 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes No Yes 309 8.2012 Lumerical Solutions.Scripting Language See Also Manipulating objects 282 . Syntax out = redrawmode. See Also Manipulating objects 282 . redrawoff 308 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes No Yes © 2003 . redraw 307 . The value of out is set after executing the command so that out=in once this command has been executed. use in=1. out = redrawmode(in).8. Description Returns a list of the view properties that can be set. Controls the relative zoom of the perspective view compared to the default level. Inc . is the same as pressing the graphical extent button. will return extent. Controls the polar angle of the perspective view. setview("property").value). The command ?setview. use setview("zoom". in degrees. getview 311 . For example.38 setview This command allows the viewing properties of the Layout Editor to be modified. zoom. value should be a 2x1. zoom theta phi See Also Manipulating objects 282 . Controls the azimuthal angle of the perspective view. Syntax outstring = setview. orbit 311 . max y. phi Sets the default value for any of the view properties. setview("property". max x. 4x1 or 6x1 matrix representing the view range min x.2012 Lumerical Solutions. min y. min z and max z respectively. redraw 307 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes No Yes © 2003 . setview("extent").2). In this case. in degrees. To zoom in by a factor of 2 in the perspective view. theta. The following table describes the properties that can be set Property extent Description Control the view extent. Sets the values to of any property for viewing.8.310 Reference Guide 8. theta. The command ?getview. phi Returns the current value of any of the view properties.40 orbit This command performs an elliptical viewing orbit of the structure in the perspective view. orbit(zoom_factor). orbit 311 . will return the current zoom setting of the perspective view relative to the default level. The properties that can be obtained with getview are described in setview 310 .Scripting Language 311 8. See Also Manipulating objects 282 .2012 Lumerical Solutions.8. For example. zoom. out = getview("property"). Syntax outstring = getview. Description Performs an orbit of the current perspective view.8.39 getview This command allows the viewing properties of the Layout Editor to be retrieved. Inc . Performs an orbit with the specified minimum zoom © 2003 . getview 311 and redraw 307 make it possible to create any type of orbit you would like in your own script file. redraw 307 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes No Yes 8. Syntax orbit. will return extent. zoom_level = getview("zoom"). Description Returns a list of the view properties that can be set. Note that the commands setview 310 . setview 310 . 41 framerate Orbits the perspective view and returns the framerate. getview 311 . setview 310 . be sure to use exactly the same simulation file.2012 Lumerical Solutions. Description num_frames .Zoom factor used in perspective view fr . "filename"). frame_rate. Performs an orbit with the specified frame rate specified in frames per second.312 Reference Guide factor. getview 311 . The default frame rate is 15. By default the zoom factor is 1.8. This can be useful for estimating your graphics performance. orbit 311 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes No No No © 2003 . zoom). Inc . See Also Manipulating objects 282 . framerate 312 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes No Yes 8. frame_rate). Syntax fr = framerate(num_frames.Number of frames to draw zoom .number of frames / wall time required to complete orbit. The orbit will be streamed to the mpeg file filename for later viewing. See Also Manipulating objects 282 . orbit(zoom_factor.5. orbit(zoom_factor. If comparing the performance of two computers. setview 310 . This function does not return any data. Description Undo last modify object command. redo 313 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 8. This function does not return any data. See Also Manipulating objects 282 .42 undo Undo the last command that modified any objects. undo 313 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes © 2003 . See Also Manipulating objects 282 .2012 Lumerical Solutions.Scripting Language 313 8. Description Redo command after previous undo. Syntax redo.43 redo Redo a command after a previous undo. you can undo the last 5 commands.8. Syntax undo. Inc .8. The options are: Variant.314 Reference Guide 8. Default value required required Type string string Description Name of the element to add a port to.) Syntax addport("element". removeport 315 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE No No Yes No © 2003 . Analyzer Input The type of data for the port. Inc . The named will be modified if there is already a port of the same name. "type". Electrical Signal. "port".44 addport Add a port to a compound/script element. Returns the name of the port that is created. "data"). (Note that this command does not apply for primitive elements.8. The type of port to add.2012 Lumerical Solutions. Digital Signal Property element port type required string data required string Manipulating objects 282 . Input. Output. Optical Signal. Name of the port to add. Description Adds a new port to the element with the specified properties. The options are: Bidirectional. Scripting Language 315 8.8.45 removeport Remove a port from a compound/script element. (Note that this command does not apply for primitive elements.) Syntax removeport("element", "port"); Description Removes "port" from "element". Returns 1 if the port is successfully removed, 0 otherwise. Manipulating objects 282 , addport 314 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE No No Yes No 8.8.46 connect Connects one element to another via the specified ports. Syntax Description connect("element1", "port1", Connects "port1" of "element1" to "element2" or "port2". "element2", "port2"); Manipulating objects 282 , disconnect 316 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE No No Yes No © 2003 - 2012 Lumerical Solutions, Inc 316 Reference Guide 8.8.47 disconnect Disconnect one element to another via the specified ports. Syntax Description connect("element1", "port1", Deletes the connection between "port1" of "element1" and "element2", "port2"); "port2" of "element2". Manipulating objects 282 , connect 315 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE No No Yes No 8.9 Running simulations Moving between tabs Command switchtolayout 264 layoutmode 264 Description Closes the analysis window and allows you to manipulate simulation objects for a new simulation. Used to determine if the simulation file is open in layout or in analysis mode. Running Simulations Command run 317 runparallel 317 addjob 318 runjobs 318 clearjobs 319 runsweep 319 Description Launch the simulation. (Options available) Launch the simulation in parallel mode. Add a simulation to the job queue. Run all simulations in the job queue. Remove all simulations from the job queue. Runs a parameter sweep or optimization task © 2003 - 2012 Lumerical Solutions, Inc Scripting Language 317 8.9.1 run Run the current simulation. When the simulation finishes, all simulation data will be saved to the current file, then the file is re-loaded. Syntax run; run(option1); Description Launch the simulation in parallel mode as defined in the resource manager. This function does not return any data. Option1 (default: 3) can be: 1: run FDTD in single processor mode avoiding any use of MPI. 2: run FDTD in single processor mode (legacy issues). Pop-up dialogs no longer take focus. 3: run FDTD in parallel mode as defined in the resource manager. See Also runparallel 317 , runanalysis 350 , addjob 318 , runjobs 318 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes No 8.9.2 runparallel Launch the simulation in parallel mode. Equivalent to run and run(3). When the simulation finishes, all simulation data will be saved to the current file. Syntax runparallel; Description Launch the simulation in parallel mode as defined in the resource manager. This function does not return any data. See Also run 317 , runanalysis 350 Available in © 2003 - 2012 Lumerical Solutions, Inc 318 Reference Guide FDTD Solutions MODE Solutions INTERCONNECT DEVICE Deprecated in Version 7. Use run. No No No 8.9.3 addjob Adds the specified simulation file to the job manager queue. Syntax addjob(filename); Description Add the simulation file "filename" to the job manager queue. See Also run 317 , runsweep 319 , runjobs 318 , clearjobs 319 , currentfilename 167 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes No Yes 8.9.4 runjobs Runs all jobs in the job manager queue. The script execution will be paused while the jobs run, then resume when all jobs complete successfully. If Job errors occur, the script will not proceed. Syntax runjobs; runjobs(option); Description Run all jobs in the Job queue. option=0: run jobs in single processor mode using only the local resource. option=1: run jobs in parallel mode using all available resources (default). See Also run 317 , runsweep 319 , addjob 318 , clearjobs 319 , save 161 , load 161 Available in © 2003 - 2012 Lumerical Solutions, Inc Scripting Language FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes No Yes 319 8.9.5 clearjobs Remove all jobs from the job manager queue. Syntax clearjobs; See Also run 317 , addjob 318 , runjobs 318 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes No Yes Description Remove all jobs from the Job queue. 8.9.6 runsweep Runs a parameter sweep or optimization task. Syntax runsweep; runsweep("taskname"); Description Runs all sweeps and optimization tasks. Runs only the sweep or optimization named taskname. See Also run 317 , getsweepdata 348 , addjob 318 , runjobs 318 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes © 2003 - 2012 Lumerical Solutions, Inc 320 Reference Guide 8.10 FDTD Measurements and Normalization These commands are used to get measurement data from sources and monitors Command transmission 321 transmission_avg 322 Description Returns the power transmission through a monitor. Returns the total spectral average power through a monitor surface, normalized to the total spectral average of the source. Returns the partial spectral average power through a monitor surface, normalized to the partial spectral average of the source. Get source angle. transmission_pavg 323 getsourceangle 323 These commands are used for normalization of FDTD data Command nonorm 324 cwnorm 325 sourcenorm 325 sourcenorm2_avg 326 Description Use no normalization. Use CW normalization. Returns the normalization used in the cwnorm state. Returns the source normalization spectrum used to normalize data in the cwnorm state for the total spectral averaged quantities Returns the source normalization spectrum used to normalize data in the cwnorm state for the partial spectral averaged quantities Returns the power injected into the simulation by a dipole source. Returns the source power. Returns the total spectral average power injected into the simulation by the source. Returns the partial spectral average power injected into the simulation by the source. Returns the source intensity. Returns the total spectral average intensity injected into the simulation by the source. sourcenorm2_pavg 327 dipolepower 328 sourcepower 329 sourcepower_avg 330 sourcepower_pavg 331 sourceintensity 333 sourceintensity_avg 333 © 2003 - 2012 Lumerical Solutions, Inc Scripting Language sourceintensity_pavg 334 321 Returns the partial spectral average intensity injected into the simulation by the source. 8.10.1 transmission The transmission function returns the amount of power transmitted through power monitors and profile monitors, normalized to the source power. A value of 0.5 means that half of the optical power injected by the source passed through the monitor. Negative values mean the power is flowing in the negative direction. The transmission is calculated with the following formula. T( f ) where 1 real P( f ) Monitor dS 2 sourcepower T(f) is the normalized transmission as a function of frequency P(f) is the Poynting vector dS is the surface normal The normalization state (cwnorm or nonorm) does not affect the result because of the source power normalization. Syntax out = transmission ( "mname"); out = transmission ( "mname", option); Description Transmission through monitor mname. It must be obvious from the shape of the monitor which axis is normal to the monitor surface. The additional argument, option, can have a value of 1 or 2. If it is 2, the data is unfolded where possible according to the symmetry or anti-symmetric boundaries if it comes from a monitor that intersect such a boundary at x min, y min or z min. The default value of option is 2. See Also sourcepower 329 , dipolepower 328 , transmission_avg 322 , transmission_pavg 323 Available in © 2003 - 2012 Lumerical Solutions, Inc 322 Reference Guide FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes No No 8.10.2 transmission_avg Returns the total spectral average power through a monitor surface, normalized to the total spectral average of the source. See the Units and normalization - Spectral averaging section for more information. Tavg where 1 real P Monitor dS total 2 sourcepower _ avg Tav g is the normalized total spectral average transmission <P> is the total spectral average Poynting vector dS is the surface normal The normalization state (cwnorm or nonorm) does not affect the result because of the source power normalization. Syntax out = transmission_avg ( "monitorname"); out = transmission_avg ( "monitorname", option); Description Returns the total spectral average transmission through monitorname. It must be obvious from the shape of the monitor which axis is normal to the monitor surface. The additional argument, option, can have a value of 1 or 2. If it is 2, the data is unfolded where possible according to the symmetry or anti-symmetric boundaries if it comes from a monitor that intersect such a boundary at x min, y min or z min. The default value of option is 2. See Also sourcepower_avg 330 , transmission 321 , transmission_pavg 323 , Units and Normalization, Spectral averaging Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes No No © 2003 - 2012 Lumerical Solutions, Inc T pavg ( f ) where 1 real P( f ) Monitor dS partial 2 sourcepower _ pavg( f ) Tpav g is the normalized partial spectral average transmission <P> is the partial spectral average Poynting vector dS is the surface normal The normalization state (cwnorm or nonorm) does not affect the result because of the source power normalization. normalized to the partial spectral average of the source. can have a value of 1 or 2. See Also sourcepower_pavg 331 . Units and Normalization.2012 Lumerical Solutions. The in-plane wavevector is chosen such that the incidence angle at the center frequency of the simulation (fSIM) will match the source angle theta (thetaSIM) specified in the source © 2003 . y min or z min. the data is unfolded where possible according to the symmetry or anti-symmetric boundaries if it comes from a monitor that intersect such a boundary at x min. Syntax out = transmission_pavg ( "monitorname" ).10. The default value of option is 2.Spectral averaging section for more information. This implies injection angle must change as a function of frequency.4 getsourceangle Broadband sources inject fields that have a constant in-plane wavevector at all frequencies.Scripting Language 323 8. If it is 2. transmission_avg 322 . The additional argument. It must be obvious from the shape of the monitor which axis is normal to the monitor surface.3 transmission_pavg Returns the partial spectral average power through a monitor surface. Inc . See the Units and normalization . out = transmission_pavg ( "monitorname". option. option ). transmission 321 .10. Spectral averaging Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes No No 8. Description Returns the partial spectral average transmission through monitorname. Syntax nonorm. See Also sourcepower 329 .10.5 nonorm Do not normalized the data to the source power. Description Use no normalization. The actual field intensities will be used in all calculations. This function controls the checkbox located in Settings . Units and Normalization Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes No No © 2003 . f is a vector of frequencies (Hz). f). (f) a sin sin( SIM ) f SIM f Syntax theta = getsourceangle ( "sourcename".324 Reference Guide properties. while lower frequencies will be injected at larger angles.2012 Lumerical Solutions. Description Returns the source angle theta (degrees) as a function of frequency. See Also cwnorm 325 . Higher frequencies will be injected at smaller angles. Inc . This 'theta vs wavelength' plot in the beam source edit window shows the same function.Normalization state. This function does not return any data. Online Help-User Guide-Sources-Broadband injection angles Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes No No 8. out = sourcenorm(f. If the source time signal of the jth source in the simulation is s j(t). name). Syntax cwnorm.6 cwnorm Use CW normalization. Units and Normalization Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes No No 8. Description Use CW normalization. This function controls the checkbox located in Settings .10. It also converts the units of all electromagnetic fields to be the same as in the time domain. (f is the frequency in Hz) This function makes it possible to perform the normalization using the spectrum of one source. rather than the sum of all the sources. This function does not return any data. See the Units and normalization chapter for more information.Scripting Language 325 8. Most users prefer to do their analysis in the CW normalization state. since it removes any effect caused by the finite pulse length of the source. All simulation data will be normalized to the injected source power. See Also nonorm 324 . and N is the number of active sources then s( ) sourcenorm ( ) 1 N exp i t s j (t )d sources Syntax out = sourcenorm(f). Inc . © 2003 .Normalization state.2012 Lumerical Solutions.10.7 sourcenorm Returns the source normalization spectrum used to normalize data in the cwnorm state for standard fourier transform quantities. Description Returns the source normalization used to normalize data in the cwnorm state at the vector of frequency points f. Description This function returns the source normalization for total spectral averaged quantities. Units and Normalization. nonorm 324 . See Also sourcenorm 325 . The script function sourcenorm is defined as s( ) sourcenorm ( ) 1 exp i t s j (t )d N sources If sourcenorm2_avg is called without any arguments. it returns sourcenorm 2 _ avg s( ' ) d ' 2 Syntax out = sourcenorm2_avg. Inc .10.326 Reference Guide See Also sourcenorm2_avg 326 . cwnorm 325 . cwnorm 325 . See the Units and normalization . sourcenorm2_pavg 327 . Units and Normalization Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes No No 8.Spectral averaging section for more information. sourcepower 329 .2012 Lumerical Solutions. sourcenorm2_pavg 327 .8 sourcenorm2_avg Returns the source normalization spectrum used to normalize data in the cwnorm state for the total spectral averaged quantities. rather than the sum of all the sources. out = sourcenorm2_avg ( "sourcename"). nonorm 324 . This function makes it possible to perform the normalization using the spectrum of one source. sourcepower_avg 330 . Spectral averaging Available in © 2003 . If the source time signal of the jth source in the simulation is s j(t). Inc . rather than the sum of all the sources. See Also sourcenorm 325 . hi ( .Spectral averaging section for more information. Delta is the FWHM of |h|2. ' ) s ( ' ) d ' 2 2 Syntax out = sourcenorm2_pavg( f. Description This function returns the source normalization for partial spectral averaged quantities. This function makes it possible to perform the normalization using the spectrum of one source.Scripting Language FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes No No 327 8. © 2003 . nonorm 324 . sourcenorm2_avg 326 .2012 Lumerical Solutions. See the Units and normalization . delta. cwnorm 325 . ' ) d ' 1 If this function is called without any arguments. and N is the number of active sources then s( ) sourcenorm ( ) 1 exp i t s j (t )d N sources Partial spectral averaging uses a Lorentzian weighting of the following form. ' ) 2 2 1 2 ( ') 2 ( / 2) 2 h( . sourcepower_pavg 331 . "sourcename"). out = sourcenorm2_pavg( f.9 sourcenorm2_pavg Returns the source normalization spectrum used to normalize data in the cwnorm state for the partial spectral averaged quantities.10. it returns sourcenorm 2 _ pavg h( . delta). Inc . nonorm 324 . In contrast. sourcepower 329 will return the power that an ideal dipole would radiate in a homogeneous material. out = dipolepower(f. sourcepower 329 . (f in Hz) This option allows you to obtain the power radiated by a single dipole.10. rather than the sum of all dipoles. cwnorm 325 . Units and Normalization Available in © 2003 . /500. In 3D simulations. Please contact support@lumerical. The dipolepower script command returns the power that was injected into the simulation region. transmission 321 . name).328 Reference Guide Units and Normalization. See Also sourcenorm 325 . Spectral averaging Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes No No 8.com for more assistance if you are using a dipole in dispersive medium. it may be necessary to measure this quantity using a small box of power monitors surrounding the dipole. Description Returns the amount of power radiated by the dipole source. If the mesh step is the order of. and would like to calculate the total power emitted by the dipole. sourcepower_avg 330 . and is equivalent to measuring the power transmitted out of a small box surrounding the dipole. dipolepower and sourcepower are equivalent for dipoles in a homogeneous medium. This option is only needed for simulations with multiple dipoles. Syntax out = dipolepower(f). sourcepower_pavg 331 . and Watts/Hertz 2 if no norm is used. at frequency points f. or in a fine mesh region. then the results of this function are not reliable. or smaller than. If the dipole is injected into a dispersive medium with a non-zero imaginary part of the refractive index. Advanced notes: There can be some numerical errors in this calculation that become significant when small mesh sizes are used.10 dipolepower Returns the power injected into the simulation region by a dipole source. the units will be in Watts if cw norm is used.2012 Lumerical Solutions. the sourcepower script function returns the power an ideal dipole source will radiate in a homogeneous medium. this means your simulation is not setup properly. The only exception is if the simulation is setup such that there is radiation which travels through the injection plane of the source in the source injection direction (pink arrow).Scripting Language FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes No No 329 8. changing the actual radiated power. In 3D simulations. see the Dipoles . sourcepower gives the amount of power injected into the simulation.10. The actual radiated power is NOT given by the sourcepower function. For additional information. the actual amount of power injected by the source will not be given by sourcepower. the sourcepower is P ( f ) Source determined from the equation below.Radiated Power page in the User Guide). In almost all cases. The actual radiated power is highly dependant on the surrounding materials. Inc . Syntax out = sourcepower(f). Description Returns the source power used to normalize transmission © 2003 . see the dipolepower 328 script function. This quantity can be calculated analytically (see Dipoles . To get the actual radiated power. since the reflections from the structures will interfere with the fields from the dipole. and the integral is computed over the injection region of the source.Radiated Power page in the User Guide. For point sources (dipole). sourcepowernonorm ( f ) 1 real P ( f ) Source dS 2 sourcepowercwnorm ( f ) 1 real P ( f ) Source dS 2 2 sourcenorm For simulations using beam sources. plane wave) and mode sources. For beam sources (Gaussian. the units will be in Watts if CW norm is used. In such cases.2012 Lumerical Solutions.11 sourcepower Returns the power that an ideal source would inject into homogeneous material. and Watts/Hertz 2 if no norm is used. Note that is the Poynting vector determined by the fields that an ideal source would have in a homogeneous material. See the Units and normalization .Spectral averaging section for more information. nonorm 324 . © 2003 . The default value of option is 2. transmission 321 . If it is 2. Inc . Units and Normalization Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes No No 8. sourcepower_avg 330 . the data is unfolded where possible according to the symmetry or anti-symmetric boundaries if it comes from a monitor that intersect such a boundary at x min. sourceintensity 333 . Typically. y min or z min. option. The additional argument. can have a value of 1 or 2. rather than the sum of all sources. (f is the frequency in Hz) out = sourcepower(f. This script function calculates the following quantities. option. option). See Also sourcenorm 325 .10. name).2012 Lumerical Solutions.12 sourcepower_avg Returns the total spectral average power injected into the simulation by the source. out = sourcepower(f. and =2 f.330 Reference Guide calculations at the vector of frequency points f. sourcepower_pavg 331 . dipolepower 328 . cwnorm 325 . s(w) is returned by sourcenorm. This option allows you to obtain the spectrum of one source. This option is only needed for simulations with multiple sources. depending on whether the normalization state is cwnorm or nonorm: sourcepower _ avgnonorm 0 sourcepowernonorm( )d s ( ) sourcepowercwnorm ( )d 2 sourcepower _ avgcwnorm ( f ) 0 s( ) d 0 2 where sourcepower is the quantity returned by the sourcepower script function. Also see the sourcenorm2_pavg script function. this function should be used in the cwnorm state. y min or z min. The additional argument. out = sourcepower_avg (option). can have a value of 1 or 2. out = sourcepower_avg (option. cwnorm 325 . the data is unfolded where possible according to the symmetry or anti-symmetric boundaries if it comes from a monitor that intersect such a boundary at x min. depending on whether the normalization state is cwnorm or nonorm: sourcepower _ pavgnonorm ( f ) h( . ' ) d ' 1 This script function calculates the following quantities. Units and Normalization.2012 Lumerical Solutions. Spectral averaging Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes No No 8. ' ) 2 2 1 2 ( ') 2 ( / 2) 2 h( . nonorm 324 . transmission_avg 322 . This option allows you to obtain the spectrum of one source. option. sourceintensity_avg 333 . sourcepower 329 . If it is 2. rather than the sum of all sources.13 sourcepower_pavg Returns the partial spectral average power injected into the simulation by the source. sourcepower_pavg 331 . The default value of option is 2.Spectral averaging section for more information. This option is only needed for simulations with multiple sources. See the Units and normalization . "sourcename"). Inc . Description 331 Returns the spectrally averaged source power as defined above.10. See Also sourcenorm2_avg 326 . ' ) sourcepowernonorm ( )d 2 © 2003 . Partial spectral averaging uses a Lorentzian weighting of the form hi ( .Scripting Language Syntax out = sourcepower_avg. sourcepower 329 . both in Hz. This option allows you to obtain the spectrum of one option. Syntax out = sourcepower_pavg(f. sourceintensity_pavg 334 . Typically. The additional argument. rather than the sum of all sources.option). transmission_pavg 323 . Description Returns the spectrally averaged source power as defined above. out = sourcepower_pavg(f. can have a value of 1 or 2. this function should be used in the cwnorm state. nonorm 324 . ' ) s ( ) sourcepowercwnorm ( ' )d ' sourcepower _ pavgcwnorm ( f ) 0 2 2 h( . Units and Normalization. If it is 2. cwnorm 325 . source. df). The quantity f is the frequency and the quantity df is the frequency range around which the averaging is performed.2012 Lumerical Solutions. 2 2 out = sourcepower_pavg(f. The default value of option is 2.df. Inc . y min or z min. See Also sourcenorm2_pavg 327 . df. "sourcename"). Spectral averaging Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes No No © 2003 . Also see the sourcenorm2_pavg script function.332 Reference Guide h( . the data is unfolded where possible according to the symmetry or anti-symmetric boundaries if it comes from a monitor that intersect such a boundary at x min. sourcepower_avg 330 . ' ) s ( ' ) d ' 0 where sourcepower is the quantity returned by the sourcepower script function. This option is only needed for simulations with multiple sources. s(w) is returned by sourcenorm. and =2 f. option. option. can have a value of 1 or 2. transmission 321 . Description Returns the source intensity at the vector of frequency points f (f is the frequency in Hz). sourceintensity_pavg 334 . sourcepower 329 . name). In 3D simulations. Syntax out = sourceintensity_avg. the units will be in Watts/m2 if CW norm is used. out = sourceintensity(f. The average intensity is equal to the average power divided by the source area. This function is often used when normalizing power measurements from simulations with a TFSF source. rather than the sum of all the sources. Syntax out = sourceintensity(f). This function makes it possible to perform the normalization using the spectrum of one source.15 sourceintensity_avg Returns the total spectral average intensity injected into the simulation by the source. Units and Normalization 37 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes No No 8. cwnorm 325 . sourceintensity_avg 333 . option. If it is 2. Inc . and Watts/m2/Hertz 2 if No norm is used. can have a value of 1 or 2. option). See the sourcepower_pavg 331 command and the Units and normalization . out = sourceintensity(f. See Also sourcenorm 325 . The default value of option is 2. the data is unfolded where possible according to the symmetry or anti-symmetric boundaries if it comes from a monitor that intersect such a boundary at x min.Spectral averaging section for more information.Scripting Language 333 8.10. out = sourceintensity_avg Description Returns the spectrally averaged source intensity as defined above. The additional argument. The additional argument. nonorm 324 . option. y min or z min. dipolepower 328 .10.2012 Lumerical Solutions.14 sourceintensity Sourceintensity returns the source power divided by the area of the source. © 2003 . The default value of option is 2. both in Hz. y min or z min. nonorm 324 . Syntax out = sourceintensity_pavg (f. y min or z min. The additional argument. out = sourceintensity_pavg(f. option. option). normalization using the spectrum of one source. the data is unfolded where possible according to the symmetry or anti-symmetric boundaries if it comes from a monitor that intersect such a boundary at x min. See the sourcepower_pavg 331 command and the Units and normalization . sourceintensity 333 . The quantity f is the frequency and the quantity df is the frequency range around which the averaging is performed. df. can have a value of 1 or 2. If it is 2.16 sourceintensity_pavg Returns the partial spectral average intensity injected into the simulation by the source. The partial average intensity is equal to the partial average power divided by the source area. sourcepower 329 . This function makes it possible to perform the normalization using the spectrum of one source. This function makes it possible to perform the df. transmission_avg 322 . "sourcename"). See Also © 2003 . cwnorm 325 . The default value of option is 2. Units and Normalization 37 . rather than the sum of all the sources.df).334 Reference Guide (option). Inc . option. "sourcename"). Spectral averaging Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes No No 8. If it is 2.2012 Lumerical Solutions. rather than the sum of all the sources. See Also sourcenorm2_avg 326 . out = sourceintensity_avg (option. Description Returns the spectrally averaged source power as defined above. out = sourceintensity_pavg(f.10. the data is unfolded where possible according to the symmetry or anti-symmetric boundaries if it comes from a monitor that intersect such a boundary at x min.Spectral averaging section for more information. mesh 336 . Spectral averaging Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes No No 335 8. findmodes 337 .2 getanalysis Set calculation parameters in MODE Solutions analysis window. sourcepower_avg 330 . Description Lists all the parameters in the analysis window. See Also Measurements 347 . please see the MODE Solutions Knowledge Base for more information.Scripting Language sourcenorm2_pavg 327 .2012 Lumerical Solutions. getanalysis 335 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE No Yes No Yes 8. cwnorm 325 .11 Eigenmode Solver Measurements This section is only relevant for MODE Solutions.11.1 setanalysis Set calculation parameters in MODE Solutions analysis window. nonorm 324 . Sets"property" to value. Inc . value). Units and Normalization. transmission_pavg 323 . sourcepower 329 . 8. frequencysweep 338 . analysis 336 . Syntax Description © 2003 . Syntax ?setanalysis.11. setanalysis("property". Description opens the analysis window corresponding to the active solver. Description Mesh the current simulation. setanalysis 335 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE No Yes No Yes 8. Syntax analysis. findmodes 337 . See Also Measurements 347 . setanalysis 335 . frequencysweep 338 . © 2003 .3 analysis Opens the MODE Solutions analysis window corresponding to the active solver. getanalysis Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE No Yes No No 335 8.336 Reference Guide ?getanalysis. Returns the current value for the particular property on the analysis window See Also Measurements 347 . getanalysis("property").11. mesh 336 .2012 Lumerical Solutions. runanalysis 350 . Produces a dcard called "material" which contains the material properties of the meshed object.4 mesh Produces a mesh of the current structure that is required to perform a subsequent calculation (either to calculate the modes. or to perform a frequency sweep). Inc . Syntax mesh. Lists all the parameters in the analysis window.11. analysis 336 . The selectmode command will select the Nth mode in the mode table. Description where N is the number of the desired mode.2012 Lumerical Solutions. propagate 341 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE No Yes No No 8.6 selectmode All modes found in a simulation are numbered based on their effective index. This function is the script equivalent to the calculate modes button. They are displayed in the mode table of the Analysis tab. mesh 336 . © 2003 . See Also setanalysis 335 . where name is a string containing the name of a mode. The D-CARD saves data such as effective index and mode profile. Inc . where X is the xth mode found. coupling 338 . Syntax selectmode(N). frequencysweep 338 . selectmode(name). bestoverlap 340 . mesh 336 . findmodes 337 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE No Yes No No 8. selectmode 337 .11.5 findmodes Calculates the modes supported by the structure using the current calculation settings.11. Syntax n=findmodes. Description n will be equal to the number of modes found.Scripting Language 337 See Also setanalysis 335 . overlap 339 . Each mode will be saved as a D-CARD named "modeX". mode2. PowerCoupling a 2 Here 'a' is the ratio of the basis state coefficients. Produces a D-CARD called "frequencysweep" that contains dispersion. . effective index.11.7 frequencysweep Performs a frequency sweep using the current settings within the frequency analysis tab.338 Reference Guide Modes are named mode1. findmodes 337 . Inc .modeN. and other data for as a function of frequency. mesh 336 . See Also setanalysis 335 . The full formula for a can be found in the following reference: © 2003 .8 coupling The coupling function calculates the complex coupling coefficient between two modes.11. findmodes 337 . frequencysweep 338 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE No Yes No No 8. mesh 336 . selectmode 337 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE No Yes No No 8.. or by the following formula. This form of the command is compatible with the bestoverlap 340 function See Also setanalysis 335 . Description Perform a frequency sweep with the current settings. This function does not return any data. The power coupling can be calculated with the overlap function.2012 Lumerical Solutions. Syntax frequencysweep. x. then the power coupling will be equal to the overlap. y). overlap Re * E1 H 2 dS E2 * 1 H 1* dS Re E 2 1 * H2 dS E1 H dS Power Coupling: Measures the amount of power that can couple from mode2 into a forward propagating wave with the mode profile of mode1. findmodes 337 . London.11. Therefore. See the overlap function for more details about overlap and coupling calculations. Chapman & Hall. mode1).2012 Lumerical Solutions. Love. coupling 338 . England. Description mode2. Syntax out = coupling(mode2. Snyder and John D. x offset y offset See Also copydcard 351 . The modes on each side of the interface will © 2003 . mode1. Inc . Overlap: Measures the fraction of electromagnetic fields that overlap between the two modes. If the two modes have the same effective index. overlap 339 . out = coupling(mode2.9 overlap Calculates the overlap and power coupling between two modes. mode1: the mode names out: the coupling coefficient Mode alignment can be adjusted before coupling is calculated. Only available in MODE Solutions. bestoverlap 340 . 1983. the power coupling is always less than or equal to the overlap. Optical Waveguide Theory. propagate 341 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE No Yes No No 8. A dielectric interface is a simple example.Scripting Language 339 Allan W. This is also the fraction of power from mode2 that can propagate in mode1. The remaining power that can propagate in this mode will couple into the backwards propagating mode. bestoverlap 340 . Inc . This is due to reflections caused by the index change at the interface. y. Description mode2. See the overlap function for more details about overlap and coupling calculations. Syntax out = bestoverlap ("test_mode"). x. but the power coupling will be less than one. x offset y offset z offset The offset is applied to the second mode listed. Syntax out = overlap(mode2.10 bestoverlap Finds the best overlap between the D-CARD called "test_mode" and the currently calculated modes. mode1: the mode names out(1): the mode overlap out(2): the mode power coupling Mode alignment can be adjusted before overlap is calculated.2012 Lumerical Solutions. out: a string containing the name of the mode with the best overlap test_mode: a string containing the name of a D-CARD © 2003 . It returns the name of the mode with the best overlap.11. coupling 338 . England. Chapman & Hall. London. These calculations are based on the methods described in Snyder and Love "Optical Waveguide Theory". 1983. out = overlap(mode2.z).340 Reference Guide have an overlap of 1. findmodes 337 . This function is mainly used for tracking the desired mode during parameter sweeps. Description Calculates the best overlap. mode1). See Also copydcard 351 . mode1. propagate 341 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE No Yes No No 8. 2012 Lumerical Solutions. overlap 339 . d. The resulting modes are then added coherently to give the final mode profile. Each supported mode is then propagated through the waveguide.11. Inc . See the overlap function for more details about overlap and coupling calculations.11 propagate The propagate command calculates the resulting mode profile of an arbitrary mode after it has propagated through a waveguide for some distance. n1. 8. n2. please see the INTERCONNECT Knowledge Base for more information.12 INTERCONNECT Measurements This section is only relevant for INTERCONNECT. x. n1. y). This is done by decomposing the mode into modes supported by the waveguide. propagate 341 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE No Yes No No 341 8. d. Syntax out = propagate(mode. n2).Scripting Language mode See Also findmodes 337 . x offset y offset out = propagate(mode. © 2003 . Description mode: the name of the d-card containing the mode to propagate d: distance to propagate n1: minimum index n2: maximum index out: the name of the D-CARD created by the propagate command A D-CARD with the name out will be created that contains the resulting mode profile Mode alignment can be adjusted before propagate is calculated. coupling 338 . the selected analyzer will be updated. Note that this command is not available from the script prompt or script file editor. See Also validateall 342 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE No No Yes No 8. If the name is not provided. Syntax validateall.12.12.2 validateall Updates the results for all the analyzers in the current simulation.342 Reference Guide 8. Syntax Description © 2003 . Syntax validate("analyzer"). Inc .1 validate Updates the results for the specified analyzer.2012 Lumerical Solutions. See Also validate 342 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE No No Yes No 8.12.3 setresult Sets the result of a scripted/compound element. Description Updates the results for "analyzer". Description Updates the results for all the analyzers in the current simulation. See Also getresult 350 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE No No Yes No 343 Sets the "result" for the scripted/compound element to the specified value.y.x.value. y parameters of the "result" for the scripted/ compound element.4 getresult See getresult 350 ."x title". setresult("result". cloneportdata 344 . Sets the x. See Also pushportdata 344 ."kind (unit)").value). Syntax data_out = popportdata ('input_port").'y title'). 8. Description Returns the first available data value from "input_port". setresult("result". Inc . Sets the "result" for the scripted/compound element to the specified value with the given description.2012 Lumerical Solutions. 8.5 popportdata Extract the first available data value from the input port. Note that units should be placed in parenthesis.12. portdatasize 344 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE No No Yes No © 2003 . This is useful for visualization.12.Scripting Language setresult("result". Syntax size = portdatasize Description Returns the number of data values available at the input © 2003 . Inc .12. See Also popportdata 343 . Description Clones "data_source".344 Reference Guide 8. returns the data destination. portdatasize 344 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE No No Yes No 8.2012 Lumerical Solutions. cloneportdata 344 .7 cloneportdata Clones an existing data value.8 portdatasize Returns the number of data values available at the input port.12. portdatasize 344 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE No No Yes No 8. Description Sends the data value to "output_port".12. data). Syntax data_destination = cloneportdata(data_source).6 pushportdata Sends the data value to the specified output port. pushportdata 344 . See Also popportdata 343 . Syntax pushportdata("output_port". setsparameter("output_port". it is assume that the angle values are zero. value). The number of rows of the matrix is the number of frequency points. columns: frequency (Hz).12.9 setsparameter Sets the s-parameters between output port and input port. Sets the s-parameter between "output_port" and "input_port". The number of rows of the matrix is the number of frequency points. where the transmission is a matrix with 3 transmission). amplitude and angle (rad). transmission). where the transmission is a matrix with 3 columns: frequency (Hz). "input_port". Sets the s-parameter between "output_port" and "input_port". "mode_2". setsparameter ("output_port". "constant". Inc . "mode_2". Syntax Description setsparameter("output_port". port. Sets the s-parameter between "mode_1" at "output_port" and "mode_2" at "input_port". pushportdata 344 ."mode_1". setsparameter ("output_port". independent). If only two columns are provided. it is assume that the angle values are zero. 345 See Also popportdata 343 .Scripting Language ("input_port"). "transmission". © 2003 .2012 Lumerical Solutions. If only two columns are provided. "input_port". "constant". Sets the s-parameter between "mode_1" at "output_port" and "mode_2" at "input_port" as a single complex constant value (frequency independent). cloneportdata 344 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE No No Yes No 8. "input_port". amplitude and angle (rad). "input_port" as a single complex constant value (frequency value). "transmission"."mode_1". "propagation". length). Description Initialize a FIR filter (with the specified number of taps) using the current s-parameters. Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE No No Yes No 8. "input_port". Sets the s-parameter between "mode_1" at "output_port" and "mode_2" at "input_port". "mode_2". absorption (dB/m). "hamming". between between "output_port" and "input_port"."mode_1". Sets the frequency dependent propagation parameters "input_port". Group velocity and dispersion are optional.346 Reference Guide setsparameter("output_port". propagation is a matrix with up to 5 columns columns: frequency (Hz). The length (m) is the propagation length. group velocity (m/s) and disperstion (m/s/s). setsparameter ("output_port". "propagation". Syntax setfir("window". where the propagation. "hanning". Group velocity and dispersion are optional. The options are: "rectangular". group velocity (m/s) and disperstion (m/s/s). "window" is the window function used by the FIR. length). The number of rows of the matrix is the number of frequency points. absorption (dB/m).2012 Lumerical Solutions. Inc . The number of rows of the matrix is the number of frequency points.taps). The length (m) is the propagation length. effective index.12. effective index.10 setfir Initialize a FIR filter using the current s-parameters. propagation. See Also setsparameter 345 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE No No Yes No © 2003 . where the propagation is a matrix with up to 5 columns columns: frequency (Hz). Scripting Language 347 8. and should be saved separately in an ldf file. and to determine the types of data available within each data structure. Data obtained from analysis The following commands are used to take inventory of which data structures exist. Inc . D-cards can be: Local: This means that they are a generated by the current simulation (or by running analysis scripts in the current simulation) and will be lost when switching back to layout mode. as well as mode data in MODE Solutions' Eigenmode Solver) is stored within data structures called d-cards that are either created by the user or created automatically to record and store appropriate calculation data. Command Description © 2003 . Runs the analysis script in analysis objects Used to see if there is any data stored within a dcard. Clears d-card data obtained by running analysis scripts. Command getdata 349 getelectric 353 getmagnetic 354 read and write data to file 354 Description Gets specific data from a d-card.2012 Lumerical Solutions. Clears a d-card. Creates a copy of a d-card. Get |E|2 Get |H|2 Read and write data to a file. The following commands are used for datasets.13 Measurement and optimization data Measurement data (monitor and analysis data in FDTD Solutions and MODE Solutions' Propagator. or shows the data contained in a specific d-card. Command getdata 349 runanalysis 350 havedata 351 copydcard 351 cleardcard 353 clearanalysis 352 Description Provides a list of existing d-cards. The following commands are used to retrieve data from d-cards. Global: This means that they persist until deliberately cleared with a call to cleardcard. Global d-cards are not saved with the file. Parameter sweep/optimization data is global.Best figure of merit obtained during sweep bestParameter . Adds an attribute to an existing dataset. Description Returns names of all sweep or optimization objects.348 Reference Guide rectilineardataset 354 matrixdataset 355 addparameter 356 addattribute 356 getresult 350 getparameter 357 getattribute 357 Creates a empty rectilinear dataset associated with the coordinates x/y/z. Creates an empty matrix dataset. out = getsweepdata ("sweep_name". Gets the dataset results from a monitor or analyzer.Parameter which corresponds to bestFom paramHistory .2012 Lumerical Solutions. use the savedata script command. Note: copydcard and cleardcard will not work with the sweep or optimization data. Returns all the names of the available data which is stored in the sweep or optimization object. ". It is saved with the simulation file and is not cleared when switching the current simulation to layout mode.Figure of merit history (for each generation there will be generation size number) bestFom . Returns parameter sweep or optimization data. ?getsweepdata ("sweep_name").Figure of merit as a function of generation fomHistory . The following data can be obtained from an optimization: fomTrend . "data").13. Syntax ?getsweepdata. To save sweep data to a lumerical data file. Get a parameter from an existing dataset.ldf". 8.1 getsweepdata Gets data from a parameter sweep or optimization. Get an attribute from an existing dataset. Adds a parameter to an existing dataset. Data can be obtained from the sweeps using the following script command: Command getsweepdata 348 Description Returns parameter sweep or optimization data.Parameter history © 2003 . Inc . y min or z min. getmagnetic 354 . out = getdata( "dcard". option.13. getsweepdata 348 © 2003 . can have a value of 1 or 2. For example. Option 1 will return a singleton value of 0 for the field component in that dimension. and option 2 will return a matrix (composed of zeros) that matches the size of the other field components. getelectric 353 . See Also Measurements 347 . Gets data from a monitor. The default value of option is 2. you can use Ex = getdata("monitor1". Syntax ?getdata. runsweep 319 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 349 8. For Propagator simulations in MODE Solutions."Ex"). "dataname"). havedata 351 . the data is unfolded where possible according to the symmetry or anti-symmetric boundaries if it comes from a monitor that intersect such a boundary at x min. If it is 2. Remember to run the simulation before using getdata. Inc . "dataname". The optional argument. nonorm 324 . cwnorm 325 . this command returns both parameters and results. Returns list of of data within the simulation object. See Also getdata 349 . this options also allow users to choose whether to expand the data to the correct size for dimensions where the field component is zero.2012 Lumerical Solutions. Description Returns names of all objects with data.Scripting Language For a parameter sweep. savedata 174 . ?getdata("monitor") out = getdata( "monitor". option). to get the Ex field data from monitor1.2 getdata Get data from the simulation. to re-run a script. All the dataset and scalar matrix results will be returned in this case. ". Inc . addattribute 356 . first clear data using clearanalysis. Syntax ?getresult("monitor_name"). Syntax runanalysis.3 getresult Gets the dataset results from a monitor or analysis group. R = getresult("monitor_name Returns the result R from the monitor.13. getattribute 357 . visualize 259 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Version 8+ No Yes No 8. This function does not return any data.2012 Lumerical Solutions.13. Note: Scripts that already have data are not re-run. matrixdataset 355 . For getting results that are scalar matrices.350 Reference Guide Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 8.4 runanalysis Runs the analysis script in analysis objects." operator 219 . Description Returns the names of all the results for the monitor. © 2003 . "."R"). see getdata 349 . See Also rectilineardataset 354 . Runs the analysis script in the analysis object named runanalysis("group name"). R is a dataset. Description Runs the analysis scripts in all analysis objects in the simulation file. havedata("name". getdata 349 . See Also run 317 . and 0 if it does not have any raw data. Description Returns 1 if any of the d-cards currently in memory have raw data.13. havedata("name"). clearanalysis 352 . This function does not return any data. Syntax Description © 2003 .6 copydcard Will create a global copy of any d-card currently in memory. Syntax havedata. See Also Measurements 347 . copydcard 351 . cleardcard 353 .2012 Lumerical Solutions."data"). havedata 351 .5 havedata Used to see if there is any data stored within a d-card (note that only raw data is considered here. runsetup 295 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 351 8. this does not include expanded data or calculated data from the monitors).Scripting Language "group name". and 0 if none of the d-cards have any raw data. Returns 1 if the d-card named "name" has raw data. and 0 if it does not have any raw data. workspace 189 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes No Yes 8. getdata 349 .13. Inc . Returns 1 if the d-card named "name" has the raw data named "data". havedata 351 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes No Yes © 2003 .). runanalysis 350 . switchtolayout 264 . clearanalysis( "name1".352 Reference Guide copydcard( "name"). See Also Measurements 347 . copydcard( "name".. "name2". This function does not return any data. Note: The analysis object results are calculated with the runanalysis command. Inc . Clears data from specific analysis objects. the new name will be ":: global_name".2012 Lumerical Solutions. Description Clears analysis object results. The new name will be "::newname". cleardcard 353 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes No No 8. havedata 351 . This function does not return any data. Will create a global copy of any d-card currently in memory called "name". By default. getdata 349 . Syntax clearanalysis. This data is also cleared by switching from Analysis Mode to Layout Mode.7 clearanalysis Clears analysis object results. .13.. See Also Measurements 347 . Will create a global copy of any d-card currently in memory called "name". "newname"). This function does not return any data. Clears any number of specified d-cards. Description Returns |Ex|2+|Ey|2+|Ez|2 from the monitor.Scripting Language 353 8. "name2". option. havedata 351 .. it returns | Ex|2+|Ey|2+|Ez|2. The optional argument. y min or z min. i. getelectric( "monitorname".13. Description Clears all the global d-cards. Syntax out = getelectric ( "monitorname").e. The default value of option is 2.. Syntax cleardcard. cwnorm 325 . Inc .9 getelectric Returns the sum of the amplitude squares for all electric field components.13. the data is unfolded where possible according to the symmetry or anti-symmetric boundaries if it comes from a monitor that intersect such a boundary at x min.8 cleardcard Clears global d-cards. option). cleardcard( "name1". See Also Measurements 347 . Only global d-cards are cleared. Local d-cards are associated with the current simulation and can only be cleared by switching from Analysis Mode to Layout Mode.2012 Lumerical Solutions. If it is 2.). getmagnetic 354 . can have a value of 1 or 2. nonorm 324 Available in © 2003 . See Also Measurements 347 . . copydcard 351 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes No No 8. getdata 349 . 13. The default value of option is 2. it returns | Hx|2+|Hy|2+|Hz|2. If it is 2. For datasets that are not associated with the x/y/z coordinates (ex. see matrixdataset 355 . The optional argument. the data is unfolded where possible according to the symmetry or anti-symmetric boundaries if it comes from a monitor that intersect such a boundary at x min. option.10 getmagnetic Returns the sum of the amplitude squares for all magnetic field components.e.12 rectilineardataset Creates an empty rectilinear dataset that is associate with the x/y/z coordinates (ex.11 Read and write data to files Please see the following section for file I/O commands. y min or z min.13. option). System level commands: File input and output 156 8. rectilinear datasets can be parameterized. nonorm 324 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes No No 8. Description Returns |Hx|2+|Hy|2+|Hz|2 from the monitor. See Also Measurements 347 .354 Reference Guide FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes No No 8.13. can have a value of 1 or 2. i. Syntax out = getmagnetic ( "monitorname"). cwnorm 325 . © 2003 . and can contain an arbitrary number of attributes (see addattribute) 356 and parameters (see addparameter) 356 . getmagnetic ( "monitorname". Inc .2012 Lumerical Solutions. transmission as a function of frequency). getelectric 353 . getdata 349 . Like matrix datasets. E and H fields). addparameter 356 .13 matrixdataset Creates an empty matrix dataset. Creates a empty rectilinear dataset named "dataset_name" associated with the coordinates x/y/z. Matrix datasets differ from standard matrices in that they can be parameterized. Creates an empty dataset with the name "dataset_name". Description Creates a empty rectilinear dataset associated with the coordinates x/y/z. See Also matrixdataset 355 . For datasets that are associated with the x/y/z coordinates (ex. addattribute 356 .2012 Lumerical Solutions.13. and can contain an arbitrary number of attributes (see addattribute) 356 and parameters (see addparameter) 356 . Description Creates an empty dataset. addparameter 356 .y. addattribute 356 . E and H fields).Scripting Language 355 Syntax rectilineardataset(x. visualize 259 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Version 8+ No No No © 2003 . rectilineardataset(" dataset_name").z). see rectilineardataset 354 . Inc . Syntax matrixdataset. matrixdataset(" dataset_name"). See Also rectilineardataset 354 . visualize 259 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Version 8+ No No No 8. a_3). Inc . a_1. matrixdataset 355 .13. Here. R.356 Reference Guide 8. p2). visualize 259 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Version 8+ No No No © 2003 . p1. R. p). Adds the attribute a to the existing dataset R. Adds the parameter1 p1 and p2 to the existing dataset R.addparameter("p_name". "p2_name". addattribute 356 . Syntax Description R. a). Adds the vector attribute a_vector to the existing dataset R. The components of the vector are a_1.addparameter("p1_name". visualize 259 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Version 8+ No No No 8. addparameter 356 . a_2.addattribute("a_vector". Syntax R. a_2 and a_3 See Also matrixdataset 355 . For example. Description Adds the parameter p to the existing dataset R.15 addattribute Adds an attribute to an existing dataset.14 addparameter Adds a parameter to an existing dataset. rectilineardataset 354 .addattribute("a_name". addattribute 356 .13. p1 and p2 must be interdependent. p1 = frequency and p2 = wavelength.2012 Lumerical Solutions. Parameters that are not interdependent must be added separately. Retrieves the attribute a from the existing dataset R.Scripting Language 357 8. result "Parameter" is a scalar matrix. The result "Attribute" is a scalar matrix. Parameter = R. The result "Attribute" is a scalar matrix.getattribute ("a")." operator 219 . matrixdataset 355 . getparameter 357 . rectilineardataset 354 . The result "Parameter" is a scalar matrix. Syntax ?getattribute(R).getparameter Retrieves the parameter p from the existing dataset R."a"). Attribute = getparameter (R.13. Inc . visualize 259 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Version 8+ No No No © 2003 . Description Returns the names of all the parameters in the dataset R. Attribute = R. Retrieves the attribute a from the existing dataset R.17 getattribute Get an attribute from an existing dataset. Retrieves the parameter p from the existing dataset R.16 getparameter Get a parameter from an existing dataset. Syntax ?getparameter(R). ". ".13. getattribute 357 . The ("p"). visualize 259 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Version 8+ No No No 8. Description Returns the names of all the attributes in the dataset R. getresult 350 ." operator 219 . rectilineardataset 354 .2012 Lumerical Solutions. Parameter = getparameter (R. matrixdataset 355 ."p"). getresult 350 . Ey and Ez. Projects a given power or field profile monitor to the far field. Farfieldvector3d is identical to farfield3d. farfieldangle 365 farfield3d 367 farfieldvector3d 368 For 2D simulations. Calculates the far field at any specified position. Farfieldpolar3d is identical to farfield3d. For 3D simulations. farfieldux 369 farfielduy 370 farfieldspherical 370 farfieldexact2d 372 farfieldexact3d 373 For 3D simulations. corresponding to the data in farfield2d. Farfieldpolar2d is identical to farfield2d. where the last index refers to Ex. however the data is returned as matrix of Nx1x3. It should be used when the near fields at the edge of the monitor are small but not precisely zero. where the last index refers to Er. Inc . It returns the matrix of ux corresponding to the data in farfield3d. It returns the matrix of angles.2012 Lumerical Solutions. Farfieldvector2d is identical to farfield2d. E and E . E and Ez.358 Reference Guide 8. It returns the matrix of uy corresponding to the data in farfield3d. Ey and Ez. where the last index refers to Ex. Interpolates far field projection data from E(ux. where the last index refers to Er. however the data is returned as matrix of Nx1x3. in degrees.14 Near to far field projections Far field projections 359 Command farfieldfilter 362 Description The far field filter is used to remove ripples in the far field projection due to clipping of the near fields. however the data is returned as matrix of NxMx3.phi). Calculates the far field at any specified position. in cylindrical coordinates. farfield2d 363 farfieldvector2d 364 farfieldpolar2d 365 farfieldpolar3d 369 © 2003 .uy) to E(theta. Projects a given power or field profile monitor to the far field. however the data is returned as matrix of NxMx3. in spherical coordinates. we typically project the field as a function of angle into the half-space above the surface.2012 Lumerical Solutions.Scripting Language farfieldexact 374 359 Similar to farfieldexact2d and farfieldexact3d. In this case. Inc . This projection © 2003 . The far field projections can be performed in two cases: Case 1 The electromagnetic fields are known on a surface. It is necessary to surround the scattering object with 6 surface monitors and add the results of 6 projections coherently using an exact far field projection.14. This will be accurate when The electromagnetic fields are zero at the edges of the surface used for the projection. Symmetric and anti-symmetric boundaries can be used in the simulation because the data is unfolded prior to performing the projection. This projection is slow because it does not make use of ffts. The surface is one unit cell of a periodic structure and periodicity is assumed in the far field projection. The field can be projected to any point in the half-space above the surface (z>0). Case 2 The electromagnetic fields are known on the surface of a box. for example at z=0. The field can be projected to any point outside the box. however the far field is only evaluated at positions explicitly specified by the vector list.1 Far field projections FDTD/MODE Solutions allows you to perform projections of the near field electromagnetic field to the far field with simple script commands. Calculates the integral of the far field projection over some range of theta in 2D simulation Calculates the integral of the far field projection over a specified cone in 3D simulation farfield2dintegrate 366 farfield3dintegrate 371 8. This projection is fast because it can make use of ffts to perform the projection. This projection cannot be used to calculate the fields at an intermediate distance of a few wavelengths. We then normalize to the original source power. Electric field scaling 2D Electric field intensity scaling E ( R) E0 / R E (r ) 2 E (1) r 2 3D E ( R) E0 / R E (r ) 2 E (1) r2 2 Power Integrals We often want to integrate power over a given solid angle in the far field. There are 2 ways this can be done 1. when calculating vector far field field data (to obtain polarization information). Also. © 2003 . you can choose to return the data using cartesian or spherical coordinates. please see the Coordinate systems page. We calculate the Poynting vector in the far field and integrate the power over a given solid angle. which is what the far field projections typically return. we can use plane wave relationships between E and H. We integrate the fraction of total electric field intensity (|E|2) over the solid angle that we are interested in. Coordinate Systems The 3D far field projections use the direction cosine coordinate system to specify far field positions.360 Reference Guide can be used to calculate the fields as close as a few wavelengths from where they were recorded. Field normalization The far field projection functions return either the complex electric field E or electric field intensity |E|2 at a distance of 1m. For more information. Therefore the Poynting vector is simply P n 0 0 E 2 Both methods will give the same result. In the far field. To scale the field to a different distance we can recognize that the E and |E|^2 scale as shown in the following table.2012 Lumerical Solutions. Inc . 2. and multiply by the normalized power transmission through the monitor in the near field. Direction cosine units provide a convenient way to specify locations on a hemispherical surface. © 2003 . farfieldpolar3d 369 .14. farfield2d 363 . The direction cosines of a vector (ux . Direction cosine units are a convenient way to specify locations on a hemispherical surface. 361 See Also Near to far field projections 358 . you can choose either cartesian or spherical coordinates. farfieldpolar2d 365 .uz) are the cosines of the angles between the vector and the three coordinate axes. Direction cosines are related to the spherical coordinate system by the following equations: ux uy uz uz sin( ) cos( ) sin( ) sin( ) cos( ) 2 2 1 ux uy 2 2 ux uy u z2 1 r 1 acos(u z ) atan( uy ux ) When calculating vector field information. farfieldvector2d 364 . farfieldexact3d 373 .2012 Lumerical Solutions.2 Coordinate systems The far field and grating functions use the direction cosine coordinate system to specify far field locations. please see Allen Taflove. Computational Electromagnetics: The Finite-Difference Time-Domain Method. Inc . Boston: Artech House. farfield3d 367 . Grating calculations 376 8.Scripting Language For more information on Far field projections. depending on which function you call. farfieldvector3d 368 .uy . which is how the far field data is usually returned. Coordinate systems 361 . (2005). farfieldexact2d 372 . It should be used when the near fields at the edge of the monitor are small but not precisely zero. ) R 2 sin( )d d where P is the poynting vector and R is the radius. The far field filter has a single input parameter. u y ) R 2 d d cos du x du y Care must be taken to avoid numerical errors due to the cos( ) term.uy ).14. When changing integration variables from ( .362 Reference Guide Cartesian coordinates Spherical coordinates Note on performing integrals We typically want to perform integrals in spherical coordinates such as the following power P ( . it can be shown that power P( .Grating calculations 376 8. See Also Far field projections 359 .3 farfieldfilter The far field filter is used to remove ripples in the far field projection due to clipping of the near fields. This filter is applied to all far field projections. ) R 2 sin P(u x . © 2003 . ) to (ux .2012 Lumerical Solutions. Inc . By default. it is 0. which turns the filter off. which is a number between 0 and 1. which will lead to ripples in the far field projection. The filter parameter defines the width of the filter by the following formula: =(a)/(a+b).2012 Lumerical Solutions. direction). the field does not go to zero at the edge of the monitor.Scripting Language 363 The bumpy blue line of the figure shows the near field electric field that will be used for a far field projection. Syntax E2 = farfield2d("mname". illumination. f. Description Projects a given power or field profile monitor to the far field. Syntax out = farfieldfilter. n. © 2003 . Note: Periodic structures The far field filter option should not be used for periodic structures. Description Get the current far field filter setting. Set the current far field filter setting. See Also farfield2d 363 . Set it to zero when using the 'assume periodic' option. periods. farfieldfilter(alpha). Inc .4 farfield2d Projects a given power or field profile monitor to the far field. The electric field intensity |E|2 is returned. farfield3d 367 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes No No 8. In this case. ensuring they go to zero.14. index. The green line shows the the spatial filter that will be applied to the fields. Inc . Syntax out = farfieldvector2d Description Returns the cartesian complex electric fields. but it returns the complex electric fields. Ey and Ez which are the complex components of the electric field vector.14. farfieldangle 365 . farfield3d 367 . Direction: this can be +1 or -1.364 Reference Guide Parameter mname f n illumination required optional optional optional Default value Type string Description Name of the monitor Index of the desired frequency point. The data is returned as matrix of Nx3. Same © 2003 . 1 2000 1 number number number periods index optional optional 1 value at monitor center direction of max power flow number number direction optional number See Also Far field projections 358 . farfieldexact 374 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes No No 8.5 farfieldvector2d The function farfieldvector2d is similar to farfield2d. where the last index refers to Ex. farfieldvector2d 364 . The number of points in the far field. For periodic structures Gaussian illumination: 1 Plane wave illumination: 2 number of periods to be used The index of the material to use for the projection. farfieldpolar2d 365 . farfieldexact2d 372 .2012 Lumerical Solutions. farfieldfilter 362 . rather than field intensity. 2012 Lumerical Solutions.. where the last index refers to Er. E and Ez. It returns the matrix of angles. rather than field intensity. farfieldvector2d 364 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes No No 8. this function gives precisely the result of farfieldvector2d because the only non-zero field component is Ez.14. Same arguments as farfield2d.. Description Returns the polar complex electric fields.).. See Also farfield2d 363 . but it returns the complex electric fields. Inc . This is required because the projection does not use a set of linearly spaced angles for the projection. The data is returned as matrix of Nx3. in degrees.Scripting Language ( "mname". Syntax out = farfieldpolar2d ( "mname". corresponding to the data in farfield2d.6 farfieldpolar2d The function farfieldpolar2d is similar to farfield2d.). For TM simulations. See Also farfield2d 363 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes No No arguments as farfield2d.14..7 farfieldangle Used for 2D simulations.. Syntax theta = farfieldangle Description Returns the matrix of angles corresponding to the data in © 2003 . It is often useful to re-interpolate the data onto a set of linearly spaced angles using the interp or spline functions.. 365 8. in cylindrical coordinates. index). this function integrates the far field projection over some range of theta. Inc .2012 Lumerical Solutions. The number of points in the far field. but the integral is done in radians. Default value Type Description © 2003 . n. halfangle. See Also farfield2d 363 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes No No 8. Parameter mname f n index required optional optional optional 1 2000 value at monitor center farfield2d Default value Type string number number number Description Name of the monitor from which far field is calculated Index of the desired frequency point. 2 E ( )d Syntax out = farfield2dintegrate (E2.366 Reference Guide ( "mname". Angles are specified in degrees. f. Parameter Description Integrate 2D far field projection data.8 farfield2dintegrate Used in 2D simulations. theta. theta0). The index of the material to use for the projection.14. Syntax out = farfield3d("mname". Center angle (in degrees) theta of the integration region. The number of points in the far Parameter mname f na © 2003 .9 farfield3d Projects a given power or field profile monitor to the far field. farfieldangle 365 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes No No 8. For directions. farfield2d 363 .14. periodsb. illumination. na. Must have same length as theta0 or length 1. Must have same length as halfangle or length 1.Scripting Language E2 theta halfangle required required optional 90 matrix matrix vector E field data from farfield2d Theta from farfieldangle 367 Half angle (in degrees) of the integration region. direction). 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 Default value required optional optional 1 150 Type string number number Description Name of the monitor Index of the desired frequency point. Inc . theta0 optional 0 vector See Also Near to far field projections 358 .f. nb. periodsa. Description Projects a given power or field profile monitor to the far field.2012 Lumerical Solutions. index. The electric field intensity |E|2 is returned. . Same arguments as farfield3d. The data is returned as matrix of NxMx3.2012 Lumerical Solutions.368 Reference Guide field.). © 2003 . periodsa periodsb index optional optional optional 1 1 value at monitor center direction of max power flow number number number direction optional number See Also Far field projections 358 . rather than field intensity. farfieldpolar3d 369 . Syntax out = farfieldvector3d ( "monitorname". Ey and Ez. Gaussian illumination: 1 Plane wave illumination: 2 number of periods to be used for periodic illumination number of periods to be used for periodic illumination The index of the material to use for the projection. nb illumination optional optional 150 1 number number The number of points in the far field.. farfieldvector3d 368 . Inc . but it returns the complex electric fields. farfield2d 363 . See Also Description Returns the cartesian complex electric fields. farfieldfilter 362 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes No No 8.14. where N and M are spatial indices and the last index refers to Ex. For periodic structures.. The components Ex. farfieldux 369 . Ey and Ez are the complex components of the electric field vector.10 farfieldvector3d The function farfieldvector3d is similar to farfield3d. Direction: this can be +1 or -1. farfielduy 370 . farfieldexact3d 373 . f. It returns the matrix of ux corresponding to the data in farfield3d.. E and E . in spherical coordinates.nb. Same arguments as farfield3d. index). Description See farfield3d help. The data is returned as matrix of NxMx3. Description Returns the spherical complex electric fields.. When projecting in x: ux corresponds to y y: ux corresponds to x z: ux corresponds to x Syntax farfieldux("mname".2012 Lumerical Solutions. Syntax out = farfieldpolar3d ( "monitorname".. See Also farfield3d 367 .Scripting Language farfield3d 367 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes No No 369 8. farfieldvector3d 368 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes No No 8.na. but it returns the complex electric fields. Inc .14. E and E are the complex components of the electric field vector. The components Er.).12 farfieldux Used for 3D simulations.14. © 2003 . Arguments are same as for farfield3d.11 farfieldpolar3d The function farfieldpolar3d is similar to farfield3d. where N and M are spatial indices and the last index refers to Er. rather than field intensity. 370 Reference Guide See Also farfield3d 367 , farfielduy 370 , farfieldspherical 370 , farfieldexact 374 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes No No 8.14.13 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 farfielduy("mname",f,na,nb, index); Description See farfield3d help. Arguments are same as for farfield3d. See Also farfield3d 367 , farfieldux 369 , farfieldspherical 370 , farfieldexact 374 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes No No 8.14.14 farfieldspherical This functions interpolates far field data (3D simulations) from E(ux,uy) to E(theta,phi). The far field projections functions generally return the projection as a function of ux,uy (direction cosines). farfieldspherical can be used to interpolate this data into the more common units of theta, phi. Syntax out = farfieldspherical( E2, ux, uy, theta, phi); Description interpolate far field data to spherical coordinates. © 2003 - 2012 Lumerical Solutions, Inc Scripting Language Parameter E2 ux uy theta phi required required required required required Default value Type matrix vector vector vector vector Description E field data from farfield3d ux data from farfieldux uy data from farfielduy 371 theta vector, in degrees. Must have length L or 1. phi vector, in degrees. Must have length L or 1. See Also Far field projections 358 , farfield3d 367 , farfieldux 369 , farfielduy 370 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes No No 8.14.15 farfield3dintegrate Used in 3D simulations, this function integrates the far field projection over a cone centered at theta0 and phi0, with a width specified by halfangle. The far field electric field is a function of the direction cosines (ux,uy), but farfield3dintegrate automatically does the change of variables. Similarly, angles are specified in degrees, but converted to radians before the integral is calculated. E 2 ux, uy sin( )d d , Syntax out = farfield3dintegrate (E2, ux, uy, halfangle, theta0, phi0); Parameter Description Integrate 3D far field projection data. Default value Type Description © 2003 - 2012 Lumerical Solutions, Inc 372 Reference Guide E2 ux uy halfangle required required required optional 90 matrix vector vector vector E field data from farfield3d ux data from farfieldux uy data from farfielduy half angle of the integration cone. unit in degrees. must have length L or 1. center angle theta of the integration cone. unit in degrees. must have length L or 1. center angle phi of the integration cone. unit in degrees. must have length L or 1. theta0 optional 0 vector phi0 optional 0 vector See Also Near to far field projections 358 , farfield3d 367 , farfieldux 369 , farfielduy 370 , farfieldspherical 370 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes No No 8.14.16 farfieldexact2d This function projects complete complex vector fields to specific locations. It is expected to be correct down to distances on the order of one wavelength. The projections from multiple monitors can be added to create a total far field projection. farfieldexact2d projects any surface to the grid points defined by the vectors x, y. The data is returned in the form of a matrix that is of dimension NxMx3 where N is the length of the x vector, M is the length of the y vector and the final index represents Ex, Ey, and Ez. Note that N and M can be 1; when they are both 1, the function is the same as farfieldexact. Syntax out = farfieldexact2d ( "mname", x, y, f, index); Description Projects a given power or field profile monitor to the far field at grid points specified by the vectors x,y. © 2003 - 2012 Lumerical Solutions, Inc Scripting Language 373 Parame ter mname x y f index required required required optional optional Default value Type string vector vector Description name of the monitor from which far field is calculated x coordinates of the grid points where far field is calculated y coordinates of the grid points where far field is calculated 1 index at monitor center number Index of the desired frequency point. number The index of the material to use for the projection. See Also farfield2d 363 , farfieldexact3d 373 , farfieldexact 374 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes No No 8.14.17 farfieldexact3d The three dimension form of farfieldexact2d. This function projects complete complex vector fields to specific locations. It is expected to be correct down to distances on the order of one wavelength. The projections from multiple monitors can be added to create a total far field projection. farfieldexact3d projects any surface to the grid points defined by the vectors x,y and z. The data is returned in a matrix of dimension NxMxKx3 where N is the length of the vector x, M the length of the vector y, K is the length of the vector z and the final index represents Ex, Ey, and Ez. Note that N, M and K can be 1, and when they are all 1, the function is the same as farfieldexact. Syntax Description out = farfieldexact3d Projects a given power or field profile monitor to the far field ( "mname", x, y, z, f, index); at grid points specified by the vectors x,y,z. © 2003 - 2012 Lumerical Solutions, Inc 374 Reference Guide Parameter mname x y z f index required required required required optional optional Default value Type string vector vector vector Description name of the monitor from which far field is calculated x coordinates of the grid points where far field is calculated y coordinates of the grid points where far field is calculated z coordinates of the grid points where far field is calculated Index of the desired frequency point. The index of the material to use for the projection. 1 value at monitor center number number See Also farfield3d 367 , farfieldexact2d 372 , farfieldexact 374 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes No No 8.14.18 farfieldexact This function projects complete complex vector fields to specific locations. It is expected to be correct down to distances on the order of one wavelength. The projections from multiple monitors can be added to create a total far field projection. farfieldexact projects any surface fields to a series of points defined by vector lists. The x,y, z coordinates of each evaluation point are taken element-by-element from the vector lists. i. e., the i-th point in a 2D simulation would be at [x(i),y(i)]. 3D Vectors lists x,y,z must have the same length L or be length 1. The data is returned in a matrix of dimension Lx3. The first index represents positions defined by one element from © 2003 - 2012 Lumerical Solutions, Inc Scripting Language 375 each of x,y, z. [x(i),y(i),z(i)]; the second index represents Ex, Ey, and Ez. 2D Vector lists x, y must have the same length L or be length 1. The data is returned in the form of a matrix that is of dimension Lx3. The first index represents positions defined by one element from each of x,y. [x(i),y(i)]; The second index represents Ex, Ey, and Ez. Syntax Description out = farfieldexact("mname", 2D far field exact projection x, y, f, index) out = farfieldexact("mname", 3D far field exact projection x, y, z, f, index); Parameter mname x Default required required Default value Type string vector Description name of the monitor from which far field is calculated x coordinates of points where far field is calculated. must have length L or 1. y coordinates of points where far field is calculated. must have length L or 1. z coordinates of points where far field is calculated. must have length L or 1. Index of the desired frequency point. The index of the material to use for the projection. y required vector z required vector f index optional optional 1 value at monitor center number number See Also farfield2d 363 , farfield3d 367 , farfieldexact2d 372 , farfieldexact3d 373 Available in © 2003 - 2012 Lumerical Solutions, Inc 376 Reference Guide FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes No No 8.15 Grating projections Grating calculations 376 Command grating 378 gratingn 379 gratingm 379 gratingpolar 380 gratingvector 381 gratingperiod1 382 gratingperiod2 382 gratingbloch1 384 gratingbloch2 385 gratingu1 383 gratingu2 384 gratingangle 383 Description Returns the strength of all physical grating orders. Returns vector of integers corresponding to data from grating function. Returns vector of integers corresponding to data from grating function Returns the relative strength of all physical grating orders in spherical coordinates. Returns the relative strength of all physical grating orders in Cartesian coordinates. Returns grating period ax. Returns grating period ay. Returns bloch vector (k in)x . Returns bloch vector (k in)y . Returns first component of the unit vector ux . Returns first component of the unit vector uy . Returns the angle of each order. 8.15.1 Grating calculations The grating functions are used to calculate the direction and intensity of light reflected or transmitted through a periodic structure. The order directions of a 2D grating can be calculated from the well known grating equation m a x sin m sin i For our purposes, it's more convenient to re-write this equation in terms of the wave vector k: © 2003 - 2012 Lumerical Solutions, Inc Scripting Language 377 (km ) x (kin ) x m 2 ax In 3D, these equations become: ( k n, m ) x ( k n, m ) y (kin ) x (kin ) y n 2 ax 2 ay m where ax and ay are the grating periods in the x and y directions respectively and (n,m) are any integers where the condition | k n, m | k 2 index / o is satisfied. It's important to remember that the grating order directions are defined entirely by the device period, the source wavelength and angle of incidence, and the background refractive index. The grating order directions can be calculated without running a simulation, however the simulation must first be meshed in order to obtain necessary information such as the dimensions and period of the structure. The functions gratingn, gratingm, gratingu1, gratingu2 and gratingangle can be used to calculate the direction of each order. After running a simulation the grating commands can be used to calculate the fraction of power that is scattered in each direction. The grating function uses a technique similar to a far field projection to calculate what fraction of near field power propagates in each grating order direction. To get polarization and phase information, use gratingpolar and gratingvector. Coordinate Systems The grating projections use the direction cosine coordinate system to specify far field positions. Direction cosine units provide a convenient way to specify locations on a hemispherical surface, which is how the grating data is returned. Also, when calculating vector field data (to obtain polarization information), you can choose to return the fields using cartesian or spherical coordinates. For more information, please see the Coordinate systems page. © 2003 - 2012 Lumerical Solutions, Inc Results are normalized such that the sum of all the orders is equal to 1. gratingperiod1 382 . gratingvector 381 © 2003 .2012 Lumerical Solutions. gratingpolar 380 . Direction: this can be +1 or -1. gratingbloch1 384 . gratingn 379 .2 grating Returns the relative strength of all physical grating orders for a given simulation. Parameter monitorname f index required optional optional 1 value at monitor center direction of max power flow Default value Type string number number Description name of the monitor from which far field is calculated Index of the desired frequency point. Inc . gratingperiod1 382 . gratingbloch1 384 . multiply the grating results by the power transmission at that frequency. 3D simulations: Data is returned in a N x M matrix where N. To normalize to the source power. gratingvector 381 8. The index of the material to use for the projection. Coordinate systems 361 . Grating calculations 376 . Returns the strength of all physical grating orders from f. direction optional number See Also Grating projections 376 . gratingn 379 . index. For more information on these calculations. Computational Electromagnetics: The Finite-Difference Time-Domain Method. (2005). grating 378 .378 Reference Guide The grating function is closely related to far field projection functions. gratingu1 383 . monitorname. See Also Far field projections 359 . Boston: Artech House. direction ). gratingangle 383 . gratingpolar 380 .15. please see Allen Taflove. gratingu1 383 .M are the number of grating orders. 2D simulations: Data is returned in a N matrix where N is the number of grating orders. The result corresponds to the fraction of power that is reflected or transmitted into a particular order. Syntax Description out = grating("monitorname". gratingangle 383 . ).. Only used in 3D simulations. gratingm 379 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes No No 8.. Grating calculations 376 . Grating calculations 376 . Syntax out = gratingn ( "monitorname". Inc . corresponding to the values returned by grating..15. gratingn 379 Available in © 2003 . See the Grating calculation page for more information. grating 378 . Description Same arguments as grating function. Syntax out = gratingm ( "monitorname". See Also Grating projections 376 ..2012 Lumerical Solutions.. m. n. corresponding to the values returned by grating.4 gratingm Returns the vector of integers. grating 378 .3 gratingn Returns the vector of integers.Scripting Language 379 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes No No 8. See Also Grating projections 376 .15. See the Grating calculation page for more information.).. Description Same arguments as grating function. M are the number of grating orders. 2D simulations: Data is returned in a N x 3 matrix where N is the number of grating orders. 3D simulations: Data is returned in a N x M x 3 matrix where N. Output is in spherical coordinates. gratingbloch1 384 . Parameter mname f index required optional optional Default value Type string Description name of the monitor from which far field is calculated Index of the desired frequency point.2012 Lumerical Solutions.380 Reference Guide FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes No No 8. Ephi. except that the vector field information is returned in spherical coordinates. gratingperiod1 382 . gratingvector 381 © 2003 . Inc . Very similar to the basic grating function. gratingu1 383 . gratingangle 383 . Returns the strength of all physical grating orders from the f. Syntax Description out = gratingpolar( "mname". Etheta. The second dimension is Er.15. Etheta. This is useful when studying the polarization effects. direction). index. The index of the material to use for the projection. gratingn 379 . The result corresponds to the fraction of power that is reflected or transmitted into a particular order. Direction: this can be +1 or -1. monitor. Results are normalized such that the sum of all the orders is equal to 1. 1 value at monitor center direction of max power flow number number direction optional number See Also Grating projections 376 . Grating calculations 376 . grating 378 . Ephi.5 gratingpolar Returns the relative strength of all physical grating orders for a given simulation. The third dimension is Er. 2D simulations: Data is returned in a N x3 matrix where N is the number of grating orders. Inc . index. Parameter mname f index required optional optional 1 value at monitor center direction of max power flow Description Returns the strength of all physical grating orders from monitorname. The second dimension is Ex. The third dimension is Ex. Ez.2012 Lumerical Solutions. Syntax out = gratingvector ( "mname".M are the number of grating orders.Scripting Language 381 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes No No 8. Results are normalized such that the sum of all the orders is equal to 1. direction). Ez. 3D simulations: Data is returned in a N x M x3 matrix where N. direction optional number See Also © 2003 . Ey.15. This is useful when studying the polarization effects. Direction: this can be +1 or -1. Very similar to the basic grating function. The result corresponds to the fraction of power that is reflected or transmitted into a particular order. The index of the material to use for the projection. Ey. Default value Type string number number Description name of the monitor from which far field is calculated Index of the desired frequency point.6 gratingvector Returns the relative strength of all physical grating orders for a given simulation. f. except that the vector field information is returned in Cartesian coordinates. Output is in Cartesian coordinates. . Description Same arguments as grating function.382 Reference Guide Grating projections 376 .).7 gratingperiod1 Returns the grating period ax based on the value from the simulation area. grating 378 . Grating calculations 376 .8 gratingperiod2 Returns the grating period ax based on the value from the simulation area.). gratingpolar 380 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes No No 8. See Also Grating projections 376 . gratingangle 383 . gratingbloch1 384 . grating 378 . See the Grating calculation page for more information.. gratingperiod1 382 .. Syntax out = gratingperiod2 ( "monitorname". Inc .15.. gratingperiod1 382 Available in © 2003 . Grating calculations 376 . . See Also Grating projections 376 . grating 378 . gratingu1 383 . See the Grating calculation page for more information. Syntax out = gratingperiod1 ( "monitorname". gratingn 379 . Grating calculations 376 . Description Same arguments as grating function. gratingperiod2 382 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes No No 8.2012 Lumerical Solutions.15.. Only used in 3D simulations. grating 378 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes No No 8.. gratingu2 384 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes No No © 2003 .15. See Also Grating projections 376 .).. grating 378 . Syntax out = gratingangle ( "monitorname".2012 Lumerical Solutions. See the Grating calculation page for more information. See Also Grating projections 376 .Scripting Language FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes No No 383 8. Grating calculations 376 . See the Grating calculation page for more information. .10 gratingu1 Returns first component of the unit vector (ux ) corresponding to the values returned by grating. Syntax out = gratingu1 ( "monitorname". Description Same arguments as grating function.). Description Same arguments as grating function. Inc . in degrees.. Grating calculations 376 ..15. .9 gratingangle Returns the angle of each order corresponding to the values returned by grating. Only available for 2d simulations. See the Grating calculation page for more information.384 Reference Guide 8. Inc . Only used in 3D simulations. Syntax out = gratingbloch1 ( "monitorname". Grating calculations 376 . ..2012 Lumerical Solutions.11 gratingu2 Returns first component of the unit vector (uy ) corresponding to the values returned by grating. See the Grating calculation page for more information.12 gratingbloch1 Returns the value of the bloch vector (k in)x used for the calculation. Description Same arguments as grating function. Grating calculations 376 . grating 378 . . Syntax out = gratingu2 ( "monitorname". Description Same arguments as grating function. gratingu1 383 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes No No 8. See Also Grating projections 376 .15. based on the value for the simulation area.. gratingbloch2 385 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes No No © 2003 .). See Also Grating projections 376 .15... grating 378 .). Command addmaterial 386 copymaterial 386 setmaterial 387 getmaterial 387 getindex 388 getfdtdindex 388 getmodeindex 389 Description Adds a new material into the material database. Inc .2012 Lumerical Solutions. Copies an existing material in the material database Sets any property of an existing material in the material database.15. as well as to set any material property and verify the resulting complex index of a given material at any frequency.. Description Same arguments as grating function.). gratingbloch1 384 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes No No 8. . grating 378 . Returns the complex index of a material. Returns properties of a material in the material database. See Also Grating projections 376 . Only used in 3D simulations. Returns the material index as it will be in an actual FDTD simulation.Scripting Language 385 8.16 Material database The following commands are used to add or copy materials in the material database. based on the value for the simulation area. Grating calculations 376 .13 gratingbloch2 Returns the value of the bloch vector (k in)y used for the calculation. Returns the material index as it will be in an actual © 2003 .) Please see the chapter on the material database to understand the usage of these commands. Syntax out = gratingbloch2 ( "monitorname".. See the Grating calculation page for more information. (The permittivity can be easily obtained by squaring the index. Inc .16.2012 Lumerical Solutions. The new name is returned.16. Syntax out = copymaterial ("materialname"). setmaterial 387 . getindex 388 . See Also Material database 385 . Description Creates a copy of the material "materialname". Adds a new material and returns the name of the new material. The argument "materialtype" is has to match correct string exactly. Description Displays all types of materials that can be added into the material database. setmaterial 387 . getfdtdindex 388 Available in © 2003 . out = addmaterial ("materialtype").1 addmaterial Adds a new material to the material database. See Also Material database 385 . getindex 388 .2 copymaterial Makes a copy of a material in the material database. Syntax ?addmaterial. taking into account the effect of finite size of dt in an FDTD simulation. getfdtdindex 388 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes No Yes 8. getnumericalpermittivity 390 An advanced function that returns permittivity.386 Reference Guide MODE simulation. 8. depending on the property in the © 2003 .Scripting Language FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes No Yes 387 8. Description Displays the property names of the specified material that can be modified. Syntax ?getmaterial ( "materialname"). The arguments "propertyname" and "materialname" have to match correct string exactly. setmaterial( "materialname". For example.4). See Also Material database 385 . will set the property "mesh order" of the materials "Si" to 4. Inc . out = getmaterial ( "materialname". addmaterial 386 .16.2012 Lumerical Solutions. Returns the property named "propertyname" of the material with the name "materialname".3 setmaterial Modifies properties of a material in the material database. "propertyname"). The returned variable is either a matrix or a string.16. The argument newvalue can be a number or a string. Syntax ?setmaterial ("materialname").4 getmaterial Returns properties of a material in the material database. setmaterial("Si". newvalue). getindex 388 . Description Displays the property names of the specified material that can be modified. Sets the property named "propertyname" of the material "propertyname". getmaterial 387 . with the name "materialname" to newvalue."Mesh order". getfdtdindex 388 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes No Yes 8. 5 getindex Returns the complex index of any material that is in the material database. getindex 388 . Optional argument component can be 1. See Also Material database 385 .16. getmodeindex 389 . getfdtdindex 388 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes No Yes 8. setmaterial 387 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes No No 8. y or z component for anisotropic materials. getindex( "materialname". The index is returned for the specified frequency f. Syntax out = getindex ( "materialname". The index at the specified frequency is interpolated from the neighboring frequencies where the index data is available. Inc . component). Frequency f is in Hz. setmaterial 387 . getfdtdindex 388 .2012 Lumerical Solutions. See Also Material database 385 . © 2003 .6 getfdtdindex This function returns the material index of a material in the database as it will be used in an actual FDTD simulation. Description Returns the complex index of the material with the given name.16.388 Reference Guide query. The default is 1. addmaterial 386 . addmaterial 386 . f. f). Many materials (such as Sampled materials) have properties that depend on frequency. 2 or 3 to specify the x. Note that when multi-coefficient models are used.Scripting Language 389 Using getfdtdindex. This result is identical to getindex unless the optional arguments fitsampled and fitanalytic are used. y or z component for anisotropic materials. Description Returns the complex index of the material with the given name. setmaterial 387 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes No No 8. Optional argument component can be 1. fmax). f. Max coefficients and Tolerance set for the material. Note that the fit result depends on the fit parameters. Using getmodeindex. All frequency units are in Hz. Inc . Syntax out = getmodeindex ( "materialname". you can obtain the refractive index as a function of the specified frequency. getfdtdindex("materialname".fmin. f. The index is returned for the specified frequency f. getmodeindex 389 . thus getfdtdindex result depends on those parameters as well.16. the x. 2 or 3 to specify f. All © 2003 . as it will be used in MODE calculations. getindex 388 .7 getmodeindex This function returns the material index of a material in the database as it will be used in an actual MODE simulation. and the fitting routine will find a best fit of the material data over that range. The default is 1.2012 Lumerical Solutions. Similar to getindex. component). addmaterial 386 . The index is returned for the specified frequency f. The index evaluated at the specified f is then returned. Max coefficients and Tolerance set for the material. but you also specify fmin and fmax. fmin. f). you can specify frequency range. Description Returns the complex index of the material with the given name. the fit result depends on the fit parameters. Syntax out = getfdtdindex ( "materialname". See Also Material database 385 . the span of frequency of the FDTD simulation. fmax. Many materials (such as Sampled Materials) have properties that depend on frequency. f. is given by D 0 r . Optional argument component can be 1. fmin. D.390 Reference Guide frequency units are in Hz. it will return exactly the same result as the square of getfdtdindex. 2 or 3 to specify the x. The default is 1. component. fitanalytic. and the electric field. ie.8 getnumericalpermittivity This advanced function returns the permittivity of a material in the database as it will be used in an actual FDTD simulation. dt E In the limit where dt tends to zero. Optional arguments to specify if Sampled Materials or Analytic Materials should be fitted using Lumerical's multicoefficient model (MCM). If either of these options are set to 1 (true) then you must supply a minimum and maximum frequency for fitting. the relationship between the displacement field. dt. including the effects of a finite time step. addmaterial 386 .2012 Lumerical Solutions. The MCM is typically used in MODE Solutions for Sampled Materials when calculating waveguide dispersion. fmax). getmodeindex ("materialname". fitsampled. See Also Material database 385 . the ratio © 2003 . Inc . In FDTD. The name of the function is a reminder that it returns the numerical permittivity. E. or shown in the Materials Explorer. If you set dt to zero when calling this function.16. The default values are 0 (false) for fitsampled and fitanalytic. y or z component for anisotropic materials. dt n 2 where n( ) is the refractive index returned by the script function getfdtdindex. setmaterial 387 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes No No 8. which is commonly used in FDTD simulations. f. we have lim dt 0 r . getfdtdindex 388 . and for Analytic Materials only for the purpose of using precisely the same materials in both FDTD and MODE simulations. getindex 388 . component). getmodeindex ("materialname". in advance. dt sin cdt dt 2 2 k dx 1 sin x dx 2 2 k y dy 1 sin dy 2 2 1 k dz sin z dz 2 2 In the limit where dt. we must consider the full. Syntax out = getnumericalpermittivity ( "materialname". For some materials.Scripting Language 391 of D and E. This is similar to getfdtdindex except for the additional parameter dt. Inc . See Also Material database 385 . The permittivity is returned for the specified frequency f. fmax. setmaterial 387 . numerical dispersion relation between and k which is given by r 1 . addmaterial 386 . without modifying the spatial FDTD mesh. the value of dt required to obtain the desired accuracy for the permittivity. f. To understand the relationship between the them. dt 0) ck n( ) The spatial FDTD mesh and time step are generally chosen to obtain a desired level of simulation accuracy.fmin. dt and dz tend to zero. getfdtdindex 388 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes No No © 2003 . in order to obtain a higher level of accuracy for r( . which is different from the refractive index. fmax. The default is 1. component). ie the ratio of the speed of light in a vacuum to the phase velocity of light in the medium. essentially by ensuring that the arguments of the sine functions are sufficiently small that sin(x)~x and that the simulation is stable. it is easy to show that we have the expected result ck r ( . getnumericalpermittivity ("materialname". 2 or 3 to specify the x. Description Returns the complex permittivity of the material with the given name. This script function makes it possible to calculate. dt.2012 Lumerical Solutions. y or z component for anisotropic materials. dx. dt). All frequency units are in Hz. getindex 388 . f.dt). fmin. Optional argument component can be 1. it may be desired to further reduce the value of the time step. dt. 392 Reference Guide 8. Open a new wizard with newwizard 393 2. Add a new wizard page with newwizardpage 393 3. Call runwizard 395 to run the wizard 5. the wizard can be closed with killwizard 396 . Calls the standard windows file open dialog. This creates a page for the wizard. Returns data entered into a specific widget. Syntax message("text"). Inc .1 message Creates a message window that displays some text.17. newwizard 393 © 2003 . Use wizardgetdata 396 to obtain values entered into widgets by the user 6.2012 Lumerical Solutions.17 User defined GUIs Custom GUIs can be created with the following commands. or click the OK button to continue. Used to create a new user defined wizard. This function does not return any data. Command message 392 newwizard 393 newwizardpage 393 wizardwidget 394 runwizard 395 wizardgetdata 396 killwizard 396 wizardoption 397 fileopendialog 397 filesavedialog 398 Description Creates a message window that displays some text. Sets some options for wizard widgets and labels. Runs the wizard and returns a value indicating which button was pressed. This closes the wizard window. Depending on the values returned by runwizard 395 . Description Creates a window that displays text. The user must hit Enter. Add widgets to the wizard page with wizardwidget 394 4. or a new wizard page is started with newwizardpage 393 . Typically. Calls the standard windows file save dialog. a wizard will be created with the following steps 1. 8. Adds a new widget to the current wizard window. See Also User defined GUI 392 . Scripting Language 393 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 8. Syntax newwizardpage( "label1"). See Also User defined GUI 392 .17. title is the wizard window title. h.17. Inc . Syntax newwizard( w. Creates two buttons with labels "label1" and "label2".2 newwizard Used to create a new user defined wizard. Opens a new wizard window. newwizardpage( "label1". "title"). The minimum values for w and h are 200. this will be "Done" or "OK".2012 Lumerical Solutions. newwizardpage 393 Available in © 2003 . Description w and h (width and height) are specified in pixels. These will typically be "Next" and "Back" or "Done" and "Back".3 newwizardpage This creates a page for the wizard and should be done before adding any widgets. Typically. message 392 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 8. See Also User defined GUI 392 . Description Creates a button with the label "label1". "label2"). newwizardpage 393 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes © 2003 . See Also User defined GUI 392 . "name"). If the "type" of widget is a "menu". the command is wizardwidget("menu". menu item or label a name.2012 Lumerical Solutions. Syntax wizardwidget( "type". "label". This command should only be done after creating a new wizard page with the command newwizard. "label". then the menu choices "choices".17. checkbox. Inc .4 wizardwidget Adds a new widget to the current wizard window."3D". menu items or strings. For example. defaultValue). wizardwidget( "type". with the default choice "3D"."TE|TM|3D". Description 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."simulation type". wizardwidget( "type". defaultValue provides a default value for numeric inputs. must be provided.394 Reference Guide FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 8. to create a pulldown widget with the name "simulation type" and 3 choices "TE". These choices should be separated by the character "|". checkboxes."TM". defaultValue).3). 2012 Lumerical Solutions. See Also User defined GUI 392 . where N is the number of widgets (excluding labels) in the current wizard page. Syntax out = wizarddata.Scripting Language 395 8. Inc . newwizard 393 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 8. Description The values of out are out(1) = 0. If out(1) is 0 or -1. all the values out(2:N+1) are zero. 0 means the user pressed Cancel. +1 or -1.17. Menu items return a number between 1 and M where M is the number of choices in the menu. newwizardpage 393 © 2003 . Syntax out = runwizard. It then returns value data from the matrix in a N+1 length matrix. 1 or -1.5 wizarddata This command will cause the wizard window to wait until the user selects OK or Cancel.6 runwizard Runs the wizard and returns a value indicating which button was pressed. Note that check boxes return 1 if checked and 0 if unchecked. 1 means the user pressed the first button (created by calling newwizardpage) and -1 means the user pressed the second button (created by calling newwizardpage). See Also User defined GUI 392 .17. 0 means the user pressed Cancel. This function is only available in MODE Solutions. Description Returns either 0. 1 means the user pressed the first button (typically "OK" or "Next") and -1 means the user pressed the second button (typically "Back") out(2:N+1) gives the numeric values that the user entered for each input field when out(1) is 1. Description This closes the wizard window. Syntax out = wizardgetdata(N). Out will be a number or a string. Description Returns the value that the user entered into the Nth widget. See Also User defined GUI 392 .2012 Lumerical Solutions. Syntax killwizard. It should only be called after a wizard window has been created with the newwizard command. Inc . See Also User defined GUI 392 . newwizardpage 393 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 8.8 killwizard This closes the wizard window.17.396 Reference Guide Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 8. newwizardpage 393 Available in © 2003 .17.7 wizardgetdata Returns data entered into a specific widget. This function is only available in MODE Solutions. depending on the type of widget. Scripting Language FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 397 8. "fieldheight" sets the height of each field to any value between 8 and the full height of the wizard window. Syntax wizardoption ("optionname". "margin". sets size of the left margin to any value between 0 and full width of the wizard window. setting).10 fileopendialog Calls the standard windows file open dialog. Brings up the open file dialog box.ext. Description 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 wizard window. out = fileopendialog(". See Also User defined GUI 392 . Returns the path of the file that the user selects. See Also © 2003 . newwizard 393 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 8. displaying only files with the extension .17.ext").2012 Lumerical Solutions. Syntax out = fileopendialog.9 wizardoption Sets some options for wizard widgets and labels.17. Description Brings up the open file dialog box and returns the path that the user selects. Inc . or another script file.ext. with the command create_array. you can run this file from the command prompt. as long as the file is in your current working directory or in the current path (see getpath 170 and addpath 170 ). you can save any script files to that directory and they will always be in the path. © 2003 . Returns the path of the file that the user selects. if you create the file create_array. Description Brings up the save file dialog box and returns the path that the user selects. fileopendialog 397 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 8. Syntax out = filesavedialog. See Also User defined GUIs 392 .17.18 Creating your own script commands You can run any script file simply by typing the name of the file (without the . displaying only files with the extension .2012 Lumerical Solutions.lsf extension).ext"). Therefore.398 Reference Guide User defined GUIs 392 . filesavedialog 398 Available in FDTD Solutions MODE Solutions INTERCONNECT DEVICE Yes Yes Yes Yes 8.11 filesavedialog Calls the standard windows file save dialog.lsf. For example. Brings up the save file dialog box. out = filesavedialog(". The directory C:\Program Files\Lumerical\FDTD\scripts (Windows) /usr/local/lumerical/scripts (Linux) is always in the path. Inc . Note: All script files use a common variable space. script_2.lsf i=1.2). space and tabs will be ignored. On any line. For example. you can not define a variable or assign values to a variable that has the same name as one of the script commands. variables defined in the scripts are global. and the script files have access to all variables defined in the simulation project file. are not valid statements and will return an error. the following lines sum = matrix(1.lsf modified the variable i. Blank lines. angle = acos(pi/2). Finally. script_1. The last line in the script file must have a carriage return.2012 Lumerical Solutions. This can lead to problems when two script files use the same variable names.lsf for(i=1:10) { # do something } © 2003 . Therefore you can format your script files any way you choose. ?i. As a consequence. Inc . script_2.lsf (defined below) will print the value 10 to the command line since script_2. Each command should terminate with a semicolon.Scripting Language 399 Script files must follow these formatting rules: Multiple commands are allowed on a single line. script_1. all characters after a # symbol are ignored. For example. . 2012 Lumerical Solutions. 201 ~ 202 + 195 < 198 <= 198 = 183 == 196 > 199 >= 198 abs 213 absolute 213 access 190 acos 211 addanalysisgroup 265 addbulkgen 280 addcircle 266 addcustom 267 adddevice 278 adddiffusion 279 adddipole 273 addeigenmode 271 addfdtd 270 © 2003 . Inc addgaussian 273 addgridattribute 280 addgroup 264 addimage 267 addimportdope 279 addimportedsource 275 addimportgen 280 addindex 275 addition 195 addjob 318 addmaterial 386 addmesh 272 addmode 272 addmodesource 273 addmovie 276 addobject 266 addpath 170 addplane 274 addpoly 268 addpower 277 addprofile 276 addpropagator 271 addpyramid 267 addrect 268 addring 269 addsphere 270 addstructuregroup 265 addsurface 270 addtfsf 274 addtime 276 addtogroup 290 addtriangle 269 adduserprop 291 almostequal 196 analysis 336 analysis group 104.Index 401 Index ' 203 195 ! 201. 202 != 197 " 202 # 205 % 184 & 199. 200 * 194 / 194 : 183 ? 204 [] 184 ^ 196 | 200. 134 analysis tools 133 and 200 angle 214 . 2012 Lumerical Solutions. 191 asap 91. 190. 184. 176. 177 asapexport 176 asapimport 177 asapload 176 asin 210 assign 190 assignment 183 atan 211 atan2 212 bestoverlap 340 boundary conditions 86 break 172 c 191 CAD layout 51 calculate modes 337 cd 163 ceil 246 centroid 240 changing CAD layout 64 clear 189 clearanalysis 352 cleardcard 353 clearjobs 319 clearsourcedata 307 closeall 261 comment 205 comparison 196 component 62 conductivity 117 conj 213 conjugate 213 copy 164. 290 copydcard 351 . Inc anisotropic 121 apodization 108 arccos 211 arcsin 210 arctan 211.402 Reference Guide cos 209 cosine 209 coupling 338 cp 164 createbeam 277 cross 220 ctranspose 229 currentfilename 167 custom primitive 75 cwnorm 325 czt 238 data export 138 del 162 delete 285 deleteall 285 detail 74 Dielectric 117 dipolepower 328 dir 162. 212 array 183. 163 division 194 dot 219 double quote 202 drude 117 edit 54 eig 220 eigenvalue 220 eigenvector 220 else 252 endl 204 eps0 191 equal 183 equal to 196 equation interpreter 114 escape 172 eval 230 exit 165 exp 216 exponential 216 exportfigure 260 © 2003 . Index farfield2d 363 farfield2dintegrate 366 farfield3d 367 farfield3dintegrate 371 farfieldangle 365 farfieldexact 374 farfieldexact2d 372 farfieldexact3d 373 farfieldfilter 362 farfieldpolar2d 365 farfieldpolar3d 369 farfieldspherical 370 farfieldux 369 farfielduy 370 farfieldvector2d 364 farfieldvector3d 368 feval 231 fft 233 fftk 236 fftw 235 filebasename 167 filedirectory 168 fileexists 166 fileextension 168 fileopendialog 397 filesavedialog 398 find 227 findmodes 337 findpeaks 228 findstring 232 finite 249 flip 222 floor 246 for 251 format 173 framerate 312 frequencysweep 338 gaussian 248 gds 178 © 2003 .2012 Lumerical Solutions. Inc 403 gdsii 77. 378 gratingangle 383 gratingbloch1 384 gratingbloch2 385 gratingm 379 gratingn 379 gratingperiod1 382 gratingperiod2 382 gratingpolar 380 gratingu1 383 gratingu2 384 gratingvector 381 greater than 199 greater than or equal to 198 groupscope 284 havedata 351 . 178 geometry 74 get 294 getcommands 169 getdata 349 getelectric 353 getfdtdindex 388 getglobalmonitor 298 getglobalsource 298 getindex 388 getmagnetic 354 getmaterial 387 getmodeindex 389 getnamed 296 getnamednumber 297 getnumber 296 getnumericalpermittivity 390 getpath 170 getsolver 299 getsourceangle 323 getsweepdata 348 getview 311 graphics graphical rendering 74 grating 376. 173 loaddata 173 location 74 log 215 log10 215 loop 251 lorentz 117 .2012 Lumerical Solutions. 247 model 117 modulus 246 monitor 104 mouse mode 55 move 165. 225 interptri 224 inverse 237 invfft 237 Kerr nonlinear 117 killwizard 396 layoutmode 264 legend 257 length 217 less than 198 less than or equal to 198 library 62 linecross 245 lineintersect 244 linspace 185 ln 215 load 161. 289 moving windows 64 mu0 191 multiplication 194 multiply 221 mv 165 natural 215 negative 195 new2d 159 new3d 159 newmode 160 © 2003 . 117 material database 116 material models 117 matlab 138. 179 matlabget 181 matlabput 181 matlabsave 179 matrix 185. Inc haveproperty 299 if 252 imag 212 image 258 imaginary 212 import 77. 191. 178 import object 70 importnk 302 importnk2 304 importsurface 300 importsurface2 301 inpoly 241 integrate 225 integrate2 226 integration 49 interp 224 interpolate 224. 221 max 218 Max coefficients 117 mesh 127.404 Reference Guide ls 163 main 52 main title bar 52 material 74. 336 mesh refinement region 83 meshgrid3dx 187 meshgrid3dy 188 meshgrid3dz 188 meshgrid4d 188 meshgridx 186 meshgridy 187 message 392 min 219 mod 246. 174 savedata 174 savedcard 174 screen 204 script 169 scripting editor prompt command line seed 248 63 . Inc 405 150 priorities 127 product 219.2012 Lumerical Solutions. 201. 317 runanalysis 350 runjobs 318 running a simulation 132 runparallel 317 runsetup 295 runsweep 319 runwizard 395 sampled data 117 save 161. 220 propagate 341 PSO 150 pwd 164 quit 165 rand 248 randmatrix 186 random 248 randreset 248 readdata 175 real 212 redo 313 redraw 307 redrawmode 309 redrawoff 308 redrawon 308 replace 232 replacestring 233 reshape 223 rm 162 rotations 74 round 246. 247 run 169.Index newproject 158 newwizard 393 newwizardpage 393 nonorm 324 normal 248 normalization 37 not 197. 202 num2str 229 object tree 60 Optimization 150 or 201 orbit 311 order 127 output 204 overlap 339 Particle Swarm Optimization path 170. 171 pause 171 PEC 117 permeability 191 permittivity 191 permute 222 phase 214 pi 191 pinch 217 plasma 117 plot 253 plotxy 254 polar 255 polar2 256 polarimage 257 polyand 242 polyarea 239 polydiff 243 polygrow 241 polyintersect 240 polyor 242 polyxor 244 power 196 © 2003 . Inc select 287 selectall 285.2012 Lumerical Solutions. 216 solar 249 source 91 sourceintensity 333 sourceintensity_avg 333 sourceintensity_pavg 334 sourcenorm 325 sourcenorm2_avg 326 sourcenorm2_pavg 327 sourcepower 329 sourcepower_avg 330 sourcepower_pavg 331 spectral averaging 108 speed of light 191 spline 225 . 203 structure 70 structures group 70 substring 231 subtraction 195 sum 218 surface 80 surface object 80 switchtolayout 264 system 166 tan 210 tangent 210 Tolerance 117 toolbar 52 transmission 321 transmission_avg 322 transmission_pavg 323 transparency 74 transpose 228 undo 313 units 37 unselectall 286 unwrap 214 updatesourcemode 306 variables with spaces 184 view 57 view ports perspective 60 visualize 259 which 171 wizarddata 395 wizardgetdata 396 wizardoption 397 wizardwidget 394 workspace 189 write 175 © 2003 . 286 selectfigure 259 selectmode 337 selectpartial 287 Sellmeier 117 set 292 set analysis 335 setanalysis 335 setglobalmonitor 293 setglobalsource 294 setmaterial 387 setnamed 292 setplot 260 setsourcesignal 305 setview 310 shiftselect 288 shiftselectpartial 289 sign 247 simulation 58 simulation region 83 sin 209 sine 209 single quote 203 size 74.406 Reference Guide sqrt 215 square root 215 str2num 230 string to number 230 strings 202. 2012 Lumerical Solutions.Index z-transform 238 407 © 2003 . Inc .
Copyright © 2024 DOKUMEN.SITE Inc.