Skip to content

Normalise the parabolic ohmic current density to the plasma current - #38

Open
keyhell wants to merge 1 commit into
hansec:mainfrom
Next-Step-Fusion:fix/parabolic-current-normalisation
Open

keyhell wants to merge 1 commit into
hansec:mainfrom
Next-Step-Fusion:fix/parabolic-current-normalisation

Conversation

@keyhell

@keyhell keyhell commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

Fixes #37.

Without a gEQDSK, _setup_profs normalises the parabolic current-density shape to 1 on axis and _P_OH_prof uses J = Itot*1e6*j_prof, so J peaks at Ip amperes per square metre whatever the plasma cross-section and ∫ J dA_pol ≠ Ip. Pohmic and vloop are 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 = Itot and 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).
  • MANTA golden file unchanged (gEQDSK path untouched); pytest tests: 160 passed.
  • The parabolic examples change in Pohmic, vloop, and hence Paux and Q; numbers in Ohmic power: parabolic current density is not normalised to the plasma current #37.

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Ohmic power: parabolic current density is not normalised to the plasma current

1 participant