CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Post-Processing

Using paraview with purgeWrite

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 20, 2023, 05:40
Default Using paraview with purgeWrite
  #1
New Member
 
Join Date: Nov 2023
Posts: 5
Rep Power: 2
maysan is on a distinguished road
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?
maysan is offline   Reply With Quote

Old   December 20, 2023, 05:55
Default
  #2
Senior Member
 
M
Join Date: Dec 2017
Posts: 694
Rep Power: 12
AtoHM is on a distinguished road
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
AtoHM is offline   Reply With Quote

Old   December 20, 2023, 08:33
Default
  #3
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,170
Rep Power: 27
Yann will become famous soon enough
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
Yann is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


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


All times are GMT -4. The time now is 15:53.