|
[Sponsors] |
April 6, 2005, 02:47 |
Whar's the error in my UDF?
|
#1 |
Guest
Posts: n/a
|
My udf is v=function(y,z,t). The err mesage is invalid type for pointer dereference: int. Anybody help me? Thanks!
/************************************************** ******************** unsteady.c UDF for specifying a transient velocity profile boundary condition ************************************************** *********************/ #include "udf.h" DEFINE_PROFILE(unsteady_velocity, thread, position) { face_t f; real t = CURRENT_TIME; real y, z, rr, rd, D, t, x[ND_ND] ; D=0.006 ; begin_f_loop(f, thread) { F_CENTROID(x, f, thread); y=x[1]; z=x[2]; rr=sqrt(y**2+z**2) rd=rr*rr/D*D if(t1>=0 && t1<=0.2) F_PROFILE(f, thread, position) = 2*(2*t)*(1- 4*rd) ; else if(t1>0.2 && t1<=0.4) F_PROFILE(f, thread, position) = 2*(3*t)*(1- 4*rd) } end_f_loop(f, thread) } |
|
April 6, 2005, 05:08 |
Re: Whar's the error in my UDF?
|
#2 |
Guest
Posts: n/a
|
Where did you define t1? Can you also give the details of the error message?
|
|
April 6, 2005, 06:40 |
Re: Whar's the error in my UDF?
|
#3 |
Guest
Posts: n/a
|
Hi,
The UDF is describe the 3-d fully-developed flow. And the velocity is changed with time v=function(y,z,t). I think the problem is about how to define the z-coodinate. /************************************************** ******************** unsteady.c UDF for specifying a transient velocity profile boundary condition ************************************************** *********************/ #include "udf.h" DEFINE_PROFILE(unsteady_velocity, thread, position) { face_t f; real t = CURRENT_TIME; real y, z, rr, rd, D, t, x[ND_ND] ; D=0.006 ; begin_f_loop(f, thread) { F_CENTROID(x, f, thread); y=x[1]; z=x[2]; rr=sqrt(y**2+z**2) rd=rr*rr/D*D if(t>=0 && t<=0.2) F_PROFILE(f, thread, position) = 2*(2*t)*(1- 4*rd) ; else if(t>0.2 && t<=0.4) F_PROFILE(f, thread, position) = 2*(3*t)*(1- 4*rd) } end_f_loop(f, thread) } |
|
April 6, 2005, 06:57 |
Re: Whar's the error in my UDF?
|
#4 |
Guest
Posts: n/a
|
Does it give some error message can you cut and paste those error message. Only then it will be possible for us to help u P
|
|
April 6, 2005, 10:34 |
Re: Whar's the error in my UDF?
|
#5 |
Guest
Posts: n/a
|
The error message: Error: D:\fluent\CASE\pulmonary\v1.c: line 24: invalid type for pointer dereference: int.
/************************************************** ******************** unsteady.c UDF for specifying a transient velocity profile boundary condition ************************************************** *********************/ #include "udf.h" DEFINE_PROFILE(unsteady_velocity, thread, position) { face_t f; real t = CURRENT_TIME; real y, z, rr, rd, D, x[ND_ND] ; D=0.006 ; begin_f_loop(f, thread) { F_CENTROID(x, f, thread); y=x[1]; z=x[2]; rr=sqrt(y**2+z**2) rd=rr*rr/D*D if(t>=0 && t<=0.2) F_PROFILE(f, thread, position) = 2*(6.945*t)*(1-4*rd) ; else if(t>0.2 && t<=0.4) F_PROFILE(f, thread, position) = 2*(4.23*t+0.543)*(1-4*rd) ; } end_f_loop(f, thread) } |
|
April 13, 2005, 05:43 |
Re: Whar's the error in my UDF?
|
#6 |
Guest
Posts: n/a
|
salut si t est un variable globale temps il faut le definir comme CURRENT_TIME à toi
|
|
April 21, 2005, 19:19 |
Re: Whar's the error in my UDF?
|
#7 |
Guest
Posts: n/a
|
English
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Dynamic Mesh UDF | Qureshi | FLUENT | 7 | March 23, 2017 07:37 |
UDF parallel error: chip-exec: function not found????? | shankara.2 | Fluent UDF and Scheme Programming | 1 | January 16, 2012 22:14 |
How to add a UDF to a compiled UDF library | kim | FLUENT | 3 | October 26, 2011 21:38 |
UDF...UDF...UDF...UDF | Luc SEMINEL | FLUENT | 0 | November 25, 2002 04:03 |
UDF, UDF, UDF, UDF | Luc SEMINEL | Main CFD Forum | 0 | November 25, 2002 04:01 |