CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Main CFD Forum

UDF for wall temperature

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 8, 2009, 13:48
Default UDF for wall temperature
  #1
New Member
 
Sakthivale Roshan Dhaneswar
Join Date: Oct 2009
Posts: 2
Rep Power: 0
dhanshan1986 is on a distinguished road
Hello, I am new to using UDFs on fluent and am finding it quite hard. I need to specify a wall (vertical walls) temperature boundary condition : T(x) = 800*X/0.2 where X (m) is the distance of the point from the top of the geometry (rectangular) which is totally 50 cm long. The origin of the geometry is at the bottom.

This is the code I have written so far:

#include "udf.h"
DEFINE_PROFILE(wall_temp, thread, position)
{
real x[ND_ND]; /* this will hold the position vector */
real y;
cell_t f;

begin_f_loop(f,thread)
{
F_CENTROID(x, f, thread);
y = x[1];
F_T(f,thread,position) = (800.*(50.-y))/20;
}
end_f_loop(f, thread)
}

When I interpret the udf and run my calculation on fluent, I do not get the result I expect and instead I get a contant temperature of 2000 K. I also get an 'nmake' error during compilation. Is compilation necessary ?
Thanks in advance.
dhanshan1986 is offline   Reply With Quote

Old   October 8, 2009, 16:32
Default
  #2
New Member
 
Join Date: Jun 2009
Posts: 8
Rep Power: 17
Bak_Flow is on a distinguished road
Hi,

there is a tutorial that is very similar to your problem in the UDF manual...just change it to operate on temp and not x_velocity and the profile. Be careful with units as I see in your post you have m and cm.

regards.............Bak_Flow

/************************************************** ********************
udfexample.c
UDF for specifying a steady-state velocity profile boundary condition
************************************************** ********************/
#include "udf.h" /* must be at the beginning of every UDF you write */
DEFINE_PROFILE(x_velocity,thread,index)
{
real x[ND_ND]; /* this will hold the position vector */
real y;
face_t f;
begin_f_loop(f,thread) /* loops over all faces in the thread passed
in the DEFINE macro argument */
{
F_CENTROID(x,f,thread);
y = x[1];
F_PROFILE(f,thread,index) = 20. - y*y/(.0745*.0745)*20.;
}
end_f_loop(f,thread)
}
Bak_Flow is offline   Reply With Quote

Old   October 8, 2009, 18:07
Default
  #3
New Member
 
Sakthivale Roshan Dhaneswar
Join Date: Oct 2009
Posts: 2
Rep Power: 0
dhanshan1986 is on a distinguished road
Yes, I am aware of this. But this equation is not a centroid (parabola type) form and intead is a profile that starts from the top of the rectangular furnace wall. Is there any command I need to change to incorporate this ?..I dont think centroid will work in my case. Please let me know. Thanks.
dhanshan1986 is offline   Reply With Quote

Reply


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 Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
UDF for a horizontal temperature profile CD Fluent UDF and Scheme Programming 9 May 6, 2018 13:13
UDF or any approach for Bulk Temperature calculation vemps FLUENT 0 May 1, 2009 02:09
UDF velocity and temperature Raj FLUENT 3 February 1, 2009 19:29
Access Granular Temperature in UDF Gavin FLUENT 5 July 22, 2005 12:06
UDF: Repatching part temperature Mcgregor FLUENT 1 June 2, 2003 09:51


All times are GMT -4. The time now is 17:12.