Particle balance constraint updated#4395
Open
chris-ashe wants to merge 16 commits into
Open
Conversation
…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
…PlasmaFuelling model
…Physics class run workflow
…euterium, helium-3, and alpha particles
… for the burnup and fuelling rate now being calculated implicitly
…to previous functions and tests
…ass. Add details for some fusion reactions also
…ay in summary file
6 tasks
j-a-foster
requested changes
Jun 29, 2026
j-a-foster
left a comment
Collaborator
There was a problem hiding this comment.
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" |
Collaborator
There was a problem hiding this comment.
Why are these /sec and not /s?
| linewidths=2, | ||
| ) | ||
|
|
||
| # Plot star for mfile values |
Collaborator
There was a problem hiding this comment.
Is it worth adding a note or legend that explains what the star means in the PDF?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
plasma_fuelling.md). This includes explanations of fuelling efficiency, recycling, and burnup fractions.PhysicsDatafor burnup fractions and detailed fusion reaction rates, enabling more granular tracking of fuel species and reactions.2. New input and iteration variables:
input.pyfor fuelling efficiency, injected fuel rates, and fuelling fractions for each species.3. Particle balance and consistency constraints:
constraints.pyto 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.4. Documentation and navigation updates:
mkdocs.yml, making the new model easily accessible in the documentation site.5. Miscellaneous improvements:
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: