vcvedant |
July 20, 2017 10:28 |
CMU value for k-epsilon model
Hello,
I want to define C as a local variable in FLUENT for low-Reynolds Number k-epsilon model. I am using Abe-Kondoh-Nagano model. To proceed further with full implementation I am testing only two values. I am able to get the exact results from my UDF from C = 0.09. But when I change the value of C to 0.05 in the UDF then these results don't match to results that are obtained by changing C = 0.05 from the GUI panel.
Can anyone please help me resolve this issue? I am attaching my UDF below.
Code:
#include "udf.h"
#include "mem.h"
#include "math.h"
#define C_MU 0.05
#define SIG_K 1.4
#define SIG_D 1.4
/* user defined Turbulent viscosity */
DEFINE_TURBULENT_VISCOSITY(turb_vis,c,t)
{
real c_k, c_d, ReT, ReD, muT, fmu;
c_k = C_K(c,t);
c_d = C_D(c,t);
/*flooring the values */
if (c_k < 1.e-10)
c_k = 1.e-10;
if (c_d < 1.e-10)
c_d = 1.e-10;
ReT = C_R(c,t)*SQR(c_k)/(C_MU_L(c,t)*c_d);
ReD = C_WALL_DIST(c,t)*pow(C_MU_L(c,t)*c_d/C_R(c,t),0.25)*C_R(c,t)/C_MU_L(c,t);
fmu = SQR( 1. - exp( -ReD/14.0 )) * ( 1. + 5.0*exp( -SQR(ReT/200.0 ))/(pow(ReT,0.75)) ); /* damping function */
muT = C_R(c,t)*C_MU*fmu*SQR(c_k)/c_d;
if (muT > 1.e5)
muT = 1.e5;
return muT;
}
DEFINE_PRANDTL_K(tke_PR,c,t)
{
return SIG_K;
}
DEFINE_PRANDTL_D(tdr_PR,c,t)
{
return SIG_D;
}
/* AKN turbulence model: viscosity function */
|