SLACKHA / pyJac

Creates C and CUDA analytical Jacobians for chemical kinetics ODE systems
http://slackha.github.io/pyJac/
MIT License
52 stars 23 forks source link

Issue cantera version #47

Open GontzalLopez opened 7 months ago

GontzalLopez commented 7 months ago

Hi, I would like to parse a cantera mechanism. My current cantera version is 3.0.0, so it seems that pyjac only works with the older version 2.3.0 as the following message appears when executing the first command:

python3 -m pyjac --lang c --input grimech30.dat --thermo thermo30.dat --last_species N2

Parsing of Cantera mechanisms requires at least version 2.3.0 in order to access species thermo properties... Detected version is only 3.0.0

skyreflectedinmirrors commented 7 months ago

Probably this line to blame:

https://github.com/SLACKHA/pyJac/blob/5f54b2d6c04e1ee62d9db8bbf7553ad785f58c33/pyjac/core/mech_interpret.py#L26

Try maybe:

if int(version[0]) < 2 or (int(version[0]) < 2 and int(version[1]) < 3):

It's been many years since I've used Cantera at this point however, so hopefully the 3.0 release still works w/o issue!