24小时热门版块排行榜    

查看: 1107  |  回复: 2

a892647017

铁虫 (初入文坛)

[求助] fluent udf 中一个语句不懂 求指点 已有1人参与

今天看了fluent udf的一个例子:DEFINE_PROFILE(scalarMixedBC, thread, nv)
{
  /* constants must be specified correctly for the mixed BC */
  real hC, PHI1_inf;

  /* ==================== */

  face_t f;
  
  real A[ND_ND], dG[ND_ND], dr0[ND_ND], es[ND_ND], dr, A_by_es;
  real Af;
  real beta0, gamma;
  real temp1, temp2;
  
  Thread *t0=thread->t0;
  hC=20.0;
  PHI1_inf=550.0;


  begin_f_loop(f, thread)
    {

     /* identify the cell thread adjacent to the face thread f */
      cell_t c0 = F_C0(f, thread);

      BOUNDARY_FACE_GEOMETRY(f, thread, A, dr, es, A_by_es, dr0);
      Af=NV_MAG(A);
      gamma=C_UDSI_DIFF(c0, t0, phi1);

      if (NULLP(T_STORAGE_R_NV(t0, SV_UDSI_G(phi1))))
        beta0=0;  /* if gradient is not allocated and stored yet, bypass
                     the following macro (it happens when case/data files are being read */
      else
        BOUNDARY_SECONDARY_GRADIENT_SOURCE(beta0, SV_UDSI_G(phi1),dG, es, A_by_es, gamma);

  /* temporary variables used in the profile expression */
      temp1=gamma*A_by_es/dr;
      temp2=hC*Af;
      
      
      F_PROFILE(f, thread, nv)
        = (temp1*C_UDSI(c0, t0, phi1)- beta0 + temp2*PHI1_inf)/(temp2 + temp1);
    }
  end_f_loop(f, thread)
  
}
Thread *t0=thread->t0; 这一行是啥意思 真是搞不懂,希望哪位大神能指点一下。
回复此楼
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

poptiger

银虫 (小有名气)

【答案】应助回帖

★ ★ ★ ★ ★
a892647017: 金币+5, ★★★很有帮助 2016-12-02 08:34:02
Thread *t0=thread->t0;
这句执行完毕后,t0中存储的是“指向边界相邻的流体区域的thread”

参考Fluent源文件中mem_grid.h中的定义。
明以自强不息,智以厚德载物。
2楼2016-11-10 10:45:40
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

a892647017

铁虫 (初入文坛)

引用回帖:
2楼: Originally posted by poptiger at 2016-11-10 10:45:40
Thread *t0=thread->t0;
这句执行完毕后,t0中存储的是“指向边界相邻的流体区域的thread”

参考Fluent源文件中mem_grid.h中的定义。

谢谢啦 看到的比较晚
3楼2016-12-02 08:34:20
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
相关版块跳转 我要订阅楼主 a892647017 的主题更新
信息提示
请填处理意见