36.21. Convergence and Stability

Convergence can be hindered by a number of factors. Large numbers of computational cells, overly conservative under-relaxation factors, and complex flow physics are often the main causes. Sometimes it is difficult to know whether you have a converged solution. In the following sections, some of the numerical controls and modeling techniques that can be exercised to enhance convergence and maintain stability are examined.

You should also refer to Choosing the Spatial Discretization Scheme and Choosing the Pressure-Velocity Coupling Method for information about how the choice of discretization scheme or (for the pressure-based solver) pressure-velocity coupling scheme can affect convergence. Manipulation of under-relaxation parameters and multigrid settings to enhance convergence is discussed in Setting Under-Relaxation Factors and Modifying Algebraic Multigrid Parameters.

36.21.1. Judging Convergence

There are no universal metrics for judging convergence. Residual definitions that are useful for one class of problem are sometimes misleading for other classes of problems. Therefore it is a good idea to judge convergence not only by examining residual levels, but also by monitoring relevant integrated quantities such as drag or heat transfer coefficient.

For many problems, the default convergence criterion in Ansys Fluent is sufficient. This criterion requires that the globally scaled residuals, defined by Equation 36–28, Equation 36–32, or Equation 36–35 decrease to for all equations except the energy and P-1 equations, for which the criterion is .

Sometimes, however, this criterion may not be appropriate. For example:

  • Because the continuity residual is scaled by its behavior during the first five iterations, the continuity residual level is initial guess-dependent and startup-dependent. A better initial guess may lead to a higher continuity residual, which is counterintuitive for judging convergence.

  • Because the global scale factors depend on the solution level, sometimes the residuals are significantly below the default convergence target even when the solution is still changing. This behavior occurs most frequently with the energy equation.

  • For some equations, such as for turbulence quantities, a poor initial guess may result in high scale factors. In such cases, scaled residuals will start low, increase as nonlinear sources build up, and eventually decrease. It is therefore good practice to judge convergence not just from the value of the residual itself, but from its behavior. You should ensure that the residual continues to decrease (or remain low) for several iterations (say 50 or more) before concluding that the solution has converged.

When issues like the above arise, you should consider using locally scaled residuals defined by Equation 36–29, Equation 36–31, or Equation 36–36, which have a default convergence criterion for all equations of 10-5 and 10-4 for steady-state flows and transient flows, respectively. Experience suggests that locally scaled residuals may be more universal for the purposes of judging convergence than globally scaled residuals. Note that you may want to adjust the convergence criterion from the default value for the locally scaled continuity residual based on your specific application.

Another popular approach to judging convergence is to require that the unscaled residuals drop by three orders of magnitude. Ansys Fluent provides residual normalization for this purpose, as discussed in Definition of Residuals for the Pressure-Based Solver, where residuals are defined for both the pressure-based solver and the density-based solver. In this approach the convergence criterion is that the normalized unscaled residuals should drop to . However, this requirement may not be appropriate in many cases:

  • If you have provided a very good initial guess, the residuals may not drop three orders of magnitude. In a nearly-isothermal flow, for example, energy residuals may not drop three orders if the initial guess of temperature is very close to the final solution.

  • If the governing equation contains nonlinear source terms which are zero at the beginning of the calculation and build up slowly during computation, the residuals may not drop three orders of magnitude. In the case of natural convection in an enclosure, for example, initial momentum residuals may be very close to zero because the initial uniform temperature guess does not generate buoyancy. In such a case, the initial nearly-zero residual is not a good scale for the residual.

  • If the variable of interest is nearly zero everywhere, the residuals may not drop three orders of magnitude. In fully-developed flow in a pipe, for example, the cross-sectional velocities are zero. If these velocities have been initialized to zero, initial (and final) residuals are both close to zero, and a three-order drop cannot be expected.

Regardless of the residual scaling method, it is wise to monitor important solution quantities, such as drag or overall heat transfer coefficient, before concluding that the solution has converged.

Conversely, it is possible that if the initial guess is very bad, the initial residuals are so large that a three-order drop in residual does not guarantee convergence. This is specially true for and equations where good initial guesses are difficult. Here again it is useful to examine overall integrated quantities that you are particularly interested in. If the solution is unconverged, you may drop the convergence tolerance, as described in Modifying Convergence Criteria.

