Animating xy maps with all zones active

Moderators: davetaflin, salter, steve, jprenaud, straton, Chris Idso

Broono
Newbie
Posts: 2
Joined: Thu Aug 14, 2014 2:37 am
Location: Croatia

Animating xy maps with all zones active

Postby Broono » Thu Aug 14, 2014 9:35 am

Please can somebody explain me how can I write macro for
animating xy maps, when I have maps that contains more than one zone.
The problem is that animation file I get works only with first zone, the other zones ain't active.

This is my macro file:

#!MC 1000
$!EXPORTSETUP
EXPORTFNAME="F:\FAX\...\OKVIR\animacija.avi"
EXPORTFORMAT=AVI
$!EXPORTSETUP ANIMATIONSPEED = 3
$!VARSET |NumFiles| = 51
$!VARSET |BASEDIR| = "C:\...\Desktop\NF"
$!EXPORTSTART
$!Loop |NumFiles|
$!READDATASET "|BASEDIR|\TEC|loop|.DAT"
$!ACTIVEFIELDZONES = [ 1-4 ]
$!VIEW ZOOM
X1 = 0
Y1 = 0
X2 = 6
Y2 = 13
$!EXPORTNEXTFRAME
$!EndLoop
$!EXPORTFINISH

and this is how looks one of files 'TEC|loop|.DAT'

ZONE
0.00000000E+00 0.00000000E+00
0.13109331E-03 0.93750000E-01
0.51322422E-03 0.18750000E+00
. .
. .
. .
ZONE
0.45699999E-01 0.30000000E+01
0.45798391E-01 0.30937500E+01
0.46085194E-01 0.31875000E+01
. .
. .
. .
ZONE
.
.
.

Please help!!!

User avatar
salter
Moderator
Posts: 188
Joined: Thu Dec 21, 2006 10:57 am
Location: NASA Langley Research Center
Contact:

Re: Animating xy maps with all zones active

Postby salter » Fri Aug 15, 2014 5:56 am

Broono,

I wrote a suite of macros for the quick macro panel (QMP) that animates XY maps. You simply set up all the maps you want to animate, and then loop through the zones in each map, simultaneously. I did this for a time accurate computation where each zone represented a different time step, and each map represented a different function, such as pressure along the chord of a wing. Is this what you seek?
Steve...

Aerospace Research Engineer
Aerothermodynamics Branch
NASA Langley Research Center

Broono
Newbie
Posts: 2
Joined: Thu Aug 14, 2014 2:37 am
Location: Croatia

Re: Animating xy maps with all zones active

Postby Broono » Mon Aug 18, 2014 3:30 am

Hi Salter,

Thanks for replay, I solve it with my own code. The problem is now I don't
know how to animate files so the first map is active during all time of animation and the other maps are in the loop.

Maybe I should try to insert layout first and then animate the other maps?

User avatar
salter
Moderator
Posts: 188
Joined: Thu Dec 21, 2006 10:57 am
Location: NASA Langley Research Center
Contact:

Re: Animating xy maps with all zones active

Postby salter » Tue Aug 19, 2014 12:58 pm

Broono,

To animate all the line maps, simply set them up, and have their display active. Then you can use the following simple macro:

Code: Select all

$!VarSet |NumFrames| = (|NumZones|-1)
$!Loop |NumFrames|
  $!VarSet |CurrentFrame| = (|loop|+1)
  $!Loop |NumLineMaps|
    $!LineMap [|loop|]
      Assign (Zone = |CurrentFrame|)
  $!EndLoop
$!EndLoop


This will cycle through all the line maps, and change the zone sequentially. In my macro suite, the user can determine the beginning zone, increment, and if needed, ending zone.

Good Luck,
Steve...



Aerospace Research Engineer

Aerothermodynamics Branch

NASA Langley Research Center


Return to “Animation”

Who is online

Users browsing this forum: No registered users and 1 guest

cron