• Nenhum resultado encontrado

3. Grid Generation

3.1 Choice of Grid Configuration

CFD calculations comprise three main steps: pre-processing, solving and post-processing. The first step is as important as the other two since it consists of defining the computational domain and the grid on which the discretized equations of mass conservation and momentum (and possibly energy) balance are solved. A good grid is essential for a good quality of the solution because it has to guarantee that all the important features of the flow are adequately solved. Some of those features (mainly if dealing with turbulent flows) exhibit large gradients (e.g. boundary layer), thus the grid has to be sufficiently dense in such regions so that the numerical approximation is an accurate one but it cannot be so dense that the solution is impossible (or too costly) to obtain. It should ensure a satisfactory relation between computational cost and solution quality, meaning that grids that are unnecessarily fine in the whole domain will result in a computational time that could easily be reduced without damaging the quality of the solution. Therefore, generating grids for complex flows such as turbulent ones can be (and it usually is) a very time consuming task.

One of the main goals of this thesis is to present an efficient approach to generate good quality grids suitable for the application of wall functions boundary conditions. The concept of “good quality

18 grid” can be dependent on the problem but a few properties are desirable in most cases. In viscous flow calculations, grid line orthogonality is highly desirable and is of major importance near solid boundaries due to the boundary layer. Grid line distances close to surfaces are also very important since they should be small where high resolution is needed but should increase smoothly when moving away from the wall. Curved surfaces can be problematic when controlling grid line distances and require special attention.

The first decision one has to make when generating a grid is between using a structured or an unstructured grid. The former consists of families of intersecting lines, one for each space dimension, with the mesh points located at the intersection of one line of each family, whereas the latter consists of arbitrary distributions of mesh points, connected by triangles, quadrilaterals or polygons (in a two- dimensional problem).

Both types of grids have important advantages: from a CFD point of view, structured grids are often more efficient in terms of accuracy, CPU time and memory requirement [1]. Also, in flows with predominant gradients in one of the directions, high resolution is necessary in areas where such gradients occur. It is much more difficult to generate accurate solutions if highly distorted cells (e.g.

triangles) are used in an unstructured grid. Moreover, structured curvilinear grids are easily generated aligned with the predominant flow direction, which helps the convergence of the CFD solvers. Such alignment is not possible in unstructured grids. Finally, the application of boundary conditions and turbulence models benefit from a good definition of the direction normal to flow features such as walls or wakes, which is easily obtained in structured grids. Regardless of its benefits, generating structured grids in complex geometries can be extremely time-consuming. Unstructured grids offer the possibility to develop automatic grid generation tools that significantly reduce the time spent on the grid generation process.

From all mentioned advantages offered by structured grids, the most relevant for this work is the control of the resolution in the near-wall region. Control of near-wall distances is crucial to study the influence of the first cell height used in the WF method on the aerodynamic characteristics of airfoils.

Another important feature of structured grids is the possibility to add and remove lines from one or both families of lines so that grids with different levels of refinement are geometrically similar and can therefore be compared. In this thesis, each set of grids contains 9 systematically refined, geometrically similar grids. Therefore, we will have data from 9 refinement levels which will be used to estimate the numerical uncertainty using the method presented in [38]. The way geometrical similarity is obtained is by parameterizing the grid when defining the boundaries, i.e. defining the number of points in all boundary lines as a fraction of the points that define the airfoil surface, hereafter referred to as . The different and the respective refinement ratio are listed in Table 3.1. The refinement ratio is defined as

19

X

Y

-12 0 12 24

-12 0 12

X

Y

-0.5 0 0.5 1 1.5

-0.7 0 0.7 ℎK

u= ³J´RŒ ‹— Š‰ ˆ —ˆ‰M µŒˆ‘

J´RŒ ‹— Š‰ ˆ µŒˆ‘ ˆ (3.1)

And represents the ratio between typical cell sizes (ℎ) of grid ˆ and the finest grid.

Table 3.1 – and refinement ratio of each grid

;<= 241 301 361 421 481 601 721 841 961 :/:% 4 3.20 2.67 2.29 2 1.60 1.33 1.14 1

In cases where a structured arrangement is necessary but the geometry is not simple, a common practice is to divide the domain into regions called “blocks” that are generated separately and whose boundary points are matched to the boundaries of neighbouring blocks. These types of grids offer higher flexibility since it is possible to refine the grid only where it is necessary without it propagating unnecessarily to other parts of the domain.

3.2 Generation of the base grid

The grids used in this thesis can be described as having two distinct regions: an inner C-shaped region where the shape of the airfoil is defined and rotates according to the angle of attack; and an outer rectangular region where the external boundary conditions are defined. Figures 3.1a and 3.1b show the computational domain and the two regions mentioned for equal to half of the coarsest grid, i.e. = 121.

(a) (b)

Figure 3.1 – Computational domain (a) and close-up of interior C-shaped grid (b)

20 The following procedure is used to generate the base grids for each airfoil:

1) Points are distributed on the boundary of an inner C-shaped block (Block I) and along the surface of the airfoil. The method for the distribution of points on the boundaries of Blocks I to V is explained afterwards.

2) An orthogonal grid generator based on a system of partial differential equations [39] is used to obtain a smooth distribution of points along the boundaries of Block I.

3) An elliptical grid generator with control functions based on the Grape approach [40] (which gives a good compromise between grid line distances and orthogonality as shown in [41]) is used to obtain the interior grid.

4) Once the grid of Block I is generated, the boundaries of the remaining blocks are defined, starting from Block II on the top, followed by Block III on the bottom, Block IV on the left and, finally, Block V on the right, as shown in Figure 3.2. The nodes on the interfaces of different blocks are matched.

Figure 3.2 – Blocks of base grid and its designations

5) The orthogonal grid generator and the Grape approach mentioned in 2) and 3) are used to generate the grid of Block II in a similar way to that of Block I.

6) As for the remaining Blocks, only the Grape approach is used since the boundary nodes are defined by Blocks I and II.

Let us first address step 1) of the procedure listed above.

3.2.1 Block I

Block I is a C-shaped block that one can imagine as a rectangle in the computational domain (¶, ·) that is transformed into a C on the physical domain (L, ). A simple representation of this transformation is shown in Figure 3.3:

X

Y

-0.5 0 0.5 1 1.5

-1 -0.5 0 0.5 1

V II

III I IV

21 Figure 3.3 – Transformation from computational (left) to physical (right) domain

Block I rotates according to the angle of attack that is being studied. The other blocks are adapted to this rotation by defining the points on which the different blocks are matched to Block I. This is addressed afterwards.

The first step to construct Block I is defining the shape of the airfoil, which represents part of the bottom boundary of the computational domain. In this thesis, this is performed in two distinct ways.

For the NACA 0012, the equations that define the thickness distribution (3.2) and the mean camber line (3.3a) and (3.3b) for the NACA 4-digit series airfoils [42] are used to create the surface.

c = M

0.20 \0.29690√L − 0.12600L − 0.35160L+ 0.28430Lº− 0.10150Lœ] (3.2)

where M is the maximum thickness in percentage of the chord (0.12 in this case) and L is the position along the chord. The thickness is then added perpendicularly to the mean camber line, which is defined by equations (3.3a) and (3.3b) for points before and after the point of maximum camber, respectively.

» = ´

QX2QL − LY (3.3a)

and

» = ´

X1 − QY¼X1 − 2QY + 2QL − L½ (3.3b)

where ´ is the maximum camber in percentage of the chord (0 in this case since it is a symmetrical airfoil) and Q is the location of the maximum camber in tenths of chord (also 0 in this case). A cosine distribution is used in order to guarantee a finer distribution close to the leading and the trailing edges.

For the Eppler 374, the coordinates of a number of points from [43] are used to perform an interpolation procedure described in [44] to add points to the surface.

4

1

B3

B1 B4

3

B2

2 4

1 B3

B1 B4

3 B2

L 2

·

22 Once the surface of the airfoil is defined, the next step is to create the other lines of Block I. The boundaries of Block I and their designations are shown in Figure 3.3. The first line is the region of the near wake from the trailing edge to the point that defines the right boundary of Block I, which is located at 1.1 chords from the leading edge. The near-wake contains X − 1Y/6 + 1 points and their distribution is defined by a stretching function [45] with the purpose of making a smooth transition from one region to the other so that there is not a sudden increase or decrease in the size of two adjacent elements. This stretching function uses a reference element to determine the size of the first element of the line on which the function is used. In this region, the reference element is the last element on the trailing edge. The first boundary of Block I is now defined and consists of a total of 4/3 ∗ − 1/3 points.

The outer boundary of Block I consists of:

B2: vertical line with X − 1Y/6 + 1 points uniformly distributed.

B3: two horizontal lines at a distance of 0.25 chords above and below the chord, plus a semicircle.

It contains 4/3 ∗ − 1/3 points. For the horizontal lines, the region directly above and below boundary B1 has the same point distribution as B1. For the rest of B3, the distribution of points is tuned automatically so that each point corresponds to one point at the airfoil surface.

