===A Closer Look At CPML===
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. Usually two or more ABC layers are placed at the boundaries of the structure to maximize wave absorption. 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.<br />
You may occasionally want to use [[Image:fdtd_manual-11EM.pngCube]]'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.
Figure: The boundary ABC cells placed outside the visible domain box. [[EM.Cube]] provides Perfectly Matched Layers (PML) as absorbing boundary conditions. PML's are layers of fictitious complex anisotropic materials designed to absorb any incident electromagnetic wave at all angles of incidence. The advantage of using a PML boundary condition over other types of ABC is that you do not need to care More detail about about what material or combinations of materials exist at the boundaries, since the PML can absorb anything! The disadvantage of using PML is that they require more computational resources and more sophisticated update field equations. Several types of PML have been proposed in the FDTD literature. [[EM.Cube]]'s [[FDTD Module]] uses the Convolutional Perfectly Matched Layer (Advanced CPML). This is based on a newer implementation of the complex frequency-shifted PML (CFS-PML) that uses recursive convolution. It has been shown that Setup|advanced CPML is highly effective at absorbing evanescent waves and signals with a long time signature. Therefore, using CPML, you can place the boundaries much closer to the objects in the project workspace. {{Note|[[EM.Cubesetup]]'s default quarter wavelength offset for the domain box is a very conservative choice and can be reduced further in many cases. A offset equal to eight free-space grid cells beyond the largest bounding box usually give a more compact, but still valid, domain box.}} You can set the number of CPML layers as well as their order. This is done through the CPML Settings Dialog, which can be accessed by right clicking on the '''CPML''' item in the '''Computational Domain''' section of the Navigation Tree and selecting '''CPML Settings...''' from the contextual menu. By default, four CPML layers of the third order are placed outside the FDTD problem domain. It is recommended that you always try a four-layer CPML first to assess the computational efficiency. The number of CPML layers may be increased only if a very low reflection is required (<-40dB). [[Image:FDTD15.png]] Figurefound here: [[FDTD Module]]'s Advanced CPML Settings dialog. ===Modeling Planar Structures of Infinite Extents=== [[Image:FDTD23.png|thumb|300px|Domain Settings dialogSetup]] 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. Examples include examining the transient response of a planar structure, very wideband simulations, planar structures involving complex materials or 3D geometries embedded inside the substrate layers, to name a few. A planar substrate usually consists of one or more dielectric layers, possibly with a PEC ground plane at its bottom. Unlike [[EM.Cube]]'s [[Planar Module]], where the substrate layers are defined implicitly in the "Stack-up Settings" dialog, in the finite-domain [[FDTD Module]], you need to draw each dielectric layer separately and then stack them up manually. The substrate of a planar layered structure extends laterally to infinity. In other words, the ±X and ±Y boundary walls must, in effect, retreat to infinity. This can be accomplished in the [[FDTD Module]] by setting up the CPML layers in a particular way. For this purpose, the lateral CPML layers need to move in and touch the sides of the dielectric layer stack-up. In other words, 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. Similarly, if the planar structure ends in an infinite PEC ground plane from the bottom, you must assign a PEC boundary condition to the bottom side of the domain box and set the -Z offset equal to zero.In the latter case, the presence of the metal plane at the bottom of the physical structure is implied although you will not see it in the project workspace. The CPML layers on the sides and at the bottom of the computational domain will absorb all the incident waves propagating in the free space or inside the substrate layers and thus emulate infinite extents. This leaves only the +Z offset with a nonzero value. The top CPML layer is moved back and placed above the finite parts of the structure. {{Note|The current release of [[EM.Cube]]'s [[FDTD Module]] does not support anisotropic or dispersive layers of laterally infinite extents. In other words, You can only define anisotropic and dispersive material objects of finite size that do not touch the CPML boundaries.}} {{isoimg|FDTD24.png|Setting the ±X and ±Y and -Z domain offsets equal to zero for a laterally infinite planar structure with a PEC ground.}}
===Creating A Yee Mesh===