| 查看: 1068 | 回复: 1 | |||
[求助]
关于udf 变量梯度的问题 已有1人参与
|
|
请问 { 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); 这里面的变量什么意思 该如何修改 /**************************************************************/ /* UDF for specifying an interfacail area density */ /**************************************************************/ 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); } |
» 猜你喜欢
存款400万可以在学校里躺平吗
已经有37人回复
英文综述是否需要润色及查重
已经有5人回复
救命帖
已经有5人回复
限项规定
已经有5人回复
为什么nbs上溴 没有产物点出现呢
已经有9人回复
招博士
已经有3人回复
最失望的一年
已经有18人回复
感谢参与,应助指数 +1
月只蓝: 应助指数-2, 屏蔽内容, 刷应助指数,无意义应助! 2017-03-24 11:11:32
月只蓝: 应助指数-2, 屏蔽内容, 刷应助指数,无意义应助! 2017-03-24 11:11:32
|
本帖内容被屏蔽 |
2楼2016-08-04 08:43:02













回复此楼