Go to the documentation of this file.
38 namespace 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" },
105 <<
"Turbulence model not found in database, deactivating"
134 if (
dict.found(
"field"))
136 fieldSet_.insert(
dict.get<
word>(
"field"));
144 if (fieldSet_.size())
146 Info<<
"storing fields:" <<
nl;
147 for (
const word&
f : fieldSet_)
149 Info<<
" " << modelName_ <<
':' <<
f <<
nl;
155 Info<<
"no fields requested to be stored" <<
nl <<
endl;
171 for (
const word&
f : fieldSet_)
173 switch (compressibleFieldNames_[
f])
177 processField<scalar>(
f, model.k());
182 processField<scalar>(
f, model.epsilon());
187 processField<scalar>(
f, omega(model));
192 processField<scalar>(
f, nuTilda(model));
197 processField<scalar>(
f, model.mut());
202 processField<scalar>(
f, model.muEff());
207 processField<scalar>(
f, model.
alphat());
212 processField<scalar>(
f, model.
alphaEff());
217 processField<symmTensor>(
f, model.R());
222 processField<symmTensor>(
f, model.devRhoReff());
227 processField<scalar>(
f,
L(model));
232 processField<scalar>(
f,
I(model));
248 for (
const word&
f : fieldSet_)
250 switch (incompressibleFieldNames_[
f])
254 processField<scalar>(
f, model.
k());
259 processField<scalar>(
f, model.
epsilon());
264 processField<scalar>(
f, omega(model));
269 processField<scalar>(
f, nuTilda(model));
274 processField<scalar>(
f, model.
nut());
279 processField<scalar>(
f, model.
nuEff());
284 processField<symmTensor>(
f, model.
R());
289 processField<symmTensor>(
f, model.
devReff());
294 processField<scalar>(
f,
L(model));
299 processField<scalar>(
f,
I(model));
317 for (
const word&
f : fieldSet_)
319 const word fieldName = modelName_ +
':' +
f;
320 writeObject(fieldName);
virtual tmp< volSymmTensorField > R() const =0
Return the Reynolds stress tensor.
const vector L(dict.get< vector >("L"))
const objectRegistry & obr_
Reference to the region objectRegistry.
Enum is a wrapper around a list of names/values that represent particular enumeration (or int) values...
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
A class for handling words, derived from Foam::string.
static const Enum< incompressibleField > incompressibleFieldNames_
Names for incompressibleField turbulence fields.
virtual tmp< volScalarField > nut() const =0
Return the turbulence viscosity.
static const word modelName_
Turbulence closure model name.
bool read(const char *buf, int32_t &val)
Same as readInt32.
compressibleField
Options for the turbulence fields (compressible)
static const word propertiesName
Default name of the turbulence properties dictionary.
turbulenceFields(const word &name, const Time &runTime, const dictionary &dict)
Construct from Time and dictionary.
Ostream & endl(Ostream &os)
Add newline and flush stream.
Specialization of Foam::functionObject for an Foam::fvMesh, providing a reference to the Foam::fvMesh...
bool foundObject(const word &name, const bool recursive=false) const
Is the named Type found?
virtual tmp< volSymmTensorField > devReff() const
Return the effective stress tensor.
virtual bool write()
Do nothing.
messageStream Info
Information stream (uses stdout - output is on the master only)
word name(const complex &c)
Return string representation of complex.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
virtual bool read(const dictionary &dict)
Read optional controls.
Macros for easy insertion into run-time selection tables.
virtual tmp< volScalarField > k() const =0
Return the turbulence kinetic energy.
errorManip< error > abort(error &err)
virtual bool read(const dictionary &)
Read the controls.
errorManipArg< error, int > exit(error &err, const int errNo=1)
static const Enum< compressibleField > compressibleFieldNames_
Names for compressibleField turbulence fields.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
incompressibleField
Options for the turbulence fields (incompressible)
virtual tmp< volScalarField > alphaEff() const
Return the effective turbulent thermal diffusivity for enthalpy.
addToRunTimeSelectionTable(functionObject, ObukhovLength, dictionary)
Templated wrapper class to provide compressible turbulence models thermal diffusivity based thermal t...
virtual tmp< volScalarField > alphat() const
Return the turbulent thermal diffusivity for enthalpy [kg/m/s].
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
defineTypeNameAndDebug(ObukhovLength, 0)
Templated abstract base class for single-phase incompressible turbulence models.
bool compressible()
Return true if compressible turbulence model is identified.
virtual bool execute()
Calculate turbulence fields.
virtual tmp< volScalarField > nuEff() const =0
Return the effective viscosity.
virtual tmp< volScalarField > epsilon() const =0
Return the turbulence kinetic energy dissipation rate.
static const Identity< scalar > I