38namespace functionObjects
51 { compressibleField::cfK,
"k" },
52 { compressibleField::cfEpsilon,
"epsilon" },
53 { compressibleField::cfOmega,
"omega" },
54 { compressibleField::cfNuTilda,
"nuTilda" },
55 { compressibleField::cfMut,
"mut" },
56 { compressibleField::cfMuEff,
"muEff" },
57 { compressibleField::cfAlphat,
"alphat" },
58 { compressibleField::cfAlphaEff,
"alphaEff" },
59 { compressibleField::cfR,
"R" },
60 { compressibleField::cfDevRhoReff,
"devRhoReff" },
61 { compressibleField::cfL,
"L" },
62 { compressibleField::cfI,
"I" },
72 { incompressibleField::ifK,
"k" },
73 { incompressibleField::ifEpsilon,
"epsilon" },
74 { incompressibleField::ifOmega,
"omega" },
75 { incompressibleField::ifNuTilda,
"nuTilda" },
76 { incompressibleField::ifNut,
"nut" },
77 { incompressibleField::ifNuEff,
"nuEff" },
78 { incompressibleField::ifR,
"R" },
79 { incompressibleField::ifDevReff,
"devReff" },
80 { incompressibleField::ifL,
"L" },
81 { incompressibleField::ifI,
"I" },
102 <<
"Cannot store turbulence field " << localName
103 <<
" since an object with that name already exists"
126 <<
"Turbulence model not found in database, deactivating"
144 prefix_(
dict.getOrDefault<
word>(
"prefix",
"turbulenceProperties")),
157 dict.readIfPresent(
"prefix", prefix_);
159 if (
dict.found(
"field"))
161 fieldSet_.insert(
dict.get<
word>(
"field"));
169 if (fieldSet_.size())
171 Info<<
"storing fields:" <<
nl;
172 for (
const word&
f : fieldSet_)
180 Info<<
"no fields requested to be stored" <<
nl <<
endl;
183 initialised_ =
false;
206 for (
const word&
f : fieldSet_)
208 switch (compressibleFieldNames_[
f])
212 processField<scalar>(
f, model.k());
217 processField<scalar>(
f, model.epsilon());
222 processField<scalar>(
f, model.omega());
227 processField<scalar>(
f, nuTilda(model));
232 processField<scalar>(
f, model.mut());
237 processField<scalar>(
f, model.muEff());
242 processField<scalar>(
f, model.alphat());
247 processField<scalar>(
f, model.alphaEff());
252 processField<symmTensor>(
f, model.R());
257 processField<symmTensor>(
f, model.devRhoReff());
262 processField<scalar>(
f,
L(model));
267 processField<scalar>(
f,
I(model));
283 for (
const word&
f : fieldSet_)
285 switch (incompressibleFieldNames_[
f])
289 processField<scalar>(
f, model.k());
294 processField<scalar>(
f, model.epsilon());
299 processField<scalar>(
f, model.omega());
304 processField<scalar>(
f, nuTilda(model));
309 processField<scalar>(
f, model.nut());
314 processField<scalar>(
f, model.nuEff());
319 processField<symmTensor>(
f, model.R());
324 processField<symmTensor>(
f, model.devReff());
329 processField<scalar>(
f,
L(model));
334 processField<scalar>(
f,
I(model));
352 for (
const word&
f : fieldSet_)
356 writeObject(localName);
Macros for easy insertion into run-time selection tables.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
Enum is a wrapper around a list of names/values that represent particular enumeration (or int) values...
bool unset(const Key &key)
Unset the specified key - same as erase.
static word scopedName(const std::string &scope, const word &name)
Create scope:name or scope_name string.
Templated abstract base class for single-phase incompressible turbulence models.
virtual bool read()
Re-read model coefficients if they have changed.
Templated wrapper class to provide compressible turbulence models thermal diffusivity based thermal t...
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Abstract base-class for Time/database function objects.
Watches for presence of the named trigger file in the case directory and signals a simulation stop (o...
Specialization of Foam::functionObject for an Foam::fvMesh, providing a reference to the Foam::fvMesh...
const objectRegistry & obr_
Reference to the region objectRegistry.
Computes various turbulence-related quantities that are not typically output during calculations,...
static const word modelName_
Name of the turbulence properties dictionary.
word prefix_
Name of output-field prefix.
void initialise()
Unset duplicate fields already registered by other function objects.
bool compressible()
Return true if compressible turbulence model is identified.
bool initialised_
Flag to track initialisation.
static const Enum< incompressibleField > incompressibleFieldNames_
Names for incompressibleField turbulence fields.
compressibleField
Options for the turbulence fields (compressible)
incompressibleField
Options for the turbulence fields (incompressible)
wordHashSet fieldSet_
Fields to load.
virtual bool execute()
Calculate turbulence fields.
static const Enum< compressibleField > compressibleFieldNames_
Names for compressibleField turbulence fields.
virtual bool write()
Do nothing.
virtual bool read(const dictionary &)
Read the controls.
bool found(const word &name, const bool recursive=false) const
Can the regIOobject object be found (by name).
static const word propertiesName
Default name of the turbulence properties dictionary.
A class for handling words, derived from Foam::string.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
#define WarningInFunction
Report a warning using Foam::Warning.
messageStream Info
Information stream (stdout output on master, null elsewhere)
static const Identity< scalar > I
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
Ostream & endl(Ostream &os)
Add newline and flush stream.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
errorManipArg< error, int > exit(error &err, const int errNo=1)
constexpr char nl
The newline '\n' character (0x0a)
const vector L(dict.get< vector >("L"))