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

UDF to specify heat transfer coefficient

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

Reply
 
LinkBack Thread Tools Display Modes
Old   April 5, 2007, 08:31
Default UDF to specify heat transfer coefficient
  #1
jonglee
Guest
 
Posts: n/a
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

Old   April 5, 2007, 12:40
Default Re: UDF to specify heat transfer coefficient
  #2
Andrea
Guest
 
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

andrea
  Reply With Quote

Reply

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 12 January 16, 2014 04:40
UDF for heat transfer coefficient Shankar Fluent UDF and Scheme Programming 9 February 18, 2013 10:13
BOILING HEAT TRANSFER COEFFICIENT John CFX 3 April 4, 2012 17:50
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


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