CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   Using forces data in main() function (https://www.cfd-online.com/Forums/openfoam/127519-using-forces-data-main-function.html)

Geon-Hong December 13, 2013 01:27

Using forces data in main() function
 
Dear Foamers,

Good day foamers!

Recently I have tried to access data of forces object function to use as a criteria for convergence.

I made a header file including a static variable named Ftotal and make it to be included by both main solver program and forces class files. The force data estimated by forces object function is to be stored to the Ftotal static variable.

When I access the static variable Ftotal in the main program, it stores zero and I cannot use it at all.

Is there any idea to resolve this problem?

Thank you.

Geon-Hong.


All times are GMT -4. The time now is 18:06.