CFD Online Logo CFD Online URL
Home > Forums > FLUENT

interpreted UDF

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

LinkBack Thread Tools Display Modes
Old   October 8, 2002, 03:10
Default interpreted UDF
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 ())


/* 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="<udfconfig.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 ??


  Reply With Quote

Old   October 8, 2002, 08:56
Default Re: interpreted UDF
Posts: n/a
you must compile it since static values cannot be used with interpreted udfs
  Reply With Quote

Old   October 8, 2002, 09:32
Default Re: interpreted UDF
Posts: n/a
I rewrote the udf file and it worked thanks
  Reply With Quote


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
A Problem of Fluent Interpreted UDF: parse error knight Fluent UDF and Scheme Programming 22 January 19, 2018 13:26
Interpreted UDF Bikash FLUENT 9 April 19, 2016 08:53
Interpreted UDF in parallel David Chabot Fluent UDF and Scheme Programming 8 May 30, 2012 03:18
compiled or interpreted udf Aireen FLUENT 11 August 25, 2005 00:54
error of Interpreted udf Zhang Junmei FLUENT 6 December 12, 2001 09:03

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