
#include "udf.h"
/*1-oil density*/
DEFINE_PROPERTY(cell_density,cell,thread)
{
real density
real temp = C_T(cell,thread)/*temp就是温度*/
density = -1172.12 /*补全你的函数*/
return density
}
/*2-oil viscosity*/
DEFINE_PROPERTY(cell_viscosity,cell,thread)
{
real viscosity
real temp = C_T(cell,thread)
viscosity = 0.001779 /*补全你的函数*/
return viscosity
}
/*3-oil thermal conductivity*/
DEFINE_PROPERTY(cell_heatconductivity,cell,thread)
{
real heatconductivity
real temp = C_T(cell,thread)
heatconductivity = -2.2969+/*补全你的函数*/
return thecon
}
UDF定义进出口,定义材料性质,定义流体初始化等,具体在用户界面里的define-----user-defined------functions导入程序文件就行,程序可以用C语言编写,用txt写字板或者word以及专业的编程软件都行,最后把它们转成.c的文件就行了你试试看吧。注意格式改写,我在这个里面打的,格式可能有问题。#include "udf.h"
DEFINE_PROFILE(inlet_velocity, thread, index)
{
real x[ND_ND],y
face_t f
begin_f_loop(f, thread)
{
F_CENTROID(x,f,thread)
y = x[1]
F_PROFILE(f, thread, index) =2.4*ln(350*y)+5.5
}
end_f_loop(f, thread)
}
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)