24小时热门版块排行榜    

Znn3bq.jpeg
查看: 1555  |  回复: 4
当前只显示满足指定条件的回帖,点击这里查看本话题的所有回帖

guoli8832700

新虫 (初入文坛)

[求助] 求各位fluent大神,UDF曳力问题,帮帮忙,感激不尽。。。 已有1人参与

书上看到的一个流化床模拟,代码我能看懂,但是为什么要用两个气固交换系数,书上是气相选择的custom_drag_syam,固相选择custom_drag_ihme。还有一个问题,第一个用的是syamlal-o’brien模型,但是第二个我查了下,不是常用的几个模型啊,没搞懂,书上也没说。大神帮忙看下,非常感谢。。。。
其中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的回帖

ZxrzxR0508

新虫 (初入文坛)

楼主在哪看到的这个啊
3楼2018-03-06 15:33:12
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
查看全部 5 个回答

liubao2012

木虫 (小有名气)

同问啊  这个问题还没解决吗?小弟也刚入门学udf,也碰到了这个问题,楼主知道原因了吗?

发自小木虫Android客户端
2楼2016-01-01 01:45:11
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

2017kaixin

新虫 (初入文坛)

楼主问题解决了没,求指教啊
4楼2018-04-17 10:52:23
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

jiajinghua

铁虫 (小有名气)

【答案】应助回帖

可以看看UDF帮助文档里边的事列
资源共享,共同进步
5楼2018-04-18 09:07:08
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
最具人气热帖推荐 [查看全部] 作者 回/看 最后发表
[考研] 中药学调剂 初试324 +3 洋甘菊、 2026-04-10 5/250 2026-04-10 23:59 by 洋甘菊、
[考研] 生物学调剂 +3 小冉要努力 2026-04-10 4/200 2026-04-10 22:25 by plum
[考研] 0703化学 +32 妮妮ninicgb 2026-04-04 37/1850 2026-04-10 22:18 by bljnqdcc
[考研] 309求调剂 +14 wdhw 2026-04-10 15/750 2026-04-10 21:06 by zhouxiaoyu
[考研] 一志愿矿大,材料工程专硕314分,0856可调都可以 +15 无懈可击的巨人 2026-04-09 15/750 2026-04-10 18:10 by hmn_wj
[考研] 266求调剂 +29 阳阳哇塞 2026-04-07 29/1450 2026-04-10 16:20 by 高维春
[基金申请] 有爆料,一个青年教师卖房得400万,然后换了一个四青帽子 +9 babu2015 2026-04-08 9/450 2026-04-10 11:43 by 苏东坡二世
[考研] 本科郑州大学,一志愿华东师范大学282求调剂 +23 熊哥xtk 2026-04-07 26/1300 2026-04-09 17:17 by 18446523
[考研] 材料工程调剂 +12 小刘同学吖吖 2026-04-06 13/650 2026-04-09 17:07 by luoyongfeng
[考研] 材料专硕322 +14 哈哈哈吼吼吼哈 2026-04-05 14/700 2026-04-09 13:25 by 5268321
[考研] 288求调剂 +15 没有答案_ 2026-04-05 15/750 2026-04-09 10:22 by 5268321
[考研] 285求调剂 +12 AZMK 2026-04-05 18/900 2026-04-08 20:43 by 逆水乘风
[考研] 298求调剂 +4 残荷新柳 2026-04-07 4/200 2026-04-07 23:02 by lbsjt
[考研] 304求调剂(085602,过四级,一志愿985) +25 化工人999 2026-04-04 26/1300 2026-04-07 22:06 by hemengdong
[考研] 081700,311,求调剂 +17 冬十三 2026-04-04 18/900 2026-04-07 12:50 by Sammy2
[考研] 297分083200求助 +9 aekx 2026-04-05 9/450 2026-04-06 20:57 by flysky1234
[考研] 求助 +3 卡卡东88 2026-04-06 4/200 2026-04-06 15:28 by going home
[考研] 考研调剂 +5 美丽的youth_ 2026-04-04 6/300 2026-04-06 06:57 by houyaoxu
[考研] 考研调剂 +11 小sun要好运 2026-04-04 11/550 2026-04-05 08:02 by qlm5820
[考研] 复试调剂 +6 范根培 2026-04-04 6/300 2026-04-04 14:27 by 土木硕士招生
信息提示
请填处理意见