Encyclopaedia Index

### Boundary

----------------------------------- Photon Help ---- [Boundary] determines if the boundary is to be included in plotting the vectors.

### BOUNDARY CONDITIONS

(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.)

### (a) The general idea

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:

1. PHOENICS always treats a boundary condition as a source of the entity in question (mass, momentum, energy, chemical species, turbulence energy, etc). It therefore does NOT insert boundary values directly.
2. Since sources are inserted at the centres of cells, not at their walls, "boundary conditions" are not truly inserted at boundaries. Of course, near-boundary cells can be made small enough for the shift of location to be unimportant; but PHOENICS also has other ways of effecting what is want.
3. PHOENICS accepts specifications of sources (and therefore of boundary conditions) in terms of a 'coefficient' (C) and a 'value' (V). The source for variable j determined by Cj and Vj is then calculated from:

Cj * (Vj - jP),

where jP is the value of j at node P, ie the in-cell value of j.

4. The PHOENICS SATELLITE accepts specifications of the C and V quantities through a PHOENICS Input Language (ie PIL) command named COVAL.
5. Where (ie to which cells) the boundary condition is to be applied is conveyed to PHOENICS by way of another command, named PATCH.

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.

### (b) Treatment inside EARTH

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 + ...)

### (c) Special cases

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.

### (d) Mass-flow boundary conditions

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.

### (e) Convective and diffusive sources for j

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.

### (f) Improved specification of boundary conditions in general menu

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.

### Boundary conditions for walls

The WALL and VALUE combination is a simpler alternative to PATCH and COVAL because:

1. It will automatically detect whether the wall is internal or external.
2. If it is internal, it will automatically block off the cell-faces involved (by generating porosities), thus preventing the flow of material through the wall.
3. It will automatically apply friction boundary-conditions to both sides of the wall.
4. It will automatically introduce boundary conditions for k and e if the k-e turbulence model is used.

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.

### BOUNDARY CONDITIONS, VELOCITY RESOLUTES AT INLETS FOR BFC=T

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 first two sets of grid cells can be kept orthogonal to the boundary, so that (for example) PH for nodes IZ=1 to IZ=2 would everywhere be parallel to w at the inlet plane.
• A PATCH can be introduced for every cell, and the resolutes set individually in the COVAL's according to the angle between them and the velocity at inlet. This is rather awkward because it necessitates precise knowledge of the grid locations at a stage when this information is difficult to obtain. In this approach the coefficient in the COVAL statement should be FIXVAL, to avoid any smearing which the distribution of velocities at boundaries can cause.

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:

• COVAL (BFCIN,UCRT,0.0,ALFA)
COVAL (BFCIN,VCRT,0.0,BETA)
COVAL (BFCIN,WCRT,0.0,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