|
|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?注册
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
请教各位高手错误出在哪里,该如何修改? |
|