示例#1
0
 def setUpClass(cls):
     ReactionTests.setUpClass()
     if cls._legacy:
         args = list(cls._rate.values())
         cls._rate_obj = ct.Arrhenius(*args)
     else:
         cls._rate_obj = ct.ArrheniusRate(**cls._rate)
示例#2
0
class TestElementaryNew(TestElementary):

    _cls = ct.TestReaction
    _equation = 'H2 + O <=> H + OH'
    _rate = {'A': 38.7, 'b': 2.7, 'Ea': 2.619184e+07}
    _rate_obj = ct.ArrheniusRate(38.7, 2.7, 2.619184e+07)
    _index = 2
    _type = "elementary-new"
示例#3
0
Requires: cantera >= 2.6.0, matplotlib >= 2.0
Keywords: kinetics, sensitivity analysis
"""

import cantera as ct
import numpy as np
import matplotlib.pyplot as plt

#Create an elementary reaction O+H2<=>H+OH
r1 = ct.Reaction({
    "O": 1,
    "H2": 1
}, {
    "H": 1,
    "OH": 1
}, ct.ArrheniusRate(3.87e1, 2.7, 6260 * 1000 * 4.184))

#Create a Blowers-Masel reaction O+H2<=>H+OH
r2 = ct.Reaction({
    "O": 1,
    "H2": 1
}, {
    "H": 1,
    "OH": 1
}, ct.BlowersMaselRate(3.87e1, 2.7, 6260 * 1000 * 4.184, 1e9))

#Create a Blowers-Masel reaction with same parameters with r2
#reaction equation is H+CH4<=>CH3+H2
r3 = ct.Reaction({
    "H": 1,
    "CH4": 1
示例#4
0
 def setUp(self):
     self.A = self.gas.reaction(self._index).rate.pre_exponential_factor
     self.b = self.gas.reaction(self._index).rate.temperature_exponent
     self.Ea = self.gas.reaction(self._index).rate.activation_energy
     self.rate = ct.ArrheniusRate(self.A, self.b, self.Ea)