The Clang compiler does not use std::move to transfer the result of the ternary
operator into the phase-fraction field resulting in it not being registered to
the database. To work around this limitation/bug the ternary operator is now
provided with tmp fields the result of which is passed with an IOobject to the
final field constructor to ensure it is registered and the IO options set
correctly.
Coded functionality now supports basic un-typed substitutions from the
surrounding dictionary. For example:
value 1.2345;
#codeExecute
{
scalar s = $value;
...
};
It also now supports the more functional typed substitutions, such as:
direction (1 0 0);
#codeExecute
{
vector v = $<vector>direction;
...
};
These substitutions are now possible in all code blocks. Blocks with
access to the dictionary (e.g., #codeRead) will do a lookup which will
not require re-compilation if the value is changed. Blocks without
access to the dictionary will have the value directly substituted, and
will require recompilation when the value is changed.
These wall functions modify the turbulent properties (epsilon or omega,
and G) in the adjacent cells. When a cell has multiple wall faces, a
weighting process is used to combine the values from the different
walls. This weighting process has been rewritten and centralised into a
common base class. It is now based on an area-weighted average and is
applied to the fields in an order-independent manner. It is now fully
consistent with multiple simultaneous non-conformal connections.
//- Find and return the zone indices for all matches
labelList findIndices(const wordRe&) const;
It may also be useful to provide versions taking a list of word or wordRe which
will be added as required.
such that the point-edge wave can be stopped when the distance from the
originating surface exceeds the specified maximum if distances beyond this are
of no interest as is the case for rigid-body motion with a specified outer
distance. Stopping the point-edge in this manner can significantly speed-up the
calculation, particularly in parallel as the number of expensive communications
is reduced.
The mergePatchPairs functionality in blockMesh also now uses patchIntersection.
The new mergePatchPairs and patchIntersection replaces the old, fragile and
practically unusable polyTopoChanger::slidingInterface functionality the removal
of which has allowed the deletion of a lot of other ancient and otherwise unused
clutter including polyTopoChanger, polyMeshModifier, polyTopoChange::setAction
and associated addObject/*, modifyObject/* and removeObject/*. This
rationalisation paves the way for the completion of the update of zone handling
allowing mesh points, faces and cells to exist in multiple zones which is
currently not supported with mesh topology change.
Application
stitchMesh
Description
Utility to stitch or conform pairs of patches,
converting the patch faces either into internal faces
or conformal faces or another patch.
Usage
\b stitchMesh (\<list of patch pairs\>)
E.g. to stitch patches \c top1 to \c top2 and \c bottom1 to \c bottom2
stitchMesh "((top1 top2) (bottom1 bottom2))"
Options:
- \par -overwrite \n
Replace the old mesh with the new one, rather than writing the new one
into a separate time directory
- \par -region \<name\>
Specify an alternative mesh region.
- \par -fields
Update vol and point fields
- \par -tol
Merge tolerance relative to local edge length (default 1e-4)
See also
Foam::mergePatchPairs
Source-point-to-target-triangle projections might be done in order to
determine the location outside of the target triangle, as well as the
location inside. Forcing the source point inside the target triangle is
therefore only appropriate when constructing the intersection geometry.
This has required switching the order of dependence of the fvMesh
geometry (i.e., Sf, Cf, and C), and the interpolation weights. The
weights are now considered dependent on the geometry fields, and the
geometry fields must therefore construct without reference to the
weights.
This calculation more carefully constructs the direction of the area
stabilisation so as to ensure that it does not oppose the area being
stabilised. This prevents the creation of faces with zero area.
Resolves bug report https://bugs.openfoam.org/view.php?id=4040
Omega lower limit bounding is now based on a maximum turbulence viscosity nut
rather than a minimum omega value which improves stability and robustness of
the k-omega models in case of numerical boundedness problems.
The maximum nut value is calculated by multiplying the laminar viscosity by
nutMaxCoeff which defaults to 1e5 but can be set by the user in the
momentumTransport dictionary.
Epsilon lower limit bounding is now based on a maximum turbulence viscosity nut
rather than a minimum epsilon value which improves stability and robustness of
the k-epsilon models in case of numerical boundedness problems.
The maximum nut value is calculated by multiplying the laminar viscosity by
nutMaxCoeff which defaults to 1e5 but can be set by the user in the
momentumTransport dictionary.
The boundary condition applied to pressure at open boundaries and outlets is switched
from totalPressure to entrainmentPressure. The latter boundary condition is more robust
since it calculates the pressure for inflow using (velocity) fluxes rather than velocity
on the patch.
This function has been changed to volume average, making it appropriate
to use on layered meshes in which the cells have non-uniform geometry
within their layers. A 'weightFields' (or 'weightField') control has
also been added, so that mass or phase weighted averages can be
performed within the layers.
These conditions are legacy and should not be considered for general
use. They require specific, unintuitive mesh structuring (i.e.,
duplicated boundary faces) that only PDRMesh can now create.
If an an interface is needed which opens or closes based on modelling
criteria, then this should be implemented as an extension of NCC. That
would be more flexible, parallelisable, and would not require
modification of the underlying polyheral mesh.
This simple model generates a phase change between two phases calculated
from the following expression:
\dot{m}/V = C \alpha \grad \alpha
Where:
\dot{m}/V | mass transfer rate per unit volume
C | coefficient
\alpha | volume fraction of the source phase
Example usage:
coefficientPhaseChange
{
type coefficientPhaseChange;
phases (liquid vapour);
C [kg/m^2/s] 0.1;
}
This model may be of use in simple situations, but it is primarily
designed to serve as a prototype for more complex and physical
mechanisms of phase changes.
An enumeration has been added to the arguments of the allocation
coefficient function, eta, to allow specification of how to allocate out
of bounds of the population balance size-groups. There are two options:
- "Clamp" will create an out-of-bounds allocation coefficient of exactly
one. This partitions unity across all size-space.
- "Extrapolate" will create an out-of-bounds allocation coefficient in
proportion to the ratio between the given size and the nearest
size-group size. This does not partition unity outside the range of
the size-groups.
The previous operation is equivalent to "Extrapolate".
It is not yet clear which method is preferable and under what
circumstances. More testing is required. The enumeration has been
created to facilitate this testing.