P. 1
chp23

chp23

|Views: 4|Likes:
Published by Waseem Sarwar

More info:

Published by: Waseem Sarwar on Mar 31, 2012
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

03/31/2012

pdf

text

original

Sections

Chapter 23.

Grid Adaption

The solution-adaptive mesh refinement feature of FLUENT allows you to refine and/or coarsen your grid based on geometric and numerical solution data. In addition, FLUENT provides tools for creating and viewing adaption fields customized to particular applications. The adaption process is described in detail in the following sections. • Section 23.1: Using Adaption • Section 23.2: The Adaption Process • Section 23.3: Boundary Adaption • Section 23.4: Gradient Adaption • Section 23.5: Isovalue Adaption • Section 23.6: Region Adaption • Section 23.7: Volume Adaption • Section 23.8: y + and y ∗ Adaption • Section 23.9: Managing Adaption Registers • Section 23.10: Adaption Controls • Section 23.11: Improving the Grid by Smoothing and Swapping

23.1

Using Adaption

Two significant advantages of the unstructured mesh capability in FLUENT are: • The reduced setup time compared to structured grids 23-1

c Fluent Inc. November 28, 2001

Grid Adaption

• The ability to incorporate solution-adaptive refinement of the mesh By using solution-adaptive refinement, you can add cells where they are needed in the mesh, thus enabling the features of the flow field to be better resolved. When adaption is used properly, the resulting mesh is optimal for the flow solution because the solution is used to determine where more cells are added. In other words, computational resources are not wasted by the inclusion of unnecessary cells, as typically occurs in the structured grid approach. Furthermore, the effect of mesh refinement on the solution can be studied without completely regenerating the mesh. 23.1.1 Adaption Example

One example of how adaption can be used effectively is in the solution of the compressible, turbulent flow through a 2D turbine cascade. The initial mesh, shown in Figure 23.1.1, is quite fine around the blade. The surface node distribution thus provides adequate definition of the blade geometry, and enables the turbulent boundary layer to be properly resolved without further adaption. On the other hand, the mesh on the inlet, outlet, and periodic boundaries is comparatively coarse. To ensure that the flow in the blade passage is appropriately resolved, solutionadaptive refinement was used to create the mesh shown in Figure 23.1.2. Although the procedure for solution adaption will vary according to the flow being solved, the adaption process used for the turbine cascade is described here as an example. Note that while this example involves compressible flow, the general procedure is applicable for incompressible flows as well. 1. Display contours of pressure adaption function to determine a suitable refinement threshold. (See Section 23.4.) 2. “Mark” the cells within the refinement threshold, creating a refinement register. (See Sections 23.2.1 and 23.4.) 3. Repeat the process described in steps 1 and 2, using gradients of Mach number as a refinement criterion.

23-2

c Fluent Inc. November 28, 2001

23.1 Using Adaption

Grid

Figure 23.1.1: Turbine Cascade Mesh Before Adaption

Grid

Figure 23.1.2: Turbine Cascade Mesh After Adaption

c Fluent Inc. November 28, 2001

23-3

Grid Adaption

4. To refine in the wake region, use isovalues of total pressure as a criterion. (See Section 23.5.) This causes cells within the boundary layer and the wake to be marked, since these are both regions of high total-pressure loss. 5. Use the Manage Adaption Registers panel to combine the three refinement registers into a single register. (See Section 23.9.) 6. Limit the minimum cell volume for adaption to prevent the addition of cells within the boundary layer, where the mesh was judged to be fine enough already. (See Section 23.10.) 7. Refine the cells contained in the resulting adaption register. (See Section 23.9.) 8. Perform successive smoothing and swapping iterations using the Smooth/Swap Grid panel. (See Section 23.11.) This step is recommended if you are using conformal adaption. As shown in Figure 23.1.2, the effect of refining on gradients is evident in the finer mesh ahead of the leading edge of the blade and within the blade passage. The finer mesh in the wake region is due to the adaption using isovalues of total pressure. 23.1.2 Adaption Guidelines

The advantages of solution-adaptive refinement, when used properly as in the turbine cascade example in Section 23.1.1, are significant. However, the capability must be used carefully to avoid certain pitfalls. Some guidelines for proper usage of solution-adaptive refinement are as follows: • The surface mesh must be fine enough to adequately represent the important features of the geometry. For example, it would be bad practice to place too few nodes on the surface of a highlycurved airfoil, and then use solution refinement to add nodes on the surface. Clearly, the surface will always contain the facets contained in the initial mesh, regardless of the additional nodes introduced by refinement.

23-4

c Fluent Inc. November 28, 2001

23.1 Using Adaption

• The initial mesh should contain sufficient cells to capture the essential features of the flow field. Suppose, for example, that your intention is to predict the shock forming around a bluff body in supersonic flow. In addition to having sufficient surface resolution to represent the shape of the body, the initial mesh should also contain enough cells so that a reasonable first solution can be obtained. Subsequent gradient adaption can be used to sharpen the shock and establish a grid-independent solution. • A reasonably well-converged solution should be obtained before you perform an adaption. If you adapt to an incorrect solution, cells will be added in the wrong region of the flow. However, you must use careful judgment in deciding how well to converge the solution before adapting, because there is a trade-off between adapting too early to an unconverged solution and wasting time by continuing to iterate when the solution is not changing significantly. • In general, you should write a case and data file before starting the adaption process. Then, if you generate an undesirable mesh, you can restart the process with the saved files. • When performing gradient adaption, you must select suitable variables. For some flows, the choice is clear. For instance, adapting on gradients of pressure is a good criterion for refining in the region of shock waves. In most incompressible flows, however, it makes little sense to refine on pressure gradients. A more suitable parameter in an incompressible flow might be mean velocity gradients. If the flow feature of interest is a turbulent shear flow, it will be important to resolve the gradients of turbulent kinetic energy and turbulent energy dissipation, so these might be appropriate refinement variables. In reacting flows, temperature or concentration (or mole or mass fraction) of reacting species might be appropriate. • Poor adaption practice can have adverse effects. One of the most common mistakes is to over-refine a particular region of the solution domain, causing very large gradients in cell volume. This can adversely affect the accuracy of the solution.

c Fluent Inc. November 28, 2001

23-5

Grid Adaption

23.2

The Adaption Process

The adaption process has been separated into two distinct tasks. First, the individual cells are marked for refinement or coarsening based on the adaption function, which is created from geometric and/or solution data. Next, the cell is refined or considered for coarsening based on these adaption marks. The primary advantages of this modularized approach are the abilities to create sophisticated adaption functions and to experiment with various adaption functions without modifying the existing mesh.

! It is highly recommended that you write a case and data file before
starting the adaption process. Then, if you generate an undesirable grid, you can restart the process with the saved files. Two different types of adaption are available in FLUENT: “conformal” and “hanging node” adaption. Hanging node adaption, the default method, is described in Section 23.2.2. Conformal adaption, which is available only for triangular and tetrahedral grids, is described in Section 23.2.3. 23.2.1 Adaption and Mask Registers

Invoking the Mark command creates an adaption register. It is called a register because it is used in a manner similar to the way memory registers are used in calculators. For example, one adaption register holds the result of an operation, another register holds the results of a second operation, and these registers can be used to produce a third register. An adaption register is basically a list of identifiers for each cell in the domain. The identifiers designate whether a cell is neutral (not marked), marked for refinement, or marked for coarsening. The adaption function is used to set the appropriate identifier. For example, to refine the cells based on pressure gradient, the solver computes the gradient adaption function for each cell. The cell value is compared to the refining and coarsening threshold values and assigned the appropriate identifier, specifically for this example: • cell value < coarsen threshold: mark for coarsening

23-6

c Fluent Inc. November 28, 2001

23.2 The Adaption Process

• coarsen threshold < cell value < refine threshold: don’t mark, neutral • cell value > refine threshold: mark for refinement The GUI and text interface commands generate adaption registers that designate the cells marked for refinement or coarsening. These registers can be converted to mask registers. Masks, unlike the adaption registers, maintain only two states: ACTIVE and INACTIVE. If the adaption register is converted to a mask, cells marked for refinement become ACTIVE cells, while those that are unmarked or marked for coarsening become INACTIVE. You can use a mask register to limit adaption to cells within a certain region. This process is illustrated below. Figure 23.2.1 shows a cloud of cells representing an adaption register (shaded cells are marked cells). Figure 23.2.2 illustrates the active cells associated with a mask register. If the mask is applied to (combined with) the adaption register, the new adaption register formed from the combination has the marked cells shown in Figure 23.2.3. (Note that this example does not differentiate between refinement or coarsening marks because the mask is applied to both types of marks.) For more information on combining registers, see Section 23.9.

