SHOW:
|
|
- or go back to the newest paste.
1 | !/PMACRO | |
2 | /title,Torque Transmission between Magnetic Gears Bridged by Iron Pole | |
3 | !David Shekhtman, Cooper Union Mechanical Engineer | |
4 | !Advised by Professor Wolf, Cooper Union Professor and Chair of Physics | |
5 | ! /nopr | |
6 | ||
7 | npts=92 | |
8 | *dim,dist,table,npts | |
9 | *dim,F,table,npts,2 | |
10 | pheta=0.0 ! Angle of Gear Rotation | |
11 | ||
12 | *do,i,1,npts,1 | |
13 | ||
14 | parsave,all ! Save all parameters | |
15 | /clear,nostart ! Do not reread the start file (look up) | |
16 | parres ! Read saved parameters | |
17 | ||
18 | ! ***Design Parameters in SI units | |
19 | ||
20 | *AFUN,RAD ! Angular functions set to radians | |
21 | Pi=acos(-1) ! Define Pi | |
22 | muo=4*Pi*1e-7 ! Free Space Permeability (Close Enough) | |
23 | rema=1.2 ! Remanance of a NdFeB magnet | |
24 | *AFUN,DEG ! Angular functions set to degrees | |
25 | gap=0.03175 ! Radial Offset between Gears (1.25in) | |
26 | ||
27 | xxo=0 ! Location of Center of the Pole's arc | |
28 | yyo=0 | |
29 | zzo=0 | |
30 | rpo1=0.0313 ! Outer Radius of Iron Pole 1.1875in now btw 1.23in and 1.24in | |
31 | rpi1=.0254 ! Inner Radius of Iron Pole 1.000in | |
32 | axl3=0.002794 ! Axial Length of the Pole 0.11in | |
33 | plang=10 | |
34 | ||
35 | ror=0.035 | |
36 | ||
37 | ||
38 | ||
39 | ||
40 | ro1=0.0210503 ! Radius of Tooth Location of Magnetic Gear | |
41 | ww1=0.003175 ! Width of magnet from center (0.125in) | |
42 | hh1=0.00238125 ! Height of Magnet from center (0.09375in) | |
43 | dep1=0.003175 ! Thickness of Magnet from center (0.125in) | |
44 | ||
45 | xx1=0-ro1*sin(pheta) ! Location of Magnet 1 in Global Coord | |
46 | yy1=0+ro1*cos(pheta) | |
47 | zz1=0 | |
48 | ||
49 | xx2=ro1*cos(45)*cos(pheta)-ro1*sin(45)*sin(pheta) ! Location of Magnet 2 in Global Coord | |
50 | yy2=ro1*cos(45)*sin(pheta)+ro1*sin(45)*cos(pheta) | |
51 | zz2=0 | |
52 | ||
53 | xx3=ro1*cos(pheta)-0 ! Location of Magnet 3 in Global Coord | |
54 | yy3=ro1*sin(pheta)+0 | |
55 | zz3=0 | |
56 | ||
57 | xx4=ro1*cos(45)*cos(pheta)+ro1*sin(45)*sin(pheta) ! Location of Magnet 4 in Global Coord | |
58 | yy4=ro1*cos(45)*sin(pheta)-ro1*sin(45)*cos(pheta) | |
59 | zz4=0 | |
60 | ||
61 | xx5=0+ro1*sin(pheta) ! Location of Magnet 5 in Global Coord | |
62 | yy5=0-ro1*cos(pheta) | |
63 | zz5=0 | |
64 | ||
65 | xx6=-ro1*cos(45)*cos(pheta)+ro1*sin(45)*sin(pheta) ! Location of Magnet 6 in Global Coord | |
66 | yy6=-ro1*cos(45)*sin(pheta)-ro1*sin(45)*cos(pheta) | |
67 | zz6=0 | |
68 | ||
69 | xx7=-ro1*cos(pheta)-0 ! Location of Magnet 7 in Global Coord | |
70 | yy7=-ro1*sin(pheta)+0 | |
71 | zz7=0 | |
72 | ||
73 | xx8=-ro1*cos(45)*cos(pheta)-ro1*sin(45)*sin(pheta) ! Location of Magnet 8 in Global Coord | |
74 | yy8=-ro1*cos(45)*sin(pheta)+ro1*sin(45)*cos(pheta) | |
75 | zz8=0 | |
76 | ||
77 | xx17=0 ! Location of Magnet 9 in Global Coord | |
78 | yy17=ror | |
79 | zz17=0 | |
80 | ||
81 | xx18=ror*cos(45) ! Location of Magnet 10 in Global Coord | |
82 | yy18=ror*sin(45) | |
83 | zz18=0 | |
84 | ||
85 | xx19=ror ! Location of Magnet 11 in Global Coord | |
86 | yy19=0 | |
87 | zz19=0 | |
88 | ||
89 | xx20=ror*cos(315) ! Location of Magnet 12 in Global Coord | |
90 | yy20=ror*sin(315) | |
91 | zz20=0 | |
92 | ||
93 | xx21=0 ! Location of Magnet 13 in Global Coord | |
94 | yy21=-ror | |
95 | zz21=0 | |
96 | ||
97 | xx22=ror*cos(225) | |
98 | yy22=ror*sin(225) | |
99 | zz22=0 | |
100 | ||
101 | xx23=-ror | |
102 | yy23=0 | |
103 | zz23=0 | |
104 | ||
105 | xx24=ror*cos(135) | |
106 | yy24=ror*sin(135) | |
107 | zz24=0 | |
108 | ||
109 | ||
110 | aa = 0.100 ! xlength of Air Enclosure | |
111 | bb = 0.050 ! ylength of Air Enclosure | |
112 | cc = 0.050 ! zlength of Air Enclosure | |
113 | ||
114 | ! ***Create Model | |
115 | /prep7 | |
116 | EMUNIT, MKS ! Defines MUZERO and EPZERO | |
117 | ET,1,SOLID236 ! Define Element 1 as Solid236 | |
118 | KEYOPT,1,7,1 | |
119 | MP,MURX,1,1 ! Relative Permeability of Air | |
120 | MP,MURX,2,4000 ! Relative Permeability of Iron (Electrical Steel Wiki) | |
121 | mp,mury,2,4000 | |
122 | mp,murz,2,4000 | |
123 | ||
124 | ||
125 | !MP,MGZZ,2,0.6/muo ! Coersive force z-axis of coord sys 11 and 12 | |
126 | HC=25 !(A/m) | |
127 | TB,BH,2 ! B-H curve for material 2 | |
128 | TBPT,DEFI,-25+HC,0 ! Shifted B-H curve (H,B) | |
129 | TBPT,,-24+HC,0.6 ! First field defaults to "DEFI" | |
130 | TBPT,,-24.5+HC,1.0 | |
131 | TBPT,,-0.1+HC,1.2 | |
132 | TBPT,,0+HC,1.6 | |
133 | TBPLOT,BH,2 ! Plot of B vs. H | |
134 | MP,MURX,3,1.05 ! Relative Permeability of a NdFeB Magnet | |
135 | MP,MGZZ,3,rema/muo ! Coersive force z-axis of coord sys 11 and 12 | |
136 | ||
137 | ||
138 | ! ***Geometry via Direct Generation | |
139 | ! ***Gear Magnets | |
140 | LOCAL,11,0,xx1,yy1,zz1,pheta,-90,0 ! Define new local coord system for magnet 1 (Active) | |
141 | WPCSYS,1,11 ! Align new working plane with local coord sys 11 | |
142 | BLOCK,-ww1,ww1,-dep1,dep1,-hh1,hh1 ! Magnet 1 | |
143 | ||
144 | LOCAL,12,0,xx2,yy2,zz2,45+pheta,0,-90 ! Define new local coord system for magnet 2 (Active) | |
145 | WPCSYS,1,12 ! Align new working plane with local coord sys 12 | |
146 | BLOCK,-dep1,dep1,-ww1,ww1,-hh1,hh1 ! Magnet 2 | |
147 | ||
148 | LOCAL,13,0,xx3,yy3,zz3,pheta,0,90 ! Define new local coord system for magnet 3 (Active) | |
149 | WPCSYS,1,13 ! Align new working plane with local coord sys 13 | |
150 | BLOCK,-dep1,dep1,-ww1,ww1,-hh1,hh1 ! Magnet 3 | |
151 | ||
152 | LOCAL,14,0,xx4,yy4,zz4,pheta-45,0,-90 ! Define new local coord system for magnet 4 (Active) | |
153 | WPCSYS,1,14 ! Align new working plane with local coord sys 14 | |
154 | BLOCK,-dep1,dep1,-ww1,ww1,-hh1,hh1 ! Magnet 4 | |
155 | ||
156 | LOCAL,15,0,xx5,yy5,zz5,pheta,90,0 ! Define new local coord system for magnet 5 (Active) | |
157 | WPCSYS,1,15 ! Align new working plane with local coord sys 15 | |
158 | BLOCK,-ww1,ww1,-dep1,dep1,-hh1,hh1 ! Magnet 5 | |
159 | ||
160 | LOCAL,16,0,xx6,yy6,zz6,-45+pheta,-90,0 ! Define new local coord system for magnet 6 (Active) | |
161 | WPCSYS,1,16 ! Align new working plane with local coord sys 16 | |
162 | BLOCK,-ww1,ww1,-dep1,dep1,-hh1,hh1 ! Magnet 6 | |
163 | ||
164 | LOCAL,17,0,xx7,yy7,zz7,pheta,0,-90 ! Define new local coord system for magnet 7 (Active) | |
165 | WPCSYS,1,17 ! Align new working plane with local coord sys 17 | |
166 | BLOCK,-dep1,dep1,-ww1,ww1,-hh1,hh1 ! Magnet 7 | |
167 | ||
168 | LOCAL,18,0,xx8,yy8,zz8,pheta-45,0,90 ! Define new local coord system for magnet 8 (Active) | |
169 | WPCSYS,1,18 ! Align new working plane with local coord sys 18 | |
170 | BLOCK,-dep1,dep1,-ww1,ww1,-hh1,hh1 ! Magnet 8 | |
171 | ||
172 | CSYS,0 ! Activate Global Cartesian Coord Sys | |
173 | WPCSYS,1,0 ! Define working plane aligned with global coord sys 0 | |
174 | ! ***Iron Poles | |
175 | CYLIND,rpo1,rpi1,-(axl3)/2,(axl3)/2,90-plang,90+plang ! Iron Pole 9 | |
176 | CYLIND,rpo1,rpi1,-(axl3)/2,(axl3)/2,45-plang,45+plang ! Iron Pole 10 | |
177 | CYLIND,rpo1,rpi1,-(axl3)/2,(axl3)/2,0-plang,0+plang ! Iron Pole 11 | |
178 | CYLIND,rpo1,rpi1,-(axl3)/2,(axl3)/2,315-plang,315+plang ! Iron Pole 12 | |
179 | ||
180 | CYLIND,rpo1,rpi1,-(axl3)/2,(axl3)/2,270-plang,270+plang ! Iron Pole 13 | |
181 | CYLIND,rpo1,rpi1,-(axl3)/2,(axl3)/2,225-plang,225+plang ! Iron Pole 14 | |
182 | CYLIND,rpo1,rpi1,-(axl3)/2,(axl3)/2,180-plang,180+plang ! Iron Pole 15 | |
183 | CYLIND,rpo1,rpi1,-(axl3)/2,(axl3)/2,135-plang,135+plang ! Iron Pole 16 | |
184 | ||
185 | ||
186 | !Interested in _fysum on poles | |
187 | LOCAL,19,0,xx17,yy17,zz17,90,0,0 ! Define new local coord system for pole 9 (Active) | |
188 | LOCAL,20,0,xx18,yy18,zz18,45,0,0 ! Define new local coord system for pole 10 (Active) | |
189 | LOCAL,21,0,xx19,yy19,zz19,0,0,0 ! Define new local coord system for pole 11 (Active) | |
190 | LOCAL,22,0,xx20,yy20,zz20,315,0,0 ! Define new local coord system for pole 12 (Active) | |
191 | LOCAL,23,0,xx21,yy21,zz21,270,0,0 ! Define new local coord system for pole 13 (Active) | |
192 | LOCAL,24,0,xx22,yy22,zz23,225,0,0 ! Define new local coord system for pole 14 (Active) | |
193 | LOCAL,25,0,xx23,yy23,zz23,180,0,0 ! Define new local coord system for pole 15 (Active) | |
194 | LOCAL,26,0,xx24,yy24,zz24,135,0,0 ! Define new local coord system for pole 16 (Active) | |
195 | ||
196 | ||
197 | ||
198 | ||
199 | LOCAL,27,0,xx17,yy17,zz17,0,-90,0 ! Define new local coord system for magnet 17 (Active) | |
200 | WPCSYS,1,27 ! Align new working plane with local coord sys 27 | |
201 | BLOCK,-dep1,dep1,-ww1,ww1,-hh1,hh1 ! Magnet 17 | |
202 | ||
203 | LOCAL,28,0,xx18,yy18,zz18,-45,90,0 ! Define new local coord system for magnet 18 (Active) | |
204 | WPCSYS,1,28 ! Align new working plane with local coord sys 28 | |
205 | BLOCK,-dep1,dep1,-ww1,ww1,-hh1,hh1 ! Magnet 18 | |
206 | ||
207 | LOCAL,29,0,xx19,yy19,zz19,270,-90,0 ! Define new local coord system for magnet 19 (Active) | |
208 | WPCSYS,1,29 ! Align new working plane with local coord sys 29 | |
209 | BLOCK,-dep1,dep1,-ww1,ww1,-hh1,hh1 ! Magnet 19 | |
210 | ||
211 | LOCAL,30,0,xx20,yy20,zz20,-135,90,0 ! Define new local coord system for magnet 20 (Active) | |
212 | WPCSYS,1,30 ! Align new working plane with local coord sys 30 | |
213 | BLOCK,-dep1,dep1,-ww1,ww1,-hh1,hh1 ! Magnet 20 | |
214 | ||
215 | LOCAL,31,0,xx21,yy21,zz21,-180,-90,0 ! Define new local coord system for magnet 21 (Active) | |
216 | WPCSYS,1,31 ! Align new working plane with local coord sys 31 | |
217 | BLOCK,-dep1,dep1,-ww1,ww1,-hh1,hh1 ! Magnet 21 | |
218 | ||
219 | LOCAL,32,0,xx22,yy22,zz22,-225,90,0 ! Define new local coord system for magnet 22 (Active) | |
220 | WPCSYS,1,32 ! Align new working plane with local coord sys 32 | |
221 | BLOCK,-dep1,dep1,-ww1,ww1,-hh1,hh1 ! Magnet 22 | |
222 | ||
223 | LOCAL,33,0,xx23,yy23,zz23,90,-90,0 ! Define new local coord system for magnet 23 (Active) | |
224 | WPCSYS,1,33 ! Align new working plane with local coord sys 33 | |
225 | BLOCK,-dep1,dep1,-ww1,ww1,-hh1,hh1 ! Magnet 23 | |
226 | ||
227 | LOCAL,34,0,xx24,yy24,zz24,-315,90,0 ! Define new local coord system for magnet 24 (Active) | |
228 | WPCSYS,1,34 ! Align new working plane with local coord sys 34 | |
229 | BLOCK,-dep1,dep1,-ww1,ww1,-hh1,hh1 ! Magnet 24 | |
230 | ||
231 | ||
232 | CSYS,0 ! Activate Global Cartesian Coord Sys | |
233 | WPCSYS,1,0 ! Define working plane aligned with global coord sys 0 | |
234 | ||
235 | ||
236 | ||
237 | ||
238 | ||
239 | ! ***Air Enclosure (box) | |
240 | BLOCK,-aa,aa,-bb,bb,-cc,cc ! Air Enclosure | |
241 | VOVLAP,all ! Allow Air Enclosure to Overlap all Volume Elements | |
242 | numcmp,volu ! Number compression for volumes (Important) | |
243 | VPLOT,1,24,1 ! Plot all volumes except for Air Enclosure | |
244 | ||
245 | ! ***Assigning material Attributes | |
246 | ! VSEL,type,item,comp,vmin,vmax,vinc,ksep | |
247 | ! VATT,mat,real,type,esys,secnum | |
248 | ||
249 | VSEL,S,VOLU,,1 ! Seclect Volume 1 magnet 1 | |
250 | VATT,3,,1,11 ! Volume 1 is ndfeB. Coord sys 11 | |
251 | VSEL,S,VOLU,,2 ! Seclect Volume 2 magnet 2 | |
252 | VATT,3,,1,12 ! Volume 2 is ndfeB. Coord sys 12 | |
253 | VSEL,S,VOLU,,3 ! Seclect Volume 3 magnet 3 | |
254 | VATT,3,,1,13 ! Volume 3 is ndfeB. Coord sys 13 | |
255 | VSEL,S,VOLU,,4 ! Seclect Volume 4 magnet 4 | |
256 | VATT,3,,1,14 ! Volume 4 is ndfeB. Coord sys 14 | |
257 | VSEL,S,VOLU,,5 ! Seclect Volume 5 magnet 5 | |
258 | VATT,3,,1,15 ! Volume 5 is ndfeB. Coord sys 15 | |
259 | VSEL,S,VOLU,,6 ! Seclect Volume 6 magnet 6 | |
260 | VATT,3,,1,16 ! Volume 6 is ndfeB. Coord sys 16 | |
261 | VSEL,S,VOLU,,7 ! Seclect Volume 7 magnet 7 | |
262 | VATT,3,,1,17 ! Volume 7 is ndfeB. Coord sys 17 | |
263 | VSEL,S,VOLU,,8 ! Seclect Volume 8 magnet 8 | |
264 | VATT,3,,1,18 ! Volume 8 is ndfeB. Coord sys 18 | |
265 | ||
266 | VSEL,S,VOLU,,9 ! Seclect Volume 9 pole 9 | |
267 | VATT,2,,1,27 ! Volume 9 is ndfeB. Coord sys 27 | |
268 | VSEL,S,VOLU,,10 ! Seclect Volume 10 pole 10 | |
269 | VATT,2,,1,28 ! Volume 10 is ndfeB. Coord sys 28 | |
270 | VSEL,S,VOLU,,11 ! Seclect Volume 11 pole 11 | |
271 | VATT,2,,1,29 ! Volume 11 is ndfeB. Coord sys 29 | |
272 | VSEL,S,VOLU,,12 ! Seclect Volume 12 pole 12 | |
273 | VATT,2,,1,30 ! Volume 12 is ndfeB. Coord sys 30 | |
274 | VSEL,S,VOLU,,13 ! Seclect Volume 13 pole 13 | |
275 | VATT,2,,1,31 ! Volume 13 is ndfeB. Coord sys 31 | |
276 | VSEL,S,VOLU,,14 ! Seclect Volume 13 pole 14 | |
277 | VATT,2,,1,32 ! Volume 13 is ndfeB. Coord sys 32 | |
278 | VSEL,S,VOLU,,15 ! Seclect Volume 13 pole 15 | |
279 | VATT,2,,1,33 ! Volume 13 is ndfeB. Coord sys 33 | |
280 | VSEL,S,VOLU,,16 ! Seclect Volume 13 pole 16 | |
281 | VATT,2,,1,34 ! Volume 13 is ndfeB. Coord sys 34 | |
282 | ||
283 | VSEL,S,VOLU,,17 ! Seclect Volume 1 magnet 1 | |
284 | VATT,3,,1,27 ! Volume 1 is ndfeB. Coord sys 11 | |
285 | VSEL,S,VOLU,,18 ! Seclect Volume 2 magnet 2 | |
286 | VATT,3,,1,28 ! Volume 2 is ndfeB. Coord sys 12 | |
287 | VSEL,S,VOLU,,19 ! Seclect Volume 3 magnet 3 | |
288 | VATT,3,,1,29 ! Volume 3 is ndfeB. Coord sys 13 | |
289 | VSEL,S,VOLU,,20 ! Seclect Volume 4 magnet 4 | |
290 | VATT,3,,1,30 ! Volume 4 is ndfeB. Coord sys 14 | |
291 | VSEL,S,VOLU,,21 ! Seclect Volume 5 magnet 5 | |
292 | VATT,3,,1,31 ! Volume 5 is ndfeB. Coord sys 15 | |
293 | VSEL,S,VOLU,,22 ! Seclect Volume 6 magnet 6 | |
294 | VATT,3,,1,32 ! Volume 6 is ndfeB. Coord sys 16 | |
295 | VSEL,S,VOLU,,23 ! Seclect Volume 7 magnet 7 | |
296 | VATT,3,,1,33 ! Volume 7 is ndfeB. Coord sys 17 | |
297 | VSEL,S,VOLU,,24 ! Seclect Volume 8 magnet 8 | |
298 | VATT,3,,1,34 ! Volume 8 is ndfeB. Coord sys 18 | |
299 | ||
300 | ||
301 | VSEL,S,VOLU,,25 ! Seclect Volume 25 air enclosure | |
302 | VATT,1,,1,0 ! Volume 25 is air. Coord sys 0 | |
303 | ||
304 | ! ***Meshing Procedure | |
305 | ! ***Meshing Left Magnet | |
306 | VSEL,S,VOLU,,1,8,1 ! Seclect Volumes 1 through 8 | |
307 | VSEL,A,VOLU,,17,24,1 ! Seclect Volumes 17 through 24 | |
308 | ESIZE,,6 ! Global # of Meshing Element Divisions | |
309 | MSHKEY,1 ! Mapped Volume Mesh | |
310 | MSHAPE,0,3D ! Using Hexahedral Elements | |
311 | VMESH,1,13,1 ! Mesh volumes 1 through 13 | |
312 | VMESH,17,24,1 ! Mesh volumes 17 through 24 | |
313 | ||
314 | VSEL,S,VOLU,,9,16,1 ! Seclect Volume 25 | |
315 | ESIZE,,8 ! Global # of Meshing Element Divisions | |
316 | MSHKEY,1 ! Mapped Volume Mesh | |
317 | MSHAPE,0,3D ! Using Hexahedral Elements | |
318 | VSWEEP,9 ! Mesh via sweeping volume 9 | |
319 | VSWEEP,10 ! Mesh via sweeping volume 10 | |
320 | VSWEEP,11 ! Mesh via sweeping volume 11 | |
321 | VSWEEP,12 ! Mesh via sweeping volume 12 | |
322 | VSWEEP,13 ! Mesh via sweeping volume 13 | |
323 | VSWEEP,14 ! Mesh via sweeping volume 14 | |
324 | VSWEEP,15 ! Mesh via sweeping volume 15 | |
325 | VSWEEP,16 ! Mesh via sweeping volume 16 | |
326 | ||
327 | ||
328 | ||
329 | ! ***Meshing Air Enclosure | |
330 | VSEL,S,VOLU,,25 ! Seclect Volume 25 | |
331 | ESIZE,,6 ! Global # of Meshing Element Divisions | |
332 | MSHKEY,0 ! Free Volume Mesh | |
333 | MSHAPE,1,3D ! Using Tetrahedrals | |
334 | MOPT,PYRA,ON ! Allow pyramid transitioning | |
335 | VMESH,25 ! Mesh volume 25 | |
336 | ||
337 | !NSEL,s,ext | |
338 | !D,ALL,AZ,0 ! Flux-Parallel Boundary Condition | |
339 | ||
340 | ||
341 | ASEL,S,LOC,Z,cc ! Z SYMMETRY PLANE: FLUX PARALLEL approach from pg.1370 vm121 verfication manual | |
342 | DA,ALL,AZ,0 ! Flux-Parallel Boundary Condition Set AZ = 0 (important for edge formulation) | |
343 | FINISH ! Finish Preprocessing | |
344 | ||
345 | /SOLU | |
346 | SOLVE ! SOLVE macro for mag vector potential solution MAGSOLVE,0 | |
347 | FINISH | |
348 | ||
349 | ! ***Postprocessor | |
350 | /Post1 | |
351 | /NERR,,,-1 | |
352 | vsel,s,,,1,,,1 ! Select Everything in Volume one (corrected) | |
353 | RSYS,11 ! Activate Local Coordinate System 11 | |
354 | esln ! Selects those elements attached to the selected nodes | |
355 | EMFT ! Sum up magnetic forces | |
356 | fx1=_fxsum | |
357 | fy1=_fysum | |
358 | allsel | |
359 | ||
360 | vsel,s,,,2,,,1 ! Select Everything in Volume two (corrected) | |
361 | RSYS,12 ! Activate Global Coordinate System | |
362 | esln ! Selects those elements attached to the selected nodes | |
363 | EMFT ! Sum up magnetic forces | |
364 | fx2=_fxsum | |
365 | fy2=_fysum | |
366 | allsel | |
367 | ||
368 | vsel,s,,,3,,,1 ! Select Everything in Volume three (corrected) | |
369 | RSYS,13 ! Activate coord sys 13 | |
370 | esln ! Selects those elements attached to the selected nodes | |
371 | EMFT ! Sum up magnetic forces | |
372 | allsel | |
373 | fz3=_fzsum | |
374 | fy3=_fysum | |
375 | ||
376 | vsel,s,,,4,,,1 ! Select Everything in Volume four (corrected) | |
377 | RSYS,14 ! Activate Global Coordinate System | |
378 | esln ! Selects those elements attached to the selected nodes | |
379 | EMFT ! Sum up magnetic forces | |
380 | fz4=_fzsum | |
381 | fy4=_fysum | |
382 | allsel | |
383 | ||
384 | vsel,s,,,5,,,1 ! Select Everything in Volume 15 (corrected) | |
385 | RSYS,15 ! Activate Global Coordinate System | |
386 | esln ! Selects those elements attached to the selected nodes | |
387 | EMFT ! Sum up magnetic forces | |
388 | fx5=_fxsum | |
389 | fy5=_fysum | |
390 | allsel | |
391 | ||
392 | vsel,s,,,6,,,1 ! Select Everything in Volume 16 (corrected) | |
393 | RSYS,16 ! Activate Global Coordinate System | |
394 | esln ! Selects those elements attached to the selected nodes | |
395 | EMFT ! Sum up magnetic forces | |
396 | fx6=_fxsum | |
397 | fy6=_fysum | |
398 | allsel | |
399 | ||
400 | vsel,s,,,7,,,1 ! Select Everything in Volume four (corrected) | |
401 | RSYS,17 ! Activate Global Coordinate System | |
402 | esln ! Selects those elements attached to the selected nodes | |
403 | EMFT ! Sum up magnetic forces | |
404 | fx7=_fxsum | |
405 | fy7=_fysum | |
406 | allsel | |
407 | ||
408 | vsel,s,,,8,,,1 ! Select Everything in Volume one (corrected) | |
409 | RSYS,18 ! Activate Local Coordinate System 18 | |
410 | esln ! Selects those elements attached to the selected nodes | |
411 | EMFT ! Sum up magnetic forces | |
412 | fx8=_fxsum | |
413 | fy8=_fysum | |
414 | allsel | |
415 | ||
416 | ||
417 | !Forces on poles | |
418 | vsel,s,,,9,,,1 ! Select Everything in Volume 9 (corrected) | |
419 | RSYS,19 ! Activate Local Coordinate System 19 | |
420 | esln ! Selects those elements attached to the selected nodes | |
421 | EMFT ! Sum up magnetic forces | |
422 | fx9=_fxsum | |
423 | fy9=_fysum | |
424 | allsel | |
425 | ||
426 | vsel,s,,,10,,,1 ! Select Everything in Volume 10 (corrected) | |
427 | RSYS,20 ! Activate Local Coordinate System 20 | |
428 | esln ! Selects those elements attached to the selected nodes | |
429 | EMFT ! Sum up magnetic forces | |
430 | fx10=_fxsum | |
431 | fy10=_fysum | |
432 | allsel | |
433 | ||
434 | vsel,s,,,11,,,1 ! Select Everything in Volume 11 (corrected) | |
435 | RSYS,21 ! Activate Local Coordinate System 21 | |
436 | esln ! Selects those elements attached to the selected nodes | |
437 | EMFT ! Sum up magnetic forces | |
438 | fx11=_fxsum | |
439 | fy11=_fysum | |
440 | allsel | |
441 | ||
442 | vsel,s,,,12,,,1 ! Select Everything in Volume 12 (corrected) | |
443 | RSYS,22 ! Activate Local Coordinate System 22 | |
444 | esln ! Selects those elements attached to the selected nodes | |
445 | EMFT ! Sum up magnetic forces | |
446 | fx12=_fxsum | |
447 | fy12=_fysum | |
448 | allsel | |
449 | ||
450 | vsel,s,,,13,,,1 ! Select Everything in Volume 13 (corrected) | |
451 | RSYS,23 ! Activate Local Coordinate System 23 | |
452 | esln ! Selects those elements attached to the selected nodes | |
453 | EMFT ! Sum up magnetic forces | |
454 | fx13=_fxsum | |
455 | fy13=_fysum | |
456 | allsel | |
457 | ||
458 | vsel,s,,,14,,,1 ! Select Everything in Volume 14 (corrected) | |
459 | RSYS,24 ! Activate Local Coordinate System 24 | |
460 | esln ! Selects those elements attached to the selected nodes | |
461 | EMFT ! Sum up magnetic forces | |
462 | fx14=_fxsum | |
463 | fy14=_fysum | |
464 | allsel | |
465 | ||
466 | vsel,s,,,15,,,1 ! Select Everything in Volume 15 (corrected) | |
467 | RSYS,25 ! Activate Local Coordinate System 25 | |
468 | esln ! Selects those elements attached to the selected nodes | |
469 | EMFT ! Sum up magnetic forces | |
470 | fx15=_fxsum | |
471 | fy15=_fysum | |
472 | allsel | |
473 | ||
474 | vsel,s,,,16,,,1 ! Select Everything in Volume 16 (corrected) | |
475 | RSYS,26 ! Activate Local Coordinate System 26 | |
476 | esln ! Selects those elements attached to the selected nodes | |
477 | EMFT ! Sum up magnetic forces | |
478 | fx16=_fxsum | |
479 | fy16=_fysum | |
480 | allsel | |
481 | ||
482 | vsel,s,,,17,,,1 ! Select Everything in Volume 9 (corrected) | |
483 | RSYS,19 ! Activate Local Coordinate System 19 | |
484 | esln ! Selects those elements attached to the selected nodes | |
485 | EMFT ! Sum up magnetic forces | |
486 | fx17=_fxsum | |
487 | fy17=_fysum | |
488 | allsel | |
489 | ||
490 | vsel,s,,,18,,,1 ! Select Everything in Volume 10 (corrected) | |
491 | RSYS,20 ! Activate Local Coordinate System 20 | |
492 | esln ! Selects those elements attached to the selected nodes | |
493 | EMFT ! Sum up magnetic forces | |
494 | fx18=_fxsum | |
495 | fy18=_fysum | |
496 | allsel | |
497 | ||
498 | vsel,s,,,19,,,1 ! Select Everything in Volume 11 (corrected) | |
499 | RSYS,21 ! Activate Local Coordinate System 21 | |
500 | esln ! Selects those elements attached to the selected nodes | |
501 | EMFT ! Sum up magnetic forces | |
502 | fx19=_fxsum | |
503 | fy19=_fysum | |
504 | allsel | |
505 | ||
506 | vsel,s,,,20,,,1 ! Select Everything in Volume 12 (corrected) | |
507 | RSYS,22 ! Activate Local Coordinate System 22 | |
508 | esln ! Selects those elements attached to the selected nodes | |
509 | EMFT ! Sum up magnetic forces | |
510 | fx20=_fxsum | |
511 | fy20=_fysum | |
512 | allsel | |
513 | ||
514 | vsel,s,,,21,,,1 ! Select Everything in Volume 13 (corrected) | |
515 | RSYS,23 ! Activate Local Coordinate System 23 | |
516 | esln ! Selects those elements attached to the selected nodes | |
517 | EMFT ! Sum up magnetic forces | |
518 | fx21=_fxsum | |
519 | fy21=_fysum | |
520 | allsel | |
521 | ||
522 | vsel,s,,,22,,,1 ! Select Everything in Volume 14 (corrected) | |
523 | RSYS,24 ! Activate Local Coordinate System 24 | |
524 | esln ! Selects those elements attached to the selected nodes | |
525 | EMFT ! Sum up magnetic forces | |
526 | fx22=_fxsum | |
527 | fy22=_fysum | |
528 | allsel | |
529 | ||
530 | vsel,s,,,23,,,1 ! Select Everything in Volume 15 (corrected) | |
531 | RSYS,25 ! Activate Local Coordinate System 25 | |
532 | esln ! Selects those elements attached to the selected nodes | |
533 | EMFT ! Sum up magnetic forces | |
534 | fx23=_fxsum | |
535 | fy23=_fysum | |
536 | allsel | |
537 | ||
538 | vsel,s,,,24,,,1 ! Select Everything in Volume 16 (corrected) | |
539 | RSYS,26 ! Activate Local Coordinate System 26 | |
540 | esln ! Selects those elements attached to the selected nodes | |
541 | EMFT ! Sum up magnetic forces | |
542 | fx24=_fxsum | |
543 | fy24=_fysum | |
544 | allsel | |
545 | ||
546 | ||
547 | /VIEW,1,0,0,1 ! View Window 1 from angle 0,1,0 | |
548 | /VSCALE,1,0.75,0 ! Set for Relative Magnitude Vector Scaling (0.75 length) | |
549 | plvect,b,,,,vect,elem,on,on ! plot magnetic field | |
550 | /DIST,1,0.729,1 | |
551 | /REP,FAST | |
552 | /DIST,1,0.729,1 | |
553 | /REP,FAST | |
554 | /DIST,1,0.729,1 | |
555 | /REP,FAST | |
556 | /DIST,1,0.729,1 | |
557 | /REP,FAST | |
558 | /image,save,Magnetic Flux Density of Rotating Magnetic Field %i%.bmp | |
559 | plvect,fmag,,,,vect,node,on,on ! plot magnetic forces | |
560 | /image,save,Magnetic Forces Between Gears %i%.bmp | |
561 | ||
562 | allsel | |
563 | FINISH | |
564 | ||
565 | ||
566 | ||
567 | /com, i = %i% | |
568 | dist(i)=pheta | |
569 | !F(i,1)=_fxsum*cos(pheta)-_fysum*sin(pheta) | |
570 | !F(i,1)=fz3 | |
571 | F(i,1)=fy3+fy2+fy4+fx5+fx6-fx1-fy7-fy8 | |
572 | !F(i,2)=_fxsum*sin(pheta)+_fysum*cos(pheta) | |
573 | !F(i,2)=fy3+fy2+fy4+fx5+fx6-fx1-fy7-fy8 | |
574 | F(i,2)=fy9+fy10+fy11+fy12+fy13+fy14+fy15+fy16 | |
575 | !F(i,2)=fy17+fy18+fy19+fy20+fy21+fy22+fy23+fy24 | |
576 | pheta=pheta+1 | |
577 | *enddo | |
578 | ||
579 | /axlab,x,Angular Displacement (degrees) | |
580 | /axlab,y,Forces on Magnets 2,3,4 (N) | |
581 | !/axlab,y,Ftan Mag 1 to 8 (N) | |
582 | /gcol,1,Ft_inner | |
583 | /gcol,2,Ft_poles | |
584 | *vplot,dist(1),F(1,1),2 | |
585 | /image,save,not_Iron_Pole_Reg_Esize6_0_to_47.5deg %i%.bmp |