Cantera 2.3.0b1 now available

506 views
Skip to first unread message

Ray Speth

unread,
Dec 1, 2016, 6:40:55 PM12/1/16
to Cantera Users' Group

Dear all,


I am pleased to announce the beginning of the "beta" period for Cantera 2.3.0. There have been many changes and improvements since Cantera 2.2.0 was released in June 2015. A somewhat abbreviated Changelog is included below. If you are an active Cantera user, please give this release a try, and report any issues either here or on Github so that they can be addressed before the full release of Cantera 2.3.0.


Regards,
Ray


Installing Cantera 2.3.0b1

Cantera 2.3.0 introduces a new installation option for the Python package, which is the conda package manager for the Anaconda / Miniconda Python distributions. If you already have an existing conda environment, you can install a recent development snapshot of Cantera by running

conda install -c cantera/label/dev cantera

For more details on installing conda and using Cantera with conda, see http://cantera.github.io/dev-docs/sphinx/html/install.html#conda.


The source code and Windows binaries can be downloaded from Github: https://github.com/Cantera/cantera/releases. To use the Matlab toolbox on Windows, install both Cantera-2.3.0b1-x64.msi and one of the Python modules. The Python installers are standalone and do not require the base Cantera package. Installers are available Python 2.7, Python 3.4, and Python 3.5. Additional installation instructions for Windows can be found at: http://cantera.github.io/dev-docs/sphinx/html/install.html#windows.


Pending resolution of Homebrew/homebrew-science#4663, OS X users will be able to install the beta version using Homebrew by specifying the --HEAD option as part of the brew install ... command. See http://cantera.github.io/dev-docs/sphinx/html/install.html#homebrew for additonal instructions.


And of course, you can also just check out the source code directly using Git from https://github.com/Cantera/cantera. Compilation instructions for all platforms are located at: http://cantera.github.io/dev-docs/sphinx/html/compiling.html.


Documentation

Documentation for Cantera 2.3 can be found at: http://cantera.github.io/dev-docs/sphinx/html/index.html.


Issues & Feedback

Please report any issues on the Github issue tracker at https://github.com/Cantera/cantera/issues. When making a bug report, please specify the exact version of Cantera you are using (i.e. list the last git commit hash if you are using a git checkout) in addition to providing information about the operating system, compiler versions, Python version, etc. that you are using.


There are number of rarely used or redundant features which have been slated for deprecation. Using these methods in Cantera 2.3 will show a deprecation warning, and these methods will be removed before the following release of Cantera. You can examine the list of deprecated functions at: http://cantera.github.io/dev-docs/doxygen/html/deprecated.html. If you believe any of these deprecations are unwarranted, please create an issue on Github.


In addition, there are a number of classes that have been identified as being potentially unused. They are not used internally within Cantera, have no test coverage, and have no examples available. These classes are identified in Issue #267. If you utilize any of these classes, please consider providing tests or examples which can be integrated into Cantera. If these classes remain in their current state, they are likely to be deprecated and removed in a future release.


Cantera 2.3 Changelog

Thermo / Species / Elements

Kinetics

  • Allow adding additional species after reactions for homogeneous kinetics (1ba5f6b)
  • Add option for Motz & Wise correction to sticking reactions (1e5eb8c593ab8afd9d60fe851e5e)
  • Prevent positive feedback in negative species concentrations (60b98b3)
  • Fix handling of integral, explicit reaction orders (4efad93)
  • Added methods to InterfaceKinetics to get effective rate parameters (40e0904#297)
  • Always initialize FalloffReaction.falloff (60efb22#326)

Transport

  • Fix segfault when species transport data is missing (bab0786#312)

Reactor networks

1D flames

Input file handling (ck2cti, cti, ctml_writer)

  • Support conversion of surface mechanism files (#76db90a7cde9bb5bcff277daa42aa5)
  • Fix get_modified_time to avoid race condition on Windows (05198dd)
  • Print the current thermo entry when an error is encountered (b25167ebd53bbd)
  • Provide better error message for reactions with missing data (fe747f3)
  • Add 'nonreactant_orders' option to allow non-reactant orders (7e71645#317#321a68cdec828fba5)
  • Allow elements/isotopes with custom atomic weights (7d18120#344#314)
  • Add support for Chemkin-style extended elemental composition (9e5362a)
  • Handle reactions containing 'hv' pseudospecies (5926d2d)
  • Don't include reactions with explicit reverse rate equal to zero (a9814a105ad05c#380#398)
  • Fix conversion of Chemkin files where NASA polynomial is only given for a single temperature range (2f7e050233399f)

Python package

Matlab toolbox

  • Fix 'nAtoms' to work with species with negative atoms (0e4b0cb)
  • Fix default threshold value when displaying phase info (69f25b4)
  • Always allocate string buffers of an appropriate size (940b7ea#118)
  • Fix setState_sat*.m functions (5aabfe9#299#300)
  • Extend NoNorm option for setCoverages to the Matlab toolbox (14864e8#305)
  • Add missing PureFluid constructors for fluids defined in liquidvapor.xml (ee9d575)

Examples / Samples

  • Generate CMakeLists.txt files for C++ and F90 samples (f959fa6)
  • Fix compilation errors and warnings in the C++ examples (571eaed)
  • Fix Python multiprocessing example (7ca93276514f7a)

Test suite

Build system improvements

  • Use Git submodules for Sundials, Eigen, Google Test, and libfmt if system versions are not installed (34e38abb4a1fb24e551f6#3094a411b7)
  • Added Conda build recipe and made binaries available through anaconda.org (#261)
  • Switch Cython and python interfaces to use setuptools, and provide executable scripts for ck2cti & mixmaster (#283#288b979cea5f8bd4019f4468)
  • Add support for Sundials 2.7 (ad7a02d#366)
  • Link statically to libstdc++ on Linux to avoid conflicts (e2d7e17)

Other

h-h....@arcor.de

unread,
Dec 2, 2016, 8:10:11 AM12/2/16
to Cantera Users' Group
Dear Ray,

I have just installed Cantera 2.3.0 for Python 2.7 as a msi-file for win32. I have tested an example (catalytic-combust.py). Sorry, but I get for the line "import cantera as ct" the message: ImportError: DLL load failed. What I have done wrong?

Kind regards,
Hans-Herbert

Ray Speth

unread,
Dec 2, 2016, 10:41:35 AM12/2/16
to Cantera Users' Group

Hans-Herbert,

My guess is that you do not have the corresponding version of the Visual Studio 2015 Runtime installed. There is a link where you can get this in the installation instructions. Please let us know if this resolves your problem.

Regards,
Ray

h-h....@arcor.de

unread,
Dec 2, 2016, 1:47:49 PM12/2/16
to Cantera Users' Group
Dear Ray,

 after installing the C++ enviroment (2015) I get the error message in Python 2.7 and Python 3.4:
Traceback (most recent call last):
  File "C:\Python34\Lib\site-packages\cantera\examples\surface_chemistry\catalytic_combustion.py", line 15, in <module>
    import cantera as ct
  File "C:\Python34\lib\site-packages\cantera\__init__.py", line 4, in <module>
    from ._cantera import *
  File "__init__.pxd", line 155, in init cantera._cantera (interfaces\cython\cantera\_cantera.cpp:107529)
ValueError: numpy.dtype has the wrong size, try recompiling. Expected 52, got 56

Regards,

Hans-Herbert


Am Freitag, 2. Dezember 2016 00:40:55 UTC+1 schrieb Ray Speth:

Ray Speth

unread,
Dec 2, 2016, 2:01:27 PM12/2/16
to Cantera Users' Group
Hans-Herbert,

What version of Numpy do you have installed? The binary installers require at least Numpy 1.10, as described in the installation instructions.

Regards,
Ray

h-h....@arcor.de

unread,
Dec 2, 2016, 3:07:47 PM12/2/16
to Cantera Users' Group
Dear Ray,

 you are right. The version of numpy was 1.9. Now I have installed the version 1.10.2 and I get no error message.
But  I have a problem with the cti-files for all versions of Cantera 2.x.x. At first I must say that I have still installed Cantera 1.7 with Python 2.5. If I use the xml-files there is no troubel. Using the cti-files i get always the message:

Traceback (most recent call last):
  File "C:\Python34\Lib\site-packages\cantera\examples\surface_chemistry\catalytic_combustion.py", line 44, in <module>
    gas = ct.Solution('ptcombust.cti', 'gas')
  File "interfaces\cython\cantera\base.pyx", line 29, in cantera._cantera._SolutionBase.__cinit__ (interfaces\cython\cantera\_cantera.cpp:7859)
  File "interfaces\cython\cantera\base.pyx", line 50, in cantera._cantera._SolutionBase._init_cti_xml (interfaces\cython\cantera\_cantera.cpp:8259)
cantera._cantera.CanteraError:
***********************************************************************
CanteraError thrown by ct2ctml_string:
Error converting input file "C:\Python34\lib\site-packages\cantera\data/ptcombust.cti" to CTML.
Python command was: 'C:\Python25\python.exe'
The exit code was: 1
-------------- start of converter log --------------
File "<string>", line 6
    print('sys.path: ' + repr(sys.path) + '\n', file=sys.stderr)
                                                    ^
SyntaxError: invalid syntax
--------------- end of converter log ---------------
.
It seems to me that the program doesn't find the right path.


Regards,
Hans-Herbert

Am Freitag, 2. Dezember 2016 00:40:55 UTC+1 schrieb Ray Speth:

Bryan W. Weber

unread,
Dec 2, 2016, 5:03:22 PM12/2/16
to Cantera Users' Group
Hans-Hebert,

Please see Step 7 of the instructions here: http://cantera.github.io/docs/sphinx/html/install.html?highlight=python_cmd#windows Try to set your PYTHON_CMD environment variable to point to the correct version of Python, or make sure that the new version comes first on your PATH (or uninstall the old version).

Regards,
Bryan

Ray Speth

unread,
Dec 2, 2016, 6:15:41 PM12/2/16
to Cantera Users' Group

Dear all,

The Homebrew formula Cantera has now been updated. Before installing Cantera 2.3.0b1 using Homebrew, you should make sure to first install Boost by running

brew install boost

You should also make sure that you have at some point installed the XCode command line tools by running

xcode-select --install

If these steps are not completed, you will receive an error message saying that Cantera can’t find the Boost header files. Once these steps are done, you can install Cantera 2.3.0b1 by running

brew install --HEAD cantera

If you encounter any issues using this formula, please let us know.

Regards,
Ray

h-h....@arcor.de

unread,
Dec 3, 2016, 5:53:58 AM12/3/16
to Cantera Users' Group
Dear Bryan,

thank you very much for your answer. I have edit the enviromental variable (PYTHON_CMD with c:\python27\python.exe) and now I can execute the programs with cti-files.


Regards,
Hans-Herbert

Am Freitag, 2. Dezember 2016 00:40:55 UTC+1 schrieb Ray Speth:

h-h....@arcor.de

unread,
Dec 3, 2016, 7:16:16 AM12/3/16
to Cantera Users' Group
Dear all,

I have installed Cantera 2.3.0 with matplotlib-1.5.0 in Python 3.4. If I load matplot with the program catalytic_combustion.py I get this error message:


Traceback (most recent call last):
  File "C:\Python34\Lib\site-packages\cantera\examples\surface_chemistry\catalytic_combustion.py", line 16, in <module>
    import matplotlib.pyplot as plt
  File "C:\Python34\lib\site-packages\matplotlib\__init__.py", line 124, in <module>
    from matplotlib.rcsetup import (defaultParams,
  File "C:\Python34\lib\site-packages\matplotlib\rcsetup.py", line 25, in <module>
    from matplotlib.fontconfig_pattern import parse_fontconfig_pattern
  File "C:\Python34\lib\site-packages\matplotlib\fontconfig_pattern.py", line 25, in <module>
    from pyparsing import Literal, ZeroOrMore, \
ImportError: No module named 'pyparsing'

Kind regards,

Hans-Herbert

Am Freitag, 2. Dezember 2016 00:40:55 UTC+1 schrieb Ray Speth:

Ray Speth

unread,
Dec 3, 2016, 11:31:23 AM12/3/16
to Cantera Users' Group
Hans-Herbert,

Matplotlib has its own dependencies (including pyparsing) which you also need to install. This would be handled automatically if you installed it using pip, but otherwise you will need to manually install them.

Regards,
Ray

Ilya Zykov

unread,
Jan 6, 2017, 11:38:21 AM1/6/17
to Cantera Users' Group
Dear Ray,

after installation Cantera 2.3.0b1 for Python 2.7 I can't pass a test:
import cantera
gas = cantera.Solution('gri30.cti')

Python interpreter just stops (terminates) without any error message.
At the same time the code:
h2o = cantera.PureFluid('liquidvapor.cti', 'water')
works well.


I am using Conda with the most recent updates.
The versions I have:
numpy                1.11.3
python                2.7.13
vs2015_runtime   14.0.25123
Windows 2003R2 SP2

Any advice is welcome very much.

Thank you for your work,
ILYA Zykov

Bryan W. Weber

unread,
Jan 6, 2017, 12:27:07 PM1/6/17
to Cantera Users' Group
Dear Ilya,

That version of Windows was End of life on July 14, 2015: https://www.microsoft.com/en-us/cloud-platform/windows-server-2003

Since none of us can get a version of it to try to reproduce, and there's no error message (did you check the system logs?), I'm not sure how much support we can offer, but let's try!

Maybe one thing to try is to use gri30.xml, instead of gri30.cti. That will test if the problem is ctml_writer...

In addition, can you please run

python -m unittest -v cantera.test

Best,
Bryan

Ilya Zykov

unread,
Jan 7, 2017, 2:37:16 AM1/7/17
to Cantera Users' Group
Thank you Bryan,

"python -m unittest -v cantera.test" gives this:

Microsoft Windows [Version 5.2.3790]
(C) Copyright 1985-2003 Microsoft Corp.

C:\Documents and Settings\Administrator>python -m unittest -v cantera.test
test_consistency_temperature (cantera.test.test_purefluid.CarbonDioxide) ... ok
test_consistency_volume (cantera.test.test_purefluid.CarbonDioxide) ... ok
test_entropy (cantera.test.test_purefluid.CarbonDioxide) ... ok
test_internal_energy (cantera.test.test_purefluid.CarbonDioxide) ... ok
test_pressure (cantera.test.test_purefluid.CarbonDioxide) ... ok
test_saturation (cantera.test.test_purefluid.CarbonDioxide) ... ok
test_equil_complete_lean (cantera.test.test_equilibrium.ChemEquilTest) ...
C:\Documents and Settings\Administrator>

The last one breaks Python.

In Windows log there was a record:
Faulting application python.exe, version 0.0.0.0, faulting module _cantera.pyd, version 0.0.0.0, fault address 0x0015f595.

The xml version of gri30 fails the same way as cti.


If I use nasa_gas.cti I have the following:

C:\Documents and Settings\Administrator>python
Python 2.7.13 |Anaconda custom (32-bit)| (default, Dec 19 2016, 13:36:02) [MSC v.1500 32 bit (Intel)] on win32
>>> import cantera
>>> gas = cantera.Solution('nasa_gas.cti')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "interfaces\cython\cantera\base.pyx", line 29, in cantera._cantera._SolutionBase.__cinit__ (interfaces\cython\cantera\_cantera.cpp:7873)
  File "interfaces\cython\cantera\base.pyx", line 61, in cantera._cantera._SolutionBase._init_cti_xml (interfaces\cython\cantera\_cantera.cpp:8387)
ValueError: Couldn't read phase node from XML file
>>>



With hope on success,
ILYA

Ray Speth

unread,
Jan 7, 2017, 3:22:06 PM1/7/17
to Cantera Users' Group
Ilya,

Providing support for Windows XP / Server 2003 would require some modifications to Cantera which are unfortunately impossible for any of the developers to test because these operating systems are so old. I would regard Windows Vista / Server 2008 as the minimum requirements for Cantera 2.3.

Regards,
Ray
Reply all
Reply to author
Forward
0 new messages