Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
b1cd311
Add i_tf_turn_type input variable and integrate into TFCoil output
chris-ashe Mar 30, 2026
103a406
Add SuperconductingTFTurnType enum for turn type representation
chris-ashe Mar 30, 2026
cc81af6
Refactor tests to use CICCSuperconductingTFCoil and CROCOSuperconduct…
chris-ashe Mar 30, 2026
7d49ee6
Refactor SuperconductingTFCoil to enhance geometry calculations for W…
chris-ashe Mar 30, 2026
f9b5769
Reconfigure call order to set up dedicated base run for each turn type
chris-ashe Mar 30, 2026
fdf5a09
Refactor SuperconductingTFCoil to streamline magnetic energy and forc…
chris-ashe Mar 31, 2026
e5d3d0a
Refactor SuperconductingTFCoil to integrate peak inboard toroidal fie…
chris-ashe Mar 31, 2026
db2b794
Add constructors and docstrings for CICCSuperconductingTFCoil and CRO…
chris-ashe Mar 31, 2026
0b9a0a9
Add TFWPGeometry dataclass and update superconducting TF coil geometr…
chris-ashe Apr 9, 2026
1283888
Remove unnecessary constructors from CICCSuperconductingTFCoil and CR…
chris-ashe Apr 13, 2026
d1a31c3
Update process/core/output.py
chris-ashe Apr 15, 2026
c87417a
Update process/core/input.py
chris-ashe Apr 15, 2026
b4c4fa8
Update tests/unit/test_sctfcoil.py
chris-ashe Apr 15, 2026
e40d901
Refactor superconducting TF coil geometry calculations and add new da…
chris-ashe Apr 15, 2026
936027f
Add Cable in Conduit and Cross Conductor TF coil class sections to do…
chris-ashe Apr 15, 2026
cefa8f7
Post rebase commits
chris-ashe Apr 15, 2026
dfc83ea
Refactor CICCSuperconductingTFCoil to use CICCIntegerTurnGeometry for…
chris-ashe Apr 15, 2026
d84fd92
Refactor turn geometry classes and update related tests for improved …
chris-ashe Apr 16, 2026
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
26 changes: 26 additions & 0 deletions documentation/source/eng-models/tf-coil-superconducting.md
Original file line number Diff line number Diff line change
Expand Up @@ -629,3 +629,29 @@ It is also worth mentioning that the the ripple must be evaluated layer-by-layer
used to quantify the SC cross-section area per layer. Finally, resistive
coils do not suffer from on-coil ripple as there is no radial case present.

-----------------------------

## Cable in Conduit TF coil class | `CICCSuperconductingTFCoil(SuperconductingTFCoil)`

WIP

### Averaged turn geometry | `tf_cable_in_conduit_averaged_turn_geometry()`

### Integer turn geometry | `tf_cable_in_conduit_integer_turn_geometry()`

### Superconductor length | `calculate_cable_in_conduit_superconductor_length()`

### Superconductor strand count | `calculate_cable_in_conduit_strand_count()`

### Superconductor properties | `tf_cable_in_conduit_superconductor_properties()`


-----------------------------

## Cross Conductor TF coil class | `CROCOSuperconductingTFCoil(SuperconductingTFCoil)`

WIP

### Superconductor properties | `supercon_croco()`

### Quench voltage | `croco_voltage()`
16 changes: 15 additions & 1 deletion process/core/caller.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
from process.core.solver.iteration_variables import set_scaled_iteration_variable
from process.core.solver.objectives import objective_function
from process.models.tfcoil.base import TFConductorModel
from process.models.tfcoil.superconducting import SuperconductingTFTurnType

if TYPE_CHECKING:
from process.core.model import DataStructure
Expand Down Expand Up @@ -296,7 +297,20 @@ def _call_models_once(self, xc: np.ndarray):

# Toroidal field coil superconductor model
if data_structure.tfcoil_variables.i_tf_sup == TFConductorModel.SUPERCONDUCTING:
self.models.sctfcoil.run()
if (
SuperconductingTFTurnType(
data_structure.superconducting_tf_coil_variables.i_tf_turn_type
)
== SuperconductingTFTurnType.CABLE_IN_CONDUIT
):
self.models.cicc_sctfcoil.run()
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I dont know whether this should be organised differently in future eg self.models.sctfcoil.cicc.run().

this if check would then be moved into some sctfcoil object. Right know I'm not going to hold this up but before we add a future cable design we have to reoganise this. I'm not yet sure what that will look like.

elif (
SuperconductingTFTurnType(
data_structure.superconducting_tf_coil_variables.i_tf_turn_type
)
== SuperconductingTFTurnType.CROSS_CONDUCTOR
):
self.models.croco_sctfcoil.run()
Comment on lines +300 to +313
Copy link

Copilot AI Apr 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The TF superconductor model selection has no fallback/else branch. If i_tf_turn_type is invalid/unhandled, no SC TF model will be run for that solver iteration, which can lead to inconsistent state. Consider adding an else that raises a ProcessValueError (or logs an error) with the invalid value.

