Go to the documentation of this file.
55 if ((corr_ == 1) || residualControl_.empty() || finalIter())
61 bool storeIni = this->storeInitialResiduals();
66 const dictionary& solverDict = mesh_.solverPerformanceDict();
69 const word& variableName = iter().keyword();
70 const label fieldI = applyToField(variableName);
74 const scalar firstResidual =
75 maxResidual(variableName, iter().stream(), residual);
81 residualControl_[fieldI].initialResidual = firstResidual;
84 const bool absCheck = residual < residualControl_[fieldI].absTol;
85 bool relCheck =
false;
91 residualControl_[fieldI].initialResidual
95 relCheck =
relative < residualControl_[fieldI].relTol;
98 achieved = achieved && (absCheck || relCheck);
102 Info<< algorithmName_ <<
" loop:" <<
endl;
104 Info<<
" " << variableName
105 <<
" PIMPLE iter " << corr_
107 << residualControl_[fieldI].initialResidual
108 <<
", abs tol = " << residual
109 <<
" (" << residualControl_[fieldI].absTol <<
")"
111 <<
" (" << residualControl_[fieldI].relTol <<
")"
117 return checked && achieved;
129 turbOnFinalIterOnly_(true),
141 <<
" corrector loops" <<
nl <<
endl;
181 Info<< algorithmName_ <<
" loop: corr = " << corr_ <<
endl;
184 if (corr_ == nCorrPIMPLE_ + 1)
186 if ((!residualControl_.empty()) && (nCorrPIMPLE_ != 1))
188 Info<< algorithmName_ <<
": not converged within "
189 << nCorrPIMPLE_ <<
" iterations" <<
endl;
193 mesh_.data::remove(
"finalIteration");
197 bool completed =
false;
198 if (converged_ || criteriaSatisfied())
202 Info<< algorithmName_ <<
": converged in " << corr_ - 1
203 <<
" iterations" <<
endl;
205 mesh_.data::remove(
"finalIteration");
213 Info<< algorithmName_ <<
": iteration " << corr_ <<
endl;
214 storePrevIterFields();
216 mesh_.data::add(
"finalIteration",
true);
224 mesh_.data::add(
"finalIteration",
true);
227 if (corr_ <= nCorrPIMPLE_)
229 Info<< algorithmName_ <<
": iteration " << corr_ <<
endl;
230 storePrevIterFields();
A simple wrapper around bool so that it can be read as a word: true/false, on/off,...
label nCorrPIMPLE_
Maximum number of PIMPLE correctors.
A class for handling words, derived from string.
pimpleControl(const pimpleControl &)
Disallow default bitwise copy construct.
#define forAll(list, i)
Loop across all elements in list.
Base class for solution control classes.
bool turbOnFinalIterOnly_
Flag to indicate whether to only solve turbulence on final iter.
bool read(const char *, int32_t &)
const dictionary & dict() const
Return the solution dictionary.
List< fieldData > residualControl_
List of residual data per field.
Ostream & endl(Ostream &os)
Add newline and flush stream.
virtual void read()
Read controls from fvSolution dictionary.
forAllConstIter(PtrDictionary< phaseModel >, mixture.phases(), phase)
const dictionary & pimpleDict
virtual bool criteriaSatisfied()
Return true if all convergence checks are satisfied.
const word dictName("particleTrackDict")
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
const word algorithmName_
The dictionary name, e.g. SIMPLE, PIMPLE.
virtual ~pimpleControl()
Destructor.
virtual void read()
Read controls from fvSolution dictionary.
A list of keyword definitions, which are a keyword followed by any number of values (e....
virtual bool loop()
PIMPLE loop.
Mesh data needed to do the Finite Volume discretisation.
tmp< surfaceScalarField > relative(const tmp< surfaceScalarField > &tphi, const volVectorField &U)
Return the given absolute flux in relative form.
defineTypeNameAndDebug(combustionModel, 0)
label nCorrPISO_
Maximum number of PISO correctors.