CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   FLUENT (http://www.cfd-online.com/Forums/fluent/)
-   -   DEFINE_SOURCE (http://www.cfd-online.com/Forums/fluent/41462-define_source.html)

Timi June 21, 2006 07:35

DEFINE_SOURCE
 
Hi all! I`d like to use UDF for FLUID with Source-Therm definition to simulate a Porous-wall. Iīd 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

Aidan June 21, 2006 11:31

Re: DEFINE_SOURCE
 
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.

Timi June 22, 2006 08:18

Re: DEFINE_SOURCE
 
Thank you! But how can I define Fixed Values with UDF? Which makro can I use?

Timi

Aidan June 22, 2006 08:41

Re: DEFINE_SOURCE
 
I think you can use the DEFINE_PROFILE macro but i'm not certain

Timi June 22, 2006 10:24

Re: DEFINE_SOURCE
 
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? Thatīs 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


All times are GMT -4. The time now is 03:41.