|
[Sponsors] |
how the EulerImplicit chemistry solver solves the concentration? |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
October 4, 2019, 04:06 |
how the EulerImplicit chemistry solver solves the concentration?
|
#1 |
Member
Join Date: May 2013
Posts: 34
Rep Power: 13 |
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: Code:
for (label i=0; i<nSpecie; i++) { RR(i, i) += 1/deltaT; (1) RR.source()[i] = c[i]/deltaT; } Code:
const Reaction<typename ChemistryModel::thermoType>& R = this->reactions_[index]; 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; } 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! |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
different results between serial solver and parallel solver | wlt_1985 | FLUENT | 11 | October 12, 2018 09:23 |
[Other] OpenFOAM Installation for navalFoam | sachinlb | OpenFOAM Community Contributions | 22 | July 28, 2017 06:26 |
Can't get data from OpenFoam to external solver using externalCoupled | perry | OpenFOAM Running, Solving & CFD | 4 | May 26, 2014 09:09 |
CFX 5.5 | Roued | CFX | 1 | October 2, 2001 17:49 |
Setting a B.C using UserFortran in 4.3 | tokai | CFX | 10 | July 17, 2001 17:25 |