This function object calculates the gradient of a field. The operation is limited to scalar and vector volume or surface fields, and the output is a volume vector or tensor field. More...
Public Member Functions | |
TypeName ("calcFvcGrad") | |
Runtime type information. More... | |
calcFvcGrad (const word &name, const objectRegistry &, const dictionary &, const bool loadFromFiles=false) | |
Construct for given objectRegistry and dictionary. More... | |
virtual | ~calcFvcGrad () |
Destructor. More... | |
virtual const word & | name () const |
Return name of the set of calcFvcGrad. More... | |
virtual void | read (const dictionary &) |
Read the calcFvcGrad 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 calcFvcGrad 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... | |
template<class Type > | |
Foam::GeometricField< typename Foam::outerProduct< Foam::vector, Type >::type, Foam::fvPatchField, Foam::volMesh > & | gradField (const word &gradName, const dimensionSet &dims) |
Private Member Functions | |
template<class Type > | |
GeometricField< typename outerProduct< vector, Type >::type, fvPatchField, volMesh > & | gradField (const word &gradName, const dimensionSet &dims) |
Helper function to create/store/return the gradient field. More... | |
template<class Type > | |
void | calcGrad (const word &fieldName, const word &resultName, bool &processed) |
Helper function to calculate the gradient of different field types. More... | |
calcFvcGrad (const calcFvcGrad &) | |
Disallow default bitwise copy construct. More... | |
void | operator= (const calcFvcGrad &) |
Disallow default bitwise assignment. More... | |
Private Attributes | |
word | name_ |
Name of this calcFvcGrad 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 gradient of a field. The operation is limited to scalar and vector volume or surface fields, and the output is a volume vector or tensor field.
Example of function object specification:
calcFvcGrad1 { type calcFvcGrad; functionObjectLibs ("libFVFunctionObjects.so"); ... fieldName U; }
Function object usage
Property | Description | Required | Default value |
---|---|---|---|
type | type name: calcFvcGrad | yes | |
fieldName | Name of field to process | yes | |
resultName | Name of gradient field | no | fvc::grad(fieldName) |
log | Log to standard output | no | yes |
Definition at line 110 of file calcFvcGrad.H.
|
private |
Disallow default bitwise copy construct.
calcFvcGrad | ( | 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 42 of file calcFvcGrad.C.
References dict, Foam::endl(), Foam::nl, Foam::read(), and WarningInFunction.
|
virtual |
Destructor.
Definition at line 71 of file calcFvcGrad.C.
|
private |
Helper function to create/store/return the gradient field.
Helper function to calculate the gradient of different field types.
Definition at line 82 of file calcFvcGradTemplates.C.
References objectRegistry::foundObject(), Foam::fvc::grad(), objectRegistry::lookupObject(), mesh, and sf().
|
private |
Disallow default bitwise assignment.
TypeName | ( | "calcFvcGrad" | ) |
Runtime type information.
|
inlinevirtual |
Return name of the set of calcFvcGrad.
Definition at line 187 of file calcFvcGrad.H.
References calcFvcGrad::name_.
|
virtual |
Read the calcFvcGrad data.
Definition at line 77 of file calcFvcGrad.C.
References dict, dictionary::lookup(), word::null, and dictionary::readIfPresent().
|
virtual |
Execute, currently does nothing.
Definition at line 94 of file calcFvcGrad.C.
References Foam::endl(), and WarningInFunction.
|
virtual |
Execute at the final time-loop, currently does nothing.
Definition at line 112 of file calcFvcGrad.C.
|
virtual |
Called when time was set at the end of the Time::operator++.
Definition at line 118 of file calcFvcGrad.C.
|
virtual |
Calculate the calcFvcGrad and write.
Definition at line 124 of file calcFvcGrad.C.
References Foam::endl(), Foam::Info, IOobject::name(), Foam::nl, Foam::type(), and regIOobject::write().
|
inlinevirtual |
Update for changes of mesh.
Definition at line 208 of file calcFvcGrad.H.
|
inlinevirtual |
Update for changes of mesh.
Definition at line 212 of file calcFvcGrad.H.
Foam::GeometricField< typename Foam::outerProduct<Foam::vector, Type>::type, Foam::fvPatchField, Foam::volMesh>& gradField | ( | const word & | gradName, |
const dimensionSet & | dims | ||
) |
Definition at line 38 of file calcFvcGradTemplates.C.
References Foam::dimLength, Foam::endl(), Foam::Info, mesh, IOobject::NO_READ, IOobject::NO_WRITE, and calcFvcGrad::obr_.
|
private |
Name of this calcFvcGrad object.
Definition at line 115 of file calcFvcGrad.H.
Referenced by calcFvcGrad::name().
|
private |
Reference to the database.
Definition at line 118 of file calcFvcGrad.H.
Referenced by calcFvcGrad::gradField().
|
private |
On/off switch.
Definition at line 121 of file calcFvcGrad.H.
|
private |
Name of field to process.
Definition at line 124 of file calcFvcGrad.H.
|
private |
Name of result field.
Definition at line 127 of file calcFvcGrad.H.
|
private |
Switch to send output to Info as well as to file.
Definition at line 130 of file calcFvcGrad.H.
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.