fiqus 2026.1.0__py3-none-any.whl → 2026.1.2__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.
Files changed (42) hide show
  1. fiqus/MainFiQuS.py +1 -8
  2. fiqus/data/DataConductor.py +4 -8
  3. fiqus/data/DataFiQuSMultipole.py +358 -167
  4. fiqus/data/DataModelCommon.py +30 -15
  5. fiqus/data/DataMultipole.py +33 -10
  6. fiqus/data/DataWindingsCCT.py +37 -37
  7. fiqus/data/RegionsModelFiQuS.py +1 -1
  8. fiqus/geom_generators/GeometryMultipole.py +751 -54
  9. fiqus/getdp_runners/RunGetdpMultipole.py +181 -31
  10. fiqus/mains/MainMultipole.py +109 -17
  11. fiqus/mesh_generators/MeshCCT.py +209 -209
  12. fiqus/mesh_generators/MeshMultipole.py +938 -263
  13. fiqus/parsers/ParserCOND.py +2 -1
  14. fiqus/parsers/ParserDAT.py +16 -16
  15. fiqus/parsers/ParserGetDPOnSection.py +212 -212
  16. fiqus/parsers/ParserGetDPTimeTable.py +134 -134
  17. fiqus/parsers/ParserMSH.py +53 -53
  18. fiqus/parsers/ParserRES.py +142 -142
  19. fiqus/plotters/PlotPythonCCT.py +133 -133
  20. fiqus/plotters/PlotPythonMultipole.py +18 -18
  21. fiqus/post_processors/PostProcessMultipole.py +16 -6
  22. fiqus/pre_processors/PreProcessCCT.py +175 -175
  23. fiqus/pro_assemblers/ProAssembler.py +3 -3
  24. fiqus/pro_material_functions/ironBHcurves.pro +246 -246
  25. fiqus/pro_templates/combined/CC_Module.pro +1213 -0
  26. fiqus/pro_templates/combined/ConductorAC_template.pro +1025 -0
  27. fiqus/pro_templates/combined/Multipole_template.pro +2738 -1338
  28. fiqus/pro_templates/combined/TSA_materials.pro +102 -2
  29. fiqus/pro_templates/combined/materials.pro +54 -3
  30. fiqus/utils/Utils.py +18 -25
  31. fiqus/utils/update_data_settings.py +1 -1
  32. {fiqus-2026.1.0.dist-info → fiqus-2026.1.2.dist-info}/METADATA +64 -68
  33. {fiqus-2026.1.0.dist-info → fiqus-2026.1.2.dist-info}/RECORD +42 -40
  34. {fiqus-2026.1.0.dist-info → fiqus-2026.1.2.dist-info}/WHEEL +1 -1
  35. tests/test_geometry_generators.py +29 -32
  36. tests/test_mesh_generators.py +35 -34
  37. tests/test_solvers.py +32 -31
  38. tests/utils/fiqus_test_classes.py +396 -147
  39. tests/utils/generate_reference_files_ConductorAC.py +57 -57
  40. tests/utils/helpers.py +76 -1
  41. {fiqus-2026.1.0.dist-info → fiqus-2026.1.2.dist-info}/LICENSE.txt +0 -0
  42. {fiqus-2026.1.0.dist-info → fiqus-2026.1.2.dist-info}/top_level.txt +0 -0
@@ -104,32 +104,84 @@ class MultipoleSolveBoundaryConditionsThermal(BaseModel):
104
104
  "The keys are chosen names for each boundary condition.",
105
105
  )
106
106
 
107
+ class MultipoleSolveTransient_parent(BaseModel):
108
+ """
109
+ Level 4: Class for FiQuS Multipole
110
+ """
111
+ initial_time: Optional[float] = Field(
112
+ default=0.,
113
+ description="It specifies the initial time of the simulation.",
114
+ )
115
+ final_time: Optional[float] = Field(
116
+ default=0.0,
117
+ description="It specifies the final time of the simulation.",
118
+ )
119
+ initial_time_step: Optional[float] = Field(
120
+ default=1E-10,
121
+ description="It specifies the initial time step used at the beginning of the transient simulation.",
122
+ )
123
+ min_time_step: Optional[float] = Field(
124
+ default=1E-12,
125
+ description="It specifies the minimum possible value of the time step.",
126
+ )
127
+ max_time_step: Optional[float] = Field(
128
+ default=10,
129
+ description="It specifies the maximum possible value of the time step.",
130
+ )
131
+ breakpoints: Optional[List[float]] = Field(
132
+ default=[],
133
+ description="It forces the transient simulation to hit the time instants contained in this list.",
134
+ )
135
+ integration_method: Optional[Union[None, Literal[
136
+ "Euler", "Gear_2", "Gear_3", "Gear_4", "Gear_5", "Gear_6"
137
+ ]]] = Field(
138
+ default="Euler",
139
+ title="Integration Method",
140
+ description="It specifies the type of integration method to be used.",
141
+ )
142
+ rel_tol_time: Optional[float] = Field(
143
+ default=1E-4,
144
+ description="It specifies the relative tolerance.",
145
+ )
146
+ abs_tol_time: Optional[float] = Field(
147
+ default=1e-4,
148
+ description="It specifies the absolute tolerance.",
149
+ )
150
+ norm_type: Optional[Literal["L1Norm", "MeanL1Norm", "L2Norm", "MeanL2Norm", "LinfNorm"]] = Field(
151
+ default='LinfNorm',
152
+ description="It specifies the type of norm to be calculated for convergence assessment.",
153
+ )
107
154
 
