| 5 | 1/1 | 返回列表 |
| 查看: 1661 | 回復(fù): 6 | ||
| 當(dāng)前只顯示滿足指定條件的回帖,點(diǎn)擊這里查看本話題的所有回帖 | ||
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)行成功。 請(qǐng)教各位大神,這個(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" ;} |
新蟲 (初入文壇)
新蟲 (初入文壇)
新蟲 (初入文壇)
| 最具人氣熱帖推薦 [查看全部] | 作者 | 回/看 | 最后發(fā)表 | |
|---|---|---|---|---|
|
[考研] 080500-315分復(fù)試調(diào)劑 +9 | 上岸3821 2026-03-31 | 9/450 |
|
|---|---|---|---|---|
|
[考研] 生醫(yī)工0831調(diào)劑求推薦 +4 | 小熊睿睿_s 2026-03-27 | 6/300 |
|
|
[考研] 086000生物與醫(yī)藥 初試274求調(diào)劑 +4 | 小叮當(dāng)來了 2026-03-30 | 4/200 |
|
|
[考研] 一志愿西交大080500材料學(xué)碩349 +5 | jqx1258 2026-03-31 | 6/300 |
|
|
[考研]
|
小羊36 2026-03-30 | 4/200 |
|
|
[考研] 一志愿中國科學(xué)院大學(xué)265求調(diào)劑 +6 | 恬淡ye 2026-03-31 | 7/350 |
|
|
[考研] 313求調(diào)劑 +6 | 賣個(gè)關(guān)子吧 2026-03-31 | 6/300 |
|
|
[考研] 材料與化工304求B區(qū)調(diào)劑 +4 | 邱gl 2026-03-26 | 7/350 |
|
|
[考研] 329求調(diào)劑 +10 | 鈕恩雪 2026-03-25 | 10/500 |
|
|
[考研] 一志愿北京理工大學(xué)本科211材料工程294求調(diào)劑 +8 | mikasa的圍巾 2026-03-28 | 8/400 |
|
|
[考研] 332求92調(diào)劑 +8 | 蕉蕉123 2026-03-28 | 8/400 |
|
|
[考研] 279求調(diào)劑 +4 | 蝶舞輕繞 2026-03-29 | 4/200 |
|
|
[考研] 數(shù)一英一271專碩(085401)求調(diào)劑,可跨 +7 | 前行必有光 2026-03-28 | 8/400 |
|
|
[考研] 一志愿南京航空航天大學(xué)材料學(xué)碩求調(diào)劑 +3 | @taotao 2026-03-28 | 3/150 |
|
|
[考研] 266求調(diào)劑 +11 | 陽陽哇塞 2026-03-27 | 12/600 |
|
|
[考研] 266分求材料化工冶金礦業(yè)等專業(yè)的調(diào)劑 +4 | 哇呼哼呼哼 2026-03-26 | 4/200 |
|
|
[考研] 調(diào)劑求收留 +7 | 果然有我 2026-03-26 | 7/350 |
|
|
[考研] 281求調(diào)劑 +6 | Koxui 2026-03-24 | 7/350 |
|
|
[考研] 296求調(diào)劑 +4 | 汪?! 2026-03-25 | 7/350 |
|
|
[考研] 各位老師您好:本人初試372分 +5 | jj涌77 2026-03-25 | 6/300 |
|