CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Fluent UDF and Scheme Programming (https://www.cfd-online.com/Forums/fluent-udf/)
-   -   UDF show parse error (https://www.cfd-online.com/Forums/fluent-udf/108828-udf-show-parse-error.html)

andy0936andy November 2, 2012 06:21

UDF show parse error
 
hellow! I'm beginer for UDF. I want to take the toqre that obtained from fluent to aaomega=(moment[2]/0.0012), but it shows parse errorr , "Compute_Force_And_Moment" not found (pc=239) and "CX_Message" not found (pc=62).

My code is the following:
#include"udf.h"
DEFINE_CG_MOTION(turbine1,dt,vel,omega,time,dtime)
{
Thread *t;
Domain *d;
face_t f;
real CG[ND_ND];
real force[2];
real moment[2];
real x;
real y;
real r;
real angle;
real aangle;
real aomega;
real aaomega;
Domain *domain= Get_Domain (1);
Thread *tf1 = Lookup_Thread (domain, 12);
if (!Data_Valid_P())
{
Message0("\n\n!!! No data->No mesh motion !!!\n\n");
return;
}
r=sqrt(x*x+y*y);
angle=atan(y/x);
if(r>=0.00000001)
begin_f_loop(f,t)
{
omega[2]=(sqrt(vel[0]*vel[0]+vel[1]*vel[1]))/r;
aaomega=moment[2]/0.0012;
aomega=omega[2]+aaomega*dtime;
aangle=angle+aomega*dtime;
}
end_f_loop(f,t)
NV_S (omega, =, 0.0);
NV_S (CG, =, 0.0);
NV_S (vel, =, 0.0);
Compute_Force_And_Moment(d,t,CG,force,moment,TRUE) ;
printf(" Force on the rotor=%f\t%f\t%f\n",force[0],force[1],force[2]);
printf(" Moment on the rotor=%f\t%f\t%f\n",moment[0],moment[1],moment[2]);
}

Does anyone help me? please!

msaeedsadeghi November 12, 2012 03:26

It may be needed to include "f_wall.h" header file.


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