|
|
发表于 2010-8-12 22:04:50
|
显示全部楼层
#include "udf.h"
#include "sg_mphase.h"
# define pi 4.*atan(1.)
#define diam2 8.775e-05
DEFINE_EXCHANGE_PROPERTY(custom_drag_syam, cell, mix_thread, s_col, f_col)
{
Thread *thread_g, *thread_s;
real x_vel_g, x_vel_s, y_vel_g, y_vel_s, abs_v, slip_x, slip_y,
rho_g, rho_s, mu_g, reyp, afac,
bfac, void_g, vfac, fdrgs, taup, k_g_s;
real Syam1 = 0.765;
real Syam2 = 2.928;
thread_g = THREAD_SUB_THREAD(mix_thread, s_col);
thread_s = THREAD_SUB_THREAD(mix_thread, f_col);
x_vel_g = C_U(cell, thread_g);
y_vel_g = C_V(cell, thread_g);
x_vel_s = C_U(cell, thread_s);
y_vel_s = C_V(cell, thread_s);
slip_x = x_vel_g - x_vel_s;
slip_y = y_vel_g - y_vel_s;
rho_g = C_R(cell, thread_g);
rho_s = C_R(cell, thread_s);
mu_g = C_MU_L(cell, thread_g);
abs_v = sqrt(slip_x*slip_x + slip_y*slip_y);
reyp = rho_g*abs_v*diam2/mu_g;
taup = rho_s*diam2*diam2/18./mu_g;
void_g = C_VOF(cell, thread_g);
afac = pow(void_g,4.14);
if(void_g<=0.85)
bfac = Syam1*pow(void_g, 1.28);
else
bfac = pow(void_g, Syam2);
vfac = 0.5*(afac-0.06*reyp+sqrt(0.0036*reyp*reyp+0.12*reyp*(2.*bfac-
afac)+afac*afac));
fdrgs = void_g*(pow((0.63*sqrt(reyp)/vfac+4.8*sqrt(vfac)/vfac),2))/24.0;
k_g_s = (1.-void_g)*rho_s*fdrgs/taup;
return k_g_s;
}
[ 本帖最后由 浪子轻狂 于 2010-8-12 14:08 编辑 ] |
|