|
1 | 1 | """ |
2 | | -Power series expression |
| 2 | +Power series expression - a simple and mutable power-law (where the coefficients are specified |
| 3 | +by the user), which is a form used in many more complex terminal velocity parameterizations |
| 4 | +such as Rogers & Yau. This formulation emerges from balancing drag and gravitational forces on |
| 5 | +a spherical object, and the power depends on the drag coefficient (and thus the Reynolds number |
| 6 | +and flow regime). Rogers and Yau distinguishes different power law parameters for three regimes, |
| 7 | +whereas this much simpler formulation applies across the full range of particle sizes. |
| 8 | +It is introduced it as a simple option for comparison against bulk methods, think of it as the |
| 9 | +terminal-velocity analogue to the Geometric collision kernel. |
3 | 10 | """ |
4 | 11 |
|
5 | 12 | import numpy as np |
6 | 13 |
|
7 | | -from PySDM.physics import constants as const |
| 14 | +from PySDM.physics import si, constants as const |
8 | 15 |
|
9 | 16 |
|
10 | 17 | class PowerSeries: # pylint: disable=too-few-public-methods |
11 | 18 | def __init__(self, particulator, *, prefactors=None, powers=None): |
12 | | - si = const.si |
13 | 19 | self.particulator = particulator |
14 | | - prefactors = prefactors or [2.0e-1 * si.m / si.s / np.sqrt(si.m)] |
15 | | - self.prefactors = np.array(prefactors) |
16 | | - powers = powers or [1 / 6] |
17 | | - self.powers = np.array(powers) |
18 | | - for i, p in enumerate(self.powers): |
19 | | - self.prefactors[i] *= (4 / 3 * const.PI) ** (p) |
20 | | - self.prefactors[i] /= (1 * si.um**3) ** (p) |
| 20 | + self.prefactors = np.array(prefactors or [2.0e-1 * si.m / si.s / np.sqrt(si.m)]) |
| 21 | + self.powers = np.array(powers or [1 / 6]) |
21 | 22 | assert len(self.prefactors) == len(self.powers) |
| 23 | + for i, p in enumerate(self.powers): |
| 24 | + self.prefactors[i] *= const.PI_4_3**p / si.um ** (3 * p) |
22 | 25 |
|
23 | 26 | def __call__(self, output, radius): |
24 | 27 | self.particulator.backend.power_series( |
|
0 commit comments