12. EXEMPLO DE DECLARAÇÃO DE CONFIDENCIALIDADE
6.2 Frequency-Domain Transformation
6.2.3 Averaging of the E ~ and H ~ fields on the virtual surface
The analytical formulation of the near-to-far-field transformation used in this work and presented in Sec. 6.2.1 assumes that the equivalent currents M
f
S andJ e
S are collocated. However, since these currents are calculated from the tangentialE
e andH
e
fields, which are spatially offset on the Yee cell, it is necessary to perform an average of field values of adjacent cells. Assuming that the E- and H-field components used for the transformation are located in the center of the Yee cells, as shown in Fig. 6.2, the resulting averaged field values for the faces located ati=imax andi=imin are given by
Eyavg|i+1/2,j+1/2,k+1/2= Ey|i,j+1/2,k+Ey|i,j+1/2,k+1+Ey|i+1,j+1/2,k+Ey|i+1,j+1/2,k+1
4 (6.14a)
Ezavg|i+1/2,j+1/2,k+1/2= Ez|i,j,k+1/2+Ez|i,j+1,k+1/2+Ez|i+1,j,k+1/2+Ez|i+1,j+1,k+1/2
4 (6.14b)
Hyavg|i+1/2,j+1/2,k+1/2= Hy|i+1/2,j,k+1/2+Hy|i+1/2,j+1,k+1/2
2 (6.14c)
Hzavg|i+1/2,j+1/2,k+1/2= Hz|i+1/2,j+1/2,k+Hz|i+1/2,j+1/2,k+1
2 (6.14d)
The averaged values for the other faces are obtained by using analogous expressions for the relevant field components.
Figure 6.2: Geometry used for the averaging of theE~ andH~ fields’ tangential components for the calculation of the equivalent currentsM~S andJ~S.
Chapter 7
Mesh Generation Algorithm
This chapter describes the algorithm developed for the purpose of automatically generating the three-dimensional mesh that represents both the geometry and the electrical properties of the structures being simulated. Although for some problems involving simple geometries the mesh structure and material properties of each cell could be manually specified by the user, by means, for example, of an input text file, the approach followed in this work is more general, as the developed meshing algorithm is capable of automatically generating uniform and non-uniform meshes for structures having potentially very complex geometries. This allows the software to simulate a broad range of structures, which is not limited to antennas, as discussed in Appendix F.
Since the developed software does not have 3D solid/surface modeling capabilities, as the develop- ment of such features is outside the scope of this work, the structures can be first designed in an appropriate CAD program, and then loaded into the developed software using the OBJ file format [8]. Nevertheless, the software already supports some geometric primitives like boxes, cylinders and spheres, which can be used to build some structures of interest. Taking into account that the software is written using the Java programming language and object oriented design principles have been employed in its development, a module providing 3D solid modeling capabilities could easily be developed in the future.
7.1 Meshing Algorithm Structure and Architecture of the FDTD Simulator
Taking into account that the mesh generation procedure is, just like the other methods and models presented in Chapters 3 to 6, a component of the developed FDTD code, it is convenient to give an overview of how these components interact in the developed software, before proceeding to a more detailed description of the meshing algorithm.
A flowchart illustrating the high-level architecture of the FDTD simulator is shown in Fig. 7.1. As can be seen, at the functional level the developed software is divided in three parts or stages: simulation and structure setup, mesh generation and FDTD simulation.
During the simulation and structure setup stage the user specifies both the simulation’s parameters and the characteristics of the structure to analyze. This stage comprehends the following processes/activities:
• Units and frequency range definition: After selecting the time, frequency and length units that best
Figure 7.1: Flowchart illustrating the high-level architecture of the FDTD simulator.
suit the problem being analyzed, the user specifies the frequency band for which results are desired, by setting the minimum and maximum frequencies,fmin andfmax. Sincefmax is related to the minimum wavelengthλmin, it will have a direct influence on the biggest cell size allowed, and, as a consequence, on the total number of cells required to simulate the structure. The frequenciesfminandfmaxwill also determine the bandwidth of the excitation signal (which is, by default, a Gaussian pulse), as discussed in Section 5.1;
• Structure and material definition: The structure to be analyzed is built either by using the geometric primitives available in the software or by importing 3D models designed in a different CAD program.
The user then creates the different materials of which the structure is made of and assigns them to the corresponding 3D models;
• Specification of excitation sources: The excitation sources, which in the developed software are denoted by “ports”, are defined by the user by specifying their parameters and locations in the three-dimensional computational domain;
• Specification of boundary conditions: Involves the choice of the boundary conditions to use for each face of the computational domain. When using the UPML, it is possible to select its thickness and configure the εeff and kmax parameters, as described in Section 3.3. It is also possible to specify a minimum distance between the structure and the boundaries of the computational domain, which is useful in some antenna problems in order to minimize the reflection of evanescent fields at the UPML;
• Set frequencies for near-to-farfield transformation: When the user wishes to obtain the farfield patterns for the structure being simulated, their frequencies must be selected before the simulation starts, for the reason that the phasors for the tangential E- and H-fields are calculated by performing a DFT of the time-domain data concurrently with the FDTD update loop, as described in Section 6.2;
• Mesh properties definition: These settings are used by the mesh generation algorithm to create a uniform or non-uniform mesh. For a given spatial direction u, whereu= x, y, z, a non-uniform mesh can be generated by specifying minimum and maximum mesh densities, Du,min andDu,max, whose units are cells per (minimum) wavelength. Naturally, an uniform mesh can be created by settingDu,min=Du,max. After configuring the simulation settings and defining the structure to analyze, the program enters a mesh generation stage that automatically creates a mesh for the problem. The mesh generation algorithm creates the mesh in two stages: a spatial discretization stage and a material mapping stage.
In the first stage, a spatial discretization is performed in order to create a three-dimensional grid that defines the location and sizes of each cell. The grid is generated according not only to parameters previously specified by the user as the maximum frequency and the minimum and maximum mesh densities, but also the electrical properties of the materials that constitute the structure under analysis, required to calculate λmin, which will have a direct influence on the maximum cell size, as discussed in Section 2.3.3. As has already been mentioned, the possibility of specifying minimum and maximum mesh densities allows not only the generation of variable sized cells that better adapt to the geometry of the structures, but also allows the use of higher mesh resolutions in regions where fine geometrical features are present, as described in Section 2.5. The algorithm used to perform the spatial discretization is described in Section 7.2.
In the second stage of the meshing procedure, the location and size of each mesh cell is available as a result of the spatial discretization stage. Using that information and a procedure based on 3D intersection calculation that is described in Section 7.3, it is possible to determine to which structure each cell belongs, and therefore assign it the corresponding material properties.
After the second stage of the meshing algorithm, the location and lengths of each mesh cell, as well as its material properties, are stored in an appropriate data structure, which has all the information required to calculate the update coefficients (2.25)-(2.30). For instance, the time-step∆tcan be calculated according to the Courant stability criterion, from the set of minimum cell lengths∆xmin,∆yminand∆zminavailable in the mentioned data structure, and the effective material parameters (Section 4.3) calculated using the material information of each cell. The generated mesh can and should be inspected by the user in order to check whether the original structure is being correctly represented, and if necessary, generate the mesh again after changing its properties or other parameters that are influencing the resultant mesh.
After generating the mesh, the FDTD simulation can be started. Before the time-stepping procedure begins, a solver setup stage is run in order to initialize the arrays that will store the field components and update coefficients of each cell. Constant multipliers and other data structures that do not need to be computed/allocated at every time step are also initialized during this stage. Examples of these data structures are the input signals and field distributions used by the excitation sources, the arrays that store the phasors of the E- and H-fields used for farfield calculation, and the coefficients used to update the H-field around thin wires (Section 4.2). When the solver setup stage finishes, the FDTD time-stepping procedure begins. The structure of this procedure is very similar to that used in the code example C.2, being the only significant difference the addition of function calls after the H- and E-field update cycles, which are used not only to update the field components changed by excitation sources and the thin wire model, but also to perform the sampling and DFT of the fields tangential to the virtual box used in the near-to-farfield transformation.
When either the simulation termination energy criterion is verified or a maximum number of time steps has been simulated, the time-stepping procedure ends and a solver post-processing stage is run. During this stage, quantities of interest like the S-parameters and input admittances/impedances are calculated as described in Sections 5.3 and 5.4. It is also during this stage that the farfield patterns are calculated by integrating the equivalent J
e
S andM f
S currents. After the completion of the post-processing run, the FDTD
simulation is complete and the results are made available to the user in the graphical user interface.