• Nenhum resultado encontrado

12. EXEMPLO DE DECLARAÇÃO DE CONFIDENCIALIDADE

7.2 Spatial Discretization Algorithm

simulation is complete and the results are made available to the user in the graphical user interface.

(ii). The ratio between the lengths of two adjacent cells,ri, which is defined as ri= li

li+1

= xi+1−xi xi+2−xi+1

, i= 0, ...,Nx−2 (7.5) must be limited as follows

1/R≤ri≤R , R >1 (7.6)

in order to satisfy the criterion presented in Section 2.5.3, which suggests that R should not exceed about 1.4 in order to keep the truncation error sufficiently low;

(iii). The grid lines should, whenever possible, be aligned with the faces and/or edges of the structures under analysis, in order to more accurately model the interfaces between different media;

(iv). The mesh should have a density close toDx,maxboth in regions where the structure has finer geometric details and near material interfaces. In the other regions, the mesh density should be close toDx,min, in order to minimize the number of cells necessary to model the structure.

Figure 7.2: Geometry of the structure used to illustrate the spatial discretization algorithm’s operation.

Vertex x(mm) y(mm) v1 0.00 0.00

v2 0.00 15.725

v3 0.00 18.185

v4 0.00 28.10

v5 8.00 7.825

v6 8.00 15.725

v7 8.00 18.185

v8 8.00 20.275

v9 24.00 7.825 v10 24.00 20.275 v11 32.00 0.00 v12 32.00 28.10

Table 7.1: Coordinates of the vertices shown in Fig. 7.2.

In order to explain more clearly how the spatial discretization algorithm accomplishes the previous requirements, the description of the discretization procedure for the non-uniform case will be accompanied by an example. For this purpose, the geometry of ax−yplane cut of the microstrip patch antenna analyzed in Section 8.3 is shown in Fig. 7.2. In this figure the vertices of the triangles that compose the 3D geometry are highlighted and their coordinates shown in Table 7.1. As described earlier, by inspecting the x-coordinate of the vertices, the algorithm determines the first and last elements of X, which are respectivelyx0 = 0.0 and xN x = 32.0. In order to satisfy the requirement (iii), the algorithm also adds thex-coordinates of the other vertices toX as these are points associated with regions where variations of geometry and material properties occur. So, after adding these points, the initialX set, denoted asXref, is

Xref ={0,8,24,32} (7.7)

Before describing how the algorithm copes with the remaining requirements, it is necessary to assume some values for the maximum simulation frequency,fmax, and for the meshing densitiesDx,minandDx,max. Therefore, we will consider fmax = 20 GHz, Dx,min= 10 and Dx,max= 30. Taking into account that the relative permittivity of the substrate is εr= 2.2, the minimum wavelength isλmin∼= 10.113mm, from which

the minimum and maximum cell lengths along xare determined to be respectively Lx,min = 0.337 mm and Lx,max= 1.011 mm. The value chosen for Ris 1.3, which is the default value used in the mesh generation algorithm of the developed software.

Given the values of Lx,min and Lx,max, it is clear that more mesh lines must be added to Xref

