rhoThermo: Renamed thermo:rho -> rho

The thermodynamic density field is now named "rho" by default and only renamed
"thermo:rho" by solvers that create and maintain a separate continuity density
field which is named "rho".  This change significantly simplifies and
standardises the specification of schemes and boundary conditions requiring
density as it is now always named "rho" or "rho.<phase>" unless under some very
unusual circumstances the thermodynamic rather than continuity density is
required for a solver maintaining both.

The advantage of this change is particularly noticeable for multiphase
simulations in which each phase has its own density now named "rho.<phase>"
rather than "thermo:rho.<phase>" as separate phase continuity density fields are
not required so for multiphaseEulerFoam the scheme specification:

    "div\(alphaRhoPhi.*,\(p\|thermo:rho.*\)\)" Gauss limitedLinear 1;

is now written:

    "div\(alphaRhoPhi.*,\(p\|rho.*\)\)" Gauss limitedLinear 1;
This commit is contained in:
Henry Weller
2022-10-28 02:19:13 +01:00
parent 87a0b8a515
commit 4bd90bc969
89 changed files with 150 additions and 126 deletions

View File

@ -79,7 +79,7 @@ Foam::compressibleTwoPhaseMixture::compressibleTwoPhaseMixture
(
IOobject
(
"thermo:rho",
"rho",
U.mesh().time().timeName(),
U.mesh(),
IOobject::NO_READ,

View File

@ -130,7 +130,7 @@ void Foam::fv::compressible::VoFCavitation::addSup
if (fieldName == "p_rgh")
{
const volScalarField::Internal& rho =
mesh().lookupObject<volScalarField>("thermo:rho");
mesh().lookupObject<volScalarField>("rho");
const volScalarField::Internal& gh =
mesh().lookupObject<volScalarField>("gh");

View File

@ -79,7 +79,7 @@ Foam::solvers::isothermalFluid::isothermalFluid
IOobject::READ_IF_PRESENT,
IOobject::AUTO_WRITE
),
thermo.rho()
thermo.renameRho()
),
dpdt