CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT > Fluent UDF and Scheme Programming

linear temperature profile + convection heat transfer

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 8, 2015, 06:29
Default linear temperature profile + convection heat transfer
  #1
Member
 
ad
Join Date: Apr 2014
Posts: 75
Rep Power: 12
adi.ptb is on a distinguished road
hello,I have a problem that I hope someone would help me,I'm simulating a 2D duct that has 15 parallel solid stacks in it,the horizontal walls in the stack section are given a constant temperature with a gradient from 700k down to 300k over a distance of 10 mm utilizing udf,the heat transfer coefficient between the stack walls and the fluid is 50 W/m^2.k, I have problem to model the convection heat transfer,I have written a udf for linear temperature profile but have difficulties to write a udf for convection heat transfer,my approach was to enter the convection heat transfer as a source term in energy equation but I'm not sure whether this is a right approach or not,this is my udf i hope that i can get some help,thanks
*************************************************
DEFINE_PROFILE(linear_temp,thread,i)
{
real x[ND_ND];
real Th=700.0,Tc=300.0;
real xh=30e-3,xc=40e-3;
real dT=(Tc-Th)/(xc-xh);
face_t f;
begin_f_loop(f,thread)
{
F_CENTROID(x,f,thread);
F_PROFILE(f,thread,i)=Th+(x[0]-xh)*dT;
}
end_f_loop(f,thread)
}
************************************************** *
DEFINE_SOURCE(SRCE_solid_heat,cell,thread,dS,eqn)
{
real h,Ts,Tf,source;
h=50.0;
Ts=????????????????????????(I dont know how to access the solid temperature);
Tf=C_T(cell,thread);
source=-h*(Ts-Tf);
dS[eqn]=-h;
return source;
}
adi.ptb is offline   Reply With Quote

Old   February 8, 2015, 23:56
Default
  #2
Member
 
ad
Join Date: Apr 2014
Posts: 75
Rep Power: 12
adi.ptb is on a distinguished road
I'v managed a udf for fluid energy source term since i dont have any solid zone in my geometry,but i dont know whether this code is right or not,can anyone tell me????please,
DEFINE_SOURCE(SRCE_fluid_heat,cell,t,dS,eqn)
{
real Tf,source;
int ID=8 ; /* stack walls ID*/
face_t f;
cell_t c;
Domain*d;
d=Get_Domain(1);
t=Lookup_Thread(d,ID);
Tf=C_T(cell,t);
begin_f_loop(f,t)
{
source=50.0*(F_T(f,t)-Tf);
}
end_f_loop(f,t)
dS[eqn]=-50.0;
return source;
}
adi.ptb 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
convergenceof natural convection prob. in cfx cpkewat CFX 15 January 31, 2014 06:29
Radiation interface hinca CFX 15 January 26, 2014 17:11
Heat Transfer from a Rough Cylinder in Tunnel RE=2.2E5 M=0.07 aerothermal OpenFOAM Running, Solving & CFD 9 May 23, 2013 04:12
No results for solid domain Gary Holland CFX 10 March 13, 2009 03:30
free convection heat transfer from a heated horizontal surface through a liquid to a thin cooled fin Kaushik FLUENT 1 May 8, 2000 06:47


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