| 5 | 1/1 | 返回列表 |
| 查看: 1704 | 回復(fù): 16 | |||
| 當(dāng)前只顯示滿足指定條件的回帖,點(diǎn)擊這里查看本話題的所有回帖 | |||
xiaoguai3新蟲 (初入文壇)
|
[求助]
新手求教UDF問題~
|
||
|
能解釋,但一添加到邊界或初始化就報(bào)錯(cuò)。 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如下,二維模型,簡單的固體傳熱問題,想在模擬過程的同時(shí)累加整個(gè)固體區(qū)域的所有得熱量,達(dá)到一定值后改變熱流邊界值。由于剛接觸UDF不久,不知道問題出在何處。請指教!d= Get_Domain(1);這個(gè)語句有問題嗎? #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) } |
專家顧問 (著名寫手)
石化蛀蟲
![]() |
專家經(jīng)驗(yàn): +136 |
新蟲 (初入文壇)
新蟲 (初入文壇)
| 最具人氣熱帖推薦 [查看全部] | 作者 | 回/看 | 最后發(fā)表 | |
|---|---|---|---|---|
|
[考研] 266分,求材料相關(guān)專業(yè)調(diào)劑 +3 | 哇呼哼呼哼 2026-03-30 | 3/150 |
|
|---|---|---|---|---|
|
[考研] 283求調(diào)劑(080500) +14 | A child 2026-03-27 | 14/700 |
|
|
[考研] 334分 一志愿武理 材料求調(diào)劑 +12 | 李李不服輸 2026-03-26 | 12/600 |
|
|
[考研] 317求調(diào)劑 +10 | 蛋黃咸肉粽 2026-03-26 | 10/500 |
|
|
[考研] 調(diào)劑310 +12 | 溫柔的晚安 2026-03-25 | 13/650 |
|
|
[考研] 調(diào)劑考研 +3 | 王杰一 2026-03-29 | 3/150 |
|
|
[考研] 321求調(diào)劑 +7 | 璞玉~~ 2026-03-25 | 8/400 |
|
|
[考研] 295材料工程專碩求調(diào)劑 +7 | 1428151015 2026-03-27 | 7/350 |
|
|
[考研] 材料277求調(diào)劑 +7 | min3 2026-03-24 | 7/350 |
|
|
[考研] 0856,材料與化工321分求調(diào)劑 +12 | 大饞小子 2026-03-27 | 13/650 |
|
|
[考研] 一志愿211院校 344分 東北農(nóng)業(yè)大學(xué)生物學(xué)學(xué)碩,求調(diào)劑 +5 | 丶風(fēng)雪夜歸人丶 2026-03-26 | 8/400 |
|
|
[考博] 26申博 +3 | 加油沖。 2026-03-26 | 3/150 |
|
|
[考研] 308求調(diào)劑 +7 | 墨墨漠 2026-03-25 | 7/350 |
|
|
[考研] 085600,材料與化工321分,求調(diào)劑 +9 | 大饞小子 2026-03-27 | 9/450 |
|
|
[考研] 322求調(diào)劑 +4 | 我真的很想學(xué)習(xí) 2026-03-23 | 4/200 |
|
|
[考研] 351求調(diào)劑 +4 | 麥克阿磊 2026-03-24 | 4/200 |
|
|
[考研] 材料與化工304求B區(qū)調(diào)劑 +3 | 邱gl 2026-03-25 | 3/150 |
|
|
[考研] 26考研-291分-廈門大學(xué)(085601)-柔性電子學(xué)院材料工程專業(yè)求調(diào)劑 +3 | min3 2026-03-24 | 4/200 |
|
|
[考研] 300分,材料,求調(diào)劑,英一數(shù)二 +5 | 超贊的 2026-03-24 | 5/250 |
|
|
[考研]
|
黃粱一夢千年 2026-03-24 | 3/150 |
|