| 查看: 1109 | 回复: 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。 |
» 猜你喜欢
0702一志愿吉大B区求调剂 本科期间发表一篇Sci
已经有2人回复
070200求调剂,一志愿某211,288分
已经有18人回复
物理学I论文润色/翻译怎么收费?
已经有222人回复
法国博士后职位
已经有0人回复
重庆交大26年硕士生招生拟调剂通知已出!欢迎加入机器视觉与3D光学成像课题组。
已经有0人回复
**
已经有1人回复
0702一志愿吉大B区求调剂 本科期间发表一篇Sci
已经有3人回复
基底STO,薄膜SRO,XRD里面的振荡,是laue震荡还是kiessig振荡? 怎么判断?
已经有0人回复
B区学生调剂-兰州交通大学材料科学与工程学院
已经有1人回复
2楼2017-09-26 19:16:32














回复此楼