not registering cached density field

This commit is contained in:
andy
2009-06-19 12:56:30 +01:00
parent a549c0c800
commit 81e77b61d7
2 changed files with 43 additions and 6 deletions

View File

@ -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++)
{

View File

@ -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
)