CFD Online URL
[Sponsors]
Home > Forums > FLUENT

HELP! function airfoil has wrong type: 29 != 43

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

Reply
 
LinkBack Thread Tools Display Modes
Old   March 28, 2006, 23:33
Default HELP! function airfoil has wrong type: 29 != 43
  #1
Alex
Guest
 
Posts: n/a
Hi,

I'm trying to run a simulation of a flapping 2-d 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
  Reply With Quote

Old   March 28, 2006, 23:40
Default Re: HELP! function airfoil has wrong type: 29 != 4
  #2
Ahmed
Guest
 
Posts: n/a
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
  Reply With Quote

Old   March 28, 2006, 23:55
Default Re: HELP! function airfoil has wrong type: 29 != 4
  #3
Alex
Guest
 
Posts: n/a
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 e-mail. Thanks

/************************************************** ********** * * Equations of Motion for a 2-D 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 x-component of velocity */

vel[1] = v_prev;

/* set z-rotation axis for angular velocity */

omega[2] = omega_prev;

}
  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
compilation problem with "fvPatch::lookupPatchField" Ya_Squall2010 OpenFOAM Programming & Development 7 October 27, 2014 12:24
Fluent3DMeshToFoam simvun OpenFOAM Other Meshers: ICEM, Star, Ansys, Pointwise, GridPro, Ansa, ... 48 May 14, 2012 06:20
Pressure instability with rhoSimpleFoam daniel_mills OpenFOAM Running, Solving & CFD 44 February 17, 2011 18:08
ParaView for OF-1.6-ext Chrisi1984 OpenFOAM Installation 0 December 31, 2010 07:42
rhoSimpleFoam claco OpenFOAM 7 April 20, 2010 05:32


All times are GMT -4. The time now is 14:03.