@@ -685,6 +685,64 @@ cdef class CustomRate(ReactionRate):
685
685
self .cxx_object().setRateFunction(self ._rate_func._func)
686
686
687
687
688
+ cdef class ThreeBodyRateBase(ArrheniusRateBase):
689
+ """
690
+ Base class collecting commonly used features of Arrhenius-type rate objects
691
+ that include three.
692
+ """
693
+
694
+ property efficiencies :
695
+ """
696
+ Get a `dict` defining non-default third-body efficiencies for this
697
+ reaction, where the keys are the species names and the values are the
698
+ efficiencies.
699
+ """
700
+ def __get__ (self ):
701
+ cdef CxxAnyMap cxx_effs
702
+ self .threebody.getEfficiencies(cxx_effs)
703
+ return anymap_to_dict(cxx_effs)
704
+
705
+ property default_efficiency :
706
+ """
707
+ Get the default third-body efficiency associated with this rate, used for
708
+ species used for species not in `efficiencies`.
709
+ """
710
+ def __get__ (self ):
711
+ return self .threebody.defaultEfficiency()
712
+
713
+ property third_body_concentration :
714
+ """ Concentration of third-body collider"""
715
+ def __get__ (self ):
716
+ return self .threebody.thirdBodyConcentration()
717
+
718
+
719
+ cdef class ThreeBodyArrheniusRate(ThreeBodyRateBase):
720
+ r """
721
+ A reaction rate coefficient which depends on temperature and the concentration of
722
+ a third-body collider
723
+ """
724
+ _reaction_rate_type = " three-body-Arrhenius"
725
+
726
+ def __cinit__ (self , A = None , b = None , Ea = None , input_data = None , init = True ):
727
+
728
+ if init:
729
+ self ._cinit(input_data, A = A, b = b, Ea = Ea)
730
+
731
+ def _from_dict (self , dict input_data ):
732
+ self ._rate.reset(new CxxThreeBodyArrheniusRate(dict_to_anymap(input_data)))
733
+
734
+ def _from_parameters (self , A , b , Ea ):
735
+ self ._rate.reset(new CxxThreeBodyArrheniusRate(A, b, Ea))
736
+
737
+ cdef set_cxx_object(self ):
738
+ self .rate = self ._rate.get()
739
+ self .base = < CxxArrhenius* > self .rate
740
+ self .threebody = < CxxThreeBodyBase* > self .cxx_object()
741
+
742
+ cdef CxxThreeBodyArrheniusRate* cxx_object(self ):
743
+ return < CxxThreeBodyArrheniusRate* > self .rate
744
+
745
+
688
746
cdef class InterfaceRateBase(ArrheniusRateBase):
689
747
"""
690
748
Base class collecting commonly used features of Arrhenius-type rate objects
@@ -718,7 +776,6 @@ cdef class InterfaceRateBase(ArrheniusRateBase):
718
776
return anymap_to_dict(cxx_deps)
719
777
def __set__ (self , dict deps ):
720
778
cdef CxxAnyMap cxx_deps = dict_to_anymap(deps)
721
-
722
779
self .coverage.setCoverageDependencies(cxx_deps)
723
780
724
781
def set_species (self , species ):
0 commit comments