This facility may be used for variables which the user wishes to inspect, but which play no part in the calculation. RHM1, in an example in section 4.2, was of this character.
Library case s603 can serve as an example. It concerns the heating of a solid block under various conditions of constraint.
The exact solutions are provided by In-Form statements here, wherein:
Whether the computed solutions are adequate can the be deduced by inspecting the RESULT file, of which a part is shown here.
This case is, incidentally, the In-Form equivalent of a much-earlier PLANT-using example, Case z118, where the PLANT-style formula for the exact solution can be seen, for comparison with the In-Form-style one.
There is an obvious similarity; but the advantage of the In-Form approach is, of course, that no new Fortran coding is required.
The contour plot shown here reveals that there is indeed a substantial region of uniform stagnation pressure, despite the coarseness of the grid.
This is easily contrived by means of an In-Form stored statement.
The following images show:
If however the logarithm of the concentration has been computed, its variation, being less extreme, is easier to display.
The STORED-command formula can be optionally followed by 'with condition', where condition is one of:
These may be understood by recalling that PHOENICS calculations are organised in nested iterative loops, whereby:
These 'with' conditions act as economy devices, enabling values to be updated only when needed. If no condition is supplied, In-Form takes ZSLFIN as its default.
Inspection of the Q1 for case 805 will show that 'with SWPFIN' was used.
5.2 Whole-field, for participation in the
Auxiliary variables may be stored whole-field, and computed within the main equation-solving loop, for many purposes, including those of acting as intermediaries in the calculation of sources or fluid properties.
* Temperature (STORED of T1 is H1/CP) * Heat capacity (STORED of CP is 4186.8*POL3(T1,.616,-.0040428,1.8333e-5,-2.38E-08))enable the stored-only temperature, T1, to be computed from the solved-for enthalpy.
Here it should be noted that the calculation of T1 makes use of CP, and that of CP makes use of T1. Divergence is a possibility in such cases; but it does not arise in this case because the dependence of CP on T1 is small. Inspection of the Q1 file shows that the so-calculated T1 is used extensively for further property calculations.
(STORED VAR FLIQ IS MAX(1.e-5,MIN(1.,(TEMP-:RG(1):)/(:RG(2):$ -:RG(1):)))) PATCH (iMUSHY,VOLUME,1,NX,1,NY,1,NZ,1,1) (SOURCE OF U1 AT iMUSHY IS (0-U1)*:RG(3):*(1-FLIQ)/FLIQ) (SOURCE OF V1 AT iMUSHY IS (0-V1)*:RG(3):*(1-FLIQ)/FLIQ)enable the liquid fraction to be deduced from the temperature during the casting of a metal alloy, and thereafter the momentum sinks to be computed.
(STORED of DM is 1.-AM-BM-CM-EM)deduces the concentration of a fifth not-solved-for concentration, DM, to be computed from the solved-for values of the four other components of a mixture.
This, it should be remarked, as a display-only action; for DM appears not to be used during the computation.
Other auxiliary variables which In-Form can create are:
The MAKE keyword is used for the allocation of memory for storage of real variables required by the user.
The complete format of the In-Form MAKE statement is:
If 'dimension' is more than 1 it should be equal to the number of cells in one slab NX*NY. Its default value is unity.
If an expression is used, it must involve only quantities such as NX, LSTEP, NTPRIN. which are known at the start of the calculation; for that is the moment at which the storage has to be allocated.
When a single real variable is to be declared, it suffices to specify only its name. Thus, the following In-Form statements are all equivalent:
Single variables declared in this way can subsequently be used in any In-Form statement.
The (MAKE statement is usually followed by one which uses the STORE1 keyword, the purpose of which is to show how the value of the variable is to be altered during the course of the computation. Its syntax can be deduced from the following examples.
Examples of the use of a single variable are:
An example of the use of MAKE for a real array is to be found In library case 786, which supersedes the earlier PLANT case z350:
Other relevant cases in the Input-File Library include:
779 and 783.