.. _knowledge_base_navierStokesSolver: :ref:`navierStokesSolver ` ========================================================= :code:`absoluteTolerance` ------------------------- The :code:`absoluteTolerance` is the primary convergence metric for steady cases. At least 5 orders of magnitude reduction is recommended for all residual values. The :code:`absoluteTolerance` can also be used for unsteady cases, but is less meaningful than the :code:`relativeTolerance`, as the initial residual values change between different physical steps. .. _relativeTolerance: :code:`relativeTolerance` ------------------------- 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 :code:`relativeTolerance` 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 :code:`relativeTolerance` is ignored for steady cases. .. _kappaMUSCL: :code:`kappaMUSCL` ------------------ 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. .. _knowledge_base_orderOfAccuracy: :code:`orderOfAccuracy` ----------------------- The :code:`orderOfAccuracy` 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 :code:`orderOfAccuracy` from 1 to 2 for the child cases. While adjusting the :code:`orderOfAccuracy` for the :code:`navierStokesSolver`, the :ref:`turbulenceModelSolver ` should also be adjusted. The recommended :code:`timeStepping` is slightly different for the 1st and 2nd order cases. For more details, see :ref:`Rotational Angle per Step `, :ref:`maxPseudoSteps ` and :ref:`CFL ` Limiters -------- If the case is transonic or supersonic, the user should set :code:`limitVelocity` and :code:`limitPressureDensity` as :code:`TRUE` in the :ref:`Navier Stokes solver parameters` section of their input file. :code:`linearSolverConfig` -------------------------- :code:`linearSolverConfig` controls the configuration for the linear solver. It includes information :code:`maxIterations` which specifies the number of linear iteration performed in each pseudo-step. Typically, :code:`maxIterations` 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 :code:`maxIterations` for NS solver is 30. .. TODO: Need changing once AMGx (incompressible or CHT) is ready :code:`updateJacobianFrequency` -------------------------------- The default value for :code:`updateJacobianFrequency` is 4, which means that the Jacobian for evaluating the NS equation is updated every 4 pseudo-steps. For some challenging cases, reducing :code:`updateJacobianFrequency` from 4 to 1 may help, however, this may slow the NS solver by up to approximately 30%. :code:`equationEvalFrequency` ------------------------------ The default value for :code:`equationEvalFrequency` is 1, which means that the Navier-Stokes solution is updated every pseudo-step. For loosely-coupled simulations, the :code:`equationEvalFrequency` 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. .. _knowledge_base_lowDissipationScheme: :code:`numericalDissipationFactor` ---------------------------------- 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. It is compatible with unsteady simulations and cannot be used with steady simulations. 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 :code:`timeStepSize` can be halved. Additionally, it is advisable to slightly increase the :code:`maxPseudoSteps` and :code:`maxIterations` parameters in the :code:`linearSolverConfig`. - 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 :code:`orderOfAccuracy` to 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 :code:`kappaMUSCL` with the low-dissipation scheme. - In the case of poor convergence, the :code:`numericalDissipationFactor` can be increased to 0.5 or a value higher than that. Additionally, when facing such issues, setting the :code:`kappaMUSCL` parameter to -1 may also be helpful. - It is recommended to use a value of 1 for the :code:`updateJacobianFrequency` with 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 :code:`rampSteps` to 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 small :code:`timeStepSize`, the required values for :code:`maxPseudoSteps` and :code:`maxIterations` can be reduced to meet the convergence criteria. - In the case of divergence, it is recommended to reduce the :code:`timeStepSize` by half until the divergence issue is resolved.