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

Load *.xyz file with pyTecplot

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 18, 2020, 16:34
Smile Load *.xyz file with pyTecplot
  #1
New Member
 
Oscar Alvarez
Join Date: Jul 2020
Location: Texas
Posts: 3
Rep Power: 5
Sprinkles is on a distinguished road
I am trying to load a *.xyz file along with it's function file *.fun using pyTecplot.

These load fine using the command prompt and when I just load them using Tecplot.

This is what I have
Code:
import logging
logging.basicConfig(level=logging.DEBUG)

import tecplot as tp
import sys

if '-c' in sys.argv:
    print("Opening Tecplot")
    tp.session.connect()

tp.new_layout()

# Load filename or List of filenames
file_names = ["mytest_121000.xyz", "mytest_121000.fun"]
tp.data.load_tecplot(file_names)

tp.export.save_png('loading_test.png', 600, supersample=3)
I get an error when I try
Code:
tp.data.load_tecplot(file_names)
The source material says that if I want to load multiple files, I have to input a list of strings. This is not working. Any help?
Sprinkles is offline   Reply With Quote

Old   August 2, 2020, 19:17
Cool I found it!!
  #2
New Member
 
Oscar Alvarez
Join Date: Jul 2020
Location: Texas
Posts: 3
Rep Power: 5
Sprinkles is on a distinguished road
The solution was to use

Code:
path = "Desktop/AutoCore"
grid_file = os.path.join(path, "mytest_121000.xyz")
func_file = os.path.join(path, "mytest_121000.fun")

dataset = tp.data.load_plot3d(grid_filenames=grid_file, function_filenames=func_file)
I learned that the *.xyz file was a grid file and had to load it as such. I also had a function file that I loaded in as well.
Sprinkles is offline   Reply With Quote

Reply

Tags
file, load, pytecplot, tecplot, xyz

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
how to calculate mass flow rate on patches and summation of that during the run? immortality OpenFOAM Post-Processing 104 February 16, 2021 09:46
[foam-extend.org] problem when installing foam-extend-1.6 Thomas pan OpenFOAM Installation 7 September 9, 2015 22:53
[swak4Foam] Problem installing swak_2.x for OpenFoam-2.4.0 towanda OpenFOAM Community Contributions 6 September 5, 2015 22:03
"parabolicVelocity" in OpenFoam 2.1.0 ? sawyer86 OpenFOAM Running, Solving & CFD 21 February 7, 2012 12:44
ParaView Compilation jakaranda OpenFOAM Installation 3 October 27, 2008 12:46


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