-
Notifications
You must be signed in to change notification settings - Fork 26
Particle balance constraint #4139
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
42 commits
Select commit
Hold shift + click to select a range
9210e9a
Add new plasma physics variables and update iteration variable count
chris-ashe 9081e52
Add particle balance constraint equation and update constraint count
chris-ashe b28ffda
Add new plasma physics input variables for recycling and fuelling
chris-ashe 64a10a3
Refactor particle balance constraint equation and update iteration va…
chris-ashe 34947ac
Update particle balance constraints and increment equation count
chris-ashe ef39524
Update constraint limits
chris-ashe de9ac4e
Add new total D-T fusion rate variables
chris-ashe 4f1b0e1
Update consistency equations for particle consistency
timothy-nunn 209e824
Update molflow plasma fuelling variable ranges for consistency
chris-ashe 966b457
Refine fusion power output formatting for improved precision in plot …
chris-ashe 783f26b
Add D-D fusion reaction rate variables for helium and tritium branches
chris-ashe 8b4e744
Add D-D fusion rate calculations for tritium and helium branches
chris-ashe 6d974b4
Add plasma tritium flow rate calculations and contour plotting
chris-ashe 89a29b6
Add total D-D fusion rate calculation and update output formatting
chris-ashe 8cd99b6
Add deuterium and alpha particle flow rate calculations and contour p…
chris-ashe 0c821db
Add plotting of fuelling efficiency and recycling fraction in plasma …
chris-ashe d259c03
Add plasma fuelling equations and documentation
chris-ashe 54db27a
Add D-3He fusion rate and neutron production rate calculations
chris-ashe 9e9aa5e
Add fuelling composition variables and constraints for deuterium, tri…
chris-ashe d78757c
Enhance plasma flow calculations by adding tritium and deuterium flow…
chris-ashe 1b903ed
Rename burn-up fraction variable to f_plasma_fuel_burnup across multi…
chris-ashe 55d08f1
Refactor fuel burn-up rate variable to fusrat_total across multiple f…
chris-ashe e06b0a9
Refactor plasma exhaust calculations to plasma fuelling, updating rel…
chris-ashe 3ebde65
Refactor plasma fuelling plotting functions to improve organization a…
chris-ashe d8aec4d
Integrate PlasmaFuelling class into physics calculations and update f…
chris-ashe c88c865
Enhance plasma fuelling documentation with flow rate equations and ke…
chris-ashe 6772cea
Refactor fuelling output logic to use dedicated method in PlasmaFuell…
chris-ashe 32961f2
:fire: Remove tauratio variable from input variables and related test…
chris-ashe 659fb1b
Add tritium and deuterium burnup calculations and update physics vari…
chris-ashe 0760176
:fire: Refactor plasma fuelling variables: remove unused 'molflow_pla…
chris-ashe 3a91922
Add Avogadro's number constant with reference documentation
chris-ashe ebc45c1
Add plasma fuelling loss calculations and update related variables in…
chris-ashe 6aed3e6
Add helium-3 flow contour plotting and enhance existing contour plots…
chris-ashe b26a3e1
Refactor plotting indices in main_plot function to accommodate additi…
chris-ashe d594337
Enhance plasma fuelling documentation: add definitions for exhaust ef…
chris-ashe 694d95b
Refactor Physics model and unit tests to integrate PlasmaFuelling cla…
chris-ashe 6004cfb
Post rebase fixes
chris-ashe 4789875
post rebase fixes
chris-ashe af1ecc7
Enhance plasma fuelling documentation and update constraint equations…
chris-ashe 74eac1c
Enhance plasma fuelling documentation: add particle balance section, …
chris-ashe 6b5fa2c
Update large tokamak input file: adjust number of equality constraint…
chris-ashe 3e5c5fd
Fix bug in output caused by rebase
chris-ashe File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,212 @@ | ||
| # Plasma Fuelling | `PlasmaFuelling()` | ||
|
|
||
| ## Particle balance | ||
|
|
||
| The control of fuelling is governed by 4 key particle flux equations for each of the primary fuel species and the helium ash, $\alpha$. | ||
|
|
||
| $$ | ||
| \frac{dn_{\text{T}}}{dt} = f_{\text{fuelling,T}}\eta_{\text{fuelling}}\Gamma_{\text{fuel}} + \Gamma_{\text{D+D} \rightarrow \text{T}} - \Gamma_{\text{D+T}} - \frac{N_{\text{T}}}{\tau_{\text{T}}^*} | ||
| $$ | ||
|
|
||
| $$ | ||
| \frac{dn_{\text{D}}}{dt} = f_{\text{fuelling,D}}\eta_{\text{fuelling}}\Gamma_{\text{fuel}} -2 \Gamma_{\text{D+D}}- \Gamma_{\text{D+3He}} - \Gamma_{\text{D+T}} - \frac{N_{\text{T}}}{\tau_{\text{D}}^*} | ||
| $$ | ||
|
|
||
| $$ | ||
| \frac{dn_{\text{3He}}}{dt} = f_{\text{fuelling,3He}}\eta_{\text{fuelling}}\Gamma_{\text{fuel}} + \Gamma_{\text{D+D} \rightarrow \text{3He}} - \frac{N_{\text{T}}}{\tau_{\text{3He}}^*} | ||
| $$ | ||
|
|
||
| $$ | ||
| \frac{dn_{\alpha}}{dt} = \Gamma_{\text{D+3He}} + \Gamma_{\text{D+T}} - \frac{N_{\alpha}}{\tau_{\alpha}^*} | ||
| $$ | ||
|
|
||
| In a steady state equilibrium all 4 of these equations should balance, therefore: | ||
|
|
||
| $$ | ||
| \frac{dn_{\text{D}}}{dt} = \frac{dn_{\text{T}}}{dt} = \frac{dn_{\text{3He}}}{dt} = \frac{dn_{\alpha}}{dt} = 0 | ||
| $$ | ||
|
|
||
| Here $\eta_{\text{fuelling}}$ is the fuelling efficiecny which represents the method of injecting fuel into the plasma. Gas puffing on the low field side is probably around 0.01-0.1, supersonic gas is 0.1 and 0.2 and using pellets can get you close to unity with 0.5-0.9. $\Gamma_{\text{fuelling}}$ is the fuel injection rate into the vacuum vessel, so $\eta_{\text{fuelling}} \Gamma_{\text{fuelling}}$ together presents the fraction of injected fuel that actually makes it into the plasma core to fuse. | ||
|
|
||
|
|
||
| The fuelling fractional compositions is given by $f$ | ||
|
|
||
| - $N$ is the total amount of ions in the plasma. | ||
|
|
||
| - $\tau_{\text{fuel}}^*$ is the recycling corrected fuel particle confinement time given by: | ||
|
|
||
| $\tau_{\text{fuel}}^* = (\tau_p) / (1-R)$ | ||
|
|
||
| The (effective) exhaust efficiency is is given by , $\eta_{\text{eff}} = 1- R$ | ||
|
|
||
| The factor $\frac{R}{1-R}$ is the mean number of recycling events back into the burning region experieced by a particle before it is pumped away. | ||
|
|
||
| The definition of the recycling coefficient $R = 1- \frac{\Gamma_{\text{pumps}}}{\Gamma_{\text{out}}}$, where $\Gamma_{\text{pumps}}$ is the number of particles exhausted by the pumps per second and $\Gamma_{\text{out}}$ is the number of particles per second transported radially outwards across the separatrix. | ||
|
|
||
|
|
||
|
|
||
| Where $\tau_p$ is the particle confinement time which we can assume is approximately equal to the energy confinement time ($\tau_p = \tau_E$). | ||
|
|
||
| !!! warning "Relation between $\tau_p$ and $\tau_E$" | ||
|
|
||
| In this model the "raw" particle confinement time ($\tau_p$) is set to always match the energy confinement time ($\tau_E$). The only variation of this in terms of the "effective" particle confinement time $\tau_{p}^*$ is via the recycling coefficient ($R$). If needed new coeffcients may be added to scale ($\tau_p$) before recyling corrections if needed. | ||
|
|
||
| !!! note "Quantifying $R$" | ||
|
|
||
| The recycling coefficient $R$, defined as the fraction of particles crossing the LCFS that return to the plasma, can depend on numerous factors—including vessel pumping speed, neutral pressure in the private‑divertor region, impurity seeding levels, and the detailed properties of the SOL. Among these parameters, $R$ is the least certain and the most difficult to quantify. In next‑step devices, the SOL temperature is expected to be high, so particles reflected from the vessel walls are mostly ionized within the SOL and are removed by pumping before they can effectively refuel the burning plasma. As a result, the recycling coefficient is anticipated to be lower than in present‑day tokamaks, where $R$ can often approach unity. An additional uncertainty is the extent of neutral penetration at the plasma edge, which influences both the pedestal density and the density profile, and therefore also affects $R$[^1]. | ||
|
|
||
|
|
||
|
|
||
|
|
||
| ### METIS Alpha Confinement | ||
|
|
||
| $$ | ||
| \tau_{\alpha} = f_{\alpha}\tau_{\text{E}}\frac{R}{1-R}\tau_{\text{ne}} | ||
| $$ | ||
|
|
||
| This is the model currently in METIS[^2] and is found in [^3] | ||
|
|
||
|
|
||
| -------------- | ||
|
|
||
| ### Tritium Flow Rate | `calculate_plasma_tritium_flow_rate()` | ||
|
|
||
| $$ | ||
| \frac{dn_{\text{T}}}{dt} = f_{\text{fuelling,T}}\eta_{\text{fuelling}}\Gamma_{\text{fuel}} + \Gamma_{\text{D+D} \rightarrow \text{T}} - \Gamma_{\text{D+T}} - \frac{N_{\text{T}}}{\tau_{\text{T}}^*} | ||
| $$ | ||
|
|
||
| --------------- | ||
|
|
||
| ### Deuterium Flow Rate | `calculate_plasma_deuterium_flow_rate()` | ||
|
|
||
| $$ | ||
| \frac{dn_{\text{D}}}{dt} = f_{\text{fuelling,D}}\eta_{\text{fuelling}}\Gamma_{\text{fuel}} -2 \Gamma_{\text{D+D}}- \Gamma_{\text{D+3He}} - \Gamma_{\text{D+T}} - \frac{N_{\text{T}}}{\tau_{\text{D}}^*} | ||
| $$ | ||
|
|
||
| --------------- | ||
|
|
||
| ### Helium-3 Flow Rate | `calculate_plasma_helium3_flow_rate()` | ||
|
|
||
| $$ | ||
| \frac{dn_{\text{3He}}}{dt} = f_{\text{fuelling,3He}}\eta_{\text{fuelling}}\Gamma_{\text{fuel}} + \Gamma_{\text{D+D} \rightarrow \text{3He}} - \frac{N_{\text{T}}}{\tau_{\text{3He}}^*} | ||
| $$ | ||
|
|
||
| --------------- | ||
|
|
||
| ### Alpha Particle Flow Rate | `calculate_plasma_alphas_flow_rate()` | ||
|
|
||
| $$ | ||
| \frac{dn_{\alpha}}{dt} = \Gamma_{\text{D+3He}} + \Gamma_{\text{D+T}} - \frac{N_{\alpha}}{\tau_{\alpha}^*} | ||
| $$ | ||
|
|
||
| ----------------- | ||
|
|
||
| ## Fuel Burnup Fration | ||
|
|
||
| In a steady state tokamak, the burnup fraction ($f_b$) is explicitly defined by the following rate equation: | ||
|
|
||
| $$ | ||
| f_b = \frac{\Gamma_{\text{fusion}}}{\Gamma_{\text{fuel}}} | ||
| $$ | ||
|
|
||
| where $\Gamma_{\text{fusion}}$ is the fusion rate in reactions per second $[\text{s}^{-1}]$, and $\Gamma_{\text{fuel}}$ is our fuelling rate into the vessel like is shown above also in $[\text{s}^{-1}]$. | ||
|
|
||
| ----------------- | ||
|
|
||
| ### Total Fuel Burnup Fraction | `calculate_fuel_burnup_fraction()` | ||
|
|
||
| For the total burnup fraction we state: | ||
|
|
||
| $$ | ||
| \overbrace{f_b}^{\texttt{f_plasma_fuel_burnup}} = \frac{2\left(\Gamma_{\text{D+D}}+\Gamma_{\text{D+T}}+\Gamma_{\text{D+3He}}\right)}{\Gamma_{\text{fuel}}} | ||
| $$ | ||
|
|
||
| Here the factor of 2 is included as each fusion reaction removes 2 particles but our fuelling rate looks at indivudal particles injected. | ||
|
|
||
| ------------------- | ||
|
|
||
| ### Tritium Burnup Fraction | `calculate_tritium_burnup_fraction()` | ||
|
|
||
| For just the tritium burnup fraction we state: | ||
|
|
||
| $$ | ||
| \overbrace{f_b}^{\texttt{f_plasma_tritium_burnup}} = \frac{\left(\Gamma_{\text{D+T}}\right)}{\Gamma_{\text{fuel}}f_{\text{fuelling,T}}} | ||
| $$ | ||
|
|
||
| ------------------ | ||
|
|
||
| ### Deuterium Burnup Fraction | `calculate_deuterium_burnup_fraction()` | ||
|
|
||
| For just the deuterium burnup fraction we state: | ||
|
|
||
| $$ | ||
| \overbrace{f_b}^{\texttt{f_plasma_deuterium_burnup}} = \frac{2\left(\Gamma_{\text{D+D}}+\Gamma_{\text{D+3He}}\right)}{\Gamma_{\text{fuel}}f_{\text{fuelling,D}}} | ||
| $$ | ||
|
|
||
| ------------------ | ||
|
|
||
| ## Key Constraints | ||
|
|
||
| ### Tritium Flow Consistency | ||
|
|
||
| This constraint can be activated by stating `icc = 93` in the input file. | ||
|
|
||
| This constraint ensures that the change in tritium particles as a function of time is zero. It ensures the output of `calculate_plasma_tritium_flow_rate()` is zero | ||
|
|
||
| **It is recommended to have this constraint on as it is a plasma consistency model** | ||
|
|
||
| ----------------- | ||
|
|
||
| ### Deuterium Flow Consistency | ||
|
|
||
| This constraint can be activated by stating `icc = 94` in the input file. | ||
|
|
||
| This constraint ensures that the change in deuterium particles as a function of time is zero. It ensures the output of `calculate_plasma_deuterium_flow_rate()` is zero | ||
|
|
||
| **It is recommended to have this constraint on as it is a plasma consistency model** | ||
|
|
||
| ---------------- | ||
|
|
||
| ### Helium-3 Flow Consistency | ||
|
|
||
| This constraint can be activated by stating `icc = 95` in the input file. | ||
|
|
||
| This constraint ensures that the change in helium-3 particles as a function of time is zero. It ensures the output of `calculate_plasma_helium3_flow_rate()` is zero | ||
|
|
||
| **It is recommended to have this constraint on as it is a plasma consistency model** | ||
|
|
||
| ---------------- | ||
|
|
||
| ### Alpha Particle Flow Consistency | ||
|
|
||
| This constraint can be activated by stating `icc = 96` in the input file. | ||
|
|
||
| This constraint ensures that the change in alpha particles as a function of time is zero. It ensures the output of `calculate_plasma_alphas_flow_rate(()` is zero | ||
|
|
||
| **It is recommended to have this constraint on as it is a plasma consistency model** | ||
|
|
||
| ------------------ | ||
|
|
||
| ### Fuelling Proportion Consistency | ||
|
|
||
| This constraint can be activated by stating `icc = 97` in the input file. | ||
|
|
||
| This ensures that all 3 injected fuelling fractions sum up to 1: | ||
|
|
||
| $$ | ||
| f_{\text{fuelling,D}} + f_{\text{fuelling,T}} + f_{\text{fuelling,3He}} = 1.0 | ||
| $$ | ||
|
|
||
| **It is recommended to have this constraint on as it is a plasma consistency model** | ||
|
|
||
| ----------------- | ||
|
|
||
|
|
||
| [^1]: G. L. Jackson, V. S. Chan, and R. D. Stambaugh, “An Analytic Expression for the Tritium Burnup Fraction in Burning-Plasma Devices,” Fusion Science and Technology, vol. 64, no. 1, pp. 8–12, Jul. 2013, doi: https://doi.org/10.13182/fst13-a17042. | ||
|
|
||
| [^2]: J. F. Artaud et al., “Metis: a fast integrated tokamak modelling tool for scenario design,” Nuclear Fusion, vol. 58, no. 10, pp. 105001–105001, Aug. 2018, doi: https://doi.org/10.1088/1741-4326/aad5b1. | ||
|
|
||
| [^3]: D. Reiter, H. Kever, G. H. Wolf, M. Baelmans, R. Behrisch, and R. Schneider, “Helium removal from tokamaks,” Plasma Physics and Controlled Fusion, vol. 33, no. 13, pp. 1579–1600, Nov. 1991, doi: https://doi.org/10.1088/0741-3335/33/13/008. | ||
| | ||
| | ||
| |
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please fixup into previous commit where these were created.