CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT > Fluent UDF and Scheme Programming

Specific heat UDF

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 17, 2016, 18:05
Default Specific heat UDF
  #1
New Member
 
Nisse Nillson
Join Date: Oct 2016
Posts: 1
Rep Power: 0
Bamse is on a distinguished road
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.
Bamse is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


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


All times are GMT -4. The time now is 21:25.