马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?我要加入
x
如下
wxpshengyan1@hotmail.com
发一个命令流,发电机的
/FILNAM,20kW-windpower-generator
/UNITS,SI
/PREP7
ET,1,13
EMUNIT,MKS
MP,MURX,1,1
LOCAL,11,1
K, 1, 0,0 ! define key points
K, 2, 0.17, -4.06
K, 3, 0.17, 7.19
K, 4, 0.1832, -4.06
K, 5, 0.1832, 4.06
K, 6, 0.1832, 7.19
K, 7, 0.1932, -4.06
K, 8, 0.1932, 4.06
K, 9, 0.1932, 7.19
K,10, 0.195, -2.5
K,11, 0.195, 2.5
K,12, 0.195, -0.59
K,13, 0.195, 0.59
K,14, 0.196, -0.59
K,15, 0.196, 0.59
K,16, 0.198, -1.31
K,17, 0.198, 1.31
K,18, 0.2495, -1.55
K,19, 0.2495, 1.55
K,20, 0.26, -2.5
K,21, 0.26, 2.5
K,22, 0.198, 0.0
K,23, 0.2495, 0.0
K,24, 0.1943, -2.5
K,25, 0.1943, 2.5
K,26, 0.1939, -2.5
K,27, 0.1939, 2.5
LARC,2,3,1,0.17 !L1
LSTR,3,6
LSTR,6,9
LARC,8,9,1,0.1932
LARC,7,8,1,0.1932 !L5
LSTR,4,7
LSTR,2,4
LARC,4,5,1,0.1832
LARC,5,6,1,0.1832
LSTR,5,8 !L10
LARC,23,19,1,0.2495 !L11
LSTR,17,19
LSTR,15,17
LSTR,13,15
LARC,11,13,1,0.195 !L15
LSTR,11,21
LARC,20,21,1,0.26
LSTR,10,20
LARC,10,12,1,0.195
LSTR,12,14 !L20
LSTR,14,16
LSTR,16,18
LARC,18,23,1,0.2495
LSTR,22,23
LSTR,16,22 !25
LSTR,22,17
LARC,12,13,1,0.195
LSTR,10,24
LARC,24,25,1,0.1943
LSTR,11,25 !30
LSTR,24,26
LARC,26,27,1,0.1939
LSTR,25,27
LESIZE,1,,,20
LESIZE,2,,,7
LESIZE,3,,,6
LESIZE,4,,,6
LESIZE,5,,,14
LESIZE,6,,,6
LESIZE,7,,,7
LESIZE,8,,,14
LESIZE,9,,,6
LESIZE,10,,,6
LESIZE,11,,,3
LESIZE,12,,,24
LESIZE,13,,,3
LESIZE,14,,,2
LESIZE,15,,,8
LESIZE,16,,,30
LESIZE,17,,,10
LESIZE,18,,,30
LESIZE,19,,,8
LESIZE,20,,,2
LESIZE,21,,,3
LESIZE,22,,,24
LESIZE,23,,,3
LESIZE,24,,,24
LESIZE,25,,,3
LESIZE,26,,,3
LESIZE,27,,,5
LESIZE,28,,,1
LESIZE,29,,,15
LESIZE,30,,,1
LESIZE,31,,,1
LESIZE,32,,,15
LESIZE,33,,,1
AL,1,2,9,8,7 ! rotator core - 32 parts
AGEN,32,1,,,,11.25
NUMMRG,KP
AL,5,6,8,10 ! PM - 32 sheets
AGEN,32,33,,,,11.25
ALLSEL
NUMMRG,KP
AL,3,4,10,9 ! 32 gaps between PMmagnetics
AGEN,32,65,,,,11.25
NUMMRG,KP
AL,15,19,27,28,29,30 ! gap nearby stator - 72 pats(将气隙分成3部分-3层,中间层用于计算电磁转矩,目的是使电磁转矩计算更平稳、更准确)
AGEN,72,97,,,,5
NUMMRG,KP
AL,11,12,26,24 ! 72 stator-slots
AL,25,22,23,24
AGEN,72,169,170,,,5
NUMMRG,KP
AL,13,14,27,20,21,25,26 ! 72 slot-openings
AGEN,72,313,,,,5
NUMMRG,KP
LSEL,S,,,11,23,1,1 ! stator core - 72 parts
AL,ALL
AGEN,72,385,,,,5
NUMMRG,KP
LSEL,S,,,31,33,1,1 ! gap - 中间层
LSEL,A,,,29
AL,ALL
AGEN,72,457,,,,5
NUMMRG,KP
ALLSEL
NUMMRG,KP
LOCAL,11,1 ! gap nearby rotor
LSEL,S,LOC,X,0.1938,0.194,,1
AL,ALL
LSEL,S,LOC,X,0.1931,0.1933,,1
AL,ALL
AOVLAP,529,530
ADELE,530
ALLSEL
NUMCMP,ALL
LOCAL,11,0
/INPUT,MAT6,SIM ! 冷扎硅钢
/INPUT,MAT7,SIM ! 普通钢
/INPUT,MAT8,SIM ! 永磁材料
TBCOPY,BH,6,2
TBCOPY,BH,7,3
TBCOPY,BH,8,4
TBCOPY,BH,4,5
TBCOPY,BH,4,6
TBCOPY,BH,4,7
TBCOPY,BH,4,8
TBCOPY,BH,4,9
TBCOPY,BH,4,10
TBCOPY,BH,4,11
TBCOPY,BH,4,12
TBCOPY,BH,4,13
TBCOPY,BH,4,14
TBCOPY,BH,4,15
TBCOPY,BH,4,16
TBCOPY,BH,4,17
TBCOPY,BH,4,18
TBCOPY,BH,4,19
TBCOPY,BH,4,20
TBCOPY,BH,4,21
TBCOPY,BH,4,22
TBCOPY,BH,4,23
TBCOPY,BH,4,24
TBCOPY,BH,4,25
TBCOPY,BH,4,26
TBCOPY,BH,4,27
TBCOPY,BH,4,28
TBCOPY,BH,4,29
TBCOPY,BH,4,30
TBCOPY,BH,4,31
TBCOPY,BH,4,32
TBCOPY,BH,4,33
TBCOPY,BH,4,34
TBCOPY,BH,4,35
HC = 0.893E6
BR = 1.175
THETA4 = 0
THETA5 = 191.25
THETA6 = 22.5
THETA7 = 213.75
THETA8 = 45
THETA9 = 236.25
THETA10 = 67.5
THETA11 = 258.75
THETA12 = 90
THETA13 = 281.25
THETA14 = 112.5
THETA15 = 303.75
THETA16 = 135
THETA17 = 326.25
THETA18 = 157.5
THETA19 = 348.75
THETA20 = 180
THETA21 = 11.25
THETA22 = 202.5
THETA23 = 33.75
THETA24 = 225
THETA25 = 56.25
THETA26 = 247.5
THETA27 = 78.75
THETA28 = 270
THETA29 = 101.25
THETA30 = 292.5
THETA31 = 123.75
THETA32 = 315
THETA33 = 146.25
THETA34 = 337.5
THETA35 = 168.75
!!以下角度对Halbach结构尤为适用,非此结构无需定义
THETA36 = 95.625
THETA37 = 286.875
THETA38 = 118.125
THETA39 = 309.375
THETA40 = 140.625
THETA41 = 331.875
THETA42 = 163.125
THETA43 = 354.375
THETA44 = 185.625
THETA45 = 16.875
THETA46 = 208.125
THETA47 = 39.375
THETA48 = 230.625
THETA49 = 61.875
THETA50 = 253.125
THETA51 = 84.375
THETA52 = 275.625
THETA53 = 106.875
THETA54 = 298.125
THETA55 = 129.375
THETA56 = 320.625
THETA57 = 151.875
THETA58 = 343.125
THETA59 = 174.375
THETA60 = 5.625
THETA61 = 196.875
THETA62 = 28.125
THETA63 = 219.375
THETA64 = 50.625
THETA65 = 241.875
THETA66 = 73.125
THETA67 = 264.375
ASEL,S,,,33,,,1
AATT,4
*AFUN,DEG
MP,MGXX,4,HC*COS(THETA4)
MP,MGYY,4,HC*SIN(THETA4)
ASEL,S,,,34,,,1
AATT,5
*AFUN,DEG
MP,MGXX,5,HC*COS(THETA5)
MP,MGYY,5,HC*SIN(THETA5)
ASEL,S,,,35,,,1
AATT,6
*AFUN,DEG
MP,MGXX,6,HC*COS(THETA6)
MP,MGYY,6,HC*SIN(THETA6)
ASEL,S,,,36,,,1
AATT,7
*AFUN,DEG
MP,MGXX,7,HC*COS(THETA7)
MP,MGYY,7,HC*SIN(THETA7)
ASEL,S,,,37,,,1
AATT,8
*AFUN,DEG
MP,MGXX,8,HC*COS(THETA8)
MP,MGYY,8,HC*SIN(THETA8)
ASEL,S,,,38,,,1
AATT,9
*AFUN,DEG
MP,MGXX,9,HC*COS(THETA9)
MP,MGYY,9,HC*SIN(THETA9)
ASEL,S,,,39,,,1
AATT,10
*AFUN,DEG
MP,MGXX,10,HC*COS(THETA10)
MP,MGYY,10,HC*SIN(THETA10)
ASEL,S,,,40,,,1
AATT,11
*AFUN,DEG
MP,MGXX,11,HC*COS(THETA11)
MP,MGYY,11,HC*SIN(THETA11)
ASEL,S,,,41,,,1
AATT,12
*AFUN,DEG
MP,MGXX,12,HC*COS(THETA12)
MP,MGYY,12,HC*SIN(THETA12)
ASEL,S,,,42,,,1
AATT,13
*AFUN,DEG
MP,MGXX,13,HC*COS(THETA13)
MP,MGYY,13,HC*SIN(THETA13)
ASEL,S,,,43,,,1
AATT,14
*AFUN,DEG
MP,MGXX,14,HC*COS(THETA14)
MP,MGYY,14,HC*SIN(THETA14)
ASEL,S,,,44,,,1
AATT,15
*AFUN,DEG
MP,MGXX,15,HC*COS(THETA15)
MP,MGYY,15,HC*SIN(THETA15)
ASEL,S,,,45,,,1
AATT,16
*AFUN,DEG
MP,MGXX,16,HC*COS(THETA16)
MP,MGYY,16,HC*SIN(THETA16)
ASEL,S,,,46,,,1
AATT,17
*AFUN,DEG
MP,MGXX,17,HC*COS(THETA17)
MP,MGYY,17,HC*SIN(THETA17)
ASEL,S,,,47,,,1
AATT,18
*AFUN,DEG
MP,MGXX,18,HC*COS(THETA18)
MP,MGYY,18,HC*SIN(THETA18)
ASEL,S,,,48,,,1
AATT,19
*AFUN,DEG
MP,MGXX,19,HC*COS(THETA19)
MP,MGYY,19,HC*SIN(THETA19)
ASEL,S,,,49,,,1
AATT,20
*AFUN,DEG
MP,MGXX,20,HC*COS(THETA20)
MP,MGYY,20,HC*SIN(THETA20)
ASEL,S,,,50,,,1
AATT,21
*AFUN,DEG
MP,MGXX,21,HC*COS(THETA21)
MP,MGYY,21,HC*SIN(THETA21)
ASEL,S,,,51,,,1
AATT,22
*AFUN,DEG
MP,MGXX,22,HC*COS(THETA22)
MP,MGYY,22,HC*SIN(THETA22)
ASEL,S,,,52,,,1
AATT,23
*AFUN,DEG
MP,MGXX,23,HC*COS(THETA23)
MP,MGYY,23,HC*SIN(THETA23)
ASEL,S,,,53,,,1
AATT,24
*AFUN,DEG
MP,MGXX,24,HC*COS(THETA24)
MP,MGYY,24,HC*SIN(THETA24)
ASEL,S,,,54,,,1
AATT,25
*AFUN,DEG
MP,MGXX,25,HC*COS(THETA25)
MP,MGYY,25,HC*SIN(THETA25)
ASEL,S,,,55,,,1
AATT,26
*AFUN,DEG
MP,MGXX,26,HC*COS(THETA26)
MP,MGYY,26,HC*SIN(THETA26)
ASEL,S,,,56,,,1
AATT,27
*AFUN,DEG
MP,MGXX,27,HC*COS(THETA27)
MP,MGYY,27,HC*SIN(THETA27)
ASEL,S,,,57,,,1
AATT,28
*AFUN,DEG
MP,MGXX,28,HC*COS(THETA28)
MP,MGYY,28,HC*SIN(THETA28)
ASEL,S,,,58,,,1
AATT,29
*AFUN,DEG
MP,MGXX,29,HC*COS(THETA29)
MP,MGYY,29,HC*SIN(THETA29)
ASEL,S,,,59,,,1
AATT,30
*AFUN,DEG
MP,MGXX,30,HC*COS(THETA30)
MP,MGYY,30,HC*SIN(THETA30)
ASEL,S,,,60,,,1
AATT,31
*AFUN,DEG
MP,MGXX,31,HC*COS(THETA31)
MP,MGYY,31,HC*SIN(THETA31)
ASEL,S,,,61,,,1
AATT,32
*AFUN,DEG
MP,MGXX,32,HC*COS(THETA32)
MP,MGYY,32,HC*SIN(THETA32)
ASEL,S,,,62,,,1
AATT,33
*AFUN,DEG
MP,MGXX,33,HC*COS(THETA33)
MP,MGYY,33,HC*SIN(THETA33)
ASEL,S,,,63,,,1
AATT,34
*AFUN,DEG
MP,MGXX,34,HC*COS(THETA34)
MP,MGYY,34,HC*SIN(THETA34)
ASEL,S,,,64,,,1
AATT,35
*AFUN,DEG
MP,MGXX,35,HC*COS(THETA35)
MP,MGYY,35,HC*SIN(THETA35)
ASEL,S,,,65,,,1 !! Halbach
AATT,1
*AFUN,DEG
MP,MGXX,36,HC*COS(THETA36)
MP,MGYY,36,HC*SIN(THETA36)
ASEL,S,,,66,,,1
AATT,1
*AFUN,DEG
MP,MGXX,37,HC*COS(THETA37)
MP,MGYY,37,HC*SIN(THETA37)
ASEL,S,,,67,,,1
AATT,1
*AFUN,DEG
MP,MGXX,38,HC*COS(THETA38)
MP,MGYY,38,HC*SIN(THETA38)
ASEL,S,,,68,,,1
AATT,1
*AFUN,DEG
MP,MGXX,39,HC*COS(THETA39)
MP,MGYY,39,HC*SIN(THETA39)
ASEL,S,,,69,,,1
AATT,1
*AFUN,DEG
MP,MGXX,40,HC*COS(THETA40)
MP,MGYY,40,HC*SIN(THETA40)
ASEL,S,,,70,,,1
AATT,1
*AFUN,DEG
MP,MGXX,41,HC*COS(THETA41)
MP,MGYY,41,HC*SIN(THETA41)
ASEL,S,,,71,,,1
AATT,1
*AFUN,DEG
MP,MGXX,42,HC*COS(THETA42)
MP,MGYY,42,HC*SIN(THETA42)
ASEL,S,,,72,,,1
AATT,1
*AFUN,DEG
MP,MGXX,43,HC*COS(THETA43)
MP,MGYY,43,HC*SIN(THETA43)
ASEL,S,,,73,,,1
AATT,1
*AFUN,DEG
MP,MGXX,44,HC*COS(THETA44)
MP,MGYY,44,HC*SIN(THETA44)
ASEL,S,,,74,,,1
AATT,1
*AFUN,DEG
MP,MGXX,45,HC*COS(THETA45)
MP,MGYY,45,HC*SIN(THETA45)
ASEL,S,,,75,,,1
AATT,1
*AFUN,DEG
MP,MGXX,46,HC*COS(THETA46)
MP,MGYY,46,HC*SIN(THETA46)
ASEL,S,,,76,,,1
AATT,1
*AFUN,DEG
MP,MGXX,47,HC*COS(THETA47)
MP,MGYY,47,HC*SIN(THETA47)
ASEL,S,,,77,,,1
AATT,1
*AFUN,DEG
MP,MGXX,48,HC*COS(THETA48)
MP,MGYY,48,HC*SIN(THETA48)
ASEL,S,,,78,,,1
AATT,1
*AFUN,DEG
MP,MGXX,49,HC*COS(THETA49)
MP,MGYY,49,HC*SIN(THETA49)
ASEL,S,,,79,,,1
AATT,1
*AFUN,DEG
MP,MGXX,50,HC*COS(THETA50)
MP,MGYY,50,HC*SIN(THETA50)
ASEL,S,,,80,,,1
AATT,1
*AFUN,DEG
MP,MGXX,51,HC*COS(THETA51)
MP,MGYY,51,HC*SIN(THETA51)
ASEL,S,,,81,,,1
AATT,1
*AFUN,DEG
MP,MGXX,52,HC*COS(THETA52)
MP,MGYY,52,HC*SIN(THETA52)
ASEL,S,,,82,,,1
AATT,1
*AFUN,DEG
MP,MGXX,53,HC*COS(THETA53)
MP,MGYY,53,HC*SIN(THETA53)
ASEL,S,,,83,,,1
AATT,1
*AFUN,DEG
MP,MGXX,54,HC*COS(THETA54)
MP,MGYY,54,HC*SIN(THETA54)
ASEL,S,,,84,,,1
AATT,1
*AFUN,DEG
MP,MGXX,55,HC*COS(THETA55)
MP,MGYY,55,HC*SIN(THETA55)
ASEL,S,,,85,,,1
AATT,1
*AFUN,DEG
MP,MGXX,56,HC*COS(THETA56)
MP,MGYY,56,HC*SIN(THETA56)
ASEL,S,,,86,,,1
AATT,1
*AFUN,DEG
MP,MGXX,57,HC*COS(THETA57)
MP,MGYY,57,HC*SIN(THETA57)
ASEL,S,,,87,,,1
AATT,1
*AFUN,DEG
MP,MGXX,58,HC*COS(THETA58)
MP,MGYY,58,HC*SIN(THETA58)
ASEL,S,,,88,,,1
AATT,1
*AFUN,DEG
MP,MGXX,59,HC*COS(THETA59)
MP,MGYY,59,HC*SIN(THETA59)
ASEL,S,,,89,,,1
AATT,1
*AFUN,DEG
MP,MGXX,60,HC*COS(THETA60)
MP,MGYY,60,HC*SIN(THETA60)
ASEL,S,,,90,,,1
AATT,1
*AFUN,DEG
MP,MGXX,61,HC*COS(THETA61)
MP,MGYY,61,HC*SIN(THETA61)
ASEL,S,,,91,,,1
AATT,1
*AFUN,DEG
MP,MGXX,62,HC*COS(THETA62)
MP,MGYY,62,HC*SIN(THETA62)
ASEL,S,,,92,,,1
AATT,1
*AFUN,DEG
MP,MGXX,63,HC*COS(THETA63)
MP,MGYY,63,HC*SIN(THETA63)
ASEL,S,,,93,,,1
AATT,1
*AFUN,DEG
MP,MGXX,64,HC*COS(THETA64)
MP,MGYY,64,HC*SIN(THETA64)
ASEL,S,,,94,,,1
AATT,1
*AFUN,DEG
MP,MGXX,65,HC*COS(THETA65)
MP,MGYY,65,HC*SIN(THETA65)
ASEL,S,,,95,,,1
AATT,1
*AFUN,DEG
MP,MGXX,66,HC*COS(THETA66)
MP,MGYY,66,HC*SIN(THETA66)
ASEL,S,,,96,,,1
AATT,1
*AFUN,DEG
MP,MGXX,67,HC*COS(THETA67)
MP,MGYY,67,HC*SIN(THETA67)
ASEL,S,,,385,456,1,1
AATT,2
ASEL,S,,,1,32,1,1
AATT,3
ASEL,S,,,97,384,1,1 ! 非Halbach结构也可以ASEL,S,,,65,384,1,1
ASEL,A,,,457,529,1
AATT,1
ALLSEL
AMESH,ALL
SAVE,20kW,DB
FINISH
RESUME, 20kW,DB
*CFOPEN, 20kW,DAT,,APPEND !建立一个DAT文件,把Ansys缓存数据保存下来,以免关闭Ansys时丢失
FINISH
/SOLU
ANTYPE,TRANS
TRNOPT,FULL
ALLSEL
TM_ST=1E-8
TM_END=1
TM_INC=1.42045454545454545454545454545E-4 !! 1.5 electric degree per step,rotor rotates at 110 r/min
EA0=0 设定电位初值
EB0=0
EC0=0
IA0=0 设定电流初值
IB0=0
IC0=0
NSTEP=0
AUTOTS,ON
*DO,TM,TM_ST,TM_END,TM_INC
TIME,TM
NSTEP=NSTEP+1
/INPUT,'20kW_ROT','txt'
/COM %%%%% BOUNDARY CONDITION %%%%%%
CSYS,1
NSEL,S,LOC,X,0.2599,0.2601
NSEL,A,LOC,X,0.1699,0.1701
D,ALL,AZ,0
ALLSEL
/COM %%%%% FOR FORCE CALCULATION USING VIRTUAL WORKS
ASEL,S,,,97,456,1,1
LSLA,S
NSLA,S,1
BF,ALL,MVDI,1
NSEL,INVE
BF,ALL,MVDI,0
ALLSEL
DI=0
*DO,DI,1,100,1 ! 绕组电流-加载(迭代)
AS =2.8E-4 ! 半槽面积
N = 19 ! 匝数
*AFUN,DEG
JA = IA0*N/AS
JB = IB0*N/AS
JC = IC0*N/AS
BFEDELE,ALL,ALL
ASEL,S,,,169,295,18,1
ASEL,A,,,170,296,18
ASEL,A,,,178,304,18
ESLA,S
BFE,ALL,JS,,,,-JA
ASEL,S,,,173,299,18,1
ASEL,A,,,174,300,18
ASEL,A,,,183,309,18
ESLA,S
BFE,ALL,JS,,,,JA
ASEL,S,,,172,298,18,1
ASEL,A,,,181,307,18
ASEL,A,,,182,308,18
ESLA,S
BFE,ALL,JS,,,,-JB
ASEL,S,,,177,303,18,1
ASEL,A,,,185,311,18
ASEL,A,,,186,312,18
ESLA,S
BFE,ALL,JS,,,,JB
ASEL,S,,,175,301,18,1
ASEL,A,,,176,302,18
ASEL,A,,,184,310,18
ESLA,S
BFE,ALL,JS,,,,-JC
ASEL,S,,,171,297,18,1
ASEL,A,,,179,305,18
ASEL,A,,,180,306,18
ESLA,S
BFE,ALL,JS,,,,JC
ALLSEL
NEQIT,50 ! NONLINEAR SOLUTION
CNVTOL,A,,1E-4
SOLVE
FINISH
/INPUT,20kW_UI,TXT
DELTIA=(ILA-IA0)/ILA
*IF,ILA,ABGT,IA0,THEN
IA0=IA0+(ILA-IA0)/3
*ELSEIF,ILA,ABLT,IA0
IA0=ILA+(IA0-ILA)/3
*ELSE
IA0=IA0
*ENDIF
DELTIB=(ILB-IB0)/ILB
*IF,ILB,ABGT,IB0,THEN
IB0=IB0+(ILB-IB0)/3
*ELSEIF,ILB,ABLT,IB0
IB0=ILB+(IB0-ILB)/3
*ELSE
IB0=IB0
*ENDIF
DELTIC=(ILC-IC0)/ILC
*IF,ILC,ABGT,IC0,THEN
IC0=IC0+(ILC-IC0)/3
*ELSEIF,ILC,ABLT,IC0
IC0=ILC+(IC0-ILC)/3
*ELSE
IC0=IC0
*ENDIF
*IF,DELTIA,ABLT,0.005,EXIT
*IF,DELTIB,ABLT,0.005,EXIT
*IF,DELTIC,ABLT,0.005,EXIT
*ENDDO
EA0=EA
EB0=EB
EC0=EC
P=VA*ILA+VB*ILB+VC*ILC
/INPUT,'20kW_TT','txt'
*VWRITE,VA,ILA,VB,ILB,VC,ILC,P,TOR,PWR
(9F11.3)
*ENDDO
*CFCLOS,20kW,DAT
FINISH
[ 本帖最后由 venture 于 2006-12-20 21:43 编辑 ] |