Marco to do interpolation on self created box for transient data

Tecplot's automation language

Python scripts were supported in the alpha version for Legacy 360 (2013). Python inquiries in 2017 should be directed to the PyTecplot Forum.

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

zonexo
Expert
Posts: 59
Joined: Mon Feb 11, 2008 8:57 pm
Location: Singapore
Contact:

Marco to do interpolation on self created box for transient data

Postby zonexo » Tue Sep 20, 2016 8:40 pm

Hi,

I have a problem as described in:

http://www.tecplottalk.com/forums/viewtopic.php?f=16&t=5249

So I am trying to create a box (or rectangle) domain around the plate and use interpolation to transfer data from the global domain to that of the box. The problem is that my global domain is divided into many parts due to the CFD parallel computing. Also, the data is transient. This results in many source zones for the flowfield.

I have to create a script which selects the correct source zones (at the right time instant) for the interpolation. The value 25 is due to the 25 time instants. The script is:

$!LOOP 25
$!LINEARINTERPOLATE
SOURCEZONES = [|LOOP|+0,|LOOP|+25,|LOOP|+50,...,|LOOP|+23975]
DESTINATIONZONE = |LOOP|+24075
VARLIST = [7]
LINEARINTERPCONST = 0
LINEARINTERPMODE = SETTOCONST
$!EXTENDEDCOMMAND
COMMANDPROCESSORID = 'Strand Editor'
COMMAND = 'ZoneSet=|LOOP|+24075;AssignStrands=TRUE;StrandValue=1;AssignSolutionTime=TRUE;TimeValue=0.04*|LOOP|;'
$!ENDLOOP

However, I got an error running the script due to |LOOP|. If I replace |LOOP| with actual numbers as in:

$!LINEARINTERPOLATE
SOURCEZONES = [1,26,...,23976]
DESTINATIONZONE = 24076
VARLIST = [7]
LINEARINTERPCONST = 0
LINEARINTERPMODE = SETTOCONST
$!EXTENDEDCOMMAND
COMMANDPROCESSORID = 'Strand Editor'
COMMAND = 'ZoneSet=24076;AssignStrands=TRUE;StrandValue=1;AssignSolutionTime=TRUE;TimeValue=0.04;'

It works fine. But then I would need to run 25 times manually. How should I insert |LOOP| into the script to make it work? Or is it not possible?

Return to “Tecplot Macro Language”

Who is online

Users browsing this forum: No registered users and 1 guest