35 namespace functionObjects
105 phaseName_(
dict.lookupOrDefault<
word>(
"phase",
word::null))
121 if (
dict.found(
"field"))
123 fieldSet_.insert(
word(
dict.lookup(
"field")));
130 if (
dict.lookupOrDefault<
Switch>(
"prefix",
false))
132 prefix_ = momentumTransportModel::typeName +
':';
140 if (fieldSet_.size())
142 Info<<
"storing fields:" <<
nl;
152 Info<<
"no fields requested to be stored" <<
nl <<
endl;
171 const word&
f = iter.key();
172 switch (compressibleFieldNames_[
f])
176 processField<scalar>(
f, model.k());
181 processField<scalar>(
f, model.epsilon());
186 processField<scalar>(
f, model.omega());
191 processField<scalar>(
f, model.nut());
196 processField<scalar>(
f, model.nuEff());
199 case compressibleField::kappaEff:
206 processField<symmTensor>(
f, model.sigma());
209 case compressibleField::devTau:
211 processField<symmTensor>(
f, model.devTau());
229 const word&
f = iter.key();
230 switch (compressibleFieldNames_[
f])
234 processField<scalar>(
f, model.
k());
239 processField<scalar>(
f, model.
epsilon());
244 processField<scalar>(
f, model.
omega());
249 processField<scalar>(
f, model.
nut());
254 processField<scalar>(
f, model.
nuEff());
259 processField<symmTensor>(
f, model.
sigma());
262 case compressibleField::devTau:
264 processField<symmTensor>(
f, model.
devTau());
285 const word&
f = iter.key();
286 switch (incompressibleFieldNames_[
f])
290 processField<scalar>(
f, model.
k());
295 processField<scalar>(
f, model.
epsilon());
300 processField<scalar>(
f, model.
omega());
305 processField<scalar>(
f, model.
nut());
310 processField<scalar>(
f, model.
nuEff());
315 processField<symmTensor>(
f, model.
sigma());
318 case incompressibleField::devSigma:
320 processField<symmTensor>(
f, model.
devSigma());
334 <<
"Turbulence model not found in database, deactivating"
350 writeObject(fieldName);
#define R(A, B, C, D, E, F, K, M)
#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.
virtual tmp< volSymmTensorField > devTau() const =0
Return the effective stress tensor including the laminar stress.
A list of keyword definitions, which are a keyword followed by any number of values (e....
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< compressibleField, 8 > compressibleFieldNames_
static const NamedEnum< incompressibleField, 7 > incompressibleFieldNames_
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< volSymmTensorField > devSigma() const
Return the effective stress tensor.
virtual tmp< volScalarField > nut() const =0
Return the turbulence viscosity.
virtual tmp< volScalarField > k() const =0
Return the turbulence kinetic energy.
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< volSymmTensorField > sigma() const =0
Return the stress tensor [m^2/s^2].
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.
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 bool)
Return a word representation of a bool.
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.