45 if (pimpleMeshes.
empty() && solidMeshes.
empty())
48 <<
"There needs to be at least one region" 52 if (!pimpleMeshes.
empty())
54 return pimpleMeshes[0].time();
57 return solidMeshes[0].time();
67 const word& algorithmName
71 pimpleLoop(static_cast<solutionControl&>(*
this)),
75 static_cast<solutionControl&>(*
this),
83 pimpleControls_.append
101 Info<<
nl << algorithmName <<
": Region " << pimpleMeshes[i].name();
102 pimpleControls_[i].printResidualControls();
104 if (nCorrPimple_ > 1)
106 Info<<
nl << algorithmName <<
": Region " << pimpleMeshes[i].name();
107 pimpleControls_[i].printCorrResidualControls(nCorrPimple_);
113 Info<<
nl << algorithmName <<
": Region " << solidMeshes[i].name();
114 solidControls_[i].printResidualControls();
116 if (nCorrPimple_ > 1)
118 Info<<
nl << algorithmName <<
": Region " << solidMeshes[i].name();
119 solidControls_[i].printCorrResidualControls(nCorrPimple_);
123 if (nCorrPimple_ == 1)
125 Info<<
nl << algorithmName <<
": Operating solver in PISO mode" <<
nl 141 forAll(pimpleControls_, i)
143 if (!pimpleControls_[i].
read())
150 if (!solidControls_[i].
read())
168 forAll(pimpleControls_, i)
170 result = result && pimpleControls_[i].hasResidualControls();
174 result = result && solidControls_[i].hasResidualControls();
185 forAll(pimpleControls_, i)
187 result = result && pimpleControls_[i].hasCorrResidualControls();
191 result = result && solidControls_[i].hasCorrResidualControls();
202 forAll(pimpleControls_, i)
204 result = pimpleControls_[i].criteriaSatisfied() && result;
208 result = solidControls_[i].criteriaSatisfied() && result;
219 forAll(pimpleControls_, i)
221 result = pimpleControls_[i].corrCriteriaSatisfied() && result;
225 result = solidControls_[i].corrCriteriaSatisfied() && result;
234 forAll(pimpleControls_, i)
236 pimpleControls_[i].resetCorrSolveIndex();
240 solidControls_[i].resetCorrSolveIndex();
247 forAll(pimpleControls_, i)
249 pimpleControls_[i].updateCorrSolveIndex();
253 solidControls_[i].updateCorrSolveIndex();
264 forAll(pimpleControls_, i)
266 pimpleControls_[i].mesh().data::remove(
"finalIteration");
270 solidControls_[i].mesh().data::remove(
"finalIteration");
276 forAll(pimpleControls_, i)
278 pimpleControls_[i].storePrevIterFields();
282 solidControls_[i].storePrevIterFields();
287 forAll(pimpleControls_, i)
289 pimpleControls_[i].mesh().data::add(
"finalIteration",
true);
293 solidControls_[i].mesh().data::add(
"finalIteration",
true);
305 if (!endIfConverged(time))
307 forAll(pimpleControls_, i)
309 pimpleControls_[i].storePrevIterFields();
313 solidControls_[i].storePrevIterFields();
325 if (!endIfConverged(time))
327 forAll(pimpleControls_, i)
329 pimpleControls_[i].storePrevIterFields();
333 solidControls_[i].storePrevIterFields();
Multi-region-specific derivation of the solution control class.
bool loop(correctorConvergenceControl &convergence)
Pimple loop.
#define forAll(list, i)
Loop across all elements in list.
Solid no-loop control class. Implements non-orthogonal and convergence controls, but leaves loop cont...
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
errorManipArg< error, int > exit(error &err, const int errNo=1)
A list of keyword definitions, which are a keyword followed by any number of values (e...
virtual ~pimpleMultiRegionControl()
Destructor.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
virtual void updateCorrSolveIndex()
Update the solve index in the correction residual control data.
virtual bool loop()
Return true if run should continue and if so increment time.
bool empty() const
Return true if the UPtrList is empty (ie, size() is zero)
Pimple loop class. Implements the logic which controls the pimple loop generically for a given correc...
Ostream & endl(Ostream &os)
Add newline and flush stream.
Corrector convergence control class. Provides methods to check the convergence of an inner iteration ...
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
virtual bool run() const
Return true if run should continue,.
virtual bool read()
Read controls.
bool read(const char *, int32_t &)
A class for handling words, derived from string.
Convergence control class. Provides methods to check the convergence of the time loop against an abso...
bool run(Time &time)
Time run loop.
virtual bool hasResidualControls() const
Return true if residual controls are present.
const Time & time() const
Return the time.
defineTypeNameAndDebug(combustionModel, 0)
pimpleMultiRegionControl(PtrList< fvMesh > &pimpleMeshes, PtrList< fvMesh > &solidMeshes, const word &algorithmName="PIMPLE")
Construct from meshes and the algorithm name.
virtual bool criteriaSatisfied() const
Return true if all convergence checks are satisfied.
virtual void resetCorrSolveIndex()
Reset the solve index in the correction residual control data.
T lookupOrDefault(const word &, const T &, bool recursive=false, bool patternMatch=true) const
Find and return a T,.
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
Pimple no-loop control class. Implements various option flags, but leaves loop controls to the deriva...
virtual bool corrCriteriaSatisfied() const
Return true if all correction convergence checks are satisfied.
virtual bool hasCorrResidualControls() const
Return true if corrector residual controls are present.