38 namespace functionObjects
48 void Foam::functionObjects::wallShearStress::writeFileHeader(
const label i)
61 Foam::functionObjects::wallShearStress::calcShearStress
66 tmp<volVectorField> twallShearStress
77 twallShearStress.ref().boundaryFieldRef();
86 wallShearStressBf[
patchi] = (-Sfp/magSfp) & tau.boundaryField()[
patchi];
89 return twallShearStress;
105 phaseName_(
word::null),
128 patchSet_ = patchSet(
dict,
true);
134 if (patchSet_.empty())
138 if (isA<wallPolyPatch>(pbm[
patchi]))
144 Info<<
" processing all wall patches" <<
nl <<
endl;
148 Info<<
" processing wall patches: " <<
nl;
156 if (isA<wallPolyPatch>(pbm[
patchi]))
169 patchSet_ = filteredPatchSet;
173 resetLocalObjectName(typeName);
186 const word momentumTransportModelName
191 if (mesh_.foundObject<cmpModel>(momentumTransportModelName))
193 const cmpModel& model =
194 mesh_.lookupObject<cmpModel>(momentumTransportModelName);
196 return store(fieldName, calcShearStress(model.devTau()));
198 else if (mesh_.foundObject<icoModel>(momentumTransportModelName))
200 const icoModel& model =
201 mesh_.lookupObject<icoModel>(momentumTransportModelName);
203 return store(fieldName, calcShearStress(model.devSigma()));
208 <<
"Unable to find turbulence model in the "
243 file() << time_.userTimeValue()
250 Log <<
" min/max(" << pp.
name() <<
") = "
251 << minSsp <<
", " << maxSsp <<
endl;
#define forAll(list, i)
Loop across all elements in list.
#define forAllConstIter(Container, container, iter)
Iterate across all elements in the container object of type.
Macros for easy insertion into run-time selection tables.
Generic GeometricField class.
GeometricBoundaryField< Type, PatchField, GeoMesh > Boundary
Type of the boundary field.
static tmp< GeometricField< Type, PatchField, GeoMesh > > New(const word &name, const Internal &, const PtrList< PatchField< Type >> &, const HashPtrTable< Source > &=HashPtrTable< Source >())
Return a temporary field constructed from name,.
bool insert(const Key &key)
Insert a new entry.
const word & name() const
Return name.
static word groupName(Name name, const word &group)
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
static bool master(const label communicator=0)
Am I the master process.
Base class for single-phase compressible turbulence models.
A list of keyword definitions, which are a keyword followed by any number of values (e....
Abstract base-class for Time/database functionObjects.
virtual const word & type() const =0
Runtime type information.
Specialisation of Foam::functionObject for an Foam::fvMesh, providing a reference to the Foam::fvMesh...
functionObject base class for creating, maintaining and writing log files e.g. integrated of averaged...
OFstream & file()
Return access to the file (if only 1)
virtual bool write()
Write function.
Calculates the natural logarithm of the specified scalar field.
const ObjectType & lookupObject(const word &fieldName) const
Lookup object from the objectRegistry.
virtual bool read(const dictionary &)
Read optional controls.
Calculates and write the shear-stress at wall patches as the volVectorField field 'wallShearStress' o...
virtual ~wallShearStress()
Destructor.
wallShearStress(const word &name, const Time &runTime, const dictionary &)
Construct from Time and dictionary.
virtual bool execute()
Calculate the wall shear-stress.
virtual bool write()
Write the wall shear-stress.
virtual bool read(const dictionary &)
Read the wallShearStress data.
void writeTabbed(Ostream &os, const string &str) const
Write a tabbed string to stream.
void writeHeader(Ostream &os, const string &str) const
Write a commented header to stream.
void writeCommented(Ostream &os, const string &str) const
Write a commented string to stream.
FunctionObject base class for managing a list of objects on behalf of the inheriting function object,...
void resetLocalObjectName(const word &name)
Reset the list of local object names from a single word.
virtual bool read(const dictionary &)
Read the list of objects to be written.
virtual bool write()
Write function.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
virtual const word & name() const
Return name.
Base class for single-phase incompressible turbulence models.
A class for managing temporary objects.
A class for handling words, derived from string.
static const word null
An empty word.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
const fvPatchList & patches
#define Log
Report write to Foam::Info if the local log switch is true.
defineTypeNameAndDebug(adjustTimeStepToCombustion, 0)
addToRunTimeSelectionTable(functionObject, adjustTimeStepToCombustion, dictionary)
errorManipArg< error, int > exit(error &err, const int errNo=1)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Ostream & endl(Ostream &os)
Add newline and flush stream.
word name(const bool)
Return a word representation of a bool.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
dimensioned< vector > dimensionedVector
Dimensioned vector obtained from generic dimensioned type.
Field< vector > vectorField
Specialisation of Field<T> for vector.
HashSet< label, Hash< label > > labelHashSet
A HashSet with label keys.
Type gMin(const FieldField< Field, Type > &f)
VolField< symmTensor > volSymmTensorField
Type gMax(const FieldField< Field, Type > &f)
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.