Splined bespoke plasma profiles and updated poloidal beta #111
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi!
This update focused primarily in jtor.py and involved adding additional profile types. Previously, FreeGS has only been able to constrain BetaP/central pressure and plasma current, for profile parametrised by the (1-alpha_m)^alpha_n shape.
I have added equivalent functions that that pprime and ffprime data as a function for psi_norm. Splines are created from these data and are then used as a replacement for jtorshape in the previous ConstrainBetaPIp etc profiles.
I have then added variations of these for constraining pprime itself instead of BetaP, ffprime instead etc. to give the user the most possible options when it comes to what exactly they want constrained. There is even a profile that will constrain pprime and ffprime themselves (without constraining any other plasma parameters).
Whilst at it, I fixed the definition of beta poloidal which was incorrect, and has now been update in line with the literature - a couple of supporting methods in equilibrium.py were added.
An example, number 17, has been added to demonstrate using the splined profiles.