ENH: Converting limiting from pMin to rho min/max for rho[Simple/Pimple/Simplec] solvers

This commit is contained in:
andy
2010-10-08 17:41:52 +01:00
parent 8385da92d8
commit 7600cfc48d
6 changed files with 27 additions and 12 deletions

View File

@ -39,9 +39,14 @@
#include "compressibleCreatePhi.H"
dimensionedScalar pMin
dimensionedScalar rhoMax
(
mesh.solutionDict().subDict("PIMPLE").lookup("pMin")
mesh.solutionDict().subDict("PIMPLE").lookup("rhoMax")
);
dimensionedScalar rhoMin
(
mesh.solutionDict().subDict("PIMPLE").lookup("rhoMin")
);
Info<< "Creating turbulence model\n" << endl;

View File

@ -102,6 +102,8 @@ else
p.relax();
rho = thermo.rho();
rho = max(rho, rhoMin);
rho = min(rho, rhoMax);
rho.relax();
Info<< "rho max/min : " << max(rho).value()
<< " " << min(rho).value() << endl;
@ -112,8 +114,6 @@ U.correctBoundaryConditions();
DpDt = fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p);
bound(p, pMin);
// For closed-volume cases adjust the pressure and density levels
// to obey overall mass continuity
/*

View File

@ -45,9 +45,14 @@
scalar pRefValue = 0.0;
setRefCell(p, mesh.solutionDict().subDict("SIMPLE"), pRefCell, pRefValue);
dimensionedScalar pMin
dimensionedScalar rhoMax
(
mesh.solutionDict().subDict("SIMPLE").lookup("pMin")
mesh.solutionDict().subDict("SIMPLE").lookup("rhoMax")
);
dimensionedScalar rhoMin
(
mesh.solutionDict().subDict("SIMPLE").lookup("rhoMin")
);
Info<< "Creating turbulence model\n" << endl;

View File

@ -58,8 +58,6 @@ else
U.correctBoundaryConditions();
bound(p, pMin);
// For closed-volume cases adjust the pressure and density levels
// to obey overall mass continuity
if (closedVolume)
@ -69,5 +67,7 @@ if (closedVolume)
}
rho = thermo.rho();
rho = max(rho, rhoMin);
rho = min(rho, rhoMax);
rho.relax();
Info<< "rho max/min : " << max(rho).value() << " " << min(rho).value() << endl;

View File

@ -43,9 +43,14 @@
scalar pRefValue = 0.0;
setRefCell(p, mesh.solutionDict().subDict("SIMPLE"), pRefCell, pRefValue);
dimensionedScalar pMin
dimensionedScalar rhoMax
(
mesh.solutionDict().subDict("SIMPLE").lookup("pMin")
mesh.solutionDict().subDict("SIMPLE").lookup("rhoMax")
);
dimensionedScalar rhoMin
(
mesh.solutionDict().subDict("SIMPLE").lookup("rhoMin")
);
Info<< "Creating turbulence model\n" << endl;

View File

@ -101,8 +101,6 @@ U -= (fvc::grad(p0)*(1.0/AU - 1.0/AtU) + fvc::grad(p)/AtU);
U.correctBoundaryConditions();
bound(p, pMin);
// For closed-volume cases adjust the pressure and density levels
// to obey overall mass continuity
if (closedVolume)
@ -112,6 +110,8 @@ if (closedVolume)
}
rho = thermo.rho();
rho = max(rho, rhoMin);
rho = min(rho, rhoMax);
if (!transonic)
{