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

[General] Paraview-Python Scripting, Accessing Data Through Objects

Register Blogs Community New Posts Updated Threads Search

Like Tree4Likes
  • 4 Post By wilandlane

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   February 7, 2014, 16:52
Default Paraview-Python Scripting, Accessing Data Through Objects
  #1
New Member
 
William
Join Date: Apr 2013
Posts: 11
Rep Power: 13
wilandlane is on a distinguished road
I am trying to do some post processing of simulations using Paraview through Python scripting. So far I have used Paraview's Trace function to generate the basic script but I can not seem to view/export the data:

Quote:
from paraview.simple import *

tStop = 100
dt = 0.01
files = ['%s/FT_%04d.vtu' %t for t in range(int(tStop/dt))]

FT_ = XMLUnstructuredGridReader(FileName=files)

FT_.PointArrayStatus = []
FT_.CellArrayStatus = ['EP_G', 'P_G', 'P_S', 'Gas_Velocity', 'Solids_Velocity_1', 'Gas_temperature', 'Solids_temperature_1']

Calculator2 = Calculator()
Calculator2.Function = '(Gas_temperature+Solids_temperature_1)/(2)'
Calculator2.ResultArrayName = 'Tbar'
Calculator2.AttributeMode = 'Cell Data'

IntegrateVariables2 = IntegrateVariables()

PlotSelectionOverTime1 = PlotSelectionOverTime()

selection_source_3717 = IDSelectionSource( ContainingCells=0, InsideOut=0, FieldType='CELL', IDs=[-1L, 0L] )

PlotSelectionOverTime1.Selection = selection_source_3717
The new data seems to be stored in PlotSelectionOverTime1. According to Paraview, the attribute is "Row Data"; however, the class does not contain such an attribute. Is anyone familiar with Paraview's objects/attributes in Python?

Thanks!
wilandlane is offline   Reply With Quote

 


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
[OpenFOAM] Paraview Find Data cojua8 ParaView 2 March 19, 2018 08:57
paraview - cell data or point data on plot over line bye bye my blue OpenFOAM 0 December 13, 2016 06:07
[General] Determining number of cores and/or paraview executable via python aerogt3 ParaView 0 December 9, 2014 05:54
[General] 2 datas on one plot Akuji ParaView 46 December 1, 2013 14:06
[General] paraview ignores SPACING in STRUCTURED_POINTS vtk data? jaffar ParaView 0 November 27, 2012 09:36


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