CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM (http://www.cfd-online.com/Forums/openfoam/)
-   -   lift and drag coefficient of box (http://www.cfd-online.com/Forums/openfoam/86365-lift-drag-coefficient-box.html)

Akuji March 21, 2011 08:27

lift and drag coefficient of box
 
Hello!

I visualized turbulent flow around a box. I try to calculate lift and drag coefficients. In controlDict I add

functions
{ forces
{
type forceCoeffs;
functionObjectLibs ( "libforces.so" );
outputControl timeStep;
outputInterval 1;
patches
( box );
rhoName rhoInf;
log true;
rhoInf 1.2041;
CofR ( 0 0 0 );
liftDir (0 1 0);
dragDir (0 0 1);
pitchAxis (0 0 0);
magUInf 4.0;
lRef 0.8;
Aref 0.64;
}
}

At the end of time, I have a file forces. The results are wrong:
Cd=-1.85
Cl=-12665

Size of box: fin is 0.8m
Size of tunnel: fin is 5.6m, heigh is 2.4m

Where I have a mistake?

Akuji March 30, 2011 10:12

Nobody has problems with problem like this?..

ang_dipl_ing_fd March 30, 2011 10:44

hi akuji,

if your simulation is 2D, then you have to check your Aref. lets say your 2D mesh is only 1 mm thick than you have to set your Aref

Aref=lRef*thickness-of-mesh=0.8/0.001

Edit:

Sorry, it should be Aref=0.8*0.001 not 0.8/0.001

Akuji March 31, 2011 06:18

Quote:

Originally Posted by ang_dipl_ing_fd (Post 301532)
hi akuji,

if your simulation is 2D, then you have to check your Aref. lets say your 2D mesh is only 1 mm thick than you have to set your Aref

Aref=lRef*thickness-of-mesh=0.8/0.001

Edit:

Sorry, it should be Aref=0.8*0.001 not 0.8/0.001


And...if my mesh is 3D? (It's really 3d)

ang_dipl_ing_fd March 31, 2011 15:28

in openfoam it is always 3D. with 2D i meant that front and back patches are empty. the 3rd dimension is the thickness of the volume.

best regards

Akuji April 7, 2011 05:39

Well, I find a right solution. But I still have a question.

rhoName rhoInf;
log true;
rhoInf 1.2041;
CofR ( 0 0 0 );
liftDir (0 -0.01 0);
dragDir (0 0 1);
pitchAxis (0 0 0);
magUInf 4.0;
lRef 0.8;
Aref 0.64;


Why I need to set liftDir 0.01?

Akuji April 7, 2011 05:51

And one more question:)

I find information, that wrong to calculate lift coefficient if square of windward surface is not equal of square of downwind surface. What to do in this case?


All times are GMT -4. The time now is 15:31.