Skip to content

Commit b49a21d

Browse files
add isotopic ventilation ratio to physics (f_heavy to f_light) (#1532)
Co-authored-by: Sylwester Arabas <[email protected]>
1 parent 22b8101 commit b49a21d

File tree

22 files changed

+284
-11290
lines changed

22 files changed

+284
-11290
lines changed

PySDM/formulae.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
from PySDM.dynamics.terminal_velocity.gunn_and_kinzer import TpDependent
2424

2525

26-
class Formulae: # pylint: disable=too-few-public-methods,too-many-instance-attributes
26+
class Formulae: # pylint: disable=too-few-public-methods,too-many-instance-attributes,too-many-statements
2727
def __init__( # pylint: disable=too-many-locals
2828
self,
2929
*,
@@ -55,6 +55,7 @@ def __init__( # pylint: disable=too-many-locals
5555
isotope_diffusivity_ratios: str = "Null",
5656
isotope_relaxation_timescale: str = "Null",
5757
isotope_temperature_inference: str = "Null",
58+
isotope_ventilation_ratio: str = "Null",
5859
optical_albedo: str = "Null",
5960
optical_depth: str = "Null",
6061
particle_shape_and_density: str = "LiquidSpheres",
@@ -97,6 +98,7 @@ def __init__( # pylint: disable=too-many-locals
9798
self.isotope_diffusivity_ratios = isotope_diffusivity_ratios
9899
self.isotope_relaxation_timescale = isotope_relaxation_timescale
99100
self.isotope_temperature_inference = isotope_temperature_inference
101+
self.isotope_ventilation_ratio = isotope_ventilation_ratio
100102
self.particle_shape_and_density = particle_shape_and_density
101103
self.air_dynamic_viscosity = air_dynamic_viscosity
102104
self.terminal_velocity = terminal_velocity

PySDM/physics/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
isotope_diffusivity_ratios,
3838
isotope_relaxation_timescale,
3939
isotope_temperature_inference,
40+
isotope_ventilation_ratio,
4041
latent_heat_vapourisation,
4142
latent_heat_sublimation,
4243
optical_albedo,

PySDM/physics/constants_defaults.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -519,6 +519,8 @@
519519
PRUPPACHER_RASMUSSEN_1979_XTHRES = 1.4 * si.dimensionless
520520
"""
521521
[Pruppacher & Rasmussen 1979](https://doi.org/10.1175/1520-0469%281979%29036%3C1255:AWTIOT%3E2.0.CO;2)
522+
also in
523+
[Beard & Pruppacher 1971](https://doi.org/10.1175/1520-0469%281971%29028%3C1455:AWTIOT%3E2.0.CO;2)
522524
""" # pylint: disable=line-too-long
523525
PRUPPACHER_RASMUSSEN_1979_CONSTSMALL = 1.0 * si.dimensionless
524526
""" 〃 """

PySDM/physics/isotope_diffusivity_ratios/grahams_law.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ def __init__(self, _):
88
pass
99

1010
@staticmethod
11-
def ratio_2H(const, temperature): # pylint: disable=unused-argument
11+
def ratio_2H_heavy_to_light(const, temperature): # pylint: disable=unused-argument
1212
return (
1313
(2 * const.M_1H + const.M_16O) / (const.M_2H + const.M_1H + const.M_16O)
1414
) ** const.ONE_HALF

PySDM/physics/isotope_diffusivity_ratios/hellmann_and_harvey_2020.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ def __init__(self, _):
99
pass
1010

1111
@staticmethod
12-
def ratio_2H(const, temperature):
12+
def ratio_2H_heavy_to_light(const, temperature):
1313
return (
1414
const.HELLMANN_HARVEY_EQ6_COEFF0
1515
+ const.HELLMANN_HARVEY_EQ6_COEFF1
@@ -19,7 +19,7 @@ def ratio_2H(const, temperature):
1919
)
2020

2121
@staticmethod
22-
def ratio_17O(const, temperature):
22+
def ratio_17O_heavy_to_light(const, temperature):
2323
return (
2424
const.HELLMANN_HARVEY_EQ7_COEFF0
2525
+ const.HELLMANN_HARVEY_EQ7_COEFF1
@@ -29,7 +29,7 @@ def ratio_17O(const, temperature):
2929
)
3030

3131
@staticmethod
32-
def ratio_18O(const, temperature):
32+
def ratio_18O_heavy_to_light(const, temperature):
3333
return (
3434
const.HELLMANN_HARVEY_EQ8_COEFF0
3535
+ const.HELLMANN_HARVEY_EQ8_COEFF1

PySDM/physics/isotope_diffusivity_ratios/stewart_1975.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def __init__(self, _):
1717
pass
1818

1919
@staticmethod
20-
def ratio_2H(const, temperature): # pylint: disable=unused-argument
20+
def ratio_2H_heavy_to_light(const, temperature): # pylint: disable=unused-argument
2121
return (
2222
(
2323
(2 * const.M_1H + const.M_16O)
@@ -30,7 +30,7 @@ def ratio_2H(const, temperature): # pylint: disable=unused-argument
3030
) ** const.ONE_HALF
3131

3232
@staticmethod
33-
def ratio_18O(const, temperature): # pylint: disable=unused-argument
33+
def ratio_18O_heavy_to_light(const, temperature): # pylint: disable=unused-argument
3434
return (
3535
((2 * const.M_1H + const.M_16O) * (const.Md + 2 * const.M_1H + const.M_18O))
3636
/ (

PySDM/physics/isotope_kinetic_fractionation_factors/craig_gordon.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ def __init__(self, _):
1313

1414
@staticmethod
1515
def alpha_kinetic(*, relative_humidity, turbulence_parameter_n, delta_diff, theta):
16-
"""delta_diff = 1 - heavy_to_light_diffusivity_ratio"""
16+
"""delta_diff = 1 - diffusivity_ratio_heavy_to_light"""
1717
return 1 + theta * turbulence_parameter_n * delta_diff * (1 - relative_humidity)

PySDM/physics/isotope_kinetic_fractionation_factors/jouzel_and_merlivat_1984.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ def __init__(self, _):
1010

1111
@staticmethod
1212
def alpha_kinetic(
13-
alpha_equilibrium, saturation_over_ice, heavy_to_light_diffusivity_ratio
13+
alpha_equilibrium, saturation_over_ice, diffusivity_ratio_heavy_to_light
1414
):
1515
"""eq. (11)"""
1616
return saturation_over_ice / (
1717
alpha_equilibrium
18-
/ heavy_to_light_diffusivity_ratio
18+
/ diffusivity_ratio_heavy_to_light
1919
* (saturation_over_ice - 1)
2020
+ 1
2121
)
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
"""
2+
Isotope ventilation coefficient formulae
3+
"""
4+
5+
from PySDM.impl.null_physics_class import Null
6+
from .neglect import Neglect
7+
from .brutsaert_1982 import Brutsaert1982
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
"""
2+
based on [Brutsaert 1982](https://doi.org/10.1007/978-94-017-1497-6) Springer Netherlands
3+
statement about ventilation coefficient for heavy isotopes on pp. 92-93.
4+
"""
5+
6+
7+
class Brutsaert1982: # pylint: disable=too-few-public-methods
8+
def __init__(self, _):
9+
pass
10+
11+
@staticmethod
12+
def ratio_heavy_to_light(ventilation_coefficient, diffusivity_ratio_heavy_to_light):
13+
"""heavy to light isotope ventilation ratio"""
14+
return (
15+
1 - diffusivity_ratio_heavy_to_light ** (1 / 3)
16+
) / ventilation_coefficient + diffusivity_ratio_heavy_to_light ** (1 / 3)

0 commit comments

Comments
 (0)