【发布时间】:2020-12-11 20:50:15
【问题描述】:
我有一个问题,我被困在里面了;
我想通过定义的配置文件在墙上捕捉相位的 VOF。是否有任何用于此目的的宏,以及使用什么数据访问和循环宏?
我在这里发送我的代码,所以如果你能帮助我,我将不胜感激。但是当我应用我的代码时,一旦我初始化解决方案,流利的就会崩溃。
DEFINE_PROFILE(heatflux_slip_shoulder_W, t, i)
{
/*Domain *d=Get_Domain(1);*/
int phase_domain_index = 0; /* primary phase index is 0 */
Thread *tm = THREAD_SUPER_THREAD(t);
Thread *subthread = THREAD_SUB_THREAD(tm,phase_domain_index);
double p[ND_ND]; /* this will hold the position vector */
double x, y, r, qslip, sigma, tav_stick, tav_fric, temp, Vx, Vy, Vz, V_W, V_T, VF;
double w = 1120;
double pi = 3.1415927;
double U = 0.002;
double press = 50000000;
double delta = 0.65;
double etta = 0.7;
double heat_ratio = 0.6383;
double Rshol = 0.0075;
double fric ;
double Rpin = 0.0025;
face_t f;
/*thread_loop_f(f, d)*/
{
begin_f_loop(f,t)
{
VF =F_VOF(f,subthread);
F_CENTROID(p, f, t);
x = p[0];
y = p[2];
r = sqrt((x*x) + (y*y));
temp = F_T(f,t);if ((297.<=temp)&&(temp<=273.))
{
sigma_6 = 325.80263157895 + (-0.171052631578952 * temp);
sigma_5 = 282.355263157897 + (-0.0921052631578974*temp);
}
...(and some conditions like above)...
if ((297.<=temp)&&(temp<=855.))
fric = 0.383752244165171 + (-0.000448833034111311 * temp);
else
fric = 0;
tav_6 = sigma_6*1000000/1.732;
tav_5 = sigma_5*1000000/1.732;
tav = VF * tav_6 + (1 - VF ) * tav_5;
qslip = ((pi*w*r/30) - (U*y/r)) * ((etta * (1 - delta) * tav) + (delta * fric * press));
F_PROFILE(f, t, i) = heat_ratio * qslip;
}
end_f_loop(f,t)
}
【问题讨论】:
-
您的代码是缩进的,指的是未定义的宏、函数和类型...您必须为任何人提供更多的上下文来理解这一点。
标签: c++ c user-defined-functions fluent