ENH: Updated reading of dimensioned types from transportProperties dictionary to avoid the need to provide the dimension set

This commit is contained in:
Andrew Heather
2017-05-18 14:44:52 +01:00
parent 9a6f0fdd37
commit 28868f8d4d
5 changed files with 117 additions and 104 deletions

View File

@ -1,37 +1,37 @@
Info<< "Reading thermodynamicProperties\n" << endl;
Info<< "Reading thermodynamicProperties\n" << endl;
IOdictionary thermodynamicProperties
IOdictionary thermodynamicProperties
(
IOobject
(
IOobject
(
"thermodynamicProperties",
runTime.constant(),
mesh,
IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE
)
);
"thermodynamicProperties",
runTime.constant(),
mesh,
IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE
)
);
dimensionedScalar rho0
(
"rho0",
dimDensity,
thermodynamicProperties
);
dimensionedScalar rho0
(
"rho0",
dimDensity,
thermodynamicProperties
);
dimensionedScalar p0
(
"p0",
dimPressure,
thermodynamicProperties
);
dimensionedScalar p0
(
"p0",
dimPressure,
thermodynamicProperties
);
dimensionedScalar psi
(
"psi",
dimCompressibility,
thermodynamicProperties
);
dimensionedScalar psi
(
"psi",
dimCompressibility,
thermodynamicProperties
);
// Density offset, i.e. the constant part of the density
dimensionedScalar rhoO("rhoO", rho0 - psi*p0);
// Density offset, i.e. the constant part of the density
dimensionedScalar rhoO("rhoO", rho0 - psi*p0);