-
Notifications
You must be signed in to change notification settings - Fork 40
A variational principle based ideal MHD stability solver and optimizer #1893
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
Draft
rahulgaur104
wants to merge
248
commits into
master
Choose a base branch
from
rg/AGNI_var
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+3,087
−34
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…alculated master_compute_data
|
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
…_stability compute function; The diffmatrices should now be pre-computed and hopefully jax won't track their gradients
… preconditioner for the incompressible axisymmetric case
…y now, eigenfunctions seem less noisy.
… inverting C_zeta; imposing incompressibility using a projection operator for the axisymmetric case as well. More compact code. Should hopefully work better!
…ing a separate function to plot the eigenfunction at different toroidal cross-sections
…rsion doesn't run rn
…till having memory problem which is confusing!
…unning the code; I am trying to understand how iterative solvers work
…unning the code; I am trying to understand how iterative solvers work 2
…unning the code; matfree iterative solver only works if the eigenfunction guess is close to the true eigenfunction within 5%
…unning the code; matfree iterative solver only works if the eigenfunction guess is close to the true eigenfunction within 10%
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
functionality
New feature or request to do things the code can't do now.
objectives
Adding or improving objective functions
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.
Finite-n stability is important for tokamaks and non-poloidally omnigenous stellarators. Currently, there are no open source codes to solve this problem, much less perform optimization with it.
After a preliminary attempt discretizing and working with the ideal MHD force operator in #1791 , I realized that it would be easier to discretize the energy principle instead. Therefore, this PR creates a variational principle based eigenvalue solver and optimizer.
After discretization, the generalized eigenvalue problem becomes
where B is symmetric positive definite and A is symmetric. With some efficient linear algebra we cholesky decompose B and convert the problem above into a standard eigenvalue problem.
Addresses #1790
TODOs for the current PR:
Since the fundamental matrices themselves are pretty small (< 100 x 100 ~ few MBs), they can be passed via transforms.
plot_section.Future PRs
Checkpoints (only for me):
commit 7166c2d
commit 28e41c8