Problem Regarding the use of Extracting a sub-mechanism code

55 views
Skip to first unread message

Anand shankar

unread,
Apr 22, 2025, 6:14:33 AMApr 22
to Cantera Users' Group

Hi Cantera team,

I’m working on extracting submechanisms from a detailed mechanism (.yaml),  following the example available on the Cantera website. However, I’ve noticed that the extracted sub-mechanism shows modified kinetic parameters such as 

1. The pre-exponential factor (A) is often reduced by 3+ orders of magnitude

2. The activation energy (Ea) is changed

Please let me know how to fix such problems.
I am attaching the original and extracted reaction models, along with the Python code for your reference.

Thanking You
Anand
thomas_mech-submech.yaml
thomas_mech.yaml
extract_submechanism.py

Ray Speth

unread,
May 28, 2025, 9:35:46 AMMay 28
to Cantera Users' Group

Hi Anand,

There is no problem with the output file. The original input file specifies that it uses the following unit system:

units: {length: cm, time: s, quantity: mol, activation-energy: cal/mol}

By default, the output submechanism uses Cantera’s intrinsic unit system of m, s, kmol (with activation energy in J/kmol). To override this default, you can specify a units argument to the write_yaml method:

gas2.write_yaml("thomas_mech-submech.yaml", header=True, units={'length': 'cm', 'time': 's', 'quantity': 'mol', 'activation-energy': 'cal/mol'})

Regards,
Ray

Anand shankar

unread,
Oct 3, 2025, 5:10:14 AM (20 hours ago) Oct 3
to Cantera Users' Group
Dear Ray,
Thanks a lot for the suggestion.
Now it is working fine.


Thanking You
Anand

Reply all
Reply to author
Forward
0 new messages