Repository navigation
Conversation
…putes it Add the BootstrapCurrent utilities: exact Redl 2021 coefficients with L34 = L31, Koh ion collisionality, floored NRL Coulomb logarithms, the Sauter circulating fraction from surface moments of |B|, the jboot1 assembly of the flux-surface-averaged bootstrap current, and a profile-level entry point on a PlasmaEquilibrium with kinetic profiles. Tests compare against reference values from the OpenFUSIONToolkit TokaMaker Python implementation. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BgNxCBwLNHQmVq7iXMCTae
…trap_current, as the inner layers do Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BgNxCBwLNHQmVq7iXMCTae
… state its jphi_bs convention bootstrap_current now rejects a psi_N grid with fewer than three points, out of order, or outside (0, 1), and rejects zeff or impurity_charge below 1, as the inner layers do. The docstring says jphi_bs is the field-aligned part, without TokaMaker's pressure-driven term. Tests add the gradient stencil on a non-uniform quadratic and the rejected grids. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BgNxCBwLNHQmVq7iXMCTae
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BgNxCBwLNHQmVq7iXMCTae
This branch has not been deployed
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.
Adds
Utilities.BootstrapCurrent: the flux-surface-averaged bootstrap current ⟨j_bs·B⟩ from the Redl et al. (2021) closure, assembled the way OpenFUSIONToolkit TokaMaker assembles it, so that a GPEC calculation and a TokaMaker equilibrium carry the same bootstrap current.What is added
bootstrap_current(equil, kinetic=equil.kinetic; psi_N, Z_dom)returns ⟨j_bs·B⟩, j_φ,bs = ⟨j_bs·B⟩ F⟨1/R⟩/⟨B²⟩ (the field-aligned part; TokaMaker'sjphi_bsadds the pressure-driven P′(⟨R⟩ − F²⟨1/R⟩/⟨B²⟩)), and the intermediates (f_t, ν*_e, ν*_i, ε, R_geo, q, F, ⟨B²⟩, ⟨1/R⟩, ⟨1/R²⟩, L31, L32, L34, α) on a ψ_N grid.redl_coefficients(Redl Eqs. 10–21, L34 = L31);jdotB_bootstrap;circulating_fraction(Sauter's ¾ f_tu + ¼ f_tl from surface moments of |B|);surface_moments;coulomb_log_i,nu_star_e_flooredandnu_star_i_koh.zeffprofile, or else from the same quasineutral closure the inner layers use.docs/src/utilities.mdand the two citations.Verification
test/runtests_bootstrap_current.jl, 60 tests):redl_bootstrap(OFT 637ddb5) to 1e-12 at six points spanning f_t, Z_eff and both collisionalities;calculate_ln_lambda;use_sauter_eps = Trueat 637ddb5). Substituting the 26.6 values closes the gap to 0.024 %.Question for @d-burg: is (R_max − R_min)/(R_max + R_min) with R_geo the convention TokaMaker will keep? If not, the change is one line in
surface_moments.Release note
GPEC can compute the bootstrap current ⟨j_bs·B⟩ from kinetic profiles with the Redl 2021 closure, matching OpenFUSIONToolkit TokaMaker, via
Utilities.bootstrap_current.Part of #630 (general MRE).