Figure 23.2.1: Marked Cells

Adaption Register with Shaded Cells Representing

c Fluent Inc. November 28, 2001

23-7

Grid Adaption

Figure 23.2.2: Mask Register with Shaded Cells Representing Active Cells

Figure 23.2.3: New Adaption Register Created from Application of Mask

23-8

c Fluent Inc. November 28, 2001

23.2 The Adaption Process

In summary, adaption registers can be created using geometric data, physical features of the flow field, and combinations of this information. Once created, adaption registers can be listed, displayed, deleted, combined, exchanged, inverted, and changed to mask registers. 23.2.2 Hanging Node Adaption

Grids produced by the hanging node adaption procedure are characterized by nodes on edges and faces that are not vertices of all the cells sharing those edges or faces, as shown in Figure 23.2.4. Hanging node grid adaption provides the ability to operate on grids with a variety of cell shapes, including hybrid grids. However, although the hanging node scheme provides significant grid flexibility, it does require additional memory to maintain the grid hierarchy which is used by the rendering and grid adaption operations.

Hanging Node

Figure 23.2.4: Example of a Hanging Node

Hanging Node Refinement The cells are refined by isotropically subdividing each cell marked for refinement. Figures 23.2.5 and 23.2.6 illustrate the division of the supported cell shapes described below: • A triangle is split into 4 triangles. 23-9

c Fluent Inc. November 28, 2001

Grid Adaption

• A quadrilateral is split into 4 quadrilaterals. • A tetrahedron is split into eight tetrahedra. The subdivision consists of trimming each corner of the tetrahedron, and then subdividing the enclosed octahedron by introducing the shortest diagonal. • A hexahedron is split into 8 hexahedra. • A wedge (prism) is split into 8 wedges. • A pyramid is split into 6 pyramids and 4 tetrahedra. To maintain accuracy, neighboring cells are not allowed to differ by more than one level of refinement. This prevents the adaption from producing excessive cell volume variations (reducing truncation error) and ensures that the positions of the “parent” (original) and “child” (refined) cell centroids are similar (reducing errors in the flux evaluations).

Triangle

Quadrilateral

Figure 23.2.5: Hanging Node Adaption of 2D Cell Types

Hanging Node Coarsening The mesh is coarsened by reintroducing inactive parent cells, i.e., coalescing the child cells to reclaim the previously subdivided parent cell. An inactive parent cell is reactivated if all its children are marked for coarsening. You will eventually reclaim the original grid with repeated application of the hanging node coarsening. You cannot coarsen the grid any further than the original grid using the hanging node adaption process. Conformal coarsening, however, allows you to remove original grid points to reduce the density of the grid.

23-10

c Fluent Inc. November 28, 2001

23.2 The Adaption Process

Tetrahedron

Hexahedron

Prism/Wedge

Pyramid

Figure 23.2.6: Hanging Node Adaption of 3D Cell Types

23.2.3

Conformal Adaption

The conformal adaption process does not create hanging nodes. Instead, all the cells sharing an edge or face include all the nodes on those entities. The conformal refinement process adds nodes on edges and the conformal coarsening removes nodes and retriangulates the resulting cavity. Conformal Refinement To refine the cell, boundary or internal faces (including periodic boundary faces) may be split. Figure 23.2.7 shows how the triangle labeled A would be split for refinement. The cells are refined by splitting the longest edge of the triangle or tetrahedron. This technique has two primary advantages: the process is conservative and does not require interpolation to obtain the solution vector for the new cells, and repeated refinement of a skewed cell does not continue to increase grid skewness. The present scheme finds the longest edge of any cell marked for refinement. The scheme then visits each of the cells that contain that edge and

c Fluent Inc. November 28, 2001

23-11

Grid Adaption

Figure 23.2.7: Cells are Refined by Bisecting Longest Edge

searches for a longer edge. If any of the neighbor cells has a longer edge, the scheme spins around that new edge searching for yet a longer edge. Once it has arrived at the longest edge, it splits that edge. Although this process maintains the quality of the triangulation with repeated application, it can cause many cells that were not marked for refinement to be split. For example, Figure 23.2.8 shows the original cell marked for refinement (marked with an X), and Figure 23.2.9 shows the final mesh created by the refinement process. Conformal Coarsening The grid is coarsened by removing nodes that are shared by cells marked for coarsening. If all the cells attached to the node are marked for coarsening, the solver attempts to remove the node. The following local retriangulation process is attempted for each of the nodes marked for removal: 1. A list of the cells attached to the marked node is generated. Removing these cells creates a cavity that must be retriangulated. 2. A list of the faces inside the cavity is generated. 3. A list of the faces on the cavity boundary is generated. 4. If the node to be removed is on a boundary, a new boundary triangulation is generated and those faces are added to the list of faces on the cavity.

23-12

c Fluent Inc. November 28, 2001

23.2 The Adaption Process

Figure 23.2.8: Original Grid With One Cell Marked for Refinement

Figure 23.2.9: Final Grid After Refinement Process

c Fluent Inc. November 28, 2001

23-13

Grid Adaption

5. From the list of faces on the cavity, a new Delaunay triangulation is created. (See the Theory chapter in the TGrid User’s Guide for a description of Delaunay triangulation.) 6. If the process is successful, the node, faces, and cells from the original triangulation of the region are deleted. 7. All nodes associated with the cavity are removed from the list of doomed nodes to avoid consecutive coarsening in the same region. 8. The solution variables in the new cells are computed using a volumeweighted average. Figure 23.2.10 illustrates the removal of node n1 and the resulting retriangulation. In this example, the list of cells attached to the node includes c1, c2, c3, c4, and c5; the list of faces inside the cavity includes f 6, f 7, f 8, f 9, and f 10; and the list of faces on the cavity includes f 1, f 2, f 3, f 4, and f 5. The new faces of the triangulation are f 11 and f 12, and the new cells are c6, c7, and c8. Nodes introduced by refinement are called refinement nodes. Nodes that existed in the mesh before refinement are called original nodes. By default, only refinement nodes can be removed in the coarsening process, but you can remove any node by resetting the node flags. For additional information on node flags, see Section 23.10. Presently, the grid-coarsening scheme is implemented only in the 2D version of FLUENT.

23-14

c Fluent Inc. November 28, 2001

23.2 The Adaption Process

Figure 23.2.10: The Grid is Coarsened by Removing a Node and Retriangulating the Region

c Fluent Inc. November 28, 2001

23-15

Grid Adaption

23.2.4

Conformal vs. Hanging Node Adaption

For most problems, the hanging node adaption provides the most flexibility for grid adaption. However, the following points should aid you in selecting the appropriate type of adaption for your specific application. • The conformal adaption method is only valid for tri and tet grids, while the hanging node adaption can be applied to all supported cell shapes. • The hanging node adaption is usually much more local in nature than the conformal adaption. In conformal adaption, many cells in addition to the marked cells may be refined due to the longest edge splitting criteria. For highly graded grids, the initial conformal refinement sweeps tend to exhibit substantial propagation of the cell refinement, sometimes refining the grid many cells away from the actual cell marked for refinement. (Subsequent refinements are usually much more local in nature.) The hanging node scheme only propagates to maintain the refinement level difference, which is much more confined. • The connectivity of the original grid is retained in the hanging node adaption scheme, but the conformal adaption method will modify the connectivity with refinement and coarsening. This could have accuracy implications for grids used in unsteady problems with periodic behavior (e.g., vortex shedding behind a cylinder) if you perform successive refinements and coarsenings. However, only conformal coarsening allows you to coarsen the initial grid, and this is only available in 2D. • The hanging node adaption has a memory penalty associated with maintaining the grid hierarchy and temporarily storing the edges in 3D. The conformal adaption has no memory overhead other than the additional nodes, faces and cells added to increase the grid density.

23-16

c Fluent Inc. November 28, 2001

