Skip to content

4193 revamp beam fusion calculations#4200

Open
grmtrkngtn wants to merge 9 commits intomainfrom
4193-revamp-beam_fusion-calculations
Open

4193 revamp beam fusion calculations#4200
grmtrkngtn wants to merge 9 commits intomainfrom
4193-revamp-beam_fusion-calculations

Conversation

@grmtrkngtn
Copy link
Copy Markdown
Collaborator

@grmtrkngtn grmtrkngtn commented Apr 17, 2026

Description

Refactored beam_fusion model.

The model now directly computes beam alpha power from:

  • fast beam ion density (from a slowing-down model)
  • beam-weighted thermal target density
  • beam-target fusion reactivity
  • plasma volume

The previous thermal reactivity correction (Bosch-Hale) has been removed.

This was not physically consistent:

  • thermal fusion involves two Maxwellian populations

  • beam-target fusion involves one fast population and one thermal population

  • the beam reactivity already includes fast-ion averaging

  • See the docs for outline of the routine. I haven't changed much else of the physics but it's been listed more clearly in the docs in the new functional form.

  • Most of the changes are clarifying what each function is actually calculating and changing docstring and name accordingly.

Checklist

I confirm that I have completed the following checks:

  • My changes follow the PROCESS style guide
  • I have justified any large differences in the regression tests caused by this pull request in the comments.
  • I have added new tests where appropriate for the changes I have made.
  • If I have had to change any existing unit or integration tests, I have justified this change in the pull request comments.
  • If I have made documentation changes, I have checked they render correctly.
  • I have added documentation for my change, if appropriate.

@grmtrkngtn grmtrkngtn requested a review from a team as a code owner April 17, 2026 15:35
@grmtrkngtn grmtrkngtn linked an issue Apr 17, 2026 that may be closed by this pull request
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Apr 17, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 52.11%. Comparing base (4c99916) to head (0d1c31f).
⚠️ Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4200      +/-   ##
==========================================
+ Coverage   52.07%   52.11%   +0.03%     
==========================================
  Files         148      148              
  Lines       30321    30382      +61     
==========================================
+ Hits        15791    15834      +43     
- Misses      14530    14548      +18     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@grmtrkngtn grmtrkngtn requested a review from chris-ashe April 17, 2026 15:44
Copy link
Copy Markdown
Collaborator

@je-cook je-cook left a comment

Choose a reason for hiding this comment

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

Just comments on code and docstrings. I havent reviewed the model changes

Comment thread tests/unit/models/physics/test_fusion_reactions.py Outdated
Comment thread process/models/physics/fusion_reactions.py Outdated
Comment thread process/models/physics/fusion_reactions.py Outdated
Comment thread process/models/physics/fusion_reactions.py Outdated
Comment thread process/models/physics/fusion_reactions.py Outdated
Comment thread process/models/physics/fusion_reactions.py
Comment thread process/models/physics/fusion_reactions.py Outdated
@je-cook je-cook self-assigned this Apr 20, 2026
Copy link
Copy Markdown
Collaborator

@je-cook je-cook left a comment

Choose a reason for hiding this comment

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

Codewise happy, leaving the model thoughts to @chris-ashe

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Revamp beam_fusion calculations

3 participants