东方不buy 发表于 2016-11-12 12:36:34

求助define_profile宏命令的一种用法

平时用的边界条件都是施加在面上,用face循环,但是这个例子里这种用法想不通。请问有谁懂这第二种功能吗?DEFINE_PROFILE(XXXX, thread, np)到底是干啥,怎么作用?是给边界相邻网格里的流体变量赋常数值还是什么的,简单通俗点,希望各位不吝赐教,谢谢!

DEFINE_PROFILE is usually used to specify a profile condition on a boundary face zone, it can also be used to specify, or fix, flow variables that are held constant during computation in a cell zone.

#define va1 3.1131e-2
#define va2 -10.313
#define va3 9.5558e2
#define va4 -2.0051e4
#define va5 1.1856e5

DEFINE_PROFILE(fixed_v, thread, np)
{
cell_t c;
real x;
real r;
begin_c_loop (c,thread)      //请问这个cell循环的作用,一般边界条件都用face循环?
{

C_CENTROID(x,c,thread);
r =x;
F_PROFILE(c,thread,np) =
va1+(va2*r)+(va3*r*r)+(va4*r*r*r)+(va5*r*r*r*r);
}
end_c_loop (c,thread)
}

东方不buy 发表于 2016-11-15 08:58:12

大神这么多,不至于没人了解吧,求助~~~
页: [1]
查看完整版本: 求助define_profile宏命令的一种用法