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

How to plot drag and lift coeffs.

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   September 13, 2015, 13:51
Default How to plot drag and lift coeffs.
  #1
Member
 
mohsen kh
Join Date: Jan 2013
Location: Iran
Posts: 88
Rep Power: 6
m5m5kh is on a distinguished road
Hi
I used icoFoam to simulate flow around a cylinder for Re=100. (U=1 D=1 rho=1 and nu=.01)
I add some lines to my control dict to calculate the drag and lift coeffs.
----------------------------------------------------------------------
functions
{
forces
{

type forceCoeffs;
functionObjectLibs ( "libforces.so" );
outputControl timeStep;
outputInterval 1;
patches
(
wall
);
pName p;
UName U;
rhoName rhoInf;
log true;
rhoInf 1;
CofR ( 0 0 0 );
liftDir (0 1 0);
dragDir ( 1 0 0 );
pitchAxis ( 0 0 0 );
magUInf 1;
lRef 1;
Aref 1;
}
}
-----------------------------------------------------
finally I had a forceCoeffs.dat file in postProcessing folder.
My main question is how to plot cd and cl data (16000 data) to have something like the attached picture.
Attached Images
File Type: jpg Untitled.jpg (22.6 KB, 15 views)

Last edited by m5m5kh; September 13, 2015 at 13:54. Reason: picture
m5m5kh is offline   Reply With Quote

Old   September 29, 2015, 19:29
Default
  #2
Member
 
Davi Barreira
Join Date: Apr 2014
Location: Fortaleza
Posts: 67
Rep Power: 3
davibarreira is on a distinguished road
There is an OpenFOAM function which you can use called 'foamMonitor', you should try it out. I usually use it to check if the results are going the way I expect them to be. After that I use python to properly generate my graphs.
davibarreira is offline   Reply With Quote

Old   October 7, 2015, 13:25
Default
  #3
Member
 
Davi Barreira
Join Date: Apr 2014
Location: Fortaleza
Posts: 67
Rep Power: 3
davibarreira is on a distinguished road
I saw that you sent me a private message, but i will answer it here so other people can see it too.

So as you pointed out, you've got your forceCoeffs.dat
To use the foamMonitor, just go in the terminal and write:

Code:
foamMonitor ./postProcessing/0/forceCoeffs.dat
This code may vary depending on the location of your forceCoeffs file. One of the problems that you might have is that the y axis range might be to wide, so you cant see the results properly. For that, you might try:

Code:
foamMonitor -yrange [0:1.5] ./postProcessing/0/forceCoeffs.dat
Here you can find out more about foamMonitor:
https://github.com/OpenFOAM/OpenFOAM...ed0738f5b4a1c1
davibarreira is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
wrong SU2 calculation for lift and drag coefficient for NAC4421 mechy SU2 5 June 24, 2014 16:20
Display lift and Drag in paraview SamerAli OpenFOAM Paraview & paraFoam 1 May 16, 2013 12:51
How to plot Lift and Drag Coefficients using tecplot 360 RuiVO Tecplot 5 April 13, 2012 14:17
Lift and Drag Monitor Point Values Converging to Zero Josh CFX 24 May 9, 2011 10:38
Correct lift but wrong pressure drag - possible? zx Main CFD Forum 4 July 27, 2007 23:38


All times are GMT -4. The time now is 18:32.