The import source allows the user to specify a custom spatial field profile for the source injection plane. The custom field profile can be calculated from an analytic formula, imported from another FDTD simulation, or from other simulation tools.
Import dataset format
The 2D cross section of field data to be imported must be saved in a lumerical dataset with the format shown below. Note that E and H fields can be complex valued and non-uniform spatial sampling is supported. The E-fields are required, but the H-fields are optional.
EM = rectilineardataset("EM fields",x,y,z);
EM.addparameter("lambda",c/f,"f",f); # Optional
EM.addattribute("E",Ex,Ey,Ez);
EM.addattribute("H",Hx,Hy,Hz); # Optional
Specifying magnetic fields
The magnetic H fields are optional. If the H fields are not supplied, the source will attempt to calculate the H fields from the E fields. This calculation makes certain assumptions about the change of phase of the propagating radiation. These assumptions hold true for narrow sources such as Gaussian and plane wave sources, but may lead to significant errors for other sources with more complex field profiles. When defining complex beams, it is best to specify both E and H.
In some situations, it is useful to include H in the source dataset, but to set the value to the fields to zero. This can be interpreted as a situation where the same beam is propagating in both the forward and the backward direction at the same time, oriented such that the E fields interfere constructively at the source plane and the H fields interfere destructively. This technique is a useful way to avoid manually calculating the H fields. Instead, the H fields are naturally calculated as the fields propagate through the simulation volume. While this technique can be helpful, it is important to take some additional care when analyzing results from this type of simulation. There are two main issues:
- Fields will be injected in both the forwards and the backwards direction. This is usually not a serious problem. If the simulation is setup properly, with no structure behind the source, these fields will simply be absorbed by the PML boundaries behind the source without creating any errors in the rest of the simulation.
- The automatic calculation of the amount of power injected by the source (ie. sourcepower script function) will not be correct. Therefore, power transmission data ('T' in the result view, and results from the 'transmission' script function) which is normalized to the sourcepower, will be incorrect. A work around is to manually calculate the sourcepower and power transmission data.
Broadband simulations
The improved Mode and Import sources introduced in 2017a and later releases offer the possibility to be used in broadband simulations by enabling multi-frequency calculation that allows injection of frequency dependent mode profiles. To learn more more about the difference between single and multi-frequency mode profile calculation, see Mode source - Broadband.
In case of import source, the multifreqency calculation is enabled by simply importing 3D rectilinear dataset that contains 2D cross section of field data at multiple frequency points(third dimension). This feature is also supported by the frequency domain field and power monitors that record field data at multiple frequency points and can be easily saved into a mat file.
Note that the best accuracy with minimum number of frequency points is achieved when the points are sampled onto Chebyshev grid. If the frequency points are located outside of the Chebyshev grid, there might be some interpolation error or it might be necessary to use more points to achieve comparable accuracy.
For certain cases, where the field changes rapidly as a function of frequency, the multi-frequency method can result in interpolation error even with a large number of frequency points, so it is important to test the source in free space to ensure that the injected field profile is as-expected.
Note: 2D simulations To use the import source in a 2D simulation, the imported field data should be 1D. In other words, two of the three dimensions in the dataset (x, y, z) should have a size of one. |
General tab
- AMPLITUDE: The amplitude of the source as explained in the Units and normalization section.
- PHASE: The phase of the point source, measured in units of degrees. Only useful for setting relative phase delays between multiple radiation sources.
- INJECTION AXIS: Sets the axis along which the radiation propagates. Automatically defined based in imported data.
- DIRECTION: This field specifies the direction in which the radiation propagates. FORWARD corresponds to propagation in the positive direction, while BACKWARD corresponds to propagation in the negative direction.
- IMPORT SOURCE: Button to load field profile from a dataset contained within a .mat or Zemax zbf file. The legacy .fld file format is also supported. Alternately, the importdataset script command can be used to load data into the source while using a script. See above for details on the dataset format.
- IMPORTED SOURCE SETTINGS: x0, y0, z0, imported wavelength: The x,y,z spatial center of the imported data, and the imported wavelength (optionally included in the imported data).
Geometry tab
The geometry tab contains options to change the size and location of the sources. The source span will be automatically set based on the imported field data.
Frequency/Wavelength tab
The Frequency/Wavelength tab is shown below. This tab can be accessed through the individual source properties, or the global source properties. Note that the plots on the right-hand side of the window update as the parameters are updated, so that you can easily observe the wavelength (top figure), frequency (middle figure) and temporal (bottom figure) content of the source settings.
- PULSE DURATION: Choose a pulse duration that can accurately span your frequency or wavelength range of interest. However, very short pulses contain many frequency components and therefore disperse quickly. As a result, short pulses require more points per wavelength for accurate simulation.
- PULSE OFFSET: This parameter defines the temporal separation between the start of the simulation and the center of the input pulse. To ensure that the input pulse is not truncated, the pulse offset should be at least 2 times the pulse duration. This will ensure that the frequency distribution around the center frequency of the source is close to symmetrical, and the initial fields are close to zero at the beginning of the simulation.
- SOURCE TYPE: In general, you can choose between ‘standard’ and ‘broadband’ source types. Standard sources consist of a Gaussian pulse at a fixed optical carrier, while the broadband sources consist of a Gaussian pulse with an optical carrier which varies across the pulse envelope. Broadband sources can be used to perform simulations in which wideband frequency data is required – for instance, from 200 to 1000 THz. This type of frequency range cannot be accurately simulated using the standard source type.
Set frequency wavelength
If the SET FREQUENCY / WAVELENGTH option was chosen, this section makes it possible to either set the frequency or the wavelength and choose to either set the center and span or the minimum and maximum frequencies of the source.
For single frequency simulations, simply set both the min and max wavelengths to the same value.
Set time domain
The options in the time domain section are:
- SOURCE TYPE: This setting is used to specify whether the source is a standard source or a broadband source. The standard source consists of an optical carrier with a fixed frequency and a Gaussian envelope. The broadband source, which contains a much wider spectrum, consists of a chirped optical carrier with a Gaussian envelope. When the user uses the script function setsourcesignal, this field will be set as "user input".
- FREQUENCY: The center frequency of the optical carrier.
- PULSE LENGTH: The full-width at half-maximum (FWHM) power temporal duration of the pulse.
- OFFSET: The time at which the source reaches its peak amplitude, measured relative to the start of the simulation. An offset of N seconds corresponds to a source which reaches its peak amplitude N seconds after the start of the simulation.
- BANDWIDTH: The FWHM frequency width of the time-domain pulse.
For more information, please visit Changing the source bandwidth
Advanced
- ELIMINATE DISCONTINUITY: Ensures the function has a continuous derivative (smooth transitions from/to zero) at the start and end of a user-defined source time signal. Enabled by default.
- OPTIMIZE FOR SHORT PULSE: Use the shortest possible source pulse.
- This option is enabled by default in the FDTD solver. It should only be disabled when it is necessary to minimize the power injected by the source that is outside of the source range (eg. convergence problems related to broadband steep angled injection).
- This option is disabled by default in the varFDTD solver, as it improves the algorithms numerical stability.
- ELIMINATE DC: Eliminates the DC component by forcing signal symmetry
Manual calculation of the source time signal
As explained above, the 'Standard' source type uses a fixed carrier with a Gaussian envelope. The following script code shows how to calculate the source time signal used by the source.
# calculate standard pulse time signal frequency = 300e12; pulselength = 50e-15; offset = 150e-15; t = linspace(0,600e-15, 10000); w_center = frequency*2*pi; delta_t = pulselength/(2*sqrt(log(2))); pulse = sin( -w_center*(t-offset)) * exp( -(t-offset)^2/2/delta_t^2 ); plot(t*1e12,pulse,"t (fs)","source pulse time signal");
Note: There are some small differences between the pulse generated by this code and the actual time signal generated by the 'standard' source pulse setting. If you need very precise control over or knowledge of the source time signal, you should create your own Custom time signal. The 'broadband' option is generated with a more complex function. The precise function is not provided. To create your own arbitrary source time signals, see the Custom time signal page. |
Results returned
- MODE PROFILES: The fields injected at the injection plane is returned as a function of position and frequency/wavelength.
- TIME SIGNAL: Time-domain signal of the source pulse.
- SPECTRUM: The Fourier transform of the time signal.