CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   ODEChemistryModel (http://www.cfd-online.com/Forums/openfoam-solving/103206-odechemistrymodel.html)

4ndr34 June 13, 2012 12:59

ODEChemistryModel
 
Hello Foamers,

I need a clarification on how the chemical time step is computed in ODEChemistryModel.C:

scalarField& tc = ttc();

const label nReaction = reactions_.size();

if (this->chemistry_)
{
forAll(rho, celli)
{
scalar rhoi = rho[celli];
scalar Ti = this->thermo().T()[celli];
scalar pi = this->thermo().p()[celli];
scalarField c(nSpecie_);
scalar cSum = 0.0;

for (label i=0; i<nSpecie_; i++)
{
scalar Yi = Y_[i][celli];
c[i] = rhoi*Yi/specieThermo_[i].W();
cSum += c[i];
}

forAll(reactions_, i)
{
const Reaction<ThermoType>& R = reactions_[i];
omega(R, c, Ti, pi, pf, cf, lRef, pr, cr, rRef);

forAll(R.rhs(), s)
{
scalar sr = R.rhs()[s].stoichCoeff;
tc[celli] += sr*pf*cf;
}
}
tc[celli] = nReaction*cSum/tc[celli];
}

ttc().correctBoundaryConditions();

return ttc;



In tc formula, at the numerator there is the sum of the concentrations, while at denominator there is the sum of parents of the reaction rates in the forward direction (pf*cf) multiplied for the stoichiometric coefficients of the products (sr).
Then, it appears that the fastest reaction is dominant for the calculation of the chemical time, because in the sum at denominator the largest reaction rate is dominant, but shouldn't it be the slowest reaction to dominate in the calculation of the chemical time in a multi-reaction mechanism?
Did I misinterpret the code or is there a reason why the fastest reaction is dominant?

Thanks all

Qingang Xiong June 13, 2012 13:24

Quote:

Originally Posted by 4ndr34 (Post 366285)
Hello Foamers,

I need a clarification on how the chemical time step is computed in ODEChemistryModel.C:

scalarField& tc = ttc();

const label nReaction = reactions_.size();

if (this->chemistry_)
{
forAll(rho, celli)
{
scalar rhoi = rho[celli];
scalar Ti = this->thermo().T()[celli];
scalar pi = this->thermo().p()[celli];
scalarField c(nSpecie_);
scalar cSum = 0.0;

for (label i=0; i<nSpecie_; i++)
{
scalar Yi = Y_[i][celli];
c[i] = rhoi*Yi/specieThermo_[i].W();
cSum += c[i];
}

forAll(reactions_, i)
{
const Reaction<ThermoType>& R = reactions_[i];
omega(R, c, Ti, pi, pf, cf, lRef, pr, cr, rRef);

forAll(R.rhs(), s)
{
scalar sr = R.rhs()[s].stoichCoeff;
tc[celli] += sr*pf*cf;
}
}
tc[celli] = nReaction*cSum/tc[celli];
}

ttc().correctBoundaryConditions();

return ttc;



In tc formula, at the numerator there is the sum of the concentrations, while at denominator there is the sum of parents of the reaction rates in the forward direction (pf*cf) multiplied for the stoichiometric coefficients of the products (sr).
Then, it appears that the fastest reaction is dominant for the calculation of the chemical time, because in the sum at denominator the largest reaction rate is dominant, but shouldn't it be the slowest reaction to dominate in the calculation of the chemical time in a multi-reaction mechanism?
Did I misinterpret the code or is there a reason why the fastest reaction is dominant?

Thanks all

Dear 4ndr34,
As my understanding, since denominator is the sum of parents of the reaction rates, so the contribution of faster rate will make this denominator larger then to let tc smaller. Because faster reaction needs smaller time step, so the time step is controlled by the fast reactions. While the completion of multi-reactions is dominated by the slowest one. Hope my understanding is correct.:p

4ndr34 June 13, 2012 15:38

But the reactions are integrated with the chemical time step called deltaTChem in basicChemistryModel, while this tc is used in the chemistry-turbulence interaction with the turbulent mixing time in the pasr model in many of the OF solvers (e.g. reactingFoam), so this tc describes whether the chemistry is faster or not with respect to fluid-dynamics.

Qingang Xiong June 13, 2012 15:46

Quote:

Originally Posted by 4ndr34 (Post 366311)
But the reactions are integrated with the chemical time step called deltaTChem in basicChemistryModel, while this tc is used in the chemistry-turbulence interaction with the turbulent mixing time in the pasr model in many of the OF solvers (e.g. reactingFoam), so this tc describes whether the chemistry is faster or not with respect to fluid-dynamics.

From my observation, reaction time step is always an magnitude of order smaller than that in fluid-dynamics. So reaction time step is most restrict condition.:o

Manuel CFD November 20, 2013 13:01

Dear All,

I have the same question but first of all I'm not able to understand why at the denominator there is the product between the forward reaction rate and the sum of R.H.S stoichiometric coefficients. In my opinion I would expect that there should be the global reaction rate instead of the forward one. Furthermore I don't understand why the reaction rate is multiplied by R.H.S stoichiometric coefficients. What does this product represent??? Which is the assumption justifying this modelisation???

Moreover: this represents the contribution of only one reaction; where does the global mechanism time scale come from? Is it a sort of mean value??

Thanks

Manuel


All times are GMT -4. The time now is 22:26.