<<

Chapter 19. Adapting the Mesh

The solution-adaptive mesh refinement feature of ANSYS FLUENT allows you to refine and/or coarsen your mesh based on geometric and numerical solution data. In addition, ANSYS FLUENT provides tools for creating and viewing adaption fields customized to particular applications. For information about using mesh adaption in ANSYS FLUENT, see Chapter 27: Adapting the Mesh in the separate User’s Guide. Theoretical information about the adaption process is described in detail in the following sections.

• Section 19.1: Static Adaption Process

• Section 19.2: Boundary Adaption

• Section 19.3: Adaption

• Section 19.4: Dynamic Gradient Adaption

• Section 19.5: Isovalue Adaption

• Section 19.6: Region Adaption

• Section 19.7: Volume Adaption

• Section 19.8: Yplus/Ystar Adaption

• Section 19.9: Anisotropic Adaption

• Section 19.10: Geometry-Based Adaption

• Section 19.11: Registers

Release 12.0 c ANSYS, Inc. January 29, 2009 19-1 Adapting the Mesh

19.1 Static Adaption Process The adaption process is separated into two distinct tasks.

1. The individual cells are marked for refinement or coarsening based on the adaption , which is created from geometric and/or solution data.

2. 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.

i Write a case and data file before starting the adaption process. If you generate an undesirable mesh, you can restart the process with the saved files.

19.1.1 Hanging Node Adaption Hanging node adaption is the procedure used in ANSYS FLUENT. Meshes produced by this method 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 19.1.1.

Hanging Node

Figure 19.1.1: Example of a Hanging Node

Hanging node mesh adaption provides the ability to operate on meshes with a variety of cell shapes, including hybrid meshes. Although the hanging node scheme provides significant mesh flexibility, it requires additional memory to maintain the mesh hierarchy which is used by the rendering and mesh adaption operations.

19-2 Release 12.0 c ANSYS, Inc. January 29, 2009 19.1 Static Adaption Process

Hanging Node Refinement The cells marked for refinement are divided as described here:

• A triangle is split into 4 triangles.

• 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 subdividing the enclosed octahedron by intro- ducing 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.

Figures 19.1.2 and 19.1.3 illustrate the division of the supported cell shapes. 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 19.1.2: Hanging Node Adaption of 2D Cell Types

