Skip to content

Particle balance constraint updated#4395

Open
chris-ashe wants to merge 16 commits into
mainfrom
particle_balance_constraint_fixed
Open

Particle balance constraint updated#4395
chris-ashe wants to merge 16 commits into
mainfrom
particle_balance_constraint_fixed

Conversation

@chris-ashe

@chris-ashe chris-ashe commented Jun 29, 2026

Copy link
Copy Markdown
Collaborator

This pull request introduces a comprehensive plasma fuelling model to the codebase, including new physical variables, input parameters, constraints, and documentation. The main focus is to enable detailed particle balance and burnup fraction calculations for deuterium, tritium, and helium-3 in the plasma, and to ensure consistency through new constraint equations. Several new variables and iteration parameters are added to support these models, and the documentation is expanded to explain the physical basis and equations.

Key changes:

1. Plasma fuelling and particle balance model:

  • Added a detailed plasma fuelling model and particle balance equations for deuterium, tritium, helium-3, and alpha particles to the documentation (plasma_fuelling.md). This includes explanations of fuelling efficiency, recycling, and burnup fractions.
  • Added new physics variables in PhysicsData for burnup fractions and detailed fusion reaction rates, enabling more granular tracking of fuel species and reactions.

2. New input and iteration variables:

  • Introduced new input parameters in input.py for fuelling efficiency, injected fuel rates, and fuelling fractions for each species.
  • Added corresponding iteration variables for these new inputs, allowing them to be varied during optimization and scans.

3. Particle balance and consistency constraints:

  • Implemented new constraint equations (93–97) in constraints.py to enforce particle balance for tritium, deuterium, helium-3, alpha particles, and to ensure fuelling fractions sum to unity. These constraints help maintain physical consistency in the plasma model.
  • Updated numerics to include these new constraints, increasing the total number of constraints and variables.

4. Documentation and navigation updates:

  • Added the new plasma fuelling documentation page to the navigation in mkdocs.yml, making the new model easily accessible in the documentation site.

5. Miscellaneous improvements:

  • Added Avogadro's number to the constants module for use in physical calculations.
  • Improved output reporting for constraint errors in scan.py.

These changes collectively provide a robust framework for modeling plasma fuelling, tracking individual fuel species, and ensuring physical consistency in fusion plasma simulations.

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.

…ng to be used to solve the fuelling and burnup equations
…riton, needed to know the indvidual fuel production and removal rates
…ude the equations for main fuel species flow and thermal alpha flow
… for the burnup and fuelling rate now being calculated implicitly
…ass. Add details for some fusion reactions also
@chris-ashe chris-ashe added Physics Relating to the physics models Variable rename Input/Output Files Issues related to the input and output data files Documentation Improvements or additions to documentation Plotting labels Jun 29, 2026
@chris-ashe chris-ashe mentioned this pull request Jun 29, 2026
6 tasks
@chris-ashe chris-ashe marked this pull request as ready for review June 29, 2026 12:36
@chris-ashe chris-ashe requested a review from a team as a code owner June 29, 2026 12:36

@j-a-foster j-a-foster 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.

Just a couple of notes, otherwise happy with the changes.

f"Plasma power: {mfile.get('p_plasma_alpha_mw', scan=scan):.4f} MW\n"
f"Beam power: {mfile.get('p_beam_alpha_mw', scan=scan):.4f} MW\n\n"
f"Rate density total: {mfile.get('fusden_alpha_total', scan=scan):.4e} particles/m$^3$/sec\n"
f"Rate density, plasma: {mfile.get('fusden_plasma_alpha', scan=scan):.4e} particles/m$^3$/sec\n\n"

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.

Why are these /sec and not /s?

linewidths=2,
)

# Plot star for mfile values

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.

Is it worth adding a note or legend that explains what the star means in the PDF?

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

Labels

Documentation Improvements or additions to documentation Input/Output Files Issues related to the input and output data files Physics Relating to the physics models Plotting Variable rename

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants