ascot4fusion / ascot5

ASCOT5 is a high-performance orbit-following code for fusion plasma physics and engineering
https://ascot4fusion.github.io/ascot5/
GNU Lesser General Public License v3.0
31 stars 9 forks source link

Find psi0 in preprocessing #50

Closed miekkasarki closed 11 months ago

miekkasarki commented 12 months ago

Having psi0 different than what is evaluated with splines is a constant headache. Here's what we need to do:

  1. Read EQDSK and convert it to B_2DS dictionary
  2. Initialize splines using the dictionary
  3. Find psi0 with gradien descent method (in libascot.so)
  4. Add little tiny bit of padding and replace psi0 in the dictionary
  5. Write the data to HDF5

This of course should be an optional argument in the import_geqdsk template.