| 查看: 1371 | 回复: 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; } |
» 猜你喜欢
过年走亲戚时感受到了所开私家车的鄙视链
已经有10人回复
今年春晚有几个节目很不错,点赞!
已经有12人回复
情人节自我反思:在爱情中有过遗憾吗?
已经有13人回复
体制内长辈说体制内绝大部分一辈子在底层,如同你们一样大部分普通教师忙且收入低
已经有12人回复
基金正文30页指的是报告正文还是整个申请书
已经有5人回复
找到一些相关的精华帖子,希望有用哦~
关于DPM模型模拟液滴的若干问题
已经有16人回复
Fluent中DPM模型的UDF中使用P_POS()指针,然后给我提示undeclared variable 怎么办?
已经有6人回复
Fluent的UDF是否可以自定义辐射模型或湍流模型
已经有11人回复
两相流欧拉模型模拟气液分层流动,第二相diameter如何确定
已经有10人回复
请问液固流化床内固体物料的初始流化速度与物料的初始堆积高度是否有关?
已经有22人回复
udf在非host节点下并行计算message
已经有11人回复
fluent 中二维模型中,材料属性随着温度变化的udf源代码?
已经有14人回复
单机多核并行计算下UDF的问题
已经有9人回复
Fluent模拟流化床两相颗粒之间的曳力系数选择
已经有11人回复
fluent计算多相流问题时,UDF能否提取单元内分相速度,以及单元平均速度
已经有5人回复
fluent 的混合模型中granular如何设置
已经有5人回复
欧拉双流体模型中如何模拟出布风板?
已经有10人回复
UDF 改为并行计算
已经有9人回复
vof模型算气液两相逆流 使用udf加动量源项 碰到问题 请高手解答
已经有14人回复
运用离散相模型模拟气固两相中如何添加颗粒的相关受力
已经有16人回复
曳力函数的的UDF
已经有15人回复
流化床曳力系数UDF
已经有9人回复
udf中的平方怎么写
已经有5人回复
fluent中如何编写风剖面的UDF
已经有6人回复
udf 重力方向变化
已经有17人回复
【求助】请问fluent能模拟超重力的情况吗?
已经有4人回复
【求助】UDF气体的密度
已经有10人回复
【求助】fluent计算中,udf编译通过,初始化出错
已经有11人回复
【求助】如何改变Fluent中的曳力模型(UDF)
已经有12人回复
科研从小木虫开始,人人为我,我为人人













回复此楼
点击这里搜索更多相关资源