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

Usage of runTimePostProcessing

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 26, 2020, 11:40
Default Usage of runTimePostProcessing
  #1
Member
 
Andy
Join Date: Jul 2017
Posts: 62
Rep Power: 9
Starcatcher is on a distinguished road
Hi folks,
I would like to make a movie from a DNS-Simulation. Therefore I want to safe fotos(frames) from each time step.
My Domain is a simple cube with turbulence inside.
I work with OF-1712 sine this special DNS-Solver only exists for this version.


The only fuction I know to produce scuch "screenshots" is: runTimePostProcessing

Unfortunatelly there is noproper guide for it. The examples in the tutorials and other websites helped only a little.

Let's say, I want to make a picture of this cube-domain visualising velocity.
You find attached the settings of the runTimePostProcessing as well as the log file with the sim-feedback.

Sooo, what I've done wrong? What would be the right syntax here? Maybe somebody has a good example file?

Thank you in advance.

runtimePostProcessing.txt

log.txt
Starcatcher is offline   Reply With Quote

Old   September 28, 2020, 04:13
Default
  #2
New Member
 
bestucan's Avatar
 
Tu Can
Join Date: Jul 2017
Location: China
Posts: 16
Rep Power: 9
bestucan is on a distinguished road
maybe helpful. I use paraview to make movie. run it parallelly.
save as movies directly or step time picture, both are OK.
bestucan is offline   Reply With Quote

Old   September 28, 2020, 04:18
Default
  #3
Member
 
Andy
Join Date: Jul 2017
Posts: 62
Rep Power: 9
Starcatcher is on a distinguished road
Thanks bestucan, but I really do not want to safe the results before reading them in paraview. I want to make the movie from the calculation without saving the profiles. Otherwise it would need many terrabytes and a lot of cpu-power would be lost for the saving
Starcatcher is offline   Reply With Quote

Old   December 2, 2021, 13:58
Default Solution ?
  #4
New Member
 
Balaji
Join Date: May 2013
Posts: 21
Rep Power: 13
Nealcaffrey is on a distinguished road
Quote:
Originally Posted by Starcatcher View Post
Thanks bestucan, but I really do not want to safe the results before reading them in paraview. I want to make the movie from the calculation without saving the profiles. Otherwise it would need many terrabytes and a lot of cpu-power would be lost for the saving
Hi, did you find out the solution to this ?
Any updates how one can output pictures as jpeg/png and write out every time step or duration?

Please post the solution if you have found
Nealcaffrey is offline   Reply With Quote

Old   December 2, 2021, 16:21
Default
  #5
Senior Member
 
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,715
Rep Power: 40
olesen has a spectacular aura aboutolesen has a spectacular aura about
Quote:
Originally Posted by Nealcaffrey View Post
Hi, did you find out the solution to this ?
Any updates how one can output pictures as jpeg/png and write out every time step or duration?

Please post the solution if you have found
Catalyst perhaps?
That is what was used to make the laser melting video.
Was a bit of overkill writing png images each time step since it would have made the video far too lengthy, but nonetheless cool. Using runTimePostPro should generally be the fastest, since you can reuse OpenFOAM sampled elements etc and don't have pass things through paraview at all. However, probably only useful for production runs since setting up scenes is a bit of a pain. The Catalyst viz is certainly a bit more wysiwyg

Take a look at the video:
olesen is offline   Reply With Quote

Old   December 3, 2021, 04:45
Default
  #6
New Member
 
Balaji
Join Date: May 2013
Posts: 21
Rep Power: 13
Nealcaffrey is on a distinguished road
Quote:
Originally Posted by olesen View Post
Catalyst perhaps?
That is what was used to make the laser melting video.
Was a bit of overkill writing png images each time step since it would have made the video far too lengthy, but nonetheless cool. Using runTimePostPro should generally be the fastest, since you can reuse OpenFOAM sampled elements etc and don't have pass things through paraview at all. However, probably only useful for production runs since setting up scenes is a bit of a pain. The Catalyst viz is certainly a bit more wysiwyg

Take a look at the video:
That looks impressive ,

The problem is we are running transient analysis on cluster, on cluster the png creation is fast using runTimePostPro. Also additional software installation like Catalyst need extra costs. The runTimePostPro tutorial is the best option on cluster. But I am not how to implement it from the tutorials using ("librunTimePostProcessing.so"); libraries.
Nealcaffrey is offline   Reply With Quote

Old   December 3, 2021, 07:28
Default
  #7
Senior Member
 
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,715
Rep Power: 40
olesen has a spectacular aura aboutolesen has a spectacular aura about
Quote:
Originally Posted by Nealcaffrey View Post
That looks impressive ,

The problem is we are running transient analysis on cluster, on cluster the png creation is fast using runTimePostPro. Also additional software installation like Catalyst need extra costs. The runTimePostPro tutorial is the best option on cluster. But I am not how to implement it from the tutorials using ("librunTimePostProcessing.so"); libraries.

