Implementing Buoyancy effect in the KOmega Turbulence Model using Segregated Solver
The K omega turbulence model does not include any turbulence generation term due to buoyancy. That term could be important in modeling natural convection with KOmega. A source term to the K (turbulence Kinetic energy) equation could be invoked through a DEFINE_SOURCE UDF to include this effect in K omega model. The UDF is attached below. #include "udf.h" #include "sg.h" #include "models.h" /* UDF to compute buoyancy production in tke equation */ /* In order to use UDF, the user must go to TUI and select yes for "Keep temporary memory from being freed?" in /solve/set/expert During the first iteration, the temperature gradient will still not be stored and the error message will be displayed. It should not appear again. */ DEFINE_SOURCE(tke_gb, c0, t0, dS, eqn) { real rho, beta, tke, tdr, mu_t, temp; real prod1,source; real pr_t = M_keprt; real Gravity[ND_ND]; dS[eqn] = 0.0; source = 0.0; /* Compute Buoyancy Production */ if(rp_seg){ NV_V(Gravity, =, M_gravity); rho = C_R(c0,t0); tke = C_K(c0,t0); tdr = C_D(c0,t0); mu_t = C_MU_T(c0,t0); temp = C_T(c0,t0); /* This assumes ideal gas behavior. More general implementation would query beta from the solver */ beta = 1./temp; if(NNULLP(T_STORAGE_R_NV(t0, SV_T_G))) { prod1 = beta*mu_t/pr_t*NV_DOT(Gravity,C_T_G(c0,t0)); } else Message0("Error, temperature gradient not storedn"); source = prod1; } else { Message0("This udf is NOT VALID for the COUPLED SOLVERn"); } return source; } 

