CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   drag calculation OF1.6 (https://www.cfd-online.com/Forums/openfoam/71857-drag-calculation-of1-6-a.html)

chelvistero January 18, 2010 07:37

drag calculation OF1.6
 
Hello,
I'm new using OpenFoam and I want to calculate the drag of an icoFoam case. Is there a simple command to make such a calculation?

Thanks

gfilip January 18, 2010 14:17

Hi Axel,

You can simply add the code below to your system/controlDict file:

Code:

functions
(
    forceCoeffs
    {
    type forceCoeffs;
    functionObjectLibs ("libforces.so");
    patches (foil); //change to your patch name
    rhoName rhoInf;
    rhoInf 1.2255;
    CofR (0 0 0);
    liftDir (0 1 0);
    dragDir (1 0 0);
    pitchAxis (0 0 0);
    magUInf 0.621; //freestream U
    lRef 1; //reference length (for moment calculations)
    Aref 0.1;  //reference area
    outputControl timeStep;
    outputInterval 1;
    }
);

This will create a forceCoeff folder in your case dir, with CL, CD, and CM, at the specified output intervals.


-Greg


All times are GMT -4. The time now is 03:22.