| 8 | 1/1 | 返回列表 |
| 查看: 2390 | 回復(fù): 7 | ||
fww2008木蟲(chóng) (小有名氣)
|
[求助]
關(guān)于UDF中變量梯度問(wè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換成用戶自定義變量UDS 0,該怎么寫呢? 萬(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) (著名寫手)
|
本帖內(nèi)容被屏蔽 |
| 8 | 1/1 | 返回列表 |
| 最具人氣熱帖推薦 [查看全部] | 作者 | 回/看 | 最后發(fā)表 | |
|---|---|---|---|---|
|
[考研] 求材料,環(huán)境專業(yè)調(diào)劑 +3 | 18567500178 2026-03-18 | 3/150 |
|
|---|---|---|---|---|
|
[考研] 384求調(diào)劑 +3 | 子系博 2026-03-22 | 6/300 |
|
|
[考研] 303求調(diào)劑 +4 | 元夕元 2026-03-20 | 4/200 |
|
|
[考研] 上海電力大學(xué)材料防護(hù)與新材料重點(diǎn)實(shí)驗(yàn)室招收調(diào)劑研究生(材料、化學(xué)、電化學(xué),環(huán)境) +3 | 我愛(ài)學(xué)電池 2026-03-23 | 3/150 |
|
|
[考研] 招08考數(shù)學(xué) +6 | laoshidan 2026-03-20 | 14/700 |
|
|
[考研] 333求調(diào)劑 +6 | 87639 2026-03-21 | 10/500 |
|
|
[考研]
求調(diào)劑材料學(xué)碩080500,總分289分
5+3
|
@taotao 2026-03-19 | 21/1050 |
|
|
[考研]
|
酥酥魚.. 2026-03-21 | 4/200 |
|
|
[考研] 311求調(diào)劑 +6 | 冬十三 2026-03-18 | 6/300 |
|
|
[考研] 311求調(diào)劑 +3 | 26研0 2026-03-20 | 3/150 |
|
|
[考研] 化學(xué)調(diào)劑 +5 | yzysaa 2026-03-21 | 5/250 |
|
|
[考研] 296求調(diào)劑 +4 | www_q 2026-03-20 | 4/200 |
|
|
[考研] 279求調(diào)劑 +5 | 紅衣隱官 2026-03-21 | 5/250 |
|
|
[考研] 一志愿武理材料305分求調(diào)劑 +6 | 想上岸的鯉魚 2026-03-18 | 7/350 |
|
|
[考研] 考研調(diào)劑求學(xué)校推薦 +3 | 伯樂(lè)29 2026-03-18 | 5/250 |
|
|
[考研] 中南大學(xué)化學(xué)學(xué)碩337求調(diào)劑 +3 | niko- 2026-03-19 | 6/300 |
|
|
[考研] 材料學(xué)求調(diào)劑 +4 | Stella_Yao 2026-03-20 | 4/200 |
|
|
[考研] 261求B區(qū)調(diào)劑,科研經(jīng)歷豐富 +3 | 牛奶很忙 2026-03-20 | 4/200 |
|
|
[考研] 生物學(xué)調(diào)劑招人。! +3 | 山海天嵐 2026-03-17 | 4/200 |
|
|
[考研] 0703化學(xué)調(diào)劑 +4 | 18889395102 2026-03-18 | 4/200 |
|