compute turbulent diffusion coefficient for UDS


Analagous method needed for computing diffusivity for user-defined scalars (UDS) in turbulent flow as for species eqns.
Solution methodology is as follows

if turbulence is not on, then
rho D = rho (D_lam)

otherwise

rho D = rho (D_lam + mu_turbulent / (rho *Schmidt_turb))

the Schmidt_turb is set in the cortex variable species/sct; Instructions for modifying this variable are in the source code below....



A UDF has been written and follows immediately:


/***************************************************
UDF to compute turbulent UDS diffusivity

by

William Wangard, Ph.D.
ww@fluent.com
Fluent, Inc.

All Rights reserved.

Fluent, Inc. does not guarantee the rigor of this UDF

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

DEFINE_DIFFUSIVITY(uds_diff_coeff,c,t,i)
{

/* Note: the diffusivity in GUI requires not D, but rho*D */

real schmidt, d_turb, d_eff, mu_turb;

/* Laminar diff coeff */
d_eff = 1.0E-3;

/* Multiply this by the density */
d_eff *= C_R(c,t);

/* If turbulence is off, then mu_turb = 0.0, and d_eff = d_lam */
if (rp_turb)
{

/* Turbulent viscosity */
mu_turb = C_MU_T(c,t);


/* Schmidt number */
/*
This default is 0.7....

to change the value to 0.9, type the following in the FLUENT GUI:

(rpsetvar 'species/sct 0.9)

to check the value, type the following in the FLUENT GUI:

(rpgetvar 'species/sct)

*/
schmidt = RP_Get_Real("species/sct");

/* Turbulent diffusivity (* rho) */
d_turb = mu_turb / schmidt;

/* Effective diffusivity (* rho)*/
d_eff += d_turb;
}

return d_eff;
}





Show Form
No comments yet. Be the first to add a comment!