CFD Online Logo CFD Online URL
Home > Forums > FLUENT

wall conduction, UDF

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

LinkBack Thread Tools Display Modes
Old   June 28, 2004, 08:09
Default wall conduction, UDF
Posts: n/a
Hi ,

I have few doubts while using FLUENT

1. I am solving a simple conduction problem. A rectangular solid of with convective and boundary conditions on top and bottom wall. so while specifying wall thickness of the wall shall I specify for both the walls? since i am getting different results for different cases (specifing top wall thickness alone, specifying bootom wall thickness alone and when i specify both wall thicknesses) so which result is correct? which result should I beleive? I am simply confused with this.

2.How to specify two fluids for singl e simulation? to specify two different wall materials we can do it easily. But I don't know how to specify two different fluids.

3. The third problem is regarding UDF. I ve given Heat transfer coefficient as afunction of 'x' . While solving unsteady heat transfer problem I need to use wall temperature(which will vary as the time progresses)in the heat transfer coeff. calculations. for this this purpose I written UDF something like this,

#include "udf.h" DEFINE_PROFILE(hvar_comb,thread,position)

{ face_t f; real x[ND_ND]; real t,to,m,p,q,taw,h,murf,rhorf,trf,st,rerf,v,rho;

real gamma=1.4,r=0.878,Pr=0.68;

real tw=RP_Get_Real("comb-wall-static-temperature");

real tm=RP_Get_Real("flow-time");

real C=1006,R=287;

begin_f_loop(f, thread) { F_CENTROID(x,f,thread);

t = 69.224*(pow(x[0],2)) + 441.47*x[0] + 684.92;

if(x[0]>=1.15 && x[0] < 1.5) { m = -0.8668*x[0] + 2.9991; } if(x[0]>=1.5 && x[0]<= 3.0)


m= -0.1631*(pow(x[0],4)) + 1.6039*(pow(x[0],3)) - 5.9183*(pow(x[0],2)) + 9.5667*x[0] - 3.9286;


if(x[0]>=1.15 && x[0]<1.5)


p = 51394*x[0] + 1818.1;

} if (x[0]>=1.5 && x[0]<=3.0)

{ p = -25791*(pow(x[0],3)) + 198961*(pow(x[0],2)) - 519832*x[0]+ 499456; }

rho=p/(R*t); v=m*(sqrt(gamma*R*t));

to=t*(1+0.2*(pow(m,2))); taw=t+r*(to-t); if (tm==0) trf=t+0.5*(300-t)+0.22*(taw-t);

else trf=t+0.5*(tw-t)+0.22*(taw-t); murf = -1E-11*pow(trf,2) + 5E-08*trf + 6E-06;

rhorf=p/(R*trf); rerf=rhorf*v*x[0]/murf;

st=0.0296 *(pow(rerf,(-0.2)))/(pow(Pr,0.6667));



} end_f_loop(f, thread) }

but after compiling in the FLUENT I am getting error,

Error: rpgetvar: comb-wall-static-temperature: undefined variable

Error Object: #f

where may be the problem . I have defined wall temp already.

Could anybody help me out regarding these problems. I will very thankful to u. waiting for ur reply. regards. sudh.
  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
udf variable for wall temperature Kiran FLUENT 0 July 31, 2008 08:31
wall suction udf osman turan FLUENT 2 July 17, 2008 07:09
UDF hook on the WALL boundary condition Luke FLUENT 0 June 7, 2006 11:54
How to write udf of slip wall condition cxzhao FLUENT 0 April 27, 2005 21:20
udf: dimensionless wall coordinate Chris FLUENT 0 June 22, 2004 06:10

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