CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Running, Solving & CFD (
-   -   Reading forces within solver code (

SD@TUB February 28, 2010 19:39

Reading forces within solver code
Hello FOAMers,

what would be the best way of reading forces within solver code? I'm calculating some cases with OF 1.6 via simpleFoam.
I noticed the function objects where pressure and viscous forces/moments are integrated over given patches. In forces.C

fm.first().first() (pressure force) or fm.first().second() (viscous force)

fm.second().first() (moment of pressure force) or fm.second().second() (moment viscous force)
prints out the data. Now i tried to catch the values within solver code (under consideration of included headers in forces.C) but it doesn't work.
I'm not familiar with the code conventions of OF! Any advice is much appreciated...


All times are GMT -4. The time now is 09:10.