Discontinuous Galerkin Library
#include "dg/algorithm.h"
|
\(f(R,Z) = A B \sum_\vec{k} \sqrt{E_k} \alpha_k \cos{\left(k \kappa_k + \theta_k \right)} \) More...
Public Member Functions | |
BathRZ (unsigned N_kR, unsigned N_kZ, double R_min, double Z_min, double gamma, double L_E, double amp) | |
Functor returning a random field in the RZ-plane or in the first RZ-plane. More... | |
double | operator() (double R, double Z) const |
Return the value of the Bath. More... | |
double | operator() (double R, double Z, double phi) const |
Return the value of the Bath. More... | |
\(f(R,Z) = A B \sum_\vec{k} \sqrt{E_k} \alpha_k \cos{\left(k \kappa_k + \theta_k \right)} \)
A random bath in the R-Z plane with
\[ B := \sqrt{\frac{2}{N_{k_R} N_{k_Z}}} \\ k:=\sqrt{k_R^2 + k_Z^2} \\ k_R:=2 \pi \left( i -N_{k_R}/2\right)/N_{k_R} \\ k_Z:=2 \pi \left( j -N_{k_Z}/2\right)/N_{k_Z} \\ k_0:=2 \pi L_E / N_k\\ N_k := \sqrt{N_{k_R}^2 + N_{k_Z}^2} \\ E_k:=\left(4 k k_0/(k+k_0)^2\right)^{\gamma} \\ \alpha_k := \sqrt{\mathcal{N}_1^2 + \mathcal{N}_2^2} \\ \theta_k := \arctan{\left(\mathcal{N}_2/\mathcal{N}_1\right)} \\ \kappa_k(R,Z) := (R-R_{min}) \mathcal{U}_1 + (Z-Z_{min}) \mathcal{U}_2 \\ \]
where \(\mathcal{N}_{1,2}\) are random normal distributed real numbers with a mean of \(\mu = 0\) and a standard deviation of \(\sigma=1 \), \(\mathcal{U}_{1,2}\) are random uniformly distributed real numbers \(\in \left[0, 2 \pi \right) \) and \( A \) is the amplitude.
|
inline |
Functor returning a random field in the RZ-plane or in the first RZ-plane.
N_kR | Number of Fourier modes in R direction |
N_kZ | Number of Fourier modes in Z direction |
R_min | Minimal R (in units of rho_s) |
Z_min | Minimal Z (in units of rho_s) |
gamma | exponent in the energy function \(E_k\) (typically around 30) |
L_E | is the typical eddysize (typically around 5) |
amp | Amplitude |
|
inline |
Return the value of the Bath.
\[f(R,Z) = A B \sum_\vec{k} \sqrt{E_k} \alpha_k \cos{\left(k \kappa_k + \theta_k \right)} \]
with
\[ \mathcal{N} := \sqrt{\frac{2}{N_{k_R} N_{k_Z}}} \\ k:=\sqrt{k_R^2 + k_Z^2} \\ k_R:=2 \pi \left( i -N_{k_R}/2\right)/N_{k_R} \\ k_Z:=2 \pi \left( j -N_{k_Z}/2\right)/N_{k_Z} \\ k_0:=2 \pi L_E / N_k\\ N_k := \sqrt{N_{k_R}^2 + N_{k_Z}^2} \\ E_k:=\left(4 k k_0/(k+k_0)^2\right)^{\gamma} \\ \alpha_k := \sqrt{\mathcal{N}_1^2 + \mathcal{N}_2^2} \\ \theta_k := \arctan{\left(\mathcal{N}_2/\mathcal{N}_1\right)} \\ \kappa_k(R,Z) := (R-R_{min}) \mathcal{U}_1 + (Z-Z_{min}) \mathcal{U}_2 \\ \]
where \(\mathcal{N}_{1,2}\) are random normal distributed real numbers with a mean of \(\mu = 0\) and a standard deviation of \(\sigma=1 \), \(\mathcal{U}_{1,2}\) are random uniformly distributed real numbers \(\in \left[0, 2 \pi \right) \) and \( A \) is the amplitude
R | R - coordinate |
Z | Z - coordinate |
|
inline |
Return the value of the Bath.
\[f(R,Z) = A B \sum_\vec{k} \sqrt{E_k} \alpha_k \cos{\left(k \kappa_k + \theta_k \right)} \]
with
\[ \mathcal{N} := \sqrt{\frac{2}{N_{k_R} N_{k_Z}}} \\ k:=\sqrt{k_R^2 + k_Z^2} \\ k_R:=2 \pi \left( i -N_{k_R}/2\right)/N_{k_R} \\ k_Z:=2 \pi \left( j -N_{k_Z}/2\right)/N_{k_Z} \\ k_0:=2 \pi L_E / N_k\\ N_k := \sqrt{N_{k_R}^2 + N_{k_Z}^2} \\ E_k:=\left(4 k k_0/(k+k_0)^2\right)^{\gamma} \\ \alpha_k := \sqrt{\mathcal{N}_1^2 + \mathcal{N}_2^2} \\ \theta_k := \arctan{\left(\mathcal{N}_2/\mathcal{N}_1\right)} \\ \kappa_k(R,Z) := (R-R_{min}) \mathcal{U}_1 + (Z-Z_{min}) \mathcal{U}_2 \\ \]
where \(\mathcal{N}_{1,2}\) are random normal distributed real numbers with a mean of \(\mu = 0\) and a standard deviation of \(\sigma=1 \), \(\mathcal{U}_{1,2}\) are random uniformly distributed real numbers \(\in \left[0, 2 \pi \right) \) and \( A \) is the amplitude
R | R - coordinate |
Z | Z - coordinate |
phi | phi - coordinate |