| 查看: 1669 | 回復: 16 | |||
xiaoguai3新蟲 (初入文壇)
|
[求助]
新手求教UDF問題~
|
|
能解釋,但一添加到邊界或初始化就報錯。 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如下,二維模型,簡單的固體傳熱問題,想在模擬過程的同時累加整個固體區(qū)域的所有得熱量,達到一定值后改變熱流邊界值。由于剛接觸UDF不久,不知道問題出在何處。請指教!d= Get_Domain(1);這個語句有問題嗎? #include "udf.h" real Q_tot=0; DEFINE_PROFILE (unsteady_heatflux, thread, position) { Domain *d; real cp=880; real density=2180; real tempn, templ, volume, Q; Thread *t; cell_t c; d= Get_Domain(1); /*Get the domain using Fluent utility *//*Loop over all cell threads in the domain*/ thread_loop_c(t,d) /*Compute Q */ /*Loop over all cells */ begin_c_loop(c,t) { real time= RP_Get_Real("flow-time" ; real b=(int)(time/3600)+1; int i=(int)((b-1)/24); real Heat[3]={278.5, 280.7, 278.5}; volume=C_VOLUME(c,t); /* get cell volume */ templ=C_T_M1(c,t); /*Get cell tempertuare of previous step*/ tempn=C_T(c,t); /*Get cell tempertuare*/ Q=cp*density*volume*(tempn-templ); Q_tot +=Q; if (Q_tot<= Heat ) F_PROFILE(c,t,position)=60; else F_PROFILE(c,t,position)=0; } end_c_loop(c,t) } |
專家顧問 (著名寫手)
石化蛀蟲
![]() |
專家經驗: +136 |
新蟲 (初入文壇)
新蟲 (初入文壇)

新蟲 (初入文壇)
新蟲 (初入文壇)
新蟲 (初入文壇)
新蟲 (初入文壇)
|
你好,我改了下CODE,還是出錯,能幫我看下嗎?謝謝了~ http://www.gaoyang168.com/bbs/viewthread.php?tid=4026752&pid=2&page=1#pid2 |
| 最具人氣熱帖推薦 [查看全部] | 作者 | 回/看 | 最后發(fā)表 | |
|---|---|---|---|---|
|
[考研] 332求調劑 +3 | ydfyh 2026-03-17 | 3/150 |
|
|---|---|---|---|---|
|
[考研] 材料專碩英一數(shù)二306 +5 | z1z2z3879 2026-03-18 | 5/250 |
|
|
[考研] 一志愿華中科技大學,080502,354分求調劑 +4 | 守候夕陽CF 2026-03-18 | 4/200 |
|
|
[考研] 材料專業(yè)求調劑 +5 | hanamiko 2026-03-18 | 5/250 |
|
|
[考研] 【同濟軟件】軟件(085405)考研求調劑 +3 | 2026eternal 2026-03-18 | 3/150 |
|
|
[考研] 一志愿武理材料305分求調劑 +5 | 想上岸的鯉魚 2026-03-18 | 6/300 |
|
|
[考研] 070300化學319求調劑 +6 | 錦鯉0909 2026-03-17 | 6/300 |
|
|
[考研] 0703化學336分求調劑 +6 | zbzihdhd 2026-03-15 | 7/350 |
|
|
[考研] 268求調劑 +8 | 一定有學上- 2026-03-14 | 9/450 |
|
|
[考研] 302求調劑 +4 | 小賈同學123 2026-03-15 | 8/400 |
|
|
[考研] 考研調劑 +3 | 淇ya_~ 2026-03-17 | 5/250 |
|
|
[考研] 274求調劑 +5 | 時間點 2026-03-13 | 5/250 |
|
|
[考研]
|
zhouzhen654 2026-03-16 | 3/150 |
|
|
[考研] 085601材料工程315分求調劑 +3 | yang_0104 2026-03-15 | 3/150 |
|
|
[考研] 297一志愿上交085600求調劑 +5 | 指尖八千里 2026-03-14 | 5/250 |
|
|
[考研] 考研調劑 +4 | 芬達46 2026-03-12 | 4/200 |
|
|
[考研] 求調劑 +3 | 程雨杭 2026-03-12 | 3/150 |
|
|
[考研] 土木第一志愿276求調劑,科研和技能十分豐富,求新興方向的導師收留 +3 | 土木小天才 2026-03-12 | 3/150 |
|
|
[考研] 290求調劑 +3 | ADT 2026-03-13 | 3/150 |
|
|
[考研] 321求調劑(食品/專碩) +3 | xc321 2026-03-12 | 6/300 |
|