From 7d3a83c62909b6f7c195d54057d3c4c4c88e3799 Mon Sep 17 00:00:00 2001 From: Nicolas Mounet Date: Mon, 13 Sep 2021 09:54:35 +0200 Subject: [PATCH] Removing completely the previous BLO implementation for Expiration; tests updated accordingly --- cara/models.py | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/cara/models.py b/cara/models.py index e80c9e75..8dbd0e90 100644 --- a/cara/models.py +++ b/cara/models.py @@ -562,26 +562,14 @@ class Expiration(_ExpirationBase): #: total concentration of aerosols (cm^-3) cn: float = 1. - #: diameter of the aerosol in microns - diameter: _VectorisedFloat - - @cached() - def aerosols_(self, mask: Mask): - """ Result is in mL.cm^-3 """ - def volume(d): - return (np.pi * d**3) / 6. - - # final result converted from microns^3/cm3 to mL/cm^3 - return self.cn * (volume(self.diameter) * - (1 - mask.exhale_efficiency(self.diameter))) * 1e-12 - @cached() def aerosols(self, mask: Mask): """ Result is in mL.cm^-3 """ def volume(d): return (np.pi * d**3) / 6. - return (volume(self.diameter) * + # final result converted from microns^3/cm3 to mL/cm^3 + return self.cn * (volume(self.diameter) * (1 - mask.exhale_efficiency(self.diameter))) * 1e-12