CFD Online Logo CFD Online URL
Home > Forums > Software User Forums > OpenFOAM

how the EulerImplicit chemistry solver solves the concentration?

Register Blogs Members List Search Today's Posts Mark Forums Read

LinkBack Thread Tools Search this Thread Display Modes
Old   October 4, 2019, 03:06
Question how the EulerImplicit chemistry solver solves the concentration?
Join Date: May 2013
Posts: 31
Rep Power: 9
carye is on a distinguished road
Hi, all here!

These days I used the EulerImplicit chemistry solver to solve the reactions in the flow filed.
But I found that the concentration solved by the solver behaved strange in my case,
so I traced into the EulerImplicit chemistry solver source to learn how it solves the concentration.

in the EulerImplicit.C file, there are lines to construct the matrix:
    for (label i=0; i<nSpecie; i++)
        RR(i, i) += 1/deltaT;                    (1)
        RR.source()[i] = c[i]/deltaT;
the RR is the coefficient matrix contains the reaction rates that constructed in the function updateRRInReactionI:
const Reaction<typename ChemistryModel::thermoType>& R =

    forAll(R.lhs(), s)
        const label si = R.lhs()[s].index;
        const scalar sl = R.lhs()[s].stoichCoeff;
        RR[si][rRef] -= sl*pr*corr;
        RR[si][lRef] += sl*pf*corr;

    forAll(R.rhs(), s)
        const label si = R.rhs()[s].index;
        const scalar sr = R.rhs()[s].stoichCoeff;
        RR[si][lRef] -= sr*pf*corr;
        RR[si][rRef] += sr*pr*corr;
let's consider the concentration of a species, c,
the new concentration after the time step will be c',
then the equation for the code above can be written as:
( RR + 1/dt ) * c'= c/dt

here the ( RR + 1/dt ) comes from the code (1), and RR is the reaction rate which have the unit of kmoles/m^3/s

rearrange the equation, I got
RR * c' = ( c - c' ) / dt = dc/dt

so, here is my question,
why on the left the " RR * c' " appear?
shouldn't it be RR = ( c - c' ) / dt = dc/dt the right equation?
the " RR * c' " has the unit of kmoles/m^3/s * kmoles/m^3, which is different of dc/dt that has the unit of kmoles/m^3/s...

does anyone has the reference of the EulerImplicit chemistry solver that used in the OF?
please help me.
Thank you!
carye is offline   Reply With Quote


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
different results between serial solver and parallel solver wlt_1985 FLUENT 11 October 12, 2018 08:23
[Other] OpenFOAM Installation for navalFoam sachinlb OpenFOAM Community Contributions 22 July 28, 2017 05:26
Can't get data from OpenFoam to external solver using externalCoupled perry OpenFOAM Running, Solving & CFD 4 May 26, 2014 08:09
CFX 5.5 Roued CFX 1 October 2, 2001 16:49
Setting a B.C using UserFortran in 4.3 tokai CFX 10 July 17, 2001 16:25

All times are GMT -4. The time now is 09:55.