Skip to content

Commit

Permalink
Added thermo data for GRI-Mech 3.0 and capacity for loading as seed m…
Browse files Browse the repository at this point in the history
…echanism.

This was needed because RMG doesn't predict thermo data very well for a few
GRI-Mech species. In particular, the thermo data for gaseous carbon atoms was
off by hundreds of kcal/mol. Also, for GRI-Mech it is important to use all of
the parameters together as much as possible, as they are fit as a group and
may not reflect the real values.

The thermo data is added to the primary thermo library. Some work may need to
be done in the future to ensure proper loading order when multiple primary
thermo libraries are used.
  • Loading branch information
jwallen committed Dec 21, 2009
1 parent f01ba63 commit aaa94eb
Show file tree
Hide file tree
Showing 3 changed files with 87 additions and 6 deletions.
66 changes: 66 additions & 0 deletions data/GRI-Mech3.0/thermo.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
// thermo.txt
// version 1.0

// This file contains PrIMe-recommended thermochemistry data as of 01-Jul-2009 16:47:18
// All data was converted from NASA-7 polynomial format (unless otherwise noted)
// All uncertainty values were assigned values of 0.0

// Units
// H: kcal/mol
// S and Cp: cal/mol/K

//No. Name Hf298 S298 Cp300 Cp400 Cp500 Cp600 Cp800 Cp1000 Cp1500 dH dS dCp Notes
//1. Ar -0.00074513 36.9756 4.9675 4.9675 4.9675 4.9675 4.9675 4.9675 4.9675 0.0 0.0 0.0 Neither TRange included 298K!
2. C 171.2713 37.7801 4.9798 4.9734 4.9715 4.9711 4.9692 4.9691 4.9742 0.0 0.0 0.0
3. C2H 135.3102 50.9787 10.0485 10.5393 10.8828 11.1958 11.9369 12.6543 14.1032 0.0 0.0 0.0
4. C2H2 54.5337 48.01 10.5476 12.0136 13.0765 13.8878 15.1592 16.2292 18.1726 0.0 0.0 0.0
5. CH2CO -11.4012 57.7998 12.4027 14.2004 15.6747 16.8939 18.7914 20.2463 22.5514 0.0 0.0 0.0
6. HCCOH 18.7002 56.2443 13.9828 15.7658 17.0442 18.0315 19.6529 21.0031 23.2596 0.0 0.0 0.0 Neither TRange included 298K!
7. C2H3 71.6303 55.8909 10.2397 12.0282 13.7085 15.1698 17.3442 19.0697 21.8125 0.0 0.0 0.0
8. CH2CHO 5.997 63.9953 13.1758 15.1461 16.9608 18.5959 21.3009 23.3432 26.3517 0.0 0.0 0.0 Neither TRange included 298K!
9. C2H4 12.5449 52.4085 10.2892 12.5808 14.8838 16.9528 20.0509 22.4865 26.3011 0.0 0.0 0.0
10. CH3CHO -39.718 63.073 13.265 15.7804 18.2902 20.5798 24.1643 26.911 30.9565 0.0 0.0 0.0
11. C2H5 28.3551 59.0506 12.1085 14.5881 17.0748 19.349 22.9308 25.7757 30.295 0.0 0.0 0.0
12. C2H6 -20.0407 54.7727 12.5989 15.5691 18.5786 21.3595 25.8037 29.3182 34.8751 0.0 0.0 0.0
13. HCCO 42.3961 58.9514 11.6001 12.9016 13.8887 14.6586 15.815 16.6647 17.9598 0.0 0.0 0.0 Neither TRange included 298K!
//14. C3H7 24.015 69.1684 17.1078 21.4877 25.3883 28.777 34.1116 38.1246 44.2245 0.0 0.0 0.0 Neither TRange included 298K!
15. C3H8 -24.8216 64.5594 17.6729 22.488 26.8645 30.7445 37.0108 41.7294 48.8319 0.0 0.0 0.0 Neither TRange included 298K!
16. CH 142.7507 43.7385 6.9722 6.9853 7.0277 7.1072 7.3738 7.7111 8.5599 0.0 0.0 0.0
17. CH2(S) 102.7344 45.2159 8.0767 8.3274 8.6613 9.0402 9.8277 10.5707 11.8972 0.0 0.0 0.0
18. CH2 93.759 46.4583 8.3744 8.7312 9.0805 9.4126 10.0265 10.6563 11.8659 0.0 0.0 0.0
//19. H2CN 59.1066 53.5877 9.1619 10.3151 11.4244 12.4654 14.2394 15.4197 17.1343 0.0 0.0 0.0 Neither TRange included 298K!
20. CH2O -25.9497 52.2757 8.4703 9.3623 10.4367 11.524 13.3741 14.8153 17.0067 0.0 0.0 0.0
21. CH3 35.1048 46.3598 9.1952 9.9751 10.7531 11.5019 12.8632 14.0828 16.2904 0.0 0.0 0.0
22. CH3O 3.8949 54.5988 9.0791 10.7854 12.432 13.9755 16.6291 18.5968 21.5101 0.0 0.0 0.0 Neither TRange included 298K!
23. CH2OH -3.4975 58.286 11.5842 12.9049 14.1314 15.2327 17.0407 18.4987 20.9633 0.0 0.0 0.0
24. CH4 -17.8292 44.5349 8.5461 9.686 11.1112 12.6016 15.2944 17.593 21.6069 0.0 0.0 0.0
25. CH3OH -48.0222 57.3045 10.5521 12.2835 14.2254 16.0912 19.0716 21.4265 25.1953 0.0 0.0 0.0
//26. HCN 31.2611 48.2276 8.5853 9.3626 9.9746 10.4771 11.3044 12.0051 13.1955 0.0 0.0 0.0
//27. HCNN 110.4361 59.7661 11.7637 13.0971 14.1362 14.9562 16.1623 17.0055 18.2178 0.0 0.0 0.0 Neither TRange included 298K!
//28. HNCO -28.22 57.5248 11.1305 12.2284 13.218 14.0994 15.5453 16.8291 17.9957 0.0 0.0 0.0 Neither TRange included 298K!
//29. HOCN -2.8221 57.8538 11.081 12.0406 12.8977 13.6585 14.9174 16.1235 17.2462 0.0 0.0 0.0 Neither TRange included 298K!
//30. HCNO 40.8726 57.9949 11.2117 12.586 13.7252 14.6656 16.0776 17.3086 18.37 0.0 0.0 0.0 Neither TRange included 298K!
31. HCO 10.0359 53.6078 8.2736 8.7177 9.2417 9.78 10.7402 11.4859 12.5894 0.0 0.0 0.0
//32. NCO 31.4954 55.5305 9.6022 10.4921 11.2263 11.8335 12.7501 13.3444 14.0726 0.0 0.0 0.0
33. CO -26.4155 47.2322 6.9646 7.02 7.1241 7.2685 7.622 7.9253 8.4148 0.0 0.0 0.0
34. CO2 -94.0423 51.0868 8.8944 9.8646 10.6635 11.3172 12.2908 12.9818 13.9559 0.0 0.0 0.0
35. H 52.0965 27.4128 4.9675 4.9675 4.9675 4.9675 4.9675 4.9675 4.9675 0.0 0.0 0.0
36. H2 -0.0010521 31.2263 6.8947 6.9967 7.0015 6.9912 7.0775 7.2085 7.7142 0.0 0.0 0.0
//37. NH2 45.8949 46.596 8.0942 8.3088 8.6017 8.9411 9.6723 10.4063 11.8559 0.0 0.0 0.0
38. H2O -57.7928 45.1219 8.0289 8.1893 8.4154 8.6799 9.2564 9.8687 11.3017 0.0 0.0 0.0
39. H2O2 -32.4741 56.0421 10.1468 11.0801 11.9818 12.7799 13.9821 14.9309 16.604 0.0 0.0 0.0
//40. NH3 -10.9701 46.0646 8.5315 9.2368 10.0361 10.8347 12.2487 13.5096 15.8722 0.0 0.0 0.0
//41. NH 85.2952 43.3053 6.9764 6.9777 6.9982 7.0454 7.2242 7.4742 8.0656 0.0 0.0 0.0
//42. NNH 59.6283 53.6481 8.2915 8.7969 9.3698 9.9216 10.7975 11.4748 12.4736 0.0 0.0 0.0
//43. HNO 25.3925 52.7907 8.1018 8.4776 8.9841 9.5359 10.5665 11.4163 13.2067 0.0 0.0 0.0
44. OH 9.4021 43.9063 7.1402 7.0675 7.0458 7.0581 7.1493 7.3353 7.8741 0.0 0.0 0.0
45. HO2 2.9984 54.7475 8.3476 8.8852 9.4641 9.9944 10.7704 11.3791 12.4826 0.0 0.0 0.0
//46. N 112.9602 36.6336 4.9675 4.9675 4.9675 4.9675 4.9675 4.9674 4.9718 0.0 0.0 0.0
//47. N2 -0.00069005 45.7646 6.9485 7.0068 7.0824 7.1901 7.5026 7.8294 8.3178 0.0 0.0 0.0 Neither TRange included 298K!
//48. N2O 19.4994 52.574 9.2514 10.2062 10.9663 11.5845 12.535 13.1973 14.1027 0.0 0.0 0.0
//49. NO 21.8094 50.3605 7.1356 7.1606 7.2872 7.4644 7.8324 8.1228 8.5354 0.0 0.0 0.0
//50. NO2 8.1701 57.3913 8.8983 9.6673 10.424 11.0924 12.0469 12.6693 13.4292 0.0 0.0 0.0
51. O 59.547 38.4879 5.2338 5.1292 5.0777 5.0517 5.0156 5.0005 4.9819 0.0 0.0 0.0
52. O2 -0.0010244 49.0236 7.0233 7.1986 7.4285 7.6673 8.0656 8.3363 8.7407 0.0 0.0 0.0
//53. CN 104.8354 48.4238 6.9683 7.0374 7.1588 7.3187 7.6883 7.9923 8.4849 0.0 0.0 0.0
//54. C (ss) -0.00030853 1.3692 2.0532 2.8275 3.4882 4.0233 4.7402 5.1678 5.7015 0.0 0.0 0.0
25 changes: 20 additions & 5 deletions source/rmg/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -585,15 +585,30 @@ def loadSeedMechanism(self, path):
import kinetics
import reaction

