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.
- PYroMat-2.2.5.dist-info/LICENSE.txt +644 -0
- PYroMat-2.2.5.dist-info/METADATA +94 -0
- PYroMat-2.2.5.dist-info/RECORD +1010 -0
- PYroMat-2.2.5.dist-info/WHEEL +5 -0
- PYroMat-2.2.5.dist-info/top_level.txt +5 -0
- pyromat/__init__.py +395 -0
- pyromat/config.py +166 -0
- pyromat/dat.py +574 -0
- pyromat/data/ig/Al_H.hpd +464 -0
- pyromat/data/ig/Al_H_O.hpd +464 -0
- pyromat/data/ig/Al_H_O2.hpd +446 -0
- pyromat/data/ig/Al_H_O_1.hpd +482 -0
- pyromat/data/ig/B10_H14.hpd +362 -0
- pyromat/data/ig/B2_Be_O4.hpd +464 -0
- pyromat/data/ig/B2_Cl4.hpd +446 -0
- pyromat/data/ig/B2_F4.hpd +466 -0
- pyromat/data/ig/B2_F4_O.hpd +465 -0
- pyromat/data/ig/B2_H4_O4.hpd +465 -0
- pyromat/data/ig/B3_F2_H_O3.hpd +466 -0
- pyromat/data/ig/B3_F_H2_O3.hpd +466 -0
- pyromat/data/ig/B3_H3_O3.hpd +464 -0
- pyromat/data/ig/B3_H3_O6.hpd +465 -0
- pyromat/data/ig/B5_H9.hpd +358 -0
- pyromat/data/ig/B_Br.hpd +446 -0
- pyromat/data/ig/B_Br2.hpd +446 -0
- pyromat/data/ig/B_Br2_Cl.hpd +446 -0
- pyromat/data/ig/B_Br2_F.hpd +464 -0
- pyromat/data/ig/B_Br2_H.hpd +465 -0
- pyromat/data/ig/B_Br3.hpd +390 -0
- pyromat/data/ig/B_Br_Cl.hpd +447 -0
- pyromat/data/ig/B_Br_Cl2.hpd +464 -0
- pyromat/data/ig/B_Br_F.hpd +465 -0
- pyromat/data/ig/B_Br_F2.hpd +464 -0
- pyromat/data/ig/B_Br_O.hpd +465 -0
- pyromat/data/ig/B_Cl2_F.hpd +465 -0
- pyromat/data/ig/B_Cl2_H.hpd +466 -0
- pyromat/data/ig/B_Cl_F2.hpd +465 -0
- pyromat/data/ig/B_F2_H.hpd +465 -0
- pyromat/data/ig/B_F2_H_O.hpd +466 -0
- pyromat/data/ig/B_F4_K.hpd +356 -0
- pyromat/data/ig/B_H.hpd +464 -0
- pyromat/data/ig/B_H2.hpd +463 -0
- pyromat/data/ig/B_H2_O2.hpd +465 -0
- pyromat/data/ig/B_H3.hpd +464 -0
- pyromat/data/ig/B_H3_O3.hpd +494 -0
- pyromat/data/ig/B_H_O.hpd +465 -0
- pyromat/data/ig/B_H_O2.hpd +464 -0
- pyromat/data/ig/B_H_S.hpd +464 -0
- pyromat/data/ig/B_I.hpd +446 -0
- pyromat/data/ig/B_I2.hpd +446 -0
- pyromat/data/ig/B_I3.hpd +449 -0
- pyromat/data/ig/Ba_H2_O2.hpd +322 -0
- pyromat/data/ig/Ba_H_O.hpd +447 -0
- pyromat/data/ig/Ba_I.hpd +445 -0
- pyromat/data/ig/Ba_I2.hpd +263 -0
- pyromat/data/ig/Be2.hpd +445 -0
- pyromat/data/ig/Be2_Cl4.hpd +445 -0
- pyromat/data/ig/Be_F3_Li.hpd +320 -0
- pyromat/data/ig/Be_H.hpd +464 -0
- pyromat/data/ig/Be_H2_O2.hpd +464 -0
- pyromat/data/ig/Be_H_O.hpd +465 -0
- pyromat/data/ig/Br2_Fe.hpd +319 -0
- pyromat/data/ig/Br2_H2_Si.hpd +465 -0
- pyromat/data/ig/Br2_K2.hpd +445 -0
- pyromat/data/ig/Br2_Li2.hpd +445 -0
- pyromat/data/ig/Br2_Mo.hpd +463 -0
- pyromat/data/ig/Br2_Na2.hpd +445 -0
- pyromat/data/ig/Br2_Sr.hpd +249 -0
- pyromat/data/ig/Br2_Ti.hpd +463 -0
- pyromat/data/ig/Br2_Zr.hpd +319 -0
- pyromat/data/ig/Br3_H_Si.hpd +466 -0
- pyromat/data/ig/Br3_Mo.hpd +445 -0
- pyromat/data/ig/Br3_O_P.hpd +448 -0
- pyromat/data/ig/Br3_P.hpd +455 -0
- pyromat/data/ig/Br3_P_S.hpd +448 -0
- pyromat/data/ig/Br3_Ti.hpd +445 -0
- pyromat/data/ig/Br3_Zr.hpd +445 -0
- pyromat/data/ig/Br4_Fe2.hpd +445 -0
- pyromat/data/ig/Br4_Mg2.hpd +445 -0
- pyromat/data/ig/Br4_Mo.hpd +445 -0
- pyromat/data/ig/Br4_Ti.hpd +389 -0
- pyromat/data/ig/Br4_Zr.hpd +445 -0
- pyromat/data/ig/Br5_Nb.hpd +398 -0
- pyromat/data/ig/Br5_W.hpd +389 -0
- pyromat/data/ig/Br6_W.hpd +445 -0
- pyromat/data/ig/Br_Cl.hpd +447 -0
- pyromat/data/ig/Br_F.hpd +446 -0
- pyromat/data/ig/Br_F3.hpd +445 -0
- pyromat/data/ig/Br_F5.hpd +446 -0
- pyromat/data/ig/Br_F5_S.hpd +465 -0
- pyromat/data/ig/Br_H.hpd +476 -0
- pyromat/data/ig/Br_H3_Si.hpd +465 -0
- pyromat/data/ig/Br_Hg.hpd +446 -0
- pyromat/data/ig/Br_I.hpd +465 -0
- pyromat/data/ig/Br_K.hpd +285 -0
- pyromat/data/ig/Br_Li.hpd +320 -0
- pyromat/data/ig/Br_Mo.hpd +463 -0
- pyromat/data/ig/Br_N.hpd +445 -0
- pyromat/data/ig/Br_N_O.hpd +465 -0
- pyromat/data/ig/Br_P.hpd +446 -0
- pyromat/data/ig/Br_Ti.hpd +445 -0
- pyromat/data/ig/Br_W.hpd +445 -0
- pyromat/data/ig/Br_Zr.hpd +463 -0
- pyromat/data/ig/C2_Be.hpd +463 -0
- pyromat/data/ig/C2_F3_N.hpd +468 -0
- pyromat/data/ig/C2_F6.hpd +476 -0
- pyromat/data/ig/C4_Ni_O4.hpd +441 -0
- pyromat/data/ig/C_B.hpd +464 -0
- pyromat/data/ig/C_Br.hpd +446 -0
- pyromat/data/ig/C_Br4.hpd +455 -0
- pyromat/data/ig/C_Br_F3.hpd +485 -0
- pyromat/data/ig/C_Br_N.hpd +484 -0
- pyromat/data/ig/C_F3_I.hpd +472 -0
- pyromat/data/ig/C_F4_O.hpd +464 -0
- pyromat/data/ig/C_F8_S.hpd +469 -0
- pyromat/data/ig/C_H3_Cl3_Si.hpd +147 -0
- pyromat/data/ig/C_H3_F3_Si.hpd +138 -0
- pyromat/data/ig/C_H_F.hpd +465 -0
- pyromat/data/ig/C_H_F_O.hpd +465 -0
- pyromat/data/ig/C_H_P.hpd +464 -0
- pyromat/data/ig/C_I_N.hpd +465 -0
- pyromat/data/ig/C_N2_1.hpd +464 -0
- pyromat/data/ig/Ca_H2_O2.hpd +446 -0
- pyromat/data/ig/Ca_H_O.hpd +447 -0
- pyromat/data/ig/Cl10_W2.hpd +445 -0
- pyromat/data/ig/Cl2_Co.hpd +319 -0
- pyromat/data/ig/Cl2_F_O_P.hpd +466 -0
- pyromat/data/ig/Cl2_H2_Si.hpd +465 -0
- pyromat/data/ig/Cl2_Hg.hpd +354 -0
- pyromat/data/ig/Cl2_Mo_O2.hpd +446 -0
- pyromat/data/ig/Cl2_O2_W.hpd +464 -0
- pyromat/data/ig/Cl2_W.hpd +463 -0
- pyromat/data/ig/Cl2_Zr.hpd +319 -0
- pyromat/data/ig/Cl3_Co.hpd +447 -0
- pyromat/data/ig/Cl3_F_Si.hpd +447 -0
- pyromat/data/ig/Cl3_H_Si.hpd +466 -0
- pyromat/data/ig/Cl3_O_P.hpd +483 -0
- pyromat/data/ig/Cl3_P_S.hpd +448 -0
- pyromat/data/ig/Cl3_Zr.hpd +463 -0
- pyromat/data/ig/Cl4_Co2.hpd +445 -0
- pyromat/data/ig/Cl4_Mg2.hpd +445 -0
- pyromat/data/ig/Cl4_Mo.hpd +354 -0
- pyromat/data/ig/Cl4_O_W.hpd +390 -0
- pyromat/data/ig/Cl4_W.hpd +445 -0
- pyromat/data/ig/Cl4_Zr.hpd +445 -0
- pyromat/data/ig/Cl5_Mo.hpd +375 -0
- pyromat/data/ig/Cl5_Nb.hpd +403 -0
- pyromat/data/ig/Cl5_P.hpd +446 -0
- pyromat/data/ig/Cl5_Ta.hpd +403 -0
- pyromat/data/ig/Cl5_W.hpd +354 -0
- pyromat/data/ig/Cl6_Mo.hpd +445 -0
- pyromat/data/ig/Cl6_W.hpd +354 -0
- pyromat/data/ig/Cl_Co.hpd +463 -0
- pyromat/data/ig/Cl_F2_O_P.hpd +470 -0
- pyromat/data/ig/Cl_F3_Si.hpd +465 -0
- pyromat/data/ig/Cl_F5.hpd +464 -0
- pyromat/data/ig/Cl_F5_S.hpd +466 -0
- pyromat/data/ig/Cl_F_Li2.hpd +464 -0
- pyromat/data/ig/Cl_F_O3.hpd +472 -0
- pyromat/data/ig/Cl_H.hpd +493 -0
- pyromat/data/ig/Cl_H3_Si.hpd +466 -0
- pyromat/data/ig/Cl_H_O.hpd +465 -0
- pyromat/data/ig/Cl_Hg.hpd +445 -0
- pyromat/data/ig/Cl_I.hpd +390 -0
- pyromat/data/ig/Cl_Li_O.hpd +465 -0
- pyromat/data/ig/Cl_P.hpd +446 -0
- pyromat/data/ig/Cl_W.hpd +463 -0
- pyromat/data/ig/Cl_Zr.hpd +463 -0
- pyromat/data/ig/Co.hpd +242 -0
- pyromat/data/ig/Co_F2.hpd +249 -0
- pyromat/data/ig/Cs2_H2_O2.hpd +464 -0
- pyromat/data/ig/Cs_H_O.hpd +322 -0
- pyromat/data/ig/D_H.hpd +464 -0
- pyromat/data/ig/D_H_O.hpd +467 -0
- pyromat/data/ig/F10_Mo2.hpd +445 -0
- pyromat/data/ig/F10_S2.hpd +465 -0
- pyromat/data/ig/F15_Mo3.hpd +445 -0
- pyromat/data/ig/F2_Fe.hpd +249 -0
- pyromat/data/ig/F2_H2_Si.hpd +465 -0
- pyromat/data/ig/F2_Hg.hpd +321 -0
- pyromat/data/ig/F2_Mo.hpd +445 -0
- pyromat/data/ig/F2_N2_1.hpd +469 -0
- pyromat/data/ig/F2_O_Si.hpd +465 -0
- pyromat/data/ig/F2_O_Ti.hpd +446 -0
- pyromat/data/ig/F2_S2_1.hpd +446 -0
- pyromat/data/ig/F2_Ti.hpd +463 -0
- pyromat/data/ig/F2_Zr.hpd +249 -0
- pyromat/data/ig/F3_Fe.hpd +445 -0
- pyromat/data/ig/F3_H_Si.hpd +465 -0
- pyromat/data/ig/F3_Mo.hpd +445 -0
- pyromat/data/ig/F3_O_P.hpd +471 -0
- pyromat/data/ig/F3_P_S.hpd +465 -0
- pyromat/data/ig/F3_Ti.hpd +445 -0
- pyromat/data/ig/F3_Zr.hpd +463 -0
- pyromat/data/ig/F4_Mo.hpd +463 -0
- pyromat/data/ig/F4_Mo_O.hpd +446 -0
- pyromat/data/ig/F4_O_W.hpd +390 -0
- pyromat/data/ig/F4_Ti.hpd +447 -0
- pyromat/data/ig/F4_Zr.hpd +446 -0
- pyromat/data/ig/F5_I.hpd +446 -0
- pyromat/data/ig/F5_Mo.hpd +445 -0
- pyromat/data/ig/F6_Mo.hpd +394 -0
- pyromat/data/ig/F6_W.hpd +396 -0
- pyromat/data/ig/F7_I.hpd +447 -0
- pyromat/data/ig/F_Fe.hpd +445 -0
- pyromat/data/ig/F_H.hpd +464 -0
- pyromat/data/ig/F_H3_Si.hpd +466 -0
- pyromat/data/ig/F_H_O.hpd +465 -0
- pyromat/data/ig/F_H_O3_S.hpd +467 -0
- pyromat/data/ig/F_Hg.hpd +445 -0
- pyromat/data/ig/F_I.hpd +446 -0
- pyromat/data/ig/F_Mo.hpd +463 -0
- pyromat/data/ig/F_O_Ti.hpd +464 -0
- pyromat/data/ig/F_P_S.hpd +464 -0
- pyromat/data/ig/F_Ti.hpd +463 -0
- pyromat/data/ig/F_W.hpd +463 -0
- pyromat/data/ig/F_Zr.hpd +463 -0
- pyromat/data/ig/Fe2_I4.hpd +445 -0
- pyromat/data/ig/Fe_H2_O2.hpd +466 -0
- pyromat/data/ig/Fe_I2.hpd +319 -0
- pyromat/data/ig/Fe_S.hpd +194 -0
- pyromat/data/ig/Ga.hpd +291 -0
- pyromat/data/ig/H2_Mo_O4.hpd +465 -0
- pyromat/data/ig/H2_O4_W.hpd +466 -0
- pyromat/data/ig/H2_P.hpd +464 -0
- pyromat/data/ig/H_Hg.hpd +463 -0
- pyromat/data/ig/H_Pb.hpd +463 -0
- pyromat/data/ig/H_Zr.hpd +463 -0
- pyromat/data/ig/Hf.hpd +116 -0
- pyromat/data/ig/Hg_I.hpd +446 -0
- pyromat/data/ig/Hg_I2.hpd +355 -0
- pyromat/data/ig/Hg_O.hpd +447 -0
- pyromat/data/ig/I2_K2.hpd +446 -0
- pyromat/data/ig/I2_Li2.hpd +445 -0
- pyromat/data/ig/I2_Mo.hpd +464 -0
- pyromat/data/ig/I2_Ti.hpd +463 -0
- pyromat/data/ig/I2_Zr.hpd +319 -0
- pyromat/data/ig/I3_Mo.hpd +446 -0
- pyromat/data/ig/I3_Si.hpd +446 -0
- pyromat/data/ig/I3_Ti.hpd +445 -0
- pyromat/data/ig/I3_Zr.hpd +445 -0
- pyromat/data/ig/I4_Mo.hpd +446 -0
- pyromat/data/ig/I4_Si.hpd +410 -0
- pyromat/data/ig/I4_Ti.hpd +354 -0
- pyromat/data/ig/I4_Zr.hpd +445 -0
- pyromat/data/ig/I_K.hpd +285 -0
- pyromat/data/ig/I_Li.hpd +285 -0
- pyromat/data/ig/I_N_O.hpd +465 -0
- pyromat/data/ig/I_Sr.hpd +463 -0
- pyromat/data/ig/I_Ti.hpd +463 -0
- pyromat/data/ig/I_Zr.hpd +445 -0
- pyromat/data/ig/Li_Na_O.hpd +464 -0
- pyromat/data/ig/Mn.hpd +298 -0
- pyromat/data/ig/Mo.hpd +116 -0
- pyromat/data/ig/Mo_O.hpd +447 -0
- pyromat/data/ig/Mo_O2.hpd +465 -0
- pyromat/data/ig/N_P.hpd +464 -0
- pyromat/data/ig/O12_W4.hpd +445 -0
- pyromat/data/ig/O2_W.hpd +463 -0
- pyromat/data/ig/O3_W.hpd +250 -0
- pyromat/data/ig/O6_P4.hpd +463 -0
- pyromat/data/ig/O6_W2.hpd +445 -0
- pyromat/data/ig/O8_W3.hpd +464 -0
- pyromat/data/ig/O9_W3.hpd +445 -0
- pyromat/data/ig/O_W.hpd +464 -0
- pyromat/data/ig/P_S.hpd +446 -0
- pyromat/data/ig/Rb.hpd +414 -0
- pyromat/data/ig/Rb2.hpd +463 -0
- pyromat/data/ig/S3.hpd +444 -0
- pyromat/data/ig/S4.hpd +444 -0
- pyromat/data/ig/S5.hpd +444 -0
- pyromat/data/ig/S6.hpd +451 -0
- pyromat/data/ig/S7.hpd +444 -0
- pyromat/data/ig2/Al+.hpd +39 -0
- pyromat/data/ig2/Al-.hpd +39 -0
- pyromat/data/ig2/Al.hpd +43 -0
- pyromat/data/ig2/Al2.hpd +42 -0
- pyromat/data/ig2/Al2_Br6.hpd +42 -0
- pyromat/data/ig2/Al2_Cl6.hpd +48 -0
- pyromat/data/ig2/Al2_F6.hpd +42 -0
- pyromat/data/ig2/Al2_I6.hpd +43 -0
- pyromat/data/ig2/Al2_O+.hpd +40 -0
- pyromat/data/ig2/Al2_O.hpd +42 -0
- pyromat/data/ig2/Al2_O2+.hpd +40 -0
- pyromat/data/ig2/Al2_O2.hpd +42 -0
- pyromat/data/ig2/Al_B_O2.hpd +43 -0
- pyromat/data/ig2/Al_Br.hpd +42 -0
- pyromat/data/ig2/Al_Br3.hpd +42 -0
- pyromat/data/ig2/Al_Cl+.hpd +40 -0
- pyromat/data/ig2/Al_Cl.hpd +43 -0
- pyromat/data/ig2/Al_Cl2+.hpd +40 -0
- pyromat/data/ig2/Al_Cl2-.hpd +40 -0
- pyromat/data/ig2/Al_Cl2.hpd +42 -0
- pyromat/data/ig2/Al_Cl2_F.hpd +44 -0
- pyromat/data/ig2/Al_Cl3.hpd +42 -0
- pyromat/data/ig2/Al_Cl_F+.hpd +41 -0
- pyromat/data/ig2/Al_Cl_F.hpd +43 -0
- pyromat/data/ig2/Al_Cl_F2.hpd +44 -0
- pyromat/data/ig2/Al_Cl_O.hpd +43 -0
- pyromat/data/ig2/Al_F+.hpd +40 -0
- pyromat/data/ig2/Al_F.hpd +43 -0
- pyromat/data/ig2/Al_F2+.hpd +40 -0
- pyromat/data/ig2/Al_F2-.hpd +40 -0
- pyromat/data/ig2/Al_F2.hpd +42 -0
- pyromat/data/ig2/Al_F2_O-.hpd +41 -0
- pyromat/data/ig2/Al_F2_O.hpd +43 -0
- pyromat/data/ig2/Al_F3.hpd +45 -0
- pyromat/data/ig2/Al_F4-.hpd +40 -0
- pyromat/data/ig2/Al_F4_Li.hpd +43 -0
- pyromat/data/ig2/Al_F4_Na.hpd +43 -0
- pyromat/data/ig2/Al_F_O.hpd +43 -0
- pyromat/data/ig2/Al_I.hpd +42 -0
- pyromat/data/ig2/Al_I3.hpd +42 -0
- pyromat/data/ig2/Al_N.hpd +44 -0
- pyromat/data/ig2/Al_O+.hpd +40 -0
- pyromat/data/ig2/Al_O-.hpd +40 -0
- pyromat/data/ig2/Al_O.hpd +43 -0
- pyromat/data/ig2/Al_O2-.hpd +40 -0
- pyromat/data/ig2/Al_O2.hpd +42 -0
- pyromat/data/ig2/Al_S.hpd +43 -0
- pyromat/data/ig2/Ar+.hpd +39 -0
- pyromat/data/ig2/Ar.hpd +38 -0
- pyromat/data/ig2/B+.hpd +39 -0
- pyromat/data/ig2/B-.hpd +39 -0
- pyromat/data/ig2/B.hpd +42 -0
- pyromat/data/ig2/B2.hpd +38 -0
- pyromat/data/ig2/B2_O.hpd +42 -0
- pyromat/data/ig2/B2_O2.hpd +42 -0
- pyromat/data/ig2/B2_O3.hpd +42 -0
- pyromat/data/ig2/B3_Cl3_O3.hpd +44 -0
- pyromat/data/ig2/B3_F3_O3.hpd +44 -0
- pyromat/data/ig2/B_Be_O2.hpd +40 -0
- pyromat/data/ig2/B_Cl+.hpd +40 -0
- pyromat/data/ig2/B_Cl.hpd +43 -0
- pyromat/data/ig2/B_Cl2+.hpd +40 -0
- pyromat/data/ig2/B_Cl2-.hpd +40 -0
- pyromat/data/ig2/B_Cl2.hpd +43 -0
- pyromat/data/ig2/B_Cl3.hpd +52 -0
- pyromat/data/ig2/B_Cl_F.hpd +44 -0
- pyromat/data/ig2/B_Cl_O.hpd +43 -0
- pyromat/data/ig2/B_F.hpd +44 -0
- pyromat/data/ig2/B_F2+.hpd +40 -0
- pyromat/data/ig2/B_F2-.hpd +40 -0
- pyromat/data/ig2/B_F2.hpd +43 -0
- pyromat/data/ig2/B_F2_O.hpd +43 -0
- pyromat/data/ig2/B_F3.hpd +52 -0
- pyromat/data/ig2/B_F_O.hpd +43 -0
- pyromat/data/ig2/B_K_O2.hpd +43 -0
- pyromat/data/ig2/B_Li_O2.hpd +43 -0
- pyromat/data/ig2/B_N.hpd +43 -0
- pyromat/data/ig2/B_Na_O2.hpd +43 -0
- pyromat/data/ig2/B_O.hpd +43 -0
- pyromat/data/ig2/B_O2-.hpd +40 -0
- pyromat/data/ig2/B_O2.hpd +42 -0
- pyromat/data/ig2/B_S.hpd +43 -0
- pyromat/data/ig2/Ba.hpd +38 -0
- pyromat/data/ig2/Ba_Br.hpd +42 -0
- pyromat/data/ig2/Ba_Br2.hpd +42 -0
- pyromat/data/ig2/Ba_Cl.hpd +39 -0
- pyromat/data/ig2/Ba_Cl2.hpd +44 -0
- pyromat/data/ig2/Ba_F+.hpd +40 -0
- pyromat/data/ig2/Ba_F.hpd +43 -0
- pyromat/data/ig2/Ba_F2.hpd +43 -0
- pyromat/data/ig2/Ba_S.hpd +44 -0
- pyromat/data/ig2/Be+.hpd +39 -0
- pyromat/data/ig2/Be.hpd +42 -0
- pyromat/data/ig2/Be2_F2_O.hpd +43 -0
- pyromat/data/ig2/Be2_O.hpd +42 -0
- pyromat/data/ig2/Be2_O2.hpd +42 -0
- pyromat/data/ig2/Be3_O3.hpd +39 -0
- pyromat/data/ig2/Be4_O4.hpd +39 -0
- pyromat/data/ig2/Be_Br.hpd +42 -0
- pyromat/data/ig2/Be_Br2.hpd +44 -0
- pyromat/data/ig2/Be_Cl+.hpd +40 -0
- pyromat/data/ig2/Be_Cl.hpd +43 -0
- pyromat/data/ig2/Be_Cl2.hpd +42 -0
- pyromat/data/ig2/Be_Cl_F.hpd +43 -0
- pyromat/data/ig2/Be_F.hpd +43 -0
- pyromat/data/ig2/Be_F2.hpd +42 -0
- pyromat/data/ig2/Be_I.hpd +42 -0
- pyromat/data/ig2/Be_I2.hpd +44 -0
- pyromat/data/ig2/Be_N.hpd +43 -0
- pyromat/data/ig2/Be_O.hpd +44 -0
- pyromat/data/ig2/Be_S.hpd +44 -0
- pyromat/data/ig2/Br.hpd +42 -0
- pyromat/data/ig2/Br2.hpd +49 -0
- pyromat/data/ig2/Br2_Ca.hpd +42 -0
- pyromat/data/ig2/Br2_Hg.hpd +51 -0
- pyromat/data/ig2/Br2_Mg.hpd +42 -0
- pyromat/data/ig2/Br2_Pb.hpd +42 -0
- pyromat/data/ig2/Br2_Si.hpd +43 -0
- pyromat/data/ig2/Br3_Si.hpd +43 -0
- pyromat/data/ig2/Br4_Pb.hpd +42 -0
- pyromat/data/ig2/Br4_Si.hpd +43 -0
- pyromat/data/ig2/Br_Ca.hpd +42 -0
- pyromat/data/ig2/Br_Mg.hpd +42 -0
- pyromat/data/ig2/Br_Na.hpd +43 -0
- pyromat/data/ig2/Br_Pb.hpd +42 -0
- pyromat/data/ig2/Br_Si.hpd +43 -0
- pyromat/data/ig2/Br_Sr.hpd +42 -0
- pyromat/data/ig2/C+.hpd +39 -0
- pyromat/data/ig2/C-.hpd +39 -0
- pyromat/data/ig2/C.hpd +43 -0
- pyromat/data/ig2/C10_H21.hpd +39 -0
- pyromat/data/ig2/C10_H8.hpd +39 -0
- pyromat/data/ig2/C12_D10.hpd +39 -0
- pyromat/data/ig2/C12_D9.hpd +39 -0
- pyromat/data/ig2/C12_H10.hpd +39 -0
- pyromat/data/ig2/C12_H23.hpd +39 -0
- pyromat/data/ig2/C12_H9.hpd +39 -0
- pyromat/data/ig2/C2+.hpd +39 -0
- pyromat/data/ig2/C2-.hpd +39 -0
- pyromat/data/ig2/C2.hpd +42 -0
- pyromat/data/ig2/C2_Cl2.hpd +50 -0
- pyromat/data/ig2/C2_Cl4.hpd +97 -0
- pyromat/data/ig2/C2_Cl6.hpd +69 -0
- pyromat/data/ig2/C2_F2.hpd +50 -0
- pyromat/data/ig2/C2_F4.hpd +55 -0
- pyromat/data/ig2/C2_H.hpd +43 -0
- pyromat/data/ig2/C2_H2.hpd +50 -0
- pyromat/data/ig2/C2_H2_O.hpd +40 -0
- pyromat/data/ig2/C2_H3.hpd +39 -0
- pyromat/data/ig2/C2_H3_N.hpd +40 -0
- pyromat/data/ig2/C2_H3_O.hpd +40 -0
- pyromat/data/ig2/C2_H4.hpd +39 -0
- pyromat/data/ig2/C2_H4_O.hpd +40 -0
- pyromat/data/ig2/C2_H4_O2.hpd +40 -0
- pyromat/data/ig2/C2_H4_O4.hpd +40 -0
- pyromat/data/ig2/C2_H5.hpd +39 -0
- pyromat/data/ig2/C2_H6.hpd +39 -0
- pyromat/data/ig2/C2_H6_N2.hpd +40 -0
- pyromat/data/ig2/C2_H6_O.hpd +40 -0
- pyromat/data/ig2/C2_H_Cl.hpd +51 -0
- pyromat/data/ig2/C2_H_F.hpd +52 -0
- pyromat/data/ig2/C2_H_N.hpd +40 -0
- pyromat/data/ig2/C2_H_O.hpd +40 -0
- pyromat/data/ig2/C2_K2_N2.hpd +43 -0
- pyromat/data/ig2/C2_N.hpd +42 -0
- pyromat/data/ig2/C2_N2.hpd +61 -0
- pyromat/data/ig2/C2_N2_Na2.hpd +44 -0
- pyromat/data/ig2/C2_O.hpd +39 -0
- pyromat/data/ig2/C2_Si.hpd +42 -0
- pyromat/data/ig2/C3.hpd +43 -0
- pyromat/data/ig2/C3_H3.hpd +39 -0
- pyromat/data/ig2/C3_H4.hpd +39 -0
- pyromat/data/ig2/C3_H5.hpd +39 -0
- pyromat/data/ig2/C3_H6.hpd +39 -0
- pyromat/data/ig2/C3_H6_O.hpd +40 -0
- pyromat/data/ig2/C3_H7.hpd +39 -0
- pyromat/data/ig2/C3_H8.hpd +39 -0
- pyromat/data/ig2/C3_H8_O.hpd +40 -0
- pyromat/data/ig2/C3_O2.hpd +46 -0
- pyromat/data/ig2/C4.hpd +42 -0
- pyromat/data/ig2/C4_H10.hpd +39 -0
- pyromat/data/ig2/C4_H12_Si.hpd +54 -0
- pyromat/data/ig2/C4_H2.hpd +39 -0
- pyromat/data/ig2/C4_H4.hpd +39 -0
- pyromat/data/ig2/C4_H6.hpd +39 -0
- pyromat/data/ig2/C4_H8.hpd +39 -0
- pyromat/data/ig2/C4_H8_O4.hpd +40 -0
- pyromat/data/ig2/C4_H9.hpd +39 -0
- pyromat/data/ig2/C4_N2.hpd +52 -0
- pyromat/data/ig2/C5.hpd +42 -0
- pyromat/data/ig2/C5_Fe_O5.hpd +49 -0
- pyromat/data/ig2/C5_H10.hpd +39 -0
- pyromat/data/ig2/C5_H11.hpd +39 -0
- pyromat/data/ig2/C5_H12.hpd +39 -0
- pyromat/data/ig2/C5_H6.hpd +39 -0
- pyromat/data/ig2/C5_H8.hpd +39 -0
- pyromat/data/ig2/C6_D5.hpd +39 -0
- pyromat/data/ig2/C6_D6.hpd +39 -0
- pyromat/data/ig2/C6_H10.hpd +39 -0
- pyromat/data/ig2/C6_H12.hpd +39 -0
- pyromat/data/ig2/C6_H13.hpd +39 -0
- pyromat/data/ig2/C6_H2.hpd +39 -0
- pyromat/data/ig2/C6_H5.hpd +39 -0
- pyromat/data/ig2/C6_H5_O.hpd +40 -0
- pyromat/data/ig2/C6_H6.hpd +39 -0
- pyromat/data/ig2/C6_H6_O.hpd +40 -0
- pyromat/data/ig2/C7_H14.hpd +39 -0
- pyromat/data/ig2/C7_H15.hpd +39 -0
- pyromat/data/ig2/C7_H16.hpd +39 -0
- pyromat/data/ig2/C7_H7.hpd +39 -0
- pyromat/data/ig2/C7_H8.hpd +39 -0
- pyromat/data/ig2/C7_H8_O.hpd +40 -0
- pyromat/data/ig2/C8_H10.hpd +39 -0
- pyromat/data/ig2/C8_H16.hpd +39 -0
- pyromat/data/ig2/C8_H17.hpd +39 -0
- pyromat/data/ig2/C8_H18.hpd +39 -0
- pyromat/data/ig2/C8_H8.hpd +39 -0
- pyromat/data/ig2/C9_H19.hpd +39 -0
- pyromat/data/ig2/C_Al.hpd +42 -0
- pyromat/data/ig2/C_Cl.hpd +43 -0
- pyromat/data/ig2/C_Cl2.hpd +43 -0
- pyromat/data/ig2/C_Cl2_F2.hpd +85 -0
- pyromat/data/ig2/C_Cl2_O.hpd +65 -0
- pyromat/data/ig2/C_Cl3.hpd +43 -0
- pyromat/data/ig2/C_Cl3_F.hpd +93 -0
- pyromat/data/ig2/C_Cl4.hpd +84 -0
- pyromat/data/ig2/C_Cl_F3.hpd +65 -0
- pyromat/data/ig2/C_Cl_F_O.hpd +52 -0
- pyromat/data/ig2/C_Cl_N.hpd +60 -0
- pyromat/data/ig2/C_Cl_O.hpd +44 -0
- pyromat/data/ig2/C_F+.hpd +40 -0
- pyromat/data/ig2/C_F.hpd +43 -0
- pyromat/data/ig2/C_F2+.hpd +40 -0
- pyromat/data/ig2/C_F2.hpd +45 -0
- pyromat/data/ig2/C_F2_O.hpd +60 -0
- pyromat/data/ig2/C_F3+.hpd +40 -0
- pyromat/data/ig2/C_F3.hpd +43 -0
- pyromat/data/ig2/C_F4.hpd +62 -0
- pyromat/data/ig2/C_F_N.hpd +43 -0
- pyromat/data/ig2/C_F_O.hpd +43 -0
- pyromat/data/ig2/C_H+.hpd +40 -0
- pyromat/data/ig2/C_H.hpd +43 -0
- pyromat/data/ig2/C_H2.hpd +43 -0
- pyromat/data/ig2/C_H2_Cl2.hpd +70 -0
- pyromat/data/ig2/C_H2_Cl_F.hpd +56 -0
- pyromat/data/ig2/C_H2_F2.hpd +40 -0
- pyromat/data/ig2/C_H2_O.hpd +82 -0
- pyromat/data/ig2/C_H2_O2.hpd +40 -0
- pyromat/data/ig2/C_H3.hpd +43 -0
- pyromat/data/ig2/C_H3_Cl.hpd +61 -0
- pyromat/data/ig2/C_H3_F.hpd +40 -0
- pyromat/data/ig2/C_H3_O.hpd +40 -0
- pyromat/data/ig2/C_H4.hpd +39 -0
- pyromat/data/ig2/C_H4_O.hpd +40 -0
- pyromat/data/ig2/C_H_Cl.hpd +44 -0
- pyromat/data/ig2/C_H_Cl2_F.hpd +65 -0
- pyromat/data/ig2/C_H_Cl3.hpd +65 -0
- pyromat/data/ig2/C_H_Cl_F2.hpd +89 -0
- pyromat/data/ig2/C_H_F3.hpd +65 -0
- pyromat/data/ig2/C_H_N.hpd +72 -0
- pyromat/data/ig2/C_H_N_O.hpd +45 -0
- pyromat/data/ig2/C_H_O+.hpd +41 -0
- pyromat/data/ig2/C_H_O.hpd +44 -0
- pyromat/data/ig2/C_H_O2.hpd +40 -0
- pyromat/data/ig2/C_K_N.hpd +43 -0
- pyromat/data/ig2/C_N+.hpd +40 -0
- pyromat/data/ig2/C_N-.hpd +40 -0
- pyromat/data/ig2/C_N.hpd +43 -0
- pyromat/data/ig2/C_N2.hpd +43 -0
- pyromat/data/ig2/C_N_Na.hpd +43 -0
- pyromat/data/ig2/C_N_O.hpd +40 -0
- pyromat/data/ig2/C_O+.hpd +40 -0
- pyromat/data/ig2/C_O.hpd +59 -0
- pyromat/data/ig2/C_O2+.hpd +40 -0
- pyromat/data/ig2/C_O2.hpd +61 -0
- pyromat/data/ig2/C_O_S.hpd +51 -0
- pyromat/data/ig2/C_P.hpd +43 -0
- pyromat/data/ig2/C_S.hpd +43 -0
- pyromat/data/ig2/C_S2.hpd +65 -0
- pyromat/data/ig2/C_Si.hpd +42 -0
- pyromat/data/ig2/C_Si2.hpd +42 -0
- pyromat/data/ig2/Ca+.hpd +39 -0
- pyromat/data/ig2/Ca.hpd +42 -0
- pyromat/data/ig2/Ca2.hpd +42 -0
- pyromat/data/ig2/Ca_Cl.hpd +43 -0
- pyromat/data/ig2/Ca_Cl2.hpd +42 -0
- pyromat/data/ig2/Ca_F.hpd +43 -0
- pyromat/data/ig2/Ca_F2.hpd +42 -0
- pyromat/data/ig2/Ca_I.hpd +42 -0
- pyromat/data/ig2/Ca_I2.hpd +42 -0
- pyromat/data/ig2/Ca_O.hpd +44 -0
- pyromat/data/ig2/Ca_S.hpd +44 -0
- pyromat/data/ig2/Cl+.hpd +39 -0
- pyromat/data/ig2/Cl-.hpd +39 -0
- pyromat/data/ig2/Cl.hpd +42 -0
- pyromat/data/ig2/Cl2.hpd +52 -0
- pyromat/data/ig2/Cl2_Cs2.hpd +42 -0
- pyromat/data/ig2/Cl2_Fe.hpd +42 -0
- pyromat/data/ig2/Cl2_K2.hpd +42 -0
- pyromat/data/ig2/Cl2_Li2.hpd +42 -0
- pyromat/data/ig2/Cl2_Mg.hpd +42 -0
- pyromat/data/ig2/Cl2_Na2.hpd +43 -0
- pyromat/data/ig2/Cl2_Ni.hpd +42 -0
- pyromat/data/ig2/Cl2_O.hpd +53 -0
- pyromat/data/ig2/Cl2_O2_S.hpd +45 -0
- pyromat/data/ig2/Cl2_O_Ti.hpd +43 -0
- pyromat/data/ig2/Cl2_Pb+.hpd +40 -0
- pyromat/data/ig2/Cl2_Pb.hpd +43 -0
- pyromat/data/ig2/Cl2_S+.hpd +40 -0
- pyromat/data/ig2/Cl2_S.hpd +54 -0
- pyromat/data/ig2/Cl2_S2.hpd +55 -0
- pyromat/data/ig2/Cl2_Si.hpd +42 -0
- pyromat/data/ig2/Cl2_Sr.hpd +42 -0
- pyromat/data/ig2/Cl2_Ti.hpd +42 -0
- pyromat/data/ig2/Cl3_Cu3.hpd +42 -0
- pyromat/data/ig2/Cl3_Fe.hpd +42 -0
- pyromat/data/ig2/Cl3_Li3.hpd +42 -0
- pyromat/data/ig2/Cl3_P.hpd +59 -0
- pyromat/data/ig2/Cl3_Si.hpd +43 -0
- pyromat/data/ig2/Cl3_Ti.hpd +42 -0
- pyromat/data/ig2/Cl4_Fe2.hpd +42 -0
- pyromat/data/ig2/Cl4_Pb.hpd +42 -0
- pyromat/data/ig2/Cl4_Si.hpd +59 -0
- pyromat/data/ig2/Cl4_Ti.hpd +54 -0
- pyromat/data/ig2/Cl4_V.hpd +39 -0
- pyromat/data/ig2/Cl6_Fe2.hpd +42 -0
- pyromat/data/ig2/Cl_Cs.hpd +44 -0
- pyromat/data/ig2/Cl_Cu.hpd +44 -0
- pyromat/data/ig2/Cl_D.hpd +44 -0
- pyromat/data/ig2/Cl_D_O.hpd +43 -0
- pyromat/data/ig2/Cl_F.hpd +44 -0
- pyromat/data/ig2/Cl_F3.hpd +42 -0
- pyromat/data/ig2/Cl_F_Mg.hpd +43 -0
- pyromat/data/ig2/Cl_F_O2_S.hpd +57 -0
- pyromat/data/ig2/Cl_Fe.hpd +42 -0
- pyromat/data/ig2/Cl_K.hpd +43 -0
- pyromat/data/ig2/Cl_Li.hpd +43 -0
- pyromat/data/ig2/Cl_Mg+.hpd +40 -0
- pyromat/data/ig2/Cl_Mg.hpd +43 -0
- pyromat/data/ig2/Cl_N_O.hpd +53 -0
- pyromat/data/ig2/Cl_N_O2.hpd +43 -0
- pyromat/data/ig2/Cl_Na.hpd +44 -0
- pyromat/data/ig2/Cl_Ni.hpd +44 -0
- pyromat/data/ig2/Cl_O.hpd +43 -0
- pyromat/data/ig2/Cl_O2.hpd +53 -0
- pyromat/data/ig2/Cl_O_Ti.hpd +43 -0
- pyromat/data/ig2/Cl_Pb+.hpd +40 -0
- pyromat/data/ig2/Cl_Pb.hpd +42 -0
- pyromat/data/ig2/Cl_S.hpd +43 -0
- pyromat/data/ig2/Cl_S2.hpd +43 -0
- pyromat/data/ig2/Cl_Si.hpd +43 -0
- pyromat/data/ig2/Cl_Sr.hpd +43 -0
- pyromat/data/ig2/Cl_Ti.hpd +42 -0
- pyromat/data/ig2/Cr.hpd +42 -0
- pyromat/data/ig2/Cr_N.hpd +44 -0
- pyromat/data/ig2/Cr_O.hpd +43 -0
- pyromat/data/ig2/Cr_O2.hpd +43 -0
- pyromat/data/ig2/Cr_O3.hpd +42 -0
- pyromat/data/ig2/Cs+.hpd +39 -0
- pyromat/data/ig2/Cs.hpd +38 -0
- pyromat/data/ig2/Cs2.hpd +42 -0
- pyromat/data/ig2/Cs2_F2.hpd +42 -0
- pyromat/data/ig2/Cs2_O.hpd +42 -0
- pyromat/data/ig2/Cs2_O4_S.hpd +43 -0
- pyromat/data/ig2/Cs_F.hpd +44 -0
- pyromat/data/ig2/Cs_O.hpd +43 -0
- pyromat/data/ig2/Cu+.hpd +39 -0
- pyromat/data/ig2/Cu.hpd +38 -0
- pyromat/data/ig2/Cu2.hpd +42 -0
- pyromat/data/ig2/Cu_F.hpd +43 -0
- pyromat/data/ig2/Cu_F2.hpd +42 -0
- pyromat/data/ig2/Cu_O.hpd +44 -0
- pyromat/data/ig2/D+.hpd +39 -0
- pyromat/data/ig2/D-.hpd +39 -0
- pyromat/data/ig2/D.hpd +38 -0
- pyromat/data/ig2/D2+.hpd +39 -0
- pyromat/data/ig2/D2-.hpd +39 -0
- pyromat/data/ig2/D2.hpd +44 -0
- pyromat/data/ig2/D2_N.hpd +42 -0
- pyromat/data/ig2/D2_N2.hpd +43 -0
- pyromat/data/ig2/D2_O.hpd +43 -0
- pyromat/data/ig2/D2_S.hpd +42 -0
- pyromat/data/ig2/D3_N.hpd +43 -0
- pyromat/data/ig2/D_F.hpd +44 -0
- pyromat/data/ig2/D_N.hpd +43 -0
- pyromat/data/ig2/D_O.hpd +43 -0
- pyromat/data/ig2/D_S.hpd +43 -0
- pyromat/data/ig2/F+.hpd +39 -0
- pyromat/data/ig2/F-.hpd +39 -0
- pyromat/data/ig2/F.hpd +42 -0
- pyromat/data/ig2/F2.hpd +42 -0
- pyromat/data/ig2/F2_K-.hpd +40 -0
- pyromat/data/ig2/F2_K2.hpd +42 -0
- pyromat/data/ig2/F2_Li-.hpd +40 -0
- pyromat/data/ig2/F2_Li2.hpd +42 -0
- pyromat/data/ig2/F2_Mg+.hpd +40 -0
- pyromat/data/ig2/F2_Mg.hpd +43 -0
- pyromat/data/ig2/F2_N.hpd +43 -0
- pyromat/data/ig2/F2_N2.hpd +53 -0
- pyromat/data/ig2/F2_Na-.hpd +40 -0
- pyromat/data/ig2/F2_Na2.hpd +42 -0
- pyromat/data/ig2/F2_O.hpd +52 -0
- pyromat/data/ig2/F2_O2_S.hpd +56 -0
- pyromat/data/ig2/F2_O_S.hpd +51 -0
- pyromat/data/ig2/F2_P+.hpd +40 -0
- pyromat/data/ig2/F2_P.hpd +43 -0
- pyromat/data/ig2/F2_Pb.hpd +42 -0
- pyromat/data/ig2/F2_S+.hpd +40 -0
- pyromat/data/ig2/F2_S-.hpd +40 -0
- pyromat/data/ig2/F2_S.hpd +43 -0
- pyromat/data/ig2/F2_S2.hpd +43 -0
- pyromat/data/ig2/F2_Si.hpd +43 -0
- pyromat/data/ig2/F2_Sr.hpd +42 -0
- pyromat/data/ig2/F3_Li3.hpd +39 -0
- pyromat/data/ig2/F3_N.hpd +50 -0
- pyromat/data/ig2/F3_N_O.hpd +51 -0
- pyromat/data/ig2/F3_P.hpd +50 -0
- pyromat/data/ig2/F3_S+.hpd +40 -0
- pyromat/data/ig2/F3_S-.hpd +40 -0
- pyromat/data/ig2/F3_S.hpd +43 -0
- pyromat/data/ig2/F3_Si.hpd +43 -0
- pyromat/data/ig2/F4_Mg2.hpd +42 -0
- pyromat/data/ig2/F4_N2.hpd +50 -0
- pyromat/data/ig2/F4_Pb.hpd +42 -0
- pyromat/data/ig2/F4_S+.hpd +40 -0
- pyromat/data/ig2/F4_S-.hpd +40 -0
- pyromat/data/ig2/F4_S.hpd +50 -0
- pyromat/data/ig2/F4_Si.hpd +49 -0
- pyromat/data/ig2/F5_P.hpd +48 -0
- pyromat/data/ig2/F5_S+.hpd +40 -0
- pyromat/data/ig2/F5_S-.hpd +40 -0
- pyromat/data/ig2/F5_S.hpd +43 -0
- pyromat/data/ig2/F6_S-.hpd +40 -0
- pyromat/data/ig2/F6_S.hpd +51 -0
- pyromat/data/ig2/F_K.hpd +43 -0
- pyromat/data/ig2/F_Li.hpd +43 -0
- pyromat/data/ig2/F_Li_O.hpd +44 -0
- pyromat/data/ig2/F_Mg+.hpd +40 -0
- pyromat/data/ig2/F_Mg.hpd +43 -0
- pyromat/data/ig2/F_N.hpd +43 -0
- pyromat/data/ig2/F_N_O.hpd +44 -0
- pyromat/data/ig2/F_N_O2.hpd +43 -0
- pyromat/data/ig2/F_N_O3.hpd +44 -0
- pyromat/data/ig2/F_Na.hpd +43 -0
- pyromat/data/ig2/F_O.hpd +43 -0
- pyromat/data/ig2/F_O2.hpd +39 -0
- pyromat/data/ig2/F_P+.hpd +40 -0
- pyromat/data/ig2/F_P-.hpd +40 -0
- pyromat/data/ig2/F_P.hpd +43 -0
- pyromat/data/ig2/F_Pb.hpd +42 -0
- pyromat/data/ig2/F_S+.hpd +40 -0
- pyromat/data/ig2/F_S-.hpd +40 -0
- pyromat/data/ig2/F_S.hpd +43 -0
- pyromat/data/ig2/F_Si.hpd +44 -0
- pyromat/data/ig2/F_Sr+.hpd +40 -0
- pyromat/data/ig2/F_Sr.hpd +43 -0
- pyromat/data/ig2/Fe+.hpd +39 -0
- pyromat/data/ig2/Fe-.hpd +39 -0
- pyromat/data/ig2/Fe.hpd +42 -0
- pyromat/data/ig2/Fe_O.hpd +44 -0
- pyromat/data/ig2/H+.hpd +39 -0
- pyromat/data/ig2/H-.hpd +39 -0
- pyromat/data/ig2/H.hpd +38 -0
- pyromat/data/ig2/H2+.hpd +39 -0
- pyromat/data/ig2/H2-.hpd +39 -0
- pyromat/data/ig2/H2.hpd +49 -0
- pyromat/data/ig2/H2_B.hpd +39 -0
- pyromat/data/ig2/H2_Ba_O2.hpd +40 -0
- pyromat/data/ig2/H2_Be_O2.hpd +40 -0
- pyromat/data/ig2/H2_Br2_Si.hpd +40 -0
- pyromat/data/ig2/H2_Ca_O2.hpd +40 -0
- pyromat/data/ig2/H2_Cl2_Si.hpd +40 -0
- pyromat/data/ig2/H2_Cs2_O2.hpd +40 -0
- pyromat/data/ig2/H2_F2.hpd +39 -0
- pyromat/data/ig2/H2_F2_Si.hpd +40 -0
- pyromat/data/ig2/H2_F_N.hpd +40 -0
- pyromat/data/ig2/H2_Fe_O2.hpd +40 -0
- pyromat/data/ig2/H2_I2_Si.hpd +44 -0
- pyromat/data/ig2/H2_K2_O2.hpd +43 -0
- pyromat/data/ig2/H2_Li2_O2.hpd +44 -0
- pyromat/data/ig2/H2_Mg_O2.hpd +43 -0
- pyromat/data/ig2/H2_N.hpd +43 -0
- pyromat/data/ig2/H2_N2.hpd +42 -0
- pyromat/data/ig2/H2_N2_O2.hpd +40 -0
- pyromat/data/ig2/H2_Na2_O2.hpd +44 -0
- pyromat/data/ig2/H2_O+.hpd +40 -0
- pyromat/data/ig2/H2_O.hpd +50 -0
- pyromat/data/ig2/H2_O2.hpd +43 -0
- pyromat/data/ig2/H2_O2_Sr.hpd +44 -0
- pyromat/data/ig2/H2_O4_S.hpd +68 -0
- pyromat/data/ig2/H2_S.hpd +65 -0
- pyromat/data/ig2/H2_Si.hpd +39 -0
- pyromat/data/ig2/H3_B.hpd +39 -0
- pyromat/data/ig2/H3_B3_O3.hpd +40 -0
- pyromat/data/ig2/H3_B3_O6.hpd +40 -0
- pyromat/data/ig2/H3_Br_Si.hpd +40 -0
- pyromat/data/ig2/H3_Cl_Si.hpd +40 -0
- pyromat/data/ig2/H3_F3.hpd +39 -0
- pyromat/data/ig2/H3_F_Si.hpd +40 -0
- pyromat/data/ig2/H3_I_Si.hpd +44 -0
- pyromat/data/ig2/H3_N.hpd +50 -0
- pyromat/data/ig2/H3_N_O.hpd +40 -0
- pyromat/data/ig2/H3_O+.hpd +40 -0
- pyromat/data/ig2/H3_P.hpd +54 -0
- pyromat/data/ig2/H3_Si.hpd +39 -0
- pyromat/data/ig2/H4_F4.hpd +39 -0
- pyromat/data/ig2/H4_N+.hpd +40 -0
- pyromat/data/ig2/H4_N2.hpd +52 -0
- pyromat/data/ig2/H4_Si.hpd +50 -0
- pyromat/data/ig2/H5_F5.hpd +39 -0
- pyromat/data/ig2/H6_F6.hpd +39 -0
- pyromat/data/ig2/H7_F7.hpd +39 -0
- pyromat/data/ig2/H_Al.hpd +39 -0
- pyromat/data/ig2/H_Al_O+.hpd +41 -0
- pyromat/data/ig2/H_Al_O-.hpd +41 -0
- pyromat/data/ig2/H_Al_O.hpd +40 -0
- pyromat/data/ig2/H_Al_O2.hpd +40 -0
- pyromat/data/ig2/H_B.hpd +39 -0
- pyromat/data/ig2/H_B_F2.hpd +40 -0
- pyromat/data/ig2/H_B_O+.hpd +41 -0
- pyromat/data/ig2/H_B_O-.hpd +41 -0
- pyromat/data/ig2/H_B_O.hpd +40 -0
- pyromat/data/ig2/H_B_O2.hpd +40 -0
- pyromat/data/ig2/H_B_S+.hpd +41 -0
- pyromat/data/ig2/H_B_S.hpd +40 -0
- pyromat/data/ig2/H_Ba_O+.hpd +41 -0
- pyromat/data/ig2/H_Ba_O.hpd +40 -0
- pyromat/data/ig2/H_Be+.hpd +40 -0
- pyromat/data/ig2/H_Be.hpd +39 -0
- pyromat/data/ig2/H_Be_O+.hpd +41 -0
- pyromat/data/ig2/H_Be_O.hpd +40 -0
- pyromat/data/ig2/H_Br.hpd +39 -0
- pyromat/data/ig2/H_Br3_Si.hpd +40 -0
- pyromat/data/ig2/H_Ca_O+.hpd +41 -0
- pyromat/data/ig2/H_Ca_O.hpd +40 -0
- pyromat/data/ig2/H_Cl.hpd +39 -0
- pyromat/data/ig2/H_Cl3_Si.hpd +40 -0
- pyromat/data/ig2/H_Cl_O.hpd +40 -0
- pyromat/data/ig2/H_Cs_O+.hpd +41 -0
- pyromat/data/ig2/H_Cs_O.hpd +40 -0
- pyromat/data/ig2/H_D+.hpd +40 -0
- pyromat/data/ig2/H_D-.hpd +40 -0
- pyromat/data/ig2/H_D.hpd +39 -0
- pyromat/data/ig2/H_D_O.hpd +40 -0
- pyromat/data/ig2/H_F.hpd +39 -0
- pyromat/data/ig2/H_F2_N.hpd +40 -0
- pyromat/data/ig2/H_F3_Si.hpd +40 -0
- pyromat/data/ig2/H_F_N.hpd +40 -0
- pyromat/data/ig2/H_F_O.hpd +40 -0
- pyromat/data/ig2/H_F_O3_S.hpd +41 -0
- pyromat/data/ig2/H_I.hpd +43 -0
- pyromat/data/ig2/H_I3_Si.hpd +44 -0
- pyromat/data/ig2/H_K.hpd +43 -0
- pyromat/data/ig2/H_K_O+.hpd +41 -0
- pyromat/data/ig2/H_K_O.hpd +44 -0
- pyromat/data/ig2/H_Li.hpd +43 -0
- pyromat/data/ig2/H_Li_O+.hpd +41 -0
- pyromat/data/ig2/H_Li_O.hpd +43 -0
- pyromat/data/ig2/H_Mg.hpd +43 -0
- pyromat/data/ig2/H_Mg_O+.hpd +41 -0
- pyromat/data/ig2/H_Mg_O.hpd +44 -0
- pyromat/data/ig2/H_N+.hpd +40 -0
- pyromat/data/ig2/H_N.hpd +43 -0
- pyromat/data/ig2/H_N3.hpd +39 -0
- pyromat/data/ig2/H_N_O.hpd +44 -0
- pyromat/data/ig2/H_N_O2.hpd +40 -0
- pyromat/data/ig2/H_N_O3.hpd +44 -0
- pyromat/data/ig2/H_Na.hpd +43 -0
- pyromat/data/ig2/H_Na_O+.hpd +41 -0
- pyromat/data/ig2/H_Na_O.hpd +44 -0
- pyromat/data/ig2/H_O+.hpd +40 -0
- pyromat/data/ig2/H_O-.hpd +40 -0
- pyromat/data/ig2/H_O.hpd +43 -0
- pyromat/data/ig2/H_O2.hpd +43 -0
- pyromat/data/ig2/H_O_Sr+.hpd +41 -0
- pyromat/data/ig2/H_O_Sr.hpd +44 -0
- pyromat/data/ig2/H_P.hpd +43 -0
- pyromat/data/ig2/H_S.hpd +43 -0
- pyromat/data/ig2/H_Si+.hpd +40 -0
- pyromat/data/ig2/H_Si.hpd +43 -0
- pyromat/data/ig2/He+.hpd +39 -0
- pyromat/data/ig2/He.hpd +38 -0
- pyromat/data/ig2/Hg.hpd +42 -0
- pyromat/data/ig2/I.hpd +42 -0
- pyromat/data/ig2/I2.hpd +57 -0
- pyromat/data/ig2/I2_Mg.hpd +42 -0
- pyromat/data/ig2/I2_Pb.hpd +42 -0
- pyromat/data/ig2/I2_Si.hpd +43 -0
- pyromat/data/ig2/I2_Sr.hpd +42 -0
- pyromat/data/ig2/I4_Pb.hpd +42 -0
- pyromat/data/ig2/I_Mg.hpd +42 -0
- pyromat/data/ig2/I_Na.hpd +39 -0
- pyromat/data/ig2/I_Pb.hpd +42 -0
- pyromat/data/ig2/I_Si.hpd +43 -0
- pyromat/data/ig2/K+.hpd +39 -0
- pyromat/data/ig2/K.hpd +42 -0
- pyromat/data/ig2/K2.hpd +42 -0
- pyromat/data/ig2/K2_O4_S.hpd +43 -0
- pyromat/data/ig2/K_O-.hpd +40 -0
- pyromat/data/ig2/K_O.hpd +43 -0
- pyromat/data/ig2/Kr+.hpd +39 -0
- pyromat/data/ig2/Kr.hpd +38 -0
- pyromat/data/ig2/Li+.hpd +39 -0
- pyromat/data/ig2/Li.hpd +42 -0
- pyromat/data/ig2/Li2.hpd +42 -0
- pyromat/data/ig2/Li2_O.hpd +44 -0
- pyromat/data/ig2/Li2_O2.hpd +42 -0
- pyromat/data/ig2/Li2_O4_S.hpd +43 -0
- pyromat/data/ig2/Li_N.hpd +43 -0
- pyromat/data/ig2/Li_N_O.hpd +43 -0
- pyromat/data/ig2/Li_O-.hpd +40 -0
- pyromat/data/ig2/Li_O.hpd +43 -0
- pyromat/data/ig2/Mg+.hpd +39 -0
- pyromat/data/ig2/Mg.hpd +42 -0
- pyromat/data/ig2/Mg2.hpd +42 -0
- pyromat/data/ig2/Mg_N.hpd +42 -0
- pyromat/data/ig2/Mg_O.hpd +44 -0
- pyromat/data/ig2/Mg_S.hpd +44 -0
- pyromat/data/ig2/Mo2_O6.hpd +39 -0
- pyromat/data/ig2/Mo3_O9.hpd +39 -0
- pyromat/data/ig2/Mo4_O12.hpd +39 -0
- pyromat/data/ig2/Mo5_O15.hpd +39 -0
- pyromat/data/ig2/Mo_O3.hpd +42 -0
- pyromat/data/ig2/N+.hpd +39 -0
- pyromat/data/ig2/N-.hpd +39 -0
- pyromat/data/ig2/N.hpd +42 -0
- pyromat/data/ig2/N2+.hpd +39 -0
- pyromat/data/ig2/N2-.hpd +39 -0
- pyromat/data/ig2/N2.hpd +50 -0
- pyromat/data/ig2/N2_O+.hpd +40 -0
- pyromat/data/ig2/N2_O.hpd +55 -0
- pyromat/data/ig2/N2_O3.hpd +43 -0
- pyromat/data/ig2/N2_O4.hpd +44 -0
- pyromat/data/ig2/N2_O5.hpd +44 -0
- pyromat/data/ig2/N3.hpd +38 -0
- pyromat/data/ig2/N_O+.hpd +40 -0
- pyromat/data/ig2/N_O.hpd +50 -0
- pyromat/data/ig2/N_O2-.hpd +40 -0
- pyromat/data/ig2/N_O2.hpd +52 -0
- pyromat/data/ig2/N_O3-.hpd +40 -0
- pyromat/data/ig2/N_O3.hpd +44 -0
- pyromat/data/ig2/N_S.hpd +43 -0
- pyromat/data/ig2/N_Si.hpd +43 -0
- pyromat/data/ig2/N_Si2.hpd +42 -0
- pyromat/data/ig2/N_V.hpd +44 -0
- pyromat/data/ig2/N_Zr.hpd +39 -0
- pyromat/data/ig2/Na+.hpd +39 -0
- pyromat/data/ig2/Na.hpd +42 -0
- pyromat/data/ig2/Na2.hpd +42 -0
- pyromat/data/ig2/Na2_O.hpd +39 -0
- pyromat/data/ig2/Na2_O4_S.hpd +47 -0
- pyromat/data/ig2/Na_O-.hpd +40 -0
- pyromat/data/ig2/Na_O.hpd +44 -0
- pyromat/data/ig2/Nb.hpd +38 -0
- pyromat/data/ig2/Nb_O.hpd +44 -0
- pyromat/data/ig2/Nb_O2.hpd +44 -0
- pyromat/data/ig2/Ne+.hpd +39 -0
- pyromat/data/ig2/Ne.hpd +38 -0
- pyromat/data/ig2/Ni.hpd +42 -0
- pyromat/data/ig2/Ni_O.hpd +39 -0
- pyromat/data/ig2/Ni_S.hpd +39 -0
- pyromat/data/ig2/O+.hpd +39 -0
- pyromat/data/ig2/O-.hpd +39 -0
- pyromat/data/ig2/O.hpd +38 -0
- pyromat/data/ig2/O10_P4.hpd +39 -0
- pyromat/data/ig2/O2+.hpd +39 -0
- pyromat/data/ig2/O2-.hpd +39 -0
- pyromat/data/ig2/O2.hpd +50 -0
- pyromat/data/ig2/O2_P.hpd +43 -0
- pyromat/data/ig2/O2_S.hpd +58 -0
- pyromat/data/ig2/O2_Si.hpd +49 -0
- pyromat/data/ig2/O2_Ta.hpd +43 -0
- pyromat/data/ig2/O2_Ti.hpd +45 -0
- pyromat/data/ig2/O2_V.hpd +43 -0
- pyromat/data/ig2/O2_Zr.hpd +42 -0
- pyromat/data/ig2/O3.hpd +42 -0
- pyromat/data/ig2/O3_S.hpd +44 -0
- pyromat/data/ig2/O_P.hpd +43 -0
- pyromat/data/ig2/O_Pb.hpd +39 -0
- pyromat/data/ig2/O_S.hpd +43 -0
- pyromat/data/ig2/O_S2.hpd +43 -0
- pyromat/data/ig2/O_Si.hpd +43 -0
- pyromat/data/ig2/O_Sr.hpd +44 -0
- pyromat/data/ig2/O_Ta.hpd +43 -0
- pyromat/data/ig2/O_Ti.hpd +44 -0
- pyromat/data/ig2/O_V.hpd +44 -0
- pyromat/data/ig2/O_Zr.hpd +44 -0
- pyromat/data/ig2/P+.hpd +39 -0
- pyromat/data/ig2/P.hpd +44 -0
- pyromat/data/ig2/P2.hpd +42 -0
- pyromat/data/ig2/P4.hpd +41 -0
- pyromat/data/ig2/Pb.hpd +38 -0
- pyromat/data/ig2/Pb2.hpd +41 -0
- pyromat/data/ig2/Pb_S.hpd +44 -0
- pyromat/data/ig2/S+.hpd +39 -0
- pyromat/data/ig2/S-.hpd +39 -0
- pyromat/data/ig2/S.hpd +45 -0
- pyromat/data/ig2/S2.hpd +42 -0
- pyromat/data/ig2/S8.hpd +54 -0
- pyromat/data/ig2/S_Si.hpd +43 -0
- pyromat/data/ig2/S_Sr.hpd +44 -0
- pyromat/data/ig2/Si+.hpd +39 -0
- pyromat/data/ig2/Si.hpd +42 -0
- pyromat/data/ig2/Si2.hpd +42 -0
- pyromat/data/ig2/Si3.hpd +43 -0
- pyromat/data/ig2/Sr.hpd +42 -0
- pyromat/data/ig2/Ta.hpd +42 -0
- pyromat/data/ig2/Ti+.hpd +39 -0
- pyromat/data/ig2/Ti-.hpd +39 -0
- pyromat/data/ig2/Ti.hpd +42 -0
- pyromat/data/ig2/V.hpd +42 -0
- pyromat/data/ig2/Xe+.hpd +39 -0
- pyromat/data/ig2/Xe.hpd +38 -0
- pyromat/data/ig2/Zn-.hpd +39 -0
- pyromat/data/ig2/Zn.hpd +42 -0
- pyromat/data/ig2/Zr.hpd +42 -0
- pyromat/data/ig2/e.hpd +38 -0
- pyromat/data/igmix/air.hpd +12 -0
- pyromat/data/igmix/f5.hpd +10 -0
- pyromat/data/igmix/h35.hpd +10 -0
- pyromat/data/mp/C2_H2_F4.hpd +332 -0
- pyromat/data/mp/C3_H2_F4_1.hpd +373 -0
- pyromat/data/mp/C_H4.hpd +454 -0
- pyromat/data/mp/C_O2.hpd +512 -0
- pyromat/data/mp/H2_O.hpd +592 -0
- pyromat/data/mp/N2.hpd +434 -0
- pyromat/data/mp/O2.hpd +381 -0
- pyromat/igtools.py +1800 -0
- pyromat/reg.py +379 -0
- pyromat/registry/_example.py +85 -0
- pyromat/registry/if97.py +2278 -0
- pyromat/registry/ig.py +1931 -0
- pyromat/registry/ig2.py +1400 -0
- pyromat/registry/igmix.py +1230 -0
- pyromat/registry/mp1.py +4460 -0
- pyromat/units.py +617 -0
- pyromat/utility.py +841 -0
pyromat/registry/ig.py
ADDED
|
@@ -0,0 +1,1931 @@
|
|
|
1
|
+
import pyromat as pm
|
|
2
|
+
import numpy as np
|
|
3
|
+
import os,sys
|
|
4
|
+
import re
|
|
5
|
+
|
|
6
|
+
#
|
|
7
|
+
# ig works in internal units
|
|
8
|
+
# Energy: kJ
|
|
9
|
+
# Matter: kmol
|
|
10
|
+
# Pressure: Pa
|
|
11
|
+
#
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class ig(pm.reg.__basedata__):
|
|
15
|
+
"""Ideal gas class using the Shomate equation of state.
|
|
16
|
+
|
|
17
|
+
** Available Properties **
|
|
18
|
+
IG has property methods:
|
|
19
|
+
T() temperature (unit_temperature)
|
|
20
|
+
p() pressure (unit_pressure)
|
|
21
|
+
d() density (unit_matter / unit_volume)
|
|
22
|
+
v() specific volume (unit_volume / unit_matter)
|
|
23
|
+
cp() spec. heat (unit_energy / unit_temperature / unit_matter)
|
|
24
|
+
cv() spec. heat (unit_energy / unit_temperature / unit_matter)
|
|
25
|
+
gam() spec. heat ratio (dless)
|
|
26
|
+
e() internal energy (unit_energy / unit_matter)
|
|
27
|
+
f() free energy (unit_energy / unit_matter)
|
|
28
|
+
g() Gibbs energy (unit_energy / unit_matter)
|
|
29
|
+
h() enthalpy (unit_energy / unit_matter)
|
|
30
|
+
s() entropy (unit_energy / unit_temperature / unit_matter)
|
|
31
|
+
state() Calculates many properties!
|
|
32
|
+
|
|
33
|
+
These accept any of the following keyword arguments: T, p, d, v, e, h, s
|
|
34
|
+
h(T=452.)
|
|
35
|
+
h(d=1.3, p=3.4)
|
|
36
|
+
h(s=6.2, p=3.4)
|
|
37
|
+
|
|
38
|
+
In the back end, most properties require only temperature except entropy,
|
|
39
|
+
which requires temperature and pressure. When other properties are given,
|
|
40
|
+
temperature is needed, so additional calculations are necessary. In the
|
|
41
|
+
worst case, specifying entropy, enthalpy, or internal energy even requires
|
|
42
|
+
iteration. For performance, once temperature and pressure become available,
|
|
43
|
+
they should always be used. For enthalpy, pressure is not needed, so it
|
|
44
|
+
may be omitted with no ill effect.
|
|
45
|
+
|
|
46
|
+
** Other Properties **
|
|
47
|
+
There are some properties that do not depend on the state; they only need
|
|
48
|
+
to be converted to the relevant unit system.
|
|
49
|
+
mw() molecular weight (unit_mass / unit_molar)
|
|
50
|
+
R() gas constant
|
|
51
|
+
Tlim() a two-element array with the min,max temperatures
|
|
52
|
+
supported by the data set.
|
|
53
|
+
atoms() returns a dictionary with a key entry for each atom in
|
|
54
|
+
the chemical formula and the corresponding integer
|
|
55
|
+
quantity of each.
|
|
56
|
+
|
|
57
|
+
For more information on any of these methods, access the in-line
|
|
58
|
+
documentation using Python's built-in "help()" function.
|
|
59
|
+
"""
|
|
60
|
+
|
|
61
|
+
def __init__(self,*arg,**kwarg):
|
|
62
|
+
super(self.__class__,self).__init__(*arg,**kwarg)
|
|
63
|
+
|
|
64
|
+
# Important constants
|
|
65
|
+
self._pref_pa = 1e5
|
|
66
|
+
# Initialize the species contents dictionary
|
|
67
|
+
self._contents = None
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
def _argparse(self, *varg, **kwarg):
|
|
71
|
+
"""Parse the arguments supplied to an IG property method
|
|
72
|
+
T,p,d = _argparse(*varg, **kwarg)
|
|
73
|
+
|
|
74
|
+
_ARGPARSE automatically applies the default temperature and pressure,
|
|
75
|
+
def_T or def_p, from the pyromat.config system to deal with unspecified
|
|
76
|
+
parameters. All inputs are re-cast as numpy arrays of at least one
|
|
77
|
+
dimension and inputs are automatically converted from the configured
|
|
78
|
+
user units into kJ, kmol, m^3.
|
|
79
|
+
|
|
80
|
+
The returned variables are arrays of temperature, T, pressure, p, and
|
|
81
|
+
the density, d. Temperature will always be returned, and at least one
|
|
82
|
+
of p and d will be populated as well, but one of them may be None.
|
|
83
|
+
_argparse decides which to populate based on what is most efficient.
|
|
84
|
+
"""
|
|
85
|
+
# 1) Handle varg and kward and their defaults
|
|
86
|
+
# 2) Apply the argument rules...
|
|
87
|
+
# 2.1: All arguments must be legal
|
|
88
|
+
# 2.2: Only 2 arguments
|
|
89
|
+
# 2.3: T, e, and h may not be specified together
|
|
90
|
+
# 2.4: d and v may not be specified together
|
|
91
|
+
# 3) Convert the arguments to arrays with dim 1 or greater
|
|
92
|
+
# 4) Convert to standard units
|
|
93
|
+
# 5) Process equivalent arguments
|
|
94
|
+
# 5.1: replace v with d
|
|
95
|
+
# 5.2: replace e or h with T
|
|
96
|
+
# 6) Check for out-of-bounds on basic arguments (This was shifted to last)
|
|
97
|
+
# 7) Case out the possible combinations
|
|
98
|
+
# 8) Broadcast the arrays appropriately
|
|
99
|
+
# 9) Calculate T,p,d
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
# Fancy tool for tracking iteration issues
|
|
103
|
+
debug = False
|
|
104
|
+
|
|
105
|
+
# 1) Handle varg and kwarg and apply defaults
|
|
106
|
+
|
|
107
|
+
# If varg is specified, assign its values to T,p
|
|
108
|
+
if len(varg) > 0:
|
|
109
|
+
if 'T' in kwarg:
|
|
110
|
+
raise pm.utility.PMParamError('T was specified both positionally and with a keyword.')
|
|
111
|
+
kwarg['T'] = varg[0]
|
|
112
|
+
if len(varg) > 1:
|
|
113
|
+
if 'p' in kwarg:
|
|
114
|
+
raise pm.utility.PMParamError('p was specified both positionally and with a keyword.')
|
|
115
|
+
kwarg['p'] = varg[1]
|
|
116
|
+
if len(varg) > 2:
|
|
117
|
+
raise pm.utility.PMParamError('There are only two positional arguments: T, p.')
|
|
118
|
+
|
|
119
|
+
# Count the number of arguments
|
|
120
|
+
nargs = len(kwarg)
|
|
121
|
+
if nargs == 1:
|
|
122
|
+
if 'T' not in kwarg:
|
|
123
|
+
kwarg['T'] = pm.config.def_T()
|
|
124
|
+
else:
|
|
125
|
+
kwarg['p'] = pm.config.def_p()
|
|
126
|
+
elif nargs == 0:
|
|
127
|
+
kwarg['T'] = pm.config.def_T()
|
|
128
|
+
kwarg['p'] = pm.config.def_p()
|
|
129
|
+
|
|
130
|
+
# 2) Apply the argument rules
|
|
131
|
+
# Re-measure the number of arguments and use sets to enforce
|
|
132
|
+
# the remaining rules
|
|
133
|
+
nargs = len(kwarg)
|
|
134
|
+
args = set(kwarg.keys())
|
|
135
|
+
# A set of the legal arguments
|
|
136
|
+
legal_args = set(['T','p','d','v','e','h','s'])
|
|
137
|
+
|
|
138
|
+
# 2.1: There may only be 2 arguments
|
|
139
|
+
if nargs>2:
|
|
140
|
+
raise pm.utility.PMParamError(
|
|
141
|
+
'Specifying more than two simultaneous parameters is illegal.')
|
|
142
|
+
|
|
143
|
+
# 2.2: All arguments must be "legal" recognized arguments
|
|
144
|
+
these_args = args - legal_args
|
|
145
|
+
if these_args:
|
|
146
|
+
message = 'Unrecognized propert(y/ies):'
|
|
147
|
+
prefix = ' '
|
|
148
|
+
for name in these_args:
|
|
149
|
+
message += prefix + name
|
|
150
|
+
prefix = ', '
|
|
151
|
+
raise pm.utility.PMParamError(message)
|
|
152
|
+
|
|
153
|
+
# 2.3: T, e, and h may not be specified together
|
|
154
|
+
these_args = set(['T', 'e', 'h']).intersection(args)
|
|
155
|
+
if len(these_args) > 1:
|
|
156
|
+
message = 'Properties may not be specified together:'
|
|
157
|
+
prefix = ' '
|
|
158
|
+
for name in inverse_args:
|
|
159
|
+
message += prefix + name
|
|
160
|
+
prefix = ', '
|
|
161
|
+
raise pm.utility.PMParamError(message)
|
|
162
|
+
|
|
163
|
+
# 2.4: Density and specific volume cannot be specified together
|
|
164
|
+
if 'v' in args and 'd' in args:
|
|
165
|
+
raise pm.utility.PMParamError('Density (d) and specific volume (v) cannot be specified together.')
|
|
166
|
+
|
|
167
|
+
# 3) Convert all arguments to numpy arrays
|
|
168
|
+
# The asarray function does NOT copy the array if it is already
|
|
169
|
+
# a numpy array.
|
|
170
|
+
for name,value in kwarg.items():
|
|
171
|
+
value = np.asarray(value, dtype=float)
|
|
172
|
+
if value.ndim == 0:
|
|
173
|
+
value = np.reshape(value, (1,))
|
|
174
|
+
kwarg[name] = value
|
|
175
|
+
|
|
176
|
+
# 4) Convert the units appropriately
|
|
177
|
+
# This step will only make a copy of the array if the units need
|
|
178
|
+
# to be converted. Otherwise, the array is passed through verbatim
|
|
179
|
+
# As a result, the input array will ONLY be copied if it needs to
|
|
180
|
+
# be reshaped, converted, or retyped.
|
|
181
|
+
# 5) Replace v with d and e/h with T
|
|
182
|
+
if 'T' in kwarg:
|
|
183
|
+
kwarg['T'] = pm.units.temperature_scale(kwarg['T'], to_units='K')
|
|
184
|
+
if 'p' in kwarg:
|
|
185
|
+
kwarg['p'] = pm.units.pressure(kwarg['p'], to_units='Pa')
|
|
186
|
+
if 'd' in kwarg:
|
|
187
|
+
value = pm.units.volume(kwarg['d'], to_units='m3', exponent=-1)
|
|
188
|
+
kwarg['d'] = pm.units.matter(value, self.data['mw'], to_units='kmol')
|
|
189
|
+
if 'v' in kwarg:
|
|
190
|
+
# Convert and replace with d at the same time
|
|
191
|
+
value = pm.units.volume(kwarg['v'], to_units='m3')
|
|
192
|
+
kwarg['d'] = 1./pm.units.matter(value, self.data['mw'], to_units='kmol', exponent=-1)
|
|
193
|
+
if 'h' in kwarg:
|
|
194
|
+
value = kwarg['h']
|
|
195
|
+
value = pm.units.energy(value, to_units='kJ')
|
|
196
|
+
value = pm.units.matter(value, self.data['mw'], to_units='kmol', exponent=-1)
|
|
197
|
+
Tlow = self.data['Tlim'][0]
|
|
198
|
+
Thigh = self.data['Tlim'][-1]
|
|
199
|
+
T = np.full(value.shape, 0.5*(Tlow+Thigh))
|
|
200
|
+
I = np.ones(value.shape, dtype=bool)
|
|
201
|
+
self._iter1(self._h, 'T', value, T, I, Tlow, Thigh)
|
|
202
|
+
kwarg['T'] = T
|
|
203
|
+
if 'e' in kwarg:
|
|
204
|
+
value = kwarg['e']
|
|
205
|
+
value = pm.units.energy(value, to_units='kJ')
|
|
206
|
+
value = pm.units.matter(value, self.data['mw'], to_units='kmol', exponent=-1)
|
|
207
|
+
Tlow = self.data['Tlim'][0]
|
|
208
|
+
Thigh = self.data['Tlim'][-1]
|
|
209
|
+
T = np.full(value.shape, 0.5*(Tlow+Thigh))
|
|
210
|
+
I = np.ones(value.shape, dtype=bool)
|
|
211
|
+
self._iter1(self._e, 'T', value, T, I, Tlow, Thigh)
|
|
212
|
+
kwarg['T'] = T
|
|
213
|
+
if 's' in kwarg:
|
|
214
|
+
value = kwarg['s']
|
|
215
|
+
value = pm.units.energy(value, to_units='kJ')
|
|
216
|
+
value = pm.units.matter(value, self.data['mw'], to_units='kmol', exponent=-1)
|
|
217
|
+
value = pm.units.temperature(value, to_units='K', exponent=-1)
|
|
218
|
+
kwarg['s'] = value
|
|
219
|
+
|
|
220
|
+
# Convert R into J/kmol/K - use this for p = dRT
|
|
221
|
+
# Do NOT use this for s, e, and h relationships
|
|
222
|
+
R = 1000 * pm.units.const_Ru
|
|
223
|
+
|
|
224
|
+
T = p = d = None
|
|
225
|
+
# Entropy requires special iteration
|
|
226
|
+
if 's' in kwarg:
|
|
227
|
+
# If density is specified
|
|
228
|
+
if 'd' in args:
|
|
229
|
+
s,d = np.broadcast_arrays(kwarg['s'], kwarg['d'])
|
|
230
|
+
Tlow = self.data['Tlim'][0]
|
|
231
|
+
Thigh = self.data['Thigh'][-1]
|
|
232
|
+
T = np.full_like(s, 0.5*(Tlow+Thigh))
|
|
233
|
+
I = np.ones_like(s,dtype=bool)
|
|
234
|
+
self._iter1(self._sditer, 'T', s, T, I, Tlow, Thigh, param={'d':d})
|
|
235
|
+
|
|
236
|
+
# If pressure is specified
|
|
237
|
+
elif 'p' in kwarg:
|
|
238
|
+
s,p = np.broadcast_arrays(kwarg['s'], kwarg['p'])
|
|
239
|
+
# adjust entropy to the reference pressure
|
|
240
|
+
s += pm.units.const_Ru * np.log(p / self._pref_pa)
|
|
241
|
+
Tlow = self.data['Tlim'][0]
|
|
242
|
+
Thigh = self.data['Thigh'][-1]
|
|
243
|
+
T = np.full_like(s, 0.5*(Tlow+Thigh))
|
|
244
|
+
I = np.ones_like(s,dtype=bool)
|
|
245
|
+
self._iter1(self._s, 'T', s, T, I, Tlow, Thigh)
|
|
246
|
+
# If temperature is specified
|
|
247
|
+
elif 'T' in kwarg:
|
|
248
|
+
s,T = np.broadcast_arrays(kwarg['s'], kwarg['T'])
|
|
249
|
+
# Calculate the reference entropy at the specified temperature
|
|
250
|
+
s0 = self._s(T)[0]
|
|
251
|
+
p = self._pref_pa * np.exp((s0-s)/pm.units.const_Ru)
|
|
252
|
+
# Otherwise, this is an illegal combination!
|
|
253
|
+
else:
|
|
254
|
+
raise pm.utility.PMParamError(f'Cannot simultaneously specify parameters: {args}')
|
|
255
|
+
# If temperature is specified
|
|
256
|
+
elif 'T' in kwarg:
|
|
257
|
+
# There isn't much work to do
|
|
258
|
+
if 'p' in kwarg:
|
|
259
|
+
T,p = np.broadcast_arrays(kwarg['T'],kwarg['p'])
|
|
260
|
+
elif 'd' in kwarg:
|
|
261
|
+
T,d = np.broadcast_arrays(kwarg['T'],kwarg['d'])
|
|
262
|
+
else:
|
|
263
|
+
message = 'Please report a bug: Unhandled event [T] in ig2._argparse with args:'
|
|
264
|
+
prefix = ' '
|
|
265
|
+
for name in kwarg:
|
|
266
|
+
message += prefix + name
|
|
267
|
+
prefix = ', '
|
|
268
|
+
raise pm.utility.PMParamError(message)
|
|
269
|
+
# If pressure is specified
|
|
270
|
+
elif 'p' in kwarg:
|
|
271
|
+
if 'd' in kwarg:
|
|
272
|
+
p,d = np.broadcast_arrays(kwarg['p'], kwarg['d'])
|
|
273
|
+
T = p / (R * d)
|
|
274
|
+
else:
|
|
275
|
+
message = 'Please report a bug: Unhandled event [p] in ig2._argparse with args:'
|
|
276
|
+
prefix = ' '
|
|
277
|
+
for name in kwarg:
|
|
278
|
+
message += prefix + name
|
|
279
|
+
prefix = ', '
|
|
280
|
+
raise pm.utility.PMParamError(message)
|
|
281
|
+
else:
|
|
282
|
+
message = 'Please report a bug: Unhandled event [MASTER] in ig2._argparse with args:'
|
|
283
|
+
prefix = ' '
|
|
284
|
+
for name in kwarg:
|
|
285
|
+
message += prefix + name
|
|
286
|
+
prefix = ', '
|
|
287
|
+
raise pm.utility.PMParamError(message)
|
|
288
|
+
|
|
289
|
+
# Test the temperatures for out-of-bounds
|
|
290
|
+
I = np.logical_or(T < self.data['Tlim'][0], T > self.data['Tlim'][-1])
|
|
291
|
+
if I.all():
|
|
292
|
+
raise pm.utility.PMParamError('All of the specified states were out-of-bounds. '
|
|
293
|
+
'Legal temperatures for {} are between {} and {} Kelvin.'.format(self.data['id'], self.data['Tlim'][0], self.data['Tlim'][-1]))
|
|
294
|
+
elif I.any():
|
|
295
|
+
T[I] = pm.config['def_oob']
|
|
296
|
+
pm.utility.print_warning('Some of the states were out of bounds - setting to config[\'def_oob\']. '
|
|
297
|
+
'Legal temperatures for {} are between {} and {} Kelvin.'.format(self.data['id'], self.data['Tlim'][0], self.data['Tlim'][-1]))
|
|
298
|
+
return T,p,d
|
|
299
|
+
|
|
300
|
+
def _crange(self, T, index):
|
|
301
|
+
"""Return the down-select boolean array for temperature values in range "index".
|
|
302
|
+
I = _crange(T,index)
|
|
303
|
+
|
|
304
|
+
I is a boolean array used for boolean indexing of the state properties.
|
|
305
|
+
I will be returned such that Tlim[index] <= T[I] < Tlim[index]
|
|
306
|
+
"""
|
|
307
|
+
# If the index corresponds to the last range segment, then make
|
|
308
|
+
# the upper boundary inclusive.
|
|
309
|
+
if index == len(self.data['Tlim'])-2:
|
|
310
|
+
return np.logical_and(\
|
|
311
|
+
T >= self.data['Tlim'][index],
|
|
312
|
+
T <= self.data['Tlim'][index+1])
|
|
313
|
+
|
|
314
|
+
return np.logical_and(\
|
|
315
|
+
T >= self.data['Tlim'][index],
|
|
316
|
+
T < self.data['Tlim'][index+1])
|
|
317
|
+
|
|
318
|
+
|
|
319
|
+
def _iter1(self, fn, prop, y, x, Ids, xmin, xmax,
|
|
320
|
+
ep=1e-6, Nmax=20, fx_index=1, verbose=False,
|
|
321
|
+
param={}):
|
|
322
|
+
"""Invert an inner routine.
|
|
323
|
+
|
|
324
|
+
_iter1(fn, prop, y, x, Ids, xmin, xmax,)
|
|
325
|
+
|
|
326
|
+
Iteration is performed in-place on the x array.
|
|
327
|
+
|
|
328
|
+
*** Required Parameters ***
|
|
329
|
+
fn The inner routine (method) to be inverted. It must have a
|
|
330
|
+
call signature
|
|
331
|
+
f, fx0, ... = fn(x0, x1, ..., diff)
|
|
332
|
+
where f is the value of fn, and fx0 is the derivative of fn
|
|
333
|
+
with respect to prop0. The fx_index keyword can be used to
|
|
334
|
+
change where fx is found in the returned tuple. By default
|
|
335
|
+
it is 1.
|
|
336
|
+
prop The string keyword index of the property to be calculated.
|
|
337
|
+
y An array of N target values for fn().
|
|
338
|
+
x The result array. It should be an N-element floating point
|
|
339
|
+
array that has already been initialized.
|
|
340
|
+
Ids A down-select boolean index array; only x[Ids],y[Ids] will
|
|
341
|
+
be evaluated. This allows iteration in-place on data sets
|
|
342
|
+
where only a portion of the data require iteration. If y is
|
|
343
|
+
a floating point array with N elements, Ids must be a bool
|
|
344
|
+
array with N elements. It will specify a down-selected
|
|
345
|
+
data set with M elements, where M<=N.
|
|
346
|
+
xmin, xmax Upper and lower limit arrays for the x values. These must
|
|
347
|
+
broadcastable to match x and y. Even values outside of the
|
|
348
|
+
down-select region should have legal values.
|
|
349
|
+
*** Optional Parameters ***
|
|
350
|
+
ep Epsilon; fractional error permitted in y (default 1e-6)
|
|
351
|
+
Nmax Maximum number of iterations (default 20)
|
|
352
|
+
fx_index The location of the property derivative in the call
|
|
353
|
+
signature (default 1)
|
|
354
|
+
param A dicitonary of keyword arguments are passed directly to the
|
|
355
|
+
inner routine being inverted.
|
|
356
|
+
|
|
357
|
+
"""
|
|
358
|
+
# As the iteration progresses, the number of True elements in
|
|
359
|
+
# Ids will decrease until they are all false
|
|
360
|
+
# There are some important intermediate values that will also
|
|
361
|
+
# require indexable arrays
|
|
362
|
+
dx = np.zeros_like(y, dtype=float)
|
|
363
|
+
error = np.zeros_like(dx, dtype=float)
|
|
364
|
+
IooB = np.zeros_like(Ids, dtype=bool)
|
|
365
|
+
|
|
366
|
+
arg = param.copy()
|
|
367
|
+
count = 0
|
|
368
|
+
|
|
369
|
+
if verbose:
|
|
370
|
+
print('x, yy, yyx, dx, Ids')
|
|
371
|
+
while Ids.any():
|
|
372
|
+
# Build the new argument list
|
|
373
|
+
for k,v in param.items():
|
|
374
|
+
# For any array arguments, shrink them along with Ids
|
|
375
|
+
if isinstance(v,np.ndarray):
|
|
376
|
+
arg[k] = v[Ids]
|
|
377
|
+
# Shrink the primary property array
|
|
378
|
+
arg[prop] = x[Ids]
|
|
379
|
+
# Evaluate the funciton and isolate its derivative
|
|
380
|
+
FF = fn( diff=True, **arg)
|
|
381
|
+
yy = FF[0]
|
|
382
|
+
yyx = FF[fx_index]
|
|
383
|
+
# note that x[Ids], yy, yyx, and all the other floating
|
|
384
|
+
# intermediates are now in m-space; the sub-set of values
|
|
385
|
+
# still under iteration.
|
|
386
|
+
# Calculate the error, the linear change in x, and the new x
|
|
387
|
+
error[Ids] = y[Ids] - yy
|
|
388
|
+
dx[Ids] = error[Ids] / yyx
|
|
389
|
+
if verbose:
|
|
390
|
+
print(x, yy, yyx, dx, Ids)
|
|
391
|
+
x[Ids] += dx[Ids]
|
|
392
|
+
# An out-of-bounds index
|
|
393
|
+
IooB = np.logical_or( x < xmin, x > xmax)
|
|
394
|
+
count_oob = 0
|
|
395
|
+
while IooB.any():
|
|
396
|
+
dx[IooB] /= 2.
|
|
397
|
+
x[IooB] -= dx[IooB]
|
|
398
|
+
IooB = np.logical_or( x < xmin, x > xmax)
|
|
399
|
+
# Prevent a while-loop-trap
|
|
400
|
+
count_oob += 1
|
|
401
|
+
if count_oob>Nmax:
|
|
402
|
+
raise pm.utility.PMAnalysisError(
|
|
403
|
+
'iter1_() failed to produce a guess that was in-bounds')
|
|
404
|
+
|
|
405
|
+
# Check the iteration convergence
|
|
406
|
+
Ids[Ids] = abs(error[Ids]) > abs(ep*y[Ids])
|
|
407
|
+
# Prevent a while-loop-trap
|
|
408
|
+
count += 1
|
|
409
|
+
if count>Nmax:
|
|
410
|
+
pm.utility.print_warning(\
|
|
411
|
+
'iter1_() failed to converge for %d elements after %d attempts'%(\
|
|
412
|
+
Ids.sum(), Nmax))
|
|
413
|
+
return
|
|
414
|
+
|
|
415
|
+
def _sditer(self, T, d, diff=1):
|
|
416
|
+
s,sT = self._s(T, diff)
|
|
417
|
+
R = 1000 * pm.units.const_Ru
|
|
418
|
+
s -= pm.units.const_Ru * np.log(d * R * T / self._pref_pa)
|
|
419
|
+
if diff:
|
|
420
|
+
sT -= pm.units.const_Ru/T
|
|
421
|
+
else:
|
|
422
|
+
sT = None
|
|
423
|
+
return s,sT
|
|
424
|
+
|
|
425
|
+
|
|
426
|
+
|
|
427
|
+
def _cp(self,T):
|
|
428
|
+
"""Constant pressure specific heat (inner routine)
|
|
429
|
+
_cp(T)
|
|
430
|
+
|
|
431
|
+
Expects temperature in Kelvin and returns cp in kJ/kmol/K"""
|
|
432
|
+
|
|
433
|
+
out = np.full_like(T,pm.config['def_oob'],dtype=float)
|
|
434
|
+
# Loop through the available piece-wise temperature ranges
|
|
435
|
+
# Use the _crange() method to identify the elements appropriate
|
|
436
|
+
# for each.
|
|
437
|
+
for ii in range(len(self.data['Tlim'])-1):
|
|
438
|
+
C = self.data['C'][ii]
|
|
439
|
+
I = self._crange(T, ii)
|
|
440
|
+
t = T[I] / 1000.
|
|
441
|
+
out[I] = C[0] + t*(C[1] + t*(C[2] + t*C[3])) + C[4] / (t*t)
|
|
442
|
+
return out
|
|
443
|
+
|
|
444
|
+
def _h(self, T, diff=False):
|
|
445
|
+
"""Enthalpy (inner routine)
|
|
446
|
+
h = _h(T)
|
|
447
|
+
OR
|
|
448
|
+
h,hT = _h(T, diff=True)
|
|
449
|
+
|
|
450
|
+
Expects T in Kelvin and returns enthalpy in kJ/kmol
|
|
451
|
+
When diff=True, the partial derivative of enthalpy with respect to
|
|
452
|
+
temperature with constant pressure is also returned.
|
|
453
|
+
"""
|
|
454
|
+
out = np.full_like(T,pm.config['def_oob'],dtype=float)
|
|
455
|
+
hT = None
|
|
456
|
+
if diff:
|
|
457
|
+
hT = np.full_like(T,pm.config['def_oob'],dtype=float)
|
|
458
|
+
# Loop through the available piece-wise temperature ranges
|
|
459
|
+
# Use the _crange() method to identify the elements appropriate
|
|
460
|
+
# for each.
|
|
461
|
+
for ii in range(len(self.data['Tlim'])-1):
|
|
462
|
+
C = self.data['C'][ii]
|
|
463
|
+
I = self._crange(T, ii)
|
|
464
|
+
t = T[I] / 1000.
|
|
465
|
+
out[I] = C[5] + t*(C[0] + t*(C[1]/2. + t*(C[2]/3. + t*C[3]/4.))) - C[4]/t
|
|
466
|
+
if diff:
|
|
467
|
+
hT[I] = C[0] + t*(C[1] + t*(C[2] + t*C[3])) + C[4]/(t*t)
|
|
468
|
+
# Rescale for temperature integral
|
|
469
|
+
out *= 1000.
|
|
470
|
+
return out, hT
|
|
471
|
+
|
|
472
|
+
def _e(self, T, diff=False):
|
|
473
|
+
"""Internal Energy (inner routine)
|
|
474
|
+
e = _e(T)
|
|
475
|
+
OR
|
|
476
|
+
e,eT = _e(T, diff=True)
|
|
477
|
+
|
|
478
|
+
Expects T in Kelvin and returns energy in kJ/kmol
|
|
479
|
+
When diff=True, the partial derivative of energy with respect to
|
|
480
|
+
temperature with constant pressure is also returned.
|
|
481
|
+
"""
|
|
482
|
+
h,hT = self._h(T,diff)
|
|
483
|
+
if diff:
|
|
484
|
+
return h-pm.units.const_Ru*T, hT-pm.units.const_Ru
|
|
485
|
+
return h-pm.units.const_Ru*T, None
|
|
486
|
+
|
|
487
|
+
def _s(self, T, diff=False):
|
|
488
|
+
"""Entropy at reference pressure (inner routine)
|
|
489
|
+
|
|
490
|
+
s, sT = _s(T,diff=True)
|
|
491
|
+
|
|
492
|
+
Expects T in Kelvin, and returns entropy in kJ/kmol.
|
|
493
|
+
When diff=True, the partial derivatives of entropy with respect to
|
|
494
|
+
temperature is also returned. Otherwise it is returned as None.
|
|
495
|
+
"""
|
|
496
|
+
out = np.full_like(T,pm.config['def_oob'],dtype=float)
|
|
497
|
+
sT = None
|
|
498
|
+
if diff:
|
|
499
|
+
sT = np.full_like(T,pm.config['def_oob'],dtype=float)
|
|
500
|
+
# Loop through the available piece-wise temperature ranges
|
|
501
|
+
# Use the _crange() method to identify the elements appropriate
|
|
502
|
+
# for each.
|
|
503
|
+
for ii in range(len(self.data['Tlim'])-1):
|
|
504
|
+
C = self.data['C'][ii]
|
|
505
|
+
I = self._crange(T, ii)
|
|
506
|
+
t = T[I] / 1000.
|
|
507
|
+
out[I] = C[6] + C[0]*np.log(t) + t*(C[1] + t*(C[2]/2. + t*C[3]/3.)) - C[4] / (2*t*t)
|
|
508
|
+
if diff:
|
|
509
|
+
sT[I] = C[0]/t + C[1] + t*(C[2] + t*C[3]) + C[4]/(t*t*t)
|
|
510
|
+
# Rescale for temperature derivative
|
|
511
|
+
sT[I] /= 1000
|
|
512
|
+
return out, sT
|
|
513
|
+
|
|
514
|
+
|
|
515
|
+
def _g(self, T, diff=False):
|
|
516
|
+
"""Gibbs energy at reference pressure (inner routine)
|
|
517
|
+
|
|
518
|
+
g, gT = _g(T,diff=True)
|
|
519
|
+
|
|
520
|
+
Expects T in Kelvin, and returns Gibbs energy in kJ/kmol.
|
|
521
|
+
When diff=True, the partial derivatives of Gibbs energy with respect to
|
|
522
|
+
temperature is also returned. Otherwise it is returned as None.
|
|
523
|
+
"""
|
|
524
|
+
out = np.full_like(T,pm.config['def_oob'],dtype=float)
|
|
525
|
+
gT = None
|
|
526
|
+
if diff:
|
|
527
|
+
gT = np.full_like(T,pm.config['def_oob'],dtype=float)
|
|
528
|
+
# Loop through the available piece-wise temperature ranges
|
|
529
|
+
# Use the _crange() method to identify the elements appropriate
|
|
530
|
+
# for each.
|
|
531
|
+
for ii in range(len(self.data['Tlim'])-1):
|
|
532
|
+
C = self.data['C'][ii]
|
|
533
|
+
I = self._crange(T, ii)
|
|
534
|
+
t = T[I] / 1000.
|
|
535
|
+
logt = np.log(t)
|
|
536
|
+
out[I] = C[5] - C[0]*t*logt + t*(C[0]-C[6] + t*(-0.5*C[1] + t*(-1./6.*C[2] + t*(-1./12.*C[3])))) - 0.5*C[4]/t
|
|
537
|
+
if diff:
|
|
538
|
+
gT[I] = -C[0]*(logt+1) + C[0]-C[6] + t*(-C[1] + t*(-0.5*C[2] + t*(-1./3.*C[3]))) + 0.5*C[4]/t/t
|
|
539
|
+
out *= 1000.
|
|
540
|
+
return out, gT
|
|
541
|
+
|
|
542
|
+
def _f(self, T, diff=False):
|
|
543
|
+
"""Free (Helmholtz) energy at reference pressure (inner routine)
|
|
544
|
+
|
|
545
|
+
f, fT = _f(T,diff=True)
|
|
546
|
+
|
|
547
|
+
Expects T in Kelvin, and returns free energy in kJ/kmol.
|
|
548
|
+
When diff=True, the partial derivatives of free energy with respect to
|
|
549
|
+
temperature is also returned. Otherwise it is returned as None.
|
|
550
|
+
"""
|
|
551
|
+
g,gT = self._g(T, diff=diff)
|
|
552
|
+
|
|
553
|
+
if diff:
|
|
554
|
+
return g-pm.units.const_Ru*T, gT-pm.units.const_Ru
|
|
555
|
+
return g-pm.units.const_Ru*T, None
|
|
556
|
+
|
|
557
|
+
def _test(self, report=None):
|
|
558
|
+
"""Test the ig data model against a series of criteria
|
|
559
|
+
|
|
560
|
+
_test() # Prints results to stdout
|
|
561
|
+
OR
|
|
562
|
+
_test(report='/path/to/file') # Writes a report file
|
|
563
|
+
OR
|
|
564
|
+
_test(report=open_file_descriptor) # Appends to an open report file
|
|
565
|
+
|
|
566
|
+
Returns True when all criteria are satisfied and False otherwise. Unlike ig2,
|
|
567
|
+
the ig class uses embedded tabulated data for numerical tests. No external
|
|
568
|
+
validation table is needed.
|
|
569
|
+
|
|
570
|
+
The criteria are:
|
|
571
|
+
1. Data integrity
|
|
572
|
+
1.1 Tlim must be monotonic
|
|
573
|
+
1.2 Tlim dimensions must match coefficient dimensions
|
|
574
|
+
len(Tlim) == len(C)+1
|
|
575
|
+
1.3 There must be 8 coefficients
|
|
576
|
+
len(C[ii]) == 8 for all ii in range(len(C))
|
|
577
|
+
|
|
578
|
+
DATA INTEGRITY FAILURES ARE FATAL
|
|
579
|
+
FAILURES HERE WILL HALT THE TEST
|
|
580
|
+
|
|
581
|
+
2. Model continuity
|
|
582
|
+
2.1 cp should not have discontinuities at the Tlim boundaries
|
|
583
|
+
2.2 h should not have discontinuities
|
|
584
|
+
2.3 s should not have discontinuities
|
|
585
|
+
|
|
586
|
+
3. Tabulated reference data should agree with the model in the currently
|
|
587
|
+
configured unit system.
|
|
588
|
+
3.1 cp should agree with tabulated reference data to within 0.01%
|
|
589
|
+
3.2 s should agree with reference data to within 0.1 J/mol/K
|
|
590
|
+
3.3 h should agree with reference data to wihtin 0.01 kJ/mol/K
|
|
591
|
+
3.4 density at 1000K and 10bar should agree to within .01%.
|
|
592
|
+
3.5 R should agree to within .01%.
|
|
593
|
+
3.6 cv should match cp-R at all tabulated conditions to within .01%.
|
|
594
|
+
3.7 e should match h-RT at all tabulated conditions to within .01%.
|
|
595
|
+
3.8 gam should match cp/cv at all tabulated conditions to .0001
|
|
596
|
+
3.9 T_h() should match T to within 0.01%
|
|
597
|
+
3.10 T_s() should match T to within 0.01%
|
|
598
|
+
|
|
599
|
+
Optional keywords that configure the test:
|
|
600
|
+
keyword (default)
|
|
601
|
+
Description
|
|
602
|
+
|
|
603
|
+
"""
|
|
604
|
+
# Recurse with a fresh file descriptor if the file is a string
|
|
605
|
+
if isinstance(report, str):
|
|
606
|
+
with open(report, 'w') as ff:
|
|
607
|
+
return self._test(report=ff)
|
|
608
|
+
elif report is None:
|
|
609
|
+
report = sys.stdout
|
|
610
|
+
|
|
611
|
+
# Perform the checks
|
|
612
|
+
result = True
|
|
613
|
+
|
|
614
|
+
Tlim = self.data['Tlim']
|
|
615
|
+
C = self.data['C']
|
|
616
|
+
|
|
617
|
+
report.write(repr(self) + '\n1. Data integrity\n')
|
|
618
|
+
|
|
619
|
+
# 1.1: Tlim must be monotonic
|
|
620
|
+
test = True
|
|
621
|
+
for t0,t1 in zip(Tlim[:-1], Tlim[1:]):
|
|
622
|
+
test = test and (t0<t1)
|
|
623
|
+
if test:
|
|
624
|
+
report.write('[passed]')
|
|
625
|
+
else:
|
|
626
|
+
report.write('[FAILED]')
|
|
627
|
+
report.write(' 1.1: Tlim must increase monotonically\n')
|
|
628
|
+
result = result and test
|
|
629
|
+
|
|
630
|
+
# 1.2: Tlim and C dims must match
|
|
631
|
+
test = (len(Tlim) == len(C)+1)
|
|
632
|
+
result = result and test
|
|
633
|
+
if test:
|
|
634
|
+
report.write('[passed]')
|
|
635
|
+
else:
|
|
636
|
+
report.write('[FAILED]')
|
|
637
|
+
report.write(' 1.2: Tlim and C dimensions must be compatible\n')
|
|
638
|
+
|
|
639
|
+
# 1.3: C must have 8 coefficients
|
|
640
|
+
test = True
|
|
641
|
+
for cc in C:
|
|
642
|
+
test = test and (len(cc)==8)
|
|
643
|
+
result = result and test
|
|
644
|
+
if test:
|
|
645
|
+
report.write('[passed]')
|
|
646
|
+
else:
|
|
647
|
+
report.write('[FAILED]')
|
|
648
|
+
report.write(' 1.3: All temperature regions must have 8 coefficients\n')
|
|
649
|
+
|
|
650
|
+
if not result:
|
|
651
|
+
report.write('[FATAL] Data integrity test failed. Aborting further checks.\n')
|
|
652
|
+
return False
|
|
653
|
+
|
|
654
|
+
# 2. tests for discontinuities
|
|
655
|
+
report.write('2. Model continuity\n')
|
|
656
|
+
cptest = []
|
|
657
|
+
htest = []
|
|
658
|
+
stest = []
|
|
659
|
+
for T in Tlim[1:-1]:
|
|
660
|
+
T = pm.units.temperature_scale(T, from_units='K')
|
|
661
|
+
# Perturb the temperature by +/- 0.01%
|
|
662
|
+
TT = T * np.array([0.9999, 1.0001])
|
|
663
|
+
# Check specific heat continuity to within 0.01%
|
|
664
|
+
cp = self.cp(TT)
|
|
665
|
+
if np.abs(cp[0] - cp[1]) / cp[0] > .0001:
|
|
666
|
+
cptest.append(T)
|
|
667
|
+
# Check enthalpy continuity to within 0.01%
|
|
668
|
+
h = self.h(TT)
|
|
669
|
+
# Adjust for the known change in temperature
|
|
670
|
+
h[1] -= cp[1] * T * .0001
|
|
671
|
+
h[0] += cp[0] * T * .0001
|
|
672
|
+
if np.abs(h[0] - h[1]) / h[0] > .0001:
|
|
673
|
+
htest.append(T)
|
|
674
|
+
s = self.s(TT)
|
|
675
|
+
# Adjust for the known change in temperature
|
|
676
|
+
s[1] -= cp[1] * .0001
|
|
677
|
+
s[0] += cp[0] * .0001
|
|
678
|
+
if np.abs(s[0] - s[1]) / s[0] > .0001:
|
|
679
|
+
stest.append(T)
|
|
680
|
+
|
|
681
|
+
if cptest:
|
|
682
|
+
report.write('[FAILED]')
|
|
683
|
+
result = False
|
|
684
|
+
else:
|
|
685
|
+
report.write('[passed]')
|
|
686
|
+
report.write(' 2.1 cp() must be continuous at piecewise boundaries.\n')
|
|
687
|
+
if cptest:
|
|
688
|
+
report.write(' Failure at T=')
|
|
689
|
+
for T in cptest:
|
|
690
|
+
report.write('%.2f,'%T)
|
|
691
|
+
report.write('\n')
|
|
692
|
+
|
|
693
|
+
if htest:
|
|
694
|
+
report.write('[FAILED]')
|
|
695
|
+
result = False
|
|
696
|
+
else:
|
|
697
|
+
report.write('[passed]')
|
|
698
|
+
report.write(' 2.2 h() must be continuous at piecewise boundaries.\n')
|
|
699
|
+
if htest:
|
|
700
|
+
report.write(' Failure at T=')
|
|
701
|
+
for T in htest:
|
|
702
|
+
report.write('%.2f,'%T)
|
|
703
|
+
report.write('\n')
|
|
704
|
+
|
|
705
|
+
if stest:
|
|
706
|
+
report.write('[FAILED]')
|
|
707
|
+
result = False
|
|
708
|
+
else:
|
|
709
|
+
report.write('[passed]')
|
|
710
|
+
report.write(' 2.3 s() must be continuous at piecewise boundaries.\n')
|
|
711
|
+
if stest:
|
|
712
|
+
report.write(' Failure at T=')
|
|
713
|
+
for T in stest:
|
|
714
|
+
report.write('%.2f,'%T)
|
|
715
|
+
report.write('\n')
|
|
716
|
+
|
|
717
|
+
# 3. Test for model consistency with tabulated values
|
|
718
|
+
# Start by converting the table into the currently configured units
|
|
719
|
+
report.write('3. Numerical consistency checks\n')
|
|
720
|
+
TAB = np.array(self.data['TAB'])
|
|
721
|
+
T = pm.units.temperature_scale(TAB[:,0], from_units='K')
|
|
722
|
+
pref = pm.units.pressure(self._pref_pa, from_units='pa')
|
|
723
|
+
cp_test = self.cp(T)
|
|
724
|
+
cv_test = self.cv(T)
|
|
725
|
+
h_test = self.h(T)
|
|
726
|
+
e_test = self.e(T)
|
|
727
|
+
gam_test = self.gam(T)
|
|
728
|
+
s_test = self.s(T=T, p=pref)
|
|
729
|
+
|
|
730
|
+
|
|
731
|
+
cp = pm.units.energy(TAB[:,1], from_units='J')
|
|
732
|
+
pm.units.matter(cp, self.data['mw'], from_units='mol', inplace=True, exponent=-1)
|
|
733
|
+
pm.units.temperature(cp, from_units='K', inplace=True, exponent=-1)
|
|
734
|
+
|
|
735
|
+
s = pm.units.energy(TAB[:,2], from_units='J')
|
|
736
|
+
pm.units.matter(s, self.data['mw'], from_units='mol', inplace=True, exponent=-1)
|
|
737
|
+
pm.units.temperature(s, from_units='K', inplace=True, exponent=-1)
|
|
738
|
+
# Convert the entropy error threshold too
|
|
739
|
+
serr = pm.units.energy(0.1, from_units='J')
|
|
740
|
+
serr = pm.units.matter(serr, self.data['mw'], from_units='mol', exponent=-1)
|
|
741
|
+
serr = pm.units.temperature(serr, from_units='K', exponent=-1)
|
|
742
|
+
|
|
743
|
+
h0 = self.h(pm.units.temperature_scale(298.15, from_units='K'))
|
|
744
|
+
h = pm.units.energy(TAB[:,4], from_units='kJ')
|
|
745
|
+
pm.units.matter(h, self.data['mw'], from_units='mol', inplace=True, exponent=-1)
|
|
746
|
+
|
|
747
|
+
# Convert the enthalpy error threshold too
|
|
748
|
+
# herr is also used below on energy checks
|
|
749
|
+
herr = pm.units.energy(0.01, from_units='kJ')
|
|
750
|
+
herr = pm.units.matter(herr, self.data['mw'], from_units='mol', exponent=-1)
|
|
751
|
+
|
|
752
|
+
I = (np.abs(cp_test - cp)/cp > .001)
|
|
753
|
+
if np.any(I):
|
|
754
|
+
result = False
|
|
755
|
+
report.write('[FAILED]')
|
|
756
|
+
else:
|
|
757
|
+
report.write('[passed]')
|
|
758
|
+
report.write(' 3.1 cp must agree with tabulated data to within 0.1%\n')
|
|
759
|
+
if np.all(I):
|
|
760
|
+
report.write(' Failed at all temperatures.\n')
|
|
761
|
+
elif np.any(I):
|
|
762
|
+
report.write(' Failed at T=')
|
|
763
|
+
for tt in T[I]:
|
|
764
|
+
report.write('%.2f,'%tt)
|
|
765
|
+
report.write('\n')
|
|
766
|
+
|
|
767
|
+
I = np.abs(s_test - s) > serr
|
|
768
|
+
if np.any(I):
|
|
769
|
+
report.write('[FAILED]')
|
|
770
|
+
result = False
|
|
771
|
+
else:
|
|
772
|
+
report.write('[passed]')
|
|
773
|
+
report.write(' 3.2 s must agree with tabulated data to within 0.1 J/mol/K\n')
|
|
774
|
+
if np.all(I):
|
|
775
|
+
report.write(' Failed at all temperatures.\n')
|
|
776
|
+
elif np.any(I):
|
|
777
|
+
report.write(' Failed at T=')
|
|
778
|
+
for tt in T[I]:
|
|
779
|
+
report.write('%.2f,'%tt)
|
|
780
|
+
report.write('\n')
|
|
781
|
+
|
|
782
|
+
# 3.3 h must agree with tabulated data
|
|
783
|
+
I = np.abs(h_test - h0 - h) > np.maximum(herr, np.abs(h) * .001)
|
|
784
|
+
if np.any(I):
|
|
785
|
+
report.write('[FAILED]')
|
|
786
|
+
result = False
|
|
787
|
+
else:
|
|
788
|
+
report.write('[passed]')
|
|
789
|
+
report.write(' 3.3 h must agree with tabulated data to within 0.01 kJ/mol or 0.1%\n')
|
|
790
|
+
if np.all(I):
|
|
791
|
+
report.write(' Failed at all temperatures.\n')
|
|
792
|
+
elif np.any(I):
|
|
793
|
+
report.write(' Failed at T=')
|
|
794
|
+
for tt in T[I]:
|
|
795
|
+
report.write('%.2f,'%tt)
|
|
796
|
+
report.write('\n')
|
|
797
|
+
|
|
798
|
+
# 3.4 density at 1000K and 10bar should agree to within .01%.
|
|
799
|
+
TT = 1000.
|
|
800
|
+
pp = 10.
|
|
801
|
+
dd = pp*1e5 / (pm.units.const_Ru * 1000.)
|
|
802
|
+
dd = pm.units.matter(dd, self.data['mw'], from_units='mol')
|
|
803
|
+
dd = pm.units.volume(dd, from_units='m3', exponent=-1)
|
|
804
|
+
TT = pm.units.temperature_scale(TT, from_units = 'K')
|
|
805
|
+
pp = pm.units.pressure(pp, from_units='bar')
|
|
806
|
+
|
|
807
|
+
if np.abs(self.d(T=TT, p=pp) - dd)/dd > .0001:
|
|
808
|
+
report.write('[FAILED]')
|
|
809
|
+
result = False
|
|
810
|
+
else:
|
|
811
|
+
report.write('[passed]')
|
|
812
|
+
report.write(' 3.4 Density at 1000K and 10bar must match IG law to within .01%\n')
|
|
813
|
+
|
|
814
|
+
# 3.5 R should agree to within .01%.
|
|
815
|
+
R = pm.units.energy(pm.units.const_Ru, from_units='J')
|
|
816
|
+
R = pm.units.matter(R, self.data['mw'], from_units='mol', exponent=-1)
|
|
817
|
+
R = pm.units.temperature(R, from_units='K', exponent=-1)
|
|
818
|
+
if np.abs(self.R() - R)/R > .0001:
|
|
819
|
+
report.write('[FAILED]')
|
|
820
|
+
result = False
|
|
821
|
+
else:
|
|
822
|
+
report.write('[passed]')
|
|
823
|
+
report.write(' 3.5 Ideal gas constant must match to within 0.01%\n')
|
|
824
|
+
|
|
825
|
+
# 3.6 cv should match cp-R at all tabulated conditions to within .01%.
|
|
826
|
+
I = np.abs(cv_test + self.R() - cp_test)/cv_test > .0001
|
|
827
|
+
if np.any(I):
|
|
828
|
+
report.write('[FAILED]')
|
|
829
|
+
result = False
|
|
830
|
+
else:
|
|
831
|
+
report.write('[passed]')
|
|
832
|
+
report.write(' 3.6: cv == cp - R to within .01% at all tabulated values\n')
|
|
833
|
+
if np.all(I):
|
|
834
|
+
report.write(' Failed at all temperatures.\n')
|
|
835
|
+
elif np.any(I):
|
|
836
|
+
report.write(' Failed at T=')
|
|
837
|
+
for tt in T[I]:
|
|
838
|
+
report.write('%.2f,'%tt)
|
|
839
|
+
report.write('\n')
|
|
840
|
+
|
|
841
|
+
# 3.7 e should match h-RT at all tabulated conditions to within .01 kJ/mol.
|
|
842
|
+
# Borrow the same herr as from the enthalpy checks
|
|
843
|
+
I = np.abs(e_test + self.R()*T - h_test)/e_test > herr
|
|
844
|
+
if np.any(I):
|
|
845
|
+
report.write('[FAILED]')
|
|
846
|
+
result = False
|
|
847
|
+
else:
|
|
848
|
+
report.write('[passed]')
|
|
849
|
+
report.write(' 3.7: e == h - R*T to within .01 kJ/mol at all tabulated values\n')
|
|
850
|
+
if np.all(I):
|
|
851
|
+
report.write(' Failed at all temperatures.\n')
|
|
852
|
+
elif np.any(I):
|
|
853
|
+
report.write(' Failed at T=')
|
|
854
|
+
for tt in T[I]:
|
|
855
|
+
report.write('%.2f,'%tt)
|
|
856
|
+
report.write('\n')
|
|
857
|
+
|
|
858
|
+
# 3.8 gam should match cp/cv at all tabulated conditions to .0001
|
|
859
|
+
I = np.abs(gam_test - cp_test/cv_test) > .0001
|
|
860
|
+
if np.any(I):
|
|
861
|
+
report.write('[FAILED]')
|
|
862
|
+
result = False
|
|
863
|
+
else:
|
|
864
|
+
report.write('[passed]')
|
|
865
|
+
report.write(' 3.8: gam = cp/cv to within .001 at all tabulated values\n')
|
|
866
|
+
if np.all(I):
|
|
867
|
+
report.write(' Failed at all temperatures.\n')
|
|
868
|
+
elif np.any(I):
|
|
869
|
+
report.write(' Failed at T=')
|
|
870
|
+
for tt in T[I]:
|
|
871
|
+
report.write('%.2f,'%tt)
|
|
872
|
+
report.write('\n')
|
|
873
|
+
|
|
874
|
+
# Trim the temperature, entropy and enthalpy arrays of the limiting boundaries
|
|
875
|
+
T = T[1:-1]
|
|
876
|
+
h = h_test[1:-1]
|
|
877
|
+
s = s_test[1:-1]
|
|
878
|
+
|
|
879
|
+
# 3.9 T_h should match T at all tabulated conditions to within .01%
|
|
880
|
+
I = np.abs(T - self.T_h(h))/T > .0001
|
|
881
|
+
if np.any(I):
|
|
882
|
+
report.write('[FAILED]')
|
|
883
|
+
result = False
|
|
884
|
+
else:
|
|
885
|
+
report.write('[passed]')
|
|
886
|
+
report.write(' 3.9: T == T_h(h) to within .01% at all tabulated values.\n')
|
|
887
|
+
if np.all(I):
|
|
888
|
+
report.write(' Failed at all temperatures.\n')
|
|
889
|
+
elif np.any(I):
|
|
890
|
+
report.write(' Failed at T=')
|
|
891
|
+
for tt in T[I]:
|
|
892
|
+
report.write('%.2f,'%tt)
|
|
893
|
+
report.write('\n')
|
|
894
|
+
|
|
895
|
+
# 3.10 T_s should match T at all tabulated conditions to within .01%
|
|
896
|
+
I = np.abs(T - self.T_s(s,p=pref))/T > .0001
|
|
897
|
+
if np.any(I):
|
|
898
|
+
report.write('[FAILED]')
|
|
899
|
+
result = False
|
|
900
|
+
else:
|
|
901
|
+
report.write('[passed]')
|
|
902
|
+
report.write(' 3.10: T == T_s(s) to within .01% at all tabulated values.\n')
|
|
903
|
+
if np.all(I):
|
|
904
|
+
report.write(' Failed at all temperatures.\n')
|
|
905
|
+
elif np.any(I):
|
|
906
|
+
report.write(' Failed at T=')
|
|
907
|
+
for tt in T[I]:
|
|
908
|
+
report.write('%.2f,'%tt)
|
|
909
|
+
report.write('\n')
|
|
910
|
+
|
|
911
|
+
|
|
912
|
+
return result
|
|
913
|
+
|
|
914
|
+
|
|
915
|
+
def __test(self, report_file=None, report_level=2, basic=False):
|
|
916
|
+
"""Test the data and algorithm against tabulated data
|
|
917
|
+
_test(report_file=None, report_level=2, basic=False)
|
|
918
|
+
|
|
919
|
+
returns True on success and False on failure.
|
|
920
|
+
|
|
921
|
+
report_file The file name or file stream to which a test report
|
|
922
|
+
should be streamed. (string or an open file object)
|
|
923
|
+
When report_file is unspecified, it defaults to stdout.
|
|
924
|
+
report_level Accepts an integer indicating the level of detail to
|
|
925
|
+
print to the report file.
|
|
926
|
+
0 - Nothing, just return the boolean
|
|
927
|
+
1 - Minimal, summarize the failures
|
|
928
|
+
2 - Vital, detail the failures
|
|
929
|
+
3 - All; report everything
|
|
930
|
+
|
|
931
|
+
basic When True, only criterion 0 is assessed.
|
|
932
|
+
|
|
933
|
+
The following test criteria are used:
|
|
934
|
+
0) The data should be correctly organized
|
|
935
|
+
0a) Tlim must be monotonic
|
|
936
|
+
0b) Tlim should have one more element than C has rows.
|
|
937
|
+
0c) C should have 8 columns
|
|
938
|
+
0d) Specific heat should have no discontinuities
|
|
939
|
+
|
|
940
|
+
1) Tabulated specific heats should agree with cp()
|
|
941
|
+
1a) Using molar units
|
|
942
|
+
1b) Using mass units
|
|
943
|
+
1c) Using a non-absolute temperature scale
|
|
944
|
+
1d) Using an energy unit other than J
|
|
945
|
+
|
|
946
|
+
2) Tabulated values should agree with h()
|
|
947
|
+
2a) Using molar units
|
|
948
|
+
2b) Using mass units
|
|
949
|
+
2c) Using a non-absolute temperature scale
|
|
950
|
+
2d) Using an energy unit other than J
|
|
951
|
+
|
|
952
|
+
3) Tabulated values should agree with s()
|
|
953
|
+
3a) Using molar units
|
|
954
|
+
3b) Using mass units
|
|
955
|
+
3c) Using a non-absolute temperature scale
|
|
956
|
+
3d) Using an energy unit other than J
|
|
957
|
+
|
|
958
|
+
4) R() should agree with explicit calculations for R
|
|
959
|
+
4a) Using molar units
|
|
960
|
+
4b) Using mass units
|
|
961
|
+
|
|
962
|
+
5) The density should agree with explicit ideal gas density
|
|
963
|
+
5a) Using mass units
|
|
964
|
+
5b) Using a non-absolute temperature scale
|
|
965
|
+
|
|
966
|
+
6) Constant-volume specific heat should equal constant pressure minus R
|
|
967
|
+
|
|
968
|
+
7) Internal energy should equal enthalpy minus RT
|
|
969
|
+
|
|
970
|
+
8) Specific heat ratio should equal an explicit evaluation of cp and cv
|
|
971
|
+
|
|
972
|
+
"""
|
|
973
|
+
# Initialize a results dicitonary
|
|
974
|
+
result = True
|
|
975
|
+
# Assign some constants
|
|
976
|
+
REP_ALL = 3
|
|
977
|
+
REP_VITAL = 2
|
|
978
|
+
REP_MINIMAL = 1
|
|
979
|
+
REP_NONE = 0
|
|
980
|
+
# Deal with the file
|
|
981
|
+
if report_file is None:
|
|
982
|
+
ff = os.sys.stdout
|
|
983
|
+
elif isinstance(report_file,str):
|
|
984
|
+
ff = open(report_file)
|
|
985
|
+
elif hasattr(report_file,'write'):
|
|
986
|
+
ff = report_file
|
|
987
|
+
else:
|
|
988
|
+
raise pm.utility.PMParamError('Unrecognized file type')
|
|
989
|
+
|
|
990
|
+
# Start with some basic stuff
|
|
991
|
+
|
|
992
|
+
|
|
993
|
+
# Set up a numpy array with the tabulated values
|
|
994
|
+
# Remove the first and last rows to prevent floating point
|
|
995
|
+
# precision violations at the temperature limits
|
|
996
|
+
TAB = np.array(self.data['TAB'])[1:-1,:]
|
|
997
|
+
Tref = TAB[:,0] # K
|
|
998
|
+
cpref = TAB[:,1] # J/mol/K
|
|
999
|
+
sref = TAB[:,2] # J/mol/K
|
|
1000
|
+
TAB[:,4] *= 1000. # Convert h to J/mol in place
|
|
1001
|
+
href = TAB[:,4] # J/mol
|
|
1002
|
+
|
|
1003
|
+
##
|
|
1004
|
+
pref = self._pref_pa / 1e5
|
|
1005
|
+
|
|
1006
|
+
# Create a generic property test function
|
|
1007
|
+
# crit criterion string for the report (1a, 2b, etc...)
|
|
1008
|
+
# prop property method to call (cp, h, s)
|
|
1009
|
+
# args the argv tuple to pass to the property function
|
|
1010
|
+
# ref reference array
|
|
1011
|
+
# units = [e, m, p, t] units for energy, matter, pressure, and temperature
|
|
1012
|
+
# epsilon The acceptable fractional error
|
|
1013
|
+
# small An acceptable total error (for values that can be close to 0)
|
|
1014
|
+
def _prop_test(crit, prop, args, ref, units, epsilon=.001, small=0.):
|
|
1015
|
+
pm.config['unit_energy'] = units[0]
|
|
1016
|
+
pm.config['unit_matter'] = units[1]
|
|
1017
|
+
pm.config['unit_pressure'] = units[2]
|
|
1018
|
+
pm.config['unit_temperature'] = units[3]
|
|
1019
|
+
|
|
1020
|
+
if report_level >= REP_VITAL:
|
|
1021
|
+
ff.write(crit + '...')
|
|
1022
|
+
|
|
1023
|
+
try:
|
|
1024
|
+
error = abs(prop(*args) - ref)
|
|
1025
|
+
except:
|
|
1026
|
+
if report_level>=REP_VITAL:
|
|
1027
|
+
ff.write('[ERROR]\n')
|
|
1028
|
+
if report_level>=REP_ALL:
|
|
1029
|
+
ff.write(' ' + repr(os.sys.exc_info()[1].args))
|
|
1030
|
+
return False
|
|
1031
|
+
|
|
1032
|
+
fail = (error > abs(epsilon*ref)) * (error > small)
|
|
1033
|
+
# Write to the report
|
|
1034
|
+
if fail.any():
|
|
1035
|
+
if report_level>=REP_VITAL:
|
|
1036
|
+
ff.write('%10f...[FAIL]\n'%error.max())
|
|
1037
|
+
if report_level>=REP_ALL:
|
|
1038
|
+
if fail.all():
|
|
1039
|
+
ff.write(' Failed at all temperatures.\n')
|
|
1040
|
+
else:
|
|
1041
|
+
ff.write(' Failed at T(K)=')
|
|
1042
|
+
for tt in Tref[fail]:
|
|
1043
|
+
ff.write('%d,'%(int(tt)))
|
|
1044
|
+
ff.write('\n')
|
|
1045
|
+
elif report_level>=REP_VITAL:
|
|
1046
|
+
ff.write('%10f...[pass]\n'%error.max())
|
|
1047
|
+
|
|
1048
|
+
if fail.any():
|
|
1049
|
+
return False
|
|
1050
|
+
else:
|
|
1051
|
+
return True
|
|
1052
|
+
|
|
1053
|
+
if report_level >= REP_MINIMAL:
|
|
1054
|
+
ff.write('Testing IG species %s\n'%self.data['id'])
|
|
1055
|
+
|
|
1056
|
+
#==========================================================#
|
|
1057
|
+
# Criterion 0 - Data integrity checks #
|
|
1058
|
+
#==========================================================#
|
|
1059
|
+
subresult = True
|
|
1060
|
+
##
|
|
1061
|
+
## Criterion 0a - Tlim is monotonic
|
|
1062
|
+
##
|
|
1063
|
+
if report_level >= REP_VITAL:
|
|
1064
|
+
ff.write(' 0a...')
|
|
1065
|
+
if (np.diff(self.data['Tlim']) < 0.).any():
|
|
1066
|
+
subresult = False
|
|
1067
|
+
if report_level >= REP_VITAL:
|
|
1068
|
+
ff.write('[FAIL]\n')
|
|
1069
|
+
elif report_level >= REP_VITAL:
|
|
1070
|
+
ff.write('[pass]\n')
|
|
1071
|
+
|
|
1072
|
+
##
|
|
1073
|
+
## Criterion 0b - Tlim and C are compatible lengths
|
|
1074
|
+
##
|
|
1075
|
+
NLim = len(self.data['Tlim'])
|
|
1076
|
+
if report_level >= REP_VITAL:
|
|
1077
|
+
ff.write(' 0b...')
|
|
1078
|
+
|
|
1079
|
+
fail = len(self.data['C']) != NLim - 1
|
|
1080
|
+
if fail:
|
|
1081
|
+
subresult = False
|
|
1082
|
+
if report_level >= REP_VITAL:
|
|
1083
|
+
ff.write('[FAIL]\n')
|
|
1084
|
+
elif report_level >= REP_VITAL:
|
|
1085
|
+
ff.write('[pass]\n')
|
|
1086
|
+
|
|
1087
|
+
##
|
|
1088
|
+
## Criterion 0c - 8-element coefficients
|
|
1089
|
+
##
|
|
1090
|
+
if report_level >= REP_VITAL:
|
|
1091
|
+
ff.write(' 0c...')
|
|
1092
|
+
|
|
1093
|
+
local = True
|
|
1094
|
+
for C in self.data['C']:
|
|
1095
|
+
if len(C) != 8:
|
|
1096
|
+
local = False
|
|
1097
|
+
|
|
1098
|
+
if not local:
|
|
1099
|
+
if report_level >= REP_VITAL:
|
|
1100
|
+
ff.write('[FAIL]\n')
|
|
1101
|
+
elif report_level >= REP_VITAL:
|
|
1102
|
+
ff.write('[pass]\n')
|
|
1103
|
+
|
|
1104
|
+
subresult &= local
|
|
1105
|
+
|
|
1106
|
+
|
|
1107
|
+
##
|
|
1108
|
+
## Criterion 0d - No discontinuities in cp()
|
|
1109
|
+
##
|
|
1110
|
+
if len(self.data['Tlim']) > 2:
|
|
1111
|
+
if report_level >= REP_VITAL:
|
|
1112
|
+
ff.write(' 0d...')
|
|
1113
|
+
|
|
1114
|
+
pm.config['unit_temperature']='K'
|
|
1115
|
+
pm.config['unit_energy']='J'
|
|
1116
|
+
pm.config['unit_matter']='mol'
|
|
1117
|
+
T = np.array(self.data['Tlim'][1:-1])
|
|
1118
|
+
clow = self.cp(T-.01)
|
|
1119
|
+
chigh = self.cp(T+.01)
|
|
1120
|
+
fail = (abs(chigh-clow) > .001*chigh)
|
|
1121
|
+
if fail.any():
|
|
1122
|
+
subresult = False
|
|
1123
|
+
if report_level >= REP_VITAL:
|
|
1124
|
+
ff.write('[FAIL]\n')
|
|
1125
|
+
if report_level >= REP_ALL:
|
|
1126
|
+
ff.write(' Discontinuity at T(K)=')
|
|
1127
|
+
for tt in T[fail]:
|
|
1128
|
+
ff.write('%d,'%tt)
|
|
1129
|
+
ff.write('\n')
|
|
1130
|
+
elif report_level >= REP_VITAL:
|
|
1131
|
+
ff.write('[pass]\n')
|
|
1132
|
+
|
|
1133
|
+
|
|
1134
|
+
if not subresult:
|
|
1135
|
+
if report_level >= REP_MINIMAL:
|
|
1136
|
+
ff.write('Criterion 0: Fundamental format [FAIL]\n')
|
|
1137
|
+
elif report_level >= REP_MINIMAL:
|
|
1138
|
+
ff.write('Criterion 0: Fundamental format [pass]\n')
|
|
1139
|
+
|
|
1140
|
+
if basic:
|
|
1141
|
+
return subresult
|
|
1142
|
+
|
|
1143
|
+
result &= subresult
|
|
1144
|
+
#==========================================================#
|
|
1145
|
+
# Criterion 1 - cp should agree with tabulated data #
|
|
1146
|
+
#==========================================================#
|
|
1147
|
+
subresult = True
|
|
1148
|
+
##
|
|
1149
|
+
## Criterion 1a - molar units
|
|
1150
|
+
##
|
|
1151
|
+
units = ['J','mol','bar','K']
|
|
1152
|
+
tag = ' 1a %3s %3s %3s %3s'%tuple(units)
|
|
1153
|
+
subresult &= _prop_test(tag,self.cp,(Tref,),cpref,units)
|
|
1154
|
+
##
|
|
1155
|
+
## Criterion 1b - mass units
|
|
1156
|
+
##
|
|
1157
|
+
units = ['J','kg','bar','K']
|
|
1158
|
+
tag = ' 1b %3s %3s %3s %3s'%tuple(units)
|
|
1159
|
+
subresult &= _prop_test(tag, self.cp, (Tref,),
|
|
1160
|
+
cpref*1000./self.data['mw'],units)
|
|
1161
|
+
##
|
|
1162
|
+
## Criterion 1c - A non-absolute temperature scale
|
|
1163
|
+
##
|
|
1164
|
+
units = ['J','mol','bar','F']
|
|
1165
|
+
tag = ' 1c %3s %3s %3s %3s'%tuple(units)
|
|
1166
|
+
subresult &= _prop_test(tag,self.cp,(Tref*1.8-459.67,),
|
|
1167
|
+
cpref/1.8,units)
|
|
1168
|
+
##
|
|
1169
|
+
## Criterion 1d - Energy units other than J
|
|
1170
|
+
##
|
|
1171
|
+
units = ['BTU','mol','bar','K']
|
|
1172
|
+
tag = ' 1d %3s %3s %3s %3s'%tuple(units)
|
|
1173
|
+
subresult &= _prop_test(tag,self.cp,(Tref,),
|
|
1174
|
+
cpref/1054.35,units)
|
|
1175
|
+
|
|
1176
|
+
result &= subresult
|
|
1177
|
+
|
|
1178
|
+
if report_level >= REP_MINIMAL:
|
|
1179
|
+
ff.write('Criterion 1: specific heat ')
|
|
1180
|
+
if subresult:
|
|
1181
|
+
ff.write('[pass]\n')
|
|
1182
|
+
else:
|
|
1183
|
+
ff.write('[FAIL]\n')
|
|
1184
|
+
#==========================================================#
|
|
1185
|
+
# Criterion 2 - h should agree with tabulated data #
|
|
1186
|
+
#==========================================================#
|
|
1187
|
+
subresult = True
|
|
1188
|
+
##
|
|
1189
|
+
## Criterion 2a - molar units
|
|
1190
|
+
##
|
|
1191
|
+
small = 5.
|
|
1192
|
+
units = ['J','mol','bar','K']
|
|
1193
|
+
tag = ' 2a %3s %3s %3s %3s'%tuple(units)
|
|
1194
|
+
subresult &= _prop_test(tag,self.h,
|
|
1195
|
+
(Tref,None,False), href, units, small=small)
|
|
1196
|
+
##
|
|
1197
|
+
## Criterion 2b - mass units
|
|
1198
|
+
##
|
|
1199
|
+
scale = 1000. / self.data['mw']
|
|
1200
|
+
small = 5. * scale
|
|
1201
|
+
units = ['J','kg','bar','K']
|
|
1202
|
+
tag = ' 2b %3s %3s %3s %3s'%tuple(units)
|
|
1203
|
+
subresult &= _prop_test(tag,self.h, (Tref,None,False),
|
|
1204
|
+
href*scale, units, small=small)
|
|
1205
|
+
##
|
|
1206
|
+
## Criterion 2c - A non-absolute temperature scale
|
|
1207
|
+
##
|
|
1208
|
+
small = 5.
|
|
1209
|
+
units = ['J','mol','bar','F']
|
|
1210
|
+
tag = ' 2c %3s %3s %3s %3s'%tuple(units)
|
|
1211
|
+
subresult &= _prop_test(tag,self.h,(Tref*1.8-459.67,None,False),
|
|
1212
|
+
href , units, small=small)
|
|
1213
|
+
##
|
|
1214
|
+
## Criterion 2d - Energy units other than J
|
|
1215
|
+
##
|
|
1216
|
+
scale = 1./1054.35026
|
|
1217
|
+
small = 5. * scale
|
|
1218
|
+
units = ['BTU','mol','bar','K']
|
|
1219
|
+
tag = ' 2d %3s %3s %3s %3s'%tuple(units)
|
|
1220
|
+
subresult &= _prop_test(tag,self.h, (Tref,None,False),
|
|
1221
|
+
href*scale, units, small=small)
|
|
1222
|
+
|
|
1223
|
+
result &= subresult
|
|
1224
|
+
|
|
1225
|
+
if report_level >= REP_MINIMAL:
|
|
1226
|
+
ff.write('Criterion 2: ethalpy ')
|
|
1227
|
+
if subresult:
|
|
1228
|
+
ff.write('[pass]\n')
|
|
1229
|
+
else:
|
|
1230
|
+
ff.write('[FAIL]\n')
|
|
1231
|
+
|
|
1232
|
+
#==========================================================#
|
|
1233
|
+
# Criterion 3 - s should agree with tabulated data #
|
|
1234
|
+
#==========================================================#
|
|
1235
|
+
subresult = True
|
|
1236
|
+
p0 = self._pref_pa / 1e5
|
|
1237
|
+
##
|
|
1238
|
+
## Criterion 3a - molar units
|
|
1239
|
+
##
|
|
1240
|
+
units = ['J','mol','bar','K']
|
|
1241
|
+
tag = ' 3a %3s %3s %3s %3s'%tuple(units)
|
|
1242
|
+
subresult &= _prop_test(tag,self.s,
|
|
1243
|
+
(Tref,p0), sref, units)
|
|
1244
|
+
##
|
|
1245
|
+
## Criterion 3b - mass units
|
|
1246
|
+
##
|
|
1247
|
+
scale = 1000. / self.data['mw']
|
|
1248
|
+
units = ['J','kg','bar','K']
|
|
1249
|
+
tag = ' 3b %3s %3s %3s %3s'%tuple(units)
|
|
1250
|
+
subresult &= _prop_test(tag,self.s, (Tref,p0),
|
|
1251
|
+
sref*scale, units)
|
|
1252
|
+
##
|
|
1253
|
+
## Criterion 3c - A non-absolute temperature scale
|
|
1254
|
+
##
|
|
1255
|
+
units = ['J','mol','bar','F']
|
|
1256
|
+
tag = ' 2c %3s %3s %3s %3s'%tuple(units)
|
|
1257
|
+
subresult &= _prop_test(tag,self.s,(Tref*1.8-459.67,p0),
|
|
1258
|
+
sref/1.8 , units)
|
|
1259
|
+
##
|
|
1260
|
+
## Criterion 3d - Energy units other than J
|
|
1261
|
+
##
|
|
1262
|
+
scale = 1./1054.35026
|
|
1263
|
+
units = ['BTU','mol','bar','K']
|
|
1264
|
+
tag = ' 3d %3s %3s %3s %3s'%tuple(units)
|
|
1265
|
+
subresult &= _prop_test(tag,self.s, (Tref,p0),
|
|
1266
|
+
sref*scale, units, small=small)
|
|
1267
|
+
|
|
1268
|
+
result &= subresult
|
|
1269
|
+
|
|
1270
|
+
if report_level >= REP_MINIMAL:
|
|
1271
|
+
ff.write('Criterion 3: entropy ')
|
|
1272
|
+
if subresult:
|
|
1273
|
+
ff.write('[pass]\n')
|
|
1274
|
+
else:
|
|
1275
|
+
ff.write('[FAIL]\n')
|
|
1276
|
+
|
|
1277
|
+
#==========================================================#
|
|
1278
|
+
# Criterion 4 - R should agree with explicit calculation #
|
|
1279
|
+
#==========================================================#
|
|
1280
|
+
subresult = True
|
|
1281
|
+
##
|
|
1282
|
+
## Criterion 4a - Using molar units
|
|
1283
|
+
##
|
|
1284
|
+
pm.config['unit_energy'] = 'J'
|
|
1285
|
+
pm.config['unit_matter'] = 'mol'
|
|
1286
|
+
pm.config['unit_temperature'] = 'K'
|
|
1287
|
+
error = abs(self.R() - pm.units.const_Ru)
|
|
1288
|
+
fail = (error > .0001 * pm.units.const_Ru)
|
|
1289
|
+
subresult &= not fail
|
|
1290
|
+
if report_level >= REP_VITAL:
|
|
1291
|
+
ff.write(' 4a J mol bar K...%10f...'%error)
|
|
1292
|
+
if fail:
|
|
1293
|
+
ff.write('[FAIL]\n')
|
|
1294
|
+
else:
|
|
1295
|
+
ff.write('[pass]\n')
|
|
1296
|
+
##
|
|
1297
|
+
## Criterion 4b - Using mass units
|
|
1298
|
+
##
|
|
1299
|
+
pm.config['unit_energy'] = 'J'
|
|
1300
|
+
pm.config['unit_matter'] = 'kg'
|
|
1301
|
+
pm.config['unit_temperature'] = 'K'
|
|
1302
|
+
R = pm.units.const_Ru * 1000. / self.data['mw']
|
|
1303
|
+
error = abs(self.R() - R)
|
|
1304
|
+
fail = (error > .0001 * R)
|
|
1305
|
+
subresult &= not fail
|
|
1306
|
+
|
|
1307
|
+
if report_level >= REP_VITAL:
|
|
1308
|
+
ff.write(' 4b J kg bar K...%10f...'%error)
|
|
1309
|
+
if fail:
|
|
1310
|
+
ff.write('[FAIL]\n')
|
|
1311
|
+
else:
|
|
1312
|
+
ff.write('[pass]\n')
|
|
1313
|
+
|
|
1314
|
+
if report_level >= REP_MINIMAL:
|
|
1315
|
+
ff.write('Criterion 4: ideal gas constant ')
|
|
1316
|
+
if subresult:
|
|
1317
|
+
ff.write('[pass]\n')
|
|
1318
|
+
else:
|
|
1319
|
+
ff.write('[FAIL]\n')
|
|
1320
|
+
|
|
1321
|
+
result &= subresult
|
|
1322
|
+
|
|
1323
|
+
#==========================================================#
|
|
1324
|
+
# Criterion 5 - density should match IG density #
|
|
1325
|
+
#==========================================================#
|
|
1326
|
+
subresult = True
|
|
1327
|
+
pm.config['unit_volume'] = 'm3'
|
|
1328
|
+
units = ['J','kg','bar','K']
|
|
1329
|
+
|
|
1330
|
+
##
|
|
1331
|
+
## 5a - mass units
|
|
1332
|
+
##
|
|
1333
|
+
p = 5.0
|
|
1334
|
+
R = pm.units.const_Ru * 1000. / self.data['mw']
|
|
1335
|
+
d = p * 1e5 / R / Tref
|
|
1336
|
+
subresult &= _prop_test(' 5a kg/m3', self.d,
|
|
1337
|
+
(Tref,p), d, units)
|
|
1338
|
+
|
|
1339
|
+
##
|
|
1340
|
+
## 5b - non-asolute temperature scale
|
|
1341
|
+
##
|
|
1342
|
+
units = ['J','kg','bar','F']
|
|
1343
|
+
subresult &= _prop_test(' 5b kg/m3', self.d,
|
|
1344
|
+
(Tref*1.8-459.67,p), d, units)
|
|
1345
|
+
|
|
1346
|
+
if report_level >= REP_MINIMAL:
|
|
1347
|
+
ff.write('Criterion 5: density ')
|
|
1348
|
+
if subresult:
|
|
1349
|
+
ff.write('[pass]\n')
|
|
1350
|
+
else:
|
|
1351
|
+
ff.write('[FAIL]\n')
|
|
1352
|
+
|
|
1353
|
+
result &= subresult
|
|
1354
|
+
|
|
1355
|
+
#==========================================================#
|
|
1356
|
+
# Criterion 6 - constant-volume specific heat #
|
|
1357
|
+
#==========================================================#
|
|
1358
|
+
subresult = True
|
|
1359
|
+
units = ['J','mol','bar','K']
|
|
1360
|
+
R = pm.units.const_Ru
|
|
1361
|
+
tag = ' 6 %3s %3s %3s %3s'%tuple(units)
|
|
1362
|
+
subresult &= _prop_test(tag, self.cv, (Tref,), cpref-R, units)
|
|
1363
|
+
|
|
1364
|
+
if report_level >= REP_MINIMAL:
|
|
1365
|
+
ff.write('Criterion 6: constant volume specific heat ')
|
|
1366
|
+
if subresult:
|
|
1367
|
+
ff.write('[pass]\n')
|
|
1368
|
+
else:
|
|
1369
|
+
ff.write('[FAIL]\n')
|
|
1370
|
+
|
|
1371
|
+
result &= subresult
|
|
1372
|
+
#==========================================================#
|
|
1373
|
+
# Criterion 7 - internal energy #
|
|
1374
|
+
#==========================================================#
|
|
1375
|
+
subresult = True
|
|
1376
|
+
units = ['J','mol','bar','K']
|
|
1377
|
+
R = pm.units.const_Ru
|
|
1378
|
+
tag = ' 7 %3s %3s %3s %3s'%tuple(units)
|
|
1379
|
+
subresult &= _prop_test(tag, self.e, (Tref,None,False), href-R*Tref, units, small=10.)
|
|
1380
|
+
|
|
1381
|
+
if report_level >= REP_MINIMAL:
|
|
1382
|
+
ff.write('Criterion 7: internal energy ')
|
|
1383
|
+
if subresult:
|
|
1384
|
+
ff.write('[pass]\n')
|
|
1385
|
+
else:
|
|
1386
|
+
ff.write('[FAIL]\n')
|
|
1387
|
+
|
|
1388
|
+
result &= subresult
|
|
1389
|
+
#==========================================================#
|
|
1390
|
+
# Criterion 8 - specific heat ratio #
|
|
1391
|
+
#==========================================================#
|
|
1392
|
+
subresult = True
|
|
1393
|
+
units = ['J','mol','bar','K']
|
|
1394
|
+
R = pm.units.const_Ru
|
|
1395
|
+
tag = ' 8 %3s %3s %3s %3s'%tuple(units)
|
|
1396
|
+
subresult &= _prop_test(tag, self.gam, (Tref,), cpref/(cpref-R), units)
|
|
1397
|
+
|
|
1398
|
+
if report_level >= REP_MINIMAL:
|
|
1399
|
+
ff.write('Criterion 8: specific heat ratio')
|
|
1400
|
+
if subresult:
|
|
1401
|
+
ff.write('[pass]\n\n')
|
|
1402
|
+
else:
|
|
1403
|
+
ff.write('[FAIL]\n\n')
|
|
1404
|
+
|
|
1405
|
+
result &= subresult
|
|
1406
|
+
|
|
1407
|
+
if isinstance(report_file,str):
|
|
1408
|
+
ff.close()
|
|
1409
|
+
return result
|
|
1410
|
+
|
|
1411
|
+
|
|
1412
|
+
|
|
1413
|
+
def Tlim(self):
|
|
1414
|
+
"""Temperature limits
|
|
1415
|
+
(Tmin, Tmax) = Tlim()
|
|
1416
|
+
Returns the temperature limits on the ig data set.
|
|
1417
|
+
|
|
1418
|
+
Accepts None
|
|
1419
|
+
Returns unit_temperature
|
|
1420
|
+
"""
|
|
1421
|
+
Tmin = pm.units.temperature_scale(self.data['Tlim'][0], from_units='K')
|
|
1422
|
+
Tmax = pm.units.temperature_scale(self.data['Tlim'][-1], from_units='K')
|
|
1423
|
+
return (Tmin,Tmax)
|
|
1424
|
+
|
|
1425
|
+
######################################
|
|
1426
|
+
# Pressure, density, and temperature #
|
|
1427
|
+
######################################
|
|
1428
|
+
|
|
1429
|
+
def d(self,*varg, **kwarg):
|
|
1430
|
+
"""Density
|
|
1431
|
+
d(...)
|
|
1432
|
+
|
|
1433
|
+
All ideal gas properties accept two other properties as flexible inputs
|
|
1434
|
+
Below are the recognized keywords, their meaning, and the config entries
|
|
1435
|
+
that determine their units.
|
|
1436
|
+
T temperature unit_temperature
|
|
1437
|
+
p pressure unit_pressure
|
|
1438
|
+
d density unit_matter / unit_volume
|
|
1439
|
+
v specific volume unit_volume / unit_matter
|
|
1440
|
+
e internal energy unit_energy / unit_matter
|
|
1441
|
+
h enthalpy unit_energy / unit_matter
|
|
1442
|
+
s entropy unit_energy / unit_matter / unit_temperature
|
|
1443
|
+
|
|
1444
|
+
If no keywords are specified, the positional arguments are interpreted
|
|
1445
|
+
as (T,p). To configure their defaults, use the def_T and def_p config
|
|
1446
|
+
entries.
|
|
1447
|
+
|
|
1448
|
+
Returns density in unit_matter / unit_volume
|
|
1449
|
+
"""
|
|
1450
|
+
T,p,d = self._argparse(*varg, **kwarg)
|
|
1451
|
+
if d is None:
|
|
1452
|
+
d = p / (1000*pm.units.const_Ru * T)
|
|
1453
|
+
scale = pm.units.matter(1., self.data['mw'], from_units='kmol')
|
|
1454
|
+
scale = pm.units.volume(scale, from_units='m3', exponent=-1)
|
|
1455
|
+
np.multiply(d, scale, out=d)
|
|
1456
|
+
return d
|
|
1457
|
+
|
|
1458
|
+
def v(self,*varg, **kwarg):
|
|
1459
|
+
"""Specific volume
|
|
1460
|
+
v(...)
|
|
1461
|
+
|
|
1462
|
+
All ideal gas properties accept two other properties as flexible inputs
|
|
1463
|
+
Below are the recognized keywords, their meaning, and the config entries
|
|
1464
|
+
that determine their units.
|
|
1465
|
+
T temperature unit_temperature
|
|
1466
|
+
p pressure unit_pressure
|
|
1467
|
+
d density unit_matter / unit_volume
|
|
1468
|
+
v specific volume unit_volume / unit_matter
|
|
1469
|
+
e internal energy unit_energy / unit_matter
|
|
1470
|
+
h enthalpy unit_energy / unit_matter
|
|
1471
|
+
s entropy unit_energy / unit_matter / unit_temperature
|
|
1472
|
+
|
|
1473
|
+
If no keywords are specified, the positional arguments are interpreted
|
|
1474
|
+
as (T,p). To configure their defaults, use the def_T and def_p config
|
|
1475
|
+
entries.
|
|
1476
|
+
|
|
1477
|
+
Returns volume in unit_volume / unit_matter
|
|
1478
|
+
"""
|
|
1479
|
+
return 1./self.d(*varg, **kwarg)
|
|
1480
|
+
|
|
1481
|
+
def T(self, *varg, **kwarg):
|
|
1482
|
+
"""Temperature
|
|
1483
|
+
T(...)
|
|
1484
|
+
|
|
1485
|
+
All ideal gas properties accept two other properties as flexible inputs
|
|
1486
|
+
Below are the recognized keywords, their meaning, and the config entries
|
|
1487
|
+
that determine their units.
|
|
1488
|
+
T temperature unit_temperature
|
|
1489
|
+
p pressure unit_pressure
|
|
1490
|
+
d density unit_matter / unit_volume
|
|
1491
|
+
v specific volume unit_volume / unit_matter
|
|
1492
|
+
e internal energy unit_energy / unit_matter
|
|
1493
|
+
h enthalpy unit_energy / unit_matter
|
|
1494
|
+
s entropy unit_energy / unit_matter / unit_temperature
|
|
1495
|
+
|
|
1496
|
+
If no keywords are specified, the positional arguments are interpreted
|
|
1497
|
+
as (T,p). To configure their defaults, use the def_T and def_p config
|
|
1498
|
+
entries.
|
|
1499
|
+
|
|
1500
|
+
Returns temperature in unit_temperature
|
|
1501
|
+
"""
|
|
1502
|
+
# T is a special case. If there is only one parameter given,
|
|
1503
|
+
# the default should not be T=def_T, so we need to override
|
|
1504
|
+
# the behavior of _argparse.
|
|
1505
|
+
if len(varg) + len(kwarg) == 1:
|
|
1506
|
+
kwarg['p'] = pm.config['def_p']
|
|
1507
|
+
|
|
1508
|
+
T,p,d = self._argparse(*varg, **kwarg)
|
|
1509
|
+
pm.units.temperature_scale(T, from_units='K', inplace=True)
|
|
1510
|
+
return T
|
|
1511
|
+
|
|
1512
|
+
def p(self, *varg, **kwarg):
|
|
1513
|
+
"""Pressure
|
|
1514
|
+
p(...)
|
|
1515
|
+
|
|
1516
|
+
All ideal gas properties accept two other properties as flexible inputs
|
|
1517
|
+
Below are the recognized keywords, their meaning, and the config entries
|
|
1518
|
+
that determine their units.
|
|
1519
|
+
T temperature unit_temperature
|
|
1520
|
+
p pressure unit_pressure
|
|
1521
|
+
d density unit_matter / unit_volume
|
|
1522
|
+
v specific volume unit_volume / unit_matter
|
|
1523
|
+
e internal energy unit_energy / unit_matter
|
|
1524
|
+
h enthalpy unit_energy / unit_matter
|
|
1525
|
+
s entropy unit_energy / unit_matter / unit_temperature
|
|
1526
|
+
|
|
1527
|
+
If no keywords are specified, the positional arguments are interpreted
|
|
1528
|
+
as (T,p). To configure their defaults, use the def_T and def_p config
|
|
1529
|
+
entries.
|
|
1530
|
+
|
|
1531
|
+
Returns pressure in unit_pressure
|
|
1532
|
+
"""
|
|
1533
|
+
T,p,d = self._argparse(*varg, **kwarg)
|
|
1534
|
+
if p is None:
|
|
1535
|
+
p = d * 1000*pm.units.const_Ru * T
|
|
1536
|
+
pm.units.pressure(p, from_units='Pa', inplace=True)
|
|
1537
|
+
return p
|
|
1538
|
+
|
|
1539
|
+
def mw(self, *varg, **kwarg):
|
|
1540
|
+
"""Molecular weight
|
|
1541
|
+
mw(...)
|
|
1542
|
+
|
|
1543
|
+
Ignores the arguments are returns molecular weight as
|
|
1544
|
+
unit_mass / unit_molar
|
|
1545
|
+
"""
|
|
1546
|
+
mw = pm.units.mass(self.data['mw'],from_units='g')
|
|
1547
|
+
mw = pm.units.molar(mw,from_units='mol',exponent=-1)
|
|
1548
|
+
return mw
|
|
1549
|
+
|
|
1550
|
+
def R(self,*varg, **kwarg):
|
|
1551
|
+
"""Ideal gas constant
|
|
1552
|
+
R(...)
|
|
1553
|
+
|
|
1554
|
+
Ignores the arguments are returns the gas constant as
|
|
1555
|
+
unit_energy / unit_matter / unit_temperature
|
|
1556
|
+
"""
|
|
1557
|
+
R = pm.units.energy(pm.units.const_Ru, from_units='J')
|
|
1558
|
+
R = pm.units.temperature(R, from_units='K', exponent=-1)
|
|
1559
|
+
R = pm.units.matter(R, self.data['mw'], from_units='mol', exponent=-1)
|
|
1560
|
+
return R
|
|
1561
|
+
|
|
1562
|
+
def gam(self,*varg, **kwarg):
|
|
1563
|
+
"""Specific heat ratio
|
|
1564
|
+
gam(...)
|
|
1565
|
+
|
|
1566
|
+
All ideal gas properties accept two other properties as flexible inputs
|
|
1567
|
+
Below are the recognized keywords, their meaning, and the config entries
|
|
1568
|
+
that determine their units.
|
|
1569
|
+
T temperature unit_temperature
|
|
1570
|
+
p pressure unit_pressure
|
|
1571
|
+
d density unit_matter / unit_volume
|
|
1572
|
+
v specific volume unit_volume / unit_matter
|
|
1573
|
+
e internal energy unit_energy / unit_matter
|
|
1574
|
+
h enthalpy unit_energy / unit_matter
|
|
1575
|
+
s entropy unit_energy / unit_matter / unit_temperature
|
|
1576
|
+
|
|
1577
|
+
If no keywords are specified, the positional arguments are interpreted
|
|
1578
|
+
as (T,p). To configure their defaults, use the def_T and def_p config
|
|
1579
|
+
entries.
|
|
1580
|
+
|
|
1581
|
+
Returns ideal gas ratio, which is dimensionless.
|
|
1582
|
+
"""
|
|
1583
|
+
T,p,d = self._argparse(*varg, **kwarg)
|
|
1584
|
+
cp = self._cp(T)
|
|
1585
|
+
return cp/(cp-pm.units.const_Ru)
|
|
1586
|
+
|
|
1587
|
+
|
|
1588
|
+
def cp(self, *varg, **kwarg):
|
|
1589
|
+
"""Constant-pressure specific heat
|
|
1590
|
+
cp(...)
|
|
1591
|
+
|
|
1592
|
+
All ideal gas properties accept two other properties as flexible inputs
|
|
1593
|
+
Below are the recognized keywords, their meaning, and the config entries
|
|
1594
|
+
that determine their units.
|
|
1595
|
+
T temperature unit_temperature
|
|
1596
|
+
p pressure unit_pressure
|
|
1597
|
+
d density unit_matter / unit_volume
|
|
1598
|
+
v specific volume unit_volume / unit_matter
|
|
1599
|
+
e internal energy unit_energy / unit_matter
|
|
1600
|
+
h enthalpy unit_energy / unit_matter
|
|
1601
|
+
s entropy unit_energy / unit_matter / unit_temperature
|
|
1602
|
+
|
|
1603
|
+
If no keywords are specified, the positional arguments are interpreted
|
|
1604
|
+
as (T,p). To configure their defaults, use the def_T and def_p config
|
|
1605
|
+
entries.
|
|
1606
|
+
|
|
1607
|
+
Returns specific heat in unit_energy / unit_matter / unit_temperature
|
|
1608
|
+
"""
|
|
1609
|
+
T,p,d = self._argparse(*varg, **kwarg)
|
|
1610
|
+
# Apply the model
|
|
1611
|
+
out = self._cp(T)
|
|
1612
|
+
# calculate a conversion factor
|
|
1613
|
+
scale = pm.units.energy(1, from_units='kJ')
|
|
1614
|
+
scale = pm.units.temperature(scale, from_units='K', exponent=-1)
|
|
1615
|
+
scale = pm.units.matter(scale, self.data['mw'], from_units='kmol', exponent=-1)
|
|
1616
|
+
# Apply the conversion factor in-place and return
|
|
1617
|
+
np.multiply(out, scale, out=out)
|
|
1618
|
+
return out
|
|
1619
|
+
|
|
1620
|
+
def cv(self,*varg, **kwarg):
|
|
1621
|
+
"""Constant-volume specific heat
|
|
1622
|
+
p(...)
|
|
1623
|
+
|
|
1624
|
+
All ideal gas properties accept two other properties as flexible inputs
|
|
1625
|
+
Below are the recognized keywords, their meaning, and the config entries
|
|
1626
|
+
that determine their units.
|
|
1627
|
+
T temperature unit_temperature
|
|
1628
|
+
p pressure unit_pressure
|
|
1629
|
+
d density unit_matter / unit_volume
|
|
1630
|
+
v specific volume unit_volume / unit_matter
|
|
1631
|
+
e internal energy unit_energy / unit_matter
|
|
1632
|
+
h enthalpy unit_energy / unit_matter
|
|
1633
|
+
s entropy unit_energy / unit_matter / unit_temperature
|
|
1634
|
+
|
|
1635
|
+
If no keywords are specified, the positional arguments are interpreted
|
|
1636
|
+
as (T,p). To configure their defaults, use the def_T and def_p config
|
|
1637
|
+
entries.
|
|
1638
|
+
|
|
1639
|
+
Returns specific heat in unit_energy / unit_matter / unit_temperature
|
|
1640
|
+
"""
|
|
1641
|
+
T,p,d = self._argparse(*varg, **kwarg)
|
|
1642
|
+
# Apply the model
|
|
1643
|
+
out = self._cp(T) - pm.units.const_Ru
|
|
1644
|
+
# calculate a conversion factor
|
|
1645
|
+
scale = pm.units.energy(1, from_units='kJ')
|
|
1646
|
+
scale = pm.units.temperature(scale, from_units='K', exponent=-1)
|
|
1647
|
+
scale = pm.units.matter(scale, self.data['mw'], from_units='kmol', exponent=-1)
|
|
1648
|
+
# Apply the conversion factor in-place and return
|
|
1649
|
+
np.multiply(out, scale, out=out)
|
|
1650
|
+
return out
|
|
1651
|
+
|
|
1652
|
+
def h(self,*varg, **kwarg):
|
|
1653
|
+
"""Enthalpy
|
|
1654
|
+
h(...)
|
|
1655
|
+
|
|
1656
|
+
All ideal gas properties accept two other properties as flexible inputs
|
|
1657
|
+
Below are the recognized keywords, their meaning, and the config entries
|
|
1658
|
+
that determine their units.
|
|
1659
|
+
T temperature unit_temperature
|
|
1660
|
+
p pressure unit_pressure
|
|
1661
|
+
d density unit_matter / unit_volume
|
|
1662
|
+
v specific volume unit_volume / unit_matter
|
|
1663
|
+
e internal energy unit_energy / unit_matter
|
|
1664
|
+
h enthalpy unit_energy / unit_matter
|
|
1665
|
+
s entropy unit_energy / unit_matter / unit_temperature
|
|
1666
|
+
|
|
1667
|
+
If no keywords are specified, the positional arguments are interpreted
|
|
1668
|
+
as (T,p). To configure their defaults, use the def_T and def_p config
|
|
1669
|
+
entries.
|
|
1670
|
+
|
|
1671
|
+
Returns enthalpy in unit_energy / unit_matter
|
|
1672
|
+
"""
|
|
1673
|
+
T,p,d = self._argparse(*varg, **kwarg)
|
|
1674
|
+
# Apply the model
|
|
1675
|
+
out = self._h(T)[0]
|
|
1676
|
+
# calculate a conversion factor
|
|
1677
|
+
scale = pm.units.energy(1, from_units='kJ')
|
|
1678
|
+
scale = pm.units.matter(scale, self.data['mw'], from_units='kmol', exponent=-1)
|
|
1679
|
+
# Apply the conversion factor in-place and return
|
|
1680
|
+
np.multiply(out, scale, out=out)
|
|
1681
|
+
return out
|
|
1682
|
+
|
|
1683
|
+
def g(self,*varg, **kwarg):
|
|
1684
|
+
"""Gibbs energy
|
|
1685
|
+
g(...)
|
|
1686
|
+
|
|
1687
|
+
g =def= h - T*s
|
|
1688
|
+
|
|
1689
|
+
All ideal gas properties accept two other properties as flexible inputs
|
|
1690
|
+
Below are the recognized keywords, their meaning, and the config entries
|
|
1691
|
+
that determine their units.
|
|
1692
|
+
T temperature unit_temperature
|
|
1693
|
+
p pressure unit_pressure
|
|
1694
|
+
d density unit_matter / unit_volume
|
|
1695
|
+
v specific volume unit_volume / unit_matter
|
|
1696
|
+
e internal energy unit_energy / unit_matter
|
|
1697
|
+
h enthalpy unit_energy / unit_matter
|
|
1698
|
+
s entropy unit_energy / unit_matter / unit_temperature
|
|
1699
|
+
|
|
1700
|
+
If no keywords are specified, the positional arguments are interpreted
|
|
1701
|
+
as (T,p). To configure their defaults, use the def_T and def_p config
|
|
1702
|
+
entries.
|
|
1703
|
+
|
|
1704
|
+
Returns enthalpy in unit_energy / unit_matter
|
|
1705
|
+
"""
|
|
1706
|
+
T,p,d = self._argparse(*varg, **kwarg)
|
|
1707
|
+
# Apply the model
|
|
1708
|
+
out = self._g(T)[0] + T*pm.units.const_Ru * np.log(p/self._pref_pa)
|
|
1709
|
+
# calculate a conversion factor
|
|
1710
|
+
scale = pm.units.energy(1, from_units='kJ')
|
|
1711
|
+
scale = pm.units.matter(scale, self.data['mw'], from_units='kmol', exponent=-1)
|
|
1712
|
+
# Apply the conversion factor in-place and return
|
|
1713
|
+
np.multiply(out, scale, out=out)
|
|
1714
|
+
return out
|
|
1715
|
+
|
|
1716
|
+
|
|
1717
|
+
def f(self,*varg, **kwarg):
|
|
1718
|
+
"""Free (Helmholtz) energy
|
|
1719
|
+
f(...)
|
|
1720
|
+
|
|
1721
|
+
f =def= e - T*s
|
|
1722
|
+
|
|
1723
|
+
All ideal gas properties accept two other properties as flexible inputs
|
|
1724
|
+
Below are the recognized keywords, their meaning, and the config entries
|
|
1725
|
+
that determine their units.
|
|
1726
|
+
T temperature unit_temperature
|
|
1727
|
+
p pressure unit_pressure
|
|
1728
|
+
d density unit_matter / unit_volume
|
|
1729
|
+
v specific volume unit_volume / unit_matter
|
|
1730
|
+
e internal energy unit_energy / unit_matter
|
|
1731
|
+
h enthalpy unit_energy / unit_matter
|
|
1732
|
+
s entropy unit_energy / unit_matter / unit_temperature
|
|
1733
|
+
|
|
1734
|
+
If no keywords are specified, the positional arguments are interpreted
|
|
1735
|
+
as (T,p). To configure their defaults, use the def_T and def_p config
|
|
1736
|
+
entries.
|
|
1737
|
+
|
|
1738
|
+
Returns enthalpy in unit_energy / unit_matter
|
|
1739
|
+
"""
|
|
1740
|
+
T,p,d = self._argparse(*varg, **kwarg)
|
|
1741
|
+
# Apply the model
|
|
1742
|
+
out = self._f(T)[0] + T*pm.units.const_Ru * np.log(p/self._pref_pa)
|
|
1743
|
+
# calculate a conversion factor
|
|
1744
|
+
scale = pm.units.energy(1, from_units='kJ')
|
|
1745
|
+
scale = pm.units.matter(scale, self.data['mw'], from_units='kmol', exponent=-1)
|
|
1746
|
+
# Apply the conversion factor in-place and return
|
|
1747
|
+
np.multiply(out, scale, out=out)
|
|
1748
|
+
return out
|
|
1749
|
+
|
|
1750
|
+
|
|
1751
|
+
def s(self,*varg,**kwarg):
|
|
1752
|
+
"""Entropy
|
|
1753
|
+
s(...)
|
|
1754
|
+
|
|
1755
|
+
All ideal gas properties accept two other properties as flexible inputs
|
|
1756
|
+
Below are the recognized keywords, their meaning, and the config entries
|
|
1757
|
+
that determine their units.
|
|
1758
|
+
T temperature unit_temperature
|
|
1759
|
+
p pressure unit_pressure
|
|
1760
|
+
d density unit_matter / unit_volume
|
|
1761
|
+
v specific volume unit_volume / unit_matter
|
|
1762
|
+
e internal energy unit_energy / unit_matter
|
|
1763
|
+
h enthalpy unit_energy / unit_matter
|
|
1764
|
+
s entropy unit_energy / unit_matter / unit_temperature
|
|
1765
|
+
|
|
1766
|
+
If no keywords are specified, the positional arguments are interpreted
|
|
1767
|
+
as (T,p). To configure their defaults, use the def_T and def_p config
|
|
1768
|
+
entries.
|
|
1769
|
+
|
|
1770
|
+
Returns entropy in unit_energy / unit_matter / unit_temperature
|
|
1771
|
+
"""
|
|
1772
|
+
T,p,d = self._argparse(*varg, **kwarg)
|
|
1773
|
+
if p is None:
|
|
1774
|
+
p = d * (1000*pm.units.const_Ru * T)
|
|
1775
|
+
# Apply the model
|
|
1776
|
+
out = self._s(T)[0] - pm.units.const_Ru * np.log(p/self._pref_pa)
|
|
1777
|
+
# calculate a conversion factor
|
|
1778
|
+
scale = pm.units.energy(1, from_units='kJ')
|
|
1779
|
+
scale = pm.units.temperature(scale, from_units='K', exponent=-1)
|
|
1780
|
+
scale = pm.units.matter(scale, self.data['mw'], from_units='kmol', exponent=-1)
|
|
1781
|
+
# Apply the conversion factor in-place and return
|
|
1782
|
+
np.multiply(out, scale, out=out)
|
|
1783
|
+
return out
|
|
1784
|
+
|
|
1785
|
+
def e(self,*varg, **kwarg):
|
|
1786
|
+
"""Internal energy
|
|
1787
|
+
e(...)
|
|
1788
|
+
|
|
1789
|
+
All ideal gas properties accept two other properties as flexible inputs
|
|
1790
|
+
Below are the recognized keywords, their meaning, and the config entries
|
|
1791
|
+
that determine their units.
|
|
1792
|
+
T temperature unit_temperature
|
|
1793
|
+
p pressure unit_pressure
|
|
1794
|
+
d density unit_matter / unit_volume
|
|
1795
|
+
v specific volume unit_volume / unit_matter
|
|
1796
|
+
e internal energy unit_energy / unit_matter
|
|
1797
|
+
h enthalpy unit_energy / unit_matter
|
|
1798
|
+
s entropy unit_energy / unit_matter / unit_temperature
|
|
1799
|
+
|
|
1800
|
+
If no keywords are specified, the positional arguments are interpreted
|
|
1801
|
+
as (T,p). To configure their defaults, use the def_T and def_p config
|
|
1802
|
+
entries.
|
|
1803
|
+
|
|
1804
|
+
Returns internal energy in unit_energy / unit_matter
|
|
1805
|
+
"""
|
|
1806
|
+
T,p,d = self._argparse(*varg, **kwarg)
|
|
1807
|
+
# Apply the model
|
|
1808
|
+
out = self._h(T)[0] - pm.units.const_Ru*T
|
|
1809
|
+
# calculate a conversion factor
|
|
1810
|
+
scale = pm.units.energy(1, from_units='J')
|
|
1811
|
+
scale = pm.units.matter(scale, self.data['mw'], from_units='mol', exponent=-1)
|
|
1812
|
+
# Apply the conversion factor in-place and return
|
|
1813
|
+
np.multiply(out, scale, out=out)
|
|
1814
|
+
return out
|
|
1815
|
+
|
|
1816
|
+
def state(self, *varg, **kwarg):
|
|
1817
|
+
"""Calculate all properties at a state
|
|
1818
|
+
sd = state(...)
|
|
1819
|
+
|
|
1820
|
+
The properties are returned in a dictionary with keys:
|
|
1821
|
+
T temperature unit_temperature
|
|
1822
|
+
p pressure unit_pressure
|
|
1823
|
+
d density unit_matter / unit_volume
|
|
1824
|
+
v specific volume unit_volume / unit_matter
|
|
1825
|
+
e internal energy unit_energy / unit_matter
|
|
1826
|
+
h enthalpy unit_energy / unit_matter
|
|
1827
|
+
s entropy unit_energy / unit_matter / unit_temperature
|
|
1828
|
+
cp const. p sp. ht. unit_energy / unit_matter / unit_temperature
|
|
1829
|
+
cv const. v sp. ht. unit_energy / unit_matter / unit_temperature
|
|
1830
|
+
|
|
1831
|
+
Like all of the other property functions, arguments may be any two of
|
|
1832
|
+
T, p, d, v, e, h, and s.
|
|
1833
|
+
"""
|
|
1834
|
+
Ru = pm.units.const_Ru
|
|
1835
|
+
T,p,d = self._argparse(*varg, **kwarg)
|
|
1836
|
+
# Make sure we have both pressure and density
|
|
1837
|
+
if d is None:
|
|
1838
|
+
d = p / (1000 * Ru * T)
|
|
1839
|
+
elif p is None:
|
|
1840
|
+
p = 1000 * d * Ru * T
|
|
1841
|
+
|
|
1842
|
+
# Now entropy
|
|
1843
|
+
s = self._s(T,False)[0] - Ru * np.log(p / self._pref_pa)
|
|
1844
|
+
|
|
1845
|
+
# Enthalpy and specific heat at once
|
|
1846
|
+
h,cp = self._h(T,True)
|
|
1847
|
+
cv = cp - Ru
|
|
1848
|
+
gam = cp/cv
|
|
1849
|
+
e = h - Ru*T
|
|
1850
|
+
|
|
1851
|
+
# Finally build the output
|
|
1852
|
+
out = {}
|
|
1853
|
+
out['T'] = pm.units.temperature_scale(T, from_units='K')
|
|
1854
|
+
out['p'] = pm.units.pressure(p, from_units='Pa')
|
|
1855
|
+
scale = pm.units.matter(1., self.data['mw'], from_units='kmol')
|
|
1856
|
+
scale = pm.units.volume(scale, from_units='m3', exponent=-1)
|
|
1857
|
+
out['d'] = scale * d
|
|
1858
|
+
out['v'] = 1./out['d']
|
|
1859
|
+
scale = pm.units.energy(1., from_units='kJ')
|
|
1860
|
+
scale = pm.units.matter(scale, self.data['mw'], from_units='kmol', exponent=-1)
|
|
1861
|
+
out['h'] = h * scale
|
|
1862
|
+
out['e'] = e * scale
|
|
1863
|
+
out['gam'] = gam
|
|
1864
|
+
scale = pm.units.temperature(scale, from_units='K', exponent=-1)
|
|
1865
|
+
out['s'] = s * scale
|
|
1866
|
+
out['cp'] = cp * scale
|
|
1867
|
+
out['cv'] = cv * scale
|
|
1868
|
+
return out
|
|
1869
|
+
|
|
1870
|
+
|
|
1871
|
+
|
|
1872
|
+
def T_s(self,s,p=None, d=None):
|
|
1873
|
+
"""Temperature as a function of entropy
|
|
1874
|
+
** Deprecated - use T() **
|
|
1875
|
+
|
|
1876
|
+
T = T_s(s)
|
|
1877
|
+
or
|
|
1878
|
+
T = T_s(s,p)
|
|
1879
|
+
|
|
1880
|
+
Accepts unit_energy / unit_matter / unit_temperature
|
|
1881
|
+
unit_pressure
|
|
1882
|
+
unit_matter / unit_volume
|
|
1883
|
+
Returns unit_temperature
|
|
1884
|
+
"""
|
|
1885
|
+
if p is not None:
|
|
1886
|
+
return self.T(s=s, p=p)
|
|
1887
|
+
elif d is not None:
|
|
1888
|
+
return self.T(s=s, d=d)
|
|
1889
|
+
return self.T(s=s)
|
|
1890
|
+
|
|
1891
|
+
|
|
1892
|
+
def T_h(self,h, p=None, d=None):
|
|
1893
|
+
"""Temperature as a function of enthalpy
|
|
1894
|
+
** Deprecated - use T() **
|
|
1895
|
+
|
|
1896
|
+
T = T_h(h)
|
|
1897
|
+
or
|
|
1898
|
+
T = T_h(h,...)
|
|
1899
|
+
|
|
1900
|
+
Returns the temperature as a function of enthalpy and pressure. Ideal
|
|
1901
|
+
gas enthalpy is not a function of pressure, so the p term is merely a
|
|
1902
|
+
placeholder.
|
|
1903
|
+
|
|
1904
|
+
Accepts unit_energy / unit_matter / unit_temperature
|
|
1905
|
+
unit_pressure
|
|
1906
|
+
Returns unit_temperature
|
|
1907
|
+
"""
|
|
1908
|
+
if p is not None:
|
|
1909
|
+
return self.T(h=h, p=p)
|
|
1910
|
+
elif d is not None:
|
|
1911
|
+
return self.T(h=h, d=d)
|
|
1912
|
+
return self.T(h=h)
|
|
1913
|
+
|
|
1914
|
+
|
|
1915
|
+
def p_s(self,s,T=None):
|
|
1916
|
+
"""Pressure as a function of entropy
|
|
1917
|
+
** Deprecated - use p() **
|
|
1918
|
+
|
|
1919
|
+
p = ig_instance.p_s(s)
|
|
1920
|
+
or
|
|
1921
|
+
p = ig_instance.p_s(s,...)
|
|
1922
|
+
|
|
1923
|
+
Returns the pressure as a function of entropy and temperature.
|
|
1924
|
+
|
|
1925
|
+
Accepts unit_energy / unit_matter / unit_temperature
|
|
1926
|
+
unit_temperature
|
|
1927
|
+
Returns unit_pressure
|
|
1928
|
+
"""
|
|
1929
|
+
if T is not None:
|
|
1930
|
+
return self.p(s=s,T=T)
|
|
1931
|
+
return self.p(s=s)
|