38 namespace functionObjects
48 void Foam::functionObjects::wallShearStress::writeFileHeader(
const label i)
52 writeCommented(
file(),
"Time");
53 writeTabbed(
file(),
"patch");
54 writeTabbed(
file(),
"min");
55 writeTabbed(
file(),
"max");
61 Foam::functionObjects::wallShearStress::calcShearStress
66 tmp<volVectorField> twallShearStress
77 twallShearStress.ref().boundaryFieldRef();
81 label patchi = iter.key();
86 wallShearStressBf[
patchi] = (-Sfp/magSfp) & tau.boundaryField()[
patchi];
89 return twallShearStress;
138 if (patchSet_.empty())
142 if (isA<wallPolyPatch>(pbm[patchi]))
144 patchSet_.insert(patchi);
148 Info<<
" processing all wall patches" << nl <<
endl;
152 Info<<
" processing wall patches: " <<
nl;
156 label patchi = iter.key();
157 if (isA<wallPolyPatch>(pbm[patchi]))
159 filteredPatchSet.
insert(patchi);
165 <<
"Requested wall shear stress on non-wall boundary " 166 <<
"type patch: " << pbm[
patchi].name() <<
endl;
172 patchSet_ = filteredPatchSet;
176 resetLocalObjectName(typeName);
189 const word momentumTransportModelName
194 if (mesh_.foundObject<cmpModel>(momentumTransportModelName))
196 const cmpModel& model =
197 mesh_.lookupObject<cmpModel>(momentumTransportModelName);
199 return store(fieldName, calcShearStress(model.devTau()));
201 else if (mesh_.foundObject<icoModel>(momentumTransportModelName))
203 const icoModel& model =
204 mesh_.lookupObject<icoModel>(momentumTransportModelName);
206 return store(fieldName, calcShearStress(model.devSigma()));
211 <<
"Unable to find turbulence model in the " 236 label patchi = iter.key();
246 file() << mesh_.time().userTimeValue()
253 Log <<
" min/max(" << pp.
name() <<
") = " 254 << minSsp <<
", " << maxSsp <<
endl;
const fvPatchList & patches
virtual bool write()
Write function.
GeometricField< symmTensor, fvPatchField, volMesh > volSymmTensorField
Calculates the natural logarithm of the specified scalar field.
#define forAll(list, i)
Loop across all elements in list.
virtual bool write()
Write function.
FvWallInfoData< WallInfo, label > label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
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...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
#define forAllConstIter(Container, container, iter)
Iterate across all elements in the container object of type.
Type gMin(const FieldField< Field, Type > &f)
const Boundary & boundaryField() const
Return const-reference to the boundary field.
addToRunTimeSelectionTable(functionObject, Qdot, dictionary)
static tmp< GeometricField< vector, fvPatchField, volMesh > > New(const word &name, const Internal &, const PtrList< fvPatchField< vector >> &)
Return a temporary field constructed from name,.
dimensioned< vector > dimensionedVector
Dimensioned vector obtained from generic dimensioned type.
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.
wallShearStress(const word &name, const Time &runTime, const dictionary &)
Construct from Time and dictionary.
GeometricBoundaryField< vector, fvPatchField, volMesh > Boundary
Type of the boundary field.
bool insert(const Key &key)
Insert a new entry.
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.
const ObjectType & lookupObject(const word &fieldName) const
Lookup object from the objectRegistry.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Macros for easy insertion into run-time selection tables.
virtual bool execute()
Calculate the wall shear-stress.
HashSet< label, Hash< label > > labelHashSet
A HashSet with label keys.
virtual bool read(const dictionary &)
Read optional controls.
bool read(const char *, int32_t &)
void writeHeader(std::ostream &, const bool isBinary, const std::string &title)
Write header.
virtual ~wallShearStress()
Destructor.
A class for handling words, derived from string.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
static word groupName(Name name, const word &group)
static const word null
An empty word.
Calculates and write the shear-stress at wall patches as the volVectorField field 'wallShearStress' o...
Type gMax(const FieldField< Field, Type > &f)
word name(const complex &)
Return a string representation of a complex.
defineTypeNameAndDebug(Qdot, 0)
virtual bool write()
Write the wall shear-stress.
T lookupOrDefault(const word &, const T &, bool recursive=false, bool patternMatch=true) const
Find and return a T,.
#define WarningInFunction
Report a warning using Foam::Warning.
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
FunctionObject base class for managing a list of objects on behalf of the inheriting function object...
virtual bool read(const dictionary &)
Read the list of objects to be written.
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.
#define Log
Report write to Foam::Info if the local log switch is true.
Field< vector > vectorField
Specialisation of Field<T> for vector.
virtual const word & name() const
Return name.
Specialisation of Foam::functionObject for an Foam::fvMesh, providing a reference to the Foam::fvMesh...
List< wordRe > wordReList
A List of wordRe (word or regular expression)
A class for managing temporary objects.
Base class for single-phase incompressible turbulence models.
Base class for single-phase compressible turbulence models.
functionObject base class for creating, maintaining and writing log files e.g. integrated of averaged...