- **FLUENT**
(*http://www.cfd-online.com/Forums/fluent/*)

- - **UDF for oscillating wall
**
(*http://www.cfd-online.com/Forums/fluent/39764-udf-oscillating-wall.html*)

UDF for oscillating wall
Hi group, Please help me in writing UDF for an oscillating curved wall where radial velocity at wall is given as: v = sin(wt), where w is the frequency. I wrote following code and received fatal error by fluent:
#include udf.h¸ #include metric.h DEFINE_CG_MOTION(wave, dt, vel, omega, time, dtime) { Node *node; Real xn, yn, r, sin_theta, cos_theta; xn = NODE_X(node); // calculate x-coordinate of a grid point on wall yn = NODE_Y(node); // calculate y-coordinate of a grid point on wall r = sqrt(pow(xn,2)+pow(yn,2)); // calculate radial coordinate of the grid point on wall sin_theta = yn/r; cos_theta = xn/r; vel[0]=sin(200000*time)*sin_theta; //y-component of velocity vel[1]= sin(200000*time)*cos_theta; //x-component of velocity } Any suggestion will be highly appreciated. Thanks, Rajneesh. |

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