PYroMat 2.2.5__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1010) hide show
  1. PYroMat-2.2.5.dist-info/LICENSE.txt +644 -0
  2. PYroMat-2.2.5.dist-info/METADATA +94 -0
  3. PYroMat-2.2.5.dist-info/RECORD +1010 -0
  4. PYroMat-2.2.5.dist-info/WHEEL +5 -0
  5. PYroMat-2.2.5.dist-info/top_level.txt +5 -0
  6. pyromat/__init__.py +395 -0
  7. pyromat/config.py +166 -0
  8. pyromat/dat.py +574 -0
  9. pyromat/data/ig/Al_H.hpd +464 -0
  10. pyromat/data/ig/Al_H_O.hpd +464 -0
  11. pyromat/data/ig/Al_H_O2.hpd +446 -0
  12. pyromat/data/ig/Al_H_O_1.hpd +482 -0
  13. pyromat/data/ig/B10_H14.hpd +362 -0
  14. pyromat/data/ig/B2_Be_O4.hpd +464 -0
  15. pyromat/data/ig/B2_Cl4.hpd +446 -0
  16. pyromat/data/ig/B2_F4.hpd +466 -0
  17. pyromat/data/ig/B2_F4_O.hpd +465 -0
  18. pyromat/data/ig/B2_H4_O4.hpd +465 -0
  19. pyromat/data/ig/B3_F2_H_O3.hpd +466 -0
  20. pyromat/data/ig/B3_F_H2_O3.hpd +466 -0
  21. pyromat/data/ig/B3_H3_O3.hpd +464 -0
  22. pyromat/data/ig/B3_H3_O6.hpd +465 -0
  23. pyromat/data/ig/B5_H9.hpd +358 -0
  24. pyromat/data/ig/B_Br.hpd +446 -0
  25. pyromat/data/ig/B_Br2.hpd +446 -0
  26. pyromat/data/ig/B_Br2_Cl.hpd +446 -0
  27. pyromat/data/ig/B_Br2_F.hpd +464 -0
  28. pyromat/data/ig/B_Br2_H.hpd +465 -0
  29. pyromat/data/ig/B_Br3.hpd +390 -0
  30. pyromat/data/ig/B_Br_Cl.hpd +447 -0
  31. pyromat/data/ig/B_Br_Cl2.hpd +464 -0
  32. pyromat/data/ig/B_Br_F.hpd +465 -0
  33. pyromat/data/ig/B_Br_F2.hpd +464 -0
  34. pyromat/data/ig/B_Br_O.hpd +465 -0
  35. pyromat/data/ig/B_Cl2_F.hpd +465 -0
  36. pyromat/data/ig/B_Cl2_H.hpd +466 -0
  37. pyromat/data/ig/B_Cl_F2.hpd +465 -0
  38. pyromat/data/ig/B_F2_H.hpd +465 -0
  39. pyromat/data/ig/B_F2_H_O.hpd +466 -0
  40. pyromat/data/ig/B_F4_K.hpd +356 -0
  41. pyromat/data/ig/B_H.hpd +464 -0
  42. pyromat/data/ig/B_H2.hpd +463 -0
  43. pyromat/data/ig/B_H2_O2.hpd +465 -0
  44. pyromat/data/ig/B_H3.hpd +464 -0
  45. pyromat/data/ig/B_H3_O3.hpd +494 -0
  46. pyromat/data/ig/B_H_O.hpd +465 -0
  47. pyromat/data/ig/B_H_O2.hpd +464 -0
  48. pyromat/data/ig/B_H_S.hpd +464 -0
  49. pyromat/data/ig/B_I.hpd +446 -0
  50. pyromat/data/ig/B_I2.hpd +446 -0
  51. pyromat/data/ig/B_I3.hpd +449 -0
  52. pyromat/data/ig/Ba_H2_O2.hpd +322 -0
  53. pyromat/data/ig/Ba_H_O.hpd +447 -0
  54. pyromat/data/ig/Ba_I.hpd +445 -0
  55. pyromat/data/ig/Ba_I2.hpd +263 -0
  56. pyromat/data/ig/Be2.hpd +445 -0
  57. pyromat/data/ig/Be2_Cl4.hpd +445 -0
  58. pyromat/data/ig/Be_F3_Li.hpd +320 -0
  59. pyromat/data/ig/Be_H.hpd +464 -0
  60. pyromat/data/ig/Be_H2_O2.hpd +464 -0
  61. pyromat/data/ig/Be_H_O.hpd +465 -0
  62. pyromat/data/ig/Br2_Fe.hpd +319 -0
  63. pyromat/data/ig/Br2_H2_Si.hpd +465 -0
  64. pyromat/data/ig/Br2_K2.hpd +445 -0
  65. pyromat/data/ig/Br2_Li2.hpd +445 -0
  66. pyromat/data/ig/Br2_Mo.hpd +463 -0
  67. pyromat/data/ig/Br2_Na2.hpd +445 -0
  68. pyromat/data/ig/Br2_Sr.hpd +249 -0
  69. pyromat/data/ig/Br2_Ti.hpd +463 -0
  70. pyromat/data/ig/Br2_Zr.hpd +319 -0
  71. pyromat/data/ig/Br3_H_Si.hpd +466 -0
  72. pyromat/data/ig/Br3_Mo.hpd +445 -0
  73. pyromat/data/ig/Br3_O_P.hpd +448 -0
  74. pyromat/data/ig/Br3_P.hpd +455 -0
  75. pyromat/data/ig/Br3_P_S.hpd +448 -0
  76. pyromat/data/ig/Br3_Ti.hpd +445 -0
  77. pyromat/data/ig/Br3_Zr.hpd +445 -0
  78. pyromat/data/ig/Br4_Fe2.hpd +445 -0
  79. pyromat/data/ig/Br4_Mg2.hpd +445 -0
  80. pyromat/data/ig/Br4_Mo.hpd +445 -0
  81. pyromat/data/ig/Br4_Ti.hpd +389 -0
  82. pyromat/data/ig/Br4_Zr.hpd +445 -0
  83. pyromat/data/ig/Br5_Nb.hpd +398 -0
  84. pyromat/data/ig/Br5_W.hpd +389 -0
  85. pyromat/data/ig/Br6_W.hpd +445 -0
  86. pyromat/data/ig/Br_Cl.hpd +447 -0
  87. pyromat/data/ig/Br_F.hpd +446 -0
  88. pyromat/data/ig/Br_F3.hpd +445 -0
  89. pyromat/data/ig/Br_F5.hpd +446 -0
  90. pyromat/data/ig/Br_F5_S.hpd +465 -0
  91. pyromat/data/ig/Br_H.hpd +476 -0
  92. pyromat/data/ig/Br_H3_Si.hpd +465 -0
  93. pyromat/data/ig/Br_Hg.hpd +446 -0
  94. pyromat/data/ig/Br_I.hpd +465 -0
  95. pyromat/data/ig/Br_K.hpd +285 -0
  96. pyromat/data/ig/Br_Li.hpd +320 -0
  97. pyromat/data/ig/Br_Mo.hpd +463 -0
  98. pyromat/data/ig/Br_N.hpd +445 -0
  99. pyromat/data/ig/Br_N_O.hpd +465 -0
  100. pyromat/data/ig/Br_P.hpd +446 -0
  101. pyromat/data/ig/Br_Ti.hpd +445 -0
  102. pyromat/data/ig/Br_W.hpd +445 -0
  103. pyromat/data/ig/Br_Zr.hpd +463 -0
  104. pyromat/data/ig/C2_Be.hpd +463 -0
  105. pyromat/data/ig/C2_F3_N.hpd +468 -0
  106. pyromat/data/ig/C2_F6.hpd +476 -0
  107. pyromat/data/ig/C4_Ni_O4.hpd +441 -0
  108. pyromat/data/ig/C_B.hpd +464 -0
  109. pyromat/data/ig/C_Br.hpd +446 -0
  110. pyromat/data/ig/C_Br4.hpd +455 -0
  111. pyromat/data/ig/C_Br_F3.hpd +485 -0
  112. pyromat/data/ig/C_Br_N.hpd +484 -0
  113. pyromat/data/ig/C_F3_I.hpd +472 -0
  114. pyromat/data/ig/C_F4_O.hpd +464 -0
  115. pyromat/data/ig/C_F8_S.hpd +469 -0
  116. pyromat/data/ig/C_H3_Cl3_Si.hpd +147 -0
  117. pyromat/data/ig/C_H3_F3_Si.hpd +138 -0
  118. pyromat/data/ig/C_H_F.hpd +465 -0
  119. pyromat/data/ig/C_H_F_O.hpd +465 -0
  120. pyromat/data/ig/C_H_P.hpd +464 -0
  121. pyromat/data/ig/C_I_N.hpd +465 -0
  122. pyromat/data/ig/C_N2_1.hpd +464 -0
  123. pyromat/data/ig/Ca_H2_O2.hpd +446 -0
  124. pyromat/data/ig/Ca_H_O.hpd +447 -0
  125. pyromat/data/ig/Cl10_W2.hpd +445 -0
  126. pyromat/data/ig/Cl2_Co.hpd +319 -0
  127. pyromat/data/ig/Cl2_F_O_P.hpd +466 -0
  128. pyromat/data/ig/Cl2_H2_Si.hpd +465 -0
  129. pyromat/data/ig/Cl2_Hg.hpd +354 -0
  130. pyromat/data/ig/Cl2_Mo_O2.hpd +446 -0
  131. pyromat/data/ig/Cl2_O2_W.hpd +464 -0
  132. pyromat/data/ig/Cl2_W.hpd +463 -0
  133. pyromat/data/ig/Cl2_Zr.hpd +319 -0
  134. pyromat/data/ig/Cl3_Co.hpd +447 -0
  135. pyromat/data/ig/Cl3_F_Si.hpd +447 -0
  136. pyromat/data/ig/Cl3_H_Si.hpd +466 -0
  137. pyromat/data/ig/Cl3_O_P.hpd +483 -0
  138. pyromat/data/ig/Cl3_P_S.hpd +448 -0
  139. pyromat/data/ig/Cl3_Zr.hpd +463 -0
  140. pyromat/data/ig/Cl4_Co2.hpd +445 -0
  141. pyromat/data/ig/Cl4_Mg2.hpd +445 -0
  142. pyromat/data/ig/Cl4_Mo.hpd +354 -0
  143. pyromat/data/ig/Cl4_O_W.hpd +390 -0
  144. pyromat/data/ig/Cl4_W.hpd +445 -0
  145. pyromat/data/ig/Cl4_Zr.hpd +445 -0
  146. pyromat/data/ig/Cl5_Mo.hpd +375 -0
  147. pyromat/data/ig/Cl5_Nb.hpd +403 -0
  148. pyromat/data/ig/Cl5_P.hpd +446 -0
  149. pyromat/data/ig/Cl5_Ta.hpd +403 -0
  150. pyromat/data/ig/Cl5_W.hpd +354 -0
  151. pyromat/data/ig/Cl6_Mo.hpd +445 -0
  152. pyromat/data/ig/Cl6_W.hpd +354 -0
  153. pyromat/data/ig/Cl_Co.hpd +463 -0
  154. pyromat/data/ig/Cl_F2_O_P.hpd +470 -0
  155. pyromat/data/ig/Cl_F3_Si.hpd +465 -0
  156. pyromat/data/ig/Cl_F5.hpd +464 -0
  157. pyromat/data/ig/Cl_F5_S.hpd +466 -0
  158. pyromat/data/ig/Cl_F_Li2.hpd +464 -0
  159. pyromat/data/ig/Cl_F_O3.hpd +472 -0
  160. pyromat/data/ig/Cl_H.hpd +493 -0
  161. pyromat/data/ig/Cl_H3_Si.hpd +466 -0
  162. pyromat/data/ig/Cl_H_O.hpd +465 -0
  163. pyromat/data/ig/Cl_Hg.hpd +445 -0
  164. pyromat/data/ig/Cl_I.hpd +390 -0
  165. pyromat/data/ig/Cl_Li_O.hpd +465 -0
  166. pyromat/data/ig/Cl_P.hpd +446 -0
  167. pyromat/data/ig/Cl_W.hpd +463 -0
  168. pyromat/data/ig/Cl_Zr.hpd +463 -0
  169. pyromat/data/ig/Co.hpd +242 -0
  170. pyromat/data/ig/Co_F2.hpd +249 -0
  171. pyromat/data/ig/Cs2_H2_O2.hpd +464 -0
  172. pyromat/data/ig/Cs_H_O.hpd +322 -0
  173. pyromat/data/ig/D_H.hpd +464 -0
  174. pyromat/data/ig/D_H_O.hpd +467 -0
  175. pyromat/data/ig/F10_Mo2.hpd +445 -0
  176. pyromat/data/ig/F10_S2.hpd +465 -0
  177. pyromat/data/ig/F15_Mo3.hpd +445 -0
  178. pyromat/data/ig/F2_Fe.hpd +249 -0
  179. pyromat/data/ig/F2_H2_Si.hpd +465 -0
  180. pyromat/data/ig/F2_Hg.hpd +321 -0
  181. pyromat/data/ig/F2_Mo.hpd +445 -0
  182. pyromat/data/ig/F2_N2_1.hpd +469 -0
  183. pyromat/data/ig/F2_O_Si.hpd +465 -0
  184. pyromat/data/ig/F2_O_Ti.hpd +446 -0
  185. pyromat/data/ig/F2_S2_1.hpd +446 -0
  186. pyromat/data/ig/F2_Ti.hpd +463 -0
  187. pyromat/data/ig/F2_Zr.hpd +249 -0
  188. pyromat/data/ig/F3_Fe.hpd +445 -0
  189. pyromat/data/ig/F3_H_Si.hpd +465 -0
  190. pyromat/data/ig/F3_Mo.hpd +445 -0
  191. pyromat/data/ig/F3_O_P.hpd +471 -0
  192. pyromat/data/ig/F3_P_S.hpd +465 -0
  193. pyromat/data/ig/F3_Ti.hpd +445 -0
  194. pyromat/data/ig/F3_Zr.hpd +463 -0
  195. pyromat/data/ig/F4_Mo.hpd +463 -0
  196. pyromat/data/ig/F4_Mo_O.hpd +446 -0
  197. pyromat/data/ig/F4_O_W.hpd +390 -0
  198. pyromat/data/ig/F4_Ti.hpd +447 -0
  199. pyromat/data/ig/F4_Zr.hpd +446 -0
  200. pyromat/data/ig/F5_I.hpd +446 -0
  201. pyromat/data/ig/F5_Mo.hpd +445 -0
  202. pyromat/data/ig/F6_Mo.hpd +394 -0
  203. pyromat/data/ig/F6_W.hpd +396 -0
  204. pyromat/data/ig/F7_I.hpd +447 -0
  205. pyromat/data/ig/F_Fe.hpd +445 -0
  206. pyromat/data/ig/F_H.hpd +464 -0
  207. pyromat/data/ig/F_H3_Si.hpd +466 -0
  208. pyromat/data/ig/F_H_O.hpd +465 -0
  209. pyromat/data/ig/F_H_O3_S.hpd +467 -0
  210. pyromat/data/ig/F_Hg.hpd +445 -0
  211. pyromat/data/ig/F_I.hpd +446 -0
  212. pyromat/data/ig/F_Mo.hpd +463 -0
  213. pyromat/data/ig/F_O_Ti.hpd +464 -0
  214. pyromat/data/ig/F_P_S.hpd +464 -0
  215. pyromat/data/ig/F_Ti.hpd +463 -0
  216. pyromat/data/ig/F_W.hpd +463 -0
  217. pyromat/data/ig/F_Zr.hpd +463 -0
  218. pyromat/data/ig/Fe2_I4.hpd +445 -0
  219. pyromat/data/ig/Fe_H2_O2.hpd +466 -0
  220. pyromat/data/ig/Fe_I2.hpd +319 -0
  221. pyromat/data/ig/Fe_S.hpd +194 -0
  222. pyromat/data/ig/Ga.hpd +291 -0
  223. pyromat/data/ig/H2_Mo_O4.hpd +465 -0
  224. pyromat/data/ig/H2_O4_W.hpd +466 -0
  225. pyromat/data/ig/H2_P.hpd +464 -0
  226. pyromat/data/ig/H_Hg.hpd +463 -0
  227. pyromat/data/ig/H_Pb.hpd +463 -0
  228. pyromat/data/ig/H_Zr.hpd +463 -0
  229. pyromat/data/ig/Hf.hpd +116 -0
  230. pyromat/data/ig/Hg_I.hpd +446 -0
  231. pyromat/data/ig/Hg_I2.hpd +355 -0
  232. pyromat/data/ig/Hg_O.hpd +447 -0
  233. pyromat/data/ig/I2_K2.hpd +446 -0
  234. pyromat/data/ig/I2_Li2.hpd +445 -0
  235. pyromat/data/ig/I2_Mo.hpd +464 -0
  236. pyromat/data/ig/I2_Ti.hpd +463 -0
  237. pyromat/data/ig/I2_Zr.hpd +319 -0
  238. pyromat/data/ig/I3_Mo.hpd +446 -0
  239. pyromat/data/ig/I3_Si.hpd +446 -0
  240. pyromat/data/ig/I3_Ti.hpd +445 -0
  241. pyromat/data/ig/I3_Zr.hpd +445 -0
  242. pyromat/data/ig/I4_Mo.hpd +446 -0
  243. pyromat/data/ig/I4_Si.hpd +410 -0
  244. pyromat/data/ig/I4_Ti.hpd +354 -0
  245. pyromat/data/ig/I4_Zr.hpd +445 -0
  246. pyromat/data/ig/I_K.hpd +285 -0
  247. pyromat/data/ig/I_Li.hpd +285 -0
  248. pyromat/data/ig/I_N_O.hpd +465 -0
  249. pyromat/data/ig/I_Sr.hpd +463 -0
  250. pyromat/data/ig/I_Ti.hpd +463 -0
  251. pyromat/data/ig/I_Zr.hpd +445 -0
  252. pyromat/data/ig/Li_Na_O.hpd +464 -0
  253. pyromat/data/ig/Mn.hpd +298 -0
  254. pyromat/data/ig/Mo.hpd +116 -0
  255. pyromat/data/ig/Mo_O.hpd +447 -0
  256. pyromat/data/ig/Mo_O2.hpd +465 -0
  257. pyromat/data/ig/N_P.hpd +464 -0
  258. pyromat/data/ig/O12_W4.hpd +445 -0
  259. pyromat/data/ig/O2_W.hpd +463 -0
  260. pyromat/data/ig/O3_W.hpd +250 -0
  261. pyromat/data/ig/O6_P4.hpd +463 -0
  262. pyromat/data/ig/O6_W2.hpd +445 -0
  263. pyromat/data/ig/O8_W3.hpd +464 -0
  264. pyromat/data/ig/O9_W3.hpd +445 -0
  265. pyromat/data/ig/O_W.hpd +464 -0
  266. pyromat/data/ig/P_S.hpd +446 -0
  267. pyromat/data/ig/Rb.hpd +414 -0
  268. pyromat/data/ig/Rb2.hpd +463 -0
  269. pyromat/data/ig/S3.hpd +444 -0
  270. pyromat/data/ig/S4.hpd +444 -0
  271. pyromat/data/ig/S5.hpd +444 -0
  272. pyromat/data/ig/S6.hpd +451 -0
  273. pyromat/data/ig/S7.hpd +444 -0
  274. pyromat/data/ig2/Al+.hpd +39 -0
  275. pyromat/data/ig2/Al-.hpd +39 -0
  276. pyromat/data/ig2/Al.hpd +43 -0
  277. pyromat/data/ig2/Al2.hpd +42 -0
  278. pyromat/data/ig2/Al2_Br6.hpd +42 -0
  279. pyromat/data/ig2/Al2_Cl6.hpd +48 -0
  280. pyromat/data/ig2/Al2_F6.hpd +42 -0
  281. pyromat/data/ig2/Al2_I6.hpd +43 -0
  282. pyromat/data/ig2/Al2_O+.hpd +40 -0
  283. pyromat/data/ig2/Al2_O.hpd +42 -0
  284. pyromat/data/ig2/Al2_O2+.hpd +40 -0
  285. pyromat/data/ig2/Al2_O2.hpd +42 -0
  286. pyromat/data/ig2/Al_B_O2.hpd +43 -0
  287. pyromat/data/ig2/Al_Br.hpd +42 -0
  288. pyromat/data/ig2/Al_Br3.hpd +42 -0
  289. pyromat/data/ig2/Al_Cl+.hpd +40 -0
  290. pyromat/data/ig2/Al_Cl.hpd +43 -0
  291. pyromat/data/ig2/Al_Cl2+.hpd +40 -0
  292. pyromat/data/ig2/Al_Cl2-.hpd +40 -0
  293. pyromat/data/ig2/Al_Cl2.hpd +42 -0
  294. pyromat/data/ig2/Al_Cl2_F.hpd +44 -0
  295. pyromat/data/ig2/Al_Cl3.hpd +42 -0
  296. pyromat/data/ig2/Al_Cl_F+.hpd +41 -0
  297. pyromat/data/ig2/Al_Cl_F.hpd +43 -0
  298. pyromat/data/ig2/Al_Cl_F2.hpd +44 -0
  299. pyromat/data/ig2/Al_Cl_O.hpd +43 -0
  300. pyromat/data/ig2/Al_F+.hpd +40 -0
  301. pyromat/data/ig2/Al_F.hpd +43 -0
  302. pyromat/data/ig2/Al_F2+.hpd +40 -0
  303. pyromat/data/ig2/Al_F2-.hpd +40 -0
  304. pyromat/data/ig2/Al_F2.hpd +42 -0
  305. pyromat/data/ig2/Al_F2_O-.hpd +41 -0
  306. pyromat/data/ig2/Al_F2_O.hpd +43 -0
  307. pyromat/data/ig2/Al_F3.hpd +45 -0
  308. pyromat/data/ig2/Al_F4-.hpd +40 -0
  309. pyromat/data/ig2/Al_F4_Li.hpd +43 -0
  310. pyromat/data/ig2/Al_F4_Na.hpd +43 -0
  311. pyromat/data/ig2/Al_F_O.hpd +43 -0
  312. pyromat/data/ig2/Al_I.hpd +42 -0
  313. pyromat/data/ig2/Al_I3.hpd +42 -0
  314. pyromat/data/ig2/Al_N.hpd +44 -0
  315. pyromat/data/ig2/Al_O+.hpd +40 -0
  316. pyromat/data/ig2/Al_O-.hpd +40 -0
  317. pyromat/data/ig2/Al_O.hpd +43 -0
  318. pyromat/data/ig2/Al_O2-.hpd +40 -0
  319. pyromat/data/ig2/Al_O2.hpd +42 -0
  320. pyromat/data/ig2/Al_S.hpd +43 -0
  321. pyromat/data/ig2/Ar+.hpd +39 -0
  322. pyromat/data/ig2/Ar.hpd +38 -0
  323. pyromat/data/ig2/B+.hpd +39 -0
  324. pyromat/data/ig2/B-.hpd +39 -0
  325. pyromat/data/ig2/B.hpd +42 -0
  326. pyromat/data/ig2/B2.hpd +38 -0
  327. pyromat/data/ig2/B2_O.hpd +42 -0
  328. pyromat/data/ig2/B2_O2.hpd +42 -0
  329. pyromat/data/ig2/B2_O3.hpd +42 -0
  330. pyromat/data/ig2/B3_Cl3_O3.hpd +44 -0
  331. pyromat/data/ig2/B3_F3_O3.hpd +44 -0
  332. pyromat/data/ig2/B_Be_O2.hpd +40 -0
  333. pyromat/data/ig2/B_Cl+.hpd +40 -0
  334. pyromat/data/ig2/B_Cl.hpd +43 -0
  335. pyromat/data/ig2/B_Cl2+.hpd +40 -0
  336. pyromat/data/ig2/B_Cl2-.hpd +40 -0
  337. pyromat/data/ig2/B_Cl2.hpd +43 -0
  338. pyromat/data/ig2/B_Cl3.hpd +52 -0
  339. pyromat/data/ig2/B_Cl_F.hpd +44 -0
  340. pyromat/data/ig2/B_Cl_O.hpd +43 -0
  341. pyromat/data/ig2/B_F.hpd +44 -0
  342. pyromat/data/ig2/B_F2+.hpd +40 -0
  343. pyromat/data/ig2/B_F2-.hpd +40 -0
  344. pyromat/data/ig2/B_F2.hpd +43 -0
  345. pyromat/data/ig2/B_F2_O.hpd +43 -0
  346. pyromat/data/ig2/B_F3.hpd +52 -0
  347. pyromat/data/ig2/B_F_O.hpd +43 -0
  348. pyromat/data/ig2/B_K_O2.hpd +43 -0
  349. pyromat/data/ig2/B_Li_O2.hpd +43 -0
  350. pyromat/data/ig2/B_N.hpd +43 -0
  351. pyromat/data/ig2/B_Na_O2.hpd +43 -0
  352. pyromat/data/ig2/B_O.hpd +43 -0
  353. pyromat/data/ig2/B_O2-.hpd +40 -0
  354. pyromat/data/ig2/B_O2.hpd +42 -0
  355. pyromat/data/ig2/B_S.hpd +43 -0
  356. pyromat/data/ig2/Ba.hpd +38 -0
  357. pyromat/data/ig2/Ba_Br.hpd +42 -0
  358. pyromat/data/ig2/Ba_Br2.hpd +42 -0
  359. pyromat/data/ig2/Ba_Cl.hpd +39 -0
  360. pyromat/data/ig2/Ba_Cl2.hpd +44 -0
  361. pyromat/data/ig2/Ba_F+.hpd +40 -0
  362. pyromat/data/ig2/Ba_F.hpd +43 -0
  363. pyromat/data/ig2/Ba_F2.hpd +43 -0
  364. pyromat/data/ig2/Ba_S.hpd +44 -0
  365. pyromat/data/ig2/Be+.hpd +39 -0
  366. pyromat/data/ig2/Be.hpd +42 -0
  367. pyromat/data/ig2/Be2_F2_O.hpd +43 -0
  368. pyromat/data/ig2/Be2_O.hpd +42 -0
  369. pyromat/data/ig2/Be2_O2.hpd +42 -0
  370. pyromat/data/ig2/Be3_O3.hpd +39 -0
  371. pyromat/data/ig2/Be4_O4.hpd +39 -0
  372. pyromat/data/ig2/Be_Br.hpd +42 -0
  373. pyromat/data/ig2/Be_Br2.hpd +44 -0
  374. pyromat/data/ig2/Be_Cl+.hpd +40 -0
  375. pyromat/data/ig2/Be_Cl.hpd +43 -0
  376. pyromat/data/ig2/Be_Cl2.hpd +42 -0
  377. pyromat/data/ig2/Be_Cl_F.hpd +43 -0
  378. pyromat/data/ig2/Be_F.hpd +43 -0
  379. pyromat/data/ig2/Be_F2.hpd +42 -0
  380. pyromat/data/ig2/Be_I.hpd +42 -0
  381. pyromat/data/ig2/Be_I2.hpd +44 -0
  382. pyromat/data/ig2/Be_N.hpd +43 -0
  383. pyromat/data/ig2/Be_O.hpd +44 -0
  384. pyromat/data/ig2/Be_S.hpd +44 -0
  385. pyromat/data/ig2/Br.hpd +42 -0
  386. pyromat/data/ig2/Br2.hpd +49 -0
  387. pyromat/data/ig2/Br2_Ca.hpd +42 -0
  388. pyromat/data/ig2/Br2_Hg.hpd +51 -0
  389. pyromat/data/ig2/Br2_Mg.hpd +42 -0
  390. pyromat/data/ig2/Br2_Pb.hpd +42 -0
  391. pyromat/data/ig2/Br2_Si.hpd +43 -0
  392. pyromat/data/ig2/Br3_Si.hpd +43 -0
  393. pyromat/data/ig2/Br4_Pb.hpd +42 -0
  394. pyromat/data/ig2/Br4_Si.hpd +43 -0
  395. pyromat/data/ig2/Br_Ca.hpd +42 -0
  396. pyromat/data/ig2/Br_Mg.hpd +42 -0
  397. pyromat/data/ig2/Br_Na.hpd +43 -0
  398. pyromat/data/ig2/Br_Pb.hpd +42 -0
  399. pyromat/data/ig2/Br_Si.hpd +43 -0
  400. pyromat/data/ig2/Br_Sr.hpd +42 -0
  401. pyromat/data/ig2/C+.hpd +39 -0
  402. pyromat/data/ig2/C-.hpd +39 -0
  403. pyromat/data/ig2/C.hpd +43 -0
  404. pyromat/data/ig2/C10_H21.hpd +39 -0
  405. pyromat/data/ig2/C10_H8.hpd +39 -0
  406. pyromat/data/ig2/C12_D10.hpd +39 -0
  407. pyromat/data/ig2/C12_D9.hpd +39 -0
  408. pyromat/data/ig2/C12_H10.hpd +39 -0
  409. pyromat/data/ig2/C12_H23.hpd +39 -0
  410. pyromat/data/ig2/C12_H9.hpd +39 -0
  411. pyromat/data/ig2/C2+.hpd +39 -0
  412. pyromat/data/ig2/C2-.hpd +39 -0
  413. pyromat/data/ig2/C2.hpd +42 -0
  414. pyromat/data/ig2/C2_Cl2.hpd +50 -0
  415. pyromat/data/ig2/C2_Cl4.hpd +97 -0
  416. pyromat/data/ig2/C2_Cl6.hpd +69 -0
  417. pyromat/data/ig2/C2_F2.hpd +50 -0
  418. pyromat/data/ig2/C2_F4.hpd +55 -0
  419. pyromat/data/ig2/C2_H.hpd +43 -0
  420. pyromat/data/ig2/C2_H2.hpd +50 -0
  421. pyromat/data/ig2/C2_H2_O.hpd +40 -0
  422. pyromat/data/ig2/C2_H3.hpd +39 -0
  423. pyromat/data/ig2/C2_H3_N.hpd +40 -0
  424. pyromat/data/ig2/C2_H3_O.hpd +40 -0
  425. pyromat/data/ig2/C2_H4.hpd +39 -0
  426. pyromat/data/ig2/C2_H4_O.hpd +40 -0
  427. pyromat/data/ig2/C2_H4_O2.hpd +40 -0
  428. pyromat/data/ig2/C2_H4_O4.hpd +40 -0
  429. pyromat/data/ig2/C2_H5.hpd +39 -0
  430. pyromat/data/ig2/C2_H6.hpd +39 -0
  431. pyromat/data/ig2/C2_H6_N2.hpd +40 -0
  432. pyromat/data/ig2/C2_H6_O.hpd +40 -0
  433. pyromat/data/ig2/C2_H_Cl.hpd +51 -0
  434. pyromat/data/ig2/C2_H_F.hpd +52 -0
  435. pyromat/data/ig2/C2_H_N.hpd +40 -0
  436. pyromat/data/ig2/C2_H_O.hpd +40 -0
  437. pyromat/data/ig2/C2_K2_N2.hpd +43 -0
  438. pyromat/data/ig2/C2_N.hpd +42 -0
  439. pyromat/data/ig2/C2_N2.hpd +61 -0
  440. pyromat/data/ig2/C2_N2_Na2.hpd +44 -0
  441. pyromat/data/ig2/C2_O.hpd +39 -0
  442. pyromat/data/ig2/C2_Si.hpd +42 -0
  443. pyromat/data/ig2/C3.hpd +43 -0
  444. pyromat/data/ig2/C3_H3.hpd +39 -0
  445. pyromat/data/ig2/C3_H4.hpd +39 -0
  446. pyromat/data/ig2/C3_H5.hpd +39 -0
  447. pyromat/data/ig2/C3_H6.hpd +39 -0
  448. pyromat/data/ig2/C3_H6_O.hpd +40 -0
  449. pyromat/data/ig2/C3_H7.hpd +39 -0
  450. pyromat/data/ig2/C3_H8.hpd +39 -0
  451. pyromat/data/ig2/C3_H8_O.hpd +40 -0
  452. pyromat/data/ig2/C3_O2.hpd +46 -0
  453. pyromat/data/ig2/C4.hpd +42 -0
  454. pyromat/data/ig2/C4_H10.hpd +39 -0
  455. pyromat/data/ig2/C4_H12_Si.hpd +54 -0
  456. pyromat/data/ig2/C4_H2.hpd +39 -0
  457. pyromat/data/ig2/C4_H4.hpd +39 -0
  458. pyromat/data/ig2/C4_H6.hpd +39 -0
  459. pyromat/data/ig2/C4_H8.hpd +39 -0
  460. pyromat/data/ig2/C4_H8_O4.hpd +40 -0
  461. pyromat/data/ig2/C4_H9.hpd +39 -0
  462. pyromat/data/ig2/C4_N2.hpd +52 -0
  463. pyromat/data/ig2/C5.hpd +42 -0
  464. pyromat/data/ig2/C5_Fe_O5.hpd +49 -0
  465. pyromat/data/ig2/C5_H10.hpd +39 -0
  466. pyromat/data/ig2/C5_H11.hpd +39 -0
  467. pyromat/data/ig2/C5_H12.hpd +39 -0
  468. pyromat/data/ig2/C5_H6.hpd +39 -0
  469. pyromat/data/ig2/C5_H8.hpd +39 -0
  470. pyromat/data/ig2/C6_D5.hpd +39 -0
  471. pyromat/data/ig2/C6_D6.hpd +39 -0
  472. pyromat/data/ig2/C6_H10.hpd +39 -0
  473. pyromat/data/ig2/C6_H12.hpd +39 -0
  474. pyromat/data/ig2/C6_H13.hpd +39 -0
  475. pyromat/data/ig2/C6_H2.hpd +39 -0
  476. pyromat/data/ig2/C6_H5.hpd +39 -0
  477. pyromat/data/ig2/C6_H5_O.hpd +40 -0
  478. pyromat/data/ig2/C6_H6.hpd +39 -0
  479. pyromat/data/ig2/C6_H6_O.hpd +40 -0
  480. pyromat/data/ig2/C7_H14.hpd +39 -0
  481. pyromat/data/ig2/C7_H15.hpd +39 -0
  482. pyromat/data/ig2/C7_H16.hpd +39 -0
  483. pyromat/data/ig2/C7_H7.hpd +39 -0
  484. pyromat/data/ig2/C7_H8.hpd +39 -0
  485. pyromat/data/ig2/C7_H8_O.hpd +40 -0
  486. pyromat/data/ig2/C8_H10.hpd +39 -0
  487. pyromat/data/ig2/C8_H16.hpd +39 -0
  488. pyromat/data/ig2/C8_H17.hpd +39 -0
  489. pyromat/data/ig2/C8_H18.hpd +39 -0
  490. pyromat/data/ig2/C8_H8.hpd +39 -0
  491. pyromat/data/ig2/C9_H19.hpd +39 -0
  492. pyromat/data/ig2/C_Al.hpd +42 -0
  493. pyromat/data/ig2/C_Cl.hpd +43 -0
  494. pyromat/data/ig2/C_Cl2.hpd +43 -0
  495. pyromat/data/ig2/C_Cl2_F2.hpd +85 -0
  496. pyromat/data/ig2/C_Cl2_O.hpd +65 -0
  497. pyromat/data/ig2/C_Cl3.hpd +43 -0
  498. pyromat/data/ig2/C_Cl3_F.hpd +93 -0
  499. pyromat/data/ig2/C_Cl4.hpd +84 -0
  500. pyromat/data/ig2/C_Cl_F3.hpd +65 -0
  501. pyromat/data/ig2/C_Cl_F_O.hpd +52 -0
  502. pyromat/data/ig2/C_Cl_N.hpd +60 -0
  503. pyromat/data/ig2/C_Cl_O.hpd +44 -0
  504. pyromat/data/ig2/C_F+.hpd +40 -0
  505. pyromat/data/ig2/C_F.hpd +43 -0
  506. pyromat/data/ig2/C_F2+.hpd +40 -0
  507. pyromat/data/ig2/C_F2.hpd +45 -0
  508. pyromat/data/ig2/C_F2_O.hpd +60 -0
  509. pyromat/data/ig2/C_F3+.hpd +40 -0
  510. pyromat/data/ig2/C_F3.hpd +43 -0
  511. pyromat/data/ig2/C_F4.hpd +62 -0
  512. pyromat/data/ig2/C_F_N.hpd +43 -0
  513. pyromat/data/ig2/C_F_O.hpd +43 -0
  514. pyromat/data/ig2/C_H+.hpd +40 -0
  515. pyromat/data/ig2/C_H.hpd +43 -0
  516. pyromat/data/ig2/C_H2.hpd +43 -0
  517. pyromat/data/ig2/C_H2_Cl2.hpd +70 -0
  518. pyromat/data/ig2/C_H2_Cl_F.hpd +56 -0
  519. pyromat/data/ig2/C_H2_F2.hpd +40 -0
  520. pyromat/data/ig2/C_H2_O.hpd +82 -0
  521. pyromat/data/ig2/C_H2_O2.hpd +40 -0
  522. pyromat/data/ig2/C_H3.hpd +43 -0
  523. pyromat/data/ig2/C_H3_Cl.hpd +61 -0
  524. pyromat/data/ig2/C_H3_F.hpd +40 -0
  525. pyromat/data/ig2/C_H3_O.hpd +40 -0
  526. pyromat/data/ig2/C_H4.hpd +39 -0
  527. pyromat/data/ig2/C_H4_O.hpd +40 -0
  528. pyromat/data/ig2/C_H_Cl.hpd +44 -0
  529. pyromat/data/ig2/C_H_Cl2_F.hpd +65 -0
  530. pyromat/data/ig2/C_H_Cl3.hpd +65 -0
  531. pyromat/data/ig2/C_H_Cl_F2.hpd +89 -0
  532. pyromat/data/ig2/C_H_F3.hpd +65 -0
  533. pyromat/data/ig2/C_H_N.hpd +72 -0
  534. pyromat/data/ig2/C_H_N_O.hpd +45 -0
  535. pyromat/data/ig2/C_H_O+.hpd +41 -0
  536. pyromat/data/ig2/C_H_O.hpd +44 -0
  537. pyromat/data/ig2/C_H_O2.hpd +40 -0
  538. pyromat/data/ig2/C_K_N.hpd +43 -0
  539. pyromat/data/ig2/C_N+.hpd +40 -0
  540. pyromat/data/ig2/C_N-.hpd +40 -0
  541. pyromat/data/ig2/C_N.hpd +43 -0
  542. pyromat/data/ig2/C_N2.hpd +43 -0
  543. pyromat/data/ig2/C_N_Na.hpd +43 -0
  544. pyromat/data/ig2/C_N_O.hpd +40 -0
  545. pyromat/data/ig2/C_O+.hpd +40 -0
  546. pyromat/data/ig2/C_O.hpd +59 -0
  547. pyromat/data/ig2/C_O2+.hpd +40 -0
  548. pyromat/data/ig2/C_O2.hpd +61 -0
  549. pyromat/data/ig2/C_O_S.hpd +51 -0
  550. pyromat/data/ig2/C_P.hpd +43 -0
  551. pyromat/data/ig2/C_S.hpd +43 -0
  552. pyromat/data/ig2/C_S2.hpd +65 -0
  553. pyromat/data/ig2/C_Si.hpd +42 -0
  554. pyromat/data/ig2/C_Si2.hpd +42 -0
  555. pyromat/data/ig2/Ca+.hpd +39 -0
  556. pyromat/data/ig2/Ca.hpd +42 -0
  557. pyromat/data/ig2/Ca2.hpd +42 -0
  558. pyromat/data/ig2/Ca_Cl.hpd +43 -0
  559. pyromat/data/ig2/Ca_Cl2.hpd +42 -0
  560. pyromat/data/ig2/Ca_F.hpd +43 -0
  561. pyromat/data/ig2/Ca_F2.hpd +42 -0
  562. pyromat/data/ig2/Ca_I.hpd +42 -0
  563. pyromat/data/ig2/Ca_I2.hpd +42 -0
  564. pyromat/data/ig2/Ca_O.hpd +44 -0
  565. pyromat/data/ig2/Ca_S.hpd +44 -0
  566. pyromat/data/ig2/Cl+.hpd +39 -0
  567. pyromat/data/ig2/Cl-.hpd +39 -0
  568. pyromat/data/ig2/Cl.hpd +42 -0
  569. pyromat/data/ig2/Cl2.hpd +52 -0
  570. pyromat/data/ig2/Cl2_Cs2.hpd +42 -0
  571. pyromat/data/ig2/Cl2_Fe.hpd +42 -0
  572. pyromat/data/ig2/Cl2_K2.hpd +42 -0
  573. pyromat/data/ig2/Cl2_Li2.hpd +42 -0
  574. pyromat/data/ig2/Cl2_Mg.hpd +42 -0
  575. pyromat/data/ig2/Cl2_Na2.hpd +43 -0
  576. pyromat/data/ig2/Cl2_Ni.hpd +42 -0
  577. pyromat/data/ig2/Cl2_O.hpd +53 -0
  578. pyromat/data/ig2/Cl2_O2_S.hpd +45 -0
  579. pyromat/data/ig2/Cl2_O_Ti.hpd +43 -0
  580. pyromat/data/ig2/Cl2_Pb+.hpd +40 -0
  581. pyromat/data/ig2/Cl2_Pb.hpd +43 -0
  582. pyromat/data/ig2/Cl2_S+.hpd +40 -0
  583. pyromat/data/ig2/Cl2_S.hpd +54 -0
  584. pyromat/data/ig2/Cl2_S2.hpd +55 -0
  585. pyromat/data/ig2/Cl2_Si.hpd +42 -0
  586. pyromat/data/ig2/Cl2_Sr.hpd +42 -0
  587. pyromat/data/ig2/Cl2_Ti.hpd +42 -0
  588. pyromat/data/ig2/Cl3_Cu3.hpd +42 -0
  589. pyromat/data/ig2/Cl3_Fe.hpd +42 -0
  590. pyromat/data/ig2/Cl3_Li3.hpd +42 -0
  591. pyromat/data/ig2/Cl3_P.hpd +59 -0
  592. pyromat/data/ig2/Cl3_Si.hpd +43 -0
  593. pyromat/data/ig2/Cl3_Ti.hpd +42 -0
  594. pyromat/data/ig2/Cl4_Fe2.hpd +42 -0
  595. pyromat/data/ig2/Cl4_Pb.hpd +42 -0
  596. pyromat/data/ig2/Cl4_Si.hpd +59 -0
  597. pyromat/data/ig2/Cl4_Ti.hpd +54 -0
  598. pyromat/data/ig2/Cl4_V.hpd +39 -0
  599. pyromat/data/ig2/Cl6_Fe2.hpd +42 -0
  600. pyromat/data/ig2/Cl_Cs.hpd +44 -0
  601. pyromat/data/ig2/Cl_Cu.hpd +44 -0
  602. pyromat/data/ig2/Cl_D.hpd +44 -0
  603. pyromat/data/ig2/Cl_D_O.hpd +43 -0
  604. pyromat/data/ig2/Cl_F.hpd +44 -0
  605. pyromat/data/ig2/Cl_F3.hpd +42 -0
  606. pyromat/data/ig2/Cl_F_Mg.hpd +43 -0
  607. pyromat/data/ig2/Cl_F_O2_S.hpd +57 -0
  608. pyromat/data/ig2/Cl_Fe.hpd +42 -0
  609. pyromat/data/ig2/Cl_K.hpd +43 -0
  610. pyromat/data/ig2/Cl_Li.hpd +43 -0
  611. pyromat/data/ig2/Cl_Mg+.hpd +40 -0
  612. pyromat/data/ig2/Cl_Mg.hpd +43 -0
  613. pyromat/data/ig2/Cl_N_O.hpd +53 -0
  614. pyromat/data/ig2/Cl_N_O2.hpd +43 -0
  615. pyromat/data/ig2/Cl_Na.hpd +44 -0
  616. pyromat/data/ig2/Cl_Ni.hpd +44 -0
  617. pyromat/data/ig2/Cl_O.hpd +43 -0
  618. pyromat/data/ig2/Cl_O2.hpd +53 -0
  619. pyromat/data/ig2/Cl_O_Ti.hpd +43 -0
  620. pyromat/data/ig2/Cl_Pb+.hpd +40 -0
  621. pyromat/data/ig2/Cl_Pb.hpd +42 -0
  622. pyromat/data/ig2/Cl_S.hpd +43 -0
  623. pyromat/data/ig2/Cl_S2.hpd +43 -0
  624. pyromat/data/ig2/Cl_Si.hpd +43 -0
  625. pyromat/data/ig2/Cl_Sr.hpd +43 -0
  626. pyromat/data/ig2/Cl_Ti.hpd +42 -0
  627. pyromat/data/ig2/Cr.hpd +42 -0
  628. pyromat/data/ig2/Cr_N.hpd +44 -0
  629. pyromat/data/ig2/Cr_O.hpd +43 -0
  630. pyromat/data/ig2/Cr_O2.hpd +43 -0
  631. pyromat/data/ig2/Cr_O3.hpd +42 -0
  632. pyromat/data/ig2/Cs+.hpd +39 -0
  633. pyromat/data/ig2/Cs.hpd +38 -0
  634. pyromat/data/ig2/Cs2.hpd +42 -0
  635. pyromat/data/ig2/Cs2_F2.hpd +42 -0
  636. pyromat/data/ig2/Cs2_O.hpd +42 -0
  637. pyromat/data/ig2/Cs2_O4_S.hpd +43 -0
  638. pyromat/data/ig2/Cs_F.hpd +44 -0
  639. pyromat/data/ig2/Cs_O.hpd +43 -0
  640. pyromat/data/ig2/Cu+.hpd +39 -0
  641. pyromat/data/ig2/Cu.hpd +38 -0
  642. pyromat/data/ig2/Cu2.hpd +42 -0
  643. pyromat/data/ig2/Cu_F.hpd +43 -0
  644. pyromat/data/ig2/Cu_F2.hpd +42 -0
  645. pyromat/data/ig2/Cu_O.hpd +44 -0
  646. pyromat/data/ig2/D+.hpd +39 -0
  647. pyromat/data/ig2/D-.hpd +39 -0
  648. pyromat/data/ig2/D.hpd +38 -0
  649. pyromat/data/ig2/D2+.hpd +39 -0
  650. pyromat/data/ig2/D2-.hpd +39 -0
  651. pyromat/data/ig2/D2.hpd +44 -0
  652. pyromat/data/ig2/D2_N.hpd +42 -0
  653. pyromat/data/ig2/D2_N2.hpd +43 -0
  654. pyromat/data/ig2/D2_O.hpd +43 -0
  655. pyromat/data/ig2/D2_S.hpd +42 -0
  656. pyromat/data/ig2/D3_N.hpd +43 -0
  657. pyromat/data/ig2/D_F.hpd +44 -0
  658. pyromat/data/ig2/D_N.hpd +43 -0
  659. pyromat/data/ig2/D_O.hpd +43 -0
  660. pyromat/data/ig2/D_S.hpd +43 -0
  661. pyromat/data/ig2/F+.hpd +39 -0
  662. pyromat/data/ig2/F-.hpd +39 -0
  663. pyromat/data/ig2/F.hpd +42 -0
  664. pyromat/data/ig2/F2.hpd +42 -0
  665. pyromat/data/ig2/F2_K-.hpd +40 -0
  666. pyromat/data/ig2/F2_K2.hpd +42 -0
  667. pyromat/data/ig2/F2_Li-.hpd +40 -0
  668. pyromat/data/ig2/F2_Li2.hpd +42 -0
  669. pyromat/data/ig2/F2_Mg+.hpd +40 -0
  670. pyromat/data/ig2/F2_Mg.hpd +43 -0
  671. pyromat/data/ig2/F2_N.hpd +43 -0
  672. pyromat/data/ig2/F2_N2.hpd +53 -0
  673. pyromat/data/ig2/F2_Na-.hpd +40 -0
  674. pyromat/data/ig2/F2_Na2.hpd +42 -0
  675. pyromat/data/ig2/F2_O.hpd +52 -0
  676. pyromat/data/ig2/F2_O2_S.hpd +56 -0
  677. pyromat/data/ig2/F2_O_S.hpd +51 -0
  678. pyromat/data/ig2/F2_P+.hpd +40 -0
  679. pyromat/data/ig2/F2_P.hpd +43 -0
  680. pyromat/data/ig2/F2_Pb.hpd +42 -0
  681. pyromat/data/ig2/F2_S+.hpd +40 -0
  682. pyromat/data/ig2/F2_S-.hpd +40 -0
  683. pyromat/data/ig2/F2_S.hpd +43 -0
  684. pyromat/data/ig2/F2_S2.hpd +43 -0
  685. pyromat/data/ig2/F2_Si.hpd +43 -0
  686. pyromat/data/ig2/F2_Sr.hpd +42 -0
  687. pyromat/data/ig2/F3_Li3.hpd +39 -0
  688. pyromat/data/ig2/F3_N.hpd +50 -0
  689. pyromat/data/ig2/F3_N_O.hpd +51 -0
  690. pyromat/data/ig2/F3_P.hpd +50 -0
  691. pyromat/data/ig2/F3_S+.hpd +40 -0
  692. pyromat/data/ig2/F3_S-.hpd +40 -0
  693. pyromat/data/ig2/F3_S.hpd +43 -0
  694. pyromat/data/ig2/F3_Si.hpd +43 -0
  695. pyromat/data/ig2/F4_Mg2.hpd +42 -0
  696. pyromat/data/ig2/F4_N2.hpd +50 -0
  697. pyromat/data/ig2/F4_Pb.hpd +42 -0
  698. pyromat/data/ig2/F4_S+.hpd +40 -0
  699. pyromat/data/ig2/F4_S-.hpd +40 -0
  700. pyromat/data/ig2/F4_S.hpd +50 -0
  701. pyromat/data/ig2/F4_Si.hpd +49 -0
  702. pyromat/data/ig2/F5_P.hpd +48 -0
  703. pyromat/data/ig2/F5_S+.hpd +40 -0
  704. pyromat/data/ig2/F5_S-.hpd +40 -0
  705. pyromat/data/ig2/F5_S.hpd +43 -0
  706. pyromat/data/ig2/F6_S-.hpd +40 -0
  707. pyromat/data/ig2/F6_S.hpd +51 -0
  708. pyromat/data/ig2/F_K.hpd +43 -0
  709. pyromat/data/ig2/F_Li.hpd +43 -0
  710. pyromat/data/ig2/F_Li_O.hpd +44 -0
  711. pyromat/data/ig2/F_Mg+.hpd +40 -0
  712. pyromat/data/ig2/F_Mg.hpd +43 -0
  713. pyromat/data/ig2/F_N.hpd +43 -0
  714. pyromat/data/ig2/F_N_O.hpd +44 -0
  715. pyromat/data/ig2/F_N_O2.hpd +43 -0
  716. pyromat/data/ig2/F_N_O3.hpd +44 -0
  717. pyromat/data/ig2/F_Na.hpd +43 -0
  718. pyromat/data/ig2/F_O.hpd +43 -0
  719. pyromat/data/ig2/F_O2.hpd +39 -0
  720. pyromat/data/ig2/F_P+.hpd +40 -0
  721. pyromat/data/ig2/F_P-.hpd +40 -0
  722. pyromat/data/ig2/F_P.hpd +43 -0
  723. pyromat/data/ig2/F_Pb.hpd +42 -0
  724. pyromat/data/ig2/F_S+.hpd +40 -0
  725. pyromat/data/ig2/F_S-.hpd +40 -0
  726. pyromat/data/ig2/F_S.hpd +43 -0
  727. pyromat/data/ig2/F_Si.hpd +44 -0
  728. pyromat/data/ig2/F_Sr+.hpd +40 -0
  729. pyromat/data/ig2/F_Sr.hpd +43 -0
  730. pyromat/data/ig2/Fe+.hpd +39 -0
  731. pyromat/data/ig2/Fe-.hpd +39 -0
  732. pyromat/data/ig2/Fe.hpd +42 -0
  733. pyromat/data/ig2/Fe_O.hpd +44 -0
  734. pyromat/data/ig2/H+.hpd +39 -0
  735. pyromat/data/ig2/H-.hpd +39 -0
  736. pyromat/data/ig2/H.hpd +38 -0
  737. pyromat/data/ig2/H2+.hpd +39 -0
  738. pyromat/data/ig2/H2-.hpd +39 -0
  739. pyromat/data/ig2/H2.hpd +49 -0
  740. pyromat/data/ig2/H2_B.hpd +39 -0
  741. pyromat/data/ig2/H2_Ba_O2.hpd +40 -0
  742. pyromat/data/ig2/H2_Be_O2.hpd +40 -0
  743. pyromat/data/ig2/H2_Br2_Si.hpd +40 -0
  744. pyromat/data/ig2/H2_Ca_O2.hpd +40 -0
  745. pyromat/data/ig2/H2_Cl2_Si.hpd +40 -0
  746. pyromat/data/ig2/H2_Cs2_O2.hpd +40 -0
  747. pyromat/data/ig2/H2_F2.hpd +39 -0
  748. pyromat/data/ig2/H2_F2_Si.hpd +40 -0
  749. pyromat/data/ig2/H2_F_N.hpd +40 -0
  750. pyromat/data/ig2/H2_Fe_O2.hpd +40 -0
  751. pyromat/data/ig2/H2_I2_Si.hpd +44 -0
  752. pyromat/data/ig2/H2_K2_O2.hpd +43 -0
  753. pyromat/data/ig2/H2_Li2_O2.hpd +44 -0
  754. pyromat/data/ig2/H2_Mg_O2.hpd +43 -0
  755. pyromat/data/ig2/H2_N.hpd +43 -0
  756. pyromat/data/ig2/H2_N2.hpd +42 -0
  757. pyromat/data/ig2/H2_N2_O2.hpd +40 -0
  758. pyromat/data/ig2/H2_Na2_O2.hpd +44 -0
  759. pyromat/data/ig2/H2_O+.hpd +40 -0
  760. pyromat/data/ig2/H2_O.hpd +50 -0
  761. pyromat/data/ig2/H2_O2.hpd +43 -0
  762. pyromat/data/ig2/H2_O2_Sr.hpd +44 -0
  763. pyromat/data/ig2/H2_O4_S.hpd +68 -0
  764. pyromat/data/ig2/H2_S.hpd +65 -0
  765. pyromat/data/ig2/H2_Si.hpd +39 -0
  766. pyromat/data/ig2/H3_B.hpd +39 -0
  767. pyromat/data/ig2/H3_B3_O3.hpd +40 -0
  768. pyromat/data/ig2/H3_B3_O6.hpd +40 -0
  769. pyromat/data/ig2/H3_Br_Si.hpd +40 -0
  770. pyromat/data/ig2/H3_Cl_Si.hpd +40 -0
  771. pyromat/data/ig2/H3_F3.hpd +39 -0
  772. pyromat/data/ig2/H3_F_Si.hpd +40 -0
  773. pyromat/data/ig2/H3_I_Si.hpd +44 -0
  774. pyromat/data/ig2/H3_N.hpd +50 -0
  775. pyromat/data/ig2/H3_N_O.hpd +40 -0
  776. pyromat/data/ig2/H3_O+.hpd +40 -0
  777. pyromat/data/ig2/H3_P.hpd +54 -0
  778. pyromat/data/ig2/H3_Si.hpd +39 -0
  779. pyromat/data/ig2/H4_F4.hpd +39 -0
  780. pyromat/data/ig2/H4_N+.hpd +40 -0
  781. pyromat/data/ig2/H4_N2.hpd +52 -0
  782. pyromat/data/ig2/H4_Si.hpd +50 -0
  783. pyromat/data/ig2/H5_F5.hpd +39 -0
  784. pyromat/data/ig2/H6_F6.hpd +39 -0
  785. pyromat/data/ig2/H7_F7.hpd +39 -0
  786. pyromat/data/ig2/H_Al.hpd +39 -0
  787. pyromat/data/ig2/H_Al_O+.hpd +41 -0
  788. pyromat/data/ig2/H_Al_O-.hpd +41 -0
  789. pyromat/data/ig2/H_Al_O.hpd +40 -0
  790. pyromat/data/ig2/H_Al_O2.hpd +40 -0
  791. pyromat/data/ig2/H_B.hpd +39 -0
  792. pyromat/data/ig2/H_B_F2.hpd +40 -0
  793. pyromat/data/ig2/H_B_O+.hpd +41 -0
  794. pyromat/data/ig2/H_B_O-.hpd +41 -0
  795. pyromat/data/ig2/H_B_O.hpd +40 -0
  796. pyromat/data/ig2/H_B_O2.hpd +40 -0
  797. pyromat/data/ig2/H_B_S+.hpd +41 -0
  798. pyromat/data/ig2/H_B_S.hpd +40 -0
  799. pyromat/data/ig2/H_Ba_O+.hpd +41 -0
  800. pyromat/data/ig2/H_Ba_O.hpd +40 -0
  801. pyromat/data/ig2/H_Be+.hpd +40 -0
  802. pyromat/data/ig2/H_Be.hpd +39 -0
  803. pyromat/data/ig2/H_Be_O+.hpd +41 -0
  804. pyromat/data/ig2/H_Be_O.hpd +40 -0
  805. pyromat/data/ig2/H_Br.hpd +39 -0
  806. pyromat/data/ig2/H_Br3_Si.hpd +40 -0
  807. pyromat/data/ig2/H_Ca_O+.hpd +41 -0
  808. pyromat/data/ig2/H_Ca_O.hpd +40 -0
  809. pyromat/data/ig2/H_Cl.hpd +39 -0
  810. pyromat/data/ig2/H_Cl3_Si.hpd +40 -0
  811. pyromat/data/ig2/H_Cl_O.hpd +40 -0
  812. pyromat/data/ig2/H_Cs_O+.hpd +41 -0
  813. pyromat/data/ig2/H_Cs_O.hpd +40 -0
  814. pyromat/data/ig2/H_D+.hpd +40 -0
  815. pyromat/data/ig2/H_D-.hpd +40 -0
  816. pyromat/data/ig2/H_D.hpd +39 -0
  817. pyromat/data/ig2/H_D_O.hpd +40 -0
  818. pyromat/data/ig2/H_F.hpd +39 -0
  819. pyromat/data/ig2/H_F2_N.hpd +40 -0
  820. pyromat/data/ig2/H_F3_Si.hpd +40 -0
  821. pyromat/data/ig2/H_F_N.hpd +40 -0
  822. pyromat/data/ig2/H_F_O.hpd +40 -0
  823. pyromat/data/ig2/H_F_O3_S.hpd +41 -0
  824. pyromat/data/ig2/H_I.hpd +43 -0
  825. pyromat/data/ig2/H_I3_Si.hpd +44 -0
  826. pyromat/data/ig2/H_K.hpd +43 -0
  827. pyromat/data/ig2/H_K_O+.hpd +41 -0
  828. pyromat/data/ig2/H_K_O.hpd +44 -0
  829. pyromat/data/ig2/H_Li.hpd +43 -0
  830. pyromat/data/ig2/H_Li_O+.hpd +41 -0
  831. pyromat/data/ig2/H_Li_O.hpd +43 -0
  832. pyromat/data/ig2/H_Mg.hpd +43 -0
  833. pyromat/data/ig2/H_Mg_O+.hpd +41 -0
  834. pyromat/data/ig2/H_Mg_O.hpd +44 -0
  835. pyromat/data/ig2/H_N+.hpd +40 -0
  836. pyromat/data/ig2/H_N.hpd +43 -0
  837. pyromat/data/ig2/H_N3.hpd +39 -0
  838. pyromat/data/ig2/H_N_O.hpd +44 -0
  839. pyromat/data/ig2/H_N_O2.hpd +40 -0
  840. pyromat/data/ig2/H_N_O3.hpd +44 -0
  841. pyromat/data/ig2/H_Na.hpd +43 -0
  842. pyromat/data/ig2/H_Na_O+.hpd +41 -0
  843. pyromat/data/ig2/H_Na_O.hpd +44 -0
  844. pyromat/data/ig2/H_O+.hpd +40 -0
  845. pyromat/data/ig2/H_O-.hpd +40 -0
  846. pyromat/data/ig2/H_O.hpd +43 -0
  847. pyromat/data/ig2/H_O2.hpd +43 -0
  848. pyromat/data/ig2/H_O_Sr+.hpd +41 -0
  849. pyromat/data/ig2/H_O_Sr.hpd +44 -0
  850. pyromat/data/ig2/H_P.hpd +43 -0
  851. pyromat/data/ig2/H_S.hpd +43 -0
  852. pyromat/data/ig2/H_Si+.hpd +40 -0
  853. pyromat/data/ig2/H_Si.hpd +43 -0
  854. pyromat/data/ig2/He+.hpd +39 -0
  855. pyromat/data/ig2/He.hpd +38 -0
  856. pyromat/data/ig2/Hg.hpd +42 -0
  857. pyromat/data/ig2/I.hpd +42 -0
  858. pyromat/data/ig2/I2.hpd +57 -0
  859. pyromat/data/ig2/I2_Mg.hpd +42 -0
  860. pyromat/data/ig2/I2_Pb.hpd +42 -0
  861. pyromat/data/ig2/I2_Si.hpd +43 -0
  862. pyromat/data/ig2/I2_Sr.hpd +42 -0
  863. pyromat/data/ig2/I4_Pb.hpd +42 -0
  864. pyromat/data/ig2/I_Mg.hpd +42 -0
  865. pyromat/data/ig2/I_Na.hpd +39 -0
  866. pyromat/data/ig2/I_Pb.hpd +42 -0
  867. pyromat/data/ig2/I_Si.hpd +43 -0
  868. pyromat/data/ig2/K+.hpd +39 -0
  869. pyromat/data/ig2/K.hpd +42 -0
  870. pyromat/data/ig2/K2.hpd +42 -0
  871. pyromat/data/ig2/K2_O4_S.hpd +43 -0
  872. pyromat/data/ig2/K_O-.hpd +40 -0
  873. pyromat/data/ig2/K_O.hpd +43 -0
  874. pyromat/data/ig2/Kr+.hpd +39 -0
  875. pyromat/data/ig2/Kr.hpd +38 -0
  876. pyromat/data/ig2/Li+.hpd +39 -0
  877. pyromat/data/ig2/Li.hpd +42 -0
  878. pyromat/data/ig2/Li2.hpd +42 -0
  879. pyromat/data/ig2/Li2_O.hpd +44 -0
  880. pyromat/data/ig2/Li2_O2.hpd +42 -0
  881. pyromat/data/ig2/Li2_O4_S.hpd +43 -0
  882. pyromat/data/ig2/Li_N.hpd +43 -0
  883. pyromat/data/ig2/Li_N_O.hpd +43 -0
  884. pyromat/data/ig2/Li_O-.hpd +40 -0
  885. pyromat/data/ig2/Li_O.hpd +43 -0
  886. pyromat/data/ig2/Mg+.hpd +39 -0
  887. pyromat/data/ig2/Mg.hpd +42 -0
  888. pyromat/data/ig2/Mg2.hpd +42 -0
  889. pyromat/data/ig2/Mg_N.hpd +42 -0
  890. pyromat/data/ig2/Mg_O.hpd +44 -0
  891. pyromat/data/ig2/Mg_S.hpd +44 -0
  892. pyromat/data/ig2/Mo2_O6.hpd +39 -0
  893. pyromat/data/ig2/Mo3_O9.hpd +39 -0
  894. pyromat/data/ig2/Mo4_O12.hpd +39 -0
  895. pyromat/data/ig2/Mo5_O15.hpd +39 -0
  896. pyromat/data/ig2/Mo_O3.hpd +42 -0
  897. pyromat/data/ig2/N+.hpd +39 -0
  898. pyromat/data/ig2/N-.hpd +39 -0
  899. pyromat/data/ig2/N.hpd +42 -0
  900. pyromat/data/ig2/N2+.hpd +39 -0
  901. pyromat/data/ig2/N2-.hpd +39 -0
  902. pyromat/data/ig2/N2.hpd +50 -0
  903. pyromat/data/ig2/N2_O+.hpd +40 -0
  904. pyromat/data/ig2/N2_O.hpd +55 -0
  905. pyromat/data/ig2/N2_O3.hpd +43 -0
  906. pyromat/data/ig2/N2_O4.hpd +44 -0
  907. pyromat/data/ig2/N2_O5.hpd +44 -0
  908. pyromat/data/ig2/N3.hpd +38 -0
  909. pyromat/data/ig2/N_O+.hpd +40 -0
  910. pyromat/data/ig2/N_O.hpd +50 -0
  911. pyromat/data/ig2/N_O2-.hpd +40 -0
  912. pyromat/data/ig2/N_O2.hpd +52 -0
  913. pyromat/data/ig2/N_O3-.hpd +40 -0
  914. pyromat/data/ig2/N_O3.hpd +44 -0
  915. pyromat/data/ig2/N_S.hpd +43 -0
  916. pyromat/data/ig2/N_Si.hpd +43 -0
  917. pyromat/data/ig2/N_Si2.hpd +42 -0
  918. pyromat/data/ig2/N_V.hpd +44 -0
  919. pyromat/data/ig2/N_Zr.hpd +39 -0
  920. pyromat/data/ig2/Na+.hpd +39 -0
  921. pyromat/data/ig2/Na.hpd +42 -0
  922. pyromat/data/ig2/Na2.hpd +42 -0
  923. pyromat/data/ig2/Na2_O.hpd +39 -0
  924. pyromat/data/ig2/Na2_O4_S.hpd +47 -0
  925. pyromat/data/ig2/Na_O-.hpd +40 -0
  926. pyromat/data/ig2/Na_O.hpd +44 -0
  927. pyromat/data/ig2/Nb.hpd +38 -0
  928. pyromat/data/ig2/Nb_O.hpd +44 -0
  929. pyromat/data/ig2/Nb_O2.hpd +44 -0
  930. pyromat/data/ig2/Ne+.hpd +39 -0
  931. pyromat/data/ig2/Ne.hpd +38 -0
  932. pyromat/data/ig2/Ni.hpd +42 -0
  933. pyromat/data/ig2/Ni_O.hpd +39 -0
  934. pyromat/data/ig2/Ni_S.hpd +39 -0
  935. pyromat/data/ig2/O+.hpd +39 -0
  936. pyromat/data/ig2/O-.hpd +39 -0
  937. pyromat/data/ig2/O.hpd +38 -0
  938. pyromat/data/ig2/O10_P4.hpd +39 -0
  939. pyromat/data/ig2/O2+.hpd +39 -0
  940. pyromat/data/ig2/O2-.hpd +39 -0
  941. pyromat/data/ig2/O2.hpd +50 -0
  942. pyromat/data/ig2/O2_P.hpd +43 -0
  943. pyromat/data/ig2/O2_S.hpd +58 -0
  944. pyromat/data/ig2/O2_Si.hpd +49 -0
  945. pyromat/data/ig2/O2_Ta.hpd +43 -0
  946. pyromat/data/ig2/O2_Ti.hpd +45 -0
  947. pyromat/data/ig2/O2_V.hpd +43 -0
  948. pyromat/data/ig2/O2_Zr.hpd +42 -0
  949. pyromat/data/ig2/O3.hpd +42 -0
  950. pyromat/data/ig2/O3_S.hpd +44 -0
  951. pyromat/data/ig2/O_P.hpd +43 -0
  952. pyromat/data/ig2/O_Pb.hpd +39 -0
  953. pyromat/data/ig2/O_S.hpd +43 -0
  954. pyromat/data/ig2/O_S2.hpd +43 -0
  955. pyromat/data/ig2/O_Si.hpd +43 -0
  956. pyromat/data/ig2/O_Sr.hpd +44 -0
  957. pyromat/data/ig2/O_Ta.hpd +43 -0
  958. pyromat/data/ig2/O_Ti.hpd +44 -0
  959. pyromat/data/ig2/O_V.hpd +44 -0
  960. pyromat/data/ig2/O_Zr.hpd +44 -0
  961. pyromat/data/ig2/P+.hpd +39 -0
  962. pyromat/data/ig2/P.hpd +44 -0
  963. pyromat/data/ig2/P2.hpd +42 -0
  964. pyromat/data/ig2/P4.hpd +41 -0
  965. pyromat/data/ig2/Pb.hpd +38 -0
  966. pyromat/data/ig2/Pb2.hpd +41 -0
  967. pyromat/data/ig2/Pb_S.hpd +44 -0
  968. pyromat/data/ig2/S+.hpd +39 -0
  969. pyromat/data/ig2/S-.hpd +39 -0
  970. pyromat/data/ig2/S.hpd +45 -0
  971. pyromat/data/ig2/S2.hpd +42 -0
  972. pyromat/data/ig2/S8.hpd +54 -0
  973. pyromat/data/ig2/S_Si.hpd +43 -0
  974. pyromat/data/ig2/S_Sr.hpd +44 -0
  975. pyromat/data/ig2/Si+.hpd +39 -0
  976. pyromat/data/ig2/Si.hpd +42 -0
  977. pyromat/data/ig2/Si2.hpd +42 -0
  978. pyromat/data/ig2/Si3.hpd +43 -0
  979. pyromat/data/ig2/Sr.hpd +42 -0
  980. pyromat/data/ig2/Ta.hpd +42 -0
  981. pyromat/data/ig2/Ti+.hpd +39 -0
  982. pyromat/data/ig2/Ti-.hpd +39 -0
  983. pyromat/data/ig2/Ti.hpd +42 -0
  984. pyromat/data/ig2/V.hpd +42 -0
  985. pyromat/data/ig2/Xe+.hpd +39 -0
  986. pyromat/data/ig2/Xe.hpd +38 -0
  987. pyromat/data/ig2/Zn-.hpd +39 -0
  988. pyromat/data/ig2/Zn.hpd +42 -0
  989. pyromat/data/ig2/Zr.hpd +42 -0
  990. pyromat/data/ig2/e.hpd +38 -0
  991. pyromat/data/igmix/air.hpd +12 -0
  992. pyromat/data/igmix/f5.hpd +10 -0
  993. pyromat/data/igmix/h35.hpd +10 -0
  994. pyromat/data/mp/C2_H2_F4.hpd +332 -0
  995. pyromat/data/mp/C3_H2_F4_1.hpd +373 -0
  996. pyromat/data/mp/C_H4.hpd +454 -0
  997. pyromat/data/mp/C_O2.hpd +512 -0
  998. pyromat/data/mp/H2_O.hpd +592 -0
  999. pyromat/data/mp/N2.hpd +434 -0
  1000. pyromat/data/mp/O2.hpd +381 -0
  1001. pyromat/igtools.py +1800 -0
  1002. pyromat/reg.py +379 -0
  1003. pyromat/registry/_example.py +85 -0
  1004. pyromat/registry/if97.py +2278 -0
  1005. pyromat/registry/ig.py +1931 -0
  1006. pyromat/registry/ig2.py +1400 -0
  1007. pyromat/registry/igmix.py +1230 -0
  1008. pyromat/registry/mp1.py +4460 -0
  1009. pyromat/units.py +617 -0
  1010. pyromat/utility.py +841 -0
