Writing multiple(ascii) dat files

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

Prashant
Newbie
Posts: 1
Joined: Tue Oct 27, 2015 1:06 pm
Location: Norway

Writing multiple(ascii) dat files

Postby Prashant » Tue Oct 27, 2015 1:21 pm

Hi,
I am novice user of tecplot macros esp in using loops. I have been struggling to write dat files of different time steps. I have 1000 time steps with each time step containing data.
Eg:
As macros read as :
#!MC 1400
# Created by Tecplot 360 build 14.0.2.35002
$!VarSet |MFBD| = '/home/salimant/Documents/Paper_02_Entropy_Paper/tecplot_files/phi_1.0/permeable/phi_1.0_solid/entropy_balance_files/tecplot/plt_files/time_E_03sec'
$!READDATASET '"|MFBD|/flow_chem_entprod_1.000E-03.plt" "|MFBD|/flow_chem_entprod_1.001E-03.plt" "|MFBD|/flow_chem_entprod_1.002E-03.plt" "|MFBD|/flow_chem_entprod_1.003E-03.plt" "|MFBD|/flow_chem_entprod_1.004E-03.plt" "|MFBD|/flow_chem_entprod_1.005E-03.plt" "|MFBD|/flow_chem_entprod_1.006E-03.plt" "|MFBD|/flow_chem_entprod_1.007E-03.plt" "|MFBD|/flow_chem_entprod_1.008E-03.plt" ......
................
.................
.....................
.................
...............
.................
.............

"|MFBD|/flow_chem_entprod_1.999E-03.plt" '
READDATAOPTION = NEW
RESETSTYLE = YES
INCLUDETEXT = NO
INCLUDEGEOM = NO
INCLUDECUSTOMLABELS = NO
INITIALPLOTFIRSTZONEONLY = YES
VARLOADMODE = BYNAME
ASSIGNSTRANDIDS = YES
INITIALPLOTTYPE = XYLINE
VARNAMELIST = '"x (cm)" "volume (cm^3)" "EP (erg/K/cm^3/s)" "Espec (erg/g/K)" "REspec (erg/cm^3/K)" "EP flux conv_x (erg/K/cm^2/s)" "EP flux heat_diffsn_x (erg/K/cm^2/s)" "EP flux spec_diffsn_x (erg/K/cm^2/s)"'
$!WRITEDATASET "|MFBD|/entprod_1.000E-03.dat"
INCLUDETEXT = NO
INCLUDEGEOM = NO
INCLUDECUSTOMLABELS = NO
ASSOCIATELAYOUTWITHDATAFILE = NO
ZONELIST = [1]
BINARY = NO
USEPOINTFORMAT = YES
PRECISION = 9
TECPLOTVERSIONTOWRITE = TECPLOTCURRENT
$!RemoveVar |MFBD|

I am struggling to write macro with loop to write dat file for each time step. I need help on this.

Return to “Tecplot Macro Language”

Who is online

Users browsing this forum: No registered users and 2 guests

cron