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

TokaMaker: Add support for grouping coils into coil sets #38

Merged
merged 7 commits into from
Mar 4, 2024

Conversation

hansec
Copy link
Owner

@hansec hansec commented Mar 1, 2024

This pull request adds support for grouping one or more coil regions into a set that is viewed as a single coil in TokaMaker, including:

  • Support for defining coil sets within gs_Domain meshing interface
  • Add new TokaMaker.coil_sets dictionary which defines coils as seen by *_coil_currents() and other coil-related functionality
  • Number of turns per region is now taken into account in set_coil_currents(), get_coil_currents(), set_coil_reg(), etc.
  • Update examples to reflect changes in API
  • Add an example for HBT-EP

Note: When coil sets are not specified a single coil set per coil region with the same name is created. When the number of turns in a region is not specified it defaults to 1.

In addition the following changes were made to the core code:

  • Generalize the size of the coil regularization matrix in TokaMaker (see TokaMaker.Tokamaker.set_coil_reg())
  • Add scale length filtering for candidate X- and O-points in grad_shaf::gs_analyze_saddles()
  • Update Jupyter documentation conversion script to convert **Note:** to @note

This pull request does modify the following TokaMaker APIs.

  • TokaMaker.gs_Domain.define_region() now takes a coil_set argument
  • TokaMaker.TokaMaker.setup_regions() now takes a coil_dict argument for defining coil regions
  • TokaMaker.TokaMaker.get_coil_currents() now returns the region-wise current as the second argument

This pull request does not modify any input files

@hansec hansec added the enhancement New feature or request label Mar 1, 2024
Copy link

codecov bot commented Mar 1, 2024

Codecov Report

Attention: Patch coverage is 0% with 150 lines in your changes are missing coverage. Please review.

Project coverage is 57.3%. Comparing base (3afe65d) to head (4365648).

Files Patch % Lines
src/physics/grad_shaf.F90 0.0% 85 Missing ⚠️
src/python/wrappers/tokamaker_f.F90 0.0% 41 Missing ⚠️
src/physics/grad_shaf_td.F90 0.0% 12 Missing ⚠️
src/physics/grad_shaf_util.F90 0.0% 12 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##            main     #38     +/-   ##
=======================================
- Coverage   57.4%   57.3%   -0.1%     
=======================================
  Files        107     107             
  Lines      36046   36069     +23     
=======================================
  Hits       20702   20702             
- Misses     15344   15367     +23     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

 - Rename TokaMaker examples to better convention
@hansec hansec merged commit 6b3439b into main Mar 4, 2024
13 checks passed
@hansec hansec deleted the tMaker_coil_sets branch March 4, 2024 22:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant