Borrar filtros
Borrar filtros

How can I run Cantera functions on .cti files in MATLAB?

38 visualizaciones (últimos 30 días)
David
David el 27 de Ag. de 2021
Respondida: David el 27 de Ag. de 2021
I am mostly asking this question so I can answer it for the next person who has this problem, though I still don't really understand what is going on. After installing Cantera, Python, and Cantera's MATLAB toolbox, the Cantera test functions that involve .yaml files seem to work, but as soon as I try to run any function on a .cti file MATLAB hangs for a very long time (and force quit doesn't seem to work). The functions that have this problem include Solution(), ThermoPhase(), and ctmethods().

Respuesta aceptada

David
David el 27 de Ag. de 2021
Cantera 2.5 and Python 3.7 seem like they are supposed to be compatible with .cti files, but starting in Cantera 2.5 .cti files are obsolete. The best solution I found is to convert .cti files to .yaml files, the new recommended chemistry file format. At least on my system, all of these functions perform well on .yaml files. You can test this with the files that come with the Cantera installation (Program Files/Cantera/data for the standard installation).
To complicate things further, Cantera's MATLAB toolbox does not include the cti2yaml function (or apparently the ck2yaml function). My solution was to find the Python function cti2yaml.py (installed with Cantera) and use Python to create the desired .yaml file. Now all those MATLAB functions run quickly on the .yaml file with no hangs. For converting Chemkin files, the MATLAB toolbox has ck2cti.m, then the process above can convert cti to yaml.
This is mostly a Cantera problem, but it seems unique to running Cantera in MATLAB.

Más respuestas (0)

Categorías

Más información sobre Introduction to Installation and Licensing en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2019b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by