37 namespace functionObjects
53 void Foam::functionObjects::yPlus::writeFileHeader(
const label i)
71 tmp<volScalarField> tyPlus
85 const tmp<volScalarField> tnut = turbModel.nut();
88 const tmp<volScalarField> tnuEff = turbModel.nuEff();
91 const tmp<volScalarField> tnu = turbModel.nu();
100 if (isA<nutWallFunctionFvPatchScalarField>(nutBf[
patchi]))
102 const nutWallFunctionFvPatchScalarField& nutPf =
103 dynamic_cast<const nutWallFunctionFvPatchScalarField&
>
108 yPlusBf[
patchi] = nutPf.yPlus();
110 else if (isA<wallFvPatch>(patch))
117 *
mag(turbModel.U().boundaryField()[
patchi].snGrad())
138 phaseName_(
dict.lookupOrDefault<
word>(
"phase",
word::null))
176 return store(
name, calcYPlus(model));
181 <<
"Unable to find turbulence model in the "
210 if (isA<wallFvPatch>(patch))
214 const scalar minYplus =
gMin(yPlusp);
215 const scalar maxYplus =
gMax(yPlusp);
216 const scalar avgYplus =
gAverage(yPlusp);
220 Log <<
" patch " << patch.
name()
221 <<
" y+ : min = " << minYplus <<
", max = " << maxYplus
222 <<
", average = " << avgYplus <<
nl;
#define forAll(list, i)
Loop across all elements in list.
Macros for easy insertion into run-time selection tables.
static nearWallDist & New(const word &name, const fvMesh &mesh)
Construct and return the named DemandDrivenMeshObject.
Generic GeometricBoundaryField class.
Generic GeometricField class.
GeometricBoundaryField< Type, PatchField, GeoMesh > Boundary
Type of the boundary field.
static tmp< GeometricField< Type, PatchField, GeoMesh > > New(const word &name, const Internal &, const PtrList< PatchField< Type >> &, const HashPtrTable< Source > &=HashPtrTable< Source >())
Return a temporary field constructed from name,.
static word groupName(Name name, const word &group)
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
static bool master(const label communicator=0)
Am I the master process.
A list of keyword definitions, which are a keyword followed by any number of values (e....
Abstract base-class for Time/database functionObjects.
Specialisation of Foam::functionObject for an Foam::fvMesh, providing a reference to the Foam::fvMesh...
functionObject base class for creating, maintaining and writing log files e.g. integrated of averaged...
OFstream & file()
Return access to the file (if only 1)
virtual bool write()
Write function.
Calculates the natural logarithm of the specified scalar field.
const ObjectType & lookupObject(const word &fieldName) const
Lookup object from the objectRegistry.
virtual bool read(const dictionary &)
Read optional controls.
void writeTabbed(Ostream &os, const string &str) const
Write a tabbed string to stream.
void writeHeader(Ostream &os, const string &str) const
Write a commented header to stream.
void writeCommented(Ostream &os, const string &str) const
Write a commented string to stream.
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.
virtual bool write()
Write function.
Evaluates and outputs turbulence y+ for models. Values written to time directories as field 'yPlus' o...
virtual ~yPlus()
Destructor.
yPlus(const word &name, const Time &runTime, const dictionary &dict)
Construct from Time and dictionary.
virtual bool execute()
Calculate the yPlus field.
virtual bool write()
Write the yPlus field.
virtual bool read(const dictionary &)
Read the yPlus data.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
virtual const word & name() const
Return name.
Abstract base class for turbulence models (RAS, LES and laminar).
const volScalarField::Boundary & y() const
Access to the near-wall distances.
A class for managing temporary objects.
A class for handling words, derived from string.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
const fvPatchList & patches
#define Log
Report write to Foam::Info if the local log switch is true.
compressibleMomentumTransportModel momentumTransportModel
defineTypeNameAndDebug(adjustTimeStepToCombustion, 0)
addToRunTimeSelectionTable(functionObject, adjustTimeStepToCombustion, dictionary)
errorManipArg< error, int > exit(error &err, const int errNo=1)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Ostream & endl(Ostream &os)
Add newline and flush stream.
word name(const bool)
Return a word representation of a bool.
const dimensionSet dimless
dimensionedScalar sqrt(const dimensionedScalar &ds)
PtrList< fvPatch > fvPatchList
container classes for fvPatch
dimensioned< scalar > mag(const dimensioned< Type > &)
Type gAverage(const FieldField< Field, Type > &f)
Type gMin(const FieldField< Field, Type > &f)
Type gMax(const FieldField< Field, Type > &f)
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.