24小时热门版块排行榜    

查看: 931  |  回复: 2

yangshuaibyx

金虫 (小有名气)

[交流] fluent UDF 已有1人参与

DEFINE_EXCHANGE_PROPERTY(custom_drag_ihme, 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, cd, eg,
      void_g, k_g_s;

/* find the threads for the gas (primary) and solids (secondary phases).
These phases appear in columns 2 and 1 in the Interphase panel respectively*/

thread_g = THREAD_SUB_THREAD(mix_thread, s_col);/*gas phase*/
thread_s = THREAD_SUB_THREAD(mix_thread, f_col);/* solid phase*/

/* find phase velocities and properties*/

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);

/*compute slip*/
abs_v = sqrt(slip_x*slip_x + slip_y*slip_y);

/*compute reynolds number*/

reyp = rho_g*abs_v*diam2/mu_g;

cd = (24./(reyp+SMALL)) + 5.48*pow((reyp+SMALL),-0.573) + 0.36;

void_g = C_VOF(cell, thread_g);/* gas vol frac*/

eg = pow(void_g,-2.65);

k_g_s = (3./4.)*(cd*(1.-void_g)*abs_v*rho_g*eg)/diam2;

return k_g_s;

}
SMALL 是什么东西?谢谢
回复此楼
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

cfd咨询

新虫 (初入文坛)


你的程序没有贴全,应该是静态变量
2楼2013-08-14 14:42:58
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

yangshuaibyx

金虫 (小有名气)

引用回帖:
2楼: Originally posted by cfd咨询 at 2013-08-14 14:42:58
你的程序没有贴全,应该是静态变量

我只截取了一部分,谢谢你的回复
3楼2013-08-14 17:13:53
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
相关版块跳转 我要订阅楼主 yangshuaibyx 的主题更新
普通表情 高级回复 (可上传附件)
信息提示
请填处理意见