| 查看: 4784 | 回復: 15 | |||
[求助]
最基礎(chǔ)的UDF問題:Fluent算例完成后,后處理時為什么無法顯示UDM的云圖? 已有3人參與
|
|||
資料 |
專家顧問 (著名寫手)
![]() |
專家經(jīng)驗: +60 |
|
/********************************************************************** UDF to calculate temperature field function and store in user-defined memory. Also print min, max, avg temperatures. ***********************************************************************/ #include "udf.h" #include "mem.h" DEFINE_ON_DEMAND(on_demand_calc) { Domain *d; /* declare domain pointer since it is not passed as an argument to the DEFINE macro */ real uavg = 0.; real umax = 0.; real umin = 0.; real temp,volume,vol_tot; Thread *t; cell_t c; d = Get_Domain(1); /* Get the domain using ANSYS Fluent utility */ /* Loop over all cell threads in the domain */ thread_loop_c(t,d) { /* Compute max, min, volume-averaged temperature */ /* Loop over all cells */ begin_c_loop(c,t) { volume = C_VOLUME(c,t); /* get cell volume */ temp = C_U(c,t); /* get cell temperature */ if (temp < umin || umin == 0.) umin = temp; if (temp > umax || umax == 0.) umax = temp; vol_tot += volume; uavg += temp*volume; } end_c_loop(c,t) uavg /= vol_tot; printf("\n Umin = %g Umax = %g Uavg = %g\n",umin,umax,uavg); /* Compute temperature function and store in user-defined memory*/ /*(location index 0) */ begin_c_loop(c,t) { C_UDMI(c,t,0) = C_DUDY(c,t); } end_c_loop(c,t) } } 您好,想用這個程序算速度U對y的導數(shù),可是掛到Fluent上還是沒顯示,值都為0,求解釋? |
專家顧問 (著名寫手)
![]() |
專家經(jīng)驗: +60 |
金蟲 (小有名氣)


| 最具人氣熱帖推薦 [查看全部] | 作者 | 回/看 | 最后發(fā)表 | |
|---|---|---|---|---|
|
[考研] 316求調(diào)劑 +12 | 舟自梗 2026-04-01 | 16/800 |
|
|---|---|---|---|---|
|
[考研] 348求調(diào)劑 +11 | zzzzyk123 2026-04-01 | 11/550 |
|
|
[考研] 農(nóng)學考研求調(diào)劑 +3 | dkdkxm 2026-04-01 | 3/150 |
|
|
[考研] 材料調(diào)劑 +6 | 一樣YWY 2026-04-02 | 6/300 |
|
|
[考研] 295材料工程專碩求調(diào)劑 +19 | 1428151015 2026-03-27 | 19/950 |
|
|
[考研] 286求調(diào)劑 +16 | PolarBear11 2026-03-26 | 16/800 |
|
|
[考研] 290求調(diào)劑 +5 | dfffsar 2026-03-29 | 5/250 |
|
|
[考研] 085600,320分求調(diào)劑 +5 | 大饞小子 2026-04-01 | 6/300 |
|
|
[考研] 調(diào)劑 +5 | 好好讀書。 2026-03-28 | 7/350 |
|
|
[考研] 301求調(diào)劑 +8 | axibli 2026-04-01 | 8/400 |
|
|
[考研] 0710生物學求調(diào)劑! +6 | 敘述文 2026-03-31 | 6/300 |
|
|
[考研] 一志愿a區(qū)211,085601-307分求調(diào)劑 +10 | 黨嘉豪 2026-03-31 | 23/1150 |
|
|
[考研] 299求調(diào)劑 +8 | 嗯嗯嗯嗯2 2026-03-27 | 8/400 |
|
|
[考研] 材料與化工272求調(diào)劑 +25 | 阿斯蒂芬2004 2026-03-28 | 25/1250 |
|
|
[考研] 生物考研337分求調(diào)劑 +4 | cgxin 2026-03-30 | 6/300 |
|
|
[考研] 08工科求調(diào)劑286 +5 | tgs_001 2026-03-28 | 5/250 |
|
|
[考研] 抱歉 +4 | 田洪有 2026-03-30 | 4/200 |
|
|
[考研] 一志愿北京工業(yè)大學,324分求調(diào)劑 +6 | 零八# 2026-03-28 | 6/300 |
|
|
[考研] 本科雙非材料,跨考一志愿華電085801電氣,283求調(diào)劑,任何專業(yè)都可以 +6 | 芝士雪baoo 2026-03-28 | 8/400 |
|
|
[考研] 085602 化工專碩 338分 求調(diào)劑 +12 | 路癡小琪 2026-03-27 | 12/600 |
|