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

Enthalpy and Entropy UDRGM

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 21, 2020, 19:23
Default Enthalpy and Entropy UDRGM
  #1
Member
 
Cpt. Convergence
Join Date: Feb 2020
Posts: 98
Rep Power: 8
Captain Convergence is on a distinguished road
Hi all

I am having issues with my UDRGM. A the moment I am trying to have a functional UDRGM with ideal-gas formulation before moving on with the real gas formulation. However the available ideal-gas UDRGM examples available in Fluent's User Guide do not work as the ideal-gas formulation available in Fluent. After many hours trying to understand why, I track down the errors and the issues are due to the enthalpy and entropy formulations, which are given like this:

double IDEAL_enthalpy(cell_t cell, Thread *thread, double Ttot, double density, double Ptot, double yi[])
{
double Temp = C_T(cell,thread); /* Cell Static Temperature (K) */
double cp = IDEAL_specific_heat(cell, thread, Temp, density, Pabs, yi); /* (J/Kg/K) */
double h = Temp * cp;
return h; /* (J/Kg) */
}

double REAL_entropy(cell_t cell, Thread *thread, double Ttot, double density, double Ptot, double yi[])
{
double RGAS = Runiv/MW0;
double Temp = C_T(cell,thread); /* Cell Static Temperature (K) */
double Pstat = C_P(cell,thread); /* Cell Static Pressure (Pa) */
double cp = 1004.16; // J/(Kg K)
double s = cp * log(fabs(Temp / TDatum)) + RGAS * log(fabs(PDatum / Pstat));
return s; /* (J/Kg/K) */
}


I have attached a .zip file with the mesh (a 2D simple channel), a journal file (that executes everything for you) and the 2 UDRGMs (one with ideal-gas formulation and the other with real-gas formulation). You can compile and execute the simulations in your computer and check yourselves (it takes less than 1 min to run). If I calculate the enthalpy with the static temperature, the temperature at the inlet tends to 0 Kelvin which indicates that I am undercalculating somehow the enthalpy. I tried to post these questions in ANSYS Student Community but the provided answers were not very helpful (you can read the discussion here: https://studentcommunity.ansys.com/t...unwated-value/). I would appreciate any help regarding this issue or if you could indicate where to fing an UDRGM with ideal formulation that works with Fluent 2019 R3.
Attached Files
File Type: zip SimpleCase.zip (27.2 KB, 4 views)
Captain Convergence 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
Static enthalpy in CFX with IAPWS Delcraft CFX 0 January 18, 2017 07:35
Enthalpy and entropy KarenRei OpenFOAM Running, Solving & CFD 4 December 31, 2015 15:54
Calculation of the Governing Equations Mihail CFX 7 September 7, 2014 06:27
Reference Specific Enthalpy and Entropy pump_passion CFX 0 September 27, 2013 04:38
Constant velocity of the material Sas CFX 15 July 13, 2010 08:56


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