1.2     FDTD Method in QuickWave Software

The task of electromagnetic simulations is to predict the electromagnetic behaviour of high-frequency structures. Ideally, we would like to be able to define any physical geometry. And ideally, we would like to obtain the results coinciding with the physical ones. In practice, QuickWave has been designed to come as close as possible to those goals.

QuickWave consists of two main programs: QW-Editor and QW-Simulator.

 

The QW-Editor performs the following tasks:

The QW-Simulator performs the following tasks:

Thus consecutive application of QW-Editor and QW-Simulator allows a complete process of the FDTD analysis. Here are some remarks about this process and the application of both programs.

As it was mentioned, the actual FDTD analysis must be preceded by the stage of pre-processing, where the 2D/3D geometry is first defined, and then decomposed into a mesh of FDTD cells. Ideally, we would like the software to consider an arbitrary 2D/3D geometry. However, this geometry must then be approximated with a finite number of cells, belonging to a finite number of predefined cell types. In classical FDTD only cuboidal cells completely filled with one medium can be modelled, what significantly corrupts the approximation of physical geometry. QuickWave utilises an original conformal FDTD formulation developed by the authors of the software. The FDTD method has been enhanced so that it can model many new cell types, including cells cut by a plane and filled with basically two but in some cases up to four different media. An improvement over classical FDTD is well visible (see Conformal Approximation for Irregular Geometries). Let us emphasise that in both cases we are talking about an actual internal representation of the 3D geometry in the electromagnetic simulation process, and not about the graphical display shown by the geometry editor.

The difference between classical and conformal FDTD plays a crucial role in a drive to obtain high accuracy with relatively short (or at least reasonable) time of calculation. In principle, we can always reduce the modelling error by refining discretisation. It should be noted however that decreasing the cell size in all three directions by 2, increases the memory occupation by a factor of 8, and the computing time 16 (!) times. Given finite computer resources, expanding the number of allowable cell types naturally improves the geometry representation, and increases the overall accuracy of the analysis. Therefore the enhanced conformal FDTD method is a major and unique asset of the QuickWave system. We can say that the whole system has been designed around the conformal FDTD kernel, so as to take full advantage of its capabilities. Thus, step-by-step, the format of intermediate files between QW-Editor and QW-Simulator has been based on the allowable cell types that QW-Simulator can model. Furthermore, to minimise the error of approximating the user-defined geometry by a mesh of cells, internal data structures used by QW-Editor for recording the geometry have been adjusted to those cells types. We will elaborate more on this issue throughout this Section.

Even with the conformal meshing used by QuickWave there is a basic rule that the FDTD mesh must be structured into layers in each coordinate dimension. This ensures a simple one-to-one correspondence between three integer indices pointing to a cell and the cell's geometrical location in space. Consecutive values of indices point to neighbouring cells, which can thus "exchange" electromagnetic information without the need to refer to additional data basis. This leads to a fast implementation of the field updating equations. From this perspective, the advantage of using conformal FDTD cells can be formulated as follows: we maintain a structured mesh and do not compromise the speed of the FDTD algorithm; at the same time, we refine geometry representation because media boundaries can be offset from layer boundaries in each coordinate direction.

To further simplify data management inside the programme, it is reasonable to first distinguish layers perpendicular to one of the co-ordinates. Thus in this manual we will use the notion of a layer for an array of cells parallel to the XY plane and having a particular height along the Z-axis. Each layer contains staggered conformal FDTD cells, based on the so-called Yee's cell, in which different field components are defined in different space positions. That is why we can decompose a layer into two sublayers. The first one, called H-sublayer, has the bottom in the plane where the field components Ez, Hx, Hy are defined (called H-plane). The other one, called E-sublayer, has the bottom in the plane where the field components H z, Ex, Ey are defined (called E-plane).

Yee’s cell.

 

 

The conformal cells created by the QW-Editor are transferred (or as we say exported) into the QW-Simulator layer by layer. The meshing of 2D cross-sections parallel to the XY plane is performed at the bottom and top of each sublayer. Since the types of 3D cells are consistently predefined in QW-Editor and QW-Simulator, QW-Simulator can reconstruct the original shape of material boundaries by collating the meshes at the bottom and top of the neighbouring sublayers. The result is recorded in the form of six structured LC matrices, which comprise full information on each cell's geometry and filling media. Such an approach further optimises the operation count of the actual FDTD analysis to 24 additions and 6 multiplications (in lossless regions).

In view of the above remarks, we can see that at the stage of exporting the mesh information, QW-Editor must already deal with the 3D geometry layered along the Z-axis. This is exemplified in A 3D structure cut into slices picture, where a 3D structure is divided into sublayers, and one sublayer is extracted and placed aside.

 

A 3D structure cut into slices in parallel to the plane Z=const.

 

Note that the particular structure of data required by QW-Simulator makes it natural for QW-Editor to store internally any 3D geometry as a set of "bricks", each "brick" having two walls perpendicular to the Z-axis.

