一下依次为原油粘度、粘度和导热系数的UDF。本来想把函数给你写好的,一看你的公式那么长就取消没这个念头了。希望对你有帮助。 #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; }