fluent中使用非牛頓流體

2017-04-24  by:CAE仿真在線  來源:互聯(lián)網(wǎng)



1、非牛頓流體:剪應力與剪切應變率之間滿足線性關系的流體稱為牛頓流體,而把不滿足線性關系的流體稱為非牛頓流體。

2、fluent中使用非牛頓流體

a、層流狀態(tài):直接在材料物性下設置材料的粘度,設置其為非牛頓流體。

b、湍流狀態(tài)

fluent在設置湍流模型后,會自動將材料的非牛頓流體性質(zhì)直接改成了牛頓流體,因此需要做一些修改。最基本的方式有兩種:1、打開隱藏的湍流模型下非牛頓流體功能;2,直接利用UDF宏DEFINE_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粘性模型:

/* UDF for Herschel-Bulkley viscosity */
#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);
/* Input parameters for H-B Viscosity */
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;
}

這是一個自定義材料的粘度程序如下,也許對你有幫助。
在記事本中編輯的,另存為“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;
}

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

/* UDF for Herschel-Bulkley viscosity */
#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);
/* Input parameters for H-B Viscosity */
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;
}

另外,如果在Fluent中使用了湍流模型,那么Fluent將默認地不允許使用非牛頓流體模型,你的UDF出現(xiàn)CELL_STRAIN_RATE_MAG: undeclared variable這樣的錯誤也可能與此有關,你需要激活在湍流模型條件下使用非牛頓流體模型的選項:

方法為:

(1) 在湍流模型中選擇標準的k-e模型;

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

(3) 輸入:y 然后回車。



開放分享:優(yōu)質(zhì)有限元技術文章,助你自學成才

相關標簽搜索:fluent中使用非牛頓流體 Fluent培訓 Fluent流體培訓 Fluent軟件培訓 fluent技術教程 fluent在線視頻教程 fluent資料下載 fluent分析理論 fluent化學反應 fluent軟件下載 UDF編程代做 Fluent、CFX流體分析 HFSS電磁分析 

編輯
在線報名:
  • 客服在線請直接聯(lián)系我們的客服,您也可以通過下面的方式進行在線報名,我們會及時給您回復電話,謝謝!
驗證碼

全國服務熱線

1358-032-9919

廣州公司:
廣州市環(huán)市中路306號金鷹大廈3800
電話:13580329919
          135-8032-9919
培訓QQ咨詢:點擊咨詢 點擊咨詢
項目QQ咨詢:點擊咨詢
email:kf@1cae.com