tracking graphs of Cl and Cd
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?
|
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..).
|
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? |
Quote:
Cannot open load file 'forces' "forces", line 0: util.c: No such file or directory Where am i wrong? |
note that lift and drag coefficients are stored in the forceCoeffs folder.
I can not help with gnuplot because iam doing it with matlab. |
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. |
Thanks men but i had already resolved. But now i have a problem with Aref and lRef :mad:
|
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 |
Thank you so much :)
|
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) ???
|
Keep the flow direction, drag direction and the coordinate system constant and change the model angle.
|
Quote:
|
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. |
Oh damn! I have had a big confusion about it! Because someone in other post wrote that dirdrag is opposite to flux :mad:!
|
Just checked two text books to be sure and in both the definition of the drag force is in the main flow direction
|
very useful man! Thanks a lot! ;)
|
All times are GMT -4. The time now is 07:36. |