pyromat/igtools.py ADDED
@@ -0,0 +1,1800 @@
1
+ """IGTOOLS - A module for ideal gas tools
2
+
3
+ ::Tools for ideal gas mixtures::
4
+
5
+ BETA RELEASE v2.4.5
6
+ """
7
+
8
+
9
+
10
+ import pyromat as pm
11
+ import numpy as np
12
+
13
+
14
+ def parse_mixstr(mixstr):
15
+ """PARSE_MIXSTR - construct a mixture dictionary from a mixture string
16
+ mdict = parse_mixstr( ... )
17
+ """
18
+ result = {}
19
+ parts = mixstr.split('+')
20
+ for this in parts:
21
+ coef = 1.0
22
+ subst = None
23
+ # Scan for the first alphabetical character
24
+ for ii,c in enumerate(this):
25
+ if c.isalpha():
26
+ break
27
+ coefstr = this[:ii].strip()
28
+ if coefstr:
29
+ try:
30
+ coef = float(coefstr)
31
+ except:
32
+ raise pm.utility.PMParamError('PARSE_MIXSTR: Failed to parse mixture fragment: ' + this)
33
+ subst = this[ii:].strip()
34
+
35
+ result[subst] = coef
36
+ return result
37
+
38
+ class IgtMix(object):
39
+ """Ideal Gas Tools dynamic Mixture
40
+
41
+ m = IgtMix( ... )
42
+
43
+ The IgtMix class instances allow users to dynamically define mixtures of
44
+ component ideal gases with a flexible interface convenient for the
45
+ command line and scripts alike. IgtMix instances have property methods
46
+ just like the rest of the PYroMat classes, but the total quanitity
47
+ (the extent) of the mixture is specified. Therefore, properties are
48
+ calculate in total and not per unit metter (not intensive).
49
+
50
+ In this example, we quickly compute the enthalpy of a mixture 35%
51
+ hydrogen and balance argon by volume.
52
+
53
+ mymix = IgtMix('0.35 H2 + .65 Ar', units='kmol')
54
+ mymix.h(T=300)
55
+ array([43.67153007])
56
+
57
+ ** METHODS **
58
+
59
+ IgtMix instances provide the same properties as the core PYroMat classes
60
+
61
+ cp() spec. heat (unit_energy / unit_temperature)
62
+ cv() spec. heat (unit_energy / unit_temperature)
63
+ d() density (unit_matter / unit_volume)
64
+ e() internal energy (unit_energy)
65
+ f() free energy (unit_energy)
66
+ g() Gibbs energy (unit_energy)
67
+ gam() spec. heat ratio (dless)
68
+ h() enthalpy (unit_energy)
69
+ mw() molecular weight (unit_mass / unit_molar)
70
+ T() temperature (unit_temperature)
71
+ p() pressure (unit_pressure)
72
+ R() gas constant (unit_energy / unit_matter / unit_temperature)
73
+ s() entropy (unit_energy / unit_temperature)
74
+ v() specific volume (unit_volume / unit_matter)
75
+ There is not currently a state() method, but there are plans to add one.
76
+
77
+ For information about the mixture, see
78
+ atoms() qty. of each element (unit_molar)
79
+ mass() total mass (unit_mass)
80
+ molar() total number of moles (unit_molar)
81
+ Tlim() lower & upper limits (unit_temperature)
82
+ X() mole fractions (dless)
83
+ Y() mass fractions (dless)
84
+
85
+ To operate on the mixture like a Numpy array, see
86
+ insert() Add a new substance
87
+ nsubst() Number of substances in the mixture
88
+ ndim() Mixture array dimension
89
+ remove() Remove a substance
90
+ reshape() Change the mixture array's shape
91
+ shape() Mixture array shape
92
+ See also the indexing features described below.
93
+
94
+ To convert to other data types, see
95
+ todict() A dictionary with keys=subst, values=quantities
96
+ toigmix() List of igmix instances
97
+ tolist() Return a list of the substances
98
+ There is also afromigmix() method.
99
+
100
+
101
+ ** DEFINING A MIXTURE **
102
+
103
+ There are six ways to define a mixture:
104
+
105
+ (1) From a string...
106
+ Strings are expected in the format: 'qty0 subst0 + qty1 subst1 + ...'
107
+ Quantities specify an amount of each substance in the units configured
108
+ in pm.config['unit_matter'] unless the optional 'units' keyword is set.
109
+ Omitted quantities are presumed to be unity, and substances can be
110
+ specified with or without their 'ig.' collection prefix. All whitespace
111
+ is ignored.
112
+
113
+ mymix = IgtMix('10 ig.N2')
114
+ mymix = igt.IgtMix('2.4 N2 + Ar')
115
+ print(mymix)
116
+ [2.4]N2 + [1.]Ar
117
+
118
+ *note* This method cannot be used to specify an ion like 'Ne+'. Instead,
119
+ use the dictionary or list methods below.
120
+
121
+ (2) From keyword arguments...
122
+ Keyword arguments accept abbreviated substance ID strings as keywords
123
+ (see below) under "SUBSTANCE ID".
124
+
125
+ air = IgtMix(N2=0.76, O2=0.23, Ar=0.01)
126
+
127
+ *note* This method cannot be used to specify an ion like 'Ne+'. Instead,
128
+ use the dictionary or list methods below.
129
+
130
+ (3) A list of constituents with no quantities...
131
+ This assigns zero matter to each mixture. Then, users are free to
132
+ modify the mixture contents by indexing.
133
+
134
+ mymix = IgtMix(['ig.N2', 'ig.O2', 'ig.Ar'])
135
+ mymix['N2'] = 0.76
136
+ mymix['O2'] = 0.23
137
+ mymix['Ar'] = 0.01
138
+
139
+ (4) A dictionary of constituents with their quantities as values...
140
+ Dictionary keys are interpreted to be substance identifiers, and the
141
+ corresponding values are interpreted as quantities.
142
+
143
+ air = IgtMix({'ig.N2':0.76, 'ig.O2':0.23, 'ig.Ar':.01})
144
+
145
+ (5) Algebraicaly...
146
+ IgtMix instances can be combined with each other using addition and
147
+ multiplication at the command line.
148
+
149
+ air = IgtMix('.76 N2 + .23 O2 + .01 Ar')
150
+ fuel = IgtMix('.23 CH4 + .44 C3H8')
151
+ reactants = air + 0.4*fuel
152
+ print(reactants)
153
+ [0.76]N2 + [0.23]O2 + [0.01]Ar + [0.092]CH4 + [0.176]C3H8
154
+
155
+ Any other data type in addition with an IgtMix is interpreted as a
156
+ mixture definition as well. For example,
157
+
158
+ reactants = '.76 N2 + .23 O2 + .01 Ar' + 0.4*fuel
159
+ reactants = {'N2':.75, 'O2':.23, 'Ar':.01} + 0.4*fuel
160
+ mymix = pm.get('ig.H2O') + 0.4 * air
161
+
162
+ (6) From an existing igmix instance, using the fromigmix() function.
163
+
164
+ air = fromigmix(pm.get('ig.air'))
165
+ print(air)
166
+ [0.00935019]Ar + [0.00031401]CO2 + [0.78085562]N2 + [0.20948019]O2
167
+
168
+ This is a useful trick if users want to make quick changes to an
169
+ existing mixture. When the fromigmix()function is used, the igmix
170
+ instance is split into its constituent gases to form the IgtMix
171
+ instance, so the example above results in a mixture with argon, carbon
172
+ dioxide, nitrogen, and oxygen. If an igmix instance is passed directly
173
+ to the IgtMix class, it is treated the same as any other constituent
174
+ gas, so the example below produces a mixture that only has one gas
175
+ component.
176
+
177
+ air = igt.IgtMix(pm.get('ig.air'))
178
+ print(air)
179
+ [1.]air
180
+
181
+ ** SPECIFYING SUBSTANCES **
182
+
183
+ In the examples above, constituent gases are specified by their
184
+ substance ID string, but they may be specified three ways:
185
+ (1) By their full substance ID string
186
+
187
+ mymix = IgtMix('ig.N2')
188
+
189
+ (2) By their abbreviated substance ID string (with no leading ig.)
190
+
191
+ mymix = IgtMix('N2')
192
+
193
+ (3) Or by their full data instance
194
+
195
+ n2 = pm.get('ig.N2')
196
+ mymix = IgtMix(n2)
197
+
198
+ Any of these -- 'N2', 'ig.N2', or pm.get('ig.N2') -- may be used as the
199
+ substance identifier in the mixture list or dictionary methods above.
200
+
201
+ ** ARITHMETIC WITH MIXTURES **
202
+
203
+ Because mixtures work in absolute quantities (as opposed to mass or
204
+ mole fractions), they can be incrased, decreased, subtracted from, or
205
+ added to using basic math operations at the command line. In this
206
+ example, mix3 has 1kmol of water, 2 kmol carbon dioxide, and 2 kmol each
207
+ of nitrogen and argon.
208
+
209
+ pm.config['unit_matter'] = 'kmol'
210
+ mix1 = IgtMix({'H2O':2, 'CO2':4})
211
+ mix2 = IgtMix({'N2':1, 'Ar':1})
212
+ mix3 = 0.5*mix1 + 2*mix2
213
+
214
+ Addition and subtraction attempt to convert non-IgtMix instances to
215
+ IgtMix instances. That means that strings, lists, dictionaries, and
216
+ ordinary PYroMat instances may be folded into mixtures using plain
217
+ command-line arithmetic.
218
+
219
+ mix4 = mix2 + '0.5 CO'
220
+ mix5 = mix2 + pm.get('ig.H2O')
221
+ mix6 = mix2 + {'H2O':[0.5,0.12], 'C2H2':0.8}
222
+
223
+ The last examples show how mixture arrays can be defined. Array broad-
224
+ casting is inherently supported, so even though H2O was the only
225
+ substance with multiple values, all other values are broadcast,
226
+
227
+ print(mix6)
228
+ N2 : array([1., 1.])
229
+ Ar : array([1., 1.])
230
+ H2O : array([0.5 , 0.12])
231
+ C2H2 : array([0.8, 0.8])
232
+
233
+ ** QUANTITIES AND UNTIS **
234
+
235
+ When an IgtMix instance is initialized, the quantities are interpreted
236
+ in PYroMat's currently configured 'unit_matter' unless the behavior is
237
+ overridden by the optional units keyword.
238
+
239
+ pm.config['unit_matter'] = 'kg'
240
+ mymix = IgtMix({'H2O':5.2, 'CO2':4.7}, units='kmol')
241
+ [93.679456]H2O + [206.84606]CO2
242
+
243
+ Changes to the 'unit_matter' configuration parameter do not affect the
244
+ mixture's definition. Instead, it only changes the way the mixture's
245
+ quantities are represented in a print() operation.
246
+
247
+ ** ARRAYS AND INDEXING **
248
+
249
+ Quantities are always handled as arrays, so a single IgtMix instance can
250
+ actually manage arrays of mixtures with an arbitrary shape. The
251
+ indexing rules are constructed around the idea that the IgtMix instance
252
+ is actually an array of many individual mixtures. In this example,
253
+ the mixture instance is an array of mixtures of neon, its first ion, and
254
+ the free electron.
255
+
256
+ x = np.linspace(0,1,11)
257
+ mymix = IgtMix{{'Ne':1-x, 'Ne+':x, 'e':x}, units='kmol')
258
+ print(mymix)
259
+ Ne : array([1. , 0.9, 0.8, 0.7, 0.6, 0.5, 0.4, 0.3, 0.2, 0.1, 0. ])
260
+ Ne+ : array([0. , 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1. ])
261
+ e- : array([0. , 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1. ])
262
+
263
+ The shape() method returns a tuple like Numpy's shape attribute, but
264
+ it describes only the array of mixtures. It excludes the axis with the
265
+ constituent substances. To obtain the number of substances, use the
266
+ nsubst() method.
267
+
268
+ mymix.shape()
269
+ (11,)
270
+ mymix.nsubst()
271
+ 3
272
+
273
+ See also reshape().
274
+
275
+ IgtMix instances may be indexed like a normal Numpy array, but with the
276
+ special rule that the first dimension of the array is always indexed by
277
+ a substance ID. From the example above,
278
+
279
+ mymix['Ne']
280
+ array([1. , 0.9, 0.8, 0.7, 0.6, 0.5, 0.4, 0.3, 0.2, 0.1, 0. ])
281
+ mymix['Ne',4]
282
+ 0.6
283
+
284
+ When the first index is a slice, the value returned is a sub-mixture
285
+ instead of an array
286
+
287
+ print(mymix[:,4])
288
+ 0.6Ne + 0.4Ne+ + 0.4e-
289
+ print(mymix[:,3:6])
290
+ Ne : array([0.7 , 0.65, 0.5 ])
291
+ Ne+ : array([0.3 , 0.35, 0.5 ])
292
+ e- : array([0.3 , 0.35, 0.5 ])
293
+
294
+ Assignment works as well. The example below overwrites the fifth mix-
295
+ ture.
296
+
297
+ mymix[:,4] = {'Ne':0.65, 'Ne+':0.35, 'e':0.35}
298
+ print(mymix)
299
+ Ne : array([1. , 0.9 , 0.8 , 0.7 , 0.65, 0.5 , 0.4 , 0.3 , ...
300
+ Ne+ : array([0. , 0.1 , 0.2 , 0.3 , 0.35, 0.5 , 0.6 , 0.7 , ...
301
+ e- : array([0. , 0.1 , 0.2 , 0.3 , 0.35, 0.5 , 0.6 , 0.7 , ...
302
+
303
+ ** ITERATING **
304
+
305
+ IgtMix instances act much like an ordered dictionary with PYroMat ideal
306
+ gas class isntances as keys and quantitiy arrays as values. The items()
307
+ method allows simultaneous iteration over the substances and quantities.
308
+
309
+ for subst,qty in mymix.items():
310
+ # subst is now a PYroMat substance instance
311
+ # qty is now a Numpy array of the substance's quantity
312
+
313
+ for subst in mymix:
314
+ # subst is now a PYroMat substance instance
315
+
316
+ ** REPRESENTATION **
317
+
318
+ The mixture is represented in the back-end by attributes that are not
319
+ intended to be accessed directly. Instead, these attributes should only
320
+ be read or modified by the appropriate methods.
321
+
322
+ _q is a numpy array of quantities in kmol. The first index in the
323
+ array corresponds to the substance. All other dimensions allow
324
+ the IgtMix instance to specify an arbitrary number of individual
325
+ mixtures.
326
+ _c is a numpy array of ideal gas instances that make up the mixture.
327
+ """
328
+
329
+ def __init__(self, contents=None, units=None, **kwarg):
330
+
331
+ # Before we do anything, let's deal with the cases that call for
332
+ # recursion. All cases should route to a call to __init__ with
333
+ # a dictionary assigned to contents.
334
+ # If no contents have been specified...
335
+ if contents is None:
336
+ if kwarg:
337
+ return self.__init__(contents=kwarg, units=units)
338
+ else:
339
+ contents = {}
340
+ # If this is a copy operation
341
+ elif isinstance(contents, IgtMix):
342
+ self._c = list(contents._c)
343
+ self._q = np.array(contents._q)
344
+ self._units = str(contents._units)
345
+ if units is not None:
346
+ self.set_units(units)
347
+ return
348
+ # If the contents is a string or data instance, build a dummy dict
349
+ elif isinstance(contents, str):
350
+ return self.__init__(contents=parse_mixstr(contents), units=units)
351
+ # If contents is a base PYroMat class
352
+ elif isinstance(contents, pm.reg.__basedata__):
353
+ return self.__init__(contents={contents:1}, units=units)
354
+ # if the contents is a list or tuple of constituents
355
+ elif isinstance(contents, (list, tuple)):
356
+ return self.__init__(dict.fromkeys(contents,0), units=units)
357
+ # Finally, if the contents is not a dict, raise an error
358
+ elif not isinstance(contents, dict):
359
+ raise Exception(pm.utility.PMParamError('Unexpected data type for IgtMix contents: ' + repr(type(contents))))
360
+
361
+
362
+ # At this point, contents is always a dict with substance
363
+ # identifiers and quantities. We'll loop over the contents twice.
364
+ # In the first iteration, we'll determine the quatity array
365
+ # shape and we'll gather the substance instances.
366
+ shape = (1,)
367
+ self._c = []
368
+ for sid,qty in contents.items():
369
+ # First, deal with the substance
370
+ # If this is an ID string
371
+ if isinstance(sid,str):
372
+ if '.' not in sid:
373
+ sid = 'ig.' + sid
374
+ # Go find the substance
375
+ # This will raise a meaningful error if it is not found
376
+ self._c.append(pm.get(sid))
377
+ # If this is a PM data class
378
+ elif isinstance(sid,pm.reg.__basedata__):
379
+ # Verify that it's an ideal gas first
380
+ if sid.collection() != 'ig':
381
+ raise pm.utility.PMParamError('IgtMix constituent was not an ideal gas: ' + sid.sid())
382
+ self._c.append(sid)
383
+ # IgtMix components are included automatically
384
+ elif isinstance(sid,IgtMix):
385
+ raise pm.utility.PMParamError('IgtMix instances cannot be nested. Use the + operator instead to combine mixtures.')
386
+ else:
387
+ raise pm.utility.PMParamError('IgtMix: Unrecognized constituent: ' + repr(sid))
388
+
389
+ # Next, process the quantity as an array
390
+ qshape = np.shape(qty)
391
+ shape = self._broadcast_shape(qshape, shape)
392
+
393
+ # Initialize the quantity array
394
+ N = len(self._c)
395
+ self._q = np.empty((N,) + shape, dtype=float)
396
+
397
+ # In the second loop, we'll broadcast all of the quantity arrays
398
+ # to the correct shape and with the correct units
399
+ for index,qty in enumerate(contents.values()):
400
+ self._q[index,:] = pm.units.matter(qty, self._c[index].mw(), from_units=units, to_units='kmol')
401
+
402
+
403
+ def __iter__(self):
404
+ return self._c.__iter__()
405
+
406
+ def __iadd__(self, b):
407
+ """Add mixture b to self
408
+ a += b
409
+
410
+ This combines the quantities of gas in mixture b into mixture a.
411
+ """
412
+ # If this is not an IgtMix, see if we can convert it to a mixture
413
+ if not isinstance(b, IgtMix):
414
+ return self.__iadd__(IgtMix(b))
415
+ # Detect the number of unique substances and add them
416
+ # to the result list
417
+ N = len(self._c)
418
+ NN = N
419
+ for bc in b._c:
420
+ if bc not in self._c:
421
+ self._c.append(bc)
422
+ NN += 1
423
+ # Grow the q array appropariately
424
+ # First, detect the starting and finishing array shapes
425
+ bshape = b.shape()
426
+ shape = self._broadcast_shape(b.shape())
427
+
428
+ # If the q-array does not change shape, then this can be done
429
+ # in-place. Otherwise, we're going to need to declare a new
430
+ # q-array.
431
+ if NN!=N or self.shape() != shape:
432
+ q = np.zeros((NN,) + shape)
433
+ q[:N] = self._q
434
+ self._q = q
435
+
436
+ # If units are not equal.
437
+ if self._units != b._units:
438
+ for bi,subst in enumerate(b._c):
439
+ ai = self._c.index(subst)
440
+ self._q[ai,:] += + pm.units.matter(b._q[bi,:],subst.mw(),b._units,self._units)
441
+ else:
442
+ for bi,subst in enumerate(b._c):
443
+ ai = self._c.index(subst)
444
+ self._q[ai,:] += b._q[bi,:]
445
+
446
+ return self
447
+
448
+
449
+ def __add__(self, b):
450
+ """Combine two mixtures to form a third unique mixture
451
+ c = a + b
452
+
453
+ Makes a copy of a and calls __iadd__() to execute the operation.
454
+ """
455
+ c = IgtMix(self)
456
+ c.__iadd__(b)
457
+ return c
458
+
459
+
460
+ def __radd__(self, b):
461
+ c = IgtMix(self)
462
+ c.__iadd__(b)
463
+ return c
464
+
465
+ def __neg__(self):
466
+ """Create a mixture with negative quantities
467
+ b = -a
468
+ """
469
+ b = IgtMix()
470
+ b._c = self._c.copy()
471
+ b._q = -self._q
472
+ b._units = self._units
473
+ return b
474
+
475
+
476
+ def __sub__(self, b):
477
+ """Deduct the contents of one mixture from another
478
+ c = a - b
479
+
480
+ Negates b and uses __iadd__() to perform the operation.
481
+ """
482
+ c = b.__neg__()
483
+ c.__iadd__(self)
484
+ return c
485
+
486
+ def __isub__(self, b):
487
+ self.__iadd__(b.__neg__())
488
+ return self
489
+
490
+ def __rsub__(self, b):
491
+ c = self.__neg__()
492
+ c.__iadd__(b)
493
+ return c
494
+
495
+
496
+ def __imul__(self, b):
497
+ """Scale the quantities of a mixture
498
+ a *= qty
499
+ """
500
+ # Force b into a shape that can be broadcast over the entire
501
+ # _q array.
502
+ shape = self.shape()
503
+ b = np.atleast_1d(b)
504
+ # If the shapes are already matched, no broadcasting will happen
505
+ # In-place multiplication can happen
506
+ if b.shape == shape:
507
+ self._q *= b
508
+ # Otherwise, there will be a new _q array
509
+ else:
510
+ self._q = b * self._q
511
+ return self
512
+
513
+ def __mul__(self, b):
514
+ """Scale the quantity of a mixture
515
+ c = a * qty
516
+ """
517
+ c = IgtMix(self)
518
+ c *= b
519
+ return c
520
+
521
+ def __rmul__(self,b):
522
+ return self.__mul__(b)
523
+
524
+
525
+
526
+ def _sindex(self, index):
527
+ """SINDEX - convert an item index into an array index
528
+ sindex = m._sindex(index)
529
+
530
+ When the index is an integer, string, slice, or a data instance it is
531
+ interpreted as indexing the constituent substances. Strings are
532
+ converted into substance ID strings, and data instances are matched
533
+ against their id hash.
534
+
535
+ When the index is a tuple, the first element is interpreted as a
536
+ substance index and the trailing indices are interpreted as quantity
537
+ indices. The substance index is passed recursively to _sindex() to
538
+ convert it to an integer.
539
+
540
+ If the substance does not appear to be in this mixture, _sindex()
541
+ returns None.
542
+ """
543
+ # If the index also contains a quantity index, only operate on
544
+ # the first (substance) index.
545
+ if isinstance(index, tuple):
546
+ # Convert the first index, pass the others through
547
+ si = self._sindex(index[0])
548
+ if si is None:
549
+ return None
550
+ return (si,) + index[1:]
551
+ # Integers and slices pass thru
552
+ elif isinstance(index, (int,slice)):
553
+ return index
554
+ # Strings are searched for
555
+ elif isinstance(index, str):
556
+ if '.' not in index:
557
+ index = 'ig.' + index
558
+ for ii,this in enumerate(self._c):
559
+ if isinstance(this,pm.reg.__basedata__) and this.sid()==index:
560
+ return ii
561
+ return None
562
+ # If we're looking for anything else...
563
+ else:
564
+ try:
565
+ return self._c.index(index)
566
+ except ValueError:
567
+ return None
568
+ except:
569
+ raise
570
+
571
+ def _broadcast_shape(self, qshape, sshape=None):
572
+ """BROADCAST_SHAPE - determine a new quantity shape
573
+ shape = _broadcast_shape(qshape)
574
+ OR
575
+ shape = _broadcast_shape(qshape, sshape)
576
+
577
+ If the mixture is interacting with a new quantity, either due to insertion
578
+ or addition, _broadcast_shape() compares the new quantity's shape tuple
579
+ to the existing mixture quantity array to determine how they should be
580
+ broadcast together.
581
+
582
+ Returns the new mixture shape tuple if the operation is to be completed.
583
+
584
+ Raises an error if the shapes cannot be broadcast.
585
+
586
+ By default, the current mixture shape is used, but this can be overridden
587
+ by manually passing a second shape tuple to sshape.
588
+
589
+ Note that this method replicates the behavior of numpy's broadcast_shapes
590
+ function. Writing our own prevents needing to bump the numpy version
591
+ requirement.
592
+ """
593
+ if sshape is None:
594
+ sshape = self._q.shape[1:]
595
+ Ns = len(sshape)
596
+ Nq = len(qshape)
597
+
598
+ # In the special case that both are empty, force an empty 1d array
599
+ if Ns == 0 and Nq == 0:
600
+ return (0,)
601
+
602
+ # If the shapes have dissimilar numbers of dimension, add the
603
+ # necessary unity dimensions
604
+ if Ns > Nq:
605
+ qshape += (Ns - Nq) * (1,)
606
+ elif Nq > Ns:
607
+ sshape += (Nq - Ns) * (1,)
608
+
609
+ # Check each dimension for compatibility
610
+ out = tuple()
611
+ for s,q in zip(sshape,qshape):
612
+ if s == q or s == 1:
613
+ out += (q,)
614
+ elif q == 1:
615
+ out += (s,)
616
+ else:
617
+ raise pm.utility.PMParamError(f'IgtMix: cannot broadcast shapes: {qshape}, {sshape}')
618
+
619
+ return out
620
+
621
+ #
622
+ # The property interface
623
+ #
624
+ def _argparse(self, *varg, **kwarg):
625
+ """Parse the arguments supplied to an IgtMix property method
626
+ T,p,d = _argparse(*varg, **kwarg)
627
+
628
+ _ARGPARSE automatically applies the default temperature and pressure,
629
+ def_T or def_p, from the pyromat.config system to deal with unspecified
630
+ parameters. All inputs are re-cast as numpy arrays of at least one
631
+ dimension and inputs are automatically converted from the configured
632
+ user units into kJ, kmol, m^3.
633
+
634
+ The returned variables are arrays of temperature, T, pressure, p, and
635
+ the density, d. Temperature will always be returned, and at least one
636
+ of p and d will be populated as well, but one of them may be None.
637
+ _argparse decides which to populate based on what is most efficient.
638
+ """
639
+ # 1) Handle varg and kward and their defaults
640
+ # 2) Apply the argument rules...
641
+ # 2.1: All arguments must be legal
642
+ # 2.2: Only 2 arguments
643
+ # 2.3: T, e, and h may not be specified together
644
+ # 2.4: d and v may not be specified together
645
+ # 3) Convert the arguments to arrays with dim 1 or greater
646
+ # 4) Convert to standard units
647
+ # 5) Process equivalent arguments
648
+ # 5.1: replace v with d
649
+ # 5.2: replace e or h with T
650
+ # 6) Check for out-of-bounds on basic arguments (This was shifted to last)
651
+ # 7) Case out the possible combinations
652
+ # 8) Broadcast the arrays appropriately
653
+ # 9) Calculate T,p,d
654
+
655
+
656
+ # Fancy tool for tracking iteration issues
657
+ debug = False
658
+
659
+ # Calculate some preliminaries
660
+ # We're going to need the temperature limits in Kelvin
661
+ Tlow, Thigh = self.Tlim()
662
+ Tlow = pm.units.temperature_scale(Tlow, to_units='K')
663
+ Thigh = pm.units.temperature_scale(Thigh, to_units='K')
664
+
665
+ # 1) Handle varg and kwarg and apply defaults
666
+
667
+ # If varg is specified, assign its values to T,p
668
+ if len(varg) > 0:
669
+ if 'T' in kwarg:
670
+ raise pm.utility.PMParamError('T was specified both positionally and with a keyword.')
671
+ kwarg['T'] = varg[0]
672
+ if len(varg) > 1:
673
+ if 'p' in kwarg:
674
+ raise pm.utility.PMParamError('p was specified both positionally and with a keyword.')
675
+ kwarg['p'] = varg[1]
676
+ if len(varg) > 2:
677
+ raise pm.utility.PMParamError('There are only two positional arguments: T, p.')
678
+
679
+ # Count the number of arguments
680
+ nargs = len(kwarg)
681
+ if nargs == 1:
682
+ if 'T' not in kwarg:
683
+ kwarg['T'] = pm.config.def_T()
684
+ else:
685
+ kwarg['p'] = pm.config.def_p()
686
+ elif nargs == 0:
687
+ kwarg['T'] = pm.config.def_T()
688
+ kwarg['p'] = pm.config.def_p()
689
+
690
+ # 2) Apply the argument rules
691
+ # Re-measure the number of arguments and use sets to enforce
692
+ # the remaining rules
693
+ nargs = len(kwarg)
694
+ args = set(kwarg.keys())
695
+ # A set of the legal arguments
696
+ legal_args = set(['T','p','d','v','e','h','s'])
697
+
698
+ # 2.1: There may only be 2 arguments
699
+ if nargs>2:
700
+ raise pm.utility.PMParamError(
701
+ 'Specifying more than two simultaneous parameters is illegal.')
702
+
703
+ # 2.2: All arguments must be "legal" recognized arguments
704
+ these_args = args - legal_args
705
+ if these_args:
706
+ message = 'Unrecognized propert(y/ies):'
707
+ prefix = ' '
708
+ for name in these_args:
709
+ message += prefix + name
710
+ prefix = ', '
711
+ raise pm.utility.PMParamError(message)
712
+
713
+ # 2.3: T, e, and h may not be specified together
714
+ these_args = set(['T', 'e', 'h']).intersection(args)
715
+ if len(these_args) > 1:
716
+ message = 'Properties may not be specified together:'
717
+ prefix = ' '
718
+ for name in inverse_args:
719
+ message += prefix + name
720
+ prefix = ', '
721
+ raise pm.utility.PMParamError(message)
722
+
723
+ # 2.4: Density and specific volume cannot be specified together
724
+ if 'v' in args and 'd' in args:
725
+ raise pm.utility.PMParamError('Density (d) and specific volume (v) cannot be specified together.')
726
+
727
+ # 3) Convert all arguments to numpy arrays
728
+ # The asarray function does NOT copy the array if it is already
729
+ # a numpy array.
730
+ for name,value in kwarg.items():
731
+ value = np.asarray(value, dtype=float)
732
+ if value.ndim == 0:
733
+ value = np.reshape(value, (1,))
734
+ kwarg[name] = value
735
+
736
+ # 4) Convert the units appropriately
737
+ # This step will only make a copy of the array if the units need
738
+ # to be converted. Otherwise, the array is passed through verbatim
739
+ # As a result, the input array will ONLY be copied if it needs to
740
+ # be reshaped, converted, or retyped.
741
+ # 5) Replace v with d and e/h with T
742
+ if 'T' in kwarg:
743
+ kwarg['T'] = pm.units.temperature_scale(kwarg['T'], to_units='K')
744
+ if 'p' in kwarg:
745
+ kwarg['p'] = pm.units.pressure(kwarg['p'], to_units='Pa')
746
+ if 'd' in kwarg:
747
+ value = pm.units.volume(kwarg['d'], to_units='m3', exponent=-1)
748
+ kwarg['d'] = pm.units.matter(value, mw, to_units='kmol')
749
+ if 'v' in kwarg:
750
+ # Convert and replace with d at the same time
751
+ value = pm.units.volume(kwarg['v'], to_units='m3')
752
+ kwarg['d'] = 1./pm.units.matter(value, mw, to_units='kmol', exponent=-1)
753
+ if 'h' in kwarg:
754
+ value = kwarg['h']
755
+ value = pm.units.energy(value, to_units='kJ')
756
+ shape = self._broadcast_shape(value.shape)
757
+ h = np.broadcast_to(value,shape)
758
+ T = np.full(shape, 0.5*(Tlow+Thigh))
759
+ I = np.ones(shape, dtype=bool)
760
+ self._iter1('_h', h, T, I, Tlow, Thigh)
761
+ kwarg['T'] = T
762
+ if 'e' in kwarg:
763
+ value = kwarg['e']
764
+ value = pm.units.energy(value, to_units='kJ')
765
+ shape = self._broadcast_shape(value.shape)
766
+ e = np.broadcast_to(value,shape)
767
+ T = np.full(shape, 0.5*(Tlow+Thigh))
768
+ I = np.ones(shape, dtype=bool)
769
+ self._iter1('_e', e, T, I, Tlow, Thigh)
770
+ kwarg['T'] = T
771
+ if 's' in kwarg:
772
+ value = kwarg['s']
773
+ value = pm.units.energy(value, to_units='kJ')
774
+ value = pm.units.temperature(value, to_units='K', exponent=-1)
775
+ kwarg['s'] = value
776
+
777
+ # Convert R into J/kmol/K - use this for p = dRT
778
+ # Do NOT use this for s, e, and h relationships
779
+ R = 1000 * pm.units.const_Ru
780
+
781
+ T = p = d = None
782
+ # Entropy requires special iteration
783
+ if 's' in kwarg:
784
+ # If density is specified
785
+ if 'd' in args:
786
+ raise pm.utility.PMParamError('(s,d) is not currently supported only for IgtMix classes')
787
+ # If pressure is specified
788
+ elif 'p' in kwarg:
789
+ shape = self._broadcast_shape(kwarg['s'].shape)
790
+ shape = self._broadcast_shape(kwarg['p'].shape, shape)
791
+ #s = np.broadcast_to(kwarg['s'], shape)
792
+ p = np.broadcast_to(kwarg['p'], shape)
793
+ # adjust entropy to the reference pressure
794
+ s = kwarg['s'] - self._sp(p)[0]
795
+ T = np.full_like(s, 0.5*(Tlow+Thigh))
796
+ I = np.ones_like(s,dtype=bool)
797
+ self._iter1('_s', s, T, I, Tlow, Thigh)
798
+ # If temperature is specified
799
+ elif 'T' in kwarg:
800
+ shape = self._broadcast_shape(kwarg['s'].shape)
801
+ shape = self._broadcast_shape(kwarg['T'].shape, shape)
802
+ s = np.broadcast_to(kwarg['s'], shape)
803
+ T = np.broadcast_to(kwarg['T'], shape)
804
+ # Calculate the pressure portion of entropy by deducting
805
+ # the standard entropy and the "entropy of mixing"
806
+ sp = kwarg['s'] - self._propeval('_s', T)[0]
807
+ # Deduct the entropy of mixing
808
+ qt = np.sum(self._q, axis=0)
809
+ temp = self._q / qt
810
+ # Force values with nonpositive q to have a log of zero
811
+ temp[self._q <= 0] = 1.
812
+ sp += pm.units.const_Ru * np.sum(self._q * np.log(temp), axis=0)
813
+ # Calculate pressure
814
+ p = self._pref() * np.exp( -sp / pm.units.const_Ru / qt)
815
+
816
+ # Otherwise, this is an illegal combination!
817
+ else:
818
+ raise pm.utility.PMParamError(f'Cannot simultaneously specify parameters: {args}')
819
+ # If temperature is specified
820
+ elif 'T' in kwarg:
821
+ # There isn't much work to do
822
+ if 'p' in kwarg:
823
+ shape = self._broadcast_shape(kwarg['T'].shape)
824
+ shape = self._broadcast_shape(kwarg['p'].shape, shape)
825
+ T = np.broadcast_to(kwarg['T'], shape)
826
+ p = np.broadcast_to(kwarg['p'], shape)
827
+ elif 'd' in kwarg:
828
+ shape = self._broadcast_shape(kwarg['T'].shape)
829
+ shape = self._broadcast_shape(kwarg['d'].shape, shape)
830
+ T = np.broadcast_to(kwarg['T'], shape)
831
+ d = np.broadcast_to(kwarg['d'], shape)
832
+ else:
833
+ message = 'Please report a bug: Unhandled event [T] in IgtMix._argparse with args:'
834
+ prefix = ' '
835
+ for name in kwarg:
836
+ message += prefix + name
837
+ prefix = ', '
838
+ raise pm.utility.PMParamError(message)
839
+ # If pressure is specified
840
+ elif 'p' in kwarg:
841
+ if 'd' in kwarg:
842
+ shape = self._broadcast_shape(kwarg['p'].shape)
843
+ shape = self._broadcast_shape(kwarg['d'].shape, shape)
844
+ p = np.broadcast_to(kwarg['p'], shape)
845
+ d = np.broadcast_to(kwarg['d'], shape)
846
+ T = p / (R * d)
847
+ else:
848
+ message = 'Please report a bug: Unhandled event [p] in IgtMix._argparse with args:'
849
+ prefix = ' '
850
+ for name in kwarg:
851
+ message += prefix + name
852
+ prefix = ', '
853
+ raise pm.utility.PMParamError(message)
854
+ else:
855
+ message = 'Please report a bug: Unhandled event [MASTER] in IgtMix._argparse with args:'
856
+ prefix = ' '
857
+ for name in kwarg:
858
+ message += prefix + name
859
+ prefix = ', '
860
+ raise pm.utility.PMParamError(message)
861
+
862
+ # Test the temperatures for out-of-bounds
863
+ I = np.logical_or(T < Tlow, T > Thigh)
864
+ if I.all():
865
+ raise pm.utility.PMParamError('All of the specified states were out-of-bounds. '
866
+ 'Legal temperatures are between {} and {} Kelvin.'.format(Tlow, Thigh))
867
+ elif I.any():
868
+ T[I] = pm.config['def_oob']
869
+ pm.utility.print_warning('Some of the states were out of bounds - setting to config[\'def_oob\']. '
870
+ 'Legal temperatures are between {} and {} Kelvin.'.format(Tlow, Thigh))
871
+ return T,p,d
872
+
873
+ def _sp(self, p, diff=False):
874
+ """SP - The pressure portion of entropy
875
+ ss, ssp = m._sp(p, diff=False)
876
+
877
+ Accepts pressure in Pa.
878
+ """
879
+ # Calculate the partial pressure for each constituent
880
+ qt = np.sum(self._q, axis=0)
881
+ sp = np.zeros_like(p, dtype=float)
882
+ spp = None
883
+ if diff:
884
+ spp = 0.
885
+ # The different classes deal with reference pressure differently
886
+ for subst,q in zip(self._c, self._q):
887
+ if subst.data['class'] == 'ig':
888
+ pref = subst._pref_pa
889
+ elif subst.data['class'] == 'ig2':
890
+ pref = subst.data['pref']
891
+ elif subst.data['class'] == 'igmix':
892
+ subst._bootstrap()
893
+ pref = subst._pref_pa
894
+ else:
895
+ raise pm.utility.PMDataError('Substance is not a recongized IG class: ' + subst.data['id'] + ', ' + subst.data['class'])
896
+
897
+ # Detect elements with negative or zero quantities
898
+ I = q<=0
899
+ # Partial pressure is p * q / qt
900
+ temp = p * q / qt / pref
901
+ temp[I] = 1. # Force to a value that will not cause an error in log
902
+ # Force q<=0 values to
903
+ sp -= q * np.log(temp)
904
+
905
+ sp *= pm.units.const_Ru
906
+ if diff:
907
+ spp = pm.units.const_Ru * qt / p
908
+ return sp, spp
909
+
910
+ #
911
+ # Indexing
912
+ #
913
+ def __getitem__(self, index):
914
+ ii = self._sindex(index)
915
+ if ii is None:
916
+ raise pm.utility.PMParamError('Could not index mixture with argument: ' + repr(index))
917
+ # Case out the four ways to index the mixture
918
+ # If the index is a slice of multiple substances
919
+ if isinstance(ii, slice):
920
+ out = IgtMix()
921
+ out._c = self._c[ii]
922
+ out._q = self._q[ii]
923
+ return out
924
+ # If the index is a tuple of indices
925
+ elif isinstance(ii, tuple):
926
+ # If the first (substance) index is a slice
927
+ if isinstance(ii[0],slice):
928
+ out = IgtMix()
929
+ out._c = self._c[ii[0]]
930
+ out._q = self._q[ii]
931
+ return out
932
+ # If a specific species is indexed
933
+ else:
934
+ subst = self._c[ii[0]]
935
+ # If the index is merely an integer
936
+ else:
937
+ subst = self._c[ii]
938
+
939
+ return pm.units.matter(self._q[ii], subst.mw(), from_units='kmol')
940
+
941
+
942
+ def __setitem__(self, sid, value):
943
+ index = self._sindex(sid)
944
+ # Attempt to insert a new substance?
945
+ if index is None:
946
+ raise pm.utility.PMParamError('Could not index the substance with: ' + repr(sid))
947
+ # If we're slicing substances
948
+ elif isinstance(index, slice) or\
949
+ isinstance(index, tuple) and isinstance(index[0],slice):
950
+ # Force the value to be a mixture
951
+ if not isinstance(value, IgtMix):
952
+ try:
953
+ value = IgtMix(value)
954
+ except:
955
+ raise pm.utility.PMParamError('Could not interpret the assigned values to a mixture: ' + repr(value))
956
+ # Recursively set the items one row at a time
957
+ for ii,subst in enumerate(value._c):
958
+ # Build a subindex
959
+ if isinstance(index, tuple):
960
+ subindex = (subst,) + index[1:]
961
+ else:
962
+ subindex = subst
963
+ self.__setitem__(subindex, value._q[ii])
964
+
965
+ else:
966
+ # Otherwise, use the numpy broadcasting rules
967
+ value = np.atleast_1d(value)
968
+ shape = self._broadcast_shape(value.shape)
969
+ # If the existing array needs to be reshaped
970
+ if shape != self.shape():
971
+ # Create a new array and broadcast the old data into it
972
+ _q = np.empty((self._q.shape[0],) + shape)
973
+ _q[:] = self._q
974
+ self._q = _q
975
+ # If the assigned array needs to be reshaped, broadcasting will
976
+ # do it automatically
977
+ self._q[index] = pm.units.matter(value, self._c[index].mw(), to_units='kmol')
978
+
979
+ def __contains__(self, index):
980
+ return self._sindex(index) is not None
981
+
982
+ #
983
+ # Length and size operations
984
+ #
985
+ def __len__(self):
986
+ """LEN - detect the number of mixtures represented here
987
+ """
988
+ return np.product(self.shape())
989
+
990
+ def __str__(self):
991
+ """STR - pretty print of the mixture
992
+ """
993
+ out = ''
994
+ if self.__len__() > 1:
995
+ # Measure the Hill string length
996
+ hilllen = 0
997
+ hills = []
998
+ for sid in self._c:
999
+ this = sid.hill()
1000
+ hilllen = max(hilllen, len(this))
1001
+ hills.append(this)
1002
+
1003
+ for ii,this in enumerate(hills):
1004
+ out += this + (hilllen + 1 - len(this))*' '
1005
+ out += ': ' + repr(self._q[ii]) + '\n'
1006
+ else:
1007
+ for subst,qty in zip(self._c[:-1], self._q[:-1]):
1008
+ qty = pm.units.matter(qty, subst.mw(), from_units='kmol')
1009
+ out += f'{qty}{subst.hill()} + '
1010
+ subst = self._c[-1]
1011
+ qty = pm.units.matter(self._q[-1], subst.mw(), from_units='kmol')
1012
+ out += f'{qty}{subst.hill()}'
1013
+ return out
1014
+
1015
+
1016
+ def __repr__(self):
1017
+ """REPR - short command-line representation
1018
+ """
1019
+ return f'<IgtMix, {len(self._c)} subst, {self.shape()}>'
1020
+
1021
+
1022
+ def shape(self):
1023
+ """SHAPE - return the dimensions of the quantity arrays
1024
+ shape = m.shape()
1025
+
1026
+ Returns a tuple indicating the shape of each of the substance quantity
1027
+ arrays. This also indicates the total number of individual mixtures
1028
+ represented in this mixture instance.
1029
+ """
1030
+ return self._q.shape[1:]
1031
+
1032
+ def reshape(self, newshape):
1033
+ """RESHAPE - change the shape of the mixture quantity arrays
1034
+ m.reshape( shape_tuple )
1035
+
1036
+ Like the Numpy reshape() method, the tuple indicates the dimensions of
1037
+ the new mixture array. Reshape may change the number of dimensions of
1038
+ the mixture array, but it may not change the total number of mixtures.
1039
+ """
1040
+ newshape = (self._q.shape[0],) + tuple(newshape)
1041
+ self._q = self._q.reshape(newshape)
1042
+
1043
+ def ndim(self):
1044
+ """NDIM - return the number of dimensions of the quantity arrays
1045
+ ndim = m.ndim()
1046
+
1047
+ Returns an integer indicating the dimension of the mixture array.
1048
+ """
1049
+ return self._q.ndim-1
1050
+
1051
+ def nsubst(self):
1052
+ """NSUBST - return the number of constituent substances
1053
+ N = m.nsubst()
1054
+
1055
+ The integer number of substances in the mixture (may be zero).
1056
+ """
1057
+ return len(self._c)
1058
+
1059
+ def insert(self, sid, qty=0., units=None):
1060
+ """INSERT - add a new substance to the mixture
1061
+ m.insert(sid)
1062
+ OR
1063
+ m.insert(sid, qty)
1064
+ OR
1065
+ m.insert(sid, qty, units=unit_str)
1066
+
1067
+ sid The substance identifier may be a string ('H2' or 'ig.H2') or a
1068
+ PYroMat substance instance.
1069
+
1070
+ qty If no quantity is specified, then the substance is added with
1071
+ zero quantity. Otherwise, the quantity must be a scalar or an
1072
+ array-like entity that is broadcastable to the mixture shape.
1073
+
1074
+ units Optional units string specifies the units of the quantity being
1075
+ inserted. When unspecified, uses the existing mixture units.
1076
+ """
1077
+ if isinstance(sid,str):
1078
+ if '.' not in sid:
1079
+ sid = 'ig.' + sid
1080
+ # Go find the substance
1081
+ # This will raise a meaningful error if it is not found
1082
+ subst = pm.get(sid)
1083
+
1084
+ # If this is a PM data class
1085
+ elif isinstance(sid,pm.reg.__basedata__):
1086
+ # Verify that it's an ideal gas first
1087
+ if sid.collection() != 'ig':
1088
+ raise pm.utility.PMParamError('IgtMix constituent was not an ideal gas: ' + sid.sid())
1089
+ subst = sid
1090
+ # IgtMix components cannot be nested.
1091
+ elif isinstance(sid,IgtMix):
1092
+ raise pm.utility.PMParamError('IgtMix instances cannot be nested. Use the + operator instead to combine mixtures.')
1093
+ else:
1094
+ raise pm.utility.PMParamError('IgtMix.insert(): Unrecognized constituent: ' + repr(sid))
1095
+
1096
+ # Next, test for prior existence
1097
+ for this in self._c:
1098
+ if this is subst:
1099
+ raise pm.utility.PMParamError('IgtMix.insert(): substance is already in the mixture. Use the + operator to modify.')
1100
+
1101
+ # Broadcast the quantity
1102
+ # First, force qty to be an array
1103
+ qty = np.atleast_1d(qty)
1104
+ # Handle the units
1105
+ if units is not None:
1106
+ qty = pm.units.matter(qty, subst.mw(), from_units=units, to_units='kmol')
1107
+ newshape = self._broadcast_shape(qty.shape)
1108
+ newq = np.empty((self.nsubst() + 1,) + newshape, dtype=float)
1109
+ newq[-1] = qty
1110
+ newq[:-1] = self._q
1111
+
1112
+ # All is well, so append
1113
+ self._c.append(subst)
1114
+ self._q = newq
1115
+
1116
+ def remove(self, sid):
1117
+ """REMOVE - remove a substance from the mixture
1118
+ m.remove(sid)
1119
+
1120
+ sid The substance identifier may be a string ('H2' or 'ig.H2') or a
1121
+ PYroMat substance instance. If present, this substance will be
1122
+ removed from the mixture. Otherwise, an error is raised.
1123
+ """
1124
+ index = self._sindex(sid)
1125
+ if index is None:
1126
+ raise pm.utility.PMParamError('IgtMix.remove(): substance is not in the mixture: ' + repr(sid))
1127
+ del self._c[index]
1128
+ self._q = np.delete(self._q, index, axis=0)
1129
+
1130
+ #
1131
+ # Type manipulation
1132
+ #
1133
+ def toigmix(self,sid):
1134
+ """TOIGMIX - convert the mixture to a static IGMIX instance
1135
+ [... igmix list ...] = m.toigmix(sid)
1136
+
1137
+ Returns a list of static igmix (low-level PYroMat data instances) built
1138
+ from the IgtMix instance quantity arrays. These are less flexible, but
1139
+ substantially faster than the IgtMix instances for property calculation.
1140
+
1141
+ sid substance id string to use as the igmix name
1142
+
1143
+ If the IgtMix instance only defines one mxiture (shape == (1,)), the
1144
+ sid string is used verbatim to name the new igmix instance. If there is
1145
+ more than one mixture, each is appended with "_{index}" in the same
1146
+ manner as the PYroMat collections' deduplication scheme.
1147
+
1148
+ It is good practice to choose an SID string that is unique (not in the
1149
+ PYroMat collection), but it is not strictly required unless this is to
1150
+ be saved in the permanent collection for later access.
1151
+
1152
+ The simpler lower-level igmix class does not allow dynamic manipulation
1153
+ of mixtures, but it is substantially faster for a number of reasons:
1154
+ 1) igmix instances store important intermediate calculations
1155
+ 2) Unlike IgtMix instances, igmix instances call the ig and ig2
1156
+ inner routines directly, so the top-level unit conversions and
1157
+ argument parsing is not performed redundantly.
1158
+ 3) igmix instances have a faster and more flexible property
1159
+ interface.
1160
+ 4) igmix instances can be saved and added to the permanent
1161
+ collection, while IgtMix instances cannot.
1162
+
1163
+ """
1164
+ out = []
1165
+ multiple_f = len(self)>1
1166
+ for count, index in enumerate(np.ndindex(self.shape())):
1167
+ data = {'class':'igmix',
1168
+ 'doc':'Auto-generated using IgtMix.toigmix()',
1169
+ 'fromfile':__name__}
1170
+ if multiple_f:
1171
+ data['id'] = sid + '_' + repr(count)
1172
+ else:
1173
+ data['id'] = sid
1174
+
1175
+ slice_index = (slice(0,len(self._c)),) + index
1176
+
1177
+ contents = {subst.sid():qty for subst,qty in zip(self._c, self._q[slice_index])}
1178
+ data['contents'] = contents
1179
+ data['bymass' ] = False
1180
+ out.append(pm.reg.registry['igmix'](data))
1181
+ return out
1182
+
1183
+ def tolist(self, mode='sid'):
1184
+ """TOLIST - generate a list of the mixture contents
1185
+ mixlist = m.tolist()
1186
+ OR
1187
+ mixlist = m.tolist(mode_str)
1188
+
1189
+ The list entries are the substance id strings for each of the mixture's
1190
+ contents. The behavior of tolist() can be changed by setting the mode
1191
+ string to one of the following:
1192
+
1193
+ 'sid' (default)
1194
+ Builds a list of the full substance ID strings for each substance. For
1195
+ example, ['ig.H2', 'ig.Ar'].
1196
+
1197
+ 'hill'
1198
+ Builds a list of the hill notation for each substance. For example,
1199
+ ['H2', 'Ar']
1200
+
1201
+ 'instance'
1202
+ Builds a list of the ig class instances for each substance. For example,
1203
+ [<ig2, ig.H2>, <ig2, ig.O2>]
1204
+
1205
+ """
1206
+ if mode == 'sid':
1207
+ return [this.sid() for this in self._c]
1208
+ elif mode == 'hill':
1209
+ return [this.hill() for this in self._c]
1210
+ elif mode == 'instance':
1211
+ return self._c.copy()
1212
+ raise pm.utility.PMParamError('IgtMix.tolist(): Unrecognized mode: ' + repr(mode))
1213
+
1214
+
1215
+ def todict(self, units=None):
1216
+ """TODICT - generate a dictionary representing the mixture
1217
+ mixdict = m.todict()
1218
+ OR
1219
+ mixdict = m.todict(units=unit_matter)
1220
+
1221
+ The dictionary keys are the substance id strings for each of the mixture's
1222
+ contents. The values are arrays representing the quantities of each
1223
+ substance. By default, the quantities are reported in config['unit_matter']
1224
+ but this can be overridden by setting the optional units keyword.
1225
+ """
1226
+ return {\
1227
+ subst.sid():pm.units.matter(qty, subst.mw(), from_units='kmol', to_units=units)\
1228
+ for subst,qty in self.items()}
1229
+
1230
+ #
1231
+ # Measures of quantity
1232
+ #
1233
+
1234
+ def atoms(self):
1235
+ """ATOMS - count the number of each atom in the mixture
1236
+ atoms = m.atoms()
1237
+
1238
+ returns a dictionary with the atomic symbol as the key and the quantity
1239
+ array as the value. The values are always in configured 'unit_molar'.
1240
+
1241
+ Note that many users may be in the habit of setting the 'unit_matter'
1242
+ setting without updating 'unit_molar' or 'unit_mass' accordingly.
1243
+ This will yield confusing results!
1244
+ """
1245
+ out = {}
1246
+ for subst,qty in self.items():
1247
+ qty = pm.units.molar(qty, from_units='kmol', to_units=pm.config['unit_molar'])
1248
+ for atom,aq in subst.atoms().items():
1249
+ working = out.get(atom)
1250
+ if working is None:
1251
+ working = np.zeros(qty.shape, dtype=float)
1252
+ out[atom] = working
1253
+ working += qty * aq
1254
+ return out
1255
+
1256
+
1257
+ def X(self, asarray=False):
1258
+ """X - calculate the mole fractions of the substances
1259
+ x = m.X()
1260
+
1261
+ returns a dictionary with the substance id strings as the keys and the
1262
+ fraction array as values. Values are always between zero and one.
1263
+ """
1264
+ # Make a copy of _q
1265
+ x = np.array(self._q)
1266
+ x /= np.sum(x,axis=0)
1267
+ # If we want an array, we're done
1268
+ if asarray:
1269
+ return x
1270
+ # Convert to dict
1271
+ return {subst.sid():xx for subst,xx in zip(self, x)}
1272
+
1273
+ def Y(self, asarray=False):
1274
+ """Y - calculate the mass fractions of the substances
1275
+ y = m.Y()
1276
+
1277
+ returns a dictionary with the substance id strings as the keys and the
1278
+ fraction array as values. Values are always between zero and one.
1279
+ """
1280
+ # Make a copy of _q
1281
+ y = np.array(self._q)
1282
+ # Use broadcasting rules to convert to a mass-based quantity
1283
+ # Any will do
1284
+ mw = np.array([subst.mw() for subst in self])
1285
+ y *= mw.reshape((mw.size,) + (y.ndim-1)*(1,))
1286
+ y /= np.sum(y,axis=0)
1287
+ # If we want an array, we're done
1288
+ if asarray:
1289
+ return y
1290
+ # Convert to dict
1291
+ return {subst.sid():yy for subst,yy in zip(self, y)}
1292
+
1293
+
1294
+ def mass(self):
1295
+ """MASS - calculate the total mixture quantity in [unit_mass]
1296
+ mass = m.mass()
1297
+
1298
+ Returns an array with m.shape() shape. Always reports units in the
1299
+ configured 'unit_mass' units. Note that many users may be in the habit
1300
+ of setting the 'unit_matter' setting without updating 'unit_molar' or
1301
+ 'unit_mass' accordingly. This will yield confusing results!
1302
+ """
1303
+ total = np.zeros(self.shape())
1304
+ for subst,qty in self.items():
1305
+ total += pm.units.matter(qty, subst.mw(), from_units='kmol', to_units=pm.config['unit_mass'])
1306
+ return total
1307
+
1308
+
1309
+ def molar(self):
1310
+ """MOLAR - calculate the total mixture quantity in [unit_molar]
1311
+ molar = m.molar()
1312
+
1313
+ Returns an array with m.shape() shape. Always reports units in the
1314
+ configured 'unit_molar' units. Note that many users may be in the habit
1315
+ of setting the 'unit_matter' setting without updating 'unit_molar' or
1316
+ 'unit_mass' accordingly. This will yield confusing results!
1317
+ """
1318
+ n = np.sum(self._q, axis=0)
1319
+ return pm.units.molar(n, from_units='kmol', to_units=pm.config['unit_molar'])
1320
+
1321
+ #
1322
+ # Iteration methods
1323
+ #
1324
+
1325
+ def items(self):
1326
+ """ITEMS - return an iterator on the contents of the mixture
1327
+
1328
+ This works like the items() method in Python dictionaries
1329
+ for subst,qty in mix.items():
1330
+ ...
1331
+
1332
+ In this loop format, subst will be a PYroMat data instance from the ideal
1333
+ gas collection, or (if there is a recursively defined mixture) it will
1334
+ be another IgtMix instance. qty is the quantity array corresponding to
1335
+ each substance.
1336
+ """
1337
+ return zip(self._c, self._q)
1338
+
1339
+ #
1340
+ # Internal Method for Properties
1341
+ #
1342
+ def _propeval(self, prop, T, diff=False):
1343
+ """_PROPEVAL - generic evaluator for internal properties
1344
+ pval, pvalT = m._propeval(T, diff=False)
1345
+ OR
1346
+ pval, pvalT = m._propeval(T, X=X)
1347
+
1348
+ T A numpy array of temperatures in units Kelvin.
1349
+ prop The string name of the property method to call on members
1350
+ diff If True, the property derivative with respect to temperature is
1351
+ also evaluated. If set to None, then the property has no
1352
+ option for a differential output.
1353
+
1354
+ Returns pval, the substance property values averaged by mole fraction,
1355
+ and pvalT, the substance property's derivative with respect to
1356
+ temperature.
1357
+ """
1358
+ pval = 0
1359
+ pvalT = None;
1360
+ if diff:
1361
+ pvalT=0
1362
+
1363
+ for subst,q in zip(self._c, self._q):
1364
+ pmethod = getattr(subst, prop)
1365
+ if diff is None:
1366
+ this = pmethod(T)
1367
+ else:
1368
+ this, thisT = pmethod(T,diff=diff)
1369
+ pval += q*this
1370
+ if diff:
1371
+ pvalT += q*thisT
1372
+ return pval,pvalT
1373
+
1374
+ def _pref(self):
1375
+ """_PREF - Calculate the reference pressure for the mixture
1376
+ pref = m._pref()
1377
+
1378
+ Returns the reference pressure in Pa. If all the substances have the
1379
+ same reference pressure (almost always the case) then a scalar is
1380
+ returned. Otherwise, an array with the same shape as the mixture array
1381
+ is returned.
1382
+ """
1383
+ # Form an array of pressures with singleton dimensions in all
1384
+ # but the first.
1385
+ shape = (self._q.shape[0],) + (self._q.ndim-1)*(1,)
1386
+ pref = np.empty(shape, dtype=float)
1387
+ for ii,subst in enumerate(self._c):
1388
+ if subst.data['class'] == 'ig':
1389
+ pref[ii] = subst._pref_pa
1390
+ elif subst.data['class'] == 'ig2':
1391
+ pref[ii] = subst.data['pref']
1392
+ elif subst.data['class'] == 'igmix':
1393
+ subst._bootstrap()
1394
+ pref[ii] = subst._pref_pa
1395
+ else:
1396
+ raise pm.utility.PMDataError('Substance is not a recongized IG class: ' + subst.data['id'] + ', ' + subst.data['class'])
1397
+ # If all values are equal
1398
+ if np.all(pref == pref[0]):
1399
+ return pref[0].squeeze()
1400
+ # Otherwise, perform a logarithmic mean
1401
+ out = np.exp(np.sum(self._q * np.log(pref), axis=0) / np.sum(self._q, axis=0))
1402
+ return out
1403
+
1404
+
1405
+ def _iter1(self, prop, y, T, Ids, Tmin, Tmax,
1406
+ ep=1e-6, Nmax=20, verbose=False):
1407
+ """Invert the _propeval method (NOT STANDARD ITER1!!!)
1408
+
1409
+ _iter1(prop, y, T, Ids, xmin, xmax)
1410
+
1411
+ Iteration is performed in-place on the x array.
1412
+
1413
+ *** Required Parameters ***
1414
+ prop The string keyword index of the property to be calculated.
1415
+ y An array of N target values for fn().
1416
+ T The result array. It should be an N-element floating point
1417
+ array that has already been initialized.
1418
+ Ids A down-select boolean index array; only x[Ids],y[Ids] will
1419
+ be evaluated. This allows iteration in-place on data sets
1420
+ where only a portion of the data require iteration. If y is
1421
+ a floating point array with N elements, Ids must be a bool
1422
+ array with N elements. It will specify a down-selected
1423
+ data set with M elements, where M<=N.
1424
+ Tmin, Tmax Upper and lower limit arrays for the T values. These must
1425
+ broadcastable to match T and y. Even values outside of the
1426
+ down-select region should have legal values.
1427
+ *** Optional Parameters ***
1428
+ ep Epsilon; fractional error permitted in y (default 1e-6)
1429
+ Nmax Maximum number of iterations (default 20)
1430
+
1431
+ """
1432
+ # As the iteration progresses, the number of True elements in
1433
+ # Ids will decrease until they are all false
1434
+ # There are some important intermediate values that will also
1435
+ # require indexable arrays
1436
+ dT = np.zeros_like(y, dtype=float)
1437
+ error = np.zeros_like(dT, dtype=float)
1438
+ IooB = np.zeros_like(Ids, dtype=bool)
1439
+
1440
+ count = 0
1441
+
1442
+ if verbose:
1443
+ print('x, yy, yyx, dx, Ids')
1444
+ while Ids.any():
1445
+ # Evaluate the funciton and isolate its derivative
1446
+ yy,yyT = self._propeval(prop, T, diff=True)
1447
+ # note that x[Ids], yy, yyx, and all the other floating
1448
+ # intermediates are now in m-space; the sub-set of values
1449
+ # still under iteration.
1450
+ # Calculate the error, the linear change in x, and the new x
1451
+ error[Ids] = y[Ids] - yy[Ids]
1452
+ dT[Ids] = error[Ids] / yyT[Ids]
1453
+ if verbose:
1454
+ print(T, yy, yyT, dT, Ids)
1455
+ T[Ids] += dT[Ids]
1456
+ # An out-of-bounds index
1457
+ IooB = np.logical_or( T < Tmin, T > Tmax)
1458
+ count_oob = 0
1459
+ while IooB.any():
1460
+ dT[IooB] /= 2.
1461
+ T[IooB] -= dT[IooB]
1462
+ IooB = np.logical_or( T < Tmin, T > Tmax)
1463
+ # Prevent a while-loop-trap
1464
+ count_oob += 1
1465
+ if count_oob>Nmax:
1466
+ raise pm.utility.PMAnalysisError(
1467
+ 'iter1_() failed to produce a guess that was in-bounds')
1468
+
1469
+ # Check the iteration convergence
1470
+ Ids[Ids] = abs(error[Ids]) > abs(ep*y[Ids])
1471
+ # Prevent a while-loop-trap
1472
+ count += 1
1473
+ if count>Nmax:
1474
+ pm.utility.print_warning(\
1475
+ 'iter1_() failed to converge for %d elements after %d attempts'%(\
1476
+ Ids.sum(), Nmax))
1477
+ return
1478
+
1479
+ #
1480
+ # Properties
1481
+ #
1482
+
1483
+ def mw(self, *varg, **kwarg):
1484
+ """MW - molecular weight
1485
+
1486
+ mw = m.mw()
1487
+
1488
+ Returns the molecular weight in [unit_mass] / [unit_molar].
1489
+
1490
+ The optional keyword, X, allows passing the mole fraction array (not dict)
1491
+ to prevent redundant calculations.
1492
+ """
1493
+ mw = np.array([subst.data['mw'] for subst in self._c]).reshape((self._q.shape[0],) + (self._q.ndim-1)*(1,))
1494
+ out = np.sum(mw * self._q, axis=0) / np.sum(self._q, axis=0)
1495
+ pm.units.mass(out, from_units='kg', inplace=True)
1496
+ pm.units.molar(out, from_units='kmol', inplace=True, exponent=-1)
1497
+ return out
1498
+
1499
+ def R(self, *varg, X=None, **kwarg):
1500
+ """R - ideal gas constant
1501
+ R = m.R()
1502
+
1503
+ Returns the gas constant in [unit_energy]/[unit_matter][unit_temperature]
1504
+ """
1505
+ # Convert the universal constant to the configured units
1506
+ R = pm.units.energy(pm.units.const_Ru, from_units='kJ')
1507
+ R = pm.units.temperature(R, from_units='K', exponent=-1)
1508
+ R = pm.units.molar(R, from_units='kmol', exponent=-1)
1509
+ # If we need to switch into mass units, call mw()
1510
+ if pm.units.ismass(pm.config['unit_matter']):
1511
+ R /= self.mw()
1512
+ return R
1513
+
1514
+ def Tlim(self):
1515
+ """TLIM - Calculate the temperature limits on the model
1516
+ Tlow, Thigh = m.Tlim()
1517
+
1518
+ The upper and lower temperature limits are established from the
1519
+ temperature limits of the constituent substances. The range reported
1520
+ is the widest over which all constituents report valid data.
1521
+ """
1522
+ Tlow = float('inf')
1523
+ Thigh = float('-inf')
1524
+ for subst in self:
1525
+ this_low, this_high = subst.Tlim()
1526
+ if this_low < Tlow:
1527
+ Tlow = this_low
1528
+ if this_high > Thigh:
1529
+ Thigh = this_high
1530
+ return Tlow, Thigh
1531
+
1532
+ def cp(self, *varg, **kwarg):
1533
+ """CP - Constant pressure specific heat
1534
+ cp = m.cp(...)
1535
+
1536
+ Specific heat is calculated in units [unit_energy / unit_temperature]
1537
+
1538
+ All IgtMix instance properties accept flexible keyword arguments in
1539
+ pairs to specify these properties:
1540
+ T temperature unit_temperature
1541
+ p pressure unit_pressure
1542
+ d density unit_matter / unit_volume
1543
+ v specific volume unit_volume
1544
+ e internal energy unit_energy
1545
+ h enthalpy unit_energy
1546
+ s entropy unit_energy / unit_temperature
1547
+ """
1548
+ T,p,d = self._argparse(*varg, **kwarg)
1549
+ cp = self._propeval('_cp', T, diff=None)[0]
1550
+ pm.units.energy(cp, from_units='kJ', inplace=True)
1551
+ pm.units.temperature(cp, from_units='K', inplace=True, exponent=-1)
1552
+ return cp
1553
+
1554
+ def cv(self, *varg, **kwarg):
1555
+ """CV - Constant volume specific heat
1556
+ cv = m.cv(...)
1557
+
1558
+ Specific heat is calculated in units [unit_energy / unit_temperature]
1559
+
1560
+ All IgtMix instance properties accept flexible keyword arguments in
1561
+ pairs to specify these properties:
1562
+ T temperature unit_temperature
1563
+ p pressure unit_pressure
1564
+ d density unit_matter / unit_volume
1565
+ v specific volume unit_volume
1566
+ e internal energy unit_energy
1567
+ h enthalpy unit_energy
1568
+ s entropy unit_energy / unit_temperature
1569
+ """
1570
+ T,p,d = self._argparse(*varg, **kwarg)
1571
+ cv = self._propeval('_cp', T, diff=None)[0]
1572
+ cv -= pm.units.const_Ru
1573
+ pm.units.energy(cv, from_units='kJ', inplace=True)
1574
+ pm.units.temperature(cv, from_units='K', inplace=True, exponent=-1)
1575
+ return cv
1576
+
1577
+ def gam(self, *varg, **kwarg):
1578
+ """GAM - Specific heat ratio
1579
+ gam = m.gam(...)
1580
+
1581
+ Specific heat ratio, gamma, is dimensionless.
1582
+
1583
+ All IgtMix instance properties accept flexible keyword arguments in
1584
+ pairs to specify these properties:
1585
+ T temperature unit_temperature
1586
+ p pressure unit_pressure
1587
+ d density unit_matter / unit_volume
1588
+ v specific volume unit_volume
1589
+ e internal energy unit_energy
1590
+ h enthalpy unit_energy
1591
+ s entropy unit_energy / unit_temperature
1592
+ """
1593
+ T,p,d = self._argparse(*varg, **kwarg)
1594
+ cp = self._propeval('_cp', T, diff=None)[0] / np.sum(self._q, axis=0)
1595
+ return cp / (cp - pm.units.const_Ru)
1596
+
1597
+ def h(self, *varg, **kwarg):
1598
+ """H - Enthalpy
1599
+ h = m.h(...)
1600
+
1601
+ Enthalpy is calculated with units [unit_energy]
1602
+
1603
+ All IgtMix instance properties accept flexible keyword arguments in
1604
+ pairs to specify these properties:
1605
+ T temperature unit_temperature
1606
+ p pressure unit_pressure
1607
+ d density unit_matter / unit_volume
1608
+ v specific volume unit_volume
1609
+ e internal energy unit_energy
1610
+ h enthalpy unit_energy
1611
+ s entropy unit_energy / unit_temperature
1612
+ """
1613
+ T,p,d = self._argparse(*varg, **kwarg)
1614
+ h = self._propeval('_h', T)[0]
1615
+ pm.units.energy(h, from_units='kJ', inplace=True)
1616
+ return h
1617
+
1618
+ def e(self, *varg, **kwarg):
1619
+ """E - Internal energy
1620
+ e = m.e(...)
1621
+
1622
+ Internal energy is calculated with units [unit_energy]
1623
+
1624
+ All IgtMix instance properties accept flexible keyword arguments in
1625
+ pairs to specify these properties:
1626
+ T temperature unit_temperature
1627
+ p pressure unit_pressure
1628
+ d density unit_matter / unit_volume
1629
+ v specific volume unit_volume
1630
+ e internal energy unit_energy
1631
+ h enthalpy unit_energy
1632
+ s entropy unit_energy / unit_temperature
1633
+ """
1634
+ T,p,d = self._argparse(*varg, **kwarg)
1635
+ e = self._propeval('_e', T)[0]
1636
+ pm.units.energy(e, from_units='kJ', inplace=True)
1637
+ return e
1638
+
1639
+ def s(self, *varg, **kwarg):
1640
+ """S - Entropy
1641
+ s = m.s(...)
1642
+
1643
+ Entropy is calculated with units [unit_energy / unit_temperature]
1644
+
1645
+ All IgtMix instance properties accept flexible keyword arguments in
1646
+ pairs to specify these properties:
1647
+ T temperature unit_temperature
1648
+ p pressure unit_pressure
1649
+ d density unit_matter / unit_volume
1650
+ v specific volume unit_volume
1651
+ e internal energy unit_energy
1652
+ h enthalpy unit_energy
1653
+ s entropy unit_energy / unit_temperature
1654
+ """
1655
+ T,p,d = self._argparse(*varg, **kwarg)
1656
+ # We need pressure
1657
+ if p is None:
1658
+ p = d * (1000*pm.units.const_Ru * T)
1659
+ s = self._propeval('_s', T)[0] + self._sp(p=p)[0]
1660
+ pm.units.energy(s, from_units='kJ', inplace=True)
1661
+ pm.units.temperature(s, from_units='K', inplace=True, exponent=-1)
1662
+ return s
1663
+
1664
+ def g(self, *varg, **kwarg):
1665
+ """G - Gibbs energy
1666
+ g = m.g(...)
1667
+
1668
+ Gibbs energy is calculated with units [unit_energy]
1669
+
1670
+ All IgtMix instance properties accept flexible keyword arguments in
1671
+ pairs to specify these properties:
1672
+ T temperature unit_temperature
1673
+ p pressure unit_pressure
1674
+ d density unit_matter / unit_volume
1675
+ v specific volume unit_volume
1676
+ e internal energy unit_energy
1677
+ h enthalpy unit_energy
1678
+ s entropy unit_energy / unit_temperature
1679
+ """
1680
+ T,p,d = self._argparse(*varg, **kwarg)
1681
+ # We need pressure
1682
+ if p is None:
1683
+ p = d * (1000*pm.units.const_Ru * T)
1684
+ g = self._propeval('_g', T)[0] - T * self._sp(p=p)[0]
1685
+ pm.units.energy(g, from_units='kJ', inplace=True)
1686
+ return g
1687
+
1688
+ def f(self, *varg, **kwarg):
1689
+ """F - Free (Helmholtz) energy
1690
+ f = m.f(...)
1691
+
1692
+ Free (Helmholtz) energy is calculated with units [unit_energy]
1693
+
1694
+ All IgtMix instance properties accept flexible keyword arguments in
1695
+ pairs to specify these properties:
1696
+ T temperature unit_temperature
1697
+ p pressure unit_pressure
1698
+ d density unit_matter / unit_volume
1699
+ v specific volume unit_volume
1700
+ e internal energy unit_energy
1701
+ h enthalpy unit_energy
1702
+ s entropy unit_energy / unit_temperature
1703
+ """
1704
+ T,p,d = self._argparse(*varg, **kwarg)
1705
+ # We need pressure
1706
+ if p is None:
1707
+ p = d * (1000*pm.units.const_Ru * T)
1708
+ f = self._propeval('_f', T)[0] - T*self._sp(p=p)[0]
1709
+ pm.units.energy(f, from_units='kJ', inplace=True)
1710
+ return f
1711
+
1712
+ def T(self, *varg, **kwarg):
1713
+ """T - Temperature
1714
+
1715
+ T = m.T(...)
1716
+
1717
+ Temperature is calculated with units [unit_temperature]
1718
+
1719
+ All IgtMix instance properties accept flexible keyword arguments in
1720
+ pairs to specify these properties:
1721
+ T temperature unit_temperature
1722
+ p pressure unit_pressure
1723
+ d density unit_matter / unit_volume
1724
+ v specific volume unit_volume
1725
+ e internal energy unit_energy
1726
+ h enthalpy unit_energy
1727
+ s entropy unit_energy / unit_temperature
1728
+ """
1729
+ T,p,d = self._argparse(*varg, **kwarg)
1730
+ pm.units.temperature_scale(T, from_units='K', inplace=True)
1731
+ return T
1732
+
1733
+ def p(self, *varg, **kwarg):
1734
+ """P - Pressure
1735
+ p = m.p(...)
1736
+
1737
+ Pressure is calculated with units [unit_pressure]
1738
+
1739
+ All IgtMix instance properties accept flexible keyword arguments in
1740
+ pairs to specify these properties:
1741
+ T temperature unit_temperature
1742
+ p pressure unit_pressure
1743
+ d density unit_matter / unit_volume
1744
+ v specific volume unit_volume
1745
+ e internal energy unit_energy
1746
+ h enthalpy unit_energy
1747
+ s entropy unit_energy / unit_temperature
1748
+ """
1749
+ T,p,d = self._argparse(*varg, **kwarg)
1750
+ if p is None:
1751
+ p = d * (1000*pm.units.const_Ru * T)
1752
+
1753
+ pm.units.pressure(p, from_units='Pa', inplace=True)
1754
+ return p
1755
+
1756
+ def d(self, *varg, **kwarg):
1757
+ """D - Density
1758
+ d = m.d(...)
1759
+
1760
+ Density is calculated with units [unit_matter / unit_volume]
1761
+
1762
+ All IgtMix instance properties accept flexible keyword arguments in
1763
+ pairs to specify these properties:
1764
+ T temperature unit_temperature
1765
+ p pressure unit_pressure
1766
+ d density unit_matter / unit_volume
1767
+ v specific volume unit_volume
1768
+ e internal energy unit_energy
1769
+ h enthalpy unit_energy
1770
+ s entropy unit_energy / unit_temperature
1771
+ """
1772
+ T,p,d = self._argparse(*varg, **kwarg)
1773
+ if d is None:
1774
+ d = p / (1000*pm.units.const_Ru * T)
1775
+
1776
+ pm.units.matter(d, mw, from_units='kmol', inplace=True)
1777
+ pm.units.volume(d, from_units='m3', inplace=True, exponent=-1)
1778
+ return d
1779
+
1780
+
1781
+
1782
+
1783
+ def fromigmix(source):
1784
+ """FROMIGMIX - create an IgtMix instance from and igmix instance
1785
+ igtmix = fromigmix(igm)
1786
+
1787
+ Creates an IgtMix instance from a low-level igmix instance. The IgtMix
1788
+ instance will automatically contain a single unit of matter (with the
1789
+ currently configured unit matter).
1790
+ """
1791
+ if pm.units.ismass():
1792
+ return IgtMix(source.Y())
1793
+ else:
1794
+ return IgtMix(source.X())
1795
+
1796
+ def asIgtMix(source):
1797
+ """ASIGTMIX - force a data source to be an IgtMix
1798
+
1799
+ """
1800
+ pass