#### Previous topic

Thermodynamic Properties

#### Next topic

Transport Properties

Warning

This documentation is for an old version of Cantera. You can find docs for newer versions here.

# Chemical Kinetics¶

class cantera.Kinetics

Bases: cantera._cantera._SolutionBase

Instances of class Kinetics are responsible for evaluating reaction rates of progress, species production rates, and other quantities pertaining to a reaction mechanism.

activation_energies

Activation energies for all reactions [K].

creation_rates

Creation rates for each species. [kmol/m^3/s] for bulk phases or [kmol/m^2/s] for surface phases.

delta_enthalpy

Change in enthalpy for each reaction [J/kmol].

delta_entropy

Change in entropy for each reaction [J/kmol/K].

delta_gibbs

Change in Gibbs free energy for each reaction [J/kmol].

delta_standard_enthalpy

Change in standard-state enthalpy (independent of composition) for each reaction [J/kmol].

delta_standard_entropy

Change in standard-state entropy (independent of composition) for each reaction [J/kmol/K].

delta_standard_gibbs

Change in standard-state Gibbs free energy (independent of composition) for each reaction [J/kmol].

destruction_rates

Destruction rates for each species. [kmol/m^3/s] for bulk phases or [kmol/m^2/s] for surface phases.

equilibrium_constants

Equilibrium constants in concentration units for all reactions.

forward_rate_constants

Forward rate constants for all reactions. Units are a combination of kmol, m^3 and s, that depend on the rate expression for the reaction.

forward_rates_of_progress

Forward rates of progress for the reactions. [kmol/m^3/s] for bulk phases or [kmol/m^2/s] for surface phases.

is_reversible(self, int i_reaction)

True if reaction i_reaction is reversible.

kinetics_species_index(self, int species, int phase)

The index of species species of phase phase within arrays returned by methods of class Kinetics.

multiplier(self, int i_reaction)

A scaling factor applied to the rate coefficient for reaction i_reaction. Can be used to carry out sensitivity analysis or to selectively disable a particular reaction. See set_multiplier.

n_phases

Number of phases in the reaction mechanism.

n_reactions

Number of reactions in the reaction mechanism.

n_total_species

Total number of species in all phases participating in the kinetics mechanism.

net_production_rates

Net production rates for each species. [kmol/m^3/s] for bulk phases or [kmol/m^2/s] for surface phases.

net_rates_of_progress

Net rates of progress for the reactions. [kmol/m^3/s] for bulk phases or [kmol/m^2/s] for surface phases.

product_stoich_coeff(self, int k_spec, int i_reaction)

The stoichiometric coefficient of species k_spec as a product in reaction i_reaction.

product_stoich_coeffs(self)

The array of product stoichiometric coefficients. Element [k,i] of this array is the product stoichiometric coefficient of species k in reaction i.

reactant_stoich_coeff(self, int k_spec, int i_reaction)

The stoichiometric coefficient of species k_spec as a reactant in reaction i_reaction.

reactant_stoich_coeffs(self)

The array of reactant stoichiometric coefficients. Element [k,i] of this array is the reactant stoichiometric coefficient of species k in reaction i.

reaction_equation(self, int i_reaction)

reaction_equations(self, indices=None)

Returns a list containing the reaction equation for all reactions in the mechanism (if indices is unspecified) or the equations for each reaction in the sequence indices. For example:

>>> gas.reaction_equations()
['2 O + M <=> O2 + M', 'O + H + M <=> OH + M', 'O + H2 <=> H + OH', ...]
>>> gas.reaction_equations([2,3])
['O + H + M <=> OH + M', 'O + H2 <=> H + OH']


reaction_phase_index

The index of the phase where the reactions occur.

reaction_type(self, int i_reaction)

Type of reaction i_reaction.

reverse_rate_constants

Reverse rate constants for all reactions. Units are a combination of kmol, m^3 and s, that depend on the rate expression for the reaction.

reverse_rates_of_progress

Reverse rates of progress for the reactions. [kmol/m^3/s] for bulk phases or [kmol/m^2/s] for surface phases.

set_multiplier(self, double value, int i_reaction=-1)

Set the multiplier for for reaction i_reaction to value. If i_reaction is not specified, then the multiplier for all reactions is set to value. See multiplier.

class cantera.ReactionPathDiagram

Bases: object

ReactionPathDiagram(Kinetics kin, str element)

Create a reaction path diagram for the fluxes of the element element according the the net reaction rates determined by the Kinetics object kin.

Add fluxes from other to this diagram

arrow_width

arrow width. If < 0, then scale with flux value

bold_color

color for bold lines

bold_threshold

minimum relative flux for bold lines

build(self, verbose=False)

Build the reaction path diagram. Called automatically by methods which return representations of the diagram, e.g. write_dot().

dashed_color

color for dashed lines

display_only(self, int k)
dot_options

options for the ‘dot’ program

flow_type

Set to either ‘NetFlow’ or ‘OneWayFlow’

font
get_data(self)

Get a (roughly) human-readable representation of the reaction path diagram.

get_dot(self)

Return a string containing the reaction path diagram formatted for use by Graphviz’s ‘dot’ program.

label_threshold

minimum relative flux for labels

log

Logging messages generated while building the reaction path diagram

normal_color

color for normal-weight lines

normal_threshold

maximum relative flux for dashed lines

scale

Scaling factor for the fluxes. Set to -1 to normalize by the maximum net flux.

show_details

Show the details of which reactions contribute to the flux

threshold

Set the threshold for the minimum flux relative value that will be plotted.

title
write_dot(self, filename)

Write the reaction path diagram formatted for use by Graphviz’s ‘dot’ program to the file named filename.