| 24小時(shí)熱門(mén)版塊排行榜 |
| 5 | 1/1 | 返回列表 |
| 查看: 3614 | 回復(fù): 11 | ||
| 當(dāng)前只顯示滿足指定條件的回帖,點(diǎn)擊這里查看本話題的所有回帖 | ||
leixiaobo713銀蟲(chóng) (正式寫(xiě)手)
|
[求助]
fluent中UDF編譯的問(wèn)題!
|
|
|
本人想編的程序是這樣的: 材料是有初始溫度的,而且初始溫度為X(X軸坐標(biāo))的函數(shù);模擬開(kāi)始后,在很短時(shí)間內(nèi)材料的溫度將發(fā)生變化,變化的溫度為初始溫度的函數(shù),在一定時(shí)間后(上面提到的很短時(shí)間),材料的溫度僅隨流體的流動(dòng)而自然發(fā)生變化,沒(méi)有再生熱源。我變得程序是這樣的,雖然能編譯,但是模擬一開(kāi)始就出現(xiàn)錯(cuò)誤,請(qǐng)高手指點(diǎn),本人是小白,謝謝! #include "udf.h" DEFINE_PROFILE(unsteady_temperature,thread,position) { real t, temperature; face_t f; real x; begin_f_loop(f,thread) { t=RP_Get_Real("flow-time" ;if(t<=0.000000001) {temperature=325.0-0.115*x; F_PROFILE(f,thread,position) =temperature+(297.68625-7.37218/(1+exp((temperature-299.65187)/7.97379))); } else F_PROFILE(f,thread,position) =temperature; } end_f_loop(f,thread); } 模擬出現(xiàn)的錯(cuò)誤提示: Updating solution at time level N... done. iter continuity x-velocity y-velocity energy time/iter chip-exec: unsteady_temperature: wrong return type: float udf function expectedchip-exec: unsteady_temperature: argument 1: incorrect type (36): int expectedchip-exec: unsteady_temperature: argument 2: incorrect type (5): pointer expected 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: () |

銀蟲(chóng) (正式寫(xiě)手)

木蟲(chóng) (正式寫(xiě)手)
| 是不是溫度沒(méi)有賦初值?如果t<=0.000000001條件達(dá)不到temperature等于多少呢??還有,即使?jié)M足t<=0.000000001,那么x值為多少?x不知道的話,溫度也確定不了了啊 |
銀蟲(chóng) (正式寫(xiě)手)

銀蟲(chóng) (正式寫(xiě)手)
|
#include "udf.h" DEFINE_PROFILE(unsteady_temperature,thread,position) { real t, temperature=298.0; face_t f; real x[ND_ND]; F_CENTROID(x,f,thread); begin_f_loop(f,thread) { t=RP_Get_Real("flow-time" ; if(t>0&&t<=0.1) F_PROFILE(f,thread,position)=temperature; else if(t>=0.1&&t<0.4) { temperature=298.0+5*x[1]; F_PROFILE(f,thread,position) =temperature+(297.68625-7.37218/(1+exp((temperature-299.65187)/7.97379))); } else { temperature=F_PROFILE(f,thread,position); F_PROFILE(f,thread,position) =temperature; } } end_f_loop(f,thread); } 我改成這樣,還是上面的問(wèn)題啊,請(qǐng)指教! 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: () |

| 最具人氣熱帖推薦 [查看全部] | 作者 | 回/看 | 最后發(fā)表 | |
|---|---|---|---|---|
|
[考研] 316求調(diào)劑 +12 | 舟自梗 2026-04-01 | 16/800 |
|
|---|---|---|---|---|
|
[考研] 319求調(diào)劑 +14 | 太容易1018 2026-04-01 | 14/700 |
|
|
[考研] 求調(diào)劑 +7 | Aniyaio 2026-04-02 | 7/350 |
|
|
[考研] 材料調(diào)劑 +6 | 懶羊羊輕置玉臀 2026-04-02 | 6/300 |
|
|
[考研] 085900土木水利336分求調(diào)劑 +4 | Zhangjiangj 2026-03-31 | 6/300 |
|
|
[考研] 材料專碩322分 +11 | 哈哈哈吼吼吼哈 2026-04-01 | 11/550 |
|
|
[考研] 324分 085600材料與化工 +20 | 呆鵝oor 2026-03-27 | 20/1000 |
|
|
[考研]
|
廈大化工 2026-04-01 | 5/250 |
|
|
[考研] 354求調(diào)劑 +4 | lxb598 2026-03-31 | 5/250 |
|
|
[考研] 367求調(diào)劑 +8 | 芋泥啵! 2026-03-28 | 8/400 |
|
|
[考研] 805600專碩材料與化工348分求調(diào)劑 +6 | 上學(xué)啦! 2026-04-01 | 6/300 |
|
|
[考研] 298求調(diào)劑 +4 | 什么是胖頭魚(yú) 2026-03-30 | 6/300 |
|
|
[考研] 一志愿華南師范361分,化學(xué)求調(diào)劑 +4 | Nicole88888 2026-04-01 | 4/200 |
|
|
[考研] 求調(diào)劑,一志愿北林食品與營(yíng)養(yǎng)095500,301分,已過(guò)六級(jí),有科研經(jīng)歷 +4 | 快樂(lè)儲(chǔ)蓄罐 2026-03-31 | 4/200 |
|
|
[考研] 262求調(diào)劑 +7 | ZZ..000 2026-03-30 | 8/400 |
|
|
[考研] 322求調(diào)劑 +10 | 宋明欣 2026-03-27 | 10/500 |
|
|
[考研] 求調(diào)劑,一志愿 南京航空航天大學(xué)大學(xué) ,080500材料科學(xué)與工程學(xué)碩 +6 | @taotao 2026-03-26 | 7/350 |
|
|
[考研] 298求調(diào)劑 +4 | 種圣賜 2026-03-28 | 4/200 |
|
|
[考研] 081200-314 +3 | LILIQQ 2026-03-27 | 4/200 |
|
|
[考研] 331環(huán)境科學(xué)與工程求調(diào)劑 +3 | 熠然好運(yùn)氣 2026-03-27 | 3/150 |
|