A guide to Cantera’s YAML input file format
Virtually every Cantera simulation involves one or more phases of matter. Depending on the calculation being performed, it may be necessary to evaluate thermodynamic properties, transport properties, and/or reaction rates for the phase(s) present. Before the properties can be evaluated, each phase must be defined, meaning that the models to use to compute its properties and reaction rates must be specified, along with any parameters the models require.
Because the amount of data required can be quite large, this data is imported from a YAML file that can be read by the application, so that a given phase model can be re-used for other simulations.
This guide describes how to write such files to define phases and interfaces for use in Cantera simulations. Each link below represents a standalone module - while you certainly can read them in order, you can also jump to whichever section addresses your current needs. If you need tips on troubleshooting the YAML file syntax rules, please look at the YAML Format Tutorial.
Phases and their Interfaces
For each phase that appears in a problem, a corresponding entry should be present in the input file(s). We’ll start by describing the entries for phases of various types, and then look at how to define interfaces between phases.
Elements and Species
For each species declared as part of a phase description, both the species and the elements that it is comprised of must be defined. Here, we describe how both are defined.
Cantera supports a number of different types of reactions, including several types of homogeneous reactions, surface reactions, and electrochemical reactions. For each, there is a corresponding entry type. Here, we describe how to declare each type of reaction and provide the necessary parameters to calculate the reaction rate for each.
YAML Format Tutorial
This module describes the basics of the YAML format as used by Cantera, how dimensional values are represented, and how to understand error messages that occur while reading input files.
YAML Format Reference
The documentation of the YAML format, containing the specification for each of the entry types discussed previously, for when you require more detail.