The reactingtTwoPhaseEulerFoam solver has been replaced by the more general
multiphaseEulerFoam solver which supports two-phase and multiphase systems
containing fluid and stationary phases, compressible or incompressible, with
heat and mass transfer, reactions, size distribution and all the usual phase
interaction and transfer models.
All reactingtTwoPhaseEulerFoam tutorials have been ported to multiphaseEulerFoam
to demonstrate two-phase capability with a wide range of phase and
phase-interaction models.
When running with two-phases the optional referencePhase entry in
phaseProperties can be used to specify which phase fraction should not be
solved, providing compatibility with reactingtTwoPhaseEulerFoam, see
tutorials/multiphase/multiphaseEulerFoam/RAS/fluidisedBed
tutorials/multiphase/multiphaseEulerFoam/laminar/bubbleColumn
for examples.
Description
Stops the run when the specified clock time in second has been reached
and optionally write results before stopping.
The following actions are supported:
- noWriteNow
- writeNow
- nextWrite (default)
Examples of function object specification:
\verbatim
stop
{
type stopAtClockTime;
libs ("libutilityFunctionObjects.so");
stopTime 10;
action writeNow;
}
\endverbatim
will stop the run at the next write after the file "stop" is created in the
case directory.
Usage
\table
Property | Description | Required | Default value
type | type name: stopAtClockTime | yes |
stopTime | Maximum elapsed time [s] | yes |
action | Action executed | no | nextWrite
\endtable
By default the case stops following the next write but stopping immediately with
or without writing are also options.
The stopAtFile functionObject derived from stopAt stops the run when a file
predefined file is created in the case directory:
Description
Stops the run when the specified file is created in the case directory.
The default name of the trigger file is \c $FOAM_CASE/<name> where \c
<name> is the name of the functionObject entry and the default action is \c
nextWrite.
Currently the following action types are supported:
- noWriteNow
- writeNow
- nextWrite
Examples of function object specification:
\verbatim
stop
{
type stopAtFile;
libs ("libutilityFunctionObjects.so");
}
\endverbatim
will stop the run at the next write after the file "stop" is created in the
case directory.
\verbatim
stop
{
type stopAtFile;
libs ("libutilityFunctionObjects.so");
file "$FOAM_CASE/stop";
action writeNow;
}
\endverbatim
will write the fields and stop the run when the file "stop" is created in
the case directory.
Usage
\table
Property | Description | Required | Default value
type | type name: stopAtFile | yes |
file | Trigger file path name | no | $FOAM_CASE/<name>
action | Action executed | no | nextWrite
\endtable
providing the shear-stress term in the momentum equation for incompressible and
compressible Newtonian, non-Newtonian and visco-elastic laminar flow as well as
Reynolds averaged and large-eddy simulation of turbulent flow.
The general deviatoric shear-stress term provided by the MomentumTransportModels
library is named divDevTau for compressible flow and divDevSigma (sigma =
tau/rho) for incompressible flow, the spherical part of the shear-stress is
assumed to be either included in the pressure or handled separately. The
corresponding stress function sigma is also provided which in the case of
Reynolds stress closure returns the effective Reynolds stress (including the
laminar contribution) or for other Reynolds averaged or large-eddy turbulence
closures returns the modelled Reynolds stress or sub-grid stress respectively.
For visco-elastic flow the sigma function returns the effective total stress
including the visco-elastic and Newtonian contributions.
For thermal flow the heat-flux generated by thermal diffusion is now handled by
the separate ThermophysicalTransportModels library allowing independent run-time
selection of the heat-flux model.
During the development of the MomentumTransportModels library significant effort
has been put into rationalising the components and supporting libraries,
removing redundant code, updating names to provide a more logical, consistent
and extensible interface and aid further development and maintenance. All
solvers and tutorials have been updated correspondingly and backward
compatibility of the input dictionaries provided.
Henry G. Weller
CFD Direct Ltd.
This provides an extensible and run-time selectable framework to support complex
energy and specie transport models, in particular multi-component diffusion.
Currently only the Fourier for laminar and eddyDiffusivity for RAS and LES
turbulent flows are provided but the interface is general and the set of models
will be expanded in the near future.
Following the generalisation of the TurbulenceModels library to support
non-Newtonian laminar flow including visco-elasticity and extensible to other
form of non-Newtonian behaviour the name TurbulenceModels is misleading and does
not properly represent how general the OpenFOAM solvers now are. The
TurbulenceModels now provides an interface to momentum transport modelling in
general and the plan is to rename it MomentumTransportModels and in preparation
for this the turbulenceProperties dictionary has been renamed momentumTransport
to properly reflect its new more general purpose.
The old turbulenceProperties name is supported for backward-compatibility.
Additional flexibility for handling of field arguments has been extended
to dictionary lists of field settings, as well as word lists of field
names. This means that the following syntax is now supported:
postProcess -func "fieldAverage(p, U { prime2Mean on; }, T)"
postProcess -func "fieldAverage(fields=(p U { prime2Mean on; } T))"
Rather than specifying the controls per field it is simpler to use a single set
of controls for all the fields in the list and use separate instances of the
fieldAverage functionObject for different control sets:
Example of function object specification setting all the optional parameters:
fieldAverage1
{
type fieldAverage;
libs ("libfieldFunctionObjects.so");
writeControl writeTime;
restartOnRestart false;
restartOnOutput false;
periodicRestart false;
restartPeriod 0.002;
base time;
window 10.0;
windowName w1;
mean yes;
prime2Mean yes;
fields (U p);
}
This allows for a simple specification with the optional prime2Mean entry using
#includeFunc fieldAverage(U, p, prime2Mean = yes)
or if the prime2Mean is not needed just
#includeFunc fieldAverage(U, p)
The mean, prime2Mean and base now have default values:
{
mean on; // (default = on)
prime2Mean on; // (default = off)
base time; // time or iteration (default = time)
window 200; // optional averaging window
windowName w1; // optional window name (default = "")
}
so for the majority of cases for which these defaults are appropriate the
fieldAverage functionObject can now be specified in the functions entry in
controlDict thus:
functions
{
fieldAverage1
{
#includeEtc "caseDicts/postProcessing/fields/fieldAverage.cfg"
fields
(
U.air
U.water
alpha.air
p
);
}
}
also utilising the new fieldAverage.cfg file.
For cases in which these defaults are not appropriate, e.g. the prime2Mean is
also required the optional entries can be specified within sub-dictionaries for
each field, e.g.
fieldAverage1
{
#includeEtc "caseDicts/postProcessing/fields/fieldAverage.cfg"
fields
(
U
{
prime2Mean yes;
}
p
{
prime2Mean yes;
}
);
}
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);
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.
When selecting fields with complex automatically generated names it is
cumbersome to escape all the regular expression meta characters and more
convenient to specify the name as a literal string, the new regExp option
provides the ability to switch the regular expression support and defaults to
true for backward compatibility.
For example to cache and write out an intermediate temporary field generated by
the kOmegaSST model:
cacheTemporaryObjects
(
"((interpolate(((1|((1|(1|A(U)))-H(1)))-(1|A(U))))*snGrad(p))*magSf)"
);
functions
{
#includeFunc writeObjects(regExp=off, "((interpolate(((1|((1|(1|A(U)))-H(1)))-(1|A(U))))*snGrad(p))*magSf)")
}
The regExp option can also be specified in a writeObjects dict as
regExp off;
Additionally regular expression support has been added to the includeFunc
argument parsing.
This change formalises the usage of the "log" keyword in function
objects. By default, logging to stdout is activated when running
"postProcess" or "<solver> -postProcess", and deactivated when a
function is being executed as part of a run.
This behaviour can now be overridden in the function object dictionary
when operating in either mode.
Function1 has been generalised in order to provide functionality
previously provided by some near-duplicate pieces of code.
The interpolationTable and tableReader classes have been removed and
their usage cases replaced by Function1. The interfaces to Function1,
Table and TableFile has been improved for the purpose of using it
internally; i.e., without user input.
Some boundary conditions, fvOptions and function objects which
previously used interpolationTable or other low-level interpolation
classes directly have been changed to use Function1 instead. These
changes may not be backwards compatible. See header documentation for
details.
In addition, the timeVaryingUniformFixedValue boundary condition has
been removed as its functionality is duplicated entirely by
uniformFixedValuePointPatchField.
Description
Calculates the thermal comfort quantities predicted mean vote (PMV) and
predicted percentage of dissatisfaction (PPD) based on DIN ISO EN 7730:2005.
Usage
\table
Property | Description | Required | Default value
clothing | The insulation value of the cloth | no | 0
metabolicRate | The metabolic rate | no | 0.8
extWork | The external work | no | 0
Trad | Radiation temperature | no | -1
relHumidity | Relative humidity of the air | no | 50
pSat | Saturation pressure of water | no | -1
tolerance | Residual control for the cloth temperature | no | 1e-5
maxClothIter | Maximum number of iterations | no | 0
meanVelocity | Use a constant mean velocity in the whole domain | no |\
false
\endtable
\table
Predicted Mean Vote (PMV) | evaluation
+ 3 | hot
+ 2 | warm
+ 1 | slightly warm
+ 0 | neutral
- 1 | slightly cool
- 2 | cool
- 3 | cold
\endtable
\verbatim
comfortAnalysis
{
type comfort;
libs ("libfieldFunctionObjects.so");
executeControl writeTime;
writeControl writeTime;
}
\endverbatim
The new tutorial case heatTransfer/buoyantSimpleFoam/comfortHotRoom is provided
to demonstrate the calculation of PMV and PPD using the comfort functionObject.
This work is based on code and case contributed by Tobias Holzmann.
to enable the calculation of the residence time for a fluid; mainly used in HVAC
analysis. E.g. residence time of air inside a ventilated room, see the new
tutorial roomResidenceTime.
Contributed by Tobias Holzmann
Cached temporary objects are now registered from the moment of
construction. This means it is possible to use them before they go out
of scope. Non-cached temporaries are not registered, as before.
The check for the existence of requested cached objects is now done
after function object evaluation. This means that caching can be done on
fields generated by the function objects themselves without generating
warning messages.
The above, however, means that if an object isn't successfully cached
and it's lookup in a function fails, then the warning will not be
generated before the lookup raises an error. This could make diagnosing
the reason for such a failure more difficult. To remedy this the content
of the warning (i.e., the list of objects that are available for
caching) has been added to the lookup error message if the looked up
name is on the caching list. The same level of logged information is
therefore retained in the event of caching and lookup failures.
By default most functionObjects now execute and write at the start-time except
those that perform averaging (fieldAverage, dsmcFields) which cannot be executed
until the end of the first time-step. There is also a new optional
functionObject dictionary entry "executeAtStart" which defaults to true but can
be set false if the execution and results of the functionObject are not required
or appropriate at the start-time.
A result of this change is that time logs of forces, sampling etc. now include a
values for time 0.
Description
Calculates the natural logarithm of the specified scalar field.
Performs \f$ln(max(x, a))\f$ where \f$x\f$ is the field and \f$a\f$ an
optional clip to handle 0 or negative \f$x\f$. Dimension checking can
optionally be suspended for this operation if \f$x\f$ is dimensioned.
Example of function object specification:
\verbatim
log1
{
type log;
libs ("libfieldFunctionObjects.so");
field p;
clip 1e-3;
checkDimensions no;
}
\endverbatim
or using \c postProcess
\verbatim
postProcess -func 'log(p, clip=1e-3, checkDimensions=no)'
\endverbatim
Usage
\table
Property | Description | Required | Default value
type | Type name: log | yes |
clip | Clip value | no |
checkDimensions | Dimension checking switch | no |
\endtable