openfoam/applications/solvers/multiphase/cavitatingFoam/readThermodynamicProperties.H
Mark Olesen 6a448016aa ENH: additional read guards for dimensionedType. input consistency (#762, #1148)
- provide a lookupOrDefault constructor form, since this is a fairly
  commonly used requirement and simplifies the calling sequence.

  Before

      dimensionedScalar rhoMax
      (
          dimensionedScalar::lookupOrDefault
          (
              "rhoMax",
              pimple.dict(),
              dimDensity,
              GREAT
          )
     );

  After

      dimensionedScalar rhoMax("rhoMax", dimDensity, GREAT, pimple.dict());

- read, readIfPresent methods with alternative lookup names.

- Mark the Istream related constructors with compile-time deprecated
  warnings.

BUG: read, readIfPresent methods not handling optional dimensions (#1148)
2019-01-03 13:34:11 +01:00

28 lines
754 B
C

Info<< "Reading thermodynamicProperties\n" << endl;
IOdictionary thermodynamicProperties
(
IOobject
(
"thermodynamicProperties",
runTime.constant(),
mesh,
IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE
)
);
dimensionedScalar psil("psil", dimCompressibility, thermodynamicProperties);
dimensionedScalar rholSat("rholSat", dimDensity, thermodynamicProperties);
dimensionedScalar psiv("psiv", dimCompressibility, thermodynamicProperties);
dimensionedScalar pSat("pSat", dimPressure, thermodynamicProperties);
dimensionedScalar rhovSat("rhovSat", psiv*pSat);
dimensionedScalar rhol0("rhol0", rholSat - pSat*psil);
const dimensionedScalar rhoMin("rhoMin", dimDensity, thermodynamicProperties);