|
[Sponsors] |
December 20, 2023, 05:40 |
Using paraview with purgeWrite
|
#1 |
New Member
Join Date: Nov 2023
Posts: 5
Rep Power: 2 |
I am facing a situation where I have a big mesh and no disk space.
I would like to make an animation of the simulation. As I cannot save too many steps, I am using the purgeWrite setting to keep the last 5 steps. However, this is insufficient for a movie. I have a state file on paraview with how I want the image to look like. Is there a way to take a "screenshot" using the state file as soon as a new time step is made available? |
|
December 20, 2023, 05:55 |
|
#2 |
Senior Member
M
Join Date: Dec 2017
Posts: 694
Rep Power: 12 |
I cannot tell you exactly how you have to do it, but it is definetely possible to add a custom functionObject in OpenFOAM to run some arbitrary other code (e.g. a script of yours) depending on certain conditions. In this case, the functionObject should fire each time a result was written and trigger a script, lets say a python script which starts up paraview, loads the last result and saves the image.
See this: Running a python file from OpenFOAM |
|
December 20, 2023, 08:33 |
|
#3 |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,170
Rep Power: 27 |
If you are using the OpenCFD branch (openfoam.com), there is a function object to generate images at run time without having to save data to disk: https://doc.openfoam.com/2306/tools/...ostprocessing/
Depending on how you installed OpenFOAM and how you run it (workstation or remote computer / cloud) you may need to recompile OpenFOAM though. Another way would be to use the ensightWrite function object to output your results to Ensight format file. You can open it with paraview for post-processing and it is lighter than the timestep written by OpenFOAM. You can pick the variables you want to save and you can also define a mask to save only a specific part of your domain in order to only save what you need and keep it as light as possible. Just like the previous function object, you can use it without having to save time steps to disk. https://doc.openfoam.com/2306/tools/.../ensightWrite/ None of these function objects exist in the foundation branch (openfoam.org) so if this is what you are using I guess you will have to find another way. Regards, Yann |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[OpenFOAM.org] Two different versions of ParaView with same OpenFOAM release | FJSJ | OpenFOAM Installation | 2 | July 23, 2017 05:48 |
Paraview version update errors | Dan Pearce | OpenFOAM Installation | 5 | January 8, 2014 05:47 |
Installing OpenFOAM and ParaView in VirtualBox(Ubuntu on Win8) | chrisb2244 | OpenFOAM Installation | 2 | August 21, 2013 13:24 |
Newbie: Install ParaView 3.81 on OF-1.6-ext/OpenSuse 11.2? | lentschi | OpenFOAM Installation | 1 | March 9, 2011 02:32 |
paraFoam reader for OpenFOAM 1.6 | smart | OpenFOAM Installation | 13 | November 16, 2009 21:41 |