24小时热门版块排行榜    

北京石油化工学院2026年研究生招生接收调剂公告
查看: 3200  |  回复: 4
当前只显示满足指定条件的回帖,点击这里查看本话题的所有回帖

turking

新虫 (初入文坛)

[求助] fluent中Set_Material_Property: null user-defined-function name 已有1人参与

fluent中新建一个材料,滑油。滑油的物性参数是随温度变化的。用udf写了相关函数。

经过Define》User-Defined》Functions》Compiled,在弹出的窗口中Source Files找到了四个物性参数的源文件。
点击build,代码窗口显示Done后,点击Load,代码窗口再次显示Done。
fluent中Set_Material_Property: null user-defined-function name
fluent中Set_Material_Property: null user-defined-function name-1

然后在Materials中新建材料huayou,就出问题了。
fluent中Set_Material_Property: null user-defined-function name-2
fluent中Set_Material_Property: null user-defined-function name-3

立刻出现以下错误:
old-name (air . #f) new-name (huayou . #f)
Error: No user-defined functions have been loaded.
Error Object: #f

Primitive Error at Node 0: Set_Material_Property: null user-defined-function name

Primitive Error at Node 5: Set_Material_Property: null user-defined-function name

Primitive Error at Node 1: Set_Material_Property: null user-defined-function name

Primitive Error at Node 2: Set_Material_Property: null user-defined-function name


以下是四个udf代码:

文件名:huayou4106_cp.c
#include "udf.h"
#include "math.h"
DEFINE_PROPERTY(huayou4106_cp,c,t)
{
   real  cp;
   real temp = C_T(c,t);
    cp=(2.161443+2.555131*0.001*(temp-144)+9.535232*pow(10,-6)*pow(temp-144,2)+1.171208*pow(10,-7)*pow(temp-144,3))*1000;
    return  cp;
}

文件名:huayou4106_pho.c
#include "udf.h"
#include "math.h"
DEFINE_PROPERTY(huayou4106_pho,c,t)
{
   real pho;
   real a;
   real temp = C_T(c,t);
   pho=959.7/(1+60.4*pow(10,-5)*(temp-20));
    return pho;
}

文件名:huayou4106_tc.c
#include "udf.h"
#include "math.h"
DEFINE_PROPERTY(huayou4106_tc,c,t)
{
   real tc;
   real temp = C_T(c,t);
    tc=0.167*(1-0.0011976*temp);
    return  tc;
}

文件名:huayou4106_cviscosity.c
#include "udf.h"
#include "math.h"
DEFINE_PROPERTY(huayou4106_viscosity,c,t)
{
   real mu_lam;
   real a;
   real temp = C_T(c,t);
   a=pow(10.0,10.1295)*pow((459.7+32+temp*1.8),-3.6312f);
   mu_lam=(pow(10,a)-0.6)*pow(10,-6);
    return mu_lam;
}


刚学这些东西,刚开始时环境变量没设置好,折腾了半天终于能载入了,载入之后又陷入现在的困境。

有没有人知道这是什么原因啊?是操作的问题?代码的问题?还是?
回复此楼

» 猜你喜欢

» 本主题相关商家推荐: (我也要在这里推广)

» 本主题相关价值贴推荐,对您同样有帮助:

已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

redarmy03

新虫 (初入文坛)

lz,Set_Material_Property: null user-defined-function name这个问题解决了吗?
4楼2015-01-21 08:56:39
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
查看全部 5 个回答

yangcy8905

银虫 (著名写手)

我只知道,cp是在specific_heat里定义的。不能再property里定义。
2楼2014-08-03 14:38:01
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

conanbei

新虫 (初入文坛)

问题解决了么?我也遇到了同样的问题.......
3楼2014-12-18 21:09:45
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

梦里花落1220

新虫 (初入文坛)

【答案】应助回帖

我试了一下interpreted  然后可以了
5楼2016-03-02 21:08:02
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
最具人气热帖推荐 [查看全部] 作者 回/看 最后发表
[考研] 266分,求材料相关专业调剂 +4 哇呼哼呼哼 2026-03-30 5/250 2026-03-30 18:09 by 哇呼哼呼哼
[考研] 化学0703 调剂 306分 一志愿211 +8 26要上岸 2026-03-28 8/400 2026-03-30 16:39 by herarysara
[考研] 0703化学 +14 妮妮ninicgb 2026-03-27 14/700 2026-03-30 12:46 by fangnagu
[考研] 求化学调剂 +11 wulanna 2026-03-28 11/550 2026-03-30 10:59 by 探123
[考研] 材料与化工304求B区调剂 +4 邱gl 2026-03-26 7/350 2026-03-30 08:39 by 探123
[考研] 总分293求调剂 +8 加一一九 2026-03-25 11/550 2026-03-29 19:53 by 无际的草原
[考研] 考研调剂 +7 小蜡新笔 2026-03-29 7/350 2026-03-29 19:00 by 学员8dgXkO
[考研] 343求调剂085601 +3 要努力学习x 2026-03-29 3/150 2026-03-29 18:35 by wxiongid
[考研] 22408 359分调剂 +4 Qshers 2026-03-27 6/300 2026-03-29 14:16 by Qshers
[考研] 329求调剂 +10 钮恩雪 2026-03-25 10/500 2026-03-29 13:32 by peike
[考研] 调剂考研 +3 王杰一 2026-03-29 3/150 2026-03-29 08:09 by fmesaito
[考研] 283求调剂 +7 A child 2026-03-28 7/350 2026-03-28 12:05 by zllcz
[考研] 调剂 +3 好好读书。 2026-03-28 3/150 2026-03-28 12:04 by 王保杰33
[材料工程] 一志愿C9材料与化工专业总分300求调剂 +8 曼111 2026-03-24 9/450 2026-03-28 07:58 by YYYYX1234
[考研] 085701环境工程求调剂 +9 多久上课 2026-03-27 9/450 2026-03-28 03:58 by fmesaito
[考研] 一志愿南师大0703化学 275求调剂 +4 Ripcord上岸 2026-03-27 4/200 2026-03-27 17:00 by zhyzzh
[考研] 安徽大学专硕生物与医药专业(086000)324分,英语已过四六级,六级521,求调剂 +4 美味可乐鸡翅 2026-03-26 4/200 2026-03-27 15:27 by 星空星月
[考研] 一志愿哈工大,085400,320,求调剂 +4 gdlf9999 2026-03-24 4/200 2026-03-25 23:01 by boxking200
[考研] 求调剂 +3 李李不服输 2026-03-25 3/150 2026-03-25 13:03 by cmz0325
[考研] 085404电子信息284分求调剂 +4 13659058978 2026-03-24 4/200 2026-03-24 12:15 by syl20081243
信息提示
请填处理意见