YAML fixing

22 views
Skip to first unread message

Reginaldo Gonçalves Leão Junior

unread,
Sep 4, 2025, 11:24:18 AM (3 days ago) Sep 4
to Cantera Users' Group
Hi everyone, I’m getting the following error when I try to use the attached YAML file. Could someone help me out? 

Thanks in advance.


CanteraError                              Traceback (most recent call last)
Cell In[14], line 11
      8 ar.X = ar_calculado
      9 ar.TP = 300, p
---> 11 carvao = ct.Solution('Hashemi_fixed.yaml')
     12 carvao_combustivel = "coal:0.111515" # Fase sólida
     13 carvao.X = carvao_combustivel

File build\\python\\cantera\\solutionbase.pyx:37, in cantera.solutionbase._SolutionBase.__cinit__()

File build\\python\\cantera\\solutionbase.pyx:75, in cantera.solutionbase._SolutionBase._cinit()

File build\\python\\cantera\\solutionbase.pyx:160, in cantera.solutionbase._SolutionBase._init_yaml()

CanteraError:
*******************************************************************************
CanteraError thrown by addReactions:

*******************************************************************************
InputFileError thrown by Reaction::setRate:
Error on line 1441 of ./Hashemi_fixed.yaml:
Third-body collider does not use '(+M)' notation.
|  Line |
|  1436 |   duplicate: true
|  1437 |   rate-constant: {A: 1.44e+05, b: 0.0, Ea: 1.76e+04}
|  1438 | - equation: CHARINLET => CHAR  # Reaction 8
|  1439 |   duplicate: true
|  1440 |   rate-constant: {A: 1.17e+13, b: 0.0, Ea: 6.0e+04}
>  1441 > - equation: SOOT (+M) => 0.9879518072289156 SOOT + S* (+M)  # Reaction 9
            ^
|  1442 |   type: falloff
|  1443 |   low-P-rate-constant: {A: 1.636e+14, b: 1.0, Ea: 3.105e+04}
|  1444 |   high-P-rate-constant: {A: 9.32e+07, b: 0.0, Ea: 3.511e+04}
*******************************************************************************
*******************************************************************************
Hashemi.yaml

Ray Speth

unread,
Sep 6, 2025, 5:28:27 PM (15 hours ago) Sep 6
to Cantera Users' Group

Hi,

Thanks for reporting this problem. It seems there is an issue with the parsing of falloff reactions where one of the reactants also appears as a product, which is interacting incorrectly with the logic for detecting third-body reactions. I’ve opened a pull request here which should hopefully fix the problem. Since you seem to be building from source based on the traceback shown, you should be able to use that update from the main branch as soon as this PR is merged.

Regards,
Ray

Reply all
Reply to author
Forward
0 new messages