CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   Basic moving object help! (https://www.cfd-online.com/Forums/fluent/91773-basic-moving-object-help.html)

Phil_QM August 22, 2011 11:13

Basic moving object help!
 
I am trying to obtain the lift and drag of a hydrofoil.
I have a mesh which works for steady cases, now I am trying to run a transient case with the airfoil moving.

I am trying to use a UDF to achieve this but keep getting this error
"warning: incorrect cg motion UDF flutter on zone 7 (assuming no motion)"

My UDF is as follows, I am very new to C programming so may have made some basic mistakes.

Quote:

#include <udf.h>
/* A udf to oscillate an airfoil in the y-direction for "ANSYS Fluent 12.0" - Philip Bishop 22:09:2011 */

DEFINE_CG_MOTION(FOILMOTION, DT, VEL, OMEGA, TIME, DTIME)
{
VEL[]=sin(TIME);
}

D.Q.Zheng August 23, 2011 04:10

In your UDF, the moving direction of the object was not defined. VEL[0], VEL[1], VEL[2] stand for the x,y,z-component of velocity, respecitvely. In addition, 'CURRENT_TIME' which means 'real current flow time (in seconds)' is suggested to replace 'Time' in your UDF expression. More detailed informations about DEFINE_CG_MOTION macro could be found in chapter2.6.1 in Fluent documentation.


All times are GMT -4. The time now is 01:13.