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

[General] Scripting a time

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By Flowkersma

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 26, 2018, 17:14
Default Scripting a time
  #1
New Member
 
Mike
Join Date: Feb 2018
Posts: 12
Rep Power: 8
Superdude_123 is on a distinguished road
I'm trying to jump to time 7500 (index 1500) and save a CSV file. I've tried different ideas from what I've found on the web and no luck. What I've tried is commented out, but you'll get the idea of what I've tried.

Any help would be appreciated.

Code:
#Render()
#view = GetActiveView()
#reader = GetActiveSource()
#reader.TimestepValues
#tsteps = reader.TimestepValues
#annTime = AnnotateTimeFilter(reader)
#Show(annTime)
#view.ViewTime = tsteps[7500]
#Render()

slice1.AnimationTime = [7500]


#slice1.ViewTime = 1600
#slice1.CacheKey = 1600
#slice1.UseCache = 0
#slice1 = GetAnimationScene()
#slice1.AnimationTime = 1600


# save data
SaveData('/Public/Case 1 time 7500_.csv', proxy=slice1, Precision=5,
    UseScientificNotation=0,
    WriteAllTimeSteps=0,
    FieldAssociation='Cells')

#slice1Display.ViewTime = 1600
#slice1Display.CacheKey = 1600
#slice1Display.UseCache = 0
#slice1Display = GetAnimationScene()
#slice1Display.AnimationTime = 1600
Also, is there a way to not have Paraview write a "0" before ".csv"? I have the underscore there because my current plan is to just rename all files ending in name_#.csv to name.csv .
Superdude_123 is offline   Reply With Quote

Old   September 30, 2018, 17:52
Default
  #2
Senior Member
 
Mikko
Join Date: Jul 2014
Location: The Hague, The Netherlands
Posts: 243
Rep Power: 12
Flowkersma is on a distinguished road
Hi Mike,

Change the timestep:
Code:
slice1.UpdatePipeline(time=7500)
Save a CSV file:
Code:
name = 'foo.csv'
SaveData(name)
Best, Mikko
Superdude_123 likes this.
Flowkersma 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
courant number increases to rather large values 6863523 OpenFOAM Running, Solving & CFD 22 July 5, 2023 23:48
simpleFoam error - "Floating point exception" mbcx4jc2 OpenFOAM Running, Solving & CFD 12 August 4, 2015 02:20
Micro Scale Pore, icoFoam gooya_kabir OpenFOAM Running, Solving & CFD 2 November 2, 2013 13:58
AMI interDyMFoam for mixer nu problem danny123 OpenFOAM Programming & Development 8 September 6, 2013 02:34
plot over time fferroni OpenFOAM Post-Processing 7 June 8, 2012 07:56


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