Wednesday, 20 January 2016

Discretisation in Fluent

Fluent has a variety of options for the solver. In this post I’ll be covering first and second order upwind schemes. Other options exist, such as QUICK and MUSCL, but I will leave these out. I’ll also be concentrating on pressure based solver, solving at the cell centres, in steady state simulations (laminar & RANS).  

Most CFD uses a finite volume method to discretise the PDEs. The PDEs are integrated, and this puts them in a form that applies to a single mesh cell.
Becomes,
.
The integration over the cell faces (integral with circle through it) comes from the “divergence theorem”. The resulting sums balance flows into and out of the cell (Craft, 2011). The transient term (∂ρφ/∂t V) is defined by the temporal discretisation and equals zero in steady state.
As the flow is actually being solved, the value of the variable at the current cell centre and the cell face, φ and φf, are unknown. Generally, the value in the current cell is expressed in terms of the faces values, and the face values are found from the cell-centred values in surrounding cells. This gives us a linearized set of equations of the form:
The a’s are the ‘linearised coefficients’, subscript p refers to current cell, nb refers to neighbouring cells. An example is included below in Figure 1 for the first order upwind case. The coefficients anb and b will be different for every cell in the domain, at every iteration. The field for φ can be calculated by recalculating iteratively for all of the cells in the domain.
Most of the interpolation schemes focus on how the face value φf can be calculated from the neighbouring cell values. For the first order upwind scheme, face value φf is equal to the upstream cell-centre value.




For the Second order upwind scheme:
In the equation immediately above, φ and nabla φ are found in the upstream cell. “r” is the displacement distance from the upwind cell centre to the cell face. This is the main difference between first and second order upwind methods: instead of assuming the value of φ is constant over the upstream cell, the second order upwind scheme basically uses ‘linear interpolation’ (in a loose sense) of the gradient (nabla φ) in the upstream cell to find the values at the face.
nabla φ itself found through a “least-squares cell-based” method by default in fluent. (in basic terms, a sort of ‘weighted average’ of the surrounding cell values is used to find the gradient in each cell).
The theory guide mentions a “Multi-dimensional linear reconstruction approach”, and references Barth & Jespersen (1989).  I have taken this out on interlibrary loan, but reading the paper hasn’t significantly improved my understanding of the second order upwind scheme. My understanding of what they mean by “multi-dimensional linear reconstruction” is just what has been described – you find the cell-face value using the gradient.
Gradient Limiters:
This isn’t the end of the story because the second order upwind method can create spurious oscillations. The calculated cell face value has to be between the values of the two cells (current cell centre and the upwind cell centre) to prevent spurious oscillations. This is the monotonicity principle and is applied in Fluent through Gradient limiters. These are typically applied as shown (ψ = gradient limiter).
There are three different types in Fluent:
  • Standard limiter
  • Multidimensional limiter
  • Differentiable limiter
Ψ is a factor between 1 and 0, so ψ = 1 is fully 2nd order upwind, ψ = 0 is fully 1st order upwind (φf = φupstream cell). In the standard limiter, ψ is calculated to force φf to be between the min & max of the neighbouring cells*. In the standard limiter a minimum ψ is found in each cell and applied to every face, while the multidimensional limiter applies a different ψ to each face of the cell. Differentiable limiter is more complex & perhaps appropriate for a later blog entry.
References:
Craft, TJ. 2011. Review of Basic Finite volume Methods. (Unpublished) University of Manchester.
Bakker, A. 2002. Applied Computational Fluid Dynamics Lecture 5 – Solution methods. (unpublished) www.bakker.org accessed 20th January 2016.
Barth, TJ. Jespersen, DC. 1989. The design and application of upwind schemes on unstructured meshes. 27th AIAA meeting,
Figure 1 - Example of the discretisation process, for a first order upwind scheme (Bakker, A. 2002)

*by “neighbouring cells” we mean the minimum or maximum of the cell centre values of all the neighbour cells of the upstream cells. This is covered in Barth & Jespersen (1989)

No comments:

Post a Comment