Fluent UDF for Micro Flow Face Slip Velocity
I am trying to implement a slip condition in a UDF with the following code, I am just unsure of how to actually write the slip velocity expression, can anybody help?
/************************************************** ********************* Slip velocity profile ************************************************** **********************/ #include "udf.h" DEFINE_PROFILE(wall_slip, thread, position) { double xf[ND_ND]; /* this will hold the face centroid position */ double xc[ND_ND]; /* this will hold the cell centroid position */ double rUF; double rUC; double rRho,rT; /*face in the thread */ face_t f; /*cell in the thread */ cell_t c0; /*thread pointer */ Thread *t0; #define PI 3.14159265358979323846 /* number pi */ #define Boltzmann 1.3806505e-23 /* Boltzmann constant */ #define SQRT_2 1.41421356237309504880 /* sqrt(2) */ #define SpHR 1.4 /* specific heat ratio; Air #define sigma 1 /* sigma(molecule diameter) */ /*loop over all faces in the thread*/ begin_f_loop(f, thread) { /*Get current face centroid */ F_CENTROID(xf,f,thread); /*Find cell attached to current face */ c0 = F_C0(f,thread); /*Find thread containing this cell*/ t0 = F_C0_THREAD(f,thread); /*Get adjacent cell centroid */ C_CENTROID(xc,c0,t0); /*Get velocity in the adjacent cell*/ rUC=C_U(c0,t0); /*Get density in the current face cell*/ rRho=F_R(f,t0); /*Get temperature in the current face cell*/ rT=F_T(f,t0); /*compute face velocity*/ rUF=(2*A)/(2*A)+(; /* You can print values to the fluent window, for example */ /* printf("Face center: %e Cell Center: %e\n",xf[1],xc[1]); */ /* set the current value to be returned for this face */ F_PROFILE(f, thread, position) = rUF; } end_f_loop(f, thread) } |
All times are GMT -4. The time now is 14:42. |