mirror of
https://github.com/OpenFOAM/OpenFOAM-6.git
synced 2025-12-08 06:57:46 +00:00
solutionControl: Made simple and pimple name convention consistent
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
if (!pimple.SIMPLErho())
|
||||
if (!pimple.simpleRho())
|
||||
{
|
||||
rho = thermo.rho();
|
||||
}
|
||||
@ -104,7 +104,7 @@ if (pressureControl.limit(p))
|
||||
p.correctBoundaryConditions();
|
||||
rho = thermo.rho();
|
||||
}
|
||||
else if (pimple.SIMPLErho())
|
||||
else if (pimple.simpleRho())
|
||||
{
|
||||
rho = thermo.rho();
|
||||
}
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
if (!pimple.SIMPLErho())
|
||||
if (!pimple.simpleRho())
|
||||
{
|
||||
rho = thermo.rho();
|
||||
}
|
||||
@ -115,7 +115,7 @@ if (pressureControl.limit(p))
|
||||
p.correctBoundaryConditions();
|
||||
rho = thermo.rho();
|
||||
}
|
||||
else if (pimple.SIMPLErho())
|
||||
else if (pimple.simpleRho())
|
||||
{
|
||||
rho = thermo.rho();
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -141,7 +141,7 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
}
|
||||
|
||||
if (pimple.nCorrPIMPLE() <= 1)
|
||||
if (pimple.nCorrPimple() <= 1)
|
||||
{
|
||||
#include "rhoEqn.H"
|
||||
}
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
if (!mesh.steady() && !pimple.SIMPLErho())
|
||||
if (!mesh.steady() && !pimple.simpleRho())
|
||||
{
|
||||
rho = thermo.rho();
|
||||
}
|
||||
@ -132,7 +132,7 @@ if (adjustMass || pLimited)
|
||||
}
|
||||
|
||||
// Density updates
|
||||
if (adjustMass || pLimited || mesh.steady() || pimple.SIMPLErho())
|
||||
if (adjustMass || pLimited || mesh.steady() || pimple.simpleRho())
|
||||
{
|
||||
rho = thermo.rho();
|
||||
}
|
||||
|
||||
@ -4,7 +4,7 @@ if (!pimple.solveFlow())
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!mesh.steady() && pimples.nCorrPIMPLE() <= 1)
|
||||
if (!mesh.steady() && pimples.nCorrPimple() <= 1)
|
||||
{
|
||||
#include "rhoEqn.H"
|
||||
}
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
if (!pimple.SIMPLErho())
|
||||
if (!pimple.simpleRho())
|
||||
{
|
||||
rho = thermo.rho();
|
||||
}
|
||||
@ -76,7 +76,7 @@ if (pressureControl.limit(p))
|
||||
rho = thermo.rho();
|
||||
p_rgh = p - rho*gh;
|
||||
}
|
||||
else if (pimple.SIMPLErho())
|
||||
else if (pimple.simpleRho())
|
||||
{
|
||||
rho = thermo.rho();
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -94,7 +94,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
if (solvePrimaryRegion)
|
||||
{
|
||||
if (pimple.nCorrPIMPLE() <= 1)
|
||||
if (pimple.nCorrPimple() <= 1)
|
||||
{
|
||||
#include "rhoEqn.H"
|
||||
}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
{
|
||||
if (pimple.nCorrPIMPLE() == 1)
|
||||
if (pimple.nCorrPimple() == 1)
|
||||
{
|
||||
p =
|
||||
(
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
{
|
||||
if (pimple.nCorrPIMPLE() == 1)
|
||||
if (pimple.nCorrPimple() == 1)
|
||||
{
|
||||
p =
|
||||
(
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2017 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2017-2018 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -77,7 +77,7 @@ public:
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from the SIMPLE/PIMPLE sub-dictionary
|
||||
//- Construct from the simple/pimple sub-dictionary
|
||||
pressureControl
|
||||
(
|
||||
const volScalarField& p,
|
||||
|
||||
@ -26,7 +26,7 @@ Class
|
||||
|
||||
Description
|
||||
Corrector convergence control class. Provides methods to check the
|
||||
convergence of an inner iteration loop (e.g., PIMPLE) against both absolute
|
||||
convergence of an inner iteration loop (e.g., pimple) against both absolute
|
||||
and relative residual tolerances.
|
||||
|
||||
SourceFiles
|
||||
|
||||
@ -44,9 +44,9 @@ Foam::pimpleControl::pimpleControl(fvMesh& mesh, const word& algorithmName)
|
||||
|
||||
printResidualControls();
|
||||
|
||||
if (nCorrPIMPLE_ > 1)
|
||||
if (nCorrPimple_ > 1)
|
||||
{
|
||||
printCorrResidualControls(nCorrPIMPLE_);
|
||||
printCorrResidualControls(nCorrPimple_);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -71,7 +71,7 @@ bool Foam::pimpleControl::read()
|
||||
return false;
|
||||
}
|
||||
|
||||
nCorrPIMPLE_ = dict().lookupOrDefault<label>("nOuterCorrectors", 1);
|
||||
nCorrPimple_ = dict().lookupOrDefault<label>("nOuterCorrectors", 1);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -25,9 +25,9 @@ Class
|
||||
Foam::pimpleControl
|
||||
|
||||
Description
|
||||
PIMPLE control class. Provides time-loop control methods which exit the
|
||||
Pimple control class. Provides time-loop control methods which exit the
|
||||
simulation once convergence criteria have been reached. Also provides
|
||||
PIMPLE-loop control methods which exit the iteration once corrector
|
||||
Pimple-loop control methods which exit the iteration once corrector
|
||||
convergence criteria have been met. Example usage:
|
||||
|
||||
\verbatim
|
||||
@ -109,7 +109,7 @@ public:
|
||||
|
||||
// Evolution
|
||||
|
||||
//- PIMPLE loop
|
||||
//- Pimple loop
|
||||
bool loop();
|
||||
|
||||
//- Time run loop
|
||||
|
||||
@ -37,7 +37,7 @@ namespace Foam
|
||||
|
||||
bool Foam::pimpleLoop::read()
|
||||
{
|
||||
nCorrPIMPLE_ =
|
||||
nCorrPimple_ =
|
||||
control_.dict().lookupOrDefault<label>("nOuterCorrectors", 1);
|
||||
|
||||
return true;
|
||||
@ -49,8 +49,8 @@ bool Foam::pimpleLoop::read()
|
||||
Foam::pimpleLoop::pimpleLoop(const solutionControl& control)
|
||||
:
|
||||
control_(control),
|
||||
nCorrPIMPLE_(-1),
|
||||
corrPIMPLE_(0),
|
||||
nCorrPimple_(-1),
|
||||
corrPimple_(0),
|
||||
converged_(false)
|
||||
{}
|
||||
|
||||
@ -67,20 +67,20 @@ bool Foam::pimpleLoop::loop(correctorConvergenceControl& convergence)
|
||||
{
|
||||
read();
|
||||
|
||||
++ corrPIMPLE_;
|
||||
++ corrPimple_;
|
||||
|
||||
// Handle quit conditions first
|
||||
{
|
||||
// If all corrections have been completed then end the correction loop
|
||||
if (corrPIMPLE_ > nCorrPIMPLE_)
|
||||
if (corrPimple_ > nCorrPimple_)
|
||||
{
|
||||
if (convergence.hasCorrResidualControls() && nCorrPIMPLE_ > 1)
|
||||
if (convergence.hasCorrResidualControls() && nCorrPimple_ > 1)
|
||||
{
|
||||
Info<< control_.algorithmName() << ": Not converged within "
|
||||
<< nCorrPIMPLE_ << " iterations" << endl;
|
||||
<< nCorrPimple_ << " iterations" << endl;
|
||||
}
|
||||
|
||||
corrPIMPLE_ = 0;
|
||||
corrPimple_ = 0;
|
||||
|
||||
return false;
|
||||
}
|
||||
@ -89,9 +89,9 @@ bool Foam::pimpleLoop::loop(correctorConvergenceControl& convergence)
|
||||
if (converged_)
|
||||
{
|
||||
Info<< control_.algorithmName() << ": Converged in "
|
||||
<< corrPIMPLE_ - 1 << " iterations" << endl;
|
||||
<< corrPimple_ - 1 << " iterations" << endl;
|
||||
|
||||
corrPIMPLE_ = 0;
|
||||
corrPimple_ = 0;
|
||||
converged_ = false;
|
||||
|
||||
return false;
|
||||
@ -102,7 +102,7 @@ bool Foam::pimpleLoop::loop(correctorConvergenceControl& convergence)
|
||||
{
|
||||
// If convergence has been reached then set the flag so that the loop
|
||||
// exits next time around
|
||||
if (!firstPIMPLEIter() && convergence.corrCriteriaSatisfied())
|
||||
if (!firstPimpleIter() && convergence.corrCriteriaSatisfied())
|
||||
{
|
||||
Info<< control_.algorithmName() << ": Converged " << nl
|
||||
<< control_.algorithmSpace() << " Doing final iteration"
|
||||
@ -112,7 +112,7 @@ bool Foam::pimpleLoop::loop(correctorConvergenceControl& convergence)
|
||||
|
||||
// Set up the next iteration by storing the index of the solution to
|
||||
// check the convergence of
|
||||
if (firstPIMPLEIter())
|
||||
if (firstPimpleIter())
|
||||
{
|
||||
convergence.resetCorrSolveIndex();
|
||||
}
|
||||
@ -122,9 +122,9 @@ bool Foam::pimpleLoop::loop(correctorConvergenceControl& convergence)
|
||||
}
|
||||
|
||||
// Print the number of the iteration about to take place
|
||||
if (nCorrPIMPLE_ > 1)
|
||||
if (nCorrPimple_ > 1)
|
||||
{
|
||||
Info<< control_.algorithmName() << ": Iteration " << corrPIMPLE_
|
||||
Info<< control_.algorithmName() << ": Iteration " << corrPimple_
|
||||
<< endl;
|
||||
}
|
||||
|
||||
|
||||
@ -25,7 +25,7 @@ Class
|
||||
Foam::pimpleLoop
|
||||
|
||||
Description
|
||||
PIMPLE loop class. Implements the logic which controls the PIMPLE loop
|
||||
Pimple loop class. Implements the logic which controls the pimple loop
|
||||
generically for a given corrector convergence control. Can therefore be
|
||||
used be either single- or multi-region control classes.
|
||||
|
||||
@ -58,13 +58,13 @@ protected:
|
||||
//- Reference to the solution control
|
||||
const solutionControl& control_;
|
||||
|
||||
//- Maximum number of PIMPLE correctors
|
||||
label nCorrPIMPLE_;
|
||||
//- Maximum number of pimple correctors
|
||||
label nCorrPimple_;
|
||||
|
||||
//- Current PIMPLE corrector
|
||||
label corrPIMPLE_;
|
||||
//- Current pimple corrector
|
||||
label corrPimple_;
|
||||
|
||||
//- Flag to indicate convergence of the PIMPLE loop
|
||||
//- Flag to indicate convergence of the pimple loop
|
||||
bool converged_;
|
||||
|
||||
|
||||
@ -96,14 +96,14 @@ public:
|
||||
|
||||
// Access
|
||||
|
||||
//- Maximum number of PIMPLE correctors
|
||||
inline label nCorrPIMPLE() const;
|
||||
//- Maximum number of pimple correctors
|
||||
inline label nCorrPimple() const;
|
||||
|
||||
//- Flag to indicate the first PIMPLE iteration
|
||||
inline bool firstPIMPLEIter() const;
|
||||
//- Flag to indicate the first pimple iteration
|
||||
inline bool firstPimpleIter() const;
|
||||
|
||||
//- Flag to indicate the last PIMPLE iteration
|
||||
inline bool finalPIMPLEIter() const;
|
||||
//- Flag to indicate the last pimple iteration
|
||||
inline bool finalPimpleIter() const;
|
||||
|
||||
//- Flag to indicate the first iteration
|
||||
inline bool firstIter() const;
|
||||
@ -114,7 +114,7 @@ public:
|
||||
|
||||
// Evolution
|
||||
|
||||
//- PIMPLE loop
|
||||
//- Pimple loop
|
||||
bool loop(correctorConvergenceControl& convergence);
|
||||
};
|
||||
|
||||
|
||||
@ -25,33 +25,33 @@ License
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
inline Foam::label Foam::pimpleLoop::nCorrPIMPLE() const
|
||||
inline Foam::label Foam::pimpleLoop::nCorrPimple() const
|
||||
{
|
||||
return nCorrPIMPLE_;
|
||||
return nCorrPimple_;
|
||||
}
|
||||
|
||||
|
||||
inline bool Foam::pimpleLoop::firstPIMPLEIter() const
|
||||
inline bool Foam::pimpleLoop::firstPimpleIter() const
|
||||
{
|
||||
return corrPIMPLE_ == 1;
|
||||
return corrPimple_ == 1;
|
||||
}
|
||||
|
||||
|
||||
inline bool Foam::pimpleLoop::finalPIMPLEIter() const
|
||||
inline bool Foam::pimpleLoop::finalPimpleIter() const
|
||||
{
|
||||
return corrPIMPLE_ >= nCorrPIMPLE_;
|
||||
return corrPimple_ >= nCorrPimple_;
|
||||
}
|
||||
|
||||
|
||||
inline bool Foam::pimpleLoop::firstIter() const
|
||||
{
|
||||
return firstPIMPLEIter();
|
||||
return firstPimpleIter();
|
||||
}
|
||||
|
||||
|
||||
inline bool Foam::pimpleLoop::finalIter() const
|
||||
{
|
||||
return converged_ || finalPIMPLEIter();
|
||||
return converged_ || finalPimpleIter();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -101,10 +101,10 @@ Foam::pimpleMultiRegionControl::pimpleMultiRegionControl
|
||||
Info<< nl << algorithmName << ": Region " << pimpleMeshes[i].name();
|
||||
pimpleControls_[i].printResidualControls();
|
||||
|
||||
if (nCorrPIMPLE_ > 1)
|
||||
if (nCorrPimple_ > 1)
|
||||
{
|
||||
Info<< nl << algorithmName << ": Region " << pimpleMeshes[i].name();
|
||||
pimpleControls_[i].printCorrResidualControls(nCorrPIMPLE_);
|
||||
pimpleControls_[i].printCorrResidualControls(nCorrPimple_);
|
||||
}
|
||||
}
|
||||
|
||||
@ -113,14 +113,14 @@ Foam::pimpleMultiRegionControl::pimpleMultiRegionControl
|
||||
Info<< nl << algorithmName << ": Region " << solidMeshes[i].name();
|
||||
solidControls_[i].printResidualControls();
|
||||
|
||||
if (nCorrPIMPLE_ > 1)
|
||||
if (nCorrPimple_ > 1)
|
||||
{
|
||||
Info<< nl << algorithmName << ": Region " << solidMeshes[i].name();
|
||||
solidControls_[i].printCorrResidualControls(nCorrPIMPLE_);
|
||||
solidControls_[i].printCorrResidualControls(nCorrPimple_);
|
||||
}
|
||||
}
|
||||
|
||||
if (nCorrPIMPLE_ == 1)
|
||||
if (nCorrPimple_ == 1)
|
||||
{
|
||||
Info<< nl << algorithmName << ": Operating solver in PISO mode" << nl
|
||||
<< endl;
|
||||
@ -155,7 +155,7 @@ bool Foam::pimpleMultiRegionControl::read()
|
||||
|
||||
const dictionary& solutionDict = dict();
|
||||
|
||||
nCorrPIMPLE_ = solutionDict.lookupOrDefault<label>("nOuterCorrectors", 1);
|
||||
nCorrPimple_ = solutionDict.lookupOrDefault<label>("nOuterCorrectors", 1);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -25,8 +25,8 @@ Class
|
||||
Foam::pimpleMultiRegionControl
|
||||
|
||||
Description
|
||||
PIMPLE multi-region control class. As Foam::pimpleControl, but for a multi-
|
||||
region simulation comprising PIMPLE and solid regions. More region types
|
||||
Pimple multi-region control class. As Foam::pimpleControl, but for a multi-
|
||||
region simulation comprising pimple and solid regions. More region types
|
||||
could be added.
|
||||
|
||||
SourceFiles
|
||||
@ -65,7 +65,7 @@ protected:
|
||||
|
||||
// Protected data
|
||||
|
||||
//- The per-region PIMPLE controls
|
||||
//- The per-region pimple controls
|
||||
PtrList<pimpleNoLoopControl> pimpleControls_;
|
||||
|
||||
//- The per-region solid controls
|
||||
@ -143,7 +143,7 @@ public:
|
||||
//- Update the solve index in the correction residual control data
|
||||
virtual void updateCorrSolveIndex();
|
||||
|
||||
//- PIMPLE loop
|
||||
//- Pimple loop
|
||||
bool loop();
|
||||
|
||||
//- Time run loop
|
||||
|
||||
@ -51,7 +51,7 @@ Foam::pimpleNoLoopControl::pimpleNoLoopControl
|
||||
static_cast<singleRegionSolutionControl&>(*this),
|
||||
"outerCorrector"
|
||||
),
|
||||
SIMPLErho_(false),
|
||||
simpleRho_(false),
|
||||
turbOnFinalIterOnly_(true)
|
||||
{
|
||||
read();
|
||||
@ -78,7 +78,10 @@ bool Foam::pimpleNoLoopControl::read()
|
||||
return false;
|
||||
}
|
||||
|
||||
SIMPLErho_ = dict().lookupOrDefault<bool>("SIMPLErho", false);
|
||||
// The SIMPLErho keyword is maintained here for backwards compatibility
|
||||
simpleRho_ = dict().lookupOrDefault<bool>("SIMPLErho", false);
|
||||
simpleRho_ = dict().lookupOrDefault<bool>("simpleRho", simpleRho_);
|
||||
|
||||
turbOnFinalIterOnly_ =
|
||||
dict().lookupOrDefault<bool>("turbOnFinalIterOnly", true);
|
||||
|
||||
|
||||
@ -25,9 +25,9 @@ Class
|
||||
Foam::pimpleNoLoopControl
|
||||
|
||||
Description
|
||||
PIMPLE no-loop control class. Implements various option flags, but leaves
|
||||
Pimple no-loop control class. Implements various option flags, but leaves
|
||||
loop controls to the derivation or owner. Can be derived into a "full"
|
||||
PIMPLE control or can be owned by a multi-region PIMPLE class.
|
||||
pimple control or can be owned by a multi-region pimple class.
|
||||
|
||||
SourceFiles
|
||||
pimpleNoLoopControlI.H
|
||||
@ -66,10 +66,10 @@ protected:
|
||||
|
||||
//- Flag to indicate whether to update the density in SIMPLE mode rather
|
||||
// than PISO mode
|
||||
bool SIMPLErho_;
|
||||
bool simpleRho_;
|
||||
|
||||
//- Flag to control whether turblence is solved just on the final PIMPLE
|
||||
// iteration, or on every PIMPLE iteration
|
||||
//- Flag to control whether turblence is solved just on the final pimple
|
||||
// iteration, or on every pimple iteration
|
||||
bool turbOnFinalIterOnly_;
|
||||
|
||||
|
||||
@ -100,11 +100,11 @@ public:
|
||||
|
||||
// Access
|
||||
|
||||
//- Flag to indicate whether to update the density in SIMPLE mode
|
||||
inline bool SIMPLErho() const;
|
||||
//- Flag to indicate whether to update the density in simple mode
|
||||
inline bool simpleRho() const;
|
||||
|
||||
//- Flag to indicate whether to solve the turbulence on the final
|
||||
// PIMPLE iteration only
|
||||
// pimple iteration only
|
||||
inline bool turbOnFinalIterOnly() const;
|
||||
};
|
||||
|
||||
|
||||
@ -25,9 +25,9 @@ License
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
inline bool Foam::pimpleNoLoopControl::SIMPLErho() const
|
||||
inline bool Foam::pimpleNoLoopControl::simpleRho() const
|
||||
{
|
||||
return SIMPLErho_;
|
||||
return simpleRho_;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -25,7 +25,7 @@ Class
|
||||
Foam::simpleControl
|
||||
|
||||
Description
|
||||
SIMPLE control class. Provides time-loop control methods which exit the
|
||||
Simple control class. Provides time-loop control methods which exit the
|
||||
simulation once convergence criteria have been reached. Example usage:
|
||||
|
||||
\verbatim
|
||||
|
||||
@ -25,7 +25,7 @@ Class
|
||||
Foam::solidNoLoopControl
|
||||
|
||||
Description
|
||||
PIMPLE no-loop control class. Implements non-orthogonal and convergence
|
||||
Solid no-loop control class. Implements non-orthogonal and convergence
|
||||
controls, but leaves loop controls to the derivation or owner. Can be
|
||||
derived into a "full" solid control or can be owned by a multi-region class.
|
||||
|
||||
|
||||
@ -66,7 +66,7 @@ protected:
|
||||
bool transonic_;
|
||||
|
||||
//- Flag to indicate to relax pressure using the "consistent" approach
|
||||
// of SIMPLEC
|
||||
// of simplec
|
||||
bool consistent_;
|
||||
|
||||
|
||||
@ -107,7 +107,7 @@ public:
|
||||
inline bool transonic() const;
|
||||
|
||||
//- Flag to indicate to relax pressure using the "consistent"
|
||||
// approach of SIMPLEC
|
||||
// approach of simplec
|
||||
inline bool consistent() const;
|
||||
};
|
||||
|
||||
|
||||
@ -54,7 +54,7 @@ PIMPLE
|
||||
nCorrectors 1;
|
||||
nNonOrthogonalCorrectors 0;
|
||||
consistent yes;
|
||||
SIMPLErho yes;
|
||||
simpleRho yes;
|
||||
|
||||
pMaxFactor 1.5;
|
||||
pMinFactor 0.9;
|
||||
|
||||
Reference in New Issue
Block a user