- 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
- !
- !
- !!!!!!!!!!!!!!!!!!!!
- !
- 建立几何模型
- !
- !(建立几何模型时,充分考虑了如下因素:
- !
- ! 1 快捷(尽量采用简单的(虽然这样稍微增加了编程工作量)
- !
- 2 便于划分网格(尤其是定子与转子间的气隙处,无论结构形式如何,
- ! 本程序都可映射生成沿径向均匀分布的层数任意的网格而不影响
- !
- 气隙附近的网格密度分布)
- !
- !
- !!!!!!!!!!!!!!!!!!!!
- cyl4,,,r4
- !第一个圆形面(转子轴)
- 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
- !
- !
- (下面这种常用的方式运行时间较长,约几分钟)
- !
- !agen,nslots,all,,,,360/nslots
- !lsel,s,loc,x,r1-
- delta,r1+delta
- !asll,a
- !aovlap,all
- !
- !
- (改用如下方式,虽然程序较长,但运行时间只有几秒!转子建模与此相同)
- !
- 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)
- blc4,,sr_w1/2,-sr_h1,-sr_w1
- xo=xo-sr_h1&
- lt;BR>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=xoz1=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<
- BR>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),z1nk=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
- nl32min=lsnext(nl32min)
- *enddo
- cmsel,s,kk3
- ynk3=ky(nk3min)
- nk2min1=nk2min
- *do,j,1,nk2
- cmsel,s,kk23
- ynk2=ky(nk2min1)
- da32=abs(ynk3-ynk2)
- lstr,nk3min,nk2min1
- *endif
- cmsel,s,kk2
- nk2min1=kpnext(nk2min1)&
- lt;BR>*enddo
- cmsel,s,kk3
- nk3min=kpnext(nk3min)<
- BR>*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)&
- lt;BR>k,nkmax+i,r3-
- delta,ynk2,0
- lstr,nkmax+i,nk2min
- cmsel,s,kk2
- nk2min=kpnext(nk2min)&
- lt;BR>*enddo
- allsel
- numcmp,kp
- numcmp,line
- numcmp,area
- *get,nkmax,kp,,num,max
- cmsel,s,kk3
- *do,i,1,nk3
- ynk3=ky(nk3min)&
- lt;BR>k,nkmax+i,r2+delta,ynk3,0
- lstr,nkmax+i,nk3min
- cmsel,s,kk3
- nk3min=kpnext(nk3min)&
- lt;BR>*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
复制代码
|