Compliling Catera options

54 views
Skip to first unread message

gyyu...@gmail.com

unread,
Jun 9, 2021, 5:10:34 AM6/9/21
to Cantera Users' Group
Hi everyone,

I'm trying to use Cantera only for thermodynamic properties, chemical kinetics, and transport properties calculation in my combustion code. I'm working on a virtual machine which doesn't have too much storage space, so I can't afford install the full package of Cantera. Could anyone help me with the Cantera compiling options  so that I don't have to install those unnecessary modules? My code is written in C++ so I don't need Fortran and Matlab interface (I do have to work with cti files, it seems Python module is required). My code has its own combustion reactor and PDE solvers, so I guess sundials libs can be omitted?  What are the options that I can install only the basic modules of Cantera? Or is there any other way to utilize those features of Cantera?

Any help will be greatly appreciated!
Gary

Ray Speth

unread,
Jun 9, 2021, 12:06:58 PM6/9/21
to Cantera Users' Group

Hi Gary,

The most effective thing you can do to reduce the installed size is to disable the debug symbols that are normally kept in the compiled Cantera code by setting the SCons option debug=n. You can disable the Fortran and Matlab interfaces with the f90_interface=n and matlab_toolbox=n options, respectively. To work with CTI files, you only need the “minimal” Python module, which just includes the scripts for converting mechanisms. You can specify this with the option python_package=minimal. Or if you can convert your mechanisms to YAML on another computer, you can skip the Python module entirely by setting python_package=n.

There is no option to omit the reactor / flame solvers, but I don’t think that would actually reduce the size very much. At least on my system, the first change, disabling the debug symbols, decreases the size of the static library (libcantera.a) by an order of magnitude, from 167 MB to 16 MB.

Regards,
Ray

gyyu...@gmail.com

unread,
Jun 9, 2021, 11:21:09 PM6/9/21
to Cantera Users' Group
Hi Ray,

Thank you so much for your advise. I will try to compile with these options.

Bests,
Gary

Reply all
Reply to author
Forward
0 new messages