PyMPDATA_examples.Olesik_et_al_2022.East_and_Marshall_1954

 1import numpy as np
 2
 3
 4# pylint: disable=too-few-public-methods
 5class SizeDistribution:
 6    def __init__(self, si):
 7        self.si = si
 8        self.n0 = (
 9            465 / si.centimetre**3
10        )  # adjusted wrt original 700 to match mixing ratio of 1g/kg
11        self.kappa = 22
12
13    def pdf(self, r):
14        return (
15            (self.n0 * self.si.micrometre)
16            / r
17            * np.exp(-self.kappa * (np.log10(r / (7 * self.si.micrometre)) ** 2))
18            * (1 / self.si.micrometre)
19        )
class SizeDistribution:
 6class SizeDistribution:
 7    def __init__(self, si):
 8        self.si = si
 9        self.n0 = (
10            465 / si.centimetre**3
11        )  # adjusted wrt original 700 to match mixing ratio of 1g/kg
12        self.kappa = 22
13
14    def pdf(self, r):
15        return (
16            (self.n0 * self.si.micrometre)
17            / r
18            * np.exp(-self.kappa * (np.log10(r / (7 * self.si.micrometre)) ** 2))
19            * (1 / self.si.micrometre)
20        )
SizeDistribution(si)
 7    def __init__(self, si):
 8        self.si = si
 9        self.n0 = (
10            465 / si.centimetre**3
11        )  # adjusted wrt original 700 to match mixing ratio of 1g/kg
12        self.kappa = 22
si
n0
kappa
def pdf(self, r):
14    def pdf(self, r):
15        return (
16            (self.n0 * self.si.micrometre)
17            / r
18            * np.exp(-self.kappa * (np.log10(r / (7 * self.si.micrometre)) ** 2))
19            * (1 / self.si.micrometre)
20        )