XANSYS Message: 18505 [Go back to message list]
[bookmark on del.icio.us]
No rating yet
Rate item:

Subject: Re: Magnetic Field Animation
Author: Steve Groothuis
Date: 2000-11-30 12:29:00

Ara,

I've used this macro segment for visualizing high frequency waves in the
past. Modify it to extract and display HSUM.

/com, Macro to create animation sequence of a harmonic analysis
/com, Arg1 = 0 (H-field animation)
/com, Arg1 = 1 (EF-field animation)

!*ask,ssnum,The substep# you wish to animate,1
!*ask,n,The number of frames per cycle,15
ssnum=1
n=15

/post1

*afun,deg
lcdef,1,1,ssnum,0 ! real
lcdef,2,1,ssnum,1 ! imaginary

/com, *** get max and min values for contour intervals ***
/graphics,full
lcase,1
nsort,h,sum
*get,hremx,sort,,max
*get,hremn,sort,,min
nsort,ef,sum
*get,efremx,sort,,max
*get,efremn,sort,,min
lcase,2
nsort,h,sum
*get,himmx,sort,,max
*get,himmn,sort,,min
nsort,ef,sum
*get,efimmx,sort,,max
*get,efimmn,sort,,min

*if,hremx,gt,himmx,then
hmax=hremx
*else
hmax=himmx
*endif
*if,hremn,lt,himmn,then
hmin=hremn
*else
hmin=himmn
*endif
*if,efremx,gt,efimmx,then
efmax=efremx
*else
efmax=efimmx
*endif
*if,efremn,lt,efimmn,then
efmin=efremn
*else
efmin=efimmn
*endif

/graphics,power

/com, *** Put graphics commands here to create plots ***

/pbc,all,0
/ctype,1
/view,,1,1,1
/plopts,minm,off
/triad,off
/gres,plot,gsav
/expand,2,rect,half,,0.00001
/dev,font,1,helvetica,medium,r,16,,,,,

/com, *** Create looping of displays in time ***

/seg,dele
/seg,multi
*do,theta,0,360-360/n,360/n
real=cos(theta)
imag=-sin(theta)
lcfact,1,real
lcfact,2,imag
*if,real,eq,0,then
lcfact,1,1e-10
*endif
*if,imag,eq,0,then
lcfact,2,1e-10
*endif
lcase,1
lcoper,add,2

*if,arg1,eq,0,then
/title, Contours of Magnetic Field Strength
hinc=(hmax-hmin)/9*.05
/contour,all,9,hmin,,hmax+hinc
plnsol,h,sum
*elseif,arg1,eq,1,then
/title, Contours of Electric Field Strength
efinc=(efmax-efmin)/9*.05
/contour,all,9,efmin,,efmax+efinc
plnsol,ef,sum
*endif
*enddo

/seg,off
!*ask,ncycles,The number of full period cycles,10
!*ask,delay,Delay between successive frames,0.1
ncycles=10
delay=0.1

anim,ncycles,1,delay
/anfile,save,harm1,avi
finish

Best Regards,
Steve Groothuis
Micron Technology, Inc.
500 W. Renner Road, MS 323
Richardson, TX 75080
Tel: 972.994.3612
Fax: 972.994.4544
Pgr: 888.787.1328
Email: skgroothuis@m...

-----Original Message-----
Sent: Thursday, November 30, 2000 11:12 AM
To: xansys

Hi everyone..

I have done a 2D linear harmonic analysis on a 3 phase cable and got
the complex results. I got the real and imaginary part of the
magnetic field (HSUM) and used the SSRS of the real and imaginary
part to get the amplitude.

Now my problem....
how can I animate the HSUM amplitude over (Omega.t) for a full period
(2.phi) ??

I am new to Ansys and till now I have been using only the GUI
commands.
I read some of the posts here about animations, and noticed that some
suggested some kind of macro. But I couldn't understand the
macros...because as I said, I have been working only with GUI !!
so I hope you guys keep the explanation simple :-)

thank you

Ara


Posts possibly associated with message #18505AuthorDateScore
18503Magnetic Field AnimationAra.Panosyan@2000/11/30 
18505Re: Magnetic Field AnimationSteve Groothuis2000/11/30 
18512Re: Magnetic Field AnimationBill Bulat2000/11/30