UDF for a horizontal temperature profile

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

 February 15, 2007, 06:15 UDF for a horizontal temperature profile #1 CD Guest   Posts: n/a Sponsored Links Hello, I'm trying to write an UDF for a temperature profile to use as an boundary condition on a horizontal wall (2D). I used the following UDF, but when I plot an xy-plot of the wall surface temperature it is just a constant. Can anybody tell me what I'm doing wrong? Kind regards, CD /* test.c UDF for specifying temperature profile boundary condition on the bottom */ #include "udf.h" DEFINE_PROFILE(test,thread,position) { real x[ND_ND]; /* this will hold the position vector */ real y; face_t f; begin_f_loop(f,thread) { F_CENTROID(x,f,thread); y=x[1]; F_PROFILE(f, thread, position) = ... */ here stands the profile function as a function of y /* } end_f_loop(f,thread) }

 February 15, 2007, 16:36 Re: UDF for a horizontal temperature profile #2 Rizwan Guest   Posts: n/a this should be proper. dint chek it (as simulation running on my system) but thsi my understnading that temperature is varying along horizontal (along x) i guess . #include "udf.h" DEFINE_PROFILE(test,thread,position) { real x[ND_ND]; /* this will hold the position vector */ real y; face_t f; begin_f_loop(f,thread) { F_CENTROID(x,f,thread); y=x[0]; F_PROFILE(f, thread, position) = ... */ here stands the profile function as a function of y /* } end_f_loop(f,thread) } sircorp likes this.

 February 16, 2007, 05:10 Re: UDF for a horizontal temperature profile #3 Ted Guest   Posts: n/a Thank you for your time and help Rizwan! Ted

 February 16, 2007, 07:30 Re: UDF for a horizontal temperature profile #4 Rizwan Guest   Posts: n/a I wish you could hav told whether its working according to what u needed or not. Regards waiting for ur input.

 February 17, 2007, 15:02 Re: UDF for a horizontal temperature profile #5 Ted Guest   Posts: n/a I was using the y-coordinate of a horizontal walll instead of the x-coordinate, so logically the result of my profile function was a constant. With your correction the UDF is now working just as I hoped. Thanks again! Greetings Ted

 July 20, 2013, 10:51 #6 Member   sooraj Join Date: Dec 2012 Posts: 38 Rep Power: 6 hi guys i need a udf for a work. i'll explain what i need . I want to provide a linear varying temperature boundary condition on the circular side of a cylinder . can you help me?? My idea about udf is very small.

 December 15, 2013, 17:07 #8 Senior Member   Join Date: Jan 2010 Location: Germany Posts: 268 Rep Power: 10 theYour problem not defined z and the wrong THREAD instead of thread C is uppercase sensitive

 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 ChristineL Fluent UDF and Scheme Programming 15 November 25, 2016 07:45 mohammadkm Fluent UDF and Scheme Programming 19 December 24, 2013 23:42 Kiran FLUENT 0 July 31, 2008 08:31 Shashikant FLUENT 0 June 24, 2006 03:16 sivakumar FLUENT 5 November 24, 2002 01:58