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

Spec refactoring/improvement (PR 1 of 3 for single-stage) #416

Closed
wants to merge 3 commits into from

Conversation

smiet
Copy link
Contributor

@smiet smiet commented May 24, 2024

Updates to Spec and NormalField and a few helper functions .

Spec class has been updated with the following features:

  • detection when free-boundary solution is not converged
  • re-set to initial state when not converged or not in force balance
  • re-written loops pythonically where possible (for vol in range(self.inputlist.mvol+1) -> `for surface in self.initial_guess:')
  • implemented array_translator to further reduce lists over index counters.
  • activate_profile: make a profile of your spec equilibrium optimizable in simsopt

The NormalField class has been augmented to:

  • include the boundary on which it is defined
  • store the Fourier components that describe it in array-form
  • include getters and setters for the FCs in array form
  • set the dofs in their entirety even when setting single (fixes bug where changing a DOF did not trigger recompute bell)

The Surface base class has two methods: fourier_transform_field and inverse_fourier_transform_field to efficiently calculate fourier transforms in the VMEC convention (-ntor to ntor toroidal components, 0:mpol poloidal). Allows for different Fourier normalization conventions through the 'normalization' parameter.

This is PR 1 of 3, the following two:

  • CoilSet and ReducedCoilSet: helper classes to enable interchanging of coils, and create new optimization variables through SVD on coil DOFS
  • CoilNormalField and misc changes: class inheriting form NormalField that interfaces to the CoilSets, all other misc changes needed to make the single-stage optimizations work.

@smiet smiet closed this May 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant