| 5 | 1/1 | 返回列表 |
| 查看: 1660 | 回復(fù): 6 | ||
| 當(dāng)前只顯示滿足指定條件的回帖,點擊這里查看本話題的所有回帖 | ||
tianya1995新蟲 (初入文壇)
|
[求助]
fluent 運行出現(xiàn)segmentation fault錯誤,udf的adjust函數(shù)出錯! 已有1人參與
|
|
|
在solution initialization的時候,發(fā)現(xiàn)define_Init運行成功了,因為函數(shù)的開始和結(jié)尾分別都輸出了“init begins"和”init ends" ,這是自己用message輸出的。 但是運行整個udf還是出現(xiàn)了,segmentation fault的錯誤,是define_adjust出現(xiàn)了錯誤。以下為define_adjust函數(shù),發(fā)現(xiàn)窗口能輸出e_c的值,和輸出adjust running begins的提示,但沒有輸出adjust running ends的提示。 所以認(rèn)為該函數(shù)并沒有運行成功。 請教各位大神,這個到底是什么原因啊,函數(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ā)表 | |
|---|---|---|---|---|
|
[有機交流] 考研調(diào)劑 +8 | watb 2026-03-26 | 8/400 |
|
|---|---|---|---|---|
|
[考研] 0703 化學(xué) 求調(diào)劑,一志愿山東大學(xué) 342 分 +7 | Shern—- 2026-03-28 | 7/350 |
|
|
[考研] 329求調(diào)劑,一志愿西北工業(yè)大學(xué),材料工程(085601) +5 | 小小機靈蟲 2026-03-29 | 11/550 |
|
|
[考研] 071010 323 分求調(diào)劑 +3 | Baekzhy 2026-03-27 | 3/150 |
|
|
[基金申請] 面上5B能上會嗎? +7 | redcom 2026-03-29 | 7/350 |
|
|
[考研] 總分293求調(diào)劑 +8 | 加一一九 2026-03-25 | 11/550 |
|
|
[考研] 一志愿雙一流機械285分求調(diào)劑 +4 | 幸運的三木 2026-03-29 | 5/250 |
|
|
[考研] 327求調(diào)劑 +6 | 汲亦昊 2026-03-29 | 6/300 |
|
|
[考研] 340求調(diào)劑 +6 | Amber00 2026-03-26 | 6/300 |
|
|
[考研] 085602 化工專碩 338分 求調(diào)劑 +12 | 路癡小琪 2026-03-27 | 12/600 |
|
|
[考研] 求調(diào)劑 +6 | 蘆lty 2026-03-25 | 7/350 |
|
|
[考研] 調(diào)劑 +3 | 好好讀書。 2026-03-28 | 3/150 |
|
|
[考研] 08開頭275求調(diào)劑 +4 | 拉誰不重要 2026-03-26 | 4/200 |
|
|
[考研] 298調(diào)劑 +3 | jiyingjie123 2026-03-27 | 3/150 |
|
|
[考研] 314求調(diào)劑 +3 | 溪云珂 2026-03-26 | 3/150 |
|
|
[考研] 考研調(diào)劑 +9 | 小蠟新筆 2026-03-26 | 9/450 |
|
|
[考研] 材料求調(diào)劑 +5 | .m.. 2026-03-25 | 5/250 |
|
|
[考研] 081200-11408-276學(xué)碩求調(diào)劑 +3 | 崔wj 2026-03-26 | 3/150 |
|
|
[考研] 機械學(xué)碩310分,數(shù)一英一,一志愿211本科雙非找調(diào)劑信息 +3 | @357 2026-03-25 | 3/150 |
|
|
[考研] 080500求調(diào)劑 +3 | zzzzfan 2026-03-24 | 3/150 |
|