CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Fluent UDF and Scheme Programming

UDF show parse error

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree1Likes
  • 1 Post By msaeedsadeghi

Reply
 
LinkBack Thread Tools Display Modes
Old   November 2, 2012, 07:21
Default UDF show parse error
  #1
New Member
 
Kuen-Sheng Yu
Join Date: Nov 2012
Posts: 1
Rep Power: 0
andy0936andy is on a distinguished road
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!

Last edited by andy0936andy; November 4, 2012 at 21:50.
andy0936andy is offline   Reply With Quote

Old   November 12, 2012, 04:26
Default
  #2
Senior Member
 
SSL
Join Date: Oct 2012
Posts: 227
Rep Power: 5
msaeedsadeghi is on a distinguished road
It may be needed to include "f_wall.h" header file.
mm.abdollahzadeh likes this.
msaeedsadeghi is offline   Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Saving ParaFoam views and case sail OpenFOAM Paraview & paraFoam 9 November 25, 2011 16:46
checking the system setup and Qt version vivek070176 OpenFOAM Installation 22 June 1, 2010 12:34
OpenFOAM on MinGW crosscompiler hosted on Linux allenzhao OpenFOAM Installation 127 January 30, 2009 20:08
Problem with compile the setParabolicInlet ivanyao OpenFOAM Running, Solving & CFD 6 September 5, 2008 20:50
error while compiling the USER Sub routine CFD user CFX 3 November 25, 2002 16:16


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