[ANSYS, Inc. Logo] return to home search
next up previous contents index

2.3.21 DEFINE_SPECIFIC_HEAT



Description


The DEFINE_SPECIFIC_HEAT macro can be used to define temperature dependent functions for specific heat and sensible enthalpy for fluid, solid and mixture materials (this does not include DPM particles). These functions must be defined in a consistent manner, that is, the enthalpy function should be the temperature integral of the specific heat function.

figure   

This option is not available with the premixed, non-premixed and partially premixed models, and should be used as a compiled UDF only.



Usage



DEFINE_SPECIFIC_HEAT( name, T, Tref, h, yi)


Argument Type Description
symbol name UDF name
real T Temperature for the calculation of the specific heat and enthalpy
real Tref Reference temperature for the enthalpy calculation
real *h Pointer to real
real *yi Pointer to array of mass fractions of gas phase species
   
Function returns  
real  
   

There are five arguments to DEFINE_SPECIFIC_HEAT: name, T, Tref, h, and yi. You supply name, the name of the UDF. T and Tref are real variables that are passed by the ANSYS FLUENT solver to the UDF, and h is a pointer to real.

The UDF needs to return the real value of the specific heat, and set the sensible enthalpy to the value referenced by the real pointer h. Note that the entropy is not computed in the UDF, instead ANSYS FLUENT sets the entropy as $S=cp(Tmean)log(T/Tref)$, where $cp$ is computed by the UDF at $Tmean$, and $Tmean$ is the mean logarithmic average of T and Tref.



Example


/**********************************************************************
   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; 
}



Hooking a Specific Heat UDF to ANSYS FLUENT


After the UDF that you have defined using DEFINE_SPECIFIC_HEAT is compiled (Chapter  5), the name that you specified in the DEFINE macro argument (e.g., my_user_cp) will become visible and selectable in the Create/Edit Materials dialog box in ANSYS FLUENT. See Section  6.2.21 for details.


next up previous contents index Previous: 2.3.20 DEFINE_SOX_RATE
Up: 2.3 Model-Specific DEFINE Macros
Next: 2.3.22 DEFINE_SR_RATE
Release 12.0 © ANSYS, Inc. 2009-01-14