23.3 Boundary Adaption

23.3

Boundary Adaption

If more cells are required on a boundary, they can be added using boundary adaption. The boundary adaption function allows you to mark or refine cells in the proximity of the selected boundary zones. The ability to refine the grid near one or more boundary zones is provided because important fluid interactions often occur in these regions, such as the development of strong velocity gradients in the boundary layer near a wall. 23.3.1 Boundary Adaption Example

An example of a grid that can be improved with boundary adaption is shown in Figure 23.3.1. This mesh has only two cells on the vertical face of a step. Boundary adaption on the zone corresponding to the face of the step can be used to increase the number of cells, as shown in Figure 23.3.2. Note that this procedure cannot increase the resolution of a curved surface. Therefore, if more cells are required on a curved surface where the shape of the surface is important, it is preferable to create the mesh with sufficient surface nodes before reading it into the solver. 23.3.2 Steps for Performing Boundary Adaption

Three different methods are available for boundary adaption: • adaption based on a cell’s distance from the boundary, measured in number of cells • adaption based on the normal distance of a cell from the boundary • adaption based on a target boundary volume and growth factor You can make use of any of these methods in the Boundary Adaption panel (Figure 23.3.3). Adapt −→Boundary... The steps for using each method are described below.

c Fluent Inc. November 28, 2001

23-17

Grid Adaption

Grid

Figure 23.3.1: Mesh Before Adaption

Grid

Figure 23.3.2: Mesh After Boundary Adaption

23-18

c Fluent Inc. November 28, 2001

23.3 Boundary Adaption

Figure 23.3.3: The Boundary Adaption Panel

Boundary Adaption Based on Number of Cells The general procedure for performing adaption based on a cell’s distance from the boundary in terms of the number of cells is listed below: 1. In the Boundary Adaption panel, select Cell Distance under Options, choose the boundary zones near which you want to refine cells in the Boundary Zones list, and click Apply. 2. Open the Contours panel by clicking on the Contour... button. 3. In the Contours panel, enable Filled contours, disable Node Values, choose Adaption... and Boundary Cell Distance in the Contours Of drop-down list, select the appropriate surfaces (3D only), and click Display to see the location of cells with each value of boundary cell distance. By displaying different ranges of values (as described in Section 25.1.2), you can determine the cell distance of the cells you wish to adapt. 4. In the Boundary Adaption panel, set the Number of Cells to the desired value. If you retain the default value of 1, only those cells that 23-19

c Fluent Inc. November 28, 2001

Grid Adaption

have edges (2D) or faces (3D) on the specified boundary zone(s) (i.e., those cells with a boundary cell distance of 1) will be marked or adapted. If you increase the value to 2, cells with a boundary cell distance of 2 will also be marked/adapted, and so on. 5. (optional) If you want to set any adaption options (described in Section 23.10), click on the Controls... button to open the Grid Adaption Controls panel. 6. Click Mark to mark the cells for refinement by placing them in an adaption register (which can be manipulated as described in Section 23.9), or click Adapt to perform the refinement immediately. Boundary Adaption Based on Normal Distance The general procedure for performing refinement based on a cell’s normal distance from the boundary is listed below: 1. In the Boundary Adaption panel, select Normal Distance under Options, choose the boundary zones near which you want to refine cells in the Boundary Zones list, and click Apply. 2. Open the Contours panel by clicking on the Contour... button. 3. In the Contours panel, enable Filled contours, disable Node Values, choose Adaption... and Boundary Normal Distance in the Contours Of drop-down list, select the appropriate surfaces (3D only), and click Display to see the location of cells with each value of normal distance. By displaying different ranges of values (as described in Section 25.1.2), you can determine the normal distance of the cells you wish to adapt. 4. In the Boundary Adaption panel, set the Distance Threshold to the desired value. Cells with a normal distance to the selected boundary zone(s) less than or equal to this value will be marked or adapted. 5. (optional) If you want to set any adaption options (described in Section 23.10), click on the Controls... button to open the Grid Adaption Controls panel. 23-20

c Fluent Inc. November 28, 2001

23.3 Boundary Adaption

6. Click Mark to mark the cells for refinement by placing them in an adaption register (which can be manipulated as described in Section 23.9), or click Adapt to perform the refinement immediately. Boundary Adaption Based on Target Boundary Volume This boundary adaption allows you to refine cells based on a target boundary cell volume and an exponential growth function. This allows you to produce grids with cells that have the target volume near the selected boundaries and exponentially larger (or smaller) cells as you get further from the boundaries. The cells are marked for refinement based on the following equation: Vn > Vboundary eαd (23.3-1)

where Vn is the volume of the cell, Vboundary is the specified boundary volume (Boundary Volume), α is the exponential growth factor (Growth Factor), and d is the normal distance of the cell centroid from the selected boundaries. Vboundary eαd is the target volume for a cell. The general procedure for this type of boundary refinement is listed below: 1. In the Boundary Adaption panel, select Volume Distance under Options, set the Boundary Volume and Growth Factor to the desired values, choose the boundary zones in the Boundary Zones list where you want the Boundary Volume to be applied, and click Apply. 2. Open the Contours panel by clicking on the Contour... button. 3. In the Contours panel, enable Filled contours, disable Node Values, choose Adaption... and Boundary Volume Distance in the Contours Of drop-down list, select the appropriate surfaces (3D only), and click Display to see contours of the target volume. You can modify the values of any of the inputs (Boundary Volume, Growth Factor, and/or Boundary Zones), click on Apply in the Boundary Adaption panel, and then redisplay the contour plot to visualize the modified target volume distribution. 23-21

c Fluent Inc. November 28, 2001

Grid Adaption

4. (optional) If you want to set any adaption options (described in Section 23.10), click on the Controls... button to open the Grid Adaption Controls panel. 5. Click Mark to mark the cells for refinement by placing them in an adaption register (which can be manipulated as described in Section 23.9), or click Adapt to perform the refinement immediately.

23.4

Gradient Adaption

The gradient adaption function allows you to mark cells or adapt the grid based on the gradient (undivided Laplacian) of the selected field variables. 23.4.1 Gradient Adaption Approach

The primary goal of solution-adaptive grid refinement is to efficiently reduce the numerical error in the digital solution. Unfortunately, direct error estimation for point-insertion adaption schemes is difficult because of the complexity of accurately estimating and modeling the error in the adapted grids. Assuming the greatest error occurs in high-gradient regions, the readily available physical features of the evolving flow field may be used to drive the grid adaption process. The equidistribution adaption technique used by FLUENT multiplies the undivided Laplacian of the selected solution variable by a characteristic length scale [256]. The length scale is the square (2D) or cube (3D) root of the cell volume. The introduction of this length scale permits resolution of both strong and weak disturbances, increasing the potential for more accurate solutions. You can, however, reduce or eliminate the volume weighting by changing the gradient Volume Weight in the Grid Adaption Controls panel (see Section 23.10 for details). For example, the gradient function in two dimensions has the following form: |ei | = (Acell ) 2 |
r

2

f|

(23.4-1)

where ei is the error indicator, Acell is the cell area, r is the gradient volume weight, and 2 f is the undivided Laplacian of the desired field

23-22

c Fluent Inc. November 28, 2001

23.4 Gradient Adaption

variable, f . The default value of the gradient volume weight is unity, which corresponds to full volume weighting; a value of zero will eliminate the volume weighting, and values between 0 and 1 will use proportional weighting of the volume. Any of the field variables available for contouring can be used in the gradient adaption function. Interestingly, these scalar functions include both geometric and physical features of the numerical solution. Therefore, in addition to traditional adaption to physical features, such as the velocity, you may choose to adapt to the cell volume field to reduce rapid variations in cell volume. 23.4.2 Gradient Adaption Example

A good example of the use of gradient adaption is the solution of the supersonic flow over a circular cylinder. The initial mesh, shown in Figure 23.4.1, is very coarse, even though it contains sufficient cells to adequately describe the shape of the cylinder. The mesh ahead of the cylinder is too coarse to resolve the shock wave that forms in front of the cylinder. In this instance, because there will be a jump in pressure across the shock, it is clear that pressure is a suitable variable to use in gradient adaption. Several adaptions are necessary, however, before the shock can be properly resolved. The mesh after several adaptions is shown in Figure 23.4.2. A typical application of gradient adaption for an incompressible flow might be a mixing layer, which—like the example above—involves a discontinuity. 23.4.3 Steps for Performing Gradient Adaption

