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

udf fluent

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 17, 2010, 11:01
Default udf fluent
  #1
New Member
 
marie
Join Date: May 2010
Posts: 21
Rep Power: 16
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 18, 2010, 00:14
Default
  #2
Senior Member
 
Join Date: Feb 2010
Posts: 164
Rep Power: 17
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, 05:09
Default
  #3
New Member
 
marie
Join Date: May 2010
Posts: 21
Rep Power: 16
marye is on a distinguished road
thank you!
marye is offline   Reply With Quote

Old   May 18, 2010, 07:56
Default
  #4
New Member
 
marie
Join Date: May 2010
Posts: 21
Rep Power: 16
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


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 Off
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 20:53
problem loading UDF in parallel fluent Tim FLUENT 12 July 12, 2008 13:59
HELP! Fluent UDF Iterate error Sam FLUENT 2 July 10, 2008 22: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 17:37


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