This function object calculates and outputs the Courant number as a volScalarField. The field is stored on the mesh database so that it can be retrieved and used for other applications. More...
Public Member Functions | |
TypeName ("CourantNo") | |
Runtime type information. More... | |
CourantNo (const word &name, const objectRegistry &, const dictionary &, const bool loadFromFiles=false) | |
Construct for given objectRegistry and dictionary. More... | |
virtual | ~CourantNo () |
Destructor. More... | |
virtual const word & | name () const |
Return name of the set of CourantNo. More... | |
virtual void | read (const dictionary &) |
Read the CourantNo 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 CourantNo 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 | |
tmp< volScalarField::DimensionedInternalField > | byRho (const tmp< volScalarField::DimensionedInternalField > &Co) const |
Divide Co by rho if required. More... | |
CourantNo (const CourantNo &) | |
Disallow default bitwise copy construct. More... | |
void | operator= (const CourantNo &) |
Disallow default bitwise assignment. More... | |
Private Attributes | |
word | name_ |
Name of this set of CourantNo objects. More... | |
const objectRegistry & | obr_ |
Reference to the database. More... | |
bool | active_ |
On/off switch. More... | |
word | phiName_ |
Name of flux field, default is "phi". More... | |
word | rhoName_ |
Name of density field (optional) More... | |
word | resultName_ |
Result name. More... | |
Switch | log_ |
Switch to send output to Info as well as to file. More... | |
This function object calculates and outputs the Courant number as a volScalarField. 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 calculate the Courant number:
CourantNo1 { type CourantNo; functionObjectLibs ("libutilityFunctionObjects.so"); ... }
Function object usage
Property | Description | Required | Default value |
---|---|---|---|
type | Type name: CourantNo | yes | |
rhoName | Name of density field | no | rho |
phiName | Name of flux field | no | phi |
resultName | Name of Courant number field | no | <function name> |
log | Log to standard output | no | yes |
Definition at line 111 of file CourantNo.H.
CourantNo | ( | 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 60 of file CourantNo.C.
References dict, Foam::dimless, Foam::endl(), mesh, Foam::nl, Foam::read(), and WarningInFunction.
|
virtual |
Destructor.
Definition at line 115 of file CourantNo.C.
|
private |
Divide Co by rho if required.
Definition at line 42 of file CourantNo.C.
References Foam::dimDensity.
|
private |
Disallow default bitwise assignment.
TypeName | ( | "CourantNo" | ) |
Runtime type information.
|
inlinevirtual |
Return name of the set of CourantNo.
Definition at line 178 of file CourantNo.H.
References CourantNo::name_.
Referenced by CourantNo::write().
|
virtual |
Read the CourantNo data.
Definition at line 121 of file CourantNo.C.
References dict, and dictionary::readIfPresent().
|
virtual |
Execute, currently does nothing.
Definition at line 134 of file CourantNo.C.
References TimeState::deltaT(), dimensionedInternalField(), GeometricField::dimensionedInternalField(), objectRegistry::lookupObject(), Foam::mag(), mesh, phi, Foam::fvc::surfaceSum(), fvMesh::time(), and fvMesh::V().
|
virtual |
Execute at the final time-loop, currently does nothing.
Definition at line 160 of file CourantNo.C.
|
virtual |
Called when time was set at the end of the Time::operator++.
Definition at line 166 of file CourantNo.C.
|
virtual |
Calculate the CourantNo and write.
Definition at line 170 of file CourantNo.C.
References Foam::endl(), Foam::Info, CourantNo::name(), Foam::nl, Foam::type(), and CourantNo::write().
Referenced by CourantNo::write().
|
inlinevirtual |
Update for changes of mesh.
Definition at line 199 of file CourantNo.H.
|
inlinevirtual |
Update for changes of mesh.
Definition at line 203 of file CourantNo.H.
|
private |
Name of this set of CourantNo objects.
Definition at line 116 of file CourantNo.H.
Referenced by CourantNo::name().
|
private |
Reference to the database.
Definition at line 119 of file CourantNo.H.
|
private |
On/off switch.
Definition at line 122 of file CourantNo.H.
|
private |
Name of flux field, default is "phi".
Definition at line 125 of file CourantNo.H.
|
private |
Name of density field (optional)
Definition at line 128 of file CourantNo.H.
|
private |
Result name.
Definition at line 131 of file CourantNo.H.
|
private |
Switch to send output to Info as well as to file.
Definition at line 134 of file CourantNo.H.
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.