CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   FLUENT (http://www.cfd-online.com/Forums/fluent/)
-   -   wall conduction, UDF (http://www.cfd-online.com/Forums/fluent/34061-wall-conduction-udf.html)

sudh June 28, 2004 08:09

wall conduction, UDF
 
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));

h=st*rho*C*v;

F_PROFILE(f,thread,position)=h;

} 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.


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