CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   about turbulent viscosity UDF! (https://www.cfd-online.com/Forums/fluent/68674-about-turbulent-viscosity-udf.html)

gina September 28, 2009 17:08

about turbulent viscosity UDF!
 
Hello everybody. I would be really grateful if any of you could address me on how to create an UDF to change the turbulent viscosity (hence k+ formula), only on a portion of my domain. I have been trying the following:

-----------------------------------------

/************************************************** ********************

UDF pour la vitesse et la viscosité turbulente
************************************************** ********************/

#include "udf.h"


//udf de viscosité turbulente//

DEFINE_TURBULENT_VISCOSITY(user_mu_t,c,t)
{

real x[ND_ND];

real y;

real mu_t,yp,utau,nu,…..;

utau=;

nu=;
…..
y=x[1];

yp=(y*utau)/nu;
if (yp <= 20) {

mu_t =……….



return mu_t;


}

-----------------------------------------------------------

which I have interpreted and my program converged, by my result of k+=f(y+) is not correct.

I do not know if fluent takes into consideration that k also changes with the change of mu_turbulent or not?


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