| 查看: 3335 | 回复: 7 | ||
[求助]
有关fluent中求specific heat 的UDF编写
|
|
在fluent中模拟流化床,想要用UDF编写相变颗粒Cp随温度变化,因为在这个里面涉及温度变化,所以是cp根据固相的温度变化,固相的id是3,我也不太清楚如何引用固相的温度,我写的代码如下 DEFINE_SPECIFIC_HEAT(specific_heat,cell,thread) { real cp; real temp=C_T(cell, thread); if (temp<318.3) cp = 1457.28; else if(temp>324.6) cp = 1668.7; else cp=1458.3+210.4*(temp-318.3)/6.3; return cp; } 在插入时总是在报错,能否有人能指导一下,或者有这方面的的经验 Error: E:/ansys with heat/Nouveau dossier 1/geometrique_files/dp0/FFF/Fluent/conduct2.c: line 56: parse error. Error: E:/ansys with heat/Nouveau dossier 1/geometrique_files/dp0/FFF/Fluent/conduct2.c: line 59: parse error. Error: E:/ansys with heat/Nouveau dossier 1/geometrique_files/dp0/FFF/Fluent/conduct2.c: line 60: temp: undeclared variable |
» 猜你喜欢
遇见不省心的家人很难过
已经有16人回复
退学或坚持读
已经有25人回复
博士延得我,科研能力直往上蹿
已经有4人回复
免疫学博士有名额,速联系
已经有14人回复
面上基金申报没有其他的参与者成吗
已经有4人回复
多组分精馏求助
已经有6人回复
2楼2018-01-20 08:53:05
cheersend
至尊木虫 (著名写手)
- 应助: 74 (初中生)
- 金币: 14739.2
- 红花: 20
- 帖子: 1513
- 在线: 558小时
- 虫号: 1496027
- 注册: 2011-11-17
- 专业: 传热传质学
3楼2018-01-20 18:54:35
4楼2018-01-20 19:21:04
5楼2018-01-20 19:22:10

6楼2021-08-23 20:48:07

7楼2021-08-23 20:48:25
Marma_lade
银虫 (小有名气)
- 应助: 1 (幼儿园)
- 金币: 329.9
- 散金: 20
- 沙发: 1
- 帖子: 162
- 在线: 37.2小时
- 虫号: 26958648
- 注册: 2021-08-07
- 性别: MM
- 专业: 燃烧学
|
Tref是指“reference temperature for the enthalpy calculation”, 即计算焓值时的参考温度 yi是指“pointer to array of mass fractions of gas phase species”,即气相组分质量分数的指针 显焓不需要写成积分形式 下面是UDF的例子 /****************************************************************** UDF that computes specific heat and sets the sensible enthalpy to the referenced value * * * * ************************************************************** #include "udf.h" DEFINE SPECIFIC HEAT(my_user_cp, T, Tref, h, yi) { real cp=2000; *h=cp*(T-Tref); return cp; } |
8楼2022-06-16 11:07:38













回复此楼