-
Notifications
You must be signed in to change notification settings - Fork 20
Correct hstar being stored on data structure #4396
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -37,6 +37,8 @@ class ConfinementTimeData: | |
| """Plasma energy confinement time in seconds.""" | ||
| p_plasma_loss_mw: float | ||
| """Total plasma loss power in MW.""" | ||
| hstar: float | ||
| """Non-radiation corrected H factor on energy confinement times""" | ||
|
|
||
|
|
||
| class PlasmaConfinementTime(Model): | ||
|
|
@@ -936,8 +938,11 @@ def calculate_confinement_time( | |
|
|
||
| # Calculate H* non-radiation corrected H factor | ||
| # Note: we will assume the IPB-98y2 scaling. | ||
| if self.data.physics.i_rad_loss == ConfinementRadiationLossModel.CORE_ONLY: | ||
| self.data.physics.hstar = ( | ||
| if ( | ||
| ConfinementRadiationLossModel(self.data.physics.i_rad_loss) | ||
| == ConfinementRadiationLossModel.CORE_ONLY | ||
| ): | ||
| hstar = ( | ||
| hfact | ||
| * ( | ||
| p_plasma_loss_mw | ||
|
|
@@ -952,7 +957,7 @@ def calculate_confinement_time( | |
| elif ( | ||
| self.data.physics.i_rad_loss == ConfinementRadiationLossModel.FULL_RADIATION | ||
| ): | ||
| self.data.physics.hstar = ( | ||
| hstar = ( | ||
| hfact | ||
| * ( | ||
| p_plasma_loss_mw | ||
|
|
@@ -964,7 +969,7 @@ def calculate_confinement_time( | |
| ** 0.31 | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This will only work for the selected scaling if the loss power index is (1-0.31), so really just the IPB98 scalings in this case
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This will need to be turned into an issue. This PR is just stopping
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just in response to this - has an issue been made? Can it be linked here please
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| ) | ||
| elif self.data.physics.i_rad_loss == ConfinementRadiationLossModel.NO_RADIATION: | ||
| self.data.physics.hstar = hfact | ||
| hstar = hfact | ||
|
|
||
| # Calculation of the transport power loss terms | ||
| # Transport losses in Watts/m3 are 3/2 * n.e.T / tau , with T in eV | ||
|
|
@@ -1002,6 +1007,7 @@ def calculate_confinement_time( | |
| t_ion_energy_confinement=t_ion_energy_confinement, | ||
| t_plasma_energy_confinement=t_energy_confinement, | ||
| p_plasma_loss_mw=p_plasma_loss_mw, | ||
| hstar=hstar, | ||
| ) | ||
|
|
||
| @staticmethod | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.