NavierStokesSolver#
absolute_tolerance#
The absolute_tolerance is the primary convergence metric for steady cases. At least 5 orders of magnitude reduction is recommended for all residual values. The absolute_tolerance can also be used for unsteady cases, but is less meaningful than the relative_tolerance, as the initial residual values change between different physical steps.
relative_tolerance#
The relative residual is defined as the ratio of the current pseudoStep’s residual to the maximum residual present in the first 10 pseudoSteps within the current physicalStep. When running unsteady cases, the relative_tolerance is typically set to 1e-2 or 1e-3. Once the nonlinear residuals drop by 2 or 3 orders of magnitude, the solver will continue to the next physicalStep. The relative_tolerance is ignored for steady cases.
kappa_MUSCL#
The default value of -1 leads to a second-order upwind scheme, which is the most stable. A value of 0.33 leads to a blended upwind/central scheme, which is recommended for low subsonic flows to reduce dissipation. Values greater than 0.33 are not recommended and a value of 1 leads to an unstable scheme.
order_of_accuracy#
The order_of_accuracy determines whether the solver will use 1st or 2nd order spatial discretization. The 1st order solver is faster, cheaper and most importantly, it is more dissipative, making it less likely to diverge. However, such numerical dissipation may also significantly impact the accuracy of the solution.
When initializing the flow field for unsteady cases with rotating components, such as simulating a rotor enclosed in a sliding interface, the user may need to run the 1st-order solver for around 1 or 2 revolutions. Once the flow field has been initialized, the user can fork the first-order case and switch order_of_accuracy from 1 to 2 for the child cases.
While adjusting the order_of_accuracy for the NavierStokesSolver, the TurbulenceModelSolver should also be adjusted.
The recommended time_stepping is slightly different for the 1st and 2nd order cases. For more details, see Rotational Angle per Step, maxPseudoSteps and CFL
Limiters#
If the case is transonic or supersonic, the user should set limit_velocity and limit_pressure_density as TRUE in the NavierStokesSolver class.
linear_solver#
linear_solver controls the configuration for the linear solver. It includes information max_iterations which specifies the number of linear iteration performed in each pseudo-step. Typically, max_iterations is set to 25~35 for the NS solver. The user might need to increase it to 50-55 if the linear residual reduction ratio after linear solver is not enough. The default max_iterations for NS solver is 30.
Two linear solver types are available for the NavierStokesSolver:
LinearSolver(default): standard iterative linear solver.KrylovLinearSolver: Krylov iterative solver, available for steady simulations only.
KrylovLinearSolver#
The KrylovLinearSolver replaces the standard LinearSolver with a Krylov method that offers improved convergence speed and reduced iteration counts for steady-state simulations. When the Krylov solver is selected, two additional features are automatically enabled:
Enhanced adaptive CFL: An adaptive CFL strategy based on nonlinear residual convergence is used, allowing the CFL to reach significantly higher values (up to ~10,000 for steady cases). The increased CFL makes each pseudo-step more effective at reducing residuals.
Automatic evaluation frequency adjustment: The Navier-Stokes equation and Jacobian evaluation frequencies are automatically set to 6, while the turbulence model equation and Jacobian update frequencies are set to 1. This results in 6 turbulence updates per Navier-Stokes update, helping both equation systems converge at a similar rate. The pseudo-step count reported by the solver corresponds to Navier-Stokes steps.
Parameters:
max_iterations: Number of the Krylov iterations used per pseudo-step. Default:15. Range:1–50. Start with the default and reduce for better performance if the case converges well, or increase if convergence is slow.max_preconditioner_iterations: Number of preconditioner iterations applied during each Krylov iteration. Default:25. Values between10–35are typically effective. Try increasing this value before increasingmax_iterationsif convergence is insufficient.relative_tolerance: Target relative convergence tolerance for the linear system. Default:0.05. The adaptive CFL strategy uses this tolerance to decide when to increase or limit the CFL — setting it too low may prevent CFL from ramping up effectively. For low Mach number cases, values as low as1e-3may be needed for good convergence.
Restrictions:
Warning
The KrylovLinearSolver is subject to the following restrictions:
Steady simulations only. It cannot be used with
Unsteadytime stepping.Incompatible with velocity limiters.
limit_velocitymust beFalse.Incompatible with pressure/density limiters.
limit_pressure_densitymust beFalse.Kappa MUSCL = 0.33 may cause convergence stalling. If residuals stall at final convergence levels, try
kappa_MUSCLvalues of0or-0.33instead.
Note
The low-dissipation scheme, MUSCL reconstruction, and low Mach preconditioner are all compatible with the Krylov solver.
line_search#
When using the KrylovLinearSolver, LineSearch can be configured via the line_search field. The line search improves robustness by monitoring nonlinear residual growth between pseudo-steps and scaling back update steps that would cause non-physical or excessive residual increases.
The line search is coupled with the adaptive CFL strategy: the CFL is only increased when full steps are accepted, and is decreased when steps need to be scaled back. This coupling helps maintain stable convergence throughout the simulation.
LineSearch parameters:
residual_growth_threshold: Pseudotime nonlinear residual norm convergence ratio above which residual norm increase is allowed. Default:0.85. Range:0.5–1.0.max_residual_growth: Hard cap on the residual norm ratio — never allow the residual norm to grow beyond this factor over a single pseudotime step. Default:1.1. Must be ≥1.0.activation_step: Pseudotime step threshold before themax_residual_growthlimit is activated. Default:100.
Note
LineSearch can only be set when the linear_solver is a KrylovLinearSolver.
Krylov Solver Recommendations#
The following recommendations are provided for tuning the Krylov solver:
Start with defaults: Begin with the default settings (
max_iterations= 15,max_preconditioner_iterations= 25,relative_tolerance= 0.05).Improving convergence: If convergence is slow, first try increasing
max_preconditioner_iterations(values between 10–35 are typically effective). If that is insufficient, increasemax_iterations.Improving performance: If the case converges well, try reducing
max_iterationsto reduce time per pseudo-step.Low Mach number flows: Cases with low Mach numbers may require a tighter
relative_tolerance. Try reducing it to values as low as1e-3if convergence is difficult.Kappa MUSCL: Setting
kappa_MUSCLto0.33has been observed to cause residual stalling at final convergence levels when using the Krylov solver. If this occurs, try values of0or-0.33instead.Line search: If the CFL is not increasing, try increasing the
residual_growth_threshold(e.g., from0.85toward1.0) to allow more residual growth per step. If residuals stall, oscillate, or the CFL grows large without making progress, reduce the threshold to enforce stricter convergence per step.Turbulence solver interaction: Because the Krylov solver significantly reduces the number of Navier-Stokes pseudo-steps needed, the turbulence equations can become the limiting factor for overall convergence. The automatic evaluation frequency adjustment (6 turbulence updates per Navier-Stokes update) addresses this, but if the turbulence solver stalls, it may limit overall convergence. Monitoring both Navier-Stokes and turbulence residuals is recommended.
update_jacobian_frequency#
The default value for update_jacobian_frequency is 4, which means that the Jacobian for evaluating the NS equation is updated every 4 pseudo-steps. For some challenging cases, reducing update_jacobian_frequency from 4 to 1 may help, however, this may slow the NS solver by up to approximately 30%.
Note
When using the KrylovLinearSolver, the Navier-Stokes Jacobian update frequency is automatically set to 6, and the turbulence model Jacobian update frequency is set to 1. These values are managed by the solver and do not need to be configured manually.
equation_evaluation_frequency#
The default value for equation_evaluation_frequency is 1, which means that the Navier-Stokes solution is updated every pseudo-step. For loosely-coupled simulations, the equation_evaluation_frequency value can be changed to introduce a solution update at a different frequency than the turbulence/transition model solvers. The recommended value for this parameter is 1 for a large majority of simulations.
Note
When using the KrylovLinearSolver, the Navier-Stokes equation evaluation frequency is automatically set to 6, while the turbulence model equation evaluation frequency is set to 1. This results in 6 turbulence updates per Navier-Stokes update, helping both equation systems converge at a similar rate. These values are managed by the solver and do not need to be configured manually.
numerical_dissipation_factor#
The low-dissipation Roe scheme in Flow360 is a modification of the Roe scheme designed to address low Mach number problems and achieve reduced numerical dissipation in the range of higher-resolved wave numbers.
For steady simulations with the low-dissipation scheme, it is strongly recommend NOT to use Ramp CFL and use adaptive CFL instead due to divergence issue. For flow conditions with low Mach numbers and low Reynolds numbers, it is more effective.
The low-dissipation parameter determines the reduction in numerical flux dissipation. The recommended value for this parameter is 0.2. However, to achieve better convergence, a value of 0.5 can be used.
The solver setup parameters for the low-dissipation feature are described below.
Solver setup recommendation for the low-dissipation scheme#
The following recommendations are provided to assist in running simulations with the low-dissipation scheme:
It is recommended to first run a steady or unsteady simulation, and from that solution, start a simulation with the low-dissipation scheme.
It is recommended to achieve a two-order-of-magnitude reduction in nonlinear residuals and keep the linear residual below 5 when running a simulation with the low-dissipation scheme. To achieve this, the
step_sizecan be halved. Additionally, it is advisable to slightly increase theUnsteady.max_pseudo_steps/Steady.max_steps, andmax_iterationsparameter in thelinear_solver.Since the low-dissipation scheme contributes to high-fidelity simulation, it is recommended to use a second-order spatial discretization with the low-dissipation scheme by setting the
order_of_accuracyto 2 for both the Navier-Stokes and turbulence solvers. Alternatively, the first-order option can be used to initially march in time and space and create a well-developed initial solution before switching to the second-order scheme. This is beneficial when the flow field needs to be fully developed throughout the domain in an unsteady simulation.To achieve accuracy between 2nd and 3rd order in the solution, it is recommended to use a value of 1/3 for
kappa_MUSCLwith the low-dissipation scheme.In the case of poor convergence, the
numerical_dissipation_factorcan be increased to 0.5 or a value higher than that. Additionally, when facing such issues, setting thekappa_MUSCLparameter to -1 may also be helpful.It is recommended to use a value of 1 for the
update_jacobian_frequencywith the low-dissipation scheme.For CFL ramping when using the low-dissipation scheme, it is recommended to set a high value (such as 1e+5) for the CFL number and set the
ramp_stepsto 1. Both the initial and final CFL values can be set to the same number to keep the CFL number fixed. By using a high fixed CFL number and a smallstep_size, the required values formax_pseudo_stepsandmax_iterationscan be reduced to meet the convergence criteria.In the case of divergence, it is recommended to reduce the
step_sizeby half until the divergence issue is resolved.