===A Closer Look At CPML===
Â
{{mainpage|[[Advanced CPML Setup]]}}
In many electromagnetic modeling problems you need a boundary that simply absorbs all the incoming radiation. For problems of this nature, an absorbing boundary condition (ABC) is often chosen that effectively minimizes wave reflections at the boundary. The boundary ABC cells in the project workspace are transparent to the user. But, in effect, multiple rows of ABC cells are placed on the exterior side of each face of the visible domain box.
You may occasionally want to use [[EM.Cube]]'s FDTD simulator to model planar structures. Although [[EM.Cube]] provides the more computationally efficient [[Planar Module]] for this very purpose, there are many cases when an FDTD simulation might prove advantageous over a 2.5-D MoM simulation. To model a laterally infinite dielectric substrate, you must assign a PML boundary condition to the four lateral sides of the domain box and set the lateral domain offset values along the ±X and ±Y directions all equal to zero. If the planar structure ends in an infinite dielectric half-space from the bottom, you must assign a PML boundary condition to the bottom side of the domain box and set the -Z offset equal to zero.
Â
More detail about about [[Advanced CPML Setup|advanced CPML setup]] can be found here: [[Advanced CPML Setup]].
===Creating A Yee Mesh===
===Waveforms & Discrete Fourier Transforms===
The accuracy of the FDTD simulation results depends on the right choice of temporal waveform. The excitation waveform is the temporal source function that sets the initial conditions at t = 0 and provides an excitation signal afterwards. [[EM.Cube]] currently offers three choices: * Sinusoidal* Gaussian Pulse* Modulated Gaussian Pulse [[EM.Cube]]'s default waveform choice is a modulated Gaussian pulse. At the end of an FDTD simulation, the time domain field data are transformed into the frequency domain at your specified frequency. This is usually the same as the center frequency of your project. Different waveforms have different spectral behaviors. It is critical that you understand the time-domain-to-frequency-domain transformations in order to correctly interpret some simulation data. From the "'''Excitation Waveform'''" section of the '''FDTD Simulation Engine Settings '''dialog, you can override [[EM.Cube]]'s default waveform and customize your own. The sinusoidal waveform has a frequency f<sub>0</sub> equal to the project's center frequency and does not have any parameter that you can modify. The delay in this case is set to t<sub>0</sub> = 1/(4f<sub>0</sub>) so that the waveform vanishes at t = 0: [[Image:FDTD67.png]] where sinc(x) = sin(πx) / (πx), and T is the length of the temporal window from t = 0 to the exit time t = NΔt, and Δt is the time step of the time marching loop. For Gaussian and modulated Gaussian waveforms you can set the pulse width and time delay. The pulse width should be chosen such that the Fourier transform of your selected waveform encompasses your project bandwidth. Rather than setting an arbitrary pulse width, [[EM.Cube]] lets you set a parameter called '''Spectral Truncation Level '''or '''delta (δ)''', which is the normalized truncation threshold for the spectral content of the excitation pulse. This is explained as follows. Recall that the Fourier transform of a Gaussian pulse is also a Gaussian pulse. The Fourier transform of a modulated Gaussian pulse consists of two Gaussian pulses located at the two opposite sides of f = 0 (DC) shifted by the modulation frequency f<sub>0</sub>: [[Image:FDTD63(1).png]] Since a Gaussian pulse waveform has considerable DC content, it must be used to model lowpass structures. In that case, the center frequency and bandwidth of the project must be set such that Δf = 2f<sub>0</sub> and hence, f<sub>min</sub> = f<sub>0</sub> - Δf/2 = 0, and f<sub>max</sub> = f<sub>0</sub> + Δf/2 = 2f<sub>0</sub>. The width t of the temporal Gaussian pulse is then determined such that at f<sub>max</sub> the spectral Gaussian pulse drops to the d-level from its maximum value of 1. With a bandwidth of Δf, the pulse width must satisfy the following equation: :<math> \exp[-(\pi f_{\delta} \tau)^2] = \exp[-(\pi \Delta f \tau)^2] = \delta \quad \Rightarrow \quad \tau = \frac{\sqrt{-\ln\delta}}{\pi f_{max}} </math><!--mainpage| [[Image:FDTD64(1).png]]-->  When you set δ = 0.1 (the default value), it means that the Fourier transform of your excitation waveform drops to 10% of its peak at the upper edge of your specified frequency range. For a Modulated Gaussian pulse waveform with a bandwidth of Δf, the pulse width must satisfy the following equation: :<math> \exp[ -[\pi(f_{\delta} - f_0)\tau] ^2 ] = \exp \left[ -\left(\pi \frac{\Delta f}{2} \tau\right)^2 \right] = \delta \quad \Rightarrow \quad \tau = \frac{2\sqrt{-\ln \delta}}{\pi \Delta f} </math><!--[[Image:FDTD65.png]]--> For the default value of δ = 0.1, you get the standard relation: τ = 0.966 / BW, which is typically used for modulated Gaussian waveforms. The source waveform requires a time delay t<sub>0</sub> so that its value drops to almost zero at t = 0. The time delay is expressed in terms of a multiple of the pulse width: '''t0 / tau''', Waveforms and its default value is 4.5. Keep in mind that FDTD is a time domain algorithm. At the end of an FDTD simulation, a Discrete Fourier Transform (DFT) is performed on the time domain data to calculate frequency domain characteristics such as near fields, far field radiation patterns, RCS, S/Y/Z [[parametersTransforms|Waveforms And Discrete Fourier Transforms]], etc.: :<math>\tilde{F}(f) = \int_{-\infty}^{\infty} f(t) e^{-j2\pi f t} \, dt \quad \approx \quad \Delta t \sum_{n=0}^N f(n\Delta t) e^{-j2 \pi n f \Delta t} </math><!--[[Image:FDTD68.png]]--> Of [[FDTD Module]]'s observables, the near fields, far fields and all of their associated [[parameters]] like directivity, RCS, etc., are calculated at a certain frequency that is specified as part of the definition of the observable. On the other hand, port characteristics like S/Y/Z [[parameters]], VSWR and periodic characteristics like reflection and transmission coefficients, are calculated over the entire specified bandwidth of your project. In other words, you get a wideband frequency response at the end of a single time domain FDTD simulation run. The number of frequency point data over this bandwidth is equal to the number of DFT samples that are generated during the time marching loop. This number is set to 200 by default. In other words, 200 frequency data are generated at the end of an FDTD simulation. You can change this number through the box labeled '''No. DFT Samples''' in the "Discrete Fourier Transform" section of the FDTD Simulation Engine Settings dialog. It can be seen that the discrete Fourier transform multiplies the samples of time-domain field quantities by the time step Δt. This means that the resulting Fourier transforms of electric and magnetic field components now have units of V/m/Hz or A/m/Hz, respectively. Moreover, the Fourier transforms of the three waveform types have different spectral values at the observation frequency f<sub>0</sub>. This makes it difficult to compare the FDTD simulation results with the results from [[EM.Cube]]'s other computational modules. For example, in the Planar, MoM3D and Physical Optics Modules, a plane wave source typically has a complex-valued functional form of exp(-jk<sub>0</sub>'''k.r'''), which has a unit magnitude. In [[FDTD Module]], the time domain plane wave source has a functional dependence of the following form:
:<math> \mathbf{E^{inc}}(r,t) = (E_{\theta}^{inc} \hat{\theta} + E_{\phi}^{inc} \hat{\phi}) f \left[ (t-t_0) - \frac{\mathbf{\hat{k} \cdot r} - l_0}{c} \The accuracy of the FDTD simulation results depends on the right] </math><!--choice of temporal waveform. [[Image:FDTD69EM.pngCube]]-->'s default waveform choice is a modulated Gaussian pulse. At the end of an FDTD simulation, the time domain field data are transformed into the frequency domain at your specified frequency or bandwidth to produce the desired observables.
where f(t) is In addition to the temporal waveformdefault waveforms, t<sub>0</sub> is the time delay, l<sub>0</sub> is a spatial shift, and c is the speed of light in the free space[[EM. The Fourier transform of the above temporal function evaluated at f = f<sub>0</sub> has an amplitude different than 1. For this purpose, Cube|EM.Cube's [[FDTD ModuleCUBE]] normalizes allows the temporal waveform ability to define custom waveforms by the magnitude of its Fourier transform at the observation either time or frequency f<sub>0</sub>. As specifications on a result, a temporal plane per source with any of the three waveform types will always create spectral incident source with |'''E<sup>inc</sup>'''('''r''', f<sub>0</sub>)| = 1basis. The temporal waveform normalization factors for the three waveform types are given below:
:<math> \begin{align} &(NOf [[FDTD Module]]'s observables, the near fields, far fields and all of their associated [[parameters]] like directivity, RCS, etc.F, are calculated at a certain frequency that is specified as part of the definition of the observable.)_{Sinusoidal} = \frac{2}{T} = \frac{2}{N \Delta t} \\ &(N.F.)_{Gaussian} = \frac{ e^{(\pi f_0 \tau)^2} }{ \sqrt{\pi} \tau } = \frac{1}{\sqrt{\pi} \tau \delta^{1On the other hand, port characteristics like S/4}} \\ &(N.F.)_{Modulated} = \frac{2}{\sqrt{\pi} \tau} \end{align} <Y/math><!--Z [[Image:FDTD70.pngparameters]]-->, VSWR and periodic characteristics like reflection and transmission coefficients, are calculated over the entire specified bandwidth of your project.
===Probing Fields in Time and Frequency Domains===