Skip to content

Commit

Permalink
[Python] Document direct Reaction constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
speth authored and ischoegl committed Feb 4, 2022
1 parent 0f46911 commit 2d772ab
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions interfaces/cython/cantera/reaction.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -737,6 +737,24 @@ cdef class Reaction:
Value used to set `reactants`
:param products:
Value used to set `products`
:param rate:
The rate parameterization for the reaction, given as one of the following:
- a `ReactionRate` object
- a `dict` containing the parameters needed to construct a `ReactionRate`
object, with keys corresponding to the YAML format
- a `dict` containing Arrhenius parameters (``A``, ``b``, and ``Ea``)
:param equation:
The reaction equation, used to set the reactants and products if values for
those arguments are not provided.
Examples::
R = ct.Reaction({"O": 1, "H2": 1}, {"H": 1, "OH": 1},
ct.ArrheniusRate(38.7, 2.7, 26191840.0))
R = ct.Reaction(equation="O + H2 <=> H + OH",
rate={"A": 38.7, "b", 2.7, "Ea": 26191840.0})
R = ct.Reaction(equation="HO2 <=> OH + O", rate=ChebyshevRate(...))
The static methods `list_from_file`, `list_from_yaml`, `listFromCti`, and
`listFromXml` can be used to create lists of `Reaction` objects from
Expand Down

0 comments on commit 2d772ab

Please sign in to comment.