|
[Sponsors] |
December 20, 2019, 02:38 |
Plot Cp with Tecplot output data
|
#1 |
New Member
Rongyu Chu
Join Date: May 2018
Posts: 5
Rep Power: 8 |
Hey, guys, I am trying to write some Python Code to plot Cp with Tecplot output data. Right now, I am able to get right plot in Python. In the next step, I am trying to output the x,y/z,and Cp information into Excel and plot the airfoil shape and Cp. However, I find that I have no idea how to put those information in the right sequence and get a proper plot.
|
|
December 30, 2019, 16:38 |
|
#2 |
Senior Member
Scott Fowler
Join Date: May 2009
Posts: 122
Rep Power: 17 |
I'm not sure I can help you with getting the data in the proper form for Excel, but pulling the data out of Tecplot using PyTecplot is pretty easy.
Here's some example PyTecplot code, that pulls the x,y,z,Cp values out of one of the example datasets. Code:
import tecplot as tp tp.new_layout() dataset = tp.data.load_tecplot(r"C:\Program Files\Tecplot\Tecplot 360 EX Beta\examples\OneraM6wing\OneraM6_SU2_RANS.plt") xvals = dataset.zone('WingSurface').values('x').as_numpy_array() yvals = dataset.zone('WingSurface').values('y').as_numpy_array() zvals = dataset.zone('WingSurface').values('z').as_numpy_array() cp_vals = dataset.zone('WingSurface').values('Pressure_Coefficient').as_numpy_array() Scott |
|
Tags |
pressure coefficient, python, tecplot |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Using gnuplot to plot probe data | Rotidpor | OpenFOAM | 3 | March 9, 2022 06:44 |
CFD by anderson, chp 10.... supersonic flow over flat plate | varunjain89 | Main CFD Forum | 18 | May 11, 2018 08:31 |
Generating output data on AQWA Naut | afitriadhy | ANSYS | 0 | July 2, 2015 03:37 |
Improved solver data output / tracking / visualization | chriss85 | OpenFOAM Running, Solving & CFD | 1 | May 13, 2015 08:55 |
How to update polyPatchbs localPoints | liu | OpenFOAM Running, Solving & CFD | 6 | December 30, 2005 18:27 |