Public Member Functions | Protected Member Functions | Protected Attributes
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 &fileName, const dictionary &dict)
 Construct from components and read options from dictionary. More...
 
virtual ~functionObjectFile ()
 Destructor. More...
 
void read (const dictionary &dict)
 Read. More...
 
OFstreamfile ()
 Return access to the file (if only 1) More...
 
bool writeToFile () const
 Return true if can write to file. 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...
 
void writeTime (Ostream &os) const
 Write the current time 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 (Ostream &os) const
 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 autoPtr< OFstreamcreateFile (const word &name) const
 Return an autoPtr to a new file. More...
 
virtual void resetFile (const word &name)
 Reset internal file pointer to new file with new name. 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_
 Refefence to the database. More...
 
bool active_
 on/off switch More...
 
word resultName_
 Result name. More...
 
Switch log_
 Switch to send output to Info as well as to file. More...
 
labelHashSet patchSet_
 Optional list of patches to process. More...
 
- Protected Attributes inherited from functionObjectFile
bool writeToFile_
 Flag to enable/disable writing to file. 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
resultName Name of wall shear stress field no <function name>
patches list of patches to process no all wall patches
log Log to standard output no yes
Source files

Definition at line 131 of file wallShearStress.H.

Constructor & Destructor Documentation

◆ wallShearStress() [1/2]

wallShearStress ( const wallShearStress )
protected

Disallow default bitwise copy construct.

◆ wallShearStress() [2/2]

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 93 of file wallShearStress.C.

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

Here is the call graph for this function:

◆ ~wallShearStress()

~wallShearStress ( )
virtual

Destructor.

Definition at line 154 of file wallShearStress.C.

Member Function Documentation

◆ writeFileHeader()

void writeFileHeader ( Ostream os) const
protectedvirtual

File header information.

Definition at line 43 of file wallShearStress.C.

References Foam::endl(), functionObjectFile::writeCommented(), functionObjectFile::writeHeader(), and functionObjectFile::writeTabbed().

Here is the call graph for this function:

◆ calcShearStress()

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

◆ operator=()

void operator= ( const wallShearStress )
protected

Disallow default bitwise assignment.

◆ TypeName()

TypeName ( "wallShearStress"  )

Runtime type information.

◆ name()

virtual const word& name ( ) const
inlinevirtual

Return name of the set of wallShearStress.

Definition at line 204 of file wallShearStress.H.

References wallShearStress::name_.

Referenced by wallShearStress::write().

Here is the caller graph for this function:

◆ read()

void read ( const dictionary dict)
virtual

◆ execute()

void execute ( )
virtual

Execute, currently does nothing.

Definition at line 220 of file wallShearStress.C.

References Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, objectRegistry::foundObject(), Foam::Info, objectRegistry::lookupObject(), mesh, Foam::nl, turbulenceModel::propertiesName, and Foam::type().

Here is the call graph for this function:

◆ end()

void end ( )
virtual

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

Definition at line 267 of file wallShearStress.C.

◆ timeSet()

void timeSet ( )
virtual

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

Definition at line 273 of file wallShearStress.C.

◆ write()

void write ( )
virtual

Calculate the wallShearStress and write.

Definition at line 279 of file wallShearStress.C.

References Foam::endl(), Foam::Info, wallShearStress::name(), Foam::nl, Foam::type(), and wallShearStress::write().

Referenced by wallShearStressWriter::write(), and wallShearStress::write().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ updateMesh()

virtual void updateMesh ( const mapPolyMesh )
inlinevirtual

Update for changes of mesh.

Definition at line 225 of file wallShearStress.H.

◆ movePoints()

virtual void movePoints ( const polyMesh )
inlinevirtual

Update for changes of mesh.

Definition at line 229 of file wallShearStress.H.

Field Documentation

◆ name_

word name_
protected

Name of this set of wallShearStress object.

Definition at line 140 of file wallShearStress.H.

Referenced by wallShearStress::name().

◆ obr_

const objectRegistry& obr_
protected

Refefence to the database.

Definition at line 143 of file wallShearStress.H.

◆ active_

bool active_
protected

on/off switch

Definition at line 146 of file wallShearStress.H.

◆ resultName_

word resultName_
protected

Result name.

Definition at line 149 of file wallShearStress.H.

◆ log_

Switch log_
protected

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

Definition at line 152 of file wallShearStress.H.

◆ patchSet_

labelHashSet patchSet_
protected

Optional list of patches to process.

Definition at line 155 of file wallShearStress.H.


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