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/)
-   -   write forward, reverse reaction coefficient, reaction rate in ChemFoam (http://www.cfd-online.com/Forums/openfoam-solving/108118-write-forward-reverse-reaction-coefficient-reaction-rate-chemfoam.html)

hismother October 15, 2012 09:07

write forward, reverse reaction coefficient, reaction rate in ChemFoam
 
Hi Foamers,

I am using ChemFoam to check whether my chemical mechanism is good. Now I want to print out the forward, reverse reaction coefficient (kf, kr) as well as forward, reverse reaction rate for each reaction from my reaction mechanism for every chemical timestep. After that I can plot the kf, kr over the time. From the code I know it kf, kr are calculated in ODEChemistryModel.C in each iteration during calculating omega but I can't manage to print them out and save in a output file. If anyone has any idea about it, would be great to enlight me.

Terrence.

Hanzo November 6, 2012 02:48

Hi Terrence,

I'm also digging in the source code of chemFoam & friends to solve my problem
(http://www.cfd-online.com/Forums/ope...-solution.html)

and I wonder if you have managed to print out the reaction coefficients and rates.

hismother November 6, 2012 04:53

just go to ODEchemistrysolver.C. There you can find the place where kf, kr as well as reaction rates are computed. Just use Info command to print them out and they will be printed out in your log file.

Hanzo November 7, 2012 04:33

Quote:

Originally Posted by hismother (Post 390508)
just go to ODEchemistrysolver.C. There you can find the place where kf, kr as well as reaction rates are computed. Just use Info command to print them out and they will be printed out in your log file.

thanks for the info.

Actually, I tried to avoid editing ODEchemistryModel.C (I guess you were reffering to this file, right?) because I wanted to avoid defining my own lib and include this in chemFoam. Since there is no other option to get these values, I gave up and recompiled it into a mychemistryModel library.
Took some time but now it's fine.


All times are GMT -4. The time now is 07:20.