Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions process/resistive_tf_coil.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,6 @@ def run(self, output: bool):
int(tfcoil_variables.i_tf_bucking),
float(build_variables.r_tf_inboard_in),
build_variables.dr_bore,
build_variables.z_tf_inside_half,
pfcoil_variables.f_z_cs_tf_internal,
build_variables.dr_cs,
build_variables.i_tf_inside_cs,
build_variables.dr_tf_inboard,
Expand Down Expand Up @@ -192,6 +190,7 @@ def run(self, output: bool):
tfcoil_variables.a_tf_coil_inboard_case,
tfcoil_variables.vforce,
tfcoil_variables.a_tf_turn_steel,
pfcoil_variables.a_cs_poloidal,
)

tfcoil_variables.sig_tf_case = (
Expand Down
3 changes: 1 addition & 2 deletions process/superconducting_tf_coil.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,6 @@ def run(self, output: bool):
int(tfcoil_variables.i_tf_bucking),
float(build_variables.r_tf_inboard_in),
build_variables.dr_bore,
build_variables.z_tf_inside_half,
pfcoil_variables.f_z_cs_tf_internal,
build_variables.dr_cs,
build_variables.i_tf_inside_cs,
build_variables.dr_tf_inboard,
Expand Down Expand Up @@ -216,6 +214,7 @@ def run(self, output: bool):
tfcoil_variables.a_tf_coil_inboard_case,
tfcoil_variables.vforce,
tfcoil_variables.a_tf_turn_steel,
pfcoil_variables.a_cs_poloidal,
)

tfcoil_variables.sig_tf_case = (
Expand Down
20 changes: 5 additions & 15 deletions process/tf_coil.py
Original file line number Diff line number Diff line change
Expand Up @@ -3138,8 +3138,6 @@ def stresscl(
i_tf_bucking,
r_tf_inboard_in,
dr_bore,
z_tf_inside_half,
f_z_cs_tf_internal,
dr_cs,
i_tf_inside_cs,
dr_tf_inboard,
Expand Down Expand Up @@ -3199,6 +3197,7 @@ def stresscl(
a_tf_coil_inboard_case,
vforce,
a_tf_turn_steel,
a_cs_poloidal,
):
"""TF coil stress routine

Expand Down Expand Up @@ -3335,21 +3334,12 @@ def stresscl(
# as the TF is called before CS in caller.f90
# -#

# CS vertical cross-section area [m2]
if i_tf_inside_cs == 1:
a_oh = (
2.0e0
* z_tf_inside_half
* f_z_cs_tf_internal
* (dr_bore - dr_tf_inboard)
)
else:
a_oh = 2.0e0 * z_tf_inside_half * f_z_cs_tf_internal * dr_cs

# Maximum current in Central Solenoid, at either BOP or EOF [MA-turns]
# Absolute value
curr_oh_max = (
1.0e-6 * np.maximum(j_cs_flat_top_end, j_cs_pulse_start) * a_oh
1.0e-6
* np.maximum(j_cs_flat_top_end, j_cs_pulse_start)
* a_cs_poloidal
)

# Number of turns
Expand All @@ -3360,7 +3350,7 @@ def stresscl(
)

# CS Turn vertical cross-sectionnal area
a_cs_turn = a_oh / n_oh_turns
a_cs_turn = a_cs_poloidal / n_oh_turns

# CS coil turn geometry calculation - stadium shape
# Literature: https://doi.org/10.1016/j.fusengdes.2017.04.052
Expand Down
13 changes: 4 additions & 9 deletions tests/unit/test_tfcoil.py
Original file line number Diff line number Diff line change
Expand Up @@ -852,7 +852,7 @@ class StressclParam(NamedTuple):

dr_cs_tf_gap: Any = None

z_tf_inside_half: Any = None
a_cs_poloidal: Any = None

r_tf_inboard_in: Any = None

Expand Down Expand Up @@ -962,8 +962,6 @@ class StressclParam(NamedTuple):

f_a_cs_turn_steel: Any = None

f_z_cs_tf_internal: Any = None

j_cs_flat_top_end: Any = None

j_cs_pulse_start: Any = None
Expand Down Expand Up @@ -1031,9 +1029,9 @@ class StressclParam(NamedTuple):
r_tf_inboard_mid=3.5979411851091103,
dr_bore=2.3322000000000003,
dr_cs=0.55242000000000002,
z_tf_inside_half=9.0730900215620327,
r_tf_inboard_in=2.9939411851091102,
casestr=0,
a_cs_poloidal=9.021881501,
n_tf_coil_turns=200,
dr_tf_wp_with_insulation=0.54261087836601019,
i_tf_tresca=0,
Expand Down Expand Up @@ -1086,7 +1084,6 @@ class StressclParam(NamedTuple):
n_tf_wp_stress_layers=5,
i_pf_conductor=0,
f_a_cs_turn_steel=0.57874999999999999,
f_z_cs_tf_internal=0.90000000000000002,
j_cs_flat_top_end=20726000,
j_cs_pulse_start=0,
n_pf_coils_in_group=np.array(
Expand Down Expand Up @@ -1154,10 +1151,10 @@ class StressclParam(NamedTuple):
r_tf_inboard_mid=3.5979411851091103,
dr_bore=2.3322000000000003,
dr_cs=0.55242000000000002,
z_tf_inside_half=9.0730900215620327,
r_tf_inboard_in=2.9939411851091102,
casestr=0.00094360452596334093,
n_tf_coil_turns=200,
a_cs_poloidal=9.021881501,
dr_tf_wp_with_insulation=0.54261087836601019,
i_tf_tresca=0,
a_tf_turn_cable_space_no_void=0.001293323051622732,
Expand Down Expand Up @@ -1209,7 +1206,6 @@ class StressclParam(NamedTuple):
n_tf_wp_stress_layers=5,
i_pf_conductor=0,
f_a_cs_turn_steel=0.57874999999999999,
f_z_cs_tf_internal=0.90000000000000002,
j_cs_flat_top_end=20726000,
j_cs_pulse_start=19311657.760000002,
n_pf_coils_in_group=np.array(
Expand Down Expand Up @@ -1327,8 +1323,6 @@ def test_stresscl(stressclparam, monkeypatch, tfcoil):
stressclparam.i_tf_bucking,
stressclparam.r_tf_inboard_in,
stressclparam.dr_bore,
stressclparam.z_tf_inside_half,
stressclparam.f_z_cs_tf_internal,
stressclparam.dr_cs,
stressclparam.i_tf_inside_cs,
stressclparam.dr_tf_inboard,
Expand Down Expand Up @@ -1388,6 +1382,7 @@ def test_stresscl(stressclparam, monkeypatch, tfcoil):
stressclparam.a_tf_coil_inboard_case,
stressclparam.vforce,
stressclparam.a_tf_turn_steel,
stressclparam.a_cs_poloidal,
)

assert casestr == pytest.approx(stressclparam.expected_casestr, rel=0.01)
Expand Down
Loading