diff --git a/caimira/models.py b/caimira/models.py index 2a766e6b..f43153fc 100644 --- a/caimira/models.py +++ b/caimira/models.py @@ -1417,23 +1417,23 @@ class ExposureModel: def _CO2_concentration(self, time: float) -> _VectorisedFloat: if time <= self.concentration_model._first_presence_time(): - return 0.0 + return 440.44e-6 # carbon dioxide concentration in the make up air (m3/m3 person) - 440ppm next_state_change_time = self.concentration_model._next_state_change(time) IVRR = self.concentration_model.air_exch_virus_removal_rate(next_state_change_time) - CO2_conc_limit = (self.concentration_model._CO2_concentration_limit(next_state_change_time) * + co2_conc_limit = (self.concentration_model._CO2_concentration_limit(next_state_change_time) * (self.concentration_model.infected.activity.exhalation_rate * (self.exposed.number + self.concentration_model.infected.number))) t_last_state_change = self.concentration_model.last_state_change(time) - co2_conc_at_last_state_change = 0.00044 + co2_conc_at_last_state_change = self._CO2_concentration_cached(t_last_state_change) # CO2 contribution in the room at start delta_time = time - t_last_state_change fac = np.exp(-IVRR * delta_time) - return (CO2_conc_limit * (1 - fac) + (co2_conc_at_last_state_change - 0.0004) * fac) + 0.0004 + return co2_conc_limit * (1 - fac) + (co2_conc_at_last_state_change * fac) def CO2_concentration(self, time: float) -> _VectorisedFloat: # Correction due to the number of generated points. - return max(440, self._CO2_concentration(time) * 10**6) + return self._CO2_concentration(time) * 1e6 def long_range_deposited_exposure_between_bounds(self, time1: float, time2: float) -> _VectorisedFloat: deposited_exposure = 0.