108
- # class MultipoleSolveTransientElectromagnetics(BaseModel):
109
- # """
110
- # Level 4: Class for FiQuS Multipole
111
- # """
112
- # time_stepping: Optional[Literal["adaptive", "fixed"]] = Field(
113
- # default="adaptive",
114
- # description="It specifies the type of time stepping.",
115
- # )
116
- # initial_time: Optional[float] = Field(
117
- # default=0.,
118
- # description="It specifies the initial time of the simulation.",
119
- # )
120
- # final_time: Optional[float] = Field(
121
- # default=None,
122
- # description="It specifies the final time of the simulation.",
123
- # )
124
- # fixed: MultipoleSolveTimeParametersFixed = Field(
125
- # default=MultipoleSolveTimeParametersFixed(),
126
- # description="This dictionary contains the information about the time parameters of the fixed time stepping.",
127
- # )
128
- # adaptive: MultipoleSolveTimeParametersAdaptive = Field(
129
- # default=MultipoleSolveTimeParametersAdaptive(),
130
- # description="This dictionary contains the information about the time parameters of the adaptive time stepping.",
131
- # )
155
+ class MultipoleSolveTransientElectromagnetics(MultipoleSolveTransient_parent):
156
+ """
157
+ Level 4: Class for FiQuS Multipole
158
+ """
159
+ T_sim: Optional[float] = Field(
160
+ default=1.9,
161
+ description="It specifies the temperature used to calculate the resistivity of the superconductor during the transient sim.",
162
+ )
132
163
 
164
+ class MultipleSolveCollarHeCooling(BaseModel):
165
+ enabled: Optional[bool] = Field(
166
+ default=False,
167
+ description="It determines whether the helium cooling is enabled or not (adiabatic conditions).",
168
+ )
169
+ which: Optional[Union[Literal['all'], List]] = Field(
170
+ default='all',
171
+ description="It specifies the boundaries where the collar cooling is applied. If 'all', it applies to all boundaries. If a list, it applies to the specified boundaries numbered counter-clockwise."
172
+ )
173
+ heat_transfer_coefficient: Optional[Union[float, str]] = Field(
174
+ default= 'CFUN_hHe_T_THe',
175
+ description="It specifies the value or name of the function of the constant heat transfer coefficient.",
176
+ )
177
+ ref_temperature: Optional[float] = Field(
178
+ default = 0.0,
179
+ description="It specifies the reference temperature for the collar cooling. If not specified, it takes the value of the initial temperature.",
180
+ )
181
+ move_cooling_holes: Optional[Union[str, int, List[List[float]]]] = Field(
182
+ default=None,
183
+ description= "It specifies if and how cooling holes are to be moved. Either choose '1' or '2' for predefined positions or a list [[dx,dy], [dx2,dy2]].. to shift each hole manually"
184
+ )
133
185
 
134
186
  class MultipoleSolveHeCooling(BaseModel):
135
187
  """
@@ -149,6 +201,7 @@ class MultipoleSolveHeCooling(BaseModel):
149
201
  description="It specifies the value or name of the function of the constant heat transfer coefficient.",
150
202
  )
151
203
 
204
+
152
205
  class MultipoleSolveNonLinearSolver(BaseModel):
153
206
  """
154
207
  Level 4: Class for FiQuS Multipole
@@ -174,59 +227,39 @@ class MultipoleSolveNonLinearSolver(BaseModel):
174
227
  description="It specifies the type of norm to be calculated for convergence assessment.",
175
228
  )
176
229
 
177
-
178
- class MultipoleSolveTransientThermal(BaseModel):
230
+ class MultipoleSolveTransientThermal(MultipoleSolveTransient_parent):
179
231
  """
180
232
  Level 4: Class for FiQuS Multipole
181
233
  """
