| 查看: 3284 | 回复: 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 |
» 猜你喜欢
对氯苯硼酸纯化
已经有3人回复
求助:我三月中下旬出站,青基依托单位怎么办?
已经有12人回复
不自信的我
已经有12人回复
假如你的研究生提出不合理要求
已经有5人回复
所感
已经有4人回复
论文终于录用啦!满足毕业条件了
已经有28人回复
要不要辞职读博?
已经有7人回复
北核录用
已经有3人回复
实验室接单子
已经有3人回复
磺酰氟产物,毕不了业了!
已经有8人回复
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












回复此楼