The wind around buildings is perhaps the most extensive example. In general, you would want to take some portion of an existing simulation and then use that for doing the setup (eg, solverName -postProcess) for runTimePostProcessing. There is unfortunately not as much documentation as would be nice (will likely need to explore the source code as well).
If you do get something interesting that could either be added to an existing tutorial, or add a new one, this would be a most welcome contribution. That way others can benefit too. Once it gets that far, please open an issue on develop.openfoam.com to get your tutorial added OR perhaps through the tutorials wiki (https://wiki.openfoam.com/index.php?title=Tutorials)
olesen is offline   Reply With Quote

Old   December 27, 2023, 14:44
Default
  #8
Senior Member
 
NotOverUnderated's Avatar
 
ONESP-RO
Join Date: Feb 2021
Location: Somwhere on Planet Earth
Posts: 127
Rep Power: 5
NotOverUnderated is on a distinguished road
Quote:
Originally Posted by olesen View Post
The wind around buildings is perhaps the most extensive example. In general, you would want to take some portion of an existing simulation and then use that for doing the setup (eg, solverName -postProcess) for runTimePostProcessing. There is unfortunately not as much documentation as would be nice (will likely need to explore the source code as well).
If you do get something interesting that could either be added to an existing tutorial, or add a new one, this would be a most welcome contribution. That way others can benefit too. Once it gets that far, please open an issue on develop.openfoam.com to get your tutorial added OR perhaps through the tutorials wiki (https://wiki.openfoam.com/index.php?title=Tutorials)
When I run windAroundBuildings tutorial on the cluster I see that the runTimePostProcessing is available (built with OpenFOAM v2306). However, the tutorial crashes when it tries to use that function object because it complains about the X server as shown below

Code:
Time = 50

smoothSolver:  Solving for Ux, Initial residual = 0.00614156, Final residual = 0.000503708, No Iterations 2
smoothSolver:  Solving for Uy, Initial residual = 0.0155772, Final residual = 0.00125321, No Iterations 2
smoothSolver:  Solving for Uz, Initial residual = 0.0177427, Final residual = 0.00150379, No Iterations 2
GAMG:  Solving for p, Initial residual = 0.0704188, Final residual = 0.00267215, No Iterations 2
time step continuity errors : sum local = 8.15277e-05, global = 6.08291e-06, cumulative = -0.000108089
smoothSolver:  Solving for epsilon, Initial residual = 0.00588112, Final residual = 0.000463942, No Iterations 1
smoothSolver:  Solving for k, Initial residual = 0.0141518, Final residual = 0.000249249, No Iterations 2
ExecutionTime = 31.9 s  ClockTime = 57 s

ensightWrite ensightWrite write: ( epsilon k p U )
vtkWrite output Time: 50
    Internal  : "postProcessing/vtkWrite/windAroundBuildings_00000050/internal.vtu"
    Boundary  : "postProcessing/vtkWrite/windAroundBuildings_00000050/boundary/inlet.vtp"
    Boundary  : "postProcessing/vtkWrite/windAroundBuildings_00000050/boundary/outlet.vtp"
    Boundary  : "postProcessing/vtkWrite/windAroundBuildings_00000050/boundary/ground.vtp"
    Boundary  : "postProcessing/vtkWrite/windAroundBuildings_00000050/boundary/frontAndBack.vtp"
    Boundary  : "postProcessing/vtkWrite/windAroundBuildings_00000050/boundary/buildings.vtp"
    volScalarField(epsilon k p)
    volVectorField(U)
subset output Time: 50
    Internal  : "postProcessing/subset/windAroundBuildings_00000050/internal.vtu"
    Boundary  : "postProcessing/subset/windAroundBuildings_00000050/boundary/inlet.vtp"
    Boundary  : "postProcessing/subset/windAroundBuildings_00000050/boundary/outlet.vtp"
    Boundary  : "postProcessing/subset/windAroundBuildings_00000050/boundary/ground.vtp"
    Boundary  : "postProcessing/subset/windAroundBuildings_00000050/boundary/frontAndBack.vtp"
    Boundary  : "postProcessing/subset/windAroundBuildings_00000050/boundary/buildings.vtp"
    volScalarField(p)
    volVectorField(U)
    volScalarField->point(p)
    volVectorField->point(U)
streamLine streamLines write:
    seeded 40 particles
    Tracks:40
    Total samples:17898
postPro1 render
2023-12-27 12:00:51.230 (  60.288s) [        B8BA2880]vtkXOpenGLRenderWindow.:464    ERR| vtkXOpenGLRenderWindow (0x11004f30): bad X server connection. DISPLAY=
Does this function object require an X server to be used?
__________________
Don't keep making the same mistakes. Try to make new mistakes.
NotOverUnderated is offline   Reply With Quote

Old   December 27, 2023, 15:02
Default
  #9
Senior Member
 
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,715
Rep Power: 40
olesen has a spectacular aura aboutolesen has a spectacular aura about
Did you compile VTK with osmesa?
olesen is offline   Reply With Quote

Old   December 28, 2023, 07:44
Default
  #10
Senior Member
 
NotOverUnderated's Avatar
 
ONESP-RO
Join Date: Feb 2021
Location: Somwhere on Planet Earth
Posts: 127
Rep Power: 5
NotOverUnderated is on a distinguished road
Quote:
Originally Posted by olesen View Post
Did you compile VTK with osmesa?
I have no idea how it was compiled since I am using it on the cluster.

How do I check if it is compiled with osmesa?

Update:

Never mind, I had to check if any libvtk*.so has a dependency on osmesa using ldd command. I think the VTK version used during the OpenFOAM building was not built with osmesa.
__________________
Don't keep making the same mistakes. Try to make new mistakes.

Last edited by NotOverUnderated; December 28, 2023 at 09:58.
NotOverUnderated is offline   Reply With Quote

Old   December 29, 2023, 07:21
Default
  #11
Senior Member
 
NotOverUnderated's Avatar
 
ONESP-RO
Join Date: Feb 2021
Location: Somwhere on Planet Earth
Posts: 127
Rep Power: 5
NotOverUnderated is on a distinguished road
I got runTimePostProcessing function object running.


0) Install osmesa, on Ubuntu 22.04:
Code:
sudo apt install libosmesa6 libosmesa6-dev
1) Download VTK by cloning its repository.
2) cd to VTK directory and create a directory 'build' and cd to it.
3) run:

