24小时热门版块排行榜    

查看: 1471  |  回复: 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 的主题更新
最具人气热帖推荐 [查看全部] 作者 回/看 最后发表
[找工作] 售一区SCI文章T0P,我:8O.551.O54,科目全,可十急 +5 1uaZt2kAZj2S 2026-10-31 8/400 2026-11-02 00:15 by xzcv0Tehd8lQ
[公派出国] 售一区SCI文章T0P,我:8O.551.O54,科目全,可十急 +6 1uaZt2kAZj2S 2026-10-31 8/400 2026-11-02 00:11 by xzcv0Tehd8lQ
[考研] 售SCI一区T0P文章,我:8.O.55.1.O.54,科目齐全,可+急 +4 1uaZt2kAZj2S 2026-10-30 19/950 2026-11-02 00:02 by xzcv0Tehd8lQ
[公派出国] 售SCI-T0P文章,我:8O.5.5.1.O.54,科目齐全,可+急 +4 1uaZt2kAZj2S 2026-10-30 15/750 2026-11-01 23:55 by xzcv0Tehd8lQ
[考研] 售SCI一区T0P文章,我:8.O.55.1.O.54,科目齐全,可+急 +3 hKe7U1kad5Sg 2026-10-31 6/300 2026-11-01 22:27 by xzcv0Tehd8lQ
[基金申请] 售SCI一区T0P文章,我:8O.55.1.O.54,科目全,可伽急 +3 hKe7U1kad5Sg 2026-10-31 6/300 2026-11-01 22:11 by xzcv0Tehd8lQ
[考博] 售SCI-T0P文章,我:8O.5.5.1.O.54,科目齐全,可+急 +5 1uaZt2kAZj2S 2026-10-31 7/350 2026-11-01 21:45 by xzcv0Tehd8lQ
[基金申请] 售SCI一区T0P文章,我:8.O.55.1.O.54,科目齐全,可+急 +5 1uaZt2kAZj2S 2026-10-31 5/250 2026-11-01 21:45 by xzcv0Tehd8lQ
[公派出国] 售SCI-T0P文章,我:8O.5.5.1.O.54,科目齐全,可+急 +4 1uaZt2kAZj2S 2026-10-30 8/400 2026-11-01 21:35 by xzcv0Tehd8lQ
[考博] 售SCI一区文章,我:8.O.55.1.O.54,科目齐全,可伽急 +5 1uaZt2kAZj2S 2026-10-30 17/850 2026-11-01 21:26 by xzcv0Tehd8lQ
[考研] 售一区SCI文章T0P,我:8O.551.O54,科目全,可十急 +3 hKe7U1kad5Sg 2026-10-31 6/300 2026-11-01 19:50 by xzcv0Tehd8lQ
[公派出国] 售SCI一区T0P文章,我:8.O.55.1.O.5.4,科目全,可+急 +4 1uaZt2kAZj2S 2026-10-30 15/750 2026-11-01 16:52 by BCdvBAEpt3zm
[考博] 售SCI一区T0P文章,我:8.O.55.1.O.5.4,科目全,可+急 +5 X5bHxOULxFqb 2026-10-30 22/1100 2026-11-01 16:35 by BCdvBAEpt3zm
[考博] 售SCI一区T0P文章,我:8.O.55.1.O.5.4,科目全,可+急 +3 hKe7U1kad5Sg 2026-10-31 7/350 2026-11-01 15:08 by BCdvBAEpt3zm
[基金申请] 售SCI一区T0P文章,我:8.O.55.1.O54,科目全,可伽急 +3 xvJS1BYDxvBS 2026-10-31 3/150 2026-11-01 12:53 by BCdvBAEpt3zm
[考研] 售SCI一区T0P文章,我:8.O.55.1.O.5.4,科目全,可+急 +3 xvJS1BYDxvBS 2026-10-31 5/250 2026-11-01 12:51 by BCdvBAEpt3zm
[公派出国] 售SCI文章,我:8O5.5.1.O.54,科目齐全,可+急 +4 1uaZt2kAZj2S 2026-10-31 7/350 2026-11-01 12:40 by BCdvBAEpt3zm
[考博] 售SCI一区文章,我:8.O.55.1.O.54,科目齐全,可伽急 +3 xvJS1BYDxvBS 2026-10-31 4/200 2026-11-01 11:01 by BCdvBAEpt3zm
[论文投稿] 售SCI文章,我:8O.5.5.1O.54,科目全,可十急 +5 X5bHxOULxFqb 2026-10-30 26/1300 2026-11-01 10:22 by BCdvBAEpt3zm
[考博] 2027博士申请-临床检验诊断学、病原生物学、微生物方向 50+3 yyh@ 2026-10-28 4/200 2026-10-31 12:47 by 可淡不可忘
信息提示
请填处理意见