Algorithmic Considerations

Algorithmic Considerations


Solution Clipping

Predicted flow parameters can often undershoot or overshoot realistic values, particularly at the early stages of a solution. Sometimes, the iteration procedure never recovers and the solution diverges. Specifying the upper and lower bounds of various flow parameters, for example physical properties, can often prevent this diverging behaviour. Care must be exercised as the limits must not be too tight or they will over-constrain the solution.


Upwinding

Results obtained using higher order advection differencing schemes can be prone to numerical oscillations that may cause poor convergence, or permit quantities to overshoot. Running with first order upwinding difference schemes may help to overcome this. However, it should be remembered that this will lead to diffusive results. 


Solution Methods

Many codes provide different solution methods. Select the most appropriate for the problem being studied, by consulting the User Documentation.

Most algorithms within commercial CFD software use a time-like approach to get to a ‘steady-state’ converged solution. Typical methods are:

  • Explicit, where there are stability constraints on the time step, governed by the Courant Number for advection, and a diffusive limit. If the same time step is being used everywhere in the domain, then the time step is limited by the smallest time scale in the problem, where the grid may be very small, or the flow rates large. This can mean it can take a very large number of time steps to get to a steady state. Using a method which allows a local variation in the time step can be beneficial in this case.  

  • Implicit. These methods linearise the solution in some way, and solve the linearised equations at each time step, with other terms lumped into the right hand side of the matrix, as source or sink terms. These terms can be treated explicitly, or lagged at the value from a previous iteration or time step. These methods usually have free parameters to help to get to the solution quicker. These may be ‘time-steps’ or under-relaxation parameters, which prevent solution values from overshooting. Under-relaxation parameters play a similar role to time steps, and in fact can usually be related to a false time step.


There are some general considerations concerning convergence:

  • Can the linearization of User Supplied Source and Sink terms be improved in some way, especially if User Supplied Routines are being used? The more accurate the linearization, in general the better the convergence is likely to be.

  • Has the linear solution converged well at each iteration? For incompressible flows, there is always a linear equation to be solved, even with an explicit scheme.

  • Are there multiple time scales in the problem, which may be causing convergence difficulties? This is related to the problem of ‘stiffness’ where there are fast time scales in a problem and it is necessary to solve the problem on the slowest time scale. Examples of this might be in chemical kinetics, where the chemical time scales may be fast, or in stratified buoyant flows, where the time scales for gravity waves may be much smaller than the diffusion time scales. Some solvers have special methods to overcome these difficulties, or it may be necessary to solve the problem using a time step which can resolve the fastest time scales. This might require a very large number of time steps or iterations to reach a converged solution.

  • Is the solution being overdamped, by using too small a value of the time step or relaxation parameter? A typical symptom of this is that the solution variables are changing very slowly, with high values of the residuals.

  • Even if the flow field is converged, are any subsidiary equations converged. For example, solving for the convective heat transfer in an incompressible flow does not usually affect the flow field. It is therefore possible for the heat transfer equation not to be converged, even if the flow field is. Check the convergence of other scalar equations as well.