-
Notifications
You must be signed in to change notification settings - Fork 17
Remove f values #3947
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?
Remove f values #3947
Changes from 1 commit
f12bf70
f0cccbb
759f7b2
3d8fd9b
6b60f61
f583d7c
ebfbd2a
d200413
b34dd21
c9b3d71
91c4eaf
0a4a3c2
f4d507b
a9350cf
a7fd265
54c6aaa
a400212
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 |
|---|---|---|
|
|
@@ -23,25 +23,23 @@ There are two separate constraint equations for enforcing the L-H threshold. | |
|
|
||
| ### Use the full divertor power | ||
|
|
||
| This constraint can be activated by stating `icc = 15` in the input file. | ||
| There are two constraints that can be used to enforce L-mode or H-mode. | ||
|
|
||
| The input `fl_h_threshold` can be set not equal to 1 to provide a margin around the threshold. | ||
| Constraint 15 (`icc = 15`) with `fl_h_threshold <= 1.0` ensures that the power reaching the divertor is at least equal to the threshold power calculated for the chosen scaling, which is a necessary condition for H-mode. | ||
|
|
||
| $$ | ||
| 1.0 - \mathtt{fl\_h\_threshold} \times \frac{\overbrace{\mathtt{p\_l\_h\_threshold\_mw}}^{\text{Power from scaling}}}{\mathtt{p_plasma_separatrix_mw}} | ||
| \mathtt{fl\_h\_threshold} \times \mathtt{p\_plasma\_separatrix\_mw} >= \underbrace{\mathtt{p\_l\_h\_threshold\_mw}}_{\text{Power from scaling}} | ||
timothy-nunn marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| $$ | ||
|
|
||
| `fl_h_threshold` can be used to add a margin to the constraint. For example, `fl_h_threshold = 0.8` ensures that `p_plasma_separatrix_mw` is at least 25% greater than the threshold power. | ||
|
|
||
| Constraint 22 (`icc = 22`) with `fl_h_threshold >= 1.0` is the opposite of constraint 15 and ensures that the power reaching the divertor is less than the threshold by some margin. | ||
|
|
||
| For an H-mode plasma, `icc = 15` with `fl_h_threshold >= 1.0` will ensure | ||
| that the power reaching the divertor is at least equal to the threshold power | ||
| calculated for the chosen scaling, which is a necessary condition for | ||
| H-mode. | ||
|
|
||
| For an L-mode plasma, `icc = 15` should be turned on with `fl_h_threshold < 1.0` to ensure that the power does not exceed the calculated threshold, | ||
| and therefore the machine remains in L-mode. | ||
| $$ | ||
| \mathtt{fl\_h\_threshold} \times \underbrace{\mathtt{p\_l\_h\_threshold\_mw}}_{\text{Power from scaling}} >= \mathtt{p\_plasma\_separatrix\_mw} | ||
| $$ | ||
|
|
||
| **Therefore it is recommended to always use `icc = 15` if trying to simulate a plasma scenario specifically in L or H-mode** | ||
|
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. Really icc = 15 is mandatory (unless a different mode is selected), since the plasma must be in some mode. |
||
| Again, `fl_h_threshold` can be used to add a margin to the constraint. For example, `fl_h_threshold = 1.25` ensures that `p_plasma_separatrix_mw` is at least 25% less than the threshold power. | ||
|
||
|
|
||
| ------- | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -553,15 +553,18 @@ def constraint_equation_13(): | |
|
|
||
| @ConstraintManager.register_constraint(15, "MW", ">=") | ||
| def constraint_equation_15(): | ||
| """Equation for L-H power threshold limit | ||
| """Equation for L-H power threshold limit to enforce H-mode | ||
| author: P B Lloyd, CCFE, Culham Science Centre | ||
|
|
||
| fl_h_threshold: a factor tolerance on the constraint | ||
| fl_h_threshold: a margin on the constraint | ||
| p_l_h_threshold_mw: L-H mode power threshold (MW) | ||
| p_plasma_separatrix_mw: power to conducted to the divertor region (MW) | ||
|
|
||
| Setting fl_h_threshold != 1.0 enforces a constraint on a factor of the p_plasma_separatrix_mw | ||
| Setting fl_h_threshold != 1.0 enforces a margin on the constraint: | ||
| I.e. fl_h_threshold * p_plasma_separatrix_mw >= p_l_h_threshold_mw | ||
|
|
||
| For example, fl_h_threshold = 0.8 will ensure that p_plasma_separatrix_mw | ||
| is at least 25% above the threshold (in H-mode). | ||
| """ | ||
| return ConstraintResult( | ||
| 1.0 | ||
|
|
@@ -575,6 +578,33 @@ def constraint_equation_15(): | |
| ) | ||
|
|
||
|
|
||
|
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. Why is this here all of a sudden?
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. I moved the equations around so that they were in order |
||
| @ConstraintManager.register_constraint(22, "MW", ">=") | ||
|
||
| def constraint_equation_22(): | ||
| """Equation for L-H power threshold limit to enforce L-mode | ||
| author: P B Lloyd, CCFE, Culham Science Centre | ||
timothy-nunn marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| fl_h_threshold: a margin on the constraint | ||
| p_l_h_threshold_mw: L-H mode power threshold (MW) | ||
| p_plasma_separatrix_mw: power to conducted to the divertor region (MW) | ||
|
|
||
| Setting fl_h_threshold != 1.0 enforces a margin on the constraint: | ||
| I.e. fl_h_threshold * p_l_h_threshold_mw >= p_plasma_separatrix_mw | ||
|
|
||
| For example, fl_h_threshold = 1.2 will ensure that p_plasma_separatrix_mw | ||
| is at least 20% below the threshold (in L-mode). | ||
| """ | ||
| return ConstraintResult( | ||
| 1.0 | ||
| - data_structure.constraint_variables.fl_h_threshold | ||
| * data_structure.physics_variables.p_l_h_threshold_mw | ||
| / data_structure.physics_variables.p_plasma_separatrix_mw, | ||
| data_structure.physics_variables.p_plasma_separatrix_mw, | ||
| data_structure.physics_variables.p_plasma_separatrix_mw | ||
| - data_structure.physics_variables.p_l_h_threshold_mw | ||
| / data_structure.constraint_variables.fl_h_threshold, | ||
| ) | ||
|
|
||
|
|
||
| @ConstraintManager.register_constraint(16, "MW", ">=") | ||
| def constraint_equation_16(): | ||
| """Equation for net electric power lower limit | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.