(The following text formerly appeared as section 2.7 of TR 100. It describes how to introduce boundary conditions by way of PIL entries in the Q1 file.
Boundary conditions may be introduced by way of the SATELLITE menu.)
See also the Instruction Course lecture on boundary conditions.
Settng up a flow-simulating computation involves specifying boundary conditions, a task needing careful thought. In particular, it involves the specification of convective and diffusive fluxes at surfaces bounding the domain.
PHOENICS has a flexible procedure for this, involving the following five points:
Cj * (Vj - jP),
where jP is the value of j at node P, ie the in-cell value of j.
The COVAL and PATCH commands form part of the PHOENICS Input Language, described elsewhere in the Encylopaedia; and examples of boundary conditions specified with their aid will be found in the PHOENICS Input Library. Here it is necessary only to explain how EARTH reacts to the COVAL specification.
In accordance with point (1), a boundary condition affecting the enthalpy of the material in one of the cells in a grid will be expressed as an additional thermal-energy source in the cell; and there may be many sources for a single cell, each representing a different physical effect or boundary condition. Thus, if there are several contributors to the source, the total contribution is given by,
C1*(V1 - jP) + C2*(V2 - jP) + C3*(V3 - jP) + ...
Here C1 and V1 might represent a 'true' source, such as heat generation by internal friction; then C2 and V2 might represent interactions between the cell and a region outside the integration domain beyond one of the cell walls; and C3 and V3 might represent the interaction across another wall; and so on.
Addition of the foregoing source to the numerator of the right-hand side of equation (2.4-6), followed by re-arrangement, leads to the following equation for jP:
jP = (aEjE + aWjW + ... S + C1V1 + C2V2 + C3V3 + ...)/ (aE + aW + ... aP + C1 + C2 + C3 + ...)
When the boundary condition dictates that the value of jP should be fixed, what happens is that V is set to the desired j-value, and C is set to a very large number; for then the equation reduces as follows:
jP = f( ... + V x C , ... + C ) = V
because VxC is much larger than all other terms in the numerator, and C is much larger than all other terms in the denominator.
When the boundary condition is of the fixed-flux kind, by contrast, C must be given a very small value, so that it is negligible in comparison with the other terms in the denominator; then V must be chosen so that the product V x C equals the desired flux.
In general, any kind of boundary condition can be expressed in this way; for C and V need not be constants; and they may be recalculated in GROUND, for each grid node and time instant, as the computation proceeds.
Just as enthalpy is the dependent variable which affects energy sources, concentration that which affects chemical-species sources, and velocity that which affects momentum sources, so is pressure the variable which, in PHOENICS, affects mass sources. Information about the inflow and outflow of mass to the domain is therefore conveyed to PHOENICS by way of PATCH and COVAL statements pertaining to pressure.
The physical notion is that fluid is forced into the domain because some external pressure (the prescribed 'value') exceeds the pressure which obtains in the cell. If the 'coefficient' is very small, the external pressure must be very large; then variations such as are likely to occur in the cell pressure, associated with the velocity fields within the domain, will have little effect.
If the 'coefficient' is very large, by contrast, such variations will be effective; therefore the magnitude and even the sign of the flow rate will be hard to determine in advance. Typically, the inflow to a domain is represented by a low-coefficient pressure boundary condition, whereas an outflow is represented by a high- coefficient one; but variants are numerous.
The mass flow source added to the continuity equation is:
Cp(Vp - pP),
where Cp and Vp are the coefficient and value for pressure, ie the C and V of the COVAL for P1. The value of the pressure at the nodal point P is denoted by pP.
When mass enters a cell from outside the flow domain (but not when it leaves), the values of all the dependent variables pertaining to the inflowing fluid need to be prescribed. The correct effect is achieved by specifying these values as the V's in the correspondi COVAL specification. The C's represent the coefficients of the diffu fluxes from the boundary to the nodes in the PATCH. The mass-flow ra are specified through the pressure boundary condition as explained a
The convective and diffusive fluxes of j represented by the above mentioned settings are given by the following expressions for the corresponding source of j:
Cp(Vp - pP)(Vj - jP) + Cj(Vj - jP) ,
for Vp > pP, ie inflow, and,
Cj (Vj - jP),
for Vp >pP, ie outflow.
The omission of the convective term for outflow is an expression of the upwind principle; and it is analogous to the practice used for the interior coefficient aE (see equations (2.4-7) and (2.4-8)).
To summarize, the task is to specify Cp and Vp for pressure P1, and to specify Cj and Vj for the variable j. In this way, the convective- and diffusive-fluxes at boundary surfaces are specified.
Very often the diffusive contribution is zero, ie,
Cj = 0,
which may also be represented in COVAL by substitution of the word ONLYMS (for only mass transfer) in its third argument.
Further information on boundary-condition implementation is provided under the COVAL entry in this encylopaedia.
The entries for PATCH, COVAL and SOURCE should be inspected for further information, with special attention to the significance which attaches to the use of the arguments FIXVAL, FIXFLU, ONLYMS, FIXP, OPPVAL and SAME.
The keyword commands INLET, OUTLET, WALL and VALUE can also be used to set the commonly-used boundary conditions which correspond to their names.
In Cartesian and cylindrical-polar coordinates, the location of boundary features (inlets, outlets, blockages, etc) can now be linked to named 'objects' defined during the grid-generation procedure. This obviates the need to enter the coordinates twice: once when defining the grid, and again when specifying boundary conditions, as was the case in previous versions.
If an 'object' is subsequently repositioned or re-sized, then the boundary condition is also changed automatically. If an object is deleted, any associated boundary-conditions will also be deleted without further instructions from the user. If a new 'object' is created by copying an existing one, the boundary conditions are not automatically copied, but a new boundary condition may be linked to the new object. Similarly, heat sources can be attached to existing 'block-' or 'plate-type' boundary conditions, without re-entering their location.
The WALL and VALUE combination is a simpler alternative to PATCH and COVAL because:
Note that if the wall is internal, and non-adiabatic, care must be taken with the COVAL for H1. WALL will take the first five characters of name, and paste on various suffixes to show which side of the cell the surface is.
These suffixes are:
name- | EW - | surface on EAST side of cell |
name- | WW - | surface on WEST side of cell |
name- | NW - | surface on NORTH side of cell |
name- | SW - | surface on SOUTH side of cell |
name- | HW - | surface on HIGH side of cell |
name- | LW - | surface on LOW side of cell |
This allows different temperatures to be specified on opposite sides of a wall.
In BFC calculations, the calculated velocity resolutes are aligned with the local direction of the grid, i.e. u is aligned with PE, v is aligned with PN and w is aligned with PH. Consequently, it is usually the case that, even for inlet boundaries that are not curved, the direction of the velocity resolute at the inlet plane is different from that which applies to the first velocity cell within the domain.
For curved boundaries, the situation is that whereas the external flow vector may be constant, the resolutes required to be convected into the first cell vary continuously along the boundary as its direction changes.
For boundaries which are plane there are two solutions to the problem of specification of the incoming resolutes, namely:
The second method is also the solution to the case of the curved inlet boundary. It is incorporated into the subroutine GXBFC called from GREX3, so that only one PATCH is required at an inlet. The option is activated when the first three characters of the PATCH name are 'BFC'. The directions and magnitude of the external velocity vector to be set is specified by means of COVALs for the cartesian resolutes of this vector.
The following statements illustrate the method for a north boundary:
PATCH (BFCIN,NORTH,1,NX,NY,NY,1,NZ,1,1)
COVAL (BFCIN,U1,FIXVAL,GRND1)
COVAL (BFCIN,V1,FIXVAL,GRND1)
COVAL (BFCIN,W1,FIXVAL,GRND1)
The above COVALs cause EARTH to visit GXBFC for resolutes set in the "value" array. The following COVALs provide the data for an external vvlocity vector having cartesian resolutes ALFA, BETA and GAMMA:
Other PATCHes of different names (e.g. BFC2, etc) can be introduced for other inlets. This is exemplified in library case B524.
It should be noted that field storage is automatically allocated for the cartesian resolute fields named UCRT, VCRT and WCRT (for the first phase) when BFC=T.
Boundary coordinates, | sliding east edge of (see SLIDE logical, Group 6) |
Boundary coordinates, | sliding high-edge of (see SLIDH logical, Group 6) |
Boundary coordinates, | sliding low-edge of (see SLIDL logical, Group 6) |
Boundary coordinates, | sliding north-edge of (see SLIDN logical, Group 6) |
Boundary coordinates, | sliding south-edge of (see SLIDS logical, Group 6) |
Boundary coordinates, | sliding west-edge of (see SLIDW logical, Group 6) |
wbs