5.3. Poloidal distance calculationsΒΆ

Poloidal distance along flux surfaces is calculated on FineContour objects using:

FineContour.calcDistance(*, reallocate=False)

Calculate poloidal distance from the start of this FineContour.

Distance is calculated as a cumulative sum of the straight-line distances between each point. This calculation has a low order of accuracy, so the number of points finecontour_Nfine should be chosen to be large.

When the distance is needed at an arbitrary point on the contour (e.g. at the positions of the PsiContour points), it is calculated based on the FineContour distance using:

FineContour.getDistance(p)

Find the poloidal distance from the start of this contour of a point p.

Assume p is a point on the contour so has the correct psi-value.

Result is calculated as the weighted mean of the poloidal distances of the two nearest points on the FineContour (weighted by the relative distance from p to each FineContour point).