| 查看: 3298 | 回复: 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 |
» 猜你喜欢
拟解决的关键科学问题还要不要写
已经有8人回复
存款400万可以在学校里躺平吗
已经有24人回复
最失望的一年
已经有7人回复
推荐一本书
已经有16人回复
国自然申请面上模板最新2026版出了吗?
已经有20人回复
26申博
已经有3人回复
请教限项目规定
已经有3人回复
基金委咋了?2026年的指南还没有出来?
已经有10人回复
基金申报
已经有6人回复
疑惑?
已经有5人回复
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













回复此楼