You will perform gradient adaption in the Gradient Adaption panel (Figure 23.4.3). Adapt −→Gradient... The general procedure for performing gradient adaption is listed below: 1. In the Gradient Adaption panel, select the desired solution variable in the Gradients Of drop-down list and click on Compute. 23-23

c Fluent Inc. November 28, 2001

Grid Adaption

Grid

Figure 23.4.1: Bluff-Body Mesh Before Adaption

Grid

Figure 23.4.2: Bluff-Body Mesh After Gradient Adaption

23-24

c Fluent Inc. November 28, 2001

23.4 Gradient Adaption

Figure 23.4.3: The Gradient Adaption Panel

2. Open the Contours panel by clicking on the Contour... button. 3. In the Contours panel, enable Filled contours, disable Node Values, choose Adaption... and Existing Value in the Contours Of drop-down list, select the appropriate surfaces (3D only), and click Display to see the location of cells with each gradient value. By displaying different ranges of values (as described in Section 25.1.2), you can determine the range of gradients for which you want to adapt cells. 4. In the Gradient Adaption panel, set the Refine Threshold. Cells with gradient values above this value will be marked or refined. 5. If you want to coarsen the grid, set the Coarsen Threshold to a nonzero value. Cells with gradient values below the specified value will be marked or coarsened. Note that if you are using hanging node adaption (the default), you will not be able to create a grid that is coarser than the original grid. For this, you must use conformal adaption. Note also that conformal coarsening is only available for 2D or axisymmetric geometries. See Section 23.10 for details. 23-25

c Fluent Inc. November 28, 2001

Grid Adaption

6. (optional) If you want to set any adaption options (described in Section 23.10), click on the Controls... button to open the Grid Adaption Controls panel. 7. Click Mark to mark the cells for adaption (refinement/coarsening) by placing them in an adaption register (which can be manipulated as described in Section 23.9), or click Adapt to perform the adaption immediately. (If you wish to disable refinement or coarsening, or marking for refinement or coarsening, you can turn off the Refine or Coarsen option before marking or adapting.)

23.5

Isovalue Adaption

Some flows may contain flow features that are easy to identify based on values of a certain quantity. For instance, wakes represent a total pressure deficit, and jets are identifiable by a region of relatively highvelocity fluid. Since it is known that these regions also contain large gradients of important flow quantities (such as k and in turbulent flows) it may be more convenient to perform an isovalue adaption on the relevant flow quantity than to refine on gradients of the individual flow variables. The isovalue adaption function allows you to mark or refine cells inside or outside a specified range of a selected field variable function. The grid can be refined or marked for refinement based on geometric and/or solution vector data. Specifically, any quantity in the display list of field variables can be used for the isovalue adaption. Some examples of how you might use the isovalue marking/adaption feature include the following: • Create masks using coordinate values or the quadric function. • Refine cells that have a velocity magnitude within a specified range. • Mark and display cells with a pressure or continuity residual outside of a desired range to determine where the numerical solution is changing rapidly. 23-26

c Fluent Inc. November 28, 2001

23.5 Isovalue Adaption

The approach used in isovalue adaption function is to compute the specified value for each cell (velocity, quadric function, centroid x coordinate, etc.), and then visit each cell, marking for refinement the cells that have values inside (or outside) the specified ranges. 23.5.1 Isovalue Adaption Example

An example of a problem in which isovalue adaption is useful is shown in Figure 23.5.1. The mesh for an impinging jet is displayed together with contours of x velocity. An isovalue adaption based on x velocity allows refinement of the mesh only in the jet, with the result shown in Figure 23.5.2.

! Caution must be used when adapting to isovalues to prevent large gradients in cell volume. As explained in Section 23.1, this can affect accuracy and impede convergence. One approach to rectifying large gradients in cell volume is to adapt to cell-volume change, as demonstrated in Section 23.7.2. 23.5.2 Steps for Performing Isovalue Adaption

You will perform isovalue adaption in the Iso-Value Adaption panel (Figure 23.5.3). Adapt −→Iso-Value... The general procedure for performing isovalue adaption is listed below: 1. In the Iso-Value Adaption panel, select the desired solution variable in the Iso-Values Of drop-down list and click on Compute to update the Min and Max fields. 2. Choose the Inside or Outside option and set the Iso-Min and Iso-Max values. • If you choose Inside, cells with isovalues between Iso-Min and Iso-Max will be marked or refined. • If you choose Outside, cells with isovalues less than Iso-Min or greater than Iso-Max will be marked or refined.

c Fluent Inc. November 28, 2001

23-27

Grid Adaption

1.00e+00

9.00e-01

8.00e-01

7.00e-01

6.00e-01

5.00e-01

4.00e-01

3.00e-01

2.00e-01

1.00e-01

Contours of X-Velocity (m/s)

Figure 23.5.1: Impinging Jet Mesh Before Adaption Shown Together With Contours of x Velocity

Grid

Figure 23.5.2: Impinging Jet Mesh After Isovalue Adaption

23-28

c Fluent Inc. November 28, 2001

23.5 Isovalue Adaption

Figure 23.5.3: The Iso-Value Adaption Panel

3. (optional) If you want to set any adaption options (described in Section 23.10), click on the Controls... button to open the Grid Adaption Controls panel. 4. Click Mark to mark the cells for refinement by placing them in an adaption register (which can be manipulated as described in Section 23.9), or click Adapt to perform the refinement immediately.

c Fluent Inc. November 28, 2001

23-29

Grid Adaption

23.6

Region Adaption

Many mesh generators create meshes with cell volumes that grow very rapidly with distance from boundaries. While this avoids a dense grid as a matter of course, it might also create problems if the mesh is not fine enough to resolve the flow. But if it is known a priori that a finer mesh is required in a certain region of the solution domain, the mesh can be refined using region adaption. The region adaption function marks or refines cells inside or outside a region defined by text or mouse input. Presently, the grid can be refined or marked inside or outside a hexahedron (quadrilateral in 2D), a sphere (circle in 2D), or a cylinder. The region-based marking/adaption feature is particularly useful for refining regions that intuitively require good resolution: e.g., the wake region of a blunt-body flow field. In addition, you can use the region marking to create mask adaption registers that can be used to limit the extent of the refinement and coarsening. 23.6.1 Defining a Region

The basic approach to the region adaption function is to first define a hexahedral (quadrilateral), spherical (circular), or cylindrical region. You will define the hexahedron (quadrilateral) by entering the coordinates of two points defining the diagonal. The sphere (circle) is defined by entering the coordinates of the center of the sphere and its radius. To define a cylinder, you will specify the coordinates of the points defining the cylinder axis, and the radius. In 3D this will define a cylinder. In 2D, you will have an arbitrarily oriented rectangle with length equal to the cylinder axis length and width equal to the radius. A rectangle defined using the cylinder option differs from one defined with the quadrilateral option in that the former can be arbitrarily oriented in the domain while the latter must be aligned with the coordinate axes. You can either type the exact coordinates into the appropriate real entry fields or select locations with the mouse on displays of the grid or solution field. After the region is defined, each cell that has a centroid inside/outside the specified region is marked for refinement.

23-30

c Fluent Inc. November 28, 2001

23.6 Region Adaption

23.6.2

Region Adaption Example

Figure 23.6.1 shows a mesh that was created for solving the flow around a flap airfoil. The mesh is very fine near the surface of the airfoil so that the viscous-affected region may be resolved. However, the mesh grows very rapidly away from the airfoil, with the result that the flow separation known to occur on the suction surface of the flap will not be properly predicted. To circumvent this problem, the grid was adapted within circular regions (selected by mouse probe) surrounding the flap. The result is shown in Figure 23.6.2. Note that when the region adaption was performed, the minimum cell volume for adaption was limited (as described in Section 23.10) to prevent the very small cells near the surface from being refined further.

Grid

Figure 23.6.1: Flap-Airfoil Mesh Before Adaption

c Fluent Inc. November 28, 2001

23-31

Grid Adaption

Grid

Figure 23.6.2: Flap-Airfoil Mesh After Region Adaption

23.6.3

Steps for Performing Region Adaption

