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

[General] Loading the correct time step with pvpython

Register Blogs Community New Posts Updated Threads Search

Like Tree3Likes
  • 1 Post By Jack001
  • 2 Post By kkk

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 3, 2015, 08:35
Default Loading the correct time step with pvpython
  #1
Member
 
Jack
Join Date: May 2015
Posts: 98
Rep Power: 10
Jack001 is on a distinguished road
PROBLEM SOLVED:

I just needed to do

Code:
UpdatePipeline(time = finalTime)


Hi all,

This should be a simple task but I can't figure it out!

I have a myrun.foam file that I can open up with paraview. When I open it I can then press the "play" button and there is an animation of whatever field variable was selected changing with the time steps. After the animation is finished I can now for example do 'Plot over line' filter and that will be extracting data from the latest time step. No problem.

However I want to do this with pvpython. I open the case by doing


Code:
reader = OpenDataFile('myrun.foam')
The only problem is that this automatically loads the data from the zeroth time step of my simulation, so any data I extract with filters correspond to their initial conditions. How do I manually select which time step I want to look at?

EDIT:

I have tried to do

Code:
finalTime =  reader.TimestepValues[-1]
reader.TimestepValues = [finalTime]
but still doesn't seem to work.
namsivag likes this.

Last edited by Jack001; November 3, 2015 at 09:47.
Jack001 is offline   Reply With Quote

Old   April 4, 2016, 07:14
Default
  #2
kkk
New Member
 
kenyoh
Join Date: Apr 2012
Location: Tokyo Japan
Posts: 21
Blog Entries: 1
Rep Power: 14
kkk is on a distinguished road
Hi

Just try this:

Code:
reader = OpenDataFile('myrun.foam')
time =  reader.TimestepValues
reader.UpdatePipeline(max(time))
RenderView1 = GetRenderView()
RenderView1.ViewTime =max(time)
Render()
Regards,
kkk
namsivag and WaterHammer1985 like this.
kkk is offline   Reply With Quote

Reply

Tags
paraview, pvpython, pvpython vtk openfoam


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
AMI speed performance danny123 OpenFOAM 21 October 24, 2020 04:13
Stuck in a Rut- interDyMFoam! xoitx OpenFOAM Running, Solving & CFD 14 March 25, 2016 07:09
Floating point exception error lpz_michele OpenFOAM Running, Solving & CFD 53 October 19, 2015 02:50
simpleFoam error - "Floating point exception" mbcx4jc2 OpenFOAM Running, Solving & CFD 12 August 4, 2015 02:20
Star cd es-ice solver error ernarasimman STAR-CD 2 September 12, 2014 00:01


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