combustionModels/PaSR/PaSR: Changed useReactionRate to !integrateReactionRate

This commit is contained in:
Henry
2013-09-27 12:42:17 +01:00
parent 317bf2fbd9
commit 25751cf413
2 changed files with 18 additions and 9 deletions

View File

@ -51,11 +51,18 @@ Foam::combustionModels::PaSR<Type>::PaSR
mesh,
dimensionedScalar("kappa", dimless, 0.0)
),
useReactionRate_(this->coeffs().lookupOrDefault("useReactionRate", false))
integrateReactionRate_
(
this->coeffs().lookupOrDefault("integrateReactionRate", true)
)
{
if (useReactionRate_)
if (integrateReactionRate_)
{
Info<< " using reaction rate" << endl;
Info<< " using integrated reaction rate" << endl;
}
else
{
Info<< " using instantaneous reaction rate" << endl;
}
}
@ -83,13 +90,13 @@ void Foam::combustionModels::PaSR<Type>::correct()
{
const scalar dt = this->mesh().time().deltaTValue();
if (useReactionRate_)
if (integrateReactionRate_)
{
this->chemistryPtr_->calculate();
this->chemistryPtr_->solve(dt);
}
else
{
this->chemistryPtr_->solve(dt);
this->chemistryPtr_->calculate();
}
if (turbulentReaction_)
@ -219,7 +226,8 @@ bool Foam::combustionModels::PaSR<Type>::read()
{
this->coeffs().lookup("Cmix") >> Cmix_;
this->coeffs().lookup("turbulentReaction") >> turbulentReaction_;
this->coeffs().lookup("useReactionRate") >> useReactionRate_;
this->coeffs().lookup("integrateReactionRate")
>> integrateReactionRate_;
return true;
}
else

View File

@ -65,8 +65,9 @@ class PaSR
//- Mixing parameter
volScalarField kappa_;
//- Use reaction rate
bool useReactionRate_;
//- Integrate reaction rate over the time-step
// using the selected ODE solver
bool integrateReactionRate_;
// Private Member Functions