| 查看: 1673 | 回復(fù): 16 | |||
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不久,不知道問題出在何處。請(qǐng)指教!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 |
新蟲 (初入文壇)
新蟲 (初入文壇)

新蟲 (初入文壇)
新蟲 (初入文壇)
新蟲 (初入文壇)
新蟲 (初入文壇)
|
你好,我改了下CODE,還是出錯(cuò),能幫我看下嗎?謝謝了~ http://www.gaoyang168.com/bbs/viewthread.php?tid=4026752&pid=2&page=1#pid2 |
| 最具人氣熱帖推薦 [查看全部] | 作者 | 回/看 | 最后發(fā)表 | |
|---|---|---|---|---|
|
[考研] 290求調(diào)劑 +3 | ^O^乜 2026-03-19 | 3/150 |
|
|---|---|---|---|---|
|
[考研] 一志愿西南交通 專碩 材料355 本科雙非 求調(diào)劑 +4 | 西南交通專材355 2026-03-19 | 4/200 |
|
|
[考研] 一志愿南昌大學(xué),327分,材料與化工085600 +5 | Ncdx123456 2026-03-19 | 5/250 |
|
|
[考研]
|
.6lL 2026-03-18 | 7/350 |
|
|
[考研] 一志愿中國海洋大學(xué),生物學(xué),301分,求調(diào)劑 +5 | 1孫悟空 2026-03-17 | 6/300 |
|
|
[考研] 0703化學(xué)調(diào)劑 +10 | 妮妮ninicgb 2026-03-15 | 14/700 |
|
|
[考研] 307求調(diào)劑 +9 | 冷笙123 2026-03-17 | 9/450 |
|
|
[考博] 東華理工大學(xué)化材專業(yè)26屆碩士博士申請(qǐng) +8 | zlingli 2026-03-13 | 8/400 |
|
|
[考研] 本人考085602 化學(xué)工程 專碩 +17 | 不知道叫什么! 2026-03-15 | 19/950 |
|
|
[考研] 0703化學(xué)調(diào)劑 +5 | pupcoco 2026-03-17 | 8/400 |
|
|
[考研] 085600材料與化工求調(diào)劑 +6 | 緒幸與子 2026-03-17 | 6/300 |
|
|
[考研] 287求調(diào)劑 +3 | 晨昏線與星海 2026-03-19 | 4/200 |
|
|
[考研]
|
胡辣湯放糖 2026-03-15 | 6/300 |
|
|
[基金申請(qǐng)] 被我言中:新模板不強(qiáng)調(diào)格式了,假專家開始管格式了 +4 | beefly 2026-03-14 | 4/200 |
|
|
[考研] 有沒有道鐵/土木的想調(diào)劑南林,給自己招師弟中~ +3 | TqlXswl 2026-03-16 | 7/350 |
|
|
[基金申請(qǐng)]
今年的國基金是打分制嗎?
50+3
|
zhanghaozhu 2026-03-14 | 3/150 |
|
|
[考研] 中科院材料273求調(diào)劑 +4 | yzydy 2026-03-15 | 4/200 |
|
|
[考研] 求老師收留調(diào)劑 +4 | jiang姜66 2026-03-14 | 5/250 |
|
|
[考研] 26考研一志愿中國石油大學(xué)(華東)305分求調(diào)劑 +3 | 嘉年新程 2026-03-15 | 3/150 |
|
|
[考研] 080500,材料學(xué)碩302分求調(diào)劑學(xué)校 +4 | 初識(shí)可樂 2026-03-14 | 5/250 |
|