CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM (
-   -   How to plot variables over time (

sven June 8, 2009 22:20

How to plot variables over time

I want to plot some variables (velocity, pressure) over time. Unfortunately OpenFOAM writes the values for each timestep in a own folder. Is there a possibility to get just one file in which the values of a certain variable are listed for every time step! best would be to have a file with two columns, the first indicating the time step, the second indicating the value of a variable at that time step.Thanks for your help!

leonardo.morita June 9, 2009 03:15


Search for "probe" here in the forum. It's a function you can call in the controlDict that does exactly what you need. See the oodles/pitzDaily tutorial for syntax.



sven June 9, 2009 13:17

Hey Leonardo,

thanks for your reply. Where can I find the oodles/pitzDaily tutorial? Thank you!

agodfrey June 9, 2009 13:39

I think he means here...

leonardo.morita June 9, 2009 14:53

Actually, most of OpenFOAM tutorials aren't like other software's. Only three are documented with detailled instructions (step by step). However in each solver folder (~/OpenFOAM/<user>-<version>/run/<solver>) you can find one or more examples of cases, usually ready to run. These cases are very useful for you to see how to write input files with boundary and initial conditions, solver and model parameters, numerical schemes etc.
Take a good look into the UserGuide and search for tips here in the Forum!
Good luck!

vinu June 20, 2009 06:44

Plot over time with paraview
You can also plot using Paraview. invoke paraview

For OpenFOAM 1.4.1

command is

paraFoam casedirectoryname

For OpenFOAM 1.5

Go inside the case directory and do the command


After paraview is up. click the accept button. The go to Filters menu. then choose Extract parts. Then choose internal mesh from the left pane below where you saw the accept button. Again click accept. The choose probe from filters menu. Give the probe location in the left pane. Remember not to select any time values during this. Also turn on the enable x-y plot and temporal plot if u want to see the plot. After plot is over click save as button. This will give u the values in .csv format.

Please correct if have written anything wrong.

Azadeh90 April 6, 2011 17:58

velocity function
Hi everyone
I have a velocity for my moving wall that is a function of time, I have the function but I don't know where I can write it. I mean U is not a fix value.
It would be very kine of u if anyone could help and explain it in detail since I'm very knew to openfoam:(
Thanks a lot

hkhosravi July 11, 2011 14:55

Hi Azadeh
if i understand your prolem, you should use groovyBC for your boundry condition.

All times are GMT -4. The time now is 16:23.