-
Notifications
You must be signed in to change notification settings - Fork 17
Create plasma exhaust class #4096
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
Merged
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
1260a72
Add PlasmaExhaust class and integrate into Physics model
chris-ashe ec0bc04
Add p_plasma_separatrix_rmajor_mw variable to track power per major r…
chris-ashe dad2299
Add method to calculate power crossing the separatrix per unit major …
chris-ashe f3f6794
Add method to calculate EU DEMO divertor protection re-attachment met…
chris-ashe 3c55004
post rebase structure update
chris-ashe a26fbd7
Post rebase integration fixes
chris-ashe 6ea7530
Fix variable reference for power per major radius in plot_main_plasma…
chris-ashe e12cf0e
Add EU DEMO divertor protection parameter to physics variables
chris-ashe a4a117f
Add calculation for p_div_bt_q_aspect_rmajor_mw in Physics class
chris-ashe 1bbcfc4
Refactor docstrings in PlasmaExhaust class to use NumPy style formatt…
chris-ashe 60a0962
Create exhaust file
chris-ashe ed02c65
Fix import statement for constants in exhaust module
chris-ashe 9d363e6
Fix variable name in output for plasma separatrix pressure calculation
chris-ashe a0da7f9
Post rebase conflcit fixes
chris-ashe f2e09c8
Add new variable for plasma separatrix power in init_physics_variable…
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
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
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,120 @@ | ||
| import logging | ||
|
|
||
| from process.core import constants | ||
|
|
||
| logger = logging.getLogger(__name__) | ||
|
|
||
|
|
||
| class PlasmaExhaust: | ||
| """Class to hold plasma exhaust calculations for plasma processing.""" | ||
|
|
||
| def __init__(self): | ||
| self.outfile = constants.NOUT | ||
| self.mfile = constants.MFILE | ||
|
|
||
| @staticmethod | ||
| def calculate_separatrix_power( | ||
| f_p_alpha_plasma_deposited: float, | ||
| p_alpha_total_mw: float, | ||
| p_non_alpha_charged_mw: float, | ||
| p_hcd_injected_total_mw: float, | ||
| p_plasma_ohmic_mw: float, | ||
| p_plasma_rad_mw: float, | ||
| ) -> float: | ||
| """ | ||
| Calculate the power crossing the separatrix (P_sep). | ||
|
|
||
| Parameters | ||
| ---------- | ||
| f_p_alpha_plasma_deposited : float | ||
| Fraction of alpha power deposited in plasma. | ||
| p_alpha_total_mw : float | ||
| Total alpha power produced (MW). | ||
| p_non_alpha_charged_mw : float | ||
| Power from non-alpha charged particles (MW). | ||
| p_hcd_injected_total_mw : float | ||
| Total power injected by heating and current drive (MW). | ||
| p_plasma_ohmic_mw : float | ||
| Ohmic heating power (MW). | ||
| p_plasma_rad_mw : float | ||
| Radiated power from plasma (MW). | ||
|
|
||
| Returns | ||
| ------- | ||
| float | ||
| Power crossing the separatrix (MW). | ||
| """ | ||
|
|
||
| return ( | ||
| f_p_alpha_plasma_deposited * p_alpha_total_mw | ||
| + p_non_alpha_charged_mw | ||
| + p_hcd_injected_total_mw | ||
| + p_plasma_ohmic_mw | ||
| - p_plasma_rad_mw | ||
| ) | ||
|
|
||
| @staticmethod | ||
| def calculate_psep_over_r_metric( | ||
| p_plasma_separatrix_mw: float, rmajor: float | ||
| ) -> float: | ||
| """ | ||
| Calculate the power crossing the separatrix per unit major radius (P_sep/R). | ||
|
|
||
| Parameters | ||
| ---------- | ||
| p_plasma_separatrix_mw : float | ||
| Power crossing the separatrix (MW). | ||
| rmajor : float | ||
| Plasma major radius (m). | ||
|
|
||
| Returns | ||
| ------- | ||
| float | ||
| Power crossing the separatrix per unit major radius (MW/m). | ||
| """ | ||
| return p_plasma_separatrix_mw / rmajor | ||
|
|
||
| @staticmethod | ||
| def calculate_eu_demo_re_attachment_metric( | ||
| p_plasma_separatrix_mw: float, | ||
| b_plasma_toroidal_on_axis: float, | ||
| q95: float, | ||
| aspect: float, | ||
| rmajor: float, | ||
| ) -> float: | ||
| """Calculate the EU DEMO divertor protection re-attachment metric for plasma exhaust. | ||
|
|
||
| Parameters | ||
| ---------- | ||
| p_plasma_separatrix_mw : float | ||
| Power crossing the separatrix (MW). | ||
| b_plasma_toroidal_on_axis : float | ||
| Toroidal magnetic field on axis (T). | ||
| q95 : float | ||
| Safety factor at 95% flux surface. | ||
| aspect : float | ||
| Aspect ratio of the plasma. | ||
| rmajor : float | ||
| Plasma major radius (m). | ||
|
|
||
| Returns | ||
| ------- | ||
| float | ||
| EU DEMO re-attachment metric (MW T /m). | ||
|
|
||
| References | ||
| ---------- | ||
| - M. Siccinio, G. Federici, R. Kembleton, H. Lux, F. Maviglia, and J. Morris, | ||
| "Figure of merit for divertor protection in the preliminary design of the EU-DEMO reactor," | ||
| Nuclear Fusion, vol. 59, no. 10, pp. 106026-106026, Jul. 2019, | ||
| doi: https://doi.org/10.1088/1741-4326/ab3153. | ||
|
|
||
| - H. Zohm et al., | ||
| "A stepladder approach to a tokamak fusion power plant," | ||
| Nuclear Fusion, vol. 57, no. 8, pp. 086002-086002, May 2017, | ||
| doi: https://doi.org/10.1088/1741-4326/aa739e. | ||
| """ | ||
|
|
||
| return (p_plasma_separatrix_mw * b_plasma_toroidal_on_axis) / ( | ||
| q95 * aspect * rmajor | ||
| ) |
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.
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.
Uh oh!
There was an error while loading. Please reload this page.