本文主要参考FLUENT的UDF指南和胡坤大神的ANSYS Fluent二次开发指南
遍历区域中的网格单元
Domain *domain;
Thread *c_thread;
thread_loop_c(c_thread,domain)
{
/*对单元进行操作*/
}
遍历区域中的网格面
Thread *f_thread;
domain *domain;
thread_loop_f(f_thread,domain)
{
/*对网格面进行操作*/
}
遍历网格单元集合中的所有单元
cell_t c;
Thread *c_thread;
begin_c_loop(c, c_thread)
{
/*对网格单元进行操作*/
}
end_c_loop(c, c_thread)
遍历面集合中的所有面
face_t f;
Thread *f_thread;
begin_f_loop(f, f_thread)
{
/*对网格面进行操作*/
}
end_f_loop(f, f_thread)
遍历一个网格单元上的所有面
cell_t c;
Thread *t;
face_t f;
Thread *tf;
int n;
c_face_loop(c, t, n)
{
f = C_FACE(c,t,n);
tf = C_FACE_THREAD(c,t,n);
}
遍历网格单元中的节点
cell_t c;
Thread *t;
int n;
Node *node;
c_node_loop(c, t, n)
{
node = C_NODE(c,t,n);
}
遍历网格面中的所有节点
face_t f;
Thread *t;
int n;
Node *node;
f_node_loop(f, t, n)
{
node = F_NODE(f,t,n);
}

1万+

被折叠的 条评论
为什么被折叠?



