HELP! function airfoil has wrong type: 29 != 43
Hi,
I'm trying to run a simulation of a flapping 2d airfoil in fluent. So far I'm having big problems. I made an unstructured mesh and loaded my UDF into Fluent, but after I set up all my parameters and click on iterate it gives me the following error: Error: get_udf_function: function airfoil has wrong type: 29 != 43 Error Object: () Can anyone help me please?! I need this for my thesis and I can't get it to work! Thank you in advance Alex 
Re: HELP! function airfoil has wrong type: 29 != 4
Error message is clear, there is a variable type definition error, you have to go through your function line by line and see what is wrong or you print a copy on the forum

Re: HELP! function airfoil has wrong type: 29 != 4
Hi,
The code follows. It tries to describe the motion in pitch and plunge of an airfoil. Can anyone please tell me if they see a mistake? Also, I'm not too sure if I defined the pressure force on the body properly. I just copied that from the DEFINE_CG_MOTION example in the tutorial. Thanks for the help Alex PS. If you would like a prettier version (ie. in .txt) please write me an email. Thanks /************************************************** ********** * * Equations of Motion for a 2D airfoil in pitch and plunge * compiled UDF * ************************************************** **********/ #include "udf.h" static real v_prev = 0.0; static real omega_prev = 0.0; DEFINE_CG_MOTION(airfoil, dt, vel, omega, time, dtime) { Thread *t; face_t f; real NV_VEC (A); real force, dv, om, f, domega, delta; f= 0.5; om=2*3.14*f; delta =3.14/2; /* reset velocities */ NV_S (vel, =, 0.0); NV_S (omega, =, 0.0); if (!Data_Valid_P ()) return; /* get the thread pointer for which this motion is defined */ t = DT_THREAD (dt); /* compute pressure force on body by looping through all faces */ force = 0.0; begin_f_loop (f, t) { F_AREA (A, f, t); force += F_P (f, t) * NV_MAG (A); } end_f_loop (f, t) dv=om*cos(om*dtime); domega=om*cos(om*dtime+delta); v_prev += dv; omega_prev +=domega; Message ("time = %f, y_vel = %f, force = %f, omega=%f\n", time, v_prev, force, omega_prev); /* set xcomponent of velocity */ vel[1] = v_prev; /* set zrotation axis for angular velocity */ omega[2] = omega_prev; } 
All times are GMT 4. The time now is 07:57. 