| 1 | 1/1 | 返回列表 |
| 查看: 1377 | 回復: 0 | ||
yangshuaibyx金蟲 (小有名氣)
|
[求助]
曳力模型阻力系數(shù)的UDF
|
|
氣固兩相流數(shù)值模擬時fluent 中曳力模型的自定義UDF程序文件中有兩個模型,阻力系數(shù)調用函數(shù)時需要調用這兩個曳力模型嗎?還是只調用一個就行 /* 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; } |
找到一些相關的精華帖子,希望有用哦~
| 1 | 1/1 | 返回列表 |
| 最具人氣熱帖推薦 [查看全部] | 作者 | 回/看 | 最后發(fā)表 | |
|---|---|---|---|---|
|
[考研] 304求調劑 +6 | 司空. 2026-03-18 | 6/300 |
|
|---|---|---|---|---|
|
[考研] 330求調劑 +3 | 小材化本科 2026-03-18 | 3/150 |
|
|
[考研] 一志愿中海洋材料工程專碩330分求調劑 +5 | 小材化本科 2026-03-18 | 5/250 |
|
|
[考研] 能源材料化學課題組招收碩士研究生8-10名 +4 | 脫穎而出 2026-03-16 | 10/500 |
|
|
[考研] 0703化學調劑 +7 | 妮妮ninicgb 2026-03-15 | 11/550 |
|
|
[考研] 一志愿中國海洋大學,生物學,301分,求調劑 +4 | 1孫悟空 2026-03-17 | 4/200 |
|
|
[考研] 化學工程321分求調劑 +15 | 大米飯! 2026-03-15 | 18/900 |
|
|
[考研] 298-一志愿中國農(nóng)業(yè)大學-求調劑 +7 | 手機用戶 2026-03-17 | 7/350 |
|
|
[考研] 293求調劑 +11 | zjl的號 2026-03-16 | 16/800 |
|
|
[基金申請] 被我言中:新模板不強調格式了,假專家開始管格式了 +4 | beefly 2026-03-14 | 4/200 |
|
|
[考研] 278求調劑 +3 | Yy7400 2026-03-13 | 3/150 |
|
|
[考研] 304求調劑 +5 | 素年祭語 2026-03-15 | 5/250 |
|
|
[考研] 283求調劑 +10 | 小樓。 2026-03-12 | 14/700 |
|
|
[考博] 東華理工大學化材專業(yè)26屆碩士博士申請 +6 | zlingli 2026-03-13 | 6/300 |
|
|
[考研] 復試調劑 +3 | 呼呼?~+123456 2026-03-14 | 3/150 |
|
|
[考研] [0860]321分求調劑,ab區(qū)皆可 +4 | 寶貴熱 2026-03-13 | 4/200 |
|
|
[考研] 304求調劑 +7 | 7712b 2026-03-13 | 7/350 |
|
|
[考研] 工科278分求調劑 +5 | 周慢熱啊 2026-03-12 | 7/350 |
|
|
[考研] 材料301分求調劑 +5 | Liyouyumairs 2026-03-12 | 5/250 |
|
|
[考研] 070303一志愿西北大學學碩310找調劑 +3 | d如愿上岸 2026-03-13 | 3/150 |
|