| 5 | 1/1 | 返回列表 |
| 查看: 896 | 回復: 5 | ||
| 當前只顯示滿足指定條件的回帖,點擊這里查看本話題的所有回帖 | ||
[求助]
udf編譯錯誤
|
||
|
這是源代碼: /*************************************************************** UDF for customizing the default Syamlal drag law in Fluent ****************************************************************/ #include "udf.h" #define pi 4.*atan(1.) #define diam2 3.e-4 DEFINE_EXCHANGE_PROPERTY(custom_drag3,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) */ 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); rho_g = C_R(cell, thread_g); rho_s = C_R(cell, thread_s); mu_g = C_MU_L(cell, thread_g); /*compute slip*/ slip_x = x_vel_g - x_vel_s; slip_y = y_vel_g - y_vel_s; abs_v = sqrt(slip_x*slip_x + slip_y*slip_y); /*compute Reynold's 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; } 單機四核并行計算編譯時提示錯誤:error:C compiler cannot execute cpp-I“c:\fluent.inc\...", 這種情況改怎么修改呢 |



| 最具人氣熱帖推薦 [查看全部] | 作者 | 回/看 | 最后發(fā)表 | |
|---|---|---|---|---|
|
[考研] 298求調劑 +4 | 什么是胖頭魚 2026-03-30 | 6/300 |
|
|---|---|---|---|---|
|
[考研] 342求調劑 +12 | Mary Keen 2026-03-28 | 13/650 |
|
|
[考研] 化學308分調劑 +13 | 你好明天你好 2026-03-30 | 14/700 |
|
|
[考研] 0703化學/290求調劑/本科經歷豐富/工科也可 +14 | 丹青奶蓋 2026-03-26 | 16/800 |
|
|
[考研] 一志愿同濟大學323分(080500)求調劑 +4 | yikeniu 2026-04-01 | 4/200 |
|
|
[考研] 311求調劑一志愿合肥工業(yè)大學 +14 | 秋二十二 2026-03-30 | 14/700 |
|
|
[考研] 材料專業(yè)求調劑 +7 | 月月鳥木 2026-04-01 | 7/350 |
|
|
[考研] 求調劑,一志愿北林食品與營養(yǎng)095500,301分,已過六級,有科研經歷 +4 | 快樂儲蓄罐 2026-03-31 | 4/200 |
|
|
[考研] 求調劑:一志愿:南京大學 專業(yè):0705 總分320 ,本科985,四六級已過 +3 | lfy760306 2026-03-31 | 3/150 |
|
|
[考研] 352分-085602-一志愿985 +6 | 海納百川Ly 2026-03-29 | 6/300 |
|
|
[考研] 085601 329分調劑 +6 | yzsa12 2026-03-31 | 6/300 |
|
|
[考研] 求調劑 +8 | 11ggg 2026-03-30 | 8/400 |
|
|
[考研] 266求調劑 +3 | 哇呼哼呼哼 2026-03-29 | 3/150 |
|
|
[考研]
|
Gymno 2026-03-30 | 6/300 |
|
|
[考研] 342求調劑 +4 | 加油a李zs 2026-03-26 | 4/200 |
|
|
[考研] 材料與化工304求B區(qū)調劑 +4 | 邱gl 2026-03-26 | 7/350 |
|
|
[考研] 340求調劑 +6 | Amber00 2026-03-26 | 6/300 |
|
|
[考研] 081200-314 +3 | LILIQQ 2026-03-27 | 4/200 |
|
|
[考研] 070300化學求調劑 +4 | 起個名咋這么難 2026-03-27 | 4/200 |
|
|
[考研] 266求調劑 +11 | 陽陽哇塞 2026-03-27 | 12/600 |
|