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

How to get forces and forceCoeffs in v2.0.0

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

Reply
 
LinkBack Thread Tools Display Modes
Old   July 13, 2011, 09:38
Post How to get forces and forceCoeffs in v2.0.0
  #1
Member
 
Alex
Join Date: Jun 2010
Location: Planet Earth
Posts: 43
Rep Power: 7
bigbang is on a distinguished road
Add this to the end of your <case>/system/controlDict file.

Replace patchname with your patches.

Then get your scalar constants sorted out (i.e.: lRef, Aref, magUInf) and vector constants (i.e.: liftDir, dragDir, pitchAxis)

Code:
functions
{
    forces
    {
        type            forceCoeffs;
        functionObjectLibs ( "libforces.so" );
        outputControl   timeStep;
        outputInterval  1;

        patches
        (
            patchname
        );

        pName       p;
        UName       U;
	rhoName	    rhoInf;
	
        log         true;
        rhoInf      1.225;
        CofR        ( 0 0 0 );
        liftDir     ( 0 1 0 );
        dragDir     ( 1 0 0 );
        pitchAxis   ( 0 0 0 );
        magUInf     50;
        lRef        1;
        Aref        1;
    }
}
Note: In 2.0.0 (vs 1.7.1) you need to define rhoName as rhoInf, otherwise you will get this error

Code:
--> FOAM Warning : 
    From function void forces::read(const dictionary&)
    in file forces/forces.C at line 277
    Could not find U, p or rho in database.
    De-activating forces.
bigbang 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
Forces in V1.6 terrybarnaby OpenFOAM 71 July 8, 2014 10:42
Help! problems in calculating forces with SimpleFoam DLC OpenFOAM 2 January 27, 2011 19:22
Error Message Determining Forces in OpenFOAM 1.7 Greg Givogue OpenFOAM 3 August 23, 2010 18:03
lift and drag on ship superstructures vaina74 OpenFOAM Running, Solving & CFD 3 June 8, 2010 12:30
Forces calulated through pressure LVDH OpenFOAM Post-Processing 2 February 26, 2010 04:15


All times are GMT -4. The time now is 02:00.