24小时热门版块排行榜    

查看: 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);
}
回复此楼

» 猜你喜欢

已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

小七工作室1

新虫 (著名写手)

感谢参与,应助指数 +1
月只蓝: 应助指数-2, 屏蔽内容, 刷应助指数,无意义应助! 2017-03-24 11:11:32
本帖内容被屏蔽

2楼2016-08-04 08:43:02
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
相关版块跳转 我要订阅楼主 左岸流年 的主题更新
信息提示
请填处理意见