CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (https://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   create forces (https://www.cfd-online.com/Forums/openfoam-programming-development/176962-create-forces.html)

hoseinr59 September 1, 2016 04:02

create forces
 
Hi all
I need to access the force coefficients in my solver. I am trying to move some controller device on an airfoil based on the feedback from the forces. Does any one know how it is possible to create forceCoeffs in my code ?

hoseinr59 September 3, 2016 05:37

label id = runTime.functionObjects().findObjectID("forces");
runTime.functionObjects()[id].execute(true);


This triggers the OpenFOAM::forceCoeffs.write() which is a virtual boolean type function and writes the forces in to a file only.
The type can not be changed to return the forceCoeffs value also.

Is there any way I can make it return the values ?


All times are GMT -4. The time now is 03:38.