-
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.
coalescence-only single-column test case ("deJong_Azimi" based on S&H…
…); power-law terminal velocity; initialisation of particles in part of the domain in 1D kinematic env (#1221) Co-authored-by: Sylwester Arabas <sylwester.arabas@uj.edu.pl> Co-authored-by: Sylwester Arabas <sylwester.arabas@agh.edu.pl>
- Loading branch information
1 parent
d6b0df2
commit fe88baf
Showing
27 changed files
with
14,083 additions
and
127 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
""" | ||
Power series expression | ||
""" | ||
|
||
import numpy as np | ||
|
||
from PySDM.physics import constants as const | ||
|
||
|
||
class PowerSeries: # pylint: disable=too-few-public-methods | ||
def __init__(self, particulator, *, prefactors=None, powers=None): | ||
si = const.si | ||
self.particulator = particulator | ||
prefactors = prefactors or [2.0e-1 * si.m / si.s / np.sqrt(si.m)] | ||
self.prefactors = np.array(prefactors) | ||
powers = powers or [1 / 6] | ||
self.powers = np.array(powers) | ||
for i, p in enumerate(self.powers): | ||
self.prefactors[i] *= (4 / 3 * const.PI) ** (p) | ||
self.prefactors[i] /= (1 * si.um**3) ** (p) | ||
assert len(self.prefactors) == len(self.powers) | ||
|
||
def __call__(self, output, radius): | ||
self.particulator.backend.power_series( | ||
values=output.data, | ||
radius=radius.data, | ||
num_terms=len(self.powers), | ||
prefactors=self.prefactors, | ||
powers=self.powers, | ||
) |
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
159 changes: 95 additions & 64 deletions
159
examples/PySDM_examples/Shipway_and_Hill_2012/fig_1.ipynb
Large diffs are not rendered by default.
Oops, something went wrong.
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
Oops, something went wrong.