
|
|
Stories abound of successful CFD simulations that often - but not always - include grid adaptions once or twice during the solution process. The ability to adapt, refine, or coarsen the grid during the solution, is a feature that was originally introduced in Fluent software in 1992. How does an engineer know if such a step is necessary? If it is necessary, where should the adaption be performed, and what criteria for modifications should be used? The answers to these questions are as varied as the types of problems that can be solved using any general-purpose CFD software. Guidelines do exist, however, and rules of thumb can be established that are applicable to most CFD simulations. Why Adapt?There are two primary reasons for adapting a grid. First, adaption is a simple way to test for grid independence. Grid independence means that the converged solution obtained from a CFD calculation is independent of the grid density. Increasing the number of cells in one region or throughout the entire domain for a grid-independent CFD model would not (ideally) change the flow-field solution and integrated quantities. In practice, grid independence is indicated when further mesh refinement yields only small, insignificant changes in the numerical solution. Since testing for mesh independence by uniformly refining the entire mesh is expensive, adaption can often be much more efficient in that only selected regions of the flow-field (say, areas with large flow gradients) are refined. Second, adaptions are helpful in resolving flow features whose location and size cannot be known a priori. For example, the location and approximate size of wall boundary layers can be determined ahead of time. An appropriate mesh density can therefore be prescribed ahead of time in the wall regions. The same cannot be said about interior flow features, such as shear layers (if separation occurs) or shock waves. Since these types of features often involve gradients in flow-field variables, adequately refined meshes are essential for capturing the details correctly. In such cases, adaption can be a critical factor in determining the quality of the final results. What to Adapt?Since there are so many different applications for which adaption can play an important role, there are many adaption options available. One of the most popular methods for adaption is based on the gradient of a variable. For example, a pressure or tempera ture gradient could be used to improve the resolution of a shock wave, whereas a velocity gradient could be used to help isolate a shear layer. In fact, any scalar layer, such as that surrounding a thermal plume or a reacting species zone in a burner, can be resolved by adapting on the gradient of the scalar. This is also true for the location of the interface in a steady-state free surface simulation using the VOF model, where adaption on the gradient of the volume fraction can be performed.
The baseline grid (A) gives rise to the shock wave pattern (B).In addition to gradient adaptions, several other types are available. If gradients of several variables are expected in a single region, an adaption on the region itself can be performed. If the grid along a boundary is found to be inadequate, it, too, can be adapted. Note, however, that if the boundary is curved, an adapted grid will only have the curvature contained in the baseline grid. In general, it is recommended to always build a mesh with adequate boundary node density, especially on boundaries that contain curvature. By doing so, adaption may not be necessary. For turbulent flows, adaptions on the normalized distance to the wall, y+ (or y*), can be performed. The result of an adaption of this type is that the value of y+ (y*) will be cut in half. While this is a satisfactory approach when the standard wall function is in use, it is not recommended for the two-layer boundary treatment, where smoothly varying meshes (built with care the first time around) are most desirable. Caution should also be used when adapting a triangular or tetrahedral mesh in a viscous boundary layer. Refinement of these cells will give rise to y+ values with considerable variation along the boundary. If wall effects, such as heat transfer or pressure drop are to be an important component of the solution, carefully planned boundary meshes using quadrilateral or hexahedral elements are recommended. When to Adapt?In general, a completely converged preliminary solution, using the baseline mesh, should be obtained before considering an adaption. This will ensure that adaptions based on flow-field results will be derived from the most accurate solution at the time. For this reason, you should also ensure that adapted mesh solutions are completely converged before performing additional adaptions. How to Adapt?As an example of how to go about the process of performing an adaption, consider a gradient adaption of static pressure. In FLUENT, begin by opening the Gradient Adaption panel (Adapt/Gradient). Select Pressure and then Static Pressure from the Gradients Of drop-down lists. Click on Compute. The minimum and maximum values of static pressure gradient will be displayed. To determine the refinement threshold, many engineers like to use what is known as the "10% rule," which states that a cell should be refined whenever the computed gradient is above 10% of the maximum value. Coarsening, if desired, can also be selected for gradients within 10% of the minimum value. To follow this rule, the Refine (Coarsen) Threshold should be set at 10% (110%) of the Max (Min) value. Click on Mark to mark the cells for adaption. Click on ManageÉ to open the Manage Adaption Registers panel. From this panel, you can display the selected cells. In general, it is desirable to have the marked cells clustered together in a more or less contiguous manner. If they are not, delete the register containing the marked cells, return to the Gradient Adaption panel, and reduce the Refinement Threshold. This will result in more cells being marked for adaption. If the displayed cells occupy too large an area (or volume), the Refinement Threshold can be increased. When the marked cells are satisfactory, click on Adapt in either panel to refine the mesh.
The pressure gradients in the solution are used to adapt the grid (C). Calculations continuing on the adapted grid result in a much sharper definition of the shocks (D).There are two ways in which a grid can be adapted. Conformal adaptions are those that result in meshes in which each node is connected to all of its neighbor nodes. Triangular and tetrahedral meshes are the only mesh topologies that can be refined in this manner. In addition, simulations in which a conformal adaption has been performed cannot be coarsened. Non-conformal, or hanging-node adaptions, on the other hand, allow cells to be split uniformly into smaller "child" cells, a process which results in nodes that may not be connected to all neighbor nodes (hence t he name "hanging-node" adaption). This type of adaption can be done for all cell types, so it is more widely used (and is the default method). While it lends itself to better local resolution, there is a small memory penalty associated with this method, since each edge containing a hanging node has bordering cells that must be associated with multiple neighbors. However, unlike conformal adaptions, hanging-node adaptions can be coarsened. This is accomplished by simply removing the "child" cells from a given "parent" cell. You can even coarsen the mesh all the way back to your original, unadapted mesh. SummaryAdaption is a powerful tool that can be used to improve the quality of the results from a CFD solution. FLUENT provides a rich set of tools for adapting the mesh to resolve f low-field gradients and achieve mesh-independent solutions. With so many options to choose from, it is easy to become adept at adapting! |
FluentNEWS |
||