![fdtd pml fdtd pml](https://media.springernature.com/full/springer-static/image/art%3A10.1007%2Fs11468-019-01057-x/MediaObjects/11468_2019_1057_Fig5_HTML.png)
![fdtd pml fdtd pml](https://minio.scielo.br/documentstore/2179-1074/rB3VzSPJ934wVGBNVNxwknS/8ad013c74eab88d12b83f2af50cefe7c2e21209d.jpg)
?'FDTD solver with mesh override added' " % ( FDTDxmin,FDTDxmax,FDTDymin,FDTDymax,FDTDzspan, \ Setglobalmonitor('frequency points',%s) set('simulation time', %s/c+1500e-15) \Īddmesh set('override x mesh',0) set('override y mesh',0) set('override z mesh',1) set('z span', 0) set('dz', %s) set('z', %s) \ Setglobalsource('wavelength start',%s) setglobalsource('wavelength stop', %s) \ Set('y min bc','Metal') set('y max bc','Metal') \ Set('x min bc','Metal') set('x max bc','Metal') \ Set('force symmetric z mesh', 1) set('mesh accuracy',1) \ Their architecture is showed as followed: lumapi.evalScript(_globals.FDTD, " \Īddfdtd set('x min',%s) set('x max',%s) set('y min',%s) set('y max',%s) set('z span',%s) \ I think reading up on string formatting, and dictionary datatypes would also be troberts, The following is how I would set all BC to PML in FDTD. There should be a 1-1 correspondence between lumapi methods and lsf commands. When using the API I think it is best practice to use the python methods rather then evaluating long strings as LSF code. Ī more efficient way of doing this may be to do this may be to pass a struct (LSF) or dictionary (python).
#FDTD PML UPDATE#
To update all the BC you should call set for set each boundary x, y, z. The question seems to be what is the command? select('FDTD') set('%s','PML') You are passing this string %s repeatedly? Since you have not define s here I cannot say exactly what this doing. The evalScript will simply evaluate the string as lsf code. This seems to be a python issue and not a Lumerical issue.