49 turbOnFinalIterOnly_ =
57 if ((corr_ == 1) || residualControl_.empty() || finalIter())
63 bool storeIni = this->storeInitialResiduals();
68 const dictionary& solverDict = mesh_.solverPerformanceDict();
71 const word& variableName = iter().keyword();
72 const label fieldi = applyToField(variableName);
76 const scalar firstResidual =
77 maxResidual(variableName, iter().stream(), residual);
83 residualControl_[fieldi].initialResidual = firstResidual;
86 const bool absCheck = residual < residualControl_[fieldi].absTol;
87 bool relCheck =
false;
93 residualControl_[fieldi].initialResidual
96 relative = residual/iniRes;
97 relCheck = relative < residualControl_[fieldi].relTol;
100 achieved = achieved && (absCheck || relCheck);
104 Info<< algorithmName_ <<
" loop:" <<
endl;
106 Info<<
" " << variableName
107 <<
" PIMPLE iter " << corr_
109 << residualControl_[fieldi].initialResidual
110 <<
", abs tol = " << residual
111 <<
" (" << residualControl_[fieldi].absTol <<
")" 112 <<
", rel tol = " << relative
113 <<
" (" << residualControl_[fieldi].relTol <<
")" 119 return checked && achieved;
133 turbOnFinalIterOnly_(true),
145 <<
" corrector loops" << nl <<
endl;
197 mesh_.data::remove(
"finalIteration");
201 bool completed =
false;
207 <<
" iterations" <<
endl;
209 mesh_.data::remove(
"finalIteration");
220 mesh_.data::add(
"finalIteration",
true);
228 mesh_.data::add(
"finalIteration",
true);
#define forAll(list, i)
Loop across all elements in list.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
fvMesh & mesh_
Reference to the mesh database.
A list of keyword definitions, which are a keyword followed by any number of values (e...
List< fieldData > residualControl_
List of residual data per field.
Base class for solution control classes.
Ostream & endl(Ostream &os)
Add newline and flush stream.
A simple wrapper around bool so that it can be read as a word: true/false, on/off, yes/no, y/n, t/f, or none.
virtual void read()
Read controls from fvSolution dictionary.
A class for handling words, derived from string.
virtual bool loop()
PIMPLE loop.
const word algorithmName_
The dictionary name, e.g. SIMPLE, PIMPLE.
const word dictName("particleTrackDict")
label nCorrPIMPLE_
Maximum number of PIMPLE correctors.
forAllConstIter(PtrDictionary< phaseModel >, mixture.phases(), phase)
virtual void read()
Read controls from fvSolution dictionary.
defineTypeNameAndDebug(combustionModel, 0)
label corr_
Current corrector loop index.
virtual void storePrevIterFields() const
Store previous iteration fields.
T lookupOrDefault(const word &, const T &, bool recursive=false, bool patternMatch=true) const
Find and return a T,.
Mesh data needed to do the Finite Volume discretisation.
const dictionary & pimpleDict
virtual bool criteriaSatisfied()
Return true if all convergence checks are satisfied.
virtual ~pimpleControl()
Destructor.
bool finalIter() const
Return true fore final PIMPLE (outer) iteration.
bool converged_
Converged flag.
tmp< surfaceScalarField > relative(const tmp< surfaceScalarField > &tphi, const volVectorField &U)
Return the given absolute flux in relative form.