For some FDTD and varFDTD simulations, it is useful to calculate the incoherent spectral average of the electromagnetic fields or the Poynting vector. For example, we might want to calculate
$$\langle\overrightarrow{P}\rangle=\int W\left(\omega\right)\overrightarrow{P}_{imp}\left(\omega\right)d\omega$$
where W(w) is a weighting function and Pimp(w) is the Poynting vector returned in the cwnorm state, in other words, the impulse response of the system. (Please see Frequency domain normalization for an explanation of the impulse response.) We could calculate the Pimp(w) at many different angular frequencies and then perform the spectral average after the simulation. FDTD, however, allows for two methods of more efficient spectral averaging during the simulation which can significantly reduce the memory requirements and increase the speed of the simulation. These methods are called "total spectral averaging" and "partial spectral averaging".
The frequency power and frequency profile monitors can record spectral averages of various quantities during the simulation. Like the other quantities calculated by these monitors, these can be returned in the Continuous Wave Normalization state (cwnorm), or the No Normalization state (nonorm). For most applications, the default cwnorm state is the best choice. In the tables below, we use the subscripts sim and imp to refer to the quantities returned in the nonorm and cwnorm states respectively. Please refer to Frequency domain normalization for more details on the two normalization states, and obtaining the impulse response of the system.
Total spectral averaging
FDTD/Propagator supports a spectral average that uses the source input spectrum as the weighting function. Total spectral averaging can be useful when the source spectrum of the simulation matches the actual illumination conditions. The following table gives the precise definitions of the quantities available using total spectral averaging.
Quantity | Definition | Normalization state |
---|---|---|
$$\langle\mid\overrightarrow{E}_{sim}\mid^{2}\rangle_{total}$$ |
$$\langle\mid\overrightarrow{E}_{sim}\mid^{2}\rangle_{total}=\int_{0}^{+\infty} \mid\overrightarrow{E}_{sim}\left(\omega\right)\mid^{2}d\omega$$ |
nonorm |
$$\langle\mid\overrightarrow{H}_{sim}\mid^{2}\rangle_{total}$$ |
$$\langle\mid\overrightarrow{H}_{sim}\mid^{2}\rangle_{total}=\int_{0}^{+\infty} \mid\overrightarrow{H}_{sim}\left(\omega\right)\mid^{2}d\omega$$ |
nonorm |
$$\langle\overrightarrow{P}_{sim}\rangle_{total}$$ |
$$\langle\overrightarrow{P}_{sim}\rangle_{total}=\int_{0}^{+\infty} \overrightarrow{P}_{sim}\left(\omega\right)d\omega$$ |
nonorm |
$$\langle\mid\overrightarrow{E}_{imp}\mid^{2}\rangle_{total}$$ |
$$\langle\mid\overrightarrow{E}_{imp}\mid^{2}\rangle_{total}=\frac{\int_{0}^{+\infty} \mid{s}\left(\omega\right)\mid^{2}\mid\overrightarrow{E}_{imp}\left(\omega\right)\mid^{2}d\omega}{\int_{0}^{+\infty} \mid{s}\left(\omega\right)\mid^{2}d\omega}$$ |
cwnorm |
$$\langle\mid\overrightarrow{H}_{imp}\mid^{2}\rangle_{total}$$ |
$$\langle\mid\overrightarrow{H}_{imp}\mid^{2}\rangle_{total}=\frac{\int_{0}^{+\infty} \mid{s}\left(\omega\right)\mid^{2}\mid\overrightarrow{H}_{imp}\left(\omega\right)\mid^{2}d\omega}{\int_{0}^{+\infty} \mid{s}\left(\omega\right)\mid^{2}d\omega}$$ |
cwnorm |
$$\langle\overrightarrow{P}_{imp}\rangle_{total}$$ |
$$\langle\overrightarrow{P}_{imp}\rangle_{total}=\frac{\int_{0}^{+\infty} \mid{s}\left(\omega\right)\mid^{2}\overrightarrow{P}_{imp}\left(\omega\right)d\omega}{\int_{0}^{+\infty} \mid{s}\left(\omega\right)\mid^{2}d\omega}$$ |
cwnorm |
$$s\left(\omega\right)$$ |
$$s\left(\omega\right)=\frac{1}{N}\sum_{sources}\int{exp}\left(i\omega t\right)s_{j}\left(t\right)dt$$, where sj(t) is the source time signal of the jth source and N is the number of active sources in the simulation volume |
N/A |
Total spectral averaging can be turned on by selecting total spectral average as shown in the screenshot below.
To see the data available in a monitor, use the script command
?getdata("monitorname");
All data can be obtained in scripting, with commands such as getdata and transmission_avg. The available components for total spectral averaging are shown in the following table.
Quantity | Data name | Example script command |
---|---|---|
$$\langle\mid{E_{x, sim}}\mid^{2}\rangle_{total}$$ |
E2x_avg |
nonorm; E2x = getdata("monitor1","E2x_avg"); |
$$\langle\mid{E_{y, sim}}\mid^{2}\rangle_{total}$$ |
E2y_avg |
nonorm; E2y = getdata("monitor1","E2y_avg"); |
$$\langle\mid{E_{z, sim}}\mid^{2}\rangle_{total}$$ |
E2z_avg |
nonorm; E2z = getdata("monitor1","E2z_avg"); |
$$\langle\mid{H_{x, sim}}\mid^{2}\rangle_{total}$$ |
H2x_avg |
nonorm; H2x = getdata("monitor1","H2x_avg"); |
$$\langle\mid{H_{y, sim}}\mid^{2}\rangle_{total}$$ |
H2y_avg |
nonorm; H2y = getdata("monitor1","H2y_avg"); |
$$\langle\mid{H_{z, sim}}\mid^{2}\rangle_{total}$$ |
H2z_avg |
nonorm; H2z = getdata("monitor1","H2z_avg"); |
$$\langle{P_{x, sim}}\rangle_{total}$$ |
Px_avg |
nonorm; Px = getdata("monitor1","Px_avg"); |
$$\langle{P_{y, sim}}\rangle_{total}$$ |
Py_avg |
nonorm; Py = getdata("monitor1","Py_avg"); |
$$\langle{P_{z, sim}}\rangle_{total}$$ |
Pz_avg |
nonorm; Pz = getdata("monitor1","Pz_avg"); |
$$\langle\mid{E_{x, imp}}\mid^{2}\rangle_{total}$$ |
E2x_avg |
cwnorm; E2x = getdata("monitor1","E2x_avg"); |
$$\langle\mid{E_{y, imp}}\mid^{2}\rangle_{total}$$ |
E2y_avg |
cwnorm; E2y = getdata("monitor1","E2y_avg"); |
$$\langle\mid{E_{z, imp}}\mid^{2}\rangle_{total}$$ |
E2z_avg |
cwnorm; E2z = getdata("monitor1","E2z_avg"); |
$$\langle\mid{H_{x, imp}}\mid^{2}\rangle_{total}$$ |
H2x_avg |
cwnorm; H2x = getdata("monitor1","H2x_avg"); |
$$\langle\mid{H_{y, imp}}\mid^{2}\rangle_{total}$$ |
H2y_avg |
cwnorm; H2y = getdata("monitor1","H2y_avg"); |
$$\langle\mid{H_{z, imp}}\mid^{2}\rangle_{total}$$ |
H2z_avg |
cwnorm; H2z = getdata("monitor1","H2z_avg"); |
$$\langle{P_{x, imp}}\rangle_{total}$$ |
Px_avg |
cwnorm; Px = getdata("monitor1","Px_avg"); |
$$\langle{P_{y, imp}}\rangle_{total}$$ |
Py_avg |
cwnorm; Py = getdata("monitor1","Py_avg"); |
$$\langle{P_{z, imp}}\rangle_{total}$$ |
Pz_avg |
cwnorm; Pz = getdata("monitor1","Pz_avg"); |
Partial spectral averaging
FDTD/Propagator supports a spectral average that uses a Lorentzian weighting function multiplied by the source spectrum. Partial spectral averaging is useful to extract the average response of the system to a variety of different illumination conditions from a single simulation. The following table gives the precise definitions of the quantities available using partial spectral averaging.
Quantity | Definition | Normalization state |
---|---|---|
$$\langle\mid\overrightarrow{E}_{sim}\left(\omega\right)\mid^{2}\rangle_{partial}$$ |
$$\langle\mid\overrightarrow{E}_{sim}\left(\omega\right)\mid^{2}\rangle_{partial}=\int_{-\infty}^{+\infty}\mid h\left(\omega,\omega'\right)\mid^{2} \mid\overrightarrow{E}_{sim}\left(\omega'\right)\mid^{2}d\omega'$$ |
nonorm |
$$\langle\mid\overrightarrow{H}_{sim}\left(\omega\right)\mid^{2}\rangle_{partial}$$ |
$$\langle\mid\overrightarrow{H}_{sim}\left(\omega\right)\mid^{2}\rangle_{partial}=\int_{-\infty}^{+\infty}\mid h\left(\omega,\omega'\right)\mid^{2} \mid\overrightarrow{H}_{sim}\left(\omega'\right)\mid^{2}d\omega'$$ |
nonorm |
$$\langle\overrightarrow{P}_{sim}\left(\omega\right)\rangle_{partial}$$ |
$$\langle\overrightarrow{P}_{sim}\left(\omega\right)\rangle_{partial}=\int_{-\infty}^{+\infty}\mid h\left(\omega,\omega'\right)\mid^{2}\overrightarrow{P}_{sim}\left(\omega'\right)d\omega'$$ |
nonorm |
$$\langle\mid\overrightarrow{E}_{imp}\left(\omega\right)\mid^{2}\rangle_{partial}$$ |
$$\langle\mid\overrightarrow{E}_{imp}\left(\omega\right)\mid^{2}\rangle_{partial}=\frac{\int_{-\infty}^{+\infty} \mid{h}\left(\omega,\omega'\right)\mid^{2}\mid{s}\left(\omega'\right)\mid^{2}\mid\overrightarrow{E}_{imp}\left(\omega'\right)\mid^{2}d\omega'}{\int_{-\infty}^{+\infty} \mid{h}\left(\omega,\omega'\right)\mid^{2}\mid{s}\left(\omega'\right)\mid^{2}d\omega'}$$ |
cwnorm |
$$\langle\mid\overrightarrow{H}_{imp}\left(\omega\right)\mid^{2}\rangle_{partial}$$ |
$$\langle\mid\overrightarrow{H}_{imp}\left(\omega\right)\mid^{2}\rangle_{partial}=\frac{\int_{-\infty}^{+\infty} \mid{h}\left(\omega,\omega'\right)\mid^{2}\mid{s}\left(\omega'\right)\mid^{2}\mid\overrightarrow{H}_{imp}\left(\omega'\right)\mid^{2}d\omega'}{\int_{-\infty}^{+\infty} \mid{h}\left(\omega,\omega'\right)\mid^{2}\mid{s}\left(\omega'\right)\mid^{2}d\omega'}$$ |
cwnorm |
$$\langle\overrightarrow{P}_{imp}\left(\omega\right)\rangle_{partial}$$ |
$$\langle\overrightarrow{P}_{imp}\left(\omega\right)\rangle_{partial}=\frac{\int_{-\infty}^{+\infty} \mid{h}\left(\omega,\omega'\right)\mid^{2}\mid{s}\left(\omega'\right)\mid^{2}\overrightarrow{P}_{imp}\left(\omega'\right)d\omega'}{\int_{-\infty}^{+\infty} \mid{h}\left(\omega,\omega'\right)\mid^{2}\mid{s}\left(\omega'\right)\mid^{2}d\omega'}$$ |
cwnorm |
$$\mid h\left(\omega,\omega'\right)\mid^{2}$$ |
$$\mid h\left(\omega,\omega'\right)\mid^{2}=\frac{\delta}{\left(\omega-\omega'\right)+\left(\pi\delta\right)^{2}}$$ $$\int\mid h\left(\omega,\omega'\right)\mid^{2}d\omega'=1$$ |
N/A |
$$s\left(\omega\right)$$ |
$$s\left(\omega\right)=\frac{1}{N}\sum_{sources}\int{exp}\left(i\omega t\right)s_{j}\left(t\right)dt$$, where sj(t) is the source time signal of the jth source and N is the number of active sources in the simulation volume |
N/A |
Partial spectral averaging can be turned on by selecting partial spectral average as shown in the screenshot below.
The FWHM of |h(f,f')|2 is called d, and can be modified as shown below.
Please note that when considered as a function of angular frequency, the FWHM of |h(w,w')|2 is 2pd rad/seconds.
To see the data available in a monitor, use the script command
?getdata("monitorname");
All data can be obtained in scripting, with commands such as getdata and transmission_pavg. The available components for total spectral averaging are shown in the following table.
Quantity | Data name | Example script command |
---|---|---|
$$\langle\mid{E_{x, sim}}\mid^{2}\rangle_{partial}$$ |
E2x_pavg |
nonorm; E2x = getdata("monitor1","E2x_pavg"); |
$$\langle\mid{E_{y, sim}}\mid^{2}\rangle_{partial}$$ |
E2y_pavg |
nonorm; E2y = getdata("monitor1","E2y_pavg"); |
$$\langle\mid{E_{z, sim}}\mid^{2}\rangle_{partial}$$ |
E2z_pavg |
nonorm; E2z = getdata("monitor1","E2z_pavg"); |
$$\langle\mid{H_{x, sim}}\mid^{2}\rangle_{partial}$$ |
H2x_pavg |
nonorm; H2x = getdata("monitor1","H2x_pavg"); |
$$\langle\mid{H_{y, sim}}\mid^{2}\rangle_{partial}$$ |
H2y_pavg |
nonorm; H2y = getdata("monitor1","H2y_pavg"); |
$$\langle\mid{H_{z, sim}}\mid^{2}\rangle_{partial}$$ |
H2z_pavg |
nonorm; H2z = getdata("monitor1","H2z_pavg"); |
$$\langle{P_{x, sim}}\rangle_{partial}$$ |
Px_pavg |
nonorm; Px = getdata("monitor1","Px_pavg"); |
$$\langle{P_{y, sim}}\rangle_{partial}$$ |
Py_pavg |
nonorm; Py = getdata("monitor1","Py_pavg"); |
$$\langle{P_{z, sim}}\rangle_{partial}$$ |
Pz_pavg |
nonorm; Pz = getdata("monitor1","Pz_pavg"); |
$$\langle\mid{E_{x, imp}}\mid^{2}\rangle_{partial}$$ |
E2x_pavg |
cwnorm; E2x = getdata("monitor1","E2x_pavg"); |
$$\langle\mid{E_{y, imp}}\mid^{2}\rangle_{partial}$$ |
E2y_pavg |
cwnorm; E2y = getdata("monitor1","E2y_pavg"); |
$$\langle\mid{E_{z, imp}}\mid^{2}\rangle_{partial}$$ |
E2z_pavg |
cwnorm; E2z = getdata("monitor1","E2z_pavg"); |
$$\langle\mid{H_{x, imp}}\mid^{2}\rangle_{partial}$$ |
H2x_pavg |
cwnorm; H2x = getdata("monitor1","H2x_pavg"); |
$$\langle\mid{H_{y, imp}}\mid^{2}\rangle_{partial}$$ |
H2y_pavg |
cwnorm; H2y = getdata("monitor1","H2y_pavg"); |
$$\langle\mid{H_{z, imp}}\mid^{2}\rangle_{partial}$$ |
H2z_pavg |
cwnorm; H2z = getdata("monitor1","H2z_pavg"); |
$$\langle{P_{x, imp}}\rangle_{partial}$$ |
Px_pavg |
cwnorm; Px = getdata("monitor1","Px_pavg"); |
$$\langle{P_{y, imp}}\rangle_{partial}$$ |
Py_pavg |
cwnorm; Py = getdata("monitor1","Py_pavg"); |
$$\langle{P_{z, imp}}\rangle_{partial}$$ |
Pz_pavg |
cwnorm; Pz = getdata("monitor1","Pz_pavg"); |