Import user defined source as a function of wavelength (frequency)

In previous versions of FDTD Solutions, the import source was allowed with a single wavelength: Broadband Imported Source
so in the example , https://kb.lumerical.com/ref_sim_obj_custom_source_profile_from_oth.html
The script file has those lines
select(“import_beam”);

importdataset(EM);

set(“center wavelength”,lambda0);

set(“wavelength span”,0);

In recent versions, Lumerical has introduced a feature allowing multifrequency source : https://kb.lumerical.com/ref_sim_obj_mode_source_-_broadband.html
https://kb.lumerical.com/ref_sim_obj_broadband_beam.html

So the imported source can also allow source fields as a function of frequency. Such frequency (wavelength) dependency can be from explicit or implicit expressions such as an differential equations, or from monitors.

If it is from a monitor, you only need to first extract E and H from the monitor, and then create a dataset that contains both E and H, then import it.

I modified the grating coupler example to have only the fiber for simulation, and the result is as follows:
image

the largest absolute error in transmission is 1%.

Interestingly, The single frequency at the center works better for this specific exmple:
image

here are the script files and fsp file for your test:

brodband_source_import.lsf (1.1 KB) brodband_source_import_singleW.lsf (1.1 KB)

grating_coupler_2D_tilted.fsp (2.5 MB)

I also tested 3D fiber, and it works fine for both single and multi-frequency data for import.

In case for your own simulation the error is very large, eg, larger than 5%, or you can see clearly the back scattering from the source, please contact Lumerical support with your files attached so we can have a close look at this issue.

A similar post in Chinese is here 关于自输入多波长光源的问题和脚本