The PHOENICS Input Language, here called PIL for short, is a simple language employed by the PHOENICS user for "conversing" with the SATELLITE program and for inserting instructions into Q1 files; and it is also used by EARTH for recording what instructions have been received, at the top of the RESULT file, when ECHO is set = T.
Like other languages, it is best learned by observation and practical exercise. However, the following summary will provide guidance as to what can most profitably be observed and practised; and the PHOENICS Encyclopaedia serves as a complete dictionary and grammar book.
PIL is a "command language"; and the various commands which it contains are best classified as:
These will be discussed, in turn, below. Before this, however it will be explained how "comments", ie NON-commands can also be entered.
Statements for interpretation by the SATELLITE must begin in the first or second columns, thus, either of the following TEXT commands will be interpreted by SATELLITE:
column 1 2 TEXT(SIMULATION OF HEAT EXCHANGER) or TEXT(SIMULATION OF HEAT EXCHANGER)
PIL ignores all other statements. Thus:
THIS IS Q1 OF 7 OCTOBER.
can be inserted as a useful comment in a Q1 file without its being noticed by SATELLITE except as something to be copied faithfully into the COPY file, because it does not start in the first or second column.
If, during interactive (TALK = T) working, the user forgets to return the cursor completely to the left before he enters a command, and therefore starts typing in column 3 or beyond, SATELLITE will take no notice of what he types.
NX=25
IPLTL=LSWEEP
NY=NX/2
or:
RHO2=1.E3
PRNDTL(H1)=0.7
RHO1A=PRESS0**(-RHO1B)
or:
ECHO=T
PARAB=F
YZPR=CARTES
ONEPHS=ISLN(R2).EQ.1
or:
RHO1=1.0; RHO2=1.E3
will set both the first-phase and the second-phase densities.
command (argument 1, argument 2, argument 3, etc).
SOLUTN(U1,Y,Y,N,N,N,N)
informs the SATELLITE program that:
PATCH(REGION1,INIVAL,1,4,2,8,1,10,1,1)
which indicates that:
COVAL (REGION1,U1,0.0,3.2)
the meaning of which can be learned by typing simply:
COVAL?
during an interactive session.
These operators have the same significances as in FORTRAN, ie they add, subtract, multiply, divide and exponentiate.
He or she may also make use of the following arithmetic functions, all of which have the same significances as their Fortran counter-parts. With the exception of IABS, all take a single REAL argument and return a REAL value (implicit "floating" being performed on INTEGER arguments):
ABS | COS | EXP | ACOS | COSH |
IABS | SIN | LOG | ASIN | SINH |
SQRT | TAN | LOG10 | ATAN | TANH |
after:
REAL(XX,YY,ZZ); INTEGER(II,JJ): XX=4.0
YY=SQRT(XX) | is equivalent to | YY=2.0 |
YY=2*6+(4/LOG10(100) | is equivalent to | YY=14.0 |
ZZ=COS(0) | is equivalent to | ZZ=1.0 |
II=IABS(3) | is equivalent to | II=3 |
REAL(windvel,angle)
would allow SATELLITE to accept statements such as:
angle=1.0; windvel=10.0*cos(angle); and
INTEGER(extraswp)
would permit use of statements such as:
LSWEEP= LSWEEP + extraswp
REAL (DENSTY,WIDTH,POWER) INTEGER (NGRID)
Unless subsequently assigned by the user, DENSTY, WIDTH and POWER default to 0.0; and
NGRID to 0.
Up to 150 integer and 300 real variables may be declared in this way; should
more be needed, the corresponding arrays in the MAIN program of SATELLITE can be
re-dimensioned.
REAL(DENSTY,WIDTH,POWER,GAM) INTEGER(NGRID) DENSITY=1.2;
WIDTH=0.012; POWER=1.0
GAM=1.2; NGRID=3; RH01=2.0*DENSTY; RH02=1000.0*RH01
PRNDTL(VI)=PRNDTL(HI)*GAM
NX=NY/2+1
GRDPWR(Z,NGRID+3,6.0*WIDTH/2.0,POWER)
PATCH(4,CELL,1,1,NY/2,NY,1,1,1,1)
The coefficient 0.023 * rho * u * (rho*u*d/mu) ** (-0.2) which can arise in studies of turbulent pipe flow, might be set as follows:
REAL(COEF,DIST,DENS,VELCTY,VIS RHOU) DIST=0.0254; DENS=1.2; VELCTY=4.2; VIS=1.E-5 RHOU=DENS*VELCTY COEF=.023*RHOU*(RHOU*DIST/VIS)**(-0.2)
SEE R (or SEE REAL) SEE I (or SEE INTEGER)
LSWEEPwill cause to appear on the screen:
Command>echo LSWEEP = 100or, rather, whatever is the current value.
SEE
This will exhibit on the screen, and print to satlog.txt, group-by-group, all the active variables, with their values.
SEE7
or
SEE 7
which gives information about what variables are solved for, or stored. Typing:
SEE13
correspondingly shows the entries of Group 13, which is concerned with boundary conditions and special sources.
SEE9
STORED
and
SOLVED
respectively.
VARIABLES
provides a list of the available field variables and their names, of which there are 50 by default (although this number can be indefinitely enlarged by making modifications to the main programs of the SATELLITE and EARTH).
All help entries are placed in the POLIS Encyclopedia. Users wishing to know what a variable or command mean should look them in the alphabetical list. There are several ways of getting to the Encyclopaedia:
wbs