36.21.2. Step-by-Step Solution Processes

One important technique for speeding convergence for complex problems is to tackle the problem one step at a time. When modeling a problem with heat transfer, you can begin with the calculation of the isothermal flow. To solve turbulent flow, you might start with the calculation of laminar flow. When modeling a reacting flow, you can begin by computing a partially converged solution to the non-reacting flow, possibly including the species mixing. When modeling a discrete phase, such as fuel evaporating from droplets, it is a good idea to solve the gas-phase flow field first. Such solutions generally serve as a good starting point for the calculation of the more complex problems. These step-by-step techniques involve using the Solution Controls Task Page to turn equations on and off in the Equations dialog box.

36.21.2.1. Selecting a Subset of the Solution Equations

Ansys Fluent automatically solves each equation that is turned on using the Models family of dialog boxes. If you specify in the Viscous Model Dialog Box that the flow is turbulent, equations for conservation of turbulence quantities are turned on. If you specify in the Energy Dialog Box that Ansys Fluent should enable energy, the energy equation is enabled. Convergence can be sped up by focusing the computational effort on the equations of primary importance. The Equations list in the Equations Dialog Box allows you to turn individual equations on or off temporarily.

  Solution Controls   Equations...

A typical example is the computation of a flow with heat transfer. Initially, you will define the full problem scope, including the thermal boundary conditions and temperature-dependent flow properties. Following the problem setup, you will use the Equations dialog box to temporarily turn off the energy equation. You can then compute an isothermal flow field, remembering to set a reasonable initial value for the temperature of the fluid.


Important:  This is possible only for the pressure-based solver; the density-based solver solves the energy equation together with the flow equations in a coupled manner, so you cannot turn off the energy equation as described above.


When the isothermal flow is reasonably well converged, you can turn the energy equation back on. You can actually turn off the momentum and continuity equations while the initial energy field is being computed. When the energy field begins to converge well, you can turn the momentum and continuity equations back on so that the flow pattern can adjust to the new temperature field. The temperature will couple back into the flow solution by its impact on fluid properties such as density and viscosity. The temperature field will have no effect on the flow field if the fluid properties (for example, density, viscosity) do not vary with temperature. In such cases, you can compute the energy field without turning the flow equations back on again.


Important:  If you have specified temperature-dependent flow properties, you should be sure that a realistic value has been set for temperature throughout the domain before disabling calculation of the energy equation. If an unrealistic temperature value is used, the flow properties dependent on temperature will also be unrealistic, and the flow field will be adversely affected. Instructions for initializing the temperature field or patching a temperature field onto an existing solution are provided in Initializing the Solution.


36.21.2.2. Turning Reactions On and Off

To solve a species mixing problem prior to solving a reacting flow, you should set up the problem including all of the reaction information, and save the complete case file. To turn off the reaction so that only the species mixing problem can be solved, you can use the Species Model Dialog Box to turn off the Volumetric option under Reactions.

  Setup   Models   Species Edit...

Once the species mixing problem has partially converged, you can return to the Species Model dialog box and turn the Volumetric Reactions option on again. You can then resume the calculation starting from the partially converged data.

For combustion problems you may want to patch a hot temperature in the vicinity of the anticipated reactions before you restart the calculation. See Patching Values in Selected Cells for information about patching an initial value for a flow variable.

36.21.3. Modifying Algebraic Multigrid Parameters

The default algebraic multigrid settings are appropriate for nearly all problems, but in rare cases you may need to make minor adjustments. Setting Algebraic Multigrid Parameters describes how to analyze the multigrid solver’s performance to determine which parameters.

36.21.4. Modifying the Multi-Stage Parameters

It is possible to make several changes to the multi-stage time-stepping scheme itself. See Changing the Multi-Stage Scheme for detailed information.

36.21.5. Robustness with Meshes of Poor Quality

Poor quality meshes are meshes containing highly skewed cells, highly non-orthogonal cells, non-convex cells, or cells with left-handed faces. Such mesh elements tend to decrease the numerical stability of traditional CFD discretization algorithms. These mesh elements require special treatment, namely, a numerical correction of the transport equation discretization, which is intended to improve the numerical properties of the solution algorithms at mesh cells of poor quality. This correction is referred to as "poor mesh numerics", and it is enabled by default so that it is applied to cells with an orthogonal quality of 0.


