mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
to simplify construction of dimensionedScalar properties and avoid the duplication of the name string in the constructor call.
38 lines
756 B
C
38 lines
756 B
C
Info<< "Reading thermodynamicProperties\n" << endl;
|
|
|
|
IOdictionary thermodynamicProperties
|
|
(
|
|
IOobject
|
|
(
|
|
"thermodynamicProperties",
|
|
runTime.constant(),
|
|
mesh,
|
|
IOobject::MUST_READ_IF_MODIFIED,
|
|
IOobject::NO_WRITE
|
|
)
|
|
);
|
|
|
|
dimensionedScalar rho0
|
|
(
|
|
"rho0",
|
|
dimDensity,
|
|
thermodynamicProperties
|
|
);
|
|
|
|
dimensionedScalar p0
|
|
(
|
|
"p0",
|
|
dimPressure,
|
|
thermodynamicProperties
|
|
);
|
|
|
|
dimensionedScalar psi
|
|
(
|
|
"psi",
|
|
dimCompressibility,
|
|
thermodynamicProperties
|
|
);
|
|
|
|
// Density offset, i.e. the constant part of the density
|
|
dimensionedScalar rhoO("rhoO", rho0 - psi*p0);
|