Disclaimer : This question is related to computational science, but it is a purely a post-processing question so if this is on the wrong board, please tell me

I would like to postprocess simulation results in an automatic way. Our current simulation software generates output in an ensight gold format. This means that for each simulation a name.case file is generated, which we can then open in paraview and post-process. However, the post-processing I have to carry out is very simple, yet will have to be done numerous time. Therefore, I want to carry it without launching the paraview gui in a fully automatic fashion.

What I am looking for is a way to launch a paraview script (maybe via pvpython?), do the rendering, output a .png and save it in the folder. All of this automatically without needed to launch a GUI or to interact with it. This aspect will eventually be residing inside a bash script.

I have tried looking into using pvpython which I could launch from the shell, but I have not found much documentation (is there any unified clear documentation on it?) on even opening ensight case files and post-processing images...

  • $\begingroup$ The last I'd heard from a ParaView developer, the suggested way to obtain a script was to start a trace from the GUI, then perform the actions you want to automate, then stop the trace and copy the output into your script as a starting point to hack. Hopefully someone can provide you with a fuller answer than that though. $\endgroup$
    – origimbo
    Dec 20, 2016 at 17:57
  • $\begingroup$ This part I am quite at ease with, but thanks! The issue I have is running producing the content without having to run the GUI frontend to launch the script. $\endgroup$
    – BlaB
    Dec 20, 2016 at 21:14
  • $\begingroup$ So you already have a python script that does what you want, which starts with a line "from paraview.simple import *"? Then if you're not terribly unlucky running it with pvpython from the command line will "just work", at least on linux/BSD/darwin. $\endgroup$
    – origimbo
    Dec 20, 2016 at 22:47

1 Answer 1


Following the comments from origimbo, the solution is actually very simple. You just need to generate a sufficient script using the trace option of paraview, if this script is functional (load your file, generate your image, save it to the format you wish), then you can save it as an independent script. Then, if you run this script using

pvpython SCRIPT

the script will run completly as if it were running inside paraview, but without launching the GUI. Therefore it is pretty simple...


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.