Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
1e3a4e9
Implement code changes to enhance functionality and improve performance
chris-ashe Sep 15, 2026
999d1ae
Refactor plasma geometry calculations to use match-case structure and…
chris-ashe Sep 15, 2026
ca22a6a
Refactor plasma current model to a separate class and update imports …
chris-ashe Sep 15, 2026
a1c731c
Refactor current drive calculations to use match-case structure for i…
chris-ashe Sep 15, 2026
074a59f
Tidy up docstrins and enum use in current_drive
chris-ashe Sep 15, 2026
ec480f5
Update some if else in physics to use match case
chris-ashe Sep 15, 2026
5a635d9
Tidy up docstrings in exhaust module
chris-ashe Sep 15, 2026
cc96e1a
Tidy some docstring in impurity_radiation.py
chris-ashe Sep 15, 2026
2514c87
Tidy up l_h_transition and fully implement enums
chris-ashe Sep 15, 2026
97a5bb2
Add match case to scrape off layer module
chris-ashe Sep 15, 2026
994e0a8
Tidy docstrings in radiation_power.py
chris-ashe Sep 15, 2026
4e7c639
Add match case to profiles.py
chris-ashe Sep 15, 2026
cd83c93
Add match case to plasma_current.py
chris-ashe Sep 15, 2026
9b42e7d
Tidy some docstrings to numpy style in plasma_current.py
chris-ashe Sep 15, 2026
a8ba3bb
Add match case to fhz function
chris-ashe Sep 15, 2026
0f0587f
Add match case to build.py
chris-ashe Sep 15, 2026
0241978
Add match case to superconducting tf
chris-ashe Sep 15, 2026
436d3ff
add match case to tf base
chris-ashe Sep 15, 2026
a3ce180
add match case to resistive tf
chris-ashe Sep 15, 2026
7aec17c
Apply match case to power.py
chris-ashe Sep 15, 2026
9315d19
Apply match case to constraints file
chris-ashe Sep 16, 2026
6adc708
Refactor objective_function to use match-case for FiguresOfMerit
chris-ashe Sep 16, 2026
3aa4e51
Refactor code to use match-case for improved readability in objective…
chris-ashe Sep 16, 2026
fed08ed
Refactor vacuum.py to use match-case for improved readability in vacu…
chris-ashe Sep 16, 2026
8645e5c
Refactor vacuum.py to use match-case for dwell pumping options
chris-ashe Sep 16, 2026
668d126
Refactor hcpb.py to use match-case for coolant pumping power logic an…
chris-ashe Sep 16, 2026
48e173c
Refactor code to use match-case for improved readability in init.py, …
chris-ashe Sep 16, 2026
864a5c6
Refactor caller.py and init.py to use match-case for improved readabi…
chris-ashe Sep 16, 2026
4c03360
Refactor plasma_geometry.py to use match-case for improved readabilit…
chris-ashe Sep 16, 2026
0ae03c1
Requested changes
chris-ashe Sep 28, 2026
47309c6
Apply divertor enum number and match case to missing areas
chris-ashe Sep 28, 2026
b5d3d7f
Update reference formatting in standards.md to IEEE style with DOI links
chris-ashe Sep 28, 2026
1e466d3
Refactor vacuum.py to use match-case for dwell pumping options, enhan…
chris-ashe Sep 28, 2026
c95109d
:fire: Remove changes from poor rebase
chris-ashe Sep 29, 2026
0b1e066
Refactor summary.py to use match-case for divertor number handling, i…
chris-ashe Sep 29, 2026
3dea6d7
Update process/models/physics/plasma_current.py
clmould Sep 29, 2026
d2491da
Update process/core/init.py
clmould Sep 29, 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
6 changes: 4 additions & 2 deletions documentation/source/development/standards.md
Original file line number Diff line number Diff line change
Expand Up @@ -658,8 +658,10 @@ def function_name(param1: Any, param2: Any) -> Any:

References
----------
- Reference 1: Description of the reference.
- Reference 2: Description of the reference.
[1] Description of reference 1. Preferably in IEEE reference format with a
DOI link (if applicable).
[2] Description of reference 2. Preferably in IEEE reference format with a
DOI link (if applicable).
"""
```

Expand Down
46 changes: 20 additions & 26 deletions process/core/caller.py
Original file line number Diff line number Diff line change
Expand Up @@ -293,28 +293,22 @@ def _call_models_once(self, xc: np.ndarray):
# Toroidal field coil model

# Toroidal field coil resistive model
if self.data.tfcoil.i_tf_sup == TFConductorModel.WATER_COOLED_COPPER:
self.models.copper_tf_coil.run()
match TFConductorModel(self.data.tfcoil.i_tf_sup):
case TFConductorModel.WATER_COOLED_COPPER:
self.models.copper_tf_coil.run()

# Toroidal field coil superconductor model
if self.data.tfcoil.i_tf_sup == TFConductorModel.SUPERCONDUCTING:
if (
SuperconductingTFTurnType(
# Toroidal field coil superconductor model
case TFConductorModel.SUPERCONDUCTING:
match SuperconductingTFTurnType(
self.data.superconducting_tfcoil.i_tf_turn_type
)
== SuperconductingTFTurnType.CABLE_IN_CONDUIT
):
self.models.cicc_sctfcoil.run()
elif (
SuperconductingTFTurnType(
self.data.superconducting_tfcoil.i_tf_turn_type
)
== SuperconductingTFTurnType.CROSS_CONDUCTOR
):
self.models.croco_sctfcoil.run()
):
case SuperconductingTFTurnType.CABLE_IN_CONDUIT:
self.models.cicc_sctfcoil.run()
case SuperconductingTFTurnType.CROSS_CONDUCTOR:
self.models.croco_sctfcoil.run()

if self.data.tfcoil.i_tf_sup == TFConductorModel.HELIUM_COOLED_ALUMINIUM:
self.models.aluminium_tf_coil.run()
case TFConductorModel.HELIUM_COOLED_ALUMINIUM:
self.models.aluminium_tf_coil.run()

# Poloidal field and central solenoid model
self.models.pfcoil.run()
Expand All @@ -341,13 +335,13 @@ def _call_models_once(self, xc: np.ndarray):
4 | KIT HCLL model
5 | DCLL model
"""
if self.data.fwbs.i_blanket_type == BlktModelTypes.CCFE_HCPB:
# CCFE HCPB model
self.models.ccfe_hcpb.run()

elif self.data.fwbs.i_blanket_type == BlktModelTypes.DCLL:
# DCLL model
self.models.dcll.run()
match BlktModelTypes(self.data.fwbs.i_blanket_type):
case BlktModelTypes.CCFE_HCPB:
# CCFE HCPB model
self.models.ccfe_hcpb.run()
case BlktModelTypes.DCLL:
# DCLL model
self.models.dcll.run()

self.models.cryostat.run()

Expand Down
303 changes: 152 additions & 151 deletions process/core/init.py

Large diffs are not rendered by default.

Loading
Loading