Skip to content

Commit 6097798

Browse files
author
abujazar
committed
add electrostatic tests to the test file
1 parent 4c33a98 commit 6097798

4 files changed

Lines changed: 561 additions & 4 deletions

File tree

femmt/examples/basic_inducotr_electrostatic.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,13 +99,13 @@ def basic_example_inductor_electrostatic(onelab_folder: str = None, show_visual_
9999
winding.set_solid_round_conductor(conductor_radius=1.1506e-3, conductor_arrangement=fmt.ConductorArrangement.Square)
100100
winding.parallel = False # set True to make the windings parallel, currently only for solid conductors
101101
# 7. add conductor to vww and add winding window to MagneticComponent
102-
vww.set_winding(winding, 14, None, fmt.Align.ToEdges, placing_strategy=fmt.ConductorDistribution.VerticalUpward_HorizontalRightward,
102+
vww.set_winding(winding, 7, None, fmt.Align.ToEdges, placing_strategy=fmt.ConductorDistribution.VerticalUpward_HorizontalRightward,
103103
zigzag=True)
104104
geo.set_winding_windows([winding_window])
105105
# 8. create the model
106106
geo.create_model(freq=inductor_frequency, pre_visualize_geometry=show_visual_outputs, save_png=False, skin_mesh_factor=0.5)
107107
# 8. run electrostatic simulation
108-
num_turns_w1 = 14
108+
num_turns_w1 = 7
109109
# Create a linear voltage distribution along winding 1 from V_A to V_B ( the first turn to the last turn)
110110
V_A = 1
111111
V_B = 0
@@ -116,8 +116,8 @@ def basic_example_inductor_electrostatic(onelab_folder: str = None, show_visual_
116116
geo.electrostatic_simulation(voltage=[voltages_winding_1], ground_outer_boundary=False, core_voltage=0,
117117
show_fem_simulation_results=show_visual_outputs, save_to_excel=False)
118118
# Run simulation in FEMM
119-
geo.femm_reference_electrostatic(voltages=[voltages_winding_1], ground_core=True, ground_outer_boundary=True,
120-
non_visualize=0, save_to_excel=False, compare_excel_files_to_femmt=False, mesh_size_conductor=0.0)
119+
# geo.femm_reference_electrostatic(voltages=[voltages_winding_1], ground_core=True, ground_outer_boundary=True,
120+
# non_visualize=0, save_to_excel=False, compare_excel_files_to_femmt=False, mesh_size_conductor=0.0)
121121

122122

123123
if __name__ == "__main__":
Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
{
2+
"core_type": "Single",
3+
"p_outer": [
4+
[
5+
0,
6+
-0.018475
7+
],
8+
[
9+
0.019943733351606967,
10+
-0.018475
11+
],
12+
[
13+
0,
14+
0.018475
15+
],
16+
[
17+
0.019943733351606967,
18+
0.018475
19+
]
20+
],
21+
"p_ww": [
22+
[
23+
0.00745,
24+
-0.01475
25+
],
26+
[
27+
0.018500000000000003,
28+
-0.01475
29+
],
30+
[
31+
0.00745,
32+
0.01475
33+
],
34+
[
35+
0.018500000000000003,
36+
0.01475
37+
]
38+
],
39+
"p_air_gap_center": [
40+
[
41+
0.003725,
42+
0.0
43+
]
44+
],
45+
"lengths_air_gap": [
46+
0.001
47+
],
48+
"p_cond_center_1": [
49+
[
50+
0.0093406,
51+
-0.0128244,
52+
0.0,
53+
0.000143825
54+
],
55+
[
56+
0.0093406,
57+
-0.0091232,
58+
0.0,
59+
0.000143825
60+
],
61+
[
62+
0.0093406,
63+
-0.005422,
64+
0.0,
65+
0.000143825
66+
],
67+
[
68+
0.0093406,
69+
-0.0017207999999999993,
70+
0.0,
71+
0.000143825
72+
],
73+
[
74+
0.0093406,
75+
0.001980400000000001,
76+
0.0,
77+
0.000143825
78+
],
79+
[
80+
0.0093406,
81+
0.005681600000000002,
82+
0.0,
83+
0.000143825
84+
],
85+
[
86+
0.0093406,
87+
0.009382800000000002,
88+
0.0,
89+
0.000143825
90+
]
91+
],
92+
"radius_cond_1": 0.0011505999999999999
93+
}
Lines changed: 174 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,174 @@
1+
{
2+
"core_type": "Single",
3+
"p_outer": [
4+
[
5+
0,
6+
-0.018475
7+
],
8+
[
9+
0.019943733351606967,
10+
-0.018475
11+
],
12+
[
13+
0,
14+
0.018475
15+
],
16+
[
17+
0.019943733351606967,
18+
0.018475
19+
]
20+
],
21+
"p_ww": [
22+
[
23+
0.00745,
24+
-0.01475
25+
],
26+
[
27+
0.018500000000000003,
28+
-0.01475
29+
],
30+
[
31+
0.00745,
32+
0.01475
33+
],
34+
[
35+
0.018500000000000003,
36+
0.01475
37+
]
38+
],
39+
"p_air_gap_center": [
40+
[
41+
0.003725,
42+
0.0
43+
]
44+
],
45+
"lengths_air_gap": [
46+
0.0005
47+
],
48+
"p_cond_center_1": [
49+
[
50+
0.009840599999999998,
51+
-0.011674400000000001,
52+
0.0,
53+
0.000143825
54+
],
55+
[
56+
0.009840599999999998,
57+
-0.009173200000000001,
58+
0.0,
59+
0.000143825
60+
],
61+
[
62+
0.009840599999999998,
63+
-0.006672000000000001,
64+
0.0,
65+
0.000143825
66+
],
67+
[
68+
0.009840599999999998,
69+
-0.0041708000000000005,
70+
0.0,
71+
0.000143825
72+
],
73+
[
74+
0.009840599999999998,
75+
-0.0016696000000000003,
76+
0.0,
77+
0.000143825
78+
],
79+
[
80+
0.009840599999999998,
81+
0.0008316,
82+
0.0,
83+
0.000143825
84+
],
85+
[
86+
0.009840599999999998,
87+
0.0033328000000000003,
88+
0.0,
89+
0.000143825
90+
],
91+
[
92+
0.009840599999999998,
93+
0.005834000000000001,
94+
0.0,
95+
0.000143825
96+
],
97+
[
98+
0.009840599999999998,
99+
0.008335200000000001,
100+
0.0,
101+
0.000143825
102+
],
103+
[
104+
0.009840599999999998,
105+
0.010836400000000001,
106+
0.0,
107+
0.000143825
108+
]
109+
],
110+
"radius_cond_1": 0.0011505999999999999,
111+
"p_cond_center_2": [
112+
[
113+
0.012641999999999999,
114+
-0.011674400000000001,
115+
0.0,
116+
0.000143825
117+
],
118+
[
119+
0.012641999999999999,
120+
-0.0092782,
121+
0.0,
122+
0.000143825
123+
],
124+
[
125+
0.012641999999999999,
126+
-0.006882,
127+
0.0,
128+
0.000143825
129+
],
130+
[
131+
0.012641999999999999,
132+
-0.0044858,
133+
0.0,
134+
0.000143825
135+
],
136+
[
137+
0.012641999999999999,
138+
-0.0020895999999999996,
139+
0.0,
140+
0.000143825
141+
],
142+
[
143+
0.012641999999999999,
144+
0.0003066000000000006,
145+
0.0,
146+
0.000143825
147+
],
148+
[
149+
0.012641999999999999,
150+
0.002702800000000001,
151+
0.0,
152+
0.000143825
153+
],
154+
[
155+
0.012641999999999999,
156+
0.005099000000000001,
157+
0.0,
158+
0.000143825
159+
],
160+
[
161+
0.012641999999999999,
162+
0.007495200000000001,
163+
0.0,
164+
0.000143825
165+
],
166+
[
167+
0.012641999999999999,
168+
0.009891400000000002,
169+
0.0,
170+
0.000143825
171+
]
172+
],
173+
"radius_cond_2": 0.0011505999999999999
174+
}

0 commit comments

Comments
 (0)