本计算是我最近完成的一项学术课题:《国家大型风力发电机的综合物理场数值分析》
建立大型异步电动机综合物理场的数值计算,以便xx分析
大型异步电动机的动态性能时时分析,通过应力场、电磁场、热场与路的耦合计算,
本程序是国内大型风电的计算范例,有效地解决了变频发电机组的参数调控制。
现与同仁分享。
finish
/clear
/uis,msgpop,3
/prep7
csys,0
btol,1e-10
*afun,deg
multipro,'start',6
*cset, 1, 3,d1, 'Outer Diameter of Stator(mm)',950 !定子外直径
*cset, 4, 6,d2, 'Inner Diameter of Stator(mm)',520 !定子内直径
*cset, 7, 9,gap, 'Gap between Stator and Rotor(mm)',5.5 !气隙高度
*cset,10,12,nslots,'Slot Number of Stator',48 !定子槽数
*cset,13,15,nslotr,'Slot Number of Rotor', 40 !转子槽数
*cset,16,18,d4, 'Diameter of Rotor Axis(mm)', 280 !转子轴直径
multipro,'end'
r1=d1/2/1000 ! 定子外半径,转化为国际单位制
r2=d2/2/1000 ! 定子内半径,转化为国际单位制
gap=gap/1000 ! 定转子间气隙高度,转化为国际单位制
r3=r2-gap ! 转子外半径,转化为国际单位制
r4=d4/2/1000 ! 转子轴半径,转化为国际单位制
delta=gap/1e5 !一个用于确定选择区域的极小量
multipro,'start',3
*cset, 1, 3,nhole, 'Hole Number of Rotor', 20 !转子轴向孔的数目
*cset, 4, 6,dhole, 'Main Diameter of Holes', 395 !转子轴向孔圆心处的直径
*cset, 7, 9,dh, 'Hole Diameter',20 !转子轴向孔本身的直径
multipro,'end'
rhole=dhole/2/1000 ! 转子轴向孔圆心处的半径,转化为国际单位制
rh=dh/2/1000 ! 转子轴向孔半径,转化为国际单位制
ss_h=72/1000 !槽高,转化为国际单位制(下同)
ss_w=17/1000 !槽宽
ss_ci=2/1000 !绕组层间绝缘厚度
ss_turn=48/2 !定子每个绕组导线根数
ss_cln=2 !并绕导线根数
ss_clw=5.6/1000 !导线宽度
ss_clh=2/1000 !导线高度
ss_cli=0.5/1000 !导线间漆膜厚度
ss_cll=600/1000 !绕组长度(定子铁芯长度)
ss_ch=(ss_clh+ss_cli)*(ss_turn/ss_cln) !每个绕组高度
ss_cw=(ss_clw+ss_cli)*ss_cln !每个绕组宽度
sr_h1=7/1000 !小缝高度
sr_w1=2/1000 !小缝宽度
sr_h2=14/1000 !中缝高度
sr_w2=7/1000 !中缝宽度
sr_h3=30/1000 !槽高
sr_w31=17/1000 !槽顶宽
sr_w32=12/1000 !槽底宽
sr_cll=690/1000 !导条轴向长度(直线段长度)
care1=ss_ch*ss_cw !绕组横截面积
turn1=ss_turn/ss_cln !绕组匝数(注意,要除以并绕根数!)
leng1=ss_cll !绕组轴向长度
fill1=(ss_clw*ss_clh)*ss_turn/care1 !绕组填充系数
hh=sr_h3-2*sr_ci !梯形导条高度
ww1=sr_w31-2*sr_ci !梯形导条上底宽
ww2=sr_w32-2*sr_ci !梯形导条下底宽
care2=(ww1+ww2)*hh/2 !梯形导条横截面积
leng2=sr_cll !导条轴向长度
et,1,53,0 !AZ自由度,用于空气和绝缘区域
et,2,53,3 !AZ,CURR,EMF自由度,电路耦合绞线圈,用于定子线圈导体
et,3,53,4 !AZ,CURR,EMF自由度,电路耦合块导体,用于转子槽内导条
et,4,53,0 !AZ自由度,用于铁芯区域
r,2,care1,turn1,leng1,,fill1 !定子线圈单元的实常数
r,3,care2,leng2,, !转子导条单元的实常数
mp,murx,1,1 !空气导磁率,用于空气和绝缘
mp,murx,2,1 !导体导磁率,用于定子线圈
mp,rsvx,2,0.0434e-6 !导体电阻率
mp,murx,3,1 !导体导磁率,用于转子导条
mp,rsvx,3,0.0434e-6 !导体电阻率
!
!mp,murx,4,2000 !调试程序时,用线性材料,省时间些
!
tb,bh,4,,18 !铁芯,输入BH曲线
tbpt,,31.85,0.1
tbpt,,45.28,0.2
tbpt,,55.73,0.3
tbpt,,64.49,0.4
tbpt,,72.45,0.5
tbpt,,76.83,0.6
tbpt,,79.62,0.7
tbpt,,87.58,0.8
tbpt,,104.3,0.9
tbpt,,121.0,1.0
tbpt,,143.3,1.1
tbpt,,189.5,1.2
tbpt,,262.7,1.3
tbpt,,429.9,1.4
tbpt,,995.2,1.5
tbpt,,2547.8,1.6
tbpt,,5095.5,1.7
tbpt,,7643.3,1.78
cyl4,,,r4 !{dy}个圆形面(转子轴)
cyl4,,,r4,,r3 !第二个圆环面(转子铁芯)
cyl4,,,r2,,r1 !第三个圆环面(定子铁芯)
xo=sqrt(r2**2-(ss_w/2)**2)
wpave,xo
blc4,,-ss_w/2,ss_h,ss_w
blc4,ss_h-ss_ci,ss_w/2,-ss_ch,-ss_w
blc4,ss_h-ss_ch-ss_ci*2,ss_w/2,-ss_ch,-ss_w
blc4,ss_h,ss_cw/2,-(ss_ch*2+ss_ci*2),-ss_cw
asel,s,loc,x,r2,r2+ss_h
csys,1
lsel,s,loc,x,r1-delta,r1+delta
asll,a
lsel,all
aovlap,all
asel,s,loc,x,xo,r2
adele,all,,,1
asel,s,loc,x,r2,r2+ss_h
lsla
lsel,r,loc,x,r2-delta,r2+delta
lcomb,all
lsel,s,loc,x,r1-delta,r1+delta
asll
lsla
lsel,r,loc,x,r2-delta,r2+delta
lcomb,all
allsel
asel,s,loc,x,r2,r2+ss_h
cm,aa1,area
agen,2,all
cmsel,u,aa1
aadd,all
agen,nslots,all,,,,360/nslots
cm,aa2,area
lsel,s,loc,x,r1-delta,r1+delta
asll
cm,aa3,area
cmsel,a,aa2
allsel,below,area
asba,aa3,aa2
cm,aa3,area
cmsel,s,aa1
agen,nslots,all,,,,360/nslots
cmsel,a,aa3
allsel,below,area
nummrg,kp
csys,0
xo=sqrt(r3**2-(sr_w1/2)**2)
wpave,xo
blc4,,sr_w1/2,-sr_h1,-sr_w1
xo=xo-sr_h1
wpave,xo
blc4,,sr_w2/2,-sr_h2,-sr_w2
asel,s,loc,x,xo-sr_h2,xo+sr_h1
asel,r,loc,y,-sr_w2/2,sr_w2/2
allsel,below,area
aglue,all
x1=xo
y1=sr_w2/2
z1=0
nk=kp(x1,y1,z1)
kmodif,nk,x1-(sr_w2/2-sr_w1/2),y1,z1
y1=-sr_w2/2
nk=kp(x1,y1,z1)
kmodif,nk,x1-(sr_w2/2-sr_w1/2),y1,z1
xo=xo-sr_h2
wpave,xo
blc4,,sr_w31/2,-sr_h3,-sr_w31
x1=xo-sr_h3
y1=sr_w31/2
z1=0
nk=kp(x1,y1,z1)
kmodif,nk,x1,y1-(sr_w31/2-sr_w32/2),z1
y1=-sr_w31/2
nk=kp(x1,y1,z1)
kmodif,nk,x1,y1+(sr_w31/2-sr_w32/2),z1
asel,a,area,,2
allsel,below,area
aovlap,all
asel,s,loc,x,xo-sr_h3,xo+sr_h2
asel,s,loc,x,r3-(sr_h1+sr_h2+sr_h3),r3-sr_h1
asel,r,loc,y,-sr_w31/2,sr_w31/2
allsel,below,area
aadd,all
asel,s,loc,x,r3-(sr_h1+sr_h2+sr_h3),r3
asel,r,loc,y,-sr_w31/2,sr_w31/2
cm,aa1,area
lsla
csys,1
lsel,r,loc,x,r3-delta,r3+delta
*get,nl,line,,count
*if,nl,eq,2,then
lcomb,all
*endif
cm,ll1,line
allsel,below,area
lsel,s,loc,x,r3-delta,r3+delta
cmsel,u,ll1
lcomb,all
cmsel,s,aa1
agen,2,all
cmsel,u,aa1
aadd,all
agen,nslotr,all,,,,360/nslotr
cm,aa2,area
lsel,s,loc,x,r3-delta,r3+delta
asll
cmsel,u,aa1
cmsel,u,aa2
cm,aa3,area
cmsel,a,aa2
allsel,below,area
asba,aa3,aa2
cm,aa3,area
cmsel,s,aa1
agen,nslotr,all,,,,360/nslotr
cmsel,a,aa3
allsel,below,area
nummrg,kp
wpave,0,0,0
allsel
nummrg,kp
numcmp,kp
numcmp,line
numcmp,area
*get,na,area,,count
csys,1
lsel,s,loc,x,r3-delta,r3+delta
al,all
lsel,s,loc,x,r2-delta,r2+delta
al,all
asba,na+2,na+1
allsel
lplot
csys,1
ksel,s,loc,x,r3-delta,r3+delta
*get,nk3,kp,,count
*get,nk3min,kp,,num,min
cm,kk3,kp
ksel,s,loc,x,r2-delta,r2+delta
*get,nk2,kp,,count
*get,nk2min,kp,,num,min
cm,kk2,kp
cmsel,a,kk3
cm,kk23,kp
da=gap/(2*3.1416*r3)*360/3 !与气隙尺寸相关的一个小角度
lsel,s,loc,x,r2-delta,r2+delta
lsel,a,loc,x,r3-delta,r3+delta
*get,nl32,line,,count
*get,nl32min,line,,num,min
dsys,1
*do,i,1,nl32
da1=abs(ly(nl32min,0)-ly(nl32min,1))/3 !与最短线相关的一个小角度
*if,da1,lt,da,then
da=da1
*endif
nl32min=lsnext(nl32min)
*enddo
*do,i,1,nk3
cmsel,s,kk3
ynk3=ky(nk3min)
nk2min1=nk2min
*do,j,1,nk2
cmsel,s,kk23
ynk2=ky(nk2min1)
da32=abs(ynk3-ynk2)
*if,da32,le,da,then
lstr,nk3min,nk2min1
*endif
cmsel,s,kk2
nk2min1=kpnext(nk2min1)
*enddo
cmsel,s,kk3
nk3min=kpnext(nk3min)
*enddo
lsel,s,loc,x,r3+delta,r2-delta
ksll
cm,kk4,kp
cmsel,s,kk2
cmsel,u,kk4
*get,nk2,kp,,count
*get,nk2min,kp,,num,min
cm,kk2,kp
cmsel,s,kk3
cmsel,u,kk4
*get,nk3,kp,,count
*get,nk3min,kp,,num,min
cm,kk3,kp
csys,1
dsys,1
allsel
numcmp,kp
numcmp,line
numcmp,area
*get,nkmax,kp,,num,max
cmsel,s,kk2
*do,i,1,nk2
ynk2=ky(nk2min)
k,nkmax+i,r3-delta,ynk2,0
lstr,nkmax+i,nk2min
cmsel,s,kk2
nk2min=kpnext(nk2min)
*enddo
allsel
numcmp,kp
numcmp,line
numcmp,area
*get,nkmax,kp,,num,max
cmsel,s,kk3
*do,i,1,nk3
ynk3=ky(nk3min)
k,nkmax+i,r2+delta,ynk3,0
lstr,nkmax+i,nk3min
cmsel,s,kk3
nk3min=kpnext(nk3min)
*enddo
lsel,s,loc,x,r2-delta,r2+delta
lsel,a,loc,x,r3-delta,r3+delta
asll,s,1
lsel,s,loc,x,r3+delta,r2-delta
asbl,all,all
csys,1
dsys,0
xo=rhole
yo=360/(2*nslotr)
zo=0
wpave,xo,yo,zo
cyl4,,,rh,0,,90
cyl4,,,rh,90,,180
cyl4,,,rh,180,,270
cyl4,,,rh,270,,360
ksel,s,loc,x,xo
ksel,r,loc,y,yo
lslk
asll
allsel,below,area
nummrg,kp
cm,aa1,area
agen,2,all
cmsel,u,aa1
aadd,all
agen,nhole,all,,,,360/nhole
cm,aa2,area
lsel,s,loc,x,r4
asll
cm,aa3,area
cmsel,a,aa2
allsel,below,area
asba,aa3,aa2
cm,aa3,area
cmsel,s,aa1
agen,nhole,all,,,,360/nhole
cmsel,a,aa3
allsel,below,area
nummrg,kp
save
csys,1
lsel,s,loc,x,r4
asll,s,1
csys,0
wpcsys,-1,0
wprota,,90
asbw,all
wprota,,,90
asbw,all
wpcsys,-1,0
cm,a_axis,area !转子轴
csys,1
lsel,s,loc,x,r4
asll
cmsel,u,a_axis
cm,a_rotor,area !转子铁芯
rmin=rhole-rh+delta
rmax=rhole+rh-delta
asel,s,loc,x,rmin,rmax
cm,a_hole,area !转子轴向孔
asel,s,loc,x,r3-sr_h1-sr_h2-sr_h3,r3-sr_h1
cm,a_rc,area !转子槽中的导体
asel,s,loc,x,r3-sr_h1,r3-delta
cm,a_ri,area !转子槽中的气隙
asel,s,loc,x,r3+delta,r2-delta
cm,a_gap,area !气隙
lsel,s,loc,x,r1
asll
cm,a_stator,area !定子铁芯
lsla
asll
cmsel,u,a_gap
cmsel,u,a_stator
rmax=r2+ss_h-ss_ch-ss_ci
rmin=rmax-ss_ci
asel,a,loc,x,rmin,rmax
cm,a_si,area !定子槽中的绝缘和空气
rmax=r2+ss_h-ss_ci
rmin=rmax-ss_ci-2*ss_ch
asel,s,loc,x,rmin,rmax
cmsel,u,a_si
cm,a_sc,area !定子槽中的导体
cmsel,s,a_axis
cmsel,a,a_hole
cmsel,a,a_ri
cmsel,a,a_gap
cmsel,a,a_si
aatt,1,1,1
cmsel,s,a_sc
aatt,2,2,2
cmsel,s,a_rc
aatt,3,3,3
cmsel,s,a_rotor
cmsel,a,a_stator
aatt,4,4,4
esize_gap=3 !气隙径向网格划分3层
esize_r_gap=2 !转子槽气隙周向划分2层
esize_min=ss_cw/1.8 !除气隙及转子导条外的最小网格尺寸
esize_min1=esize_min/2 !转子导条网格尺寸(考虑到集肤效应,网格尺寸尽量小)
esize_mid=5*esize_min !中等尺度的网格尺寸
esize_max=15*esize_min !{zd0}的网格尺寸
mshkey,2 !尽量用映射网格划分
cmsel,s,a_ri
lsla
lsel,r,loc,x,r3-delta,r3+delta
cm,ll1,line
lesize,all,,,esize_r_gap,1,1,,,no
lsel,s,loc,x,r3-delta,r3+delta
cmsel,u,ll1
lesize,all,esize_min,,,1,1,,,no
lsel,s,loc,x,r3+delta,r2-delta
lesize,all,,,esize_gap,1,1,,,no
cmsel,s,a_gap
lsla
amesh,all!(划分转子槽中的气隙的网格)
rmin=r3-sr_h1
lsel,s,loc,x,rmin-delta,rmin+delta
cm,ll2,line
cmsel,s,a_ri
lsla
cmsel,u,ll1
cmsel,u,ll2
lesize,all,esize_min,,,1,1,,,no
cmsel,ll2
lesize,all,,,esize_r_gap,1,1,,,no
cmsel,s,a_ri
lsla
amesh,all!(划分定子槽中导体的网格)
cmsel,s,a_sc
lsla
lesize,all,esize_min,,,1,1,,,no
amesh,all!(划分转子槽中导体的网格)
cmsel,s,a_rc
lsla
lesize,all,esize_min1,,,1,1,,,no
amesh,all!(划分定子槽中的绝缘和空气的网格)
cmsel,s,a_si
lsla
lesize,all,esize_min,,,1,1,,,no
amesh,all!(划分转子轴向孔处的网格)
cmsel,s,a_hole
lsla
lesize,all,esize_min,,,1,1,,,no
amesh,all!(划分转子轴的网格)
cmsel,s,a_axis
lsla
lesize,all,esize_mid,,,1,1,,,no
amesh,all!(划分转子铁芯的网格)
cmsel,s,a_rotor
amesh,all
!(划分定子铁芯的网格)
lsel,s,loc,x,r1
lesize,all,esize_max,,,1,1,,,no
cmsel,s,a_stator
amesh,all
allsel
save
finish
/prep7
local,11,1
csys,11
cscir,11,1
et,11,124,6 !电路耦合块导体(用于转子导条与电路的耦合)
r,11
et,12,124,0 !电阻,用于模拟转子端环阻抗
r,12,1e-10
et,13,124,1 !电感,用于模拟转子端环漏抗
r,13,1e-12
et,21,124,5 !电路耦合绞线圈,用于外层线圈(半径较大者)
r,21
et,22,124,5 !电路耦合绞线圈,用于内层线圈(靠近气隙者)
r,22
et,31,124,1 !电感(用于定子端部连接,模拟每个线圈的端部电感值)
r,31,1e-4,0 !(暂将电感设为极小值,初始电流定义为零)
et,32,124,0 !电阻(用于定子端部连接,模拟每个线圈的端部电阻值)
r,32,0.014 !电阻值设定与线圈内部直线段电阻值接近(计算可得每个线圈直线段电阻为0.01395)
et,33,124,0 !电阻(用于模拟导线连接,其电阻值设为一极小值)
r,33,1e-10,0
et,41,124,4,0 !独立电压源(用于建立三相电源)
r,41,6000,0 !A相,电压6000V,相位为0
r,42,6000,120 !B相,电压6000V,相位为120
r,43,6000,-120 !C相,电压6000V,相位为-120
rmax=r2+ss_h-ss_ci
rmin=rmax-ss_ch
asel,s,loc,x,rmin,rmax
cmsel,r,a_sc
cm,a_sc1,area
cmsel,s,a_sc
cmsel,u,a_sc1
cm,a_sc2,area
!
!(定子线圈自由度耦合)
da_s=360/nslots
*dim,aa_sc1,array,nslots !获取面的编号,以备后用
*dim,aa_sc2,array,nslots
*do,i,1,nslots
ang1=(i-1)*da_s
cmsel,s,a_sc1
asel,r,loc,y,ang1
*get,aa,area,,num,min
aa_sc1(i)=aa !外层(半径较大者)线圈面
nsla,,1
cp,next,curr,all
cp,next,emf,all
cmsel,s,a_sc2
asel,r,loc,y,ang1
*get,aa,area,,num,min
aa_sc2(i)=aa !内层(靠近气隙者)线圈面
nsla,,1
cp,next,curr,all !耦合CURR自由度
cp,next,emf,all !耦合EMF自由度
*enddo
!(转子导条自由度耦合)
da_s=360/nslotr
*dim,aa_rc,array,nslotr !获取面的编号,以备后用
*do,i,1,nslotr
ang1=(i-1)*da_s
cmsel,s,a_rc
asel,r,loc,y,ang1
*get,aa,area,,num,min
aa_rc(i)=aa !转子导条面
nsla,,1
cp,next,curr,all
cp,next,emf,all
*enddo
allsel
numcmp,node
*get,nmax,node,,num,max
*dim,nn_rc1,array,nslotr
*dim,nn_rc2,array,nslotr
type,11
real,11
zz=r3/2
*do,i,1,nslotr
asel,s,area,,aa_rc(i)
nsla,,1
*get,nn3,node,,num,min
nmax=nmax+1
nn_rc1(i)=nmax
n,nmax,nx(nn3),ny(nn3),zz
nmax=nmax+1
nn_rc2(i)=nmax
n,nmax,nx(nn3),ny(nn3),-zz
e,nn_rc1(i),nn_rc2(i),nn3 !建立电路耦合块导体单元
*enddo
*get,nmax,node,,num,max
xx=nx(nn_rc1(1))
yy=ny(nn_rc1(1))
dyy=360/nslotr
yy=yy-dyy/2
nmax=nmax+1
nn1=nmax
n,nn1,xx,yy,zz
nmax=nmax+1
nn2=nmax
n,nn2,xx,yy,-zz
type,12
real,12
e,nn_rc1(nslotr),nn1
e,nn_rc2(nslotr),nn2
type,13
real,13
e,nn1,nn_rc1(1)
e,nn2,nn_rc2(1)
*do,i,1,nslotr-1
yy=yy+dyy
nmax=nmax+1
nn1=nmax
n,nn1,xx,yy,zz
nmax=nmax+1
nn2=nmax
n,nn2,xx,yy,-zz
type,12
real,12
e,nn_rc1(i),nn1 !创建端环电阻
e,nn_rc2(i),nn2
type,13
real,13
e,nn1,nn_rc1(i+1) !创建端环漏抗
e,nn2,nn_rc2(i+1)
*enddo
allsel
numcmp,node
*get,nmax,node,,num,max
*dim,nn_sc11,array,nslots !外层线圈上节点
*dim,nn_sc12,array,nslots !外层线圈下节点
*dim,nn_sc21,array,nslots !内层线圈上节点
*dim,nn_sc22,array,nslots !内层线圈下节点
type,21
real,21
zz=r1/2
*do,i,1,nslots
asel,s,area,,aa_sc1(i)
nsla,,1
*get,nn3,node,,num,min
nmax=nmax+1
nn_sc11(i)=nmax
n,nmax,nx(nn3),ny(nn3),zz
nmax=nmax+1
nn_sc12(i)=nmax
n,nmax,nx(nn3),ny(nn3),-zz
e,nn_sc11(i),nn_sc12(i),nn3 !建立外层电路耦合绞线圈单元
*enddo
type,22
real,22
*do,i,1,nslots
asel,s,area,,aa_sc2(i)
nsla,,1
*get,nn3,node,,num,min
nmax=nmax+1
nn_sc21(i)=nmax
n,nmax,nx(nn3),ny(nn3),zz
nmax=nmax+1
nn_sc22(i)=nmax
n,nmax,nx(nn3),ny(nn3),-zz
e,nn_sc21(i),nn_sc22(i),nn3 !建立内层电路耦合绞线圈单元
*enddo
allsel
np=2 !极数
npd=15 !极距
nc=8 !每极每相线圈数
da=360/nslots !槽间角度
numcpm,node
*get,nmax,node,,num,max
xx=2.5*nx(nn_sc11(1)) !端部连接的单元的径向坐标较大,便于图形观察
xx_d=3*nx(nn_sc11(1)) !电源接头的径向坐标更大些,也是便于图形观察
zz=r1/2
*dim,abc1,array,6 !每极每相首端节点号数组
*dim,abc2,array,6 !每极每相末端节点号数组
!
*do,j,1,6
i1=1+(j-1)*nc
i2=j*nc
*do,i,i1,i2
nmax=nmax+1
yy=(i+(i+npd))*da/2
nn1=nn_sc11(i)
imax=i+npd
*if,imax,gt,nslots,then !超过{zd0}槽数后,又从1开始(下同)
imax=imax-nslots
*endif
nn2=nn_sc21(imax)
n,nmax,xx,yy,zz
type,31
real,31
e,nn1,nmax !创建端部电感单元
type,32
real,32
e,nmax,nn2 !创建端部电阻单元
*enddo
nmax=nmax+1
nn1=nn_sc12(i1)
yy=(i1+(i1+npd))*da/2
imax=i1+npd
*if,imax,gt,nslots,then
imax=imax-nslots
*endif
nn2=nn_sc22(imax)
n,nmax,xx_d,yy,-zz
abc1(j)=nmax !每极每相首端节点号
type,31
real,31
e,nn1,nmax !首端联一电感单元
*do,i,i1,i2-1
nmax=nmax+1
yy=((i+1)+(i+npd))*da/2
nn1=nn_sc12(i+1)
imax=i+npd
*if,imax,gt,nslots,then
imax=imax-nslots
*endif
nn2=nn_sc22(imax)
n,nmax,xx,yy,-zz
type,31
real,31
e,nn1,nmax !创建端部电感单元
type,32
real,32 !创建端部电阻单元
e,nmax,nn2
*enddo
nmax=nmax+1
yy=(i2+(i2+npd))*da/2
nn1=nn_sc12(i2)
imax=i2+npd
*if,imax,gt,nslots,then
imax=imax-nslots
*endif
nn2=nn_sc22(imax)
n,nmax,xx_d,yy,-zz
abc2(j)=nmax !每相每极末端节点号
type,32
real,32
e,nmax,nn2 !末端联一电阻单元
*enddo
allsel
numcpm,node
*get,nmax,node,,num,max
type,33
real,33
zz=-r1
nmax=nmax+1
n01=nmax
n,n01,0,0,zz
*do,i,1,3
nmax=nmax+1
nn2=abc2(i)
n,nmax,nx(nn2),ny(nn2),zz
e,nn2,nmax !创建电路连线(下同)
e,nmax,n01
*enddo
*do,i,4,6
nmax=nmax+1
nn2=abc1(i)
n,nmax,nx(nn2),ny(nn2),zz
e,nn2,nmax
e,nmax,n01
*enddo
csys,0
zz=-r1*1.5
nmax=nmax+1
n02=nmax
n,n02,0,0,zz
*dim,nnv,array,3
*do,i,1,3
nmax=nmax+1
nn1=nmax
xx1=nx(abc1(i))
yy1=ny(abc1(i))
n,nn1,xx1,yy1,zz
nmax=nmax+1
nn2=nmax
xx2=nx(abc2(i+3))
yy2=ny(abc2(i+3))
n,nn2,xx2,yy2,zz
nmax=nmax+1
nnv(i)=nmax
xx=(xx1+xx2)/2
yy=(yy1+yy2)/2
n,nnv(i),xx,yy,zz
e,abc1(i),nn1 !创建电路连线(下同)
e,nn1,nnv(i)
e,nnv(i),nn2
e,nn2,abc2(i+3)
*enddo
type,41
real,41
nmax=nmax+1
xx=(nx(nnv(1))+nx(n02))/2
yy=(ny(nnv(1))+ny(n02))/2
n,nmax,xx,yy,zz
e,nnv(1),n02,nmax !创建A相电源
real,42
nmax=nmax+1
xx=(nx(nnv(2))+nx(n02))/2
yy=(ny(nnv(2))+ny(n02))/2
n,nmax,xx,yy,zz
e,nnv(2),n02,nmax !创建B相电源
real,43
nmax=nmax+1
xx=(nx(nnv(3))+nx(n02))/2
yy=(ny(nnv(3))+ny(n02))/2
n,nmax,xx,yy,zz
e,nnv(3),n02,nmax !创建C相电源
!
type,33
real,33
e,n01,n02 !将电源的公共端与零线端连接
!
allsel
save
finish
/solu
antype,harmic !谐波(交流)求解
eqslv,sparse !选择稀疏矩阵求解器(注意: 老版本只能用波前求解器算场路耦合问题)
!!!!!!!!!!!!!!!!!!!!!!!!!!
!定义边界条件
!!!!!!!!!!!!!!!!!!!!!!!!!!
csys,1
lsel,s,loc,x,r1
dl,all,,asym !电机外壳磁力线平行条件(忽略外壳漏磁)
nsel,s,loc,x,0,r3
esln,s,1
esel,r,type,,1,10 !(只选转子上的场单元)
cm,eforce,elem
fmagbc,'eforce' !在转子场单元上计算电磁力
d,n01,volt,0 !零线端接地
allsel
csys,0
/pnum,type,1
/number,1
eplot
save
hmagsolv,50,3,0.05,0.005,0.005,0.005,50