Description
Base-class for thermophysical properties of solids, liquids and gases
providing an interface compatible with the templated thermodynamics
packages.
liquidProperties, solidProperties and thermophysicalFunction libraries have been
combined with the new thermophysicalProperties class into a single
thermophysicalProperties library to simplify compilation and linkage of models,
libraries and applications dependent on these classes.
The fundamental properties provided by the specie class hierarchy were
mole-based, i.e. provide the properties per mole whereas the fundamental
properties provided by the liquidProperties and solidProperties classes are
mass-based, i.e. per unit mass. This inconsistency made it impossible to
instantiate the thermodynamics packages (rhoThermo, psiThermo) used by the FV
transport solvers on liquidProperties. In order to combine VoF with film and/or
Lagrangian models it is essential that the physical propertied of the three
representations of the liquid are consistent which means that it is necessary to
instantiate the thermodynamics packages on liquidProperties. This requires
either liquidProperties to be rewritten mole-based or the specie classes to be
rewritten mass-based. Given that most of OpenFOAM solvers operate
mass-based (solve for mass-fractions and provide mass-fractions to sub-models it
is more consistent and efficient if the low-level thermodynamics is also
mass-based.
This commit includes all of the changes necessary for all of the thermodynamics
in OpenFOAM to operate mass-based and supports the instantiation of
thermodynamics packages on liquidProperties.
Note that most users, developers and contributors to OpenFOAM will not notice
any difference in the operation of the code except that the confusing
nMoles 1;
entries in the thermophysicalProperties files are no longer needed or used and
have been removed in this commet. The only substantial change to the internals
is that species thermodynamics are now "mixed" with mass rather than mole
fractions. This is more convenient except for defining reaction equilibrium
thermodynamics for which the molar rather than mass composition is usually know.
The consequence of this can be seen in the adiabaticFlameT, equilibriumCO and
equilibriumFlameT utilities in which the species thermodynamics are
pre-multiplied by their molecular mass to effectively convert them to mole-basis
to simplify the definition of the reaction equilibrium thermodynamics, e.g. in
equilibriumCO
// Reactants (mole-based)
thermo FUEL(thermoData.subDict(fuelName)); FUEL *= FUEL.W();
// Oxidant (mole-based)
thermo O2(thermoData.subDict("O2")); O2 *= O2.W();
thermo N2(thermoData.subDict("N2")); N2 *= N2.W();
// Intermediates (mole-based)
thermo H2(thermoData.subDict("H2")); H2 *= H2.W();
// Products (mole-based)
thermo CO2(thermoData.subDict("CO2")); CO2 *= CO2.W();
thermo H2O(thermoData.subDict("H2O")); H2O *= H2O.W();
thermo CO(thermoData.subDict("CO")); CO *= CO.W();
// Product dissociation reactions
thermo CO2BreakUp
(
CO2 == CO + 0.5*O2
);
thermo H2OBreakUp
(
H2O == H2 + 0.5*O2
);
Please report any problems with this substantial but necessary rewrite of the
thermodynamic at https://bugs.openfoam.org
Henry G. Weller
CFD Direct Ltd.
Now the interFoam and compressibleInterFoam families of solvers use the same
alphaEqn formulation and supporting all of the MULES options without
code-duplication.
The semi-implicit MULES support allows running with significantly larger
time-steps but this does reduce the interface sharpness.
The previous time-step compression flux is not valid/accurate on the new mesh
and it is better to re-calculate it rather than map it from the previous mesh to
the new mesh.
Avoids slight phase-fraction unboundedness at entertainment BCs and improved
robustness.
Additionally the phase-fractions in the multi-phase (rather than two-phase)
solvers are adjusted to avoid the slow growth of inconsistency ("drift") caused
by solving for all of the phase-fractions rather than deriving one from the
others.
e.g. in the reactingFoam/laminar/counterFlowFlame2DLTS tutorial:
PIMPLE
{
momentumPredictor no;
nOuterCorrectors 1;
nCorrectors 1;
nNonOrthogonalCorrectors 0;
maxDeltaT 1e-2;
maxCo 1;
alphaTemp 0.05;
alphaY 0.05;
Yref
{
O2 0.1;
".*" 1;
}
rDeltaTSmoothingCoeff 1;
rDeltaTDampingCoeff 1;
}
will limit the LTS time-step according to the rate of consumption of 'O2'
normalized by the reference mass-fraction of 0.1 and all other species
normalized by the reference mass-fraction of 1. Additionally the time-step
factor of 'alphaY' is applied to all species. Only the species specified in the
'Yref' sub-dictionary are included in the LTS limiter and if 'alphaY' is omitted
or set to 1 the reaction rates are not included in the LTS limiter.
Combined 'dQ()' and 'Sh()' into 'Qdot()' which returns the heat-release rate in
the normal units [kg/m/s3] and used as the heat release rate source term in
the energy equations, to set the field 'Qdot' in several combustion solvers
and for the evaluation of the local time-step when running LTS.
Added the interfacial pressure-work terms according to:
Ishii, M., Hibiki, T.,
Thermo-fluid dynamics of two-phase flow,
ISBN-10: 0-387-28321-8, 2006
While this is the most common approach to handling the interfacial
pressure-work it introduces numerical stability issues in regions of low
phase-fraction and rapid flow deformation. To alleviate this problem an
optional limiter may be applied to the pressure-work term in either of
the energy forms. This may specified in the
"thermophysicalProperties.<phase>" file, e.g.
pressureWorkAlphaLimit 1e-3;
which sets the pressure work term to 0 for phase-fractions below 1e-3.
For particularly unstable cases a limit of 1e-2 may be necessary.
Added 'READ_IF_PRESENT' option to support overriding of the default BCs
for complex problems requiring special treatment of Udm at boundaries.
Resolves bug-report http://bugs.openfoam.org/view.php?id=2317
In many publications and Euler-Euler codes the pressure-work term in the
total enthalpy is stated and implemented as -alpha*dp/dt rather than the
conservative form derived from the total internal energy equation
-d(alpha*p)/dt. In order for the enthalpy and internal energy equations
to be consistent this error/simplification propagates to the total
internal energy equation as a spurious additional term p*d(alpha)/dt
which is included in the OpenFOAM Euler-Euler solvers and causes
stability and conservation issues.
I have now re-derived the energy equations for multiphase flow from
first-principles and implemented in the reactingEulerFoam solvers the
correct conservative form of pressure-work in both the internal energy
and enthalpy equations.
Additionally an optional limiter may be applied to the pressure-work
term in either of the energy forms to avoid spurious fluctuations in the
phase temperature in regions where the phase-fraction -> 0. This may
specified in the "thermophysicalProperties.<phase>" file, e.g.
pressureWorkAlphaLimit 1e-3;
which sets the pressure work term to 0 for phase-fractions below 1e-3.
Previously the inlet flow of phase 1 (the phase solved for) is corrected
to match the inlet specification for that phase. However, if the second
phase is also constrained at inlets the inlet flux must also be
corrected to match the inlet specification.
to handle the size of bubbles created by boiling. To be used in
conjunction with the alphatWallBoilingWallFunction boundary condition.
The IATE variant of the wallBoiling tutorial case is provided to
demonstrate the functionality:
tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoilingIATE
Contributed by Juho Peltola, VTT
Notable changes:
1. The same wall function is now used for both phases, but user must
specify phaseType ‘liquid’ or ‘vapor’
2. Runtime selectable submodels for:
- wall heat flux partitioning between the phases
- nucleation site density
- bubble departure frequency
- bubble departure diameter
3. An additional iteration loop for the wall boiling model in case
the initial guess for the wall temperature proves to be poor.
The wallBoiling tutorial has been updated to demonstrate this new functionality.
to ensure 'patchType' is set as specified.
Required substantial change to the organization of the reading of the
'value' entry requiring careful testing and there may be some residual
issues remaining. Please report any problems with the reading and
initialization of patch fields.
Resolves bug-report http://bugs.openfoam.org/view.php?id=2266
Renamed the original 'laminar' model to 'Stokes' to indicate it is a
linear stress model supporting both Newtonian and non-Newtonian
viscosity.
This general framework will support linear, non-linear, visco-elastic
etc. laminar transport models.
For backward compatibility the 'Stokes' laminar stress model can be
selected either the original 'laminar' 'simulationType'
specification in turbulenceProperties:
simulationType laminar;
or using the new more general 'laminarModel' specification:
simulationType laminar;
laminar
{
laminarModel Stokes;
}
which allows other laminar stress models to be selected.
Required to support LTS with the -postProcess option with sub-models dependent on ddt
terms during construction, in particular reactingTwoPhaseEulerFoam.