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))
116 prefix_ = momentumTransportModel::typeName +
':';
124 if (fieldSet_.size())
126 Info<<
"storing fields:" <<
nl;
136 Info<<
"no fields requested to be stored" <<
nl <<
endl;
155 const word&
f = iter.key();
156 switch (compressibleFieldNames_[
f])
160 processField<scalar>(
f, model.k());
165 processField<scalar>(
f, model.epsilon());
170 processField<scalar>(
f, model.omega());
175 processField<scalar>(
f, model.nut());
180 processField<scalar>(
f, model.nuEff());
183 case compressibleField::kappaEff:
190 processField<symmTensor>(
f, model.R());
208 const word&
f = iter.key();
209 switch (compressibleFieldNames_[
f])
213 processField<scalar>(
f, model.
k());
218 processField<scalar>(
f, model.
epsilon());
223 processField<scalar>(
f, model.
omega());
228 processField<scalar>(
f, model.
nut());
233 processField<scalar>(
f, model.
nuEff());
238 processField<symmTensor>(
f, model.
R());
259 const word&
f = iter.key();
260 switch (incompressibleFieldNames_[
f])
264 processField<scalar>(
f, model.
k());
269 processField<scalar>(
f, model.
epsilon());
274 processField<scalar>(
f, model.
omega());
279 processField<scalar>(
f, model.
nut());
284 processField<scalar>(
f, model.
nuEff());
289 processField<symmTensor>(
f, model.
R());
303 <<
"Turbulence model not found in database, deactivating"
319 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 turbulence 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 turbulence 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(adjustTimeStepToCombustion, 0)
addToRunTimeSelectionTable(functionObject, adjustTimeStepToCombustion, dictionary)
errorManipArg< error, int > exit(error &err, const int errNo=1)
List< word > wordList
A List of words.
Ostream & endl(Ostream &os)
Add newline and flush stream.
word name(const LagrangianState state)
Return a string representation of a Lagrangian state enumeration.
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.