CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User 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 Search this Thread Display Modes
Old   July 13, 2011, 10: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: 15
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 Search this Thread
Search this Thread:

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help! problems in calculating forces with SimpleFoam DLC OpenFOAM 3 April 26, 2022 00:43
Forces in V1.6 terrybarnaby OpenFOAM Post-Processing 72 September 2, 2015 17:49
Error Message Determining Forces in OpenFOAM 1.7 Greg Givogue OpenFOAM 3 August 23, 2010 19:03
lift and drag on ship superstructures vaina74 OpenFOAM Running, Solving & CFD 3 June 8, 2010 13:30
Forces calulated through pressure LVDH OpenFOAM Post-Processing 2 February 26, 2010 04:15


All times are GMT -4. The time now is 01:04.