in order to get a grid verifying (i). As a matter of fact, the problem resides on determining not only how many lines should be added to Xref, but also their positions, subject to the constraints (i) and (ii) and the requirements (iii) and (iv). Since this problem can be regarded as a constrained optimization problem, the approach implemented in the algorithm consists in determining, for each pair of consecutive elements of the initial setXref,xj,ref andxj+1,ref, the minimum number of mesh lines, as well as their positions, to be placed in the interval]xj,ref, xj+1,ref[.

So, for a given pair of consecutive elements of Xref, xj,ref and xj+1,ref, which, for the current example could be x0,ref= 0andx1,ref= 8, the problem can be formulated as an unconstrained optimization problem [34] by defining the following objective function:

f(x e

) = ΣNi=0j−3Ai+ ΣNi=0j−4Bi+C+D (7.8) wherex

e

is the array of mesh lines,

x0, x1, ..., xNj−2

used to discretize the interval]xj,ref, xj+1,ref[,Njis the number of cells to use for that discretization and

Ai=





0, ifLmin≤li ≤Lmax

li−Lmax

Lmax ×100, ifli> Lmax Lmin−li

Lmin ×100, ifli< Lmin

(7.9a)

Bi=





0, if1/R≤ri≤R

ri−R

R ×100, ifri> R (1−riR)×100, ifri<1/R

(7.9b)

C=

( 0, ifx0−xj,ref ≤Q Lmin

(x0−xj,ref)−Q Lmin

Q Lmin ×100, ifx0−xj,ref > Q Lmin (7.9c)

D=

( 0, ifxj+1,ref−xNj−2≤Q Lmin

(xj+1,ref−xNj−2)−Q Lmin

Q Lmin ×100, ifxj+1,ref−xNj−2> Q Lmin

(7.9d)

are penalty terms that measure by how much the array of mesh linesx e

deviates from an acceptable solution.

The term Ai is used to enforce the cell length constraint (i), Bi ensures the cell ratio constraint (ii) and C and D try to force the cells in the vicinity of the reference mesh linesxj,ref andxj+1,ref to have a size close to Lmin, withQ≤R, which is in agreement with requirement (iv). Taking into account that the discretization errors associated with non-uniform meshes are greater when the cell size changes at the boundary between different materials [35], in the developed software Q is set by default to 1.01, which corresponds to a 1%

tolerance for the cells adjacent to reference mesh lines.

In order to determine the solution that uses the minimum number of cellsNj, the following procedure is implemented by the meshing algorithm:

1. Choose a pair of consecutive elements ofXref,xj,ref andxj+1,ref;

2. Calculate a lower and an upper bound on the number of cells,NlowerandNupperthat could be used to uniformly discretize the interval]xj,ref, xj+1,ref[, by using respectively the maximum and minimum cell sizes. As an example, for the interval]0,8[,Nlower= 8 andNupper= 23. SetNj ←Nlower;

3. Create an array for the mesh lines x e

, with Nj −1 elements. Use as an initial approximation to the

solution the uniform discretization of the interval]xj,ref, xj+1,ref[. Minimize the objective functionf(x e ) using thesteepest descentline search method [34];

4. If the value off(x e

opt)is smaller than a previously defined value, which for the developed algorithm is by default 1%, the mesh satisfies the necessary requirements for the current value ofNj and the algorithm jumps to step 5. Otherwise, setNj ←Nj+ 1 and return to step 3, unlessNj> Nupper, which means that the algorithm has not been able to create a mesh with the desired characteristics. For the latter case, the algorithm chooses thex

e

optsolution that leads to the lowest error, displays a message warning the user about the problems that occurred during the discretization of the current interval and proceeds to step 5;

5. Add the elements of the arrayx e

opt to theX set; Setj←j+ 1and go to step 1 unless all intervals of Xrefhave already been discretized. In this case the procedure ends, since theX set has been completely determined.

Although this approach may not lead to a globally optimal solution, which could only be achieved by solving the optimization problem for all elements ofXref simultaneously, it will nevertheless be very close to this solution as the lengths of the cells adjacent to the lines ofXrefare superiorly limited byQ Lmin, which, to some extent, decreases the interdependence between the meshing of adjacent intervals.

The mesh generated using this algorithm, for the example of Fig. 7.2, is shown in Fig. 7.3. As can be observed, the mesh lines are aligned with the boundaries of the geometry, where the mesh resolution is close to Dmax = 30. For the remaining regions, the mesh resolution is close toDmin = 10, which proves that the developed spatial discretization algorithm indeed reduces the number of cells required to discretize the structure.

Figure 7.3: Two-dimensional Cartesian grid that results from the non-uniform discretization of the structure of Fig. 7.2 using the spatial discretization algorithm with parameters Dx,min=Dy,min= 10and Dx,max = Dy,max= 30.