CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   FLUENT (http://www.cfd-online.com/Forums/fluent/)
-   -   Wall law modification (http://www.cfd-online.com/Forums/fluent/112074-wall-law-modification.html)

C.C January 21, 2013 14:42

Wall law modification
 
Hi all,

I'm simulating a turbulent pipe flow and I need change the log law in Fluent...
I tried this in an UDF:

/*******************************************/
#include"udf.h"

DEFINE_WALL_FUNCTIONS(wall_law,f,t,c0,t0,wf_ret,yP lus,Emod)
{

real wf_value;

switch (wf_ret)
{
case UPLUS_LAM:
wf_value=yPlus;
break;
case UPLUS_TRB:
if(yPlus<=1500)
{
wf_value=log(yPlus)/KAPPA+log(Emod)/KAPPA;
}
if(yPlus>1500 && yPlus<=3000)
{
wf_value=11*log(yPlus)/KAPPA+log(Emod)/KAPPA-10*log(1500)/KAPPA;
}
if(yPlus>3000)
{
wf_value=0.85*log(yPlus)/KAPPA+log(Emod)/KAPPA+10.15*log(3000)-10*log(1500);
}
break;
case DUPLUS_LAM:
wf_value=1.0;
break;
case DUPLUS_TRB:
if(yPlus<=1500)
{
wf_value=1./(KAPPA*yPlus);
}
if(yPlus>1500 && yPlus<=3000)
{
wf_value=11/(KAPPA*yPlus);
}
if(yPlus>3000)
{
wf_value=0.85/(KAPPA*yPlus);
}
break;
case D2UPLUS_TRB:
if(yPlus<=1500)
{
wf_value=-1./(KAPPA*yPlus*yPlus);
}
if(yPlus>1500 && yPlus<=3000)
{
wf_value=-11/(KAPPA*yPlus*yPlus);
}
if(yPlus>3000)
{
wf_value=-0.85/(KAPPA*yPlus*yPlus);
}
break;
default:
printf("Wall function return value unavailable\n");
}
return wf_value;
}
/*****************************************/

I exported the data to excel and tried obtain u+(=u/utau) as a function of y+(=density*utau*yp/viscosity) in a graph, but what I obtain not corresponds to the profile introduced in the UDF.
Someone can help me... Can I write in the UDF the three different expressions for the log law in this way?

C.C January 22, 2013 12:17

Please... Anyone know if the wall law expression for the fully turbulent flow can be divided into three regions in a UDF?
I was thinking that when I write an UDF similar to that I posted in the previous message, the modifications on the wall law interpreted by Fluent just consider the first part of the wall law modification (if(yPlus<=1500)).


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