CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   FLUENT (http://www.cfd-online.com/Forums/fluent/)
-   -   UDF_Define Turbulent_Viscosity locally (http://www.cfd-online.com/Forums/fluent/44293-udf_define-turbulent_viscosity-locally.html)

efisio Solazzo March 29, 2007 11:37

UDF_Define Turbulent_Viscosity locally
 
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, only on a portion of my domain. I have been trying the following:

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

DEFINE_TURBULENT_VISCOSITY(user_mu_t,c,t)

Node *node;

real x = NODE_X (node);

real y = NODE_Y (node);

real mu_t;

real rho = C_R(c,t); and so on....

if ((y < 0.12) && (x < 0.82) && (x > 0.73)) /*define the region i am interested in*/

mu_t = something;

else

mu_t = something else;

return mu_t;

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

(which compiles by the way) but I think that the usage of && and the specification of the coordinates using NODE creates some problems...

Any ideas? Thanks


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