diff --git a/src/thermophysicalModels/basic/rhoThermo/basicRhoThermo/basicRhoThermo.C b/src/thermophysicalModels/basic/rhoThermo/basicRhoThermo/basicRhoThermo.C index c16a67371a00afa6d8cfba4813464f954c24b2b3..dff5dac38796abe255ee0ba5c3ba4246b07e9f80 100644 --- a/src/thermophysicalModels/basic/rhoThermo/basicRhoThermo/basicRhoThermo.C +++ b/src/thermophysicalModels/basic/rhoThermo/basicRhoThermo/basicRhoThermo.C @@ -70,4 +70,10 @@ Foam::tmp<Foam::volScalarField> Foam::basicRhoThermo::rho() const } +Foam::volScalarField& Foam::basicRhoThermo::rho() +{ + return rho_; +} + + // ************************************************************************* // diff --git a/src/thermophysicalModels/basic/rhoThermo/basicRhoThermo/basicRhoThermo.H b/src/thermophysicalModels/basic/rhoThermo/basicRhoThermo/basicRhoThermo.H index 6e7545f463cb9e8bca4c09175d56d02755b47f4f..04e8ea1c3308809298de16480fa32c9fd64dd2f5 100644 --- a/src/thermophysicalModels/basic/rhoThermo/basicRhoThermo/basicRhoThermo.H +++ b/src/thermophysicalModels/basic/rhoThermo/basicRhoThermo/basicRhoThermo.H @@ -46,7 +46,7 @@ namespace Foam { /*---------------------------------------------------------------------------*\ - Class basicRhoThermo Declaration + Class basicRhoThermo Declaration \*---------------------------------------------------------------------------*/ class basicRhoThermo @@ -106,6 +106,9 @@ public: //- Density [kg/m^3] virtual tmp<volScalarField> rho() const; + + //- Return non-const access to the local density field [kg/m^3] + virtual volScalarField& rho(); };