B4: The same as B2.

This completes the definition of all the boundaries of Block I, which contains 321x41 points (321 in the ¶-direction and 41 in the ·-direction) in the coarsest grid and 1281x161 in the finest. At this point, step 1) of the grid generation procedure presented in section 3.2 is complete and the interior grid for Block I is generated as mentioned in steps 2) and 3). First, the grid is calculated using an orthogonal grid generator based on a system of partial differential equations [36] to obtain a smooth distribution of grid nodes along the outer boundaries with good orthogonality on the wall. That distribution is then fixed and used as boundary condition on an elliptical grid generator with control functions based on the Grape approach [40] which gives a good compromise between grid line distances and orthogonality. The other 4 blocks are constructed based on the distribution of points on the outer boundary of Block I. The procedure for the construction of Blocks II to V is explained next.

3.2.2 Blocks II and V

Block II is located above Block I and is divided in three sub-blocks: II-A, II-B and II-C. The centre sub-block (II-B) is located directly above Block I so the point distribution on the bottom boundary of this sub-block coincides with the one on the top boundary of Block I. The remaining boundaries of Block II are defined using stretching functions based on different reference elements. Block II contains 309x41 points in the coarsest grid and 1233x161 in the finest. The boundaries on Block II are

23 then completely defined and the exact same procedure is done symmetrically for the block below Block I (Block V).

3.2.3 Blocks III and IV

The last two blocks (Block III and Block IV) have all their boundaries defined except one: the inlet boundary in Block III and the outlet boundary in Block IV. In these boundaries, a two-sided stretching function is used so it takes as reference elements the closest element in Block II and Block V. Block III has 81x25 grid nodes in the coarsest grid and 321x97 in the finest and Block V contains 81x81 and 321x321 points in the coarsest and the finest grid, respectively. This completes the definition of all the boundaries in the domain and steps 5) and 6) are executed to create the grid of Blocks II to V. Table 3.4 shows the number of nodes in each block in directions ¶ and · for the coarsest and finest grids as well as the total number of volumes.

Table 3.2 – Grid lines in each block and total number of volumes of coarsest and finest grid

3.3 Interpolation for near-wall refinement

The base grid mentioned in the previous section was constructed in order to ensure good grid characteristics, namely orthogonality and grid line distances. However, this grid does not take into account the need for very small size of the near-wall cells. It is then necessary to modify it in order to fulfil such requirement. With this purpose, the base grid is used to perform an interpolation routine in order to create a new grid which is fine close to the wall and becomes gradually coarser as the distance to the wall increases.

Interpolation is used for near-wall refinement on Block I and to add or remove lines from the remaining blocks, maintaining the node distribution of the base grid. The C shape chosen for Block I requires to use the same node clustering in the centreline of Block IV XL = 0Y. For this reason, Blocks I and IV are put in one single block, hereafter referred to only as Block I.

The interpolation procedure consists of a sweep along the ¶-direction, i.e. lines of ·=constant, followed by a sweep in the ·-direction. Both sweeps are equivalent and comprise the following steps:

;<= = '¾% ;<= = ¿À%

Block I 441x81 1761x321

Block II 269x41 1073x161

Block III 269x41 1073x161

Block IV 61x25 241x97

# of volumes 58080 929280

24 1) A spline representation of the line in the XL, Y coordinate system is created for an independent variable s from 1 to NP, where NP is the number of points of that line in the base grid.

2) The points are then distributed along the spline according to the desired node distribution.

More or less points than the existing on the base grid can be use in this step.

3) Finally, the points in the XL, Y coordinate system are determined by interpolation.

The second step of this procedure determines the type of grid on which the WF method is used.

Two alternatives exist: the “standard” approach and a new approach, called W-grid that seeks to minimize the numerical error inherent to the “standard” case.

3.3.1 The W-grid

The W-grid is generated by using a stretching function in the sweep in the ·-direction of Block I and then removing a number of lines ·=constant adjacent to the wall. The stretching parameter (ratio between desired first cell height and equidistant spacing) is tuned to produce the desired value of . The near-wall spacing is controlled by multiplying this stretching parameter by a factor Á. Five grid sets are created with different Á values. Each set and the respective near-wall spacing factor are listed in Table 3.2.

Table 3.3 – Near-wall spacing factor Set A Set B Set C Set D Set E A 20 10 50 100 150

The difference between the base grid and the W-grid with no lines removed is shown in Figure 3.4.

(a) Base grid (b) W-grid with no lines removed

