异步电机ANSYS电磁场计算程序

合集下载
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。


! 基于场路耦合时空有限元的永磁电机瞬态特性研究.kdh

/uis,msgpop,3
/prep7
csys,0
btol,1e-10 !指定布尔运算公差
*afun,deg !指定输入输出为参数的单位为角度
r1=47.5/1000 !定子外半径,转化为国际单位制
r2=26/1000 !定子内半径,转化为国际单位制
gap=0.5/1000 !定转子间气隙高度,转化为国际单位制
r3=r2-gap !转子外半径,转化为国际单位制
r4=8/1000 !转子轴半径,转化为国际单位制
nslots=48 !定子槽数
delta=gap/1e5 !一个用于确定选择区域的极小量
!定义定子槽尺寸参数
ss_h=7.2/1000 !槽高,转化为国际单位制(下同)
ss_w=1.7/1000 !槽宽
ss_ci=0.2/1000 !绕组层间绝缘厚度
ss_turn=48/2 !定子每个绕组导线根数
ss_cln=2 !并绕导线根数
ss_clw=0.56/1000 !导线宽度
ss_clh=0.2/1000 !导线高度
ss_cli=0.05/1000 !导线间漆膜厚度
ss_cll=60/1000 !绕组长度(定子铁芯长度)
ss_ch=(ss_clh+ss_cli)*(ss_turn/ss_cln)!每个绕组高度
ss_cw=(ss_clw+ss_cli)*ss_cln !每个绕组宽度
!定义转子永磁体磁体尺寸参数
sr_ch=3 !永磁体厚度(下相同)
sr_cco=16 !永磁体 1 宽度
sr_cct=10.25 !永磁体 2 宽度
sr_ch=sr_ch/1000 !永磁体厚度,转化为国际单位制
sr_cco=sr_cco/1000 !永磁体 1 宽度
sr_cct=sr_cct/1000 !永磁体 2 宽度
!计算定子线圈参数,用于单元实常数定义

care1=ss_ch*ss_cw !绕组横截面积
turn1=ss_turn/ss_cln !绕组匝数(注意,要除以并绕根数!)
leng1=ss_cll !绕组轴向长度
fill1=(ss_clw*ss_clh)*ss_turn/care1 !绕组填充系数
!定义单元类型
et,1,plane53,0 !AZ 自由度,用于空气和绝缘区域
et,2,plane53,3 !用于定子线圈导体 AZ,CURR,EMF 自由度
et,3,plane53,0 !AZ 自由度,用于铁芯区域和磁铁部分
et,4,53,0 !AZ 自由度,用于铁芯区域
r,2,care1,turn1,leng1,,fill1 !定子线圈单元的实常数

!定义材料参数
mp,murx,1,1 !空气导磁率,用于空气和绝缘
mp,murx,2,1 !导体导磁率,用于定子线圈
mp,rsvx,2,0.0434e-6 !导体电阻率
mp,murx,3,1 !导体导磁率,用于转子导条
mp,rsvx,3,0.0434e-6 !导体电阻率
HC=1000000 !永磁体矫顽力
TB,BH,4,,30 !永磁体 BH 曲线
TBPT,, 130.000000 , 0.10000000
TBPT,, 170.000000 , 0.20000000
TBPT,, 197.000000 , 0.30000000
TBPT,, 218.000000 , 0.40000000
TBPT,, 250.000000 , 0.50000000
TBPT,, 290.000000 , 0.60000000
TBPT,, 338.000000 , 0.70000000
TBPT,, 400.000000 , 0.80000000
TBPT,, 472.000000 , 0.90000000
TBPT,, 570.000000 , 1.00000000
TBPT,, 682.000000 , 1.10000000
TBPT,, 810.000000 , 1.20000000
TBPT,, 975.000000 , 1.30000000
TBPT,, 1600.00000 , 1.40000000
TBPT,, 2520.00000 , 1.50000000
TBPT,, 3520.00000 , 1.60000000
TBPT,, 4760.00000 , 1.70000000
TBPT,, 8300.00000 , 1.80000000
TBPT,, 12000.0000 , 1.90000000
TBPT,, 17000.0000 , 2.00000000

TBPT,, 23000.0000 , 2.10000000
TBPT,, 32000.0000 , 2.20000000
TBPT,, 42500.0000 , 2.30000000
TBPT,, 44500.0000 , 2.32000000
TBPT

