CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   Calculating pressure coefficient in OpenFoam (https://www.cfd-online.com/Forums/openfoam/73674-calculating-pressure-coefficient-openfoam.html)

 mecbe2002 March 14, 2010 07:03

Calculating pressure coefficient in OpenFoam

Hi all,

I am simulating flow around Onera M6 wing.
How to calculate pressure coefficient around the wing.

Also I want to plot Pressure coefficient at various positions along the length of the wing. how to do it paraview.

regards
mecbe

 darioth December 11, 2010 07:09

Hi, if you want to calculate the Cp for later calculate Cl, Cd and Cm, you can do it very simply just adding a few lines in the controlDict file, otherwise I donīt know how to calculate the Cp.

Regards

DM.

 aerothermal January 27, 2011 16:40

In Paraview is easy.

- Extract Block (the body or wing)
- Plot on Plane Intersection

So it is done!

However, I do not know how to do it with sampling tools of openfoam at command line. Can anyone help?

 truong_nm January 27, 2011 19:15

Hi mecbe2002

Can you post your case? I am interested in external aerodynamics with OpenFOAM.

Basically, you'll haveto rebuilt the wing (vtk files) then with Paraview, you will add "slices" along the wingspan.

Thank you very much,
Minh

 naveen January 28, 2011 02:51

Calculating pressure coefficient in OpenFoam

hi all,

If you want to calculate the Cp from paraview, do the following procedure

1) convert the simulated results into vtk format
2) install the binary pack of paraview (later versions like 3.4, 3.6 or 3.8)
3) open the converted vtk format of the patches you want to calculate Cp (like wing, airfoil) in paraview
4) In paraview, at the left hand side, there is a function called split vertical command, click on that and click on spreadsheet view
5) after opening spread sheet view select the cells option or point option in paraview on right side of the paraview window
6) in that you wil get the pressures on all the cells on your patch
7) in the paraview window there is an option called file--------->export (export this into cvs file format)
8) open this cvs format in excell sheet and perform the calculations by using the formula Cp=(p-p0)/0.5*rho*v*v for 1 cell and drag all the values there...you wil get cp values for your patch

Regards

Naveen.K.M
CFD Engineer
National Aerospace Laboratories
Bangalore

 mvoss January 28, 2011 04:27

hi,

regarding the last post: you might want to check for the "calculator" tool ... so you can perform your desired calculus within paraView.

neebwie

 salvoblack February 16, 2011 06:39

[QUOTE=naveen;292587]hi all,

4) In paraview, at the left hand side, there is a function called split vertical command, click on that and click on spreadsheet view

sorry, where are these functions?? i can't find them

 mvoss February 16, 2011 06:51

for me this option is on the top right of my 3D screen (looks like an open book)

 chathanm April 15, 2012 17:36

hi naveen
i am simulating a membrane wing and looking at its aerodynamics . i was wondering how to plot Cp with openfoam itself?
have u got any idea about that?
regards
martin

 Akuji April 19, 2012 06:27

Quote:
 Originally Posted by chathanm (Post 354788) hi naveen i am simulating a membrane wing and looking at its aerodynamics . i was wondering how to plot Cp with openfoam itself? have u got any idea about that? regards martin
Hello!

You can use gnuplot. Here a theme about how to use it

 s.m April 28, 2013 09:49

how could we draw this cp value then?

Quote:
 Originally Posted by naveen (Post 292587) hi all, If you want to calculate the Cp from paraview, do the following procedure 1) convert the simulated results into vtk format 2) install the binary pack of paraview (later versions like 3.4, 3.6 or 3.8) 3) open the converted vtk format of the patches you want to calculate Cp (like wing, airfoil) in paraview 4) In paraview, at the left hand side, there is a function called split vertical command, click on that and click on spreadsheet view 5) after opening spread sheet view select the cells option or point option in paraview on right side of the paraview window 6) in that you wil get the pressures on all the cells on your patch 7) in the paraview window there is an option called file--------->export (export this into cvs file format) 8) open this cvs format in excell sheet and perform the calculations by using the formula Cp=(p-p0)/0.5*rho*v*v for 1 cell and drag all the values there...you wil get cp values for your patch Regards Naveen.K.M CFD Engineer National Aerospace Laboratories Bangalore
hi Naveen
would you please tell us after doing this steps, how could we draw the value of "cp"
as you know these value are foe y axis, what about x axis?
what should we put for x axis to draw the pressureCoeffs?

 naveen April 28, 2013 23:40

