10.2 How to assure the proper mesh generation
The process of meshing consists of generating a set of FDTD cells describing the considered structure. As it has been mentioned in FDTD Method in QuickWave Software half-cells form sublayers in XY plane (with one layer of the FDTD cells composed of two sub-layers). Each of the half-cells of QW-3D conformal FDTD method must be a cuboid composed of one medium or a cuboid divided by a plane into two parts filled by different media. Meshing is done automatically by QW-Editor during the Export operation. QW‑Simulator reads the meshing information coded in *.sh3 file and assigns to each of the cells proper electrical parameters (depending on the cell's shape and media filling).
As it was mentioned the meshing is performed automatically by QW-Editor. However there are certain important rules to be obeyed while introducing the geometrical data. We need to provide to the mesher consistent information leading to the expected results of the meshing process. Here we would like to draw the user's attention to several situations, which may cause meshing problems and thus should be avoided in projects. They first concern intersecting elements, multiple-filled cells, and meshing hazards along the Z-axis.
Intersecting elements
Important definition:
Two elements are defined to be non-intersecting if they obey the following condition:
In each of the cross sections parallel to the XY plane the pair of the elements is either disjoint or one of the elements is entirely included in the other.
If an element A is included in element B but their borders partially coincide the elements can be treated as non-intersecting only if the element A is defined as "filled inside" by a particular medium while the element B as "filled outside" by this or other medium.
Intersecting elements must be treated by the Join operations of QW-Editor. These operations produce out of them new elements that are non-intersecting. If the intersecting elements are still present during the mesh generation by QW-Editor, the mesh generator may not treat them in accordance with the user's intention. The resulting analysis will then be erroneous as exemplified in Basic Join operations. In general it cannot be avoided that it is the user's responsibility to provide consistent data to the editor and thus to eliminate intersecting elements before performing Export process.
Note that according to the above definition if an element is internally tangential to another one it should in general be treated as intersecting. However some of such situations (described in Basic Join operations) are automatically detected by the QW-Editor and treated correctly without the Join operation.
Note: In case of any doubts if the geometry of the project was correctly defined by the user and correctly understood by the mesh generator we strongly recommend to verify the meshing results using Test Mesh option of QW-Simulator extensively used in examples of Boolean operations on elements and objects and described in Effective FDTD mesh grid.
Multiple-filled cells
As it was mentioned aboveQW-Editor creates and exports to QW-Simulator a conformal mesh that may include cells filled with two different media (two dielectrics or metal and dielectric). In the case of complicated geometries, the mesh generator may initially create cells filled with three or more media. We shall call them multiple-filled cells. Multiple-filled cells will be simplified according to the following rules:
If the QW-Editor finds a cell shared by a metal and two different dielectrics, it assumes that the cell is shared between the metal and the dielectric occupying larger part of the cell (replacing with metal also the area occupied by other dielectric).
If the QW-Editor finds a cell shared by three different dielectrics, it assumes that the cell is shared between the two dielectrics occupying larger parts (and neglects the presence of the third dielectric replacing it with one of two other).
In the case of cells occupied by more than three media the QW-Editor will assume that the cell is shared between two media occupying two largest parts.
Nevertheless the user is encouraged to use Test Mesh option in QW-Simulator to verify the mesh created in regions of complicated geometry. In general, since the QW-Simulator treats more accurately cells filled with one or two media, it is recommended to avoid multiple-filled cells by defining mesh snapping planes passing through sensitive junction points.
Meshing hazards along the Z-axis
Let us recall that at the level of bottom and cover of each element the software automatically creates mesh snapping planes. If the mesh generator detects two such planes, enforced by two different elements, at different levels but very close to each other - it will create a very thin layer of cells. What may happen in some specific cases is that these two levels should really be identical, and they have been shifted apart as a result of previous operations on elements. The difference may also arise when we have two elements, at the same physical level and of the same physical height, but one of them is simple while the other - combined. For the combined element the levels of bottom and cover are explicitly remembered by QW-Editor. For the simple element, QW-Editor remembers its height and the level of bottom, and calculates the level of cover therefore. The result may be different from the level of cover of the combined element.
The thin layer of cells created in such cases would be unnecessary, prolonging the simulation time and deteriorating the accuracy. To avoid such problems, QW-Editor precedes the actual mesh generation by snapping of all coordinates to 10-5 in current units. This measure has proven sufficient in all typical applications, but nevertheless the user is advised to consult the Mesh/Splanes Info dialogue whenever substantial changes in the project have been made.