PySDM 2.45__py3-none-any.whl → 2.47__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. PySDM/attributes/impl/mapper.py +7 -0
  2. PySDM/attributes/physics/__init__.py +1 -0
  3. PySDM/attributes/physics/reynolds_number.py +27 -0
  4. PySDM/backends/impl_numba/methods/condensation_methods.py +278 -316
  5. PySDM/backends/impl_numba/methods/physics_methods.py +69 -0
  6. PySDM/backends/impl_numba/test_helpers/scipy_ode_condensation_solver.py +137 -88
  7. PySDM/backends/impl_thrust_rtc/methods/condensation_methods.py +41 -3
  8. PySDM/backends/impl_thrust_rtc/methods/physics_methods.py +88 -0
  9. PySDM/backends/impl_thrust_rtc/test_helpers/cpp2python.py +2 -1
  10. PySDM/dynamics/condensation.py +1 -0
  11. PySDM/environments/impl/moist.py +27 -1
  12. PySDM/formulae.py +29 -9
  13. PySDM/particulator.py +3 -0
  14. PySDM/physics/__init__.py +1 -0
  15. PySDM/physics/air_dynamic_viscosity/__init__.py +3 -0
  16. PySDM/physics/air_dynamic_viscosity/zografos_et_al_1987.py +21 -0
  17. PySDM/physics/constants.py +1 -0
  18. PySDM/physics/constants_defaults.py +26 -3
  19. PySDM/physics/drop_growth/maxwell_mason.py +8 -4
  20. PySDM/physics/particle_shape_and_density/liquid_spheres.py +5 -0
  21. PySDM/physics/trivia.py +8 -0
  22. PySDM/physics/ventilation/__init__.py +2 -0
  23. PySDM/physics/ventilation/froessling_1938.py +13 -0
  24. PySDM/physics/ventilation/neglect.py +6 -0
  25. PySDM/physics/ventilation/pruppacher_rasmussen_1979.py +33 -0
  26. {PySDM-2.45.dist-info → PySDM-2.47.dist-info}/METADATA +2 -2
  27. {PySDM-2.45.dist-info → PySDM-2.47.dist-info}/RECORD +30 -25
  28. {PySDM-2.45.dist-info → PySDM-2.47.dist-info}/WHEEL +1 -1
  29. {PySDM-2.45.dist-info → PySDM-2.47.dist-info}/LICENSE +0 -0
  30. {PySDM-2.45.dist-info → PySDM-2.47.dist-info}/top_level.txt +0 -0
@@ -29,6 +29,7 @@ from PySDM.attributes.physics import (
29
29
  Volume,
30
30
  WaterMass,
31
31
  WetToCriticalVolumeRatio,
32
+ ReynoldsNumber,
32
33
  )
33
34
  from PySDM.attributes.physics.critical_supersaturation import CriticalSupersaturation
34
35
  from PySDM.attributes.physics.dry_volume import (
@@ -45,6 +46,7 @@ from PySDM.attributes.physics.relative_fall_velocity import RelativeFallMomentum
45
46
  from PySDM.dynamics.impl.chemistry_utils import AQUEOUS_COMPOUNDS
46
47
  from PySDM.dynamics.isotopic_fractionation import HEAVY_ISOTOPES
47
48
  from PySDM.physics.surface_tension import Constant
49
+ from PySDM.physics.ventilation import Neglect
48
50
 
49
51
  attributes = {
50
52
  "multiplicity": lambda _, __: Multiplicities,
@@ -116,6 +118,11 @@ attributes = {
116
118
  "moles_1H": lambda _, __: Moles1H,
117
119
  "moles_16O": lambda _, __: Moles16O,
118
120
  "moles light water": lambda _, __: MolesLightWater,
121
+ "Reynolds number": lambda _, formulae: (
122
+ make_dummy_attribute_factory("Reynolds number")
123
+ if formulae.ventilation.__name__ == Neglect.__name__
124
+ else ReynoldsNumber
125
+ ),
119
126
  }
120
127
 
121
128
 
@@ -16,3 +16,4 @@ from .relative_fall_velocity import RelativeFallMomentum, RelativeFallVelocity
16
16
  from .temperature import Temperature
17
17
  from .terminal_velocity import TerminalVelocity
18
18
  from .volume import Volume
19
+ from .reynolds_number import ReynoldsNumber
@@ -0,0 +1,27 @@
1
+ """
2
+ particle Reynolds number
3
+ """
4
+
5
+ from ..impl.derived_attribute import DerivedAttribute
6
+
7
+
8
+ class ReynoldsNumber(DerivedAttribute):
9
+ def __init__(self, builder):
10
+ self.radius = builder.get_attribute("radius")
11
+ self.velocity_wrt_air = builder.get_attribute("relative fall velocity")
12
+ self.cell_id = builder.get_attribute("cell id")
13
+ super().__init__(
14
+ builder,
15
+ name="Reynolds number",
16
+ dependencies=(self.radius, self.velocity_wrt_air, self.cell_id),
17
+ )
18
+
19
+ def recalculate(self):
20
+ self.particulator.backend.reynolds_number(
21
+ output=self.data,
22
+ cell_id=self.cell_id.get(),
23
+ dynamic_viscosity=self.particulator.environment["air dynamic viscosity"],
24
+ density=self.particulator.environment["air density"],
25
+ radius=self.radius.data,
26
+ velocity_wrt_air=self.velocity_wrt_air.data,
27
+ )