CFD Online Discussion Forums

CFD Online Discussion Forums (
-   FLUENT (
-   -   Moving a wall with UDF (

noa March 13, 2011 06:26

Moving a wall with UDF
Can you please take a look at this????:confused::confused::mad:

I have a 2D channel that the upper wall has the equation of y=ax+b.

I used a udf in order to move it along Y axis.
However, when I preview my mesh it doesn't take into account the slope of the wall (a*x) :

/* Constants */
#define b 10e-3
#define a 0.3e-3
/************************************************** ***/

Thread *tf = DT_THREAD (dt);
face_t f;
Node *node_p;
real x, y;
int n;


begin_f_loop (f, tf)
f_node_loop (f, tf, n)
node_p = F_NODE (f, tf, n);
if (NODE_POS_NEED_UPDATE (node_p))
x = NODE_X (node_p);

NODE_Y (node_p) = y;
end_f_loop (f, tf);

All times are GMT -4. The time now is 10:09.