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

ICRH field for full-orbit simulations #133

Open pablo-oyola opened 21 hours ago

pablo-oyola commented 21 hours ago

So far the efforts in ASCOT5 have been focused on re-introducing the RFOF module and compare it to the ASCOT4 results. The RFOF module induces a kick into the particle using a diffusion operator, computed for the guiding-center calculation. However, in some cases, whenever the GC approximation does not hold any more, one needs to consider the more-expensive case of the full-orbit. Some of those cases could be:

In that situation, the full-orbit should be used. For the full-orbit the implementation of the RF fields is straightforwards: the resonance effect is naturally captured in the full Lorentz’s equation as the gyromotion is explicitly being solved. This is the approach followed in SPIRAL in Refs. [3] and [4]. In that case, SPIRAL uses the 3D electric field as an input, while the time variation is just modulated following a simple frequency oscillation. SPIRAL can work with two modes for the 3D RF electric field:

  1. A 2D field with some toroidal mode number, as assumed by TORIC [3].
  2. A full 3D field as computed from the FEM codes, like Petra-M [4].

SPIRAL and ASCOT5 have already undergone some comparisons, so it SPIRAL-RF to ASCOT5-RF-FO should be comparable as well [5].

The approach to implement the RF in the full-orbit case would be divided in the following tasks.

Numerical developments

  1. Implement the new kind of electric fields in ASCOT: a new class for the electric field interfacing the TORIC/AORSA ones should be implemented:
    • [ ] Implement new object in the C-side in the folder src/Efield/ and adding it into the list of possible electric fields in src/efield.h and src/efield.c .
    • [ ] Implement the reading from the HDF5.
    • [ ] Create interfacing python-object in a5py/ascot5io/efield.py that allow writing the fields to the HDF5 file and reading from it.
    • [ ] Implementing the libascot communication to easily communicate and debug what is going on the C-side
  2. Add new options to handle this new electric field.
    • [ ] Add option to scale the total power (aka, field amplitude) from the option list.
    • [ ] Add option to change the field frequency from the option list.
    • [ ] Options to turn on/off the full RF full-orbit module (maybe combine this option to the GC one?)
    • [ ] Add option to choose between full 3D wave or to use 2D+toroidal mode number.
    • [ ] Flags to turn on/off the contribution $\vec{E}-$ and/or $\vec{E}\parallel$

Physical developments

  1. Simple physical tests on the module
    • [ ] Come up with some simple analytical case where one can analytically solve the motion of the particle (if possible)
    • [ ] Compare with the simplest analytical cases:
      1. In the limit where GC approximation is valid, the result from the particle kick should still be valid so the RMS energy should evolve as $\sqrt{t}$ , aka, following a diffusive behavior.
      2. If an analytical orbit solution is found, then compare to that.
    • [ ] Compare to GC solutions: in the GC-limit, the GC-kick and FO should be match.
    • [ ] Compare to other codes, like SPIRAL.

References

  1. N. Chen, G. Wright, P. Bonofiglo, M. Podesta, “Investigating Guiding-center versus full orbit effects with ORBIT-GPU”.
  2. A. Bierwage and K. Shinohara, “Testing the conservative characters of particle simulations II: Spurious heating of guiding centers and full orbits subject to fluctuations expressed in terms of E and B”, Phys. Plasmas 29 (2022) pp. 113906.
  3. G. J. Kramer et al, “A description of the full-particle-orbit following SPIRAL code for simulating fast-ion experiments in tokamaks”, PPCF 55 (2013) https://iopscience.iop.org/article/10.1088/0741-3335/55/2/025013/pdf
  4. N. Bertelli et al., “3D full wave fast wave modeling with realistic antenna geometry and SOL plasma”, AIP Conference Proceedings 2254 (2020) DOI:10.1063/5.0013580.
  5. S. D. Scott, G. J. Kramer et al, “Fast-ion physics in SPARC”, Journal of Plasma Physics URL:https://www.cambridge.org/core/journals/journal-of-plasma-physics/article/fastion-physics-in-sparc/F89E759B0285A9E86DBDFFA387384BFD
miekkasarki commented 17 hours ago

We need to discuss how to handle the various options once we get there. Preferably I'd have as few options as possible in the actual options, and more parameters in the electric field input.

As for the tests, ideally we would have the wave solution for this "ITER-like" circular plasma case which is used in many of the tutorials and in other tests. Something simple, fast and one where the data can be distributed freely, so that we can run it in our testing pipeline. This would also benefit the GC implementation (which @jsjoona tests by comparing the steady-state energy distribution to an analytical model).

I've one question. In the full-orbit model, does the particle have to interact with the electric field on every time-step, or is it sufficient that the interaction is only at the resonance (layer)?