fiqus 2024.7.0__py3-none-any.whl → 2024.12.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.
Files changed (69) hide show
  1. fiqus/MainFiQuS.py +290 -134
  2. fiqus/data/DataConductor.py +301 -301
  3. fiqus/data/DataFiQuS.py +128 -84
  4. fiqus/data/DataFiQuSCCT.py +150 -150
  5. fiqus/data/DataFiQuSConductor.py +84 -84
  6. fiqus/data/DataFiQuSConductorAC_Strand.py +565 -565
  7. fiqus/data/DataFiQuSMultipole.py +716 -42
  8. fiqus/data/DataFiQuSPancake3D.py +737 -278
  9. fiqus/data/DataMultipole.py +180 -15
  10. fiqus/data/DataRoxieParser.py +90 -51
  11. fiqus/data/DataSettings.py +121 -0
  12. fiqus/data/DataWindingsCCT.py +37 -37
  13. fiqus/data/RegionsModelFiQuS.py +18 -6
  14. fiqus/geom_generators/GeometryCCT.py +905 -905
  15. fiqus/geom_generators/GeometryConductorAC_Strand.py +1391 -1391
  16. fiqus/geom_generators/GeometryMultipole.py +1827 -227
  17. fiqus/geom_generators/GeometryPancake3D.py +316 -117
  18. fiqus/geom_generators/GeometryPancake3DUtils.py +549 -0
  19. fiqus/getdp_runners/RunGetdpCCT.py +4 -4
  20. fiqus/getdp_runners/RunGetdpConductorAC_Strand.py +201 -201
  21. fiqus/getdp_runners/RunGetdpMultipole.py +115 -42
  22. fiqus/getdp_runners/RunGetdpPancake3D.py +28 -6
  23. fiqus/mains/MainCCT.py +2 -2
  24. fiqus/mains/MainConductorAC_Strand.py +132 -132
  25. fiqus/mains/MainMultipole.py +113 -62
  26. fiqus/mains/MainPancake3D.py +63 -23
  27. fiqus/mesh_generators/MeshCCT.py +209 -209
  28. fiqus/mesh_generators/MeshConductorAC_Strand.py +656 -656
  29. fiqus/mesh_generators/MeshMultipole.py +1243 -181
  30. fiqus/mesh_generators/MeshPancake3D.py +275 -192
  31. fiqus/parsers/ParserCOND.py +825 -0
  32. fiqus/parsers/ParserDAT.py +16 -16
  33. fiqus/parsers/ParserGetDPOnSection.py +212 -212
  34. fiqus/parsers/ParserGetDPTimeTable.py +134 -134
  35. fiqus/parsers/ParserMSH.py +53 -53
  36. fiqus/parsers/ParserPOS.py +214 -214
  37. fiqus/parsers/ParserRES.py +142 -142
  38. fiqus/plotters/PlotPythonCCT.py +133 -133
  39. fiqus/plotters/PlotPythonConductorAC.py +855 -855
  40. fiqus/plotters/PlotPythonMultipole.py +18 -18
  41. fiqus/post_processors/PostProcessCCT.py +440 -440
  42. fiqus/post_processors/PostProcessConductorAC.py +49 -49
  43. fiqus/post_processors/PostProcessMultipole.py +353 -229
  44. fiqus/post_processors/PostProcessPancake3D.py +8 -13
  45. fiqus/pre_processors/PreProcessCCT.py +175 -175
  46. fiqus/pro_assemblers/ProAssembler.py +14 -6
  47. fiqus/pro_material_functions/ironBHcurves.pro +246 -246
  48. fiqus/pro_templates/combined/CCT_template.pro +274 -274
  49. fiqus/pro_templates/combined/ConductorAC_template.pro +1025 -1025
  50. fiqus/pro_templates/combined/Multipole_template.pro +1694 -126
  51. fiqus/pro_templates/combined/Pancake3D_template.pro +2294 -1103
  52. fiqus/pro_templates/combined/TSA_materials.pro +162 -0
  53. fiqus/pro_templates/combined/materials.pro +36 -18
  54. fiqus/utils/Utils.py +508 -110
  55. fiqus/utils/update_data_settings.py +33 -0
  56. fiqus-2024.12.1.dist-info/METADATA +132 -0
  57. fiqus-2024.12.1.dist-info/RECORD +84 -0
  58. {fiqus-2024.7.0.dist-info → fiqus-2024.12.1.dist-info}/WHEEL +1 -1
  59. tests/test_FiQuS.py +1 -1
  60. tests/test_geometry_generators.py +101 -2
  61. tests/test_mesh_generators.py +154 -1
  62. tests/test_solvers.py +115 -21
  63. tests/utils/fiqus_test_classes.py +85 -21
  64. tests/utils/generate_reference_files_ConductorAC.py +57 -57
  65. tests/utils/generate_reference_files_Pancake3D.py +4 -5
  66. tests/utils/helpers.py +97 -97
  67. fiqus-2024.7.0.dist-info/METADATA +0 -103
  68. fiqus-2024.7.0.dist-info/RECORD +0 -79
  69. {fiqus-2024.7.0.dist-info → fiqus-2024.12.1.dist-info}/top_level.txt +0 -0