,, 48200.0000 , 2.35000000
TBPT,, 52200.0000 , 2.37000000
TBPT,, 56000.0000 , 2.39000000
TBPT,, 60000.0000 , 2.41000000
mp,mgxx,4,0
mp,mgyy,4,hc
!定义其他 7 块永磁体用同样地方法
TB,BH,5,,30
mp,mgxx,5,0
mp,mgyy,5,-hc
TB,BH,6,,30
mp,mgxx,6,hc
mp,mgyy,6,0
TB,BH,7,,30
mp,mgxx,7,-hc
mp,mgyy,7,0
TB,BH,8,,30
mp,mgxx,8,0.707*hc
mp,mgyy,8,0.707*hc
TB,BH,9,,30
mp,mgxx,9,0.707*hc
mp,mgyy,9,-0.707*hc
TB,BH,10,,30
mp,mgxx,10,-0.707*hc
mp,mgyy,10,-0.707*hc
TB,BH,11,,30
mp,mgxx,11,-0.707*hc
mp,mgyy,11,0.707*hc
mp,murx,12,1 ! 隔磁材料磁导率
mp,murx,13,5000 ! 定子铁心磁导率(硅钢片)
mp,murx,14,4000 ! 转子磁轭(电工纯铁)
mp,murx,15,1 !导体磁导率,用于定子线圈
mp,rsvx,16,0.0434e-6 !导体电阻率
mp,murx,17,1 !导体磁导率,用于转子导条
mp,rsvx,18,0.0434e-6 !导体电阻率
! 建立定子几何模型
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
wpave,0
*get,maxarea1,area,,num,max
numstr,area,maxarea1
cyl4, , ,r3
cyl4, , ,r4
asba,maxarea1+1,maxarea1+2
*get,maxarea2,area,,num,max
numstr,area,maxarea2
blc4,-sr_cco/2,9/1000,sr_cco,sr_ch
blc4,-sr_cco/2,-9/1000-sr_ch,sr_cco,sr_ch
blc4,-9/1000-sr_ch,-sr_cco/2,sr_ch,sr_cco
blc4,9/1000,-sr_cco/2,sr_ch,sr_cco
*get,maxarea3,area,,num,max
numstr,area,maxarea3
wpro,-45,,
*do,i,0,3
wpro,-90*i
blc4,-sr_ch/2,r3-sr_cct,sr_ch,sr_cct*2
*enddo
wpcsys,-1,0
cyl4, , ,r3
asel,s,,,maxarea3+1,maxarea3+5
*get,maxarea4,area,,num,max
numstr,area,maxarea4
ainp,all
allsel,all
cyl4,,,r1
!创建隔磁面
a,701,704,738,737,716,715
a,702,703,725,726,723,724
a,706,707,719,721,729,730
a,711,713,708,705,745,746
aovlap,all
!压缩关键点、线、面
allsel
nummrg,kp
numcmp,kp
numcmp,line
numcmp,area
!将定子绕组生成组件
csys,1
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 !定子槽中的导体
a

llsel
!对气隙划分网格
type,1
mat,1
csys,1
lsel,s,loc,x,r3-r3/1000,r2+r2/1000
lesize,all,gap/2,,,,,,,1
mshape,1,2d
mshkey,0
amesh,644
!对转轴划分网格
type,3
mat,12
esize,r4/4
amesh,638
!对转子磁轭划分网格
type,3
mat,14
esize,r3/7
amesh,639
amesh,641
amesh,640
amesh,642
esize,r4/4
amesh,643
!对定子磁轭划分网格
type,3
mat,13
esize,r2/10
amesh,63
!对磁铁划分网格
type,3
mat,4
esize,sr_ch/4
amesh,626
mat,5
esize,sr_ch/4
amesh,627
mat,6
esize,sr_ch/4
amesh,628

mat,7
esize,sr_ch/4
amesh,629
mat,8
esize,sr_ch/4
amesh,632
mat,9
esize,sr_ch/4
amesh,633
mat,10
esize,sr_ch/4
amesh,631
mat,11
esize,sr_ch/4
amesh,630
!对隔磁材料划分网格
type,3
mat,12
esize,sr_ch/2
amesh,634
amesh,635
amesh,636
amesh,637
!对定子槽划分网格
cmsel,s,a_sc
aatt,2,2,2
lsla
lesize,all,ss_w/2,,,1,1,,,no
amesh,all
!对定子槽的绝缘和空气划分网格
cmsel,s,a_si
aatt,1,1,1
lsla

lesize,all,ss_w/3,,,1,1,,,no
amesh,all
!本程序的目的: 定义电路模型及其与有限元模型的连接
/prep7
local,11,1
csys,11
cscir,11,1
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 !电阻值设定与线圈内部直线段电阻值接近
et,33,124,0 !模拟导线连接,其电阻值为零
r,33,1e-10,0
et,41,124,4,0 !建立三相电源
r,41,380,0 !A 相,电压 380V,相位为 0
r,42,380,120 !B 相,电压 380V,相位为 120
r,43,380,-120 !C 相,电压 380V,相位为-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
!定义绞线圈
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
j = 1
!上端连接
i1=1+(j-1)*nc
i2=j*nc

*do,i,i1,i2
i = i1+7
nmax=nmax+1
yy=(i+(i+npd))*da/2
nn1=nn_sc11(i)
imax=i+npd
*if,imax,gt,nslots,then !超过最大槽数后,又从 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
i = i1+6
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
!定义电机场路耦合分析边界条件
finish
/solu
ANTYPE,4
TRNOPT,FULL
csys,1
lsel,s,loc,x,r1
dl,all,,asym !电机外壳磁力线平行条件
d,n01,volt,0 !零线端接地
allsel
csys,0



相关文档
最新文档