Note:  If your mesh exhibits any type of poor quality except left-handed faces, you can maintain second order accuracy by using the warped-face gradient correction and disabling poor mesh numerics. To disable poor mesh numerics, set solve/set/poor-mesh-numerics/enable? to no. For additional information on this method, see Warped-Face Gradient Correction.


If you read in a poor quality mesh containing cells and faces with corrupt metrics, you will see a warning in the console of the following form:

Info: The mesh contains elements that are invalid or of poor quality.
      A different numerical scheme will be applied to these elements,
      which may affect the quality of the solution. It is recommended
      that you consider removing the invalid and poor quality elements
      in the mesh.
      For more information on the invalid and poor quality elements,
      please use the following TUI commands:
      /mesh/check
      /mesh/repair-improve/report-poor-elements.

For details on the tools available for investigating corrupt cells and faces and repairing them, see Repairing Meshes. For the poor quality cells that cannot be repaired, you can rely on the application of poor mesh numerics to allow you to proceed.

The local solution correction applied by poor mesh numerics can be of 0th, 1st, or 2nd order:

  • The 0th order scheme applies an algorithm that computes the solution variable for the transport equation in the bad cells by assembling the solution directly from the surrounding solution in the better quality cells.

  • The 1st order scheme applies locally low order discretization methods and neglects some non-orthogonal contributions to the gradients when computing the diffusive fluxes. This scheme is selected by default.

  • The 2nd order scheme only modifies the numerics in the bad cells by assembling the gradient vector for the given solution variable from the gradients in the surrounding better quality cells.

In other words, the discretization error will be independent of the mesh size in this region if 0th order is used. It will decrease linearly with subsequent grid refinement when 1st order is used, and quadratically when the 2nd order option is selected.

It is strongly recommended that you use the default 1st order solution correction, which provides a reasonable compromise between accuracy and stability gain. When only a few cells are invalid, you can attempt to use the other schemes: for meshes of better (and yet still low) quality, you can try the 2nd order option, which will preserve the mesh convergence behavior provided by the convection term discretization schemes; if no convergence is obtained with any of the aforementioned schemes, you can try the 0th order option, which will provide the highest stability and at the same time the lowest accuracy. Note that in regions with highly nonlinear flow physics, the 0th order scheme can yield highly nonphysical results. To change the order scheme, use the prompt in the following text command: solve/set/poor-mesh-numerics/enable?.

The three solution correction schemes should be applied to only a small percentage of the mesh cells, in order to strike a balance between the robustness of the solution and solution efficiency. The computational time (or cost or run time requirements) for all three order schemes will increase linearly as the number of cells identified as poor quality cells increases. Provided that there is reasonable convergence behavior with all three schemes, the 1st order option will be the fastest; 0th and 2nd order schemes will have similar run times to each other. If a large percentage of the cells are marked for correction due to poor quality metrics, then it is highly recommended that you abandon the mesh for one with better quality metrics.

If the default poor mesh numerics settings are not sufficient to provide stability for your mesh, you can enable the following text command so that the cell centroids of poor cells are relocated with the goal of enhancing the orthogonality metrics: solve/set/poor-mesh-numerics/orthogonality-enhancing-cell-centroids?. This can be used with all mesh types, and is applied to cells when the criterion value is equal to or less than a threshold value defined as part of the text command. Increasing the threshold for the orthogonal quality can increase solver robustness, but at the cost of reduced solution accuracy. Note that the enhanced metrics are only apparent when reporting the quality in the solution mode of Fluent, and not in the meshing mode.

If you continue to have stability problems, you can increase the range of cells to which the poor mesh numerics correction is applied. As stated previously, when the solve/set/poor-mesh-numerics/enable? text command is enabled, only cells with an orthogonal quality of 0 are corrected by default; this is a conservative setting, and can be changed by enabling the following text commands:

solve/set/poor-mesh-numerics/cell-quality-based?

This ensures that the correction is applied to cells with an orthogonal quality of 0.05 or less, and you can further adjust this threshold by using the following text command: solve/set/poor-mesh-numerics/set-quality-threshold.

solve/set/poor-mesh-numerics/gradient-quality-based?

