ENH: simpleFoam, rhoSimpleFoam and porousSimpleFoam updates

This commit is contained in:
andy
2010-10-08 14:38:03 +01:00
parent ca6961f9ab
commit 88f0f2e4a3
3 changed files with 26 additions and 37 deletions

View File

@ -30,15 +30,7 @@ if (transonic)
pEqn.setReference(pRefCell, pRefValue);
// Retain the residual from the first iteration
if (nonOrth == 0)
{
pEqn.solve();
}
else
{
pEqn.solve();
}
pEqn.solve();
if (nonOrth == nNonOrthCorr)
{
@ -60,15 +52,7 @@ else
pEqn.setReference(pRefCell, pRefValue);
// Retain the residual from the first iteration
if (nonOrth == 0)
{
pEqn.solve();
}
else
{
pEqn.solve();
}
pEqn.solve();
if (nonOrth == nNonOrthCorr)
{

View File

@ -43,16 +43,28 @@
porousZones pZones(mesh);
Switch pressureImplicitPorosity(false);
// nUCorrectors used for pressureImplicitPorosity
int nUCorr = 0;
const bool pressureImplicitPorosity =
(
pZones.size()
&& mesh.solutionDict().subDict("SIMPLE").readIfPresent
(
"nUCorrectors",
nUCorr
)
&& (nUCorr > 0)
);
if (pZones.size())
{
// nUCorrectors for pressureImplicitPorosity
if (mesh.solutionDict().subDict("SIMPLE").found("nUCorrectors"))
{
nUCorr = readInt
(
mesh.solutionDict().subDict("SIMPLE").lookup("nUCorrectors")
);
}
if (nUCorr > 0)
{
pressureImplicitPorosity = true;
Info<< "Using pressure implicit porosity" << endl;
}
else
{
Info<< "Using pressure explicit porosity" << endl;
}
}

View File

@ -15,15 +15,8 @@
);
pEqn.setReference(pRefCell, pRefValue);
// retain the residual from the first iteration
if (nonOrth == 0)
{
pEqn.solve();
}
else
{
pEqn.solve();
}
pEqn.solve();
if (nonOrth == nNonOrthCorr)
{