-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
new examples & smoke tests: Gedzelman & Arnold 1994 fig 2, Miyake et …
…al. 1968 fig 19; isotope diffusivity ratios in Formulae (Graham's law; Stewart 1975; Hellmann & Harvey); isotope relaxation timescales formulae (Miyake); new ventilation test based on Kinzer & Gunn 1951 table 1; null refactor in Formulae; access to RogersYau terminal vel. from Formulae (#1307)
- Loading branch information
Showing
48 changed files
with
15,137 additions
and
125 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
""" heavy-to-light diffusivity ratios for water molecules """ | ||
|
||
from PySDM.impl.null_physics_class import Null | ||
from .grahams_law import GrahamsLaw | ||
from .stewart_1975 import Stewart1975 | ||
from .hellmann_and_harvey_2020 import HellmannAndHarvey2020 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
""" [Graham's law](https://en.wikipedia.org/wiki/Graham%27s_law) | ||
see also eq. (21) in [Horita et al. 2008](https://doi.org/10.1080/10256010801887174) | ||
""" | ||
|
||
|
||
class GrahamsLaw: # pylint: disable=too-few-public-methods | ||
def __init__(self, _): | ||
pass | ||
|
||
@staticmethod | ||
def ratio_2H(const, temperature): # pylint: disable=unused-argument | ||
return ( | ||
(2 * const.M_1H + const.M_16O) / (const.M_2H + const.M_1H + const.M_16O) | ||
) ** const.ONE_HALF |
39 changes: 39 additions & 0 deletions
39
PySDM/physics/isotope_diffusivity_ratios/hellmann_and_harvey_2020.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
""" | ||
Ratios of diffusivity in air of heavy vs. light isotope using fits provided in | ||
[Hellmann & Harvey 2020](https://doi.org/10.1029/2020GL089999) | ||
""" | ||
|
||
|
||
class HellmannAndHarvey2020: | ||
def __init__(self, _): | ||
pass | ||
|
||
@staticmethod | ||
def ratio_2H(const, temperature): | ||
return ( | ||
const.HELLMANN_HARVEY_EQ6_COEFF0 | ||
+ const.HELLMANN_HARVEY_EQ6_COEFF1 | ||
/ (temperature / const.HELLMANN_HARVEY_T_UNIT) | ||
+ const.HELLMANN_HARVEY_EQ6_COEFF2 | ||
/ (temperature / const.HELLMANN_HARVEY_T_UNIT) ** (const.TWO_AND_A_HALF) | ||
) | ||
|
||
@staticmethod | ||
def ratio_17O(const, temperature): | ||
return ( | ||
const.HELLMANN_HARVEY_EQ7_COEFF0 | ||
+ const.HELLMANN_HARVEY_EQ7_COEFF1 | ||
/ (temperature / const.HELLMANN_HARVEY_T_UNIT) ** (const.ONE_HALF) | ||
+ const.HELLMANN_HARVEY_EQ7_COEFF2 | ||
/ (temperature / const.HELLMANN_HARVEY_T_UNIT) ** (const.TWO_AND_A_HALF) | ||
) | ||
|
||
@staticmethod | ||
def ratio_18O(const, temperature): | ||
return ( | ||
const.HELLMANN_HARVEY_EQ8_COEFF0 | ||
+ const.HELLMANN_HARVEY_EQ8_COEFF1 | ||
/ (temperature / const.HELLMANN_HARVEY_T_UNIT) ** (const.ONE_HALF) | ||
+ const.HELLMANN_HARVEY_EQ8_COEFF2 | ||
/ (temperature / const.HELLMANN_HARVEY_T_UNIT) ** (const.THREE) | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
""" | ||
Temperature-independent ratio of vapour diffusivity in air for heavy vs. light isotopes | ||
assuming same collision diameters for different isotopic water molecules, see: | ||
eq. (8) in [Stewart 1975](https://doi.org/10.1029/JC080i009p01133), | ||
eq. (1) in [Merlivat 1978](https://doi.org/10.1063/1.436884), | ||
eq. (6) in [Cappa et al. 2003](https://doi.org/10.1029/2003JD003597), | ||
eq. (22) in [Horita et al. 2008](https://doi.org/10.1080/10256010801887174), | ||
eq. (3) in [Hellmann and Harvey 2020](https://doi.org/10.1029/2020GL089999). | ||
All functions return constants, so there is a potential overhead in computing them on each call, | ||
but this variant is provided for historical reference only, hence leaving like that. | ||
""" | ||
|
||
|
||
class Stewart1975: | ||
def __init__(self, _): | ||
pass | ||
|
||
@staticmethod | ||
def ratio_2H(const, temperature): # pylint: disable=unused-argument | ||
return ( | ||
( | ||
(2 * const.M_1H + const.M_16O) | ||
* (const.Md + const.M_2H + const.M_1H + const.M_16O) | ||
) | ||
/ ( | ||
(const.M_2H + const.M_1H + const.M_16O) | ||
* (const.Md + (2 * const.M_1H + const.M_16O)) | ||
) | ||
) ** const.ONE_HALF | ||
|
||
@staticmethod | ||
def ratio_18O(const, temperature): # pylint: disable=unused-argument | ||
return ( | ||
((2 * const.M_1H + const.M_16O) * (const.Md + 2 * const.M_1H + const.M_18O)) | ||
/ ( | ||
(2 * const.M_1H + const.M_18O) | ||
* (const.Md + (2 * const.M_1H + const.M_16O)) | ||
) | ||
) ** const.ONE_HALF |
Oops, something went wrong.