You will perform region adaption in the Region Adaption panel (Figure 23.6.3). Adapt −→Region... The general procedure for performing isovalue adaption is listed below: 1. In the Region Adaption panel, choose the Inside or Outside option. • If you choose Inside, cells with centroids within the specified region will be marked or refined. • If you choose Outside, cells with centroids outside the specified region will be marked or refined. 2. Specify the shape of the region. In 2D, you may choose a Quadrilateral, Circle, or Cylinder. In 3D, you may choose a Hexahedron, Sphere, or Cylinder.

23-32

c Fluent Inc. November 28, 2001

23.6 Region Adaption

Figure 23.6.3: The Region Adaption Panel

c Fluent Inc. November 28, 2001

23-33

Grid Adaption

3. Define the region by entering values into the panel or by using the mouse. In the panel the inputs are as follows: • To define a hexahedron or quadrilateral, you will input the coordinates of two points defining the box’s diagonal: (Xminimum,Yminimum,Zminimum) and (Xmaximum,Ymaximum, Zmaximum) for a hexahedron, or (Xminimum,Yminimum) and (Xmaximum,Ymaximum) for a quadrilateral. • To define a sphere or circle, you will input the coordinates of its center—(Xcenter,Ycenter,Zcenter) for a sphere or (Xcenter,Ycenter) for a circle—and its Radius. • To define a cylinder, you will input the minimum and maximum coordinates defining the cylinder axis—(X-Axis Min,YAxis Min,Z-Axis Min) and (X-Axis Max,Y-Axis Max,Z-Axis Max) for 3D or (X-Axis Min,Y-Axis Min) and (X-Axis Max,Y-Axis Max) for 2D—as well as the Radius of the cylinder. (In 2D, this will be the width of the resulting rectangle.) To define the region using the mouse, click on the Select Points With Mouse button. Using the mouse probe (the right mouse button, by default), you may select the input coordinates from a display of the grid or solution field. See Section 25.3 for details about mouse button functions.) After you select the points, the values will be loaded automatically into the appropriate fields in the panel. If you want, you can edit these values before marking or adapting. • To define a hexahedron or quadrilateral, you can select the two points of the diagonal in any order. • To define a sphere or circle, first select the location of the centroid and then select a point that lies on the sphere/circle (i.e., a point that is one radius away from the centroid). • To define a cylinder, first select the two points that define the cylinder axis and then select a point that is one radius away from the axis. 4. (optional) If you want to set any adaption options (described in Section 23.10), click on the Controls... button to open the Grid 23-34

c Fluent Inc. November 28, 2001

23.7 Volume Adaption

Adaption Controls panel. 5. Click Mark to mark the cells for refinement by placing them in an adaption register (which can be manipulated as described in Section 23.9), or click Adapt to perform the refinement immediately.

23.7

Volume Adaption

As mentioned in Section 23.1, it is best for both accuracy and convergence to have a mesh in which the changes in cell volume are gradual. If the mesh creation or adaption process has resulted in a mesh that does not have this property, the grid can be improved by using volume adaption with the option of refining based on either the cell volume or the change in volume between the cell and its neighbors. 23.7.1 Approach

Marking or refining the grid based on volume magnitude is most often used to remove large cells or to globally refine the mesh. The procedure is to mark for refinement any cell with a volume greater than the specified threshold value. Marking or refining the grid based on the change in cell volume is used to improve the smoothness of the grid. The procedure is to mark for refinement any cell that has a volume change greater than the specified threshold value. The volume change is computed by looping over the faces and comparing the ratio of the cell neighbors to the face. For example, in Figure 23.7.1 the ratio of V1/V2 and the ratio of V2/V1 is compared to the threshold value. If V2/V1, for example, is greater than the threshold, then C2 is marked for refinement. 23.7.2 Volume Adaption Example

The mesh in Figure 23.7.2 was created for the purpose of computing a turbulent jet. Local refinement was used in TGrid to create a mesh that is fine in the region of the jet, but coarse elsewhere. This created a very sharp change in cell volume at the edge of the jet.

c Fluent Inc. November 28, 2001

23-35

Grid Adaption

Figure 23.7.1: The Volume Change is Computed as the Ratio of the Volumes of the Cells Neighboring a Face

To improve the mesh, it was refined using volume adaption with the criterion that the maximum cell volume change should be less than 50%. The minimum cell volume for adaption was also limited. The resulting mesh, after smoothing and swapping, is shown in Figure 23.7.3. It can be seen that the interface between the refined region within the jet and the surrounding mesh is no longer as sharp. 23.7.3 Steps for Performing Volume Adaption

You will perform volume adaption in the Volume Adaption panel (Figure 23.7.4). Adapt −→Volume... The general procedure for performing volume adaption is listed below: 1. In the Volume Adaption panel, specify whether you want to adapt based on volume magnitude or volume change by selecting the Magnitude or Change option. 2. Click on Compute to update the Min and Max fields. These fields will show the range of cell volumes or cell volume changes (defined in Section 23.7.1), depending on your selection in step 1. 3. Set the Max Volume or Max Volume Change value. If you have chosen to adapt based on volume Magnitude, cells that have volumes greater than Max Volume will be marked or refined. If you 23-36

c Fluent Inc. November 28, 2001

23.7 Volume Adaption

Grid

Figure 23.7.2: Jet Mesh Before Adaption

Grid

Figure 23.7.3: Jet Mesh After Volume Adaption Based on Change in Cell Volume

c Fluent Inc. November 28, 2001

23-37

Grid Adaption

Figure 23.7.4: The Volume Adaption Panel

are adapting based on volume Change, cells with volume changes greater than Max Volume Change will be marked or refined. 4. (optional) If you want to set any adaption options (described in Section 23.10), click on the Controls... button to open the Grid Adaption Controls panel. 5. Click Mark to mark the cells for refinement by placing them in an adaption register (which can be manipulated as described in Section 23.9), or click Adapt to perform the refinement immediately.

23.8

y + and y ∗ Adaption

FLUENT provides three different options for near-wall modeling of turbulence (standard wall functions, non-equilibrium wall functions, and the enhanced wall treatment). As described in Section 10.9, there are certain mesh requirements for each of these near-wall modeling options. Since it is often difficult to gauge the near-wall resolution requirements when creating the mesh, y + and y ∗ adaption have been provided to enable you to appropriately refine or coarsen the mesh along the wall during the solution process. If you are using the enhanced wall treatment, you

23-38

c Fluent Inc. November 28, 2001

23.8 y + and y ∗ Adaption

will adapt to y + ; if you are using wall functions, you can adapt to either y + or y ∗ . 23.8.1 Approach

The approach is to compute y + or y ∗ for boundary cells on the specified viscous wall zones, define the minimum and maximum allowable y + or y ∗ , and mark and/or adapt the appropriate cells. Cells with y + or y ∗ values below the minimum allowable threshold will be marked for coarsening and cells with y + or y ∗ values above the maximum allowable threshold will be marked for refinement (unless coarsening or refinement has been disabled). 23.8.2 y + Adaption Example

Figure 23.8.1 shows the mesh for a duct flow, with the top boundary being the wall and the bottom boundary being a symmetry plane. After an initial solution, it was determined that y + values of the cells on the wall boundary were too large, and y + adaption was used to refine them. The resulting mesh is shown in Figure 23.8.2. This figure shows that the height of the cells along the wall boundary has been reduced during the refinement process. However, the cell-size distribution on the wall after refinement is much less uniform than in the original mesh, which is an adverse effect of y + adaption. See Section 10.9 for guidelines on recommended values of y + or y ∗ for different near-wall treatments. 23.8.3 Steps for Performing y + or y ∗ Adaption