Calculating pressure coefficient in OpenFoam

In the cvs format you have the values for x axis, check the column by name po (this as same value as x axis) ie chord length wise dimensions....

 s.m April 29, 2013 12:03

1 Attachment(s)
Quote:
 Originally Posted by naveen (Post 423726) hi saeidehmohamadim, In the cvs format you have the values for x axis, check the column by name po (this as same value as x axis) ie chord length wise dimensions....
thank you very much naveen,
in the .CSV file i have a column with name "p" and also have 3 column with name "point:0" , "point:1" , "point:3" , which point should i use for drawing my pressurecoeffs?

i put my .csv file in the attachment, would you please look at it and tell me what should i do?
i really don't know,thanks a lot again:)

 naveen April 29, 2013 23:34

Calculating pressure coefficient in OpenFoam

You should take the pressure values on only on the airfoil surface from the paraview (.csv) format on.you should take the slice position on the airfoil because it wil be 3D. Can you tell how many points are there in the airfoil surface then i can tell how to plot the cp vs. x/c for airfoil.

 s.m April 30, 2013 09:10

2 Attachment(s)
Quote:
 Originally Posted by naveen (Post 424047) dear saeidehmohamadim, You should take the pressure values on only on the airfoil surface from the paraview (.csv) format on.you should take the slice position on the airfoil because it wil be 3D. Can you tell how many points are there in the airfoil surface then i can tell how to plot the cp vs. x/c for airfoil.
hi naveen, thank you for guiding me, i take a slice on the surface that airfoil is, but nothing does change. i don't anderstand your question, i put my blockMeshDict and boundary in following:
please tell me how to plot the cp vs. x/c for airfoil, thanks a gain :)

 s.m April 30, 2013 09:50

Quote:
 Originally Posted by naveen (Post 292587) hi all, If you want to calculate the Cp from paraview, do the following procedure 1) convert the simulated results into vtk format 2) install the binary pack of paraview (later versions like 3.4, 3.6 or 3.8) 3) open the converted vtk format of the patches you want to calculate Cp (like wing, airfoil) in paraview 4) In paraview, at the left hand side, there is a function called split vertical command, click on that and click on spreadsheet view 5) after opening spread sheet view select the cells option or point option in paraview on right side of the paraview window 6) in that you wil get the pressures on all the cells on your patch 7) in the paraview window there is an option called file--------->export (export this into cvs file format) 8) open this cvs format in excell sheet and perform the calculations by using the formula Cp=(p-p0)/0.5*rho*v*v for 1 cell and drag all the values there...you wil get cp values for your patch Regards Naveen.K.M CFD Engineer National Aerospace Laboratories Bangalore
Hi Naveen,
i have a question about the 8) step:
i read in a forum; the pressure value that openFoam gives us after finishing the analysis, is "p/rho" not only "p", is it right?
now my question is,
as i solve the incompressible flow over an airfoil, so the pressure that i give after finishing the analysis is "gauge pressure", therefore the theoretical formula for cp that is
" cp=(p-pinf)/(0.5*rho*Uinlet^2) " is reduced for my analysis to
" cp=(p guage)/(0.5*Uinlet^2) ??

thanks a lot for kind helping:)

 lfpaulinyi August 2, 2013 04:54

I believe you are right, you shall use cp=(p guage)/(0.5*Uinlet^2)

sincerely,

Paulinyi

 s.m August 2, 2013 04:58

Quote:
 Originally Posted by lfpaulinyi (Post 443446) Dear saeidehmohamadi, I believe you are right, you shall use cp=(p guage)/(0.5*Uinlet^2) sincerely, Paulinyi
Thank you dear luis.

 faraz22 August 19, 2013 11:27

hello s.m can you please tell me here what do you really mean by p gauge i mean when calculating through paraView. thanks !

 s.m August 19, 2013 12:02

Quote:
 Originally Posted by faraz22 (Post 446674) hello s.m can you please tell me here what do you really mean by p gauge i mean when calculating through paraView. thanks !

Hi
For the incompressible analysis in openFoam, the pressure that is given after finishing the analysis is "gauge pressure" , means "pressure/rho"
because in this analysis openFoam set "gauge pressure /rho" in 0 folder.

But for compressible analysis openFoam set "absolute pressure" in 0 folder, and it also give you "absolute pressure after finishing the analysis, what you see in the paraview.

All times are GMT -4. The time now is 11:44.