# interpreted UDF

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

 October 8, 2002, 03:10 interpreted UDF #1 James Guest   Posts: n/a I compiled the UG example on DEFINE_CG_MOTION /************************************************** ********** * * 1-degree of freedom equation of motion (x-direction) * ************************************************** **********/ #include "udf.h" #include "dynamesh_tools.h" static real v_prev = 0.0; DEFINE_CG_MOTION(piston, dt, vel, omega, time, dtime) { Thread *t; face_t f; real NV_VEC (A); real force, dv; /* 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 ((Dynamic_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) /* compute change in velocity, i.e., dv = F * dt / mass velocity update using explicit euler formula */ dv = dtime * force / 50.0; v_prev += dv; Message ("time = %f, x_vel = %f, force = %f\n", time, v_prev, force); /* set x-component of velocity */ vel[0] = v_prev; } I interpreted it in order to have it in my dynamic mesh udf panel but the interpretation failed and the message is : /usr/local/Fluent.Inc/contrib/lnx86/cpp -I/usr/local/Fluent.Inc/fluent6.0/src -I/usr/local/Fluent.Inc/fluent6.0/cortex/src -I/usr/local/Fluent.Inc/fluent6.0/client/src -I/usr/local/Fluent.Inc/fluent6.0/multiport/src -I. -DUDFCONFIG_H="" /home/memoire/jaj/tenplus/libudf/lnx86/2d/piston.c Error: /home/memoire/jaj/tenplus/libudf/lnx86/2d/piston.c: line 10: parse error. Can anyone tell me what is the problem ?? thanks james

 October 8, 2002, 08:56 Re: interpreted UDF #2 Alexandre Guest   Posts: n/a you must compile it since static values cannot be used with interpreted udfs

 October 8, 2002, 09:32 Re: interpreted UDF #3 James Guest   Posts: n/a I rewrote the udf file and it worked thanks

 Thread Tools Display Modes Linear Mode

 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 OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post Bikash FLUENT 9 April 19, 2016 08:53 knight Fluent UDF and Scheme Programming 12 March 5, 2016 02:26 David Chabot Fluent UDF and Scheme Programming 8 May 30, 2012 03:18 Aireen FLUENT 11 August 25, 2005 00:54 Zhang Junmei FLUENT 6 December 12, 2001 09:03

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