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");
65 void Foam::functionObjects::yPlus::calcYPlus
71 volScalarField::Boundary d = nearWallDist(mesh_).y();
73 const volScalarField::Boundary nutBf =
74 turbModel.nut()().boundaryField();
76 const volScalarField::Boundary nuEffBf =
77 turbModel.nuEff()().boundaryField();
79 const volScalarField::Boundary nuBf =
80 turbModel.nu()().boundaryField();
84 volScalarField::Boundary& yPlusBf = yPlus.boundaryFieldRef();
88 const fvPatch& patch = patches[
patchi];
90 if (isA<nutWallFunctionFvPatchScalarField>(nutBf[patchi]))
92 const nutWallFunctionFvPatchScalarField& nutPf =
93 dynamic_cast<const nutWallFunctionFvPatchScalarField&
> 98 yPlusBf[
patchi] = nutPf.yPlus();
100 else if (isA<wallFvPatch>(patch))
107 *
mag(turbModel.U().boundaryField()[
patchi].snGrad())
116 Foam::functionObjects::yPlus::yPlus
134 mesh_.time().timeName(),
144 mesh_.objectRegistry::store(yPlusPtr);
148 resetLocalObjectName(typeName);
181 calcYPlus(model, yPlus);
186 <<
"Unable to find turbulence model in the " 205 const volScalarField::Boundary& yPlusBf = yPlus.
boundaryField();
212 if (isA<wallFvPatch>(patch))
216 const scalar minYplus =
gMin(yPlusp);
217 const scalar maxYplus =
gMax(yPlusp);
218 const scalar avgYplus =
gAverage(yPlusp);
222 Log <<
" patch " << patch.
name()
223 <<
" y+ : min = " << minYplus <<
", max = " << maxYplus
224 <<
", 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.
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...
defineTypeNameAndDebug(fvMeshFunctionObject, 0)
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
addToRunTimeSelectionTable(functionObject, add, dictionary)
functionObject base class for creating, maintaining and writing log files e.g. integrated of averaged...