| 24小時(shí)熱門(mén)版塊排行榜 |
| 8 | 1/1 | 返回列表 |
| 查看: 2392 | 回復(fù): 7 | ||
fww2008木蟲(chóng) (小有名氣)
|
[求助]
關(guān)于UDF中變量梯度問(wèn)題的求助!在線(xiàn)等………… 已有1人參與
|
|
下面一段程序也許大家都看過(guò),是為了求取體積分?jǐn)?shù)梯度和溫度梯度的點(diǎn)積,自然也就涉及到了體積分?jǐn)?shù)梯度和溫度梯度的求取。這其中用到了所謂“分配內(nèi)存,釋放內(nèi)存”命令,如Alloc_Storage_Vars(pDomain,SV_VOF_RG,SV_VOF_G,SV_NULL)……和Alloc_Storage_Vars(domain, SV_T_RG, SV_T_G, SV_NULL……等,對(duì)于這兩條命令在下一直沒(méi)查到什么資料,無(wú)從下手,望大神能給解讀一下:括號(hào)內(nèi)的幾個(gè)量具體代表什么意思?該怎么用?什么地方有相關(guān)資料?如果我想把Alloc_Storage_Vars(domain, SV_T_RG, SV_T_G, SV_NULL); T_derivatives(domain);中的溫度T換成用戶(hù)自定義變量UDS 0,該怎么寫(xiě)呢? 萬(wàn)分感謝。。! DEFINE_ADJUST(area_density, domain) { Thread *t; Thread **pt; cell_t c; Domain *pDomain = DOMAIN_SUB_DOMAIN(domain,P_PHASE); real voidx, voidy, voidz=0; { Alloc_Storage_Vars(pDomain,SV_VOF_RG,SV_VOF_G,SV_NULL); Scalar_Reconstruction(pDomain, SV_VOF,-1,SV_VOF_RG,NULL); Scalar_Derivatives(pDomain,SV_VOF,-1,SV_VOF_G,SV_VOF_RG,Vof_Deriv_Accumulate); } { Alloc_Storage_Vars(domain, SV_T_RG, SV_T_G, SV_NULL); T_derivatives(domain); Free_Storage_Vars(domain, SV_T_RG, SV_NULL); } mp_thread_loop_c (t,domain,pt) if (FLUID_THREAD_P(t)) { Thread *tp = pt[P_PHASE]; begin_c_loop (c,t) { #if RP_3D C_UDMI(c,t,0) = (C_VOF_G(c,tp)[0]*C_T_G(c,t)[0]+C_VOF_G(c,tp)[1]*C_T_G(c,t)[1]+C_VOF_G(c,tp)[2]*C_T_G(c,t)[2]); #endif #if RP_2D C_UDMI(c,t,0) = (C_VOF_G(c,tp)[0]*C_T_G(c,t)[0]+C_VOF_G(c,tp)[1]*C_T_G(c,t)[1]); #endif } end_c_loop (c,t) } Free_Storage_Vars(pDomain,SV_VOF_RG,SV_VOF_G,SV_NULL); Free_Storage_Vars(domain, SV_T_G, SV_NULL); } |

木蟲(chóng) (小有名氣)

木蟲(chóng) (小有名氣)

木蟲(chóng) (小有名氣)

![]() ![]() |
至尊木蟲(chóng) (著名寫(xiě)手)
|
本帖內(nèi)容被屏蔽 |
| 8 | 1/1 | 返回列表 |
| 最具人氣熱帖推薦 [查看全部] | 作者 | 回/看 | 最后發(fā)表 | |
|---|---|---|---|---|
|
[考研]
|
WWW西西弗斯 2026-03-24 | 5/250 |
|
|---|---|---|---|---|
|
[考研] 0703化學(xué)調(diào)劑,求導(dǎo)師收 +6 | 天天好運(yùn)來(lái)上岸?/a> 2026-03-24 | 6/300 |
|
|
[考研] 321求調(diào)劑 +4 | Ymlll 2026-03-24 | 4/200 |
|
|
[考研] 一志愿河北工業(yè)大學(xué)0817化工278分求調(diào)劑 +7 | jhybd 2026-03-23 | 12/600 |
|
|
[考研] 284求調(diào)劑 +10 | Zhao anqi 2026-03-22 | 10/500 |
|
|
[考研] 環(huán)境學(xué)碩288求調(diào)劑 +8 | 皮皮皮123456 2026-03-22 | 8/400 |
|
|
[考研] 一志愿北京化工大學(xué) 070300 學(xué)碩 336分 求調(diào)劑 +7 | vv迷 2026-03-22 | 7/350 |
|
|
[考研] 280分求調(diào)劑 一志愿085802 +4 | PUMPT 2026-03-22 | 7/350 |
|
|
[考研] 材料與化工085600,總分304,本科有兩篇sci參與,求調(diào)劑 +4 | 幸運(yùn)的醬醬 2026-03-22 | 5/250 |
|
|
[考研] 324求調(diào)劑 +6 | lucky呀呀呀鴨 2026-03-20 | 6/300 |
|
|
[考研] 289求調(diào)劑 +7 | 懷瑾握瑜l 2026-03-20 | 7/350 |
|
|
[考研] 354求調(diào)劑 +7 | Tyoumou 2026-03-18 | 10/500 |
|
|
[考研] 330求調(diào)劑0854 +3 | assdll 2026-03-21 | 3/150 |
|
|
[考研] 求調(diào)劑 +6 | Mqqqqqq 2026-03-19 | 6/300 |
|
|
[考研] 求調(diào)劑 +3 | Ma_xt 2026-03-17 | 3/150 |
|
|
[考研] 材料 336 求調(diào)劑 +3 | An@. 2026-03-18 | 4/200 |
|
|
[考研] 一志愿西南交大,求調(diào)劑 +5 | 材化逐夢(mèng)人 2026-03-18 | 5/250 |
|
|
[考研] 一志愿南昌大學(xué),327分,材料與化工085600 +9 | Ncdx123456 2026-03-19 | 9/450 |
|
|
[考研]
|
然11 2026-03-19 | 4/200 |
|
|
[考研] 085600材料與化工調(diào)劑 324分 +10 | llllkkkhh 2026-03-18 | 12/600 |
|