PIMPLE control class to supply convergence information/checks for the PIMPLE loop. More...
Public Member Functions | |
TypeName ("pimpleControl") | |
Run-time type information. More... | |
pimpleControl (fvMesh &mesh, const word &dictName="PIMPLE") | |
Construct from mesh and the name of control sub-dictionary. More... | |
virtual | ~pimpleControl () |
Destructor. More... | |
label | nCorrPIMPLE () const |
Maximum number of PIMPLE correctors. More... | |
label | nCorrPISO () const |
Maximum number of PISO correctors. More... | |
label | corrPISO () const |
Current PISO corrector index. More... | |
bool | SIMPLErho () const |
Flag to indicate whether to update density in SIMPLE. More... | |
virtual bool | loop () |
PIMPLE loop. More... | |
bool | correct () |
Pressure corrector loop control. More... | |
bool | storeInitialResiduals () const |
Return true to store the intial residuals. More... | |
bool | firstIter () const |
Return true for first PIMPLE (outer) iteration. More... | |
bool | finalIter () const |
Return true fore final PIMPLE (outer) iteration. More... | |
bool | finalInnerIter () const |
Return true for final inner iteration. More... | |
bool | solveFlow () const |
Return true to solve for flow. More... | |
bool | turbCorr () const |
Return true to solve for turbulence. More... | |
![]() | |
TypeName ("solutionControl") | |
Run-time type information. More... | |
solutionControl (fvMesh &mesh, const word &algorithmName) | |
Construct from mesh. More... | |
virtual | ~solutionControl () |
Destructor. More... | |
const dictionary & | dict () const |
Return the solution dictionary. More... | |
label | corr () const |
Current corrector loop index. More... | |
label | corrNonOrtho () const |
Current non-orthogonal corrector index. More... | |
label | nNonOrthCorr () const |
Maximum number of non-orthogonal correctors. More... | |
bool | finalNonOrthogonalIter () const |
Helper function to identify final non-orthogonal iteration. More... | |
bool | momentumPredictor () const |
Flag to indicate to solve for momentum. More... | |
bool | transonic () const |
Flag to indicate to solve using transonic algorithm. More... | |
bool | consistent () const |
Flag to indicate to relax pressure using the. More... | |
bool | correctNonOrthogonal () |
Non-orthogonal corrector loop. More... | |
![]() | |
TypeName ("IOobject") | |
Runtime type information. More... | |
IOobject (const word &name, const fileName &instance, const objectRegistry ®istry, readOption r=NO_READ, writeOption w=NO_WRITE, bool registerObject=true) | |
Construct from name, instance, registry, io options. More... | |
IOobject (const word &name, const fileName &instance, const fileName &local, const objectRegistry ®istry, readOption r=NO_READ, writeOption w=NO_WRITE, bool registerObject=true, bool globalObject=false) | |
Construct from name, instance, local, registry, io options. More... | |
IOobject (const fileName &path, const objectRegistry ®istry, readOption r=NO_READ, writeOption w=NO_WRITE, bool registerObject=true, bool globalObject=false) | |
Construct from path, registry, io options. More... | |
IOobject (const IOobject &io, const objectRegistry ®istry) | |
Construct from copy resetting registry. More... | |
IOobject (const IOobject &io, const word &name) | |
Construct from copy resetting name. More... | |
autoPtr< IOobject > | clone () const |
Clone. More... | |
autoPtr< IOobject > | clone (const objectRegistry ®istry) const |
Clone resetting registry. More... | |
virtual | ~IOobject () |
Destructor. More... | |
const Time & | time () const |
Return time. More... | |
const objectRegistry & | db () const |
Return the local objectRegistry. More... | |
const word & | name () const |
Return name. More... | |
const word & | headerClassName () const |
Return name of the class name read from header. More... | |
word & | headerClassName () |
Return name of the class name read from header. More... | |
string & | note () |
Return non-constant access to the optional note. More... | |
const string & | note () const |
Return the optional note. More... | |
virtual void | rename (const word &newName) |
Rename. More... | |
bool & | registerObject () |
Register object created from this IOobject with registry if true. More... | |
bool | registerObject () const |
Register object created from this IOobject with registry if true. More... | |
bool & | globalObject () |
Is object same for all processors. More... | |
bool | globalObject () const |
Is object same for all processors. More... | |
readOption | readOpt () const |
readOption & | readOpt () |
writeOption | writeOpt () const |
writeOption & | writeOpt () |
word | group () const |
Return group (extension part of name) More... | |
word | member () const |
Return member (name without the extension) More... | |
const fileName & | rootPath () const |
const fileName & | caseName () const |
const fileName & | instance () const |
fileName & | instance () |
const fileName & | local () const |
fileName | path () const |
Return complete path. More... | |
fileName | path (const word &instance, const fileName &local="") const |
Return complete path with alternative instance and local. More... | |
fileName | objectPath () const |
Return complete path + object name. More... | |
fileName | localFilePath (const word &typeName) const |
Helper for filePath that searches locally. More... | |
fileName | globalFilePath (const word &typeName) const |
Helper for filePath that searches up if in parallel. More... | |
bool | readHeader (Istream &) |
Read header. More... | |
template<class Type > | |
bool | typeHeaderOk (const bool checkType=true) |
Read header (uses typeFilePath to find file) and check header. More... | |
template<class Type > | |
void | warnNoRereading () const |
Helper: warn that type does not support re-reading. More... | |
bool | writeHeader (Ostream &) const |
Write header. More... | |
bool | writeHeader (Ostream &, const word &objectType) const |
Write header. Allow override of type. More... | |
bool | good () const |
bool | bad () const |
InfoProxy< IOobject > | info () const |
Return info proxy. More... | |
void | operator= (const IOobject &) |
template<class Name > | |
Foam::word | groupName (Name name, const word &group) |
Protected Member Functions | |
virtual void | read () |
Read controls from fvSolution dictionary. More... | |
virtual bool | criteriaSatisfied () |
Return true if all convergence checks are satisfied. More... | |
![]() | |
virtual void | read (const bool absTolOnly) |
Read controls from fvSolution dictionary. More... | |
virtual label | applyToField (const word &fieldName, const bool useRegEx=true) const |
Return index of field in residualControl_ if present. More... | |
virtual void | storePrevIterFields () const |
Store previous iteration fields. More... | |
template<class Type > | |
void | storePrevIter () const |
Store previous iteration field for vol<Type>Fields. More... | |
template<class Type > | |
void | maxTypeResidual (const word &fieldName, ITstream &data, scalar &firstRes, scalar &lastRes) const |
scalar | maxResidual (const word &fieldName, ITstream &data, scalar &lastRes) const |
![]() | |
void | setBad (const string &) |
Set the object state to bad. More... | |
Protected Attributes | |
bool | solveFlow_ |
Flag to indicate whether to solve for the flow. More... | |
label | nCorrPIMPLE_ |
Maximum number of PIMPLE correctors. More... | |
label | nCorrPISO_ |
Maximum number of PISO correctors. More... | |
label | corrPISO_ |
Current PISO corrector. More... | |
bool | SIMPLErho_ |
Flag to indicate whether to update density in SIMPLE. More... | |
bool | turbOnFinalIterOnly_ |
Flag to indicate whether to only solve turbulence on final iter. More... | |
bool | converged_ |
Converged flag. More... | |
![]() | |
fvMesh & | mesh_ |
Reference to the mesh database. More... | |
List< fieldData > | residualControl_ |
List of residual data per field. More... | |
const word | algorithmName_ |
The dictionary name, e.g. SIMPLE, PIMPLE. More... | |
label | nNonOrthCorr_ |
Maximum number of non-orthogonal correctors. More... | |
bool | momentumPredictor_ |
Flag to indicate to solve for momentum. More... | |
bool | transonic_ |
Flag to indicate to solve using transonic algorithm. More... | |
bool | consistent_ |
Flag to indicate to relax pressure using the. More... | |
label | corr_ |
Current corrector loop index. More... | |
label | corrNonOrtho_ |
Current non-orthogonal corrector loop index. More... | |
Additional Inherited Members | |
![]() | |
enum | objectState { GOOD, BAD } |
Enumeration defining the valid states of an IOobject. More... | |
enum | readOption { MUST_READ, MUST_READ_IF_MODIFIED, READ_IF_PRESENT, NO_READ } |
Enumeration defining the read options. More... | |
enum | writeOption { AUTO_WRITE = 0, NO_WRITE = 1 } |
Enumeration defining the write options. More... | |
enum | fileCheckTypes { timeStamp, timeStampMaster, inotify, inotifyMaster } |
Enumeration defining the file checking options. More... | |
![]() | |
static bool | fileNameComponents (const fileName &path, fileName &instance, fileName &local, word &name) |
Split path into instance, local, name components. More... | |
template<class Name > | |
static word | groupName (Name name, const word &group) |
template<class Stream > | |
static Stream & | writeBanner (Stream &os, bool noHint=false) |
Write the standard OpenFOAM file/dictionary banner. More... | |
template<class Stream > | |
static Stream & | writeDivider (Stream &os) |
Write the standard file section divider. More... | |
template<class Stream > | |
static Stream & | writeEndDivider (Stream &os) |
Write the standard end file divider. More... | |
![]() | |
static const NamedEnum< fileCheckTypes, 4 > | fileCheckTypesNames |
static fileCheckTypes | fileModificationChecking |
Type of file modification checking. More... | |
PIMPLE control class to supply convergence information/checks for the PIMPLE loop.
May also be used to for PISO-based algorithms as PISO controls are a sub-set of PIMPLE controls.
Definition at line 52 of file pimpleControl.H.
pimpleControl | ( | fvMesh & | mesh, |
const word & | dictName = "PIMPLE" |
||
) |
Construct from mesh and the name of control sub-dictionary.
Definition at line 125 of file pimpleControl.C.
References solutionControl::algorithmName_, Foam::endl(), forAll, Foam::Info, pimpleControl::nCorrPIMPLE_, Foam::nl, pimpleControl::read(), solutionControl::residualControl_, and token::TAB.
|
virtual |
Destructor.
Definition at line 171 of file pimpleControl.C.
|
protectedvirtual |
Read controls from fvSolution dictionary.
Reimplemented from solutionControl.
Definition at line 39 of file pimpleControl.C.
References dict, dictionary::lookupOrDefault(), pimpleDict, and solutionControl::read().
Referenced by pimpleControl::loop(), and pimpleControl::pimpleControl().
|
protectedvirtual |
Return true if all convergence checks are satisfied.
Implements solutionControl.
Definition at line 54 of file pimpleControl.C.
References Foam::endl(), forAllConstIter(), Foam::Info, and Foam::fvc::relative().
Referenced by pimpleControl::loop().
TypeName | ( | "pimpleControl" | ) |
Run-time type information.
|
inline |
Maximum number of PIMPLE correctors.
Definition at line 28 of file pimpleControlI.H.
References pimpleControl::nCorrPIMPLE_.
|
inline |
Maximum number of PISO correctors.
Definition at line 34 of file pimpleControlI.H.
References pimpleControl::nCorrPISO_.
|
inline |
Current PISO corrector index.
Definition at line 40 of file pimpleControlI.H.
References pimpleControl::corrPISO_.
|
inline |
Flag to indicate whether to update density in SIMPLE.
rather than PISO mode
Definition at line 46 of file pimpleControlI.H.
References pimpleControl::SIMPLErho_.
|
virtual |
PIMPLE loop.
Implements solutionControl.
Definition at line 177 of file pimpleControl.C.
References solutionControl::algorithmName_, pimpleControl::converged_, solutionControl::corr_, pimpleControl::criteriaSatisfied(), Foam::endl(), pimpleControl::finalIter(), Foam::Info, solutionControl::mesh_, pimpleControl::nCorrPIMPLE_, pimpleControl::read(), solutionControl::residualControl_, and solutionControl::storePrevIterFields().
|
inline |
Pressure corrector loop control.
Definition at line 52 of file pimpleControlI.H.
References solutionControl::algorithmName_, pimpleControl::corrPISO_, Foam::endl(), Foam::Info, and pimpleControl::nCorrPISO_.
|
inline |
Return true to store the intial residuals.
Definition at line 73 of file pimpleControlI.H.
References solutionControl::corr_, solutionControl::corrNonOrtho_, and pimpleControl::corrPISO_.
|
inline |
Return true for first PIMPLE (outer) iteration.
Definition at line 80 of file pimpleControlI.H.
References solutionControl::corr_.
|
inline |
Return true fore final PIMPLE (outer) iteration.
Definition at line 86 of file pimpleControlI.H.
References pimpleControl::converged_, solutionControl::corr_, and pimpleControl::nCorrPIMPLE_.
Referenced by pimpleControl::loop(), and pimpleControl::turbCorr().
|
inline |
Return true for final inner iteration.
Definition at line 92 of file pimpleControlI.H.
References solutionControl::corrNonOrtho_, pimpleControl::corrPISO_, pimpleControl::nCorrPISO_, and solutionControl::nNonOrthCorr_.
|
inline |
Return true to solve for flow.
Definition at line 100 of file pimpleControlI.H.
References pimpleControl::solveFlow_.
|
inline |
Return true to solve for turbulence.
Definition at line 106 of file pimpleControlI.H.
References pimpleControl::finalIter(), and pimpleControl::turbOnFinalIterOnly_.
|
protected |
Flag to indicate whether to solve for the flow.
Definition at line 72 of file pimpleControl.H.
Referenced by pimpleControl::solveFlow().
|
protected |
Maximum number of PIMPLE correctors.
Definition at line 75 of file pimpleControl.H.
Referenced by pimpleControl::finalIter(), pimpleControl::loop(), pimpleControl::nCorrPIMPLE(), and pimpleControl::pimpleControl().
|
protected |
Maximum number of PISO correctors.
Definition at line 78 of file pimpleControl.H.
Referenced by pimpleControl::correct(), pimpleControl::finalInnerIter(), and pimpleControl::nCorrPISO().
|
protected |
Current PISO corrector.
Definition at line 81 of file pimpleControl.H.
Referenced by pimpleControl::correct(), pimpleControl::corrPISO(), pimpleControl::finalInnerIter(), and pimpleControl::storeInitialResiduals().
|
protected |
Flag to indicate whether to update density in SIMPLE.
rather than PISO mode
Definition at line 85 of file pimpleControl.H.
Referenced by pimpleControl::SIMPLErho().
|
protected |
Flag to indicate whether to only solve turbulence on final iter.
Definition at line 88 of file pimpleControl.H.
Referenced by pimpleControl::turbCorr().
|
protected |
Converged flag.
Definition at line 91 of file pimpleControl.H.
Referenced by pimpleControl::finalIter(), and pimpleControl::loop().