|
[Sponsors] |
February 21, 2006, 22:44 |
UDF for oscillating wall
|
#1 |
Guest
Posts: n/a
|
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. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Natural convection in a closed domain STILL NEEDING help! | Yr0gErG | FLUENT | 4 | December 2, 2019 01:04 |
UDF for slip and moving wall | lichun Dong | FLUENT | 3 | March 26, 2014 05:37 |
wall suction udf | osman turan | FLUENT | 2 | July 17, 2008 08:09 |
UDF hook on the WALL boundary condition | Luke | FLUENT | 0 | June 7, 2006 12:54 |
udf: dimensionless wall coordinate | Chris | FLUENT | 0 | June 22, 2004 07:10 |