Discontinuous Galerkin Library
#include "dg/algorithm.h"
Loading...
Searching...
No Matches

\(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.
 
double operator() (double R, double Z) const
 Return the value of the Bath.
 
double operator() (double R, double Z, double) const
 Return the value of the Bath.
 

Detailed Description

\(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.

Constructor & Destructor Documentation

◆ BathRZ()

dg::BathRZ::BathRZ ( unsigned N_kR,
unsigned N_kZ,
double R_min,
double Z_min,
double gamma,
double L_E,
double amp )
inline

Functor returning a random field in the RZ-plane or in the first RZ-plane.

Parameters
N_kRNumber of Fourier modes in R direction
N_kZNumber of Fourier modes in Z direction
R_minMinimal R (in units of rho_s)
Z_minMinimal Z (in units of rho_s)
gammaexponent in the energy function \(E_k\) (typically around 30)
L_Eis the typical eddysize (typically around 5)
ampAmplitude

Member Function Documentation

◆ operator()() [1/2]

double dg::BathRZ::operator() ( double R,
double Z ) const
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

Parameters
RR - coordinate
ZZ - coordinate
Returns
the above function value

◆ operator()() [2/2]

double dg::BathRZ::operator() ( double R,
double Z,
double  ) const
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

Parameters
RR - coordinate
ZZ - coordinate
Returns
the above function value

The documentation for this struct was generated from the following file: