找回密码
 注册
查看: 2602|回复: 1

[求助]请高手指点

[复制链接]
发表于 2005-9-1 17:24:19 | 显示全部楼层 |阅读模式

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

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

x
/***********************************************************************
   vprofile.c                                                         
   UDF for specifying steady-state velocity profile boundary condition
************************************************************************/
#include "udf.h"
DEFINE_PROFILE(inlet_x_velocity, thread, position)
{
  real x[ND_ND];/* this will hold the position vector */
  real y;
  face_t f;
  begin_f_loop(f, thread)
    {
      F_CENTROID(x,f,thread);
      y = x[1];
      F_PROFILE(f, thread, position) = 20. - y*y/(.0745*.0745)*20.;
    }
  end_f_loop(f, thread)
}
上面是FLUENT中UDF的一个原例,读入FLUENT中interpret时出现错误:
Error: C:\Documents and Settings\Administrator\My Documents\libudf\src\myudf.c.txt: line 1: parse error.
不明白,第一行就有语法错误.我刚学,实在不懂,请高手指点,不胜感激.
发表于 2005-9-1 22:27:23 | 显示全部楼层

[求助]请高手指点

最好别在文本编辑器里面写,你可以去找一个类似于winTC的编辑器,这样第一行就不会出错啦,一般是这样的
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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