西莫电机圈

 找回密码
 立即注册

QQ登录

只需一步,快速开始

手机号码,快捷登录

手机号码,快捷登录

查看: 1310|回复: 1

[求助] 大家帮我看看lmatrix应用的一段程序吧,谢谢!

[复制链接]

该用户从未签到

发表于 2011-9-1 16:41 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?立即注册

x
本帖最后由 a147258 于 2011-9-1 16:47 编辑

rt。当执行到lmatrix,symfac,'wind','cur','mmyind', 时候就出现错误,说要选用frontal solver,可是这不是默认就是这个求解器吗
顺带请问,大家都是如何计算电机中的电感的?不胜感激!

/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          ! thickness 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
tbplot

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
/solu
cnvtol,csg,,1.0e-6
solve
fini
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
/post1
senergy,           ! Stored electromagnetic energy
savelen=mmyS_ENG
senergy,1          ! Co-energy
savelce=mmyC_ENG
fini
! compute inductance
lmatrix,symfac,'wind','cur','mmyind',                ! compute inductance matrix and flux
finish

senergy,           ! Stored electromagnetic energy
savelen=mmyS_ENG
senergy,1          ! Co-energy
savelce=mmyC_ENG
fini
西莫电机论坛微信公众平台正式上线!★详情请点击★ 西莫电机论坛会员交流专用群欢迎您西莫电机论坛加群请注明论坛用户名及所从事专业,否则不予通过

签到天数: 199 天

连续签到: 18 天

[LV.7]常住居民III

发表于 2014-8-25 18:58 | 显示全部楼层
那就用一个命令,指定波前求解器!

eqslv,front
西莫电机论坛微信公众平台正式上线!★详情请点击★ 西莫电机论坛会员交流专用群欢迎您西莫电机论坛加群请注明论坛用户名及所从事专业,否则不予通过
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|小黑屋|手机版|Archiver|西莫电机圈 ( 浙ICP备10025899号-3 浙公网安备:33028202000436号

GMT+8, 2024-5-12 11:44 , Processed in 0.078146 second(s), 26 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表