DUPLICATE REACTIONS

730 views
Skip to first unread message

tullio viola

unread,
Jun 14, 2022, 4:28:23 PM6/14/22
to Cantera Users' Group

Dear all,

how it is possible to admitt DUPLICATE reactions compiling the .CTI?

Thank you

Best regards

Tullio

Bryan Weber

unread,
Jun 14, 2022, 11:21:01 PM6/14/22
to Cantera Users' Group
Hi Tullio,

Each reaction line can take an "options" keyword argument that is a list of strings of options for the reaction.

reaction(...., options=["duplicate"])

Please note that CTI format is deprecated since version 2.5 and will be removed in version 3.0. We strongly suggest you update to the YAML input format. The equivalent syntax in YAML is described here: https://cantera.org/tutorials/yaml/reactions.html#duplicate-reactions

tullio viola

unread,
Jun 15, 2022, 1:22:56 AM6/15/22
to canter...@googlegroups.com
thank you, in case how can I convert the chemkin format to yaml? 

Of course I m not able to compile into .cti because I'm stopped for the duplicate.

Thank you for your help

--
You received this message because you are subscribed to the Google Groups "Cantera Users' Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cantera-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cantera-users/79c509a7-e017-4a62-adcf-b9ad09629b69n%40googlegroups.com.

tullio viola

unread,
Jun 15, 2022, 1:27:22 AM6/15/22
to canter...@googlegroups.com
Sorry, I found how to convert i  yaml...but...the real question is at this point. how can I be able to make Cantera ready to read duplicates in yaml from the ck file using the conversion script?

Bryan Weber

unread,
Jun 15, 2022, 9:33:31 AM6/15/22
to Cantera Users' Group
Hi Tullio,

The standard CHEMKIN syntax for duplicate reactions is to have the word DUPLICATE on the line below the reaction.

H2 + O2 <=> HO2 + H  A b Ea
DUPLICATE
H2 + O2 <=> HO2 + H A b Ea
DUPLICATE

If that's not working for you, please attach the problematic file and the exact text of the error message you're receiving.

Best,
Bryan

tullio viola

unread,
Jun 15, 2022, 12:34:45 PM6/15/22
to Cantera Users' Group
Thank you for your time and interesting,
these are example of some  reactions  that gives to me the problem:


CYC6H8+H=>RC6H9A                                        1.0000e+00    0.000         0.00
 
 TCHEB/ 500.0 1500.0 /
 CHEB/ 7 4 12.0510 -0.425790 -0.378110 0.00597910  /
 CHEB/ 0.666480 1.56960 0.00186620 -0.0442680 -0.348180 0.167390  /
 CHEB/ 0.0568230 0.0187310 -0.0952350 -0.0710670 -0.00474430 0.00478030  /
 CHEB/ 0.00102720 -0.0315830 -0.00638720 -0.00462110 0.00752500 0.00208010  /
 CHEB/ 0.000744130 -0.00193890 0.00166910 0.00561840 0.00166530 4.89210e-05  /




C3H5-A+C3H6=>CYC6H10+H                                  1.0000e+00    0.000         0.00
 
 CHEB/ 7 4 -2.90540 -5.38420 -1.01760 0.00256180  /
 CHEB/ 9.05050 5.20830 0.453930 -0.192090 -1.14930 0.307970  /
 CHEB/ 0.406790 0.0546750 -0.713500 -0.459990 -0.0273550 0.0375880  /
 CHEB/ -0.112420 -0.152540 -0.0955790 -0.0246790 0.0763520 0.0372190  /
 CHEB/ -0.0283550 -0.0195870 0.0850520 0.0598490 0.0196010 0.00116590  /

Bryan Weber

unread,
Jun 16, 2022, 12:35:14 PM6/16/22
to Cantera Users' Group
Hi Tullio,

Those equations don't appear to be duplicates. Is Cantera reporting them as such? As I suggested earlier, please include the input file you're trying to convert and the full error text output. Otherwise, I can only guess...

Best,
Bryan

tullio viola

unread,
Jun 16, 2022, 1:56:20 PM6/16/22
to canter...@googlegroups.com
Ok I will try to give you more

tullio viola

unread,
Jun 16, 2022, 4:09:29 PM6/16/22
to canter...@googlegroups.com
Are consecutive reactions in this way

