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

Normalized coordinate relative to wall along fieldline in phi or s coordinate. More...

Inheritance diagram for dg::geo::WallFieldlineCoordinate:
[legend]

Public Member Functions

 WallFieldlineCoordinate (const dg::geo::CylindricalVectorLvl0 &vec, const dg::aRealTopology2d< double > &domain, double maxPhi, double eps, std::string type)
 Construct with vector field, domain. More...
 
double do_compute (double R, double Z) const
 
 WallFieldlineCoordinate (const dg::geo::CylindricalVectorLvl0 &vec, const dg::aRealTopology2d< double > &domain, double maxPhi, double eps, std::string type)
 Construct with vector field, domain. More...
 
double do_compute (double R, double Z) const
 
 WallFieldlineCoordinate (const dg::geo::CylindricalVectorLvl0 &vec, const dg::aRealTopology2d< double > &domain, double maxPhi, double eps, std::string type)
 Construct with vector field, domain. More...
 
double do_compute (double R, double Z) const
 
- Public Member Functions inherited from dg::geo::aCylindricalFunctor< WallFieldlineCoordinate >
double operator() (double R, double Z) const
  do_compute(R,Z) More...
 
double operator() (double R, double Z, double phi) const
  do_compute(R,Z) More...
 

Detailed Description

Normalized coordinate relative to wall along fieldline in phi or s coordinate.

The following differential equation is integrated

\[ \frac{ d R}{d \varphi} = b^R / b^\varphi \\ \frac{ d Z}{d \varphi} = b^Z / b^\varphi \\ \frac{ d s}{s \varphi} = 1 / b^\varphi \]

for initial conditions \( (R,Z,0)\) until either a maximum angle is reached or until \( (R,Z) \) leaves the given domain. In the latter case a bisection algorithm is used to find the exact angle \(\varphi_l\) of leave.

The difference to WallFieldlineDistance is that this class integrates the differential equations in both directions and normalizes the output to \( [-1,1]\). -1 means at the negative sheath (you have to go agains the field to go out of the box), +1 at the postive sheath (you have to go with the field to go out of the box) and anything else is in-between; when the sheath cannot be reached 0 is returned

Attention
The sign of the coordinate (both angle and distance) is defined with respect to the direction of the magnetic field (not the angle coordinate like in Fieldaligned)

-1 means at the negative sheath (you have to go agains the field to go out of the box), +1 at the postive sheath (you have to go with the field to go out of the box) and anything else is in-between; when the sheath cannot be reached 0 is returned

Attention
The sign of the coordinate (both angle and distance) is defined with respect to the direction of the magnetic field (not the angle coordinate like in Fieldaligned)

Constructor & Destructor Documentation

◆ WallFieldlineCoordinate() [1/3]

dg::geo::WallFieldlineCoordinate::WallFieldlineCoordinate ( const dg::geo::CylindricalVectorLvl0 vec,
const dg::aRealTopology2d< double > &  domain,
double  maxPhi,
double  eps,
std::string  type 
)
inline

Construct with vector field, domain.

Parameters
vecThe vector field to integrate
domainThe box
maxPhithe maximum angle to integrate to (something like plus or minus 2.*M_PI)
epsthe accuracy of the fieldline integrator
typeeither "phi" then the distance is computed in the angle coordinate or "s" then the distance is computed in the s parameter
Note
The sign of maxPhi does not matter here as both directions are integrated

◆ WallFieldlineCoordinate() [2/3]

dg::geo::WallFieldlineCoordinate::WallFieldlineCoordinate ( const dg::geo::CylindricalVectorLvl0 vec,
const dg::aRealTopology2d< double > &  domain,
double  maxPhi,
double  eps,
std::string  type 
)
inline

Construct with vector field, domain.

Parameters
vecThe vector field to integrate
domainThe box
maxPhithe maximum angle to integrate to (something like plus or minus 2.*M_PI)
epsthe accuracy of the fieldline integrator
typeeither "phi" then the distance is computed in the angle coordinate or "s" then the distance is computed in the s parameter

◆ WallFieldlineCoordinate() [3/3]

dg::geo::WallFieldlineCoordinate::WallFieldlineCoordinate ( const dg::geo::CylindricalVectorLvl0 vec,
const dg::aRealTopology2d< double > &  domain,
double  maxPhi,
double  eps,
std::string  type 
)
inline

Construct with vector field, domain.

Parameters
vecThe vector field to integrate
domainThe box
maxPhithe maximum angle to integrate to (something like plus or minus 2.*M_PI)
epsthe accuracy of the fieldline integrator
typeeither "phi" then the distance is computed in the angle coordinate or "s" then the distance is computed in the s parameter

Member Function Documentation

◆ do_compute() [1/3]

double dg::geo::WallFieldlineCoordinate::do_compute ( double  R,
double  Z 
) const
inline

◆ do_compute() [2/3]

double dg::geo::WallFieldlineCoordinate::do_compute ( double  R,
double  Z 
) const
inline

◆ do_compute() [3/3]

double dg::geo::WallFieldlineCoordinate::do_compute ( double  R,
double  Z 
) const
inline

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