#include"udf.h"
DEFINE_PROFILE(velocity_inlet, thread, i)
{
face_t f;
begin_f_loop(f,thread)
{
real t0 = RP_Get_Real("flow-time" ;
real m = t0 / 0.8;
real t = t0 - floor(m)*0.8;
real y;
real z = 12 * M_PI*12.5*12.5;
if (t < 0.008)
F_PROFILE(f, thread, i) = 3 * t / 4;
else if (t < 0.24)
{
y = 2.7076 * 1000000 * t*t*t*t*t*t - 2.1752 * 1000000 * t*t*t*t*t + 6.6541 * 100000 * t*t*t*t - 9.4959 * 10000 * t*t*t + 5.7071 * 1000 * t*t - 40.7489*t + 0.0422;
F_PROFILE(f, thread, i) = 1000 * y / z;
}
else if (t < 0.28)
{
y = 125 * t*t - 42.5*t + 2.4;
F_PROFILE(f, thread, i) = y * 1000 / z;
}
else if (t < 0.3)
{
y = 4.5 - 15 * t;
F_PROFILE(f, thread, i) = y * 1000 / z;
}
else
F_PROFILE(f, thread, i) = 0;
}
end_f_loop(f, thread)
}
![fluent入口速度方程出错 求大神帮助]()
1.png |