CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   ParaView (https://www.cfd-online.com/Forums/paraview/)
-   -   [OpenFOAM] Plot variables versus time (https://www.cfd-online.com/Forums/paraview/61081-plot-variables-versus-time.html)

jml November 21, 2008 04:19

Plot variables versus time
 
I want to plot a given variable like pressure or velocity over time (in all time steps calculated)using openfoam 1.5.
Anyone know how can i do it?
Thanks.

mahendra November 21, 2008 04:35

hi Jorge, You can use "foam
 
hi Jorge,

You can use "foamJob" command and it writes a "log" file. After that you can use "foamLog" command in which the residuals of all variables are stored at every interations.

Using third party software you can read the particular variable file to generate the plot.

example:

1. command: "foamJob MRFSimpleFoam" // This will fire the MRFSimpleFoam application and it will simultaneously start writing a "log" file in which information at all iterations is stored.

2. command after the simulation is finished: "foamLog log" // This will create the "logs" directory in which all the residual history is stored.

Hope I answered your question.

Regards,
Mahendra

cedric_duprat November 21, 2008 05:09

Hi Jorge, An other solution
 
Hi Jorge,

An other solution, maybe simpler than Mahendra's one is to use the probes utility.
check "probe" on the forum search or the user guide near the end.

you define coordinate inside your geometry, and parameter you want to plot (in system/controlDict). At each time step, Foam saves the parameter(s) at the coordinate(s).
Then, you got a colum by time file which can be ploted.

Clear ?

Cedric

martinr December 1, 2008 13:16

Dear All, Gamma data over tim
 
Dear All,
Gamma data over time was plotted using paraview 2.4.4 and then it was compared with the same graph manually done. Unfortunately, they are different and I think that paraview is giving me bad results.
Any clue?

Thanks you in advance
Martín.

PS: I dont know how can I insert the plot here for you visualize it.

martinr December 3, 2008 09:44

http://www.cfd-online.com/Open
 
http://www.cfd-online.com/OpenFOAM_D...es/1/10204.jpg


All times are GMT -4. The time now is 14:13.