# Load the species list from the file species.txt
# Load the species data from the file species.txt
# This file has the format of a standard RMG dictionary
d = data.Dictionary()
d.load(os.path.join(path, 'species.txt'))
d.toStructure(addH=True)
speciesDict = {}

# Load the thermo data from the file thermo.txt
# This file has the format of a standard RMG thermo library
thermoData = species.ThermoDatabase()
thermoData.load(os.path.join(path, 'species.txt'), '', os.path.join(path, 'thermo.txt'))
# Populate the main primary thermo library with this thermo data
# This will overwrite keys (but not values), so the order that the
# seed mechanisms are loaded matters!
for key, value in d.iteritems():
species.thermoDatabase.primaryDatabase.dictionary[key] = value
for key, value in thermoData.library.iteritems():
species.thermoDatabase.primaryDatabase.library[key] = value

# Create new species based on items in species.txt
speciesDict = {}; speciesList = []
for label, struct in d.iteritems():
speciesDict[label] = species.makeNewSpecies(struct, label, reactive=True)
print species.speciesList
spec = species.makeNewSpecies(struct, label, reactive=True)
speciesDict[label] = spec
speciesList.append(spec)

# Load the reactions from the file reaction.txt
reactionList = []
Expand Down Expand Up @@ -641,7 +656,7 @@ def loadSeedMechanism(self, path):
f.close()

# Add species to core
for label, spec in speciesDict.iteritems():
for spec in speciesList:
self.addSpeciesToCore(spec)
# Add reactions to core
for rxn in reactionList:
Expand Down
2 changes: 1 addition & 1 deletion source/rmg/system/batch.py
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ def simulate(self, model):
# Calculate species fluxes of all core and edge species at the
# current time
dNidt = self.getSpeciesFluxes(model, P, V, T, Ni, stoichiometry)

# Determine characteristic species flux
charFlux = math.sqrt(sum([x*x for x in dNidt[0:len(model.core.species)]]))

Expand Down

0 comments on commit aaa94eb

Please sign in to comment.