Encyclopaedia Index

1. General description of PLANT

  1. How to use this document
  2. The programmability of PHOENICS
  3. Why PLANT was created
  4. What PLANT does
  5. The language and syntax of PLANT

1.1 How to use this document

(a) The purpose of the document

The purpose of this document is to enable its readers to become proficient users of the PLANT feature of PHOENICS.

Those readers are supposed to be:-

They will however have to write something, namely a few lines of "PLANT-language" for inclusion in the otherwise-standard input file of PHOENICS, ie the "Q1 file".

This document therefore explains the (rather few) words and the simple syntax which make up the PLANT language; it then exemplifies its use extensively.

(b) How the document is arranged

All the main features of the PLANT language are explained in Section 1.5 of this introduction.

Then Section 2 of the document explains how the language is used to activate the various functions of which PLANT is capable.

Section 3, which is structured similarly to Section 2, provides systematic exemplifications of those functions, one by one. Then Sections 4 and 5 provide more complex examples which employ several of the PLANT functions simultaneously.

A Glossary is provided in Section 6 .

(c) Suggestions as to how the document may be used

The document is designed for being read by means of a "web browser" program, which will enable the reader to profit from the numerous hyper-text links which are provided.

Nevertheless, it is recommended that, on first approaching PLANT, the reader proceeds "linearly" as far as the end of Section 1, in order that he or she becomes sufficiently acquainted with the main ideas and the essential.

Thereafter it will be best for the reader to be guided by personal interest in the topics appearing in the list of contents, jumping from Section 2 where a topic is described to Section 3 where it is exemplified.

Visits to the glossary (Section 6) can be made as necessary, for reminders and further explanations.

1.2 The Programmability of PHOENICS

PHOENICS has always been a user-programmable code, enabling users conversant with FORTRAN to extend greatly the already-extensive flow-simulation capabilities of PHOENICS.

This capability has allowed users to introduce, among other things:

Users have placed their coding in a subroutine called GROUND, and other related ones, in accordance with prescribed rules, guided by numerous examples.

Their task has been aided by the provision of a library of auxiliary subroutines (the FN..s) which reduce the user's needs to write DO-loops and arithmetic expressions for himself.

Many examples of how PHOENICS users have exploited these facilities, with ingenuity and success can be found in the pages of the PHOENICS Journal.

Click here to return to start of Section 1

1.3 Why PLANT was created
For whom

There exist however many users who, although they know what extended simulation capabilities they would like to have, lack sufficient confidence in their use of FORTRAN or in their understanding of just how PHOENICS organises the computations, to attempt to exploit the available GROUND-coding facilities.

Even those who are confident and skilled enough to introduce their own coding successfully have sometimes found it troublesome to do so. Mistakes are easy to make, yet often hard to detect; and the operation is time- consuming in any case.

PLANT has been created to assist both these classes of user, by enabling them to pay attention only to the precise definition of their objectives, secure in the knowledge that the coding will be done for them, correctly and swiftly.

Moreover, since the coding which is created by PLANT can be examined, PLANT also serves as an instructional tool; for it provides examples which the non-confident user can copy, and even modify.

Moreover, since the FORTRAN which it writes is unsophisticated, PLANT gives more proficient users the pleasure of surpassing it in elegance and efficiency.

The following diagram shows how, without PLANT, the user had to perform TWO operations to introduce new model coding into EARTH; but with PLANT only one.
Diagrammatic representation.

By whom

PLANT was created by CHAM's Moscow branch, CHAM-MEI, as an aid to users of the re-compilable Shareware version.

It was then adopted by CHAM, and given advanced-PIL capabilities such as DO-loops , algebraic recognition, and IF-THEN-ELSE logic.

Subsequently, both CHAM and CHAM-MEI have been collaborating to extend PLANT's capabilities, recent developments being:

CHAM's development team will welcome suggestions for further extension.

Click here to return to start of Section 1

1.4 What PLANT does

(a) PLANT-language settings in Q1

PLANT extends the data-setting capabilities of the PHOENICS-SATELLITE Q1 file by providing language for the setting of problem-defining data of a complexity which requires Fortran coding to be added to GROUND.

The user inserts into the Q1 the few lines, written in the said language, which suffice, when interpreted by the SATELLITE module, to create the much-larger number of lines of Fortran which the GROUND subroutine needs, in order to express the user's data-setting requirements.

Thereafter, PLANT automatically arranges for the compilation of this sub-routine and for the linking of its object file with the PHOENICS-EARTH solver executable.

A typical block of PLANT-language lines, used for setting the time step so as to depend upon cell-average velocity, is:

TFRAC(1)=-25.0; TFRAC(2)=1.0
  {SCTS01> UAV = SUM (SQRT(U1**2+V1**2+W1**2)/(NX*NY*NZ))
  TEXT(Arithmetic mean velocity)

Here the 3rd, 4th and 5th lines are written in PLANT-language, while the two preceding ones make associated PIL settings.

The full explanation of PLANT language and syntax will be provided in Section 1.5 below; but, even without this, it can be recognised by those who know Fortran, that the third line is probably computing an average velocity, UAV, from the sums of root-mean-square velocities for individual cells.

Then the fourth line is evidently dividing the largest of the domain dimensions by this average velocity in order to obtain the time step, the magnitude of which is thus likely to vary from step to step.

During the presentation of Section 1.5 it will indeed become apparent that almost all PLANT statements are similarly easy to interpret.

(b) Creating the Fortran coding

As is easy to understand, the calculation of the average velocity requires some Fortran coding. This is could be created easily by an expert, or even by a beginner. But easier still, for both, is to let PLANT create the coding, automatically.

This occurs, as soon as the SATELLITE run is complete, provided only that the Q1 file contains the setting:

Here,MOSG, is an acronym for "maker of special GROUNDS". It is what the user must set in order that the SATELLITE should take notice of the PLANT-language entries in Q1.

(c) Compiling and linking

The necessary compilation of the GROUND subroutine, with its "imPLANTED" Fortran coding, can be effected by the user's invoking the appropriate "compile" script; and the subsequent linking of the EARTH module can be effected by invoking the script "bldear",

However, these tasks are performed automatically if the "runsat" script is employed at the start. The user is therefore advised to make use of that script unless he has special reasons for personal intervention.

(d) Executing the PHOENICS solver module, EARTH

It will be no surprise to learn that "runsat" also takes care of the activation of the solver module also.

Click here to return to start of Section 1