CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   forceCoeffs in simpleFoam for and airfoil (https://www.cfd-online.com/Forums/openfoam-solving/102954-forcecoeffs-simplefoam-airfoil.html)

appa June 7, 2012 05:31

forceCoeffs in simpleFoam for and airfoil
 
1 Attachment(s)
Hi everyone,

I am learning how to get Cl and Cd coefficients from a simpleFoam simulation . I added the following part to my controlDict file
PHP Code:

functions
{
forces
{
type forces;
functionObjectLibs ("libforces.so"); //Lib to load
patches (wall); // change to your patch name
rhoName rhoInf;
rhoInf 1.006//Reference density for fluid
CofR (-0.004 0); //Origin for moment calculations
        
outputControl   timeStep;
        
outputInterval  1;
}
forceCoeffs
{
// rhoInf - reference density
// CofR - Centre of rotation
// dragDir - Direction of drag coefficient
// liftDir - Direction of lift coefficient
// pitchAxis - Pitching moment axis
// magUinf - free stream velocity magnitude
// lRef - reference length
// Aref - reference area
type forceCoeffs;
functionObjectLibs ("libforces.so");
patches (wall);
rhoName rhoInf;
rhoInf 1.006;
CofR (-0.004285 0);
liftDir (0 1 0);
dragDir (1 0 0);
pitchAxis (0 0 1);
magUInf 67;
lRef 1
Aref 1;

        
outputControl   timeStep;
        
outputInterval  1;
}



the problem is that I am getting a file with 2000 values of each coefficient!! I don't know how to get the final one ? can someone please help me

lovecraft22 June 7, 2012 06:04

You are getting a value for every iteration. You may want to average the last iterations. I would pick at least the last 500 iterations.


All times are GMT -4. The time now is 19:36.