Encyclopaedia Index
TMP1, a PIL real variable for setting first-phase temperature, when the variable TEM1 is not being solved for directly.

TMP2 is the corresponding variable for second-phase temperature.

It acts in one of four ways:-

1. ### Setting uniform temperature.

If TMP1 is set to a value outside the range from -10110.0 (i.e. GRND) to -10210.0 (i.e. GRND10), then this value assigned to the temperature within the first-phase material in the domain of study, unless a STOREd variable named TMP1 also exists (see below).

2. ### The use of Ground coding

If TMP1 is set to GRND, temperature will instead be computed by Fortran coding which the user has placed in the GROUND subroutine, either directly or by the use of In-Form or PLANT.

3. ### The use of built-in options

If TMP1 is set to GRNDx, where x is one of 1, 2, 3, 4, 5, 6, 7 or 8, it acts as an indicator of which formula in the open-source Fortran file GXTEMPR.htm is to be used for deducing first-phase temperature from first-phase enthalpy.

Note that GRND9 and GRND10 are reserved for the use of GXSCRI.

The PIL variables:
TMP1A, TMP1B, TMP1C, TMP2A, TMP2B and TMP2C
are constants which may appear in the formulae, all but the first of which have the form :

T = (H - H_base) / Cp

where:

• T stands for temperature
• H stands for enthalpy or "stagnation enthalpy", i.e. enthalpy plus kinetic energy;
• H_base stands for the enthalpy of the material in question when T equals 0 on the temperature scale in question;
• Cp stands for specific heat capacity at constant pressure, which may or may not be a constant.

The possible settings of TMP1 are as follows, with the number on the left corresponding to x in the GRNDx to which TMP1 has been set in the Q1 file. Those for TMP2 are identical, with 2 in place of 1. In the following, F(L0H12+I) represents the current cell phase enthalpy, and F(L0CP12+I) represents the current cell phase specific heat.

1. TMP1=GRND1 selects temperature equal to: TMP1A. Note that this is un-needed option, because making TMP1 a non-GROUND constant has the same effect.

2. TMP1=GRND2 selects temperature equal to:
F(L0H12+I)/F(L0CP12+I) + TMP1A

H_base is set via the PIL variable TMP1A, which is evidently equal to minus H_base/ Cp .

3. TMP1=GRND3 selects temperature equal to:
F(L0H12+I)/F(L0CP12+I) + TMP1A + TMPCG*F(L0CB+I)

Here it is:
TMP1A + TMPCG*F(L0CB+I),
which represents - H_base / Cp.

This allows H_base to vary linearly in accordance with some scalar, for example the mass-fraction of some component of the fluid mixture.

The scalar represented by L0CB is C3 for Phase 1 ,and C4 for Phase 2.

4. TMP1=GRND4 selects temperature equal to:
F(L0H12+I)/F(L0CP12+I) +
TMP1B*AMAX1(0.0,F(L0CA+I)+TMP1C)

This allows H_base to depend in a more complex way on the scalar value, as when:

• the flow simulated concerns mixing-controlled combustion;
• the scalar is the "mixture fraction", i.e. the proportion of the local mixture which derives from the fuel-bearing inflow stream;
• TMP1C represents the stoichiometric mixture fraction, i.e. at which all the fuel has been oxidised.

The scalar represented by L0CA is C1 for Phase 1 ,and C2 for Phase 2.

5. TMP1=GRND5 selects temperature equal to:
(TMP1A - 0.5 * (U1**2 + V1**2 + W1**2)) /
F(L0CP12+I),
where TMP1A denotes a constant stagnation enthalpy and the expression containing U1, V1 and W1 is the kinetic energy.

This option is useful for adiabatic high-speed flows, in conjunction with the setting:
RHO1=GRND5, which selects the ideal-gas law.

6. TMP1=GRND6 selects the same formula as GRND5 except that the stagnation-enthalpy field, H1, is used instead of the constant TMP1A.
This is suitable for non-adiabatic flows, in which the stagnation enthalpy is a solved-for variable.
7. TMP1=GRND7 selects temperature equal to:
(enthalpy - TMP2B * Mfuel)/ F(L0CP12+I)

This option is used when the SCRS (i.e. Simple Chemical Reaction System) model of combustion is controlled by mixing (see COMBUSTION).

The mass fractions of fuel, product and oxidant are calculated from algebraic formulae involving the fuel- oxidant mixture fraction (which is solved as a dependent variable). The specific heat, CP1, should be set to GRND10, to activate the calculation of the specific heat of the fuel-oxidant-product mixture.

8. TMP1=GRND8 uses the same formula as GRND7, except that the mass fraction of fuel is solved as the dependent variable of its own transport equation, as is necessary when the combustion rate is kinetically controlled.
See REACT for the source options for the Mfuel equation.
9. TMP1=GRND9 activates SXSCRI

10. TMP1=GRND10 does likewise.

4. ### Setting TMP1 as a 3D-stored variable

When STORE(TMP1) is present in the Q1 file, the user has several ways of allocating it, including:
• By way of FIINIT(TMP1) and PATCH/INIT settings if the values are to vary only with position;
• by way of GROUND coding (perhaps PLANT-created) if values are to vary in the course of the flow simulation;
• or by way of In-form, as described in the next section.

In GROUND, the integer index TEMP1 for phase 1 or TEMP2 for phase 2 should be used in calls to FN routines or as the argument of L0F.

5. ### In-form

The most flexible means of introducing complex dependencies of temperature on enthalpy and other variables is to use the In-Form facilities of PHOENICS, those which are related to properties in general and TMP1 and TMP2 in particular being described here.

The relevant command in the Q1 file begins:

(PROPERTY TMP1 is .....

and what follows the dots can be as complex as any PHOENICS user is likely to desire.

In-Form can of course be used to specify values of, or formulae for, H0_1 and H0_2; but for these (because these properties are late-comers on the scene), the commands happen to be:

(STORED var H0_1 is ....
and
(STORED var H0_2 is ....

### TMP1A

----- PIL real; default= 0.0; group 9, -

TMP1A....parameter used in formulae for calculating phase-1 temperature. Further parameters of the same kind are: TMP1B, TMP1C.

### TMP1B

----- PIL real; default= 0.0; group 9, -

TMP1B....parameter used in formulae for calculating phase-1 temperature. Further parameters of the same kind are: TMP1A, TMP1C.

### TMP1C

----- PIL real; default= 0.0; group 9, -

TMP1C....parameter used in formulae for calculating phase-1 temperature. Further parameters of the same kind are: TMP1A, TMP1B.

### TMP2

------ PIL real; default= 0.0; group 9, -

TMP2....is the temperature of the second phase, used similarly to TMP1. See TMP1 for further information, changing 1's to 2's.

For TMP2 = GRND4, the concentration variable is C4

### TMP2A

----- PIL real; default= 0.0; group 9, -

TMP2A....parameter used in formulae for calculating phase-2 temperature. Further parameters of the same kind are: TMP2B, TMP2C.

### TMP2B

----- PIL real; default= 0.0; group 9, -

TMP2B....parameter used in formulae for calculating phase-2 temperature. Further parameters of the same kind are: TMP2A, TMP2C.

### TMP2C

----- PIL real; default= 0.0; group 9, -

TMP2C....parameter used in formulae for calculating phase-2 temperature. Further parameters of the same kind are: TMP2A, TMP2B.

wbs