| 7 | 1/1 | 返回列表 |
| 查看: 1648 | 回復(fù): 6 | ||
tianya1995新蟲 (初入文壇)
|
[求助]
fluent 運(yùn)行出現(xiàn)segmentation fault錯(cuò)誤,udf的adjust函數(shù)出錯(cuò)! 已有1人參與
|
|
在solution initialization的時(shí)候,發(fā)現(xiàn)define_Init運(yùn)行成功了,因?yàn)楹瘮?shù)的開始和結(jié)尾分別都輸出了“init begins"和”init ends" ,這是自己用message輸出的。 但是運(yùn)行整個(gè)udf還是出現(xiàn)了,segmentation fault的錯(cuò)誤,是define_adjust出現(xiàn)了錯(cuò)誤。以下為define_adjust函數(shù),發(fā)現(xiàn)窗口能輸出e_c的值,和輸出adjust running begins的提示,但沒有輸出adjust running ends的提示。 所以認(rèn)為該函數(shù)并沒有運(yùn)行成功。 請教各位大神,這個(gè)到底是什么原因啊,函數(shù)的編寫是哪里有誤嗎,編譯都完全通過了的。 DEFINE_ADJUST(f1,d) { real x[ND_ND]; real xx; real rr; real e_c; real temp=C_T(c,t); if(temp<=6667) e_c=0.0; else if(temp>6667&&temp<=25000) e_c=0.6873*temp-4582.13; else if(temp>25000&&temp<=30000) e_c=(-0.1)*temp+15100; Message("%g\n",e_c ); Message("adjust running begins\n" ;thread_loop_c(t,d) { begin_c_loop_all(c,t) { C_UDMI(c,t,ec)=e_c; C_UDMI(c,t,Tx)=C_T_G(c,t)[0]; C_UDMI(c,t,Tr)=C_T_G(c,t)[1]; C_UDMI(c,t,jx)=-C_UDMI(c,t,ec)*C_UDSI_G(c,t,Fai)[0]; C_UDMI(c,t,jr)=-C_UDMI(c,t,ec)*C_UDSI_G(c,t,Fai)[1]; C_UDMI(c,t,B_0)=C_UDSI_G(c,t,Ar)[0]-C_UDSI_G(c,t,Ax)[1]; C_CENTROID(x,c,t); xx=x[0]; rr=x[1]; C_UDMI(c,t,s_Ar)=-miu_0*C_UDMI(c,t,jr)+C_UDSI(c,t,Ar)/rr/rr; } end_c_loop_all(c,t) } Message("adjust running ends\n" ;} |
新蟲 (初入文壇)
新蟲 (初入文壇)
新蟲 (初入文壇)
新蟲 (初入文壇)
| 7 | 1/1 | 返回列表 |
| 最具人氣熱帖推薦 [查看全部] | 作者 | 回/看 | 最后發(fā)表 | |
|---|---|---|---|---|
|
[考研] 生物學(xué)學(xué)碩求調(diào)劑 +4 | 小羊睡著了? 2026-03-23 | 4/200 |
|
|---|---|---|---|---|
|
[考研] 265求調(diào)劑 +10 | 梁梁校校 2026-03-17 | 10/500 |
|
|
[考研] 335分 | 材料與化工專碩 | GPA 4.07 | 有科研經(jīng)歷 +3 | cccchenso 2026-03-23 | 3/150 |
|
|
[考研] 接收2026碩士調(diào)劑(學(xué)碩+專碩) +4 | allen-yin 2026-03-23 | 6/300 |
|
|
[考研]
|
酥酥魚.. 2026-03-21 | 4/200 |
|
|
[考研] 323求調(diào)劑 +6 | 洼小桶 2026-03-18 | 6/300 |
|
|
[考研] 293求調(diào)劑 +3 | 濤濤Wjt 2026-03-22 | 5/250 |
|
|
[考研] 求調(diào)劑一志愿海大,0703化學(xué)學(xué)碩304分,有大創(chuàng)項(xiàng)目,四級已過 +6 | 幸運(yùn)哩哩 2026-03-22 | 10/500 |
|
|
[考研] 一志愿北京化工大學(xué)070300 學(xué)碩336求調(diào)劑 +5 | vv迷 2026-03-21 | 8/400 |
|
|
[考研] 考研調(diào)劑 +4 | 來好運(yùn)來來來 2026-03-21 | 4/200 |
|
|
[考研] 085600材料與化工306 +4 | z1z2z3879 2026-03-21 | 4/200 |
|
|
[考研] 286求調(diào)劑 +10 | Faune 2026-03-21 | 10/500 |
|
|
[考研]
|
Grand777 2026-03-21 | 3/150 |
|
|
[考研] 0703化學(xué)297求調(diào)劑 +3 | Daisy☆ 2026-03-20 | 3/150 |
|
|
[考研] 22 350 本科985求調(diào)劑,求老登收留 +3 | 李軼男003 2026-03-20 | 3/150 |
|
|
[考研] 085700資源與環(huán)境308求調(diào)劑 +12 | 墨墨漠 2026-03-18 | 13/650 |
|
|
[考研] 086500 325 求調(diào)劑 +3 | 領(lǐng)帶小熊 2026-03-19 | 3/150 |
|
|
[考研] 0856調(diào)劑,是學(xué)校就去 +8 | sllhht 2026-03-19 | 9/450 |
|
|
[考研] 一志愿中國海洋大學(xué),生物學(xué),301分,求調(diào)劑 +5 | 1孫悟空 2026-03-17 | 6/300 |
|
|
[考研] 0703化學(xué)調(diào)劑 +3 | 妮妮ninicgb 2026-03-17 | 3/150 |
|