Encyclopaedia Index

2. The functions of PLANT

Contents


At present, PLANT is capable of creating GROUND coding for:

What PLANT provides

Usually it will be non-linear relationships which will be provided by way of PLANT, because linear relationships can be introduced using PIL.

The coded relationships are normally used over the whole computational domain.

They can however be restricted to specific sub-domains and/or controlled by logical and relational conditions, by either REGION or PLACE and IF commands, where the latters are the special PLANT commands.

PLANT statement syntax

Click here to return to "Contents"

The ?? wildcards represent a (section-consecutive) sequence number. This is one of the numbers up to 99 .

The lines must start in column 3 or more so that Satellite treats them as comments.

The remainder of the lines contain the formulae, or rather the relationships, provided by the user.

Dollar sign ($) as the last character on a line is treated as a continuation symbol.

Further operations

PLANT also reads the next lines which contain COVAL, REGION or PLACE and IF commands.

These indicate how the formulae should be applied and together with statement lines form the PLANT instruction block.

REGION

command has the syntax:

REGION (IXF,IXL,IYF,IYL,IZF,IZL,ITF,ITL) { mark } / switch

It has 8 arguments, one parameter and one switch, namely (in order):

IXF index number of first cell in X-direction
IXL index number of last cell in X-direction
IYF index number of first cell in Y-direction
IYL index number of last cell in Y-direction
IZF index number of first cell in Z-direction
IZL index number of last cell in Z-direction
ITF index number of first time step
ITL index number of last time step
mark value of marker variable, MARK, of real type (optional)
switch FORTRAN logical or relational expression (optional)

PLACE

command has the syntax:

PLACE (CXF,CXL,CYF,CYL,CZF,CZL,FT,LT) { mark } / switch

It has 8 arguments, one parameter and one switch, namely (in order):

CXF - coordinate of the west region boundary; CXL - coordinate of the east region boundary; CYF - coordinate of the south region boundary; CYL - coordinate of the north region boundary; CZF - coordinate of the low region boundary; CZL - coordinate of the high region boundary; FT - start time; LT - end time; mark - value of marker variable, MARK, of real type (optional); switch - FORTRAN logical or relational expression (optional).

Switch logical expression must have a syntax of FORTRAN construct and must be fully recognised by EARTH.

The permissible size of switch expression is confined by the length of the current REGION or PLACE command lines available, no continuation is allowed, so far.

The REGION or PLACE commands, if present, must immediately follow the {SC????} statements and COVAL command and start in column 3 or greater.

IF

command has the syntax:

IF (logical expression).

The logical expression must have a syntax of FORTRAN construct and must be fully recognised by EARTH.

Its size is limited by the length of the current line available, no continuation is allowed, so far.

The IF command, if used, must follow immediately the COVAL, REGION or PLACE commands and start in column 3 or greater.

Further operations

Then PLANT continues to read all strings as above until the end of Q1.

Afterwards PLANT edits the file GROUND.FOR to include the automatically generated FORTRAN coding, required for whatever expressions and conditions have been specified.

The FORTRAN which is coded accords with the rules of GROUND- Earth interactions.

Completing operations

After the above,

1) the new GROUND must be compiled

2) a new Earth executable must be created

3) the new Earth must be run so as to perform the flow-simulation calculation.

These three operations are made automatically.

Any existing GROUND.FOR is copied to GROUND.SAV and a blank model GROUND.FOR is used as the starting-point for editing.

A copy of the code inserted is available for inspection in a file called PLTEMP.

Important notes

Click here to return to "Contents"


2.1 Time-step specification

PLANT permits specification of expressions in the Q1 file for DT, which is the name used to denote the values for the current time-step size in response of the pointer, TLAST=GRND

Introduction of special time-step

To introduce special time-step formula, the user should provide, in Group 2 of the Q1 file, lines beginning with the tag:

{SCTS??} DT={expression}

An example of time-step specification

An example is the calculation of the second time-step as X-coordinate of the midlle-domain cell divided by U1-velocity pertaining to this cell.

