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

为何fluent提示violation access

[复制链接]
发表于 2006-9-21 12:21:31 | 显示全部楼层 |阅读模式

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

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

x
#include "udf.h"
#define OMG 10 /* revolution rate*/
#define R 0.5 /*Radius of the fan*/
#define N_b 4 /*number of blades*/
#define c 0.01 /*chord of blades*/
#define C_l 0.07 /* lift factor*/
#define Rou 1.25 /*density*/
#define Pitch 10 /*collective pitch*/
#define angle0 -10 /*twist angle*/
#define pi 3.1415
DEFINE_PROFILE(fan_p_jump, thread, index)
{
  real x[ND_ND];
  real v,r,a_f,a_a;/*velocity,radius, fixed angle and angle of attack*/
  real l_r;/*lift of unit span length*/
  face_t f;
   
  begin_f_loop(f, thread)
  {
    F_CENTROID(x, f, thread);
    r=pow(x[1]*x[1]+x[2]*x[2],0.5);
    a_f=Pitch+angle0*(r/R-0.75);
    v=F_W(f, thread);
    a_a=a_f+atan(v/(OMG*r));
       l_r=0.5*Rou*c*(pow(v,2)+pow(OMG*r,2))*C_l*a_a;   
    F_PROFILE(f, thread, index)=N_b*l_r/(2*pi*r);
  }
  end_f_loop(f, thread)
}
F_W(f,t) 访问面元的速度时有什么限制吗?上述程序只要去掉F_W(f,t)就没有问题,但是在程序中我需要面元上的速度值,有其他办法吗?
发表于 2006-9-22 01:43:52 | 显示全部楼层

为何fluent提示violation access

什么时候出的问题
 楼主| 发表于 2006-10-3 20:10:39 | 显示全部楼层

为何fluent提示violation access

fluent初始化时
问题找到了,原来所访问的边界面上没有储存速度信息。所以我就借用与面相邻的两个单元的速度平均来获得所需要的速度。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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