11.2.2.4 LMATRIX
LMATRIX宏可以计算任意线圈组中每个线圈的微分电感矩阵和总磁链。参见《ANSYS理论手册》第5章。
LMATRIX宏用于在静磁场分析的一个“工作点”上计算任意一组导体间的微分电感矩阵和磁链。“工作点”被定义为在系统上加工作(名义)电流所得到的解,该宏命令既可用于线性求解也可用于非线性求解。
必须用波前求解器来计算“工作点”的解。
LMATRIX宏的计算依赖于对工作点进行求解的过程中建立的多个文件。该宏在执行求解之前在这些文件前面加一个前缀OPER来重命名文件,并在完成求解后自动保存这些文件。用户自己也可以保存这些文件的拷贝以进行备份。 该宏命令返回一个N×N+1矩阵参数,N×N部分表示N-绕组系统的微分电感值,此处N表示系统中的线圈数。N+1列表示总磁链。第I行表示第I个线圈。另外,电感矩阵的值还以文本文件的格式输出,以供外部使用。文件中第一个列表表示每个线圈的磁链。第二个列表表示微分电感矩阵的上三角部分。
命令:LMATRIX
GUI:Main Menu>Solution>-Solve-Electromagnet>-Static Analysis-Induct Matrix 在调用LMATRIX宏之前,还需要给线圈单元赋一个名义电流值。对于使用磁矢势(MVP)法或基于棱边元方法进行求解的静磁分析,可以使用BFV、BFA或BFE命令来给线圈单元赋名义电流(以电流密度的方式)。对于使用简化标势法(RSP)、差分标势法(DSP)和通用标势法(GSP)的静磁分析,可以使用SOURCE36单元的实常数来给线圈单元赋名义电流。
为了使用LMATRIX宏,必须事先用*DIM命令定义一个N阶数组,N为线圈数,数组的每行都表示一个线圈。数组的值等于线圈在工作点时每匝的名义电流值,且电流值不能为零,当确实有零电流时,可以用一个很小的电流值来近似。另外,还需用CM命令把每个线圈的单元组合成一个部件。每组独立线圈单元的部件名必须是用一个前缀后面再加线圈号来定义。一个线圈部件可由标量(RSP/DSP/GSP)或矢量单元(MVP)混合组成,最重要的一点是这些单元的激励电流与前面数组中所描述的电流相同。
在LMATRIX宏中需定义一个用于保存电感矩阵的数组名,用LMATRIX宏的对称系数(symfac)来定义对称性。如果由于对称性而只建了n分之一部分模型,则计算出的电感乘以n就得到总的电感值。
当工作点位于BH曲线的弯点处时,切向磁导率变化最快,会导致计算的感应系数随收敛标准而变化。为了获得更加准确的解,收敛标准要定义得更加严格一些,不仅仅是缺省值1.0×10-3。一般在执行MAGSOLV命令时,选择1.0×10-4或1.0×10-5。
在使用LMATRIX命令前,不要施加(或删除)非均匀加载,非均匀加载由以下原因生成:
·自由度命令(D, DA,等)在节点或者实体模型上定义非0值 ·带有非0约束的CE命令
不要在不包含在单元组件中的单元上施加任何载荷(如current) 下面的例子是一个3线圈系统,每个线圈的名义电流分别为1.2、1.5和1.7安/匝,其分析的命令流如下。在这个例子中,数组名为“curr”,线圈部件名前缀为“wind”,电感矩阵的计算值存贮在名为“ind”数组中。值得注意的是,在LMATRIX命令行中,这些名字必须用单引号引起来。
*dim,cur,,3!3个线圈系统数组
cur(1)=1.2!线圈1的名义电流为1.2安培/匝 cur(2)=1.5!线圈2的名义电流为1.5安培/匝 cur(3)=1.7!线圈3的名义电流为1.7安培/匝 esel,s„„!选择线圈1的单元
cm,wind1,elem!给选出的单元赋予部件名wind1 esel,s„„!选择线圈2的单元
cm,wind2,elem!给选出的单元赋予部件名wind2 esel,s„„!选择线圈3的单元
cm,wind3,elem!给选出的单元赋予部件名wind3 symfac=2!对称系数
Imaxtrix,symfac,’wind’,’curr’,’ind’ !计算微分电感矩阵和总磁链
*stat,ind!列出ind电感矩阵
11.2.2.5 下面是以命令流方式进行的一个计算电感矩阵的例子 该例计算一个二线圈系统(永磁电感器件)在非线性工作点下的微分电感矩阵和
总磁链,其示意图如下:
几何性质:x1=0.1, x2=0.1, x=0.1, y=0.1 材料性质:μr=1.0(空气),Hc=25(永磁体),B-H曲线(永磁体,见输入参数)
线圈1:名义电流=0.25安/匝,匝数=10 线圈2:名义电流=0.125安/匝,匝数=20 目标值:L11=4, L22=16, L12=8 命令流如下: /batch,list /title, Two-coil inductor with a permanent magnet /nopr !geometry data ! n=1! meshing parameter x=0.1! width (x size) of core y=0.1! hight of core, y size of window z=1! thickne of iron in z direction x1=0.1! width (x size) of coil 1 x2=0.1! width (x size) of coil 2 Hcy=25! coercive magnetic field in y direction n1=10! number of turns in coil1 n2=20! number of turns in coil2 ! !excitation data used by LMATRIX.MAC ! symfac=1! symmetric factor for inductance computation nc=2! number of coils *dim,cur,array,nc! nominal currents of coils *dim,coils,char,nc! names of coil components ! cur(1)=0.25! nominal current of 1st coil coils(1)=\"wind1\"! name of coil 1 component ! cur(2)=-0.125! nominal current of 2nd coil coils(2)=\"wind2\"! name of coil 2 component ! !auxiliary parameters ! mu0=3.1415926*4.0e-7 x3=x1+x2! x coordinate right to coil2 left x4=x3+2*x! x coordinate right to core x5=x4+x2! x coordinate right to coil2 right x6=x5+x1! x coordinate right to coil1 right js1=cur(1)*n1/(x1*y)! nominal current density of coil1 js2=cur(2)*n2/(x2*y)! nominal current density of coil2 ! /prep7 et,1,53 ! mp,murx,1,1! air/coil mp,mgyy,2,Hcy! coercive term Bs=2! saturation flux density Hs=100! saturation magnetic field TB,BH,2! core: H = Hs (B/Bs)^2; BS=2T;HS=100A/m *do,qqq,1,20 B=qqq/10*Bs tbpt,,Hs*(B/Bs)**2,B *enddo ! rect, 0,x1,0,y! coil1 left rect,x1,x3,0,y! coil2 left rect,x3,x4,0,y! core rect,x4,x5,0,y! coil2 right rect,x5,x6,0,y! coil1 right ! aglue,all ! asel,s,loc,x,x1/2! coil 1 volume attribute aatt,1,1,1 asel,s,loc,x,x5+x1/2 aatt,1,2,1 asel,s,loc,x,x1+x2/2! coil 2 volume attribute aatt,1,3,1 asel,s,loc,x,x4+x2/2 aatt,1,4,1 asel,s,loc,x,x3+x! iron volume attribute aatt,2,5,1 asel,all ! esize,,n amesh,all ! nsel,s,loc,x,x6! flux parallel Dirichlet at symmetry plain, x=x6 !! homogeneous Neumann flux normal at yoke, x=0 d,all,az,0 nsel,all ! esel,s,real,,1! coil 1 left component bfe,all,JS,,,,js1! unite current density in coil 1 ! esel,s,real,,2! coil 1 right component bfe,all,JS,,,,-js1! return unite current density in coil 1 ! esel,s,real,,1,2 cm,coils(1),elem ! esel,s,real,,3! coil 2 left component bfe,all,JS,,,,js2! unite current density in coil 2 ! esel,s,real,,4! coil 2 right component bfe,all,JS,,,,-js2! return unite current density in coil 2 ! esel,s,real,,3,4 cm,coils(2),elem ! ! allsel ! fini ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! /com /com obtain operating solution /com ! /solu cnvtol,csg,,1.0e-4 /out,scratch solve fini ! /post1 ! /out ! /com, /com, senergy,! Stored electromagnetic energy savelen=S_ENG senergy,1! Co-energy savelce=C_ENG ! fini ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! compute inductance lmatrix,symfac,\"wind\",\"cur\",\"ind\", ! compute inductance matrix and flux ! /com finish 你将得到如下结果:
SUMMARY OF STORED ENERGY CALCULATION Load Step Number:1.Substep Number:1.Time:0.1000E+01 Material Number ofStored EnergyMaterial Description NumberElements(J/m) 1.4.0.52360E-05LinearIsotrp...2.1.-0.33314E+00Nonlin.MagnetIsotrp._____________________________________________________________________ T O T A L5.-0.33313E+00 Note: The energy density for the active elements used in the energy calculation is stored in the element item \"MG_ENG\" for display and printing.The total stored energy is saved as parameter (S_ENG) SUMMARY OF COENERGY CALCULATION Load Step Number:1.Substep Number:1.Time:0.1000E+01 Material Number ofCoenergyMaterial Description NumberElements(J/m) 1.4.0.52360E-05LinearIsotrp...2.1.0.33314E+00Nonlin.MagnetIsotrp._____________________________________________________________________ T O T A L5.0.33314E+00 Note: The co-energy density for the active elements used in the co-energy calculation is stored in the element item \"MG_COENG\" for display and printing.The total coenergy is saved as parameter (C_ENG) _____________________________________________________________________ ________________ LMATRIX SOLUTION SUMMARY ___________________ Flux linkage of coil1.=0.19989E+01 Flux linkage of coil2.=0.39978E+01 Self inductance of coil1.=0.39976E+01 Self inductance of coil2.=0.15989E+02 Mutual inductance between coils1.and2.=0.79948E+01 Inductance matrix is stored in array parameter ind( 2., 3.) Inductance matrix is stored in file ind.txt