CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   CMU value for k-epsilon model (https://www.cfd-online.com/Forums/fluent/190716-cmu-value-k-epsilon-model.html)

vcvedant July 20, 2017 10:28

CMU value for k-epsilon model
 
Hello,

I want to define C_\mu 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_\mu = 0.09. But when I change the value of C_\mu to 0.05 in the UDF then these results don't match to results that are obtained by changing C_\mu = 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 */


LuckyTran July 21, 2017 16:50

Is this maybe a wall function or wall modelling problem? The Cmu in the GUI panel I think only affects the Cmu for the transport equation but not the near wall stuff.

vcvedant July 21, 2017 17:09

Quote:

Originally Posted by LuckyTran (Post 657983)
Is this maybe a wall function or wall modelling problem? The Cmu in the GUI panel I think only affects the Cmu for the transport equation but not the near wall stuff.

I am using low-Reynolds model by Abe-Kondoh-Nagano. There are no wall functions for this model.

Ashhar December 26, 2020 11:15

I want to change the C2_Epsilon Model constant of low Reynolds number Abe-Kondoh-Nagano model to a function using UDF functions in Fluent. I am relatively new to udf funcitons. Can anyone guide me how to change a constant model constant to a function in ANSYS Fluent.


All times are GMT -4. The time now is 12:47.