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...
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 word & | name () 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 | |
volScalarField & | divField (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 objectRegistry & | obr_ |
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... | |
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 |
Definition at line 110 of file calcFvcDiv.H.
|
private |
Disallow default bitwise copy construct.
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.
|
virtual |
Destructor.
Definition at line 109 of file calcFvcDiv.C.
|
private |
Helper function to create/store/return the divergence field.
Definition at line 42 of file calcFvcDiv.C.
References Foam::dimLength, and mesh.
Helper function to calculate the divergence of different field types.
Definition at line 33 of file calcFvcDivTemplates.C.
References Foam::fvc::div(), and mesh.
|
private |
Disallow default bitwise assignment.
TypeName | ( | "calcFvcDiv" | ) |
Runtime type information.
|
inlinevirtual |
Return name of the set of calcFvcDiv.
Definition at line 184 of file calcFvcDiv.H.
References calcFvcDiv::name_.
|
virtual |
Read the calcFvcDiv data.
Definition at line 115 of file calcFvcDiv.C.
References dict, dictionary::lookup(), word::null, and dictionary::readIfPresent().
|
virtual |
Execute, currently does nothing.
Definition at line 132 of file calcFvcDiv.C.
References Foam::endl(), and WarningInFunction.
|
virtual |
Execute at the final time-loop, currently does nothing.
Definition at line 150 of file calcFvcDiv.C.
|
virtual |
Called when time was set at the end of the Time::operator++.
Definition at line 156 of file calcFvcDiv.C.
|
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().
|
inlinevirtual |
Update for changes of mesh.
Definition at line 205 of file calcFvcDiv.H.
|
inlinevirtual |
Update for changes of mesh.
Definition at line 209 of file calcFvcDiv.H.
|
private |
Name of this calcFvcDiv object.
Definition at line 115 of file calcFvcDiv.H.
Referenced by calcFvcDiv::name().
|
private |
Reference to the database.
Definition at line 118 of file calcFvcDiv.H.
|
private |
On/off switch.
Definition at line 121 of file calcFvcDiv.H.
|
private |
Name of field to process.
Definition at line 124 of file calcFvcDiv.H.
|
private |
Name of result field.
Definition at line 127 of file calcFvcDiv.H.
|
private |
Switch to send output to Info as well as to file.
Definition at line 130 of file calcFvcDiv.H.
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.