CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > FLUENT

udf fluent

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

Reply
 
LinkBack Thread Tools Display Modes
Old   May 17, 2010, 10:01
Default udf fluent
  #1
New Member
 
marie
Join Date: May 2010
Posts: 21
Rep Power: 8
marye is on a distinguished road
Hi,

I work with Fluent, in my model I have 5 zones : an inlet velocity, an outlet pression, wall, interior and fluid.
I'd like to associate different values of viscocity for the 3 first zones by using a udf fonction but I'm a little stuck.
#include "udf.h"
DEFINE_PROPERTY (cell_viscosity,c,t)
{ real mu_lam;

them I don't know how to call the elements of the different zones.

if anyone could help me... Thank you very much!!
marye is offline   Reply With Quote

Old   May 17, 2010, 23:14
Default
  #2
Senior Member
 
Ji Junjie
Join Date: Feb 2010
Location: Shanghai, China
Posts: 107
Rep Power: 8
gearboy is on a distinguished road
Quote:
Originally Posted by marye View Post
Hi,

I work with Fluent, in my model I have 5 zones : an inlet velocity, an outlet pression, wall, interior and fluid.
I'd like to associate different values of viscocity for the 3 first zones by using a udf fonction but I'm a little stuck.
#include "udf.h"
DEFINE_PROPERTY (cell_viscosity,c,t)
{ real mu_lam;

them I don't know how to call the elements of the different zones.

if anyone could help me... Thank you very much!!
Using zone ID to judge different zone
#include "udf.h"
DEFINE_PROPERTY (cell_viscosity,c,t)
{
if(ZONE_ID1==THREAD_ID(t))
......
if(ZONE_ID2==THREAD_ID(t))
.....
gearboy is offline   Reply With Quote

Old   May 18, 2010, 04:09
Default
  #3
New Member
 
marie
Join Date: May 2010
Posts: 21
Rep Power: 8
marye is on a distinguished road
thank you!
marye is offline   Reply With Quote

Old   May 18, 2010, 06:56
Default
  #4
New Member
 
marie
Join Date: May 2010
Posts: 21
Rep Power: 8
marye is on a distinguished road
Well, I have another problem, I've tried to call the cells...
Just to try,

#include"udf.h"
DEFINE_PROPERTY(cell_viscosity, cell, thread)
{
real mu_lam;
cell_t c;
int i;
for (i=1, i<200, i++)
if ((cell_t ci %2)==0)
mu_lam = 2.;
else
mu_lam = 1.;
return mu_lam;
}

But it doesn't work... I'm new with both Fluent and C++...

If anyone could help..
Thanks!!
marye is offline   Reply With Quote

Reply

Tags
fluent, udf

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
Using Fluent with a UDF frm a remote m/c aarti FLUENT 2 September 11, 2008 19:53
problem loading UDF in parallel fluent Tim FLUENT 12 July 12, 2008 12:59
HELP! Fluent UDF Iterate error Sam FLUENT 2 July 10, 2008 21:29
UDF problem caused by various version of Fluent Yurong FLUENT 3 January 15, 2006 11:57
Can somebody send me a Fluent 6 UDF manual?? KKLAU FLUENT 4 April 14, 2004 16:37


All times are GMT -4. The time now is 19:00.