Files
openfoam/applications/solvers/compressible/sonicFoam/sonicLiquidFoam/readThermodynamicProperties.H
Henry Weller 365f9b0006 dimensioned<Type>: Added constructor from name, dimensions and dictionary
to simplify construction of dimensionedScalar properties and avoid the
duplication of the name string in the constructor call.
2015-07-21 12:57:07 +01:00

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);