COVAL is a PIL command, which is extensively used (in Group 13 of the Q1 file) for the introduction of those boundary conditions and sources which can be expressed as linear functions of the dependent variable, phi, e.g.:
It can also be used in:
Before committing themselves to extensive study of COVAL, beginners should be aware that In-Form statements can perform all the functions of COVAL, and can handle non-linear boundary conditions and sources with greater ease.
Those who must work with input files from past years will need to understand COVAL; but those who are creating new flow-simulation examples are advised to use In-Form statements, especially those employing the COVAL function, only.
The remainder of this article is arranged as follows:-
(a) Overview of COVAL
(b) Sources linearly dependent on in-cell field value
(c) The units of source terms
(d) Fixed values and fixed fluxes
(e) Pressure and mass-flow boundary conditions
(f) Sources quadratically dependent on in-cell field value
(g) Stagnation-pressure conditions
(h) Non-linear- and non-uniform-sources
COVAL....is the command used for setting PATCH-wise sources of dependent variables. In PHOENICS, boundary conditions are represented by way of sources, and are therefore also specified by means of COVAL.
If no such actions are taken by the user, the EARTH program will act as though the domain material is confined within a container, the boundaries of which are impenetrable to flows of mass, momentum and energy.
COVAL has four arguments, namely (in order):-
The COefficient and VALue can be inserted as real numbers, eg 4.20 or -1.45E-2 ; but certain names are also recognized, viz:
The principal use of COVAL is for the supply of sources that are linearly dependent on the in-cell value, phiP, of the variable, phi, identified by the second argument of COVAL.
The command, COVAL(name,PHI,C,V), adds the following source to the balance equation for
The command, COVAL(name,PHI,C,V), adds the following source to the balance equation for PHI,
for all cells P in the PATCH referred to by name. The PATCH type determines value and dimensions of the multiplier, T.
The units of a source are always: [PHI]*[kg]/[s]. For example,
All but four of the source-PATCH types give T multipliers having dimensions, so C must be set per unit [T], i.e. it must have dimension [kg]/[s]/[T].
The source types are:
CELL
,EAST ,WEST , NORTH ,SOUTH ,HIGH ,LOW ,VOLUME ,FREEE ,FREEN ,FREEH ,FREEVL , PHASEM ,RGRAD
,OUTFLO ,EWALL ,WWALL ,NWALL ,SWALL ,HWALL , LWALL, INFLO.
The significance and dimensions
of each are provided under their individual encyclopaedia entries.
A large C makes the source term the dominant term in the balance equation for PHI, which for large C becomes,
T*C*(V-phiP)=0.0 ,
i.e. a large C has the effect of fixing phiP to V. The commands COVAL(name,PHI,2.E10,V), and COVAL(name,PHI,FIXVAL,V) both have this effect, as FIXVAL is numerically equal to 2.0E10.
A very small C and a very large V set the source equal to T*C*V independently of the value of phiP, for example thus: COVAL(name,PHI,1.1E-10,1.1E10*flux) .
COVAL(name,PHI,FIXFLU,flux) has the same effect, because the variable FIXFLU, as well as being a large number (viz 2.0 E10), is also taken by EARTH as a signal multiply flux by 1./FIXFLU when it adds the COVAL term to the source.
Mass-flow conditions are supplied by way of pressure boundary conditions, eg. COVAL(name,P1,Cp,Vp), sets a mass source ( inflow is positive ),
T * Cp * (Vp-pressP).
A large coefficient fixes the in-cell pressure, pressP, to Vp; a small Cp and a large Vp set a fixed mass flux equal to T*Cp*Vp.
The value, Vphi, of variable PHI convected in to the domain when this mass source is positive is specified by, COVAL(name,PHI,Cphi,Vphi).
This gives a total source for PHI equal to,
|----------------------------------------------------------| | T*Cphi*(Vphi-phiP) + [T*Cp*(Vp-pressP)]*(Vphi-phiP). | |----------------------------------------------------------|
The first term represents diffusive inflow; the second represents convective
inflow. Usually, the diffusive inflow is neglected, so
Cphi is set to 0.0, but,
COVAL(name,PHI,ONLYMS,Vphi),
signifies the same thing, i.e. ONLY MaSs flow.
For cells in which mass outflow occurs ( i.e. in which pressP is greater than Vp ), the second term above is absent, in agreement with the upwind convention used for the cell-face fluxes generally. Thus, for outflow, the source is,
T * Cphi * (Vphi-phiP).
The magnitude of Cp needed to fix the pressure may be estimated from the following expression, 1.E3 * ( expected flow rate ) / ( T*Vp ). This gives a relative difference between Vp and the in-cell pressure of order 1.E-3.
When the pressure is to be fixed to zero, as is often done in incompressible flows in which the pressure level is immaterial, Vp is omitted from the above expression, which then gives an estimate of Cp needed to give an absolute difference between Vp (which is 0.0) and pressP of order 1.E-3.
A value of Cp 1000 times bigger than that given by the above expression, would result in an absolute pressure difference between zero and press"P" barely representable on a 32-bit machine, and should hence be avoided. The coefficient FIXP has a numerical value of 1.0; it is suitable for fixing pressures subject to its conformity to the above expression. FIXVAL ( =1.E10 ) is usually far too big.
When the pressure is "fixed", small changes resulting from dynamic- head variations can change inflow to outflow and vice versa, with consequent convergence difficulties.
When COVAL is used to prescribe pressure boundary conditions, it should be called with
P1 or P2 as the variable argument. In this regard, it is helpful to note that the
relationship between pressure and mass flux is of the same kind as that between
temperature and heat flux. Thus, for fixed pressure, enter:
COVAL(patch name, P1, FIXP, value of pressure). For a fixed first-phase mass flux,
enter:
COVAL(patch name,P1,FIXFLU, value of mass flow rate) ;
and for fixed second-phase
mass flux, enter:
COVAL(patch name,P2,FIXFLU, value of mass flow rate) .
IMPORTANT NOTE: The above statement IS correct even though, in the current version of PHOENICS, the second phase shares the same pressure as the first, so that no storage space is ordinarily allocated to it unless specifically requested by the user introducing SOLUTN(P2,Y,N,N,N,N,N) .
In two-phase flows, the formula used for mass outflows (i.e. when pressP is greater than Vp ) is multiplied by the phase volume fraction: R1 for phase-1 mass outflow, and R2 for phase-2 mass outflow.
COVAL can be used to supply sources having a quadratic dependence on the local in-cell field value phiP (for all PHIs except P1 and P2) This feature is activated by giving the coefficient argument a negative value. Thus, he command:
COVAL(name,PHI,-C,V)
sets the source for PHI as:
T * C * abs[V-phiP] * (V-phiP),
for all cells P in the PATCH referred to by name. Quadratic sources are often needed to represent the resistances of internal obstacles to fluid flow.
For P1 ( and P2 ),
COVAL(name,P1,-Cp,Vp) gives the mass source equal to,
-T*sqrt(abs(Cp*RHO*(Vp-pressP))) for pressP > Vp (outflow), and:
+T*sqrt(abs(Cp*RHO*(Vp-pressP))) for pressP > Vp (inflow).
where RHO is the in-cell density.
In incompressible flows, COVAL(name,P1,-2.0,Vp) sets the stagnation pressure at cell P to Vp, provided one of the area types is in the second argument of PATCH, and provided that the inflow is essentially normal to the boundary surface.
At a low or high boundary these settings must be accompanied by , COVAL(NAME,W1,ONLYMS,SAME) subject to the u and v velocities being small compared to w at the inlet. Similar practices can be used for u at east and west boundaries and v at north and south boundaries.
IMPORTANT NOTE: The negative-coefficient option is active only for CONSTANT values of coefficient and value, not for GROUND-set coefficients and/or values.
Non-linear- and non-uniform-sources of arbitrary complexity can be entered by means of Fortran coding supplied in GROUND.
When GRND is entered as the third ( i.e. coefficient ) argument, EARTH calls GROUND at the appropriate stage in order to pick up information provided there, usually as an array of numbers to be used as coefficients. The same is true of GRND1, GRND2, etc.
When GRND is entered as the fourth argument, it is an array of "values" that EARTH will look for in GROUND.
The GROUND group in question is the same as that used in SATLIT, namely group 13 for boundary conditions and special sources.
wbs