solutionControl: Default simpleRho true when steady, and improved log messages

This commit is contained in:
Will Bainbridge
2018-11-19 12:01:46 +00:00
parent ee443e201f
commit f810b87dba
3 changed files with 31 additions and 7 deletions

View File

@ -48,11 +48,19 @@ Foam::pimpleControl::pimpleControl(fvMesh& mesh, const word& algorithmName)
{
printCorrResidualControls(nCorrPimple_);
}
else
Info<< nl << algorithmName << ": Operating solver in "
<< (mesh.steady() ? "steady-state" : mesh.transient() ? "transient" :
"mixed steady-state/transient") << " mode with " << nCorrPimple_
<< " outer corrector" << (nCorrPimple_ == 1 ? "" : "s") << nl;
if (nCorrPimple_ == 1)
{
Info<< nl << algorithmName << ": Operating solver in PISO mode" << nl
<< endl;
Info<< algorithmName << ": Operating solver in "
<< (mesh.steady() ? "SIMPLE" : "PISO") << " mode" << nl;
}
Info<< nl << endl;
}

View File

@ -78,12 +78,17 @@ Foam::pimpleMultiRegionControl::pimpleMultiRegionControl
pimpleControls_(),
solidControls_()
{
bool allSteady = true, allTransient = true;
forAll(pimpleMeshes, i)
{
pimpleControls_.append
(
new pimpleNoLoopControl(pimpleMeshes[i], algorithmName)
);
allSteady = allSteady && pimpleMeshes[i].steady();
allTransient = allTransient && pimpleMeshes[i].transient();
}
forAll(solidMeshes, i)
@ -92,6 +97,9 @@ Foam::pimpleMultiRegionControl::pimpleMultiRegionControl
(
new solidNoLoopControl(solidMeshes[i], algorithmName)
);
allSteady = allSteady && solidMeshes[i].steady();
allTransient = allTransient && solidMeshes[i].transient();
}
read();
@ -120,11 +128,18 @@ Foam::pimpleMultiRegionControl::pimpleMultiRegionControl
}
}
if (nCorrPimple_ == 1)
Info<< nl << algorithmName << ": Operating solver in "
<< (allSteady ? "steady-state" : allTransient ? "transient" :
"mixed steady-state/transient") << " mode with " << nCorrPimple_
<< " outer corrector" << (nCorrPimple_ == 1 ? "" : "s") << nl;
if ((allSteady || allTransient) && nCorrPimple_ == 1)
{
Info<< nl << algorithmName << ": Operating solver in PISO mode" << nl
<< endl;
Info<< algorithmName << ": Operating solver in "
<< (allSteady ? "SIMPLE" : "PISO") << " mode" << nl;
}
Info<< nl << endl;
}

View File

@ -79,7 +79,8 @@ bool Foam::pimpleNoLoopControl::read()
}
// The SIMPLErho keyword is maintained here for backwards compatibility
simpleRho_ = dict().lookupOrDefault<bool>("SIMPLErho", false);
simpleRho_ = mesh().steady();
simpleRho_ = dict().lookupOrDefault<bool>("SIMPLErho", simpleRho_);
simpleRho_ = dict().lookupOrDefault<bool>("simpleRho", simpleRho_);
turbOnFinalIterOnly_ =