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

Forces calculated by OpenFoam very strange

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By tta223

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 4, 2017, 06:29
Unhappy Forces calculated by OpenFoam very strange
  #1
New Member
 
tingting
Join Date: Aug 2017
Posts: 4
Rep Power: 9
tta223 is on a distinguished road
Hello, everyone,

My problem is a very simple one---steady flow around a 2-D square cylinder. I want to calculate the drag force and drag coefficient on the cylinder surface. I used the steady solver--- simpleFoam--- to do this calculation since the Re is 20. I checked the literature that the drag coefficient (numerically and experimentally) should be around 2.2 at Re=20 in this case. However, I could not get this value. The streamlines and wake length seem correct though.

At first, I used Tecplot to get the force (integrate pressure and viscous forces) at each edge line of the square, and the drag coefficient obtained is around 1.95, which is not right.

Then I tried the OpenFoam (version 2) post-processing for both forces and force coefficients. But I get very strange results, as follows:

forces forces_object output:
Sum of forces
Total : (4.70085e+06 8.3378 1.02083e-16)
Pressure : (3.62906e+06 -217.493 0)
Viscous : (1.07179e+06 225.831 1.02083e-16)
Sum of moments
Total : (-18968.5 1.06944e+10 -2.13653e+09)
Pressure : (494797 8.25611e+09 -1.64944e+09)
Viscous : (-513765 2.43833e+09 -4.87091e+08)


forceCoeffs forceCoeffs output:
Coefficients
Cm : 0 (pressure: 0 viscous: 0)
Cd : -10331.5 (pressure: -7975.96 viscous: -2355.59)
Cl : 0.0183248 (pressure: -0.478007 viscous: 0.496332)
Cl(f) : 0.00916242
Cl(r) : 0.00916242

I could not figure out why the forces are so large. The following is the functions added at the end of the controlDict file

functions
{

forces_object
{
type forces;
functionObjectLibs ("libforces.so");
outputControl timeStep;
outputInterval 1;
patches (cylinderwalls);

pName p;
Uname U;
log true;
rhoName rhoInf;
rhoInf 1.0;
CofR (0 0 0);
};
forceCoeffs
{
type forceCoeffs;
functionObjectLibs ( "libforces.so" );
outputControl timeStep;
outputInterval 1;

patches ( cylinderwalls );
pName p;
UName U;
rhoName rhoInf;
log true;

liftDir (0 1 0);
dragDir (-1 0 0);
CofR (0 0 0);
pitchAxis (0 0 0);

magUInf 1.0;
rhoInf 1;
lRef 910.0;//reference length
Aref 910.0;//reference area
};

I have checked the forces.C code, user guide, and other threads in this forum. But I still could not get the answer. I am quite new to OpenFoam and have this problem for several days from now. Please help me. Thanks.

Last edited by tta223; August 4, 2017 at 07:58.
tta223 is offline   Reply With Quote

Old   August 4, 2017, 07:01
Default
  #2
Senior Member
 
piu58's Avatar
 
Uwe Pilz
Join Date: Feb 2017
Location: Leipzig, Germany
Posts: 744
Rep Power: 15
piu58 is on a distinguished road
I recommend reading this

Cd validation of a bluff body

thread first.
__________________
Uwe Pilz
--
Die der Hauptbewegung überlagerte Schwankungsbewegung ist in ihren Einzelheiten so hoffnungslos kompliziert, daß ihre theoretische Berechnung aussichtslos erscheint. (Hermann Schlichting, 1950)
piu58 is offline   Reply With Quote

Old   August 4, 2017, 07:55
Default
  #3
New Member
 
tingting
Join Date: Aug 2017
Posts: 4
Rep Power: 9
tta223 is on a distinguished road
Hi, Uwe Pilz,

Thanks for your reply and recommendation! I have read it through, and have some thoughts about my problem.

Maybe I did not indicate it right about the patches in the functions. The patches indicate the surface that I want to calculate the forces on. I used the patch name of the cylinder wall.

From the thread you recommended, It is said that [essentially both the square & rectangle are loaded into snappyHexMesh as a single .stl file named "body". My forceCoeffs file references "body" for taking measurements.] So, I tried to use "body" as the patches, but it does not work...
tta223 is offline   Reply With Quote

Old   August 5, 2017, 10:10
Default
  #4
New Member
 
tingting
Join Date: Aug 2017
Posts: 4
Rep Power: 9
tta223 is on a distinguished road
Problem solved.

I did not provide the correct reference area. I always think it is 2D, and forgot it is actually 3-D in OpenFoam, so I forgot to multiply it by the length in the third direction.
baha.kumaty likes this.
tta223 is offline   Reply With Quote

Reply

Tags
drag, forces, simplefoam, steady flow


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to contribute to the community of OpenFOAM users and to the OpenFOAM technology wyldckat OpenFOAM 17 November 10, 2017 16:54
OpenFOAM 4.0 Released CFDFoundation OpenFOAM Announcements from OpenFOAM Foundation 2 October 6, 2017 06:40
How does OpenFoam compute forces? demo OpenFOAM Post-Processing 0 August 5, 2016 08:03
OpenFOAM Training: Programming CFD Course 12-13 and 19-20 April 2016 cfd.direct OpenFOAM Announcements from Other Sources 0 January 14, 2016 11:19
Suggestion for a new sub-forum at OpenFOAM's Forum wyldckat Site Help, Feedback & Discussions 20 October 28, 2014 10:04


All times are GMT -4. The time now is 12:41.