This ensures that poor cells are detected and treated using a criterion based on the cell gradient quality. Poor mesh numerics are applied when the criterion value is equal to or less than a threshold value defined as part of this text command. This text command is only available with the pressure-based solver, and is not supported for cases that have periodic boundaries. Note that after initialization, you can postprocess this criterion using the Gradient Quality Measure field variable (in the Mesh... category); poor cells have a value closer to 0, whereas good cells have a value closer to 1. When displaying contours, it is recommended that you enable the Filled option and disable the Node Values option, since this measure is calculated at the cell centers.

solve/set/poor-mesh-numerics/solution-and-quality-based?

This ensures that poor cells are detected and treated using a criterion based on the solution and cell quality. Poor mesh numerics are applied when the criterion value is equal to or less than a threshold value defined as part of this text command, and at a specified frequency (of iterations or time steps). This text command is only available with the pressure-based solver. Note that after you have run an iteration, you can postprocess the cells marked by this criterion using the Solution and Cell Quality Measure field variable (in the Mesh... category); cells with a criterion value below the threshold (that is, poor cells) and their neighboring cells are assigned a value of 1, whereas all other cells (that is, good cells) are assigned a value of 0. When displaying contours, it is recommended that you enable the Filled option and disable the Node Values option, since this measure is calculated at the cell centers.

solve/set/poor-mesh-numerics/register-based/

This menu provides text commands that allow you to specify that poor mesh numerics are applied to cells in specified cell registers. The cell registers can be marked manually at the start of the calculation and/or automatically at a specified interval during the calculation. The automatic marking can be useful if the mesh will be changing during the solution (for example, due to mesh manipulation or adaption). For manual or automatic marking, you must enter new in this menu, and after you provide a name for the definition you can define the following settings:

  • register

    This allows you to specify the name of the cell register used to mark the cells for poor mesh numerics treatment. For more information about cell registers, see Using Cell Registers.

  • frequency/

    Using the text commands in this menu, you can define when the cells of the register are marked. Using the option text command, you can specify that the cells are marked either manually at the start of the calculation (single-execution), or automatically at an interval of iterations or (for transient simulations) time-steps. For automatic marking, after you set the option you must then define the interval value using the iterations or time-steps text command. By default, the marking occurs automatically at every iteration.

  • active?

    This allows you to activate or deactivate the marking of cells from the register for poor mesh numerics treatment. It is active by default.

  • verbosity

    This determines the level of detail about cell marking for register-based poor mesh numerics printed in the console during the calculation. The default value of 0 prints no information, whereas entering 1 results in information being printed about the number of cells that are marked.

After you have set up the register-based definition you can use the new text command again to create additional definitions, and/or use the following from the solve/set/poor-mesh-numerics/register-based/ text command menu:

  • edit

    This allows you to edit a register-based definition for poor mesh numerics, using the same text commands available from the new text command.

  • delete

    This allows you to delete a register-based definition for poor mesh numerics.

  • list

    This prints the names of the register-based definitions for poor mesh numerics in the console.

  • list-properties

    This allows you to print the settings for a register-based definition for poor mesh numerics in the console.


Important:  When manually marking cells in a register for poor mesh numerics treatment (using the single-execution option), it is your responsibility to maintain the register-based cells. If you change the mesh, (for example, using mesh manipulation or adaption), then you must use the active? text command repeatedly to update the marking: enter no to deactivate it, and then enter yes to activate it and mark the cells in the updated register.


When you initialize or read data for a case with non-premixed or partially premixed combustion, a register-based definition for poor mesh numerics named pmn_pdf_stability_marker is automatically created. This definition is deactivated by default; if activated, it may increase the robustness of combustion simulations that use a PDF table. For further details, see Enabling Robust Numerics for Combustion with a PDF Table.

Note that when using register-based definitions for poor mesh numerics, the reporting of poor mesh element statistics (using the mesh/repair-improve/report-poor-elements text command) will also include the cells added from the registers, as well as their neighboring cells, resulting in an overall larger number of cells being identified. For example:

Poor Mesh Element Statistics:
Identified    0 faces with too small area.
Identified    0 faces adjacent to negative volume cells.
Identified    0 faces adjacent to bad quality cells.
Identified   43 cells from register-based poor mesh numerics and neighbors.