Figure 3.4 – Close-up of the trailing edge of base and W-grid for = 121

X

Y

0.8 0.85 0.9 0.95 1 1.05 1.1

-0.15 -0.1 -0.05 0 0.05 0.1 0.15

X

Y

0.8 0.85 0.9 0.95 1 1.05 1.1

-0.15 -0.1 -0.05 0 0.05 0.1 0.15

25 The choice for a multi-block structured grid allows for an easy elimination of grid lines which represents one of the reasons this arrangement was chosen. By removing more or less lines, one can choose the location of the first node above the wall where the wall-function boundary condition is applied. For different refinement levels, a different number of lines are removed in order to achieve approximately the same value of in each group. Each group of grids with the same (dimensional, not ) distance to the wall is represented by w**, where ** represents the number of lines removed in the finest grid ( = 961) of that group. Obviously, the correspondent of each group will be similar for the different grid refinements, but not exactly the same, since it depends on the calculation of the friction, as shown in equation (2.15a). The number of lines removed for each refinement level and each group is shown in Table 3.4. The first column of Table 3.4 represents the different groups (being w16 the group with fewer lines removed, thus the one with lower and w160 the one with more lines removed) and the first line represents the different refinement levels (indicated by the , which ranges from 241 up to 961, hence covering a refinement ratio of 4).

Table 3.4 – Number of lines removed in each refinement level and for each w-group

241 301 361 421 481 601 721 841 961

w16 4 5 6 7 8 10 12 14 16

w32 8 10 12 14 16 20 24 28 32

w48 12 15 18 21 24 30 36 42 48

w64 16 20 24 28 32 40 48 56 64

w80 20 25 30 35 40 50 60 70 80

w96 24 30 36 42 48 60 72 84 96

w112 28 35 42 49 56 70 84 98 112

w128 32 40 48 56 64 80 96 112 128

w160 40 50 60 70 80 100 120 140 160

The number of lines removed is a function of the which again shows the importance of using geometrically similar grids. Each group is calculated with all the 9 refinement levels in order to estimate the uncertainty of the calculations. The W-grid with no lines removed and with 16 lines removed (with = 121) is depicted in Figure 3.5. Two important features are obtained when constructing the WF grids in this way: possibility to easily choose the value of (simply by choosing how many lines are removed); and to keep the small size of the cells immediately above the first one which are necessary to proper resolve the high gradients in the near-wall region. Since one of the goals of WF is to reduce the number of cells, thus saving time in the computations, Table 3.5 shows the number of cells in the finest grid ( = 961) of each group (w16 to w160), as well as the relative difference in total cells number from the grid with no lines removed.

26 (a) W-grid with no lines removed (b) W-grid with 16 lines removed

Figure 3.5 – Close-up of the trailing edge of W-grid for = 121

Table 3.5 – Number of volumes and relative difference of each w-group to W-grid with no lines removed

w16 w32 w48 w64 w80 w96 w112 w128 w160

# of volumes 901120 872960 844800 816640 788480 760320 732160 704000 647680

Savings (%) 3.0 6.1 9.1 12.1 15.2 18.2 21.2 24.2 30.3

3.3.2 The Standard grid

The second goal of this thesis is to compare the results obtained with the W-grid with those from the Standard approach. Most commercial grid generators, when dealing with WF, allow the user to choose the but construct the grid with increasing grid line distances, resulting in too coarse grids.

In this work, this type of grids is generated by using a stretching function with the first element size being the same as in the equivalent W-grid. The difference between the W-grid and the Standard grids is illustrated in Figure 3.6.

X

Y

0.95 1 1.05

-0.06 0 0.06

X

Y

0.95 1 1.05

-0.06 0 0.06

27

(a) W-grid (b) Standard grid

Figure 3.6 – Close-up of the trailing edge of W-grid and Standard grid for = 241

It was mentioned previously that it is desired to have grid lines aligned with the flow and it was one of the reasons a C-shaped configuration for the inner block was chosen. However, when the W-grid or the Standard grid line distribution is used, this results in a region immediately downstream of the trailing edge with too large grid line distances. Since in this near-wake region, high gradients are still present, this gap may produce significant numerical error. This issue could be avoided by using locally an O-grid [5], but then the grid lines would not be aligned with the flow, so some kind of transition to a C-shape would be necessary, resulting in additional work that is unnecessary considering the objectives of this study.

X

Y

0.95 1 1.05

-0.06 0 0.06

X

Y

0.95 1 1.05

-0.06 0 0.06

Documentos relacionados