Go to the documentation of this file.
41 namespace functionObjects
69 shearStress.dimensions().reset(Reff.dimensions());
71 for (
const label patchi : patchSet_)
74 const vectorField& Sfp = mesh_.Sf().boundaryField()[patchi];
75 const scalarField& magSfp = mesh_.magSf().boundaryField()[patchi];
78 ssp = (-Sfp/magSfp) & Reffp;
85 Foam::functionObjects::wallShearStress::wallShearStress
98 writeFileHeader(file());
107 mesh_.time().timeName(),
117 mesh_.objectRegistry::store(wallShearStressPtr);
144 if (patchSet_.empty())
148 if (isA<wallPolyPatch>(pbm[patchi]))
150 patchSet_.insert(patchi);
154 Info<<
" processing all wall patches" <<
nl <<
endl;
158 Info<<
" processing wall patches: " <<
nl;
160 for (
const label patchi : patchSet_)
162 if (isA<wallPolyPatch>(pbm[patchi]))
164 filteredPatchSet.
insert(patchi);
170 <<
"Requested wall shear stress on non-wall boundary "
171 <<
"type patch: " << pbm[patchi].
name() <<
endl;
177 patchSet_ = filteredPatchSet;
193 const turbType* modelPtr =
207 const turbType* modelPtr =
218 <<
"Unable to find turbulence model in the "
237 for (
const label patchi : patchSet_)
248 writeCurrentTime(file());
257 Log <<
" min/max(" << pp.
name() <<
") = "
258 << minSsp <<
", " << maxSsp <<
endl;
Defines the attributes of an object for which implicit objectRegistry management is supported,...
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
const word & name() const
Return name.
A class for handling words, derived from Foam::string.
virtual bool read(const dictionary &)
Read the wallShearStress data.
A polyBoundaryMesh is a polyPatch list with additional search methods and registered IO.
const dimensionSet dimLength(0, 1, 0, 0, 0, 0, 0)
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.
bool read(const char *buf, int32_t &val)
Same as readInt32.
ObjectType & lookupObjectRef(const word &fieldName) const
Lookup and return object (eg, a field) from the (sub) objectRegistry.
List< wordRe > wordReList
A List of wordRe (word or regular expression)
static const word propertiesName
Default name of the turbulence properties dictionary.
Ostream & endl(Ostream &os)
Add newline and flush stream.
virtual const word & name() const
Return name.
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.
dimensioned< vector > dimensionedVector
Dimensioned vector obtained from generic dimensioned type.
virtual void writeHeader(Ostream &os, const string &str) const
Write a commented header to stream.
virtual void writeFileHeader(Ostream &os) const
File header information.
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
virtual bool read(const dictionary &dict)
Read.
virtual bool execute()
Calculate the wall shear-stress.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Calculates and write the shear-stress at wall patches as the volVectorField field 'wallShearStress'.
messageStream Info
Information stream (uses stdout - output is on the master only)
word name(const complex &c)
Return string representation of complex.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
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.
errorManipArg< error, int > exit(error &err, const int errNo=1)
static bool master(const label communicator=0)
Am I the master process.
defineTypeNameAndDebug(fvMeshFunctionObject, 0)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
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.
Boundary & boundaryFieldRef(const bool updateAccessTime=true)
Return a reference to the boundary field.
Templated wrapper class to provide compressible turbulence models thermal diffusivity based thermal t...
virtual bool write()
Write the wall shear-stress.
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
labelHashSet patchSet(const UList< wordRe > &patchNames, const bool warnNotFound=true, const bool useGroups=true) const
Return the set of patch IDs corresponding to the given names.
bool insert(const Key &key)
Insert a new entry, not overwriting existing entries.
const polyBoundaryMesh & patches
functionObject base class for writing single files
Templated abstract base class for single-phase incompressible turbulence models.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Type gMin(const FieldField< Field, Type > &f)
virtual ~wallShearStress()
Destructor.
#define WarningInFunction
Report a warning using Foam::Warning.
void calcShearStress(const volSymmTensorField &Reff, volVectorField &shearStress)
Calculate the shear-stress.
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.