46 writeHeader(file(),
"Wall shear stress");
47 writeCommented(file(),
"Time");
48 writeTabbed(file(),
"patch");
49 writeTabbed(file(),
"min");
50 writeTabbed(file(),
"max");
64 label patchI = iter.key();
72 ssp = (-Sfp/magSfp) & Reffp;
86 if (log_)
Info<<
" min/max(" << pp.
name() <<
") = " 87 << minSsp <<
", " << maxSsp <<
endl;
99 const bool loadFromFiles
110 if (!isA<fvMesh>(obr_))
115 "wallShearStress::wallShearStress" 118 "const objectRegistry&, " 119 "const dictionary&, " 122 ) <<
"No fvMesh available, deactivating " << name_ <<
nl 128 const fvMesh& mesh = refCast<const fvMesh>(obr_);
152 mesh.objectRegistry::store(wallShearStressPtr);
173 const fvMesh& mesh = refCast<const fvMesh>(obr_);
184 if (patchSet_.empty())
188 if (isA<wallPolyPatch>(pbm[patchI]))
190 patchSet_.insert(patchI);
194 Info<<
" processing all wall patches" << nl <<
endl;
198 Info<<
" processing wall patches: " <<
nl;
202 label patchI = iter.key();
203 if (isA<wallPolyPatch>(pbm[patchI]))
205 filteredPatchSet.
insert(patchI);
206 Info<<
" " << pbm[patchI].name() <<
endl;
210 WarningIn(
"void wallShearStress::read(const dictionary&)")
211 <<
"Requested wall shear stress on non-wall boundary " 212 <<
"type patch: " << pbm[patchI].name() <<
endl;
218 patchSet_ = filteredPatchSet;
233 const fvMesh& mesh = refCast<const fvMesh>(obr_);
241 if (log_)
Info<<
type() <<
" " << name_ <<
" output:" <<
nl;
247 const cmpModel& model =
250 Reff = model.devRhoReff();
254 const icoModel& model =
257 Reff = model.devReff();
262 <<
"Unable to find turbulence model in the " 266 calcShearStress(mesh, Reff(), wallShearStress);
295 if (log_)
Info<<
type() <<
" " << name_ <<
" output:" <<
nl 296 <<
" writing field " << wallShearStress.
name() <<
nl 299 wallShearStress.
write();
Mesh data needed to do the Finite Volume discretisation.
virtual void read(const dictionary &)
Read the wallShearStress data.
const word & name() const
Return name.
GeometricBoundaryField & boundaryField()
Return reference to GeometricBoundaryField.
wallShearStress(const wallShearStress &)
Disallow default bitwise copy construct.
const surfaceVectorField & Sf() const
Return cell face area vectors.
bool foundObject(const word &name) const
Is the named Type found?
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
Templated abstract base class for single-phase incompressible turbulence models.
List< wordRe > wordReList
A List of wordRe (word or regular expression)
A class for handling words, derived from string.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
static word timeName(const scalar, const int precision=precision_)
Return time name of given scalar time.
errorManipArg< error, int > exit(error &err, const int errNo=1)
A simple wrapper around bool so that it can be read as a word: true/false, on/off, yes/no, y/n, t/f, or none.
A list of keyword definitions, which are a keyword followed by any number of values (e...
virtual ~wallShearStress()
Destructor.
const dimensionSet dimLength(0, 1, 0, 0, 0, 0, 0)
This function object evaluates and outputs the shear stress at wall patches. The result is written as...
A patch is a list of labels that address the faces in the global face list.
const Time & time() const
Return the top-level database.
forAllConstIter(PtrDictionary< phaseModel >, mixture.phases(), phase)
virtual bool write() const
Write using setting from DB.
Ostream & endl(Ostream &os)
Add newline and flush stream.
const surfaceScalarField & magSf() const
Return cell face area magnitudes.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
#define WarningIn(functionName)
Report a warning using Foam::Warning.
const Type & lookupObject(const word &name) const
Lookup and return the object of the given Type.
void calcShearStress(const fvMesh &mesh, const volSymmTensorField &Reff, volVectorField &shearStress)
Calculate the shear stress.
virtual void end()
Execute at the final time-loop, currently does nothing.
const word & name() const
Return name.
Type gMin(const FieldField< Field, Type > &f)
fileName::Type type(const fileName &)
Return the file type: DIRECTORY or FILE.
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
#define FatalErrorIn(functionName)
Report an error message using Foam::FatalError.
virtual void write()
Write function.
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.
virtual void execute()
Execute, currently does nothing.
virtual void write()
Calculate the wallShearStress and write.
T lookupOrDefault(const word &, const T &, bool recursive=false, bool patternMatch=true) const
Find and return a T,.
Registry of regIOobjects.
static const word propertiesName
Default name of the turbulence properties dictionary.
Base class for output file data handling.
static bool master(const label communicator=0)
Am I the master process.
bool read(const char *, int32_t &)
dimensionedSymmTensor sqr(const dimensionedVector &dv)
Type gMax(const FieldField< Field, Type > &f)
Templated wrapper class to provide compressible turbulence models thermal diffusivity based thermal t...
A class for managing temporary objects.
const Type & value() const
Return const reference to value.
defineTypeNameAndDebug(combustionModel, 0)
virtual void timeSet()
Called when time was set at the end of the Time::operator++.
virtual void writeFileHeader(const label i)
File header information.
bool insert(const Key &key)
Insert a new entry.