CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Running, Solving & CFD (
-   -   ChemistryModeltc (

markusrehm October 29, 2008 05:03

Hi, I noticed that in OF 1.

I noticed that in OF 1.5 the implementation of chemistryModel::tc() changed:

OF 1.4 says

forAll(rho_, celli)
forAll(RR_, i)
if(RR_[i][celli] < -SMALL)
t[celli] =

and OF 1.5:

for(label celli=0; celli<nCells; celli++)
scalar rhoi = rho_[celli];
scalar Ti = thermo_.T()[celli];
scalar pi = thermo_.p()[celli];
scalarField c(Ns_);
scalar cSum = 0.0;

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

forAll(reactions_, i)
const reaction& R = reactions_[i];

R, c, Ti, pi, pf, cf, lRef, pr, cr, rRef

forAll(R.rhs(), s)
scalar sr = R.rhs()[s].stoichCoeff;
t[celli] += sr*pf*cf;
t[celli] = Nr*cSum/t[celli];

Could anyone explain why this change has been made and how the new implementation works?

Thanks in advance. Markus

niklas October 30, 2008 07:01

This was some time ago so its
This was some time ago so its not entirely clear to me...

The first definition is simply an estimation of the shortest time for a species to be driven to zero.

The second is a bit more coupled to the PaSR combustion model in diesel(Engine)Foam.

If you write the reaction rates in terms of a positive, P, and negative, N, term and linearize the negative term around the concentration c.

omega = P - N = P - c/tau_c

you get the definition of tau_c.
This yields a chemical timescale for each species and
If I remember correctly the calculated tau_c is an averaged value over all species and reactions.

All times are GMT -4. The time now is 03:14.