Error when using ck2cti: cant convert string to float

113 views
Skip to first unread message

Yoko Yoko

unread,
Sep 14, 2023, 9:16:47 AM9/14/23
to Cantera Users' Group
Dear all,
I am using cantera, now I want to convert "Konnov (v0.6) detailed mechanism" to cti format, but get error like: ValueError: could not convert string to float: '5E-10-1.42'.
Does anyone know the solution?

Thank you very much.
Yoko
chem_20190905.inp
trans_20190104.txt
therm_20191012.dat

Archanaa Raghavan

unread,
Sep 15, 2023, 9:20:40 AM9/15/23
to Cantera Users' Group
Hi, I'm also trying to convert the Konnov 0.6 mechanism file to cti format and getting the same error. Kindly someone help

Thanks and regards
Archanaa

吳昀叡

unread,
Sep 15, 2023, 9:50:05 AM9/15/23
to canter...@googlegroups.com
Hello, 
I guess that the ‘string’ should be separated  to two values in Arrhenius form, 5e-10 for A and -1.42 for b. You can try to separate it first.

Archanaa Raghavan <archanaa...@gmail.com>於 2023年9月15日 週五,下午9:20寫道:
--
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/70001424-547a-414d-bac8-beb59f6f2ed6n%40googlegroups.com.

Ingmar Schoegl

unread,
Sep 15, 2023, 12:39:49 PM9/15/23
to Cantera Users' Group
While the proposed solution makes sense ('5E-10-1.42' is evidently not a valid number), I wanted to add that support for `ck2cti` has been discontinued (it is actually removed in Cantera 3.0). At this point, ck2yaml is the only supported mechanism converter.

Regarding the mechanism itself, the files have multiple issues that go back to the authors (or whatever happened before files were posted on this forum). The input file has two END statements (one should be removed), and the thermo file is corrupted on line 438 (something labeled 'old' that presumably should be either fixed or commented out, but it s not clear). Even after fixing that, there are some problematic rate definitions (unreasonably high pre-exponential factors, where Cantera checks are more rigorous than elsewhere; see https://github.com/Cantera/cantera/issues/1405)

Best,
-is-

Archanaa Raghavan

unread,
Sep 19, 2023, 7:53:45 AM9/19/23
to Cantera Users' Group
Hello yoko
I managed to edit the therm file and circumvent the error. I'm attaching the konnov(v0.6) cti file for your use

Regards
Archanaa

On Thursday, September 14, 2023 at 6:46:47 PM UTC+5:30 Yoko Yoko wrote:
Konnov(0.6).cti
Reply all
Reply to author
Forward
0 new messages