CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   fLUENT UDF user-defined tke at the wall (https://www.cfd-online.com/Forums/fluent/91261-fluent-udf-user-defined-tke-wall.html)

syler3321 August 4, 2011 20:36

fLUENT UDF user-defined tke at the wall
 
Hi,
I am trying to force the kp( turbulence kinetic energy at the centre of cell immediately adjacent to the wall) to certain value but I am not sure if my method is correct. This is what i wrote in the user-defined function. Is this correct?

C_K(c0,t0)= 0.1689;

Thanks
Ralph

gearboy August 5, 2011 01:25

Quote:

Originally Posted by syler3321 (Post 318936)
Hi,
I am trying to force the kp( turbulence kinetic energy at the centre of cell immediately adjacent to the wall) to certain value but I am not sure if my method is correct. This is what i wrote in the user-defined function. Is this correct?

C_K(c0,t0)= 0.1689;

Thanks
Ralph

I think C_K is read only. The usage of C_K is just to compute turbulent viscosity. So I think you can directly change the expression of turbulent viscosity using the following macro.

#include "udf.h"
DEFINE_TURBULENT_VISCOSITY(user_mu_t,c,t)
{
real mu_t,rho,k,d;
rho = C_R(c,t);
d = C_D(c,t);
if(adjacent to the wall.......) // judge whether a cell is adjacent to the wall
k=0.1; //assume you constant is 0.1
else
k = C_K(c,t);

mu_t = M_keCmu*rho*SQR(k)/d;
return mu_t;
}


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