|
|
楼主 |
发表于 2007-6-20 17:07:19
|
显示全部楼层
更详细的求助了
请帮忙用有限元法做个同步电机电机磁场的模型相关程序(基于MATLAB)如下:% 1:air-gap, 2:culasse stator, 3: fer rotor, + o( U1 z, S( h, w& k
% 4-7: stator conductor, 28 - 29: rotor conductor
, B5 j" f, b8 }3 ?
1 Z7 j: K4 _- J9 V. @' Ftic; clear;clc; close all;
; e8 @2 s1 J2 N2 y/ w# c) J7 V5 g
% v4 k0 G3 W$ p/ _9 F( i7 S% G* c# F# A4 o( q0 o6 }. a# Z7 }
% ------------- Draw the geometry of stator, rotor et air-gap --------------& ?) A% k0 W) q& o( n, Y
g, u" r. w' F: O: g$ M$ w
entref=1e-3; % air-gap depth
% j9 R+ b( F) r4 _3 SRs=39.385e-3; % radius of (rotor+airgap)
/ `( ?! n5 _$ t# fRr=Rs-entref; % radius of rotor
+ ]- {+ K, Y( X& o- hRc=71.75e-3; % radius of stator( Q, H; W* F, f% L* h
& d: H3 I6 w1 ~ m# [& CNb=140; % number of turns per phase
9 Y$ ^0 |8 ^. o: uLong=0.125; % longitude of machine in rotation axis direction
`1 R% x9 {- A6 L9 bp=1; % ??/ w, ?& a" ~: |/ d
f=50; % ??% K; ~/ j: v, w- ]: F6 S. T$ G
3 {* X P4 v* N6 z0 Z9 Lbeta=35*pi/180; beta=beta/p; % culasse rotor3 Y6 ^6 g% _9 Q9 v9 k; Z
beta1=50*pi/180; beta1=beta1/p; % epanouissement polaire7 I4 Z2 o; H5 c
% v; \) ^2 d: ^* G1 X& VdessinP1; % a sub-programme to draw the geometry of the machine section with the parameters defined above: \" Q) M1 W P
% --------------8 K: ?6 p0 I' S1 h
7 V, g$ a/ z* x4 ?2 J2 W7 s2 ^3 M
) w8 B; {8 P: x' k% ------------- Rotor positioning and initial mesh --------------
( Z5 _5 C8 c2 s! R9 f, N0 D/ l6 G9 v3 [- k* h, T5 t
aa=-30*pi/180; % initial angle of rotor/ {" m* c8 i& \
gr=groto(gr,(aa)); % rotating the rotor to the angle specified above using the sub-programme 'groto'
\9 y1 M! i( q4 D ?, i* vg=[gsf gr]; % stator + rotor given the whole machine geometry$ I5 r w- {; d
limites; % a sub-programme defining the bondary condition* {- R5 F+ n, E3 [% v0 Z
[p,e,t]=initmesh(g); % initial mesh for the partial differential equation resolution
8 l5 Q! Q2 f$ @. }0 J' t8 `
" b% T0 f! q2 N( U % ------------- mesh refine if necessary ------------* X3 }& E1 J& T2 A' O- B, J
% [p,e,t]=refinemesh(g,p,e,t,[1 30]);) D) T) B/ k+ G: b
% pdegplot(g); axis equal, hold on ; pdemesh(p,e,t), hold off
% q+ h( o; j7 Y% pause7 C0 I: g3 Z0 m
% -------------------------------------# q, b* X8 q9 e% v3 o9 Y
/ Q4 i& e c8 x3 g6 S
5 K; z- y7 J/ \2 y; W) W* B& K r( p0 z8 E* @+ P( ] {, o6 G: K
% ------------- specification of parameters required for calculation -------
p( g* F7 ^' @. X* N kexc=0;
5 H% J0 E" y. i4 S6 ?# o9 h sigmaexc=kexc*5e6; % conductivity of rotor coil conductor7 P9 x' S9 e5 k; t9 Z6 A
nuo=1/(4e-7*pi); % inverse of permeability of vacuum ~5 ^( {+ K3 t; T6 `- {; I
murs=500; murr=500; % relative permeability of stator and rotor
% ^5 Y# [ o; Z& m( E6 t6 C 8 o, z4 c! z8 H( u+ @0 C: }% m) Y! l; [
ks=1; kr=0; % ks=1 or 0: stator excited or not; kr=1 or 0: rotor excited or not.* n: a' ?' w- C
8 ^$ E1 G" S0 U8 z5 J7 W8 ?
Jex1=0; Jex11=0;
4 h$ k1 k1 @3 A; q D. H, T Jex2 = 10e6*ks; Jex21 = -Jex2;, u0 ^ |( q. ]/ J5 d- R
Jex3 = 0; Jex31 = 0;# {4 p9 Z- `9 B) L% T- B
% Jex3=10e6*ks; Jex31=-Jex3; % current density of phase a (stator)9 ~! U+ Y& `9 b
% Jex1=-Jex3/2; Jex11=-Jex1; % current density of phase b (stator)0 S* s1 D/ M! \% k/ F( C; p
% Jex2=-Jex3/2; Jex21=-Jex2; % current density of phase c (stator)) x' @- ]% O/ E7 F. [" x
Jexr1=10e6*kr; Jexr2=-Jexr1; % current density of rotor excitation
0 N9 t2 y6 p/ j( U! P* S+ X, M2 P0 A! f& V
garnissageP1; % a sub-programme for the giving the current density and permeability at each mesh element
7 Q9 r2 P5 p% ^. d. H" g% ------------- ) I( B2 o" L R E7 A
: H' q7 X, f- p* U3 ]' q: L! g# N/ H6 u: `' [: P9 J! d
4 }: t" k9 x; a" j* w; Z
% ------------- resolution of the partial differential equation and figure ploting ---------6 b( h' d5 K$ a+ X- i5 C
* s* t+ D- s6 S+ P0 ~u=assempde(bond,p,e,t,nu,0,J); % resolution of the partial differential equation
+ H+ _* g/ w2 I6 M% Y% U=ASSEMPDE(B,P,E,T,C,A,F) assembles and solves the PDE problem -div(c*grad(u))+a*u=f
! |3 e) l3 a" K7 h1 Y
: ]! V9 y% `7 W/ Y7 `. W* kfigure (1), pdemesh(p,e,t), axis equal, title ('Mesh of the machine section')0 \0 r- a1 ?8 E# ^
figure (2), pdegplot(g); axis equal; hold on; pdecont(p,t,full(real(u)),30), hold off, title('Magnetic field distribution'), % plots using 30 levels.8 [# q/ x) V2 P5 p3 C4 Q
% ------------------------------' q* G; `* S! \# }) V2 @/ g% O5 S
2 r: U7 q6 S5 M; a
- z' n% D. Z& c+ C N; [7 \, M( A
9 w; z# E- U6 V3 d( K% -------------- calculation of the energy stocked in the machine (energy sum in the magnetic field) -------------------- ]; U& p$ }# Z
# d: \1 y, ?0 O+ `9 v' f% L) a
% [ux,uy]=pdegrad(p,t,u);
# ?) z2 D6 E+ v: G7 B% bx=uy;
" l8 X2 m" j# N, E% by=-ux;
3 P% N7 z6 v1 a% for i=1:length(bx);
+ D& P; Q1 `' R Q! |" M6 D% b(i)=(bx(i)^2+by(i)^2)^.5;3 s- f4 w% k f
% end
6 F3 \4 V* O9 o. U0 ]% nu_e=1/(4e-7*pi);8 F- P9 v) s4 e' ?' y) ?5 g
% nu_c=nu_e;
0 O( Q2 j* y9 R6 e& U2 c& `% nu_s=1/500*nu_e;
* F: w' `, A0 v3 f, e2 b% nu_r=1/500*nu_e;4 N& p# B+ R4 d: R6 X* w
% h=sparse(1,ntrg);0 M* n+ K! A% y9 K# q f% {& r/ N" ^
% ind_e=find(t(4,:)==2);) _1 M4 z% \& N7 L
% ind_s=find(t(4,:)==1);
+ ~: A* h4 L2 I% x* u$ V% ind_r=find(t(4,:)==3);
B" T; F% p0 U% ind_c=find((t(4,:)>=4) & (t(4,:)<=27));9 e; w- Y( ~' U7 f0 _) s( F
% h(ind_e)=nu_e*b(ind_e)';+ T1 K- w" U+ F
% h(ind_s)=nu_s*b(ind_s);9 ]. a- L* l/ b1 h6 k
% h(ind_r)=nu_r*b(ind_r);
9 M* K- u; r& E) o2 N% h(ind_c)=nu_c*b(ind_c)';
9 o; c" L# e- }3 Y e' \# q4 N% aire=pdetrg(p,t);
" \) {) r' |$ m4 H" \$ h% vol_trg=Long*aire;
0 @' {3 W8 ^) T$ j! X% energ_elem_e=1/2*(h(ind_e).*b(ind_e)').*vol_trg(ind_e);
; X, i4 ]) O9 ?( H0 W8 H7 k$ r% energ_tot_e=sum(energ_elem_e);
2 h1 J! H9 f( B% energ_elem_s=1/2*(h(ind_s).*b(ind_s)').*vol_trg(ind_s); J [$ ^7 a7 a+ e
% energ_tot_s=sum(energ_elem_s);) R- {$ `9 ^3 J1 g0 n8 f
% energ_elem_r=1/2*(h(ind_r).*b(ind_r)').*vol_trg(ind_r);
7 s3 `, R1 c" [% energ_tot_r=sum(energ_elem_r);# Z: }5 f- G c" Q) v
% energ_elem_c=1/2*(h(ind_c).*b(ind_c)').*vol_trg(ind_c);
4 w; ]% Q1 N1 F/ m/ I% energ_tot_c=sum(energ_elem_c);8 @' U3 ~1 z) Y3 S4 A/ u# P0 o
% energ_total=energ_tot_e+energ_tot_s+energ_tot_r+energ_tot_c;2 W- v2 q3 a/ u6 ?- v. i0 k
% enr=energ_total;
' U. s& q) N. f( v4 _1 `- e7 W* A' ^5 K, ~# `! b
toc; |
|