#include"udf.h"
#define v 0.01 /*焊接速度*/
#define Tl 1723 /*液相线温度*/
#define Ts 1670 /*固相线温度*/
#define Ta 300 /*环境温度*/
#define Cp 753 /*比热*/
#define ST 0.0000000567 /*stefan-Boltzmann常数*/
#define β 0.0004 /*热膨胀系数*/
#define QL 0.0000247 /*熔化潜热*/
#define ε 0.4 /*表面辐射系数*/
#define μ 0.00000126 /*真空磁导率*/
#define I 180 /*焊接电流*/
#define U 16 /*焊接电压*/
DEFINE_PROPERTY(cell_viscosity,c,t)
{
real mu_lam;
real temp = C_T(c,t);
if(temp>=1713)
mu_lam = 37.203-0.0176*temp;
else if(temp>=1743)
mu_lam = 20.354-0.008*temp;
else if(temp>=1763)
mu_lam = 34.849-0.0162*temp;
else if(temp>=1853)
mu_lam = 13.129-0.0045*temp;
else
mu_lam = 4.7005;
return mu_lam;
}
DEFINE_PROPERTY(thermal_conductivity,c,t)
{
real conductivity_diff;
real temp = C_T(c,t);
if(temp<=780)
conductivity_diff = 10.717+0.014955*temp;
else if(temp<=1672)
conductivity_diff = 12.076+0.013213*temp;
else if(temp<=1727)
conductivity_diff = 217.12-0.1094*temp;
else
conductivity_diff = 8.278+0.0115*temp;
return conductivity_diff;
}
DEFINE_PROFILE(flux_profile,t,i)
{
real d[ND_ND];
real x;
real y;
face_t f;
real flow_time = RP_Get_Real("flow-time");
begin_f_loop(f,t);
{
F_CENTROID(d,f,t);
x = d[0];
y = d[1];
F_PROFILE(f,t,i) = 7.7e7*exp(-3*(pow((y-0.025),2)+
pow((x-0.002*flow_time),2))/0.005/0.005);
}
end_f_loop(f,t)
}
DEFINE_PROFILE(b_j,t,i)
{
real d[ND_ND];
real x;
real y;
face_t f;
begin_f_loop(f,t);
{
F_CENTROID(d,f,t);
x = d[0];
y = d[1];
if(x<1073)
F_PROFILE(f,t,i) = (10+0.0119*x)*(x-300)+2.268e-8*(pow((x),4)-8.1e9);
else
F_PROFILE(f,t,i) = (105+0.363*(x-1073))*(x-300)+2.268e-8*(pow((x),4)-8.1e9);
}
end_f_loop(f,t)
}
高斯热源UDF.zip
版权申诉
127 浏览量
2021-12-31
19:15:59
上传
评论
收藏 3KB ZIP 举报
mYlEaVeiSmVp
- 粉丝: 1924
- 资源: 19万+