This function object evaluates and outputs turbulence y+ for turbulence models. The field is stored on the mesh database so that it can be retrieved and used for other applications. More...
Public Member Functions | |
TypeName ("yPlus") | |
Runtime type information. More... | |
yPlus (const word &name, const objectRegistry &, const dictionary &, const bool loadFromFiles=false) | |
Construct for given objectRegistry and dictionary. More... | |
virtual | ~yPlus () |
Destructor. More... | |
virtual const word & | name () const |
Return name of the set of yPlus. More... | |
virtual void | read (const dictionary &) |
Read the yPlus data. More... | |
virtual void | execute () |
Execute, currently does nothing. More... | |
virtual void | end () |
Execute at the final time-loop, currently does nothing. More... | |
virtual void | timeSet () |
Called when time was set at the end of the Time::operator++. More... | |
virtual void | write () |
Calculate the yPlus and write. More... | |
virtual void | updateMesh (const mapPolyMesh &) |
Update for changes of mesh. More... | |
virtual void | movePoints (const polyMesh &) |
Update for changes of mesh. More... | |
![]() | |
functionObjectFile (const objectRegistry &obr, const word &prefix) | |
Construct null. More... | |
functionObjectFile (const objectRegistry &obr, const word &prefix, const word &fileName, const dictionary &dict) | |
Construct from components and read options from dictionary. More... | |
virtual | ~functionObjectFile () |
Destructor. More... | |
void | read (const dictionary &dict) |
Read. More... | |
OFstream & | file () |
Return access to the file (if only 1) More... | |
bool | writeToFile () const |
Return true if can write to file. More... | |
void | writeCommented (Ostream &os, const string &str) const |
Write a commented string to stream. More... | |
void | writeTabbed (Ostream &os, const string &str) const |
Write a tabbed string to stream. More... | |
void | writeHeader (Ostream &os, const string &str) const |
Write a commented header to stream. More... | |
void | writeTime (Ostream &os) const |
Write the current time to stream. More... | |
template<class Type > | |
void | writeHeaderValue (Ostream &os, const string &property, const Type &value) const |
Write a (commented) header property and value pair. More... | |
label | charWidth () const |
Return width of character stream output. More... | |
Private Member Functions | |
virtual void | writeFileHeader (Ostream &os) const |
File header information. More... | |
template<class TurbulenceModel > | |
void | calcYPlus (const TurbulenceModel &turbulenceModel, const fvMesh &mesh, volScalarField &yPlus) |
Calculate y+. More... | |
yPlus (const yPlus &) | |
Disallow default bitwise copy construct. More... | |
void | operator= (const yPlus &) |
Disallow default bitwise assignment. More... | |
Private Attributes | |
word | name_ |
Name of this set of yPlus objects. More... | |
const objectRegistry & | obr_ |
bool | active_ |
on/off switch More... | |
word | phiName_ |
Name of mass/volume flux field (optional, default = phi) More... | |
word | resultName_ |
Result name. More... | |
Switch | log_ |
Switch to send output to Info as well as to file. More... | |
Additional Inherited Members | |
![]() | |
static const word | outputPrefix = "postProcessing" |
Directory prefix. More... | |
static label | addChars = 7 |
Additional characters for writing. More... | |
![]() | |
virtual void | initStream (Ostream &os) const |
Initialise the output stream for writing. More... | |
virtual fileName | baseFileDir () const |
Return the base directory for output. More... | |
virtual fileName | baseTimeDir () const |
Return the base directory for the current time value. More... | |
virtual autoPtr< OFstream > | createFile (const word &name) const |
Return an autoPtr to a new file. More... | |
virtual void | resetFile (const word &name) |
Reset internal file pointer to new file with new name. More... | |
virtual Omanip< int > | valueWidth (const label offset=0) const |
Return the value width when writing to stream with optional offset. More... | |
functionObjectFile (const functionObjectFile &) | |
Disallow default bitwise copy construct. More... | |
void | operator= (const functionObjectFile &) |
Disallow default bitwise assignment. More... | |
![]() | |
bool | writeToFile_ |
Flag to enable/disable writing to file. More... | |
This function object evaluates and outputs turbulence y+ for turbulence models. The field is stored on the mesh database so that it can be retrieved and used for other applications.
Example of function object specification to calculate the y+ (LES):
yPlus1 { type yPlus; functionObjectLibs ("libutilityFunctionObjects.so"); ... }
Function object usage
Property | Description | Required | Default value |
---|---|---|---|
type | Type name: yPlus | yes | |
phiName | Name of flux field | no | phi |
resultName | Name of y+ field | no | <function name> |
log | Log to standard output | no | yes |
yPlus | ( | const word & | name, |
const objectRegistry & | obr, | ||
const dictionary & | dict, | ||
const bool | loadFromFiles = false |
||
) |
Construct for given objectRegistry and dictionary.
Allow the possibility to load fields from files
Definition at line 56 of file yPlus.C.
References dict, Foam::dimless, Foam::endl(), mesh, Foam::nl, IOobject::NO_READ, IOobject::NO_WRITE, Foam::read(), fvMesh::time(), Time::timeName(), and WarningInFunction.
|
privatevirtual |
File header information.
Definition at line 41 of file yPlus.C.
References Foam::endl(), functionObjectFile::writeCommented(), functionObjectFile::writeHeader(), and functionObjectFile::writeTabbed().
|
private |
Calculate y+.
Definition at line 34 of file yPlusTemplates.C.
References boundaryField(), GeometricField::boundaryField(), Foam::endl(), forAll, Foam::gAverage(), Foam::gMax(), Foam::gMin(), Foam::Info, Foam::mag(), mesh, fvPatch::name(), Foam::nl, turbulenceModel::nu(), turbulenceModel::nuEff(), turbulenceModel::nut(), patches, patchi, Foam::sqrt(), turbulenceModel::U(), nearWallDist::y(), and nutWallFunctionFvPatchScalarField::yPlus().
|
private |
Disallow default bitwise assignment.
TypeName | ( | "yPlus" | ) |
Runtime type information.
|
inlinevirtual |
Return name of the set of yPlus.
Definition at line 181 of file yPlus.H.
References yPlus::name_.
Referenced by yPlus::write().
|
virtual |
Read the yPlus data.
Definition at line 118 of file yPlus.C.
References dict, functionObjectFile::read(), and dictionary::readIfPresent().
|
virtual |
Execute, currently does nothing.
Definition at line 131 of file yPlus.C.
References Foam::dimMass, Foam::dimTime, Foam::dimVolume, Foam::endl(), objectRegistry::foundObject(), Foam::Info, objectRegistry::lookupObject(), mesh, Foam::nl, phi, turbulenceModel::propertiesName, Foam::type(), and WarningInFunction.
|
virtual |
|
virtual |
Called when time was set at the end of the Time::operator++.
|
virtual |
Calculate the yPlus and write.
Definition at line 215 of file yPlus.C.
References Foam::endl(), Foam::Info, yPlus::name(), Foam::nl, Foam::type(), and yPlus::write().
Referenced by yPlusWriter::write(), and yPlus::write().
|
inlinevirtual |
|
inlinevirtual |
|
private |
Name of this set of yPlus objects.
Definition at line 117 of file yPlus.H.
Referenced by yPlus::name().
|
private |
|
private |
|
private |
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.