38 namespace functionObjects
51 writeHeader(file(),
"Wall shear stress");
52 writeCommented(file(),
"Time");
53 writeTabbed(file(),
"patch");
54 writeTabbed(file(),
"min");
55 writeTabbed(file(),
"max");
76 ssp = (-Sfp/magSfp) & Reffp;
83 Foam::functionObjects::wallShearStress::wallShearStress
93 if (!isA<fvMesh>(obr_))
99 const fvMesh& mesh = refCast<const fvMesh>(obr_);
123 mesh.objectRegistry::store(wallShearStressPtr);
142 const fvMesh& mesh = refCast<const fvMesh>(obr_);
153 if (patchSet_.empty())
157 if (isA<wallPolyPatch>(pbm[
patchi]))
159 patchSet_.insert(patchi);
163 Info<<
" processing all wall patches" << nl <<
endl;
167 Info<<
" processing wall patches: " <<
nl;
172 if (isA<wallPolyPatch>(pbm[patchi]))
174 filteredPatchSet.
insert(patchi);
180 <<
"Requested wall shear stress on non-wall boundary " 181 <<
"type patch: " << pbm[
patchi].name() <<
endl;
187 patchSet_ = filteredPatchSet;
199 const fvMesh& mesh = refCast<const fvMesh>(obr_);
210 const cmpModel& model =
213 Reff = model.devRhoReff();
217 const icoModel& model =
220 Reff = model.devReff();
225 <<
"Unable to find turbulence model in the " 229 calcShearStress(mesh, Reff(), wallShearStress);
243 <<
" writing field " << wallShearStress.
name() <<
endl;
245 wallShearStress.
write();
247 const fvMesh& mesh = refCast<const fvMesh>(obr_);
269 Log <<
" min/max(" << pp.
name() <<
") = " 270 << minSsp <<
", " << maxSsp <<
endl;
#define forAll(list, i)
Loop across all elements in list.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
const surfaceVectorField & Sf() const
Return cell face area vectors.
errorManipArg< error, int > exit(error &err, const int errNo=1)
virtual bool read(const dictionary &)
Read the wallShearStress data.
A list of keyword definitions, which are a keyword followed by any number of values (e...
bool foundObject(const word &name) const
Is the named Type found?
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Type gMin(const FieldField< Field, Type > &f)
void calcShearStress(const fvMesh &mesh, const volSymmTensorField &Reff, volVectorField &shearStress)
Calculate the shear stress.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
functionObject base class for writing files
const word & name() const
Return name.
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 Type & value() const
Return const reference to value.
static word timeName(const scalar, const int precision=precision_)
Return time name of given scalar time.
Templated wrapper class to provide compressible turbulence models thermal diffusivity based thermal t...
bool insert(const Key &key)
Insert a new entry.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
Macros for easy insertion into run-time selection tables.
virtual bool execute()
Calculate the wall shear-stress.
Templated abstract base class for single-phase incompressible turbulence models.
const Type & lookupObject(const word &name) const
Lookup and return the object of the given Type.
virtual bool read(const dictionary &)
Read optional controls.
bool read(const char *, int32_t &)
virtual void writeFileHeader(const label i)
File header information.
const Boundary & boundaryField() const
Return const-reference to the boundary field.
virtual ~wallShearStress()
Destructor.
static const word propertiesName
Default name of the turbulence properties dictionary.
A class for handling words, derived from string.
const surfaceScalarField & magSf() const
Return cell face area magnitudes.
This function object evaluates and outputs the shear stress at wall patches. The result is written as...
labelHashSet patchSet(const UList< wordRe > &patchNames, const bool warnNotFound=true, const bool usePatchGroups=true) const
Return the set of patch IDs corresponding to the given names.
forAllConstIter(PtrDictionary< phaseModel >, mixture.phases(), phase)
Type gMax(const FieldField< Field, Type > &f)
word name(const complex &)
Return a string representation of a complex.
virtual bool write()
Write the wall shear-stress.
fileName::Type type(const fileName &)
Return the file type: DIRECTORY or FILE.
#define WarningInFunction
Report a warning using Foam::Warning.
Boundary & boundaryFieldRef()
Return a reference to the boundary field.
const dimensionSet dimLength(0, 1, 0, 0, 0, 0, 0)
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
addToRunTimeSelectionTable(functionObject, blendingFactor, dictionary)
Mesh data needed to do the Finite Volume discretisation.
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
virtual bool write()
Write function.
virtual bool write() const
Write using setting from DB.
#define Log
Report write to Foam::Info if the local log switch is true.
defineTypeNameAndDebug(fvMeshFunctionObject, 0)
List< wordRe > wordReList
A List of wordRe (word or regular expression)
A class for managing temporary objects.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
T lookupOrDefault(const word &, const T &, bool recursive=false, bool patternMatch=true) const
Find and return a T,.
const fvBoundaryMesh & boundary() const
Return reference to boundary mesh.
const ObjectType & lookupObject(const word &fieldName) const
Lookup field from the objectRegistry.
const word & name() const
Return name.
const Time & time() const
Return the top-level database.