Extension: Geometries
#include "dg/geometries/geometries.h"
|
Functions | |
static TokamakMagneticField | dg::geo::createModifiedField (dg::file::WrappedJsonValue gs, dg::file::WrappedJsonValue jsmod, CylindricalFunctor &wall, CylindricalFunctor &transition) |
Modify Magnetic Field and create wall above or below certain Psi values according to given parameters. More... | |
static CylindricalFunctor | dg::geo::createWallRegion (dg::file::WrappedJsonValue gs, dg::file::WrappedJsonValue jsmod) |
A convenience function call for dg::geo::createModifiedField that ignores the transition parameter and returns the wall. More... | |
static void | dg::geo::createSheathRegion (dg::file::WrappedJsonValue jsmod, TokamakMagneticField mag, CylindricalFunctor wall, dg::Grid2d &sheath_walls, CylindricalFunctor &sheath) |
Create the sheath region where fieldlines intersect the boundary. More... | |
|
inlinestatic |
Modify Magnetic Field and create wall above or below certain Psi values according to given parameters.
We modify psi above or below certain Psip values to a constant using the dg::IPolynomialHeaviside
function (an approximation to the integrated Heaviside function with width alpha), i.e. we replace psi with IPolynomialHeaviside(psi). This subsequently modifies all derivatives of psi and the poloidal current in this region.
Furthermore, the same parameters define the wall region.
gs | forwarded to dg::geo::createMagneticField |
jsmod | contains the fields described above to steer the creation of the modification and wall region |
wall | (out) On output contains the region where the wall is applied, the functor returns 1 where the wall is, 0 where there it is not and 0<f<1 in the transition region |
transition | (out) On output contains the region where the transition of Psip to a constant value occurs, the functor returns 0<f<=1 for when there is a transition and 0 else |
json/json.h
is included before dg/geometries/geometries.h
|
inlinestatic |
Create the sheath region where fieldlines intersect the boundary.
The sheath functor that comes out of this does (i) on each of the four lines defined by the two vertical (R0, R1) and two horizontal (Z0, Z1) boundaries check if the "wall" functor is zero anywhere on the line: if not then move this boundary far away (ii) Measure the angular distance along the fieldline (both in positive and negative direction) to the remaining walls using dg::geo::WallFieldlineDistance
(in "phi" mode) (iii) Modify the angular distances with a dg::PolynomialHeaviside
functor with parameters given in jsmod:
(iv) The sheath region is the SetUnion of positive and negative functor, together with the SetIntersection with the SetNot(wall) region.
jsmod | must contain fields as described above |
mag | (in) the (unmodified) magnetic field, used to integrate the field towards or away from the sheath |
wall | (in) the penalization region that represents the actual (perpendicular) wall without the divertor (if 0 on the boundary the boundary will be considered to be a sheath, else the boundary will be ignored) |
sheath_walls | (inout) on input contains the box boundaries, on output the non-sheath boundaries are moved far away |
sheath | (out) contains the region recognized as sheath (returning +1 within the sheath and 0 outside of it and something in-between in the transition region) |
|
inlinestatic |
A convenience function call for dg::geo::createModifiedField
that ignores the transition parameter and returns the wall.