Hi Lumerical,
I am having issues using the script command in FDTD to get a spectrum across some wavelengths in my transmission “T” output data in my “ports” settings.
I set up, through scripts, such that in FDTD>ports>“edit port group” settings > "monitor frequency points(override global) > is set to 500 (I visually inspect and see this is the case.
in the FDTD>ports>port 1 (and port 2) > Modal Properties > frequency points > is set to 1 (visually inspect).
When I do this through scripts I DONT get a spectrum(viewing T), but only get 1 single data point. When I do this manually, by band, I do get a spectrum (viewing T)
Here is the script command I use
# BEGINNING OF CODE snippet:
#############################
#EXTRANEOUS INFO BUT JUST SHOWING WHAT ALL I DID TO PUT THE FDTD SIMULATION REGION IN
#############################
addfdtd; # FDTD simulation volume
set("x min", minvxWAFER+.5e-6-sdelta);
set("x max", maxvxWAFER-.5e-6);
set("y min", minvyWAFER-1e-6);
set("y max", maxvyWAFER+1e-6);
set("z min", -FDTD_below); set("z max", maxvzWAFER+FDTD_above);
set("simulation time",sim_time);
set("mesh accuracy",meshaccuracynum);
# add mode source:
addport;
set("name","source");
set("injection axis","x-axis");
set("direction","forward");
set("y",0); set("y span", 1.5e-6);
set("x",0+.5e-6+.25e-6-sdelta); # the FDTD simulation region is 0.5e-6 meters from the origin (0,0), then the
#source is 0.25 microns to the right of the FDTD simulation(i.e. putting the source inside the FDTD sim region
set("z min",-FDTD_below); set("z max", maxvzWAFER+FDTD_above);
set("mode selection","fundamental mode");
# add power monitors
# 0,rad_m+coupling_length+rad_m
#addpower;
addport;
set("name","through");
set("injection axis","x");
set("direction","forward");
#set("monitor type","2D X-normal");
set("y", rad_m+coupling_length+rad_m); set("y span", 1.5e-6);
set("x", 0+.5e-6+.25e-6-sdelta);
set("z min", -FDTD_below); set("z max", maxvzWAFER+FDTD_above);
##############################################
# END OF EXTRANEOUS STUFF JUST FYI
#############################################
################################
# HERE IS WHERE I THINK I HAVE SETUP THE FREQUENCY MONITOR POINTS AND GET A SPECTRUM CORRECTLY:
################################
select("FDTD::ports::source");
set("frequency points",1);
select("FDTD::ports::through");
set("frequency points",1);
setglobalsource("wavelength start",1200e-9);
setglobalsource("wavelength stop",1400e-9);
setglobalmonitor("use source limits",0);
setglobalmonitor("frequency points",500);
setglobalmonitor("minimum wavelength",1305e-9);
setglobalmonitor("maximum wavelength",1315e-9);
##################################### END OF CODE snippet
Now, I run, and get back only ONE data point, so I go to ports, and check the global freq points and the freq points inside each port, and they are displayed exactly as I described in the first of this post.
Then, I only manually edit “ports” under FDTD object, and manually delete the "500 " number I wrote in for the frequency points and manually type it back in and hit ok, then hit run. Then I get magically get data across the full spectrum as I wanted!
Is this a bug or is there some other script command that I’m missing? Just dont want to manually wade thru each iteration of code…
Many thanks!!
XW