| 查看: 1073 | 回复: 1 | ||
[求助]
udf曳力相关问题求教。
|
|
写了一个曳力的UDF,但是开始计算就发现问题了。 同样的模型,加入了UDF(wen yu曳力系数)之后计算出错。利用自带的计算就没有问题 # Divergence detected in AMG solver: mp-x-momentum -> Decreasing coarsening group size! # Divergence detected in AMG solver: mp-x-momentum -> Increasing relaxation sweeps! # Divergence detected in AMG solver: pressure correction -> Turning off correction scaling! # Divergence detected in AMG solver: pressure correction -> Increasing relaxation sweeps! udf 如下: #include "udf.h" #define diam2 9.e-2 DEFINE_EXCHANGE_PROPERTY(LS_drag, cell, mix_thread, s_col, l_col) { Thread *thread_l, *thread_s; thread_l = THREAD_SUB_THREAD(mix_thread, l_col); thread_s = THREAD_SUB_THREAD(mix_thread, s_col); real abs_v, slip_x, slip_y, slip_z; real rho_l, mu_l, reyp, void_s, void_l, f_drag, k_l_s; slip_x = C_U(cell, thread_l) - C_U(cell, thread_s); slip_y = C_V(cell, thread_l) - C_V(cell, thread_s); slip_z = C_W(cell, thread_l) - C_W(cell, thread_s); rho_l = C_R(cell, thread_l); mu_l = C_MU_L(cell, thread_l); void_s = C_VOF(cell, thread_s); void_l = C_VOF(cell, thread_l); abs_v = sqrt(slip_x*slip_x + slip_y*slip_y + slip_z*slip_z); reyp = rho_l*abs_v*diam2/mu_l; f_drag = (reyp <= 1000) ? (24.0*(1.0 + 0.15*pow(reyp, 0.687))/reyp) :0.44; k_l_s = 0.75*rho_l*void_s*f_drag*abs_v/diam2; return k_l_s; } 其中换算了单位,所以颗粒的直径单位是mm。 |
» 猜你喜欢
【复旦大学】二维材料方向招收2026年博士研究生1名
已经有0人回复
北京纳米能源与系统研究所 王中林院士/曹南颖研究员课题组2026级硕/博/博后招生
已经有10人回复
物理学I论文润色/翻译怎么收费?
已经有50人回复
荷兰Utrecht University超快太赫兹光谱王海教授课题招收2026 CSC博士生
已经有23人回复
反铁磁体中的磁性切换:两种不同的机制已成功可视化
已经有0人回复
求标准粉末衍射卡号 ICDD 01-076-1802
已经有0人回复
新西兰Robinson研究所招收全奖PhD
已经有0人回复
石墨烯转移--二氧化硅衬底石墨烯
已经有0人回复
2楼2017-09-26 19:16:32













回复此楼