CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Post-Processing (https://www.cfd-online.com/Forums/openfoam-post-processing/)
-   -   how to get the mean pressure coefficient around a cylinder (https://www.cfd-online.com/Forums/openfoam-post-processing/168384-how-get-mean-pressure-coefficient-around-cylinder.html)

zhangqin200000 March 20, 2016 22:52

how to get the mean pressure coefficient around a cylinder
 
Hi All,
I am conducting 3D flow simulation around circular cylinder with OpenFOAM. Currently, I want to get the mean pressure coefficient distribution around cylinder surface. I found there are many post-processing function existing in OpenFOAM, but I don't know which one can be used to get the pressure distribution around the center of pipeline with time.
I can use paraView or Tecplot to output the pressure distribution at once a time, but don't know how to get the average value over a period of time. I also tried to output the pressure with "Probe" function, but without good luck.

Hopefully, somebody in this forum can share their experience to me.

Thanks in advance

Bazinga March 21, 2016 00:51

To average the pressure during the simulation you can use the fieldAverage function object in the controlDict file.
The data can be used by the sample utility to create files with the mean pressure on surfaces, points, lines etc.
Search in the forum for examples and let me know if something doesn't work.

What was the problem with the probes? You can get the mean value using probes too.

zhangqin200000 March 21, 2016 07:52

Quote:

Originally Posted by Bazinga (Post 590801)
To average the pressure during the simulation you can use the fieldAverage function object in the controlDict file.
The data can be used by the sample utility to create files with the mean pressure on surfaces, points, lines etc.
Search in the forum for examples and let me know if something doesn't work.

What was the problem with the probes? You can get the mean value using probes too.

Hi Bazinga,
Thank you for your advice.
I used surfaceSampling function to output the cylinder surface points, then selected the centre section points and put in probes function. The error indicated that the point position cannot be found. I think it may due to the point is on the surface, not in the flow field.

OpenFOAM has many good post-processing function, but without proper demonstration. I will try to follow your guide.

Many thanks,

Qin

thomasArk47 March 23, 2016 14:25

Hello,

the quickest way is to work with the faceSource postprocessing tool.
It performs some operations (typically mean, max, min and so on) on face sources which can be patches, faceZone, sampledSurface. Nice for your case since you have to work on a patch...

See src/postProcessing/functionObjects/field/fieldValue.

vcvedant August 30, 2017 14:07

using sampleDict
 
Though an old post but may be useful to someone.
I am using sampleDict:
Code:

field
(
    p
);
surfaces
(
      walls_interpolated
      {
            type      patch;
            patches ("cylinderWall");
          // interpolation  true;
      }
);

'sample' will generate file containing x,y,z,p. You can use excel, matlab, octave, gnuplot to derive and plot pressure coefficient from p.


All times are GMT -4. The time now is 20:47.