Navier-Stokes solver#
The Navier-Stokes solver controls the compressible flow equations in Flow360. It determines how the simulation solves for fluid velocity, pressure, and density throughout the domain. Proper configuration of these parameters is essential for achieving accurate and converged solutions.
Available Parameters#
Parameter |
Description |
|---|---|
Absolute tolerance |
Convergence criteria for NS residual |
Relative tolerance |
Relative residual reduction for unsteady cases |
Kappa MUSCL |
Parameter controlling the upwind/downwind/central scheme influence |
Order of accuracy |
Spatial discretization order (1st or 2nd) |
Equation evaluation frequency |
Frequency of solving equations |
Linear solver - max iterations |
Maximum iterations for linear solver |
CFL multiplier |
Factor applied to CFL specified in Time Stepping |
Numerical dissipation factor |
Controls dissipation |
Limit velocity |
Whether to apply limiters to velocity |
Limit pressure density |
Whether to apply limiters to pressure/density |
Low Mach preconditioner |
Acceleration technique for low Mach flows |
Low Mach preconditioner threshold |
Minimum Mach number for preconditioner scaling |
Update Jacobian frequency |
How often to update the Jacobian matrix |
Max force jacobian update physical steps |
Controls Jacobian matrix update criteria |
Detailed Descriptions#
Absolute tolerance#
The primary convergence metric for how far to reduce the Navier-Stokes residuals.
Default:
1.0e-10Example:
1.0e-8
Notes:
For steady cases, at least 5 orders of magnitude reduction is recommended
Controls when the solver determines the solution has converged
Smaller values result in more accurate solutions but may require more iterations
Relative tolerance#
Relative residual reduction target for the Navier-Stokes equations per physical step.
Default:
0.0Example:
1e-2
Notes:
Applicable only with unsteady simulations
For unsteady cases, typically set to 1e-2
Once residuals drop by prescribed order of magnitude (0.01 means 2 orders of magnitude), solver proceeds to next physical step
Kappa MUSCL#
Controls the blending between upwind and central schemes in the spatial discretization.
Default:
-1(second-order upwind scheme)Example:
0.33(blended scheme for low dissipation)
Notes:
Range: [
-1,1] (values above0.33not recommended)
-1: Pure second-order upwind (most stable)
0.33: Blended upwind/central scheme (less dissipative, good for low subsonic flows)
1.0: Unstable full downwind scheme (avoid)
Order of accuracy#
Determines whether the solver uses 1st or 2nd order spatial discretization.
Default:
2(second order)Example:
1(first order for initialization)
Notes:
1st order: More stable but more dissipative, less accurate
2nd order: More accurate but less stable
For initial flow field development in unsteady cases with rotating components, running 1st order for 1-2 revolutions can help establish the flow before switching to 2nd order
Should match the turbulence model’s order of accuracy
Equation evaluation frequency#
Controls how often (in pseudo steps) the Navier–Stokes equations are solved.
Default:
1Example:
2–4
Notes:
1provides the most robust convergenceHigher values can reduce time cost but may slow down convergence
Linear solver - max iterations*#
Configures the maximum number of iterations solved at each pseudo-step for Navier-Stokes equations.
Default:
30Example:
50
Note:
Increasing the parameter can improve robustness at added cost per pseudo-step
CFL multiplier#
Scaling factor applied to the CFL number defined in Time Stepping.
Default:
1.0Example:
0.5(for better stability)
Notes:
Reducing this value can help stability for challenging cases
Effective CFL = Time Stepping CFL × CFL Multiplier
Numerical dissipation factor#
Factor that controls the reduction in numerical flux dissipation for the low-dissipation Roe scheme.
Default:
1.0(standard scheme)Example:
0.2(low dissipation)
Notes:
Range: [
0.01,1.0]Recommended value:
0.2for low-dissipation
Limit velocity#
Applies limiters to velocity to enhance stability in transonic/supersonic flows.
Default:
FalseExample:
True(for transonic flows)
Notes:
Enable for transonic or supersonic cases
Can help prevent divergence in regions with strong shocks
Limit pressure density#
Applies limiters to pressure and density to enhance stability in transonic/supersonic flows.
Default:
FalseExample:
True(for transonic flows)
Notes:
Enable for transonic or supersonic cases
Can help prevent negative pressures or densities near shocks
Low Mach preconditioner#
Improves solver convergence for low Mach number flows by addressing the stiffness in the equation system.
Default:
FalseExample:
True(for flows with \(M <\)0.3)
Notes:
Recommended for simulations with Mach number below
0.3Particularly beneficial for nearly incompressible flows
Can significantly accelerate convergence for low-speed aerodynamics
Low Mach preconditioner threshold#
Minimum Mach number used in the preconditioner scaling.
Default: Freestream Mach number (if not specified)
Example:
0.1
Notes:
For flow regions with Mach numbers smaller than this threshold, the threshold value is used
Only relevant when low Mach preconditioner is enabled
Update Jacobian frequency#
Controls how often the Jacobian matrix is updated during the solution process.
Default:
4(every 4 pseudo-steps)Example:
1(every pseudo-step for challenging cases)
Notes:
Smaller values improve robustness but increase computational cost
Reducing to
1may help convergence for difficult casesMay slow the solver by up to approximately 30% when set to
1
Max force jacobian update physical steps#
If the current physical step is lower than this value, jacobian matrix will be updated at every pseudo step.
Default:
0(disabled)Example:
10
Notes:
Useful for cases where more stability is needed at the beginning
💡 Tips
For steady-state simulations:
Focus on absolute tolerance for convergence criteria
Consider using low Mach preconditioner for low-speed flows
Use 2nd order accuracy for final results
For unsteady simulations:
Use relative tolerance (typically 1e-2 or 1e-3)
For cases with rotating components, consider starting with 1st order for initialization
Use AdaptiveCFL instead of ramp CFL strategy to automatically balance stability and convergence speed
For low-dissipation schemes:
Start from a converged steady or unsteady solution
Aim for at least a two-order-of-magnitude reduction in nonlinear residuals
Consider halving the time step size
Use Kappa MUSCL = 1/3 for optimal accuracy
Set update Jacobian frequency = 1 for better stability
For transonic or supersonic flows:
Enable limiters for velocity and pressure/density
Use a more dissipative scheme (Kappa MUSCL = -1)
❓ Frequently Asked Questions
When should I use 1st order vs. 2nd order accuracy?
Use 1st order for initial flow field development or for very challenging cases with strong discontinuities. Use 2nd order for final production runs to achieve accurate results. For unsteady simulations with rotating components, consider starting with 1st order for 1-2 revolutions before switching to 2nd order.
How do I know if my simulation has converged properly?
For steady simulations, look for at least 5 orders of magnitude reduction in residuals and stable force coefficients. For unsteady simulations, ensure residuals drop by 2-3 orders of magnitude within each physical time step.
What can I do if my simulation is diverging?
Try the following: (1) Use AdaptiveCFL instead of manual CFL settings to automatically adjust for stability, (2) Reduce the convergence limiting factor for complex cases with strong gradients or discontinuities, (3) Reduce the CFL number if using ramp CFL settings, (4) Switch to 1st order accuracy temporarily, (5) Enable limiters for transonic/supersonic flows, (6) Update the Jacobian more frequently (set update_jacobian_frequency = 1), (7) Check the mesh quality, particularly in high-gradient regions.
When should I use the low-dissipation scheme?
Use it for unsteady simulations where capturing fine flow structures is important, especially for aeroacoustics, turbulent flows, and vortex-dominated flows. It works best for low Mach number flows and should be started from a well-developed solution.
How does the Kappa MUSCL parameter affect my solution?
Kappa_MUSCL = -1 (default) gives a stable upwind scheme with higher numerical dissipation. Kappa MUSCL = 0.33 gives a less dissipative scheme that preserves flow features better but may be less stable. For low-speed flows without strong shocks, Kappa MUSCL = 0.33 often provides better results.
What’s the difference between absolute and relative tolerance?
absolute_tolerance is used for both steady and unsteady simulations and represents the absolute value of the residual. relative_tolerance is only used for unsteady simulations and represents how much the residual must be reduced within each physical time step relative to the initial residual of that step.
🐍 Python Example Usage
Below is a Python code example showing how to configure the Navier-Stokes solver:
import flow360 as fl
# Basic configuration for the Navier-Stokes solver
ns_solver = fl.NavierStokesSolver(
absolute_tolerance=1e-10,
order_of_accuracy=2
)
# Configuration for a low-speed simulation
ns_solver_low_mach = fl.NavierStokesSolver(
absolute_tolerance=1e-10,
low_mach_preconditioner=True,
low_mach_preconditioner_threshold=0.1,
kappa_MUSCL=0.33
)
# Configuration for an unsteady simulation with low dissipation
ns_solver_unsteady = fl.NavierStokesSolver(
absolute_tolerance=1e-10,
relative_tolerance=1e-3,
numerical_dissipation_factor=0.2,
update_jacobian_frequency=1,
linear_solver=fl.LinearSolver(max_iterations=50)
)
# Configuration for a transonic/supersonic flow
ns_solver_transonic = fl.NavierStokesSolver(
absolute_tolerance=1e-10,
limit_velocity=True,
limit_pressure_density=True,
CFL_multiplier=0.5
)