|
楼主 |
发表于 2007-6-20 17:07:19
|
显示全部楼层
更详细的求助了
请帮忙用有限元法做个同步电机电机磁场的模型相关程序(基于MATLAB)如下:% 1:air-gap, 2:culasse stator, 3: fer rotor,
) m C' |' f3 ]: U: @) L: J% 4-7: stator conductor, 28 - 29: rotor conductor+ S- T h( x1 M6 \+ c* T5 L
3 Z& Y9 c" e9 y* A3 U
tic; clear;clc; close all;. f0 z8 W. [5 a- F
+ W0 Q2 ?5 |: I3 m3 q2 h+ ?; i, i
/ E5 g# v( B' `, N: @- o
( {1 Z( I0 L3 P4 W% ------------- Draw the geometry of stator, rotor et air-gap --------------6 u g8 K# W( y1 [5 q
T4 ~0 C) a5 F$ |3 {- P+ [
entref=1e-3; % air-gap depth1 K$ B' G" q) H! u) U, J9 H
Rs=39.385e-3; % radius of (rotor+airgap)
- C, `8 A0 _8 q1 T0 A1 kRr=Rs-entref; % radius of rotor
( V1 w5 Y; s- @. w( X* a; qRc=71.75e-3; % radius of stator
2 T% ?# D4 R0 o0 `0 i& t2 H' {: _6 f; t# h5 F
Nb=140; % number of turns per phase
3 X: {, v) Z! i7 e, rLong=0.125; % longitude of machine in rotation axis direction0 u8 _( I" K2 e7 [
p=1; % ??
+ i' U: T) w' O6 `( W* Z, Yf=50; % ??# t" {, B! _2 \( V; h( ^( V% ~" H
% q. R2 `6 Z# Z1 g3 \
beta=35*pi/180; beta=beta/p; % culasse rotor6 L0 `# n- D% W- c* J j
beta1=50*pi/180; beta1=beta1/p; % epanouissement polaire/ s6 ~% m( j* A4 d( f. `5 ?. g
8 T% G( ^0 [* M) B# g9 \
dessinP1; % a sub-programme to draw the geometry of the machine section with the parameters defined above
6 s- N; b' D- o/ G& g" o6 H% --------------
; i- o4 _- v6 m+ c8 ] Y$ K: D3 v$ p' c
) w" j' T5 A. ^5 p( I# s/ S: m% ------------- Rotor positioning and initial mesh --------------4 q% n0 |$ Q+ T3 b
4 M0 b2 y& b+ H" w9 W% vaa=-30*pi/180; % initial angle of rotor. w \8 C3 Q I9 j
gr=groto(gr,(aa)); % rotating the rotor to the angle specified above using the sub-programme 'groto' ( g2 J- P4 B2 T
g=[gsf gr]; % stator + rotor given the whole machine geometry
) Q) l. ~# _9 C9 x% L8 rlimites; % a sub-programme defining the bondary condition
% {& |" ~9 l, Y9 D[p,e,t]=initmesh(g); % initial mesh for the partial differential equation resolution- u# i/ H6 B+ I/ K3 {8 S! `
" Y; d1 C" X! U" Q0 R1 Y! x% s) T
% ------------- mesh refine if necessary ------------
" @' u( R: s% |; b" i2 S* {! \ k* z& t% [p,e,t]=refinemesh(g,p,e,t,[1 30]);. U" z! t+ Y% M6 p* e7 v2 Y' B
% pdegplot(g); axis equal, hold on ; pdemesh(p,e,t), hold off
2 j. q- m) A" I$ E6 H K2 x j% pause
6 W4 p9 L6 F/ G" I% -------------------------------------. f2 m+ _1 H; H6 h) n
$ R, \; f' L* P/ h. ?& V
0 [. p1 O: a$ k9 }9 K' ?4 c0 l
+ \ z7 z; Z' F% ------------- specification of parameters required for calculation -------
, @* ^- x. t% i1 l kexc=0;
/ p2 \6 ]- _( x* l sigmaexc=kexc*5e6; % conductivity of rotor coil conductor
* v) C9 a& ^3 o4 [3 R! _ nuo=1/(4e-7*pi); % inverse of permeability of vacuum 6 ]7 h8 {8 G- ~+ [# g; E
murs=500; murr=500; % relative permeability of stator and rotor
/ X6 ?. d/ ^7 _& H 7 U7 n; z6 u6 k- g+ m
ks=1; kr=0; % ks=1 or 0: stator excited or not; kr=1 or 0: rotor excited or not.4 |6 T5 [, A5 @
. w" b+ b6 B& z' I% ^. K" Y
Jex1=0; Jex11=0;
1 O E! W; c6 R6 e" O8 n Jex2 = 10e6*ks; Jex21 = -Jex2;7 Z m1 I X$ o2 n) n
Jex3 = 0; Jex31 = 0;
+ }5 P, s+ E; C4 s0 V: a% Jex3=10e6*ks; Jex31=-Jex3; % current density of phase a (stator)0 H) c( W2 O# F6 A- u
% Jex1=-Jex3/2; Jex11=-Jex1; % current density of phase b (stator)
8 {: L; ?2 d) \' D% Jex2=-Jex3/2; Jex21=-Jex2; % current density of phase c (stator)
# c& V4 M" j: D9 N$ ?+ u( Z Jexr1=10e6*kr; Jexr2=-Jexr1; % current density of rotor excitation
5 R9 R' H3 R- [# f8 L
5 o/ v# K ~+ l2 z garnissageP1; % a sub-programme for the giving the current density and permeability at each mesh element3 S1 _' ?, _6 w% X; y; h
% ------------- / Y6 P2 ~0 i$ }# q* a3 W
9 ]( c$ r0 J4 k, u$ B9 g8 I7 e+ T+ M8 I/ g
* q6 ]0 m# `% |% ------------- resolution of the partial differential equation and figure ploting ---------
9 w6 G& b& x6 ]' a# F1 A% b9 J! F* O8 ` T' Y
u=assempde(bond,p,e,t,nu,0,J); % resolution of the partial differential equation" K( w/ ]9 j+ u
% U=ASSEMPDE(B,P,E,T,C,A,F) assembles and solves the PDE problem -div(c*grad(u))+a*u=f& m; U' K$ Z4 E. t
* W/ l' }; E% g0 z' u! D
figure (1), pdemesh(p,e,t), axis equal, title ('Mesh of the machine section')
) T4 M2 l% f1 Q2 o8 K$ a3 Hfigure (2), pdegplot(g); axis equal; hold on; pdecont(p,t,full(real(u)),30), hold off, title('Magnetic field distribution'), % plots using 30 levels.# P9 E5 k9 t. }( O" E
% ------------------------------" l9 k3 t+ `0 k
* D5 v9 k5 o0 q7 Z, a b
P0 Q7 ] }% s( t1 r' |" b
' J: f; W* Z! l5 F" P
% -------------- calculation of the energy stocked in the machine (energy sum in the magnetic field) --------------------
0 x+ u( ]' ~5 V; S! w a; t) o* D/ X: _- f0 k: x8 M9 f- V$ C
% [ux,uy]=pdegrad(p,t,u);6 b9 B; k( v8 a( Y* W
% bx=uy;! S/ f9 O- Z9 @! I7 o9 }
% by=-ux;* e& G- `# m3 L
% for i=1:length(bx);
) ]; M; p8 V; o5 d6 ^- d. _% b(i)=(bx(i)^2+by(i)^2)^.5;
$ A9 ?/ g. d- z4 U- K% end& N+ z% X! @' z4 _
% nu_e=1/(4e-7*pi);- {4 X, v9 x) q9 j% ^- y
% nu_c=nu_e;) V1 k* @( I# W! d, ^$ I3 K7 U4 Y
% nu_s=1/500*nu_e;
( [3 C" x0 r+ U" E2 P. N S8 Q9 \% nu_r=1/500*nu_e;
; j8 s4 L; q3 a5 L: O% h=sparse(1,ntrg);2 r4 h! e& ~- N) ?. a
% ind_e=find(t(4,:)==2);& {7 a" S4 C, X6 M' g" r3 h2 u) G k
% ind_s=find(t(4,:)==1);
" Y) v* N0 |+ H2 P6 W% ind_r=find(t(4,:)==3);; \& X$ E+ D# `/ {% W7 ? e# n/ ?
% ind_c=find((t(4,:)>=4) & (t(4,:)<=27));6 A3 Q4 ]5 h: i0 q+ P4 z& X+ k8 a
% h(ind_e)=nu_e*b(ind_e)';1 J3 s9 o5 Z2 B0 S" E, z
% h(ind_s)=nu_s*b(ind_s);- h9 m) S" }" u
% h(ind_r)=nu_r*b(ind_r);
3 o8 a3 ~+ S5 d& Q0 W% h(ind_c)=nu_c*b(ind_c)';
8 e+ N% v, c3 X' f5 e! M% aire=pdetrg(p,t);
5 m. ^8 L, `" k' D% vol_trg=Long*aire;! ?3 I' R6 s' i3 e6 X C, S
% energ_elem_e=1/2*(h(ind_e).*b(ind_e)').*vol_trg(ind_e);
/ D: k# O0 F; P2 Q& Y. G' K+ z% energ_tot_e=sum(energ_elem_e);7 w. [# r4 }$ B: x
% energ_elem_s=1/2*(h(ind_s).*b(ind_s)').*vol_trg(ind_s);, _- Y6 u/ d9 X& [
% energ_tot_s=sum(energ_elem_s);
& }! c! r; O$ w% energ_elem_r=1/2*(h(ind_r).*b(ind_r)').*vol_trg(ind_r);% U: q3 Z& v& D! v: K/ L( x
% energ_tot_r=sum(energ_elem_r);
0 I* m7 i% Q; ~) F% energ_elem_c=1/2*(h(ind_c).*b(ind_c)').*vol_trg(ind_c);
+ l$ N& U( u, J0 u% energ_tot_c=sum(energ_elem_c);
; K% G- g1 L) O' T' S6 R! E9 e9 V" l% energ_total=energ_tot_e+energ_tot_s+energ_tot_r+energ_tot_c;
- \9 {5 _7 v- r H' H' C* z" z% enr=energ_total;( @! i7 ?" k$ a
; q. Y% T* Q$ ktoc; |
|