Commit cec56de0 authored by Henry's avatar Henry
Browse files

Compressible solvers: rhoMax and rhoMin now optional and may be supplied without dimensions

parent cd5ade6c
......@@ -39,8 +39,27 @@
#include "compressibleCreatePhi.H"
dimensionedScalar rhoMax(pimple.dict().lookup("rhoMax"));
dimensionedScalar rhoMin(pimple.dict().lookup("rhoMin"));
dimensionedScalar rhoMax
(
dimensionedScalar::lookupOrDefault
(
"rhoMax",
pimple.dict(),
GREAT,
dimDensity
)
);
dimensionedScalar rhoMin
(
dimensionedScalar::lookupOrDefault
(
"rhoMin",
pimple.dict(),
0,
dimDensity
)
);
Info<< "Creating turbulence model\n" << endl;
autoPtr<compressible::turbulenceModel> turbulence
......
......@@ -44,8 +44,27 @@
scalar pRefValue = 0.0;
setRefCell(p, simple.dict(), pRefCell, pRefValue);
dimensionedScalar rhoMax(simple.dict().lookup("rhoMax"));
dimensionedScalar rhoMin(simple.dict().lookup("rhoMin"));
dimensionedScalar rhoMax
(
dimensionedScalar::lookupOrDefault
(
"rhoMax",
simple.dict(),
GREAT,
dimDensity
)
);
dimensionedScalar rhoMin
(
dimensionedScalar::lookupOrDefault
(
"rhoMin",
simple.dict(),
0,
dimDensity
)
);
Info<< "Creating turbulence model\n" << endl;
autoPtr<compressible::RASModel> turbulence
......
......@@ -43,8 +43,27 @@
scalar pRefValue = 0.0;
setRefCell(p, simple.dict(), pRefCell, pRefValue);
dimensionedScalar rhoMax(simple.dict().lookup("rhoMax"));
dimensionedScalar rhoMin(simple.dict().lookup("rhoMin"));
dimensionedScalar rhoMax
(
dimensionedScalar::lookupOrDefault
(
"rhoMax",
simple.dict(),
GREAT,
dimDensity
)
);
dimensionedScalar rhoMin
(
dimensionedScalar::lookupOrDefault
(
"rhoMin",
simple.dict(),
0,
dimDensity
)
);
Info<< "Creating turbulence model\n" << endl;
autoPtr<compressible::RASModel> turbulence
......
......@@ -58,18 +58,24 @@
dimensionedScalar rhoMax
(
"rhoMax",
dimDensity,
pimple.dict()
.lookupOrDefault<scalar>("rhoMax", GREAT)
dimensionedScalar::lookupOrDefault
(
"rhoMax",
pimple.dict(),
GREAT,
dimDensity
)
);
dimensionedScalar rhoMin
(
"rhoMin",
dimDensity,
pimple.dict()
.lookupOrDefault<scalar>("rhoMin", -GREAT)
dimensionedScalar::lookupOrDefault
(
"rhoMin",
pimple.dict(),
0,
dimDensity
)
);
Info<< "Creating turbulence model\n" << endl;
......
......@@ -56,8 +56,28 @@
#include "compressibleCreatePhi.H"
dimensionedScalar rhoMax(simple.dict().lookup("rhoMax"));
dimensionedScalar rhoMin(simple.dict().lookup("rhoMin"));
dimensionedScalar rhoMax
(
dimensionedScalar::lookupOrDefault
(
"rhoMax",
simple.dict(),
GREAT,
dimDensity
)
);
dimensionedScalar rhoMin
(
dimensionedScalar::lookupOrDefault
(
"rhoMin",
simple.dict(),
0,
dimDensity
)
);
Info<< "Creating turbulence model\n" << endl;
autoPtr<compressible::turbulenceModel> turbulence
......
......@@ -34,7 +34,7 @@
"rho",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::READ_IF_PRESENT,
IOobject::AUTO_WRITE
),
thermo.rho()
......@@ -56,6 +56,28 @@
#include "compressibleCreatePhi.H"
dimensionedScalar rhoMax
(
dimensionedScalar::lookupOrDefault
(
"rhoMax",
pimple.dict(),
GREAT,
dimDensity
)
);
dimensionedScalar rhoMin
(
dimensionedScalar::lookupOrDefault
(
"rhoMin",
pimple.dict(),
0,
dimDensity
)
);
Info<< "Creating turbulence model\n" << endl;
autoPtr<compressible::turbulenceModel> turbulence
(
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment