@@ -24,9 +24,9 @@ def test_implicit_three_body(self):
2424 rate-constant: {A: 2.08e+19, b: -1.24, Ea: 0.0}
2525 """
2626 rxn1 = ct .Reaction .from_yaml (yaml1 , self .gas )
27- self . assertEqual ( rxn1 .reaction_type , "three-body" )
28- self . assertEqual ( rxn1 .default_efficiency , 0. )
29- self . assertEqual ( rxn1 .efficiencies , {"O2" : 1 })
27+ assert rxn1 .rate . type == "three-body-Arrhenius"
28+ assert rxn1 .rate . default_efficiency == 0.
29+ assert rxn1 .rate . efficiencies == {"O2" : 1 }
3030
3131 yaml2 = """
3232 equation: H + O2 + M <=> HO2 + M
@@ -36,8 +36,9 @@ def test_implicit_three_body(self):
3636 efficiencies: {O2: 1.0}
3737 """
3838 rxn2 = ct .Reaction .from_yaml (yaml2 , self .gas )
39- self .assertEqual (rxn1 .efficiencies , rxn2 .efficiencies )
40- self .assertEqual (rxn1 .default_efficiency , rxn2 .default_efficiency )
39+ assert rxn2 .rate .type == "three-body-Arrhenius"
40+ assert rxn1 .rate .efficiencies == rxn2 .rate .efficiencies
41+ assert rxn1 .rate .default_efficiency == rxn2 .rate .default_efficiency
4142
4243 def test_duplicate (self ):
4344 # @todo simplify this test
@@ -46,25 +47,27 @@ def test_duplicate(self):
4647 species = self .gas .species (), reactions = [])
4748
4849 yaml1 = """
49- equation: H + O2 + H2O <=> HO2 + H2O
50+ equation: H + O2 + M <=> HO2 + M
5051 rate-constant: {A: 1.126e+19, b: -0.76, Ea: 0.0}
52+ type: three-body
53+ default-efficiency: 0
54+ efficiencies: {H2O: 1}
5155 """
5256 rxn1 = ct .Reaction .from_yaml (yaml1 , gas1 )
57+ print (rxn1 .reaction_type , rxn1 .rate .type )
58+ assert rxn1 .rate .type == "three-body-Arrhenius"
5359
5460 yaml2 = """
55- equation: H + O2 + M <=> HO2 + M
61+ equation: H + O2 + H2O <=> HO2 + H2O
5662 rate-constant: {A: 1.126e+19, b: -0.76, Ea: 0.0}
57- type: three-body
58- default-efficiency: 0
59- efficiencies: {H2O: 1}
6063 """
6164 rxn2 = ct .Reaction .from_yaml (yaml2 , gas1 )
65+ assert rxn2 .rate .type == "three-body-Arrhenius"
6266
63- self .assertEqual (rxn1 .reaction_type , rxn2 .reaction_type )
6467 self .assertEqual (rxn1 .reactants , rxn2 .reactants )
6568 self .assertEqual (rxn1 .products , rxn2 .products )
66- self . assertEqual ( rxn1 .efficiencies , rxn2 .efficiencies )
67- self . assertEqual ( rxn1 .default_efficiency , rxn2 .default_efficiency )
69+ assert rxn1 .rate . efficiencies == rxn2 .rate . efficiencies
70+ assert rxn1 .rate . default_efficiency == rxn2 .rate . default_efficiency
6871
6972 gas1 .add_reaction (rxn1 )
7073 gas1 .add_reaction (rxn2 )
@@ -1290,11 +1293,12 @@ class TestThreeBody(TestThreeBody2):
12901293 # test updated version of three-body reaction
12911294
12921295 _legacy = False
1293- _rxn_type = "three-body"
1294- _rate_type = "Arrhenius"
1296+ _rxn_type = "reaction"
1297+ _rate_type = "three-body-Arrhenius"
1298+ _rate_cls = ct .ThreeBodyArrheniusRate
12951299 _yaml = """
12961300 equation: 2 O + M <=> O2 + M
1297- type: three-body
1301+ type: three-body-Arrhenius
12981302 rate-constant: {A: 1.2e+11, b: -1.0, Ea: 0.0 cal/mol}
12991303 efficiencies: {H2: 2.4, H2O: 15.4, AR: 0.83}
13001304 """
0 commit comments