Extension: Geometries
#include "dg/geometries/geometries.h"

A tokamak field as given by R0, Psi and Ipol plus Meta-data like shape and equilibrium. More...

Public Member Functions

 TokamakMagneticField ()
 as long as the field stays empty the access functions are undefined More...
 
 TokamakMagneticField (double R0, const CylindricalFunctorsLvl2 &psip, const CylindricalFunctorsLvl1 &ipol, MagneticFieldParameters gp)
 
void set (double R0, const CylindricalFunctorsLvl2 &psip, const CylindricalFunctorsLvl1 &ipol, MagneticFieldParameters gp)
 
double R0 () const
 \( R_0 \) More...
 
const CylindricalFunctorpsip () const
 \( \psi_p(R,Z)\), where R, Z are cylindrical coordinates More...
 
const CylindricalFunctorpsipR () const
 \( \partial_R \psi_p(R,Z)\), where R, Z are cylindrical coordinates More...
 
const CylindricalFunctorpsipZ () const
 \( \partial_Z \psi_p(R,Z)\), where R, Z are cylindrical coordinates More...
 
const CylindricalFunctorpsipRR () const
 \( \partial_R\partial_R \psi_p(R,Z)\), where R, Z are cylindrical coordinates More...
 
const CylindricalFunctorpsipRZ () const
 \( \partial_R\partial_Z \psi_p(R,Z)\), where R, Z are cylindrical coordinates More...
 
const CylindricalFunctorpsipZZ () const
 \( \partial_Z\partial_Z \psi_p(R,Z)\), where R, Z are cylindrical coordinates More...
 
const CylindricalFunctoripol () const
 \( I(\psi_p) \) the current More...
 
const CylindricalFunctoripolR () const
 \( \partial_R I(\psi_p) \) More...
 
const CylindricalFunctoripolZ () const
 \( \partial_Z I(\psi_p) \) More...
 
const CylindricalFunctorsLvl2get_psip () const
 
const CylindricalFunctorsLvl1get_ipol () const
 
const MagneticFieldParametersparams () const
 Access Meta-data of the field. More...
 

Detailed Description

A tokamak field as given by R0, Psi and Ipol plus Meta-data like shape and equilibrium.

This is the representation of toroidally axisymmetric magnetic fields that can be modeled in the description \( \vec B(R,Z,\varphi) = \frac{R_0}{R} \left( I(\psi_p) \hat e_\varphi + \nabla \psi_p \times \hat e_\varphi\right) \) where \( R_0\) is a normalization constant, \( I\) the poloidal current and \( \psi_p\) the poloidal flux function.

const dg::CylindricalGrid3d g3d( R_0-a, R_0+a, -a, a, 0, 2.*M_PI, n, Nx, Ny, Nz, dg::NEU, dg::NEU, dg::PER);
//create magnetic field
auto bhat = dg::geo::createBHat(mag);
//create Fieldaligned object and construct DS from it
bhat, g3d, dg::NEU, dg::NEU, dg::geo::NoLimiter(), 1e-8, mx[0], mx[1],
-1, method);
ds( dsFA );
static dg::geo::TokamakMagneticField createCircularField(double R0, double I0, double a=1, double b=1)
Definition: toroidal.h:136
CylindricalVectorLvl1 createBHat(const TokamakMagneticField &mag)
Contravariant components of the magnetic unit vector field and its Divergence and derivative in cylin...
Definition: magnetic_field.h:931
Class for the evaluation of parallel derivatives.
Definition: ds.h:349
Create and manage interpolation matrices from fieldline integration.
Definition: fieldaligned.h:433
A tokamak field as given by R0, Psi and Ipol plus Meta-data like shape and equilibrium.
Definition: magnetic_field.h:162

Constructor & Destructor Documentation

◆ TokamakMagneticField() [1/2]

dg::geo::TokamakMagneticField::TokamakMagneticField ( )
inline

as long as the field stays empty the access functions are undefined

◆ TokamakMagneticField() [2/2]

dg::geo::TokamakMagneticField::TokamakMagneticField ( double  R0,
const CylindricalFunctorsLvl2 psip,
const CylindricalFunctorsLvl1 ipol,
MagneticFieldParameters  gp 
)
inline

Member Function Documentation

◆ get_ipol()

const CylindricalFunctorsLvl1 & dg::geo::TokamakMagneticField::get_ipol ( ) const
inline

◆ get_psip()

const CylindricalFunctorsLvl2 & dg::geo::TokamakMagneticField::get_psip ( ) const
inline

◆ ipol()

const CylindricalFunctor & dg::geo::TokamakMagneticField::ipol ( ) const
inline

\( I(\psi_p) \) the current

◆ ipolR()

const CylindricalFunctor & dg::geo::TokamakMagneticField::ipolR ( ) const
inline

\( \partial_R I(\psi_p) \)

◆ ipolZ()

const CylindricalFunctor & dg::geo::TokamakMagneticField::ipolZ ( ) const
inline

\( \partial_Z I(\psi_p) \)

◆ params()

const MagneticFieldParameters & dg::geo::TokamakMagneticField::params ( ) const
inline

Access Meta-data of the field.

Returns
Meta-data

◆ psip()

const CylindricalFunctor & dg::geo::TokamakMagneticField::psip ( ) const
inline

\( \psi_p(R,Z)\), where R, Z are cylindrical coordinates

◆ psipR()

const CylindricalFunctor & dg::geo::TokamakMagneticField::psipR ( ) const
inline

\( \partial_R \psi_p(R,Z)\), where R, Z are cylindrical coordinates

◆ psipRR()

const CylindricalFunctor & dg::geo::TokamakMagneticField::psipRR ( ) const
inline

\( \partial_R\partial_R \psi_p(R,Z)\), where R, Z are cylindrical coordinates

◆ psipRZ()

const CylindricalFunctor & dg::geo::TokamakMagneticField::psipRZ ( ) const
inline

\( \partial_R\partial_Z \psi_p(R,Z)\), where R, Z are cylindrical coordinates

◆ psipZ()

const CylindricalFunctor & dg::geo::TokamakMagneticField::psipZ ( ) const
inline

\( \partial_Z \psi_p(R,Z)\), where R, Z are cylindrical coordinates

◆ psipZZ()

const CylindricalFunctor & dg::geo::TokamakMagneticField::psipZZ ( ) const
inline

\( \partial_Z\partial_Z \psi_p(R,Z)\), where R, Z are cylindrical coordinates

◆ R0()

double dg::geo::TokamakMagneticField::R0 ( ) const
inline

\( R_0 \)

◆ set()

void dg::geo::TokamakMagneticField::set ( double  R0,
const CylindricalFunctorsLvl2 psip,
const CylindricalFunctorsLvl1 ipol,
MagneticFieldParameters  gp 
)
inline

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