Skip to content

KineticForces - BUGFIX! - Keep the small collision width positive for either rotation sign - #561

Merged
matt-pharr merged 1 commit into
developfrom
bugfix/small-collision-abs-we-20261023
Oct 28, 2026
Merged

matt-pharr merged 1 commit into
developfrom
bugfix/small-collision-abs-we-20261023

Conversation

@krystophny

@krystophny krystophny commented Oct 23, 2026 •

Copy link
Copy Markdown
Collaborator

Use 1e-5 * abs(we) for nutype = "small" so negative rotation does not reverse the collision width, matching the Fortran correction.

Release note

  • Audience: users
  • Numerical impact: corrects calculated kinetic response for nutype = "small" at negative rotation (harness @ 77ef6d1)
  • Migration: rerun affected calculations; no input changes

Regression report

KineticForces tests: 5,097 assertions pass; the added test fails at all three negative-rotation points without the fix. Native solovev_kinetic_ntv: all seven tracked quantities unchanged.

Notes for reviewers

The regression test compares the energy integrand with an equivalent positive Krook width at both rotation signs.

Chris&AI


Generated by Claude Code

@github-actions github-actions Bot added bugfix Something was wrong and now is not changed-results Results move or an interface breaks - read before upgrading labels Oct 23, 2026
@krystophny
krystophny marked this pull request as ready for review October 23, 2026 09:06
@krystophny
krystophny requested a review from matt-pharr October 23, 2026 09:06
@krystophny krystophny self-assigned this Oct 23, 2026
krystophny added a commit to krystophny/GPEC.jl that referenced this pull request Oct 23, 2026
…n precession reverses

The "small" collision operator used nu = 1e-5*we, so a negative omega_E
gave a negative Krook width and turned damping into anti-damping. Use
1e-5*|we|, as in Fortran GPEC PR 320, and test the operator against a
Krook operator of that width for both rotation signs.

Upstream-PR: OpenFUSIONToolkit#561
Cherry-picked-from: 643f362
krystophny added a commit to krystophny/GPEC.jl that referenced this pull request Oct 23, 2026
…n precession reverses (#5)

The "small" collision operator used nu = 1e-5*we, so a negative omega_E
gave a negative Krook width and turned damping into anti-damping. Use
1e-5*|we|, as in Fortran GPEC PR 320, and test the operator against a
Krook operator of that width for both rotation signs.

Upstream-PR: OpenFUSIONToolkit#561
Cherry-picked-from: 643f362
@krystophny
krystophny force-pushed the bugfix/small-collision-abs-we-20261023 branch from 643f362 to 77ef6d1 Compare October 27, 2026 17:20
@krystophny krystophny changed the title KineticForces - BUGFIX! - Keep the small collision width positive when precession reverses KineticForces - BUGFIX! - Keep the small collision width positive for either rotation sign Oct 27, 2026

@matt-pharr matt-pharr left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Matches the fortran correction reviewed by @logan-nc. Code is fine. @krystophny FYI we typically prefer that the regression harness output is posted in the PR body so exactly what changed is precisely enumerated. Thank you for the contribution!

@matt-pharr
matt-pharr merged commit dd770e5 into develop Oct 28, 2026
12 of 13 checks passed
@matt-pharr
matt-pharr deleted the bugfix/small-collision-abs-we-20261023 branch October 28, 2026 11:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix Something was wrong and now is not changed-results Results move or an interface breaks - read before upgrading

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants