Skip to content

fix(KIM): include harmonic current weight - #275

Draft
marjohma wants to merge 1 commit into
mainfrom
agent/kim-273-current-harmonic-weight
Draft

fix(KIM): include harmonic current weight#275
marjohma wants to merge 1 commit into
mainfrom
agent/kim-273-current-harmonic-weight

Conversation

@marjohma

Copy link
Copy Markdown
Member

Closes #273

Summary

  • apply A1 + (1 - m_phi) A2 in FP_G1_j_phi
  • apply the same common source coefficient in FP_G1_j_B
  • add manufactured checks for both current rows at m_phi = -1, 0, +1
  • include no documentation files

Derivation check

The perpendicular reduction gives the common FP source term D_0,m proportional to A1 + (1 - m) A2 once the separately represented finite-Larmor-radius pieces are removed. Charge rows already used this coefficient; the two current G1 rows did not.

Red/green evidence

Before the fix, the new j_phi check at m_phi = -1 returned 0.004374 + 0.008559 i instead of 0.003024 + 0.004779 i. The corrected code passes both current rows for all three harmonics.

Verification

  • test_fp_harmonic_prefactors
  • test_flr2_fourier_kernel
  • test_kim_solver_em
  • test_integration_methods

All four pass locally after the commit. Independent review reported no findings.

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.

[KIM] Include harmonic index in FP current G1 source coefficient

1 participant