CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM (http://www.cfd-online.com/Forums/openfoam/)
-   -   Friction coefficients using icoFoam (http://www.cfd-online.com/Forums/openfoam/77456-friction-coefficients-using-icofoam.html)

wjarrah June 23, 2010 10:22

Friction coefficients using icoFoam
 
Hello everyone,

I need to plot the friction coefficient using icoFoam solver on a flat plate.

I tried to add the following lines at the end of /system/controlDict, but an error appears when calling "icoFoam" :

functions
(
forces
{
type forces;
functionObjectLibs ("libforces.so");
patches (wall);
rhoInf 1000;
CofR (0 0 0);
}
forceCoeffs
{
type forceCoeffs;
functionObjectLibs ("libforces.so");
patches (wall);
rhoInf 1000;
CofR (0 0 0);
liftDir (0 1 0);
dragDir (1 0 0);
pitchAxis (0 0 0);
magUInf 0.13;
lRef 1;
Aref 1;
}
);



The error :
Create time

Create mesh for time = 0

Reading transportProperties

Reading field p

Reading field U

Reading/calculating face flux field phi

Courant Number mean: 0 max: 0.052

Starting time loop



keyword outputControl is undefined in dictionary "::functions::forces"

file: ::functions::forces from line 59 to line 63.

From function dictionary::lookupEntry(const word&, bool, bool) const
in file db/dictionary/dictionary.C at line 388.

FOAM exiting



Can someone help me with this problem please ?
(Maybe there is another way to output the friction coefficient ?)

Thanks

Aloex August 21, 2010 05:25

Hi,

I have the same error after starting "icoFoam".

Is it possible that it is not sufficient to make the entry in the system/controlDict for the forces and force coefficients like wjarrah it done? Must I change also other files from the solver or so?

Thanks for your help!
Alex

Aloex August 21, 2010 06:18

I solved the problem with the help of other threads and forums. It is not necessary to change anything else then the controlDict. Here are the additional lines for the controlDict:


functions
(
forces
{
type forces;
functionObjectLibs ("libforces.so");
rhoInf 1.0;
patches ( ELLIPSOID.1 );
CofR (0 0 0);
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 (ELLIPSOID.1);
rhoName rhoInf;
rhoInf 1.0;
CofR (0 0 0);
liftDir (0 0 1);
dragDir (0 1 0);
pitchAxis (0 0 1);
magUInf 0.1;
lRef 0.0004; // ellipsoid max diameter
Aref 6.283e-8; //projected area from ellipsoid
outputControl timeStep;
outputInterval 1;
}
);

It creates a directory for the forces and force coefficients in your case.

Alex


All times are GMT -4. The time now is 14:12.