Public Member Functions | Private Member Functions | Private Attributes
calcFvcDiv Class Reference

This function object calculates the divergence of a field. The operation is limited to surfaceScalarFields and volumeVector fields, and the output is a volume scalar field. More...

Collaboration diagram for calcFvcDiv:
Collaboration graph
[legend]

Public Member Functions

 TypeName ("calcFvcDiv")
 Runtime type information. More...
 
 calcFvcDiv (const word &name, const objectRegistry &, const dictionary &, const bool loadFromFiles=false)
 Construct for given objectRegistry and dictionary. More...
 
virtual ~calcFvcDiv ()
 Destructor. More...
 
virtual const wordname () const
 Return name of the set of calcFvcDiv. More...
 
virtual void read (const dictionary &)
 Read the calcFvcDiv 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 calcFvcDiv 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...
 

Private Member Functions

volScalarFielddivField (const word &gradName, const dimensionSet &dims)
 Helper function to create/store/return the divergence field. More...
 
template<class FieldType >
void calcDiv (const word &fieldName, const word &resultName, bool &processed)
 Helper function to calculate the divergence of different field types. More...
 
 calcFvcDiv (const calcFvcDiv &)
 Disallow default bitwise copy construct. More...
 
void operator= (const calcFvcDiv &)
 Disallow default bitwise assignment. More...
 

Private Attributes

word name_
 Name of this calcFvcDiv object. More...
 
const objectRegistryobr_
 Reference to the database. More...
 
bool active_
 On/off switch. More...
 
word fieldName_
 Name of field to process. More...
 
word resultName_
 Name of result field. More...
 
Switch log_
 Switch to send output to Info as well as to file. More...
 

Detailed Description

This function object calculates the divergence of a field. The operation is limited to surfaceScalarFields and volumeVector fields, and the output is a volume scalar field.

Example of function object specification:

calcFvcDiv1
{
    type        calcFvcDiv;
    functionObjectLibs ("libFVFunctionObjects.so");
    ...
    fieldName   U;
}


Function object usage

Property Description Required Default value
type type name: calcFvcDiv yes
fieldName Name of field to process yes
resultName Name of divergence field no fvc::div(fieldName)
log Log to standard output no yes
Source files

Definition at line 110 of file calcFvcDiv.H.

Constructor & Destructor Documentation

◆ calcFvcDiv() [1/2]

calcFvcDiv ( const calcFvcDiv )
private

Disallow default bitwise copy construct.

◆ calcFvcDiv() [2/2]

calcFvcDiv ( 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 80 of file calcFvcDiv.C.

References dict, Foam::endl(), Foam::nl, Foam::read(), and WarningInFunction.

Here is the call graph for this function:

◆ ~calcFvcDiv()

~calcFvcDiv ( )
virtual

Destructor.

Definition at line 109 of file calcFvcDiv.C.

Member Function Documentation

◆ divField()

Foam::volScalarField & divField ( const word gradName,
const dimensionSet dims 
)
private

Helper function to create/store/return the divergence field.

Definition at line 42 of file calcFvcDiv.C.

References Foam::dimLength, and mesh.

◆ calcDiv()

void calcDiv ( const word fieldName,
const word resultName,
bool &  processed 
)
private

Helper function to calculate the divergence of different field types.

Definition at line 33 of file calcFvcDivTemplates.C.

References Foam::fvc::div(), and mesh.

Here is the call graph for this function:

◆ operator=()

void operator= ( const calcFvcDiv )
private

Disallow default bitwise assignment.

◆ TypeName()

TypeName ( "calcFvcDiv"  )

Runtime type information.

◆ name()

virtual const word& name ( ) const
inlinevirtual

Return name of the set of calcFvcDiv.

Definition at line 184 of file calcFvcDiv.H.

References calcFvcDiv::name_.

◆ read()

void read ( const dictionary dict)
virtual

Read the calcFvcDiv data.

Definition at line 115 of file calcFvcDiv.C.

References dict, dictionary::lookup(), word::null, and dictionary::readIfPresent().

Here is the call graph for this function:

◆ execute()

void execute ( )
virtual

Execute, currently does nothing.

Definition at line 132 of file calcFvcDiv.C.

References Foam::endl(), and WarningInFunction.

Here is the call graph for this function:

◆ end()

void end ( )
virtual

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

Definition at line 150 of file calcFvcDiv.C.

◆ timeSet()

void timeSet ( )
virtual

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

Definition at line 156 of file calcFvcDiv.C.

◆ write()

void write ( )
virtual

Calculate the calcFvcDiv and write.

Definition at line 162 of file calcFvcDiv.C.

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

Here is the call graph for this function:

◆ updateMesh()

virtual void updateMesh ( const mapPolyMesh )
inlinevirtual

Update for changes of mesh.

Definition at line 205 of file calcFvcDiv.H.

◆ movePoints()

virtual void movePoints ( const polyMesh )
inlinevirtual

Update for changes of mesh.

Definition at line 209 of file calcFvcDiv.H.

Field Documentation

◆ name_

word name_
private

Name of this calcFvcDiv object.

Definition at line 115 of file calcFvcDiv.H.

Referenced by calcFvcDiv::name().

◆ obr_

const objectRegistry& obr_
private

Reference to the database.

Definition at line 118 of file calcFvcDiv.H.

◆ active_

bool active_
private

On/off switch.

Definition at line 121 of file calcFvcDiv.H.

◆ fieldName_

word fieldName_
private

Name of field to process.

Definition at line 124 of file calcFvcDiv.H.

◆ resultName_

word resultName_
private

Name of result field.

Definition at line 127 of file calcFvcDiv.H.

◆ log_

Switch log_
private

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

Definition at line 130 of file calcFvcDiv.H.


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