Suggested change
if (
SuperconductingTFTurnType(
data_structure.superconducting_tf_coil_variables.i_tf_turn_type
)
== SuperconductingTFTurnType.CABLE_IN_CONDUIT
):
self.models.cicc_sctfcoil.run()
elif (
SuperconductingTFTurnType(
data_structure.superconducting_tf_coil_variables.i_tf_turn_type
)
== SuperconductingTFTurnType.CROSS_CONDUCTOR
):
self.models.croco_sctfcoil.run()
i_tf_turn_type = (
data_structure.superconducting_tf_coil_variables.i_tf_turn_type
)
turn_type = SuperconductingTFTurnType(i_tf_turn_type)
if turn_type == SuperconductingTFTurnType.CABLE_IN_CONDUIT:
self.models.cicc_sctfcoil.run()
elif turn_type == SuperconductingTFTurnType.CROSS_CONDUCTOR:
self.models.croco_sctfcoil.run()
else:
raise ValueError(
f"Unhandled superconducting TF turn type: {i_tf_turn_type!r}"
)

Copilot uses AI. Check for mistakes.

if (
data_structure.tfcoil_variables.i_tf_sup
Expand Down
3 changes: 3 additions & 0 deletions process/core/input.py
Original file line number Diff line number Diff line change
Expand Up @@ -1963,6 +1963,9 @@ def __post_init__(self):
"n_tf_wp_layers": InputVariable(
data_structure.tfcoil_variables, int, range=(1, 100)
),
"i_tf_turn_type": InputVariable(
data_structure.superconducting_tf_coil_variables, int, choices=[1, 2]
),
"n_liq_recirc": InputVariable(data_structure.fwbs_variables, int, range=(1, 50)),
"n_tf_wp_pancakes": InputVariable(
data_structure.tfcoil_variables, int, range=(1, 100)
Expand Down
16 changes: 15 additions & 1 deletion process/core/output.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
from process import data_structure
from process.core.log import logging_model_handler
from process.models.tfcoil.base import TFConductorModel
from process.models.tfcoil.superconducting import (
SuperconductingTFTurnType,
)


def write(models, _outfile):
Expand Down Expand Up @@ -70,7 +73,18 @@ def write(models, _outfile):

# Toroidal field coil superconductor model
if data_structure.tfcoil_variables.i_tf_sup == TFConductorModel.SUPERCONDUCTING:
models.sctfcoil.output()
tf_turn_type = SuperconductingTFTurnType(
data_structure.superconducting_tf_coil_variables.i_tf_turn_type
)
if tf_turn_type == SuperconductingTFTurnType.CABLE_IN_CONDUIT:
models.cicc_sctfcoil.output()
elif tf_turn_type == SuperconductingTFTurnType.CROSS_CONDUCTOR:
models.croco_sctfcoil.output()
else:
raise ValueError(
"Unsupported superconducting TF turn type: "
f"{data_structure.superconducting_tf_coil_variables.i_tf_turn_type}"
)

# Toroidal field coil aluminium model
if (
Expand Down
5 changes: 5 additions & 0 deletions process/data_structure/superconducting_tf_coil_variables.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,9 @@
j_tf_superconductor: float = None
"""Current density in the superconducting cable [A/m^2]"""

i_tf_turn_type: int = None
"""Switch for TF turn geometry type"""

# Vacuum Vessel stress on TF coil quench

vv_stress_quench: float = None
Expand Down Expand Up @@ -321,6 +324,7 @@ def init_superconducting_tf_coil_variables():
f_a_tf_turn_cable_space_cooling, \
c_tf_turn_cables_critical, \
j_tf_superconductor, \
i_tf_turn_type, \
vv_stress_quench

is_leg_cp_temp_same = 0
Expand Down Expand Up @@ -382,4 +386,5 @@ def init_superconducting_tf_coil_variables():
f_a_tf_turn_cable_space_cooling = 0.0
c_tf_turn_cables_critical = 0.0
j_tf_superconductor = 0.0
i_tf_turn_type = 1
vv_stress_quench = 0.0
8 changes: 7 additions & 1 deletion process/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,11 @@
CopperTFCoil,
ResistiveTFCoil,
)
from process.models.tfcoil.superconducting import SuperconductingTFCoil
from process.models.tfcoil.superconducting import (
CICCSuperconductingTFCoil,
CROCOSuperconductingTFCoil,
SuperconductingTFCoil,
)
from process.models.vacuum import Vacuum, VacuumVessel
from process.models.water_use import WaterUse

Expand Down Expand Up @@ -602,6 +606,8 @@ def __init__(self, data: DataStructure):
self.cryostat = Cryostat()
self.build = Build()
self.sctfcoil = SuperconductingTFCoil()
self.cicc_sctfcoil = CICCSuperconductingTFCoil()
self.croco_sctfcoil = CROCOSuperconductingTFCoil()
self.tfcoil = TFCoil(build=self.build)
self.resistive_tf_coil = ResistiveTFCoil()
self.copper_tf_coil = CopperTFCoil()
Expand Down
6 changes: 6 additions & 0 deletions process/models/tfcoil/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -565,6 +565,12 @@ def outtf(self):
"(i_tf_sup)",
tfcoil_variables.i_tf_sup,
)
po.ovarin(
self.outfile,
"Superconducting TF coil turn type",
"(i_tf_turn_type)",
superconducting_tf_coil_variables.i_tf_turn_type,
)

if tfcoil_variables.i_tf_sup == TFConductorModel.WATER_COOLED_COPPER:
po.ocmmnt(
Expand Down
Loading
Loading