Code:
ccmake .. -DVTK_OPENGL_HAS_OSMESA=ON
When you run that you will get a warning that enabling OSMESA cannot co-exist with others such as SDL, etc (disable them). You still need to activate the modules below before generating your Makefile or (ninja file if opt to).

4) Now, to find the VTK module required by the runTimePostProcesisng function object, clone the openfoam repository and the visualization module.
5) cd to the runTimePostProcessing directory and find the required modules by running:

Code:
grep -r 'VTK::'

# For me the output was:

VTK::FiltersCore
VTK::FiltersGeometry
VTK::FiltersSources
VTK::IOGeometry
VTK::IOImage
VTK::IOLegacy
VTK::IOXML
VTK::ParallelCore
VTK::ParallelMPI
VTK::RenderingAnnotation
VTK::RenderingCore
VTK::RenderingParallel
6) cd back to the vtk folder (step 2) and run the command from step 3 again and enable the modules above.

7) Compile vtk and install it
Code:
sudo make install #will be installed by default under /usr/local/
8) Now it is important to set the environment variable VTK_DIR to /usr/local/

Code:
export VTK_DIR=/usr/local
8*) I have tried to to compile the runTimePostProcessing FO by running ./Allwmake, it compiled but it does not work (for unknown reasons) with the version of of OpenFOAM I install via the official binaries. So I had to compile OpenFOAM from scratch (took hours on my laptop).

9) Clone OpenFOAM repository (skip if you did in step 4).
10) Build OpenFOAM.
11) Compile the runTimePostProcessing library.


12) If you have tried step (8*) make sure to remove the librunTimePostProcessing.so from $FOAM_USER_LIBBIN and $FOAM_LIBBBIN and replace them with the newly compiled one after building OpenFOAM from source.

13) You must run this to get it to work for this session to load (you need to run this only this time):

Code:
sudo ldconfig
14) Run the $FOAM_TUTORIALS/incompressible/simpleFoam/windAroundBuildings to test this FO.

The steps above are not perfect but they should work.
__________________
Don't keep making the same mistakes. Try to make new mistakes.

Last edited by NotOverUnderated; December 29, 2023 at 20:15.
NotOverUnderated is offline   Reply With Quote

Old   October 17, 2024, 13:16
Default
  #12
New Member
 
Leung Ho Man
Join Date: Aug 2020
Posts: 9
Rep Power: 6
homan95 is on a distinguished road
Has anyone found better runtimepostpro documentation? it's been a pain trying to get it running. Thanks!
homan95 is offline   Reply With Quote

Reply

Tags
1712, openfoam, postprocessing, runtime, runtimepostprocessing


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
Large memory usage for steady simulation Wenqiang SU2 2 May 15, 2020 14:40
[ANSYS Meshing] is my memory usage normal? Renold ANSYS Meshing & Geometry 2 April 9, 2019 15:09
New workstation for different usage scenarios - CPU and RAM natem Hardware 6 August 7, 2013 03:47
Boosting CPU usage earlybird FLUENT 2 November 2, 2012 11:32
OpenFOAM Solver/BC usage description murrayjc OpenFOAM 3 August 25, 2009 05:48


All times are GMT -4. The time now is 06:43.