This video is taken from the FDTD Learning Track on Ansys Innovation Courses.
The import source allows you to specify a custom field profile to inject.
The data for the field profile of the source can come from monitor data measured in a previous
simulation, or it could be from another software such as a third-party ray tracing tool.
It can also be calculated based on a formula using the script.
You might want to use monitor data from a previous simulation as a source in a subsequent
simulation, and this can be done in order to break up a large simulation into two or
For example, this structure is a taper which guides light into a narrow waveguide and at
the start of the narrow waveguide there is a small particle which would require much
finer mesh to resolve compared to the mesh required for the rest of the structure.
In this case, we can split this into two simulations where the first part of the simulation simulates
the taper portion of the device, and a monitor is used to measure the fields at the end of
The monitor data can then be saved into a dataset and loaded into an import source in
the second simulation which simulates the end of the taper and the start of the narrow
waveguide and the particle.
Since a fine mesh only needs to be used in the second simulation, the final result which
is the power transmitted into the narrow waveguide following the particle can be obtained faster
than running a single large simulation with a fine mesh across the full span of the simulation.
The full application notes for this example are linked below.
To import data from a ray tracing software, first check to see if the ray tracer is able
to export data into the .fld file format which can be directly loaded into the import source.
Otherwise, the data may first need to be formatted into a rectilinear dataset in order to be
loaded by the import source.
Datasets are introduced in detail in the Analyzing simulation results section of this course.
The required format of the dataset is described here.
The complex electric field data over space is required, and the magnetic field distribution
and frequency range of the source is optional.
The data can be provided over either a uniform or non-uniform grid of positions in space.
The dataset can either first be saved to a .mat file and then loaded into the import
source, or if the dataset has been loaded into the script workspace, the importdataset
script command can be used to load the data into the import source.
Details about the script commands are linked below, and in the following unit, an example
script file is provided which shows how to generate a dataset and saves the dataset to
a .mat file which we then load into the import source.
Once the data has been imported, the source propagation axis setting and spans will be
set automatically based on the imported field data.
However, you can still choose the direction of propagation to forward or backward and
modify the wavelength range of the source.
One caveat is that although it is possible to specify any arbitrary field profile for
the import source, the fields that are injected will not necessarily be able to propagate
when you run the simulation if the field profile that is specified doesn't physically propagate.
For this reason, it's always a good idea to run a simulation with no structures with a
monitor directly in front of the source injection plane to measure the amount of power that
propagates through the monitor.
If not all of the power propagates, the resulting transmission value will deviate from 1, and
you may want to either update the field profile to one which is more physically accurate,
or re-normalize any power results from the simulation by the power that actually gets
injected by the source.
The import source can be used to specify custom beam profiles like Bessel beams which aren't
built into the software, or custom polarizations of the beam such as radially-polarized beams,
so it can be used in the same types of applications where a Gaussian source is used.
The demonstration in the next unit will show a radially-polarized Gaussian beam.