Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
wallShearStress Class Reference

This function object evaluates and outputs the shear stress at wall patches. The result is written as a volVectorField to time directories as field 'wallShearStress'. More...

Inheritance diagram for wallShearStress:
Inheritance graph
[legend]
Collaboration diagram for wallShearStress:
Collaboration graph
[legend]

Public Member Functions

 TypeName ("wallShearStress")
 Runtime type information. More...
 
 wallShearStress (const word &name, const objectRegistry &, const dictionary &, const bool loadFromFiles=false)
 Construct for given objectRegistry and dictionary. More...
 
virtual ~wallShearStress ()
 Destructor. More...
 
virtual const wordname () const
 Return name of the set of wallShearStress. More...
 
virtual void read (const dictionary &)
 Read the wallShearStress data. More...
 
virtual void execute ()
 Execute, currently does nothing. More...
 
virtual void end ()
 Execute at the final time-loop, currently does nothing. More...
 
virtual void timeSet ()
 Called when time was set at the end of the Time::operator++. More...
 
virtual void write ()
 Calculate the wallShearStress and write. More...
 
virtual void updateMesh (const mapPolyMesh &)
 Update for changes of mesh. More...
 
virtual void movePoints (const polyMesh &)
 Update for changes of mesh. More...
 
- Public Member Functions inherited from functionObjectFile
 functionObjectFile (const objectRegistry &obr, const word &prefix)
 Construct null. More...
 
 functionObjectFile (const objectRegistry &obr, const word &prefix, const word &name)
 Construct from components. More...
 
 functionObjectFile (const objectRegistry &obr, const word &prefix, const wordList &names)
 Construct from components. More...
 
virtual ~functionObjectFile ()
 Destructor. More...
 
const wordListnames () const
 Return const access to the names. More...
 
OFstreamfile ()
 Return access to the file (if only 1) More...
 
PtrList< OFstream > & files ()
 Return access to the files. More...
 
OFstreamfile (const label i)
 Return file 'i'. More...
 
void writeCommented (Ostream &os, const string &str) const
 Write a commented string to stream. More...
 
void writeTabbed (Ostream &os, const string &str) const
 Write a tabbed string to stream. More...
 
void writeHeader (Ostream &os, const string &str) const
 Write a commented header to stream. More...
 
template<class Type >
void writeHeaderValue (Ostream &os, const string &property, const Type &value) const
 Write a (commented) header property and value pair. More...
 
label charWidth () const
 Return width of character stream output. More...
 

Protected Member Functions

virtual void writeFileHeader (const label i)
 File header information. More...
 
void calcShearStress (const fvMesh &mesh, const volSymmTensorField &Reff, volVectorField &shearStress)
 Calculate the shear stress. More...
 
 wallShearStress (const wallShearStress &)
 Disallow default bitwise copy construct. More...
 
void operator= (const wallShearStress &)
 Disallow default bitwise assignment. More...
 
- Protected Member Functions inherited from functionObjectFile
virtual void initStream (Ostream &os) const
 Initialise the output stream for writing. More...
 
virtual fileName baseFileDir () const
 Return the base directory for output. More...
 
virtual fileName baseTimeDir () const
 Return the base directory for the current time value. More...
 
virtual void createFiles ()
 Create the output file. More...
 
virtual void resetNames (const wordList &names)
 Reset the list of names from a wordList. More...
 
virtual void resetName (const word &name)
 Reset the list of names to a single name entry. More...
 
virtual Omanip< int > valueWidth (const label offset=0) const
 Return the value width when writing to stream with optional offset. More...
 
 functionObjectFile (const functionObjectFile &)
 Disallow default bitwise copy construct. More...
 
void operator= (const functionObjectFile &)
 Disallow default bitwise assignment. More...
 

Protected Attributes

word name_
 Name of this set of wallShearStress object. More...
 
const objectRegistryobr_
 
bool active_
 on/off switch More...
 
Switch log_
 Switch to send output to Info as well as to file. More...
 
labelHashSet patchSet_
 Optional list of patches to process. More...
 

Additional Inherited Members

- Static Public Attributes inherited from functionObjectFile
static const word outputPrefix = "postProcessing"
 Directory prefix. More...
 
static label addChars = 7
 Additional characters for writing. More...
 

Detailed Description

This function object evaluates and outputs the shear stress at wall patches. The result is written as a volVectorField to time directories as field 'wallShearStress'.

\[ Stress = R \dot n \]

where

$ R $ = stress tensor
$ n $ = patch normal vector (into the domain)

The shear stress (symmetrical) tensor field is retrieved from the turbulence model. All wall patches are included by default; to restrict the calculation to certain patches, use the optional 'patches' entry.

