|
[Sponsors] |
How To write a Correct UDF (FLUENT) for Specific heat as Function of Temperature for |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
December 4, 2019, 21:37 |
How To write a Correct UDF (FLUENT) for Specific heat as Function of Temperature for
|
#1 |
New Member
ATUL S B
Join Date: Sep 2019
Posts: 7
Rep Power: 7 |
This UDF didnt Get Any Error message but its not running, Can someone correct the UDF BELOW? {Suggest Changes Required}
Should I add anything Related To Enthalpy or Some UDM MACRO like C_UDMI(c,t,0) = cp DEFINE_SPECIFIC_HEAT(cell_SpecificHeat, T, Tref, h, yi) { real T = C_T(c, t); real cp; if (500< T <550) { cp = (0.63464529*pow(T,2))-(356.13993666*T)+(61767.53243895); } else if (550< T <600.10) { cp = (0.23484528*pow(T,2))-(250.13953470*T)+(71466.09249852); } else if (600.10< T < 625.15) { cp = (1.58260392*pow(T,2))-(1873.17493506*T)+(560143.47661247); } else if (625.15< T <640) { cp = (16.13751699*pow(T,2))-(20137.03882161*T)+(6289718.12316515); } else { cp = 13000; } *h = cp*(T-Tref); return cp; } Regards Last edited by atulsbhat; December 5, 2019 at 15:29. |
|
December 6, 2019, 07:10 |
|
#2 |
Member
Join Date: Mar 2016
Posts: 73
Rep Power: 10 |
Did you hook the UDF and set it up as your material properties?
|
|
December 6, 2019, 16:26 |
How To Set Tref And What Should be my Tref for The Above UDF?
|
#3 |
New Member
ATUL S B
Join Date: Sep 2019
Posts: 7
Rep Power: 7 |
||
December 9, 2019, 01:07 |
|
#4 |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 |
COMPILE your code and READ error log file,
you've defined T twice remove real T = C_T(c, t);
__________________
best regards ****************************** press LIKE if this message was helpful |
|
December 10, 2019, 11:57 |
|
#5 |
New Member
ATUL S B
Join Date: Sep 2019
Posts: 7
Rep Power: 7 |
I am Not Sure Where to Set Tref For Cp in the Materials Panel
Where Can I set Tref for UDF? Should I Define it in My UDF ? Like real Tref=600; or its Not Possible to Alter it (by default its 298K) ? In the Manual There is No Mention of how to add it.. {Only for multiphase there is an option because of latent heat} What Is Tref, will it effect my Cp or its only for sensible enthalpy calculation?? Last edited by atulsbhat; December 10, 2019 at 19:41. |
|
Tags |
ansys fluent 18.0, ansys fluent 19.0, cfd - post, fluent - udf, udf and programming |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
UDF for specific heat as function of pressure | ghobold | Fluent UDF and Scheme Programming | 20 | August 22, 2019 09:19 |
Linking initial data and source terms from UDF to Fluent in simulating heat pipe | say2017 | Fluent UDF and Scheme Programming | 0 | October 20, 2017 13:35 |
Ansys CFX problem: unexpected very high temperatures in premix laminar combustion | faizan_habib7 | CFX | 4 | February 1, 2016 18:00 |
Difficulty In Setting Boundary Conditions | Moinul Haque | CFX | 4 | November 25, 2014 18:30 |
The fluent stopped and errors with "Emergency: received SIGHUP signal" | yuyuxuan | FLUENT | 0 | December 3, 2013 23:56 |