PySDM_examples.Singer_Ward.aerosol
1from chempy import Substance 2from pystrict import strict 3 4from PySDM.initialisation import spectra 5from PySDM.initialisation.aerosol_composition import DryAerosolMixture 6from PySDM.physics import si 7 8 9@strict 10class AerosolBetaCaryophylleneDark(DryAerosolMixture): 11 def __init__(self, water_molar_volume: float, Forg: float = 0.8, N: float = 400): 12 mode = { 13 "(NH4)2SO4": (1 - Forg), 14 "bcary_dark": Forg, 15 } 16 17 super().__init__( 18 compounds=("(NH4)2SO4", "bcary_dark"), 19 molar_masses={ 20 "(NH4)2SO4": Substance.from_formula("(NH4)2SO4").mass 21 * si.gram 22 / si.mole, 23 "bcary_dark": 299 * si.gram / si.mole, 24 }, 25 densities={ 26 "(NH4)2SO4": 1.77 * si.g / si.cm**3, 27 "bcary_dark": 1.20 * si.g / si.cm**3, 28 }, 29 is_soluble={ 30 "(NH4)2SO4": False, 31 "bcary_dark": True, 32 }, 33 ionic_dissociation_phi={ 34 "(NH4)2SO4": 3, 35 "bcary_dark": 1, 36 }, 37 ) 38 self.modes = ( 39 { 40 "f_org": 1 - self.f_soluble_volume(mode), 41 "kappa": self.kappa( 42 mass_fractions=mode, water_molar_volume=water_molar_volume 43 ), 44 "nu_org": self.nu_org(mode), 45 "spectrum": spectra.Lognormal( 46 norm_factor=N / si.cm**3, m_mode=50.0 * si.nm, s_geom=1.75 47 ), 48 }, 49 ) 50 51 color = "red" 52 53 54class AerosolBetaCaryophylleneLight(DryAerosolMixture): 55 def __init__(self, water_molar_volume: float, Forg: float = 0.8, N: float = 400): 56 mode = { 57 "(NH4)2SO4": (1 - Forg), 58 "bcary_light": Forg, 59 } 60 61 super().__init__( 62 compounds=("(NH4)2SO4", "bcary_light"), 63 molar_masses={ 64 "(NH4)2SO4": Substance.from_formula("(NH4)2SO4").mass 65 * si.gram 66 / si.mole, 67 "bcary_light": 360 * si.gram / si.mole, 68 }, 69 densities={ 70 "(NH4)2SO4": 1.77 * si.g / si.cm**3, 71 "bcary_light": 1.50 * si.g / si.cm**3, 72 }, 73 is_soluble={ 74 "(NH4)2SO4": False, 75 "bcary_light": True, 76 }, 77 ionic_dissociation_phi={ 78 "(NH4)2SO4": 3, 79 "bcary_light": 1, 80 }, 81 ) 82 self.modes = ( 83 { 84 "f_org": 1 - self.f_soluble_volume(mode), 85 "kappa": self.kappa( 86 mass_fractions=mode, water_molar_volume=water_molar_volume 87 ), 88 "nu_org": self.nu_org(mode), 89 "spectrum": spectra.Lognormal( 90 norm_factor=N / si.cm**3, m_mode=50.0 * si.nm, s_geom=1.75 91 ), 92 }, 93 ) 94 95 color = "orange" 96 97 98@strict 99class AerosolAlphaPineneDark(DryAerosolMixture): 100 def __init__(self, water_molar_volume: float, Forg: float = 0.8, N: float = 400): 101 mode = { 102 "(NH4)2SO4": (1 - Forg), 103 "apinene_dark": Forg, 104 } 105 106 super().__init__( 107 compounds=("(NH4)2SO4", "apinene_dark"), 108 molar_masses={ 109 "(NH4)2SO4": Substance.from_formula("(NH4)2SO4").mass 110 * si.gram 111 / si.mole, 112 "apinene_dark": 209 * si.gram / si.mole, 113 }, 114 densities={ 115 "(NH4)2SO4": 1.77 * si.g / si.cm**3, 116 "apinene_dark": 1.27 * si.g / si.cm**3, 117 }, 118 is_soluble={ 119 "(NH4)2SO4": False, 120 "apinene_dark": True, 121 }, 122 ionic_dissociation_phi={ 123 "(NH4)2SO4": 3, 124 "apinene_dark": 1, 125 }, 126 ) 127 self.modes = ( 128 { 129 "f_org": 1 - self.f_soluble_volume(mode), 130 "kappa": self.kappa( 131 mass_fractions=mode, water_molar_volume=water_molar_volume 132 ), 133 "nu_org": self.nu_org(mode), 134 "spectrum": spectra.Lognormal( 135 norm_factor=N / si.cm**3, m_mode=50.0 * si.nm, s_geom=1.75 136 ), 137 }, 138 ) 139 140 color = "green" 141 142 143@strict 144class AerosolAlphaPineneLight(DryAerosolMixture): 145 def __init__(self, water_molar_volume: float, Forg: float = 0.8, N: float = 400): 146 mode = { 147 "(NH4)2SO4": (1 - Forg), 148 "apinene_light": Forg, 149 } 150 151 super().__init__( 152 compounds=("(NH4)2SO4", "apinene_light"), 153 molar_masses={ 154 "(NH4)2SO4": Substance.from_formula("(NH4)2SO4").mass 155 * si.gram 156 / si.mole, 157 "apinene_light": 265 * si.gram / si.mole, 158 }, 159 densities={ 160 "(NH4)2SO4": 1.77 * si.g / si.cm**3, 161 "apinene_light": 1.51 * si.g / si.cm**3, 162 }, 163 is_soluble={ 164 "(NH4)2SO4": False, 165 "apinene_light": True, 166 }, 167 ionic_dissociation_phi={ 168 "(NH4)2SO4": 3, 169 "apinene_light": 1, 170 }, 171 ) 172 self.modes = ( 173 { 174 "f_org": 1 - self.f_soluble_volume(mode), 175 "kappa": self.kappa( 176 mass_fractions=mode, water_molar_volume=water_molar_volume 177 ), 178 "nu_org": self.nu_org(mode), 179 "spectrum": spectra.Lognormal( 180 norm_factor=N / si.cm**3, m_mode=50.0 * si.nm, s_geom=1.75 181 ), 182 }, 183 ) 184 185 color = "lightgreen"
@strict
class
AerosolBetaCaryophylleneDark10@strict 11class AerosolBetaCaryophylleneDark(DryAerosolMixture): 12 def __init__(self, water_molar_volume: float, Forg: float = 0.8, N: float = 400): 13 mode = { 14 "(NH4)2SO4": (1 - Forg), 15 "bcary_dark": Forg, 16 } 17 18 super().__init__( 19 compounds=("(NH4)2SO4", "bcary_dark"), 20 molar_masses={ 21 "(NH4)2SO4": Substance.from_formula("(NH4)2SO4").mass 22 * si.gram 23 / si.mole, 24 "bcary_dark": 299 * si.gram / si.mole, 25 }, 26 densities={ 27 "(NH4)2SO4": 1.77 * si.g / si.cm**3, 28 "bcary_dark": 1.20 * si.g / si.cm**3, 29 }, 30 is_soluble={ 31 "(NH4)2SO4": False, 32 "bcary_dark": True, 33 }, 34 ionic_dissociation_phi={ 35 "(NH4)2SO4": 3, 36 "bcary_dark": 1, 37 }, 38 ) 39 self.modes = ( 40 { 41 "f_org": 1 - self.f_soluble_volume(mode), 42 "kappa": self.kappa( 43 mass_fractions=mode, water_molar_volume=water_molar_volume 44 ), 45 "nu_org": self.nu_org(mode), 46 "spectrum": spectra.Lognormal( 47 norm_factor=N / si.cm**3, m_mode=50.0 * si.nm, s_geom=1.75 48 ), 49 }, 50 ) 51 52 color = "red"
AerosolBetaCaryophylleneDark(water_molar_volume: float, Forg: float = 0.8, N: float = 400)
12 def __init__(self, water_molar_volume: float, Forg: float = 0.8, N: float = 400): 13 mode = { 14 "(NH4)2SO4": (1 - Forg), 15 "bcary_dark": Forg, 16 } 17 18 super().__init__( 19 compounds=("(NH4)2SO4", "bcary_dark"), 20 molar_masses={ 21 "(NH4)2SO4": Substance.from_formula("(NH4)2SO4").mass 22 * si.gram 23 / si.mole, 24 "bcary_dark": 299 * si.gram / si.mole, 25 }, 26 densities={ 27 "(NH4)2SO4": 1.77 * si.g / si.cm**3, 28 "bcary_dark": 1.20 * si.g / si.cm**3, 29 }, 30 is_soluble={ 31 "(NH4)2SO4": False, 32 "bcary_dark": True, 33 }, 34 ionic_dissociation_phi={ 35 "(NH4)2SO4": 3, 36 "bcary_dark": 1, 37 }, 38 ) 39 self.modes = ( 40 { 41 "f_org": 1 - self.f_soluble_volume(mode), 42 "kappa": self.kappa( 43 mass_fractions=mode, water_molar_volume=water_molar_volume 44 ), 45 "nu_org": self.nu_org(mode), 46 "spectrum": spectra.Lognormal( 47 norm_factor=N / si.cm**3, m_mode=50.0 * si.nm, s_geom=1.75 48 ), 49 }, 50 )
class
AerosolBetaCaryophylleneLight(PySDM.initialisation.aerosol_composition.dry_aerosol.DryAerosolMixture):
55class AerosolBetaCaryophylleneLight(DryAerosolMixture): 56 def __init__(self, water_molar_volume: float, Forg: float = 0.8, N: float = 400): 57 mode = { 58 "(NH4)2SO4": (1 - Forg), 59 "bcary_light": Forg, 60 } 61 62 super().__init__( 63 compounds=("(NH4)2SO4", "bcary_light"), 64 molar_masses={ 65 "(NH4)2SO4": Substance.from_formula("(NH4)2SO4").mass 66 * si.gram 67 / si.mole, 68 "bcary_light": 360 * si.gram / si.mole, 69 }, 70 densities={ 71 "(NH4)2SO4": 1.77 * si.g / si.cm**3, 72 "bcary_light": 1.50 * si.g / si.cm**3, 73 }, 74 is_soluble={ 75 "(NH4)2SO4": False, 76 "bcary_light": True, 77 }, 78 ionic_dissociation_phi={ 79 "(NH4)2SO4": 3, 80 "bcary_light": 1, 81 }, 82 ) 83 self.modes = ( 84 { 85 "f_org": 1 - self.f_soluble_volume(mode), 86 "kappa": self.kappa( 87 mass_fractions=mode, water_molar_volume=water_molar_volume 88 ), 89 "nu_org": self.nu_org(mode), 90 "spectrum": spectra.Lognormal( 91 norm_factor=N / si.cm**3, m_mode=50.0 * si.nm, s_geom=1.75 92 ), 93 }, 94 ) 95 96 color = "orange"
AerosolBetaCaryophylleneLight(water_molar_volume: float, Forg: float = 0.8, N: float = 400)
56 def __init__(self, water_molar_volume: float, Forg: float = 0.8, N: float = 400): 57 mode = { 58 "(NH4)2SO4": (1 - Forg), 59 "bcary_light": Forg, 60 } 61 62 super().__init__( 63 compounds=("(NH4)2SO4", "bcary_light"), 64 molar_masses={ 65 "(NH4)2SO4": Substance.from_formula("(NH4)2SO4").mass 66 * si.gram 67 / si.mole, 68 "bcary_light": 360 * si.gram / si.mole, 69 }, 70 densities={ 71 "(NH4)2SO4": 1.77 * si.g / si.cm**3, 72 "bcary_light": 1.50 * si.g / si.cm**3, 73 }, 74 is_soluble={ 75 "(NH4)2SO4": False, 76 "bcary_light": True, 77 }, 78 ionic_dissociation_phi={ 79 "(NH4)2SO4": 3, 80 "bcary_light": 1, 81 }, 82 ) 83 self.modes = ( 84 { 85 "f_org": 1 - self.f_soluble_volume(mode), 86 "kappa": self.kappa( 87 mass_fractions=mode, water_molar_volume=water_molar_volume 88 ), 89 "nu_org": self.nu_org(mode), 90 "spectrum": spectra.Lognormal( 91 norm_factor=N / si.cm**3, m_mode=50.0 * si.nm, s_geom=1.75 92 ), 93 }, 94 )
@strict
class
AerosolAlphaPineneDark99@strict 100class AerosolAlphaPineneDark(DryAerosolMixture): 101 def __init__(self, water_molar_volume: float, Forg: float = 0.8, N: float = 400): 102 mode = { 103 "(NH4)2SO4": (1 - Forg), 104 "apinene_dark": Forg, 105 } 106 107 super().__init__( 108 compounds=("(NH4)2SO4", "apinene_dark"), 109 molar_masses={ 110 "(NH4)2SO4": Substance.from_formula("(NH4)2SO4").mass 111 * si.gram 112 / si.mole, 113 "apinene_dark": 209 * si.gram / si.mole, 114 }, 115 densities={ 116 "(NH4)2SO4": 1.77 * si.g / si.cm**3, 117 "apinene_dark": 1.27 * si.g / si.cm**3, 118 }, 119 is_soluble={ 120 "(NH4)2SO4": False, 121 "apinene_dark": True, 122 }, 123 ionic_dissociation_phi={ 124 "(NH4)2SO4": 3, 125 "apinene_dark": 1, 126 }, 127 ) 128 self.modes = ( 129 { 130 "f_org": 1 - self.f_soluble_volume(mode), 131 "kappa": self.kappa( 132 mass_fractions=mode, water_molar_volume=water_molar_volume 133 ), 134 "nu_org": self.nu_org(mode), 135 "spectrum": spectra.Lognormal( 136 norm_factor=N / si.cm**3, m_mode=50.0 * si.nm, s_geom=1.75 137 ), 138 }, 139 ) 140 141 color = "green"
AerosolAlphaPineneDark(water_molar_volume: float, Forg: float = 0.8, N: float = 400)
101 def __init__(self, water_molar_volume: float, Forg: float = 0.8, N: float = 400): 102 mode = { 103 "(NH4)2SO4": (1 - Forg), 104 "apinene_dark": Forg, 105 } 106 107 super().__init__( 108 compounds=("(NH4)2SO4", "apinene_dark"), 109 molar_masses={ 110 "(NH4)2SO4": Substance.from_formula("(NH4)2SO4").mass 111 * si.gram 112 / si.mole, 113 "apinene_dark": 209 * si.gram / si.mole, 114 }, 115 densities={ 116 "(NH4)2SO4": 1.77 * si.g / si.cm**3, 117 "apinene_dark": 1.27 * si.g / si.cm**3, 118 }, 119 is_soluble={ 120 "(NH4)2SO4": False, 121 "apinene_dark": True, 122 }, 123 ionic_dissociation_phi={ 124 "(NH4)2SO4": 3, 125 "apinene_dark": 1, 126 }, 127 ) 128 self.modes = ( 129 { 130 "f_org": 1 - self.f_soluble_volume(mode), 131 "kappa": self.kappa( 132 mass_fractions=mode, water_molar_volume=water_molar_volume 133 ), 134 "nu_org": self.nu_org(mode), 135 "spectrum": spectra.Lognormal( 136 norm_factor=N / si.cm**3, m_mode=50.0 * si.nm, s_geom=1.75 137 ), 138 }, 139 )
@strict
class
AerosolAlphaPineneLight144@strict 145class AerosolAlphaPineneLight(DryAerosolMixture): 146 def __init__(self, water_molar_volume: float, Forg: float = 0.8, N: float = 400): 147 mode = { 148 "(NH4)2SO4": (1 - Forg), 149 "apinene_light": Forg, 150 } 151 152 super().__init__( 153 compounds=("(NH4)2SO4", "apinene_light"), 154 molar_masses={ 155 "(NH4)2SO4": Substance.from_formula("(NH4)2SO4").mass 156 * si.gram 157 / si.mole, 158 "apinene_light": 265 * si.gram / si.mole, 159 }, 160 densities={ 161 "(NH4)2SO4": 1.77 * si.g / si.cm**3, 162 "apinene_light": 1.51 * si.g / si.cm**3, 163 }, 164 is_soluble={ 165 "(NH4)2SO4": False, 166 "apinene_light": True, 167 }, 168 ionic_dissociation_phi={ 169 "(NH4)2SO4": 3, 170 "apinene_light": 1, 171 }, 172 ) 173 self.modes = ( 174 { 175 "f_org": 1 - self.f_soluble_volume(mode), 176 "kappa": self.kappa( 177 mass_fractions=mode, water_molar_volume=water_molar_volume 178 ), 179 "nu_org": self.nu_org(mode), 180 "spectrum": spectra.Lognormal( 181 norm_factor=N / si.cm**3, m_mode=50.0 * si.nm, s_geom=1.75 182 ), 183 }, 184 ) 185 186 color = "lightgreen"
AerosolAlphaPineneLight(water_molar_volume: float, Forg: float = 0.8, N: float = 400)
146 def __init__(self, water_molar_volume: float, Forg: float = 0.8, N: float = 400): 147 mode = { 148 "(NH4)2SO4": (1 - Forg), 149 "apinene_light": Forg, 150 } 151 152 super().__init__( 153 compounds=("(NH4)2SO4", "apinene_light"), 154 molar_masses={ 155 "(NH4)2SO4": Substance.from_formula("(NH4)2SO4").mass 156 * si.gram 157 / si.mole, 158 "apinene_light": 265 * si.gram / si.mole, 159 }, 160 densities={ 161 "(NH4)2SO4": 1.77 * si.g / si.cm**3, 162 "apinene_light": 1.51 * si.g / si.cm**3, 163 }, 164 is_soluble={ 165 "(NH4)2SO4": False, 166 "apinene_light": True, 167 }, 168 ionic_dissociation_phi={ 169 "(NH4)2SO4": 3, 170 "apinene_light": 1, 171 }, 172 ) 173 self.modes = ( 174 { 175 "f_org": 1 - self.f_soluble_volume(mode), 176 "kappa": self.kappa( 177 mass_fractions=mode, water_molar_volume=water_molar_volume 178 ), 179 "nu_org": self.nu_org(mode), 180 "spectrum": spectra.Lognormal( 181 norm_factor=N / si.cm**3, m_mode=50.0 * si.nm, s_geom=1.75 182 ), 183 }, 184 )