|
[Sponsors] |
Enthalpies: Am I confused or is OpenFOAM? (rel. standard vs. enthalpy of formation) |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
October 28, 2016, 22:00 |
Enthalpies: Am I confused or is OpenFOAM? (rel. standard vs. enthalpy of formation)
|
#1 |
Member
Anonymouse
Join Date: Dec 2015
Posts: 98
Rep Power: 11 |
So, I've been trying to debug some reactingFoam problems, and it's led me into a.... very peculiar issue.
Let's take two random sets of Janaf parameters from a tutorials file - say: reactingFoam/laminar/counterFlowFlame2D_GRI/constant/thermo.compressibleGasGRI Let's look at O and O2 at their lower and upper limits. O@200K: 246987.402061 O@3500K: 316254.598508 O2@200K: -2866.726436 O2@3500K: 118345.467979 Now, let's compare them to graphs of what their enthalpy should be. But the question is, what kind of enthalpy? Relative standard enthalpy or standard enthalpy of formation? O, relative standard enthalpy: https://www.citrination.com/uploads/...ntal-state-gas O, standard enthalpy of formation: https://www.citrination.com/uploads/...ntal-state-gas O2, relative standard enthalpy: https://www.citrination.com/uploads/...tate-reference There is no graph for O2 standard enthalpy of formation available; unless I'm mistaken, it should just be a straight "0.0" because it defines the baseline. Now, note the curious thing: * O appears to be standard enthalpy of formation * O2 appears to be relative standard enthalpy. .... Huh? We're mixing different types of enthalpy? How does that work? Am I not understanding something, or are they making a mistake? In my test case, because I had initially noticed that the janaf parameters never formed flat "0" lines, I assumed it was always using standard enthalpy of formation, and so generated all of my parameters from that. But when you do that, room temperature air explodes The reversible association/dissociation reaction "O + O = O2" converts a fair part of the O2 to O at room temperature and releases unnaturally high amounts of heat. What gives? How should I know which enthalpies to use? Last edited by KarenRei; October 29, 2016 at 06:46. |
|
October 29, 2016, 06:58 |
|
#2 |
Member
Anonymouse
Join Date: Dec 2015
Posts: 98
Rep Power: 11 |
Also: from looking at the code, I think enthalpy must be such that its value always increases as the temperature rises. There's a function that tries to find the temperature, given the enthalpy, so that when you add heat to a mixture it can level out at the right temperature. Relative standard enthalpy makes sense for this. Standard enthalpy of formation doesn't. Sometimes it goes up, sometimes it goes down. But relative standard enthalpy always increases by the specific heat at that temperature; Cp is the derivative of relative standard enthalpy.
So again, I thought relative standard enthalpy was right. But air explodes if you use only relative standard enthalpies. Also, things don't burn as they should. For example, take aluminum burning to aluminum oxide at STP: 2 Al + 1.5 O2 -> Al2O3 Al@STP = 0 J/mol O2@STP = 0 J/mol Al2O3@STP = 0J/mol Heat released: 0J Of course, we know that's not true! We get the right answer when we use standard enthalpy of formation: 2 Al + 1.5 O2 -> Al2O3 Al@STP = 0 J/mol O2@STP = 0 J/mol Al2O3@STP = -1676000J/mol Heat released: 1.676MJ/mol So there's this big contradiction going on here. I almost wonder if I need to use some sort of "hybrid" between the two - the curve of relative standard enthalpy, but the baseline offset of standard enthalpy of formation. So elements in their standard states would follow an unshifted relative standard enthalpy curve, while other compounds would follow a relative standard enthalpy curve shifted by (standard element of formation @ STP) joules. Is there a name for enthalpy in that form? Last edited by KarenRei; October 30, 2016 at 15:15. |
|
October 30, 2016, 11:34 |
|
#3 |
Senior Member
Oskar
Join Date: Nov 2015
Location: Poland
Posts: 184
Rep Power: 11 |
Hello KarenRei.
I have just done first part of my research. I have compared thermophysicalProperties of Propane from PDRfoam (tutorial:flamePropagationWithObstacles) with data form internet: T = 298.15K P = 1atm from: http://webbook.nist.gov/cgi/cbook.cgi?ID=C74986&Mask=1. Cp = 73.6 J/mol/K from: http://www.mrbigler.com/misc/energy-of-formation.PDF H = -103.8 kJ/mol S = 269.9 J/mol/k Molecular Mass of Propane M = 44.1 g/mol. Then: Cp = 1668.9 J/kg/K H = -2353741.5 J/kg S = 6129.25 J/kg/K Now the same parameters based on polynomial coefficients from thermophysicalProperties: Cp=1668.23 J/kg/K H = -2355149.17 J/kg S = 6127.07 J/kg/K If Air = 0.21 O2 + 0.79N2 and both of elements are in their most stable states then their enthalpy of formation should be equal to 0. According to coefficients form thermophysicalProperties for Air H(298.15) = 0. So I believe that this "energy-of-formation.pdf" contains our enthalpy and entropy offsets, and: S - Standard entropy, H - Standard enthalpy of formation. Have You notice therm.dat files of gri30,h2,ic8h18 and nc7h16? I wonder why CP, H and S differs from those from thermophysicapProperties. For example isooctane: Cp(5000) = 5190 - therm.dat ic8h18 H(5000) = 21361318 S(5000) = 15248 Cp(5000) = 5714 - ethermophysicalProperties H(5000) = 19670509 S (5000) = 14631 |
|
October 30, 2016, 16:13 |
|
#4 | ||
Member
Anonymouse
Join Date: Dec 2015
Posts: 98
Rep Power: 11 |
Quote:
It's doubtful that the janaf offset field is only the enthalpy of formation, as offsetting the curve is also part of the curve fitting operation itself. But as was discussed, I think we're both on the same route - offsetting the relative standard enthalpy curves by the standard enthalpy of formation. Quote:
|
|||
October 31, 2016, 08:21 |
|
#5 |
Senior Member
Oskar
Join Date: Nov 2015
Location: Poland
Posts: 184
Rep Power: 11 |
Hello.
I'm sorry. It is just gri not gri30. All those therm.dat files are placed in ...\openfoam221\tutorials\combustion\chemFoam. And 5000 is upper temperature limit for polynomials. Cp(T=5000), H and S. Second research: C8H18+12.5(O2+3.76N2)=8CO2+9H2O+47N2. Standard Gibbs free energy of formation for burn products: CO2 = -394.4 kJ/mol H2O = -228.6 kJ/mol N2 = 0 kJ/mol So the Standard Gibbs free energy of formation for mixture is: (8*(-394.4)+9*(-228.6) +47*0)/(8+9+47) = -81.5 kJ/mol = -2847792 J/kg Enthalpy of burn products at T=298.15 from polynomials: H(298.15) = 2907153 J/kg Again relative standard enthalpy at temperature T=298.15 is equal to energy of formation. I'm sorry KarenRei but I'm not sure if You agree with this or not? |
|
October 31, 2016, 13:46 |
|
#6 |
Senior Member
Oskar
Join Date: Nov 2015
Location: Poland
Posts: 184
Rep Power: 11 |
Ok. I have done last research using cantera.
Cantera returns enthalpy and enthropy that we are looking for. Again Isooctane example: From thermophysicalProperties at temperature T=298.15 P=100000 CP = 1650 J/kgK H = -1961114 J/kg S = 3702 J/kgK While cantera returns: temperature 298.15 K pressure 100000 Pa ... mean mol. weight 114.231 amu enthalpy -1.95721e+006 J/kgK ... entropy 3708.05 4.236e+005 J/kg ... heat capacity c_p 1653.9 1.889e+005 J/kgK ... It works with propane, air and both burn products. |
|
October 31, 2016, 19:20 |
|
#7 | |
Member
Anonymouse
Join Date: Dec 2015
Posts: 98
Rep Power: 11 |
Quote:
I modified my Janaf coefficient calculator to making use of a table of the STP standard enthalpies of formation of a wide range of species and regenerated all of the species in my reaction table. The offsets now generally look all very close to the ones in the OpenFOAM examples (where they can be compared), except for one - monoatomic hydrogen. But I think the OpenFOAM one for that is wrong; it has to be, it gives a near-zero enthalpy of formation at STP, but H + H -> H2 releases 218kJ; it's an exothermic process. Running ReactingFOAM now... it crashes out. I haven't had time yet to see what reaction(s) or specie(s) are causing it, or where in the OpenFOAM code it's crashing and why. It's Iceland Airwaves time here, so I'm going to be a bit distracted this week Last edited by KarenRei; October 31, 2016 at 20:47. |
||
October 31, 2016, 19:31 |
|
#8 |
Senior Member
Oskar
Join Date: Nov 2015
Location: Poland
Posts: 184
Rep Power: 11 |
I mean enthalpy and entropy from cantera are almost equal to enthalpy and entropy from thermophysicalProperties (at temperature 298.15K).
"It works" I mean I have checked those enthalpies and entropies for air, propane, isooctane and burn products of isooctane-air combustion and propane-air combustion. Have a nice time! |
|
November 10, 2016, 19:18 |
|
#9 |
Member
Anonymouse
Join Date: Dec 2015
Posts: 98
Rep Power: 11 |
So, I've started work on this again, although it's not going quickly, as I've been sick I've been trying to deal with a crash. I notice that if I force the timestep way, way down (tiny courant number), it doesn't crash and I can see that there's heavy oscillation going on in the burn, every timestep that gets saved out - pressures and temperatures in small regions rapidly fluctuating between high and low while combustion products are produced. So the problem is presumably that this combustion instability is throwing temperatures too high / too low in compression shocks (I assume!) and thus going too far out of bounds for Janaf to produce coherent thermodynamics results.
The question is, what to do about this. One, I don't think this would be happening in the real world. In the real world I don't expect combustion of hydrocarbons and oxygen to "crackle" back and forth at high speeds. I mean, you expect flame fronts to dance around, but not rapid pulsation (on the order of one cycle per ~1e-7 seconds). Secondly, whether or not it's right, it's not really something I care about. I really just need to converge to a steady state; I have a constant mass influx, and want to see how it burns when it reaches a steady state. Should I even be using reactingFoam, or is there some sort of other solver I should use? I've been looking into others but they don't look really right. XiFoam, for example, requires knowledge of flame front propagation details, and again, I don't care about propagation rates, just steady states. fireFoam seems to involve buoyancy factors and flame fronts, which again isn't important for my case. Etc. What might be the best option to steady out my simulation? |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Commercial meshers] converting Fluent mesh to openfoam standard mesh | deepesh | OpenFOAM Meshing & Mesh Conversion | 31 | March 29, 2017 06:59 |
How to use the standard C++ vectors in OpenFOAM | Bruce Hartley | OpenFOAM Programming & Development | 4 | January 30, 2015 07:12 |
Air Standard State Enthalpy | KYPRIANY | FLUENT | 1 | March 23, 2011 03:56 |
64bitrhel5 OF installation instructions | mirko | OpenFOAM Installation | 2 | August 12, 2008 19:07 |
about the unit of the standard state enthalpy!! | KEVIN | FLUENT | 3 | March 25, 2004 09:32 |