CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   Help me with my udf plzzzz (https://www.cfd-online.com/Forums/fluent/73066-help-me-my-udf-plzzzz.html)

sri99iitm February 25, 2010 12:51

Help me with my udf plzzzz
 
can any 1 pls help me with my udf .
Im running simulation with a cylinder ,sphere inside it for Non Newtonian fluid.
I recently started working with fluent ,hope u could lead ur helping hand
Dimensions of cylinder
L=20cms
D=4cms
d(sphere)=2cms
Parabolic Velocity equation be V=Vmax(1-r/R)^(n+1/n)

my code:
#include "udf.h"

DEFINE_PROFILE(inlet_x_velocity, thread, position)

{

real x[ND_ND];

real y,r,R;

face_t f;

begin_f_loop(f, thread)

{

F_CENTROID(x,f,thread);

r = pow(x,2)+pow(y,2);

// Vmax=4.1,R=o.o4//

F_PROFILE(f, thread, position) = Vmax *pow(1-r/R,(n+1)/n);

}

end_f_loop(f, thread)

}

Please tell the changes i have to make ,thank u


All times are GMT -4. The time now is 21:52.