CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   UDF for changing viscosity (https://www.cfd-online.com/Forums/fluent/41858-udf-changing-viscosity.html)

Rafael July 27, 2006 02:51

UDF for changing viscosity
 
hello i want to increase 100 times the viscosity in a pipe, but just in a region of a circular pipe ( for avoiding turbulence problems)that it is to mean to maintain the viscosity in the first meter of the pipe and increase it in the rest is it possible? how can i do that? i assume that it is with an UDF... Thanks very much

shanti July 31, 2006 14:03

Re: UDF for changing viscosity
 
Hi

Yes, you have write a UDF for that by using the DEFINE_PROPERTY macros wherein you can indicate that the velocity changes with position.

Hope it helps Shanti

vsampath October 28, 2009 15:59

Hi this is my UDF

#include "udf.h"


DEFINE_PROPERTY(cell_viscosity,cell,thread)
{
cell_t c;
real x[ND_ND];
real mu_lam;
real y;
Thread *t;
C_CENTROID(x,c,t);
y= x[1];
mu_lam= 0.001002*(2-(y/0.01));
printf("MU= %f \n",mu_lam);
return mu_lam;

}

MY Problem is i get the value of mu at only same y i need to define value of mu at different y coordinates ..... can someone help me rectify this out??


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