From e35edeab44ad97fc144b4e807bd6a3d7721c3d74 Mon Sep 17 00:00:00 2001 From: Luis Aleixo Date: Wed, 9 Nov 2022 11:13:27 +0100 Subject: [PATCH] updated exh_coef variable name --- caimira/docs/full_diameter_dependence.rst | 6 +++--- caimira/models.py | 6 +++--- caimira/tests/test_full_algorithm.py | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/caimira/docs/full_diameter_dependence.rst b/caimira/docs/full_diameter_dependence.rst index 43dd7128..3fbea5ba 100644 --- a/caimira/docs/full_diameter_dependence.rst +++ b/caimira/docs/full_diameter_dependence.rst @@ -144,10 +144,10 @@ This factor is calculated in a two-stage expiratory jet model, with its transiti :math:`\mathrm{xstar}=𝛽_{\mathrm{x1}} (Q_{\mathrm{exh}} \cdot u_{0})^\frac{1}{4} \cdot (\mathrm{tstar} + t_{0})^\frac{1}{2} - x_{0}`, -where :math:`Q_{\mathrm{exh}}=\textrm{exh_coef} \cdot \mathrm{BR}` is the expired flow rate during the expiration period, in :math:`m^{3} s^{-1}`, :math:`\textrm{exh_coef}` is the exhalation coefficient +where :math:`Q_{\mathrm{exh}}= φ \mathrm{BR}` is the expired flow rate during the expiration period, in :math:`m^{3} s^{-1}`, `φ` is the exhalation coefficient (dimensionless) and represents the ratio between the total period of a breathing cycle and the duration of the exhalation alone. -Assuming the duration of the inhalation part is equal to the exhalation and one starts immediately after the other, :math:`\textrm{exh_coef}` will always be equal to `2` no matter what is the breating cycle time. :math:`\mathrm{BR}` is the given exhalation rate. -:math:`u_{0}` is the expired jet speed (in :math:`m s^{-1}`) given by :math:`u_{0}=\frac{Q_{0}}{A_{m}}`, :math:`A_{m}` being the area of the mouth assuming a perfect circle (average `mouth_diameter` of `0.02m`). +Assuming the duration of the inhalation part is equal to the exhalation and one starts immediately after the other, `φ` will always be equal to `2` no matter what is the breating cycle time. :math:`\mathrm{BR}` is the given exhalation rate. +:math:`u_{0}` is the expired jet speed (in :math:`m s^{-1}`) given by :math:`u_{0}=\frac{Q_{\mathrm{exh}}}{A_{m}}`, :math:`A_{m}` being the area of the mouth assuming a perfect circle (average `mouth_diameter` of `0.02m`). The time of the transition point :math:`\mathrm{tstar}` is defined as `2s` and corresponds to the end of the exhalation period, i.e. when the jet is interrupted. The distance of the virtual origin of the puff-like stage is defined by :math:`x_{0}=\frac{\textrm{mouth_diameter}}{2𝛽_{\mathrm{r1}}}` (in m), and the corresponding time is given by :math:`t_{0} = \frac{\sqrt{\pi} \cdot \textrm{mouth_diameter}^3}{8𝛽_{\mathrm{r1}}^2𝛽_{\mathrm{x1}}^2Q_{exh}}` (in s). Having the distance for the transition point, we can calculate the dilution factor at the transition point, defined as follows: diff --git a/caimira/models.py b/caimira/models.py index b43e2aba..8c6b3f05 100644 --- a/caimira/models.py +++ b/caimira/models.py @@ -1161,11 +1161,11 @@ class ShortRangeModel: BR = np.array(self.activity.exhalation_rate/3600.) # Exhalation coefficient. Ratio between the duration of a breathing cycle and the duration of - # the exhalation. 4 sec breathing cycle assumed. - exh_coef = 2 + # the exhalation. + φ = 2 # Exhalation airflow, as per Jia et al. (2022) - Q_exh = exh_coef * BR + Q_exh = φ * BR # Area of the mouth assuming a perfect circle (m2) Am = np.pi*(mouth_diameter**2)/4 diff --git a/caimira/tests/test_full_algorithm.py b/caimira/tests/test_full_algorithm.py index b4f5785f..51a3da72 100644 --- a/caimira/tests/test_full_algorithm.py +++ b/caimira/tests/test_full_algorithm.py @@ -198,7 +198,7 @@ class SimpleShortRangeModel: breathing_rate: _VectorisedFloat = 0.51 #: Exhalation coefficient - exh_coef = 2 + φ = 2 #: Tuple with BLO factors BLO_factors: typing.Tuple[float, float, float] = (1,0,0) @@ -229,7 +229,7 @@ class SimpleShortRangeModel: x = np.array(self.distance) dilution = np.empty(x.shape, dtype=np.float64) # Exhalation airflow, as per Jia et al. (2022), m^3/s - Q_exh = self.exh_coef * np.array(self.breathing_rate/3600) + Q_exh = self.φ * np.array(self.breathing_rate/3600) # The expired flow velocity at the noozle (mouth opening), m/s u0 = np.array(Q_exh/(np.pi/4. * self.mouth_diameter**2)) # Parameters in the jet-like stage