CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM (http://www.cfd-online.com/Forums/openfoam/)
-   -   Write PDF from probes sampling and runtime plotting (http://www.cfd-online.com/Forums/openfoam/89104-write-pdf-probes-sampling-runtime-plotting.html)

jose_rodrig June 4, 2011 13:36

Write PDF from probes sampling and runtime plotting
 
Hi

Is there any script on openFoam allowing one to write automatically the pdf (probability density function) from the probes output obtained in run time by the functionObjects?

Also, is there a way to display at run-time (with gnuplot, p.e.) a plot of the velocity or any other field?

Thx
Jose

wyldckat June 4, 2011 13:49

Hi Josť,

In case no one answers you in the mean time, and since I don't know about any function object that does that out-of -the-box, you can try a combo of:
Or simply try swak4foam and/or simpleFunctionObjects.

Best regards,
Bruno

jose_rodrig June 5, 2011 04:53

Thanks Bruno, It is an alternative :)

Anyway, when using the sampling functionObject to plot the velocity, it outputs the U vector in the format

# Time
0.00224007 (0.740058 -0.0983759 -0.000459691)
0.00224274 (0.740748 -0.0962097 -0.000449821)
...

How can I plot the Ux component alone using gnuplot?

jose_rodrig June 5, 2011 06:03

Quote:

Originally Posted by jose_rodrig (Post 310551)
Anyway, when using the sampling functionObject to plot the velocity, it outputs the U vector in the format

# Time
0.00224007 (0.740058 -0.0983759 -0.000459691)
0.00224274 (0.740748 -0.0962097 -0.000449821)
...

How can I plot the Ux component alone using gnuplot?

Ok, I found the answer. For those interested, in the plot command you need to had the format of the file using the "using" option as

gnuplot> plot "file" plot using 1:2 '%lf (%lf'

where 1 is the colum "Time" , 2 is the 1st component of U and %lf is a double.

Jose

wyldckat June 5, 2011 06:30

Hi Josť,

I'm glad you've managed to find the solution with gnuplot!

By the way, if and when you start to use R, it also provides very powerful plotting utilities!

Since I don't know which Linux box you are using, R is named as:
Best regards,
Bruno


All times are GMT -4. The time now is 04:01.