|
Stellarator and Tokamak Modeling and Meshing Software (STOMMS)
|
Public Member Functions | |
| EqdskData () | |
| EqdskData (const Inputs &input, const PlaneMetaData &planeData, const PhysicsPoint &oPoint, const double &psiCoreBoundary) | |
| void | setintraCurveSpacingGradPsi () |
| double | getPsiAtPoint (const Point &pt) |
| std::array< double, 3 > | getPsiGradAtPoint (const Point &pt) |
| double | getPsiGradAbsoluteAtPoint (const Point &pt) |
| double | getPsiDerivativeAtPoint (const Point &pt, int dr, int dz) |
| double | getCurrentAtPsi (double psi) |
| double | convertNormToPsi (double normPsi) |
| double | convertPsiToNorm (double psi) |
| bool | snapToPsi (Point &pt, double goalPsi) |
| int | magneticField (std::array< double, 3 > ptArray, std::vector< double > &dpsi, int dimension) |
| bool | rk4 (Point &point0, Point &point1, double dt, int dimension) |
| bool | findNextPsiPointOnBoundary (Point &pt, double psi, int side) |
| int | findPsiPt (double targetPsi, Point startPoint, std::array< double, 2 > dir, Point &finalPoint) |
| int | findPsiPtOnLine (double targetPsi, const Point &pt1, const Point pt2, Point &finalPoint) |
| Point | convertPsiToPoint (double psi) |
| double | getInterCurveSpacingLinear (double psiNorm) |
| double | getNodeSpacing (const Point &pt, double psiNorm) |
| DomainBox | getDomainBox () |
| bool | insideBox (const Point &pt) |
| bool | insideBox (const std::array< double, 3 > &pt) |
| void | setParameters (const Inputs &in) |
| const int | getNumPlanes () const |
| const double | getStepRadians () const |
| const double | getPsiTolerance () const |
| const double | getSpacingToleranceOptimal () const |
| const FluxData & | getFluxInputData () const |
| const bool & | randomStart () const |
| const int & | getIntraCurveSpacingOption () const |
| const double & | getSpacingToleranceAbsolute () const |
| const bool & | getIntraCurveSpacingSmallVariation () const |
| const double & | getIntraCurveMinLengthLastEdge () const |
| const bool & | useWallCurve () const |
Class eqdskData contains the magnetic field information from eqdsk file.
|
inline |
Eqdsk Constructor.
| EqdskData::EqdskData | ( | const Inputs & | input, |
| const PlaneMetaData & | planeData, | ||
| const PhysicsPoint & | oPoint, | ||
| const double & | psiCoreBoundary | ||
| ) |
Eqdsk Constructor.
| input | class holding all the input data. |
| planeData | planer meta data |
| oPoint | primary oPoint. |
| psiCoreBoundary | psi value of last closed flux curve or innermost separatrix (primary) |
| double EqdskData::convertNormToPsi | ( | double | normPsi | ) |
Function to convert normalized psi to psi for given eqdsk.
| normPsi | normalized psi value to be converted to psi. |
| double EqdskData::convertPsiToNorm | ( | double | psi | ) |
Function to convert psi to normalized psi for given eqdsk.
| psi | psi value to be converted to normalized psi. |
| Point EqdskData::convertPsiToPoint | ( | double | psi | ) |
Given the psi value, this function finds the coordinates of the point on a horizontal line from axis to the box (either inward or outward).
| bool EqdskData::findNextPsiPointOnBoundary | ( | Point & | pt, |
| double | psi, | ||
| int | side | ||
| ) |
To find a next point by going around on edges of box boundary when tracing point hits a box boundary using Newton method.
| [in,out] | pt | a position to be adjusted. |
| psi | a psi value for the adjusted position to have. | |
| side | an indicator of a side of a box boundary where tracing point hits. |
| int EqdskData::findPsiPt | ( | double | targetPsi, |
| Point | startPoint, | ||
| std::array< double, 2 > | dir, | ||
| Point & | finalPoint | ||
| ) |
Given a target psi and an initial guess, find a point in direction of dir.
| targetPsi | psi value on which the point is desired. |
| startPoint | initial guess. |
| dir | direction array. |
| finalPoint | the point with target psi value on the vector dir. |
| int EqdskData::findPsiPtOnLine | ( | double | targetPsi, |
| const Point & | pt1, | ||
| const Point | pt2, | ||
| Point & | finalPoint | ||
| ) |
| double EqdskData::getCurrentAtPsi | ( | double | psi | ) |
Returns the values of poloidal current at given psi value.
| psi | psi value at which poloidal current is needed. |
| DomainBox EqdskData::getDomainBox | ( | ) |
Function to get domain bounding box.
| const FluxData & EqdskData::getFluxInputData | ( | ) | const |
Returns struct FluxData containing input data of flux.
| double EqdskData::getInterCurveSpacingLinear | ( | double | psiNorm | ) |
Function to get spacing between the two psi values bounding the psiNorm.
| psiNorm | normalized psi value. |
| const double & EqdskData::getIntraCurveMinLengthLastEdge | ( | ) | const |
| const int & EqdskData::getIntraCurveSpacingOption | ( | ) | const |
Returns the type of desired intra curve spacing option.
| const bool & EqdskData::getIntraCurveSpacingSmallVariation | ( | ) | const |
| double EqdskData::getNodeSpacing | ( | const Point & | pt, |
| double | psiNorm | ||
| ) |
Function to get intra curve spacing for the given psi and a starting point. @pt: A starting point (needed in non-field following case). TO-DO: Make it optional in future.
| psiNorm | normalized psi value. |
| const int EqdskData::getNumPlanes | ( | ) | const |
Returns the number of poloidal planes (user input).
| double EqdskData::getPsiAtPoint | ( | const Point & | pt | ) |
Returns the values of psi at a physical location defined by pt.
| pt | physical location on the domain defined by struct Point. |
| double EqdskData::getPsiDerivativeAtPoint | ( | const Point & | pt, |
| int | dr, | ||
| int | dz | ||
| ) |
Returns the psi partial derivative at a physical location defined by pt.
| pt | physical location on the domain defined by struct Point. |
| dr | order of derivative along R-direction. |
| dz | order of derivative along Z-direction. |
| double EqdskData::getPsiGradAbsoluteAtPoint | ( | const Point & | pt | ) |
Returns the absolute value of psi gradients at a physical location defined by pt.
| pt | physical location on the domain defined by struct Point. |
| std::array< double, 3 > EqdskData::getPsiGradAtPoint | ( | const Point & | pt | ) |
Returns the values of psi gradients at a physical location defined by pt.
| pt | physical location on the domain defined by struct Point. |
| const double EqdskData::getPsiTolerance | ( | ) | const |
Returns psi tolerance for calcuations (user input).
| const double & EqdskData::getSpacingToleranceAbsolute | ( | ) | const |
Returns the absolute spacing tolerance
| const double EqdskData::getSpacingToleranceOptimal | ( | ) | const |
Returns spacing tolerance (user input).
| const double EqdskData::getStepRadians | ( | ) | const |
Returns step size in radian (user input).
| bool EqdskData::insideBox | ( | const Point & | pt | ) |
Checks if a point pt is inside or outside of the bounding box.
| pt | point to check. |
| bool EqdskData::insideBox | ( | const std::array< double, 3 > & | pt | ) |
Checks if a point pt is inside or outside of the bounding box.
| pt | point to check. |
| int EqdskData::magneticField | ( | std::array< double, 3 > | ptArray, |
| std::vector< double > & | dpsi, | ||
| int | dimension | ||
| ) |
Function to return magnetic field components at a physical location.
| ptArray | array defining three coordinates of a physical point. |
| dpsi | a vector to contain components of magnetic field (B). Size 2 for 2D, and 3 for 3D. |
| dimension | 2 for 2D, 3 for 3D. Any other dimensions will throw an error. returns 0 for success. |
| const bool & EqdskData::randomStart | ( | ) | const |
Function to check if start of the flux curve is random or not.
Runge-Kutta method for numerical integration.
| point0 | physical coordinates of the given point. |
| point1 | physical coordinates of the output point. |
| dt | time step-size. |
| dimension | 2 for 2D, 3 for 3D. Any other dimensions will throw an error. returns true = outside of the domain, false = inside of the domain (success). |
| void EqdskData::setintraCurveSpacingGradPsi | ( | ) |
Set the intra curve gradient spacing.
| void EqdskData::setParameters | ( | const Inputs & | in | ) |
Function to set eqdsk parameters from inputs.
| bool EqdskData::snapToPsi | ( | Point & | pt, |
| double | goalPsi | ||
| ) |
Function to update point pt, to the nearest point with goalPsi.
| pt | point to readjust on goalPsi. |
| goalPsi | the desired psi value. |
| const bool & EqdskData::useWallCurve | ( | ) | const |
Function to check if model needs to be bounded by wall curve or last closed flux curve. Default is to use the wall curve. Only valid for zero Xpt cases.