CFD Online Logo CFD Online URL
Home > Forums > FLUENT

UDF to specify heat transfer coefficient

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

LinkBack Thread Tools Display Modes
Old   April 5, 2007, 08:31
Default UDF to specify heat transfer coefficient
Posts: n/a
Sponsored Links
Dear users and experts, i am currently modeling combustion flow in small tubes. Would like to use a correlation to specify the heat transfer coefficient at the external wall. For nature convection over vertical cylinder, we have h=1.42[(T-T0)/L]^0.25, T is the average temperature, L is the length of the tube. My idea is very simple, firstly, sum up all the temperature on all faces on the wall. then devided by the number of faces. Following is my UDF code

#include "udf.h"

DEFINE_PROFILE(HTC, thread, index)

{ face_t f;

real T = 0.0;

int n = F_NNODES(f, thread)-1; /* Count of faces */

begin_f_loop(f, thread) /* loops over all faces in the thread passed in the DEFINE macro argument */


T = F_T(f, thread)+T; /* summation of temperature over all faces */

} end_f_loop(f, thread)

F_PROFILE(f, thread, index) = 1.42*(T/n-293.0)^0.25/(27E-3)^0.25;

/* 293.0 is the ambient temperature and 27E-3 is the length */


However this code cannot be interpreted in FLUENT. The error message is "syntax error", which really confused me a lot. I am looking forward to your reply and help. Thanks so much in advance.
  Reply With Quote
Sponsored Links

Old   April 5, 2007, 12:40
Default Re: UDF to specify heat transfer coefficient
Posts: n/a
Hi jonglee,

try this in your UDF

F_PROFILE(f, thread, index) = pow(1.42*(T/n-293.0),0.25)/pow((27E-3),0.25);

I hope it helps

  Reply With Quote


Thread Tools
Display Modes

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Heat Transfer Coefficient Alberto Schroth FLUENT 14 September 9, 2015 10:00
UDF for heat transfer coefficient Shankar Fluent UDF and Scheme Programming 9 February 18, 2013 10:13
Convective / Conductive Heat Transfer in Hypersonic flows enigma Main CFD Forum 2 November 1, 2009 23:53
how to apply heat transfer coefficient ravi FLUENT 0 July 10, 2004 01:11

Sponsored Links

All times are GMT -4. The time now is 08:35.