Avoid dependency of Expiration aerosols on particle_sizes order, in cara/models.py
This commit is contained in:
parent
bc1053e49a
commit
ed5e4980cd
1 changed files with 2 additions and 4 deletions
|
|
@ -221,11 +221,9 @@ class Expiration:
|
|||
def volume(diameter):
|
||||
return (4 * np.pi * (diameter/2)**3) / 3
|
||||
total = 0
|
||||
for i, (diameter, factor) in enumerate(zip(self.particle_sizes, self.ejection_factor)):
|
||||
for diameter, factor in zip(self.particle_sizes, self.ejection_factor):
|
||||
contribution = volume(diameter) * factor
|
||||
if i >= 2:
|
||||
# TODO: It is probably the case that this term comes from the
|
||||
# particle diameter, rather than arbitrary position in a sequence...
|
||||
if diameter >= 3e-4:
|
||||
contribution = contribution * (1 - mask.exhale_efficiency)
|
||||
total += contribution
|
||||
return total
|
||||
|
|
|
|||
Loading…
Reference in a new issue