找回密码
 注册
查看: 2501|回复: 2

自己写的heatflux UDF 能解释 帮忙看下

[复制链接]
发表于 2011-12-17 03:17:32 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?注册

x
#include "udf.h"
DEFINE_PROFILE(heatflux, thread, index)
{
face_t f;
real x[ND_ND];
real z;
begin_f_loop(f, thread)
    {
      F_CENTROID(x,f,thread);
      x[2]=z;
      if(z>=0 && z<0.7)
      F_PROFILE(f, thread, index) = 406.3742762;
      if(z>=0.7 && z<0.23)
      F_PROFILE(f, thread, index) = 13470.18356;
      if(z>=0.23 && z<0.39)
      F_PROFILE(f, thread, index) = 18618.10486;
      if(z>=0.39 && z<0.55)
      F_PROFILE(f, thread, index) = 29959.73853;
      if(z>=0.55 && z<0.71)
      F_PROFILE(f, thread, index) = 35069.03267;
      if(z>=0.71 && z<0.87)
      F_PROFILE(f, thread, index) = 55434.11751;
      if(z>=0.87 && z<1.03)
      F_PROFILE(f, thread, index) = 59482.68597;
      if(z>=1.03 && z<1.19)
      F_PROFILE(f, thread, index) = 55403.51079;
      if(z>=1.19 && z<1.35)
      F_PROFILE(f, thread, index) = 65905.11904;
      if(z>=1.35 && z<1.51)
      F_PROFILE(f, thread, index) = 62508.87935;
      if(z>=1.51 && z<1.67)
      F_PROFILE(f, thread, index) = 71616.77557;
      if(z>=1.67 && z<1.83)
      F_PROFILE(f, thread, index) = 65049.23714;
      if(z>=1.83 && z<1.99)
      F_PROFILE(f, thread, index) = 72027.56938;
      if(z>=1.99 && z<2.15)
      F_PROFILE(f, thread, index) = 76909.1569;
      if(z>=2.15 && z<2.31)
      F_PROFILE(f, thread, index) = 71993.09073;
      if(z>=2.31 && z<2.47)
      F_PROFILE(f, thread, index) = 60096.47978;
      if(z>=2.47 && z<2.63)
      F_PROFILE(f, thread, index) = 61325.91117;
      if(z>=2.63 && z<2.79)
      F_PROFILE(f, thread, index) = 49455.66626;
      if(z>=2.79 && z<2.95)
      F_PROFILE(f, thread, index) = 51964.31106;      
      if(z>=2.95 && z<3.11)
      F_PROFILE(f, thread, index) = 35475.95455;      
      if(z>=3.11 && z<3.27)
      F_PROFILE(f, thread, index) = 28861.95291;
      if(z>=3.27 && z<3.43)
      F_PROFILE(f, thread, index) = 18727.80967;
      if(z>=3.43 && z<3.59)
      F_PROFILE(f, thread, index) = 9742.211276;
      if(z>=3.59 && z<3.658)
      F_PROFILE(f, thread, index) = 1485.174511;
    }
  end_f_loop(f, thread)
}
长3.658米的圆管 沿Z轴分24段不同热流密度 用这样的分段表示是否正确?
请大侠们看看 已经试过可以解释
 楼主| 发表于 2011-12-29 15:30:30 | 显示全部楼层

没高手来看看有没错啊

怎么没一个人回啊
发表于 2012-1-1 15:34:18 | 显示全部楼层

回复 2# diligence 的帖子

应该是z=x[2] 吧,初始化以后在display中看看边界是不是这样的呗就知道成功与否
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表