Hanging Node Coarsening The mesh is coarsened by reintroducing inactive parent cells (uniting 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 mesh with repeated application of the hanging node coarsening. Using the hanging node adaption process, you cannot coarsen the mesh further than the original mesh.

Release 12.0 c ANSYS, Inc. January 29, 2009 19-3 Adapting the Mesh

Tetrahedron Hexahedron

Prism/Wedge Pyramid

Figure 19.1.3: Hanging Node Adaption of 3D Cell Types

19-4 Release 12.0 c ANSYS, Inc. January 29, 2009 19.2 Boundary Adaption

19.2 Boundary Adaption If more cells are required on a boundary, they can be added using boundary adaption, which allows you to mark or refine cells in the proximity of the selected boundary zones. The ability to refine the mesh near one or more boundary zones is provided because important fluid interactions often occur in these regions. Example, development of strong velocity in the boundary layer near a wall. An example of a mesh that can be improved with boundary adaption is shown in Fig- ure 19.2.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 19.2.2. 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, create the mesh with sufficient surface nodes before reading it into the solver.

19.3 Gradient Adaption The gradient adaption function allows you to mark cells or adapt the mesh based on the gradient, , or isovalue of the selected field variables. Information can be found in the following subsections:

• Section 19.3.1: Gradient Adaption Approach

• Section 19.3.2: Example of Steady Gradient Adaption

19.3.1 Gradient Adaption Approach Solution-adaptive mesh refinement is performed to efficiently reduce the numerical er- ror in the digital solution, with minimal numerical cost. 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 meshes. A comprehensive mathematically rigorous theory for error estimation and convergence is not yet available for CFD simulations. Assuming that maximum error occurs in high-gradient regions, the readily available physical features of the evolving flow field may be used to drive the mesh adaption process.

Release 12.0 c ANSYS, Inc. January 29, 2009 19-5 Adapting the Mesh

Grid

Figure 19.2.1: Mesh Before Adaption

Grid

Figure 19.2.2: Mesh after Boundary Adaption

19-6 Release 12.0 c ANSYS, Inc. January 29, 2009 19.3 Gradient Adaption

Three approaches for using this information for mesh adaption are available in ANSYS FLUENT:

• Gradient approach: In this approach, ANSYS FLUENT multiplies the Euclidean norm of the gradient of the selected solution by a characteristic length scale [68]. For example, the gradient function in two dimensions has the following form:

r |ei1| = (Acell) 2 |∇f| (19.3-1)

where ei1 is the error indicator, Acell is the cell area, r is the gradient volume weight, and ∇f is the Euclidean norm of the gradient of the desired field 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.

If you specify adaption based on the gradient of a scalar, then the value of |ei1| is displayed when you plot contours of the adaption function. This approach is recommended for problems with strong shocks, e.g., supersonic inviscid flows.

• Curvature approach: This is the equidistribution adaption technique formerly used by ANSYS FLUENT, that multiplies the undivided Laplacian of the selected solution variable by a characteristic length scale [368]. For example, the gradient function in two dimensions has the following form:

r 2 |ei2| = (Acell) 2 |∇ f| (19.3-2)

where ei2 is the error indicator, Acell is the cell area, r is the gradient volume weight, and ∇2f is the undivided Laplacian of the desired field 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. This approach is recommended for problems with smooth solutions.

Release 12.0 c ANSYS, Inc. January 29, 2009 19-7 Adapting the Mesh

• Isovalue approach: This approach is not based on . Instead, the iso- values of the required field variable f, are used to control the adaption. Therefore, the function is of the form:

ei3 = f (19.3-3)

where ei3 is the error indicator. This approach is recommended for problems where derivatives are not helpful. For example, if you want to refine the mesh where the reaction is taking place, you can use the isovalues of the reaction rate and mark for refinement at high reaction rates. This approach also allows you to customize the criteria for controlling the adaption using custom field functions, user-defined scalars, etc.

The length scale is the square (2D) or cube (3D) root of the cell volume. Introducing the length scale allows resolution of both strong and weak disturbances, increasing the potential for more accurate solutions. However, you can reduce or eliminate the volume weighting by changing the gradient Volume Weight in the Mesh Adaption Controls dialog box (see Section 27.12: Mesh Adaption Controls in the separate User’s Guide for details). Any of the field variables available for contouring can be used in the gradient adaption function. 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. In addition to the Standard (no normalization) approach formerly used by ANSYS FLU- ENT, two options are available for Normalization [107]:

• Scale, which scales the values of ei1, ei2, or ei3 by their average value in the domain, i.e.:

|e | i (19.3-4) |ei| when using the Scale option, suitable first-cut values for the Coarsen Threshold and the Refine Threshold are 0.3 to 0.5, and 0.7 to 0.9, respectively. Smaller values will result in larger adapted regions.

• Normalize, which scales the values of ei1, ei2, or ei3 by their maximum value in the domain, therefore always returning a problem-independent range of [0, 1] for any variable used for adaption, i.e.:

|e | i (19.3-5) max |ei|

19-8 Release 12.0 c ANSYS, Inc. January 29, 2009 19.4 Dynamic Gradient Adaption

when using the Normalize option, suitable first-cut values for the Coarsen Threshold and the Refine Threshold are 0.2 to 0.4, and 0.5 to 0.9, respectively. Smaller values will result in larger adapted regions.

19.3.2 Example of Steady Gradient Adaption An example of the use of steady gradient adaption is the solution of the supersonic flow over a circular cylinder. The initial mesh, shown in Figure 19.3.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, pressure is a suitable variable to be used in gradient adaption. This is because there will be a jump in pressure across the shock. However, several adaptions are necessary before the shock can be properly resolved. After several adaptions the mesh will be as shown in Figure 19.3.2. A typical application of gradient adaption for an incompressible flow might be a mixing layer, which involves a discontinuity.

19.4 Dynamic Gradient Adaption In contrast with the static gradient adaption (Section 19.3: Gradient Adaption) dynamic gradient adaption is a fully automated process. For time dependent and for steady state problems, you can perform the entire solution without changing the initial settings. That is, you can let the solver periodically perform adaptions without changing/entering any parameter.

19.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 high-velocity fluid. Since it is known that these regions also contain large gradients of important flow quantities (such as k and  in turbulent flows), it is 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 mesh 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:

Release 12.0 c ANSYS, Inc. January 29, 2009 19-9 Adapting the Mesh

Grid

Figure 19.3.1: Bluff-Body Mesh Before Adaption

Grid

Figure 19.3.2: Bluff-Body Mesh after Gradient Adaption

19-10 Release 12.0 c ANSYS, Inc. January 29, 2009 19.6 Region Adaption

• 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.

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. An example of a problem in which isovalue adaption is useful is shown in Figure 19.5.1. The mesh for an impinging jet is displayed along with contours of x velocity. An isovalue adaption based on x velocity allows refinement of the mesh only in the jet (Figure 19.5.2).

Note: When adapting to isovalues take care to prevent large gradients in cell volume. This can affect accuracy and impede convergence (Section 27.1: Using Adaption in the separate User’s Guide). To rectify large gradients in cell volume, adapt to cell-volume change, as demonstrated in Section 19.7.2: Volume Adaption Example.

19.6 Region Adaption Many mesh generators create meshes with cell volumes that grow very rapidly with distance from boundaries. While this avoids a dense mesh 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 mesh 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 the extent of the refinement and coarsening. Information can be found in the following subsections:

• Section 19.6.1: Defining a Region

• Section 19.6.2: Region Adaption Example

Release 12.0 c ANSYS, Inc. January 29, 2009 19-11 Adapting the Mesh

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 19.5.1: Impinging Jet Mesh Before Adaption

Grid

Figure 19.5.2: Impinging Jet Mesh after Isovalue Adaption

19-12 Release 12.0 c ANSYS, Inc. January 29, 2009 19.6 Region Adaption

19.6.1 Defining a Region The basic approach to the region adaption function is to first define a region:

• The hexahedron (quadrilateral) is defined 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, 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 enter the exact coordinates into the appropriate real entry fields or select the locations with the mouse on displays of the mesh or solution field. After the region is defined, each cell that has a centroid inside/outside the specified region is marked for refinement.

19.6.2 Region Adaption Example Figure 19.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, because of which the flow separation known to occur on the suction surface of the flap will not be properly predicted. To avoid this problem, the mesh is adapted within circular regions (selected by mouse probe) surrounding the flap. The result is shown in Figure 19.6.2. When the region adaption is performed, the minimum cell volume for adaption is limited (as described in Section 27.12: Mesh Adaption Controls in the separate User’s Guide) to prevent the very small cells near the surface from being refined further.

Release 12.0 c ANSYS, Inc. January 29, 2009 19-13 Adapting the Mesh

Grid

Figure 19.6.1: Flap-Airfoil Mesh Before Adaption

Grid

Figure 19.6.2: Flap-Airfoil Mesh after Region Adaption

19-14 Release 12.0 c ANSYS, Inc. January 29, 2009 19.7 Volume Adaption

19.7 Volume Adaption As mentioned in Section 27.1: Using Adaption in the separate User’s Guide, 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 results in a mesh that does not have this property, the mesh 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. Information can be found in the following subsections:

• Section 19.7.1: Volume Adaption Approach

• Section 19.7.2: Volume Adaption Example

19.7.1 Volume Adaption Approach Marking or refining the mesh based on volume magnitude is 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 mesh based on the change in cell volume is used to improve the smoothness of the mesh. 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 19.7.1 the ratio of V1/V2 and the ratio of V2/V1 is compared to the threshold value. If V2/V1 is greater than the threshold, then C2 is marked for refinement.

Figure 19.7.1: Volume Change—Ratio of the Volumes of the Cells

Release 12.0 c ANSYS, Inc. January 29, 2009 19-15 Adapting the Mesh

19.7.2 Volume Adaption Example The mesh in Figure 19.7.2 was created for 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. 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 19.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.

19.8 Yplus/Ystar Adaption ANSYS FLUENT provides three different options for near-wall modeling of turbulence, standard wall functions, nonequilibrium wall functions, and the enhanced wall treatment. As described in Section 12.3: Mesh Considerations for Turbulent Flow Simulations in the separate User’s Guide, there are certain mesh requirements for each of these near-wall modeling options. It is often difficult to gauge the near-wall resolution requirements when creating the mesh. Hence, Yplus and Ystar adaption have been provided to appropriately refine or coarsen the mesh along the wall during the solution process.

19.8.1 Yplus/Ystar Adaption 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 allow- able threshold will be marked for refinement (unless coarsening or refinement has been disabled). Figure 19.8.1 shows the mesh for a duct flow, where the top boundary is the wall and the bottom boundary is the 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 19.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 12.3: Mesh Considerations for Turbulent Flow Simulations in the separate User’s Guide for guidelines on recommended values of y+ or y∗ for different near-wall treatments.

19-16 Release 12.0 c ANSYS, Inc. January 29, 2009 19.8 Yplus/Ystar Adaption

Grid

Figure 19.7.2: Jet Mesh Before Adaption

Grid

Figure 19.7.3: Jet Mesh after Volume Adaption Based on Change in Cell Volume

Release 12.0 c ANSYS, Inc. January 29, 2009 19-17 Adapting the Mesh

Grid

Figure 19.8.1: Duct Flow Mesh Before Adaption

Grid

Figure 19.8.2: Duct Flow Mesh after y+ Adaption

19-18 Release 12.0 c ANSYS, Inc. January 29, 2009 19.9 Anisotropic Adaption

19.9 Anisotropic Adaption The purpose of anisotropic adaption is to refine hexahedral or prism layer cells in 3D meshes. Anisotropic adaption is considered to be more of a mesh manipulation tool rather than an adaption feature, allowing you to refine some hexahedral or prism cells that are adjacent to one or a few boundary face zones using the GUI. The hexahedral or prism cells are split in one direction each time, giving you control of the different splitting ratios, thus achieving anisotropic refinement.

i Note that anisotropic adaption is different from other mesh adaption fea- tures because it only refines the mesh and cannot be coarsened after re- finement. For information on how to use anisotropic adaption, see Section 27.9: Anisotropic Adaption in the separate User’s Guide

19.10 Geometry-Based Adaption The purpose of adaption is to produce a mesh that is fine enough and adequately rep- resents all important features of the geometry. However, when you have a coarse mesh of a geometry that has curved profiles and sharp corners, the adapted mesh may not recover the curved profiles and corners at the perimeter of the geometry. In such cases, use geometry-based adaption to reconstruct the geometry (or to recover the finer details of the geometry at its extends) along with performing the adaption process.

19.10.1 Geometry-Based Adaption Approach Geometry-based adaption works on the principle of geometry reconstruction. In this approach, the cell count of the mesh is increased by creating the new nodes in the domain in between the existing nodes of the mesh. The newly created nodes are projected in such a way that the resulting mesh is finer and it’s shape is closer to the original geometry. The following sections explain how nodes are projected and the parameters that control the node propagation.

Node Projection Consider a coarse mesh created for a circular geometry. A section of the mesh close to the circular edge is shown in Figure 19.10.1. The edge is not smooth and has sharp corners, because of which its shape is not closer to that of the original geometry. Using boundary adaption along with the geometry reconstruction option will result in a mesh with smoother edges as shown in Figure 19.10.2.

Release 12.0 c ANSYS, Inc. January 29, 2009 19-19 Adapting the Mesh

In Figure 19.10.2, the dotted lines represent the original edge of the mesh. The boundary adaption process creates new nodes in between the original nodes. These nodes are projected towards the edge of the geometry, because of which the resulting mesh has smooth edges and its shape is closer to the original geometry.

i Only the nodes created in the adaption process (newly created nodes) are projected and the original nodes retain their positions. The following parameters control node projection and are specified in Geometry Based Adaption dialog box.

• Levels of Projection Propagation: This parameter allows you to specify the number of node layers across which node propagation should take place for geometry recon- struction. A value of 1 means only the nodes at the boundary will be projected, a value of 2 means the nodes at the boundary and the nodes in the next layer will be projected, and so on. Note: The nodes in the first level are projected by a maximum magnitude and the node in the last level are projected by a minimum magnitude. The magnitude of projection decreases gradually from the first level to the last level. For example, a value of 3 for Levels of Projection Propagation means, the level 1 node is projected by maximum magnitude and level 3 node is projected by minimum magnitude. Figure 19.10.3 illustrates the level of propagation and magnitude of projection of newly created nodes.

• Direction of Projection: This parameter allows you to specify the direction, X, Y, or Z (for 3D), for node projection. If you do not specify any direction, the node projection takes place at the nearest point of the newly created node.

• Background Mesh: This option allows you to use a fine surface mesh as a back- ground mesh, based on which the geometry is reconstructed. When you read the surface mesh, the node projection will take place based on the node positions of the background mesh. This option is useful when the mesh you want to adapt is very coarse and geometry is highly curved. In such cases, node projection, only by specifying the parameters may not result in a good quality mesh. However, you can also modify the propagation criteria by specifying the parameters. i You can read only one surface mesh at a time. The various zones of the surface mesh will be listed in the Background Mesh drop-down list.

19-20 Release 12.0 c ANSYS, Inc. January 29, 2009 19.10 Geometry-Based Adaption

Figure 19.10.1: Mesh Before Adaption

Figure 19.10.2: Projection of Nodes

Release 12.0 c ANSYS, Inc. January 29, 2009 19-21 Adapting the Mesh

Figure 19.10.3: Levels Projection Propagation and Magnitude

Example of Geometry-Based Adaption Consider a mesh created for a spherical geometry. The initial mesh is very coarse, because of which it has sharp corners (as in Figure 19.10.4). It does not represent the spherical geometry accurately. To recover the original spherical geometry from this coarse mesh use geometry-based adaption. If you adapt boundaries of the domain without activating the Reconstruct Geometry op- tion, the resulting mesh (see Figure 19.10.5) has sufficient number of cells, but the bound- ary of the domain still contains sharp corners. Boundary adaption only creates new nodes in between the existing nodes to increase the cell count of the mesh. Since it does not project the nodes, the shape of the mesh remains as it is. If you adapt the boundary with Reconstruct Geometry option. The resulting mesh (Fig- ure 19.10.6) has more number of cells and less sharp corners at boundary. In addition, the newly created nodes are projected in a direction such that it’s shape is closer to the original geometry (i.e., sphere with smooth boundary).

19-22 Release 12.0 c ANSYS, Inc. January 29, 2009 19.10 Geometry-Based Adaption

Figure 19.10.4: Coarse Mesh of a Sphere

Release 12.0 c ANSYS, Inc. January 29, 2009 19-23 Adapting the Mesh

19.11 Registers A register is the group of cells that are marked for refinement/coarsening but not adapted. There are two types of registers:

• Adaption Register

• Mask Register

Adaption 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. 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. 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 with the refining and coarsening threshold values and assigned the appropriate identifier.

• If the cell value < coarsen threshold value, the cell is marked for coarsening.

• If the coarsen threshold value < cell value < refine threshold value, the cell is neutral (not marked).

• If the cell value > refine threshold value, the cell is marked for refinement.

Adaption registers can be created using geometric data, physical features of the flow field, and combinations of these information. After they are created, the adaption registers can be listed, displayed, deleted, combined, exchanged, inverted, and changed to mask registers.

19-24 Release 12.0 c ANSYS, Inc. January 29, 2009 19.11 Registers

Figure 19.10.5: Adapted Mesh Without Geometry Reconstruction

Figure 19.10.6: Mesh after Geometry-Based Adaption

Release 12.0 c ANSYS, Inc. January 29, 2009 19-25 Adapting the Mesh

Hybrid Adaption Functions The hybrid adaption functions are created to confine the adaption to a specific region (using masks) and/or create a more accurate error indicator. ANSYS FLUENT provides a few basic tools to aid in creating hybrid adaption functions.

1. Create the initial adaption registers using geometric and/or solution vector infor- mation.

2. Manipulate these registers and their associated refinement and coarsening marks. • Manipulate the registers by changing the type and/or combining them to create the desired hybrid function. • Manipulate the marks by using Exchange, Invert, Limit, and Fill operations.

3. Delete, display 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 mesh to the gradients of pressure. The pressure gradient near the surface of the wedge, however, is relatively small. You can 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 regions may be refined, but the net result will not gain in resolution.

• If you combine the velocity and pressure gradient adaption functions, the new adaption function will 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. To refine the shock and boundary layer only near the leading edge of the wedge, 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. 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.

19-26 Release 12.0 c ANSYS, Inc. January 29, 2009 19.11 Registers

Mask Register Mark 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 in Figures 19.11.1, 19.11.2, and 19.11.3. Figure 19.11.1 shows a cloud of cells representing an adaption register (shaded cells are marked cells). Figure 19.11.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 19.11.3.

Figure 19.11.1: Adaption Register with Marked Cells

Figure 19.11.2: Mask Register with Active Cells

Release 12.0 c ANSYS, Inc. January 29, 2009 19-27 Adapting the Mesh

Figure 19.11.3: New Adaption Register Created from Application of Mask

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 27.11.1: Manipulating Adaption Registers in the separate User’s Guide.

19-28 Release 12.0 c ANSYS, Inc. January 29, 2009