-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add JAX implementation of
REGCOIL
algorithm and Add Ability to Disc…
…retize Current Potentials into Coilsets (#579) - Adds function ``solve_regularized_surface_current`` to ``desc.magnetic_fields`` module that implements the REGCOIL algorithm (Landreman, (2017)) for surface current normal field optimization * Can specify the tuple ``current_helicity=(M_coil, N_coil)`` to determine if resulting contours correspond to helical topology (both ``(M_coil, N_coil)`` not equal to 0), modular (``N_coil`` equal to 0 and ``M_coil`` nonzero) or windowpane/saddle (``M_coil`` and ``N_coil`` both zero) * ``M_coil`` is the number of poloidal transits a coil makes before returning to itself, while ``N_coil`` is the number of toroidal transits a coil makes before returning to itself (this is sort of like the QS ``helicity``) * Can also specify `regularization_type` which can be `simple` or `regcoil`, the difference explained [here](https://www.overleaf.com/2924393292wskpdrwbtkhh#2ddf44), tldr is simple is not guaranteed to monotonically decrease $\chi^2_K$ as regularization increases, but gives the same qualitative behavior and is less expensive to run. - Adds method ``To_CoilSet`` to ``FourierCurrentPotentialField`` which implements a coil cutting algorithm to discretize the surface current into coils * works for both modular and helical coils * uses `skimage.measure.find_contours` instead of `matplotlib`'s deprecated contour finding algorithm, so this PR adds a new dependency in `skimage`. - Adds a new objective ``SurfaceCurrentRegularization`` (which minimizes ``w*|K|``, the regularization term from surface current in the REGCOIL algorithm, with `w` being the objective weight which act as the sqrt of the regularization parameter) * use of both this and the ``QuadraticFlux`` objective allows for REGCOIL solutions to be obtained through the optimization framework, and combined with other objectives as well. - Changes local area weighting of `Bn` in `QuadraticFlux` objective to be $\sqrt{|\mathbf{e}_{\theta} \times \mathbf{e}_{\zeta}}|$ - Adds a new tutorial showing how to use``REGCOIL`` features. Resolves #578 Resolves #1351 Resolves #1172
- Loading branch information
Showing
23 changed files
with
200,829 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.