CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Visualization & Post-Processing Software > Tecplot

Need help in loading data

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 20, 2019, 09:19
Question Need help in loading data
  #1
New Member
 
Asfand Yaar Sher
Join Date: Jan 2019
Posts: 8
Rep Power: 7
@sher is on a distinguished road
Hi all!
I ran a transient simulation with the solution export in Tecplot format enabled. I was exporting data every 100 time-steps. This gave me a large number of files in Tecplot format (.plt). Now, when I load all files at once in Tecplot, it opens all files at once, merging them together. The option of solution animation is also greyed out. What am I doing wrong?
@sher is offline   Reply With Quote

Old   June 24, 2019, 14:47
Default
  #2
Senior Member
 
Scott Fowler
Join Date: May 2009
Posts: 112
Rep Power: 16
wsfowler is on a distinguished road
For data to be recognized as transient, Tecplot zones need both a Solution Time and Strand attribute assigned to them.

Strand is an integer value which identifies "like" zones through time. A positive value indicates transient. A value of zero indicates non-transient.

If this information is not embedded in the file by your solver, Tecplot will (as you've noticed) not recognize the data as transient and will attempt to load all the data at once.

You could use PyTecplot, the Python API to Tecplot 360 to modify the PLT files as such:

Code:
import glob
import tecplot as tp
files = glob.glob("*.plt")
for plt_file in files:
    tp.new_layout()
    dataset = tp.data.load_tecplot(plt_file )
    for zone in dataset.zones():
        zone.solution_time = some_solution_time
        zone.strand = some_strand
    tp.data.save_tecplot_plt(plt_file )
You'll have to come up with a strategy for determining the Strand numbers for each zone. If each of your PLT files has the same number of zones, the easiest approach would be to simply use the zone number like so:

Code:
zone.strand = zone.index+1
Note that indices in PyTecplot are zero based, hence the +1.
wsfowler is offline   Reply With Quote

Old   June 24, 2019, 16:26
Default
  #3
New Member
 
Asfand Yaar Sher
Join Date: Jan 2019
Posts: 8
Rep Power: 7
@sher is on a distinguished road
Quote:
Originally Posted by wsfowler View Post
For data to be recognized as transient, Tecplot zones need both a Solution Time and Strand attribute assigned to them.

Strand is an integer value which identifies "like" zones through time. A positive value indicates transient. A value of zero indicates non-transient.

If this information is not embedded in the file by your solver, Tecplot will (as you've noticed) not recognize the data as transient and will attempt to load all the data at once.

You could use PyTecplot, the Python API to Tecplot 360 to modify the PLT files as such:

Code:
import glob
import tecplot as tp
files = glob.glob("*.plt")
for plt_file in files:
    tp.new_layout()
    dataset = tp.data.load_tecplot(plt_file )
    for zone in dataset.zones():
        zone.solution_time = some_solution_time
        zone.strand = some_strand
    tp.data.save_tecplot_plt(plt_file )
You'll have to come up with a strategy for determining the Strand numbers for each zone. If each of your PLT files has the same number of zones, the easiest approach would be to simply use the zone number like so:

Code:
zone.strand = zone.index+1
Note that indices in PyTecplot are zero based, hence the +1.


I really appreciate the time you took to help me out. I'll work on it and post whether I made any progress. Thanks!
@sher is offline   Reply With Quote

Old   August 2, 2019, 04:49
Default
  #4
New Member
 
Timo ZHANG
Join Date: Aug 2016
Posts: 27
Rep Power: 9
ztnuaa is on a distinguished road
wsfowler's solution is very good and PyTecplot is really awesome.
If you don't want to learn PyTecplot's api, here is an easy way.
I assume your .plt file is formatted( which you can edit them directly), just add
"SOLUTIONTIME=your_data_time" under
the line "Zone T=" your_data_zone " ".
Here is an example:

Code:
Variables = "X", "Y", "Z", "X Velocity", "Y Velocity", "Z Velocity", "Diameter", " Temperature"
Zone T=" Droplet-0.031 " 
 SOLUTIONTIME=0.031
0.0398262	-0.00222718	-0.0048075	35.3844	-0.0931421	-0.145178	2.65511e-05	348.83
If you have many data files to edit, it's better to write a program to add the solutiontime line automatically. Then load them to tecplot and it will recognized the time strands.
ztnuaa is offline   Reply With Quote

Old   August 5, 2019, 15:30
Default
  #5
Senior Member
 
Scott Fowler
Join Date: May 2009
Posts: 112
Rep Power: 16
wsfowler is on a distinguished road
By convention binary files are .plt and ASCII files are .dat. Of course we can't regulate that out in the real world. Your solution is a good one for ASCII files, but won't work with binary files.
wsfowler is offline   Reply With Quote

Reply

Tags
tecplot360, transient 2d

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
CFD by anderson, chp 10.... supersonic flow over flat plate varunjain89 Main CFD Forum 18 May 11, 2018 08:31
【Help】"Error: Update_Time_Level: invalid data" Chen FLUENT 2 August 24, 2014 08:51
How to setup a simple OpenFOAM cluster? TommiPLaiho OpenFOAM Installation 3 October 27, 2013 16:15
Loading data into graph reg. from external file Julie Polyakh Siemens 0 July 20, 2003 15:27
Loading transient data of moving grid leo Siemens 3 April 9, 2003 02:35


All times are GMT -4. The time now is 16:42.