Demonstration case for three region coupling with film consisting of an
aluminium panel with surface film running down forming rivulets in a box of air
which moved due to buoyancy with 6-way thermal and velocity coupling between the
panel<->film<->air<->panel. The case runs serial and parallel with arbitrary
decomposition.
Currently extrudeToRegionMesh does not directly support three region coupling so
foamDictionary is used to edit the of the boundary files of box and film regions
to add box<->film coupling.
genericPatches is linked into mesh generation and manipulation utilities but not
solvers so that the solvers now check for the availability of the specified
patch types. Bugs in the tutorials exposed by this check have been corrected.
Class
Foam::solvers::film
Description
Solver module for flow of compressible liquid films
Uses the flexible PIMPLE (PISO-SIMPLE) solution for time-resolved and
pseudo-transient and steady simulations.
Optional fvModels and fvConstraints are provided to enhance the simulation
in many ways including adding various sources, Lagrangian particles,
radiation, surface film etc. and constraining or limiting the solution.
solvers::film is derived from solvers::isothermalFilm adding an energy equation
and temperature update with support for heat transfer to the wall using the
standard ThermophysicalTransportModels library utilising the filmWall patch type
or mappedFilmWall for CHT heat transfer to the adjacent solid region. A huge
advantage of this consistency with the rest of OpenFOAM is that the standard
thermal coupled boundary conditions can be used without modification, e.g.
temperatureCoupled.
Two variants of the rivuletPanel tutorial case are provided,
tutorials/modules/film/rivuletPanel demonstrates heat transfer to a fixed
temperature wall and tutorials/modules/CHT/rivuletPanel demonstrates conjugate
heat transfer to a thin aluminium panel simulated in a region using the
solvers::solid solver executed with solvers::film using foamMultiRun.
More functionality will be added through the power of fvModels.
Class
Foam::solvers::isothermalFilm
Description
Solver module for flow of compressible isothermal liquid films
Uses the flexible PIMPLE (PISO-SIMPLE) solution for time-resolved and
pseudo-transient and steady simulations.
Optional fvModels and fvConstraints are provided to enhance the simulation
in many ways including adding various sources, Lagrangian
particles, surface film etc. and constraining or limiting the solution.
The implementation of this new film solver is in fully conservative form,
solving for the film volume-fraction rather film thickness which ensures
conservation on curved and irregular surfaces and even around corners.
Also the formulation is consistent with standard FV solvers in other fundamental
respects using boundary conditions rather than volume forces to apply surface
stresses and transfers. This hugely advantageous approach, which allows the
reuse of many of the standard OpenFOAM libraries, in particular standard
compressibleMomentumTransportModels for the wall and internal film stresses, is
achieved using the special patch types filmWall and filmSurface to handle the
difference between the film thickness and the film cell layer height.
The specification of physical properties, boundary conditions, optional models
etc. etc. is handled in the same manner as all the other solver modules, making
much easier to use and to maintain the code.
Currently only coupling to the wall is supported with laminar transport, surface
tension, a new and more accurate contact angle algorithm and gravity which is
sufficient to demonstrate rivulet flow for example as in the tutorial case
provided: tutorials/modules/isothermalFilm/rivuletPanel
Support for coupling to an adjacent fluid region, Lagrangian impingement and
ejection, transfer to and from a VoF phase etc. will be added in the future via
the standard fvModels interface.
This change applies to diameter models within the multiphaseEuler
module, heat transfer fvModels, and the LopesdaCosta porosity and
turbulence models.
User input changes have been made backwards-compatible, so existing
AoV/a/Sigma/... entries and fields should continue to work.
Two pitzDaily variants have been added; pitzDailySteadyMappedToPart, and
pitzDailySteadyMappedToRefined. These demonstrate usage of workflows
which involve mapping between cases with mapFieldsPar.
The pitzDailySteadyMappedToPart case demonstrates mapping onto a small
section of the mesh; in this case in the vicinity of the the corner of
the backstep. This mesh is not consistent with the source data, so
fields are required in the zero directory and cutting patches are used
to specify the properties at the inlets.
The pitzDailySteadyMappedToRefined case demonstrates mapping onto a
geometrically similar case with a different mesh density. This mesh is
consistent with the source, so no fields are needed and no cutting
patches are used. This case does, however, perturb the geometry of the
block mesh a bit, so that some of the refined case is not overlapping
the original case. This provides a test of the stabilisation
procedures within the mesh-to-mesh mapping functions.
Cell-to-cell interpolation has been moved to a hierarchy separate from
meshToMesh, called cellsToCells. The meshToMesh class is now a
combination of a cellsToCells object and multiple patchToPatch objects.
This means that when only cell-to-cell interpolation is needed a basic
cellsToCells object can be selected.
Cell-to-cell and vol-field-to-vol-field interpolation now has two well
defined sets of functions, with a clear distinction in how weights that
do not sum to unity are handled. Non-unity weights are either
normalised, or a left-over field is provided with which to complete the
weighted sum.
The left-over approach is now consistently applied in mapFieldsPar,
across both the internal and patch fields, if mapping onto an existing
field in the target case. Warning are now generated for invalid
combinations of settings, such as mapping between inconsistent meshes
without a pre-existing target field.
All mapping functions now take fields as const references and return tmp
fields. This avoids the pattern in which non-const fields are provided
which relate to the source, and at some point in the function transfer
to the target. This pattern is difficult to reason about and does not
provide any actual computational advantage, as the fields invariably get
re-allocated as part of the process anyway.
MeshToMesh no longer stores the cutting patches. The set of cutting
patches is not needed anywhere except at the point of mapping a field,
so it is now supplied to the mapping functions as an argument.
The meshToMesh topology changer no longer supports cutting patch
information. This did not previously work. Cutting patches either get
generated as calculated, or they require a pre-existing field to specify
their boundary condition. Neither of these options is suitable for a
run-time mesh change.
More code has been shared with patchToPatch, reducing duplication.
Solvers ensure fluxes are maintained and updated correctly after topology change
and it no longer the responsibility of fvMeshTopoChangersRefiner to attempt
this.
The '-region' option has been leveraged to significantly simplify the
meshing and decomposition in the movingCone cases. These cases have also
been corrected to restore the variation in decomposition between the
different meshes, which is important for thoroughly testing the patch
field mapping. The shockFluid case has also had its duration extended a
little in order to span the final mesh mapping time.
The method to update phi in PDRFoamAutoRefine has been superseded by rhoUf in
all other compressible solvers and PDRFoam needs to be updated, requiring
funding. PDRFoamAutoRefine is no longer maintained.
The keyword 'select' is now used to specify the cell, face or point set
selection method consistently across all classes requiring this functionality.
'select' replaces the inconsistently named 'regionType' and 'selectionMode'
keywords used previously but backwards-compatibility is provided for user
convenience. All configuration files and tutorials have been updated.
Examples of 'select' from the tutorial cases:
functionObjects:
cellZoneAverage
{
type volFieldValue;
libs ("libfieldFunctionObjects.so");
writeControl writeTime;
writeInterval 1;
fields (p);
select cellZone;
cellZone injection;
operation volAverage;
writeFields false;
}
#includeFunc populationBalanceSizeDistribution
(
name=numberDensity,
populationBalance=aggregates,
select=cellZone,
cellZone=outlet,
functionType=numberDensity,
coordinateType=projectedAreaDiameter,
allCoordinates=yes,
normalise=yes,
logTransform=yes
)
fvModel:
cylinderHeat
{
type heatSource;
select all;
q 5e7;
}
fvConstraint:
momentumForce
{
type meanVelocityForce;
select all;
Ubar (0.1335 0 0);
}
This is a more intuitive keyword than "funcName" or "entryName". A
function object's name and corresponding output directory can now be
renamed as follows:
#includeFunc patchAverage
(
name=cylinderT, // <-- was funcName=... or entryName=...
region=fluid,
patch=fluid_to_solid,
field=T
)
Some packaged functions previously relied on a "name" argument that
related to an aspect of the function; e.g., the name of the faceZone
used by the faceZoneFlowRate function. These have been disambiguated.
This has also made them consistent with the preferred input syntax of
the underlying function objects.
Examples of the changed #includeFunc entries are shown below:
#includeFunc faceZoneAverage
(
faceZone=f0, // <-- was name=f0
U
)
#includeFunc faceZoneFlowRate
(
faceZone=f0 // <-- was name=f0
)
#includeFunc populationBalanceSizeDistribution
(
populationBalance=bubbles,
regionType=cellZone,
cellZone=injection, // <-- was name=injection
functionType=volumeDensity,
coordinateType=diameter,
normalise=yes
)
#includeFunc triSurfaceAverage
(
triSurface=mid.obj, // <-- was name=mid.obj
p
)
#includeFunc triSurfaceVolumetricFlowRate
(
triSurface=mid.obj // <-- was name=mid.obj
)
#includeFunc uniform
(
fieldType=volScalarField,
fieldName=alpha, // <-- was name=alpha
dimensions=[0 0 0 0 0 0 0],
value=0.2
)
so that the same option with a rational name is also available for #includeModel
and #includeConstraint. Support for funcName is maintained for
backwards-compatibility.
The input syntax of the heatTransfer and interRegionHeatTransfer
fvModels has been modified to make it more usable and consistent with
the rest of OpenFOAM.
The settings for area per unit volume (AoV) are no longer controlled by
the heat transfer coefficient model. Instead they belong to the fvModel
itself and are specified within the base fvModel's dictionary.
The heat transfer coefficient model has been renamed to
"heatTransferCoefficientModel" to better account for exactly what it
does. It is now selected using an entry called
"heatTransferCoefficientModel", rather than "type". As a sub-sub model,
"type" clashes with the outer fvModel's "type" entry unless a Coeffs
dictionary is used. This change has made the Coeffs sub-dictionary
optional, as it should be, unless model-specific keywords require
disambiguation.
A heat transfer coefficient model can now be specified as follows:
heatTransfer1
{
type heatTransfer;
heatTransferCoeffs
{
selectionMode all;
semiImplicit true;
Ta 298;
AoV 100;
heatTransferCoefficientModel variable; // constant, function1
constantCoeffs
{
htc 1000;
}
variableCoeffs
{
a 0.332;
b 0.5;
c 0.333333;
Pr 0.7;
L 0.1;
}
}
}
Alternatively, the coefficient sub-dictionaries can all be omitted,
giving the following syntax:
heatTransfer1
{
type heatTransfer;
selectionMode all;
semiImplicit true;
Ta 298;
AoV 100;
heatTransferCoefficientModel variable;
a 0.332;
b 0.5;
c 0.333333;
Pr 0.7;
L 0.1;
}
Two fvModels have been added, densityConstraintSource and
pressureConstraintSource, for constraining the density or pressure of
zero-dimensional cases. The constrained property's variation in time is
specified by means of a Function1.
The constraints are maintained by adding or removing an appropriate
amount of mass. Properties are added or removed with this mass at their
current values. Both constraints therefore represent uniform expansion
or contraction in an infinite space. In the case of the pressure
constraint, the compressibility is used to determine this amount of
mass, and in the case of non-linear equations of state iteration may be
necessary to enforce the constraint accurately.
These models can be used to extend the concept of a zero-dimensional
simulation to one that uniformly expands or contracts, or features a
mass source or sink.
Example specification of a time-varying density constraint, in
constant/fvModels:
densityConstraintSource1
{
type densityConstraintSource;
rho
{
type scale;
values
(
(0 1.16)
(1 1.16)
(1.1 2.02)
(10 2.02)
);
}
}
Example specification of a constant pressure constraint:
pressureConstraintSource1
{
type pressureConstraintSource;
p 1e5;
}
An example in which the pressure is constrained is provided. This
example shows the reaction of nc7h16, and duplicates the behaviour of
the corresponding chemFoam case.
#includeModel includes an fvModel configuration file into the fvModels file
#includeConstraint includes an fvModel configuration file into the fvConstraints file
These operate in the same manner as #includeFunc does for functionObjects and
search the etc/caseDicts/fvModels and etc/caseDicts/fvConstraints directories
for configuration files and apply optional argument substitution.
Class
Foam::functionEntries::includeFvModelEntry
Description
Specify a fvModel dictionary file to include, expects the
fvModel name to follow with option arguments (without quotes).
Searches for fvModel dictionary file in user/group/shipped
directories allowing for version-specific and version-independent files
using the following hierarchy:
- \b user settings:
- ~/.OpenFOAM/\<VERSION\>/caseDicts/fvModels
- ~/.OpenFOAM/caseDicts/fvModels
- \b group (site) settings (when $WM_PROJECT_SITE is set):
- $WM_PROJECT_SITE/\<VERSION\>/etc/caseDicts/fvModels
- $WM_PROJECT_SITE/etc/caseDicts/fvModels
- \b group (site) settings (when $WM_PROJECT_SITE is not set):
- $WM_PROJECT_INST_DIR/site/\<VERSION\>/etc/caseDicts/fvModels
- $WM_PROJECT_INST_DIR/site/etc/caseDicts/fvModels
- \b other (shipped) settings:
- $WM_PROJECT_DIR/etc/caseDicts/fvModels
The optional field arguments included in the name are inserted in 'field' or
'fields' entries in the fvModel dictionary and included in the name
of the fvModel entry to avoid conflict.
Examples:
\verbatim
#includeModel clouds
#includeModel surfaceFilms
\endverbatim
Other dictionary entries may also be specified using named arguments.
See also
Foam::includeFvConstraintEntry
Foam::includeFuncEntry
Class
Foam::functionEntries::includeFvConstraintEntry
Description
Specify a fvConstraint dictionary file to include, expects the
fvConstraint name to follow with option arguments (without quotes).
Searches for fvConstraint dictionary file in user/group/shipped
directories allowing for version-specific and version-independent files
using the following hierarchy:
- \b user settings:
- ~/.OpenFOAM/\<VERSION\>/caseDicts/fvConstraints
- ~/.OpenFOAM/caseDicts/fvConstraints
- \b group (site) settings (when $WM_PROJECT_SITE is set):
- $WM_PROJECT_SITE/\<VERSION\>/etc/caseDicts/fvConstraints
- $WM_PROJECT_SITE/etc/caseDicts/fvConstraints
- \b group (site) settings (when $WM_PROJECT_SITE is not set):
- $WM_PROJECT_INST_DIR/site/\<VERSION\>/etc/caseDicts/fvConstraints
- $WM_PROJECT_INST_DIR/site/etc/caseDicts/fvConstraints
- \b other (shipped) settings:
- $WM_PROJECT_DIR/etc/caseDicts/fvConstraints
The optional field arguments included in the name are inserted in 'field' or
'fields' entries in the fvConstraint dictionary and included in the name
of the fvConstraint entry to avoid conflict.
Examples:
\verbatim
#includeConstraint limitPressure(minFactor=0.1, maxFactor=2)
#includeConstraint limitTemperature(min=101, max=1000)
\endverbatim
or for a multiphase case:
\verbatim
#includeConstraint limitLowPressure(min=1e4)
#includeConstraint limitTemperature(phase=steam, min=270, max=2000)
#includeConstraint limitTemperature(phase=water, min=270, max=2000)
\endverbatim
Other dictionary entries may also be specified using named arguments.
See also
Foam::includeFvModelEntry
Foam::includeFuncEntry
particleFoam has been superseded and replaced by the more general functions
solver module executed by the foamRun application:
foamRun -solver functions
The incompressibleFluid solver specified by either the subSolver or if not
present the solver entry in the controlDict is instantiated to provide the
physical fields needed by fvModel functionObject in which the clouds fvModel is
selected to evolve the Lagrangian particles. See:
tutorials/modules/incompressibleFluid/hopperParticles
tutorials/modules/incompressibleFluid/mixerVessel2DParticles
rhoParticleFoam has been superseded and replaced by the more general functions
solver module executed by the foamRun application:
foamRun -solver functions
The isothermalFluid solver specified by either the subSolver or if not present
the solver entry in the controlDict is instantiated to provide the physical
fields needed by fvModel functionObject in which the clouds fvModel is selected
to evolve the Lagrangian particles.
Description
Solver module to execute the \c functionObjects for a specified solver
The solver specified by either the \c subSolver or if not present the \c
solver entry in the \c controlDict is instantiated to provide the physical
fields needed by the \c functionObjects. The \c functionObjects are then
instantiated from the specifications are read from the \c functions entry in
the \c controlDict and executed in a time-loop also controlled by entries in
\c controlDict and the \c maxDeltaT() returned by the sub-solver.
The fields and other objects registered by the sub-solver are set to
NO_WRITE as they are not changed by the execution of the functionObjects and
should not be written out each write-time. Fields and other objects created
and changed by the execution of the functionObjects are written out.
solvers::functions in conjunction with the scalarTransport functionObject
replaces scalarTransportFoam and provide more general handling of the scalar
diffusivity.
By solving for U and e rather than rhoU and rhoE the convection and stress
matrices can be combined and solved together avoiding the need for Strang
splitting. Conservation of rho*U and rho*E is ensured by constructing and
solving the three equations in sequence, constructing each using the results of
the solution of the previous equations.
Tutorials have been updated to use the new consistent names within the
wall boiling system. The changes are backwards compatible so all
tutorials should run both before and after this change.
This boundary condition now solves for the wall temperature by interval
bisection, which should be significantly more robust than the previous
fixed-point iteration procedure. There is a new non-dimensional
"tolerance" setting that controls how tightly this solution procedure
solves the wall temperature. The "relax" setting is no longer used.
The boundary condition no longer triggers re-evaluation of the
temperature condition in order to re-calculate the heat flux within the
solution iteration. Instead, it extracts physical coefficients from the
form of the boundary condition and uses these to form a linearised
approximation of the heat flux. This is a more general approach, and
will not trigger side-effects associated with re-evaluating the
temperature condition.
The fixedMultiphaseHeatFlux condition has been replaced by a
uniformFixedMultiphaseHeatFlux condition, which constructs a mixed
constraint which portions a specified heat flux between the phases in
such a way as to keep the boundary temperature uniform across all
phases. This can be applied to all phases. It is no longer necessary to
apply a heat flux model to one "master" phase, then map the resulting
temperature to the others. An example specification of this boundary
condition is as follows:
wall
{
type uniformFixedMultiphaseHeatFlux;
q 1000;
relax 0.3;
value $internalField;
}
The wall boiling tutorials have been updated to use these new functions,
and time-varying heat input has been used to replace the
stop-modify-restart pattern present in the single-region cases.
executed with foamRun for single region simulations of foamMultiRun for
multi-region simulations. Replaces rhoCentralFoam and all the corresponding
tutorials have been updated and moved to tutorials/modules/shockFluid.
Unlike rhoCentralFoam shockFluid supports mesh refinement/unrefinement, topology
change, run-time mesh-to-mesh mapping, load-balancing in addition to general
mesh-motion.
The tutorials/modules/shockFluid/movingCone case has been updated to demonstrate
run-time mesh-to-mesh mapping mesh topology change based on the
tutorials/modules/incompressibleFluid/movingCone. shockFluid s
Description
Solver module for density-based solution of compressible flow
Based on central-upwind schemes of Kurganov and Tadmor with support for
mesh-motion and topology change.
Reference:
\verbatim
Greenshields, C. J., Weller, H. G., Gasparini, L.,
& Reese, J. M. (2010).
Implementation of semi‐discrete, non‐staggered central schemes
in a colocated, polyhedral, finite volume framework,
for high‐speed viscous flows.
International journal for numerical methods in fluids, 63(1), 1-21.
\endverbatim
SourceFiles
shockFluid.C
See also
Foam::solvers::fluidSolver
Foam::solvers::incompressibleFluid
This option means that a one field can be mapped to another within the
same patch without specifying the patch name. E.g.:
walls
{
type mappedValue;
//neighbourPatch walls; // <-- Previously required. Still supported.
samePatch yes; // <-- New alternative specification
field T.liquid;
value $internalField;
}
This is useful when the boundary condition is specified using a regular
expression for the patch name.
"wall_.*"
{
type mappedValue;
//neighbourPatch ???; // <-- No unique name can be given
samePatch yes; // <-- Still works
field T.liquid;
value $internalField;
}
executed with foamRun for single region simulations of foamMultiRun for
multi-region simulations. Replaces compressibleMultiphaseInterFoam and all the
corresponding tutorials have been updated and moved to
tutorials/modules/compressibleMultiphaseVoF.
compressibleMultiphaseVoF is derived from the multiphaseVoFSolver which adds
compressible multiphase capability to the VoFSolver base-class used as the basis
of all two-phase and multiphase VoF solvers.
Class
Foam::solvers::compressibleMultiphaseVoF
Description
Solver module for the solution of multiple compressible, isothermal
immiscible fluids using a VOF (volume of fluid) phase-fraction based
interface capturing approach, with optional mesh motion and mesh topology
changes including adaptive re-meshing.
The momentum and other fluid properties are of the "mixture" and a single
momentum equation is solved.
A mixture approach for momentum transport is provided in which a single
laminar, RAS or LES model is selected to model the momentum stress.
Uses the flexible PIMPLE (PISO-SIMPLE) solution for time-resolved and
pseudo-transient and steady simulations.
SourceFiles
compressibleMultiphaseVoF.C
See also
Foam::solvers::VoFSolver
Foam::solvers::multiphaseVoFSolver
executed with foamRun for single region simulations of foamMultiRun for
multi-region simulations. Replaces multiphaseInterFoam and all the
corresponding tutorials have been updated and moved to
tutorials/modules/incompressibleMultiphaseVoF.
incompressibleMultiphaseVoF is derived from the multiphaseVoFSolver which adds
multiphase capability to the VoFSolver base-class used as the basis of all
two-phase and multiphase VoF solvers.
Class
Foam::solvers::incompressibleMultiphaseVoF
Description
Solver module for the solution of multiple incompressible, isothermal
immiscible fluids using a VOF (volume of fluid) phase-fraction based
interface capturing approach, with optional mesh motion and mesh topology
changes including adaptive re-meshing.
The momentum and other fluid properties are of the "mixture" and a single
momentum equation is solved.
A mixture approach for momentum transport is provided in which a single
laminar, RAS or LES model is selected to model the momentum stress.
Uses the flexible PIMPLE (PISO-SIMPLE) solution for time-resolved and
pseudo-transient and steady simulations.
SourceFiles
incompressibleMultiphaseVoF.C
See also
Foam::solvers::VoFSolver
Foam::solvers::multiphaseVoFSolver
The standard Jayatilleke thermal wall function now permits evaluation
via static functions. The boiling wall function now uses these
functions, thereby removing the phase-Jayatilleke base class and
associated duplication of the Jayatilleke model.