CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   FLUENT (http://www.cfd-online.com/Forums/fluent/)
-   -   why boudary slip velocity is so larte using udf (http://www.cfd-online.com/Forums/fluent/37132-why-boudary-slip-velocity-so-larte-using-udf.html)

cxzhao July 4, 2005 00:06

why boudary slip velocity is so larte using udf
 
hello:

i am compute a nozzle now, and using udf to considerate slip velocity on the wall, but the result show that the slip velocity on the wall is larger than other position near the wall, the udf code is as following.

i added this udf into fluent on the plant(boudary condition-wall-shear condition -specified shear ) , the shear stress computed by slip veloctiy and viscosity in udf. is it right?

i think maybe somthing wrong with shear stress ,can anybody tell me how to reslove this problem??

#include "udf.h" DEFINE_PROFILE(leftwallslipx,thread,index) {

real x[ND_ND];

face_t f;

cell_t c;

double kn;

double k;

double u;

double coef;

double rho;

double D;

double T;

double P;

double l;

double miu;

double dtdxw,dudx,dudy,dudw;

Thread *t0;

FILE *fp;

Thread *cell_thread;

real time=CURRENT_TIME;

fp=fopen("test.txt","w");

begin_f_loop(f,thread)

{

if(time<0.0001)

{ F_PROFILE(f,thread,index)=0;

}

else

{

c=F_C0(f,thread);

cell_thread=THREAD_T0(thread);

T=C_T(c,cell_thread);

P=C_P(c,cell_thread)+99876;

l=0.034*0.001*T/P; //m,atm

miu=C_MU_EFF(c,cell_thread);

rho=P/(287*T); //P=rho*R*T,pa,kg/m^3,K,R=287J/kg*K

kn=l/12*100000; //knudson number // fprintf(fp,"%f,%f,%15.12f,%f,%f,%f,%f\n",T,P,l,miu ,rho,kn);

if(kn>0.001)

{

dtdxw=fabs(C_T_G(c,cell_thread)[0]);

dudx=fabs(C_DUDY(c,cell_thread)+C_DVDY(c,cell_thre ad));

dudy=fabs(C_DUDX(c,cell_thread)+C_DVDX(c,cell_thre ad));

dudw=(dudx+dudy)*1.414;

k=miu*1000000/5;

u=l*dudw+0.75*miu/rho/T*dtdxw;//velocity // fprintf(fp,"%f,%f,%15.12f,%f,%f,%f,%f,%f,%f\n",T,P ,l,miu,rho,kn,dtdxw,dudx,u);

F_PROFILE(f,thread,index)=k*u*0.707; // shear stress

}

else

F_PROFILE(f,thread,index)=0;

}

}

end_f_loop(f,thread)

fclose(fp);

}



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