| 查看: 4772 | 回復: 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ā)表 | |
|---|---|---|---|---|
|
[考研] 304求調(diào)劑 +8 | 素年祭語 2026-03-31 | 11/550 |
|
|---|---|---|---|---|
|
[考研] 308求調(diào)劑 +11 | 墨墨漠 2026-03-25 | 11/550 |
|
|
[考研] 求調(diào)劑 生物學 377分 +6 | zzll03 2026-03-31 | 6/300 |
|
|
[考研] 求調(diào)劑 +9 | akdhjs 2026-03-31 | 10/500 |
|
|
[考研] 289求調(diào)劑 +3 | Acesczlo 2026-03-29 | 4/200 |
|
|
[考研] 282求調(diào)劑 不挑專業(yè) 求收留 +4 | Yam. 2026-03-30 | 5/250 |
|
|
[考研] 生物學 296 求調(diào)劑 +7 | 朵朵- 2026-03-26 | 9/450 |
|
|
[考研] 085404 22408 315分 +5 | zhuangyan123 2026-03-31 | 6/300 |
|
|
[考研] 08工科,295,接受跨專業(yè)調(diào)劑 +6 | lmnlzy 2026-03-30 | 6/300 |
|
|
[考研] 291求調(diào)劑 +12 | Y-cap 2026-03-29 | 15/750 |
|
|
[考研] 297 地理學070500 復試求調(diào)劑 +3 | 小圓圈圈ooo 2026-03-30 | 3/150 |
|
|
[考研] 抱歉 +3 | 田洪有 2026-03-30 | 3/150 |
|
|
[考研] 348求調(diào)劑 +6 | 小懶蟲不懶了 2026-03-28 | 6/300 |
|
|
[考研] 求調(diào)劑 +10 | 張zz111 2026-03-27 | 11/550 |
|
|
[考研] 材料與化工304求B區(qū)調(diào)劑 +4 | 邱gl 2026-03-26 | 7/350 |
|
|
[考研] 295求調(diào)劑 +5 | 1428151015 2026-03-27 | 6/300 |
|
|
[考研] 調(diào)劑求收留 +7 | 果然有我 2026-03-26 | 7/350 |
|
|
[考研] 281求調(diào)劑 +6 | Koxui 2026-03-24 | 7/350 |
|
|
[考研] 材料與化工304求B區(qū)調(diào)劑 +3 | 邱gl 2026-03-25 | 3/150 |
|
|
[考研] 求b區(qū)院校調(diào)劑 +4 | 周56 2026-03-24 | 5/250 |
|