Added cloth mask to backend

This commit is contained in:
Luis Aleixo 2022-09-12 17:24:09 +02:00
parent 6c0d334270
commit 3ea0d83e21
4 changed files with 23 additions and 3 deletions

View file

@ -807,7 +807,7 @@ def baseline_raw_form_data() -> typing.Dict[str, typing.Union[str, float]]:
ACTIVITY_TYPES = {'office', 'smallmeeting', 'largemeeting', 'training', 'training_attendee', 'callcentre', 'controlroom-day', 'controlroom-night', 'library', 'workshop', 'lab', 'gym'}
MECHANICAL_VENTILATION_TYPES = {'mech_type_air_changes', 'mech_type_air_supply', 'not-applicable'}
MASK_TYPES = {'Type I', 'FFP2'}
MASK_TYPES = {'Type I', 'FFP2', 'Cloth'}
MASK_WEARING_OPTIONS = {'mask_on', 'mask_off'}
VENTILATION_TYPES = {'natural_ventilation', 'mechanical_ventilation', 'no_ventilation'}
VIRUS_TYPES = {'SARS_CoV_2', 'SARS_CoV_2_ALPHA', 'SARS_CoV_2_BETA','SARS_CoV_2_GAMMA', 'SARS_CoV_2_DELTA', 'SARS_CoV_2_OMICRON'}

View file

@ -295,6 +295,13 @@
</label>
</div>
</div>
<div>
<input type="radio" id="mask_type_cloth" name="mask_type" value="Cloth" onclick="require_fields(this)">
<label for="mask_type_cloth">
Cloth
<img class="mask_icons" src="/static/images/masks/ffp2.png">
</label>
</div>
</div>
<hr width="80%">

View file

@ -526,6 +526,9 @@ class Mask:
#: Filtration efficiency of masks when inhaling.
η_inhale: _VectorisedFloat
#: Filtration efficiency of masks when exhaling.
η_exhale: _VectorisedFloat = 0.
#: Global factor applied to filtration efficiency of masks when exhaling.
factor_exhale: float = 1.
@ -541,6 +544,11 @@ class Mask:
the leakage through the sides.
Diameter is in microns.
"""
if self.η_exhale is not 0.:
# For cloth mask we simply return its exhale efficiency distribution value.
# Ref: https://doi.org/10.1080/02786826.2021.1890687
return self.η_exhale
d = np.array(diameter)
intermediate_range1 = np.bitwise_and(0.5 <= d, d < 0.94614)
intermediate_range2 = np.bitwise_and(0.94614 <= d, d < 3.)
@ -570,6 +578,10 @@ Mask.types = {
'FFP2': Mask(
η_inhale=0.865, # (94% penetration efficiency + 8% max inward leakage -> EN 149)
),
'Cloth': Mask( # https://doi.org/10.1080/02786826.2021.1890687
η_inhale=0.35,
η_exhale=0.225,
),
}

View file

@ -168,8 +168,9 @@ virus_distributions = {
# https://doi.org/10.1016/j.jhin.2013.02.007
# https://doi.org/10.4209/aaqr.2020.08.0531
mask_distributions = {
'Type I': mc.Mask(Uniform(0.25, 0.80)),
'FFP2': mc.Mask(Uniform(0.83, 0.91)),
'Type I': mc.Mask(η_inhale=Uniform(0.25, 0.80)),
'FFP2': mc.Mask(η_inhale=Uniform(0.83, 0.91)),
'Cloth': mc.Mask(η_inhale=Uniform(0.05, 0.40), η_exhale=Uniform(0.20, 0.50)),
}