|
[Sponsors] |
June 21, 2006, 07:35 |
DEFINE_SOURCE
|
#1 |
Guest
Posts: n/a
|
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 |
|
June 21, 2006, 11:31 |
Re: DEFINE_SOURCE
|
#2 |
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.
|
|
June 22, 2006, 08:18 |
Re: DEFINE_SOURCE
|
#3 |
Guest
Posts: n/a
|
Thank you! But how can I define Fixed Values with UDF? Which makro can I use?
Timi |
|
June 22, 2006, 08:41 |
Re: DEFINE_SOURCE
|
#4 |
Guest
Posts: n/a
|
I think you can use the DEFINE_PROFILE macro but i'm not certain
|
|
June 22, 2006, 10:24 |
Re: DEFINE_SOURCE
|
#5 |
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? 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 |
|
|
|