|
[Sponsors] |
November 2, 2012, 07:21 |
UDF show parse error
|
#1 |
New Member
Kuen-Sheng Yu
Join Date: Nov 2012
Posts: 1
Rep Power: 0 |
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. |
|
November 12, 2012, 04:26 |
|
#2 |
Senior Member
SSL
Join Date: Oct 2012
Posts: 226
Rep Power: 15 |
It may be needed to include "f_wall.h" header file.
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[OpenFOAM] Saving ParaFoam views and case | sail | ParaView | 9 | November 25, 2011 16:46 |
checking the system setup and Qt version | vivek070176 | OpenFOAM Installation | 22 | June 1, 2010 13: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 21:50 |
error while compiling the USER Sub routine | CFD user | CFX | 3 | November 25, 2002 16:16 |