Recently I got a few support cases that is related to interoperability with tools from geometrical optics. When I reviewed the actual devices, I found that the dimension to be simulated is on the micron meter scale at the optical wavelength. In such cases the geometrical optics may not accurately predict the results. However users will have difficulty to simulate it since the distance is in 100um scale, too large for FDTD simulation.
Alternatively, one can create a customer source using monitor data by use of farfieldexact. Examples and related script files can be found from
To facilitate this, I write this brief summary on how to do it using farfieldexact3d: https://kb.lumerical.com/ref_scripts_farfieldexact3d.html
1: specify xyz to be projected
2: get farfieldexact3D, and extract Ex,Ey and Ez;
3: create the dataset for source import and import it
4: then you are ready to do next simulation, either using FDTD or other tools.
nx=50;# use larger number to get accurate result later
x=linspace(0.2e-6,150e-6,nx);#this is the dimension for the import source
z=100e-6;# this is the z coordinate of the plane to be projected
f=getdata(“R”,“f”); # the monitor name is R
do far field projection
E2 = farfieldexact3d(‘R’,x,y,z); #suppose it is single wavelength, if not, a loop will be needed
extract Ex,Ey and Ez
then create a dataset:
EM = rectilineardataset(“EM fields”,x,y,z);
EM.addparameter(“lambda”,c/f,“f”,f); # Note: Import source can only load datasets with one frequency point of data.
If it is used for another FDTD simulation, then open the 2nd fsp file to be simulated:
Please check the import source to have the correct E fields as imported.
then you are ready to go for the 2nd simulation.
If the import source is directly from a monitor, H fields will need to be included in the dataset to minimize the source error, as shown in the KB example：