Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Arabas et al. 2023 immersion freezing example updates to match paper revision #1339

Open
wants to merge 34 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
5600a89
changed aspect ratio of Fig. 6 & disabled multi-threading for box sim…
slayoo Jun 11, 2024
00521ac
changed A -> S in figures 7 & 8
slayoo Jun 11, 2024
a7bacc4
fix file naming bug introduced in earlier pylint hint fix
slayoo Jun 11, 2024
d099393
more figure updates
slayoo Jun 11, 2024
5c1b07e
cleanup volume-to-mass refactor leftover
slayoo Jul 7, 2024
acd7c60
remove unused import
slayoo Jul 7, 2024
e98de9a
fix attr name
slayoo Jul 7, 2024
19e2b6f
fix sign in definition of cooling rates (+fix axis label and line ann…
slayoo Aug 2, 2024
0bcec81
display one frame in notebook + cleanups
slayoo Aug 6, 2024
4de849b
one more try at having the image displayed in the notebook on GH
slayoo Aug 6, 2024
cd2f696
yet one more try at having the image displayed in the notebook on GH
slayoo Aug 6, 2024
ff11fdc
and yet one more try at having the image displayed in the notebook on GH
slayoo Aug 6, 2024
745da1d
minus sign instead of short dash
slayoo Aug 8, 2024
fdb92bd
add cooling_rate unit test (and improve robustness by calling update(…
slayoo Sep 5, 2024
305a952
cleanup
slayoo Sep 5, 2024
c88612e
dummy advection solver instead of dependency on MPDATA
slayoo Sep 6, 2024
83318b2
cleanup
slayoo Sep 6, 2024
5474c20
refactored paraview hello world
slayoo Sep 6, 2024
8b8ee8b
pylint hints
slayoo Sep 6, 2024
c0c7146
updated animation notebook
slayoo Sep 11, 2024
f5d7fe4
addressing pylint hints
slayoo Sep 11, 2024
6012e87
check pvpython import in separate workflow step
slayoo Sep 11, 2024
1be9aa2
bump ubuntu version
slayoo Sep 12, 2024
388fe17
bump Python version
slayoo Sep 12, 2024
5f02ed5
unbump upper Python version
slayoo Sep 12, 2024
2e58d02
address paraview deprecation notice
slayoo Sep 12, 2024
deb7ad0
pin paraview to <=5.9.1 (last version to support paraview.servermanag…
slayoo Sep 14, 2024
dfc20cc
pin newer paraview versions
slayoo Sep 15, 2024
7f6d117
fix version strings
slayoo Sep 15, 2024
c26005b
skip paraview version pin for homebrew - cannot get it to work...
slayoo Sep 15, 2024
0cfcdf4
list versions with apt-cache policy
slayoo Sep 15, 2024
e49ba61
further updates (incl cooling rate and animation fixes)
slayoo Oct 8, 2024
00e0428
resolve merge conflict
slayoo Oct 10, 2024
47c738f
address pylint and devops tests hints
slayoo Oct 23, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions .github/workflows/tests+artifacts+pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ jobs:
needs: [nojit_and_codecov]
strategy:
matrix:
platform: [ubuntu-22.04, macos-12, windows-latest]
platform: [ubuntu-24.04, macos-12, windows-latest]
python-version: ["3.9", "3.11"]
runs-on: ${{ matrix.platform }}
steps:
Expand Down Expand Up @@ -211,7 +211,7 @@ jobs:
needs: [examples-setup]
strategy:
matrix:
platform: [ubuntu-22.04, macos-12, windows-latest]
platform: [ubuntu-24.04, macos-12, windows-latest]
python-version: ["3.9", "3.11"]
test-suite: [ "chemistry_freezing_isotopes", "condensation_a", "condensation_b", "coagulation", "breakup", "multi-process_a", "multi-process_b"]
fail-fast: false
Expand Down Expand Up @@ -245,13 +245,16 @@ jobs:
- if: startsWith(matrix.platform, 'ubuntu-')
run: |
sudo apt-get update
sudo apt-get install python3-paraview
apt-cache policy python3-paraview
sudo apt-get install python3-paraview=5.11.2+dfsg-6build5
- if: startsWith(matrix.platform, 'macos-')
run: |
brew install --cask paraview
echo `dirname /Applications/ParaView-*.app/Contents/bin/pvpython | head -1` >> $GITHUB_PATH
- if: matrix.platform != 'windows-latest'
run: pvpython --version
run: |
pvpython --version
pvpython -c "from paraview import simple"

- env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
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
261 changes: 236 additions & 25 deletions examples/PySDM_examples/Arabas_et_al_2015/paraview_hello_world.ipynb

Large diffs are not rendered by default.

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/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
Loading