|
|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?注册
x
偶怕不能毕业了5555555
用fluent软件时,采用ufd定义温度函数的时候编了个小程序,but不能读入,我也不知问题出在哪里555555555555555,求求各位大虾美眉帮帮忙啊:
温度函数是一个分段函数,都是线形的,求各位帮我找找是什么问题啊:
#include "udf.h"
DEFINE_PROFILE(tem_profilez5, t, i)
{
real a[ND_ND];/* this will hold the position vector */
real x;
face_t f;
begin_f_loop(f, t)
{
F_CENTROID(a,f,t);
x = a[2];
if(x>=0.515)
F_PROFILE(f, t, i) = 870-(x-0.515)*400/(0.8355-0.515);
if(x>=0.24&&x<0.515) F_PROFILE(f, t, i) = 1320-(x-0.24)*450/(0.515-1.705);
if(x>=-0.14&&x<0.24) F_PROFILE(f, t, i) = 1320;
if(x>=-0.82&&x<-0.14) F_PROFILE(f, t, i) = 1120+(x+0.82)*200/(-0.14+0.82);
if(x>=-0.97&&x<-0.82) F_PROFILE(f, t, i) = 1120;
if(x>=-1.385&&x<-0.97) F_PROFILE(f, t, i) = 670+(x+1.385)*450/(1.385-0.97);
if(x<=-1.385)F_PROFILE(f, t, i) = 370+x*300/0.16;
}
end_f_loop(f, t)
}
|
|