You will perform y + or y ∗ adaption in the Y+/Y* Adaption panel (Figure 23.8.3). Adapt −→Y+/Y*... The general procedure for performing y + or y ∗ adaption is listed below: 1. In the Y+/Y* Adaption panel, select Y+ or Y* as the adaption Type. (Select Y+ if you are using the enhanced wall treatment; if

c Fluent Inc. November 28, 2001

23-39

Grid Adaption

Grid

Figure 23.8.1: Duct-Flow Mesh Before Adaption

Grid

Figure 23.8.2: Duct-Flow Mesh After y + Adaption

23-40

c Fluent Inc. November 28, 2001

23.8 y + and y ∗ Adaption

Figure 23.8.3: The Y+/Y* Adaption Panel

you are using wall functions, you can select either type.) 2. Choose the wall zones for which you want boundary cells to be marked or adapted in the Wall Zones list, and click on Compute to update the Min and Max fields. (Note that the values displayed are the minimum and maximum values for all wall zones, not just those selected.) 3. Set the Min Allowed and Max Allowed. Cells with y + or y ∗ values below Min Allowed will be coarsened or marked for coarsening, and cells with y + or y ∗ values above Max Allowed will be refined or marked for refinement. Note that if you are using hanging node adaption (the default), you will not be able to create a grid that is coarser than the original grid. For this, you must use conformal adaption. Note also that conformal coarsening is only available for 2D or axisymmetric geometries. See Section 23.10 for details. 4. (optional) If you want to set any adaption options (described in 23-41

c Fluent Inc. November 28, 2001

Grid Adaption

Section 23.10), click on the Controls... button to open the Grid Adaption Controls panel. 5. Click Mark to mark the cells for adaption (refinement/coarsening) by placing them in an adaption register (which can be manipulated as described in Section 23.9), or click Adapt to perform the adaption immediately. (If you wish to disable refinement or coarsening, or marking for refinement or coarsening, you can turn off the Refine or Coarsen option before marking or adapting.)

23.9

Managing Adaption Registers

You can manipulate, delete, and display adaption registers that you have created by marking cells for adaption. Since these registers will be used to adapt the grid, the ability to manipulate them provides you with additional control over the adaption process. Management of adaption registers is performed in the Manage Adaption Registers panel (Figure 23.9.1). Adapt −→Manage... (You can also open this panel by clicking on the Manage... button in any of the adaption panels.) For additional information about registers, see Section 23.2.1. Overview The creation of hybrid adaption functions is generally motivated by the desire to confine the adaption to a specific region (using masks) and/or create a more accurate error indicator. FLUENT provides a few basic tools to aid in creating hybrid adaption functions. First, you can create the initial adaption registers using geometric and/or solution vector information. After creating the adaption registers, you can manipulate these registers and their associated refinement and coarsening marks. The registers are manipulated by changing the type and/or combining

23-42

c Fluent Inc. November 28, 2001

23.9 Managing Adaption Registers

Figure 23.9.1: The Manage Adaption Registers Panel

c Fluent Inc. November 28, 2001

23-43

Grid Adaption

them to create the desired hybrid function. The marks are manipulated by using Exchange, Invert, Limit, and Fill operations. Finally, you can delete, display, and most importantly, adapt to the hybrid adaption functions. For example, you can capture the shock wave generated on a wedge in a supersonic flow field by adapting the grid to the gradients of pressure. The pressure gradient near the surface of the wedge, however, is relatively small. You might therefore use the velocity field to resolve the equally important boundary layer near the surface of the wedge. If you adapt to pressure, regions near the surface might be coarsened. If you subsequently adapted to velocity, these same regions might be refined, but the net result would be no gain in resolution. But if you combine the velocity and pressure gradient adaption functions, the new adaption function would allow increased resolution in both regions. The relative weight of the two functions in the hybrid function is determined by the values of the refinement and coarsening thresholds you specify for each of the flow field variables. If, in addition, you decided to refine the shock and boundary layer only near the leading edge of the wedge, you could create a circle at the leading edge of the wedge using the region adaption function, change this new register to a mask, and combine it with the hybrid gradient function. 23.9.1 Manipulating Adaption Registers

There are three basic tools available for modifying and manipulating adaption registers: changing type, combining, and deleting. Changing Register Types Presently, there are two types of registers: adaption registers and mask registers. The present adaption functions accessed through the GUI and text interface generate adaption registers—i.e., registers that designate the cells marked for refinement or coarsening. These registers can be converted to mask registers, however, by changing their type. Mask registers, unlike the adaption registers, only maintain two states: ACTIVE and INACTIVE. If the adaption register is converted to a mask, the cells marked for refinement are ACTIVE, and all other cells are INAC-

23-44

c Fluent Inc. November 28, 2001

23.9 Managing Adaption Registers

TIVE; i.e., the cells marked for coarsening are ignored. Commonly, the adaption registers converted to masks are those that are generated by adaption functions that mark cells exclusively for refinement, such as region or isovalue adaption functions. The other major difference between adaption and mask registers is the manner in which they are combined. To change the type of one or more registers from adaption to mask, or vice versa, follow these steps: 1. Choose the register(s) in the Registers list. 2. Click on the Change Type button under Register Actions. The new type of the register (or of the most recently selected or deselected register, if multiple registers are selected) will be shown as the Type under Register Info. You can select each register individually to see what its current type is. Combining Registers After the individual adaption registers have been created and appropriately modified, these registers are combined to create hybrid adaption functions. Any number of registers can be combined in the following manner: • All adaption registers are combined into a new adaption register. • All mask registers are combined into a new mask register. • The new adaption and mask registers are combined. Any number of adaption registers can be combined in the following manner: • If the cell is marked for refinement in any of the registers, mark the cell for refinement in the new register (bitwise OR). • If the cell is marked for coarsening in all of the registers, mark the cell for coarsening in the new register (bitwise AND). 23-45

c Fluent Inc. November 28, 2001

Grid Adaption

The mask registers are combined in a manner similar to the refinement marks: if any cell is marked ACTIVE, the cell in the new register is marked ACTIVE (bitwise OR). Finally, in the combination of an adaption and mask register, only cells that are marked in the mask register can have an adaption mark in the combined register (bitwise AND). For example, creating an adaption function based on pressure gradient may generate cells marked for refinement and coarsening throughout the entire solution domain. If this register is then combined with a mask register created from cells marked inside a sphere, only the cells inside the sphere will be marked for refinement or coarsening in the new register. The effect of masks depends on the order in which they are applied. For example, consider two adjacent, circular masks. Applying one mask to the adaption register and then applying the other mask to the result of the first combination would give a much different result than applying the combination of the two masks to the initial adaption register. (The second combination results in a greater possible number of marked cells.) To combine two or more registers, follow these steps: 1. Choose the registers in the Registers list. 2. Click on the Combine button under Register Actions. The selected registers will remain intact, and the register(s) resulting from the combination will be added to the Registers list. In some instances, three new registers may be created: a combination of the adaption registers, a combination of the mask registers, and then a combination of the two combined registers. For more information about combining registers, see Section 23.2.1. Deleting Registers Any number of adaption registers can be deleted. The primary reason for deleting registers is to discard unwanted adaption registers, reducing possible confusion and the potential for generating undesired results by 23-46

c Fluent Inc. November 28, 2001

23.9 Managing Adaption Registers

selecting these castaways. In addition, only 32 adaption registers can exist at one time. You may therefore need to discard unwanted registers to make room for new ones. To permanently remove one or more registers, follow these steps: 1. Choose the register(s) in the Registers list. 2. Click on the Delete button under Register Actions. 23.9.2 Modifying Adaption Marks

The adaption marks are the identifiers that designate whether a cell should be refined, coarsened, or neutral. Presently, four basic tools are provided for modifying the adaption marks: Exchange, Invert, Limit, and Fill operations. The Exchange operation changes all cells marked for refinement into cells marked for coarsening, and all cells originally marked for coarsening into cells marked for refinement. Commonly, this operator is applied to adaption registers that have only refinement marks. For example, the exchange operation can be used to coarsen a rectangular region. First, you create an adaption register that marks a rectangular region of cells for refinement. Next, you use the Exchange operation to modify the cell marks, creating a rectangular region with cells marked for coarsening. The Invert operation can only be used with mask registers. It toggles the mask markings: all cells marked ACTIVE are switched to INACTIVE, and all cells marked INACTIVE are switched to ACTIVE. For example, if you generate a mask that defines a circular region, you can quickly modify the mask to define the region outside of the circle using the Invert operation. The Limit operation applies the present adaption volume limit to the selected adaption register. (For information on adaption limits, see Section 23.10.) Commonly, you would use this operation to determine the effect of the present limits on the adaption process. You can use the volume limit to create a more uniform mesh by setting the limit to refine

c Fluent Inc. November 28, 2001

23-47

Grid Adaption

