CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Post-Processing (http://www.cfd-online.com/Forums/openfoam-post-processing/)
-   -   Post processing in ParaFoam (http://www.cfd-online.com/Forums/openfoam-post-processing/108721-post-processing-parafoam.html)

Gitesh P October 31, 2012 05:32

Post processing in ParaFoam
 
Hello,

I have calculated case in OpenFOAM. I need some help regarding post processing in ParaFoam.

(i) If I want to plot certain data for e.g. velocity/temperature with different time step at certain location in the domain then how can I do that. I mean plot of T vs time(from 0 sec to 5 sec).

(ii) I want to plot same graph T vs time (from 0 sec to 5 sec) but this time I need one averaged value of T in the whole domain at particular time step.

Please help me !!!

With regards,
GP

RomW October 31, 2012 12:32

Hi Gitesh,


If I understood well your problem, I believe you should use the 'probes' function to monitor a given variable (T, U etc...) at a given point location within your computational domain at different time step.

To do so, you should add this piece of code in your system/controlDict file of your case.

Example:

functions
{
probes // to monitor
{
// Where to load it from
functionObjectLibs ("libsampling.so");
type probes;

// Name of the directory for probe data
//name probes;

// Write at same frequency as fields
outputControl timeStep;
outputInterval 1;
setFormat gnuplot; // you can set the format you want but if you are used to gnuplot, it is easy // to get the data out of that

// Fields to be probed
fields
(
T
);

probeLocations
(
(-0.2 0.055 0)
);
}
}

Your result file will appear in the 'probes folder', newly created, once your run the case and successfully ran the first timeStep,


Hope it helps,
Romain

Gitesh P November 2, 2012 07:47

Thanks Romain,

It works nicely. Now I am able to get those data ate selected locations.

Can you how we can plot it by using gnuplot ?

With regards,
GP

RomW November 2, 2012 08:30

Assuming that you already installed gnuplot, open the 'xterm' terminal and once in the probes\0.446 directory (whatever time, but wherever the probe gnu file is located), run 'gnuplot' command and type:

Quote:

plot 'U' using 1:2 with line
replace U by whatever variable you probe (should also be the name of the gnuplot file) and 1:2 indicates the data column you need to use, so just replace those values by the one you want to use and 'with line' connects your data points.

you can also add title, axis title, legend and so on, just check out the gnuplot website.

I hope it helped again
Romain


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