CFD Online Discussion Forums

CFD Online Discussion Forums (
-   FLUENT (
-   -   can you help? Its great for me. (

Tajul January 25, 2006 22:45

can you help? Its great for me.
HI I am Tajul. I am a little bit despair about Fluent User Forum. I posted messages two times about my same problem but no one answered. This is the 3rd time I am sending the same problem. I do not think that no one does not know the answer. I am working with microchannel flow with slip wall boundary condition. The slip wall boundary condition is uw=Kn.(delu/deln)where uw is the fluid velocity at the wall, n is the normal coordinate pointing inward from the channel wall. Kn is the Knudsen number where kn=1/H.(viscosity*sqrt(pi)/sqrt(2*density*pressure)). H is the height of the channel. I wrote a UDF like this but giving floating point error and invalid number. I do not not how to set boundary conditions and hook this UDF. If any one help me I will be grateful to him and apreciate his kindness.

#include <udf.h> #include <mem.h>

#define PI 3.141592

DEFINE_PROFILE(wall_vel, t, i) {

face_t f;

cell_t c0;

Thread *t0;

double lamda, viscosity, density, Kn, R, Temperature, pressure, H, val, sigma_m, g_u, g_v, g_mag;

H = 0.0000012;

sigma_m = 1.0;





viscosity = C_MU_L(c0,t0);

density = C_R(c0,t0);




pressure = density*R*Temperature;

lamda = viscosity * sqrt(PI) / (sqrt(2.*density*pressure));

Kn = lamda / H;

g_u = C_U_G(c0,t0)[1];

g_v = C_U_G(c0,t0)[2];


val = ((2. - sigma_m)/sigma_m)*Kn*g_u;



end_f_loop(f,t) }

Thanking Tajul

HVN January 26, 2006 04:33

Re: can you help? Its great for me.
In your include you have forgetton the "udf.h"

Tajul January 26, 2006 04:50

Re: can you help? Its great for me.
Hi HVN, I have written that in my original UDF. It was left at the time of copying. If you have any other suggestions I'll apreciate. Thanks Tajul

#include <udf.h> #include <mem.h>

All times are GMT -4. The time now is 00:42.