# Problem with UDF (Drag model)

 User Name Remember Me Password
 Register Blogs Members List Search Today's Posts Mark Forums Read

 January 4, 2011, 06:01 Problem with UDF (Drag model) #1 New Member   Join Date: Jan 2011 Posts: 1 Rep Power: 0 Hello, I tried to implement Tomiyama Drag Model in FLUENT. The Drag Coefficient is saved by UDMI. My problem is, that this variable is always 0,666667. The limit value should be 2,666667. I would rather expect this value to change, when I change the bubble diameter. This is not the case. Anyway, the modification of the bubble diameter has an influence on my calculation, but that can also be because d_p is used to calculate the drag force. I also tried to use either C_D1 or C_D2 without the if else condition, but I got the same result again. Thank you very much. Regards #include "udf.h" #define g 9.81 #define Drag_Coefficient 0 DEFINE_EXCHANGE_PROPERTY(tomiyama_drag, cell, mxtr_thrd, scnd_clmn, frst_clmn) { Thread *scnd_thrd = THREAD_SUB_THREAD(mxtr_thrd, scnd_clmn); Thread *frst_thrd = THREAD_SUB_THREAD(mxtr_thrd, frst_clmn); real diam = C_PHASE_DIAMETER(cell, frst_thrd); real diaQ = diam * diam; real NV_VEC(V), velo, Re, f_d, surface_t, rho_p, rho_s, delta_rho, Eo, C_D1, C_D2, C_D; NV_DD(V, =, C_U(cell, frst_thrd), C_V(cell, frst_thrd), C_W(cell, frst_thrd), -, C_U(cell, scnd_thrd), C_V(cell, scnd_thrd), C_W(cell, scnd_thrd)); velo = NV_MAG(V); Re = RE_NUMBER(C_R(cell, scnd_thrd), velo, diam, C_MU_L(cell, scnd_thrd)); rho_p = C_R(cell, scnd_thrd); rho_s = C_R(cell, frst_thrd); surface_t = 0.025; /*surface tension coefficient */ delta_rho = (rho_p - rho_s); Eo = (g * delta_rho * diaQ) / surface_t; C_D1 = 24. * (1. + 0.15 * pow(Re, 0.687)) / Re; C_D2 = 8. / 3.* Eo / (Eo * 4.); if (C_D1 > C_D2) C_D = C_D1; else C_D = C_D2; C_UDMI(cell, mxtr_thrd, Drag_Coefficient) = C_D; /*PUT C_D IN USER DEFINED MEMORY*/ f_d = 0.75 * C_D * velo; #define DRAG_COEFF(fd,vofS,rhop,diam) ((fd)*(vofS)*(rhop)/(diam)) return DRAG_COEFF(f_d, C_VOF(cell, frst_thrd), C_R(cell, scnd_thrd), diam); }

 Tags fluent, tomiyama, udf, udmi

 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 Rizwan Fluent UDF and Scheme Programming 40 October 18, 2017 07:17 Amir Khodabandeh FLUENT 1 March 13, 2009 09:43 Michael FLUENT 1 December 9, 2008 08:51 Yasmail AKARIOUH FLUENT 0 April 29, 2008 07:44 Ed FLUENT 4 September 18, 2003 10:42

All times are GMT -4. The time now is 04:37.

 Contact Us - CFD Online - Privacy Statement - Top