CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Running, Solving & CFD (
-   -   drag coeficient (

jki December 28, 2012 05:49

drag coeficient

How can I calculate the drag coeficient of a circular cylinder?


immortality December 28, 2012 09:30

Search at this site.i saw a comlete thread about lift and drag cefficients here.
Be successful.

Matt1986 January 5, 2013 08:38


You have to insert the function forceCoeffs into your control.dict. in the folder system.
Here is a example:

type forceCoeffs;
functionObjectLibs ("");
patches (patchname); //change to your patch name of the cylinder
pName p;
UName U;
rhoName rhoInf;
rhoInf 1.225; //Density of the fluid
CofR (0 0 0);
liftDir (0 0 1);
dragDir (1 0 0);
pitchAxis (0 1 0);
magUInf 0.0243243243; //velocity
lRef 0.0555; //reference length for forces
Aref 1.11e-3; //reference surface of the cylinder
outputControl timeStep;
outputInterval 10; //every x timesteps =>one drag coefficient

Then you are able to calculate the drag coeficients

Hope that helps


jki January 6, 2013 06:06

Thanks Matthias,

I'm a newbie in OpenFoam.

I try and it works.

Now the problem is that the value of cd is too high in compare with the academics work there i saw.

Perhaps you know what's my problem.

Matt1986 January 6, 2013 08:44


Is your case LES or RAS?
Have you modified a existing tutorial?
Have you checked your boundary conditions?
Can you upload your case, that i can have a look?
I am doing LES cd calculations of a 2d cylinder, at the moment.

Regards Matthias

jki January 7, 2013 05:54

1 Attachment(s)
Hi Matthias,

My case is RAS,

The cd is too high,

Can you take a look?


Matt1986 January 9, 2013 18:30


I think your epsilon value is too high.
Your value is 1.01.
With a viscosity of 1e-3 and a velocity of 0.2 m/s is should imho be much smaller.

Regards Matthias

Matt1986 January 21, 2013 10:14


Have you solved the problem?

jki January 22, 2013 05:13


i can't solve the problem.

now I'm in exams, and I haven't been working on the problem.

you got see any errors in my files.


All times are GMT -4. The time now is 09:03.