Dear All,<br><br>I have been recently experimenting with OpenFOAM and paraview, in particular pvbatch. In particular, I am interested in exporting images and data from paraview, using pvbatch.<br><br>To this end, I do the following:<br>
<br>[1] Run OpenFOAM and generate the required "state file" in paraview (say pressure.pvsm)<br>[2] Run "pvbatch extract.py", where my extract.py looks as follows:<br><br>from paraview.simple import *<br>
servermanager.LoadState("/home/jameswh/OpenFOAM/ram-2.1.0/run/tutorials/incompressible/icoFoam/cavity/pressure.pvsm")<br>GetActiveSource()<br>SetActiveView(GetRenderView())<br>Render()<br>WriteImage("/home/ram/image1.png")<br>
<br>and it works fine. However, I have two fundamental problems:<br><br>[1] If I change my input to OpenFOAM, and run the above (extract.py), the images are not scaled to the correct units (pressure). How can I automatically rescale the results value? So, say for case 1 run, my min and max are 5 and 10, for case 2 run, my min and max and 10 and 20. However, since Iam using the pvsm from case 1, my images in case 2 also show 5 and 10, rather than 10 and 20. I found the "properties" tag in the *.pvsm file, and I notice that the values are "hard coded" How can I say "scale values automatically"? I hope my question is clear.<br>
<br>[2] Secondly, I would like to write out values using "Save Data", and I am looking for an equivalent of "save data" in pvbatch. I tried doing a python trace, but, when I do a Save Data, it does not seem to track/trace anything.<br>
<br>If anyone has encountered the above problems, and possibly have a solution, Id be glad if you could point me in the right direction.<br><br>Thank you for your time.<br><br>regards,<br><br>James WH<br><br>Research Fellow in Engineering,<br>
Oxford.<br>