ybli 发表于 2017-2-28 10:58:36

3D永磁体静态磁场模拟实例

因项目需要,近日正在学习ANSYS磁场分析基础知识,有幸在论坛找到mybq多年前发表的一段命令流,对新人非常有益,在此表示感谢。看到论坛依然有朋友在寻找永磁体静态磁场模拟的入门实例,因此,本人对命令流进行了适当调整并添加了一些说明,与大家分享,欢迎大家讨论学习,共同进步。

实例说明:
永磁体直径为2cm,高度为3cm,材料为N35钕铁硼磁铁,磁极在沿Z轴线方向。永磁体、空气用SOLID96建模,远场用INFIN47建模,计算永磁体的静态磁场分布。

命令流如下:

finish
/clear, nostart
/filname, Example_N35
/title,


/prep7
! ---------------------------------------
! parametric define
! ---------------------------------------
*set, all, ,                                 ! clear all parameters

R1 = 0.01                              ! radius of EMAG material
R2 = 0.10                              ! air radius

! ---------------------------------------
! element and material property
! ---------------------------------------
emunit, mks                              ! specifies the system of units for magnetic filed problems
et, 1, solid96                            ! 3-D magnetic scalar solid
et, 2, infin47
mp, murx, 1, 1                           ! magnetic relative permeabilities
mp, murx, 2, 1.05
mp, mgzz, 2, 883000                      ! magnetic coercive forces

! ---------------------------------------
! geometry modeling and meshing
! ---------------------------------------
csys, 0
wpcsys, -1, 0

cyl4, , , 0, 0, R1, 360
cyl4, , , 0, 0, R2, 360
allsel
aovlap, all

vext, all, , , , , 0.1
asel, s, loc, z, 0.1
vext, all, , , , , 0.03
asel, s, loc, z, 0.13
vext, all, , , , , 0.1
allsel, all

mat, 1
esize, 0.005
vsweep, all

vsel, s, , , 3
eslv, s
emodif, all, mat, 2


! ---------------------------------------
! boundary
! ---------------------------------------
type, 2
mat,1

csys, 1
nsel, s, loc, z, 0
nsel, a, loc, z, 0.23
nsel, a, loc, x, R2-0.01, R2+0.01
esurf, all

csys, 0
allsel
modmsh, detach                           ! release all associativity between the current solid model and finite element model
vdele, all
adele, all
ldele, all
kdele, all
save


! ---------------------------------------
! solve
! ---------------------------------------
/solu
allsel, all
solve
save


! ---------------------------------------
! post
! ---------------------------------------
/post1
set, last
esel, s, mat, , 2
plnsol, b, z                                     ! component magnetic flux density or vector sum
plvect, h, , , , vect, elem, on, 0       ! magnetic field intensity vector
plvect, b, , , , vect, elem, on, 0       ! magnetic flux density vector

分析结果:

ybli 发表于 2017-2-28 11:04:15

新手,不对之处还请各位前辈多多指点。

另外,如果是要计算永磁体不远处一铁块受到的吸附力,是不是直接将铁块放进去算就可以了?有什么需要注意的吗?

独特的磁力古 发表于 2017-8-24 09:27:13

我也是在做铁球在永磁体中的受力情况请问你是怎么把铁块放进去的?感激不尽
页: [1]
查看完整版本: 3D永磁体静态磁场模拟实例