Skip to content

Conversation

@ivanmaione
Copy link
Contributor

Linked Issues

Closes #138

Description

This pull request introduces the foundational architecture for modeling superconducting magnet components within the bluemira framework. It follows a bottom-up (micro to macro) design approach, beginning at the strand level and extending up to complete coil case configurations.

The implementation includes core abstractions and physical behavior for:

  • Strands: Basic material and geometric building blocks with support for superconducting and composite strands.
  • Cables: Bundled strand models with geometric, thermal, and resistive calculations, including quench simulation.
  • Conductors: Jacketed cables enclosed in insulating layers with structural optimization features.
  • Winding Packs: Arrays of conductors arranged in 2D layouts for coil sections.
  • TF Coil Cases: Full 2D cross-sectional models of toroidal field coils, including structural properties and geometry-aware optimization logic.

This structure supports future extensions toward full electromagnetic, thermal, and mechanical simulations of magnet systems.

A complete example has been provided to show the use of the magnet module.

Key Features

  • Full support for serialization and deserialization (.to_dict(), .from_dict()).
  • Automatic class registration using RegistrableMeta.
  • Structural stiffness and thermal capacity aggregation across components.
  • Jacket thickness and stabilizer optimization with stress or quench constraints.
  • Geometric visualization tools across all hierarchy levels.
  • Plug-and-play registry for dynamic class discovery.

Still missing...

  • Serialization and deserialization of the optimization problem
  • Clear interface with the other bluemira modules.

Interface Changes

Some minor modifications have been made to materials in order to allow the definition of materials properties that depends on more that one parameter.

Checklist

I confirm that I have completed the following checks:

  • Tests run locally and pass pytest tests --reactor
  • Code quality checks run locally and pass pre-commit run --from-ref develop --to-ref HEAD
  • Documentation built locally and checked sphinx-build -W documentation/source documentation/build

@ivanmaione ivanmaione requested review from a team as code owners May 12, 2025 21:10
@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
C Reliability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@CoronelBuendia CoronelBuendia changed the base branch from develop to feature/new_magnet_module August 22, 2025 09:18
@CoronelBuendia CoronelBuendia requested review from a team as code owners August 22, 2025 09:18
@CoronelBuendia CoronelBuendia changed the base branch from feature/new_magnet_module to develop August 22, 2025 09:18
@CoronelBuendia CoronelBuendia changed the base branch from develop to feature/new_magnet_module August 22, 2025 09:19
@CoronelBuendia CoronelBuendia mentioned this pull request Aug 22, 2025
7 tasks
@CoronelBuendia CoronelBuendia force-pushed the ivanmaione/magnet_module branch from 12c155f to e0ec460 Compare August 27, 2025 08:06
* start reversing material changes

* reverse material

* reverse material

* reverse material

* reverse mixture

* add dependency

* add dependency

* strand purge

* case purge

* conductor purge

* remove materials json

* start on examples

* other example purge

* update dep branch

* some progress ironing out

* use is_superconductor

* start mat prop comparison

* strand props

* fix strand Cp

* pause

* check cable props

* Cp not right

* match Cp mixture

* print test

* time func

* switch youngs modulus

* switch youngs modulus case

* typo

* clean up

* fix other example

* start reducing number of OperationalConditions

* strand OperationalConditions

* case OperationalConditions

* conductor OperationalConditions

* cable OperationalConditions

* OperationalConditions full runthrough

* change debug msg to append

* fix example

* add convergence print

* add convergence print

* add conv messages for dev

* fix tests (except for matproplib error)

* op_cond

* fix remaining tests
@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
C Reliability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Winding pack design optimisations

3 participants