PySDM_examples.Arabas_et_al_2015.settings
1from typing import Iterable 2 3import numpy as np 4from PySDM_examples.Morrison_and_Grabowski_2007.strato_cumulus import StratoCumulus 5 6from PySDM import Formulae 7from PySDM.dynamics.collisions.breakup_efficiencies import ConstEb 8from PySDM.dynamics.collisions.breakup_fragmentations import Gaussian 9from PySDM.dynamics.collisions.coalescence_efficiencies import ConstEc 10from PySDM.physics import si 11 12 13class Settings(StratoCumulus): 14 def __dir__(self) -> Iterable[str]: 15 return ( 16 "dt", 17 "grid", 18 "size", 19 "n_spin_up", 20 "versions", 21 "steps_per_output_interval", 22 "formulae", 23 "initial_dry_potential_temperature_profile", 24 "initial_vapour_mixing_ratio_profile", 25 "rhod_w_max", 26 ) 27 28 def __init__( 29 self, 30 formulae=None, 31 rhod_w_max: float = 0.6 * si.metres / si.seconds * (si.kilogram / si.metre**3), 32 ): 33 super().__init__(formulae or Formulae(), rhod_w_max=rhod_w_max) 34 35 self.grid = (25, 25) 36 self.size = (1500 * si.metres, 1500 * si.metres) 37 38 # output steps 39 self.simulation_time = 90 * si.minute 40 self.dt = 5 * si.second 41 self.spin_up_time = 1 * si.hour 42 43 # additional breakup dynamics 44 mu_r = 10 * si.um 45 mu = 4 / 3 * np.pi * mu_r**3 46 sigma = mu / 2.5 47 vmin = mu / 1000 48 self.coalescence_efficiency = ConstEc(Ec=0.95) 49 self.breakup_efficiency = ConstEb(Eb=1.0) 50 self.breakup_fragmentation = Gaussian(mu=mu, sigma=sigma, vmin=vmin, nfmax=10)
14class Settings(StratoCumulus): 15 def __dir__(self) -> Iterable[str]: 16 return ( 17 "dt", 18 "grid", 19 "size", 20 "n_spin_up", 21 "versions", 22 "steps_per_output_interval", 23 "formulae", 24 "initial_dry_potential_temperature_profile", 25 "initial_vapour_mixing_ratio_profile", 26 "rhod_w_max", 27 ) 28 29 def __init__( 30 self, 31 formulae=None, 32 rhod_w_max: float = 0.6 * si.metres / si.seconds * (si.kilogram / si.metre**3), 33 ): 34 super().__init__(formulae or Formulae(), rhod_w_max=rhod_w_max) 35 36 self.grid = (25, 25) 37 self.size = (1500 * si.metres, 1500 * si.metres) 38 39 # output steps 40 self.simulation_time = 90 * si.minute 41 self.dt = 5 * si.second 42 self.spin_up_time = 1 * si.hour 43 44 # additional breakup dynamics 45 mu_r = 10 * si.um 46 mu = 4 / 3 * np.pi * mu_r**3 47 sigma = mu / 2.5 48 vmin = mu / 1000 49 self.coalescence_efficiency = ConstEc(Ec=0.95) 50 self.breakup_efficiency = ConstEb(Eb=1.0) 51 self.breakup_fragmentation = Gaussian(mu=mu, sigma=sigma, vmin=vmin, nfmax=10)
Settings(formulae=None, rhod_w_max: float = 0.6)
29 def __init__( 30 self, 31 formulae=None, 32 rhod_w_max: float = 0.6 * si.metres / si.seconds * (si.kilogram / si.metre**3), 33 ): 34 super().__init__(formulae or Formulae(), rhod_w_max=rhod_w_max) 35 36 self.grid = (25, 25) 37 self.size = (1500 * si.metres, 1500 * si.metres) 38 39 # output steps 40 self.simulation_time = 90 * si.minute 41 self.dt = 5 * si.second 42 self.spin_up_time = 1 * si.hour 43 44 # additional breakup dynamics 45 mu_r = 10 * si.um 46 mu = 4 / 3 * np.pi * mu_r**3 47 sigma = mu / 2.5 48 vmin = mu / 1000 49 self.coalescence_efficiency = ConstEc(Ec=0.95) 50 self.breakup_efficiency = ConstEb(Eb=1.0) 51 self.breakup_fragmentation = Gaussian(mu=mu, sigma=sigma, vmin=vmin, nfmax=10)
Inherited Members
- PySDM_examples.Morrison_and_Grabowski_2007.strato_cumulus.StratoCumulus
- th_std0
- initial_water_vapour_mixing_ratio
- p0
- rhod_w_max
- stream_function
- rhod_of_zZ
- PySDM_examples.Morrison_and_Grabowski_2007.common.Common
- formulae
- condensation_rtol_x
- condensation_rtol_thd
- condensation_adaptive
- condensation_substeps
- condensation_dt_cond_range
- condensation_schedule
- coalescence_adaptive
- coalescence_dt_coal_range
- coalescence_optimized_random
- coalescence_substeps
- kernel
- freezing_singular
- freezing_thaw
- freezing_inp_spec
- displacement_adaptive
- displacement_rtol
- freezing_inp_frac
- n_sd_per_gridbox
- aerosol_radius_threshold
- drizzle_radius_threshold
- r_bins_edges
- T_bins_edges
- terminal_velocity_radius_bin_edges
- output_interval
- mode_1
- mode_2
- spectrum_per_mass_of_dry_air
- kappa
- processes
- mpdata_iters
- mpdata_iga
- mpdata_fct
- mpdata_tot
- versions
- n_steps
- steps_per_output_interval
- n_spin_up
- output_steps
- n_sd
- initial_vapour_mixing_ratio_profile
- initial_dry_potential_temperature_profile