CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM

Calculating pressure coefficient in OpenFoam

Register Blogs Community New Posts Updated Threads Search

Like Tree24Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 14, 2010, 07:03
Question Calculating pressure coefficient in OpenFoam
  #1
Senior Member
 
KGN
Join Date: Oct 2009
Location: Chennai, India
Posts: 121
Rep Power: 17
mecbe2002 is on a distinguished road
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
mecbe2002 is offline   Reply With Quote

Old   December 11, 2010, 07:09
Default
  #2
New Member
 
darioth's Avatar
 
Darío Montes
Join Date: Aug 2009
Location: Córdoba, Argentina
Posts: 12
Rep Power: 17
darioth is on a distinguished road
Send a message via MSN to darioth Send a message via Skype™ to darioth
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.
__________________
Darío Montes
darioth@hotmail.com
darioth is offline   Reply With Quote

Old   January 27, 2011, 16:40
Default
  #3
Senior Member
 
aerothermal's Avatar
 
Guilherme da Silva
Join Date: Aug 2010
Location: Sao Paulo - Brazil
Posts: 120
Rep Power: 16
aerothermal is on a distinguished road
Send a message via Skype™ to aerothermal
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?
chengyu and Gang Wang like this.
aerothermal is offline   Reply With Quote

Old   January 27, 2011, 19:15
Default
  #4
Member
 
Ngoc-Minh Truong
Join Date: Feb 2010
Location: Toulouse, France
Posts: 42
Rep Power: 16
truong_nm is on a distinguished road
Send a message via MSN to truong_nm
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
truong_nm is offline   Reply With Quote

Old   January 28, 2011, 02:51
Default Calculating pressure coefficient in OpenFoam
  #5
Senior Member
 
NAVEEN.K.M
Join Date: Mar 2009
Location: Bangalore, Karnataka, india
Posts: 114
Rep Power: 17
naveen is on a distinguished road
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
naveen is offline   Reply With Quote

Old   January 28, 2011, 04:27
Default
  #6
Senior Member
 
Matthias Voß
Join Date: Mar 2009
Location: Berlin, Germany
Posts: 449
Rep Power: 20
mvoss is on a distinguished road
hi,

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

neebwie
mvoss is offline   Reply With Quote

Old   February 16, 2011, 06:39
Default
  #7
Member
 
Join Date: Oct 2010
Location: Naples
Posts: 50
Rep Power: 16
salvoblack is on a distinguished road
[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
salvoblack is offline   Reply With Quote

Old   February 16, 2011, 06:51
Default
  #8
Senior Member
 
Matthias Voß
Join Date: Mar 2009
Location: Berlin, Germany
Posts: 449
Rep Power: 20
mvoss is on a distinguished road
for me this option is on the top right of my 3D screen (looks like an open book)

Last edited by mvoss; February 16, 2011 at 09:28.
mvoss is offline   Reply With Quote

Old   April 15, 2012, 18:36
Default
  #9
New Member
 
Martin
Join Date: Dec 2011
Posts: 2
Rep Power: 0
chathanm is on a distinguished road
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
chathanm is offline   Reply With Quote

Old   April 19, 2012, 07:27
Default
  #10
Member
 
Arina
Join Date: Oct 2009
Location: Belarus
Posts: 71
Rep Power: 17
Akuji is on a distinguished road
Send a message via ICQ to Akuji
Quote:
Originally Posted by chathanm View Post
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
chathanm likes this.
Akuji is offline   Reply With Quote

Old   April 28, 2013, 10:49
Default how could we draw this cp value then?
  #11
s.m
Senior Member
 
saeideh mohamadi
Join Date: Aug 2012
Posts: 229
Rep Power: 15
s.m is on a distinguished road
Quote:
Originally Posted by naveen View Post
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?
i am confused, please help me
s.m is offline   Reply With Quote

Old   April 29, 2013, 00:40
Default Calculating pressure coefficient in OpenFoam
  #12
Senior Member
 
NAVEEN.K.M
Join Date: Mar 2009
Location: Bangalore, Karnataka, india
Posts: 114
Rep Power: 17
naveen is on a distinguished road
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....
naveen is offline   Reply With Quote

Old   April 29, 2013, 13:03
Default
  #13
s.m
Senior Member
 
saeideh mohamadi
Join Date: Aug 2012
Posts: 229
Rep Power: 15
s.m is on a distinguished road
Quote:
Originally Posted by naveen View Post
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
Attached Files
File Type: gz vtkairfoil.csv.tar.gz (11.4 KB, 105 views)

Last edited by s.m; April 30, 2013 at 02:17.
s.m is offline   Reply With Quote

Old   April 30, 2013, 00:34
Default Calculating pressure coefficient in OpenFoam
  #14
Senior Member
 
NAVEEN.K.M
Join Date: Mar 2009
Location: Bangalore, Karnataka, india
Posts: 114
Rep Power: 17
naveen is on a distinguished road
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.
naveen is offline   Reply With Quote

Old   April 30, 2013, 10:10
Default
  #15
s.m
Senior Member
 
saeideh mohamadi
Join Date: Aug 2012
Posts: 229
Rep Power: 15
s.m is on a distinguished road
Quote:
Originally Posted by naveen View Post
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
Attached Files
File Type: txt blockMeshDict.txt (69.5 KB, 94 views)
File Type: txt boundary.txt (1.5 KB, 70 views)
s.m is offline   Reply With Quote

Old   April 30, 2013, 10:50
Default
  #16
s.m
Senior Member
 
saeideh mohamadi
Join Date: Aug 2012
Posts: 229
Rep Power: 15
s.m is on a distinguished road
Quote:
Originally Posted by naveen View Post
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
s.m is offline   Reply With Quote

Old   August 2, 2013, 05:54
Default
  #17
New Member
 
Luis Felipe Paulinyi
Join Date: Feb 2013
Location: Southampton, UK
Posts: 4
Rep Power: 13
lfpaulinyi is on a distinguished road
Dear saeidehmohamadi,

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

sincerely,

Paulinyi
s.m and beatlejuice like this.
lfpaulinyi is offline   Reply With Quote

Old   August 2, 2013, 05:58
Default
  #18
s.m
Senior Member
 
saeideh mohamadi
Join Date: Aug 2012
Posts: 229
Rep Power: 15
s.m is on a distinguished road
Quote:
Originally Posted by lfpaulinyi View Post
Dear saeidehmohamadi,

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

sincerely,

Paulinyi
Thank you dear luis.
s.m is offline   Reply With Quote

Old   August 19, 2013, 12:27
Default
  #19
New Member
 
faraz
Join Date: May 2013
Posts: 7
Rep Power: 13
faraz22 is on a distinguished road
hello s.m can you please tell me here what do you really mean by p gauge i mean when calculating through paraView. thanks !
faraz22 is offline   Reply With Quote

Old   August 19, 2013, 13:02
Default
  #20
s.m
Senior Member
 
saeideh mohamadi
Join Date: Aug 2012
Posts: 229
Rep Power: 15
s.m is on a distinguished road
Quote:
Originally Posted by faraz22 View Post
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.
faraz22 likes this.
s.m is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
"Pressure Inlet" Boundary Setup Wijaya FLUENT 15 May 18, 2016 11:08
Calculation of the Governing Equations Mihail CFX 7 September 7, 2014 07:27
How to get the time- space-average of Pressure Coefficient in FLUENT? ivanbuz FLUENT 1 August 9, 2009 15:35
Pressure Coefficient Viscous Coefficient gunposer FLUENT 0 June 15, 2009 08:10
Does star cd takes reference pressure? monica Siemens 1 April 19, 2007 12:26


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