mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: Converting limiting from pMin to rho min/max for rho[Simple/Pimple/Simplec] solvers
This commit is contained in:
@ -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;
|
||||
|
||||
@ -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
|
||||
/*
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user