182
- initial_time: Optional[float] = Field(
183
- default=0.,
184
- description="It specifies the initial time of the simulation.",
185
- )
186
- final_time: Optional[float] = Field(
187
- default=None,
188
- description="It specifies the final time of the simulation.",
189
- )
190
- initial_time_step: Optional[float] = Field(
191
- default=1E-10,
192
- description="It specifies the initial time step used at the beginning of the transient simulation.",
193
- )
194
- min_time_step: Optional[float] = Field(
195
- default=1E-12,
196
- description="It specifies the minimum possible value of the time step.",
197
- )
198
- max_time_step: Optional[float] = Field(
199
- default=10,
200
- description="It specifies the maximum possible value of the time step.",
201
- )
202
- breakpoints: Optional[List[float]] = Field(
203
- default=[],
204
- description="It forces the transient simulation to hit the time instants contained in this list.",
205
- )
206
- integration_method: Union[None, Literal[
207
- "Euler", "Gear_2", "Gear_3", "Gear_4", "Gear_5", "Gear_6"
208
- ]] = Field(
209
- default="Euler",
210
- title="Integration Method",
211
- description="It specifies the type of integration method to be used.",
234
+ stop_temperature: Optional[float] = Field(
235
+ default=300,
236
+ description="If one half turn reaches this temperature, the simulation is stopped.",
212
237
  )
213
- rel_tol_time: Optional[float] = Field(
214
- default=1E-4,
238
+
239
+ class MultipoleSolveTransientCoupled(MultipoleSolveTransient_parent):
240
+ """
241
+ Level 4: Class for FiQuS Multipole
242
+ """
243
+ rel_tol_time: Optional[List[float]] = Field(
244
+ default=[1E-4,1E-4],
215
245
  description="It specifies the relative tolerance.",
216
246
  )
217
- abs_tol_time: Optional[float] = Field(
218
- default=1e-4,
247
+ abs_tol_time: Optional[List[float]] = Field(
248
+ default=[1e-4,1e-4],
219
249
  description="It specifies the absolute tolerance.",
220
250
  )
221
- norm_type: Literal["L1Norm", "MeanL1Norm", "L2Norm", "MeanL2Norm", "LinfNorm"] = Field(
222
- default='LinfNorm',
251
+ norm_type: List[Literal["L1Norm", "MeanL1Norm", "L2Norm", "MeanL2Norm", "LinfNorm"]] = Field(
252
+ default=['LinfNorm','LinfNorm'],
223
253
  description="It specifies the type of norm to be calculated for convergence assessment.",
224
254
  )
225
255
  stop_temperature: Optional[float] = Field(
226
256
  default=300,
227
257
  description="If one half turn reaches this temperature, the simulation is stopped.",
228
258
  )
229
-
259
+ seq_NL: Optional[bool] = Field(
260
+ default=True,
261
+ description="The non-linear solver is sequential Mag->Thermal, or its fully coupled.",
262
+ )
230
263
 
231
264
  class MultipoleSolveInsulationBlockToBlock(BaseModel):
232
265
  """
@@ -273,25 +306,38 @@ class MultipoleSolveInsulationExterior(BaseModel):
273
306
  description="It specifies the list of thicknesses of the specified insulation layers. The order must match the one of the materials list.",
274
307
  )
275
308
 
276
-
277
- class MultipoleSolveWedge(BaseModel):
309
+ class MultipoleSolveSpecificMaterial(BaseModel):
278
310
  """
279
311
  Level 3: Class for FiQuS Multipole
280
312
  """
281
313
  material: Optional[str] = Field(
282
314
  default=None,
283
- description="It specifies the material of the wedge regions.",
315
+ description="It specifies the material of the region.",
284
316
  )
285
317
  RRR: Optional[float] = Field(
286
318
  default=None,
287
- description="It specifies the RRR of the wedge regions.",
319
+ description="It specifies the RRR of the region.",
288
320
  )
289
321
  T_ref_RRR_high: Optional[float] = Field(
290
322
  default=None,
291
323
  description="It specifies the reference temperature associated with the RRR.",
292
324
  )
325
+ transient_effects_enabled: Optional[bool] = Field(
326
+ default=False,
327
+ description="It determines whether the transient effects are enabled or not.",
328
+ )
329
+ # rel_magnetic_permeability: Optional[float] = Field(
330
+ # default = 1.0,
331
+ # description = 'It specifies the material relative magnetic permeability against vacuum for EM calculations'
332
+ # )
293
333
 
294
334
 
335
+ class MultipoleSolveInsulationCollar(BaseModel):
336
+ material: Optional[str] = Field(
337
+ default=None,
338
+ description="It specifies the default material of the insulation regions between collar and outer insulation.",
339
+ )
340
+
295
341
  class MultipoleSolveInsulationTSA(BaseModel):
296
342
  """
297
343
  Level 3: Class for FiQuS Multipole
@@ -304,9 +350,22 @@ class MultipoleSolveInsulationTSA(BaseModel):
304
350
  default=MultipoleSolveInsulationExterior(),
305
351
  description="This dictionary contains the information about the materials and thicknesses of the outer insulation regions (exterior boundaries) modeled via thin-shell approximation.",
306
352
  )
353
+ between_collar: Optional[MultipoleSolveInsulationBlockToBlock] = Field(
354
+ default=MultipoleSolveInsulationCollar(),
355
+ description="This dictionary contains the information about the materials and thicknesses of the insulation regions between the collar and the outer insulation regions for thin-shell approximation.",
356
+ )
357
+
358
+ class MultipoleSolve_parent(BaseModel):
359
+ """
360
+ Level 3: Class for FiQuS Multipole
361
+ """
362
+ non_linear_solver: MultipoleSolveNonLinearSolver = Field(
363
+ default=MultipoleSolveNonLinearSolver(),
364
+ description="This dictionary contains the information about the parameters for the non-linear solver.",
365
+ )
307
366
 
308
367
 
309
- class MultipoleSolveThermal(BaseModel):
368
+ class MultipoleSolveThermal(MultipoleSolve_parent):
310
369
  """
311
370
  Level 3: Class for FiQuS Multipole
312
371
  """
@@ -322,14 +381,14 @@ class MultipoleSolveThermal(BaseModel):
322
381
  default=MultipoleSolveHeCooling(),
323
382
  description="This dictionary contains the information about the Robin boundary condition for generic groups of boundaries.",
324
383
  )
384
+ collar_cooling: MultipleSolveCollarHeCooling = Field(
385
+ default=MultipleSolveCollarHeCooling(),
386
+ description="This dictionary contains the information about the cooling for the collar region.",
387
+ )
325
388
  overwrite_boundary_conditions: Optional[MultipoleSolveBoundaryConditionsThermal] = Field(
326
389
  default=MultipoleSolveBoundaryConditionsThermal(),
327
390
  description="This dictionary contains the information about boundary conditions for explicitly specified boundaries.",
328
391
  )
329
- non_linear_solver: MultipoleSolveNonLinearSolver = Field(
330
- default=MultipoleSolveNonLinearSolver(),
331
- description="This dictionary contains the information about the parameters for the non-linear solver.",
332
- )
333
392
  time_stepping: MultipoleSolveTransientThermal = Field(
334
393
  default=MultipoleSolveTransientThermal(),
335
394
  description="This dictionary contains the information about the parameters for the transient solver.",
@@ -347,24 +406,18 @@ class MultipoleSolveThermal(BaseModel):
347
406
  description="It determines whether the initial temperature is enforced as the minimum temperature of the simulation.",
348
407
  )
349
408
 
350
- class MultipoleSolveElectromagnetics(BaseModel):
409
+ class MultipoleSolveElectromagnetics(MultipoleSolve_parent):
351
410
  """
352
411
  Level 3: Class for FiQuS Multipole
353
412
  """
354
- solve_type: Optional[Literal[None, "stationary"]] = Field(
413
+ solve_type: Optional[Literal[None, "stationary","transient"]] = Field(
355
414
  default=None,
356
415
  description="It determines whether the magneto-static problem is solved ('stationary') or not ('null').",
357
416
  )
358
-
359
- non_linear_solver: MultipoleSolveNonLinearSolver = Field(
360
- default=MultipoleSolveNonLinearSolver(),
361
- description="This dictionary contains the information about the parameters for the non-linear solver.",
417
+ time_stepping: Optional[MultipoleSolveTransientElectromagnetics] = Field(
418
+ default=MultipoleSolveTransientElectromagnetics(),
419
+ description="This dictionary contains the information about the parameters for the transient solver.",
362
420
  )
363
- # currently not needed since stationary only, we will be able to reuse it from the thermal solver
364
- # time_stepping_parameters: MultipoleSolveTransientElectromagnetics = Field(
365
- # default=MultipoleSolveTransientElectromagnetics(),
366
- # description="This dictionary contains the information about the parameters for the transient solver.",
367
- # )
368
421
 
369
422
 
370
423
  class MultipoleMeshThinShellApproximationParameters(BaseModel):
@@ -383,7 +436,22 @@ class MultipoleMeshThinShellApproximationParameters(BaseModel):
383
436
  default=1,
384
437
  description="It specifies the number of minimum spacial discretizations across a thin-shell.",
385
438
  )
386
-
439
+ global_size_COL: Optional[float] = Field(
440
+ default=1e-4,
441
+ description="The thickness of the region between ht and collar is divided by this parameter to determine the number of spacial discretizations across the thin-shell.",
442
+ )
443
+ minimum_discretizations_COL: Optional[int] = Field(
444
+ default=1,
445
+ description="It specifies the number of minimum spacial discretizations across a thin-shell.",
446
+ )
447
+ scale_factor_radial: Optional[float] = Field(
448
+ default=-1.0,
449
+ description="Scaling factor for radially directed thin-shells (e.g. halfturns to collar). Set to -1.0 to use default scaling. Wedge scalings are always ignored.",
450
+ )
451
+ scale_factor_azimuthal: Optional[float] = Field(
452
+ default=-1.0,
453
+ description="Scaling factor for azimuthally directed thin-shells (e.g. halfturns to pole). Set to -1.0 to use default scaling. Wedge scalings are always ignored.",
454
+ )
387
455
 
388
456
  class MultipoleMeshThreshold(BaseModel):
389
457
  """
@@ -410,6 +478,15 @@ class MultipoleMeshThreshold(BaseModel):
410
478
  description="It sets gmsh Mesh.MeshDistMax.",
411
479
  )
412
480
 
481
+ class MultipoleMeshThresholdCollar(MultipoleMeshThreshold):
482
+ """
483
+ Level 3: Class for FiQuS Multipole
484
+ """
485
+ Enforce_TSA_mapping: Optional[bool] = Field(
486
+ default=False,
487
+ description="Enfocres matching nodes for the TSA layer. Uses SizeMin to determine the size of the nodes.", # only for the collar layer
488
+ )
489
+
413
490
  class MultipoleMeshTransfinite(BaseModel):
414
491
  """
415
492
  Level 3: Class for FiQuS Multipole
@@ -439,7 +516,7 @@ class MultipoleMeshTransfiniteOrField(BaseModel):
439
516
  description="This dictionary contains the gmsh Field information.",
440
517
  )
441
518
 
442
- class MultipolePostProcThermal(BaseModel):
519
+ class MultipolePostProc_parent(BaseModel):
443
520
  """
444
521
  Level 2: Class for FiQuS Multipole
445
522
  """
@@ -459,15 +536,21 @@ class MultipolePostProcThermal(BaseModel):
459
536
  default=False,
460
537
  description="It determines whether the solution for the .txt file is saved at the end of the simulation or during run time.",
461
538
  )
462
- take_average_conductor_temperature: Optional[bool] = Field(
463
- default=True,
464
- description="It determines whether the output files are based on the average conductor temperature or not (map2d).",
465
- )
539
+
466
540
  plot_all: Optional[Union[bool, None]] = Field(
467
541
  default=False,
468
542
  description="It determines whether the figures are generated and shown (true), generated only (null), or not generated (false). Useful for tests.",
469
543
  )
470
- variables: Optional[List[Literal["T", "jOverJc", "rho"]]] = Field(
544
+
545
+ class MultipolePostProcThermal(MultipolePostProc_parent):
546
+ """
547
+ Level 2: Class for FiQuS Multipole
548
+ """
549
+ take_average_conductor_temperature: Optional[bool] = Field(
550
+ default=True,
551
+ description="It determines whether the output files are based on the average conductor temperature or not (map2d).",
552
+ )
553
+ variables: Optional[List[Literal["T", "jOverJc", "rho", "az_thermal", "ac_loss"]]] = Field(
471
554
  default=["T"],
472
555
  description="It specifies the physical quantity to be output.",
473
556
  )
@@ -478,44 +561,46 @@ class MultipolePostProcThermal(BaseModel):
478
561
  )
479
562
 
480
563
 
481
- class MultipolePostProcElectromagnetics(BaseModel):
564
+ class MultipolePostProcElectromagnetics(MultipolePostProc_parent):
482
565
  """
483
566
  Level 2: Class for FiQuS Multipole
484
567
  """
485
- output_time_steps_pos: Optional[Union[bool, int]] = Field(
486
- default=True,
487
- description="It determines whether the solution for the .pos file is saved for all time steps (True), none (False), or equidistant time steps (int).",
488
- )
489
- output_time_steps_txt: Optional[Union[bool, int]] = Field(
490
- default=True,
491
- description="It determines whether the solution for the .txt file is saved for all time steps (True), none (False), or equidistant time steps (int).",
492
- )
493
- save_pos_at_the_end: Optional[bool] = Field(
494
- default=True,
495
- description="It determines whether the solution for the .pos file is saved at the end of the simulation or during run time.",
496
- )
497
- save_txt_at_the_end: Optional[bool] = Field(
498
- default=False,
499
- description="It determines whether the solution for the .txt file is saved at the end of the simulation or during run time.",
500
- )
501
568
  compare_to_ROXIE: Optional[str] = Field(
502
569
  default=None,
503
570
  description="It contains the absolute path to a reference ROXIE map2d file. If provided, comparative plots with respect to the reference are generated.",
504
571
  )
505
- plot_all: Optional[Union[bool, None]] = Field(
506
- default=False,
507
- description="It determines whether the figures are generated and shown (true), generated only (null), or not generated (false). Useful for tests.",
508
- )
509
- variables: Optional[List[Literal["a", "az", "b", "h", "js"]]] = Field(
510
- default=["b"],
572
+ variables: Optional[List[Literal["a", "az", "b", "h", "js","jOverJc", "sigma_collar","is"]]] = Field(
573
+ default=[],
511
574
  description="It specifies the physical quantity to be output.",
512
575
  )
513
576
  volumes: Optional[List[
514
577
  Literal["omega", "powered", "induced", "air", "air_far_field", "iron", "conducting", "insulator"]]] = Field(
515
- default=["powered"],
578
+ default=[],
516
579
  description="It specifies the regions associated with the physical quantity to be output.",
517
580
  )
518
581
 
582
+ class CCPostProc(BaseModel):
583
+ variables_I: Optional[List[Literal["I_PC","I_1","I_2","I_cpc","I_crowbar","I_3","I_c_r","I_EE","I_c","I_s","I_C",
584
+ "I_EE_n","I_c_n","I_s_n","I_QH","I_EQ","I_ESC",
585
+ "I_A","I_B","I_C",
586
+ "I_EQ",
587
+ "I_ESC","I_ESC_Diode","I_ESC_C"]]] = Field(
588
+ default=[],
589
+ description="Currents from the circuit that will be exported as csv",
590
+ )
591
+ variables_U: Optional[List[Literal["PS_currentsource","PS_R_1","PS_L_1","PS_C","PS_R_3","PS_L_3","PS_R_2","PS_L_2","PS_R_crowbar","PS_Ud_crowbar","PS_L_crowbar","PS_R_c_r","PS_Ud_c_r","PS_L_c_r",
592
+ "circ_R_circuit",
593
+ "EE_L","EE_V_EE","EE_Ud_snubber","EE_C","EE_R_c","EE_L_c","EE_Ud_switch","EE_R_s","EE_L_s","EE_L_n","EE_V_EE_n","EE_Ud_snubber_n","EE_C_n","EE_R_c_n","EE_L_c_n","EE_Ud_switch_n","EE_R_s_n","EE_L_s_n","EE_R_switch","EE_R_switch_n",
594
+ "CLIQ_R","CLIQ_L","CLIQ_C",
595
+ "ECLIQ_currentsource","ECLIQ_L_leads","ECLIQ_R_leads",
596
+ "ESC_C1","ESC_C2","ESC_R_leads","ESC_R_unit","ESC_L","ESC_L_Diode","ESC_Ud_Diode"]]] = Field(
597
+ default=[],
598
+ description="Voltages from the circuit that will be exported as csv",
599
+ )
600
+ assemble_veusz: Optional[bool] = Field(
601
+ default=False,
602
+ description="It determines whether the post-processing data is assembled in a veusz file.",
603
+ )
519
604
 
520
605
  class MultipolePostProc(BaseModel):
521
606
  """
@@ -529,12 +614,111 @@ class MultipolePostProc(BaseModel):
529
614
  default=MultipolePostProcThermal(),
530
615
  description="This dictionary contains the post-processing information for the thermal solution.",
531
616
  )
617
+ circuit_coupling: CCPostProc = Field(
618
+ default= CCPostProc(),
619
+ description="This dictionary contains the post-processing information for the circuit variables calculated in the solution.",
620
+ )
621
+
622
+ class MultipoleSolveCoilWindingsElectricalOrder(BaseModel):
623
+ """
624
+ Level 2: Class for the order of the electrical pairs
625
+ """
626
+ group_together: Optional[List[List[int]]] = [] # elPairs_GroupTogether
627
+ reversed: Optional[List[int]] = [] # elPairs_RevElOrder
628
+ overwrite_electrical_order: Optional[List[int]] = []
532
629
 
630
+ class MultipoleSolveCoilWindings(BaseModel):
631
+ """
632
+ Level 1: Class for winding information
633
+ """
634
+ conductor_to_group: Optional[List[int]] = [] # This key assigns to each group a conductor of one of the types defined with Conductor.name
635
+ group_to_coil_section: Optional[List[int]] = [] # This key assigns groups of half-turns to coil sections
636
+ polarities_in_group: Optional[List[int]] = [] # This key assigns the polarity of the current in each group #
637
+ half_turn_length: Optional[List[float]] = []
638
+ electrical_pairs: Optional[MultipoleSolveCoilWindingsElectricalOrder] = MultipoleSolveCoilWindingsElectricalOrder() # Variables used to calculate half-turn electrical order
639
+ # Homogenized Multipole
640
+ class HomogenizedConductorFormulationparametersROHM(BaseModel):
641
+ """
642
+ Level 4: Class for finite element formulation parameters
643
+ """
644
+ enabled: Optional[bool] = Field(
645
+ default=False,
646
+ description='Use ROHM to homogenize the magnetization hysteresis in the cables.'
647
+ )
648
+ parameter_csv_file: Optional[str] = Field(
649
+ default=None,
650
+ description='Name of the csv file containing the ROHM parameters within the inputs folder with expected row structure: [alpha,kappa,chi,gamma,lambda].'
651
+ )
652
+ gather_cell_systems: Optional[bool] = Field(
653
+ default = False,
654
+ description = 'when true, it generates a single system to solve the ROHM cells instead of one system per cell to decrease generation time.'
655
+ )
656
+ weight_scaling: Optional[float] = Field(
657
+ default=1.0,
658
+ description='Downscaling factor (s<1.0) which is applied to all weights except the first, which is scaled up to compensate.'
659
+ )
660
+ tau_scaling: Optional[float] = Field(
661
+ default=1.0,
662
+ description='Scaling factor which is applied uniformly to all coupling time constants.'
663
+ )
664
+
665
+ class HomogenizedConductorFormulationparametersROHF(BaseModel):
666
+ """
667
+ Level 4: Class for finite element formulation parameters
668
+ """
669
+ enabled: Optional[bool] = Field(
670
+ default=False,
671
+ description='Use ROHF to homogenize the internal flux hysteresis in the cables.'
672
+ )
673
+ parameter_csv_file: Optional[str] = Field(
674
+ default=None,
675
+ description='Name of the csv file containing the ROHF parameters within the inputs folder with expected row structure: [alpha,kappa,tau].'
676
+ )
677
+ gather_cell_systems: Optional[bool] = Field(
678
+ default = False,
679
+ description = 'when true, it generates a single system to solve the ROHF cells instead of one system per cell to decrease generation time.'
680
+ )
681
+ class HomogenizedConductorRunType(BaseModel):
682
+ """
683
+ Level 4: Class for runtype parameters
684
+ """
685
+ mode: Optional[Literal["ramp","isothermal_ramp","quench"]] = Field(
686
+ default="ramp",
687
+ description= "Type of simulation to run with homogenized conductors (ramp - real cooling conditions, isothermal_ramp - unlimited cooling, quench - non-zero initial conditions)"
688
+ )
689
+ ramp_file: Optional[str] = Field(
690
+ default=None,
691
+ description='Name of the ramp model from which to start the simulation'
692
+ )
693
+ class HomogenizedConductor(BaseModel):
694
+ """
695
+ Level 3: Class for FiQuS Multipole
696
+ """
697
+ enabled: Optional[bool] = Field(
698
+ default=False,
699
+ description="It determines whether the homogenized conductor model is enabled or not."
700
+ )
701
+ run_type: HomogenizedConductorRunType = Field(
702
+ default=HomogenizedConductorRunType(),
703
+ description= "Type of simulation to run with homogenized conductors (ramp - real cooling conditions, isothermal_ramp - unlimited cooling, quench - non-zero initial conditions)"
704
+ )
705
+ rohm: HomogenizedConductorFormulationparametersROHM = Field(
706
+ default=HomogenizedConductorFormulationparametersROHM(),
707
+ description="This dictionary contains the information about the parameters for the ROHM model.",
708
+ )
709
+ rohf: HomogenizedConductorFormulationparametersROHF = Field(
710
+ default=HomogenizedConductorFormulationparametersROHF(),
711
+ description="This dictionary contains the information about the parameters for the ROHF model.",
712
+ )
533
713
 
534
714
  class MultipoleSolve(BaseModel):
535
715
  """
536
716
  Level 2: Class for FiQuS Multipole
537
717
  """
718
+ coil_windings: Optional[MultipoleSolveCoilWindings] = Field(
719
+ default=MultipoleSolveCoilWindings(),
720
+ description="This dictionary contains the information pertaining the number of coils and electrical order necessary to generate the associated electrical circuit"
721
+ )
538
722
  electromagnetics: MultipoleSolveElectromagnetics = Field(
539
723
  default=MultipoleSolveElectromagnetics(),
540
724
  description="This dictionary contains the solver information for the electromagnetic solution.",
@@ -543,10 +727,22 @@ class MultipoleSolve(BaseModel):
543
727
  default=MultipoleSolveThermal(),
544
728
  description="This dictionary contains the solver information for the thermal solution.",
545
729
  )
546
- wedges: MultipoleSolveWedge = Field(
547
- default=MultipoleSolveWedge(),
730
+ wedges: MultipoleSolveSpecificMaterial = Field(
731
+ default=MultipoleSolveSpecificMaterial(),
548
732
  description="This dictionary contains the material information of wedges.",
549
733
  )
734
+ collar: MultipoleSolveSpecificMaterial = Field(
735
+ default=MultipoleSolveSpecificMaterial(),
736
+ description="This dictionary contains the material information of the collar region.",
737
+ )
738
+ iron_yoke: MultipoleSolveSpecificMaterial = Field(
739
+ default=MultipoleSolveSpecificMaterial(),
740
+ description="This dictionary contains the material information of the iron yoke region.",
741
+ )
742
+ poles: MultipoleSolveSpecificMaterial = Field(
743
+ default=MultipoleSolveSpecificMaterial(),
744
+ description="This dictionary contains the material information of the pole region.",
745
+ )
550
746
  noOfMPITasks: Optional[Union[bool, int]] = Field(
551
747
  default=False,
552
748
  title="No. of tasks for MPI parallel run of GetDP",
@@ -556,6 +752,14 @@ class MultipoleSolve(BaseModel):
556
752
  " If False, GetDP will be run in serial without invoking mpiexec."
557
753
  ),
558
754
  )
755
+ time_stepping: Optional[MultipoleSolveTransientCoupled] = Field(
756
+ default=MultipoleSolveTransientCoupled(),
757
+ description="This dictionary contains the information about the parameters for the transient solver.",
758
+ )
759
+ cable_homogenization: Optional[HomogenizedConductor]= Field(
760
+ default=HomogenizedConductor(),
761
+ description="This dictionary contains the information about the homogenized conductor properties.",
762
+ )
559
763
 
560
764
  class MultipoleThermalInsulationMesh(BaseModel):
561
765
  """
@@ -569,14 +773,14 @@ class MultipoleThermalInsulationMesh(BaseModel):
569
773
  default=MultipoleMeshThinShellApproximationParameters(),
570
774
  description="This dictionary contains the mesh information for thin-shells.",
571
775
  )
572
-
573
- class MultipoleMeshThermal(BaseModel):
776
+
777
+ class MultipoleMesh_parent(BaseModel):
574
778
  """
575
779
  Level 2: Class for FiQuS Multipole
576
780
  """
577
781
  create: bool = Field(
578
782
  default=True,
579
- description="It determines whether the thermal mesh is built or not.",
783
+ description="It determines whether the mesh is built or not.",
580
784
  )
581
785
  conductors: Optional[MultipoleMeshTransfiniteOrField] = Field(
582
786
  default=MultipoleMeshTransfiniteOrField(),
@@ -590,16 +794,27 @@ class MultipoleMeshThermal(BaseModel):
590
794
  default=MultipoleMeshThreshold(),
591
795
  description="This dictionary contains the gmsh Field information for the iron yoke region.",
592
796
  )
593
- insulation: Optional[MultipoleThermalInsulationMesh] = Field(
594
- default=MultipoleThermalInsulationMesh(),
595
- description="This dictionary contains the mesh information for the insulation regions.",
797
+ collar: Optional[MultipoleMeshThresholdCollar] = Field(
798
+ default=MultipoleMeshThresholdCollar(),
799
+ description="This dictionary contains the gmsh Field information for the collar region.",
596
800
  )
597
-
598
- iron_field: Optional[MultipoleMeshThreshold] = Field(
801
+ poles: Optional[MultipoleMeshThreshold] = Field(
599
802
  default=MultipoleMeshThreshold(),
600
- description="This dictionary contains the gmsh Field information for the iron yoke region.",
803
+ description="This dictionary contains the mesh information for the poles region.",
601
804
  )
602
805
 
806
+ class MultipoleMeshThermal(MultipoleMesh_parent):
807
+ """
808
+ Level 2: Class for FiQuS Multipole
809
+ """
810
+ reference: Optional[MultipoleMeshThreshold] = Field(
811
+ default=MultipoleMeshThreshold(),
812
+ description="It determines whether the reference mesh is built or not. If True, an additional layer between the insulation and collar is meshed",
813
+ )
814
+ insulation: Optional[MultipoleThermalInsulationMesh] = Field(
815
+ default=MultipoleThermalInsulationMesh(),
816
+ description="This dictionary contains the mesh information for the insulation regions.",
817
+ )
603
818
  isothermal_conductors: Optional[bool] = Field(
604
819
  default=False,
605
820
  description="It determines whether the conductors are considered isothermal or not using getDP constraints.",
@@ -609,26 +824,10 @@ class MultipoleMeshThermal(BaseModel):
609
824
  description="It determines whether the wedges are considered isothermal or not using getDP Link constraints.",
610
825
  )
611
826
 
612
- class MultipoleMeshElectromagnetics(BaseModel):
827
+ class MultipoleMeshElectromagnetics(MultipoleMesh_parent):
613
828
  """
614
829
  Level 2: Class for FiQuS Multipole
615
830
  """
616
- create: bool = Field(
617
- default=True,
618
- description="It determines whether the electromagnetic mesh is built or not.",
619
- )
620
- conductors: Optional[MultipoleMeshTransfiniteOrField] = Field(
621
- default=MultipoleMeshTransfiniteOrField(),
622
- description="This dictionary contains the mesh information for the conductor regions.",
623
- )
624
- wedges: Optional[MultipoleMeshTransfiniteOrField] = Field(
625
- default=MultipoleMeshTransfiniteOrField(),
626
- description="This dictionary contains the mesh information for the wedge regions.",
627
- )
628
- iron_field: Optional[MultipoleMeshThreshold] = Field(
629
- default=MultipoleMeshThreshold(),
630
- description="This dictionary contains the gmsh Field information for the iron yoke region.",
631
- )
632
831
  bore_field: Optional[MultipoleMeshThreshold] = Field(
633
832
  default=MultipoleMeshThreshold(),
634
833
  description="This dictionary contains the gmsh Field information for the bore region.",
@@ -647,23 +846,24 @@ class MultipoleMesh(BaseModel):
647
846
  description="This dictionary contains the mesh information for the thermal solution.",
648
847
  )
649
848
 
650
-
651
- class MultipoleGeometryThermal(BaseModel):
652
- """
653
- Level 2: Class for FiQuS Multipole
654
- """
849
+ class MultipoleGeometry_parent(BaseModel):
655
850
  create: bool = Field(
656
851
  default=True,
657
- description="It determines whether the thermal geometry is built or not.",
658
- )
659
- with_iron_yoke: Optional[bool] = Field(
660
- default=False,
661
- description="It determines whether the iron yoke region is built or not.",
852
+ description="It determines whether the geometry is built or not.",
662
853
  )
663
854
  with_wedges: Optional[bool] = Field(
664
855
  default=True,
665
856
  description="It determines whether the wedge regions are built or not.",
666
857
  )
858
+ areas: Optional[List[Literal["iron_yoke", "collar", "poles"]]] = Field(
859
+ default= [],
860
+ description="List with areas to build."
861
+ )
862
+
863
+ class MultipoleGeometryThermal(MultipoleGeometry_parent):
864
+ """
865
+ Level 2: Class for FiQuS Multipole
866
+ """
667
867
  use_TSA: Optional[bool] = Field(
668
868
  default=False,
669
869
  description="It determines whether the insulation regions are explicitly built or modeled via thin-shell approximation.",
@@ -672,29 +872,20 @@ class MultipoleGeometryThermal(BaseModel):
672
872
  default=False,
673
873
  description="There is a bug in the TSA naming scheme for block coils, this flag activates a simple (not clean) bug fix that will be replaced in a future version.",
674
874
  )
875
+ use_TSA_new: Optional[bool] = Field(
876
+ default=False,
877
+ description="It determines whether the regions between collar and coils are modeled via thin-shell approximation.",
878
+ )
675
879
 
676
- class MultipoleGeometryElectromagnetics(BaseModel):
880
+ class MultipoleGeometryElectromagnetics(MultipoleGeometry_parent):
677
881
  """
678
882
  Level 2: Class for FiQuS Multipole
679
883
  """
680
- create: bool = Field(
681
- default=True,
682
- description="It determines whether the electromagnetic geometry is built or not.",
683
- )
684
- with_iron_yoke: Optional[bool] = Field(
685
- default=True,
686
- description="It determines whether the iron yoke region is built or not.",
687
- )
688
- with_wedges: Optional[bool] = Field(
689
- default=True,
690
- description="It determines whether the wedge regions are built or not.",
691
- )
692
884
  symmetry: Optional[Literal["none", "xy", "x", "y"]] = Field(
693
885
  default='none',
694
886
  description="It determines the model regions to build according to the specified axis/axes.",
695
887
  )
696
888
 
697
-
698
889
  class MultipoleGeometry(BaseModel):
699
890
  """
700
891
  Level 2: Class for FiQuS Multipole
@@ -737,4 +928,4 @@ class Multipole(BaseModel):
737
928
  postproc: MultipolePostProc = Field(
738
929
  default=MultipolePostProc(),
739
930
  description="This dictionary contains the post-process information.",
740
- )
931
+ )