CFD Online Logo CFD Online URL
Home > Forums > FLUENT

Fluid-Zone-depending viscosity

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

LinkBack Thread Tools Display Modes
Old   May 20, 2008, 03:23
Default Fluid-Zone-depending viscosity
Posts: n/a
Hello everyone,

I am trying to write a UDF for a Fluid-Zone-depending viscosity. But I am new to UDF and so I am having problems.

To test the UDF I have a simple 3d Model which consists of 3 conneced cubes (size 100mm, 100mm, 100mm). Cube 1 is Fluent-Zone 1, Cube 2 Fluent-Zone 2 and Cube 3 Fluent-Zone 3.

I am using a 2-phase VOF Model. The UDF should change the viscosity of the 2nd phase depending on the Fluid-Zone. IF it is inside Fluid-Zone 1 the viscosity shall be for example 10Pa s, in zone 2 -> 20Pa s and in Zone 3 -> 30Pa s.

Thanks in advance

With kind regards Dennis
  Reply With Quote

Old   May 20, 2008, 04:42
Default Fluid-Zone-depending viscosity UDF
Posts: n/a
I created a UDF which works for me, maybe someone is interested in it, too. So here it is:

#include "udf.h"

DEFINE_PROPERTY(cell_viscosity,c,t) { real mu_lam Domain *domain; domain = Get_Domain(3);

if (t == Lookup_Thread(domain,4)){

mu_lam = 10.; }

if (t == Lookup_Thread(domain,3)){

mu_lam = 20.; }

if (t == Lookup_Thread(domain,2)){

mu_lam = 30.; }

return mu_lam;


Greetings Dennis
  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
Fluid Zone Source of Z Paul FLUENT 0 July 31, 2007 14:55
Zone fluid Pelli FLUENT 2 June 22, 2007 07:58
how to define a local zone in whole fluid zone? Lcw FLUENT 3 September 21, 2004 08:33
Problem in fluid zone!!! STK FLUENT 2 September 1, 2004 15:27
how to change inteior zone into fluid zone zwdi FLUENT 3 March 2, 2004 21:25

All times are GMT -4. The time now is 17:53.