# UDF for effective thermal conductivity

 Register Blogs Members List Search Today's Posts Mark Forums Read

 October 26, 2007, 04:34 UDF for effective thermal conductivity #1 Rashmi Guest   Posts: n/a Hi All Iam simulating nanofluids using fluent. I have written udf for effective thermal conductivity of nanofluid suspension of water and Al2O3 particles. here is the udf #include "udf.h" #include "prop.h" #include "sg_mphase.h" #define h 1.0 DEFINE_PROPERTY(cell_conductivity, c, mix_Thread, s_col, f_col) { Thread **pt = THREAD_SUB_THREADS(mix_Thread); float k_f, k_p, d, a, k_lr, gamma, beta, beta1, beta3, beta13, phi_lr, term1, term2, term3, k_r, k_eff, phi_p; /*------------------------------------------------*/ /* Read thermal conductivity of fluid and particle*/ /*------------------------------------------------*/ k_f = C_K_L(c,pt[s_col]); k_p = C_K_L(c,pt[f_col]); real C_K_EFF(c, mix_Thread); /*--------------------------------------------------*/ /* Grab the diameter of nano particle (d) */ /*--------------------------------------------------*/ d = C_PHASE_DIAMETER(c,pt[f_col]); a=d/2.0; /* Particle radius*/ /*------------------------------------------------------------------*/ /* Grab the local volume fraction of the dispersed phase - no units */ /*------------------------------------------------------------------*/ phi_p = C_VOF(c,pt[f_col]); k_lr = 2.0*k_f; /* Assumption */ gamma = h/a; beta = 1.0 + gamma; beta1 = 1.0 + (gamma/2.0); beta3 = beta*beta*beta; beta13 = beta1*beta1*beta1; phi_lr = phi_p * (beta3-1.0); term1 = ((k_p-k_lr)*phi_lr*k_lr*(2.0*beta13-beta3+1.0)); term2 = (((k_p+(2.0*k_lr))*beta13)*(phi_lr*beta3*(k_lr-k_f)+k_f)); term3= (((beta13*(k_p+(2.0*k_lr)))-((k_p-k_lr)*phi_lr*(beta13+ beta3-1)))); k_eff = (term1+term2)/term3; /*---------------------------------------------*/ /* Store the value of k_eff in memory */ /*---------------------------------------------*/ C_UDMI(c, mix_Thread, 0)= k_eff; k_r = k_eff/k_f; /*------------------------------------------------------------------------*/ /* Store the value of Thermal conductivity ratio (k_r) in memory */ /*------------------------------------------------------------------------*/ C_UDMI(c, mix_Thread, 1)= k_r; return k_eff; } ------------------------- here are the error msgs ------------------------- ..\..\src\TCeffmodify.c(7) : warning C4002: too many actual parameters for macro 'DEFINE_PROPERTY' ..\..\src\TCeffmodify.c(19) : error C2065: 's_col' : undeclared identifier ..\..\src\TCeffmodify.c(20) : error C2065: 'f_col' : undeclared identifier ..\..\src\TCeffmodify.c(24) : warning C4003: not enough actual parameters for macro 'C_K_EFF' ..\..\src\TCeffmodify.c(24) : error C2063: 'real' : not a function ..\..\src\TCeffmodify.c(24) : error C2059: syntax error : ')' Done. "C:/working" Opening library "libudf"... Error: open_udf_library: The system cannot find the file specified. Error Object: () Can anyone help me to solve this. Thanks Rashmi

 November 6, 2007, 21:08 Re: UDF for effective thermal conductivity #2 Woo Meng Wai Guest   Posts: n/a Hi, I also faced some previously in obtaining effective thermal ocnductivity for my UDF. I noticed u used this macro: real C_K_EFF(c, mix_Thread) the actual call for effective thermal conductivity is: C_K_EFF(c,t,prt) where prt is the turbulent prandtl number. I am not sure how u are going to access the prandtl number. Hope it helps. cheers, Woo

 Thread Tools Display Modes Linear Mode

 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 OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post Sas CFX 15 July 13, 2010 08:56 mvf Fluent UDF and Scheme Programming 0 July 11, 2010 09:23 Mona FLUENT 2 January 16, 2006 14:36 FengYun FLUENT 2 October 27, 2005 05:28 Craig FLUENT 4 February 11, 2004 15:02

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