Qualifiers of PLANT statements are of two kinds, namely:

- associated PATCH and COVAL commands, of which the first which must immediately precede the PLANT statements while the latter must immediately follow them; and
- REGION, PLACE and IF commands which follow the expression as the final part of the PLANT statement.

These two kinds will now be described, in turn.

Three examples of the way in which the PATCH and COVAL commands qualify a PLANT statement now follow.

**Example 1**, extracted from Case 104 of the PLANT Library, which
should be examined if the full story is required.

PATCH(START,INIVAL,1,NX,1,NY,1,NZ,1,1) {INIT01} VAL=XG2D+YG2D COVAL(START,C1,0.0,GRND) {INIT02} VAL=XG2D+YG2D+TLAST COVAL(START,EXAC,0.0,GRND)

This example shows how the initial value of the solved-for variable
C1 is set to *(x + y)*, while that of the stored-only
variable EXAC is set to*(x + y + t)*, where *x* and
*y* are the cell-centre coordinates, and *t* is the time.

Both these settings prevail over the three-dimensional PATCH called START, of INIVAL type, which extends over the whole domain of integration for the first time moment only.

The following points should be noted:

- The PLANT statements are inserted
**immediately above**the associated COVAL commands. Blank or comment lines lines are not allowed in between. - The fourth arguments of both COVAL commands are GRND.
- The PLANT statements have blanks in the first two columns, in order that they should be ignored by the non-PLANT part of the SATELLITE.

**Example 2**, extracted from Case 131 of the PLANT Library, which
should be examined for further information.

PATCH(ERG2,PHASEM,1,NX,1,NY,1,NZ,1,1000) {SORC01} CO=RG(2)*ABS(U1) COVAL(ERG2,U1,GRND,0.0)

This example provides a porous-medium-type momentum sink with a resistance coefficient which is proportional to the absolute value of the x-direction velocity U1.

The following points should be noted:

- The variable being set is CO, the coefficient of the usual PHOENICS source-term expression : source = CO * ( VAL - PHI) .
- Correspondingly, it is the third argument of the COVAL statement which is occupied by GRND.
- The same rules of precedence are (necessarily) observed for this
source-type patch as for the previous initial-values patch, namely:-
- PATCH command first;
- PLANT statement second;
- COVAL command third.

- The start of the PLANT statement in the 7th column is without
significance. It is only the first and second columns which
*need*to be avoided.

**Example 3**, extracted from Case 252 of the PLANT Library, which
is concerned with the creation, by means of PLANT-generated GROUND
coding of a four-fluid model of turbulent combustion.

PATCH(MICRMIX,VOLUME,1,NX,1,NY,1,NZ,1,1) A {SORC01} CO= :MCONST:*(C+D)*XG2D**(-2)*(1.0+9.0*YG2D) COVAL(MICRMIX,A,GRND,0.0) D {SORC02} VAL= 1-A-BB-C COVAL(MICRMIX,D,fixval,grnd) BB {SORC03} CO= :MCONST:*(D+1.E-6)*XG2D**(-2)*(1.0+9.0*YG2D) {SORC03} VAL= A*(2.0*C/(D+1.E-6)+1.0) COVAL(MICRMIX,BB,GRND,GRND) C {SORC04} CO= :MCONST:*(A+1.E-6)*XG2D**(-2)*(1.0+9.0*YG2D) {SORC04} VAL= D*(2.0*BB/(A+1.E-6)+1.0) COVAL(MICRMIX,C,GRND,GRND)

Here a single patch, called MICRMIX, covers the whole computational domain. It is used for the creation of volumetric sources for four solved-for variables: A, D, BB and C.

These sources depend on the values of those variables in the following ways:

- The source of A depends on the arithmetic constant MCONST, values of
C, D and cell-centre coordinates. Specifically, it is equal to:
*-mconst*(C+D)*x**(-2)*(1+9y)*A* - The source of D is of FIXed VALue COefficient type which is used
here to set value of D identical to the unity minus sum of A, BB and C.
Specifically, it is set equal to:
*1.e10*(1-BB-C)* - The source of BB depends on the values of A, C and D, in a manner
requiring both a CO and a VAL. Specifically, it is equal to:
*mconst*D*x**(-2)*(1+9y)*(A*(2*C/D+1)-BB)* - The source of C also depends on the values of A, BB and D, in a manner
requiring both a CO and a VAL. Specifically, it is equal to:
*mconst*A*x**(-2)*(1+9y)*(D*(2*BB/A+1)-C)*

