|
[Sponsors] |
March 17, 2016, 07:40 |
tracking graphs of Cl and Cd
|
#1 |
Senior Member
Join Date: Mar 2016
Posts: 133
Rep Power: 10 |
hi guys, i have a case of a flux on an airfoil and i need plot graphs of dimensionless coefficients Cl and Cd. Do you know a way to make them?
|
|
March 17, 2016, 11:23 |
|
#2 |
Senior Member
Join Date: Jun 2012
Location: Germany, Bochum
Posts: 230
Rep Power: 15 |
You need to define cl and cd as a functionObject in the controlDict file. The data of the coefficients and the timesteps is then stored in the postProcessing folder and can be plotted with any software that can read the .dat file (Excel, Matlab, gnuplot, etc..).
|
|
March 17, 2016, 11:37 |
|
#3 |
Senior Member
Join Date: Mar 2016
Posts: 133
Rep Power: 10 |
thanks man, now i have already defined the function in controlDict and after running the directory postProcessing is been created, in which there is forces.dat. But now when i type "gnuplot forces -" shows this:
Cannot open load file 'forces' "forces", line 0: util.c: No such file or directory Where am i wrong? |
|
March 17, 2016, 11:56 |
|
#4 | |
Senior Member
Join Date: Mar 2016
Posts: 133
Rep Power: 10 |
Quote:
Cannot open load file 'forces' "forces", line 0: util.c: No such file or directory Where am i wrong? |
||
March 17, 2016, 13:13 |
|
#5 |
Senior Member
Join Date: Jun 2012
Location: Germany, Bochum
Posts: 230
Rep Power: 15 |
note that lift and drag coefficients are stored in the forceCoeffs folder.
I can not help with gnuplot because iam doing it with matlab. |
|
March 18, 2016, 08:22 |
|
#6 |
New Member
pulkit
Join Date: Jun 2013
Posts: 5
Rep Power: 12 |
giammy92,
Using function objects in OpenFOAM by adding lines to the controldict file generates corresponding output in the postProcessing/forceCoeffs/time-instant/ directory. In your case the results will be generated in a file called 'forceCoeffs.dat'. Once this file is generated, there are multiple ways of plotting it. You can either use gnuplot to plot Cd and Cl vs iteration (stored as 3 diff columns in the forceCoeffs file). Alternatively, you can use a software utility called 'xmgrace' that you'll need to install which automatically plots the fields generated by OpenFOAM. I find more convenient to use xmgrace for monitoring data generated by function objects. |
|
March 18, 2016, 08:56 |
|
#7 |
Senior Member
Join Date: Mar 2016
Posts: 133
Rep Power: 10 |
Thanks men but i had already resolved. But now i have a problem with Aref and lRef
|
|
March 18, 2016, 09:41 |
|
#8 |
Senior Member
Join Date: Jun 2012
Location: Germany, Bochum
Posts: 230
Rep Power: 15 |
ARef is the reference reference area and lref is the reference length.
Maybe the following links help: http://www.cfd-online.com/Forums/flu...-analysis.html https://en.wikipedia.org/wiki/Drag_coefficient |
|
March 18, 2016, 09:51 |
|
#9 |
Senior Member
Join Date: Mar 2016
Posts: 133
Rep Power: 10 |
Thank you so much
|
|
March 18, 2016, 10:07 |
|
#10 |
Senior Member
Join Date: Mar 2016
Posts: 133
Rep Power: 10 |
and about dragdir? because it is in opposite to flux, for an angle of attack >0 and then with airfoil in horizontal position and y component of U >0, dragdir is (-cos(alpha) -sin(alpha) 0) ???
|
|
March 18, 2016, 10:38 |
|
#11 |
Senior Member
Join Date: Jun 2012
Location: Germany, Bochum
Posts: 230
Rep Power: 15 |
Keep the flow direction, drag direction and the coordinate system constant and change the model angle.
|
|
March 18, 2016, 11:12 |
|
#12 |
Senior Member
Join Date: Mar 2016
Posts: 133
Rep Power: 10 |
sorry but i don't understand. Dragdir is in opposite or in the same direction of flux? because now i just run airfoil2D tutorial for angle of attack 0 and if i choose dragdir (-1 0 0) (opposite direction) Cd is negative at the end of iterations, while if i choose dragdir (1 0 0) Cd is positive. Cd can only be positive?
|
|
March 18, 2016, 11:18 |
|
#13 |
Senior Member
Join Date: Jun 2012
Location: Germany, Bochum
Posts: 230
Rep Power: 15 |
cd is in the main flow direction and lift is upwards perpendicular to it: For example:
http://weblab.open.ac.uk/firstflight.../ld_forces.gif Just change the rotation of the geometry if you want a different angle of attack and keep the cd direction the same. |
|
March 18, 2016, 11:27 |
|
#14 |
Senior Member
Join Date: Mar 2016
Posts: 133
Rep Power: 10 |
Oh damn! I have had a big confusion about it! Because someone in other post wrote that dirdrag is opposite to flux !
|
|
March 18, 2016, 11:45 |
|
#15 |
Senior Member
Join Date: Jun 2012
Location: Germany, Bochum
Posts: 230
Rep Power: 15 |
Just checked two text books to be sure and in both the definition of the drag force is in the main flow direction
|
|
March 18, 2016, 11:51 |
|
#16 |
Senior Member
Join Date: Mar 2016
Posts: 133
Rep Power: 10 |
very useful man! Thanks a lot!
|
|
|
|