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

Extract field data in tecplot over time

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By wsfowler

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 13, 2024, 08:17
Default Extract field data in tecplot over time
  #1
Senior Member
 
Saeed Jamshidi
Join Date: Aug 2019
Posts: 214
Rep Power: 8
saeed jamshidi is on a distinguished road
Hello everyone,

I'm going to prepare some data for machine learning. To this end, I need to get field data such as pressure and velocity over time for all cell centers.

However, I have simulated my problem in Fluent Unsteady. So, how can I extract the field data in tecplot over time?

In tecplot I follow up these procedures:
  1. create macro
  2. load data
  3. create rectangular zone
  4. interpolate data to the zone
  5. and finally write the data

All are good, except third step, where I should define I and J numbers.
How can I extract data for all cells over time respectively?
Thank you.
Attached Images
File Type: jpg Screenshot (255).jpg (55.3 KB, 9 views)
saeed jamshidi is offline   Reply With Quote

Old   January 14, 2024, 07:09
Default
  #2
Senior Member
 
Saeed Jamshidi
Join Date: Aug 2019
Posts: 214
Rep Power: 8
saeed jamshidi is on a distinguished road
Any Idea?🙏
saeed jamshidi is offline   Reply With Quote

Old   May 6, 2024, 19:50
Default
  #3
Senior Member
 
Scott Fowler
Join Date: May 2009
Posts: 123
Rep Power: 17
wsfowler is on a distinguished road
PyTecplot is a great way to grab raw data from Tecplot 360.

If the data are already cell-centered, simply grab and array of data using the following PyTecplot (python code)

Code:
import tecplot as tp
from tecplot.constant import *
dataset = tp.active_frame().dataset

# Get an array of Pressure values for the first zone
zone = dataset.zone(0) # zone numbers are zero based in PyTecplot
variable = dataset.variable("Pressure")
values = zone.values(variable)[:]

# Loop over all zones and all variables, getting the cell-centered data values
for z in dataset.zones():
    for v in dataset.variables():
        var_values = z.values(v)
        if var_values.location == ValueLocation.CellCentered:
            cc_values = var_values[:]
            # Do something with cc_values
saeed jamshidi likes this.
wsfowler is offline   Reply With Quote

Reply


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
[Other] Contribution a new utility: refine wall layer mesh based on yPlus field lakeat OpenFOAM Community Contributions 58 December 23, 2021 03:36
Postprocess: sampleDict works but creates no output folder shock77 OpenFOAM Post-Processing 14 November 15, 2021 09:27
Convergence problem of OF WUYing OpenFOAM Running, Solving & CFD 2 September 20, 2021 11:09
Star cd es-ice solver error ernarasimman STAR-CD 2 September 12, 2014 01:01
same geometry,structured and unstructured mesh,different behaviour. sharonyue OpenFOAM Running, Solving & CFD 13 January 2, 2013 23:40


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