Now lnInclude are created as required by the presence of entries in the EXE_INC
variable in the Make/options file. This removes the need for calling
wmakeLnInclude in various Allwmake files to ensure the existence of the
lnInclude directories prior to compilation of dependent libraries.
A new constraint patch has been added which permits AMI coupling in
cyclic geometries. The coupling is repeated with different multiples of
the cyclic transformation in order to achieve a full correspondence.
This allows, for example, a cylindrical AMI interface to be used in a
sector of a rotational geometry.
The patch is used in a similar manner to cyclicAMI, except that it has
an additional entry, "transformPatch". This entry must name a coupled
patch. The transformation used to repeat the AMI coupling is taken from
this patch. For example, in system/blockMeshDict:
boundary
(
cyclic1
{
type cyclic;
neighbourPatch cyclic2;
faces ( ... );
}
cyclic2
{
type cyclic;
neighbourPatch cyclic1;
faces ( ... );
}
cyclicRepeatAMI1
{
type cyclicRepeatAMI;
neighbourPatch cyclicRepeatAM2;
transformPatch cyclic1;
faces ( ... );
}
cyclicRepeatAMI2
{
type cyclicRepeatAMI;
neighbourPatch cyclicRepeatAMI1;
transformPatch cyclic1;
faces ( ... );
}
// other patches ...
);
In this example, the transformation between cyclic1 and cyclic2 is used
to define the repetition used by the two cyclicRepeatAMI patches.
Whether cyclic1 or cyclic2 is listed as the transform patch is not
important.
A tutorial, incompressible/pimpleFoam/RAS/impeller, has been added to
demonstrate the functionality. This contains two repeating AMI pairs;
one cylindrical and one planar.
A significant amount of maintenance has been carried out on the AMI and
ACMI patches as part of this work. The AMI methods now return
dimensionless weights by default, which prevents ambiguity over the
units of the weight field during construction. Large amounts of
duplicate code have also been removed by deriving ACMI classes from
their AMI equivalents. The reporting and writing of AMI weights has also
been unified.
This work was supported by Dr Victoria Suponitsky, at General Fusion
Added a function object for the reacting Euler-Euler solvers which
evaluates and writes out the blended interfacial forces acting on a
given phase (drag, virtual mass, lift, wall lubrication and turbulent
dispersion).
Patch contributed by Institute of Fluid Dynamics, Helmholtz-Zentrum
Dresden - Rossendorf (HZDR)
The Sauter mean diameter calculation has been modified to be more stable
in the limit of vanishing phase fraction. The calculation of the overall
Sauter mean diameter for a populationBalance involving more than one
velocityGroup has been removed. This calculation depends upon the phase
fraction and it is not stable as the fractions tend to zero. The overall
Sauter mean diameter is only used for post-processing and can still be
recovered from the individual diameter fields of the involved
velocityGroups.
Some parts of the population balance modeling have also been renamed and
refactored.
Patch contributed by Institute of Fluid Dynamics, Helmholtz-Zentrum
Dresden - Rossendorf (HZDR)
Surfaces are specified as a list and the controls applied to each, e.g. in the
rhoPimpleFoam/RAS/annularThermalMixer tutorial:
surfaces
(
"AMI.obj"
"shaft.obj"
"wall.obj"
"statorBlades.obj"
"rotorBlades.obj"
);
includedAngle 150; // Identifes a feature when angle
// between faces < includedAngle
trimFeatures
{
minElem 10; // minimum edges within a feature
}
writeObj yes; // writes out _edgeMesh.obj files to view features
If different controls are required for different surfaces multiple
sub-dictionaries can be used:
AMIsurfaces
{
surfaces
(
"AMI.obj"
);
includedAngle 140; // Identifes a feature when angle
// between faces < includedAngle
trimFeatures
{
minElem 8; // minimum edges within a feature
}
writeObj yes; // writes out _edgeMesh.obj files to view features
}
otherSurfaces
{
surfaces
(
"shaft.obj"
"wall.obj"
"statorBlades.obj"
"rotorBlades.obj"
);
includedAngle 150; // Identifes a feature when angle
// between faces < includedAngle
trimFeatures
{
minElem 10; // minimum edges within a feature
}
writeObj yes; // writes out _edgeMesh.obj files to view features
}
Existing feature edge files corresponding to particular surfaces can be specified using
the "files" association list:
surfaces
(
"AMI.obj"
"shaft.obj"
"wall.obj"
"statorBlades.obj"
"rotorBlades.obj"
);
files
(
"AMI.obj" "constant/triSurface/AMI.obj.eMesh";
);
includedAngle 150; // Identifes a feature when angle
// between faces < includedAngle
trimFeatures
{
minElem 10; // minimum edges within a feature
}
writeObj yes; // writes out _edgeMesh.obj files to view features
The calculations for mixture rho and U have been changed so that they
represent phase-averaged quantities over the moving phases only.
The mixture density is used as part of the pressure solution to
calculate buoyancy forces. The pressure within a stationary phase is
considered to be decoupled from the moving phases; i.e., it is
considered self-supporting. Therefore the stationary phase density
should not form a part of buoyancy calculations. This change to the
definition of mixture density ensures this.
Lookup of models associated with unordered phase pairs now searches for
both possible pair names; e.g. gasAndLiquid and liquidAndGas.
Patch contributed by Institute of Fluid Dynamics, Helmholtz-Zentrum
Dresden - Rossendorf (HZDR)
The nonRandomTwoLiquid and Roult interface composition models have been
instantiated (and updated so that they compile), and a fuller set of
multi-component liquids and multi-component and reacting gases have been
used.
The selection name of the saturated and nonRandomTwoLiquid models have
also been changed to remove the capitalisation from the first letter, as
is consistent with other sub-models that are not proper nouns.
For compatibility with all the mesh and related classes in OpenFOAM The 'normal'
function of the 'triangle', 'triFace' and 'face' classes now returns the unit
normal vector rather than the vector area which is now provided by the 'area'
function.
This model transfers a dispersed droplet phase to a film phase at a rate
relative to its intersection with a third phase. The third phase is
termed the "surface". It can be enabled in constant/phaseProperties as
follows:
phaseTransfer
(
(droplets and film)
{
type deposition;
droplet droplets;
surface solid;
efficiency 0.1;
}
);
The efficiency is an empirical factor which represents a reduction in
collisions as a result of droplets flowing around the surface phase and
not coalescing on impact.
This work was supported by Georg Skillas and Zhen Li, at Evonik
An additional layer has been added into the phase system hierarchy which
facilitates the application of phase transfer modelling. These are
models which exchange mass between phases without the thermal coupling
that would be required to represent phase change. They can be thought of
as representation changes; e.g., between two phases representing
different droplet sizes of the same physical fluid.
To facilitate this, the heat transfer phase systems have been modified
and renamed and now both support mass transfer. The two sided version
is only required for derivations which support phase change.
The following changes to case settings have been made:
- The simplest instantiated phase systems have been renamed to
basicTwoPhaseSystem and basicMultiphaseSystem. The
heatAndMomentumTransfer*System entries in constant/phaseProperties files
will need updating accordingly.
- A phaseTransfer sub-model entry will be required in the
constant/phaseProperties file. This can be an empty list.
- The massTransfer switch in thermal phase change cases has been renamed
phaseTransfer, so as not to be confused with the mass transfer models
used by interface composition cases.
This work was supported by Georg Skillas and Zhen Li, at Evonik
Blended models are now registered and can be looked up in the same way
as regular interfacial models via the phaseSystem::lookupSubModel
method. For example, to access the blended drag model, the following
code could be used:
const BlendedInterfacialModel<dragModel>& drag =
fluid.lookupSubModel<BlendedInterfacialModel<dragModel>>
(
phasePair(gas, liquid)
);
Here, "fluid" is the phase system, and "gas" and "liquid" are the phase
models between which the blended drag model applies.
Also added tutorial case demonstrating usage. Note that the new drag
models are symmetric and should be used without any blending.
This work was supported by Georg Skillas and Zhen Li, at Evonik
Two new phase models have been added as selectable options for
reactingMultiphaseEulerFoam; pureStationaryPhaseModel and
pureStationaryIsothermalPhaseModel. These phases do not store a
velocity and their phase fractions remain constant throughout the
simulation. They are intended for use in modelling static particle beds
and other forms of porous media by means of the existing Euler-Euler
transfer models (drag, heat transfer, etc...).
Note that this functionality has not been extended to
reactingTwoPhaseEulerFoam, or the non-reacting *EulerFoam solvers.
Additional maintenance work has been carried out on the phase model
and phase system structure. The system can now loop over subsets of
phases with specific functionality (moving, multi-component, etc...) in
order to avoid testing for the existence of equations or variables in
the top level solver. The mass transfer handling and it's effect on
per-phase source terms has been refactored to reduce duplication. Const
and non-const access to phase properties has been formalised by renaming
non-const accessors with a "Ref" suffix, which is consistent with other
recent developments to classes including tmp and GeometricField, among
others. More sub-modelling details have been made private in order to
reduce the size of interfaces and improve abstraction.
This work was supported by Zhen Li, at Evonik
MULES and CMULES have been extended so that the limits can be supplied
as fields. These arguments are templated so that zeroField, oneField or
UniformField<scalar> can be used in place of a scalar value with no
additional overhead. The flux argument has been removed from the
unlimited CMULES correct functions in order to make this templating
possible.
An additional form of limit sum has also been added to MULES. This
limits the flux sum by ofsetting in proportion to the phase fraction,
rather than by reducing the magnitude of the fluxes with the same sign
as the imbalance. The new procedure makes it possible to limit the flux
sum in the presence of constraints without encountering a divide by
zero.
Improvements to existing functionality
--------------------------------------
- MPI is initialised without thread support if it is not needed e.g. uncollated
- Use native c++11 threading; avoids problem with static destruction order.
- etc/cellModels now only read if needed.
- etc/controlDict can now be read from the environment variable FOAM_CONTROLDICT
- Uniform files (e.g. '0/uniform/time') are now read only once on the master only
(with the masterUncollated or collated file handlers)
- collated format writes to 'processorsNNN' instead of 'processors'. The file
format is unchanged.
- Thread buffer and file buffer size are no longer limited to 2Gb.
The global controlDict file contains parameters for file handling. Under some
circumstances, e.g. running in parallel on a system without NFS, the user may
need to set some parameters, e.g. fileHandler, before the global controlDict
file is read from file. To support this, OpenFOAM now allows the global
controlDict to be read as a string set to the FOAM_CONTROLDICT environment
variable.
The FOAM_CONTROLDICT environment variable can be set to the content the global
controlDict file, e.g. from a sh/bash shell:
export FOAM_CONTROLDICT=$(foamDictionary $FOAM_ETC/controlDict)
FOAM_CONTROLDICT can then be passed to mpirun using the -x option, e.g.:
mpirun -np 2 -x FOAM_CONTROLDICT simpleFoam -parallel
Note that while this avoids the need for NFS to read the OpenFOAM configuration
the executable still needs to load shared libraries which must either be copied
locally or available via NFS or equivalent.
New: Multiple IO ranks
----------------------
The masterUncollated and collated fileHandlers can now use multiple ranks for
writing e.g.:
mpirun -np 6 simpleFoam -parallel -ioRanks '(0 3)'
In this example ranks 0 ('processor0') and 3 ('processor3') now handle all the
I/O. Rank 0 handles 0,1,2 and rank 3 handles 3,4,5. The set of IO ranks should always
include 0 as first element and be sorted in increasing order.
The collated fileHandler uses the directory naming processorsNNN_XXX-YYY where
NNN is the total number of processors and XXX and YYY are first and last
processor in the rank, e.g. in above example the directories would be
processors6_0-2
processors6_3-5
and each of the collated files in these contains data of the local ranks
only. The same naming also applies when e.g. running decomposePar:
decomposePar -fileHandler collated -ioRanks '(0 3)'
New: Distributed data
---------------------
The individual root directories can be placed on different hosts with different
paths if necessary. In the current framework it is necessary to specify the
root per slave process but this has been simplified with the option of specifying
the root per host with the -hostRoots command line option:
mpirun -np 6 simpleFoam -parallel -ioRanks '(0 3)' \
-hostRoots '("machineA" "/tmp/" "machineB" "/tmp")'
The hostRoots option is followed by a list of machine name + root directory, the
machine name can contain regular expressions.
New: hostCollated
-----------------
The new hostCollated fileHandler automatically sets the 'ioRanks' according to
the host name with the lowest rank e.g. to run simpleFoam on 6 processors with
ranks 0-2 on machineA and ranks 3-5 on machineB with the machines specified in
the hostfile:
mpirun -np 6 --hostfile hostfile simpleFoam -parallel -fileHandler hostCollated
This is equivalent to
mpirun -np 6 --hostfile hostfile simpleFoam -parallel -fileHandler collated -ioRanks '(0 3)'
This example will write directories:
processors6_0-2/
processors6_3-5/
A typical example would use distributed data e.g. no two nodes, machineA and
machineB, each with three processes:
decomposePar -fileHandler collated -case cavity
# Copy case (constant/*, system/*, processors6/) to master:
rsync -a cavity machineA:/tmp/
# Create root on slave:
ssh machineB mkdir -p /tmp/cavity
# Run
mpirun --hostfile hostfile icoFoam \
-case /tmp/cavity -parallel -fileHandler hostCollated \
-hostRoots '("machineA" "/tmp" "machineB" "/tmp")'
Contributed by Mattijs Janssens
Partial elimination has been implemented for the multiphase Euler-Euler
solver. This does a linear solution of the drag system when calculating
flux and velocity corrections after the solution of the pressure
equation. This can improve the behaviour of the solution in the event
that the drag coupling is high. It is controlled by means of a
"partialElimination" switch within the PIMPLE control dictionary in
fvSolution.
A re-organisation has also been done in order to remove the exposure of
the sub-modelling from the top-level solver. Rather than looping the
drag, virtual mass, lift, etc..., models directly, the solver now calls
a set of phase-system methods which group the different force terms.
These new methods are documented in MomentumTransferPhaseSystem.H. Many
other accessors have been removed as a consequence of this grouping.
A bug was also fixed whereby the face-based algorithm was not
transferring the momentum associated with a given interfacial mass
transfer.