**Remarks** concerning the three examples:

- The above examples have illustrated only a few aspects of the ways
in which PLANT statements interact with PATCH and COVAL commands;
but the following further ones are obvious, namely:
- The extents of the space-time domain to which the settings apply can be limited in the usual way via the arguments of PATCH.
- The FIXVAL and 0.0 appearing in several COVALs could of course be replaced by other constants.
- Different momentum and concentration sources can of course be easily created, by modification of the expressions in the PLANT statements.

- Many more examples can be found in sections 3 and 4 of this document.

**REGION** does for properties and other settings what the eight last
arguments of PATCH do for COVAL commands: they limit their range of
applicability to a volume in the grid for which the boundaries are defined by
the values of those arguments.

Examples now follow.

**Example 1**. Setting the density in a sub-domain.

The following PLANT statements cause the density of the medium to
equal the reciprocal of the enthalpy over the extents of:

- first IX (fstIX) to last IX (lstIX),

- first IY (fstIY) to last IY (lstIY),

- first IZ (fstIZ) to last IZ (lstIZ) and

- first time step (fSTEP) last time step (lSTEP).

RHO1=GRND {PRPT01} DEN1=1./H1 REGION(fstIX, lstIX, fstIY, lstIY, fstIZ, lstIZ, fSTEP, lSTEP)

**Example 2**. Setting the interphase transport in a sub-domain.

The following PLANT statements cause the inter-phase friction
coefficient to be equal to a constant (CFIP1) times the in-cell mass
of the first phase times the in-cell volume fraction of the second
phase over the extents of:

first IX (fstIX) to last IX (lstIX),

first IY (fstIY) to last IY (lstIY),

first IZ (fstIZ) to last IZ (lstIZ) and

first time step (fSTEP) last time step (lSTEP).

RG(1)=CFIP1 CFIPS=GRND {PRPT01} INTFRC=RG(1)*MASS1*R2 REGION(fstIX, lstIX, fstIY, lstIY, fstIZ, lstIZ, fSTEP, lSTEP)

**Example 3**. Calculation of the near-wall Nusselt number.

The following PIL statements do what is needed to calculate the Nusselt number at the south wall for the uniform grid at the finish of IZ-slab:

{SC0601} NU=RG(1)*ABS(TEM-NORTH(TEM))/YG2D REGION(1,1,1,NY,1,NZ,1,1)

It should be noted that NORTH(TEM) denotes the north value of TEMperature.

**PLACE** does for properties and other settings what REGION does,
with the useful difference that the eight arguments are the geometrical
distances and time moments not the grid indices.

**Real-number arguments**
cause PLANT to convert them into the corresponding cell indices for specified grid.
The latter will be used as the limits of DO loops in the Fortran coding
to be created by PLANT.

Examples now follow.

**Example 1**. Setting the density in a physical sub-domain.

The problem is to apply a specific density formula, namely that the density is proportional to the reciprocal of the enthalpy, over a brick-shaped volume of which:

- extends in the x-direction from CXF, to CXL;
- extends in the y-direction from CYF, to CYL;
- extends in the z-direction from CZF, to CZL;
- extends in the time-direction from FT, to LT.

