# UDF

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

 April 6, 2005, 02:44 UDF #1 Suvash Guest   Posts: n/a Hi How can I write a UDF of the boundary condition T(t)=Tm+Asin(wt), where T is the temperature, t=time, Tm=mean temaperature, A= amplitude=DeltaT/2, w=2pi/P=angular freequency, P=24 for the fluent....

 April 6, 2005, 05:10 Re: UDF #2 P Guest   Posts: n/a ITs very easy just check some examples in udf document. P

 April 6, 2005, 05:41 Re: UDF #3 Suvash Guest   Posts: n/a Hi P, Thanks for your advice. I wrote the following but could not getting the result. #include "udf.h" DEFINE_PROFILE(Surface_hotflux_profile,t,i) { real x[ND_ND]; /* this will hold the position vector */ /* real xS; y direction */ /* real tempS; surface temperature*/ /* real Bi=1.; Biot number*/ real deltaTime=86400.; /* recycling time of day and night*/ real timeB=RP_Get_Real("flow-time"); real vt; face_t f; if ( timeB=deltaTime) /*2 recycling*/ { vt=timeB-deltaTime; } if ( timeB>=deltaTime*2.) /*3 recycling*/ { vt=vt-deltaTime; } if ( timeB>=deltaTime*3.) /*4 recycling*/ { vt=vt-deltaTime; } if ( timeB>=deltaTime*4.) /*5 recycling*/ { vt=vt-deltaTime; } if ( timeB>=deltaTime*5.) /*6 recycling*/ { vt=vt-deltaTime; } if ( timeB>=deltaTime*6.) /*7 recycling*/ { vt=vt-deltaTime; } if ( timeB>=deltaTime*7.) /*8 recycling*/ { vt=vt-deltaTime; } if ( timeB>=deltaTime*8.) /*9 recycling*/ { vt=vt-deltaTime; } if ( timeB>=deltaTime*9.) /*10 recycling*/ { vt=vt-deltaTime; } if ( timeB>=deltaTime*10.) /*11 recycling*/ { vt=vt-deltaTime; } if ( vt>deltaTime/2.) { begin_f_loop(f,t) { /* tempS=F_T(f,t); get temp in surface */ F_CENTROID(x,f,t); F_PROFILE(f, t, i)=290.+5.*sin(2*3.141592654*vt/deltaTime); } end_f_loop(f,t) } else { begin_f_loop(f,t) { F_CENTROID(x,f,t); F_PROFILE(f, t, i)=0.; } end_f_loop(f,t) } }

 April 6, 2005, 06:58 Re: UDF #4 P Guest   Posts: n/a Do you get some error message then cut and paste them here in order for us to help u. P

 April 6, 2005, 23:57 Re: UDF #5 Sham Guest   Posts: n/a That's because you have not define sin function in the library. You need to write include math.h as well afer the include udf.h. This will define the sin function. Only UDF library is noy enough to recognise it. Hope this help. Sham.

 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 Qureshi FLUENT 7 March 23, 2017 08:37 shankara.2 Fluent UDF and Scheme Programming 1 January 16, 2012 23:14 kim FLUENT 3 October 26, 2011 21:38 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 15:17.