Hi, There are different manner to sample using OpenFOAM where the first is to do it manually at each time step using Paraview then extract the resulting curve or using the sampleDict option. For more informations on how to use it check the CFD-online forum where the link is printed bellow:
Mohammed Nadjib Hamlaoui thanks for your response. I want to do it in openfoam rather then paraview. The above post explains the method in paraview not openfoam.
Hi, yes you can do it by posProcess utility of function objects.
You need to add dictionary functions{} and subdictionary postProcWrite{} inside it. Example in controlDict file, attached.
Then you need to fill the sampleDict file, where determine a set of sampling types. I use the "cloud" because I can generate coordinates of sampling points manually. Example in sampleDict file, attached.
And finally, ou needs to define the coordinates of the sampling point. For example hpts3DFrustumL0.6H0.4z0p001.in in attach.
After all, you have two ways to sampling:
1) during calculation
Just run your solver with -postProcess, and you get a postProcessing folder in your case.
2) after calculation
If you already have a calculated case run:
postProcess -func sampleDict -time '0:'
If you wat to select specific time, see https://openfoamwiki.net/index.php/Tip_Advanced_Time_Selection_Options
For more https://www.openfoam.com/documentation/guides/latest/doc/guide-function-objects.html#sec-fos-usage.
And advance sampling for plotting over line and more: https://github.com/OpenFOAM/OpenFOAM-2.1.x/blob/master/applications/utilities/postProcessing/sampling/sample/sampleDict