35 namespace functionObjects
89 phaseName_(
dict.lookupOrDefault<
word>(
"phase",
word::null))
105 if (
dict.found(
"field"))
107 fieldSet_.insert(
word(
dict.lookup(
"field")));
114 if (
dict.lookupOrDefault<
Switch>(
"prefix",
false))
123 if (fieldSet_.size())
156 const word&
f = iter.key();
157 switch (compressibleFieldNames_[
f])
161 processField<scalar>(
f, model.k());
166 processField<scalar>(
f, model.epsilon());
171 processField<scalar>(
f, model.omega());
176 processField<scalar>(
f, model.nut());
181 processField<scalar>(
f, model.nuEff());
184 case compressibleField::kappaEff:
191 processField<symmTensor>(
f, model.R());
209 const word&
f = iter.key();
210 switch (compressibleFieldNames_[
f])
214 processField<scalar>(
f, model.
k());
219 processField<scalar>(
f, model.
epsilon());
224 processField<scalar>(
f, model.
omega());
229 processField<scalar>(
f, model.
nut());
234 processField<scalar>(
f, model.
nuEff());
239 processField<symmTensor>(
f, model.
R());
260 const word&
f = iter.key();
261 switch (incompressibleFieldNames_[
f])
265 processField<scalar>(
f, model.
k());
270 processField<scalar>(
f, model.
epsilon());
275 processField<scalar>(
f, model.
omega());
280 processField<scalar>(
f, model.
nut());
285 processField<scalar>(
f, model.
nuEff());
290 processField<symmTensor>(
f, model.
R());
304 <<
"Turbulence model not found in database, deactivating"
320 writeObject(fieldName);
#define forAllConstIter(Container, container, iter)
Iterate across all elements in the container object of type.
Macros for easy insertion into run-time selection tables.
A HashTable with keys but without contents.
static word groupName(Name name, const word &group)
Initialise the NamedEnum HashTable from the static list of names.
A simple wrapper around bool so that it can be read as a word: true/false, on/off,...
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Base class for single-phase compressible momentum transport models.
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
Abstract base class for fluid thermophysical transport models RAS, LES and laminar.
const compressibleMomentumTransportModel & momentumTransport() const
Access function to momentum transport model.
Abstract base-class for Time/database functionObjects.
Specialisation of Foam::functionObject for an Foam::fvMesh, providing a reference to the Foam::fvMesh...
Stores derived turbulence fields on the mesh database for further manipulation.
turbulenceFields(const word &name, const Time &runTime, const dictionary &dict)
Construct from Time and dictionary.
static const NamedEnum< incompressibleField, 6 > incompressibleFieldNames_
static const NamedEnum< compressibleField, 7 > compressibleFieldNames_
virtual ~turbulenceFields()
Destructor.
virtual bool execute()
Calculate turbulence fields.
virtual bool write()
Write the turbulence fields.
virtual bool read(const dictionary &)
Read the controls.
Base class for single-phase incompressible momentum transport models.
virtual tmp< volScalarField > nut() const =0
Return the turbulence viscosity.
virtual tmp< volScalarField > k() const =0
Return the turbulence kinetic energy.
virtual tmp< volSymmTensorField > R() const =0
Return the Reynolds stress tensor [m^2/s^2].
virtual tmp< volScalarField > omega() const =0
Return the turbulence specific dissipation rate.
virtual tmp< volScalarField > epsilon() const =0
Return the turbulence kinetic energy dissipation rate.
virtual tmp< volScalarField > nuEff() const =0
Return the effective viscosity.
virtual tmp< volScalarField > kappaEff() const =0
Effective thermal turbulent conductivity.
A class for handling words, derived from string.
static const word null
An empty word.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
const volSymmTensorField R(IOobject("R", runTime.name(), mesh, IOobject::NO_READ, IOobject::AUTO_WRITE), turbulence->R())
defineTypeNameAndDebug(fvMeshFunctionObject, 0)
addToRunTimeSelectionTable(functionObject, fvModel, dictionary)
errorManipArg< error, int > exit(error &err, const int errNo=1)
List< word > wordList
A List of words.
Ostream & decrIndent(Ostream &os)
Decrement the indent level.
Ostream & endl(Ostream &os)
Add newline and flush stream.
String typeName(const std::type_info &info)
Return the un-mangled name given the standard type info.
Ostream & incrIndent(Ostream &os)
Increment the indent level.
word name(const LagrangianState state)
Return a string representation of a Lagrangian state enumeration.
Ostream & indent(Ostream &os)
Indent stream.