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

Equilibrium analysis tools #675

Open
CoronelBuendia opened this issue Jan 31, 2022 · 0 comments · May be fixed by #3338
Open

Equilibrium analysis tools #675

CoronelBuendia opened this issue Jan 31, 2022 · 0 comments · May be fixed by #3338
Assignees
Labels
equilibria Tasks relating to the equilibria module geometry Tasks relating to the geometry module quality Tasks relating to quality issues or improvements
Milestone

Comments

@CoronelBuendia
Copy link
Contributor

CoronelBuendia commented Jan 31, 2022

Description of issue / requirement to address

This is a general issue to gather requirements for a set of functionality relating to equilibrium queries. Once we have a fairly complete list of required functionality, we can then discuss implementation and do the work.

At present a wide range of different tools are available in the equilibria module and in the BLUEPRINT StreamFlow object. The latter has some functionality which is not present in the new module, but is set to be deprecated.

Proposed solution

In my head, there are three generic categories of request for information on an Equilibrium object:

  • Calculation of some floating point value, integral or otherwise: (e.g. psi at some point, internal inductance of the plasma, flux surface elongation)
  • Queries as to where some physical feature lies in space: (e.g. finding the O, X-points, finding the LCFS, finding a flux surface based on some criterion)
  • Queries related to the structure of the core plasma: (e.g. profiles, values plotted on a per-flux-surface basis)
    Implement functionality for the following equilibrium queries:

At present, these bits of functionality are strewn about between equilibria/physics.py, equilibria/find.py, and equilbria/flux_surfaces.py. I propose to compile a list of desired functionality, restructure these tools in a clearer way, and implement any missing features.

Desired functionality

Description of functionality Exists in equilibria Name(s) New name
Finding the O and X points find_OX_points, eq.get_OX_points()
Finding the last closed flux surface find_LCFS_separatrix, eq.get_LCFS()
Finding the separatrix find_LCFS_separatrix, eq.get_separatrix()
Finding the separatrix legs get_legs
Finding a flux surface from a specified point find_flux_surface_through_point
Finding a flux surface(s) from a normalised psi vale find_flux_surf, eq.get_flux_surface()
Finding the inboard midplane point
Finding the outboard midplane point
Calculating the radial field due to the equilibrium and coils eq.Bx()
Calculating the vertical field due to the equilibrium and coils eq.Bz()
Calculating the poloidal field due to the equilibrium and coils eq.Bp()
Calculating the toroidal field (as 1/x estimate - no knowledge of TF coils) eq.Bt()
Calculating the plasma internal inductance calc_Li
Calculating the normalised plasma internal inductance calc_li, calc_li3
Calculating the plasma volume calc_volume
Calculating the plasma energy calc_energy
Calculating the ratio of plasma pressure to magnetic pressure calc_betap, calc_beta_p, beta_p [facepalm]
Calculating the safety factor eq.q(), ClosedFluxSurface.safety_factor()
Calculating the 3-D connection length calculate_connection_length_flt, calculate_connection_length_fs, ClosedFluxSurface.connection_length()
Calculating the elongation of a flux surface ClosedFluxSurface.kappa[upper, lower]
Calculating the triangularity of a flux surface ClosedFluxSurface.delta[upper, lower]
Calculating the (outer) squareness of a flux surface ClosedFluxSurface.zeta[upper, lower]
Calculate the field angle at a point

TO BE UPDATED as part of this issue

Alternative solutions

We could carry on as is and add in pieces of functionality piecemeal, but we're already struggling with organisation and duplication of little helper functions and the like.

Additional context

Quite a few people probably want to have a say in terms of what is required, so @hsaunders1904 @markj997 @DarioV86 @je-cook @alexanderianblair @DanShort12 , please feel free to comment on this issue.

@CoronelBuendia CoronelBuendia added geometry Tasks relating to the geometry module equilibria Tasks relating to the equilibria module quality Tasks relating to quality issues or improvements labels Jan 31, 2022
@CoronelBuendia CoronelBuendia self-assigned this Jan 31, 2022
@je-cook je-cook added this to the Version 1.0.0 milestone Jul 26, 2022
@je-cook je-cook moved this to To do in TSVV-14 Aug 3, 2022
@je-cook je-cook added this to TSVV-14 Aug 3, 2022
@je-cook je-cook modified the milestones: Version 1.0.0, Version 1.X.X. Dec 19, 2022
@je-cook je-cook modified the milestones: Version 1.2.0, Version 2.0.0 Mar 8, 2023
@je-cook je-cook modified the milestones: Version 1.3.0, Version X.X.X Mar 29, 2023
@je-cook je-cook modified the milestones: Version 1.4.0, Version X.X.X May 24, 2023
@je-cook je-cook modified the milestones: Version 1.5.0, Version 1.X.X Jul 6, 2023
@je-cook je-cook modified the milestones: Version 1.6.0, Version 1.X.X Aug 22, 2023
@je-cook je-cook modified the milestones: Version 1.7.0, Version 1.8.0 Sep 29, 2023
@je-cook je-cook modified the milestones: Version 1.8.0, Version 2.0.0 Sep 29, 2023
@je-cook je-cook modified the milestones: Version 1.9.0, Version 1.X.X Feb 8, 2024
@je-cook je-cook mentioned this issue May 24, 2024
3 tasks
@je-cook je-cook moved this from To do to In progress in TSVV-14 May 24, 2024
@je-cook je-cook linked a pull request Jun 6, 2024 that will close this issue
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
equilibria Tasks relating to the equilibria module geometry Tasks relating to the geometry module quality Tasks relating to quality issues or improvements
Projects
Status: In progress
Development

Successfully merging a pull request may close this issue.

2 participants