36 namespace functionObjects
52 void Foam::functionObjects::yPlus::writeFileHeader(
const label i)
54 writeHeader(file(),
"y+ ()");
56 writeCommented(file(),
"Time");
57 writeTabbed(file(),
"patch");
58 writeTabbed(file(),
"min");
59 writeTabbed(file(),
"max");
60 writeTabbed(file(),
"average");
70 tmp<volScalarField> tyPlus
77 mesh_.time().timeName(),
85 volScalarField::Boundary& yPlusBf = tyPlus.ref().boundaryFieldRef();
87 volScalarField::Boundary d = nearWallDist(mesh_).y();
89 const volScalarField::Boundary nutBf =
90 turbModel.nut()().boundaryField();
92 const volScalarField::Boundary nuEffBf =
93 turbModel.nuEff()().boundaryField();
95 const volScalarField::Boundary nuBf =
96 turbModel.nu()().boundaryField();
102 const fvPatch& patch = patches[
patchi];
104 if (isA<nutWallFunctionFvPatchScalarField>(nutBf[patchi]))
106 const nutWallFunctionFvPatchScalarField& nutPf =
107 dynamic_cast<const nutWallFunctionFvPatchScalarField&
> 112 yPlusBf[
patchi] = nutPf.yPlus();
114 else if (isA<wallFvPatch>(patch))
121 *
mag(turbModel.U().boundaryField()[
patchi].snGrad())
132 Foam::functionObjects::yPlus::yPlus
145 resetLocalObjectName(typeName);
177 return store(name, calcYPlus(model));
182 <<
"Unable to find turbulence model in the " 201 const volScalarField::Boundary& yPlusBf = yPlus.
boundaryField();
208 if (isA<wallFvPatch>(patch))
212 const scalar minYplus =
gMin(yPlusp);
213 const scalar maxYplus =
gMax(yPlusp);
214 const scalar avgYplus =
gAverage(yPlusp);
218 Log <<
" patch " << patch.
name()
219 <<
" y+ : min = " << minYplus <<
", max = " << maxYplus
220 <<
", average = " << avgYplus <<
nl;
virtual bool read(const dictionary &)
Read the yPlus data.
virtual bool write()
Write function.
#define forAll(list, i)
Loop across all elements in list.
virtual bool write()
Write the yPlus 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.
dimensionedScalar log(const dimensionedScalar &ds)
errorManipArg< error, int > exit(error &err, const int errNo=1)
A list of keyword definitions, which are a keyword followed by any number of values (e...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
virtual bool execute()
Calculate the yPlus field.
Type gMin(const FieldField< Field, Type > &f)
const Boundary & boundaryField() const
Return const-reference to the boundary field.
ThermalDiffusivity< CompressibleTurbulenceModel< fluidThermo > > turbulenceModel
dimensionedScalar sqrt(const dimensionedScalar &ds)
Ostream & endl(Ostream &os)
Add newline and flush stream.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
static bool master(const label communicator=0)
Am I the master process.
const ObjectType & lookupObject(const word &fieldName) const
Lookup object from the objectRegistry.
Abstract base class for turbulence models (RAS, LES and laminar).
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
const word & name() const
Return name.
Macros for easy insertion into run-time selection tables.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
virtual bool read(const dictionary &)
Read optional controls.
bool read(const char *, int32_t &)
static const word propertiesName
Default name of the turbulence properties dictionary.
A class for handling words, derived from string.
Type gMax(const FieldField< Field, Type > &f)
word name(const complex &)
Return a string representation of a complex.
fileName::Type type(const fileName &, const bool followLink=true)
Return the file type: DIRECTORY or FILE.
PtrList< fvPatch > fvPatchList
container classes for fvPatch
virtual ~yPlus()
Destructor.
const dimensionSet dimless(0, 0, 0, 0, 0, 0, 0)
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
Type gAverage(const FieldField< Field, Type > &f)
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
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.
#define Log
Report write to Foam::Info if the local log switch is true.
dimensioned< scalar > mag(const dimensioned< Type > &)
Specialization of Foam::functionObject for an Foam::fvMesh, providing a reference to the Foam::fvMesh...
Evaluates and outputs turbulence y+ for models. Values written to time directories as field 'yPlus'...
defineTypeNameAndDebug(fvMeshFunctionObject, 0)
A class for managing temporary objects.
addToRunTimeSelectionTable(functionObject, add, dictionary)
functionObject base class for creating, maintaining and writing log files e.g. integrated of averaged...