\nThe study of dynamical systems is facilitated b y a coordinate framework with coordinate surfaces that coincide with i nvariant structures of the dynamical flow. For integrable (e.g. axisym metric) systems\, a continuous family of invariant surfaces is guarant eed and action-angle (straight-fieldline) coordinates may be construct ed. For non-integrable systems\, e.g. stellarators and perturbed tokam aks\, this continuous family is broken. Nevertheless\,action-angle-lik e coordinates can still be constructed that simplify the description o f the dynamics\, where

\npossible. The Poincare-Birkhoff theorem\, the Aubry-Mather theorem\, and the KAM theorem show that there are im portant structures that are invariant under the perturbed dynamics\; n amely the periodic orbits\, the cantori\,and the irrational flux surfa ces. Coordinates adapted to these invariant sets\, which we call chaot ic coordinates\,provide substantial advantages. The regular motion bec omes straight\, and the irregular motion is bounded by\, and dissected by\, coordinate surfaces that coincide with surfaces of locally-minim al magnetic-fieldline flux. Chaotic coordinates are based on almost-in variant surfaces. The theory of quadratic-flux-minimizing (QFM)surface s is reviewed\, and the numerical techniques that allow high-order QFM surfaces to be

\nconstructed for chaotic magnetic fields of exper imental relevance are described. As a practical example\, the chaotic edge of the

\nmagnetic field as calculated by HINT2 code in the La rge Helical Device (LHD) is examined. The theoretical and numerical te chniques for finding the boundary surface are implemented\, and a coor dinate system based on a selection of QFM surfaces is constructed that simplifies the description of the magnetic field\; so that\, to a goo d approximation\, the flux surfaces (including the last closed flux su rface) become straight and the islands become ‘square’. URL:https://www.physics.wisc.edu/twap/?id=3477 END:VEVENT END:VCALENDAR