|
[Sponsors] |
October 8, 2002, 04:10 |
interpreted UDF
|
#1 |
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="<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 ?? thanks james |
|
October 8, 2002, 09:56 |
Re: interpreted UDF
|
#2 |
Guest
Posts: n/a
|
you must compile it since static values cannot be used with interpreted udfs
|
|
October 8, 2002, 10:32 |
Re: interpreted UDF
|
#3 |
Guest
Posts: n/a
|
I rewrote the udf file and it worked thanks
|
|
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Interpreted UDF | Bikash | FLUENT | 10 | December 3, 2019 01:52 |
A Problem of Fluent Interpreted UDF: parse error | knight | Fluent UDF and Scheme Programming | 25 | August 16, 2018 11:26 |
Interpreted UDF in parallel | David Chabot | Fluent UDF and Scheme Programming | 8 | May 30, 2012 04:18 |
compiled or interpreted udf | Aireen | FLUENT | 11 | August 25, 2005 01:54 |
error of Interpreted udf | Zhang Junmei | FLUENT | 6 | December 12, 2001 09:03 |