如何在Fluent使用非牛顿流体【转载】

转载自:http://blog.sciencenet.cn/blog-267817-747504.html

1、非牛顿流体:剪应力与剪切应变率之间满足线性关系的流体称为牛顿流体,而把不满足线性关系的流体称为非牛顿流体。

2fluent中使用非牛顿流体

a、层流状态:直接在材料物性下设置材料的粘度,设置其为非牛顿流体。

b、湍流状态

fluent在设置湍流模型后,会自动将材料的非牛顿流体性质直接改成了牛顿流体,因此需要做一些修改。最基本的方式有两种:1、打开隐藏的湍流模型下非牛顿流体功能;2,直接利用UDFDEFINE_PROPERTY定义

3、打开隐藏的湍流模型下非牛顿流体功能

方法为:

1)在湍流模型中选择标准的k-e模型;

2)在Fluent窗口输入命令:define/models/viscous/turbulence-expert/turb-non-newtonian然后回车。

3)输入:y然后回车。

4、利用DEFINE_PROPERTY

A:这是一个自定义材料的粘度程序如下,也许对你有帮助。

在记事本中编辑的,另存为"visosity1.c"

#include "udf.h"

DEFINE_PROPERTY(cell_viscosity,cell, thread)

{

real mu_lam;

real trial;

rate=CELL_STRAIN_RATE_MAG(cell, thread);

real temp=C_T(cell, thread);

mu_lam=1.e12;

{

if(rate>1.0e-4 && rate<1.e5)

trial=12830000./rate*log(pow((rate*exp(17440.46/temp)/1.535146e8),0.2817)+pow((1.+pow((rate*exp(17440.46/temp)/1.535146e8),0.5634)),0.5));

else if (rate>=1.e5)

trial=128.3*log(pow((exp(17440.46/temp)/1.535146e8),0.2817)+pow((1.+pow((exp(17440.46/temp)/1.535146e8),0.5634)),0.5));

else

trial=1.283e11*log(pow((exp(17440.46/temp)/1.535146e12),0.2817)+pow((1.+pow((exp(17440.46/temp)/1.535146e12),0.5634)),0.5));

}

else if(temp>=855.&&temp<905.)

{

if(rate>1.0e-4 && rate<1.e5)

 

trial=12830000./rate*log(pow((rate*4.7063),0.2817)+pow((1.+pow((rate*4.7063),0.5634)),0.5))*pow(10.,-0.06*(temp-855.));

else if (rate>=1.e5)

trial=243.654*pow(10.,-0.06*(temp-855.));

else

trial=1.47897e10*pow(10.,-0.06*(temp-855.));

}

else if(temp>=905.)

{

if(rate>1.0e-4 && rate<1.e5)

trial=12830./rate*log(pow((rate*4.7063),0.2817)+pow((1.+pow((rate*4.7063),0.5634)),0.5));

else if (rate>=1.e5)

trial=0.24365;

else

trial=1.47897e7;

}

if(trial<1.e12&&trial>100.)

mu_lam=trial;

else if(trial<=1.)

mu_lam=1.;

else

mu_lam=1.e12;

return mu_lam;

}

B:在Fluent中使用Herschel-Bulkley粘性模型:

#include "udf.h"

real T,vis, s_mag, s_mag_c,sigma_y,n,k;

real C_1 = 1.0;

real C_2 = 1.0;

real C_3 = 1.0;

real C_4 = 1.0;

int ia ;

DEFINE_PROPERTY(hb_viscosity,c,t)

{

T=C_T(c, t);

s_mag =CELL_STRAIN_RATE_MAG(c,t);

 

if(ia==0.0)

{

C_1 =RP_Get_Real("c_1");

C_2 =RP_Get_Real("c_2");

C_3 =RP_Get_Real("c_3");

C_4 =RP_Get_Real("c_4");

ia = 1;

}

k= C_1 ;

n= C_2 ;

sigma_y = C_3 ;

s_mag_c = C_4 ;

if(s_mag < s_mag_c)

{

vis=sigma_y*(2-s_mag/s_mag_c)/s_mag_c+k*((2-n)+(n-1)*s_mag/s_mag_c)*pow(s_mag_c,(n-1));

}

else

{

vis = sigma_y / s_mag +k*pow(s_mag, (n-1));

}

return vis;

}

posted @ 2016-03-25 02:45  硫酸亚铜  阅读(5376)  评论(0编辑  收藏  举报