CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT > Fluent UDF and Scheme Programming

Fluent UDF for Micro Flow Face Slip Velocity

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 12, 2013, 06:39
Default Fluent UDF for Micro Flow Face Slip Velocity
  #1
New Member
 
Daniel Carter
Join Date: Nov 2012
Posts: 1
Rep Power: 0
daniel_george_carter is on a distinguished road
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)
}
daniel_george_carter is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Slip flow in UDF - Plse Help Jeerasak FLUENT 1 June 26, 2010 11:07
ATTENTION! Reliability problems in CFX 5.7 Joseph CFX 14 April 20, 2010 16:45
[blockMesh] Axisymmetrical mesh Rasmus Gjesing (Gjesing) OpenFOAM Meshing & Mesh Conversion 10 April 2, 2007 15:00
Variables Definition in CFX Solver 5.6 R P CFX 2 October 26, 2004 03:13
UDF in Fluent to Match Mass Flow at Pressure Outlet Jonas Larsson Main CFD Forum 1 April 29, 1999 11:44


All times are GMT -4. The time now is 17:38.