-
-
October 11, 2021 at 4:25 am
supreeth.k
SubscriberI am using Solid 236 element.
October 12, 2021 at 11:34 amNKC
Forum ModeratorHi @supreeth A warning message should not have any problem with the simulation unless it's an error message.
Provide the error message if it is an error.
Ansys employees can't access attachments on this open forum. can you add screenshots or paste the lines from the code? this helps understand the problem better.
Also, we may not be able to help with scripting if is beyond the general commands on this open forum.
Hope other forum participants will pitch in and help.
Please use the image option and not the Attachment option while sharing the screenshots.
Regards
Navya
October 13, 2021 at 4:11 amsupreeth.k
SubscriberThank you Ma'am
I am attaching the screenshot of the error message.
The macros for the above simulation was taken from the Ansys tutorial.
And I have made no changes to the Macros.
title, Forces between two permanent magnets
/nopr
!npts=16
!*dim,dist,table,npts
!*dim,F,table,npts,2
d=0
d_air=0
!*do,i,1,npts
!parsave,all
!/clear,nostart
!parres
! Problem parameters
Pi=acos(-1)
mu0=4*Pi*1e-7! permeability of free space, H/m
mu0r=1! relative permeability of free space
Br=0.38! residual induction, tesla
a=10 $ b=6 $ c=3! lower magnet dimensions
aa=6 $ bb=10 $ cc=3! upper magnet dimensions
xo=-4 $ yo=-4 $ zo=8! upper magnet center offset
/com, *** Upper Magnet Displacement d = %d% (mm)
/PREP7
! Solid model
block,-a,a,-b,b,-c,c! lower magnet volume
wpoff,xo,yo,zo
block,-aa+d,aa+d,-bb,bb,-cc,cc! upper (moving) magnet volume
vplot
wpoff,-xo,-yo,-zo
block,-30,30+d_air,-34,26,-23,31! air box
vovlap,all
! Finite element model
esize,1
et,1,SOLID236! magnetic solid
keyop,1,7,1! condense forces to the corner nodes
vmesh,1,2
esize,4
numcmp,volu
msha,1,3D
vmesh,3
! Material properties
mp,mgzz,2,Br/mu0
mp,murx,2,mu0r
mp,murx,1,mu0r
vsel,s,,,1,2,,1
emod,all,mat,2
alls
nsel,s,ext
d,all,az,0! flux parallel boundary conditions
alls
vlscale,all,,,1e-3,1e-3,1e-3,,,1! scale the volumes to mm
WPSTYLE,,,,,,,,0
/ANG,1
/VIEW,1,1,1,1
/VUP,1,Z
esel,s,mat,,2
eplot
alls
fini
/SOLU
solve
fini
/POST1
vsel,s,,,2,,,1! select lower magnet along with the
! associated elements and nodes
esln
EMFT! sum up magnetic forces
alls
esel,s,mat,,2
/VSCALE,,0.3
plvect,b,,,,vect,elem,on,on! plot magnetic field
plvect,fmag,,,,vect,node,on,on! plot magnetic forces
alls
fini
!/com, i = %i%
!dist(i)=d
!F(i,1)=_fxsum! FX sum calculated by EMFT
!F(i,2)=_fysum! FY sum calculated by EMFT
!d=d+2! upper magnet displacement update
!*if,d,gt,8,then
!d_air=d-8
!*endif
!*enddo
!/axlab,x,Distance d (mm)
!/axlab,y,Forces acting the magnet (N)
!/gcol,1,Fx
!/gcol,2,Fy
!*vplot,dist(1),F(1,1),2
October 14, 2021 at 12:56 pmAshish Khemka
Forum Moderator
The message in the Output Window shows a warning regarding the unknown parameter names. The parameters _FX, _FY and _FZ looks undefined.
Regards Ashish Khemka
October 16, 2021 at 12:47 pmsupreeth.k
SubscriberBut I have used the same program that was given in low frequency analysis of Ansys guide. When I copy the macros, it should give the force between two magnets right??
Viewing 4 reply threads- The topic ‘If I use EMFT command to find the electromagnetic force. its showing a warning.’ is closed to new replies.
Innovation SpaceTrending discussionsTop Contributors-
5859
-
1906
-
1420
-
1305
-
1021
Top Rated Tags© 2026 Copyright ANSYS, Inc. All rights reserved.
Ansys does not support the usage of unauthorized Ansys software. Please visit www.ansys.com to obtain an official distribution.
-
The Ansys Learning Forum is a public forum. You are prohibited from providing (i) information that is confidential to You, your employer, or any third party, (ii) Personal Data or individually identifiable health information, (iii) any information that is U.S. Government Classified, Controlled Unclassified Information, International Traffic in Arms Regulators (ITAR) or Export Administration Regulators (EAR) controlled or otherwise have been determined by the United States Government or by a foreign government to require protection against unauthorized disclosure for reasons of national security, or (iv) topics or information restricted by the People's Republic of China data protection and privacy laws.