How to obtain the species production rate for each reaction?

90 views
Skip to first unread message

nxkr...@gmail.com

unread,
Sep 5, 2021, 2:11:58 PM9/5/21
to Cantera Users' Group
Hi Cantera Community,

I am trying to obtain the rate of production (ROP) of each species for all reactions (instead of the total ROP) with Cantera. I am using the Python version 2.5.1.

I searched through the official documentation and I was able to generate the net rate of production, but could not find any information on obtaining the species ROP for individual reactions. Is this something that can be done or if this has been already covered, directions to the same would be grateful. A MWE is attached.

Thank you.

Regards,
George
cantera_rop_q.py

Ingmar Schoegl

unread,
Sep 5, 2021, 3:04:49 PM9/5/21
to Cantera Users' Group
Hi George,
While (I believe) there isn't a direct way, you can use gas.set_multipliers to probe individual reactions. E.g.

gas.set_multipiers(0)
gas.set_multipliers(1., rxn_idx) # index of reaction

and run this over all reactions. Hope this helps,
-ingmar-

Bryan Weber

unread,
Sep 5, 2021, 3:52:47 PM9/5/21
to Cantera Users' Group
Hi George,

Cantera has a "net_rates_of_progress" attribute, which, when multiplied by the stoichiometric difference between reactants and products, will give you the net ROP per reaction.

Best,
Bryan

nxkr...@gmail.com

unread,
Sep 8, 2021, 10:03:40 AM9/8/21
to Cantera Users' Group
Thanks for the explanation, Ingmar and Bryan. If I understood Ingmar's approach, we are basically disabling all the reactions and enabling individual reactions to obtain the species ROP.

Both approaches work;  thank you for the suggestions.

--G
Reply all
Reply to author
Forward
0 new messages