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

Using DEFINE_SPECIFIC_HEAT, How to get the Cell-Pressure?

Register Blogs Community New Posts Updated Threads Search

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   October 8, 2009, 04:25
Default Using DEFINE_SPECIFIC_HEAT, How to get the Cell-Pressure?
  #1
New Member
 
Join Date: Oct 2009
Posts: 1
Rep Power: 0
vast01 is on a distinguished road
at first my code:

#include "udf.h"

DEFINE_SPECIFIC_HEAT(specific_heat_N2, T, Tref, h, yi)
{
real cp;
real temp = T;
real A0 = 1.0787e3;
real A1 = 3.059e-1;
real A2 = 6.6177e-4;
real A3 = 2.6368e-7;
real A4 = 2.1333e-12;
real A5 = 1.886e-3;
real A6 = 273;
real Y0;
real pressure;
pressure = C_P(c,t);

Y0 = A0-A1*temp+A2*(pow(temp,2))-A3*(pow(temp,3))- A4*(pow(temp,4)) ;
cp = Y0 *(1+A5*((pressure/10e5)-1)*(pow((A6/temp),2.4))); //[J / kg K]
*h = cp;

return cp;
}

The problem is that the index variable c and the thread pointer t are not passed to the UDF, but they are needed in the cell-pressure marco.
What do I have to do?

Last edited by vast01; October 8, 2009 at 04:48.
vast01 is offline   Reply With Quote

 


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
Pressure averaging at the outlets. KM CFX 6 April 1, 2021 06:28
Neumann pressure BC and velocity field Antech Main CFD Forum 0 April 25, 2006 02:15
How to get the pressure in a cell liqiangnwpu OpenFOAM Running, Solving & CFD 1 April 10, 2005 09:32
Pressure Inlet yields wrong velocities Ben FLUENT 0 November 21, 2004 01:47
Pressure Reference Cell mimì Siemens 1 June 17, 2002 08:29


All times are GMT -4. The time now is 13:39.