CFD Online Logo CFD Online URL
Home > Forums > Main CFD Forum

Defining viscosity that varies with position in an UDF

Register Blogs Members List Search Today's Posts Mark Forums Read

LinkBack Thread Tools Display Modes
Old   October 28, 2009, 16:57
Default Defining viscosity that varies with position in an UDF
New Member
Vivek Sampath
Join Date: Oct 2009
Location: Houston
Posts: 6
Rep Power: 10
vsampath is on a distinguished road
Hi this is my UDF

#include "udf.h"

cell_t c;
real x[ND_ND];
real mu_lam;
real y;
Thread *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??
vsampath is offline   Reply With Quote


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
UDF for Turbulent Viscosity Lourival Fluent UDF and Scheme Programming 3 October 13, 2012 03:09
DPM UDF particle position using the macro P_POS(p)[i] dm2747 FLUENT 0 April 17, 2009 01:29
viscosity in UDF! denhan FLUENT 0 April 6, 2007 01:12
Help - UDF for solid shear viscosity nbh2801 FLUENT 0 April 21, 2006 07:49
Turbulent Viscosity UDF Raphael FLUENT 2 January 23, 2006 05:04

All times are GMT -4. The time now is 09:05.