Example of function object specification:

    wallShearStress1
    {
        type        wallShearStress;
        functionObjectLibs ("libutilityFunctionObjects.so");
        ...
        patches     (".*Wall");
    }


Function object usage

Property Description Required Default value
type type name: wallShearStress yes
patches list of patches to process no all wall patches
Source files

Definition at line 119 of file wallShearStress.H.

Constructor & Destructor Documentation

wallShearStress ( const wallShearStress )
protected

Disallow default bitwise copy construct.

Referenced by wallShearStress::calcShearStress().

Here is the caller graph for this function:

wallShearStress ( const word name,
const objectRegistry obr,
const dictionary dict,
const bool  loadFromFiles = false 
)

Construct for given objectRegistry and dictionary.

Allow the possibility to load fields from files

Definition at line 95 of file wallShearStress.C.

References Foam::dimLength, Foam::dimTime, Foam::endl(), mesh, Foam::nl, IOobject::NO_READ, IOobject::NO_WRITE, Foam::read(), Foam::sqr(), fvMesh::time(), Time::timeName(), Foam::type(), WarningIn, and Vector< Cmpt >::zero.

Here is the call graph for this function:

~wallShearStress ( )
virtual

Destructor.

Definition at line 161 of file wallShearStress.C.

Member Function Documentation

void writeFileHeader ( const label  i)
protectedvirtual

File header information.

Reimplemented from functionObjectFile.

Definition at line 43 of file wallShearStress.C.

References wallShearStress::calcShearStress(), and Foam::endl().

Here is the call graph for this function:

void calcShearStress ( const fvMesh mesh,
const volSymmTensorField Reff,
volVectorField shearStress 
)
protected
void operator= ( const wallShearStress )
protected

Disallow default bitwise assignment.

TypeName ( "wallShearStress"  )

Runtime type information.

virtual const word& name ( ) const
inlinevirtual

Return name of the set of wallShearStress.

Definition at line 188 of file wallShearStress.H.

References wallShearStress::end(), wallShearStress::execute(), wallShearStress::name_, wallShearStress::read(), wallShearStress::timeSet(), and wallShearStress::write().

Here is the call graph for this function:

void read ( const dictionary dict)
virtual

Read the wallShearStress data.

Definition at line 167 of file wallShearStress.C.

References Foam::endl(), forAll, forAllConstIter(), Foam::Info, HashSet< Key, Hash >::insert(), dictionary::lookupOrDefault(), Foam::nl, polyBoundaryMesh::patchSet(), Foam::type(), and WarningIn.

Referenced by wallShearStress::name().

Here is the call graph for this function:

Here is the caller graph for this function:

void execute ( )
virtual

Execute, currently does nothing.

Definition at line 224 of file wallShearStress.C.

References Foam::exit(), Foam::FatalError, FatalErrorIn, objectRegistry::foundObject(), Foam::Info, objectRegistry::lookupObject(), Foam::nl, turbulenceModel::propertiesName, Foam::type(), and functionObjectFile::write().

Referenced by wallShearStress::name().

Here is the call graph for this function:

Here is the caller graph for this function:

void end ( )
virtual

Execute at the final time-loop, currently does nothing.

Definition at line 271 of file wallShearStress.C.

Referenced by wallShearStress::name().

Here is the caller graph for this function:

void timeSet ( )
virtual

Called when time was set at the end of the Time::operator++.

Definition at line 280 of file wallShearStress.C.

Referenced by wallShearStress::name().

Here is the caller graph for this function:

void write ( )
virtual

Calculate the wallShearStress and write.

Reimplemented from functionObjectFile.

Definition at line 286 of file wallShearStress.C.

References Foam::endl(), Foam::Info, IOobject::name(), Foam::nl, Foam::type(), functionObjectFile::write(), and regIOobject::write().

Referenced by wallShearStress::name().

Here is the call graph for this function:

Here is the caller graph for this function:

virtual void updateMesh ( const mapPolyMesh )
inlinevirtual

Update for changes of mesh.

Definition at line 209 of file wallShearStress.H.

virtual void movePoints ( const polyMesh )
inlinevirtual

Update for changes of mesh.

Definition at line 213 of file wallShearStress.H.

Member Data Documentation

word name_
protected

Name of this set of wallShearStress object.

Definition at line 128 of file wallShearStress.H.

Referenced by wallShearStress::name().

const objectRegistry& obr_
protected

Definition at line 130 of file wallShearStress.H.

bool active_
protected

on/off switch

Definition at line 133 of file wallShearStress.H.

Switch log_
protected

Switch to send output to Info as well as to file.

Definition at line 136 of file wallShearStress.H.

labelHashSet patchSet_
protected

Optional list of patches to process.

Definition at line 139 of file wallShearStress.H.


The documentation for this class was generated from the following files: