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

DEFINE_SOURCE

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

Reply
 
LinkBack Thread Tools Display Modes
Old   June 21, 2006, 07:35
Default DEFINE_SOURCE
  #1
Timi
Guest
 
Posts: n/a
Hi all! I`d like to use UDF for FLUID with Source-Therm definition to simulate a Porous-wall. Id like to define zero velocity in certain cells, and a free stream for the rest of the cells. How can I define the "source" and the "ds[eqn]" in the Define_Source makro? Have you an idea?

Thanks! Timi
  Reply With Quote

Old   June 21, 2006, 11:31
Default Re: DEFINE_SOURCE
  #2
Aidan
Guest
 
Posts: n/a
you don't need to use a Define_source UDF for this problem. velocity values can be fixed using the "Fixed Values" panel in the fluid boundary conidtions.
  Reply With Quote

Old   June 22, 2006, 08:18
Default Re: DEFINE_SOURCE
  #3
Timi
Guest
 
Posts: n/a
Thank you! But how can I define Fixed Values with UDF? Which makro can I use?

Timi
  Reply With Quote

Old   June 22, 2006, 08:41
Default Re: DEFINE_SOURCE
  #4
Aidan
Guest
 
Posts: n/a
I think you can use the DEFINE_PROFILE macro but i'm not certain
  Reply With Quote

Old   June 22, 2006, 10:24
Default Re: DEFINE_SOURCE
  #5
Timi
Guest
 
Posts: n/a
I have done with DEFINE_PROFILE, and I have always got, that the y-coordinates are 0.00015m, when the y range is 0-0.002m. Do you know why? Thats the programm-text:

DEFINE_PROFILE(fix_vx_value, t, i)

{

#define r 0.00025

cell_t c;

real x[ND_ND];

real y;

begin_c_loop(c,t)

{

C_CENTROID(x,c,t);

y=x[1];

printf(" y: %12.6f ", y, c);

if (fabs(y-0.001) > r)

{

printf(" y: %12.6f ", y, c);

F_PROFILE(c,t,i)=0;

}

}

end_c_loop(c,t)

}

Thanks! Timi
  Reply With Quote

Reply

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



All times are GMT -4. The time now is 02:48.