Extension: Geometries
#include "dg/geometries/geometries.h"
Loading...
Searching...
No Matches
dg::geo::SafetyFactor Struct Reference

Evaluation of the safety factor q based on direct integration of \( q(\psi_0) = \frac{1}{2\pi} \int d\Theta \frac{B^\varphi}{B^\Theta} \). More...

Public Member Functions

 SafetyFactor (const TokamakMagneticField &mag)
 
double operator() (double psip0)
 Calculate q(psip0)
 

Detailed Description

Evaluation of the safety factor q based on direct integration of \( q(\psi_0) = \frac{1}{2\pi} \int d\Theta \frac{B^\varphi}{B^\Theta} \).

Note
The sign of q is positive for right-handed field line winding and negative else
Attention
Return value undefined if evaluated outside the closed fieldline region, or if psip0 lies at or beyond the O-point or the separatrix. The function always returns however, it won't throw an error or something
Template Parameters
containerA data container class for which the blas1 functionality is overloaded. We assume that container is copyable/assignable and has a swap member function. Currently this is one of

Constructor & Destructor Documentation

◆ SafetyFactor()

dg::geo::SafetyFactor::SafetyFactor ( const TokamakMagneticField & mag)
inline

Member Function Documentation

◆ operator()()

double dg::geo::SafetyFactor::operator() ( double psip0)
inline

Calculate q(psip0)

Parameters
psip0the flux surface
Returns
q(psip0), undefined if psip0 beyond the O-point value, or if psip0 == 0 and there is an X-point
Attention
If psip0 == 0 and there is an X-point, the integrator may integrate for a very long time before realizing something is wrong

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