Whenever In-Form statements holding the PROPERTY keyword are present in the Q1 file, and are accepted as legitimate by EARTH, the specified quantity is computed and used at every appropriate point in the calculation.
This is true even when the same properties are nominally being computed in accordance with PIL settings: what In-Form specifies takes precedence.
A typical In-Form statement is:
(property EL1 at PATCH_1 is YG - YG^2.0 if(YG.LT.1.0))
which should make the first-phase turbulence length scale a
quadratic function of the y-distance from the wall over half the
grid.
Then the following simple Q1 file:
TALK=T;RUN(1,1) STORE(EL1) PATCH(PATCH1,INIVAL,1,1,1,5,1,1,1,1) GRDPWR(Y,10,2,1) (property EL1 at PATCH1 is YG - YG^2.0 with if(YG.LT.1.0)) NYPRIN=1would cause EARTH to place in the RESULT file the following:
Flow field at ITHYD= 1, IZ= 1, ISWEEP= 1, ISTEP= 1 IY EL1 10 0.0 9 0.0 8 0.0 7 0.0 6 0.0 5 9.000E-02 4 2.100E-01 3 2.500E-01 2 2.100E-01 1 9.000E-02from which it may be seen that, for YG in excess of 1.0, i.e. IY in excess of 5, EL1 has its default value of 0.0 because the In-Form statement made no prescription.
The last sentence made reference to both IY and YG because, tiresomely in this case, PHOENICS prints the grid coordinates in a different place. However (in anticipation of the not-yet-presented discussion of the keyword STORED) this may be easily remedied.
Thus, addition of the line:
(stored YGG is YG) LSWEEP=2causes the RESULT file to contain:
IY YGG EL1 10 1.900E+00 0.0 9 1.700E+00 0.0 8 1.500E+00 0.0 7 1.300E+00 0.0 6 1.100E+00 0.0 5 9.000E-01 9.000E-02 4 7.000E-01 2.100E-01 3 5.000E-01 2.500E-01 2 3.000E-01 2.100E-01 1 1.000E-01 9.000E-02It is worth explaining why YGG was stored, and not YG; and also why LSWEEP was increased to 2.
The reason for the first is that, although (stored YG ...) would have been accepted, PHOENICS would then become confused between the newly-stored YG and the already-present one.
The reason for the second is that, unless the (stored YGG ...) has a special post-formula option ('with SWPSTR', to be explained in section 5), YGG will not have been computed in time for first-sweep print-out.
Click below to proceed directly to discussion of the property selected RHO1 DRH1DP RHO2 DRH2DP ENUT ENUL PRNDTL PHINT TMP1 TMP2 EL1 EL2 CP1 CP2 DVO1DT DVO2DT CFIPS CMDOT CINT CVM
The material properties used by PHOENICS are listed above and in the file \phoenics\d_earth\d_core\gxprutil.for as may be seen by clicking here.
Each of these may be set by way of In-Form, as will now be explained and exemplified, in order of IPROP value.
First however two properties which are new to PHOENICS will be mentioned, namely ENT1 and ENT2, which will be used for representing the enthalpies of the two phases when they are not being solved for directly.
This renders more symmetrical than hitherto the alternative treatments
of temperature and enthalpy.
Thus ENT1 is to H1 as TMP1 is to TEM1; and
ENT2 is to H2 as TMP2 is to TEM2.
ENT1 and ENT2 are therefore added to the list to be discussed below.
In the following discussion, examples are provided for some, but not all material properties. The principles of setting are the same for all properties; so exemplification of each one would become tedious.
** Temperature density 0 0.9998681 1 0.9999267 2 0.9999679 3 0.9999922 4 1.0000000 5 0.9999919 6 0.9999682 7 0.9999296 8 0.9998764 9 0.9998091 10 0.9997282Then, if this table is placed in a file with the complete pathname:
(property RHO1 is PWLF(sub-directory/water),TEM1).
This practice is exemplified in the following simple Q1:
TALK=T;RUN(1,1) STORE(RHO1,TEM1) GRDPWR(Y,11,1.1,1) PATCH(WHOLE,CELL,1,NX,1,NY,1,NZ,1,1) (property rho1 is PWLF(\phoenics\d_earth\d_core\inplib\water),TEM1) (initial TEM1 at whole is YG*10.0-0.5) (stored RHM1 is RHO1 -0.999) LSWEEP=2 NYPRIN=1which, when run by PHOENICS, leads to a RESULT file containing the following:
IY RHM1 TEM1 RHO1 11 7.282E-04 1.000E+01 9.997E-01 10 8.091E-04 9.0 9.998E-01 9 8.764E-04 8.0 9.999E-01 8 9.296E-04 7.0 9.999E-01 7 9.682E-04 6.0 1.0 6 9.919E-04 5.0 1.0 5 1.000E-03 4.0 1.0 4 9.922E-04 3.0 1.0 3 9.679E-04 2.0 1.0 2 9.267E-04 1.0 9.999E-01 1 8.681E-04 0.0 9.999E-01which shows not only the density RHO1 for each of the temperatures but also RHM1, i.e. RHO1 - 1.0, in order that sufficient decimal places can be read.
Comparison with the original table of data will reveals that the original accuracy has been maintained.
Although it is the PROPERTY keyword that is here in the centre of attention, the keywords INITIAL and STORED have proved to be useful, in this example, for enabling the contents of the RESULT file to be easily interpreted.
Images are visible here of the vessel motion and of the resulting disturbance of one of the constant-density surfaces.
Examples are:
The Encyclopaedia entry PRANDTL explains how this variable, and the corresponding variable for the turbulent contribution, PRT(), are used and interpreted by PHOENICS.
PRNDTL(varname) can be set by In-Form, but not PRT(varname).
The reason is
that, if ever anything more complex than a constant PRT(varname) is
required, it is simplest to set PRT(varname) to 1.E10 and to use
In-Form's great flexibility to set a single formula which
expresses both the laminar and turbulent contributions.
Interface values of temperature, when heat transfer is in question, and of concentration when mass transfer occurs, have to be expressed in many different ways, in accordance with the circumstances.
Often it can be presumed that the two phases are in thermodynamic
equilibrium at the surface.
Examples are:
In-Form enables all such relationships to be expressed with ease.
Even though temperature differences are the driving force for heat transfer by conduction and radiation, when convection is dominant it is often convenient to employ the enthalpy as the solved-for variable, because contributions of simultaneous mass transfer may be taken easily into account.
Therefore, from its earliest days, PHOENICS has been equipped with means for deducing the fluid temperature from solved-for values of the enthalpy, H1.
The earlier means of doing so are explained by the Encyclopaedia entry for TMP1.
What has been written about TMP1 applies also to TMP2, with the obvious changes.
The ways in which distributions of this variable can be set by way of built-in coding can be learned from the relevant Encyclopaedia entry
Inspecting that entry will reveal that, although much is provided, that provision is still meagre in comparison with what users may reasonably require.
For example, selecting EL1=GRND8 activates the Nikuradze formula in terms of the y-coordinate. But what if it is the x-direction which measures the distance from the wall? More GROUND coding would, prior to PLANT and In-Form, have had to be introduced.
In-Form allows such a desire to be easily satisfied, by writing in the Q1 file an expression such as the following:
(property el1 is :xulast:*(0.14-0.08*(1-2.0*xg/$
:xulast:)^2-0.06*(1-2*xg/:xulast:)^4 ))
Moreover, any other desired expression can be provided, without any enquiry as to what coding has been built in.
What has been written about EL1, applies of course also to EL2.
The PHOENICS Encyclopaedia contains articles on CP1 and on specific heats at constant pressure.
Both make reference to the fact that PHOENICS can compute temperatures in two different ways, either:
Because of the necessity to effect these derivations swiftly, and in both directions, PHOENICS makes use of an effective-specific-heat concept, defined in a non-standard manner, which however facilitates the easy deduction of enthalpy from temperature and of temperature from enthalpy.
The "effective" specific heat can be regarded as an average value for the range of temperature from a reference value to the prevailing temperature. Care must therefore be used, when using published data, to establish the definition of the specific heat which the publication employs.
The specific-heat data in the library case 089 are NOT, at the time of writing, consistent with the PHOENICS definition. Translation into "PHOENICS terms" remains to be accomplished. However, the error entailed by forgoing the translation will be small in most cases.
What has been written about CP1 applies also to CP2, with the obvious changes.
The definition of this quantity is contained in the PHOENICS Encyclopaedia article.
It is like DRH1DP in that it can be obtained by differentiating the expression for density, this time with respect to temperature.
It is like DRH1DP also in that although it can be set independently of the density, it is wise to ensure that the two settings are consistent.
However, complete consistency is not always needed. For example, the Boussinesq approximation, which is employed in buoyant-flow simulations when the temperature variations are not large, involves using a constant value of density for most of the calculation together with a finite value of the thermal expansion coefficient.
What has been written above about DVO1DT applies equally, mutatis mutandis, to DVO2DT.
The PHOENICS Encyclopaedia article contains extensive discussion about the nature of this variable and about the built-in options which are provided for calculating it.
There are many of these; but it is impossible to build in every variant that users are likely to need.
In-Form has been devised so that users' needs can be
satisfied easily. For example, library case 725 contains the
simple statement:
(PROPERTY CFIPS is 500.*R2*MASS1)
This is equivalent of one of the GRNDx options and therefore does
not require In-Form. However, In-Form allows the user to
write:
(PROPERTY CFIPS is 500.*MAX(R1,R2)*MASS1)
or
(PROPERTY CFIPS is 500.*R2*MIN(MASS1,MASS2))
or
(PROPERTY CFIPS is 500.*(R1*R2)^0.5*MASS1)
or
(PROPERTY CFIPS is 500.*R2*MASS1*KE/EP)
or
anything else he can think of.
Then PHOENICS will respond accordingly.
It is used in conjunction with the interphase-friction coefficient, FIP, which it multiplies.
In-Form enables the user to increase the range of options indefinitely, for example by embodying the full range of formulae having the form:
FIP multiplier = ln(1 + B),
where B is the "driving force for mass
transfer" described in text-books on the subject.
(phiG - phiS) where phi = any conserved property ------------ G denotes the bulk-phase value, (phiS - phiT) S denotes the interface value T denotes the value in the transferred substance; (TemG -TemS)*CP where TemG and TemS the temperatures in the bulk --------------- of the fluid and at the interface respectively Latent heat CP is the specific heat of the fluid and phase-change (eg vaporization) occurs; and, for liquid-fuel combustion: [ CP*(TemG - TemS) + H * MoxG/S ] / Latent heat where H is the heat of combustion, MoxG is the oxygen mass fraction in the bulk of the gas, and S is the stoichiometric ratio.
Experts on the subject will recognise that what is provided is far from doing justice to the scientific knowledge (and conjecture) that is likely to be needed from time to time.
The availability of In-Form enables the needs now to be met.
Knowledge is still too uncertain for any particular formulations of the "virtual-mass effect" to have become so well-established as to deserve permanent embodiment in PHOENICS.
Therefore In-Form provides an ideal tool for researchers who wish to experiment quickly with one idea after another.
An example of its use in connexion with In-Form is to be found in library case 762
Core-library case 105.htm is one of the oldest in the library, having been originally provided to enable the main ingredients of CFD (time-dependence, convective flow, diffusion and sources) to be studied in a one-dimensional situation.
It has now been supplied with the In-Form equivalents of the earlier data settings, which have however been left in place in order that the advantages of the new style can be perceived.
Case 763 concerns the square-cavity flow of case 762, but calculates the four relevant properties of the fluid (ethylene glycol) in four different ways, namely by way of:
Since the temperature range is not very large, the agreement is close, as may be seen from this extract from the result file
In the former, RHO1, TMP1 and CP1 are all set to GRNDx values; then further information is conveyed by the setting of such variables as RHO1A, TEMP2B and CPC; this is easy to do, but only when one has checked the documentation for the meaning of each variable.
No such checking is needed when the In-Form route is taken; for the statements starting '(property TMP1 is' and '(property RHO1 is' are rather easy to interpret; and indeed to write also, once the rule regarding colons has been mastered.
It is only the sections numbered 1. and 2. which concern the property settings; however the opportunity has been taken, under the heading of 'The In-Form Alternative' to illustrate uses also of:
Often the user prefers to specify the fluid by name and to rely on PHOENICS to use the properties which that fluid possesses.
The fluid_name feature of In-Form allows this.
Library case 761 exemplifies its use, showing that it is necessary to:
It will be seen that the property formulae which have been provided are both numerous and complex; but the user does not need to be concerned with the complexity; for In-Form and EARTH do all that is necessary.
Of course, if the user wishes to specify fluids which are not included in case 089, he or she will have to specify what the corresponding formulae should be, using the provided examples as templates.
When, as is true of the formulae in case 089, the formulae imply that the properties depend upon temperature and pressure, the user must ensure that these quantities are appropriately calculated, by setting SOLVE(P1,TEM1) and providing appropriate initial and boundary conditions.