CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Fluent UDF and Scheme Programming (https://www.cfd-online.com/Forums/fluent-udf/)
-   -   Fluent UDF for Micro Flow Face Slip Velocity (https://www.cfd-online.com/Forums/fluent-udf/117622-fluent-udf-micro-flow-face-slip-velocity.html)

 daniel_george_carter May 12, 2013 05:39

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"

{
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_t f;
cell_t c0;

#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*/
{
/*Get current face centroid */
/*Find cell attached to current face */
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 */