diff --git a/caimira/docs/full_diameter_dependence.rst b/caimira/docs/full_diameter_dependence.rst index 09561bee..626f21c2 100644 --- a/caimira/docs/full_diameter_dependence.rst +++ b/caimira/docs/full_diameter_dependence.rst @@ -317,6 +317,8 @@ The estimate of the concentration of CO\ :sub:`2` in a given room to indicate th Note that in order to calculate the CO\ :sub:`2` concentration one should use the concentration method defined in the superclass - :meth:`caimira.models._ConcentrationModelBase.concentration` - for a dedicated :class:`caimira.models.CO2ConcentrationModel` scenario. A fraction of 4.2% of the exhalation rate of the defined activity was considered as the supplied to the room (:meth:`caimira.models.CO2ConcentrationModel.CO2_fraction_exhaled`). +Note still that nothing depends on the aerosol diameter :math:`D` in this case (no particles are involved) - hence in this class all parameters are constant w.r.t :math:`D`. + Since the CO\ :sub:`2` concentration differs from the virus concentration, the specific removal rate, CO\ :sub:`2` atmospheric concentration and normalization factors are respectively defined in :meth:`caimira.models.CO2ConcentrationModel.removal_rate`, :meth:`caimira.models.CO2ConcentrationModel.min_background_concentration` and :meth:`caimira.models.CO2ConcentrationModel.normalization_factor`. diff --git a/caimira/models.py b/caimira/models.py index 03602ca9..a9e5ae01 100644 --- a/caimira/models.py +++ b/caimira/models.py @@ -1085,7 +1085,12 @@ class _ConcentrationModelBase: return self.min_background_concentration()/self.normalization_factor() next_state_change_time = self._next_state_change(time) RR = self.removal_rate(next_state_change_time) - conc_limit = self._normed_concentration_limit(next_state_change_time) + # If RR is 0, conc_limit does not play a role but its computation + # would raise an error -> we set it to zero. + try: + conc_limit = self._normed_concentration_limit(next_state_change_time) + except ZeroDivisionError: + conc_limit = 0. t_last_state_change = self.last_state_change(time) conc_at_last_state_change = self._normed_concentration_cached(t_last_state_change)