C2H3+C4H6=>RCYC6H9                                      1.0000e+00    0.000         0.00
 TCHEB/ 500.0 1500.0 /
 CHEB/ 7 4 9.44980 0.660410 -0.506060 -0.0248440  /
 CHEB/ -0.579610 1.29420 0.175740 -0.0439470 -0.403520 -0.00260440  /
 CHEB/ 0.0668640 0.00942610 -0.0480390 -0.0900850 -0.00870290 0.00533140  /
 CHEB/ 0.0317420 -0.0133530 -0.0110170 7.99710e-05 0.0172140 0.0102440  /
 CHEB/ 0.000147410 -0.000852150 0.00122330 0.00598450 0.00224160 -0.000619160  /

C2H3+C4H6=>RC6H9A                                       1.0000e+00    0.000         0.00
 TCHEB/ 500.0 1500.0 /
 CHEB/ 7 4 11.5820 1.10050 -0.299730 0.0248500  /
 CHEB/ -0.516830 0.859380 -0.0290490 -0.0827690 -0.191070 0.0737240  /
 CHEB/ 0.0867060 -0.00948920 0.000746710 -0.0542500 0.0156580 0.0185500  /
 CHEB/ 0.0122810 -0.0165040 -0.0109340 0.00337910 0.000926820 0.00452570  /
 CHEB/ -0.00395350 -0.00259340 -0.00255360 0.00473370 0.00110510 -0.00103260  /

C2H3+C4H6=>CYC6H8+H                                     1.0000e+00    0.000         0.00
 
 TCHEB/ 500.0 1500.0 /
 CHEB/ 7 4 10.6460 -1.52730 -0.459380 -0.0377530  /
 CHEB/ 0.932940 1.32390 0.244800 -0.0379810 -0.300680 -0.0414180  /
 CHEB/ 0.0694430 0.0174990 -0.117690 -0.0863370 -0.0177800 0.00709380  /
 CHEB/ -0.0125010 -0.00742310 -0.0122840 -0.00108340 0.00544490 0.0101710  /
 CHEB/ 0.000872180 -0.00157800 0.00228160 0.00418780 0.00224620 -0.000319210  /

C2H3+C4H6=>CYC6H8+H                                     1.0000e+00    0.000         0.00
 
 TCHEB/ 500.0 1500.0 /
 CHEB/ 7 4 10.3720 -1.53300 -0.460160 -0.0375310  /
 CHEB/ 0.916310 1.32470 0.243610 -0.0381670 -0.303040 -0.0404540  /
 CHEB/ 0.0696080 0.0173020 -0.118420 -0.0863990 -0.0175670 0.00708410  /
 CHEB/ -0.0127570 -0.00751550 -0.0122780 -0.00103880 0.00540550 0.0101850  /
 CHEB/ 0.000848300 -0.00156310 0.00228510 0.00421160 0.00223560 -0.000316420  /

Bryan Weber

unread,
Jun 17, 2022, 2:44:11 PM6/17/22
to Cantera Users' Group
Hi Tulia,

Yes, the last two of those reactions appear to be duplicate. I don't think I've seen duplicate CHEB reactions, it seems like you could just fit the Chebyshev polynomial without needing duplicate reactions, but I'm not a kineticist. In any case, it would still be super helpful to attach a complete ck input file and paste the exact error message you're getting. Without that, I'm afraid I can't help any further.

Best,
Bryan

Bryan Weber

unread,
Jun 17, 2022, 2:45:51 PM6/17/22
to Cantera Users' Group
I'm sorry, I just realized I very badly misspelled your name. My apologies!

Bryan

tullio viola

unread,
Jun 17, 2022, 6:25:42 PM6/17/22
to canter...@googlegroups.com
ahah don't worry, sometimes this happens to many

Thank you for your help, you can find the mechanism at https://www.sciencedirect.com/science/article/pii/S0010218021006015?via%3Dihub in supplementary material

Bryan Weber

unread,
Jun 18, 2022, 12:42:56 PM6/18/22
to Cantera Users' Group
Hi Tullio,

If I use Cantera 2.6, I have no problems converting the mechanism. The input and output files are attached. However, I do get an error when loading the mechanism that a declared duplicate reaction does not have a duplicate... However, the listed reaction does appear to have a duplicate right below it, so I'm not quite sure what's going on, and I can't dig in to the C++ to try and debug at the moment. I'll come back to this when I have a bit more time, if you don't solve it first.

Bryan

*******************************************************************************
InputFileError thrown by Kinetics::checkDuplicates:
Error on line 34307 of ./mmc3.yaml:
No duplicate found for declared duplicate reaction number 3763 (C2H3 + C7H7 <=> CC6H5C3H4-1 + H)
|  Line |
|  34302 |   rate-constants:
|  34303 |   - {P: 0.0395 atm, A: 1.28e+118, b: -29.17, Ea: 1.5e+05}
|  34304 |   - {P: 1.0 atm, A: 7.38e+47, b: -9.53, Ea: 9.881e+04}
|  34305 |   - {P: 10.0 atm, A: 5.78e+38, b: -6.7, Ea: 9.543e+04}
|  34306 |   - {P: 100.0 atm, A: 1.95e+34, b: -5.31, Ea: 9.376e+04}
>  34307 > - equation: C7H7 + C2H3 <=> CC6H5C3H4-1 + H  # Reaction 3764
            ^
|  34308 |   duplicate: true
|  34309 |   type: pressure-dependent-Arrhenius
|  34310 |   rate-constants:
*******************************************************************************

mmc3.inp
mmc3.yaml
mmc4.dat

tullio viola

unread,
Jun 18, 2022, 6:11:03 PM6/18/22
to canter...@googlegroups.com
thant you very much you are very gentle

Felipe Gomes

unread,
Nov 15, 2022, 12:35:27 AM11/15/22
to Cantera Users' Group
Hi Bryan and Tullio,

I was wondering if you managed to solve this issue. I'm dealing with a similar error (see below). I converted using ck2yaml. The error says that "No duplication found" but the duplicated reaction is just before this one and the 'duplicate' option is set to true. See the mechanism and the CK files attached. 

Kind regards,

Felipe

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "cantera/base.pyx", line 71, in cantera._cantera._SolutionBase.__cinit__
  File "cantera/base.pyx", line 128, in cantera._cantera._SolutionBase._cinit
  File "cantera/base.pyx", line 215, in cantera._cantera._SolutionBase._init_yaml
cantera._cantera.CanteraError:

*******************************************************************************
InputFileError thrown by Kinetics::checkDuplicates:
Error on line 12069 of ./DTU_Mech.yaml:
No duplicate found for declared duplicate reaction number 1046 (CH3CCH + H <=> CH3CHCH)
|  Line |
|  12064 |   - {P: 0.001 atm, A: 1.97e+46, b: -11.91, Ea: 7456.0}
|  12065 |   - {P: 0.039 atm, A: 2.59e+45, b: -11.23, Ea: 8046.0}
|  12066 |   - {P: 1.0 atm, A: 6.93e+39, b: -9.11, Ea: 7458.0}
|  12067 |   - {P: 10.0 atm, A: 6.81e+34, b: -7.29, Ea: 6722.0}
|  12068 |   - {P: 100.0 atm, A: 5.65e+29, b: -5.39, Ea: 6150.0}
>  12069 > - equation: CH3CCH + H <=> CH3CHCH  # Reaction 1047
            ^
|  12070 |   duplicate: true
|  12071 |   type: pressure-dependent-Arrhenius
|  12072 |   rate-constants:
*******************************************************************************
DTU_Trans.DAT
DTU_Therm.dat
DTU_Mech.yaml
DTU_Mech.inp

tullio viola

unread,
Nov 17, 2022, 3:57:44 PM11/17/22
to canter...@googlegroups.com
Dear Felipe,

I m so sorry to be late in answering you. In this weekend I will let you know because I solved the problem but I have to find the right file.

Best regards

Tullio

tullio viola

unread,
Nov 17, 2022, 4:01:22 PM11/17/22
to canter...@googlegroups.com
Maybe I will try tomorrow if I ll be able.

tullio viola

unread,
Nov 20, 2022, 1:33:05 PM11/20/22
to canter...@googlegroups.com
 I compiled the mechanism but I saw this:

Invalid rate coefficient for reaction &apos;CH3CCH + H &lt;=&gt; CH3CHCH&apos; at P = 1.0132e+08, T = 200.0 Invalid rate coefficient for reaction &apos;CH3CCH + H &lt;=&gt; CH3CHCH&apos; at P = 1.0132e+08, T = 500.0 Invalid rate coefficient for reaction &apos;CH3CCH + H &lt;=&gt; CH3CHCH&apos; at P = 1.0132e+08, T = 1000.0 Invalid rate coefficient for reaction &apos;CH3CCH + H &lt;=&gt; CH3CHCH&apos; at P = 1.0132e+08, T = 2000.0 Invalid rate coefficient for reaction &apos;CH3CCH + H &lt;=&gt; CH3CHCH&apos; at P = 1.0132e+08, T = 5000.0 Invalid rate coefficient for reaction &apos;CH3CCH + H &lt;=&gt; CH3CHCH&apos; at P = 1.0132e+08, T = 10000.0
Reply all
Reply to author
Forward
0 new messages