|
[Sponsors] |
[General] Batch: Create pictures of time steps |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
February 23, 2016, 07:16 |
Batch: Create pictures of time steps
|
#1 |
Member
Martin
Join Date: Nov 2011
Posts: 35
Rep Power: 14 |
Paraview 5.0.0 64bit Linux
Hello Forum, I have ENSIGHT data which I want to visualise at different views for all the time steps and so on. For this I have created different layouts which I want to use. Right now my work flow is like that. Attachment 45393
Code:
#### import the simple module from the paraview from paraview.simple import * animationScene = GetAnimationScene() animationScene.GoToFirst() PlayMode = "Snap To TimeSteps" for t in range(272, 722, 2): print t for i in range(len(GetRenderViews())) : RenderView = GetRenderViews()[i] SetActiveView(RenderView) print i WriteImage(path + "/Bilder" + str(i) + " " + str(t) + ".png") #if i == 2: # WriteImage(path_d_iso + "Droplets_ISO_" + str(t) + ".png") #if i == 1: # WriteImage(path_d_xy + "Droplets_XY_" + str(t) + ".png") #if i == 4: # WriteImage(path_d_xz + "Droplets_XZ_" + str(t) + ".png") #if i == 2: # WriteImage(path_l1_xy + "ISO1_XZ_" + str(t) + ".png") animationScene.GoToNext()
|
|
March 1, 2016, 02:56 |
|
#2 |
Member
Martin
Join Date: Nov 2011
Posts: 35
Rep Power: 14 |
Does no one has a clue?
Is there maybe an other way of exporting pictures of all the time steps? I would like to have a template for exporting the different views. |
|
March 1, 2016, 08:01 |
|
#3 |
Member
Martin
Join Date: Nov 2011
Posts: 35
Rep Power: 14 |
with using the .pvbatch in the bin folder of paraview it is now possible to run paraview in the batch mode
.../ParaView-5.0.0/bin/pvbatch --use-offscreen-rendering writeScreen_batch.py in the writeScreen_batch.py I use servermanager.LoadState(); to load the template for postprocessing the ensight data. Code:
#### import the simple module from the paraview from paraview.simple import * import os servermanager.LoadState("LayOut_cell.pvsm") path = "Bilder" if not os.path.exists(path): print "Create Path" os.makedirs(path_w_iso) #### disable automatic camera reset on 'Show' paraview.simple._DisableFirstRenderCameraReset() animationScene = GetAnimationScene() animationScene.GoToFirst() PlayMode = "Snap To TimeSteps" for t in range(272, 274, 2): print t for i in range(len(GetRenderViews())) : RenderView = GetRenderViews()[i] SetActiveView(RenderView) print i Render(); animationScene.GoToNext() |
|
March 2, 2016, 05:04 |
|
#4 |
Member
Martin
Join Date: Nov 2011
Posts: 35
Rep Power: 14 |
ok this now seams to work fairly well.
The only thing however is that if I add a new view to the template, the order of views is changed. Is there some how a fixed ID for every view? |
|
|
|
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 02:36 |
how to set periodic boundary conditions | Ganesh | FLUENT | 15 | November 18, 2020 06:09 |
How to export time series of variables for one point? | mary mor | OpenFOAM Post-Processing | 8 | July 19, 2017 10:54 |
simpleFoam error - "Floating point exception" | mbcx4jc2 | OpenFOAM Running, Solving & CFD | 12 | August 4, 2015 02:20 |
Where's the singularity/mesh flaw? | audrich | FLUENT | 3 | August 4, 2009 01:07 |