35 namespace functionObjects
120 return Foam::momentumTransportModel::typeName;
126 if (dict.
found(
"field"))
137 prefix_ = modelName() +
':';
145 if (fieldSet_.size())
147 Info<<
"storing fields:" <<
nl;
150 Info<<
" " << prefix_ + iter.key() <<
nl;
156 Info<<
"no fields requested to be stored" <<
nl <<
endl;
170 thermophysicalTransportModel::typeName
178 const word&
f = iter.key();
179 switch (compressibleFieldNames_[f])
183 processField<scalar>(
f, model.k());
188 processField<scalar>(
f, model.epsilon());
191 case compressibleField::omega:
193 processField<scalar>(
f, omega(model));
196 case compressibleField::mut:
198 processField<scalar>(
f, model.mut());
201 case compressibleField::muEff:
203 processField<scalar>(
f, model.muEff());
206 case compressibleField::alphaEff:
213 processField<symmTensor>(
f, model.sigma());
216 case compressibleField::devTau:
218 processField<symmTensor>(
f, model.devTau());
236 const word&
f = iter.key();
237 switch (compressibleFieldNames_[f])
241 processField<scalar>(
f, model.
k());
246 processField<scalar>(
f, model.
epsilon());
249 case compressibleField::omega:
251 processField<scalar>(
f, omega(model));
254 case compressibleField::mut:
256 processField<scalar>(
f, model.
mut());
259 case compressibleField::muEff:
261 processField<scalar>(
f, model.
muEff());
266 processField<symmTensor>(
f, model.
sigma());
269 case compressibleField::devTau:
271 processField<symmTensor>(
f, model.
devTau());
295 const word&
f = iter.key();
296 switch (incompressibleFieldNames_[f])
300 processField<scalar>(
f, model.
k());
305 processField<scalar>(
f, model.
epsilon());
308 case incompressibleField::omega:
310 processField<scalar>(
f, omega(model));
315 processField<scalar>(
f, model.
nut());
318 case incompressibleField::nuEff:
320 processField<scalar>(
f, model.
nuEff());
325 processField<symmTensor>(
f, model.
sigma());
328 case incompressibleField::devSigma:
330 processField<symmTensor>(
f, model.
devSigma());
344 <<
"Turbulence model not found in database, deactivating" 356 const word fieldName = prefix_ + iter.key();
357 writeObject(fieldName);
A HashTable with keys but without contents.
bool found(const word &, bool recursive=false, bool patternMatch=true) const
Search dictionary for given keyword.
errorManipArg< error, int > exit(error &err, const int errNo=1)
virtual tmp< volSymmTensorField > sigma() const =0
Return the stress tensor [m^2/s^2].
A list of keyword definitions, which are a keyword followed by any number of values (e...
turbulenceFields(const word &name, const Time &runTime, const dictionary &dict)
Construct from Time and dictionary.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
const compressibleMomentumTransportModel & momentumTransport() const
addToRunTimeSelectionTable(functionObject, Qdot, dictionary)
virtual tmp< volScalarField > muEff() const =0
Return the effective dynamic viscosity.
Ostream & endl(Ostream &os)
Add newline and flush stream.
A simple wrapper around bool so that it can be read as a word: true/false, on/off, yes/no, y/n, t/f, or none/any.
static const NamedEnum< incompressibleField, 7 > incompressibleFieldNames_
label k
Boltzmann constant.
Initialise the NamedEnum HashTable from the static list of names.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Macros for easy insertion into run-time selection tables.
static const NamedEnum< compressibleField, 8 > compressibleFieldNames_
bool read(const char *, int32_t &)
A class for handling words, derived from string.
static const word null
An empty word.
virtual bool read(const dictionary &)
Read the controls.
virtual bool write()
Do nothing.
forAllConstIter(PtrDictionary< phaseModel >, mixture.phases(), phase)
virtual tmp< volScalarField > nut() const =0
Return the turbulence viscosity.
virtual ~turbulenceFields()
Destructor.
word name(const complex &)
Return a string representation of a complex.
defineTypeNameAndDebug(Qdot, 0)
virtual tmp< volScalarField > k() const =0
Return the turbulence kinetic energy.
virtual tmp< volScalarField > mut() const =0
Return the turbulence dynamic viscosity.
Abstract base class for thermophysical transport models (RAS, LES and laminar).
List< word > wordList
A List of words.
Templated abstract base class for single-phase incompressible turbulence models.
T lookupOrDefault(const word &, const T &, bool recursive=false, bool patternMatch=true) const
Find and return a T,.
#define R(A, B, C, D, E, F, K, M)
virtual tmp< volScalarField > alphaEff() const =0
Effective thermal turbulent diffusivity of mixture [kg/m/s].
virtual tmp< volSymmTensorField > devTau() const =0
Return the effective stress tensor including the laminar stress.
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.
virtual bool execute()
Calculate turbulence fields.
static const word & modelName()
Specialization of Foam::functionObject for an Foam::fvMesh, providing a reference to the Foam::fvMesh...
virtual tmp< volScalarField > epsilon() const =0
Return the turbulence kinetic energy dissipation rate.
virtual tmp< volSymmTensorField > devSigma() const
Return the effective stress tensor.
virtual tmp< volScalarField > nuEff() const =0
Return the effective viscosity.
Abstract base class for turbulence models (RAS, LES and laminar).
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.