Skip to content

Commit

Permalink
Arabas et al. 2023 immersion freezing example updates to match paper …
Browse files Browse the repository at this point in the history
…revision (#1339)
  • Loading branch information
slayoo authored Nov 10, 2024
1 parent 4315ea3 commit d00d17c
Show file tree
Hide file tree
Showing 15 changed files with 80,220 additions and 8,017 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests+artifacts+pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ jobs:
test-suite: [ "chemistry_freezing_isotopes", "condensation_a", "condensation_b", "coagulation", "breakup", "multi-process_a", "multi-process_b"]
fail-fast: false
runs-on: ${{ matrix.platform }}
timeout-minutes: ${{ startsWith(matrix.platform, 'windows-') && 65 || 50 }}
timeout-minutes: ${{ !startsWith(matrix.platform, 'ubuntu-') && 65 || 50 }}
steps:
- uses: actions/[email protected]
with:
Expand Down
3 changes: 3 additions & 0 deletions PySDM/attributes/ice/cooling_rate.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ def __init__(self, builder):
builder.particulator.observers.append(self)

def notify(self):
"""triggers update to ensure recalculation is done before
overwriting `self.prev_T` with current temperature"""
self.update()
cell_id = self.particulator.attributes["cell id"]
self.prev_T[:] = self.particulator.environment["T"][cell_id]

Expand Down
4 changes: 1 addition & 3 deletions examples/PySDM_examples/Arabas_et_al_2015/spin_up.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from PySDM.dynamics import Collision, Displacement, Freezing
from PySDM.dynamics import Collision, Displacement


class SpinUp:
Expand All @@ -8,13 +8,11 @@ def __init__(self, particulator, spin_up_steps):
self.particulator = particulator
self.set(Collision, "enable", False)
self.set(Displacement, "enable_sedimentation", False)
self.set(Freezing, "enable", False)

def notify(self):
if self.particulator.n_steps == self.spin_up_steps:
self.set(Collision, "enable", True)
self.set(Displacement, "enable_sedimentation", True)
self.set(Freezing, "enable", True)

def set(self, dynamic, attr, value):
key = dynamic.__name__
Expand Down
2 changes: 1 addition & 1 deletion examples/PySDM_examples/Arabas_et_al_2023/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
.. include:: ./fig_2.ipynb.badges.md
fig_11.ipynb:
.. include:: ./fig_11.ipynb.badges.md
.. include:: ./figs_10_and_11_and_animations.ipynb
fig_A2.ipynb:
.. include:: ./fig_A2.ipynb.badges.md
Expand Down
2 changes: 1 addition & 1 deletion examples/PySDM_examples/Arabas_et_al_2023/commons.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"illite": {"ABIFM_M": 54.48, "ABIFM_C": -10.67},
}

COOLING_RATES = (3.75 * si.K / si.min, 0.75 * si.K / si.min, 0.15 * si.K / si.min)
COOLING_RATES = (-3.75 * si.K / si.min, -0.75 * si.K / si.min, -0.15 * si.K / si.min)

BEST_FIT_LN_S_GEOM = 0.25

Expand Down
Loading

0 comments on commit d00d17c

Please sign in to comment.