RHO1=GRND {PRPT01> DEN1=1./H1 PLACE(CXF, CXL, CYF, CYL, CZF, CZL, FT, FL)

**Example 2**. Setting a discontinuity in the interphase-friction
coefficient.

The following statements set a different interphase-friction law for
two distinct parts of the 2D domain.

Specifically, although the
functional form is the same, the multiplying constant is 1.0 for
y-values between 5.0 and 10.0, and 7.0 for y-values between 0.0
and 5.0.

CFIPS=GRNDINTFRC=9.81*(:RHO2:-:RHO1:)/(:FALLVEL:)*MASS1*LIQ PLACE(0.0,24.0, 5.0,10.0,0.0,1., 0.0,1.0)INTFRC=9.81*(:RHO2:-:RHO1:)/( 7.*:FALLVEL:)*MASS1*LIQ PLACE(0.0,24.0,0.0,5.0,0.0,1.0, 0.0,1.0)

**Remarks** concerning the REGION and PLACE examples:

- The above examples have illustrated only a few aspects of the ways
in which PLANT statements may be qualified by REGION and PLACE
commands; the following additional points should be noted :
- The arguments are not allowed to comprise more than 8 characters;
- The PLACE arguments must be entered as real-type values, i.e. with points; or they should be real PIL variables, such as RG. No arithmetic expressions are allowed.
- The qualifiers are inserted
**immediately below**the associated PLANT statement. No blank or comment lines are allowed between them. - REGION() and PLACE(), i.e. qualifiers without any arguments, indicate that the settings are to be made over the whole space-time domain. These are used when the limitation of the setting is to be made by way of an optional extension (parameter or switch) as described below.
- Both REGION and PLACE can be used for cartesian, polar and VFC grids.
- Since the boundaries of the volume specified by PLACE do not, in general coincide with
cell boundaries, it should be noted that settings are made only for
those cells of which the
**cell centres**lie within the volume.

- Many more examples can be found in sections 3 and 4 of this document.

REGION and PLACE qualifiers can make use of some additional information indicating how and when the settings are to be applied. This information may be included by way of optional extensions. They are of two kinds, namely:

- associated
*parameters*which, if they exist, must immediately follow the qualifiers; and -
*switches*which must immediately follow either qualifier or parameter preceded by a forward slash, /, as the final part of the qualifier.

These two kinds will now be described, in turn.

**A parameter** specifies the value of the marker variable,
MARK, which must be possessed by cells within the REGION or
PLACE volumes, if the setting is to be made.

MARK must, of course, have been declared beforehand by a STORE(MARK) command.

Thus the parameter extension to the REGION or PLACE qualifier provides a further condition to the extent to which the settings are to be made.

Examples now follow.

**Example 1**, extracted from Case Y620 of the PLANT library, which
should be examined if further understanding is required.

ENUL=GRND {PRPT05} VISL=1.*SQRT(U1**2+V1**2)*WDIS REGION() 1 {PRPT06} VISL=0.01 REGION() 2 {PRPT07} VISL=1.*SQRT(U1**2+V1**2)*WDIS REGION() 3

This example shows how, within a a space covering the whole integration domain, the laminar viscosity is set equal to:

- 0.01 for all cells of whole computational domain where MARK=2,
- the products of local velocity magnitudes and distances to the nearest wall, WDIS, for the cells marked 1 and 3.

**Example 2**, extracted from Case Y616 of the PLANT library, which
should be examined for further information.

U1AD=GRND {SCUF01} VELAD=-3.*RG2D REGION() 1

This example provides the extra velocity, which is proportional to the cell-center radius, to be added to convection fluxes for the cells marked by unity MARK value.

**Remarks** concerning the two examples:

- The above examples have illustrated only a few aspects of the ways
in which parameters may be used by REGION and PLACE qualifiers so
that the followings points should be noted :
- The parameterized PLACE qualifier is used exactly the same way.
- The extents of the time-space domain to which the parametrically qualified settings apply can be limited via the arguments of REGION or PLACE.
- The parameters are not allowed to be more than 3 characters long;
- Each setting must have its own qualifier, if any;
- If no parameters are used, PLANT assumes, that it is desired to consider the whole flow domain, in space and in time, as a place to apply the settings.

- Many more examples can be found in sections 3 and 4 of this document.

The **Switch** extension:

Switches are qualifier extensions which comprise logical expressions following the REGION or PLACE qualifier and preceded by a forward slash, thus:

REGION(1,NX,1,NY,1,NZ,1,3) /LG(1).AND.ISWEEP.EQ.LSWEEP-10

PLACE(0.,XULAST,0.,10.,0.,ZWLAST,1.,3.) /IX.GT.NX-10.AND..NOT.BFC

A switch may occupy the rest of the command line; but no continuation is allowed; and there may be no more than one switch.

The switch, like the parameter, provides a further condition to be fulfilled before the setting is activated.

Examples now follow.

**Example 1.** Time-dependent setting of density.

If it is desired to make the first-phase density equal to the reciprocal of the first-phase enthalpy for the whole domain up to and including the third time step, but only when LG(1)=T in Q1, the following does what is needed:

RHO1=GRND {PRPT01} DEN1=1./H1 REGION(1,NX,1,NY,1,NZ,1,3) /LG(1)

The /LG(1) switch specifies that the relationship, DEN1=1./H1, will be used only if LG(1)=T appears in Q1.

**Example 2**, extracted from Case Y602 of the PLANT library, which
should be examined if the full story is required.

AZYV=GRND {SCYS01} YRAT=1.+:POWER:*DZ/(ZWADD+ZW) REGION(1,1,1,1) /IZ.LE.20 {SCYS02} YRAT=1.+:POWER:*(-1.)*DZ/(ZWADD+ZW) REGION(1,1,1,1) /IZ.GT.20.AND.IZ.LE.40 {SCYS03} YRAT=1.+:POWER:*1.*DZ/(ZWADD+ZW) REGION(1,1,1,1) /IZ.GT.40

The above three statements make the domain width a power law function of the downstream distance of the current slab (ZW). The power is changed with Z-direction in a step-wise manner. It is positive over the first 20 slabs, negative over the next 20 slabs and positive again for the remainder of the domain.

Note that the first four arguments of REGION are set to unity, in order that the setting of YRAT, which can have only one value for the whole slab (and for all times in this steady-flow example), is computed once only.

The **IF** qualifier is a convenient alternative to REGION
and/or PLACE followed by a switch.

The reason is that it can be placed on the line below the REGION or PLACE statement, and so provides space for longer logical expressions.

It can also be used without any REGION or PLACE qualifier, in which case it applies either to the whole space-time domain, or, if it exists, to a preceding PATCH command.

The syntax is: IF( logical expression )

For example, the following REGION qualifier with switch

REGION(1,NX,1,NY,1,NZ,1,3) /IZ.GT.NZ-10.AND..NOT.BFC

can be expressed by way of IF, as:

REGION(1,NX,1,NY,1,NZ,1,3) IF(IZ.GT.NZ-10.AND..NOT.BFC )

Examples now follow.

**Example 1**, extracted from Case Y618 of the PLANT library, which
should be examined if the full story is required.

{SC0301} TFAL=1/(SQRT(U1**2+W1**2+V1**2)/$ AMIN1(DXU2D*1,AMIN1(DYV2D*1,DZ*1))+$ RG(1)/AMIN1(DXU2D*1,AMIN1(DYV2D*1,DZ*1))**2) IF(ISWEEP.GT.200)

This example shows how the local self-steering false-time step, TFAL, is set to the reciprocal of the local velocity vector magnitude divided by smallest distance between walls of continuity cell in question plus local diffusivities, i.e. kinematic viscosities, RG(1), divided by the smallest distance squared.

The tag {SC0301} tells that the variable TFAL is calculated right at the start of each IZ-slab. The IF qualifier provides that it will be done for all sweeps greater than 200.

**Example 2**, modified extraction from Case Y618 of the PLANT library
continuing the previous example.

This example provides the momentum sources for the local false-time under-relaxations for three components of velocity.PATCH(RELAX,PHASEM,1,NX,1,NY,1,NZ,1,1) {SORC97} CO=1./TFAL COVAL(RELAX,U1,GRND,SAME) IF(ISWEEP.GT.100) {SORC98} CO=1./TFAL COVAL(RELAX,V1,GRND,SAME) IF(ISWEEP.GT.200) {SORC99} CO=1./TFAL COVAL(RELAX,W1,GRND,SAME) IF(ISWEEP.GT.300)

The IF qualifier makes it possible to activate the settings at different calculation stages: these for U1 will start to work after 100 sweeps, for V1 after 200 sweeps, while these for W1 are triggered after 300 sweeps.

**Remarks** concerning the use of IF qualifier:

The above examples have illustrated only a few aspects of the ways in which the IF qualifier may be used. The followings additional points should also be noted :

- The IF commands must close the block of PLANT-related statements following immediately the settings or other qualifiers, if any. No blank or comment lines are allowed.
- The following may be used in the logical expression:
- logical constants;
- variables of integer types, recognised by GROUND, with the exception of IX and IY;

- Logical expressions must be built as FORTRAN dictates.
- The permissible size of argument expressions is limited by the length of one command line available. No continuation is allowed.
- If the 3rd argument of a source-setting COVAL is
*not*GRND, the use of the IF qualifier for the VAL setting is not allowed.