CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   How to calculate and write out transient drag / lift coefficient in OpenFOAM 2.2.1? (http://www.cfd-online.com/Forums/openfoam-solving/125114-how-calculate-write-out-transient-drag-lift-coefficient-openfoam-2-2-1-a.html)

shuoxue October 19, 2013 04:03

How to calculate and write out transient drag / lift coefficient in OpenFOAM 2.2.1?
 
It seems that a keyword functions containing forces and forcesCoeffs should be added at the end of controlDict.

Is there any tutorial to give a typical example, and what's the meaning of each entry.

These two are founded on OpenFOAM forum.
Code:

functions
{ forces
{
type forceCoeffs;
functionObjectLibs ( "libforces.so" );
outputControl timeStep;
outputInterval 1;
patches (profile_wall)
pName p;
UName U;
log true;
rhoInf 1.225;
CofR ( 0 0 0 );
liftDir ( 0 1 0 );
dragDir (1 0 0 );
pitchAxis ( 0 0 1 );
magUInf 100.0;
lRef 0.1254;
Aref 0.01292;
}
}

Code:

functions
{
forces
{
type forces;
functionObjectLibs ( "libforces.so" ); // lib to load
outputControl timeStep;
outputInterval 1;
patches
(
wall // change to your patch name
);
// name of fields
pName p;
UName U;
log true; // dump to file
rhoInf 1025;
CofR ( 0 0 0 );
}
forcesCoeffs
{
type forceCoeffs;
functionObjectLibs ( "libforces.so" ); // lib to load
outputControl timeStep;
outputInterval 1;
patches
(
wall // change to your patch name
);
// name of fields
pName p;
UName U;
log true; // dump to file
rhoInf 1025;
CofR ( 0 0 0 );
liftDir ( 0 1 0 );
dragDir ( 1 0 0 );
pitchAxis ( 0 0 0 );
magUInf 7.30;
lRef 0.305;
Aref 0.001525;
}
}

Thanks in advance.

maghsomi September 30, 2014 16:01

execFlowFunctionObjects
 
i use execFlowFunctionObjects but i have this problem
Time = 0.0008
Reading phi
Reading U
Reading p
Selecting incompressible transport model Newtonian
Selecting LES turbulence model oneEqEddy
Selecting LES delta type smooth
Selecting LES delta type cubeRootVol
--> FOAM Warning :
From function cubeRootVolDelta::calcDelta()
in file cubeRootVolDelta/cubeRootVolDelta.C at line 52
Case is 2D, LES is not strictly applicable


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