24小时热门版块排行榜    

查看: 1438  |  回复: 0

yangshuaibyx

金虫 (小有名气)

[求助] 曳力模型阻力系数的UDF

气固两相流数值模拟时fluent 中曳力模型的自定义UDF程序文件中有两个模型,阻力系数调用函数时需要调用这两个曳力模型吗?还是只调用一个就行
/* This is a routine for customizing default Syamlal drag law in Fluent 6.
   The default drag law uses 0.8 (for void<=0.85) and 2.65 (void>0.85) for
   bfac. This is for a min fluid vel of 25 cm/s. The current drag law has been
   tuned for a min fluid vel of 8 cm/s and uses 0.28 and 9.07 for these
   parameters. */

#include "udf.h"
#include "sg_mphase.h"

# define pi 4.*atan(1.)
#define diam2 3.e-4

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;

/* 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;

/* compute particle relaxation time */

taup = rho_s*diam2*diam2/18./mu_g;

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

/*compute drag and return drag coeff, k_g_s*/

afac = pow(void_g,4.14);

if(void_g<=0.85)
  bfac = 0.281632*pow(void_g, 1.28);
else
  bfac = pow(void_g, 9.076960);

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;

}

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;

}
回复此楼
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

智能机器人

Robot (super robot)

我们都爱小木虫

找到一些相关的精华帖子,希望有用哦~

科研从小木虫开始,人人为我,我为人人
相关版块跳转 我要订阅楼主 yangshuaibyx 的主题更新
最具人气热帖推荐 [查看全部] 作者 回/看 最后发表
[基金申请] 娱乐 +4 Tide man 2026-08-03 4/200 2026-08-04 11:51 by wgch518
[找工作] 售SCI文章,我:8O.5.5.1O.54,科目全,可十急 +3 Ocx3OKOzGU4q 2026-08-03 6/300 2026-08-04 11:36 by MWRYsWbJw4DE
[考研] 售SCI-T0P文章,我:8O.5.5.1.O.54,科目齐全,可+急 +3 Ocx3OKOzGU4q 2026-08-03 6/300 2026-08-04 11:34 by MWRYsWbJw4DE
[教师之家] 售SCI一区文章,我:8.O.55.1.O.54,科目齐全,可伽急 +3 Ocx3OKOzGU4q 2026-08-03 7/350 2026-08-04 11:31 by MWRYsWbJw4DE
[硕博家园] 售SCI一区T0P文章,我:8O.55.1.O.54,科目全,可伽急 +3 f1dmPx051StA 2026-08-03 7/350 2026-08-04 09:31 by v1TJC4qJauAB
[博后之家] 售SCI-T0P文章,我:8O.5.5.1.O.54,科目齐全,可+急 +3 jRl3mE6ddZGq 2026-08-03 5/250 2026-08-04 09:27 by v1TJC4qJauAB
[教师之家] 售SCI一区文章,我:8O5.5.1.O5.4,科目全,可伽急 +4 jRl3mE6ddZGq 2026-08-03 10/500 2026-08-04 09:26 by v1TJC4qJauAB
[有机交流] 一个有机合成实验室都需要哪些设备? 50+3 kf2781974 2026-07-31 10/500 2026-08-04 08:05 by 88817753
[找工作] 售SCI一区文章,我:8.O.551.O.5.4,科目全,可伽急 +3 cu9Nq1xK233Z 2026-08-03 9/450 2026-08-04 07:37 by k7OM8YghWbkC
[硕博家园] 售SCI一区T0P文章,我:8.O.55.1.O.54,科目齐全,可+急 +4 cu9Nq1xK233Z 2026-08-03 13/650 2026-08-04 07:30 by k7OM8YghWbkC
[考博] 售SCI一区T0P文章,我:8.O55.1.O.54,科目全,可十急 +3 cu9Nq1xK233Z 2026-08-03 6/300 2026-08-04 06:10 by k7OM8YghWbkC
[公派出国] 售SCI一区文章,我:8.O.551.O.5.4,科目全,可伽急 +3 cu9Nq1xK233Z 2026-08-03 7/350 2026-08-04 04:46 by k7OM8YghWbkC
[考研] 售SCI一区文章,我:8.O.55.1.O.54,科目齐全,可伽急 +3 cu9Nq1xK233Z 2026-08-03 8/400 2026-08-04 03:21 by k7OM8YghWbkC
[基金申请] 什么时候能放榜呀? +3 Jacob678 2026-08-03 3/150 2026-08-03 16:14 by gltch
[高分子] UV压敏胶开发 +3 ichall 2026-07-30 5/250 2026-08-03 14:40 by Sunrisepay
[基金申请] 2026年国自然面上资助率 +16 布布和一二 2026-07-30 22/1100 2026-08-03 09:20 by gy116024
[基金申请] 微信指数没变化,科研之友没阅读 +15 wangze12014 2026-07-28 19/950 2026-08-02 20:05 by 蔡棒棒菂
[考博] 2027年申博 50+3 射雕英雄胜 2026-07-30 3/150 2026-08-02 09:36 by lfy8008
[高分子] HXDI做水性聚氨酯乳液,是不是特别容易出渣 15+3 yuyusuv 2026-07-29 3/150 2026-07-31 09:21 by huizingga
[基金申请] 你们的时间戳变了吗 +3 archvillain 2026-07-30 4/200 2026-07-30 18:53 by levinzhwen
信息提示
请填处理意见