CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   Forces calculation (https://www.cfd-online.com/Forums/openfoam/81306-forces-calculation.html)

fusij October 22, 2010 11:53

Forces calculation
 
Hello OpenFOAM users&fans,

I am new to OpenFOAM and I am simulating a 2D flow over a cylinder with pisoFoam.

When I am trying to find the forces, the forces.dat file only shows brackets full of zeros. The forces code seen below creates a forces/0 folder where forces.dat is located. I am referring to the right patch in the code. Do you have some suggestions or ideas of what could be wrong?

This is my forces code in my controlDict.h

functions
(
forces
{
type forces;
functionObjectLibs ( "libforces.so" ); outputControl timeStep;
outputInterval 1;
patches (wall);
pName p;
UName U;
log true;
rhoName rhoInf;
rhoInf 1025;
CofR ( 0 0 0 );
}
);

NickG October 29, 2010 10:23

Hi

Is your cylinder named wall? If not change the

patches (wall);

line in forces{... } to

patches (whatever you've called it);

Hope that helps

Nick

vkrastev October 29, 2010 10:30

If the patch name is correct, try also to remove the lines beginning with pName and Uname: judging by other treads in the forum, these lines can give some troubles in the 1.7.x versions of OpenFOAM.

Regards

V.

Aerospace October 29, 2010 10:50

Any one knows if there are problems with force function in 3D multifaces patch?

Thankyou.

fusij October 29, 2010 11:38

It was just a stupid mistake, for some reason I had changed my patch name to something else than "wall". It is fixed now, thank you.


All times are GMT -4. The time now is 15:33.