3.21 Terms which change sign

An equation may include a function eqn which can return a value which is positive or negative, e.g.

@----+ f = 0: @t \relax \special {t4ht=
(3.37)
Following Sec. 3.20 , we aim to avoid a singular matrix in the case eqn and ensure the solution exceeds the lower bound of 0 when eqn. The discretisation of eqn is therefore treated implicitly or explicitly within each cell based on
 8 >>< f- f = ; if f 0; >>: f(explicit); otherwise: \relax \special {t4ht=
(3.38)

Maintaining lower and upper bounds

The solution variable eqn could have a physical bound at any low value eqn and/or high value eqn. We can treat the function eqn in Eq. (3.37 ) as follows to maintain boundedness:

 ( fL( L); if f 0; f = fH( H ); otherwise: \relax \special {t4ht=
(3.39)
Here, eqn and eqn are calculated using the current values of eqn.

If we examine the situation with eqn, Eq. (3.37 ) would be discretised as

@---+ fL = fL L: @t \relax \special {t4ht=
(3.40)
When we discretise eqn implicitly alongside the Euler time scheme, Eq. (3.40 ) becomes:
 -1-+ f = -1-+ --Lf o: t L t o L \relax \special {t4ht=
(3.41)
The solution for eqn decreases when eqn, but cannot fall below the eqn bound within a solution step. In the limit that eqn, the solution for eqn no longer decreases.

An equivalent analysis shows Eq. (3.40 ) maintains boundedness for the upper bound eqn. In that case, note that eqn is negative so the term in eqn can still be treated implicitly.

Fields bounded by 0 and 1

Many properties are expressed as a fraction, e.g. concentration of a chemical species, so are bounded by 0 and 1. When that happens, Eq. (3.39 ) simplifies to

 ( f = fL ; if f 0; fH(1 ); otherwise: \relax \special {t4ht=
(3.42)
Here, eqn and eqn are calculated using the current values of eqn.

It is particularly important to maintain boundedness of a field with 0-1 bounds when it is used to calculate another property which has a physical bound. For example, in a system of eqn fluid phases, fluid eqn can be calculated by eqn from phase fractions eqn and densities eqn.

A small amount of unboundedness in eqn, in the phase with highest eqn, causes large unboundedness in eqn, e.g. in 2 phases with eqn and eqn, the calculated eqn with eqn.

Notes on CFD: General Principles - 3.21 Terms which change sign