@@ -1,301 +1,301 @@
1
- from pydantic import BaseModel, Field
2
- from typing import Union, Literal, Optional
3
-
4
- # ------------------- Jc fits ---------------------------#
5
- class ConstantJc(BaseModel):
6
- """
7
- Level 3: Class for setting constant Jc
8
- """
9
-
10
- type: Literal["Constant Jc"]
11
- Jc_constant: Optional[float] = None # [A/m^2]
12
-
13
-
14
- class Ic_A_NbTi(BaseModel):
15
- """
16
- Level 3: Class for setting IcNbTi fit
17
- """
18
-
19
- type: Literal["Ic_A_NbTi"]
20
- Jc_5T_4_2K: Optional[float] = None # [A/m^2]
21
-
22
-
23
- class Bottura(BaseModel):
24
- """
25
- Level 3: Class for setting Bottura fit
26
- """
27
-
28
- type: Literal["Bottura"]
29
- Tc0_Bottura: Optional[float] = None # [K]
30
- Bc20_Bottura: Optional[float] = None # [T]
31
- Jc_ref_Bottura: Optional[float] = None # [A/m^2]
32
- C0_Bottura: Optional[float] = None # [-]
33
- alpha_Bottura: Optional[float] = None # [-]
34
- beta_Bottura: Optional[float] = None # [-]
35
- gamma_Bottura: Optional[float] = None # [-]
36
-
37
-
38
- class CUDI1(BaseModel):
39
- """
40
- Level 3: Class for Nb-Ti fit based on "Fit 1" in CUDI manual
41
- """
42
-
43
- type: Literal["CUDI1"]
44
- Tc0_CUDI1: Optional[float] = None # [K]
45
- Bc20_CUDI1: Optional[float] = None # [T]
46
- C1_CUDI1: Optional[float] = None # [A]
47
- C2_CUDI1: Optional[float] = None # [A/T]
48
-
49
-
50
- class CUDI3(BaseModel):
51
- """
52
- Level 3: Class for Nb-Ti fit based on "Fit 3" in CUDI manual
53
- """
54
-
55
- type: Literal["CUDI3"]
56
- Tc0_CUDI3: Optional[float] = None # [K]
57
- Bc20_CUDI3: Optional[float] = None # [T]
58
- c1_CUDI3: Optional[float] = None # [-]
59
- c2_CUDI3: Optional[float] = None # [-]
60
- c3_CUDI3: Optional[float] = None # [-]
61
- c4_CUDI3: Optional[float] = None # [-]
62
- c5_CUDI3: Optional[float] = None # [-]
63
- c6_CUDI3: Optional[float] = None # [-]
64
-
65
-
66
- class Summers(BaseModel):
67
- """
68
- Level 3: Class for cable Summer's Nb3Sn fit
69
- """
70
-
71
- type: Literal["Summers"]
72
- Tc0_Summers: Optional[float] = None # [K]
73
- Bc20_Summers: Optional[float] = None # [T]
74
- Jc0_Summers: Optional[float] = None # [A*T^0.5/m^2]
75
-
76
-
77
- class Bordini(BaseModel):
78
- """
79
- Level 3: Class for cable Bordini's Nb3Sn fit
80
- """
81
-
82
- type: Literal["Bordini"]
83
- Tc0_Bordini: Optional[float] = None # [K]
84
- Bc20_Bordini: Optional[float] = None # [T]
85
- C0_Bordini: Optional[float] = None # [A*T/m^2]
86
- alpha_Bordini: Optional[float] = None # [-]
87
-
88
-
89
- class BSCCO_2212_LBNL(BaseModel):
90
- """
91
- Level 3: Class for cable Bi-2212 fit developed in LBNL
92
- """
93
-
94
- # only ad-hoc fit [T. Shen, D. Davis, E. Ravaioli with LBNL, Berkeley, CA]
95
- type: Literal["BSCCO_2212_LBNL"]
96
- f_scaling_Jc_BSCCO2212: Optional[float] = None # [-] used for the ad-hoc fit
97
-
98
-
99
- # ------------------- Cable types ---------------------------#
100
- class Mono(BaseModel):
101
- """
102
- Mono cable type: This is basically type of cable consisting of one strand - not really a cable
103
- """
104
-
105
- type: Literal["Mono"]
106
- bare_cable_width: Optional[float] = None
107
- bare_cable_height_low: Optional[float] = None
108
- bare_cable_height_high: Optional[float] = None
109
- bare_cable_height_mean: Optional[float] = None
110
- th_insulation_along_width: Optional[float] = None
111
- th_insulation_along_height: Optional[float] = None
112
- # Fractions given with respect to the insulated conductor
113
- f_superconductor: Optional[float] = None
114
- f_stabilizer: Optional[float] = None # (related to CuFraction in ProteCCT)
115
- f_insulation: Optional[float] = None
116
- f_inner_voids: Optional[float] = None
117
- f_outer_voids: Optional[float] = None
118
- # Available materials depend on the component and on the selected program
119
- material_insulation: Optional[str] = None
120
- material_inner_voids: Optional[str] = None
121
- material_outer_voids: Optional[str] = None
122
-
123
-
124
- class Rutherford(BaseModel):
125
- """
126
- Rutherford cable type: for example LHC MB magnet cable
127
- """
128
-
129
- type: Literal["Rutherford"]
130
- n_strands: Optional[int] = None
131
- n_strand_layers: Optional[int] = None
132
- n_strands_per_layers: Optional[int] = None
133
- bare_cable_width: Optional[float] = None
134
- bare_cable_height_low: Optional[float] = None
135
- bare_cable_height_high: Optional[float] = None
136
- bare_cable_height_mean: Optional[float] = None
137
- th_insulation_along_width: Optional[float] = None
138
- th_insulation_along_height: Optional[float] = None
139
- width_core: Optional[float] = None
140
- height_core: Optional[float] = None
141
- strand_twist_pitch: Optional[float] = None
142
- strand_twist_pitch_angle: Optional[float] = None
143
- Rc: Optional[float] = None
144
- Ra: Optional[float] = None
145
- # Fractions given with respect to the insulated conductor
146
- f_superconductor: Optional[float] = None
147
- f_stabilizer: Optional[float] = None # (related to CuFraction in ProteCCT)
148
- f_insulation: Optional[float] = None
149
- f_inner_voids: Optional[float] = None
150
- f_outer_voids: Optional[float] = None
151
- f_core: Optional[float] = None
152
- # Available materials depend on the component and on the selected program
153
- material_insulation: Optional[str] = None
154
- material_inner_voids: Optional[str] = None
155
- material_outer_voids: Optional[str] = None
156
- material_core: Optional[str] = None
157
-
158
-
159
- class Ribbon(BaseModel):
160
- """
161
- Mono cable type: This is basically type of cable consisting of one strand - not really a cable
162
- """
163
-
164
- type: Literal["Ribbon"]
165
- n_strands: Optional[int] = (
166
- None # This defines the number of "strands" in the ribbon cable, which are physically glued but electrically in series
167
- )
168
- bare_cable_width: Optional[float] = None
169
- bare_cable_height_low: Optional[float] = None
170
- bare_cable_height_high: Optional[float] = None
171
- bare_cable_height_mean: Optional[float] = None
172
- th_insulation_along_width: Optional[float] = (
173
- None # This defines the thickness of the insulation around each strand (DIFFERENT FROM ROXIE CADATA FILE)
174
- )
175
- th_insulation_along_height: Optional[float] = (
176
- None # This defines the thickness of the insulation around each strand (DIFFERENT FROM ROXIE CADATA FILE)
177
- )
178
- # Fractions given with respect to the insulated conductor
179
- f_superconductor: Optional[float] = None
180
- f_stabilizer: Optional[float] = None # (related to CuFraction in ProteCCT)
181
- f_insulation: Optional[float] = None
182
- f_inner_voids: Optional[float] = None
183
- f_outer_voids: Optional[float] = None
184
- f_core: Optional[float] = None
185
- # Available materials depend on the component and on the selected program
186
- material_insulation: Optional[str] = None
187
- material_inner_voids: Optional[str] = None
188
- material_outer_voids: Optional[str] = None
189
- material_core: Optional[str] = None
190
-
191
-
192
- # ------------------- Conductors ---------------------------#
193
-
194
- # class MaterialSuperconductor(BaseModel):
195
- # """
196
- # Level 3: Class for strand superconductor material parameters
197
- # """
198
- # material: Optional[str] = Field(default=None, description="Material of the superconductor. E.g. NbTi, Nb3Sn, etc.")
199
- # n_value: Optional[float] = Field(default=None, description="n value of the superconductor (for power law fit).")
200
- # ec: Optional[float] = Field(default=None, description="Critical electric field of the superconductor.")
201
- # Cv_material: Optional[Union[str, float]] = Field(default=None, description="Material function for specific heat of the superconductor.")
202
-
203
- # class MaterialStabilizer(BaseModel):
204
- # """
205
- # Level 3: Class for strand stabilizer material parameters
206
- # """
207
-
208
- # rho_material: Optional[Union[str, float]] = Field(default=None, description="Material function for resistivity of the stabilizer. Constant resistivity can be given as float.")
209
- # RRR: Optional[float] = Field(default=None, description="Residual resistivity ratio of the stabilizer.")
210
- # T_ref_RRR_high: Optional[float] = Field(default=None, description="Upper reference temperature for RRR measurements.")
211
- # T_ref_RRR_low: Optional[float] = Field(default=None, description="Lower reference temperature for RRR measurements.")
212
- # k_material: Optional[Union[str, float]] = Field(default=None, description="Thermal conductivity of the stabilizer.")
213
- # Cv_material: Optional[Union[str, float]] = Field(default=None, description="Material function for specific heat of the stabilizer.")
214
-
215
-
216
- class Round(BaseModel):
217
- """
218
- Level 2: Class for strand parameters
219
- """
220
-
221
- type: Literal["Round"]
222
- fil_twist_pitch: Optional[float] = None # Strand twist pitch
223
- diameter: Optional[float] = None # ds_inGroup (LEDET), DConductor (BBQ), DStrand (ProteCCT)
224
- diameter_core: Optional[float] = None # dcore_inGroup (LEDET)
225
- diameter_filamentary: Optional[float] = None # dfilamentary_inGroup (LEDET)
226
- filament_diameter: Optional[float] = None # df_inGroup (LEDET)
227
- number_of_filaments: Optional[int] = None # nf_inGroup (LEDET)
228
- f_Rho_effective: Optional[float] = None
229
- Cu_noCu_in_strand: Optional[float] = None
230
-
231
- # -- Superconductor parameters -- #
232
- material_superconductor: Optional[str] = Field(default=None, description="Material of the superconductor. E.g. Nb-Ti, Nb3Sn, etc.")
233
- n_value_superconductor: Optional[float] = Field(default=None, description="n value of the superconductor (for power law fit).")
234
- ec_superconductor: Optional[float] = Field(default=None, description="Critical electric field of the superconductor.")
235
- k_material_superconductor: Optional[Union[str, float]] = Field(default=None, description="Thermal conductivity of the superconductor.")
236
- Cv_material_superconductor: Optional[Union[str, float]] = Field(default=None, description="Material function for specific heat of the superconductor.")
237
- # -- Stabilizer parameters -- #
238
- material_stabilizer: Optional[str] = Field(default=None, description="Material of the stabilizer.")
239
- rho_material_stabilizer: Optional[Union[str, float]] = Field(default=None, description="Material function for resistivity of the stabilizer. Constant resistivity can be given as float.")
240
- RRR: Optional[float] = Field(default=None, description="Residual resistivity ratio of the stabilizer.")
241
- T_ref_RRR_high: Optional[float] = Field(default=None, description="Upper reference temperature for RRR measurements.")
242
- T_ref_RRR_low: Optional[float] = Field(default=None, description="Lower reference temperature for RRR measurements.")
243
- k_material_stabilizer: Optional[Union[str, float]] = Field(default=None, description="Thermal conductivity of the stabilizer.")
244
- Cv_material_stabilizer: Optional[Union[str, float]] = Field(default=None, description="Material function for specific heat of the stabilizer.")
245
-
246
- # superconductor: MaterialSuperconductor = MaterialSuperconductor()
247
- # stabilizer: MaterialStabilizer = MaterialStabilizer()
248
-
249
-
250
- class Rectangular(BaseModel):
251
- """
252
- Level 2: Class for strand parameters
253
- """
254
-
255
- type: Literal["Rectangular"]
256
- bare_width: Optional[float] = None
257
- bare_height: Optional[float] = None
258
- Cu_noCu_in_strand: Optional[float] = None
259
- filament_diameter: Optional[float] = None # df_inGroup (LEDET)
260
- f_Rho_effective: Optional[float] = None
261
- fil_twist_pitch: Optional[float] = None
262
- bare_corner_radius: Optional[float] = None
263
-
264
- # -- Superconductor parameters -- #
265
- material_superconductor: Optional[str] = Field(default=None, description="Material of the superconductor. E.g. NbTi, Nb3Sn, etc.")
266
- n_value_superconductor: Optional[float] = Field(default=None, description="n value of the superconductor (for power law fit).")
267
- ec_superconductor: Optional[float] = Field(default=None, description="Critical electric field of the superconductor.")
268
- k_material_superconductor: Optional[Union[str, float]] = Field(default=None, description="Thermal conductivity of the superconductor.")
269
- Cv_material_superconductor: Optional[Union[str, float]] = Field(default=None, description="Material function for specific heat of the superconductor.")
270
- # -- Stabilizer parameters -- #
271
- material_stabilizer: Optional[str] = Field(default=None, description="Material of the stabilizer.")
272
- rho_material_stabilizer: Optional[Union[str, float]] = Field(default=None, description="Material function for resistivity of the stabilizer. Constant resistivity can be given as float.")
273
- RRR: Optional[float] = Field(default=None, description="Residual resistivity ratio of the stabilizer.")
274
- T_ref_RRR_high: Optional[float] = Field(default=None, description="Upper reference temperature for RRR measurements.")
275
- T_ref_RRR_low: Optional[float] = Field(default=None, description="Lower reference temperature for RRR measurements.")
276
- k_material_stabilizer: Optional[Union[str, float]] = Field(default=None, description="Thermal conductivity of the stabilizer.")
277
- Cv_material_stabilizer: Optional[Union[str, float]] = Field(default=None, description="Material function for specific heat of the stabilizer.")
278
-
279
- # superconductor: MaterialSuperconductor = MaterialSuperconductor()
280
- # stabilizer: MaterialStabilizer = MaterialStabilizer()
281
-
282
-
283
-
284
- # ------------------- Conductors ---------------------------#
285
-
286
-
287
- class Conductor(BaseModel):
288
- """
289
- Level 1: Class for conductor parameters
290
- """
291
-
292
- version: Optional[str] = None
293
- case: Optional[str] = None
294
- state: Optional[str] = None
295
- cable: Union[Rutherford, Mono, Ribbon] = {
296
- "type": "Rutherford"
297
- } # TODO: Busbar, Rope, Roebel, CORC, TSTC, CICC
298
- strand: Union[Round, Rectangular] = {"type": "Round"} # TODO: Tape, WIC
299
- Jc_fit: Union[ConstantJc, Bottura, CUDI1, CUDI3, Summers, Bordini, BSCCO_2212_LBNL, Ic_A_NbTi] = {
300
- "type": "CUDI1"
301
- } # TODO: CUDI other numbers? , Roxie?
1
+ from pydantic import BaseModel, Field
2
+ from typing import Union, Literal, Optional
3
+
4
+ # ------------------- Jc fits ---------------------------#
5
+ class ConstantJc(BaseModel):
6
+ """
7
+ Level 3: Class for setting constant Jc
8
+ """
9
+
10
+ type: Literal["Constant Jc"]
11
+ Jc_constant: Optional[float] = None # [A/m^2]
12
+
13
+
14
+ class Ic_A_NbTi(BaseModel):
15
+ """
16
+ Level 3: Class for setting IcNbTi fit
17
+ """
18
+
19
+ type: Literal["Ic_A_NbTi"]
20
+ Jc_5T_4_2K: Optional[float] = None # [A/m^2]
21
+
22
+
23
+ class Bottura(BaseModel):
24
+ """
25
+ Level 3: Class for setting Bottura fit
26
+ """
27
+
28
+ type: Literal["Bottura"]
29
+ Tc0_Bottura: Optional[float] = None # [K]
30
+ Bc20_Bottura: Optional[float] = None # [T]
31
+ Jc_ref_Bottura: Optional[float] = None # [A/m^2]
32
+ C0_Bottura: Optional[float] = None # [-]
33
+ alpha_Bottura: Optional[float] = None # [-]
34
+ beta_Bottura: Optional[float] = None # [-]
35
+ gamma_Bottura: Optional[float] = None # [-]
36
+
37
+
38
+ class CUDI1(BaseModel):
39
+ """
40
+ Level 3: Class for Nb-Ti fit based on "Fit 1" in CUDI manual
41
+ """
42
+
43
+ type: Literal["CUDI1"]
44
+ Tc0_CUDI1: Optional[float] = None # [K]
45
+ Bc20_CUDI1: Optional[float] = None # [T]
46
+ C1_CUDI1: Optional[float] = None # [A]
47
+ C2_CUDI1: Optional[float] = None # [A/T]
48
+
49
+
50
+ class CUDI3(BaseModel):
51
+ """
52
+ Level 3: Class for Nb-Ti fit based on "Fit 3" in CUDI manual
53
+ """
54
+
55
+ type: Literal["CUDI3"]
56
+ Tc0_CUDI3: Optional[float] = None # [K]
57
+ Bc20_CUDI3: Optional[float] = None # [T]
58
+ c1_CUDI3: Optional[float] = None # [-]
59
+ c2_CUDI3: Optional[float] = None # [-]
60
+ c3_CUDI3: Optional[float] = None # [-]
61
+ c4_CUDI3: Optional[float] = None # [-]
62
+ c5_CUDI3: Optional[float] = None # [-]
63
+ c6_CUDI3: Optional[float] = None # [-]
64
+
65
+
66
+ class Summers(BaseModel):
67
+ """
68
+ Level 3: Class for cable Summer's Nb3Sn fit
69
+ """
70
+
71
+ type: Literal["Summers"]
72
+ Tc0_Summers: Optional[float] = None # [K]
73
+ Bc20_Summers: Optional[float] = None # [T]
74
+ Jc0_Summers: Optional[float] = None # [A*T^0.5/m^2]
75
+
76
+
77
+ class Bordini(BaseModel):
78
+ """
79
+ Level 3: Class for cable Bordini's Nb3Sn fit
80
+ """
81
+
82
+ type: Literal["Bordini"]
83
+ Tc0_Bordini: Optional[float] = None # [K]
84
+ Bc20_Bordini: Optional[float] = None # [T]
85
+ C0_Bordini: Optional[float] = None # [A*T/m^2]
86
+ alpha_Bordini: Optional[float] = None # [-]
87
+
88
+
89
+ class BSCCO_2212_LBNL(BaseModel):
90
+ """
91
+ Level 3: Class for cable Bi-2212 fit developed in LBNL
92
+ """
93
+
94
+ # only ad-hoc fit [T. Shen, D. Davis, E. Ravaioli with LBNL, Berkeley, CA]
95
+ type: Literal["BSCCO_2212_LBNL"]
96
+ f_scaling_Jc_BSCCO2212: Optional[float] = None # [-] used for the ad-hoc fit
97
+
98
+
99
+ # ------------------- Cable types ---------------------------#
100
+ class Mono(BaseModel):
101
+ """
102
+ Mono cable type: This is basically type of cable consisting of one strand - not really a cable
103
+ """
104
+
105
+ type: Literal["Mono"]
106
+ bare_cable_width: Optional[float] = None
107
+ bare_cable_height_low: Optional[float] = None
108
+ bare_cable_height_high: Optional[float] = None
109
+ bare_cable_height_mean: Optional[float] = None
110
+ th_insulation_along_width: Optional[float] = None
111
+ th_insulation_along_height: Optional[float] = None
112
+ # Fractions given with respect to the insulated conductor
113
+ f_superconductor: Optional[float] = None
114
+ f_stabilizer: Optional[float] = None # (related to CuFraction in ProteCCT)
115
+ f_insulation: Optional[float] = None
116
+ f_inner_voids: Optional[float] = None
117
+ f_outer_voids: Optional[float] = None
118
+ # Available materials depend on the component and on the selected program
119
+ material_insulation: Optional[str] = None
120
+ material_inner_voids: Optional[str] = None
121
+ material_outer_voids: Optional[str] = None
122
+
123
+
124
+ class Rutherford(BaseModel):
125
+ """
126
+ Rutherford cable type: for example LHC MB magnet cable
127
+ """
128
+
129
+ type: Literal["Rutherford"]
130
+ n_strands: Optional[int] = None
131
+ n_strand_layers: Optional[int] = None
132
+ n_strands_per_layers: Optional[int] = None
133
+ bare_cable_width: Optional[float] = None
134
+ bare_cable_height_low: Optional[float] = None
135
+ bare_cable_height_high: Optional[float] = None
136
+ bare_cable_height_mean: Optional[float] = None
137
+ th_insulation_along_width: Optional[float] = None
138
+ th_insulation_along_height: Optional[float] = None
139
+ width_core: Optional[float] = None
140
+ height_core: Optional[float] = None
141
+ strand_twist_pitch: Optional[float] = None
142
+ strand_twist_pitch_angle: Optional[float] = None
143
+ Rc: Optional[float] = None
144
+ Ra: Optional[float] = None
145
+ # Fractions given with respect to the insulated conductor
146
+ f_superconductor: Optional[float] = None
147
+ f_stabilizer: Optional[float] = None # (related to CuFraction in ProteCCT)
148
+ f_insulation: Optional[float] = None
149
+ f_inner_voids: Optional[float] = None
150
+ f_outer_voids: Optional[float] = None
151
+ f_core: Optional[float] = None
152
+ # Available materials depend on the component and on the selected program
153
+ material_insulation: Optional[str] = None
154
+ material_inner_voids: Optional[str] = None
155
+ material_outer_voids: Optional[str] = None
156
+ material_core: Optional[str] = None
157
+
158
+
159
+ class Ribbon(BaseModel):
160
+ """
161
+ Mono cable type: This is basically type of cable consisting of one strand - not really a cable
162
+ """
163
+
164
+ type: Literal["Ribbon"]
165
+ n_strands: Optional[int] = (
166
+ None # This defines the number of "strands" in the ribbon cable, which are physically glued but electrically in series
167
+ )
168
+ bare_cable_width: Optional[float] = None
169
+ bare_cable_height_low: Optional[float] = None
170
+ bare_cable_height_high: Optional[float] = None
171
+ bare_cable_height_mean: Optional[float] = None
172
+ th_insulation_along_width: Optional[float] = (
173
+ None # This defines the thickness of the insulation around each strand (DIFFERENT FROM ROXIE CADATA FILE)
174
+ )
175
+ th_insulation_along_height: Optional[float] = (
176
+ None # This defines the thickness of the insulation around each strand (DIFFERENT FROM ROXIE CADATA FILE)
177
+ )
178
+ # Fractions given with respect to the insulated conductor
179
+ f_superconductor: Optional[float] = None
180
+ f_stabilizer: Optional[float] = None # (related to CuFraction in ProteCCT)
181
+ f_insulation: Optional[float] = None
182
+ f_inner_voids: Optional[float] = None
183
+ f_outer_voids: Optional[float] = None
184
+ f_core: Optional[float] = None
185
+ # Available materials depend on the component and on the selected program
186
+ material_insulation: Optional[str] = None
187
+ material_inner_voids: Optional[str] = None
188
+ material_outer_voids: Optional[str] = None
189
+ material_core: Optional[str] = None
190
+
191
+
192
+ # ------------------- Conductors ---------------------------#
193
+
194
+ # class MaterialSuperconductor(BaseModel):
195
+ # """
196
+ # Level 3: Class for strand superconductor material parameters
197
+ # """
198
+ # material: Optional[str] = Field(default=None, description="Material of the superconductor. E.g. NbTi, Nb3Sn, etc.")
199
+ # n_value: Optional[float] = Field(default=None, description="n value of the superconductor (for power law fit).")
200
+ # ec: Optional[float] = Field(default=None, description="Critical electric field of the superconductor.")
201
+ # Cv_material: Optional[Union[str, float]] = Field(default=None, description="Material function for specific heat of the superconductor.")
202
+
203
+ # class MaterialStabilizer(BaseModel):
204
+ # """
205
+ # Level 3: Class for strand stabilizer material parameters
206
+ # """
207
+
208
+ # rho_material: Optional[Union[str, float]] = Field(default=None, description="Material function for resistivity of the stabilizer. Constant resistivity can be given as float.")
209
+ # RRR: Optional[float] = Field(default=None, description="Residual resistivity ratio of the stabilizer.")
210
+ # T_ref_RRR_high: Optional[float] = Field(default=None, description="Upper reference temperature for RRR measurements.")
211
+ # T_ref_RRR_low: Optional[float] = Field(default=None, description="Lower reference temperature for RRR measurements.")
212
+ # k_material: Optional[Union[str, float]] = Field(default=None, description="Thermal conductivity of the stabilizer.")
213
+ # Cv_material: Optional[Union[str, float]] = Field(default=None, description="Material function for specific heat of the stabilizer.")
214
+
215
+
216
+ class Round(BaseModel):
217
+ """
218
+ Level 2: Class for strand parameters
219
+ """
220
+
221
+ type: Literal["Round"]
222
+ fil_twist_pitch: Optional[float] = None # Strand twist pitch
223
+ diameter: Optional[float] = None # ds_inGroup (LEDET), DConductor (BBQ), DStrand (ProteCCT)
224
+ diameter_core: Optional[float] = None # dcore_inGroup (LEDET)
225
+ diameter_filamentary: Optional[float] = None # dfilamentary_inGroup (LEDET)
226
+ filament_diameter: Optional[float] = None # df_inGroup (LEDET)
227
+ number_of_filaments: Optional[int] = None # nf_inGroup (LEDET)
228
+ f_Rho_effective: Optional[float] = None
229
+ Cu_noCu_in_strand: Optional[float] = None
230
+
231
+ # -- Superconductor parameters -- #
232
+ material_superconductor: Optional[str] = Field(default=None, description="Material of the superconductor. E.g. Nb-Ti, Nb3Sn, etc.")
233
+ n_value_superconductor: Optional[float] = Field(default=None, description="n value of the superconductor (for power law fit).")
234
+ ec_superconductor: Optional[float] = Field(default=None, description="Critical electric field of the superconductor.")
235
+ k_material_superconductor: Optional[Union[str, float]] = Field(default=None, description="Thermal conductivity of the superconductor.")
236
+ Cv_material_superconductor: Optional[Union[str, float]] = Field(default=None, description="Material function for specific heat of the superconductor.")
237
+ # -- Stabilizer parameters -- #
238
+ material_stabilizer: Optional[str] = Field(default=None, description="Material of the stabilizer.")
239
+ rho_material_stabilizer: Optional[Union[str, float]] = Field(default=None, description="Material function for resistivity of the stabilizer. Constant resistivity can be given as float.")
240
+ RRR: Optional[float] = Field(default=None, description="Residual resistivity ratio of the stabilizer.")
241
+ T_ref_RRR_high: Optional[float] = Field(default=None, description="Upper reference temperature for RRR measurements.")
242
+ T_ref_RRR_low: Optional[float] = Field(default=None, description="Lower reference temperature for RRR measurements.")
243
+ k_material_stabilizer: Optional[Union[str, float]] = Field(default=None, description="Thermal conductivity of the stabilizer.")
244
+ Cv_material_stabilizer: Optional[Union[str, float]] = Field(default=None, description="Material function for specific heat of the stabilizer.")
245
+
246
+ # superconductor: MaterialSuperconductor = MaterialSuperconductor()
247
+ # stabilizer: MaterialStabilizer = MaterialStabilizer()
248
+
249
+
250
+ class Rectangular(BaseModel):
251
+ """
252
+ Level 2: Class for strand parameters
253
+ """
254
+
255
+ type: Literal["Rectangular"]
256
+ bare_width: Optional[float] = None
257
+ bare_height: Optional[float] = None
258
+ Cu_noCu_in_strand: Optional[float] = None
259
+ filament_diameter: Optional[float] = None # df_inGroup (LEDET)
260
+ f_Rho_effective: Optional[float] = None
261
+ fil_twist_pitch: Optional[float] = None
262
+ bare_corner_radius: Optional[float] = None
263
+
264
+ # -- Superconductor parameters -- #
265
+ material_superconductor: Optional[str] = Field(default=None, description="Material of the superconductor. E.g. NbTi, Nb3Sn, etc.")
266
+ n_value_superconductor: Optional[float] = Field(default=None, description="n value of the superconductor (for power law fit).")
267
+ ec_superconductor: Optional[float] = Field(default=None, description="Critical electric field of the superconductor.")
268
+ k_material_superconductor: Optional[Union[str, float]] = Field(default=None, description="Thermal conductivity of the superconductor.")
269
+ Cv_material_superconductor: Optional[Union[str, float]] = Field(default=None, description="Material function for specific heat of the superconductor.")
270
+ # -- Stabilizer parameters -- #
271
+ material_stabilizer: Optional[str] = Field(default=None, description="Material of the stabilizer.")
272
+ rho_material_stabilizer: Optional[Union[str, float]] = Field(default=None, description="Material function for resistivity of the stabilizer. Constant resistivity can be given as float.")
273
+ RRR: Optional[float] = Field(default=None, description="Residual resistivity ratio of the stabilizer.")
274
+ T_ref_RRR_high: Optional[float] = Field(default=None, description="Upper reference temperature for RRR measurements.")
275
+ T_ref_RRR_low: Optional[float] = Field(default=None, description="Lower reference temperature for RRR measurements.")
276
+ k_material_stabilizer: Optional[Union[str, float]] = Field(default=None, description="Thermal conductivity of the stabilizer.")
277
+ Cv_material_stabilizer: Optional[Union[str, float]] = Field(default=None, description="Material function for specific heat of the stabilizer.")
278
+
279
+ # superconductor: MaterialSuperconductor = MaterialSuperconductor()
280
+ # stabilizer: MaterialStabilizer = MaterialStabilizer()
281
+
282
+
283
+
284
+ # ------------------- Conductors ---------------------------#
285
+
286
+
287
+ class Conductor(BaseModel):
288
+ """
289
+ Level 1: Class for conductor parameters
290
+ """
291
+
292
+ version: Optional[str] = None
293
+ case: Optional[str] = None
294
+ state: Optional[str] = None
295
+ cable: Union[Rutherford, Mono, Ribbon] = {
296
+ "type": "Rutherford"
297
+ } # TODO: Busbar, Rope, Roebel, CORC, TSTC, CICC
298
+ strand: Union[Round, Rectangular] = {"type": "Round"} # TODO: Tape, WIC
299
+ Jc_fit: Union[ConstantJc, Bottura, CUDI1, CUDI3, Summers, Bordini, BSCCO_2212_LBNL, Ic_A_NbTi] = {
300
+ "type": "CUDI1"
301
+ } # TODO: CUDI other numbers? , Roxie?