Skip to content

Growth rates example notebook and bug fixes - #19

Closed
kpentland wants to merge 12 commits into
mainfrom
leuer_parameter
Closed

Growth rates example notebook and bug fixes#19
kpentland wants to merge 12 commits into
mainfrom
leuer_parameter

Conversation

@kpentland

@kpentland kpentland commented Jun 3, 2025

Copy link
Copy Markdown
Collaborator

In this PR we provide users with a new example notebook (number 10) on how to compute vertical instability timescales/growth rates and the associated quantities of an equilibrium.

The notebook:

  • explains how FreeGSNKE calculates the deformable growth rate for a given plasma equilibrium.
  • demonstrates different ways to visualise and plot (un)stable modes, Jacobian matrices, and how the plasma deforms under an unstable mode.
  • explains how to calculate other rigid (non-deformable) metrics such as the Portone parameter.
  • explains how to use different options to decompose passive structure modes (saving runtime).

Other updates include:

  • squashing a bug that was returning two unstable modes under some parameter combinations (a pseduoinverse matrix approximation has been replaced with the true pseduoinverse calculation).
  • replacing some numy.linalg.inv calculations (with numpy.linalg.solve) that were likely leading to numerical issues/instabilities.
  • re-numbered the example notebooks to account for more than ten.

@kpentland
kpentland requested a review from nicamo June 3, 2025 11:47
@kpentland kpentland added bug Something isn't working enhancement New feature or request labels Jun 3, 2025

@nicamo nicamo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks @kpentland, this looks great

@kpentland

Copy link
Copy Markdown
Collaborator Author

This PR is now slightly outdated due to fixes made in #20.

I've merged the relevant updates from here into #20 (e.g. new notebook 10, new numberings, np.linalg.inv removals, etc).

Closing this now.

@kpentland kpentland closed this Jun 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants