# Whar's the error in my UDF?

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

 April 6, 2005, 02:47 Whar's the error in my UDF? #1 Jason 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 P 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 Jason 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 P 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 Jason 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 saghir 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 pUl| Guest   Posts: n/a English

 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 shankara.2 Fluent UDF and Scheme Programming 1 January 16, 2012 23:14 kim FLUENT 3 October 26, 2011 21:38 Qureshi FLUENT 1 December 2, 2009 01:27 Luc SEMINEL FLUENT 0 November 25, 2002 05:03 Luc SEMINEL Main CFD Forum 0 November 25, 2002 05:01

All times are GMT -4. The time now is 07:54.