Let us now formalise the terminology. We shall call the above "bricks" elements. We distinguish simple elements (example of simple element picture), in which the bottom and the top are identical polygons, and combined elements (example of combined element picture), in which the bottom and the top can be different polygons but with the same number of vertices. Elements can be "high" and subsequently meshed into layers or sublayers. In the case of complicated geometries, in may be convenient to use "low" elements, each spanning just one sublayer.

Examples od simple element (a) and combined element (b).

 

The elements can be treated as a kind of intermediate product in the meshing process. A possibility to list all the elements and investigate each of them separately may be used in QW‑Editor as one of the tools to monitor and control the automatic meshing process.

From the geometrical viewpoint, elements are "slices" of the actual 3D structure. Many simple 3D structures can be defined as combinations of just a few elements; more complicated structures may require a large number of elements for accurate description. In such a case (see A 3D structure cut into slices picture) we treat the structure as an object internally composed of elements. QW-Editor allows to list all the objects in use and to perform on them various operations. Note that performing an operation on the object is equivalent to performing this operation on all elements comprising this object, but it is more convenient and faster.

Let us now take a closer look at the ways of defining 3D geometries in QW-Editor. There are four basic ones:

The most convenient way of defining 3D geometries is using QW-Modeller for QuickWave. QW-Modeller for QuickWave is a plug-in (workbench) for the open source FreeCAD (http://www.freecadweb.org), general purpose feature-based parametric 3D CAD modeller with a modular software architecture, which makes it easy to provide additional functionalities without modifying the core system. The CAD capabilities of FreeCAD are based on the OpenCasCade® kernel, a professional-level CAD kernel, featuring advanced 3D geometry manipulation and objects.

One of the most powerful features of FreeCAD is the scripting environment. From the integrated python console (or from any other external Python script), you can gain access to almost any part of FreeCAD, create or modify geometry, modify the representation of those objects in the 3D scene or access and modify the FreeCAD interface. Python scripting can also be used in macros, which provide an easy method to create custom commands.

QW-Modeller for QuickWave is free and can be used without any restrictions for creating geometry, assigning the materials, adding ports, boundary conditions, setting mesh, excitation parameters, post-processings, etc.

QW-Modeller for QuickWave allows preparing a complete project for electromagnetic simulation with QuickWave software using:

 

It should be additionally noted that the boundary approximation in the XY plane is accomplished in a different way than the approximation of boundaries situated along the Z-axis. QW-Editor first cuts the structure into sublayers perpendicular to the Z-axis, and then produces 2D meshes at the bottom and top of each sublayer. QW-Simulator in its pre-processing stage first considers the shapes of the bottom and top of the consecutive sublayers, and then connects them with planar (vertical or oblique) side walls. This is exemplified in Waveguide transition picture, where we consider a tapered waveguide transition with oblique boundary lines situated in the YZ plane. In the left-most display, horizontal blue and green lines indicate the boundaries between consecutive sublayers. The lower displays show 2D conformal meshes generated at the bottom of each sublayer. Each two consecutive 2D meshes are then connected with three vertical side walls and one oblique side wall, reconstructing the original taper. On the contrary, the classical FDTD applied to the structure shown in Waveguide transition picture  would produce only layers of 3x3 or 3x2 full cells, thus it would actually convert the tapered transition into an abrupt step-in-width at Z=2. It should be noted that the conformal mesh often includes very small cells - or in other words, cells that are nearly but not completely filled with metal (see layer 9 in Waveguide transition picture). In the classical FDTD algorithms, and also in some conformal FDTD formulations different than the one applied in QuickWave, such cells lead to instability unless the FDTD analysis is conducted with a substantially reduced time-step. In QuickWave these boundary-matching cells do not cause any stability problems and do not require time-step reduction.

 

     

Waveguide transition and mesh created in succesive sublayers of the tapered section (from the left: layer 5, 6, 7, 8, 9, and 10).

 

 

Although both above examples have been concerned with curved and oblique metal boundaries, note that the meshing process is accomplished in the same way in the case of any media interfaces, for example, a boundary between two dielectrics. QW-Editor always approximates the physical structure with a set of cells. QW-Simulator, through its internal conformal geometry compiler, converts this cell-by-cell description into matrices of auxiliary local electromagnetic parameters.

The meshing strategy outlined so far provides competitive accuracy in representing volumetric variations of materials. However, it would not be sufficiently accurate for problems involving strong field singularities, for example, near metal corners, edges, and thin wires. Therefore QW-Editor additionally allows the user to define thin metal layers (of thickness negligible as compared to the FDTD cell size, and thus set by the user to zero) and wires (of diameter specified by the user, and smaller than the FDTD cell size). The mesh generator automatically adds information about the presence of these special elements to the description of appropriate cells. Then QW-Simulator includes metal wires or thin metal layers in its LC matrices. It can also model the singular field behaviour around them. For wires, such singularity corrections are made automatically. To enable singularity corrections along metal blocks or thin metal layers (of zero thickness), the user should ensure that respective edges coincide with the mesh (e.g., by setting mesh snapping planes). All singularity corrections in the whole circuit can be suppressed by the user through the Export Options of QW-Editor.