Turbulence
turbulence
¶
KolmogorovPowerSpectrum
¶
Kolmogorov power spectrum
\[\mathcal{P}_{3D}(k)= \sigma^2 \frac{e^{-\left(k/k_{\text{inj}}\right)^2} e^{-\left(k_{\text{dis}}/k\right)^2} k^{-\alpha} }{\int 4\pi k^2 \, e^{-\left(k/k_{\text{inj}}\right)^2} e^{-\left(k_{\text{dis}}/k\right)^2} k^{-\alpha} \text{d} k}\]
Source code in src/xifu_cluster_sim/turbulence.py
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 | |
__call__(k, k_max)
¶
Computes the Kolmogorov power spectrum over k. When this power spectrum is used to represent a gaussian random field on a discrete grid, if the dissipation scale is smaller than the smallest scale available, some power is not represented on the grid. This power is :
\[\mathcal{P}_{3D}(k)= \sigma^2 \int_{k_\mathrm{max}}^{\infty} 4\pi k^2 P(k) \text{d} k\]
It is also computed and returned.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
k
|
float or array - like
|
Wavenumber |
required |
k_max
|
float
|
Maximum wavenumber represented on grid |
required |
Returns:
| Name | Type | Description |
|---|---|---|
p_k |
float or array - like
|
Power spectrum |
factor |
float
|
Integral of power spectrum from k_max to infinity. |
Source code in src/xifu_cluster_sim/turbulence.py
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 | |
__init__(sigma=250.0, inj_scale=300.0, dis_scale=0.001, alpha=11 / 3)
¶
Initialize parameters of the power spectrum
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
sigma
|
float
|
Norm of the power spectrum |
250.0
|
inj_scale
|
float
|
Injection scale |
300.0
|
dis_scale
|
float
|
Dissipation scale |
0.001
|
alpha
|
float
|
Slope |
11 / 3
|
Source code in src/xifu_cluster_sim/turbulence.py
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | |