|
[Sponsors] |
September 16, 2016, 11:03 |
Error when compiling UDF
|
#1 |
New Member
khairil hafizi
Join Date: Sep 2015
Posts: 6
Rep Power: 11 |
hello everyone,
I faced problem to compile my udf as shown below, I dont know what caused the problem in my udf codes until fluent unable to compile it. I also try to compiled other udf and it goes smooth without any error.I think this is not the problem with compiler or fluent as I already setup the VS2012 and Fluent 16 according to system required. It maybe something wrong in my udf codes,but I dont know to track at which line caused the error. Can anybody help me to solve this problem. #include "udf.h" #include "dynamesh_tools.h" static real v_prev = 0.0; DEFINE_CG_MOTION(osc, dt, vel, omega, time, dtime) { Thread *t; Domain *d = Get_Domain(1); real x_cg[3], force[3], moment[3]; real accl, dv; real mass = 0.2; real wn = 12.0; real k = mass * wn*wn; real c = 2 * mass*wn*0.00; int i; NV_S(vel, = , 0.0); NV_S(omega, = , 0.0); /*t = DT_THREAD(dt);*/ t = DT_THREAD((Dynamic_Thread *)dt); for (i = 0; i<3; i++) x_cg[i] = DT_CG(dt)[i]; Compute_Force_And_Moment(d, t, x_cg, force, moment, TRUE); force[1] += -k*x_cg[1] - c*vel[1]; accl = force[1] / mass; dv = accl*dtime; v_prev += dv; vel[1] = v_prev; printf("Computed force: %g \n", force[1]); printf("Velocity: %g\n", vel[1]); } DEFINE_CG_MOTION(osc_inert, dt, vel, omega, time, dtime) { vel[0] = 0.0; vel[1] = v_prev; } |
|
September 19, 2016, 07:03 |
|
#2 |
Senior Member
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27 |
What is the error message that Fluent gives when you try to compile?
|
|
Tags |
udf, udf and programming, udf cg motion, udf compile |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
fluent udf error while compiling: unknown type name __locale_t | aditya.pandare | Fluent UDF and Scheme Programming | 3 | April 12, 2014 15:52 |
ERROR in compiling UDF | stefanos | Fluent UDF and Scheme Programming | 1 | April 25, 2012 08:37 |
Problem with compiling the UDF | raghu mohan | Fluent UDF and Scheme Programming | 10 | December 17, 2011 00:34 |
udf compiling problem | akr | FLUENT | 3 | August 22, 2007 08:14 |
On Compiling a UDF | David Chabot | FLUENT | 5 | May 20, 2005 10:13 |