ENH: update thermo for gas in ODESoliudchemistry and other minor stuff

This commit is contained in:
sergio
2011-06-07 10:20:46 +01:00
parent 51bdfb51fd
commit c473c6a6a1
2 changed files with 8 additions and 12 deletions

View File

@ -108,8 +108,6 @@ void Foam::singleStepReactingMixture<ThermoType>::calculateMaxProducts()
Yprod0_[specieI] = this->speciesData()[specieI].W()/Wm*Xi[i];
}
Info << "Max products: " << Yprod0_ << endl;
// Normalize the stoichiometric coeff to mass
forAll(specieStoichCoeffs_, i)
{
@ -208,7 +206,7 @@ Foam::singleStepReactingMixture<ThermoType>::singleStepReactingMixture
mesh.time().timeName(),
mesh,
IOobject::NO_READ,
IOobject::AUTO_WRITE
IOobject::NO_WRITE
);
fres_.set

View File

@ -139,7 +139,6 @@ ODESolidChemistryModel
// Calculate inital values of Ysi0 = rho*delta*Yi
Ys0_[fieldI].internalField() =
//this->solidThermo().rho()*Ys_[fieldI]*mesh.V();
this->solidThermo().rho()*max(Ys_[fieldI],scalar(0.001))*mesh.V();
}
@ -148,15 +147,18 @@ ODESolidChemistryModel
RRg_.set(fieldI, new scalarField(mesh.nCells(), 0.0));
}
dictionary thermoDict =
mesh.lookupObject<dictionary>("chemistryProperties");
forAll(gasThermo_, gasI)
{
dictionary thermoDict =
mesh.lookupObject<dictionary>
(
"chemistryProperties"
).subDict(pyrolisisGases_[gasI]);
gasThermo_.set
(
gasI,
new GasThermo(thermoDict.lookup(pyrolisisGases_[gasI]))
new GasThermo(thermoDict)
);
}
@ -275,7 +277,6 @@ Foam::ODESolidChemistryModel<CompType, SolidThermo, GasThermo>::omega
label si = R.slhs()[s];
kf *=
// pow(c1[si]/max(Ys0_[si][cellI], 0.001), exponent)
pow(c1[si]/Ys0_[si][cellI], exponent)
*(Ys0_[si][cellI]);
}
@ -312,7 +313,6 @@ void Foam::ODESolidChemistryModel<CompType, SolidThermo, GasThermo>::derivatives
scalar dYidt = dcdt[i]/cTot;
scalar Yi = c[i]/cTot;
newCp += Yi*solidThermo_[i].Cp(T);
//newhi += dYidt*solidThermo_[i].hf();
newhi -= dYidt*solidThermo_[i].hf();
}
@ -465,7 +465,6 @@ Foam::ODESolidChemistryModel<CompType, SolidThermo, GasThermo>::Sh() const
forAll(Sh, cellI)
{
scalar hf = solidThermo_[i].hf();
//Sh[cellI] += hf*RRs_[i][cellI];
Sh[cellI] -= hf*RRs_[i][cellI];
}
}
@ -695,7 +694,6 @@ Foam::ODESolidChemistryModel<CompType, SolidThermo, GasThermo>::solve
scalar dYi = dcdt[i]/cTot;
scalar Yi = c[i]/cTot;
newCp += Yi*solidThermo_[i].Cp(Ti);
//newhi += dYi*solidThermo_[i].hf();
newhi -= dYi*solidThermo_[i].hf();
invRho += Yi/solidThermo_[i].rho(Ti);
}