CFD Online Logo CFD Online URL
Home > Forums > OpenFOAM

forceCoeffs and rhoInf dependency

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

LinkBack Thread Tools Display Modes
Old   July 5, 2013, 16:29
Default forceCoeffs and rhoInf dependency
Join Date: Nov 2009
Posts: 59
Rep Power: 10
Horus is on a distinguished road

I have an incompressible simpleFoam solution of a flow field. I use forceCoeffs to calculate Cd etc. on some patches.

    type        forceCoeffs;
    functionObjectLibs ( "" );
    outputControl timeStep;
    outputInterval 10;

    patches $carPatches;
    pName       p;
    UName       U;
    rhoName     rhoInf; 
    log         true;       
    rhoInf      3;           
    liftDir     (0 0 1);
    dragDir     (1 0 0);     
    pitchAxis   (0 1 0);    
    CofR        (0.56725 0 -0.1274); 
    magUInf     45;
    lRef        1.5;     
    Aref        0.4;
I tried it on exactly the same case, one time set rhoInf to 3, another time to the actual value of 1.4. Both forceCoeffs got me exactly the same results, regardless of the value of rhoInf.

Is there some bug in OF 2.1.1 or a bug in my understanding of physics?

Force on a patch is F=p*A, drag coefficient is Cd = F / (0.5 rhoInf U^2). Why is there no influence of rho?

Horus is offline   Reply With Quote

Old   July 24, 2013, 13:51
Senior Member
Join Date: Mar 2012
Location: Providence, RI
Posts: 143
Rep Power: 8
Joachim is on a distinguished road
Hi Florian,

if the solver is incompressible, the pressure computed by OpenFOAM is p/rho and not p.
Hence, you don't need to know the density to get your coefficient (just divide your pressure force by 0.5*Ue^2 A).
You can write anything you want for the density in forceCoeffs, it is not read when computing the coefficients.


Joachim is offline   Reply With Quote

Old   July 25, 2013, 10:04
Join Date: Nov 2009
Posts: 59
Rep Power: 10
Horus is on a distinguished road
Yeah, that became clear after posting this.

But I'm still riddled why OF requires setting a value of rhoInf. In the source code, as far as I can tell, it's determined by units if p' = p/rho (incompressible) or p' = p.

Horus is offline   Reply With Quote


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
Problem in simpleFoam airFoil2D forceCoeffs junkie71189 OpenFOAM Running, Solving & CFD 31 March 11, 2017 22:56
Problem in forceCoeffs file srini_esi OpenFOAM 0 October 19, 2012 06:34
forceCoeffs in simpleFoam for and airfoil appa OpenFOAM Running, Solving & CFD 1 June 7, 2012 05:04
How to get forces and forceCoeffs in v2.0.0 bigbang OpenFOAM 0 July 13, 2011 09:38

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