It is hard to know in advance precisely what print-out will be required. Some users therefore call for much more than they are sure to need, just in case it will be found to be useful; but, in doing so, they create needless difficulties, burdening themselves with more paper or longer output files than they can possibly inspect.
Because of the ability easily to 'restart' a PHOENICS computation, it is best to call for only a small amount of output at first, concentrating perhaps on the 'residuals', and how they diminish with number of sweeps; and this should be viewed at the VDU, without recourse to the line printer. If the results of the computation are saved, by way of the SAVE=T setting in Group 24 (this is the default), it will always be possible to elicit desired output by making one more sweep with the appropriate settings in Groups 21, 22 and 23 (see AUTOPS).
Thus, a series of minimum-output runs may be made, by a succession of restarts, until it is judged that the solution is sufficiently converged to be interesting. Then a succession of single-sweep runs can be made, with various output options, until tables and plots containing the desired combination of information items, suitably displayed, have been elicited. Only at the end of this is it appropriate to cause the output actually to be printed.
When divergence occurs at the start of a run, printing out and inspecting the field values for the first two or three sweeps will often permit the cause to be discerned. For example, it may reveal that some variables have totally unrealistic values even at the start, possibly because of errors in coding introduced into GROUND; or the occurrence of low pressures near what is ostensibly an outflow boundary may reveal that inflow is occurring there.
It is rarely desirable that complete tables of field values are required to be printed; therefore, when fine-grid runs are being performed, a user who neglects the numerous print-out-control features of PHOENICS can impose a needless burden on himself. Attention is therefore drawn to the "output-thinning" variables NXPRIN, NYPRIN, NZPRIN, NTPRIN and NPRINT. In this connection, it may be convenient to make settings such as NXPRIN=NX/5 (actually the current defaults) in the SATELLITE; for these will keep the amount of print-out approximately the same, even when the values of NX, NY etc are changed.
The sizes of the output tables can also be limited by setting IXPRF, IYPRF, IZPRF, ISTPRF and ISWPRF to values in excess of 1, and those of IXPRL, IYPRL, IZPRL, ISTPRL, ISWPRL to values below NX, NY, NZ, LSTEP and LSWEEP respectively.
Finally, the use of PROFIL- and CONTUR -type patches, especially when the associated field values are printed out as numerical tables (see ITABL) can often provide all the numerical information which is needed. Then the regular field output can be dispensed with, by setting: OUTPUT (variable,N,,,,,).
PHOENICS 3.3 provides examples of how SPEDAT commands can be used for eliciting information of various kinds, including:
These capabilities will now be discussed one-by-one, by reference to:
a. The value of a particular variable
Core-input library case 340 contains the following almost-self-explanatory lines:
# the commands to print the value of v1 prevailing at ix=nx/2; iy=ny/2; iz=1 SPEDAT(PRINT,COMMAND5,C,VALUE_V1) SPEDAT(PRINT,IXLOC,I,:NX/2:) SPEDAT(PRINT,IYLOC,I,:NY/2:) SPEDAT(PRINT,IZLOC,I,1)
It is what follows VALUE_ in the fourth argument of the first line, and the contents of the fourth arguments of the three following lines, which determine what is printed.
Spedat print command is VALUE_V1 At ix = 5 iy = 5 and iz = 1 variable V1 has the VALUE = 5.154015E-03
The coding in group19 of GREX3 which produces this output is as follows:
ELSEIF(MOD(ISTEP,NTPRIN).EQ.0) THEN CALL WRIT40('Spedat print command is '//command) IF( .... ELSEIF(COMMAND(1:5).EQ.'VALUE') THEN CALL GETSDI('PRINT','IXLOC',IXLOC) CALL GETSDI('PRINT','IYLOC',IYLOC) CALL GETSDI('PRINT','IZLOC',IZLOC) CALL GETVAL(COMMAND(7:10),IXLOC,IYLOC,IZLOC) ENDIF ENDIF
b. The maximum and minimum values of a variable
# the command to print the minimum and maximum values of u1 SPEDAT(PRINT,COMMAND3,C,MINMAX_U1)
Evidently, it is what follows MINMAX_ in the fourth argument of SPEDAT which indicates the variable in question; and this time there is no need to specify a location, for where the minimum and maximum values are to be found will be worked by EARTH.
Spedat print command is MINMAX_U1 hilo3d called for U1 Highest & lowest values of ....... U1 highest = 3.913156E-02 lowest =-3.992829E-02 ixhigh = 4 iyhigh = 8 izhigh = 1 ixlow = 6 iylow = 3 izlow = 1
ELSEIF(COMMAND(1:6).EQ.'MINMAX') THEN CALL WRIT40('hilo3d called for '//COMMAND(8:11)) CALL HILO3D(LBNAME(COMMAND(8:11))) CALL WRITBL
Users accustomed to performing their own Fortran coding may care to note that HILO3D(LBNAME(name of 3D-stored variable)) is available for inclusion in their own coding.
c. The total amount of a variable in the whole field
# the command to compute the total of temperature SPEDAT(PRINT,COMMAND1,C,TOTAL_TEMP)
Evidently, it is what follows TOTAL_ in the fourth argument of SPEDAT which indicates the variable in question;
Spedat print command is TOTAL_TEMP total whole-domain amount of TEMP TOTAL = 1.930567E-03
ELSEIF(COMMAND(1:5).EQ.'TOTAL') THEN CALL SUMALL(SUM,COMMAND(7:10)) CALL WRIT40('total whole-domain amount of '// COMMAND(7:10)) CALL WRIT1R('TOTAL ',SUM) CALL WRITBL
d. The mass-average value of a variable in the whole field
Evidently, it is what follows AVE_ in the fourth argument of SPEDAT which indicates the variable in question;
Spedat print command is AVE_C1 mass-average value of C1 average = 6.982114E-01
IF(COMMAND(1:3).EQ.'AVE') THEN CALL AVERAGE(AVE,COMMAND(5:8)) CALL WRIT40 ('mass-average value of '//COMMAND(5:8)) CALL WRIT1R('average ',AVE) CALL WRITBL
e. Normalised and "power-lawed" values of a particular variable
# giving h1 the necessary four-character name NAME(H1)= TEMP # storing density because it is needed for computation of totals STORE(DEN1) # the command to compute the total of temperature SPEDAT(PRINT,COMMAND1,C,TOTAL_TEMP) # storing c1 as a place to put (temp - tempmin)/(tempmax - tempmin)**power STORE(C1) # the command to compute and store the above quantity SPEDAT(PRINT,COMMAND2,C,POW_TEMP_C1) # the power to be used SPEDAT(PRINT,POWER,R,0.5)
Evidently, it is what follows POW_ in the fourth argument of SPEDAT which indicates the variable in question;
Field Values of C1 IY= 10 9.963E-01 8.697E-01 7.894E-01 3.253E-01 C1 holds "power-lawed" values of TEMP power = 5.000000E-01
IF(COMMAND(1:3).EQ.'POW') THEN c.... do this before the istep test so that result is included in phi CALL GETSDR('PRINT','POWER',POWER) IF(MOD(ISTEP,NTPRIN).EQ.0) THEN CALL WRIT40(COMMAND(10:13)// 'holds "power-lawed" values of ' //COMMAND(5:8)) CALL WRIT1R('power ',POWER) ENDIF CALL PUT_POWER( COMMAND(5:8) , COMMAND(10:13),POWER ) CALL WRITBL
f. how the total number of commands is indicated
# the number of commands SPEDAT(PRINT,NUMBER,I,5)
Evidently, it is the fourth argument of SPEDAT which tells EARTH how many print commands to look for.
c.... print-out elicited by SPEDAT('PRINT', ... statements in Q1 IF(ISWEEP.EQ.FSWEEP) THEN IF(ISTEP.EQ.1) THEN c.... get number of special-print commands NUMSPPR=0 CALL GETSDI('PRINT','NUMBER',NUMSPPR) ENDIF ENDIF IF(NUMSPPR.GT.0) THEN
(see OUTPUT)
(see XZPR)
(see IURPRN)
(see NPRMNT)
(see NPRMON)
(see GROUPS 20-24)
(see INIFLD)
(see TEXT)
(see ISWPRF)
(see ISTPRF)
(see ISWPRL)
(see ISTPRL)