[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[FEMM] spiky flux plot 2



Dear all,

I'm attempting to plot the armature flux of the machine which in the attached file 'zip0042.fem'.

I've created a Lua script file, 'flux.lua' which will finally save the flux data into 'fluxperstack.txt'

The resulting flux plot is shown in 'flux.tif'. It looks really spiky. Could anyone help me in eliminating these spikes please?

thanks.

Regards,
Aaron


Yahoo! Messenger - Communicate instantly..."Ping" your friends today! Download Messenger Now
[Format]      =  4.0
[Frequency]   =  0
[Precision]   =  1e-008
[MinAngle]    =  30
[Depth]       =  1
[LengthUnits] =  millimeters
[ProblemType] =  planar
[Coordinates] =  cartesian
[Comment]     =  "Add comments here."
[PointProps]   = 0
[BdryProps]   = 0
[BlockProps]  = 4
  <BeginBlock>
    <BlockName> = "Air"
    <Mu_x> = 1
    <Mu_y> = 1
    <H_c> = 0
    <H_cAngle> = 0
    <J_re> = 0
    <J_im> = 0
    <Sigma> = 0
    <d_lam> = 0
    <Phi_h> = 0
    <Phi_hx> = 0
    <Phi_hy> = 0
    <LamType> = 0
    <LamFill> = 1
    <BHPoints> = 0
  <EndBlock>
  <BeginBlock>
    <BlockName> = "1006 Steel"
    <Mu_x> = 1404
    <Mu_y> = 1404
    <H_c> = 0
    <H_cAngle> = 0
    <J_re> = 0
    <J_im> = 0
    <Sigma> = 0
    <d_lam> = 0
    <Phi_h> = 0
    <Phi_hx> = 0
    <Phi_hy> = 0
    <LamType> = 0
    <LamFill> = 1
    <BHPoints> = 14
      0	0
      0.040000000000000001	23.873249999999999
      0.080000000000000002	39.78875
      0.28000000000000003	79.577500000000001
      0.59999999999999998	119.36620000000001
      0.88	175.07050000000001
      1.2	286.47899999999998
      1.52	795.77499999999998
      1.6799999999999999	3183.0999999999999
      1.8	7957.75
      1.9199999999999999	15915.5
      2.0800000000000001	31831
      2.1640009999999998	56177.410000000003
      2.2000000000000002	79577.5
  <EndBlock>
  <BeginBlock>
    <BlockName> = "Copper"
    <Mu_x> = 1
    <Mu_y> = 1
    <H_c> = 0
    <H_cAngle> = 0
    <J_re> = 0
    <J_im> = 0
    <Sigma> = 58
    <d_lam> = 0
    <Phi_h> = 0
    <Phi_hx> = 0
    <Phi_hy> = 0
    <LamType> = 0
    <LamFill> = 1
    <BHPoints> = 0
  <EndBlock>
  <BeginBlock>
    <BlockName> = "fer3"
    <Mu_x> = 1
    <Mu_y> = 1
    <H_c> = 240000
    <H_cAngle> = 0
    <J_re> = 0
    <J_im> = 0
    <Sigma> = 0
    <d_lam> = 0
    <Phi_h> = 0
    <Phi_hx> = 0
    <Phi_hy> = 0
    <LamType> = 0
    <LamFill> = 1
    <BHPoints> = 8
      0	0
      0.5	8293.8047999999999
      1	41092.033100000001
      1.5	89975.2163
      2	139235.39069999999
      2.5	188847.4234
      3	239929.72150000001
      3.5	285130.95799999998
  <EndBlock>
[CircuitProps]  = 1
  <BeginCircuit>
    <CircuitName> = "coila"
    <TotalAmps_re> = 0
    <TotalAmps_im> = 0
    <CircuitType> = 1
  <EndCircuit>
[NumPoints] = 132
-25.43980384	0.099902389600000002	0	0
-17.739179889999999	1.0461341809	0	0
-16.21291987	2.4700666506000002	0	0
-16.1981	2.5655299999999999	0	0
25.439803842	-0.099902389999999994	0	0
17.739179892999999	-1.046134181	0	0
16.212919871	-2.4700666509999998	0	0
16.1981	-2.5655299999999999	0	0
-17.34191839	18.613206779999999	0	0
-12.809568410000001	12.316162432	0	0
-12.81916764	10.228828921	0	0
-12.879208780000001	10.153145762999999	0	0
17.341918387	-18.613206779999999	0	0
12.809568412999999	-12.31616243	0	0
12.819167637	-10.22882892	0	0
12.879208783999999	-10.153145759999999	0	0
5.7402514849999751	-13.858192987999983	0	0
4.064855042999981	-11.290569226999949	0	0
5.4803129339999863	-8.0640355991999826	0	0
13.858192989999946	5.7402514849999413	0	0
11.290569229999914	4.0648550429999908	0	0
8.0640355989999417	5.4803129339999215	0	0
-5.7402514854999378	13.858192989999926	0	0
-4.0648550428999872	11.290569229999923	0	0
-5.4803129340999197	8.0640355989998991	0	0
-13.858192987999871	-5.7402514854999396	0	0
-11.290569226999974	-4.0648550428999668	0	0
-8.0640355991999222	-5.4803129340999757	0	0
-5.7402514854999565	-13.858192987999896	0	0
-4.2416981254000152	-11.22532836999992	0	0
-4.1513480927999877	-8.8220637614999529	0	0
13.858192989999951	-5.7402514855000106	0	0
11.22532836999992	-4.2416981254000152	0	0
8.8220637619999618	-4.1513480928000241	0	0
5.7402514849999866	13.858192989999941	0	0
4.2416981249999539	11.225328369999893	0	0
4.15134809299997	8.8220637619999405	0	0
-13.858192987999919	5.7402514850000541	0	0
-11.225328369999893	4.2416981249999539	0	0
-8.8220637614999262	4.1513480929999762	0	0
18.379244026999999	3.2821165465000002	0	0
24.775326566	5.7772652325999996	0	0
28.120798084	7.0866575399	0	0
25.460163437999999	13.884526556999999	0	0
22.114691922999999	12.575134240000001	0	0
15.724195754	10.065712488999999	0	0
17.050298786999999	6.6733583086000001	0	0
0.099902389600000002	25.439803842	0	0
1.0461341809	17.739179892999999	0	0
2.4700666506000002	16.212919871	0	0
2.5655299999999999	16.1981	0	0
-0.099902389999999994	-25.43980384	0	0
-1.046134181	-17.739179889999999	0	0
-2.4700666509999998	-16.21291987	0	0
-2.5655299999999999	-16.1981	0	0
18.613206779999999	17.341918387	0	0
12.316162432	12.809568412999999	0	0
10.228828921	12.819167637	0	0
10.153145762999999	12.879208783999999	0	0
-18.613206779999999	-17.34191839	0	0
-12.31616243	-12.809568410000001	0	0
-10.22882892	-12.81916764	0	0
-10.153145759999999	-12.879208780000001	0	0
-7.08665754	28.120798084	0	0
-5.7772652329999996	24.775326566	0	0
-28.12079808	-7.08665754	0	0
-24.775326570000001	-5.7772652329999996	0	0
7.0866575399	-28.12079808	0	0
5.7772652325999996	-24.775326570000001	0	0
-13.884526559999999	25.460163437999999	0	0
-12.575134240000001	22.114691922999999	0	0
-25.460163439999999	-13.884526559999999	0	0
-22.114691919999999	-12.575134240000001	0	0
13.884526556999999	-25.460163439999999	0	0
12.575134240000001	-22.114691919999999	0	0
3.2821165465000002	-18.379244029999999	0	0
10.065712488999999	-15.72419575	0	0
6.6733583086000001	-17.050298789999999	0	0
-18.379244029999999	-3.2821165460000001	0	0
-15.72419575	-10.065712489999999	0	0
-17.050298789999999	-6.6733583090000002	0	0
-3.2821165460000001	18.379244026999999	0	0
-10.065712489999999	15.724195754	0	0
-6.6733583090000002	17.050298786999999	0	0
15.111631611	-2.393447315	0	0
15.802653911	2.4075619152000001	0	0
15.111631611	2.3934473151	0	0
2.3934473151	15.111631611	0	0
-2.4075619150000001	15.802653911	0	0
-2.393447315	15.111631611	0	0
-15.11163161	2.3934473151	0	0
-15.80265391	-2.4075619150000001	0	0
-15.11163161	-2.393447315	0	0
-2.393447315	-15.11163161	0	0
2.4075619152000001	-15.80265391	0	0
2.3934473151	-15.11163161	0	0
9.4721374243999996	12.015349043000001	0	0
13.238499298000001	8.9589263488000004	0	0
12.721485068	8.5002245651999999	0	0
-12.01534904	9.4721374243999996	0	0
-8.9589263490000004	13.238499298000001	0	0
-8.5002245649999999	12.721485068	0	0
-9.4721374239999996	-12.01534904	0	0
-13.238499300000001	-8.9589263490000004	0	0
-12.72148507	-8.5002245649999999	0	0
12.015349043000001	-9.4721374239999996	0	0
8.9589263488000004	-13.238499300000001	0	0
8.5002245651999999	-12.72148507	0	0
-23.30782162904141	10.195050314120092	0	0
-15.025482496246182	6.5722808627792428	0	0
23.307821629041413	-10.195050314120087	0	0
15.025482496286182	-6.5722808627892437	0	0
7.922260070181153e-011	-15.000000000007393	0	0
-2.0625931518303275e-012	-1.9999999999999962	0	0
1.8096541049299759	-0.85155858313014121	0	0
15.000000000007393	7.922260070181153e-011	0	0
1.9999999999999962	-2.0625931518303275e-012	0	0
0.85155858313014121	1.8096541049299759	0	0
-7.922260070181153e-011	15.000000000007393	0	0
2.0625931518303275e-012	1.9999999999999962	0	0
-1.8096541049299759	0.85155858313014121	0	0
-15.00000000000739	6.106226635438361e-015	0	0
-1.9999999999999927	-1.9143853169367731e-012	0	0
-0.85155858313014121	-1.8096541049299759	0	0
10.195050314120088	23.30782162904141	0	0
6.5722808627792446	15.02548249628618	0	0
-10.195050314120087	-23.30782162904141	0	0
-6.5722808522994889	-15.02548250083453	0	0
26.569450756381663	-11.621716160063645	0	0
11.621716160063649	26.569450756381659	0	0
-26.569450756381659	11.621716160063652	0	0
-11.621716160063645	-26.569450756381659	0	0
[NumSegments] = 92
0	1	-1	0	0	2
1	2	-1	0	0	2
2	3	-1	0	0	2
4	5	-1	0	0	0
5	6	-1	0	0	0
6	7	-1	0	0	0
8	9	-1	0	0	2
9	10	-1	0	0	2
10	11	-1	0	0	2
12	13	-1	0	0	0
13	14	-1	0	0	0
14	15	-1	0	0	0
16	17	-1	0	0	1
17	18	-1	0	0	1
19	20	-1	0	0	1
20	21	-1	0	0	1
22	23	-1	0	0	1
23	24	-1	0	0	1
25	26	-1	0	0	1
26	27	-1	0	0	1
28	29	-1	0	0	1
29	30	-1	0	0	1
31	32	-1	0	0	1
32	33	-1	0	0	1
34	35	-1	0	0	1
35	36	-1	0	0	1
37	38	-1	0	0	1
38	39	-1	0	0	1
40	41	-1	0	0	0
41	42	-1	0	0	0
42	43	-1	0	0	0
43	44	-1	0	0	0
44	45	-1	0	0	0
45	46	-1	0	0	0
46	40	-1	0	0	0
47	48	-1	0	0	0
48	49	-1	0	0	0
49	50	-1	0	0	0
51	52	-1	0	0	3
52	53	-1	0	0	3
53	54	-1	0	0	3
55	56	-1	0	0	0
56	57	-1	0	0	0
57	58	-1	0	0	0
59	60	-1	0	0	3
60	61	-1	0	0	3
61	62	-1	0	0	3
63	64	-1	0	0	0
65	66	-1	0	0	0
67	68	-1	0	0	0
69	70	-1	0	0	0
71	72	-1	0	0	0
73	74	-1	0	0	0
75	68	-1	0	0	0
67	73	-1	0	0	0
74	76	-1	0	0	0
76	77	-1	0	0	0
77	75	-1	0	0	0
78	66	-1	0	0	0
65	71	-1	0	0	0
72	79	-1	0	0	0
79	80	-1	0	0	0
80	78	-1	0	0	0
81	64	-1	0	0	0
63	69	-1	0	0	0
70	82	-1	0	0	0
82	83	-1	0	0	0
83	81	-1	0	0	0
84	6	-1	0	0	0
40	85	-1	0	0	0
85	86	-1	0	0	0
87	49	-1	0	0	0
81	88	-1	0	0	0
88	89	-1	0	0	0
90	2	-1	0	0	0
78	91	-1	0	0	0
91	92	-1	0	0	0
93	53	-1	0	0	0
75	94	-1	0	0	0
94	95	-1	0	0	0
96	57	-1	0	0	0
45	97	-1	0	0	0
97	98	-1	0	0	0
99	10	-1	0	0	0
82	100	-1	0	0	0
100	101	-1	0	0	0
102	61	-1	0	0	0
79	103	-1	0	0	0
103	104	-1	0	0	0
105	14	-1	0	0	0
76	106	-1	0	0	0
106	107	-1	0	0	0
[NumArcSegments] = 52
108	0	23.400000000000006	5	0	0	2
109	3	14.624989660000011	5	0	0	2
110	4	23.399999999999999	5	0	0	0
111	7	14.624989658000001	5	0	0	0
8	108	23.400000000000006	5	0	0	2
11	109	14.624989660000011	5	0	0	2
12	110	23.399999999999999	5	0	0	0
15	111	14.624989659999997	5	0	0	0
112	16	22.5	5	0	0	1
18	33	30.600000000000009	5	0	0	1
113	114	64.800000000000011	5	0	0	1
115	19	22.5	5	0	0	1
21	36	30.600000000000009	5	0	0	1
116	117	64.799999999999997	5	0	0	1
118	22	22.5	5	0	0	1
24	39	30.599999999999998	5	0	0	1
119	120	64.799999999999997	5	0	0	1
121	25	22.500000000302755	5	0	0	1
27	30	30.599999999999994	5	0	0	1
122	123	64.799999999886026	5	0	0	1
28	112	22.5	5	0	0	1
123	113	25.200000000000003	5	0	0	1
31	115	22.5	5	0	0	1
114	116	25.199999999999989	5	0	0	1
34	118	22.5	5	0	0	1
117	119	25.200000000000003	5	0	0	1
37	121	22.500000000302734	5	0	0	1
120	122	25.199999999929489	5	0	0	1
124	47	23.400000000000006	5	0	0	0
125	50	14.624989658000004	5	0	0	0
126	51	23.400000000000006	5	0	0	3
127	54	14.624989619999994	5	0	0	3
55	124	23.399999999999999	5	0	0	0
58	125	14.624989657999997	5	0	0	0
59	126	23.400000000000006	5	0	0	3
62	127	14.624989599999992	5	0	0	3
128	42	37.769458118000003	5	0	0	0
129	63	37.769458119999996	5	0	0	0
130	65	37.769458119999996	5	0	0	0
131	67	37.769458119999996	5	0	0	0
43	129	37.769458118000003	5	0	0	0
69	130	37.769458119999996	5	0	0	0
71	131	37.769458100000008	5	0	0	0
73	128	37.769458120000003	5	0	0	0
84	86	18	5	0	0	0
87	89	18	5	0	0	0
90	92	18	5	0	0	0
93	95	18	5	0	0	0
98	96	18	5	0	0	0
101	99	18	5	0	0	0
104	102	18	5	0	0	0
107	105	18	5	0	0	0
[NumHoles] = 1
-0.10000000000000001	-0.10000000000000001	0
[NumBlockLabels] = 14
-8.5	22.899999999999999	4	-1	0	21.374692140000001	4	1
22.300000000000001	8.8000000000000007	4	-1	0	111.37469213999999	5	1
9.1999999999999993	-21.800000000000001	4	-1	0	201.37469214000001	6	1
-21.699999999999999	-7.5	4	-1	0	291.37469213999998	7	1
-20.399999999999999	9	3	-1	1	0	2	1
-9.1999999999999993	-17.600000000000001	3	-1	1	0	3	1
-1.3	23.5	2	-1	0	0	8	1
22.399999999999999	2.6000000000000001	2	-1	0	0	8	1
-0.80000000000000004	-27.300000000000001	2	-1	0	0	8	1
-24.300000000000001	-1.3	2	-1	0	0	8	1
-5.9999999999999334	-1.7999999999999792	2	-1	0	0	1	1
7.7000000000000002	18.699999999999999	3	-1	1	0	10	1
19.199999999999999	-8.3000000000000007	3	-1	1	0	11	1
-15.699999999999999	-6	1	-1	0	0	9	1
showconsole()
clearconsole()
print("Calculate flux per unit stack length")
open('zip0042.fem')
handle=openfile("fluxperstack.txt","a")
for n=0,100,1 do
    mi_analyze()
    mi_loadsolution()
    mo_seteditmode('area')
mo_clearblock()
    mo_groupselectblock(2)
    a1=mo_blockintegral(1)
    mo_groupselectblock(3)
    a2=mo_blockintegral(1)
    csa=mo_blockintegral(5)
stack=17.5e-3
    flux=(a1-a2)/csa*stack
write(handle,flux,"\n")
    print(n*0.9,flux)
    mi_seteditmode("group")
    mi_selectgroup(1)
    mi_moverotate(0,0,0.9)
 mo_close()
end
closefile(handle)

Attachment: flux.tif
Description: flux.tif