Skip to content
Snippets Groups Projects
Commit 25751cf4 authored by Henry's avatar Henry
Browse files

combustionModels/PaSR/PaSR: Changed useReactionRate to !integrateReactionRate

parent 317bf2fb
No related merge requests found
...@@ -51,11 +51,18 @@ Foam::combustionModels::PaSR<Type>::PaSR ...@@ -51,11 +51,18 @@ Foam::combustionModels::PaSR<Type>::PaSR
mesh, mesh,
dimensionedScalar("kappa", dimless, 0.0) dimensionedScalar("kappa", dimless, 0.0)
), ),
useReactionRate_(this->coeffs().lookupOrDefault("useReactionRate", false)) integrateReactionRate_
(
this->coeffs().lookupOrDefault("integrateReactionRate", true)
)
{ {
if (useReactionRate_) if (integrateReactionRate_)
{
Info<< " using integrated reaction rate" << endl;
}
else
{ {
Info<< " using reaction rate" << endl; Info<< " using instantaneous reaction rate" << endl;
} }
} }
...@@ -83,13 +90,13 @@ void Foam::combustionModels::PaSR<Type>::correct() ...@@ -83,13 +90,13 @@ void Foam::combustionModels::PaSR<Type>::correct()
{ {
const scalar dt = this->mesh().time().deltaTValue(); const scalar dt = this->mesh().time().deltaTValue();
if (useReactionRate_) if (integrateReactionRate_)
{ {
this->chemistryPtr_->calculate(); this->chemistryPtr_->solve(dt);
} }
else else
{ {
this->chemistryPtr_->solve(dt); this->chemistryPtr_->calculate();
} }
if (turbulentReaction_) if (turbulentReaction_)
...@@ -219,7 +226,8 @@ bool Foam::combustionModels::PaSR<Type>::read() ...@@ -219,7 +226,8 @@ bool Foam::combustionModels::PaSR<Type>::read()
{ {
this->coeffs().lookup("Cmix") >> Cmix_; this->coeffs().lookup("Cmix") >> Cmix_;
this->coeffs().lookup("turbulentReaction") >> turbulentReaction_; this->coeffs().lookup("turbulentReaction") >> turbulentReaction_;
this->coeffs().lookup("useReactionRate") >> useReactionRate_; this->coeffs().lookup("integrateReactionRate")
>> integrateReactionRate_;
return true; return true;
} }
else else
......
...@@ -65,8 +65,9 @@ class PaSR ...@@ -65,8 +65,9 @@ class PaSR
//- Mixing parameter //- Mixing parameter
volScalarField kappa_; volScalarField kappa_;
//- Use reaction rate //- Integrate reaction rate over the time-step
bool useReactionRate_; // using the selected ODE solver
bool integrateReactionRate_;
// Private Member Functions // Private Member Functions
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment