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();
85 return twallShearStress;
101 phaseName_(
word::null),
124 patchSet_ = mesh_.poly().boundary().patchSet(
dict,
true);
128 if (patchSet_.empty())
132 if (isA<wallPolyPatch>(pbm[
patchi]))
151 if (isA<wallPolyPatch>(pbm[
patchi]))
164 patchSet_ = filteredPatchSet;
181 const word momentumTransportModelName
186 if (mesh_.foundObject<cmpModel>(momentumTransportModelName))
188 const cmpModel& model =
189 mesh_.lookupObject<cmpModel>(momentumTransportModelName);
191 store(fieldName, calcShearStress(model.devTau()));
195 else if (mesh_.foundObject<icoModel>(momentumTransportModelName))
197 const icoModel& model =
198 mesh_.lookupObject<icoModel>(momentumTransportModelName);
200 store(fieldName, calcShearStress(model.devSigma()));
207 <<
"Unable to find turbulence model in the "
242 file() << time_.userTimeValue()
249 Log <<
" min/max(" << pp.
name() <<
") = "
250 << 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, GeoMesh, PrimitiveField > Boundary
Type of the boundary field.
static tmp< GeometricField< Type, GeoMesh, PrimitiveField > > New(const word &name, const Internal &, const PtrList< Patch > &, 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 momentum transport models.
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
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 momentum transport models.
A class for managing temporary objects.
Template function which returns the un-mangled name of a given type. Useful for types which do not ha...
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(fvMeshFunctionObject, 0)
addToRunTimeSelectionTable(functionObject, fvModel, dictionary)
Type gMin(const UList< Type > &f, const label comm)
errorManipArg< error, int > exit(error &err, const int errNo=1)
Ostream & decrIndent(Ostream &os)
Decrement the indent level.
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.
String typeName(const std::type_info &info)
Return the un-mangled name given the standard type info.
Ostream & incrIndent(Ostream &os)
Increment the indent level.
dimensioned< vector > dimensionedVector
Dimensioned vector obtained from generic dimensioned type.
Type gMax(const UList< Type > &f, const label comm)
word name(const LagrangianState state)
Return a string representation of a Lagrangian state enumeration.
HashSet< label, Hash< label > > labelHashSet
A HashSet with label keys.
SurfaceField< vector > surfaceVectorField
Ostream & indent(Ostream &os)
Indent stream.
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.