Public Member Functions | Protected Member Functions | Protected Attributes
DESModelRegions Class Reference

This function object writes out an indicator field for DES turbulence calculations, that is: More...

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

Public Member Functions

 TypeName ("DESModelRegions")
 Runtime type information. More...
 
 DESModelRegions (const word &name, const objectRegistry &, const dictionary &, const bool loadFromFiles=false)
 Construct for given objectRegistry and dictionary. More...
 
virtual ~DESModelRegions ()
 Destructor. More...
 
virtual const wordname () const
 Return name of the set of DESModelRegions. More...
 
virtual void read (const dictionary &)
 Read the DESModelRegions 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 DESModelRegions 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...
 
 DESModelRegions (const DESModelRegions &)
 Disallow default bitwise copy construct. More...
 
void operator= (const DESModelRegions &)
 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 DESModelRegions object. More...
 
const objectRegistryobr_
 
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...
 
- 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 writes out an indicator field for DES turbulence calculations, that is:

- 0 for RAS regions

The field is stored on the mesh database so that it can be retrieved and used for other applications.

Example of function object specification to generate DES indicator field:

DESModelRegions1
{
    type        DESModelRegions;
    functionObjectLibs ("libutilityFunctionObjects.so");
    ...
}


Function object usage

Property Description Required Default value
type type name: DESModelRegions yes
resultName Name of DES indicator field no <function name>
log log to standard output no yes
Source files

Definition at line 106 of file DESModelRegions.H.

Constructor & Destructor Documentation

◆ DESModelRegions() [1/2]

DESModelRegions ( const DESModelRegions )
protected

Disallow default bitwise copy construct.

◆ DESModelRegions() [2/2]

DESModelRegions ( 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 55 of file DESModelRegions.C.

References dict, Foam::dimless, Foam::endl(), mesh, Foam::nl, IOobject::NO_READ, IOobject::NO_WRITE, Foam::read(), fvMesh::time(), Time::timeName(), and WarningInFunction.

Here is the call graph for this function:

◆ ~DESModelRegions()

~DESModelRegions ( )
virtual

Destructor.

Definition at line 110 of file DESModelRegions.C.

Member Function Documentation

◆ writeFileHeader()

void writeFileHeader ( Ostream os) const
protectedvirtual

File header information.

Definition at line 41 of file DESModelRegions.C.

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

Here is the call graph for this function:

◆ operator=()

void operator= ( const DESModelRegions )
protected

Disallow default bitwise assignment.

◆ TypeName()

TypeName ( "DESModelRegions"  )

Runtime type information.

◆ name()

virtual const word& name ( ) const
inlinevirtual

Return name of the set of DESModelRegions.

Definition at line 167 of file DESModelRegions.H.

References DESModelRegions::name_.

Referenced by DESModelRegions::write().

Here is the caller graph for this function:

◆ read()

void read ( const dictionary dict)
virtual

Read the DESModelRegions data.

Definition at line 116 of file DESModelRegions.C.

References dict, functionObjectFile::read(), and dictionary::readIfPresent().

Here is the call graph for this function:

◆ execute()

void execute ( )
virtual

Execute, currently does nothing.

Definition at line 128 of file DESModelRegions.C.

References Foam::endl(), objectRegistry::foundObject(), Foam::gSum(), Foam::Info, DESModelBase::LESRegion(), objectRegistry::lookupObject(), mesh, Foam::nl, turbulenceModel::propertiesName, token::TAB, Foam::type(), and fvMesh::V().

Here is the call graph for this function:

◆ end()

void end ( )
virtual

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

Definition at line 177 of file DESModelRegions.C.

◆ timeSet()

void timeSet ( )
virtual

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

Definition at line 183 of file DESModelRegions.C.

◆ write()

void write ( )
virtual

Calculate the DESModelRegions and write.

Definition at line 189 of file DESModelRegions.C.

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

Referenced by DESModelRegions::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 188 of file DESModelRegions.H.

◆ movePoints()

virtual void movePoints ( const polyMesh )
inlinevirtual

Update for changes of mesh.

Definition at line 192 of file DESModelRegions.H.

Field Documentation

◆ name_

word name_
protected

Name of this set of DESModelRegions object.

Definition at line 115 of file DESModelRegions.H.

Referenced by DESModelRegions::name().

◆ obr_

const objectRegistry& obr_
protected

Definition at line 117 of file DESModelRegions.H.

◆ active_

bool active_
protected

on/off switch

Definition at line 120 of file DESModelRegions.H.

◆ resultName_

word resultName_
protected

Result name.

Definition at line 123 of file DESModelRegions.H.

◆ log_

Switch log_
protected

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

Definition at line 126 of file DESModelRegions.H.


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