only large cells. After all the cells have reached a uniform size, you can continue the refinement process to the desired resolution. Finally, the Fill operation marks for coarsening all cells in the adaption register that are not marked for refinement. You may want to use the Fill operation if you are combining multiple registers to make a new register. When you combine registers, a cell will be marked for coarsening only if it is marked for coarsening in all of the registers. If you create an adaption register with an operation that only marks cells for refinement, but you do not want to prohibit coarsening, you should use the Fill operation before combining the register with any other registers. The steps for modifying adaption marks are as follows: 1. Choose the register(s) in the Registers list. 2. Click on the Exchange, Invert, Limit, or Fill button under Mark Actions. 23.9.3 Displaying Registers

Viewing the cell markings is often helpful in the process of creating hybrid adaption functions. You can plot a marker at the cell centroid and/or a wireframe of the cell to view the state of the cell. By default, the cells marked for refinement are colored in red, and the cells marked for coarsening are marked in cyan. In addition, cells marked ACTIVE in a mask register are also colored red. These are the cells that are marked for adaption, but the final number of cells added or subtracted from the grid will depend on the adaption limits and the grid characteristics. To display a register, follow these steps: 1. Choose the register in the Registers list. 2. If desired, set any of the display options described below by clicking on the Options... button. 3. Click on the Display button.

23-48

c Fluent Inc. November 28, 2001

23.9 Managing Adaption Registers

Adaption Display Options Various aspects of the adaption register display can be modified, such as the wireframe visibility and shading, marker visibility, color, size, and symbol, and whether surface or zone grids are drawn with the display. The adaption register display capability allows you to view the cells that are flagged for adaption. Depending on the dimension of the problem and the number of flagged cells, you may wish to customize the adaption display options. For instance, a common method for viewing flagged cells in 2D is to draw the grid and filled wireframes, but this is impractical in 3D. In three dimensions, you may want to plot the centroid markers of the cells with the grid of selected boundary zones. You can display the flagged cells in an adaption or mask register, using markers and/or wireframes. The marker is a symbol placed at the centroid of the cell. There is a refine marker and a coarsen marker. You can change the symbol, color, and size of these markers. A wireframe is composed of the edges of the triangle or tetrahedron. Its color is the same as the respective marker color, and it can be filled, if desired. Finally, portions of the grid can be drawn with the marker symbols or wireframes to aid in evaluating the location of marked cells. All of these options are set in the Adaption Display Options panel (Figure 23.9.2). Adapt −→Display Options... (You can also open this panel by clicking on the Options... button in the Manage Adaption Registers panel.) • To enable or disable the display of wireframes for cells marked for refinement/coarsening, turn the Wireframe option on or off under Refine and/or Coarsen. To draw filled wireframes (i.e., using a solid color, instead of the outline) turn on the Filled option. • To enable or disable the display of markers for cells marked for refinement/coarsening, turn the Marker option on or off under Refine and/or Coarsen. If you use markers, you can specify their size in the Size field, and their symbol in the Symbol drop-down list. 23-49

c Fluent Inc. November 28, 2001

Grid Adaption

Figure 23.9.2: The Adaption Display Options Panel

• To change the color of the refine or coarsen markers/wireframes, select a new color in the Color drop-down list under Refine or Coarsen. By default, refine markers/wireframes are red and coarsen markers/wireframes are cyan. • To include portions of the grid in the register display, enable the Draw Grid option. The Grid Display panel will appear automatically, and you can set the grid display parameters there. When you click on Display in the Manage Adaption Registers panel, the grid display, as defined in the Grid Display panel, will be included in the register display. 23.9.4 Adapting to Registers

The primary objective is to adapt the grid to efficiently increase the accuracy of the solution. These register tools provide you with the ability to create hybrid adaption functions customized to your flow-field application. Finally, the customized adaption function is used to direct the refinement and coarsening of the grid.

23-50

c Fluent Inc. November 28, 2001

23.10 Grid Adaption Controls

To perform the adaption, follow these steps: 1. Choose the register in the Registers list. 2. Click on the Adapt button.

23.10

Grid Adaption Controls

FLUENT allows you to change the adaption type from hanging node to conformal, or place restrictions on the cell zones, the size of cells that can be adapted, and the total number of cells that can be produced from the adaption process. You can also modify the intensity of the volume weighting in the gradient function, restrict the adaption process to refinement and/or coarsening, and control which nodes are eligible for possible elimination from the grid during conformal coarsening. All parameters controlling these aspects of adaption are set in the Grid Adaption Controls panel (Figure 23.10.1). Adapt −→Controls...

Figure 23.10.1: The Grid Adaption Controls Panel (You can also open this panel by clicking on the Controls... button in any of the adaption panels.) 23-51

c Fluent Inc. November 28, 2001

Grid Adaption

! Recall that it is highly recommended that you write a case and data file
before starting the adaption process. Then, if you generate an undesirable grid, you can restart the process with the saved files. Controlling the Type of Adaption You can choose to use hanging node or conformal adaption. You can also restrict the adaption process to the addition of grid resolution through refinement and/or the removal of grid density through coarsening. • To use hanging node adaption (the default), select Hanging in the Type frame, and to use conformal adaption, select Conformal. The hanging node and conformal adaption procedures are described in detail in Section 23.2. • To enable/disable refinement, turn the Refine option on or off. • To enable/disable coarsening, turn the Coarsen option on or off. Limiting Adaption By Zone You can limit the adaption process to specified cell zones. The cells composing the fluid and solid regions of the analysis generally have very different resolution requirements and error indicators. By limiting the adaption to a specific cell zone, you can use different adaption functions to create the optimal grid. To limit the adaption to a particular cell zone (or to particular cell zones), select the cell zones in which you want to perform adaption in the Zones list. By default, adaption will be performed in all cell zones. Limiting Adaption By Cell Volume or Volume Weight The minimum cell volume limit restricts the refinement process to cells with volumes greater than the limit. You can use this to initiate the refinement process on larger cells, gradually reducing the limit to create a uniform cell size distribution. Set this limit in the Min Cell Volume field.

23-52

c Fluent Inc. November 28, 2001

23.10 Grid Adaption Controls

In addition, the gradient volume weight can be modified. A value of zero eliminates volume weighting, a value of unity uses the entire volume, and values between 0 and 1 scale the volume weighting. Set this value in the Volume Weight field. For more information, see Section 23.4.1. Limiting the Total Number of Cells The maximum number of cells is a restriction that prevents FLUENT from creating more cells than you consider appropriate for the present analysis. In addition, it saves you the time you might have spent waiting for the grid adaption process to complete the creation of these cells, which could be substantial if you saturate your computer memory resources. This premature termination of the refinement process can, however, produce undesirable grid quality depending on the order in which the cells were visited. The order of visitation is based on the cell arrangement in memory, which in general can be quite random. You can set the total number of cells allowed in the grid in the Max # of Cells field. The default value of zero places no limits on the number of cells. Controlling Node Removal During Conformal Coarsening You can control the removal of nodes during coarsening by modifying the node removal flags. The node removal flags control which nodes are eligible for possible elimination from the grid. (The node removal flags apply to conformal adaption only. For hanging node adaption, only refinement nodes can be removed during coarsening, and they are always removed.) Nodes introduced by refinement are called refinement nodes, and nodes that existed in the mesh before refinement are called original nodes. FLUENT maintains a section in the case file with the node flags. If this section doesn’t exist (i.e., when you first read a grid), it identifies all nodes as original nodes. In addition, it also distinguishes between nodes on boundary, internal, and periodic zones for both original nodes and nodes created by adaptive refinement. To guarantee that the original shape of the domain boundaries is main-

c Fluent Inc. November 28, 2001

23-53

Grid Adaption

tained, usually only nodes introduced by refinement are removed. For example, consider the grid of a rectangular domain. If one of the nodes on the edges of the rectangle is removed the shape is not modified, but if one of the corner nodes of the rectangle is eliminated, the shape is changed from a quadrilateral to a pentagon. You can, however, modify this default behavior by changing the node removal flags. The most common modification is to allow the removal of original internal nodes. Removing internal nodes does not destroy the shape of the boundary. In fact, it can be very helpful if the initial grid has substantial resolution in a region with minor or no changes in physical features.

! As mentioned before, removing original boundary or periodic nodes can
alter shape, and in some instances may even destroy topology, producing a worthless grid. Therefore, exercise extreme discretion when removing original boundary and periodic nodes. As always, it is recommended that you write a case and data file before starting the adaption process. Then, if you generate an undesirable grid, you can restart the process with the saved files. By default, only the removal of refinement nodes is allowed, as indicated by the enabled status of Boundary - Refined, Internal - Refined, and Periodic - Refined and the disabled status of Boundary - Original, Internal Original, and Periodic - Original in the Grid Adaption Controls panel. If you want to disable the removal of these types of nodes, you can do so by turning off the associated check button. Similarly, if you want to enable their removal, turn on the associated check button.

23.11

Improving the Grid by Smoothing and Swapping

Smoothing and face swapping are tools that complement grid adaption, usually increasing the quality of the final numerical mesh. Smoothing repositions the nodes and face swapping modifies the cell connectivity to achieve these improvements in quality.

! Face swapping is applicable only to grids with triangular or tetrahedral
cells.

23-54

c Fluent Inc. November 28, 2001

23.11 Improving the Grid by Smoothing and Swapping

Smoothing and swapping are performed using the Smooth/Swap Grid panel (Figure 23.11.1). Adapt −→Smooth/Swap...

Figure 23.11.1: The Smooth/Swap Grid Panel

23.11.1

Smoothing

Two smoothing methods are available in FLUENT: Laplace smoothing and skewness-based smoothing. The first can be applied to all types of grids, but the second is available only for triangular/tetrahedral meshes.

! For triangular and tetrahedral grids, it is recommended that you always
use the skewness-based smoothing method; reserve the Laplacian method only for quadrilateral and hexahedral grids. Laplacian Smoothing When you use the Laplace method, a Laplacian smoothing operator is applied to the unstructured grid to reposition nodes. The new node position is the average of the positions of its node neighbors. The relaxation factor (a number between 0.0 and 1.0) multiplies the computed

c Fluent Inc. November 28, 2001

23-55

Grid Adaption

node position increment. A value of zero results in no movement of the node and a value of unity results in movement equivalent to the entire computed increment. Figure 23.11.2 illustrates the new node position for a typical configuration of quadrilateral cells.

Figure 23.11.2: Result of Smoothing Operator on Node Position (dashed line is original grid and solid line is final grid)

This repositioning strategy tends to improve the skewness of the mesh, but usually relaxes the clustering of node points. In extreme circumstances, the present operator may create grid lines that cross over the boundary, creating negative cell volumes. This is most likely to occur near sharp or coarsely resolved convex corners, especially if you perform multiple smoothing operations with a large relaxation factor. Figure 23.11.3 illustrates an initial tetrahedral grid before one unrelaxed smoothing iteration creates grid lines that cross over each other (Figure 23.11.4).

23-56

c Fluent Inc. November 28, 2001

23.11 Improving the Grid by Smoothing and Swapping

Figure 23.11.3: Initial Grid Before Smoothing Operation

Figure 23.11.4: Grid Smoothing Can Cause Grid-Line Crossing

c Fluent Inc. November 28, 2001

23-57

Grid Adaption

The default smoothing parameters are designed to improve grid quality with minimal adverse effects, but you should always take the precaution of saving a case file before you smooth your mesh. If you apply a conservative relaxation factor and start with a good quality initial grid, the frequency of failure due to smoothing is extremely low in two dimensions. However, corruption of the grid topology occurs much more frequently in three dimensions, particularly with tetrahedral grids. The skewnessbased smoothing is recommended for triangular and tetrahedral grids. The smoothing operator can also be applied repeatedly, but as the number of smoothing sweeps increase, the node points have a tendency to pull away from boundaries and the grid tends to lose any clustering characteristics. Steps for Laplacian Smoothing To perform Laplacian smoothing, you will follow these steps: 1. In the Smooth/Swap Grid panel (Figure 23.11.1), select laplace in the Method drop-down list under Smooth. 2. Set the factor by which to multiply the computed position increment for the node in the Relaxation Factor field. The lower the factor, the more reduction in node movement. 3. Specify the number of successive smoothing sweeps to be performed on the grid in the Number of Iterations field. The default value is 4. 4. Click the Smooth button. Skewness-Based Smoothing When you use skewness-based smoothing, FLUENT applies a smoothing operator to the grid, repositioning interior nodes to lower the maximum skewness of the grid. FLUENT will try to move interior nodes to improve the skewness of cells with skewness greater than the specified “minimum skewness.” This process can be very time-consuming, so you should only perform smoothing on cells with high skewness. Improved results can 23-58

c Fluent Inc. November 28, 2001

23.11 Improving the Grid by Smoothing and Swapping

be obtained by smoothing the nodes several times. There are internal checks that will prevent a node from being moved if moving it causes the maximum skewness to increase, but it is common for the skewness of some cells to increase when a cell with a higher skewness is being improved. Thus, you may see the average skewness increase while the maximum skewness is decreasing.

! You should carefully consider whether the improvements to the mesh due
to a decrease in the maximum skewness are worth the potential increase in the average skewness. Performing smoothing only on cells with very high skewness (e.g., 0.8 or 0.9) may lessen the adverse effects on the average skewness.

! Skewness-based smoothing is available only for triangular and tetrahedral grids. Steps for Skewness-Based Smoothing To perform skewness-based smoothing, you will follow these steps: 1. In the Smooth/Swap Grid panel (Figure 23.11.1), select skewness in the Method drop-down list under Smooth. 2. Set the minimum cell skewness value for which node smoothing will be attempted in the Minimum Skewness field. FLUENT will try to move interior nodes to improve the skewness of cells with skewness greater than this value. By default, Minimum Skewness is set to 0.4 for 2D and 0.8 for 3D. 3. Specify the number of successive smoothing sweeps to be performed on the grid in the Number of Iterations field. The default value is 4. 4. Click the Smooth button. Skewness-based smoothing should be alternated with face swapping (see Section 23.11.3).

c Fluent Inc. November 28, 2001

23-59

Grid Adaption

23.11.2

Face Swapping

Face swapping can be used to improve the quality of a triangular or tetrahedral grid. Triangular Grids The approach for triangular grids is to use the Delaunay circle test to decide if a face shared by two triangular cells should be swapped. A pair of cells sharing a face satisfies the circle test if the circumcircle of one cell does not contain the unshared node of the second cell. Figure 23.11.5 illustrates cell neighbors that do and do not satisfy the circle test. In cases where the circle test is not satisfied, the diagonal or face is swapped, as illustrated in Figure 23.11.6.

Figure 23.11.5: Examples of Cell Configurations That Satisfy and Do Not Satisfy the Circle Test

23-60

c Fluent Inc. November 28, 2001

23.11 Improving the Grid by Smoothing and Swapping

Figure 23.11.6: The Face is Swapped to Satisfy the Delaunay Circle Test

Repeated application of the face-swapping technique will produce a constrained Delaunay mesh. If a grid is a Delaunay grid, it is a unique triangulation that maximizes the minimum angles in the mesh. Thus, the triangulation tends towards equilateral cells, providing the most equilateral grid for the given node distribution. (See the Theory chapter in the TGrid User’s Guide for more information about Delaunay mesh generation.) Tetrahedral Grids For tetrahedral grids, face swapping consists of searching for configurations of three cells sharing an edge and converting them into two cells sharing a face to decrease skewness and the cell count. (See Figure 23.11.7.)

Figure 23.11.7: 3D Face Swapping

c Fluent Inc. November 28, 2001

23-61

Grid Adaption

Steps for Face Swapping To perform face swapping, simply click on the Swap button until the reported Number Swapped is 0. The Number Visited indicates the total number of faces that were visited and tested for possible face swapping. 23.11.3 Combining Skewness-Based Smoothing and Face Swapping

As mentioned in Section 23.11.1, skewness-based smoothing should usually be alternated with face swapping. Guidelines for this procedure are presented here. 1. Perform 4 smoothing iterations using a Minimum Skewness of 0.8 for 3D, or 0.4 for 2D. 2. Swap until the Number Swapped decreases to 0. 3. For 3D grids, decrease the Minimum Skewness to 0.6 and repeat the smoothing/swapping procedure.

23-62

c Fluent Inc. November 28, 2001

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->