CFD Online Discussion Forums

CFD Online Discussion Forums (
-   FLUENT (
-   -   what wrong with my udf? (

tristan April 20, 2006 04:27

what wrong with my udf?
#include"udf.h" #define BOLTZ 1.380622e-23 #define AM 4.65e-26 #define AD 4.17e-10 #define PI 3.141592654 #define TMAC 1.0 #define TWALL 300. #define R 297. #define CP 1040.67 #define GAMA 1.40 DEFINE_PROFILE(wallslipdown,thread,index) { real mu,k,AA,Pr,BB; face_t f; cell_t c; Thread *cell_thread; begin_f_loop(f,thread) {c=F_C0(f,thread); cell_thread=THREAD_T0(thread); mu=5.*sqrt(fabs(AM*BOLTZ*F_T(f,thread)/(PI+1.e-50)))/( 16.*AD*AD+1.e-50); k=75.*BOLTZ*sqrt(fabs(BOLTZ*F_T(f,thread)/(AM*PI+1.e-30)))/ (64.*AD*AD+1.e-30); AA=(2.-TMAC)*mu/(TMAC*F_R(f,thread)*sqrt(2.*R*TWALL/PI)); Pr=CP*mu/k; BB=0.75*k*Pr*(GAMA-1)/(GAMA*F_R(f,thread)*R*TWALL); F_PROFILE(f,thread,index)=AA*C_DUDY(c,cell_thread) +BB*C_T_G(c,cell_thread)[0]; } end_f_loop(f,thread) }

I use this udf to define slip velocity in microchannel flow,but when the flow field was initialized,there were "ACCESS VIOLATION "errors.who can help me? My dear friends. Thanks in advance.

All times are GMT -4. The time now is 19:09.