|
[Sponsors] |
October 17, 2016, 18:05 |
Specific heat UDF
|
#1 |
New Member
Nisse Nillson
Join Date: Oct 2016
Posts: 1
Rep Power: 0 |
Hi,
Im trying to create a UDF for the specific heat being dependent on the temperature in a solid material. As you can see the we have one equation for T >= 973.15 and another for below that. I have complied this UDF and haven't gotten any error. The simulation I'm making is a transient one. The question I have though is the calculation of "*h = cp_all*(T-Tref)" correct? Should this be an integration or not? Do I even need to have "*h = cp_all*(T-Tref)" included in the UDF? Another question that I have is what should I set the Tref to? I didn't see any guidelines on this in the UDF manual. Thanks, Code:
#include "udf.h" DEFINE_SPECIFIC_HEAT(my_user_cp, T, Tref, h, yi) { real cp_all; if (T >= 973.15) { cp_all = 0.05 * T + 102.72; *h = cp_all*(T-Tref); } else { cp_all = -0.3547 * T + 254.; *h = cp_all*(T-Tref); } return cp_all; } Last edited by Bamse; October 18, 2016 at 06:52. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
mass flow in is not equal to mass flow out | saii | CFX | 12 | March 19, 2018 06:21 |
UDF for specific heat - error | tarui23 | Fluent UDF and Scheme Programming | 0 | October 13, 2013 07:30 |
How to write udf for specific heat | nanoraja | ANSYS Meshing & Geometry | 1 | September 14, 2011 12:34 |
Constant velocity of the material | Sas | CFX | 15 | July 13, 2010 09:56 |
Two-Phase Buoyant Flow Issue | Miguel Baritto | CFX | 4 | August 31, 2006 13:02 |