Warning
This documentation is for an old version of Cantera. You can find docs for newer versions here.
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.
Creation rates for each species. [kmol/m^3/s] for bulk phases or [kmol/m^2/s] for surface phases.
Change in enthalpy for each reaction [J/kmol].
Change in entropy for each reaction [J/kmol/K].
Change in Gibbs free energy for each reaction [J/kmol].
Change in standard-state enthalpy (independent of composition) for each reaction [J/kmol].
Change in standard-state entropy (independent of composition) for each reaction [J/kmol/K].
Change in standard-state Gibbs free energy (independent of composition) for each reaction [J/kmol].
Destruction rates for each species. [kmol/m^3/s] for bulk phases or [kmol/m^2/s] for surface phases.
Equilibrium constants in concentration units for all reactions.
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 for the reactions. [kmol/m^3/s] for bulk phases or [kmol/m^2/s] for surface phases.
True if reaction i_reaction is reversible.
The index of species species of phase phase within arrays returned by methods of class Kinetics. If species is a string, the phase argument is unused.
Modify the Reaction with index irxn to have the same rate parameters as rxn. rxn must have the same reactants and products and be of the same type (i.e. ElementaryReaction, FalloffReaction, PlogReaction, etc.) as the existing reaction. This method does not modify the third-body efficiencies, reaction orders, or reversibility of the 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.
Number of phases in the reaction mechanism.
Number of reactions in the reaction mechanism.
Total number of species in all phases participating in the kinetics mechanism.
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 for the reactions. [kmol/m^3/s] for bulk phases or [kmol/m^2/s] for surface phases.
The stoichiometric coefficient of species k_spec as a product in reaction i_reaction.
The array of product stoichiometric coefficients. Element [k,i] of this array is the product stoichiometric coefficient of species k in reaction i.
The products portion of the reaction equation
The stoichiometric coefficient of species k_spec as a reactant in reaction i_reaction.
The array of reactant stoichiometric coefficients. Element [k,i] of this array is the reactant stoichiometric coefficient of species k in reaction i.
The reactants portion of the reaction equation
Return a Reaction object representing the reaction with index i_reaction.
The equation for the specified reaction. See also reaction_equations.
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']
See also reaction_equation.
The index of the phase where the reactions occur.
Type of reaction i_reaction.
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 for the reactions. [kmol/m^3/s] for bulk phases or [kmol/m^2/s] for surface phases.
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.
Bases: cantera._cantera.Kinetics
InterfaceKinetics(infile=’‘, phaseid=’‘, phases=(), *args, **kwargs)
A kinetics manager for heterogeneous reaction mechanisms. The reactions are assumed to occur at an interface between bulk phases.
This method carries out a time-accurate advancement of the surface coverages for a specified amount of time.
Creation rates for each species in phase phase. Use the creation_rates property to get the creation rates for species in all phases.
Destruction rates for each species in phase phase. Use the destruction_rates property to get the destruction rates for species in all phases.
Net production rates for each species in phase phase. Use the net_production_rates property to get the net_production rates for species in all phases.
Get the index of the phase phase, where phase may specified using the phase object, the name, or the index itself.
These classes contain the definition of a single reaction and its associated rate expression, independent of a specific Kinetics object.
Bases: object
A class which stores data about a reaction and its rate parameterization so that it can be added to a Kinetics object.
Parameters: |
---|
The static methods listFromFile, listFromCti, and listFromXml can be used to create lists of Reaction objects from existing definitions in the CTI or XML format. All of the following will produce a list of the 325 reactions which make up the GRI 3.0 mechanism:
R = ct.Reaction.listFromFile('gri30.cti')
R = ct.Reaction.listFromCti(open('path/to/gri30.cti').read())
R = ct.Reaction.listFromXml(open('path/to/gri30.xml').read())
The methods fromCti and fromXml can be used to create individual Reaction objects from definitions in these formats. In the case of using CTI definitions, it is important to verify that either the pre-exponential factor and activation energy are supplied in SI units, or that they have their units specified:
R = ct.Reaction.fromCti('''reaction('O + H2 <=> H + OH',
[3.87e1, 2.7, 2.619184e7])''')
R = ct.Reaction.fromCti('''reaction('O + H2 <=> H + OH',
[(3.87e4, 'cm3/mol/s'), 2.7, (6260, 'cal/mol')])''')
Get/Set the identification string for the reaction, which can be used in filtering operations.
Get/Set a flag which is True if negative reaction orders are allowed. Default is False.
Get/Set a flag which is True if reaction orders can be specified for non-reactant species. Default is False.
Get/Set a flag which is True if this reaction is marked as a duplicate or False otherwise.
A string giving the chemical equation for this reaction. Determined automatically based on reactants and products.
Create a Reaction object from its CTI string representation.
Create a Reaction object from its XML string representation.
Create a list of Species objects from all the species defined in a CTI string.
Create a list of Reaction objects from all of the reactions defined in a CTI or XML file.
Directories on Cantera’s input file path will be searched for the specified file.
In the case of an XML file, the <reactions> nodes are assumed to be children of the <reactionsData> node in a document with a <ctml> root node, as in the XML files produced by conversion from CTI files.
Create a list of Reaction objects from all the reaction defined in an XML string. The <reaction> nodes are assumed to be children of the <reactionData> node in a document with a <ctml> root node, as in the XML files produced by conversion from CTI files.
Get/Set the reaction order with respect to specific species as a dict with species names as the keys and orders as the values, or as a composition string. By default, mass-action kinetics is assumed, with the reaction order for each reactant species equal to each its stoichiometric coefficient.
A string representing the products side of the chemical equation for this reaction. Determined automatically based on products.
Get/Set the products in this reaction as a dict where the keys are species names and the values, are the stoichiometric coefficients, e.g. {'CH3':1, 'H2O':1}, or as a composition string, e.g. 'CH3:1, H2O:1'.
A string representing the reactants side of the chemical equation for this reaction. Determined automatically based on reactants.
Get/Set the reactants in this reaction as a dict where the keys are species names and the values, are the stoichiometric coefficients, e.g. {'CH4':1, 'OH':1}, or as a composition string, e.g. 'CH4:1, OH:1'.
Get/Set a flag which is True if this reaction is reversible or False otherwise.
Bases: cantera._cantera.Reaction
A reaction which follows mass-action kinetics with a modified Arrhenius reaction rate.
Get/Set whether the rate coefficient is allowed to have a negative pre-exponential factor.
Bases: cantera._cantera.ElementaryReaction
A reaction with a non-reacting third body “M” that acts to add or remove energy from the reacting species.
Get/Set the default third-body efficiency for this reaction, used for species used for species not in efficiencies.
Get/Set a dict defining non-default third-body efficiencies for this reaction, where the keys are the species names and the values are the efficiencies.
Get the efficiency of the third body named species considering both the default efficiency and species-specific efficiencies.
Bases: cantera._cantera.Reaction
A reaction that is first-order in [M] at low pressure, like a third-body reaction, but zeroth-order in [M] as pressure increases.
Get/Set the default third-body efficiency for this reaction, used for species used for species not in efficiencies.
Get/Set a dict defining non-default third-body efficiencies for this reaction, where the keys are the species names and the values are the efficiencies.
Get the efficiency of the third body named species considering both the default efficiency and species-specific efficiencies.
Bases: cantera._cantera.FalloffReaction
A reaction where the rate decreases as pressure increases due to collisional stabilization of a reaction intermediate. Like a FalloffReaction, except that the forward rate constant is written as being proportional to the low- pressure rate constant.
Bases: cantera._cantera.Reaction
A pressure-dependent reaction parameterized by logarithmically interpolating between Arrhenius rate expressions at various pressures.
Bases: cantera._cantera.Reaction
A pressure-dependent reaction parameterized by a bivariate Chebyshev polynomial in temperature and pressure.
Maximum pressure [Pa] for the Chebyshev fit
Minimum pressure [Pa] for the Chebyshev fit
Maximum temperature [K] for the Chebyshev fit
Minimum temperature [K] for the Chebyshev fit
2D array of Chebyshev coefficients of size (nTemperature, nPressure).
Number of pressures over which the Chebyshev fit is computed
Number of temperatures over which the Chebyshev fit is computed
Bases: cantera._cantera.ElementaryReaction
A reaction occurring on an Interface (i.e. a surface or an edge)
Get/Set a dict containing adjustments to the Arrhenius rate expression dependent on surface species coverages. The keys of the dict are species names, and the values are tuples specifying the three coverage parameters (a, m, E) which are the modifiers for the pre-exponential factor [m, kmol, s units], the temperature exponent [nondimensional], and the activation energy [J/kmol], respectively.
Get/Set a boolean indicating if the rate coefficient for this reaction is expressed as a sticking coefficient rather than the forward rate constant.
The name of the sticking species. Needed only for reactions with multiple non-surface reactant species, where the sticking species is ambiguous.
Bases: object
A reaction rate coefficient which depends on temperature only and follows the modified Arrhenius form:
where A is the pre_exponential_factor, b is the temperature_exponent, and E is the activation_energy.
The activation energy E [J/kmol].
The pre-exponential factor A in units of m, kmol, and s raised to powers depending on the reaction order.
The temperature exponent b.
Bases: object
A parameterization used to describe the fall-off in reaction rate constants due to intermolecular energy transfer. These functions are used by reactions defined using the FalloffReaction and ChemicallyActivatedReaction classes.
This base class implements the simple falloff function \(F(T,P_r) = 1.0\).
Parameters: |
|
---|
The array of parameters used to define this falloff function.
A string defining the type of the falloff parameterization
Bases: cantera._cantera.Falloff
The 3- or 4-parameter Troe falloff function.
Parameters: | coeffs – An array of 3 or 4 parameters: \([a, T^{***}, T^*, T^{**}]\) where the final parameter is optional (with a default value of 0). |
---|
Bases: cantera._cantera.Falloff
The 3- or 5-parameter SRI falloff function.
Parameters: | coeffs – An array of 3 or 5 parameters: \([a, b, c, d, e]\) where the last two parameters are optional (with default values of 1 and 0, respectively). |
---|
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
Get/Set the arrow width. If < 0, then scale with flux value.
Get/Set the color for bold lines
Get/Set the minimum relative flux for bold lines
Build the reaction path diagram. Called automatically by methods which return representations of the diagram, e.g. write_dot().
Get/Set the color for dashed lines
Get/Set options for the ‘dot’ program
Get/Set the way flows are drawn. Either ‘NetFlow’ or ‘OneWayFlow’
Get/Set the name of the font used
Get a (roughly) human-readable representation of the reaction path diagram.
Return a string containing the reaction path diagram formatted for use by Graphviz’s ‘dot’ program.
Get/Set the minimum relative flux for labels
Logging messages generated while building the reaction path diagram
Get/Set the color for normal-weight lines
Get/Set the maximum relative flux for dashed lines
Get/Set the scaling factor for the fluxes. Set to -1 to normalize by the maximum net flux.
Get/Set whether to show the details of which reactions contribute to the flux.
Get/Set the threshold for the minimum flux relative value that will be plotted.
Get/Set the diagram title
Write the reaction path diagram formatted for use by Graphviz’s ‘dot’ program to the file named filename.