|
|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?注册
x
各位大侠好,根据wxxzwb的帖子《假如我要取计算区域中坐标(1,1,1)的温度值T0,用UDF如何写这个语句》中gearboy78提供的源代码写了一个UDF,源代码如下
#include "udf.h"
Domain *domain;
DEFINE_INIT(by_coor_par,domain)
{
cell_t c;
Thread *t;
CX_Cell_Id cx_cell;
real NV_VEC(pt);
NV_D(pt,=,1,1,1); /*coordinate of your specified location,it must be in the domain coordinate range*/
CX_Start_ND_Point_Search();
cx_cell=*CX_Find_Cell_With_Point(pt);
CX_End_ND_Point_Search();
c=RP_CELL(&cx_cell); /*the right cell number*/
t=RP_THREAD(&cx_cell); /*the thread*/
}
解释后,fluent提示有如下错误:line 14:
CX_Find_Cell_With_Point: argument 1 type mismatch (array 3 of double instead of pointer to float)
有谁用过类似的代码,请指点一下。多谢。 |
|