34 namespace functionObjects
50 void Foam::functionObjects::turbulenceIntensity::writeFileHeader(
const label i)
53 writeCommented(
file(),
"Time");
54 writeTabbed(
file(),
"min");
55 writeTabbed(
file(),
"max");
56 writeTabbed(
file(),
"average");
92 resetLocalObjectName(
"I");
104 momentumTransportModel::typeName
111 momentumTransportModel::typeName
125 max(uPrime,
mag(turbModel.
U())),
133 <<
"Unable to find turbulence model in the " 152 const scalar minTurbulenceIntensity =
min(turbulenceIntensity).value();
153 const scalar maxTurbulenceIntensity =
max(turbulenceIntensity).value();
154 const scalar avgTurbulenceIntensity = turbulenceIntensity.
average().value();
158 Log <<
" I : min = " << minTurbulenceIntensity
159 <<
", max = " << maxTurbulenceIntensity
160 <<
", average = " << avgTurbulenceIntensity <<
nl;
164 <<
tab << minTurbulenceIntensity
165 <<
tab << maxTurbulenceIntensity
166 <<
tab << avgTurbulenceIntensity
virtual bool write()
Write function.
Calculates the natural logarithm of the specified scalar field.
virtual bool write()
Write function.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
errorManipArg< error, int > exit(error &err, const int errNo=1)
virtual bool write()
Write the turbulenceIntensity field.
A list of keyword definitions, which are a keyword followed by any number of values (e...
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
addToRunTimeSelectionTable(functionObject, Qdot, dictionary)
dimensionedScalar sqrt(const dimensionedScalar &ds)
Ostream & endl(Ostream &os)
Add newline and flush stream.
static bool master(const label communicator=0)
Am I the master process.
const ObjectType & lookupObject(const word &fieldName) const
Lookup object from the objectRegistry.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Macros for easy insertion into run-time selection tables.
virtual bool read(const dictionary &)
Read optional controls.
bool read(const char *, int32_t &)
void writeHeader(std::ostream &, const bool isBinary, const std::string &title)
Write header.
virtual bool execute()
Calculate the turbulenceIntensity field.
A class for handling words, derived from string.
turbulenceIntensity(const word &name, const Time &runTime, const dictionary &dict)
Construct from Time and dictionary.
Evaluates and writes the turbulence intensity field 'I'.
const dimensionSet dimVelocity
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
word name(const complex &)
Return a string representation of a complex.
defineTypeNameAndDebug(Qdot, 0)
dimensioned< Type > average() const
Calculate and return arithmetic average.
virtual tmp< volScalarField > k() const =0
Return the turbulence kinetic energy.
Abstract base class for turbulence models (RAS, LES and laminar).
const volVectorField & U() const
Access function to velocity field.
virtual bool read(const dictionary &)
Read the turbulenceIntensity data.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
FunctionObject base class for managing a list of objects on behalf of the inheriting function object...
virtual bool read(const dictionary &)
Read the list of objects to be written.
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.
#define Log
Report write to Foam::Info if the local log switch is true.
dimensioned< scalar > mag(const dimensioned< Type > &)
Specialisation of Foam::functionObject for an Foam::fvMesh, providing a reference to the Foam::fvMesh...
virtual ~turbulenceIntensity()
Destructor.
functionObject base class for creating, maintaining and writing log files e.g. integrated of averaged...