There are additional text commands that can be useful when applying poor mesh numerics, which are defined as follows:

solve/set/poor-mesh-numerics/print-poor-elements-count

Print out a listing of the number of poor cells marked for each criterion: default, cell quality, and register-based, and (if enabled) cell gradient quality and solution and cell quality.

> solve/set/poor-mesh-numerics/print-poor-elements-count
- Number of marked cells based on default criterion  = 5
- Number of marked cells based on cell quality criterion  = 11
- Number of marked cells based on register-based criterion and neighbors  = 0
- Number of marked cells based on cell gradient quality criterion  = 0
- Number of marked cells based on solution and cell quality criterion  = 0
solve/set/poor-mesh-numerics/reset-poor-elements?

Reset the poor cells included by the default, cell quality, register-based, cell gradient quality, and solution and cell quality criteria. The poor cells identified from the internal mesh check will be retained.

solve/set/poor-mesh-numerics/turbulence-production-term?

Enables a specific poor mesh numerics treatment for turbulence models. The shear production term is approximated by the destruction term in order to avoid zero turbulence shear production and thus improve the behavior on poor mesh cells. This treatment is available for the following two-equation turbulence models:

  • Standard, RNG, and Realizable k-ε models (also DES with Realizable k-ε)

  • Standard k-ω, BSL, SST, and GEKO (also in combination with SAS, DES, SBES, and also algebraic and one-equation transition models if available)

  • Transition SST

36.21.6. Warped-Face Gradient Correction

The warped-face gradient correction (WFGC) is designed to improve gradient accuracy for all gradient methods—cell based, node based and least squares based gradients. WFGC is recommended for 3D simulations on polyhedral, hexahedral, and hybrid meshes (meshes containing a mix of hexahedral and polyhedral cells), and it is enabled by default when you read a mesh that contains polyhedra (note that if you append a mesh that contains polyhedra to a mesh that doesn't, you would have to enable WFGC manually in the Solution Methods task page if you want to use it). Note that these types of mesh cells may not have perfectly planar faces, which can affect the overall accuracy of the Green Gauss surface integral. WFGC is also recommended when you encounter numerical difficulties in simulations that involve a mesh that has large differences in the volumes of neighboring cells, such as hex cells with hanging node interfaces.

WFGC computations aim to resolve gradient accuracy degradation due to very high aspect ratio, cells with non-flat faces in the boundary layer, and highly deformed cells where the formal cell centroid lies outside of the control volume.

WFGC has two modes, fast mode and memory saving mode. Fast mode does not increase gradient computation time for static meshes (except for cases that use the Green-Gauss Node Based gradient method with a turbulence model), but it does require additional memory. There is roughly a 22% increase in memory for a basic flow solution, but this additional overhead does not change as more models (turbulence, species transport, radiation, and so on) are enabled. Memory saving mode does not increase memory consumption, but it slows down iteration execution time for static and dynamic meshes.


Important:  Enabling Warped-Face Gradient Correction through the Solution Methods task page enables fast mode. To switch to memory saving mode, you must use the TUI command solve/set/warped-face-gradient-correction/enable? and enter no in response to the use fast mode? prompt.

WFGC does not correct for cells with left-handed faces. If your mesh contains left-handed faces, you must use poor mesh numerics to obtain a stable solution.


36.21.7. Numerical Noise Filter for the Energy Equation

Numerical noise can arise in the energy solution field when there are large variations in properties at certain locations, such as the heat capacity at coupled walls or the combustion variables in cases with phase change. With the use of high-order discretization, the numerical noise remains in the solution fields, which contaminates the solution and may lead to divergence. An energy equation numerical noise filter is available for the pressure-based solver, which aims to remove the numerical noise from the domain by applying a mathematical extrema condition in the numerical noise region. This process slightly reduces accuracy in those regions, but increases the robustness of the calculation. The numerical noise filter is not applied after the numerical noise is removed from the region, in order to regain high-order accuracy. To enable / disable the energy equation numerical noise filter, use the following text command:

solve set advanced energy-numerical-noise-filter

Note that the energy equation numerical noise filter is not enabled by default. For problematic cases where the energy equation diverges or generates non-physical results, it is recommended that you use this filter from the start of the simulation, rather than from intermediate data where the solution already has symptoms of divergence.