|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?注册
x
1.
begin_f_loop(f,t)
if PRINCIPAL_FACE_P(f,t) /* tests if the face is the principle face FOR COMPILED UDFs ONLY */
{
NV_D(flux, =, F_U(f,t), F_V(f,t), F_W(f,t)); /* defining flux in terms of velocity field */
NV_S(flux, *=, F_R(f,t)); /* multiplying density to get flux vector */
F_AREA(A,f,t); /* face normal vector returned from F_AREA */
massflowrate += F_YI(f,t,i)*NV_DOT(flux,A); /* dot product of the inlet surface flux and area vector, multiplied by the mass fraction of species i */
}
end_f_loop(f,t)
2.
if PRINCIPAL_FACE_P(f,t) /* tests if the face is the principle face FOR COMPILED UDFs ONLY */
{
massflowrate += F_YI(f,t,i)*F_FLUX(f,t)*F_AREA(A,f,t); /* dot product of the inlet surface flux and area vector, multiplied by the mass fraction of species i */
}
不知道我的理解对不对,上面两个方法里的 begin_f_loop 和 end_f_loop, right到底需要不需要呢?
F_FLUX(f,t)和F_AREA(A,f,t)是矢量,要用NV_DOT的方式来求点积,再和F_YI(f,t,i)相乘,如何?可是这个F_YI(f,t,i)却是一个数组啊,不是一个单独的具体的数...
难道NV_DOT(flux,A)也是一个数组?
谢谢 |
|