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

Need urgent help Regarding Drag coefficient

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 16, 2006, 12:54
Default Need urgent help Regarding Drag coefficient
  #1
srinivas
Guest
 
Posts: n/a
hi, can any body help me to write UDF for drag coefficient. i have written UDF but its not working... i am attaching my UDF here. can anyone find where is the mistake in UDF. Its very urgent.

My drag coefficient function is:

Cd = max{ 24(1+0.15*pow(Re,0.687))/24, 8Em/(3(Em+4))}

Re = density(l)*Dia*|Vg-Vl|/viscosity;

Dia = Diameter of bubble

|Vg-Vl|---> Relative slip velocity

Em = g*density diff*pow(Dia,2)/surface tension;

#include <udf.h> #define diam2 0.005

DEFINE_EXCHANGE_PROPERTY(custom_drag,cell,mix_thre ad,s_col,f_col) { Thread *thread_g, *thread_l; real x_vel_g, x_vel_l, y_vel_g, y_vel_l, z_vel_g, z_vel_l, U_vel, abs_v,

rho_g, rho_l, mu_l, reyp, k_g_s,sre,psv,sv,Em,f,vasu;

/* find the threads for the gas (secondary) */ /* and liquids (primary phases) */

thread_g = THREAD_SUB_THREAD(mix_thread, f_col);/* gas phase */ thread_l = THREAD_SUB_THREAD(mix_thread, s_col);/* liquid phase*/

/* find phase velocities and properties*/

x_vel_g = C_U(cell, thread_g); y_vel_g = C_V(cell, thread_g); z_vel_g = C_W(cell, thread_g);

x_vel_l = C_U(cell, thread_l); y_vel_l = C_V(cell, thread_l); z_vel_l = C_W(cell, thread_l); U_vel = (x_vel_l + y_vel_l + z_vel_l)/3;

rho_g = 1.225; rho_l = 998;

mu_l = 0.0001;

/*compute slip*/ abs_v = sqrt(x_vel_g*x_vel_g + y_vel_g*y_vel_g + z_vel_g*z_vel_g);

/*compute Reynold's number*/ f=(U_vel-abs_v); if (f>0) f=f; else f=-f;

reyp = rho_l*f*diam2/mu_l;/*Reynold number*/

sre = pow(reyp,-0.313); psv = pow(reyp,-1); sv = 24*psv + 3.6*sre; Em = 133946.8*diam2*diam2; vasu = 8*Em/(3*Em + 12);

if(sv < vasu)

k_g_s = vasu; else

k_g_s = sv; return k_g_s; }
  Reply With Quote

Old   September 17, 2006, 11:11
Default Re: Need urgent help Regarding Drag coefficient
  #2
MarkRussell
Guest
 
Posts: n/a
What 'error' message are you getting?

Mark
  Reply With Quote

Old   September 18, 2006, 06:06
Default Re: Need urgent help Regarding Drag coefficient
  #3
srinivas
Guest
 
Posts: n/a
if drag coefficient UDF function added the simulations goes divergence in few iterations
  Reply With Quote

Old   September 20, 2006, 11:10
Default Re: Need urgent help Regarding Drag coefficient
  #4
Luis Echeverri
Guest
 
Posts: n/a
Try starting the solution with the symmetric model for example. After some steeps change to your drag UDF. That could work, probably Re~0 gives a hard time to the solver.
  Reply With Quote

Reply


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Drag Coefficient Convergence Problem John FLUENT 18 June 24, 2023 10:22
Drag coefficient for parcels in dieselFoam sebastian_vogl OpenFOAM Running, Solving & CFD 5 December 31, 2008 13:19
Automotive test case vinz OpenFOAM Running, Solving & CFD 98 October 27, 2008 09:43
Need urgent help Regarding Drag coefficient srinivas Main CFD Forum 1 September 16, 2006 15:15
Need urgent help Regarding Drag coefficient srinivas FLUENT 0 September 16, 2006 13:25


All times are GMT -4. The time now is 10:52.