fiqus 2025.2.0__py3-none-any.whl → 2025.10.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 +4 -9
- 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.10.0.dist-info}/METADATA +65 -63
- fiqus-2025.10.0.dist-info/RECORD +86 -0
- {fiqus-2025.2.0.dist-info → fiqus-2025.10.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.10.0.dist-info}/LICENSE.txt +0 -0
- {fiqus-2025.2.0.dist-info → fiqus-2025.10.0.dist-info}/top_level.txt +0 -0
|
@@ -1,275 +1,276 @@
|
|
|
1
|
-
Group {
|
|
2
|
-
{% for name, number in zip(rm.powered['cct'].vol.names, rm.powered['cct'].vol.numbers) %}
|
|
3
|
-
<<name>> = Region[{<<number>>}];
|
|
4
|
-
{% endfor %}
|
|
5
|
-
{% for name, number in zip(rm.powered['cct'].surf_in.names, rm.powered['cct'].surf_in.numbers) %}
|
|
6
|
-
<<name>> = Region[{<<number>>}];
|
|
7
|
-
{% endfor %}
|
|
8
|
-
{% for name, number in zip(rm.powered['cct'].surf_out.names, rm.powered['cct'].surf_out.numbers) %}
|
|
9
|
-
<<name>> = Region[{<<number>>}];
|
|
10
|
-
{% endfor %}
|
|
11
|
-
{% for name, number in zip(rm.induced['cct'].vol.names, rm.induced['cct'].vol.numbers) %}
|
|
12
|
-
<<name>> = Region[{<<number>>}];
|
|
13
|
-
{% endfor %}
|
|
14
|
-
<<nc.omega>><<nc.cond>> = Region[{<<(rm.powered['cct'].vol.numbers+rm.induced['cct'].vol.numbers)|join(', ')>>}];
|
|
15
|
-
//<<nc.line>><<nc.air>> = Region[{<<rm.air.line.number>>}];
|
|
16
|
-
//<<nc.omega>><<nc.air>> = Region[{<<([rm.air.vol.number]+[rm.air.line.number])|join(', ')>>}];
|
|
17
|
-
<<nc.omega>><<nc.air>> = Region[{<<rm.air.vol.number>>}];
|
|
18
|
-
<<nc.omega>> = Region[{<<(rm.powered['cct'].vol.numbers+rm.induced['cct'].vol.numbers+[rm.air.vol.number])|join(', ')>>}];
|
|
19
|
-
<<nc.terms>> = Region[{<<rm.powered['cct'].surf_in.numbers|join(', ')>>, <<rm.powered['cct'].surf_out.numbers|join(', ')>>}];
|
|
20
|
-
<<nc.bd>><<nc.omega>> = Region[{<< rm.air.surf.number>>, << rm.powered['cct'].surf_in.numbers|join(', ')>>, << rm.powered['cct'].surf_out.numbers|join(', ')>>}];
|
|
21
|
-
<<nc.omega>><<nc.powered>> = Region[{<<rm.powered['cct'].vol.numbers|join(', ')>>}];
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
{% for name, number in zip(rm.powered['cct'].cochain.names, rm.powered['cct'].cochain.numbers) %}
|
|
25
|
-
DefineConstant[ <<name>> = {<<number>>, Min 1, Step 1, Closed 1,
|
|
26
|
-
Name "Cohomology/<<name>>"} ];
|
|
27
|
-
<<name>> = Region[{<<name>>}];
|
|
28
|
-
{% endfor %}
|
|
29
|
-
Cuts<<nc.powered>> = Region[ {<<rm.powered['cct'].cochain.names|join(', ')>>} ];
|
|
30
|
-
{% for name, number in zip(rm.induced['cct'].cochain.names, rm.induced['cct'].cochain.numbers) %}
|
|
31
|
-
DefineConstant[ <<name>> = {<<number>>, Min 1, Step 1,
|
|
32
|
-
Name "Cohomology/<<name>>"} ];
|
|
33
|
-
<<name>> = Region[{<<name>>}];
|
|
34
|
-
{% endfor %}
|
|
35
|
-
Cuts<<nc.induced>> = Region[ {<<rm.induced['cct'].cochain.names|join(', ')>>} ];
|
|
36
|
-
DomainDummy = Region[ 12345 ] ; // Dummy region number for postpro with functions
|
|
37
|
-
}
|
|
38
|
-
Function {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
{%
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
{
|
|
48
|
-
{%
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
{
|
|
52
|
-
|
|
53
|
-
<<rm.air.vol.name>>
|
|
54
|
-
]
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
{%
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
{ GeoElement
|
|
88
|
-
{ GeoElement
|
|
89
|
-
{ GeoElement
|
|
90
|
-
{ GeoElement
|
|
91
|
-
{ GeoElement
|
|
92
|
-
{ GeoElement
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
{ GeoElement
|
|
96
|
-
{ GeoElement
|
|
97
|
-
{ GeoElement
|
|
98
|
-
{ GeoElement
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
{
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
{ Name
|
|
152
|
-
{ Name
|
|
153
|
-
{ Name
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
{ Name
|
|
172
|
-
{ Name
|
|
173
|
-
{ Name
|
|
174
|
-
{ Name
|
|
175
|
-
{ Name
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
GlobalTerm { [ - Dof{I<<nc.
|
|
190
|
-
|
|
191
|
-
{%
|
|
192
|
-
{%
|
|
193
|
-
{%
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
{ Name
|
|
231
|
-
{ Name
|
|
232
|
-
{ Name
|
|
233
|
-
{ Name
|
|
234
|
-
{ Name
|
|
235
|
-
{ Name
|
|
236
|
-
{ Name
|
|
237
|
-
{ Name
|
|
238
|
-
|
|
239
|
-
{%
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
{ Name
|
|
243
|
-
{ Name
|
|
244
|
-
{ Name
|
|
245
|
-
{ Name
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
{ Name
|
|
249
|
-
}
|
|
250
|
-
|
|
251
|
-
}
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
//Print[
|
|
258
|
-
//Print[ j, OnElementsOf Omega_p_1 , Format
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
//Print[
|
|
267
|
-
//Print[
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
1
|
+
Group {
|
|
2
|
+
{% for name, number in zip(rm.powered['cct'].vol.names, rm.powered['cct'].vol.numbers) %}
|
|
3
|
+
<<name>> = Region[{<<number>>}];
|
|
4
|
+
{% endfor %}
|
|
5
|
+
{% for name, number in zip(rm.powered['cct'].surf_in.names, rm.powered['cct'].surf_in.numbers) %}
|
|
6
|
+
<<name>> = Region[{<<number>>}];
|
|
7
|
+
{% endfor %}
|
|
8
|
+
{% for name, number in zip(rm.powered['cct'].surf_out.names, rm.powered['cct'].surf_out.numbers) %}
|
|
9
|
+
<<name>> = Region[{<<number>>}];
|
|
10
|
+
{% endfor %}
|
|
11
|
+
{% for name, number in zip(rm.induced['cct'].vol.names, rm.induced['cct'].vol.numbers) %}
|
|
12
|
+
<<name>> = Region[{<<number>>}];
|
|
13
|
+
{% endfor %}
|
|
14
|
+
<<nc.omega>><<nc.cond>> = Region[{<<(rm.powered['cct'].vol.numbers+rm.induced['cct'].vol.numbers)|join(', ')>>}];
|
|
15
|
+
//<<nc.line>><<nc.air>> = Region[{<<rm.air.line.number>>}];
|
|
16
|
+
//<<nc.omega>><<nc.air>> = Region[{<<([rm.air.vol.number]+[rm.air.line.number])|join(', ')>>}];
|
|
17
|
+
<<nc.omega>><<nc.air>> = Region[{<<rm.air.vol.number>>}];
|
|
18
|
+
<<nc.omega>> = Region[{<<(rm.powered['cct'].vol.numbers+rm.induced['cct'].vol.numbers+[rm.air.vol.number])|join(', ')>>}];
|
|
19
|
+
<<nc.terms>> = Region[{<<rm.powered['cct'].surf_in.numbers|join(', ')>>, <<rm.powered['cct'].surf_out.numbers|join(', ')>>}];
|
|
20
|
+
<<nc.bd>><<nc.omega>> = Region[{<< rm.air.surf.number>>, << rm.powered['cct'].surf_in.numbers|join(', ')>>, << rm.powered['cct'].surf_out.numbers|join(', ')>>}];
|
|
21
|
+
<<nc.omega>><<nc.powered>> = Region[{<<rm.powered['cct'].vol.numbers|join(', ')>>}];
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
{% for name, number in zip(rm.powered['cct'].cochain.names, rm.powered['cct'].cochain.numbers) %}
|
|
25
|
+
DefineConstant[ <<name>> = {<<number>>, Min 1, Step 1, Closed 1,
|
|
26
|
+
Name "Cohomology/<<name>>"} ];
|
|
27
|
+
<<name>> = Region[{<<name>>}];
|
|
28
|
+
{% endfor %}
|
|
29
|
+
Cuts<<nc.powered>> = Region[ {<<rm.powered['cct'].cochain.names|join(', ')>>} ];
|
|
30
|
+
{% for name, number in zip(rm.induced['cct'].cochain.names, rm.induced['cct'].cochain.numbers) %}
|
|
31
|
+
DefineConstant[ <<name>> = {<<number>>, Min 1, Step 1,
|
|
32
|
+
Name "Cohomology/<<name>>"} ];
|
|
33
|
+
<<name>> = Region[{<<name>>}];
|
|
34
|
+
{% endfor %}
|
|
35
|
+
Cuts<<nc.induced>> = Region[ {<<rm.induced['cct'].cochain.names|join(', ')>>} ];
|
|
36
|
+
DomainDummy = Region[ 12345 ] ; // Dummy region number for postpro with functions
|
|
37
|
+
}
|
|
38
|
+
Function {
|
|
39
|
+
mesh_file = "<<mf>>";
|
|
40
|
+
DefineConstant
|
|
41
|
+
[
|
|
42
|
+
{% for vol_name, current in zip(rm.powered['cct'].vol.names, rm.powered['cct'].vol.currents) %}
|
|
43
|
+
I_<<vol_name>> = {<<current>>, Step 1, Name "Powering/<<vol_name>>_Current [A]"},
|
|
44
|
+
{% endfor %}
|
|
45
|
+
{% for vol_name, sigma, mu_r in zip(rm.powered['cct'].vol.names, rm.powered['cct'].vol.sigmas, rm.powered['cct'].vol.mu_rs) %}
|
|
46
|
+
<<vol_name>>_Conductivity = {<<sigma>>, Min 0, Step 1e6, Name "Materials/<<vol_name>> Cond. [S per m]"},
|
|
47
|
+
<<vol_name>>_Permeability = {<<mu_r>>, Min 0, Step 1e1, Name "Materials/<<vol_name>> Rel. Perm. [-]"},
|
|
48
|
+
{% endfor %}
|
|
49
|
+
{% for vol_name, sigma, mu_r in zip(rm.induced['cct'].vol.names, rm.induced['cct'].vol.sigmas, rm.induced['cct'].vol.mu_rs) %}
|
|
50
|
+
<<vol_name>>_Conductivity = {<<sigma>>, Min 0, Step 1e6, Name "Materials/<<vol_name>> Cond. [S per m]"},
|
|
51
|
+
<<vol_name>>_Permeability = {<<mu_r>>, Min 0, Step 1e1, Name "Materials/<<vol_name>> Rel. Perm. [-]"},
|
|
52
|
+
{% endfor %}
|
|
53
|
+
<<rm.air.vol.name>>_Conductivity = {<<rm.air.vol.sigma>>, Min 0, Step 1e6, Name "Materials/<<rm.air.vol.name>> Cond. [S per m]"},
|
|
54
|
+
<<rm.air.vol.name>>_Permeability = {<<rm.air.vol.mu_r>>, Min 0, Step 1e1, Name "Materials/<<rm.air.vol.name>> Rel. Perm. [-]"}
|
|
55
|
+
];
|
|
56
|
+
mu0 = 4*Pi*1e-7; // Vacuum permeability
|
|
57
|
+
nu [] = 1./mu0;
|
|
58
|
+
{% for vol_name in rm.powered['cct'].vol.names %}
|
|
59
|
+
I_<<vol_name>>[] = I_<<vol_name>>;
|
|
60
|
+
sigma[<<vol_name>>] = <<vol_name>>_Conductivity;
|
|
61
|
+
mu[<<vol_name>>] = mu0*<<vol_name>>_Permeability;
|
|
62
|
+
{% endfor %}
|
|
63
|
+
{% for vol_name in rm.induced['cct'].vol.names %}
|
|
64
|
+
sigma[<<vol_name>>] = <<vol_name>>_Conductivity;
|
|
65
|
+
mu[<<vol_name>>] = mu0*<<vol_name>>_Permeability;
|
|
66
|
+
{% endfor %}
|
|
67
|
+
sigma[<<nc.omega>><<nc.air>>] = <<rm.air.vol.name>>_Conductivity; // Air
|
|
68
|
+
mu[<<nc.omega>><<nc.air>>] = mu0*<<rm.air.vol.name>>_Permeability; // Air
|
|
69
|
+
}
|
|
70
|
+
Jacobian {
|
|
71
|
+
{ Name Vol ;
|
|
72
|
+
Case { { Region All ; Jacobian Vol ; } }
|
|
73
|
+
}
|
|
74
|
+
{ Name Sur ;
|
|
75
|
+
Case { { Region All ; Jacobian Sur ; } }
|
|
76
|
+
}
|
|
77
|
+
{ Name Lin ;
|
|
78
|
+
Case { { Region All ; Jacobian Lin ; } }
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
Integration {
|
|
83
|
+
{ Name Int ;
|
|
84
|
+
Case {
|
|
85
|
+
{ Type Gauss ;
|
|
86
|
+
Case {
|
|
87
|
+
{ GeoElement Point ; NumberOfPoints 1 ; }
|
|
88
|
+
{ GeoElement Line ; NumberOfPoints 3 ; }
|
|
89
|
+
{ GeoElement Line2 ; NumberOfPoints 4 ; } // Second-order element
|
|
90
|
+
{ GeoElement Triangle ; NumberOfPoints 12 ; } // To ensure sufficent nb of points with hierarchical elements in coupled formulations (to be optimized)
|
|
91
|
+
{ GeoElement Triangle2 ; NumberOfPoints 12 ; }
|
|
92
|
+
{ GeoElement Quadrangle ; NumberOfPoints 4 ; }
|
|
93
|
+
{ GeoElement Quadrangle2 ; NumberOfPoints 4 ; } // Second-order element
|
|
94
|
+
{ GeoElement Tetrahedron ; NumberOfPoints 5 ; }
|
|
95
|
+
// { GeoElement Tetrahedron ; NumberOfPoints 15 ; }
|
|
96
|
+
{ GeoElement Tetrahedron2 ; NumberOfPoints 5 ; } // Second-order element
|
|
97
|
+
{ GeoElement Pyramid ; NumberOfPoints 8 ; }
|
|
98
|
+
{ GeoElement Prism ; NumberOfPoints 9 ; }
|
|
99
|
+
{ GeoElement Hexahedron ; NumberOfPoints 6 ; }
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
Constraint {
|
|
108
|
+
{ Name AGauge ;
|
|
109
|
+
Case {
|
|
110
|
+
{ Region Omega; SubRegion BdOmega; Value 0. ; }
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
{ Name VoltageAV ;
|
|
114
|
+
Case {
|
|
115
|
+
{% for cut_name in rm.induced['cct'].cochain.names %}
|
|
116
|
+
{ Region <<cut_name>>; Value 0. ; }
|
|
117
|
+
{% endfor %}
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
{ Name CurrentAV ;
|
|
121
|
+
Case {
|
|
122
|
+
{% for cut_name, vol_name in zip(rm.powered['cct'].cochain.names, rm.powered['cct'].vol.names) %}
|
|
123
|
+
{ Region <<cut_name>>; Value I_<<vol_name>>[] ; }
|
|
124
|
+
{% endfor %}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
FunctionSpace {
|
|
130
|
+
{ Name ASpace; Type Form1;
|
|
131
|
+
BasisFunction {
|
|
132
|
+
{ Name se; NameOfCoef a; Function BF_Edge;
|
|
133
|
+
Support <<nc.omega>>; Entity EdgesOf[All, Not <<nc.bd>><<nc.omega>>]; }
|
|
134
|
+
}
|
|
135
|
+
Constraint {
|
|
136
|
+
{ NameOfCoef a ; // Gauge condition
|
|
137
|
+
EntityType EdgesOfTreeIn ; EntitySubType StartingOn ;
|
|
138
|
+
NameOfConstraint AGauge ; }
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
{ Name ESpace; Type Form1;
|
|
142
|
+
BasisFunction {
|
|
143
|
+
{ Name sn; NameOfCoef v; Function BF_GradNode;
|
|
144
|
+
Support <<nc.omega>><<nc.cond>>; Entity NodesOf[All, Not Terms]; }
|
|
145
|
+
{ Name sp; NameOfCoef V_p; Function BF_GroupOfEdges;
|
|
146
|
+
Support <<nc.omega>><<nc.cond>>; Entity GroupsOfEdgesOf[Cuts<<nc.powered>>]; }
|
|
147
|
+
{ Name si; NameOfCoef V_i; Function BF_GroupOfEdges;
|
|
148
|
+
Support <<nc.omega>><<nc.cond>>; Entity GroupsOfEdgesOf[Cuts<<nc.induced>>]; }
|
|
149
|
+
}
|
|
150
|
+
GlobalQuantity {
|
|
151
|
+
{ Name Voltage<<nc.powered>> ; Type AliasOf ; NameOfCoef V<<nc.powered>> ; }
|
|
152
|
+
{ Name Current<<nc.powered>> ; Type AssociatedWith ; NameOfCoef V<<nc.powered>> ; }
|
|
153
|
+
{ Name Voltage<<nc.induced>> ; Type AliasOf ; NameOfCoef V<<nc.induced>> ; }
|
|
154
|
+
{ Name Current<<nc.induced>> ; Type AssociatedWith ; NameOfCoef V<<nc.induced>> ; }
|
|
155
|
+
}
|
|
156
|
+
Constraint {
|
|
157
|
+
{ NameOfCoef Current<<nc.powered>> ;
|
|
158
|
+
EntityType GroupsOfEdgesOf ; NameOfConstraint CurrentAV ; }
|
|
159
|
+
{ NameOfCoef Voltage<<nc.powered>> ;
|
|
160
|
+
EntityType GroupsOfEdgesOf ; NameOfConstraint VoltageAV ; }
|
|
161
|
+
{ NameOfCoef Current<<nc.induced>> ;
|
|
162
|
+
EntityType GroupsOfEdgesOf ; NameOfConstraint CurrentAV ; }
|
|
163
|
+
{ NameOfCoef Voltage<<nc.induced>> ;
|
|
164
|
+
EntityType GroupsOfEdgesOf ; NameOfConstraint VoltageAV ; }
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
Formulation {
|
|
169
|
+
{ Name MagDynAV; Type FemEquation;
|
|
170
|
+
Quantity {
|
|
171
|
+
{ Name a; Type Local; NameOfSpace ASpace; }
|
|
172
|
+
{ Name e; Type Local; NameOfSpace ESpace; }
|
|
173
|
+
{ Name I<<nc.powered>>; Type Global; NameOfSpace ESpace[Current<<nc.powered>>]; }
|
|
174
|
+
{ Name V<<nc.powered>>; Type Global; NameOfSpace ESpace[Voltage<<nc.powered>>]; }
|
|
175
|
+
{ Name I<<nc.induced>>; Type Global; NameOfSpace ESpace[Current<<nc.induced>>]; }
|
|
176
|
+
{ Name V<<nc.induced>>; Type Global; NameOfSpace ESpace[Voltage<<nc.induced>>]; }
|
|
177
|
+
}
|
|
178
|
+
Equation {
|
|
179
|
+
Galerkin { [ 1./mu[] * Dof{d a} , {d a} ];
|
|
180
|
+
In <<nc.omega>>; Integration Int; Jacobian Vol; }
|
|
181
|
+
Galerkin { [ sigma[] * Dof{e} , {a} ];
|
|
182
|
+
In <<nc.omega>><<nc.cond>>; Integration Int; Jacobian Vol; }
|
|
183
|
+
Galerkin { DtDof [ sigma[] * Dof{a} , {a} ];
|
|
184
|
+
In <<nc.omega>><<nc.cond>>; Integration Int; Jacobian Vol; }
|
|
185
|
+
Galerkin { [ sigma[] * Dof{e} , {e} ];
|
|
186
|
+
In <<nc.omega>><<nc.cond>>; Integration Int; Jacobian Vol; }
|
|
187
|
+
Galerkin { DtDof [ sigma[] * Dof{a} , {e} ];
|
|
188
|
+
In <<nc.omega>><<nc.cond>>; Integration Int; Jacobian Vol; }
|
|
189
|
+
GlobalTerm { [ - Dof{I<<nc.powered>>} , {V<<nc.powered>>} ] ; In Cuts<<nc.powered>>; }
|
|
190
|
+
GlobalTerm { [ - Dof{I<<nc.induced>>} , {V<<nc.induced>>} ] ; In Cuts<<nc.induced>>; }
|
|
191
|
+
{% for cut_name in rm.powered['cct'].cochain.names %}
|
|
192
|
+
{% endfor %}
|
|
193
|
+
{% for cut_name in rm.induced['cct'].cochain.names %}
|
|
194
|
+
{% endfor %}
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
Resolution {
|
|
199
|
+
{ Name MagDynAVComplex;
|
|
200
|
+
System {
|
|
201
|
+
{ Name A; NameOfFormulation MagDynAV; NameOfMesh mesh_file;}
|
|
202
|
+
}
|
|
203
|
+
Operation {
|
|
204
|
+
Generate[A]; Solve[A]; SaveSolution[A];
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
PostProcessing {
|
|
209
|
+
{ Name MagDynAV; NameOfFormulation MagDynAV;
|
|
210
|
+
PostQuantity {
|
|
211
|
+
{ Name v; Value{ Local{ [ {dInv e} ] ;
|
|
212
|
+
In <<nc.omega>><<nc.cond>>; Jacobian Vol; } } }
|
|
213
|
+
{ Name e; Value{ Local{ [ -(Dt[ {a} ] + {e}) ] ;
|
|
214
|
+
In <<nc.omega>><<nc.cond>>; Jacobian Vol; } } }
|
|
215
|
+
{ Name a; Value{ Local{ [ {a} ] ;
|
|
216
|
+
In <<nc.omega>>; Jacobian Vol; } } }
|
|
217
|
+
{ Name b; Value{ Local{ [ {d a} ] ;
|
|
218
|
+
In <<nc.omega>>; Jacobian Vol; } } }
|
|
219
|
+
{ Name b_norm; Value{ Local{ [Norm[ {d a} ]] ;
|
|
220
|
+
In <<nc.omega>>; Jacobian Vol; } } }
|
|
221
|
+
{ Name j; Value{ Local{ [ -sigma[]*(Dt[ {a} ] + {e}) ] ;
|
|
222
|
+
In <<nc.omega>><<nc.cond>>; Jacobian Vol; } } }
|
|
223
|
+
{ Name j_norm; Value{ Local{ [ Norm[ -sigma[]*(Dt[ {a} ] + {e}) ]] ;
|
|
224
|
+
In <<nc.omega>><<nc.cond>>; Jacobian Vol; } } }
|
|
225
|
+
{ Name q; Value{ Local{ [ sigma[]* SquNorm[Dt[ {a} ] + {e}] ] ;
|
|
226
|
+
In <<nc.omega>><<nc.cond>>; Jacobian Vol; } } }
|
|
227
|
+
{ Name h; Value{ Local{ [ 1./mu[]*({d a}) ] ;
|
|
228
|
+
In <<nc.omega>>; Jacobian Vol; } } }
|
|
229
|
+
{% for cut_name, vol_name in zip(rm.powered['cct'].cochain.names, rm.powered['cct'].vol.names) %}
|
|
230
|
+
{ Name I_<<vol_name>> ; Value { Term { [ {I_p} ] ; In <<cut_name>> ; } } }
|
|
231
|
+
{ Name V_<<vol_name>> ; Value { Term { [ {V_p} ] ; In <<cut_name>> ; } } }
|
|
232
|
+
{ Name Z_<<vol_name>> ; Value { Term { [ {V_p}/{I_p} ] ; In <<cut_name>> ; } } }
|
|
233
|
+
{ Name reI_<<vol_name>> ; Value { Term { [ Re[{I_p}] ] ; In <<cut_name>> ; } } }
|
|
234
|
+
{ Name reV_<<vol_name>> ; Value { Term { [ Re[{V_p}] ] ; In <<cut_name>> ; } } }
|
|
235
|
+
{ Name reZ_<<vol_name>> ; Value { Term { [ Re[{V_p}/{I_p}] ] ; In <<cut_name>> ; } } }
|
|
236
|
+
{ Name imI_<<vol_name>> ; Value { Term { [ Im[{I_p}] ] ; In <<cut_name>> ; } } }
|
|
237
|
+
{ Name imV_<<vol_name>> ; Value { Term { [ Im[{V_p}] ] ; In <<cut_name>> ; } } }
|
|
238
|
+
{ Name imZ_<<vol_name>> ; Value { Term { [ Im[{V_p}/{I_p}] ] ; In <<cut_name>> ; } } }
|
|
239
|
+
{% endfor %}
|
|
240
|
+
{% for cut_name, vol_name in zip(rm.induced['cct'].cochain.names, rm.induced['cct'].vol.names) %}
|
|
241
|
+
{ Name I_<<vol_name>> ; Value { Term { [ {I_i} ] ; In <<cut_name>> ; } } }
|
|
242
|
+
{ Name V_<<vol_name>> ; Value { Term { [ {V_i} ] ; In <<cut_name>> ; } } }
|
|
243
|
+
{ Name reI_<<vol_name>> ; Value { Term { [ Re[{I_i}] ] ; In <<cut_name>> ; } } }
|
|
244
|
+
{ Name reV_<<vol_name>> ; Value { Term { [ Re[{V_i}] ] ; In <<cut_name>> ; } } }
|
|
245
|
+
{ Name imI_<<vol_name>> ; Value { Term { [ Im[{I_i}] ] ; In <<cut_name>> ; } } }
|
|
246
|
+
{ Name imV_<<vol_name>> ; Value { Term { [ Im[{V_i}] ] ; In <<cut_name>> ; } } }
|
|
247
|
+
{% endfor %}
|
|
248
|
+
{ Name MagEnergy ; Value { Integral { [ 1/2 * nu[{d a}]*{d a} * {d a} ] ; In <<nc.omega>><<nc.cond>> ; Jacobian Vol ; Integration Int ; } } }
|
|
249
|
+
{ Name Inductance_from_MagEnergy ; Value { Term { Type Global; [ 2 * $MagEnergy /(I_<<rm.powered['cct'].vol.names[0]>>[]*I_<<rm.powered['cct'].vol.names[0]>>[]) ] ; In DomainDummy ; } } }
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
PostOperation {
|
|
254
|
+
{ Name Get_LocalFields ; NameOfPostProcessing MagDynAV ;
|
|
255
|
+
Operation {
|
|
256
|
+
//Print[ j, OnElementsOf Omega_p_1 , Format Table, File >> "J_Omega_p_1.txt"] ;
|
|
257
|
+
//Print [ b, OnLine { {0,0,-0.15} {0,0,0.15} } {125}, Format Table, File >> "line.txt" ];
|
|
258
|
+
//Print[ j, OnElementsOf Omega_p_1 , Format Gmsh, File "J_Omega_p_1_gmsh.pos"] ;
|
|
259
|
+
//Print[ j, OnElementsOf Omega_p_1 , Format GmshParsed, File "J_Omega_p_1_gmshparsed.pos"] ;
|
|
260
|
+
//Print[ a, OnElementsOf <<nc.omega>><<nc.cond>> , File "a_<<nc.omega>><<nc.cond>>.pos"] ;
|
|
261
|
+
{% for var_name, vol_name, file_ext in zip(dm.solve.variables, dm.solve.volumes, dm.solve.file_exts) %}
|
|
262
|
+
Print[ <<var_name>>, OnElementsOf <<vol_name>> , File "<<var_name>>_<<vol_name>>.<<file_ext>>"] ;
|
|
263
|
+
{% endfor %}
|
|
264
|
+
Print [ b, OnLine {{0,0,<<dm.geometry.air.z_min>>}{0,0,<<dm.geometry.air.z_max>>}} {1000}, Format SimpleTable, File "Center_line.csv"];
|
|
265
|
+
|
|
266
|
+
//Print[ j, OnElementsOf Omega_p , File "j_Omega_p.pos"] ;
|
|
267
|
+
//Print[ j_norm, OnElementsOf Omega_p , File "j_norm_Omega_p.pos"] ;
|
|
268
|
+
//Print[ b_norm, OnElementsOf Omega_p , File "b_norm_Omega_p.pos"] ;
|
|
269
|
+
Print[ MagEnergy[<<nc.omega>><<nc.cond>>], OnGlobal, Format TimeTable,
|
|
270
|
+
File "Magnetic_energy.dat", StoreInVariable $MagEnergy,
|
|
271
|
+
SendToServer "41Magnetic Energy [J]", Color "LightYellow" ];
|
|
272
|
+
Print [Inductance_from_MagEnergy, OnRegion DomainDummy, Format Table, File "Inductance.dat",
|
|
273
|
+
SendToServer "51Inductance from Magnetic Energy [mH]", Color "LightYellow" ];
|
|
274
|
+
}
|
|
275
|
+
}
|
|
275
276
|
}
|