CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Post-Processing (http://www.cfd-online.com/Forums/openfoam-post-processing/)
-   -   Data manipulation of variables from two simulations, same mesh (http://www.cfd-online.com/Forums/openfoam-post-processing/104099-data-manipulation-variables-two-simulations-same-mesh.html)

Eren10 July 3, 2012 04:58

Data manipulation of variables from two simulations, same mesh
 
Hi,

is it readily possible to do simple calculations (substract, add..) variables like the pressure from two ( or more) different simulations ? The meshes are the same.

I can do this by using p files but then I have to change the text in files and I need to this for a lot of simulations.

lovecraft22 July 3, 2012 05:46

Have you tried loading both the simulations in paraview and using the calculator?

Eren10 August 6, 2012 06:52

Quote:

Originally Posted by lovecraft22 (Post 369489)
Have you tried loading both the simulations in paraview and using the calculator?


I have to this for over the hundred simulations so I do not think that will solve my problem. Maybe I should delete the texts in files (p,U) and then use the values. Sorry for the late response.

wyldckat August 6, 2012 07:06

Greetings to all!

The way I see it, you've got at least a few options:
  • pvbatch - it's ParaView's python based batch system. Search for pvbatch here in the forum for more information. Additionally, you can use ParaView's "Python Trace" feature for getting the base script.
  • PyFoam - I'm not sure on this one... all I know is that it's a very awesome toolkit to have with OpenFOAM :)
  • Modify foamCalc for handling data from more than one mesh... although it's not that easy to do, I think :(
    The mapFields utility would be a good reference on handling more than one case folder.
  • Create a script that:
    1. Copies the reference case to a sandbox folder.
    2. Copies the fields from a second case, using different field names, to the sandbox folder.
    3. Run foamCalc over the fields.
    4. And so on...
Best regards,
Bruno


All times are GMT -4. The time now is 07:40.