| 查看: 4998 | 回復: 13 | |||
woshihuolei銀蟲 (小有名氣)
|
[求助]
fluent UDF 修改物性 已有3人參與
|
||
|
最近在用fluent模擬一個簡單傳熱問題,但是由于溫度變化范圍大,需要用UDF定義物性參數(shù)的變化函數(shù)。PS:解釋型UDF 問題是這樣: 在fluent中加載UDF后,依次點擊material-create/edit materia-uesr-defined database-輸入名稱-OK-選擇參數(shù)thermal conductivity-選擇user-defined-UDF-再點擊edit,出現(xiàn)如下錯誤:No error handler available。 附上UDF: DEFINE_PROPERTY(gapgas_heat_conductivity, cell, thread) { real heat_conductivity; real temp = C_T(cell, thread); heat_conductivity = 100 * 0.39 * pow(10, -4) * pow(temp, 0.645); return heat_conductivity; } 另外:由于有內熱源,所以也編寫了熱源的UDF,能夠定義成功,敬請各位指教! |
ggggg |
銀蟲 (小有名氣)
銀蟲 (小有名氣)
專家顧問 (著名寫手)
![]() |
專家經驗: +60 |
銀蟲 (小有名氣)
|
不好意思,怕大家看著麻煩,UDF只貼出了一部分。。。其實是掛了的。。完整的UDF如下: /***********************************************************************/ /* heat_conductivity.c */ /* UDF for specifying a temperature-dependent heat_conductivity property of fuel */ /***********************************************************************/ #include "udf.h" #define pi 3.1415 #define qmax 53503100.8 DEFINE_PROPERTY(fuel_heat_conductivity, cell, thread) { real heat_conductivity; real temp = C_T(cell, thread); heat_conductivity = 38.24 / (temp+402.55) + 4.788 * (temp+273.15) * (temp+273.15) * (temp+273.15) * pow(10, -11); return heat_conductivity; } /***********************************************************************/ /* heat_conductivity.c */ /* UDF for specifying a temperature-dependent heat_conductivity property of gap gas*/ /***********************************************************************/ DEFINE_PROPERTY(gapgas_heat_conductivity, cell, thread) { real heat_conductivity; real temp = C_T(cell, thread); heat_conductivity = 100 * 0.39 * pow(10, -4) * pow(temp, 0.645); return heat_conductivity; } /***********************************************************************/ /* heat_source.c */ /* UDF for specifying a location-dependent heat_source of fuel */ /***********************************************************************/ DEFINE_SOURCE(cell_heat_source, cell, thread) { real x[ND_ND]; real heat_source; real t,z; t= RP_Get_Real("flow-time" ;z = x[2]; heat_source = qmax * sin(pi*(z+0.1)/1.1) * sin (0.2 * pi * t); return heat_source; } |
銀蟲 (小有名氣)
金蟲 (小有名氣)
銀蟲 (小有名氣)
| 最具人氣熱帖推薦 [查看全部] | 作者 | 回/看 | 最后發(fā)表 | |
|---|---|---|---|---|
|
[考研] 299求調劑 +4 | △小透明* 2026-03-17 | 4/200 |
|
|---|---|---|---|---|
|
[考研] 070300化學319求調劑 +4 | 錦鯉0909 2026-03-17 | 4/200 |
|
|
[考研] 302求調劑 +9 | 負心者當誅 2026-03-11 | 9/450 |
|
|
[考研] 材料與化工專碩調劑 +5 | heming3743 2026-03-16 | 5/250 |
|
|
[考研] 085600材料與化工 +4 | 安全上岸! 2026-03-16 | 4/200 |
|
|
[考研] 267一志愿南京工業(yè)大學0817化工求調劑 +6 | SUICHILD 2026-03-12 | 6/300 |
|
|
[考研] 278求調劑 +3 | Yy7400 2026-03-13 | 3/150 |
|
|
[考研]
|
zhouzhen654 2026-03-16 | 3/150 |
|
|
[考研] 東南大學364求調劑 +5 | JasonYuiui 2026-03-15 | 5/250 |
|
|
[考研] 070303一志愿西北大學學碩310找調劑 +5 | d如愿上岸 2026-03-12 | 8/400 |
|
|
[考研] 277材料科學與工程080500求調劑 +3 | 自由煎餅果子 2026-03-16 | 3/150 |
|
|
[考研]
|
笨笨兔子 2026-03-12 | 3/150 |
|
|
[考研] 22408總分284求調劑 +3 | InAspic 2026-03-13 | 3/150 |
|
|
[考研] 材料工程327求調劑 +3 | xiaohe12w 2026-03-11 | 3/150 |
|
|
[考研] 中科大材料專碩319求調劑 +3 | 孟鑫材料 2026-03-13 | 3/150 |
|
|
[考研] 315求調劑 +9 | 小羊小羊_ 2026-03-11 | 10/500 |
|
|
[考研] 求調劑 +5 | 一定有學上- 2026-03-12 | 5/250 |
|
|
[考研] 314求調劑 +7 | 無懈可擊的巨人 2026-03-12 | 7/350 |
|
|
[考研] 295求調劑 +3 | 小匕仔汁 2026-03-12 | 3/150 |
|
|
[考研] 0856化學工程280分求調劑 +4 | shenzxsn 2026-03-11 | 4/200 |
|