| 5 | 1/1 | 返回列表 |
| 查看: 4267 | 回復(fù): 11 | ||||
| 當(dāng)前只顯示滿足指定條件的回帖,點(diǎn)擊這里查看本話題的所有回帖 | ||||
塵積銀蟲 (小有名氣)
|
[交流]
【求助】fluent計算中,udf編譯通過,初始化出錯 已有2人參與
|
|||
|
麻煩達(dá)人老兄們救急,這個程序是用來定義出口處的壓力的,編譯成功,但是在邊界條件里選中此UDF后,在初始化時報錯,不知是何緣故,請各位不吝賜教,拜謝! 程序?yàn)椋?include "udf.h" DEFINE_PROFILE(pressure_outlet,thread,position) { real x[ND_ND]; real y; real a; face_t f; cell_t c; begin_f_loop(f,thread) { F_CENTROID(x,f,thread); y=x[1]; a=F_U(f,thread); F_PROFILE(f,thread,position)=1000*9.81*(1-y/1000)-0.5*1000*a*a; } end_f_loop(f,thread) } 錯誤提示為: Error: FLUENT received fatal signal (ACCESS_VIOLATION) 1. Note exact events leading to error. 2. Save case/data under new name. 3. Exit program and restart to continue. 4. Report error to your distributor. Error Object: () |
多相流UDF |
銀蟲 (小有名氣)
|
試了一下編輯可以通過:程序應(yīng)該為 #include "udf.h" DEFINE_PROFILE(pressure_outlet,thread,position) { real x[ND_ND]; real y; real a; face_t f; begin_f_loop(f,thread) { F_CENTROID(x,f,thread); y=x[1]; a=F_U(f,thread); F_PROFILE(f,thread,position)=1000.*9.81*(1-y/1000.)-0.5*1000.*a*a; } end_f_loop(f,thread) } |
新蟲 (初入文壇)
|
我也遇到了這情況啊!lz大哥你就絕了沒有,我是自定義的密度和粘度,編譯沒問題,初始化通不過,附上我的程序,求指導(dǎo)~ #include "udf.h" #define TC 305.25 #define PC 7380000 #define W 0.225 #define R 8.314 #define tc 305.25 #define pc 7375000 #define w 0.225 #define r 8.314 #define pc1 73.75 #define dc 468 #define m 44.01 #define v0 150 DEFINE_PROPERTY(cell_density, cell, thread) { real dd; real temp = C_T(cell, thread); real pres = C_P(cell, thread); real tr,k,a1,a2,a,b,a3,a4,a5,a6,b1,b2,b3,y1,y2,y3,x; tr = temp/TC; k = 0.37464+1.54226*W-0.26992*W*W; a1 = (1+k*(1-sqrt(tr)))*(1+k*(1-sqrt(tr))); a2 = 0.45724*R*R*TC*TC/PC; a = a1*a2; b=0.0778*R*TC/PC; a3=pres; a4=pres*b-R*temp; a5=a-3*pres*b*b-2*R*temp*b; a6=pres*b*b*b+R*temp*b*b-a*b; b1 = a4*a4-3*a3*a5; b2 = a4*a5-9*a3*a6; b3 = a5*a5-3*a4*a6; y1 = b1*a4+3*a3*(-b2+sqrt(b2*b2-4*b1*b3))/2; y2 = b1*a4+3*a3*(-b2-sqrt(b2*b2-4*b1*b3))/2; if (y1<0) {y3=-y1;} else {y3=y1;} x = (-a4-(pow(y3,0.33333)-pow(-y2,0.33333)))/(3*a3); dd =44/(1000*x); return dd; } DEFINE_PROPERTY(cell_viscosity, cell, thread) { real v; real temp = C_T(cell, thread); real pres = C_P(cell, thread); real tr,k,a1,a2,a,b,a3,a4,a5,a6,b1,b2,b3,y1,y2,y3,x,dd,b4,b5,dr; tr=temp/tc; k=0.37464+1.54226*w-0.26992*w*w; a1=(1+k*(1-sqrt(tr)))*(1+k*(1-sqrt(tr))); a2=0.45724*r*r*tc*tc/pc; a=a1*a2; b=0.0778*r*tc/pc; a3=pres; a4=pres*b-r*temp; a5=a-3*pres*b*b-2*r*temp*b; a6=pres*b*b*b+r*temp*b*b-a*b; b1=a4*a4-3*a3*a5; b2=a4*a5-9*a3*a6; b3=a5*a5-3*a4*a6; y1=b1*a4+3*a3*(-b2+sqrt(b2*b2-4*b1*b3))/2; y2=b1*a4+3*a3*(-b2-sqrt(b2*b2-4*b1*b3))/2; if (y1<0) {y3=-y1;} else {y3=y1;} x=(-a4-(pow(y3,0.333333)-pow(-y2,0.333333)))/(3*a3); dd=44/(1000*x); b4=pow(tc,0.166666)/(sqrt(m)*pow(pc1,0.666666)); dr=dd/dc; b5=1.0230+0.23364*dr+0.058533*pow(dr,2)-0.40758*(dr,3)+0.093324*pow(dr,4); v=(((pow(b5,4)-1)/b4)+v0)*0.000001; return v; } 錯誤提示: Error: FLUENT received fatal signal (ACCESS_VIOLATION) 1. Note exact events leading to error. 2. Save case/data under new name. 3. Exit program and restart to continue. 4. Report error to your distributor. Error Object: () |
| 最具人氣熱帖推薦 [查看全部] | 作者 | 回/看 | 最后發(fā)表 | |
|---|---|---|---|---|
|
[論文投稿]
chinese chemical letters英文版投稿求助
120+4
|
Yishengeryi 2026-03-30 | 6/300 |
|
|---|---|---|---|---|
|
[考研] 302求調(diào)劑一志愿華中師范大學(xué) +5 | 小江小江江江 2026-04-02 | 5/250 |
|
|
[考研] 085600,320分求調(diào)劑 +5 | 大饞小子 2026-04-02 | 5/250 |
|
|
[考研] 一志愿同濟(jì)大學(xué)323分(080500)求調(diào)劑 +6 | yikeniu 2026-04-01 | 6/300 |
|
|
[考研] 282求調(diào)劑 +13 | 呼吸都是減肥 2026-04-01 | 13/650 |
|
|
[基金申請] esi高被引論文是不是能對中標(biāo)有所加分和幫助呢 +4 | redcom 2026-04-01 | 4/200 |
|
|
[考研]
|
廈大化工 2026-04-01 | 5/250 |
|
|
[考研] 化學(xué)工程專碩324分,一志愿中國礦業(yè)大學(xué)求調(diào)劑 +7 | 耿耿1314 2026-04-01 | 7/350 |
|
|
[考研] 材料調(diào)劑 +12 | 一樣YWY 2026-04-01 | 12/600 |
|
|
[考研] 070300一志愿211,312分求調(diào)劑院校 +14 | 小黃鴨寶 2026-03-30 | 14/700 |
|
|
[考研] 085600,321分求調(diào)劑 +13 | 大饞小子 2026-03-31 | 13/650 |
|
|
[考研] 材料調(diào)劑 +11 | 一樣YWY 2026-03-31 | 11/550 |
|
|
[考研] 08工科,295,接受跨專業(yè)調(diào)劑 +6 | lmnlzy 2026-03-31 | 6/300 |
|
|
[考研] 土木304求調(diào)劑 +3 | 兔突突突, 2026-03-31 | 3/150 |
|
|
[考研] 一志愿西交大080500材料學(xué)碩349 +6 | jqx1258 2026-03-31 | 7/350 |
|
|
[考研] 調(diào)劑求院校招收 +7 | 鶴鯨鴿 2026-03-28 | 7/350 |
|
|
[考研] 福建理工大學(xué)材料學(xué)院先進(jìn)合金團(tuán)隊招收考研調(diào)劑學(xué)生 +3 | 大華金商都 2026-03-30 | 4/200 |
|
|
[考研] 083000環(huán)境科學(xué)與工程調(diào)劑,總分281 +4 | 橙子(勝意) 2026-03-30 | 4/200 |
|
|
[考研] 086000生物與醫(yī)藥調(diào)劑 +5 | Feisty。 2026-03-28 | 9/450 |
|
|
[考研] 085600,專業(yè)課化工原理,321分求調(diào)劑 +5 | 大饞小子 2026-03-28 | 5/250 |
|