fiqus 2025.2.0__py3-none-any.whl → 2025.11.0__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 +24 -28
- fiqus/data/DataConductor.py +350 -301
- fiqus/data/DataFiQuS.py +42 -115
- fiqus/data/DataFiQuSCCT.py +150 -150
- fiqus/data/DataFiQuSConductor.py +97 -84
- fiqus/data/DataFiQuSConductorAC_Strand.py +701 -565
- fiqus/data/DataModelCommon.py +439 -0
- fiqus/data/DataMultipole.py +0 -13
- fiqus/data/DataRoxieParser.py +7 -0
- fiqus/data/DataWindingsCCT.py +37 -37
- fiqus/data/RegionsModelFiQuS.py +61 -104
- fiqus/geom_generators/GeometryCCT.py +904 -905
- fiqus/geom_generators/GeometryConductorAC_Strand.py +1863 -1391
- fiqus/geom_generators/GeometryMultipole.py +5 -4
- fiqus/geom_generators/GeometryPancake3D.py +1 -1
- fiqus/getdp_runners/RunGetdpCCT.py +13 -4
- fiqus/getdp_runners/RunGetdpConductorAC_Strand.py +341 -201
- fiqus/getdp_runners/RunGetdpPancake3D.py +2 -2
- fiqus/mains/MainConductorAC_Strand.py +141 -133
- fiqus/mains/MainMultipole.py +6 -5
- fiqus/mains/MainPancake3D.py +3 -4
- fiqus/mesh_generators/MeshCCT.py +209 -209
- fiqus/mesh_generators/MeshConductorAC_Strand.py +709 -656
- fiqus/mesh_generators/MeshMultipole.py +43 -46
- 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/ParserPOS.py +214 -214
- fiqus/parsers/ParserRES.py +142 -142
- fiqus/plotters/PlotPythonCCT.py +133 -133
- fiqus/plotters/PlotPythonConductorAC.py +1079 -855
- fiqus/plotters/PlotPythonMultipole.py +18 -18
- fiqus/post_processors/PostProcessCCT.py +444 -440
- fiqus/post_processors/PostProcessConductorAC.py +997 -49
- fiqus/post_processors/PostProcessMultipole.py +19 -19
- fiqus/pre_processors/PreProcessCCT.py +175 -175
- fiqus/pro_material_functions/ironBHcurves.pro +246 -246
- fiqus/pro_templates/combined/CCT_template.pro +275 -274
- fiqus/pro_templates/combined/ConductorAC_template.pro +1474 -1025
- fiqus/pro_templates/combined/Multipole_template.pro +5 -5
- fiqus/utils/Utils.py +12 -7
- {fiqus-2025.2.0.dist-info → fiqus-2025.11.0.dist-info}/METADATA +65 -63
- fiqus-2025.11.0.dist-info/RECORD +86 -0
- {fiqus-2025.2.0.dist-info → fiqus-2025.11.0.dist-info}/WHEEL +1 -1
- tests/test_geometry_generators.py +4 -0
- tests/test_mesh_generators.py +5 -0
- tests/test_solvers.py +41 -4
- tests/utils/fiqus_test_classes.py +15 -6
- tests/utils/generate_reference_files_ConductorAC.py +57 -57
- tests/utils/helpers.py +97 -97
- fiqus-2025.2.0.dist-info/RECORD +0 -85
- {fiqus-2025.2.0.dist-info → fiqus-2025.11.0.dist-info}/LICENSE.txt +0 -0
- {fiqus-2025.2.0.dist-info → fiqus-2025.11.0.dist-info}/top_level.txt +0 -0
fiqus/data/DataFiQuS.py
CHANGED
|
@@ -1,20 +1,14 @@
|
|
|
1
1
|
from pydantic import BaseModel, Field
|
|
2
|
-
from typing import Dict, List, Union, Literal, Optional
|
|
3
|
-
|
|
4
|
-
from fiqus.data.
|
|
2
|
+
from typing import Dict, List, Union, Literal, Optional, Any
|
|
3
|
+
|
|
4
|
+
from fiqus.data.DataModelCommon import EnergyExtraction, CLIQ_Class, ESC_Class, E_CLIQ_Class, QuenchDetection, Circuit_Class, PowerSupplyClass, QuenchHeater
|
|
5
|
+
from fiqus.data.DataConductor import Conductor
|
|
6
|
+
from fiqus.data.DataFiQuSCCT import CCT
|
|
5
7
|
from fiqus.data.DataFiQuSMultipole import Multipole
|
|
6
8
|
from fiqus.data.DataFiQuSPancake3D import Pancake3D
|
|
7
|
-
from fiqus.data.DataConductor import Conductor
|
|
8
9
|
from fiqus.data.DataFiQuSConductorAC_Strand import CACStrand
|
|
9
10
|
|
|
10
11
|
|
|
11
|
-
class FiQuSGeometry(BaseModel):
|
|
12
|
-
"""
|
|
13
|
-
Class for Roxie data
|
|
14
|
-
"""
|
|
15
|
-
|
|
16
|
-
Roxie_Data: RoxieData = RoxieData()
|
|
17
|
-
|
|
18
12
|
|
|
19
13
|
class RunFiQuS(BaseModel):
|
|
20
14
|
"""
|
|
@@ -35,6 +29,8 @@ class RunFiQuS(BaseModel):
|
|
|
35
29
|
"post_process",
|
|
36
30
|
"plot_python",
|
|
37
31
|
"batch_post_process_python",
|
|
32
|
+
"only_create_pro_file_from_mesh",
|
|
33
|
+
"postprocess_veusz"
|
|
38
34
|
] = Field(
|
|
39
35
|
default="start_from_yaml",
|
|
40
36
|
title="Run Type of FiQuS",
|
|
@@ -95,88 +91,30 @@ class GeneralFiQuS(BaseModel):
|
|
|
95
91
|
magnet_name: Optional[str] = None
|
|
96
92
|
|
|
97
93
|
|
|
98
|
-
class
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
94
|
+
# class QuenchHeaters(BaseModel):
|
|
95
|
+
# """
|
|
96
|
+
# Level 3: Class for FiQuS
|
|
97
|
+
# """
|
|
102
98
|
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
99
|
+
# N_strips: Optional[int] = None # set to 0 to avoid building quench heater thin shells
|
|
100
|
+
# t_trigger: Optional[List[float]] = None
|
|
101
|
+
# U0: Optional[List[float]] = None
|
|
102
|
+
# C: Optional[List[float]] = None
|
|
103
|
+
# R_warm: Optional[List[float]] = None
|
|
104
|
+
# w: Optional[List[float]] = None
|
|
105
|
+
# h: Optional[List[float]] = None
|
|
106
|
+
# h_ins: List[List[float]] = []
|
|
107
|
+
# type_ins: List[List[str]] = []
|
|
108
|
+
# h_ground_ins: List[List[float]] = []
|
|
109
|
+
# type_ground_ins: List[List[str]] = []
|
|
110
|
+
# l: Optional[List[float]] = None
|
|
111
|
+
# l_copper: Optional[List[float]] = None
|
|
112
|
+
# l_stainless_steel: Optional[List[float]] = None
|
|
113
|
+
# ids: Optional[List[int]] = None
|
|
114
|
+
# turns: Optional[List[int]] = None
|
|
115
|
+
# turns_sides: Optional[List[str]] = None
|
|
108
116
|
|
|
109
117
|
|
|
110
|
-
class QuenchHeaters(BaseModel):
|
|
111
|
-
"""
|
|
112
|
-
Level 3: Class for FiQuS
|
|
113
|
-
"""
|
|
114
|
-
|
|
115
|
-
N_strips: Optional[int] = None # set to 0 to avoid building quench heater thin shells
|
|
116
|
-
t_trigger: Optional[List[float]] = None
|
|
117
|
-
U0: Optional[List[float]] = None
|
|
118
|
-
C: Optional[List[float]] = None
|
|
119
|
-
R_warm: Optional[List[float]] = None
|
|
120
|
-
w: Optional[List[float]] = None
|
|
121
|
-
h: Optional[List[float]] = None
|
|
122
|
-
h_ins: List[List[float]] = []
|
|
123
|
-
type_ins: List[List[str]] = []
|
|
124
|
-
h_ground_ins: List[List[float]] = []
|
|
125
|
-
type_ground_ins: List[List[str]] = []
|
|
126
|
-
l: Optional[List[float]] = None
|
|
127
|
-
l_copper: Optional[List[float]] = None
|
|
128
|
-
l_stainless_steel: Optional[List[float]] = None
|
|
129
|
-
ids: Optional[List[int]] = None
|
|
130
|
-
turns: Optional[List[int]] = None
|
|
131
|
-
turns_sides: Optional[List[str]] = None
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
class Cliq(BaseModel):
|
|
135
|
-
"""
|
|
136
|
-
Level 3: Class for FiQuS
|
|
137
|
-
"""
|
|
138
|
-
|
|
139
|
-
t_trigger: Optional[float] = None
|
|
140
|
-
current_direction: Optional[List[int]] = None
|
|
141
|
-
sym_factor: Optional[int] = None
|
|
142
|
-
N_units: Optional[int] = None
|
|
143
|
-
U0: Optional[float] = None
|
|
144
|
-
C: Optional[float] = None
|
|
145
|
-
R: Optional[float] = None
|
|
146
|
-
L: Optional[float] = None
|
|
147
|
-
I0: Optional[float] = None
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
class Circuit(BaseModel):
|
|
151
|
-
"""
|
|
152
|
-
Level 2: Class for FiQuS
|
|
153
|
-
"""
|
|
154
|
-
|
|
155
|
-
R_circuit: Optional[float] = None
|
|
156
|
-
L_circuit: Optional[float] = None
|
|
157
|
-
R_parallel: Optional[float] = None
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
class PowerSupply(BaseModel):
|
|
161
|
-
"""
|
|
162
|
-
Level 2: Class for FiQuS
|
|
163
|
-
"""
|
|
164
|
-
|
|
165
|
-
I_initial: Optional[float] = None
|
|
166
|
-
t_off: Optional[float] = None
|
|
167
|
-
t_control_LUT: Optional[List[float]] = Field(
|
|
168
|
-
default=None,
|
|
169
|
-
title="Time Values for Current Source",
|
|
170
|
-
description="This list of time values will be matched with the current values in I_control_LUT, and then these (t, I) points will be connected with straight lines.",
|
|
171
|
-
)
|
|
172
|
-
I_control_LUT: Optional[List[float]] = Field(
|
|
173
|
-
default=None,
|
|
174
|
-
title="Current Values for Current Source",
|
|
175
|
-
description="This list of current values will be matched with the time values in t_control_LUT, and then these (t, I) points will be connected with straight lines.",
|
|
176
|
-
)
|
|
177
|
-
R_crowbar: Optional[float] = None
|
|
178
|
-
Ud_crowbar: Optional[float] = None
|
|
179
|
-
|
|
180
118
|
|
|
181
119
|
class QuenchProtection(BaseModel):
|
|
182
120
|
"""
|
|
@@ -184,31 +122,20 @@ class QuenchProtection(BaseModel):
|
|
|
184
122
|
"""
|
|
185
123
|
|
|
186
124
|
energy_extraction: EnergyExtraction = EnergyExtraction()
|
|
187
|
-
quench_heaters:
|
|
188
|
-
cliq:
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
"""
|
|
192
|
-
Level 2: Class for FiQuS
|
|
193
|
-
"""
|
|
125
|
+
quench_heaters: QuenchHeater = QuenchHeater()
|
|
126
|
+
cliq: CLIQ_Class = CLIQ_Class()
|
|
127
|
+
esc: ESC_Class = ESC_Class()
|
|
128
|
+
e_cliq: E_CLIQ_Class = E_CLIQ_Class()
|
|
194
129
|
|
|
195
|
-
voltage_thresholds: Optional[List[float]] = Field(
|
|
196
|
-
default=None,
|
|
197
|
-
title="List of quench detection voltage thresholds",
|
|
198
|
-
description="Voltage thresholds for quench detection. The quench detection will be triggered when the voltage exceeds these thresholds continuously for a time larger than the discrimination time.",
|
|
199
|
-
)
|
|
200
130
|
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
)
|
|
131
|
+
class SolveDumpDataModel(BaseModel):
|
|
132
|
+
solve: Any # this is populated with magnet.solve section in MainFiQuS when dumping the yaml file for reference. The is no information on type in the solve section, so going for "Any" here
|
|
133
|
+
circuit: Circuit_Class = Circuit_Class()
|
|
134
|
+
power_supply: PowerSupplyClass = PowerSupplyClass()
|
|
135
|
+
quench_protection: QuenchProtection = QuenchProtection()
|
|
136
|
+
quench_detection: QuenchDetection = QuenchDetection()
|
|
137
|
+
conductors: Dict[Optional[str], Conductor] = {}
|
|
206
138
|
|
|
207
|
-
voltage_tap_pairs: Optional[List[List[int]]] = Field(
|
|
208
|
-
default=None,
|
|
209
|
-
title="List of quench detection voltage tap pairs",
|
|
210
|
-
description="Voltage tap pairs for quench detection. The voltage difference between these pairs will be used for quench detection.",
|
|
211
|
-
)
|
|
212
139
|
|
|
213
140
|
class FDM(BaseModel):
|
|
214
141
|
"""
|
|
@@ -217,11 +144,11 @@ class FDM(BaseModel):
|
|
|
217
144
|
|
|
218
145
|
general: GeneralFiQuS = GeneralFiQuS()
|
|
219
146
|
run: RunFiQuS = RunFiQuS()
|
|
220
|
-
magnet: Union[Multipole,
|
|
147
|
+
magnet: Union[Multipole, CCT, Pancake3D, CACStrand] = Field(
|
|
221
148
|
default=Multipole(), discriminator="type"
|
|
222
149
|
)
|
|
223
|
-
circuit:
|
|
224
|
-
power_supply:
|
|
150
|
+
circuit: Circuit_Class = Circuit_Class()
|
|
151
|
+
power_supply: PowerSupplyClass = PowerSupplyClass()
|
|
225
152
|
quench_protection: QuenchProtection = QuenchProtection()
|
|
226
153
|
quench_detection: QuenchDetection = QuenchDetection()
|
|
227
154
|
conductors: Dict[Optional[str], Conductor] = {}
|
fiqus/data/DataFiQuSCCT.py
CHANGED
|
@@ -1,150 +1,150 @@
|
|
|
1
|
-
from pydantic import BaseModel
|
|
2
|
-
from typing import (List, Literal, Optional)
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
class Winding_gFiQuS(BaseModel): # Geometry related windings _inputs
|
|
6
|
-
"""
|
|
7
|
-
Level 2: Class for FiQuS CCT
|
|
8
|
-
"""
|
|
9
|
-
names: Optional[List[str]] = None # name to use in gmsh and getdp
|
|
10
|
-
r_wms: Optional[List[float]] = None # radius of the middle of the winding
|
|
11
|
-
n_turnss: Optional[List[float]] = None # number of turns
|
|
12
|
-
ndpts: Optional[List[int]] = None # number of divisions of turn, i.e. number of hexagonal elements for each turn
|
|
13
|
-
ndpt_ins: Optional[List[int]] = None # number of divisions of terminals in
|
|
14
|
-
ndpt_outs: Optional[List[int]] = None # number of divisions of terminals in
|
|
15
|
-
lps: Optional[List[float]] = None # layer pitch
|
|
16
|
-
alphas: Optional[List[float]] = None # tilt angle
|
|
17
|
-
wwws: Optional[List[float]] = None # winding wire widths (assuming rectangular)
|
|
18
|
-
wwhs: Optional[List[float]] = None # winding wire heights (assuming rectangular)
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
class Winding_s(BaseModel): # Solution time used windings _inputs (materials and BC)
|
|
22
|
-
"""
|
|
23
|
-
Level 2: Class for FiQuS CCT
|
|
24
|
-
"""
|
|
25
|
-
currents: Optional[List[float]] = None # current in the wire
|
|
26
|
-
sigmas: Optional[List[float]] = None # electrical conductivity
|
|
27
|
-
mu_rs: Optional[List[float]] = None # relative permeability
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
class FQPL_g(BaseModel): # Geometry related fqpls _inputs
|
|
31
|
-
"""
|
|
32
|
-
Level 2: Class for FiQuS CCT
|
|
33
|
-
"""
|
|
34
|
-
names: List[str] = [] # name to use in gmsh and getdp
|
|
35
|
-
fndpls: Optional[List[int]] = None # fqpl number of divisions per length
|
|
36
|
-
fwws: Optional[List[float]] = None # fqpl wire widths (assuming rectangular) for theta = 0 this is x dimension
|
|
37
|
-
fwhs: Optional[List[float]] = None # fqpl wire heights (assuming rectangular) for theta = 0 this is y dimension
|
|
38
|
-
r_ins: Optional[List[float]] = None # radiuses for inner diameter for fqpl (radial (or x direction for theta=0) for placing the fqpl
|
|
39
|
-
r_bs: Optional[List[float]] = None # radiuses for bending the fqpl by 180 degrees
|
|
40
|
-
n_sbs: Optional[List[int]] = None # number of 'bending segmetns' for the 180 degrees turn
|
|
41
|
-
thetas: Optional[List[float]] = None # rotation in deg from x+ axis towards y+ axis about z axis.
|
|
42
|
-
z_starts: Optional[List[str]] = None # which air boundary to start at. These is string with either: z_min or z_max key from the Air region.
|
|
43
|
-
z_ends: Optional[List[float]] = None # z coordinate of loop end
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
class FQPL_s(BaseModel): # Solution time used fqpls _inputs (materials and BC)
|
|
47
|
-
"""
|
|
48
|
-
Level 2: Class for FiQuS CCT
|
|
49
|
-
"""
|
|
50
|
-
currents: List[float] = [] # current in the wire
|
|
51
|
-
sigmas: List[float] = [] # electrical conductivity
|
|
52
|
-
mu_rs: List[float] = [] # relative permeability
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
class Former_gFiQuS(BaseModel): # Geometry related formers _inputs
|
|
56
|
-
"""
|
|
57
|
-
Level 2: Class for FiQuS CCT
|
|
58
|
-
"""
|
|
59
|
-
names: Optional[List[str]] = None # name to use in gmsh and getdp
|
|
60
|
-
r_ins: Optional[List[float]] = None # inner radius
|
|
61
|
-
r_outs: Optional[List[float]] = None # outer radius
|
|
62
|
-
z_mins: Optional[List[float]] = None # extend of former in negative z direction
|
|
63
|
-
z_maxs: Optional[List[float]] = None # extend of former in positive z direction
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
class Former_s(BaseModel): # Solution time used formers _inputs (materials and BC)
|
|
67
|
-
"""
|
|
68
|
-
Level 2: Class for FiQuS CCT
|
|
69
|
-
"""
|
|
70
|
-
sigmas: Optional[List[float]] = None # electrical conductivity
|
|
71
|
-
mu_rs: Optional[List[float]] = None # relative permeability
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
class Air_g(BaseModel): # Geometry related air_region _inputs
|
|
75
|
-
"""
|
|
76
|
-
Level 2: Class for FiQuS CCT
|
|
77
|
-
"""
|
|
78
|
-
name: Optional[str] = None # name to use in gmsh and getdp
|
|
79
|
-
sh_type: Optional[str] = None # cylinder or cuboid are possible
|
|
80
|
-
ar: Optional[float] = None # if box type is cuboid a is taken as a dimension, if cylinder then r is taken
|
|
81
|
-
z_min: Optional[float] = None # extend of air region in negative z direction
|
|
82
|
-
z_max: Optional[float] = None # extend of air region in positive z direction
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
class Air_s(BaseModel): # Solution time used air _inputs (materials and BC)
|
|
86
|
-
"""
|
|
87
|
-
Level 2: Class for FiQuS CCT
|
|
88
|
-
"""
|
|
89
|
-
sigma: Optional[float] = None # electrical conductivity
|
|
90
|
-
mu_r: Optional[float] = None # relative permeability
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
class GeometryCCTFiQuS(BaseModel):
|
|
94
|
-
"""
|
|
95
|
-
Level 2: Class for FiQuS CCT for FiQuS input
|
|
96
|
-
"""
|
|
97
|
-
windings: Winding_gFiQuS = Winding_gFiQuS()
|
|
98
|
-
fqpls: FQPL_g = FQPL_g()
|
|
99
|
-
formers: Former_gFiQuS = Former_gFiQuS()
|
|
100
|
-
air: Air_g = Air_g()
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
class MeshCCT(BaseModel):
|
|
104
|
-
"""
|
|
105
|
-
Level 2: Class for FiQuS CCT
|
|
106
|
-
"""
|
|
107
|
-
MaxAspectWindings: Optional[float] = None # used in transfinite mesh_generators settings to define mesh_generators size along two longer lines of hex elements of windings
|
|
108
|
-
ThresholdSizeMin: Optional[float] = None # sets field control of Threshold SizeMin
|
|
109
|
-
ThresholdSizeMax: Optional[float] = None # sets field control of Threshold SizeMax
|
|
110
|
-
ThresholdDistMin: Optional[float] = None # sets field control of Threshold DistMin
|
|
111
|
-
ThresholdDistMax: Optional[float] = None # sets field control of Threshold DistMax
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
class SolveCCT(BaseModel):
|
|
115
|
-
"""
|
|
116
|
-
Level 2: Class for FiQuS CCT
|
|
117
|
-
"""
|
|
118
|
-
windings: Winding_s = Winding_s() # windings solution time _inputs
|
|
119
|
-
fqpls: FQPL_s = FQPL_s() # fqpls solution time _inputs
|
|
120
|
-
formers: Former_s = Former_s() # former solution time _inputs
|
|
121
|
-
air: Air_s = Air_s() # air solution time _inputs
|
|
122
|
-
pro_template: Optional[str] = None # file name of .pro template file
|
|
123
|
-
variables: Optional[List[str]] = None # Name of variable to post-process by GetDP, like B for magnetic flux density
|
|
124
|
-
volumes: Optional[List[str]] = None # Name of volume to post-process by GetDP, line Winding_1
|
|
125
|
-
file_exts: Optional[List[str]] = None # Name of file extensions to post-process by GetDP, like .pos
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
class PostprocCCTFiQuS(BaseModel):
|
|
129
|
-
"""
|
|
130
|
-
Class for FiQuS CCT input file
|
|
131
|
-
"""
|
|
132
|
-
windings_wwns: Optional[List[int]] = None # wires in width direction numbers
|
|
133
|
-
windings_whns: Optional[List[int]] = None # wires in height direction numbers
|
|
134
|
-
additional_outputs: Optional[List[str]] = None # Name of software specific input files to prepare, like :LEDET3D
|
|
135
|
-
winding_order: Optional[List[int]] = None
|
|
136
|
-
fqpl_export_trim_tol: Optional[List[float]] = None # this multiplier times winding extend gives 'z' coordinate above(below) which hexes are exported for LEDET, length of this list must match number of fqpls
|
|
137
|
-
variables: Optional[List[str]] = None # Name of variable to post-process by python Gmsh API, like B for magnetic flux density
|
|
138
|
-
volumes: Optional[List[str]] = None # Name of volume to post-process by python Gmsh API, line Winding_1
|
|
139
|
-
file_exts: Optional[List[str]] = None # Name of file extensions o post-process by python Gmsh API, like .pos
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
class
|
|
143
|
-
"""
|
|
144
|
-
Level 1: Class for FiQuS CCT
|
|
145
|
-
"""
|
|
146
|
-
type: Literal['CCT_straight'] = "CCT_straight"
|
|
147
|
-
geometry: GeometryCCTFiQuS = GeometryCCTFiQuS()
|
|
148
|
-
mesh: MeshCCT = MeshCCT()
|
|
149
|
-
solve: SolveCCT = SolveCCT()
|
|
150
|
-
postproc: PostprocCCTFiQuS = PostprocCCTFiQuS()
|
|
1
|
+
from pydantic import BaseModel
|
|
2
|
+
from typing import (List, Literal, Optional)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class Winding_gFiQuS(BaseModel): # Geometry related windings _inputs
|
|
6
|
+
"""
|
|
7
|
+
Level 2: Class for FiQuS CCT
|
|
8
|
+
"""
|
|
9
|
+
names: Optional[List[str]] = None # name to use in gmsh and getdp
|
|
10
|
+
r_wms: Optional[List[float]] = None # radius of the middle of the winding
|
|
11
|
+
n_turnss: Optional[List[float]] = None # number of turns
|
|
12
|
+
ndpts: Optional[List[int]] = None # number of divisions of turn, i.e. number of hexagonal elements for each turn
|
|
13
|
+
ndpt_ins: Optional[List[int]] = None # number of divisions of terminals in
|
|
14
|
+
ndpt_outs: Optional[List[int]] = None # number of divisions of terminals in
|
|
15
|
+
lps: Optional[List[float]] = None # layer pitch
|
|
16
|
+
alphas: Optional[List[float]] = None # tilt angle
|
|
17
|
+
wwws: Optional[List[float]] = None # winding wire widths (assuming rectangular)
|
|
18
|
+
wwhs: Optional[List[float]] = None # winding wire heights (assuming rectangular)
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
class Winding_s(BaseModel): # Solution time used windings _inputs (materials and BC)
|
|
22
|
+
"""
|
|
23
|
+
Level 2: Class for FiQuS CCT
|
|
24
|
+
"""
|
|
25
|
+
currents: Optional[List[float]] = None # current in the wire
|
|
26
|
+
sigmas: Optional[List[float]] = None # electrical conductivity
|
|
27
|
+
mu_rs: Optional[List[float]] = None # relative permeability
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
class FQPL_g(BaseModel): # Geometry related fqpls _inputs
|
|
31
|
+
"""
|
|
32
|
+
Level 2: Class for FiQuS CCT
|
|
33
|
+
"""
|
|
34
|
+
names: List[str] = [] # name to use in gmsh and getdp
|
|
35
|
+
fndpls: Optional[List[int]] = None # fqpl number of divisions per length
|
|
36
|
+
fwws: Optional[List[float]] = None # fqpl wire widths (assuming rectangular) for theta = 0 this is x dimension
|
|
37
|
+
fwhs: Optional[List[float]] = None # fqpl wire heights (assuming rectangular) for theta = 0 this is y dimension
|
|
38
|
+
r_ins: Optional[List[float]] = None # radiuses for inner diameter for fqpl (radial (or x direction for theta=0) for placing the fqpl
|
|
39
|
+
r_bs: Optional[List[float]] = None # radiuses for bending the fqpl by 180 degrees
|
|
40
|
+
n_sbs: Optional[List[int]] = None # number of 'bending segmetns' for the 180 degrees turn
|
|
41
|
+
thetas: Optional[List[float]] = None # rotation in deg from x+ axis towards y+ axis about z axis.
|
|
42
|
+
z_starts: Optional[List[str]] = None # which air boundary to start at. These is string with either: z_min or z_max key from the Air region.
|
|
43
|
+
z_ends: Optional[List[float]] = None # z coordinate of loop end
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
class FQPL_s(BaseModel): # Solution time used fqpls _inputs (materials and BC)
|
|
47
|
+
"""
|
|
48
|
+
Level 2: Class for FiQuS CCT
|
|
49
|
+
"""
|
|
50
|
+
currents: List[float] = [] # current in the wire
|
|
51
|
+
sigmas: List[float] = [] # electrical conductivity
|
|
52
|
+
mu_rs: List[float] = [] # relative permeability
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
class Former_gFiQuS(BaseModel): # Geometry related formers _inputs
|
|
56
|
+
"""
|
|
57
|
+
Level 2: Class for FiQuS CCT
|
|
58
|
+
"""
|
|
59
|
+
names: Optional[List[str]] = None # name to use in gmsh and getdp
|
|
60
|
+
r_ins: Optional[List[float]] = None # inner radius
|
|
61
|
+
r_outs: Optional[List[float]] = None # outer radius
|
|
62
|
+
z_mins: Optional[List[float]] = None # extend of former in negative z direction
|
|
63
|
+
z_maxs: Optional[List[float]] = None # extend of former in positive z direction
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
class Former_s(BaseModel): # Solution time used formers _inputs (materials and BC)
|
|
67
|
+
"""
|
|
68
|
+
Level 2: Class for FiQuS CCT
|
|
69
|
+
"""
|
|
70
|
+
sigmas: Optional[List[float]] = None # electrical conductivity
|
|
71
|
+
mu_rs: Optional[List[float]] = None # relative permeability
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
class Air_g(BaseModel): # Geometry related air_region _inputs
|
|
75
|
+
"""
|
|
76
|
+
Level 2: Class for FiQuS CCT
|
|
77
|
+
"""
|
|
78
|
+
name: Optional[str] = None # name to use in gmsh and getdp
|
|
79
|
+
sh_type: Optional[str] = None # cylinder or cuboid are possible
|
|
80
|
+
ar: Optional[float] = None # if box type is cuboid a is taken as a dimension, if cylinder then r is taken
|
|
81
|
+
z_min: Optional[float] = None # extend of air region in negative z direction
|
|
82
|
+
z_max: Optional[float] = None # extend of air region in positive z direction
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
class Air_s(BaseModel): # Solution time used air _inputs (materials and BC)
|
|
86
|
+
"""
|
|
87
|
+
Level 2: Class for FiQuS CCT
|
|
88
|
+
"""
|
|
89
|
+
sigma: Optional[float] = None # electrical conductivity
|
|
90
|
+
mu_r: Optional[float] = None # relative permeability
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
class GeometryCCTFiQuS(BaseModel):
|
|
94
|
+
"""
|
|
95
|
+
Level 2: Class for FiQuS CCT for FiQuS input
|
|
96
|
+
"""
|
|
97
|
+
windings: Winding_gFiQuS = Winding_gFiQuS()
|
|
98
|
+
fqpls: FQPL_g = FQPL_g()
|
|
99
|
+
formers: Former_gFiQuS = Former_gFiQuS()
|
|
100
|
+
air: Air_g = Air_g()
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
class MeshCCT(BaseModel):
|
|
104
|
+
"""
|
|
105
|
+
Level 2: Class for FiQuS CCT
|
|
106
|
+
"""
|
|
107
|
+
MaxAspectWindings: Optional[float] = None # used in transfinite mesh_generators settings to define mesh_generators size along two longer lines of hex elements of windings
|
|
108
|
+
ThresholdSizeMin: Optional[float] = None # sets field control of Threshold SizeMin
|
|
109
|
+
ThresholdSizeMax: Optional[float] = None # sets field control of Threshold SizeMax
|
|
110
|
+
ThresholdDistMin: Optional[float] = None # sets field control of Threshold DistMin
|
|
111
|
+
ThresholdDistMax: Optional[float] = None # sets field control of Threshold DistMax
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
class SolveCCT(BaseModel):
|
|
115
|
+
"""
|
|
116
|
+
Level 2: Class for FiQuS CCT
|
|
117
|
+
"""
|
|
118
|
+
windings: Winding_s = Winding_s() # windings solution time _inputs
|
|
119
|
+
fqpls: FQPL_s = FQPL_s() # fqpls solution time _inputs
|
|
120
|
+
formers: Former_s = Former_s() # former solution time _inputs
|
|
121
|
+
air: Air_s = Air_s() # air solution time _inputs
|
|
122
|
+
pro_template: Optional[str] = None # file name of .pro template file
|
|
123
|
+
variables: Optional[List[str]] = None # Name of variable to post-process by GetDP, like B for magnetic flux density
|
|
124
|
+
volumes: Optional[List[str]] = None # Name of volume to post-process by GetDP, line Winding_1
|
|
125
|
+
file_exts: Optional[List[str]] = None # Name of file extensions to post-process by GetDP, like .pos
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
class PostprocCCTFiQuS(BaseModel):
|
|
129
|
+
"""
|
|
130
|
+
Class for FiQuS CCT input file
|
|
131
|
+
"""
|
|
132
|
+
windings_wwns: Optional[List[int]] = None # wires in width direction numbers
|
|
133
|
+
windings_whns: Optional[List[int]] = None # wires in height direction numbers
|
|
134
|
+
additional_outputs: Optional[List[str]] = None # Name of software specific input files to prepare, like :LEDET3D
|
|
135
|
+
winding_order: Optional[List[int]] = None
|
|
136
|
+
fqpl_export_trim_tol: Optional[List[float]] = None # this multiplier times winding extend gives 'z' coordinate above(below) which hexes are exported for LEDET, length of this list must match number of fqpls
|
|
137
|
+
variables: Optional[List[str]] = None # Name of variable to post-process by python Gmsh API, like B for magnetic flux density
|
|
138
|
+
volumes: Optional[List[str]] = None # Name of volume to post-process by python Gmsh API, line Winding_1
|
|
139
|
+
file_exts: Optional[List[str]] = None # Name of file extensions o post-process by python Gmsh API, like .pos
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
class CCT(BaseModel):
|
|
143
|
+
"""
|
|
144
|
+
Level 1: Class for FiQuS CCT
|
|
145
|
+
"""
|
|
146
|
+
type: Literal['CCT_straight'] = "CCT_straight"
|
|
147
|
+
geometry: GeometryCCTFiQuS = GeometryCCTFiQuS()
|
|
148
|
+
mesh: MeshCCT = MeshCCT()
|
|
149
|
+
solve: SolveCCT = SolveCCT()
|
|
150
|
+
postproc: PostprocCCTFiQuS = PostprocCCTFiQuS()
|