diff --git a/src/thermophysicalModels/basic/rhoThermo/basicRhoThermo/basicRhoThermo.C b/src/thermophysicalModels/basic/rhoThermo/basicRhoThermo/basicRhoThermo.C index c16a67371a..dff5dac387 100644 --- a/src/thermophysicalModels/basic/rhoThermo/basicRhoThermo/basicRhoThermo.C +++ b/src/thermophysicalModels/basic/rhoThermo/basicRhoThermo/basicRhoThermo.C @@ -70,4 +70,10 @@ Foam::tmp 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 6e7545f463..04e8ea1c33 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 rho() const; + + //- Return non-const access to the local density field [kg/m^3] + virtual volScalarField& rho(); };