Go to the documentation of this file.
40 namespace functionObjects
56 void Foam::functionObjects::yPlus::writeFileHeader(Ostream& os)
const
71 Foam::functionObjects::yPlus::yPlus
83 writeFileHeader(file());
92 mesh_.time().timeName(),
102 mesh_.objectRegistry::store(yPlusPtr);
126 lookupObjectRef<volScalarField>(typeName);
130 volScalarField::Boundary& yPlusBf =
yPlus.boundaryFieldRef();
133 lookupObject<turbulenceModel>
139 const volScalarField::Boundary& d = nwd.
y();
143 const volScalarField::Boundary& nutBf = tnut().boundaryField();
154 if (isA<nutWallFunctionFvPatchScalarField>(nutBf[patchi]))
162 yPlusBf[patchi] = nutPf.
yPlus();
164 else if (isA<wallFvPatch>(
patch))
179 <<
"Unable to find turbulence model in the "
180 <<
"database: yPlus will not be calculated" <<
endl;
198 const volScalarField::Boundary& yPlusBf =
yPlus.boundaryField();
205 if (isA<wallFvPatch>(
patch))
209 const scalar minYplus =
gMin(yPlusp);
210 const scalar maxYplus =
gMax(yPlusp);
211 const scalar avgYplus =
gAverage(yPlusp);
216 <<
" y+ : min = " << minYplus <<
", max = " << maxYplus
217 <<
", average = " << avgYplus <<
nl;
219 writeCurrentTime(file());
tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > snGrad(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
Defines the attributes of an object for which implicit objectRegistry management is supported,...
virtual tmp< volScalarField > nu() const =0
Return the laminar viscosity.
const dimensionSet dimless(0, 0, 0, 0, 0, 0, 0)
Dimensionless.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
virtual bool read(const dictionary &)
Read the yPlus data.
A class for handling words, derived from Foam::string.
const ObjectType & lookupObject(const word &fieldName) const
Lookup and return object (eg, a field) from the (sub) objectRegistry.
static constexpr const zero Zero
Global zero.
virtual tmp< volScalarField > nut() const =0
Return the turbulence viscosity.
Type gAverage(const FieldField< Field, Type > &f)
bool read(const char *buf, int32_t &val)
Same as readInt32.
static const word propertiesName
Default name of the turbulence properties dictionary.
virtual tmp< scalarField > yPlus() const =0
Calculate and return the yPlus at the boundary.
Ostream & endl(Ostream &os)
Add newline and flush stream.
Specialization of Foam::functionObject for an Foam::fvMesh, providing a reference to the Foam::fvMesh...
addToRunTimeSelectionTable(functionObject, add, dictionary)
#define forAll(list, i)
Loop across all elements in list.
virtual void writeHeader(Ostream &os, const string &str) const
Write a commented header to stream.
virtual bool read(const dictionary &dict)
Read.
virtual ~yPlus()
Destructor.
virtual bool write()
Write the yPlus field.
word name(const complex &c)
Return string representation of complex.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
Abstract base class for turbulence models (RAS, LES and laminar).
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
virtual bool read(const dictionary &dict)
Read optional controls.
Macros for easy insertion into run-time selection tables.
Evaluates and outputs turbulence y+ for turbulence models.
static bool master(const label communicator=0)
Am I the master process.
defineTypeNameAndDebug(fvMeshFunctionObject, 0)
virtual bool execute()
Calculate the yPlus field.
virtual void writeCommented(Ostream &os, const string &str) const
Write a commented string to stream.
const word & name() const
Return the name of this functionObject.
const std::string patch
OpenFOAM patch number as a std::string.
dimensionedScalar sqrt(const dimensionedScalar &ds)
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
const polyBoundaryMesh & patches
Distance calculation for cells with face on a wall. Searches pointNeighbours to find closest.
const volScalarField::Boundary & y() const
functionObject base class for writing single files
Type gMin(const FieldField< Field, Type > &f)
virtual tmp< volScalarField > nuEff() const =0
Return the effective viscosity.
The class nutWallFunction is a base class that parents the derived boundary conditions which provide ...
#define WarningInFunction
Report a warning using Foam::Warning.
virtual void writeTabbed(Ostream &os, const string &str) const
Write a tabbed string to stream.
Type gMax(const FieldField< Field, Type > &f)
#define Log
Report write to Foam::Info if the local log switch is true.
const Boundary & boundaryField() const
Return const-reference to the boundary field.
const volVectorField & U() const
Access function to velocity field.