CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Fluent UDF and Scheme Programming (https://www.cfd-online.com/Forums/fluent-udf/)
-   -   Accessing C_mu within UDF (https://www.cfd-online.com/Forums/fluent-udf/138380-accessing-c_mu-within-udf.html)

jackchilvers July 3, 2014 04:26

Accessing C_mu within UDF
 
Dear All,

I would like to access the parameter C_{\mu} for use within a Fluent UDF. To this end, could somebody please tell me the variable name such that:

cmu = <???>(cell_index, cell_thread);


Many thanks,
Jack

86lolo July 3, 2014 06:48

Well, maybe you can compute from its definition. But I don't know if you can access the viscous turbulence if you're not using Spalart-Allmaras. Maybe this works: (Cmu=turb.visc / density / K^2 * epsilon )

Code:

cmu=C_NUT(c,t)/C_R(c,t)/C_K(c,t)/C_K(c,t)*C_D(c,t);

pakk July 3, 2014 10:14

Don't you mean C_MU_L(c,t)?

86lolo July 3, 2014 11:31

I have had a better look to the manual and saw that the turbulence eddy viscosity is given by C_MU_T(c,t).

So I correct what I said in previous post, you may compute c_mu as:

cmu=C_MU_T(c,t)/C_R(c,t)/C_K(c,t)/C_K(c,t)*C_D(c,t);

But I wonder... don't you set this parameter as a constant in the turbulence model panel? Why do you need to find it for a specific cell?

vcvedant July 19, 2017 12:12

CMU access macro
 
CMU is defined as constant in GUI panel so you can directly put its value in the UDF.

I want to modify CMU value as a local variable. I could not find any macro to do this so I used DEFINE_TURBULENT_VISCOSITY() and put my CMU definition there. But the problem seems that this does not suppress the CMU value that is already present in the viscous dialog box of GUI panel.

Can someone help me?

Thanks


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