diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/ODEChemistryModel/ODEChemistryModel.C b/src/thermophysicalModels/chemistryModel/chemistryModel/ODEChemistryModel/ODEChemistryModel.C index 5fd80e7239..dfe226da19 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/ODEChemistryModel/ODEChemistryModel.C +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/ODEChemistryModel/ODEChemistryModel.C @@ -454,7 +454,20 @@ Foam::ODEChemistryModel::tc() const scalar pf,cf,pr,cr; label lRef, rRef; - const volScalarField rho = this->thermo().rho(); + const volScalarField rho + ( + IOobject + ( + "rho", + this->time().timeName(), + this->mesh(), + IOobject::NO_READ, + IOobject::NO_WRITE, + false + ), + this->thermo().rho() + ); + label nCells = rho.size(); label nReaction = reactions_.size(); @@ -582,7 +595,19 @@ Foam::label Foam::ODEChemistryModel::nEqns() const template void Foam::ODEChemistryModel::calculate() { - const volScalarField rho = this->thermo().rho(); + const volScalarField rho + ( + IOobject + ( + "rho", + this->time().timeName(), + this->mesh(), + IOobject::NO_READ, + IOobject::NO_WRITE, + false + ), + this->thermo().rho() + ); for (label i=0; i::solve const scalar deltaT ) { - const volScalarField rho = this->thermo().rho(); + const volScalarField rho + ( + IOobject + ( + "rho", + this->time().timeName(), + this->mesh(), + IOobject::NO_READ, + IOobject::NO_WRITE, + false + ), + this->thermo().rho() + ); for (label i=0; i::RR IOobject ( "RR(" + this->Y_[i].name() + ')', - this->thermo().rho()().mesh().time().timeName(), - this->thermo().rho()().mesh(), + this->time().timeName(), + this->mesh(), IOobject::NO_READ, IOobject::NO_WRITE ), - this->thermo().rho()().mesh(), + this->mesh(), dimensionedScalar("zero", dimensionSet(1, -3, -1, 0, 0), 0.0), zeroGradientFvPatchScalarField::typeName )