Repository navigation
Conversation
Without a gEQDSK, _setup_profs normalised the current-density shape to 1 on axis while _P_OH_prof used J = Itot*j_prof, so J peaked at Ip amperes per square metre whatever the plasma cross-section and int J dA_pol != Ip. Pohmic and vloop were off by (int j_prof dA_pol)^-2: x0.25 on the SPARC example, x29 on ITER, x0.009 on NSF_NT_CMOD. The gEQDSK branch already divides by the cross-section integral (Jrms_norm = jrms / Jrmsint). Divide the parabolic shape by its poloidal cross-section integral, dA_pol = dV / (2 pi R), so int Itot*j_prof dA_pol = Itot. Add a regression test on the SPARC settings. MANTA golden values unchanged; 160 tests pass. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
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.
Fixes #37.
Without a gEQDSK,
_setup_profsnormalises the parabolic current-density shape to 1 on axis and_P_OH_profusesJ = Itot*1e6*j_prof, soJpeaks atIpamperes per square metre whatever the plasma cross-section and∫ J dA_pol ≠ Ip.Pohmicandvloopare then off by(∫ j_prof dA_pol)⁻²: ×0.25 on the SPARC example, ×29 on ITER (13 MW of ohmic power at the grid centre, 0.45 MW after the fix), ×0.009 on NSF_NT_CMOD. The gEQDSK branch already divides by the cross-section integral (Jrms_norm = jrms / Jrmsint).This divides the parabolic shape by its poloidal cross-section integral,
dA_pol = dV/(2πR), so∫ Itot·j_prof dA_pol = Itotand both branches use the same convention.openpopcon/core.py: 7 lines in_setup_profs.tests/test_invariants.py:test_parabolic_current_profile_integrates_to_ip(SPARC settings; fails on main with 4.39 vs 8.7 MA, passes here).pytest tests: 160 passed.Pohmic,vloop, and hencePauxandQ; numbers in Ohmic power: parabolic current density is not normalised to the plasma current #37.