Discontinuous Galerkin Library
#include "dg/algorithm.h"

\(f(x,y) =\begin{cases} \frac{u_d}{1.2965125} \left( r\left(1+\frac{\beta_i^2}{g_i^2}\right) - R \frac{\beta_i^2}{g_i^2} \frac{J_1(g_ir/R)}{J_1(g_i)}\right)\cos(\theta) \text{ if } r < R \\ \frac{u_d}{1.2965125} R \frac{K_1(\beta_i {r}/{R})}{K_1(\beta)} \cos(\theta) \text{ else } \end{cases} \) More...

Public Member Functions

 Vortex (double x0, double y0, unsigned state, double R, double u_dipole, double kz=0)
 
DG_DEVICE double operator() (double x, double y) const
 \(f(x,y) =\begin{cases} \frac{u_d}{1.2965125} \left( r\left(1+\frac{\beta_i^2}{g_i^2}\right) - R \frac{\beta_i^2}{g_i^2} \frac{J_1(g_ir/R)}{J_1(g_i)}\right)\cos(\theta) \text{ if } r < R \\ \frac{u_d}{1.2965125} R \frac{K_1(\beta_i {r}/{R})}{K_1(\beta)} \cos(\theta) \text{ else } \end{cases} \) More...
 
DG_DEVICE double operator() (double x, double y, double z) const
 \(f(x,y,z) =\cos(k_z z)\begin{cases} \frac{u_d}{1.2965125} \left( r\left(1+\frac{\beta_i^2}{g_i^2}\right) - R \frac{\beta_i^2}{g_i^2} \frac{J_1(g_ir/R)}{J_1(g_i)}\right)\cos(\theta) \text{ if } r < R \\ \frac{u_d}{1.2965125} R \frac{K_1(\beta_i {r}/{R})}{K_1(\beta)} \cos(\theta) \text{ else } \end{cases} \) More...
 

Detailed Description

\(f(x,y) =\begin{cases} \frac{u_d}{1.2965125} \left( r\left(1+\frac{\beta_i^2}{g_i^2}\right) - R \frac{\beta_i^2}{g_i^2} \frac{J_1(g_ir/R)}{J_1(g_i)}\right)\cos(\theta) \text{ if } r < R \\ \frac{u_d}{1.2965125} R \frac{K_1(\beta_i {r}/{R})}{K_1(\beta)} \cos(\theta) \text{ else } \end{cases} \)

Return a 2d vortex function where \( i\in \{0,1,2\}\) is the mode number and r and \(\theta\) are poloidal coordinates with \( r = \sqrt{(x-x_0)^2 + (y-y_0)^2}\), \( \theta = \arctan_2( (y-y_), (x-x_0))\), \( g_0 = 3.831896621 \), \( g_1 = -3.832353624 \), \( g_2 = 7.016\), \( \beta_0 = 0.03827327723\), \( \beta_1 = 0.07071067810 \), \( \beta_2 = 0.07071067810 \) \( K_1\) is the modified and \( J_1\) the Bessel function

Constructor & Destructor Documentation

◆ Vortex()

dg::Vortex::Vortex ( double  x0,
double  y0,
unsigned  state,
double  R,
double  u_dipole,
double  kz = 0 
)
inline
Parameters
x0X position
y0Y position
statemode 0,1, or 2
Rcharacteristic radius of dipole
u_dipoleu_drift/u_dipole = \( u_d\)
kzmultiply by \( \cos(k_z z) \) in three dimensions

Member Function Documentation

◆ operator()() [1/2]

DG_DEVICE double dg::Vortex::operator() ( double  x,
double  y 
) const
inline

\(f(x,y) =\begin{cases} \frac{u_d}{1.2965125} \left( r\left(1+\frac{\beta_i^2}{g_i^2}\right) - R \frac{\beta_i^2}{g_i^2} \frac{J_1(g_ir/R)}{J_1(g_i)}\right)\cos(\theta) \text{ if } r < R \\ \frac{u_d}{1.2965125} R \frac{K_1(\beta_i {r}/{R})}{K_1(\beta)} \cos(\theta) \text{ else } \end{cases} \)

Evaluate the vortex where \( i\in \{0,1,2\}\) is the mode number and r and \(\theta\) are poloidal coordinates

Parameters
xvalue
yvalue
Returns
the above function value

◆ operator()() [2/2]

DG_DEVICE double dg::Vortex::operator() ( double  x,
double  y,
double  z 
) const
inline

\(f(x,y,z) =\cos(k_z z)\begin{cases} \frac{u_d}{1.2965125} \left( r\left(1+\frac{\beta_i^2}{g_i^2}\right) - R \frac{\beta_i^2}{g_i^2} \frac{J_1(g_ir/R)}{J_1(g_i)}\right)\cos(\theta) \text{ if } r < R \\ \frac{u_d}{1.2965125} R \frac{K_1(\beta_i {r}/{R})}{K_1(\beta)} \cos(\theta) \text{ else } \end{cases} \)

Evaluate the vortex modulated by a sine wave in z where \( i\in \{0,1,2\}\) is the mode number and r and \(\theta\) are poloidal coordinates

Parameters
xvalue
yvalue
zvalue
Returns
the above function value

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