CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > FLUENT

Problem with UDF (Drag model)

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

Reply
 
LinkBack Thread Tools Display Modes
Old   January 4, 2011, 06:01
Default Problem with UDF (Drag model)
  #1
New Member
 
Join Date: Jan 2011
Posts: 1
Rep Power: 0
understate is on a distinguished road
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);
}
understate is offline   Reply With Quote

Reply

Tags
fluent, tomiyama, udf, udmi

Thread Tools
Display Modes

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 Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
ATTN ALL: SOLUTON TO UDF COMPILE PROBLEM Rizwan Fluent UDF and Scheme Programming 30 March 21, 2014 06:34
UDF problem in multiphase model Amir Khodabandeh FLUENT 1 March 13, 2009 09:43
UDF using problem, error happens-heip!! Michael FLUENT 1 December 9, 2008 08:51
multiphase model and drag law Yasmail AKARIOUH FLUENT 0 April 29, 2008 07:44
Real gas model with UDF Ed FLUENT 4 September 18, 2003 10:42


All times are GMT -4. The time now is 16:58.