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 ,
The script file has those lines


set(“center wavelength”,lambda0);

set(“wavelength span”,0);

In recent versions, Lumerical has introduced a feature allowing multifrequency source :

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:

the largest absolute error in transmission is 1%.

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

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 关于自输入多波长光源的问题和脚本