Skip to content

cylindrical coordinates - #2253

Draft
ddudt wants to merge 16 commits into
dd/gridsfrom
dd/cylindrical
Draft

cylindrical coordinates#2253
ddudt wants to merge 16 commits into
dd/gridsfrom
dd/cylindrical

Conversation

@ddudt

@ddudt ddudt commented Jun 26, 2026

Copy link
Copy Markdown
Collaborator

New grid and basis classes for working in cylindrical coordinates $(R,\phi,Z)$. This is required for the PlasmaField class introduced in #996. This PR isolates those changes from that original PR to aid review.

The order of these related PRs are:

  1. New Grid API #2053 dd/grids
  2. cylindrical coordinates #2253 dd/cylindrical
  3. Biot-Savart volume integral #996 dd/B_plasma
  4. BMW and FIELDLINES-style output formatting for B_plasma calculations #1883 ma/bmw_format
  5. TBD new divertor objectives

To-Do:

  • copy over CylindricalGrid class, and update to new API
  • copy over cylindrical grids tests and/or add new tests

@ddudt ddudt self-assigned this Jun 26, 2026
@ddudt ddudt added the enhancement General label for enhancement. Please also tag with "Speed", "Interface", "Functionality", etc label Jun 26, 2026
@maya-avida maya-avida mentioned this pull request Jul 18, 2026
8 tasks
@maya-avida

maya-avida commented Jul 23, 2026

Copy link
Copy Markdown
Collaborator

More to-dos:

  • add symmetry?
  • add real space bounds to easily rescale nodes to physical space
  • generalized fft and dct attributes
  • generalized transforms

Comment thread desc/grid/cylindrical.py Outdated
Options for x2 coordinate:
- z = Z
"""
coordinates = self.__dict__.setdefault("_coordinates", "rpz")

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be RpZ or rpz?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, we probably want "RpZ" to distinguish from rho and zeta

@YigitElma

Copy link
Copy Markdown
Collaborator

@maya-avida, if you run the following, the formatting checks/fixes will happen automatically every time you commit something.

pip install pre-commit
pre-commit install

These and some other useful instructions can be found on the Contributing Guide.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement General label for enhancement. Please also tag with "Speed", "Interface", "Functionality", etc

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants