|
[Sponsors] |
![]() |
![]() |
#1 |
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. |
|
![]() |
![]() |
![]() |
#2 |
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 |
|
![]() |
![]() |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Heat Transfer Coefficient | Alberto Schroth | FLUENT | 17 | February 10, 2020 08:40 |
UDF for heat transfer coefficient | Shankar | Fluent UDF and Scheme Programming | 9 | February 18, 2013 09: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 22:53 |
how to apply heat transfer coefficient | ravi | FLUENT | 0 | July 10, 2004 01:11 |