1 of 8

M3D-C1 Meeting�Nate Ferraro�Feb. 5, 2024

2 of 8

Agenda

  • Status update

  • Overview of M3D-C1 activities

  • Reading stellarator output with Fusion-IO

  • Other issues?

2

3 of 8

Status

commit b5367d3a66fdc61f191d7b2e165ceff616a37470

Date: Wed Jan 31 17:54:30 2024 -0500

  • PPPL Cluster (m3dc1/devel-centos7): PASSED
  • Stellar (m3dc1/devel): PASSED
  • Perlmutter CPU (m3dc1/devel-cpu):

adapt FAILED: C1ke files do not match

  • Issues / bugs?
    • Andreas raised an issue with mesh boundary tags disappearing during adaptation, but seems not to be a problem after mesh is saved / loaded?

3

4 of 8

Overview of M3D-C1 Activities

  • ELMs (Kleiner)
  • Energetic particles / kinetic MHD / REs (C. Liu, Saxena, Zhao)
  • Core MHD in tokamaks (Banerjee, Jardin, D. Liu)
  • Disruptions (Clauser, Ferraro, C. Liu, Lyons, Strauss, Zhao)
  • Meshing software (Seol, Shephard, Riaz)
  • Pellets / impurities (Lyons)
  • RMPs (Zhao, Ferraro, Kleiner)
  • Solvers (Adams, Chen)
  • Stellarators (Ferraro, Hudson, Liu, Saxena, Wright, Zhou)

4

5 of 8

Reading M3D-C1 Stellarator Output with Fusion-IO

  • Fusion-IO is a library that provides functions for reading data from M3D-C1 and other MHD codes (https://github.com/nferraro/fusion-io)

  • Obviates the need for codes to understand M3D-C1’s output format (which is very complicated) or to perform interpolations.

  • We also don’t want codes to need to know how to translate computational coordinates into physical coordinates
    • All Fusion-IO functions require coordinates to be given in either cylindrical (R,φ,Z) or cartesian (X,Y,Z).

  • M3D-C1 stellarator output is in computational (x,φ,z) coordinates that are mapped to physical coordinates with fields R(x,φ,z) and Z(x,φ,z)
    • Need the (x,φ,z) coordinates to evaluate the field, but nontrivial to find the (x,φ,z) coordinates associated with the requested (R,φ,Z) coordinates

5

6 of 8

Reading M3D-C1 Stellarator Output with Fusion-IO

  • To find (x,φ,z) associated with requested (R,φ,Z):
    • Precalculate the (R,φ,Z) coordinates of each mesh node (done when mesh is loaded)
    • Search through elements to find which element contains the requested R,φ,Z coordinate, and the approximate (x,φ,z) coordinates within that element (using linear interpolation)
    • Perform Newton iterations to converge on the exact (x,φ,z) coordinate

  • Fusion-IO also has an interface to return the derivatives of the field (wrt (R,φ,Z)). This is now also implemented for all first- and second- derivatives (as described in Yao’s paper).
    • Some higher mixed derivatives like d3/dRdRdφ are not presently available

6

7 of 8

Reading M3D-C1 Stellarator Output with Fusion-IO

  • Caveats:
    • Some M3D-C1 outputs like xmag, zmag, etc. are still in computational coordinates and these are not yet translated to (R,Z) by Fusion-IO;
    • Some higher derivatives are not yet implemented
  • Bottom line: most tools using Fusion-IO now should now work for M3D-C1 stellarator output without any modification

7

8 of 8

Other issues?

8