fiqus 2025.12.0__py3-none-any.whl → 2026.1.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- fiqus/MainFiQuS.py +4 -8
- fiqus/data/DataConductor.py +108 -11
- fiqus/data/DataFiQuS.py +2 -1
- fiqus/data/DataFiQuSConductorAC_CC.py +345 -0
- fiqus/data/DataFiQuSConductorAC_Strand.py +3 -3
- fiqus/data/DataFiQuSMultipole.py +363 -165
- fiqus/data/DataModelCommon.py +30 -15
- fiqus/data/DataMultipole.py +33 -10
- fiqus/data/DataWindingsCCT.py +37 -37
- fiqus/data/RegionsModelFiQuS.py +1 -1
- fiqus/geom_generators/GeometryConductorAC_CC.py +1906 -0
- fiqus/geom_generators/GeometryMultipole.py +751 -54
- fiqus/getdp_runners/RunGetdpConductorAC_CC.py +123 -0
- fiqus/getdp_runners/RunGetdpMultipole.py +181 -31
- fiqus/mains/MainConductorAC_CC.py +148 -0
- fiqus/mains/MainMultipole.py +109 -17
- fiqus/mesh_generators/MeshCCT.py +209 -209
- fiqus/mesh_generators/MeshConductorAC_CC.py +1305 -0
- fiqus/mesh_generators/MeshMultipole.py +938 -263
- fiqus/parsers/ParserCOND.py +2 -1
- fiqus/parsers/ParserDAT.py +16 -16
- fiqus/parsers/ParserGetDPOnSection.py +212 -212
- fiqus/parsers/ParserGetDPTimeTable.py +134 -134
- fiqus/parsers/ParserMSH.py +53 -53
- fiqus/parsers/ParserRES.py +142 -142
- fiqus/plotters/PlotPythonCCT.py +133 -133
- fiqus/plotters/PlotPythonMultipole.py +18 -18
- fiqus/post_processors/PostProcessAC_CC.py +65 -0
- fiqus/post_processors/PostProcessMultipole.py +16 -6
- fiqus/pre_processors/PreProcessCCT.py +175 -175
- fiqus/pro_assemblers/ProAssembler.py +3 -3
- fiqus/pro_material_functions/ironBHcurves.pro +246 -246
- fiqus/pro_templates/combined/CAC_CC_template.pro +542 -0
- fiqus/pro_templates/combined/CC_Module.pro +1213 -0
- fiqus/pro_templates/combined/Multipole_template.pro +2738 -1338
- fiqus/pro_templates/combined/TSA_materials.pro +102 -2
- fiqus/pro_templates/combined/materials.pro +54 -3
- fiqus/utils/Utils.py +18 -25
- fiqus/utils/update_data_settings.py +1 -1
- {fiqus-2025.12.0.dist-info → fiqus-2026.1.1.dist-info}/METADATA +81 -77
- {fiqus-2025.12.0.dist-info → fiqus-2026.1.1.dist-info}/RECORD +52 -44
- {fiqus-2025.12.0.dist-info → fiqus-2026.1.1.dist-info}/WHEEL +1 -1
- tests/test_geometry_generators.py +47 -30
- tests/test_mesh_generators.py +69 -30
- tests/test_solvers.py +67 -29
- tests/utils/fiqus_test_classes.py +396 -147
- tests/utils/generate_reference_files_ConductorAC.py +57 -57
- tests/utils/helpers.py +76 -1
- /fiqus/pro_templates/combined/{ConductorACRutherford_template.pro → CAC_Rutherford_template.pro} +0 -0
- /fiqus/pro_templates/combined/{ConductorAC_template.pro → CAC_Strand_template.pro} +0 -0
- {fiqus-2025.12.0.dist-info → fiqus-2026.1.1.dist-info/licenses}/LICENSE.txt +0 -0
- {fiqus-2025.12.0.dist-info → fiqus-2026.1.1.dist-info}/top_level.txt +0 -0
fiqus/data/DataModelCommon.py
CHANGED
|
@@ -175,7 +175,7 @@ class QuenchHeater(BaseModel):
|
|
|
175
175
|
h: List[float] = Field(
|
|
176
176
|
default=[],
|
|
177
177
|
description="Thickness list of quench heater trance stainless steel part [m]")
|
|
178
|
-
|
|
178
|
+
s_ins: Union[List[float], List[List[float]]] = Field(
|
|
179
179
|
default=[],
|
|
180
180
|
description="Thickness list of quench heater insulation between the stainless steel part and conductor insulation [m]"
|
|
181
181
|
"This could be a list of list to specify multiple material thicknesses")
|
|
@@ -183,11 +183,11 @@ class QuenchHeater(BaseModel):
|
|
|
183
183
|
default=[],
|
|
184
184
|
description="Material names list of quench heater insulation between the stainless steel part and conductor insulation [-]"
|
|
185
185
|
"This could be a list of list to specify multiple material names")
|
|
186
|
-
|
|
186
|
+
s_ins_He: Union[List[float], List[List[float]]] = Field(
|
|
187
187
|
default=[],
|
|
188
188
|
description="Material names list of quench heater insulation between the stainless steel part and helium bath [-]"
|
|
189
189
|
"This could be a list of list to specify multiple material thicknesses")
|
|
190
|
-
|
|
190
|
+
type_ins_He: Union[List[str], List[List[str]]] = Field(
|
|
191
191
|
default=[],
|
|
192
192
|
description="Material names list of quench heater insulation between the stainless steel part and helium bath [-]"
|
|
193
193
|
"This could be a list of list to specify multiple material names")
|
|
@@ -203,10 +203,10 @@ class QuenchHeater(BaseModel):
|
|
|
203
203
|
f_cover: List[float] = Field(
|
|
204
204
|
default=[],
|
|
205
205
|
description="List of fraction of stainless steel cover. This is l_stainless_steel/(l_stainless_steel+l_copper). Marked as obsolete, but still specified in some models [-].")
|
|
206
|
-
|
|
206
|
+
iQH_toHalfTurn_From: List[int] = Field(
|
|
207
207
|
default=[],
|
|
208
208
|
description="List of heater numbers (1 based) equal to the length of turns that are covered by (i.e. thermally connected to) quench heaters.")
|
|
209
|
-
|
|
209
|
+
iQH_toHalfTurn_To: List[int] = Field(
|
|
210
210
|
default=[],
|
|
211
211
|
description="List of turn numbers (1 based) that are covered by (i.e. thermally connected to) quench heaters.")
|
|
212
212
|
turns_sides: List[str] = Field(
|
|
@@ -346,19 +346,26 @@ class SourceSine(BaseModel):
|
|
|
346
346
|
"""
|
|
347
347
|
Level 3: Class for Sine source parameters for E-CLIQ
|
|
348
348
|
"""
|
|
349
|
-
frequency: Optional[float] = Field(default=None, description="Frequency of the sine source
|
|
350
|
-
current_amplitude: Optional[float] = Field(default=None, description="Amplitude of the sine current (A).")
|
|
351
|
-
number_of_periods: Optional[float] = Field(default=None, description="
|
|
349
|
+
frequency: Optional[float] = Field(default=None, description="Frequency of the sine source [Hz].")
|
|
350
|
+
current_amplitude: Optional[float] = Field(default=None, description="Amplitude of the sine current (A/turn).")
|
|
351
|
+
number_of_periods: Optional[float] = Field(default=None, description="Number of periods of ECLIQ power supply [-].")
|
|
352
|
+
number_of_turns: Optional[int] = Field(default=None, description="Number of turns that conform ECLIQ [-].")
|
|
352
353
|
|
|
353
354
|
class SourcePiecewise(BaseModel):
|
|
354
355
|
"""
|
|
355
356
|
Level 3 Class for piecewise (linear) source parameters for E-CLIQ
|
|
356
357
|
"""
|
|
357
|
-
csv_file: Optional[str] = Field(default=None,
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
358
|
+
csv_file: Optional[str] = Field(default=None,
|
|
359
|
+
description="File name for the from_file source type defining the time evolution of current. Multipliers are used for each of them. The file should contain two columns: 'time' (s) and 'current' (A), with these headers. If this field is set, times and currents are ignored.")
|
|
360
|
+
times: Optional[List[float]] = Field(default=None,
|
|
361
|
+
description="Time instants (s) defining the piecewise linear sources. Used only if source_csv_file is not set. Can be scaled by time_multiplier.")
|
|
362
|
+
currents: Optional[List[float]] = Field(default=None,
|
|
363
|
+
description="E-CLIQ coil currents relative to current_multiplier at the time instants 'times'. Used only if source_csv_file is not set.")
|
|
364
|
+
time_multiplier: Optional[float] = Field(default=None,
|
|
365
|
+
description="Multiplier for the time values in times (scales the time values). Also used for the time values in the source_csv_file.")
|
|
366
|
+
current_multiplier: Optional[float] = Field(default=None,
|
|
367
|
+
description="Multiplier for the E-CLIQ coil currents in currents. Also used for the values in the source_csv_file.")
|
|
368
|
+
|
|
362
369
|
|
|
363
370
|
class E_CLIQ_Class(BaseModel):
|
|
364
371
|
"""
|
|
@@ -401,8 +408,16 @@ class E_CLIQ_Class(BaseModel):
|
|
|
401
408
|
default = [],
|
|
402
409
|
description = 'length of the ecliq coils along the magnet length (m).')
|
|
403
410
|
L_ecliq_offset: Optional[List[float]] = Field(
|
|
404
|
-
default
|
|
405
|
-
description
|
|
411
|
+
default=[],
|
|
412
|
+
description='Offset of the quench heater strip from the referrence point located at the middle of the magnet length. Positive values move the quench heater towards higher z values (move quench heater strip towards the front ofthe magnet).')
|
|
413
|
+
iECLIQ_toHalfTurn_From: Optional[List[int]] = Field(
|
|
414
|
+
default=[],
|
|
415
|
+
description='List of coils to which the ECLIQ units are connected from, to which half turns they are in direct contact with.'
|
|
416
|
+
)
|
|
417
|
+
iECLIQ_toHalfTurn_To: Optional[List[int]] = Field(
|
|
418
|
+
default=[],
|
|
419
|
+
description='List of half turns to whom the ECLIQ Units are in direct contact with.'
|
|
420
|
+
)
|
|
406
421
|
|
|
407
422
|
class QuenchDetection(BaseModel):
|
|
408
423
|
"""
|
fiqus/data/DataMultipole.py
CHANGED
|
@@ -17,7 +17,6 @@ class Region(BaseModel):
|
|
|
17
17
|
lines: Dict[str, int] = {}
|
|
18
18
|
areas: Dict[str, Area] = {}
|
|
19
19
|
|
|
20
|
-
|
|
21
20
|
# class CableInsulated(BaseModel):
|
|
22
21
|
# type: #Literal['Insulated']
|
|
23
22
|
# insulated: Region = Region()
|
|
@@ -76,11 +75,16 @@ class MidLayer(BaseModel):
|
|
|
76
75
|
point_angles: Dict[str, float] = {}
|
|
77
76
|
mid_layers: Region = Region()
|
|
78
77
|
|
|
79
|
-
|
|
80
|
-
class Iron(BaseModel):
|
|
78
|
+
class BaseIron(BaseModel):
|
|
81
79
|
quadrants: Dict[int, Region] = {}
|
|
80
|
+
|
|
81
|
+
class Iron(BaseIron):
|
|
82
82
|
max_radius: float = 0.0
|
|
83
83
|
|
|
84
|
+
class Collar(BaseIron):
|
|
85
|
+
inner_boundary_tags: Dict[int, List[int]] = {} # separated per quadrant
|
|
86
|
+
cooling_tags: List[int] = [] # all tags
|
|
87
|
+
outer_boundary_tags: Dict[int, List[int]] = {} # separated per quadrant
|
|
84
88
|
|
|
85
89
|
class LayerOrder(BaseModel):
|
|
86
90
|
layers: Dict[int, List[AnticlockwiseOrder]] = {}
|
|
@@ -102,7 +106,8 @@ class InsulationThickness(BaseModel):
|
|
|
102
106
|
mid_pole: Dict[str, float] = {}
|
|
103
107
|
mid_layer: Dict[str, float] = {}
|
|
104
108
|
mid_winding: Dict[str, float] = {}
|
|
105
|
-
|
|
109
|
+
collar: Dict[str, float] = {}
|
|
110
|
+
poles: Dict[str, float] = {}
|
|
106
111
|
|
|
107
112
|
class ThinShell(BaseModel):
|
|
108
113
|
mid_layers_ht_to_ht: Dict[str, MidLayer] = {}
|
|
@@ -114,6 +119,8 @@ class ThinShell(BaseModel):
|
|
|
114
119
|
mid_turn_blocks: Dict[str, Region] = {}
|
|
115
120
|
mid_wedge_turn: Dict[str, Region] = {}
|
|
116
121
|
mid_layers_aux: Dict[str, Region] = {}
|
|
122
|
+
collar_layers: Dict[str, Region] = {}
|
|
123
|
+
pole_layers: Dict[str, Region] = {}
|
|
117
124
|
ins_thickness: InsulationThickness = InsulationThickness()
|
|
118
125
|
|
|
119
126
|
|
|
@@ -147,13 +154,15 @@ class Insulation(BaseModel):
|
|
|
147
154
|
|
|
148
155
|
class Geometry(BaseModel):
|
|
149
156
|
coil: Coil = Coil()
|
|
150
|
-
iron: Iron = Iron()
|
|
151
157
|
wedges: Wedge = Wedge()
|
|
152
158
|
air: Region = Region()
|
|
153
159
|
air_inf: Region = Region()
|
|
154
160
|
symmetric_boundaries: Region = Region()
|
|
155
161
|
thin_shells: ThinShell = ThinShell()
|
|
156
162
|
insulation: Insulation = Insulation()
|
|
163
|
+
iron_yoke: Iron = Iron()
|
|
164
|
+
collar: Collar = Collar()
|
|
165
|
+
poles: BaseIron = BaseIron()
|
|
157
166
|
|
|
158
167
|
|
|
159
168
|
# Domain classes #
|
|
@@ -176,6 +185,7 @@ class PoweredGroup(BaseModel):
|
|
|
176
185
|
mid_winding_lines: Dict[str, int] = {}
|
|
177
186
|
mid_turn_lines: Dict[str, int] = {}
|
|
178
187
|
aux_lines: Dict[str, int] = {}
|
|
188
|
+
single_node: Optional[int] = None
|
|
179
189
|
|
|
180
190
|
|
|
181
191
|
class WedgeGroup(BaseModel):
|
|
@@ -202,13 +212,20 @@ class PhysicalGroup(BaseModel):
|
|
|
202
212
|
blocks: Dict[int, PoweredBlock] = {}
|
|
203
213
|
wedges: Dict[int, WedgeGroup] = {}
|
|
204
214
|
insulations: GroupType = GroupType()
|
|
205
|
-
|
|
215
|
+
iron_yoke: GroupType = GroupType()
|
|
216
|
+
collar: GroupType = GroupType()
|
|
217
|
+
poles: GroupType = GroupType()
|
|
218
|
+
ref_mesh: GroupType = GroupType() # used for the reference mesh
|
|
219
|
+
|
|
220
|
+
# more PG can be added here
|
|
206
221
|
air_inf: Optional[int] = None
|
|
207
222
|
air_inf_bnd: Optional[int] = None
|
|
208
223
|
air: Optional[int] = None
|
|
209
224
|
symmetric_boundaries: SymmetryGroup = SymmetryGroup()
|
|
210
225
|
half_turns_points: Optional[int] = None
|
|
211
|
-
|
|
226
|
+
inner_col: Optional[int] = None
|
|
227
|
+
outer_col: Optional[int] = None
|
|
228
|
+
collar_cooling: Optional[int] = None
|
|
212
229
|
|
|
213
230
|
class SymmetryBoundaries(BaseModel):
|
|
214
231
|
x: List[int] = []
|
|
@@ -216,16 +233,18 @@ class SymmetryBoundaries(BaseModel):
|
|
|
216
233
|
|
|
217
234
|
|
|
218
235
|
class GroupEntities(BaseModel):
|
|
219
|
-
iron: Dict[str, List[int]] = {}
|
|
220
236
|
air: List[int] = []
|
|
237
|
+
iron_yoke: Dict[str, List[int]] = {}
|
|
238
|
+
collar: Dict[str, List[int]] = {} # first str determines the material
|
|
239
|
+
ref_mesh: Dict[str, List[int]] = {} # used for the reference mesh
|
|
240
|
+
poles: Dict[str, List[int]] = {}
|
|
241
|
+
# more entities can be added here
|
|
221
242
|
symmetric_boundaries: SymmetryBoundaries = SymmetryBoundaries()
|
|
222
243
|
|
|
223
|
-
|
|
224
244
|
class Domain(BaseModel):
|
|
225
245
|
groups_entities: GroupEntities = GroupEntities()
|
|
226
246
|
physical_groups: PhysicalGroup = PhysicalGroup()
|
|
227
247
|
|
|
228
|
-
|
|
229
248
|
class MultipoleData(BaseModel):
|
|
230
249
|
geometries: Geometry = Geometry()
|
|
231
250
|
domains: Domain = Domain()
|
|
@@ -248,4 +267,8 @@ class MultipoleRegionCoordinate(BaseModel):
|
|
|
248
267
|
isothermal_nodes: IsothermalNodes = IsothermalNodes()
|
|
249
268
|
neighbouring_nodes: NeighbourNode = NeighbourNode()
|
|
250
269
|
|
|
270
|
+
# this class stores the same information as the crns file
|
|
271
|
+
# but at the mesh level (see https://gitlab.cern.ch/steam/steam-fiqus-dev/-/issues/95)
|
|
272
|
+
coordinates_per_half_turn: Dict[str, List[List[float]]] = {}
|
|
273
|
+
|
|
251
274
|
|
fiqus/data/DataWindingsCCT.py
CHANGED
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
from pydantic import BaseModel
|
|
2
|
-
from typing import List, Optional
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
class Terminal(BaseModel):
|
|
6
|
-
vol_st: Optional[List[int]] = None # volume number for terminal in for straightening
|
|
7
|
-
surf_st: Optional[List[int]] = None # surface number for terminal in for straightening
|
|
8
|
-
vol_et: Optional[List[int]] = None # volume number for terminal in for extending
|
|
9
|
-
surf_et: Optional[List[int]] = None # surface number for terminal in for extending
|
|
10
|
-
lc_st: Optional[List[List[List[int]]]] = None # line connections for straightening terminals
|
|
11
|
-
lc_et: Optional[List[List[List[int]]]] = None # line connections for extending terminals
|
|
12
|
-
z_air: Optional[float] = None
|
|
13
|
-
z_add: Optional[float] = None
|
|
14
|
-
ndpterms: Optional[List[int]] = None # number of divisions per terminal
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
class Winding(BaseModel):
|
|
18
|
-
names: Optional[List[str]] = None # name to use in gmsh and getdp
|
|
19
|
-
t_in: Terminal = Terminal() # Terminal in
|
|
20
|
-
t_out: Terminal = Terminal() # Terminal in
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
class WindingsInformation(BaseModel):
|
|
24
|
-
magnet_name: Optional[str] = None
|
|
25
|
-
windings_avg_length: Optional[float] = None
|
|
26
|
-
windings: Winding = Winding()
|
|
27
|
-
w_names: Optional[List[str]] = None
|
|
28
|
-
f_names: Optional[List[str]] = None
|
|
29
|
-
formers: Optional[List[str]] = None
|
|
30
|
-
air: Optional[str] = None
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
class SpliterBrep(BaseModel): # Brep file model splitter data
|
|
34
|
-
magnet_name: Optional[str] = None
|
|
35
|
-
file_name: Optional[str] = None # full file name for the brep file
|
|
36
|
-
vol_firsts: Optional[List[int]] = None # list of first volumes for the partitioned model
|
|
37
|
-
vol_lasts: Optional[List[int]] = None # list of last volumes for the partitioned model
|
|
1
|
+
from pydantic import BaseModel
|
|
2
|
+
from typing import List, Optional
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class Terminal(BaseModel):
|
|
6
|
+
vol_st: Optional[List[int]] = None # volume number for terminal in for straightening
|
|
7
|
+
surf_st: Optional[List[int]] = None # surface number for terminal in for straightening
|
|
8
|
+
vol_et: Optional[List[int]] = None # volume number for terminal in for extending
|
|
9
|
+
surf_et: Optional[List[int]] = None # surface number for terminal in for extending
|
|
10
|
+
lc_st: Optional[List[List[List[int]]]] = None # line connections for straightening terminals
|
|
11
|
+
lc_et: Optional[List[List[List[int]]]] = None # line connections for extending terminals
|
|
12
|
+
z_air: Optional[float] = None
|
|
13
|
+
z_add: Optional[float] = None
|
|
14
|
+
ndpterms: Optional[List[int]] = None # number of divisions per terminal
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class Winding(BaseModel):
|
|
18
|
+
names: Optional[List[str]] = None # name to use in gmsh and getdp
|
|
19
|
+
t_in: Terminal = Terminal() # Terminal in
|
|
20
|
+
t_out: Terminal = Terminal() # Terminal in
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
class WindingsInformation(BaseModel):
|
|
24
|
+
magnet_name: Optional[str] = None
|
|
25
|
+
windings_avg_length: Optional[float] = None
|
|
26
|
+
windings: Winding = Winding()
|
|
27
|
+
w_names: Optional[List[str]] = None
|
|
28
|
+
f_names: Optional[List[str]] = None
|
|
29
|
+
formers: Optional[List[str]] = None
|
|
30
|
+
air: Optional[str] = None
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
class SpliterBrep(BaseModel): # Brep file model splitter data
|
|
34
|
+
magnet_name: Optional[str] = None
|
|
35
|
+
file_name: Optional[str] = None # full file name for the brep file
|
|
36
|
+
vol_firsts: Optional[List[int]] = None # list of first volumes for the partitioned model
|
|
37
|
+
vol_lasts: Optional[List[int]] = None # list of last volumes for the partitioned model
|
fiqus/data/RegionsModelFiQuS.py
CHANGED
|
@@ -166,7 +166,7 @@ class ThinShell(BaseModel):
|
|
|
166
166
|
bdry_curves: Dict[Literal["collar", "poles", "outer_collar"], List[int]] = {} # save the boundary curves of a specific region, used in TSA
|
|
167
167
|
|
|
168
168
|
# insulation types, only mid layers
|
|
169
|
-
insulation_types: InsulationType = InsulationType()
|
|
169
|
+
insulation_types: InsulationType = InsulationType()
|
|
170
170
|
quench_heaters: InsulationType = InsulationType()
|
|
171
171
|
collar: InsulationType = InsulationType()
|
|
172
172
|
poles: InsulationType = InsulationType()
|