找回密码
 注册
查看: 2998|回复: 4

二类边界条件 udf

[复制链接]
发表于 2006-3-18 10:12:02 | 显示全部楼层 |阅读模式

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

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

x
#include"udf.h"
DEFINE_PROFILE(outlet_x_velocity,thread,position)
{
  cell_t c;
  face_t f;
  Thread *tc;
  real velo;
  begin_f_loop(f,thread)
{
  c=F_C0(f,thread);/*获得边界处相邻网格C0的cell index*/
  tc=THREAD_T0(thread);/*获得C0的cell thread*/
  velo=C_U(c,tc);/*获得C0的速度分量U*/
  F_PROFILE(f,thread,position)=velo;
  }
  end_f_loop(f,thread)
  }
我写的这个基本的思路是让出口边界上的速度和邻近网格上的速度一致
但问题是计算结果不对,知道问题所在的帮忙看看,指导我一下。
发表于 2006-4-14 20:49:05 | 显示全部楼层

二类边界条件 udf

UDFs基本没有问题,最好把你的case文件,或具体问题说出来
发表于 2006-4-14 23:03:20 | 显示全部楼层

二类边界条件 udf

没有考虑局部质量守恒。
除非你上面的出口很远。
另外就是这个本来是outflow(这里没法udf)的边界条件,现在是那个条件?。
发表于 2006-4-18 11:31:12 | 显示全部楼层

二类边界条件 udf

如何考虑局部质量守衡?
发表于 2011-1-22 15:04:54 | 显示全部楼层
outflow边界好像是默认这里的变量梯度已经为零了吧,你这样的赋值等于什么都没做
Outflow boundary conditions are used to model flow exits where the details of the flow velocity and pressure are not known prior to solution of the flow problem.
They are appropriate where the exit flow is close to a fully developed condition, as the outflow boundary condition assumes a zero normal gradient for all flow variables except pressure.
They are not appropriate for compressible flow calculations.

[ 本帖最后由 invader 于 2011-1-22 07:06 编辑 ]
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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