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

DEFINE_SPECIFIC_HEAT problem

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 17, 2018, 05:29
Default DEFINE_SPECIFIC_HEAT problem
  #1
New Member
 
Join Date: May 2018
Posts: 29
Rep Power: 7
CFDJonas is on a distinguished road
Hello,

I have a problem with my UDF calculating the specific heat Cp for my mixture. Even if I take the simple example given in the manual (see below) I get an error. The initialization works fine (the Message within the UDF delivers the correct cp during initialization, also enthalpy h is not null). But when I start the simulation following error appears for every node:

Error at Node X: Non-physical Specific Heat = 0.000000e+00

Code:
DEFINE_SPECIFIC_HEAT(heat_capacity, T, Tref, h, yi)
{
	// Enthalpy must be set (requirement for this udf-macro by Fluent)
        real cp = 2000.0;
	*h = cp * (T - Tref);
	Message("\n T = %f\tyi_specie0 = %f\tcp = %f\th = %f\tT_ref = %f", T, yi[0], cp, *h, Tref);
	return cp;
}
I am using Ansys Fluent 19.2.

Another question: Why does SV_SpeciesIndex(.., ..) now needs two arguments instead of one? I used to get the index via SV_SpeciesIndex("specie0") in earlier version but somehow this isn't working anymore in 19.2.

Thank you for your help!

EDIT: Additional information: The error only occurs when I have volumetric reaction turned on, even though the mechanism is empty/the fluid phase "reaction" check box is NOT selected. Just the activated volumetric reaction model leads to getting this error. Somehow this changes the calculation of cp?

Last edited by CFDJonas; December 17, 2018 at 05:47. Reason: new information
CFDJonas is offline   Reply With Quote

Reply

Tags
speciesindex, specific heat


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
UDF compiling problem Wouter Fluent UDF and Scheme Programming 6 June 6, 2012 04:43
Gambit - meshing over airfoil wrapping (?) problem JFDC FLUENT 1 July 11, 2011 05:59
natural convection problem for a CHT problem Se-Hee CFX 2 June 10, 2007 06:29
Adiabatic and Rotating wall (Convection problem) ParodDav CFX 5 April 29, 2007 19:13
Is this problem well posed? Thomas P. Abraham Main CFD Forum 5 September 8, 1999 14:52


All times are GMT -4. The time now is 23:15.