20.19. Stabilization Tools for the Pressure-Based Solver

With the single-phase, pressure-based solver, you can use stabilization tools:

  • You can enable basic stabilization settings to enhance solver stability and robustness.

  • After the basic stabilization settings are enabled, you can select one of three available solver stabilization modes, so that the solver applies some local and global modifications to the initialization and discretization of the pressure-based solver in order to improve solver robustness and intelligence for handling poor quality cells.

  • If these modes do not provide the needed stabilization, you can also use contingency tools that can activate a customized slope limiter function specifically designed for the stabilization tools, prevent local solution divergence caused by excessive velocity or turbulent viscosity rate values in poor quality cells, adjust the algebraic multigrid (AMG) solver settings, and/or delete poor quality cells.

  • Prior to running the calculation, you can use diagnostic tools to help identify poor-quality elements, investigate mesh quality, and troubleshoot the solver settings.

Note that these stabilization tools can be used with or without poor mesh numerics (as described in Robustness with Meshes of Poor Quality in the Fluent User's Guide).

To use stabilization tools, perform the following steps:

  1. Select Pressure-Based for the solver Type in the General task page.

  2. Enable beta feature access (as described in Introduction).

  3. Enable basic stabilization settings that enhance stability by using the following text command:

    solve set stabilization-tools enable?

    The basic stabilization settings provide the minimum required changes in the discretization for improving solver stability. Enabling the previous text command also provides access to the additional stabilization tools text commands.

  4. Set up the case.

  5. Prior to initialization, you can enable the visualization of diagnostics, so that after you perform an inspection and initialization (as described in later steps) you can postprocess field variables of additional mesh quality metrics calculated for the inspection report and (optionally) auxiliary metrics. For further details, see Visualizing the Diagnostics. For example, you could enter the following text command:

    >solve/set/stabilization-tools/diagnostics-tools/diagnostics-visualization yes yes
  6. Prior to initialization, you can perform a grid-inspection in order to analyze the mesh quality based on various criteria, as described in Using the Inspector. For example, you could enter the following text command to view the report in the console:

    >solve/set/stabilization-tools/diagnostics-tools/inspector inspector-type 1 no inspection yes
  7. Initialize the solution.

  8. After initialization, you can perform a case-inspection in order to generate a comprehensive analysis on mesh quality and case settings, as described in Using the Inspector. For example, you could enter the following text command to view the report in the console:

    >solve/set/stabilization-tools/diagnostics-tools/inspector inspector-type 2 no inspection yes

    You should review the diagnostics report and summary table. If there are any warnings or errors in the report, you should review the marked cells in the inspector_anomalous_identifier cell register and try to improve the mesh quality in the identified regions.

  9. If you previously enabled the visualization of diagnostics (as described in an earlier step), after an inspection and initialization you can postprocess the additional metrics available in the Diagnostic... category and take steps to improve the mesh as needed. For example, you could use the Contours dialog box to display contours of the Mesh Binary Index. For further details, see Visualizing the Diagnostics.

  10. Re-initialize the solution (this is only necessary if hybrid initialization was previously used).

  11. Run the calculation. If you find that the solver is unstable with just the basic stabilization settings, you can see if one of the stabilization modes available through the following text command improves the stability:

    solve set stabilization-tools stabilization-mode

    After you activate the use of a solver stabilization mode, you can select from the following modes:

    • Low (1)

      This mode improves solver robustness with minimum additional changes to the current settings. The solver identifies and handles a variety of singularities without the need for any intervention by you.

    • Medium (2)

      This mode improves solver robustness by applying discretization simplifications in poor quality regions and activating a few global changes, such as making global changes to diffusion discretizations and using an enhanced gradient limiter.

    • High (3)

      This mode applies more generic and global adjustments (for example, to the Rhie-Chow formulation) and enhances the default diffusion discretization and gradient limiter in all computational cells.


    Note:  When one of the previous modes is selected and the calculation is run, the solver automatically identifies poor-quality faces and cells, then applies localized discretization simplifications and treatments only to those requiring attention. In other words, not all identified faces and cells undergo the same treatment during the stabilization process—the solver selectively addresses issues, applying targeted remedies to specific portions of the identified entities.


  12. If there is still numerical instability in the domain with your selected stabilization mode, you can repeat the previous step to select a different stabilization mode. If none of the three modes produce the needed stability, you can try using one or more of the following contingency tools.

    • If sudden divergence occurred, you can perform a linear solver adjustment by using the following text command (note that a stabilization mode must be selected for this text command to be available). This allows the solver to perform Laplace smoothing while considering additional constraints during the partitioning procedure. Enabling this option could help to avoid locating the partition boundary near poor quality cells and possibly improve solver robustness further. Additionally, this option increases the maximum coarse levels for algebraic multigrid (AMG) coarsening, adjusts a few more of the AMG-related settings, and finally activates the Laplace coarsening. This tool is recommended if Laplace smoothing and Laplace coarsening are not enabled.

      solve set stabilization-tools contingency-tools linear-solver-adjustment

    • If velocity is still unbounded, you can enable divergence prevention using the following text command (note that a stabilization mode must be selected for this text command to be available). Enabling this option allows the solver to identify local divergences caused by nonlinear instabilities and to simplify the numerics in problematic regions. To control local divergence, a controller is triggered based on your specified interval value during the calculation run, which identifies cells violating specified limits for cell velocity or cell turbulent viscosity ratio, and applies appropriate numerical treatments to these cells to improve solver stability.

      solve set stabilization-tools contingency-tools divergence-prevention

      You will be prompted to specify the update interval and the expected velocity range and turbulent viscosity ratio limit.

    • You can enable a customized slope limiter function specifically designed for the stabilization tools using the following text command. It is important to note that using this option may lead to additional computational cost, as it enforces the limiting procedure more restrictively; therefore, it is only recommended when none of the available modes and none of the previous contingency tools are sufficient for improving solver stability.

      solve set stabilization-tools contingency-tools enhanced-limiter?

    • You can delete invalid cells from the domain using the following text command. Erroneous cells are automatically identified in the domain and these cells are permanently deleted from the solution; symmetric boundaries are applied to the surrounding interface between the deleted region and the actively solved cells. Note that it is recommended that this tool is only used if the previous contingency tools were not sufficiently effective.

      solve set stabilization-tools contingency-tools delete-invalid-cells

20.19.1. Diagnostic Tools

Diagnostic tools are available that allow you to inspect the mesh and solver settings in detail. Additionally, they allow you to visualize the cells and faces identified by solver stabilization tools. Note that the diagnostics tools are intended to be used before running a calculation.

20.19.1.1. Using the Inspector

The “inspector” allows you to inspect the mesh and solver settings in an automated way with minimum effort, and can generate an inspection report that identifies poor-quality cells using various mesh metric qualities (which can be helpful information to share with your Ansys Fluent support engineer). The inspection report can summarize the mesh and case settings in several tables, and the amount of the generated information depends on the selected inspection type.

To use the inspector, perform the following steps:

  1. Enable the basic stabilization settings, as described in Stabilization Tools for the Pressure-Based Solver.

  2. Enable access to inspector diagnostics using the following text command:

    solve set stabilization-tools diagnostics-tools inspector enable?

  3. Select the type of inspection you want to perform using the following text command:

    solve set stabilization-tools diagnostics-tools inspector inspector-type

    You will be prompted to select a type from the following:

    • Manual-inspection (0)

      This type does not generate an inspection report, but when selected the following are available for postprocessing in the Diagnostic... category:

      • Mesh Binary Index

        Cells with a Mesh Binary Index value of 0 are unacceptable, and must be addressed; those with a value of 1 are acceptable.

      • Mesh Quality Score

        This provides a score that evaluates the mesh at each cell, ranging from 0 to 100:

        Table 20.1:

        Mesh Quality ScoreEvaluation
        <15unacceptable
        15–60highly undesirable
        60–75needs attention
        75–90acceptable
        >90good

    • Grid-inspection (1)

      This type generates an inspection report, and is recommended prior to initialization. It ignores possible issues related to non-conformal interfaces and overset boundaries (if they are not intersected), and it only provides limited information for immediate actions and mesh quality improvement. It also provides the postprocessing field variables described previously for the manual-inspection.

    • Case-inspection (2)

      This type generates an inspection report, is only available after initialization, and should be used prior to calculation. It is highly recommended, as it provides important information about case settings and mesh quality (including warnings and errors). It considers non-conformal interfaces and sliding children in the mesh quality evaluations, and creates a cell register named inspector_anomalous_identifier that marks all of the cells that are determined to be of poor quality. It also provides the postprocessing field variables described previously for the manual-inspection

    If you select grid-inspection or case-inspection, you will also be prompted to specify whether you want to perform a full inspection. A full inspection includes additional statistical information (such as 25th- and 75th-percentile, median, skewness, and kurtosis) to the reports. It also includes cell tangent skewness, cell volume ratio, face area ratio, and face distance ratio metrics in the analysis. A full inspection is not recommended when the mesh is very large (as it makes inspection procedure to be much more costly), or when a previous inspection has already identified several poor-quality cells.

  4. (Optional) When using the case-inspection, the cell register that is generated is mainly designed for identifying poor-quality cells before running a calculation. Therefore, by default its information won’t be maintained or updated after the calculation begins. If you want to maintain the cell register information, you must enable the following text command. Note that enabling this increases the computation cost and memory usage.

    solve set stabilization-tools diagnostics-tools inspector retain-outlier?

  5. (Optional) By default, inspection reports are only printed in the console. If you want to also write them to a file, you can enable the following text command:

    solve set stabilization-tools diagnostics-tools inspector write?

  6. If you selected the grid-inspection or case-inspection, perform the inspection and generate the inspection report using the following text command:

    solve set stabilization-tools diagnostics-tools inspector inspection

    The inspection report will be printed in the console and (if enabled) written to a file.

  7. If you are done using the inspector and do not want to use stabilization tools for stability purposes when running the calculation, you can now disable stabilization tools using the following text command:

    solve set stabilization-tools enable?

20.19.1.2. Visualizing the Diagnostics

You can visualize the mesh entities identified by the stabilization tools and use auxiliary tools for manual inspection of the mesh quality. To visualize the diagnostics, perform the following steps:

  1. Enable the basic stabilization settings and select a stabilization mode, as described in Stabilization Tools for the Pressure-Based Solver.

  2. Enable the visualization of diagnostics using the following text command:

    solve set stabilization-tools diagnostics-tools diagnostics-visualization

    If you enter yes to the first prompt (Enable diagnostics visualization?), the visualization of diagnostic field variables generated as part of a stabilization mode is enabled, and you will be given the option to enable the visualization of additional field variables related to mesh quality through a second prompt (Enable auxiliary grid metric qualities?). The field variables associated with these prompts are described in a later step.

  3. Initialize the solution.

  4. Postprocess the diagnostic field variables under the Diagnostic... category. For example, you could display contours of the field variables using the Contours dialog box. The field variables that are available depend on your entries for the solve/set/stabilization-tools/diagnostics-tools/diagnostics-visualization text command:

    • If you entered yes to the Enable diagnostics visualization? prompt, the following are available in the Diagnostic... category:

      • Stabilized Cells

        Cells with a Stabilized Cells value of 1 participated in the stabilization process and those that have value of 0 are not modified.

      • Stabilized Faces

        Cells with a Stabilized Faces value of 1 have at least one face that is modified by the stabilization mode; those that have a value of 0 have no modified faces.

      The previous field variables can provide a general idea of where problematic areas are located. To get an exact count of the modified cells and faces, you can generate a report file or a report plot of the following report definitions (which are automatically created): num-stabilized-cells and num-stabilized-faces.

    • If you entered yes to the Enable auxiliary grid metric qualities? prompt, the following are available in the Diagnostic... category:

      • Orthogonal Quality

      • Face Tangent Skewness

      • Cell Tangent Skewness

      • Cell Non-Orthogonality Angle

      • Face Non-Orthogonality Angle

      • Face Warpage Angle

      • Cell Volume Ratio

      • Face Area Ratio

      • Cell Distance Ratio

      • Face Distance Ratio

      • Cell Aspect Ratio