Encyclopaedia Index

SPEDAT

SPEDAT is a PIL command which is used for transmitting SPEcial DATa from the Q1 file to GROUND, such data being the ones for which no PIL variables or functions already exist.

It thus enables limitations of PIL to be easily circumvented; but its use requires the provision in EARTH or GROUND of the appropriate data-using coding.


Contents

  1. Using SPEDAT for setting data
  2. GROUND-coding Fortran statements for getting the data
  3. How the data are transmitted to EARTH
  4. Examples of the use of SPEDAT
  5. Other arguments of SPEDAT

1. Using SPEDAT for setting data

The full syntax of the PIL command, when used for SETting data, is:

SPEDAT(SET, CONTEXT, VARNAME, TYPE, VALUE)

where:

For example, inclusion in the Q1 file of the line:

SPEDAT(SET, new_idea, new_variable, r, 11.e3)

will cause the following to be written into the EARDAT file:

NEW_IDEA NEW_VARIABLE R 1.10000E+04

This line is subsequently read by EARTH; and its content is used in the subsequent flow-simulating calculation.

NOTE !! It is permitted (since PHOENICS-3.1) to replace SET by S, or even to omit it (and the comma which follows it) altogether.


2. The GROUND-coding Fortran statements for getting the data

The reading and interpretation of the EARDAT line in EARTH requires the presence, usually in a GROUND subroutine, of the following line, or its equivalent:

CALL GETSPD('NEW_IDEA','NEW_VARIABLE',1, RVAL, IVAL, LVAL, CVAL, IERR)

Warning: Here the quotes are essential !

Then the real variable RVAL will be set equal to 1.1E4 .

The third argument indicates which of the four following arguments is to be taken, as follows:

  1. REAL value via RVAL;
  2. INTEGER value via IVAL;
  3. LOGICAL value via LVAL; and
  4. CHARACTER value via CVAL

Because the GETSPD command has rather many arguments, it is sometimes preferable to use whichever is appropriate of the following four subroutines in the GROUND Fortran file:


3. How the data are transmitted to EARTH

At the time of creating the EARDAT file, the PHOENICS Satellite module writes the SPEDAT data as indicated in the following examples, in which the first integer indicates how many following lines are to be read by EARTH.


4. Examples of the use of SPEDAT, GETSPD, GETSDR, etc can be found in the Encyclopaedia, in the input-file libraries and in the corresponding open-source Fortran files, as follows:


5. Other arguments of the PIL command

SET is not the only possible first argument of the SPEDAT command. Others are:

They are not often used, because SPEDAT statements are usually introduced by hand-editing, which allows more direct methods of de-activating previously-made settings; but they have their uses in complex multi-purpose Q1s, controlled by PIL-logic constructs.


wbs