Chemkin to YAML conversion#

See also

For a tutorial, refer to the Converting Chemkin Format Files page.

Convert Chemkin-format mechanisms to Cantera YAML input files

usage: ck2yaml [-h] [-p] [-q] [-d] [--input INPUT] [--thermo THERMO]
               [--transport TRANSPORT] [--surface SURFACE] [--extra EXTRA]
               [--name NAME] [--single-intermediate-temperature]
               [--no-validate] [--output OUTPUT]

Named Arguments#

-p, --permissive

This option allows certain recoverable parsing errors (for example, duplicate thermo or transport data) to be ignored.

Default: False

-q, --quiet

Suppresses warning messages, such as those about duplicate thermo data.

Default: False

-d, --debug

Enables additional debugging output that may be helpful in identifying problems in the input files or ck2yaml itself.

Default: False

--input

Chemkin-format chemistry input file, containing a list of all the element names that are used, a list of all the species names, and a list of all the reactions to be considered between the species. This file can also optionally contain species THERMO and TRANSPORT data.

Default: “”

--thermo

If the INPUT file does not contain THERMO data, a separate file containing thermodynamic information must be specified. If no INPUT file is provided, THERMO data are converted to a YAML file containing only species definitions (which can be referenced from phase definitions in other input files).

Default: “”

--transport

If the INPUT file does not contain TRANSPORT data, a separate file containing transport information may be specified. Transport data are required for Cantera capabilities that use transport properties such as one-dimensional flame calculations; they are usually not required for zero-dimensional reactor simulations.

Default: “”

--surface

For surface mechanisms, the SURFACE file defines surface species and reactions occurring on the surface. Gas phase species and reactions should be defined in the INPUT file.

Default: “”

--extra

This option specifies a YAML file which can be used to add to the description field or to define custom fields that are included in the YAML output.

Default: “”

--name

This specifies the name of the phase in the resulting YAML file. The default is gas.

Default: “gas”

--single-intermediate-temperature

This option should be used with thermo data where only a single break temperature is used and the last value in the first line of each species thermo entry is the molecular weight instead.

Default: False

--no-validate

Disables the validation step, where the YAML mechanism is imported in Cantera to check for errors such as unlabeled duplicate reactions and discontinuous thermodynamic data.

Default: False

--output

Specifies the OUTPUT file name. By default, the output file name is the input file name with the extension changed to .yaml.

Default: “”

Example:

ck2yaml --input=chem.inp --thermo=therm.dat --transport=tran.dat

If the ck2yaml script is not on your path but the Cantera Python module is, ck2yaml can also be invoked by running:

python -m cantera.ck2yaml --input=chem.inp --thermo=therm.dat --transport=tran.dat

In both cases, the equal signs in the options are optional.