Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Helical Coil Optimization Utilities #578

Closed
4 of 5 tasks
dpanici opened this issue Jul 13, 2023 · 0 comments · Fixed by #579
Closed
4 of 5 tasks

Add Helical Coil Optimization Utilities #578

dpanici opened this issue Jul 13, 2023 · 0 comments · Fixed by #579
Assignees
Labels
coil stuff relating to coils and coil optimization P3 Highest Priority, someone is/should be actively working on this

Comments

@dpanici
Copy link
Collaborator

dpanici commented Jul 13, 2023

@dpanici dpanici self-assigned this Jul 13, 2023
@dpanici dpanici added the coil stuff relating to coils and coil optimization label Aug 20, 2024
@dpanici dpanici added the P3 Highest Priority, someone is/should be actively working on this label Nov 11, 2024
dpanici added a commit that referenced this issue Nov 22, 2024
…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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
coil stuff relating to coils and coil optimization P3 Highest Priority, someone is/should be actively working on this
Projects
None yet
1 participant