Skip to content
Snippets Groups Projects
Commit 81e77b61 authored by Andrew Heather's avatar Andrew Heather
Browse files

not registering cached density field

parent a549c0c8
No related branches found
No related tags found
No related merge requests found
...@@ -454,7 +454,20 @@ Foam::ODEChemistryModel<CompType, ThermoType>::tc() const ...@@ -454,7 +454,20 @@ Foam::ODEChemistryModel<CompType, ThermoType>::tc() const
scalar pf,cf,pr,cr; scalar pf,cf,pr,cr;
label lRef, rRef; 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 nCells = rho.size();
label nReaction = reactions_.size(); label nReaction = reactions_.size();
...@@ -582,7 +595,19 @@ Foam::label Foam::ODEChemistryModel<CompType, ThermoType>::nEqns() const ...@@ -582,7 +595,19 @@ Foam::label Foam::ODEChemistryModel<CompType, ThermoType>::nEqns() const
template<class CompType, class ThermoType> template<class CompType, class ThermoType>
void Foam::ODEChemistryModel<CompType, ThermoType>::calculate() 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++) for (label i=0; i<nSpecie_; i++)
{ {
...@@ -629,7 +654,19 @@ Foam::scalar Foam::ODEChemistryModel<CompType, ThermoType>::solve ...@@ -629,7 +654,19 @@ Foam::scalar Foam::ODEChemistryModel<CompType, ThermoType>::solve
const scalar deltaT 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++) for (label i=0; i<nSpecie_; i++)
{ {
......
...@@ -90,12 +90,12 @@ Foam::ODEChemistryModel<CompType, ThermoType>::RR ...@@ -90,12 +90,12 @@ Foam::ODEChemistryModel<CompType, ThermoType>::RR
IOobject IOobject
( (
"RR(" + this->Y_[i].name() + ')', "RR(" + this->Y_[i].name() + ')',
this->thermo().rho()().mesh().time().timeName(), this->time().timeName(),
this->thermo().rho()().mesh(), this->mesh(),
IOobject::NO_READ, IOobject::NO_READ,
IOobject::NO_WRITE IOobject::NO_WRITE
), ),
this->thermo().rho()().mesh(), this->mesh(),
dimensionedScalar("zero", dimensionSet(1, -3, -1, 0, 0), 0.0), dimensionedScalar("zero", dimensionSet(1, -3, -1, 0, 0), 0.0),
zeroGradientFvPatchScalarField::typeName zeroGradientFvPatchScalarField::typeName
) )
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment