Encyclopaedia Index
Results are also shown of their application to the simple problem of flow down-stream of a point source in a uniform stream flowing obliquely to the grid.
There are seventeen schemes, in addition to the default "hybrid" one; but consideration of their performance suggests that seven of them should not be used.
3.1The general form
3.2Particular formulae(a) Origin of the study
(b) the list of schemes
(c) The linear schemes
(d) Non-linear schemes
(a) What the user must do
(b) What happens thereafter
(c) Some details of the GXHOCS coding
(a) An example
(b) Discussion
(c) Further information
See also Applications Album entries
In all finite-volume CFD codes for which cell-centre values of variables are stored, the question arises: what value should be ascribed to the fluid which crosses the cell face?
In the diagram below, values of the variable phi are known for the cell centres W, P and E; but what is the value of phi in the fluid at face w, which travels from cell W to cell P, or from P to W?
---------------------------------------------- | | | | | W w| P | E | | --------> | | | | | | ----------------------------------------------
The answer is given to this question influences the balance equations for both cell W and cell P.
A safe answer, ie one which ensures fairly good solution, is:
phi at w = phiW when the flow is from W to P, but phiP when the flow is from P to W.
In other words, phiw equals the phi on the UPWIND side of the cell face.
This, or rather the so-called "hybrid" variant of it, is what is used in PHOENICS unless any other scheme is switched on by the user.
The hybrid variant uses the upwind scheme only when the Peclet number ( = normal-to-face velocity times inter-node distance divided by diffusivity) exceeds 2.0 . Otherwise, the arithmetic average of phiW and phiP is taken.
The two schemes are called respectively the "upwind discretization scheme" (UDS) and the "hybrid discretization scheme".
However, there is an objection: when the flow direction is diagonal to the grid, cell P receives fluid from both the west and the south cells and so takes up an intermediate value. This intermediate value is then passed on to cell N; and so on.
| | N | | | | | | | | ^ | | ----------------------|---------------------- | | | | | | W w| P | E | | -------> | | | | ^s | | ----------------------|----------------------- | | | | | | | S | |
The result is that physically-present discontinuities become "smeared" by the numerical procedure.
Many means have been proposed for reducing the magnitude of this effect, which for obvious reasons is called "numerical diffusion" or "false diffusion".
Some, such as Raithby's "skew-upwind scheme" , address directly the influence of the diagonality of the flow.
Other authors have sought to find formulae for cell-face values in simpler ways, involving only: the phi values on either side of the face, and one still farther upstream.
It is these formulae which are the subject of the present article.
Following the jargon of the specialist literature, they are called the "higher-order schemes".
All of the formulae will be expressed in terms of the face value, phiw, and the cell-centre values phiWW, phiW and phiP, thus:
phiw = phiW + 0.5 * B * (phiW - phiWW) where B is a function of r, defined as (phiP - phiW)/(phiW - phiWW).
It is assumed that the flow is from left to right. Thus W is on the upwind side of P, and WW is on the upwind side of W. If the flow direction were reversed, phiE would be involved instead of phiWW.
-------------------------------------------------------- | | | | | WW | W w| P | E | | ----------> | | | | | --------------------------------------------------------
The first part of present article is based on the literature review and general study published by Waterson and Deconinck [1995].
These authors distinguish the formulae for phiw into linear and non-linear. This classification is retained here.
There are five linear schemes and twelve non-linear ones.
The numbers on the left are the values of ISCHEM, the index which is used in PHOENICS to distinguish the schemes.
The five linear schemes, or rather six when the upwind scheme is added, can be compactly expressed as follows, B and r being defined as in 3.1 above.
[Strictly speaking, PHOENICS uses Waterson's (1994) generalization of the definition of r, which is valid for non-uniform and BFC grids.]
UDS upwind difference B(r) = 0
CDS central difference B(r) = r
B(r) = 0.5*{ (1+K)*r + (1-K) } where
LUS linear-upwind K = -1
QUICK quadratic upwind K = 0.5
FROMM Fromm's upwind scheme K = 0
CUS cubic upwind scheme K = 0.3333
The twelve non-linear schemes can be expressed as follows.
SMART bounded QUICK B(r) = max(0, min(2*r, 0.75*r+0.25, 4))
KOREN B(r) = max(0, min(2*r, 2*r/3 + 1/3, 2))
VANL1 (or MUSCL) B(r) = max(0, min(2*r, 0.5 + 0.5*r, 2))
HQUICK harmonic QUICK B(r) = 2*(r+|r|)/(r+3)
OSPRE B(r) = 3*(r**2 + r)/{2.*(r**2 + r + 1)}
VANL2 (or VANLH) B(r) = (r + |r|)/(r + 1)
VANALB B(r) = (r**2 + r)/(r**2 + 1)
MINMOD B(r) = max(0, min(r, 1))
SUPBEE Superbee B(r) = max(0, min(2*r, 1), min(r, 2))
UMIST bounded QUICK B(r) = max(0, min( 2*r, 0.25 + 0.75*r, 0.75 + 0.25*r, 2))
HCUS B(r) = 1.5*(r + |r|)/(r + 2)
CHARM bounded QUICK B(r) = r*(3r + 1)/(r + 1)**2 for r > 0 B(r) = 0. for r <= 0
When the user has decided which discretization scheme he wishes to use for each solved-for variable, he should either:-
SCHEME(scheme_name, variable_name 1, variable_name 2, ...etc.)
That is all, because everything else is performed automatically, including, to mention those things which become visible, the creation of the patch command:
PATCH(HOCS,CELL,1,NX,1,NY,1,NZ,1,LSTEP)
and corresponding COVALs, for example:
The coding which is activated thereby, when EARTH execution starts, is in the open-source GXHOCS.F file, which forms part of the advanced-numerical-algorithms option.
The file contains subroutine GXHOCS and its ancillary subroutines GXHOEN, GXHOHL, GXFLPS and BLKSLD. (The acronym HOCS stands for "higher-order convection schemes".)
This coding ensures that extra "source" terms are supplied, at each relevant cell and for each relevant variable, to make up the differences between the effects of the in-EARTH default convection fluxes, and those which are appropriate to the selected schemes.
One detail to note is that, when ANY use of schemes is made, the in-EARTH default becomes the upwind rather than the hybrid scheme. This is effected by the automatically-made setting: DIFCUT = 0.0 .
The treatment is valid for non-uniform meshes and for body-fitting coordinates [Waterson, 1994].
In Group 1 Section 1, GXHOCS forms the array INLCS(NPHI) and allocates storage for several geometrical quantities. The array INLCS contains an integer which defines for each variable the scheme selected by the user in Q1 via the SCHEME PIL command.
In Group 1 Section 2, GXHOCS computes and stores the position vectors for all cells in the solution domain, as these are required in Group 13 for BFC calculations.
In Group 13, the deferred-correction source terms are calculated, in Section 13 for linear schemes, and in Section 14 for non-linear schemes. Subroutine GXHOEN computes the east/west and north/south cell-face contributions to the source term, and Subroutine GXHOHL computes the low and high cell-face contributions.
Subroutine GXFLPS is called directly from Subroutines GXHOEN and GXHOHL so as to calculate the flux-limiter function for the non- linear schemes.
Function BLKSLD is used by subroutines GXHOEN and GXHOHL so as to detect the presence of blocked faces and solid cells within the stencil used to calculate the higher-order correction for a single-cell face.
If BLKSLD is .TRUE., then no higher-order correction is calculated and the scheme reduces to the UDS.
Case N121 from the PHOENICS Input-File Library enables the performance of all the schemes to be compared.
It concerns the computation of the value of a scalar variable downstream of a point source in a stream of uniform velocity which has a direction diagonal to the grid, from south- west to north-east.
The concentrations of the scalar will be displayed.
The exact solution would consist of a diagonal band, with the value of the scalar equal to 10.5. with zero-value regions on either side,
The two points to examine are:
UDS: The expected numerical diffusion is evident, but the range of values, from 0 to 10.5 , is correct UDS
LUS: Numerical diffusion is low; but a negative value of -0.2 appears, and the maximum is only 7.8 LUS
FROMM: Numerical diffusion is low; but a negative value of - 1.5 appears. The maximum value is nearly correct. FROMM
CUS: Numerical diffusion is low; but a negative value of -2.7 appears, and maximum of 12.7 . CUS
QUICK: Numerical diffusion is low; but a negative value of -3.8 appears, and a maximum of 14.6 . QUICK
CDS: As expected of the central-difference scheme, these results are unsatisfactory from all points of view CDS
SMART: Numerical diffusion is low, and the upper and lower limits are correct. SMART
KOREN: Numerical diffusion is low, and the upper and lower limits are correct. KOREN
VLEER1: Numerical diffusion is low, and the upper and lower limits are correct. VLEER1
HQUICK: Numerical diffusion is low, and the upper and lower limits are correct. hquick
OSPRE: Numerical diffusion is low, but the upper limit is 14.0 . OSPRE
VLEER2: Numerical diffusion is low, and the upper and lower limits are correct. VLEER2
VANALB: Numerical diffusion is low, but the upper limit is 11.7 . VANALB
MINMOD: Numerical diffusion is low, and the upper and lower limits are correct. MINMOD
SUPBEE: Numerical diffusion is very low, and the upper and lower limits are correct. SUPBEE
UMIST: Numerical diffusion is low, and the upper and lower limits are correct. UMIST
HCUS: Numerical diffusion is low, and the upper and lower limits are correct. HCUS
CHARM: Numerical diffusion is low, and the upper and lower limits are correct. charm
The flow which has just been discussed, although very simple, is an important test of the schemes; for sources of one kind or another abound in fluid-flow phenomena.
The schemes which, on the basis of the test, should NOT be used when sources are present, are, of the linear schemes:-
LUS, FROMM, CUS, CDS and QUICK, ie all of them; and of the non-linear ones:-
OSPPRE and VANALB.
These disqualify themselves primarily because they produce out-of- bounds values, which often lack physical meaning.
Therefore, the only acceptable linear scheme is the UDS, despite its numerical-diffusion tendency; whereas most of the non-linear schemes are acceptable.
When the schemes are applied to problems WITHOUT sources, all of them perform better than the UDS, if the still-present out-of-bounds values are tolerable.
PHOENICS Library Case N101, and others, show this.
Some of the non-linear schemes have been reported as sometimes leading to convergence difficulties [Waterson and Deconinck, 1995]. MINMOD has been particularly mentioned in this regard.
SUPERBEE has been commented upon in the same reference as being "over-compressive", in that it tends to undo the effects of physical diffusion as well as that of numerical diffusion.
They may be satisfactory in some no-source circumstances; but there is nothing to suggest that they are better than those non-linear schemes which also handle sources well.
wbs