Fluent学习笔记(18)----DEFINE_PROFILE
标签:
杂谈 |
内径为r,长度为L 的圆管,给出入口流速的分布,来模拟实际的工作过程。
1.gambit
简化为2d对称模型,inlet长度为0.02m,wall长度为0.4m,axis——symm 为对称轴。
http://s14/mw690/c041a1eb4d36715e7943d&690
入口水流速度为 u=0.5-0.5x(y/0.02)2
2.fluent
编写udf
#include"udf.h"
DEFINE_PROFILE(velocity_inlet,thread,position)
{
}
其中宏的有两自变量thread 和 position,thread 是一个指向面的thread的指针,position是一个整数,它是每一个循环(loop)内为变量设置的数字标签。
基本求解器中space项变为axisymmetric,
define—user defined –function –interpreted
http://s15/mw690/c041a1eb4d367a280fade&690
boundary condition
http://s8/mw690/c041a1eb4d3671b173147&690
initialize, compute from 为inlet。
solve即可
后处理
plot---xy plot
http://s12/mw690/c041a1eb4d3671d9e1e7b&690
得到出口处的速度分布。同时点击write to file 即可得到数据文件,用记事本就可以打开。

加载中…