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; begin_f_loop(f,t) { c0=F_C0(f,t); t0=t>t0; viscosity = C_MU_L(c0,t0); density = C_R(c0,t0); R=C_RGAS(c0,t0); pressure=C_P(c0,t0); Temperature=C_T(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]; g_mag=.5*(g_u+g_v); val = ((2.  sigma_m)/sigma_m)*Kn*g_u; F_PROFILE(f,t,i)=val; } end_f_loop(f,t) } Thanking Tajul 
Re: can you help? Its great for me.
In your include you have forgetton the "udf.h"

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 08:26. 