The total enthalpy is calculated as
Ha = ha + K
where
ha is absolute enthalpy
K is the kinetic energy: 1/2*magSqr(U)
The total enthalpy or a particular phase can be calculated by specifying the
optional "phase" name, e.g.
#includeFunc totalEnthalpy(phase = liquid)
This is particularly useful for multiphase simulations for which integrating the
density weighted phase properties also requires the phase fraction to be
including in the weighting.
A single weight field can be specified as before:
weightField rho;
or a list specified by:
weightFields (alpha.water rho.water);
Face centres are calculated by area-weighting the centres of triangles
that are formed by connecting each edge to a common point. The common
point is taken to be the average of all the face vertices, though in
principle the choice is arbitrary.
The areas used to perform the weighting are now taken to be the
projected areas of the triangles in the direction of the face normal
(i.e., the dot product between the triangle area and the face normal).
Previously the triangle area-magnitudes were used.
The new approach results in a centre that for flat faces is independent
of the choice of common point. It also means that concave faces have
contributions to the weighted sum from reversed triangles correctly
subtracted from the total. The centre of warped faces still changes with
the choice of common point, but that variation is now reduced to be
only in the direction of the face normal.
Preliminary results suggest a positive effect of this change on the
convergence of simulations on meshes with significantly distorted faces
and cells. The simpleFoam motorBike tutorial now converges with
residuals approximately half that previously observed.
Resolves bug report https://bugs.openfoam.org/view.php?id=1993
Rotational transforms can now be automatically calculated from the
coupled patch geometries even when a) the patches are non-planar, b)
the patch normals are not perpendicular to the rotation axis, and/or c)
the rotation angle is 180 degrees.
The utilised static parts of polyMeshGeometry are now part of a
polyMeshCheck namespace. Everything else has been removed, as they were
unused, out of date, and/or duplicated elsewhere.
This operator was defined with an incorrect (or at least
counter-intuitive) ordering. Given the possibility for ambiguity
associated with transformation ordering it is considered preferable for
the transformer class not to have compound assigment operators. Forcing
the full syntax (e.g., "a = a & b" or "a = b & a") makes it clear in
which order the transformations are intended to be applied.
There is now an optional tauy entry in the thixotropicCoeffs to specify the
Bingham yield stress, e.g.:
filmViscosityModel thixotropic;
thixotropicCoeffs
{
mu0 100;
muInf 0.1;
a 0.1;
b 3;
c 0.005;
d 0.9;
tauy 1.1; // Yield stress in Pa
}
combining the multiphaseCompressibleTurbulenceModels and derivedFvPatchFields
libraries with the generic multiphase turbulence models from the
twoPhaseCompressibleTurbulenceModels library, kineticTheoryModels and
phasePressureModel into a single common library compiled and linked into both
reactingTwoPhaseEulerFoam and reactingMultiphaseEulerFoam.
This significantly simplifies the creation and maintenance of coded classes and
used in CodedFunction1 to provide an example of its use; the other coded classes
will be refactored and simplified in this manner in the future.
For example in the new tutorial case:
tutorials/incompressible/pimpleFoam/laminar/pitzDailyPulse
a cosine bell velocity pulse is specified at the inlet by directly defining the
code for it:
inlet
{
type uniformFixedValue;
uniformValue coded;
name pulse;
codeInclude
#{
#include "mathematicalConstants.H"
#};
code
#{
return vector
(
0.5*(1 - cos(constant::mathematical::twoPi*min(x/0.3, 1))),
0,
0
);
#};
}
which is then compiled automatically and linked into the running pimpleFoam
dynamically and executed to set the inlet velocity.
Rather than being tied to the Time class the dlLibraryTable libs is now a global
variable in the Foam namespace which is accessable by any class needing to load
dynamic libraries, in particular argList, Time and codeStream.
e.g. in tutorials/incompressible/pisoFoam/LES/motorBike/motorBike/system/cuttingPlane
surfaceFormat vtk;
writeFormat binary;
fields (p U);
selects writing the VTK surface files in binary format which significantly
speeds-up reading of the files in paraview.
Currently binary writing is supported in VTK and EnSight formats.
Transformer now supports scaling matrices. The number of ways in which
transformer can be constructed has also been reduced to null (i.e.,
identity), pure translation, pure scaling and pure rotation. Compound
translations must be constructed by combining transformers with the
dot-product (&) operator. In this way, the details of in what order the
different parts of the transformation are applied have been abstracted.