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

Cp (Specific heat) UDF. When/what version???

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By agg

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 19, 2009, 15:10
Default Cp (Specific heat) UDF. When/what version???
  #1
agg
Guest
 
Posts: n/a
I've seen release notes saying UDF's can be used for specific heat. I compiled and loaded a DEFINE_PROPERTY UDF in 12.0.7, but when I select "user defined" for specific heat, a dialog pops up saying no UDFs have been loaded. What gives? Is this not fully functional yet or am I doing something wrong? Thanks!
  Reply With Quote

Old   February 21, 2009, 04:38
Default Re: Cp (Specific heat) UDF. When/what version???
  #2
bohis
Guest
 
Posts: n/a
your UDF was not either loaded or you forgot to put return Cp; to your UDF

  Reply With Quote

Old   February 23, 2009, 16:32
Default Re: Cp (Specific heat) UDF. When/what version???
  #3
agg
Guest
 
Posts: n/a
Thanks for responding. Any other possibilities? I've done both.

To check my UDF, I wanted know if a DEFINE_PROPERTY had been loaded. So, I selected user-defined for the density and my UDF is there. However, doing the same with Cp gives a pop-up saying "No user-defined functions have been loaded". So, my thinking is that the Cp UDF functionality has not been completed as of version 12.0.7.
  Reply With Quote

Old   February 23, 2009, 16:51
Default Use DEFINE_SPECIFIC_HEAT, not DEFINE_PROPERTY
  #4
agg
Guest
 
Posts: n/a
The udf.h file contains the define. Here it is:

#define DEFINE_SPECIFIC_HEAT(name, T, Tref, h, yi) real name(real T, real Tref, real *h, real *yi)

So, write a UDF so as the one below...

#include "udf.h"

/* UDF that computes Cp for diatomic oxygen, O_2 */

DEFINE_SPECIFIC_HEAT(cell_cp_o2, T, Tref, h, yi) {

real Cp;

/*

define your version of Cp here...

*/

return Cp; }
  Reply With Quote

Old   February 25, 2009, 13:02
Default Re: in addition to defining Cp, the code must
  #5
agg
Guest
 
Posts: n/a
define the enthalpy for the specie (real *h) as the integral from Tref to T of the defined/returned Cp. The mass fractions, (real *yi) are given in the specie order as defined for the material.

! If the enthalpy is not defined, calculations requiring the energy equation will not work.
iriswang likes this.
  Reply With Quote

Old   January 10, 2013, 20:25
Default About the equation for h in the UDF for Cp
  #6
Member
 
Abhijeet Shrawage
Join Date: Feb 2012
Posts: 31
Rep Power: 14
ashrawage is on a distinguished road
Quote:
Originally Posted by agg
;156886
define the enthalpy for the specie (real *h) as the integral from Tref to T of the defined/returned Cp. The mass fractions, (real *yi) are given in the specie order as defined for the material.

! If the enthalpy is not defined, calculations requiring the energy equation will not work.
Hi
I have been trying to to what you said for a while but I seem to be having a problem with the way FLuent is calculating enthalpy. The integration i have done is correct for the polynomial for Cp (T) but Fluent is pulling a Tref value which causes my h to go negative.
Can you give me any advice regarding this?
Thanks
ashrawage is offline   Reply With Quote

Old   May 3, 2013, 09:09
Post udf-cp
  #7
New Member
 
wang hui
Join Date: May 2013
Posts: 2
Rep Power: 0
iriswang is on a distinguished road
Quote:
Originally Posted by agg
;156886
define the enthalpy for the specie (real *h) as the integral from Tref to T of the defined/returned Cp. The mass fractions, (real *yi) are given in the specie order as defined for the material.

! If the enthalpy is not defined, calculations requiring the energy equation will not work.
can you tell me the detail function of the T, Tref, h, yi?????
iriswang is offline   Reply With Quote

Old   May 3, 2013, 09:17
Thumbs up udf-cp
  #8
New Member
 
wang hui
Join Date: May 2013
Posts: 2
Rep Power: 0
iriswang is on a distinguished road
Quote:
Originally Posted by ashrawage View Post
Hi
I have been trying to to what you said for a while but I seem to be having a problem with the way FLuent is calculating enthalpy. The integration i have done is correct for the polynomial for Cp (T) but Fluent is pulling a Tref value which causes my h to go negative.
Can you give me any advice regarding this?
Thanks
would you introduce the function of (T, Tref, h, yi) minutely?? especialy the h, yi.
and i also want to know how to get the "T",because there is not any position parameter among (T, Tref, h, yi).....very thanks
iriswang 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
Specific heat in STAR-CD Andrew Siemens 3 September 3, 2009 23:33
specific heat and mean specific heat Duan J Q Siemens 2 November 20, 2007 06:59
specific heat grzesiek FLUENT 2 February 16, 2006 11:18
Specific heat Andrea CFX 1 May 30, 2004 01:55
specific heat in UDF gino FLUENT 3 November 22, 2001 23:16


All times are GMT -4. The time now is 09:03.