PySDM_examples.deJong_Azimi.settings1D
1from typing import Iterable 2 3from PySDM_examples.Shipway_and_Hill_2012 import Settings as SettingsSH 4 5from PySDM import Formulae 6from PySDM.initialisation import spectra 7from PySDM.physics import si 8from PySDM.dynamics.collisions.collision_kernels import Golovin 9 10 11class Settings1D(SettingsSH): 12 def __dir__(self) -> Iterable[str]: 13 return ( 14 "n_sd_per_gridbox", 15 "p0", 16 "kappa", 17 "rho_times_w_1", 18 "particles_per_volume_STP", 19 "dt", 20 "dz", 21 "precip", 22 "z_max", 23 "t_max", 24 "cloud_water_radius_range", 25 "rain_water_radius_range", 26 "r_bins_edges_dry", 27 "r_bins_edges", 28 ) 29 30 def __init__( 31 self, 32 *, 33 n_sd_per_gridbox: int, 34 p0: float = 1007 * si.hPa, # as used in Olesik et al. 2022 (GMD) 35 kappa: float = 1, 36 rho_times_w_1: float = 2 * si.m / si.s * si.kg / si.m**3, 37 particles_per_volume_STP: int = 100 / si.cm**3, 38 dt: float = 1 * si.s, 39 dz: float = 25 * si.m, 40 z_max: float = 3000 * si.m, 41 t_max: float = 60 * si.minutes, 42 precip: bool = True, 43 formulae: Formulae = None, 44 save_spec_and_attr_times=(), 45 z_part=(0.5, 0.75) 46 ): 47 super().__init__( 48 n_sd_per_gridbox=n_sd_per_gridbox, 49 p0=p0, 50 kappa=kappa, 51 rho_times_w_1=rho_times_w_1, 52 particles_per_volume_STP=particles_per_volume_STP, 53 dt=dt, 54 dz=dz, 55 z_max=z_max, 56 t_max=t_max, 57 precip=precip, 58 formulae=formulae or Formulae(terminal_velocity="PowerSeries"), 59 save_spec_and_attr_times=save_spec_and_attr_times, 60 enable_condensation=False, 61 collision_kernel=Golovin(b=5e3), 62 ) 63 self.z_part = z_part 64 z_frac = z_part[1] - z_part[0] 65 norm_factor = ( 66 particles_per_volume_STP / self.formulae.constants.rho_STP * z_frac 67 ) 68 self.wet_radius_spectrum_per_mass_of_dry_air = spectra.Gamma( 69 norm_factor=norm_factor, 70 k=1.0, 71 theta=1e5 * si.um**3, 72 )
12class Settings1D(SettingsSH): 13 def __dir__(self) -> Iterable[str]: 14 return ( 15 "n_sd_per_gridbox", 16 "p0", 17 "kappa", 18 "rho_times_w_1", 19 "particles_per_volume_STP", 20 "dt", 21 "dz", 22 "precip", 23 "z_max", 24 "t_max", 25 "cloud_water_radius_range", 26 "rain_water_radius_range", 27 "r_bins_edges_dry", 28 "r_bins_edges", 29 ) 30 31 def __init__( 32 self, 33 *, 34 n_sd_per_gridbox: int, 35 p0: float = 1007 * si.hPa, # as used in Olesik et al. 2022 (GMD) 36 kappa: float = 1, 37 rho_times_w_1: float = 2 * si.m / si.s * si.kg / si.m**3, 38 particles_per_volume_STP: int = 100 / si.cm**3, 39 dt: float = 1 * si.s, 40 dz: float = 25 * si.m, 41 z_max: float = 3000 * si.m, 42 t_max: float = 60 * si.minutes, 43 precip: bool = True, 44 formulae: Formulae = None, 45 save_spec_and_attr_times=(), 46 z_part=(0.5, 0.75) 47 ): 48 super().__init__( 49 n_sd_per_gridbox=n_sd_per_gridbox, 50 p0=p0, 51 kappa=kappa, 52 rho_times_w_1=rho_times_w_1, 53 particles_per_volume_STP=particles_per_volume_STP, 54 dt=dt, 55 dz=dz, 56 z_max=z_max, 57 t_max=t_max, 58 precip=precip, 59 formulae=formulae or Formulae(terminal_velocity="PowerSeries"), 60 save_spec_and_attr_times=save_spec_and_attr_times, 61 enable_condensation=False, 62 collision_kernel=Golovin(b=5e3), 63 ) 64 self.z_part = z_part 65 z_frac = z_part[1] - z_part[0] 66 norm_factor = ( 67 particles_per_volume_STP / self.formulae.constants.rho_STP * z_frac 68 ) 69 self.wet_radius_spectrum_per_mass_of_dry_air = spectra.Gamma( 70 norm_factor=norm_factor, 71 k=1.0, 72 theta=1e5 * si.um**3, 73 )
Settings1D( *, n_sd_per_gridbox: int, p0: float = 100700.0, kappa: float = 1, rho_times_w_1: float = 2.0, particles_per_volume_STP: int = 99999999.99999999, dt: float = 1.0, dz: float = 25.0, z_max: float = 3000.0, t_max: float = 3600.0, precip: bool = True, formulae: PySDM.formulae.Formulae = None, save_spec_and_attr_times=(), z_part=(0.5, 0.75))
31 def __init__( 32 self, 33 *, 34 n_sd_per_gridbox: int, 35 p0: float = 1007 * si.hPa, # as used in Olesik et al. 2022 (GMD) 36 kappa: float = 1, 37 rho_times_w_1: float = 2 * si.m / si.s * si.kg / si.m**3, 38 particles_per_volume_STP: int = 100 / si.cm**3, 39 dt: float = 1 * si.s, 40 dz: float = 25 * si.m, 41 z_max: float = 3000 * si.m, 42 t_max: float = 60 * si.minutes, 43 precip: bool = True, 44 formulae: Formulae = None, 45 save_spec_and_attr_times=(), 46 z_part=(0.5, 0.75) 47 ): 48 super().__init__( 49 n_sd_per_gridbox=n_sd_per_gridbox, 50 p0=p0, 51 kappa=kappa, 52 rho_times_w_1=rho_times_w_1, 53 particles_per_volume_STP=particles_per_volume_STP, 54 dt=dt, 55 dz=dz, 56 z_max=z_max, 57 t_max=t_max, 58 precip=precip, 59 formulae=formulae or Formulae(terminal_velocity="PowerSeries"), 60 save_spec_and_attr_times=save_spec_and_attr_times, 61 enable_condensation=False, 62 collision_kernel=Golovin(b=5e3), 63 ) 64 self.z_part = z_part 65 z_frac = z_part[1] - z_part[0] 66 norm_factor = ( 67 particles_per_volume_STP / self.formulae.constants.rho_STP * z_frac 68 ) 69 self.wet_radius_spectrum_per_mass_of_dry_air = spectra.Gamma( 70 norm_factor=norm_factor, 71 k=1.0, 72 theta=1e5 * si.um**3, 73 )
Inherited Members
- PySDM_examples.Shipway_and_Hill_2012.settings.Settings
- formulae
- n_sd_per_gridbox
- p0
- kappa
- rho_times_w_1
- particles_per_volume_STP
- dt
- dz
- precip
- enable_condensation
- z_max
- t_max
- collision_kernel
- rho_times_w
- particle_reservoir_depth
- water_vapour_mixing_ratio
- thd
- rhod0
- rhod
- mpdata_settings
- condensation_rtol_x
- condensation_rtol_thd
- condensation_adaptive
- condensation_update_thd
- coalescence_adaptive
- number_of_bins
- r_bins_edges_dry
- r_bins_edges
- cloud_water_radius_range
- cloud_water_radius_range_igel
- rain_water_radius_range
- rain_water_radius_range_igel
- save_spec_and_attr_times
- n_sd
- nz
- nt