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 
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. 
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? 
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 
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=(pp0)/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,
regarding the last post: you might want to check for the "calculator" tool ... so you can perform your desired calculus within paraView. neebwie 
[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 
for me this option is on the top right of my 3D screen (looks like an open book)

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 
Quote:
You can use gnuplot. Here a theme about how to use it 
how could we draw this cp value then?
Quote:
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:) 
Calculating pressure coefficient in OpenFoam
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.... 
1 Attachment(s)
Quote:
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:) 
Calculating pressure coefficient in OpenFoam
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. 
2 Attachment(s)
Quote:
please tell me how to plot the cp vs. x/c for airfoil, thanks a gain :) 
Quote:
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=(ppinf)/(0.5*rho*Uinlet^2) " is reduced for my analysis to " cp=(p guage)/(0.5*Uinlet^2) ?? thanks a lot for kind helping:) 
Dear saeidehmohamadi,
I believe you are right, you shall use cp=(p guage)/(0.5*Uinlet^2) sincerely, Paulinyi 
Quote:

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

Quote:
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 01:36. 