找回密码
 注册
查看: 1987|回复: 3

[原创]关于三维速度入口的udf编程

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

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

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

x
[watermark]程序如下:
   /*******************************************************************/
          /* vprofile.c                                              */
         /* UDF for specifying steady-state velocity  boundary condition   */
          /*****************************************************************/
              #include "udf.h"
              #include "math.h"
              DEFINE_PROFILE(inlet_y_velocity, thread, position)
              {
              real x[ND_ND][ND_ND];     /* this will hold the position vector */
              real z;
              face_t f;
              begin_f_loop(f, thread)
              {
              F_CENTROID(x,f,thread);
              z = x[0][0];
              F_PROFILE(f, thread, position) = 7.5*pow(z/0.2,0.25);
              }
              end_f_loop(f, thread)
              }
可是调试出现:Error: C:\fluent软件\shuju\3-d high rise building 补充\velocity.c: line 1: parse error.
语法错误,我是看了一个二维的例子作了稍微的改动,有大侠知道是怎么回事吗?
不胜感激[/watermark]
发表于 2005-9-26 19:48:17 | 显示全部楼层

[原创]关于三维速度入口的udf编程

You need a C editor, like Wintc,if you run Fluent with os of Windows. Redit your code in Wintc , the error will disappear automatically.hope it helps.
发表于 2005-10-14 20:49:59 | 显示全部楼层

[原创]关于三维速度入口的udf编程


老大这个地方不对。。real x[ND_ND][ND_ND];。应该是
real x[ND_ND]     
相应的x〔0〕代表x轴
x[1],x[2],可代表yz轴
发表于 2005-10-17 10:18:10 | 显示全部楼层

[原创]关于三维速度入口的udf编程

rener说得很对。
C:\fluent软件\shuju\3-d high rise building 补充\velocity.c: line 1: parse error.
这个路径也不对,文件夹的名字不能出现空格,否则通不过的。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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