diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/ODEChemistryModel/ODEChemistryModel.C b/src/thermophysicalModels/chemistryModel/chemistryModel/ODEChemistryModel/ODEChemistryModel.C index 5fd80e72399dfdfa787597518363d1ec4e18d5c0..dfe226da197e43ebeca9e6f333c2e4e76bb3f18d 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/ODEChemistryModel/ODEChemistryModel.C +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/ODEChemistryModel/ODEChemistryModel.C @@ -454,7 +454,20 @@ Foam::ODEChemistryModel<CompType, ThermoType>::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<CompType, ThermoType>::nEqns() const template<class CompType, class ThermoType> void Foam::ODEChemistryModel<CompType, ThermoType>::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<nSpecie_; i++) { @@ -629,7 +654,19 @@ Foam::scalar Foam::ODEChemistryModel<CompType, ThermoType>::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<nSpecie_; i++) { diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/ODEChemistryModel/ODEChemistryModelI.H b/src/thermophysicalModels/chemistryModel/chemistryModel/ODEChemistryModel/ODEChemistryModelI.H index 5abb1591a5fb8df8d0f54138118cec86efc2c48f..b5264a28d43c2c9dd88ac18610ce0b14ae918cfa 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/ODEChemistryModel/ODEChemistryModelI.H +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/ODEChemistryModel/ODEChemistryModelI.H @@ -90,12 +90,12 @@ Foam::ODEChemistryModel<CompType, ThermoType>::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 )