找回密码
 注册
查看: 2713|回复: 3

udf错误

[复制链接]
发表于 2010-9-25 08:55:42 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?注册

x
DEFINE_UDS_FLUX(current_density,f,t,i)
/*define the current flux*/
{
Thread *t0,*t1=NULL;
cell_t c0,c1=-1;
real NV_VEC(current);
real NV_VEC(A);
#define ion_move (0.0005)
/* neighboring cells of face f, and their (corresponding) threads */
t0=F_C0_THREAD(f,t);
c0=F_C0(f,t);
if (NULL!= F_C1_THREAD(f,t))
/* Alternative: if (! BOUNDARY_FACE_THREAD_P(t)) */
{
      t1=F_C1_THREAD(f,t);
      c1=F_C1(f,t);
    }
  else
    {
      t1=NULL;
      c1=-1;
    }
  /* If Face lies at domain boundary, use face values; */
  /* If Face lies IN the domain, use average of adjacent cells. */
  if (NULL==t1)
  /* Alternative: if (BOUNDARY_FACE_THREAD_P(t)) */
    {
      NV_D(ion_vel, =, F_U(f,t), F_V(f,t), F_W(f,t));
      NV_NV(current,=,ion_move*electricity_intensity,+,ion_vel)
    }
  else
    {
      NV_D(ion_vel, =, C_U(c0,t0), C_V(c0,t0), C_W(c0,t0));
      NV_D(current, =, ion_move* ion_vel)
      }
  /* Now ion_vel contains our "ion_vel" from above. */
  /* Next, get the face normal vector: */
  F_AREA(A, f, t);
  /* Finally, return the dot product of both.  */
  /* Fluent will multiply the returned value   */
  /* by phi_f (the scalar's value at the face) */
  /* to get the "complete" advective term*/
  return NV_DOT(current, A);
以上是UDS通量宏,进行解释时出现下列错误提示:
错误提示:cpp -I"C:\Fluent.Inc\fluent6.3.26/src" -I"C:\Fluent.Inc\fluent6.3.26/cortex/src" -I"C:\Fluent.Inc\fluent6.3.26/client/src" -I"C:\Fluent.Inc\fluent6.3.26/multiport/src" -I. -DUDFCONFIG_H="<udfconfig.h>" "J:\tongdao\new-voltage.c"
Error: J:\tongdao\new-voltage.c: line 10: THREAD_STORE: undeclared variable
请教各位高手错误出在哪里,该如何修改?
发表于 2010-9-26 12:48:17 | 显示全部楼层
连个头文件都没有啊?第十行有个变量未定义
 楼主| 发表于 2010-9-26 14:57:23 | 显示全部楼层

回复 2# 浪子轻狂 的帖子

头文件省略没写出来,提示上说变量THREAD_STORE未定义,而F_C0_THREAD(f,t)是直接对线元的调用,该如何定义?忘指教一二,真诚求教!
发表于 2011-11-4 09:48:17 | 显示全部楼层
t0=F_C0_THREAD(f,t) THREAD_STORE: undeclared variable
解决了么????我也遇见这个问题了
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表