| 查看: 3362 | 回复: 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 |
» 猜你喜欢
280求调剂
已经有3人回复
网上报道青年教师午睡中猝死、熬夜猝死的越来越多,主要哪些原因引起的?
已经有8人回复
面上可以超过30页吧?
已经有11人回复
版面费该交吗
已经有15人回复
体制内长辈说体制内绝大部分一辈子在底层,如同你们一样大部分普通教师忙且收入低
已经有18人回复
为什么中国大学工科教授们水了那么多所谓的顶会顶刊,但还是做不出宇树机器人?
已经有10人回复
什么是人一生最重要的?
已经有4人回复
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













回复此楼