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

脉动速度入口的udf编辑

[复制链接]
发表于 2011-1-10 11:00:28 | 显示全部楼层 |阅读模式

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

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

x
#include "udf.h"
DEFINE_PROFILE(unsteady_v,t,pos)
{
        float t,velocity;
        face_t f;
        begin_f_loop(f,t)
          {
                  t=RP_Get_Real("flow-time");
                  velocity=20.0+5.0*sin(10.*t);
                  F_PROFILE(f,t,pos)=velocity;
          }
         end_f_loop(f,t)
导入fluent提示错误为:
Error: C:\Documents and Settings\Administrator\\327\300\303\346\QD128\velocity.c: line 6: invalid type conversion: float -> pointer to char.
请老师们指教一下,谢谢先!!!
发表于 2011-1-16 09:34:04 | 显示全部楼层
DEFINE_PROFILE( name, t, i)
朋友,这是profile的原型,其中t的含义如下:
Thread *t Pointer to thread on which boundary condition is to be  applied.
这就是说,t是一个指针,指向所在的边界的,
你的udf中,将t混用了,所以需要重新定义一个变量用于存储时间,比如tt
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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