CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

Enthalpy and entropy

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 2 Post By KarenRei

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 29, 2015, 04:32
Default Enthalpy and entropy
  #1
Member
 
Anonymouse
Join Date: Dec 2015
Posts: 98
Rep Power: 10
KarenRei is on a distinguished road
I'm trying to set up the thermodynamics model for my simulation and have hit an obstacle. I'm using the janaf model, and the documentation states:


"In addition, there are constants of integration, and , both at high and low temperature, used to evaluating and respectively."


... as well as ...




High temperature enthalpy offset a5
High temperature entropy offset a6

...
Low temperature enthalpy offset a5
Low temperature entropy offset a6



I'm trying to figure out just what sort of units these are, or what they mean by "offset", because the values I'm seeing in example files don't make any sense (I've got a0 through a4 (the Cp parameters) down - I wrote a python script to curve fit the data from physical property files that I downloaded - but I need entropy and enthalpy as well).

For example, looking at examples, for H2 the enthalpy (a5) offsets are -835.0340 and -1012.521 respectively, while the entropy (a6) offsets are -1.355110 and -3.294094, respectively. What does this mean? Because the standard enthalpy of formation of H2 is 0, relative standard enthalpy (http://citrination.com/uploads/20/sa...alpy-data-type) is -2.774 to 166.9 kJ/mol over the listed valid temperature range, and standard entropy (http://citrination.com/uploads/20/sa...ropy-data-type) is 119.4 to 222.8 J/K*mol over the same range. So these figures for a5 and a6 make no sense to me.

I've tried to find a better description of the janaf model and what exactly these a5 and a6 offsets are, but so far I've drawn a blank. Can someone help clear it up for me?
KarenRei is offline   Reply With Quote

Old   December 29, 2015, 11:25
Default
  #2
Member
 
Anonymouse
Join Date: Dec 2015
Posts: 98
Rep Power: 10
KarenRei is on a distinguished road
A thought just occurred to me. Since:

dh = Cp(T)dt
ds = Cp(T)dt/T

Then indeed you do only need two offsets to determine entropy and enthalpy, the rest can be just derived from the specific heat Cp, which is defined by parameters a0 through a4. But the numbers still don't make sense. For example, back to H2's entropy constants a5: -835.0340 and -1012.521 whats? Why would the numbers be different for the high and low parameters? -835kJ/mol would imply an enthalpy of H2 at far below absolute zero. -835J/mol would be the enthalpy of H2 at something in the ballpark of 260K, a temperature with no particular meaning. The same sort of wierdness happens with entropy, I see no particular meaning to offsets -1.355110 and -3.294094, nor any rhyme or reason as to why there would be different offsets for high and low.
KarenRei is offline   Reply With Quote

Old   December 30, 2015, 16:58
Default
  #3
Member
 
Anonymouse
Join Date: Dec 2015
Posts: 98
Rep Power: 10
KarenRei is on a distinguished road
Okay, I *think* I've got what they're probably doing.

I think their formulas are:

Hhigh=R*(a4*(Thigh^5)/5+a3*(Thigh^4)/4+a2*(Thigh^3)/3+a1*(Thigh^2)/2+a0*Thigh+a5)

Shigh=R*(a4*(Thigh^4-Tcommon^4)/4+a3*(Thigh^3-Tcommon^3)/3+a2*(Thigh^2-Tcommon^2)/2+a1*(Thigh-Tcommon)+a0*LN(Thigh/Tcommon)-a6*(Thigh^-1-Tcommon^-1))

... and same for the low parameters, substituting "common" for high and "low" for common.

I had to build a spreadsheet to try all of the possible meanings of what they could have meant by "offset", all of the different points it could have been incorporated into the integration. Seriously, why is the documentation this bad? :Þ

Anyway, time to update my janaf generation tool to generate these figures too...
KarenRei is offline   Reply With Quote

Old   December 31, 2015, 08:44
Default
  #4
Member
 
Anonymouse
Join Date: Dec 2015
Posts: 98
Rep Power: 10
KarenRei is on a distinguished road
Ugh.

I implemented this in python, and hard-specified the Cp-parameters to be exactly the same as is used in the thermodynamics files. So for H2, for example, it calculates (using the Cp formula) that the high enthalpy (0 to Thigh) should be 173832.533962 J/mol, versus an actual 166876 according to the data from Citrination, for a difference of -6956.53396158 J/mol, which divided by R (the multiplier, as stated in section 7.1) yields -836.679 as the offset - versus -835.034 in the thermo file (quite close!). For lowCp's enthalpy it calculates -1010.93, versus 1012.52 in the thermo file - again, quite close. For the high entropy it calculates entropy of 56.5719023074 versus 56.551 actual, or -0.020902307412 difference, from which it determines an offset ("/ R / -(1.0/high - 1.0/common)" - aka, undoing the effects of integration and multiplication by R) of -3.14246, versus -1.35511 in the file. For lowCp entropy it calculates -4.96367 vs. -3.29409 in the file.

The enthalpy calculations are almost dead-on. The entropy calculations are off by 1-2... but in the scheme of things that's not a huge effect because it works out to such a small difference in calculated entropy.

So, all well and good. The problems however come when I switch to using something other than H2.

HCl: I calculate:

High(enthalpy, entropy): -817.061, -1.48565
Low(enthalpy, entropy): -1027.87, 1.03681

The file says:

High(enthalpy, entropy): -11918.1, 6.51512
Low(enthalpy, entropy): -12131.5, 3.19355

SiC: I calculate:

High(enthalpy, entropy): -1255.16, -0.348321
Low(enthalpy, entropy): -1097.94, -25.3532

The file says:

High(enthalpy, entropy): 85310.3, -2.4788
Low(enthalpy, entropy): 85465.1, 9.17925

That is... all to say, not even close, particularly on enthalpy. All of my figures show that the calculated entropy is quite close to actual, while theirs - assuming that they're using the offsets in the same way as me, which I've already tried guessing at every possible way I could conceive of that they're using the offsets - show a large deviation between calculated and actual enthalpy. The differences on entropy aren't as different but still rather different.

Damn it, how hard is it to write out documentation that actually spells out how to calculate the values that the program needs from you? Will someone please, please, PLEASE tell me how these offsets are actually used and/or how to calculate them?

For those who care (which, given that nobody ever responds on these threads, is probably nobody - not just talking about my experience, but I've seen hundreds of unanswered threads when looking for help), here's my code:

http://pastebin.com/85C17qTa

It needs scipy and is run in the form "janaf.py <citrination-data-file> <Tlow> <Tcommon> <Thigh>"
nikitin-pro and EskilC like this.
KarenRei is offline   Reply With Quote

Old   December 31, 2015, 15:54
Default
  #5
Member
 
Anonymouse
Join Date: Dec 2015
Posts: 98
Rep Power: 10
KarenRei is on a distinguished road
Merged into this thread, where another person is also struggling with the bad documentation on the same section:

http://www.cfd-online.com/Forums/ope...ange-fuel.html
KarenRei 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
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
Problem with rhoSimpleFoam : exploding enthalpy and density at the walls david39 OpenFOAM Running, Solving & CFD 6 January 18, 2011 11:49
Constant velocity of the material Sas CFX 15 July 13, 2010 08:56
about the unit of the standard state enthalpy!! KEVIN FLUENT 3 March 25, 2004 08:32


All times are GMT -4. The time now is 06:22.