Repository navigation
Alfven perturbation from a FAX eigenmode (builds on #196) - #235
Open
rogeriojorge wants to merge 14 commits into
Open
rogeriojorge wants to merge 14 commits into
rogeriojorge wants to merge 14 commits into
Conversation
Core: one Perturbation base (potentials/derivatives/axis stop) shared by the Boozer and native classes, a single envelope(), shorter mode validation and trace_boozer docstring. Traces are bitwise identical to before. Examples: the two analytical/VMEC paper benchmarks, their launcher, comparison and plotting scripts, conventions, sampling and saved reference data become one paul_alfven_benchmark.py (Boozer and VMEC backgrounds, --historical for the 2023 conventions) plus a short alfven_perturbation.py. The physics verification lives in the tests instead of a separate benchmark. Tests: the Boozer, axis-stop and electromagnetic-verification files are merged into test_perturbations.py, the VMEC map tests into test_native_gc_perturbations.py; tests of benchmark-script plumbing are dropped. Docs: shorter page, one figure regenerated by the benchmark script.
…ions' into simplify/alfven-perturbations
…mark with parameters at top
…op the 1.5 MB duplicate
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Builds on #196 (the slimmed #177, current main merged), so the diff against #177 includes that slimming; this PR itself adds the last commit only:
FaxEigenmode, its example, README/docs text and three tests. If #196 is merged into #177 first, the diff reduces to those files.What
essos.perturbations.FaxEigenmode: aBoozerPerturbationbuilt from a FAX v0.0.2 global eigenmode.FaxEigenmode.from_fax(directory, amplitude)readsglobal_eigenmodes.csv(omega^2) andglobal_mode_structures.csv(amplitude of each (m, n) Boozer harmonic on the radial grid). Phi is the sum over harmonics of the interpolated profile times sin(m theta - n zeta + omega t + phase); alpha follows (n - m iota) Phi / (omega (G + iota I)) per harmonic, as inAnalyticalAlfvenMode. FAX uses the same cos(m theta - n zeta) convention with n a full-torus integer, so nothing is converted. Amplitude is an input; FAX supplies structure and frequency.examples/input_files/fax_mode(8.5 kB) and the example docstring lists the FAX calls that regenerate it.examples/particle_tracing/fax_alfven_mode.py: 64 3.5 MeV alphas, 0.5 ms, amplitude 2e4 V (22 kHz, m = 3..6, n = 2): loss 9.4% without the wave and 15.6% with it, max |dE/E| 6e-2 with it.Tests (
tests/test_fax_eigenmode.py, 15 s CPU)Checks
JAX_ENABLE_X64=1 pytest tests/test_fax_eigenmode.py: 3 passed. The example ran to completion (100 CPU s). CI not yet run on this branch.