The PLANT block:



        {;SCTS01> DT=XG2D/U1

        REGION(NX/2,NX/2,NY/2,NY/2,NZ/2,NZ/2,2,2)

instruct EARTH to visit Group 2 of GROUND for a value of DT calculated within the sub-domain, in space and in time, indicated by arguments of REGION.

Further example.

Click here to return to "Contents"

2.2 X-, Y-, and Z-direction grid specifications

PLANT permits specification of algebraic expressions in the Q1 file for XRAT, YRAT and DZ which are the names used to denote the values for:-

Introduction of special grid specifications

To introduce special formulae for the grid steps, the user should provide, in Group 3, and/or 4 and/or 5 of the Q1 file, lines beginning with the tags:

{SCXS??} XRAT={expression}
{SCYS??} YRAT={expression}
{SCZS??} DZ={expression}

Some examples to be found in the PLANT Input File Library are as follows:

* for the current width of the domain:



      {SCYS01> YRAT=1.+:POWER:*DZ/(ZWADD+ZW)

      REGION(1,1,1,1)

      IF(IZ.LE.20)

* for forward step size:



     {SCZS02> DZ=DZL*(1.-0.02*TEMP[,1,-1]/:TJET:)

     IF(IZ.GT.2)

Further examples

It might be desired to set YRAT, the multiplier of the previous XULAST which gives the current YVLAST, to vary with Z so as to accommodate a boundary layer in parabolic calculations (PARAB=T), which would necessitate local determination of the width of the layer in order that edge velocities should be sufficiently close to the free-stream values.

The statement



      {SCYS01> YRAT=1.+0.5*DZ/(RG(1)+ZW)

gives the dependence similar to laminar boundary layer near the flat plate, where The RG is PIL-set parameter.

If the problem is stated in the X-Y plane, user should perform an exactly corresponding actions for the X-direction domain width, XULAST, so that performed above for XULAST using AZYV=GRND as a pointer, {SCXS??} as a tag and XRAT as variable name of the statement.

The following block may be used to make the step size DZ a fixed fraction, RG(1), of the calculation domain width XULAST in parabolic calculations for all IZ-slabs greater or equal to 5 when the number of cells in X-direction is greater than unity.



      {SCZS01> DZ=RG(1)*XULAST

      REGION(1,NX,1,NY,5,NZ,1,1)

      IF(PARAB.AND.NX.GT.1)

Further examples of expanding/contracting and adaptive grids .

Click here to return to "Contents"

2.3 Body-fitted coordinates

When BFC equals T in Q1 file, user can introduce the formulae to calculate the corner coordinates of a body-fitted grid to create the geometry and corresponding grids by way of parametric analitics. PLANT therefore provides the possibility of amending these geometrical entities, say with time.

PLANT will place the corresponding codings in Section 2 of Group 19 of GROUND.FOR so that the geometry can be changed in accordance with time at first sweep for all time steps.

Introduction of body-fitted coordinates

The format of PLANT statements in Q1 Group 6 is as follows

{MXYZ01> XC= { expression }
{MXYZ01> YC= { expression }
{MXYZ01> ZC= { expression }

where the tags {MXYZ??} tell PLANT that the corresponding expressions should be coded to calculate the cartesian coordinates, XC, YC and ZC, of the corners of continuity cells.

An example of body-fitted coordinates

For example, the Q1 settings

BFC=T
REAL(LITTLER,TWOPI)
LITTLER=1.0;TWOPI=2.0*3.14157
NX=8;NY=6;NZ=1
     {MXYZ01> XC=:LITTLER:*FLOAT(J-1)/FLOAT(NY)*$
      COS(:TWOPI:*FLOAT(I-1)/FLOAT(NX))
     {MXYZ01> YC=:LITTLER:*FLOAT(J-1)/FLOAT(NY)*$
        SIN(:TWOPI:*FLOAT(I-1)/FLOAT(NX))
     {MXYZ01> ZC=FLOAT(K-1)/FLOAT(NZ)
CSG1=PHI;CSG2=XYZ

set the BFC grid for a circle of unity radius in XY plane. The corner coordinates will dumped to X1 file and calculation results to P1 file for examination via PHOTON.

Further examples of analytical grid generation including moving BFC option are illustrated below.

Example 1, 2, 3, 4, 5, 6, 7, 8, 9, 10.

Click here to return to "Contents"

2.4 Terms in equations

Introduction of extra convection

An example of extra-velocity specification

Click here to return to "Contents"

2.5 Non-linear property laws

Introduction of special fluid-property relations

An example of special fluid-property relations

A further example

Click here to return to "Contents"

2.6 Interphase-transport features

Introduction of interphase-transport features

Examples from the input-file library

A further example

Click here to return to "Contents"

2.7 Initialisation of variables and porosity field

Examples of initialisation

A further example

Click here to return to "Contents"

2.8 Non-linear boundary conditions and source laws

Examples of boundary conditions

Further examples

Click here to return to "Contents"

2.9 Special calculations and output control

Introduction of special calculations

Examples from the library

Click here to return to "Contents"

2.10 Reference residuals

Introduction of reference residual

An example of reference residual specification

Click here to return to "Contents"

2.11 Under-relaxations

Introduction of under-relaxation

An example of under-relaxation

Click here to return to "Contents"

2.12 Limits on variables and increments to them

Introduction of limits and increments

An example of limits and increments

Click here to return to "Contents"

2.13 Global summation

Introduction of global summation

An example of global summation

Click here to return to "Contents"

2.14 Marker Allocation Procedure

Introduction of marker allocations

An example of marker allocation

A further example of marker allocation

Further information

At present, eight classes of functions are available. They are:

name shape orientation
BOX rectangular box any
ELLPSD ellipsoid any
SPHERE sphere any
XYBOX rectangular box XY plane
XYCIRC circle XY plane
XYELLP ellipsoid XY plane
XYWEDG triangular wedge XY plane
YZBOX rectangular box YZ plane

Many shapes of arbitrary complexity can be generated by combinations of above functions in planted expressions as exemplified for field initialisations. The number of further examples are shown below.

Click here to return to "Contents"

2.15 The grid-free operations

Click here to return to "Contents"

2.16 Indexed Variable Operations

An example of fixed indices

Examples of indices relative to the current cell location

A further example

Click here to return to "Contents"

2.17 Logical and conditional operations

An example of command switch

An example of IF command

Click here to return to "Contents"