CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM (
-   -   Forces calculation (

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

type forces;
functionObjectLibs ( "" ); 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


Is your cylinder named wall? If not change the

patches (wall);

line in forces{... } to

patches (whatever you've called it);

Hope that helps


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.



Aerospace October 29, 2010 10:50

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


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 19:57.