DESC icon indicating copy to clipboard operation
DESC copied to clipboard

Add Vector Potential Calculation to `Coil` classes and Most `MagneticField` Classes

Open dpanici opened this issue 9 months ago • 3 comments

Add utilities for calculating the magnetic vector potential for fields and coils/currents (assuming the Coulomb gauge). These will be useful for reconstruction as the most efficient way to calculate flux through a diagnostic flux loop is to integrate the vector potential. The utilities here should allow for calculating the vector potential from most sources of interest: coils and the plasma contribution (through K=nxB and the general biot-savart law here, as the loops are located outside from the plasma)

  • [x] Add general biot savart law for vector potential
  • [x] Add Hanson-Hirhsman biot savart law for coil vector potential
  • [x] Add quadrature biot savart law for coil vector potential
  • [x] add to current potential
  • [x] add tests for current potential (tests loop integral against enclosed toroidal flux)
  • [x] add to coils
  • [x] add test for coils for simple loop on z-axis
  • [x] add a test against enclosed toroidal flux doing a loop integral (like the one in this paper perhaps)
    • [x] understand why flipping orientation of the coil parameterization does not flip sign of A? Check signs of A and x_s, though even just the A does not change sign as I expect... but I'd expect xs to change sign when the parameterizwion is flipped
  • [x] add to the analytic fields
  • [x] add tests for the analytic fields
  • [x] Add VectorPotentialField
  • [x] Add to SplineMagneticField (from mgrid)
  • [x] note all gauges (try to put Coulomb Gauge for all) TF and VF are, and the rest are either from AD or mgrid, so we can't really check that
  • [x] Use Vector potential for ToroidalFlux objective (possibly as an option, since not all B fields have a vector potential field)

Resolves #1023

dpanici avatar May 20 '24 19:05 dpanici