Skip to content

Commit

Permalink
🐛 add check of incorrect PF coil position if no CS coil
Browse files Browse the repository at this point in the history
  • Loading branch information
apearce committed Nov 13, 2024
1 parent d9801ca commit e345e37
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
5 changes: 4 additions & 1 deletion process/pfcoil.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ def pfcoil(self):
for j in range(pfv.ngrp):
if pfv.ipfloc[j] == 1:
# PF coil is stacked on top of the Central Solenoid
for k in pfv.ncls[j]:
for k in range(pfv.ncls[j]):
pf.rcls[j, k] = pfv.rohc + pfv.rpf1

# Z coordinate of coil enforced so as not
Expand Down Expand Up @@ -327,6 +327,9 @@ def pfcoil(self):
nocoil = 0
for i in range(pfv.ngrp):
if pfv.ipfloc[i] == 1:
# Do not allow if no central solenoid
if bv.iohcl == 0:
eh.report_error(288)
# PF coil is stacked on top of the Central Solenoid
# This coil is to balance Central Solenoid flux and should not be involved
# in equilibrium calculation -- RK 07/12
Expand Down
7 changes: 6 additions & 1 deletion process/utilities/errorlist.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"comment2": [
"Increment n_errortypes if an error is added to this list"
],
"n_errortypes": 287,
"n_errortypes": 288,
"errors": [
{
"no": 1,
Expand Down Expand Up @@ -1444,6 +1444,11 @@
"no": 287,
"level": 2,
"message": "[pfcoil][cntrpost]: fjohc0 shouldn't be above 0.7 for engineering reliability."
},
{
"no": 288,
"level": 3,
"message": "PFCOIL: ipfloc(i) should not be 1 if iohcl=0"
}
]
}

0 comments on commit e345e37

Please sign in to comment.