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/if97.py
ADDED
|
@@ -0,0 +1,2278 @@
|
|
|
1
|
+
import pyromat as pyro
|
|
2
|
+
import numpy as np
|
|
3
|
+
|
|
4
|
+
class if97(pyro.reg.__basedata__):
|
|
5
|
+
"""The IF-97 class
|
|
6
|
+
|
|
7
|
+
Based on the International Association for the Properties of Water and
|
|
8
|
+
Steam's 1997 Industrial Formulation (IF-97).
|
|
9
|
+
|
|
10
|
+
http://www.iapws.org/relguide/IF97-Rev.html
|
|
11
|
+
|
|
12
|
+
Offers property methods:
|
|
13
|
+
cp() spec. heat (unit_energy / unit_temperature / unit_matter)
|
|
14
|
+
cv() spec. heat (unit_energy / unit_temperature / unit_matter)
|
|
15
|
+
d() density (unit_matter / unit_volume)
|
|
16
|
+
e() internal energy (unit_energy / unit_matter)
|
|
17
|
+
h() enthalpy (unit_energy / unit_matter)
|
|
18
|
+
gam() sp. heat ratio (dless)
|
|
19
|
+
mw() molecular weight (unit_mass / unit_molar)
|
|
20
|
+
s() entropy (unit_energy / unit_temperature / unit_matter)
|
|
21
|
+
|
|
22
|
+
There is also a special function for simultaneously evaluating enthalpy,
|
|
23
|
+
entropy and density.
|
|
24
|
+
hsd() enthalpy, entropy, and density
|
|
25
|
+
|
|
26
|
+
And special methods for calculating properties along the saturation curve
|
|
27
|
+
critical() The critical point (T,p) as a tuple
|
|
28
|
+
triple() The triple point (T,p) as a tuple
|
|
29
|
+
ds() Saturation density as a tuple (dL, dV)
|
|
30
|
+
es() Saturation energy as a tuple (eL, eV)
|
|
31
|
+
hs() Saturation enthalpy as a tuple (hL, hV)
|
|
32
|
+
ss() Saturation entropy as a tuple (sL, sV)
|
|
33
|
+
ps() Saturation pressure as a function of temperature
|
|
34
|
+
Ts() Saturation temperature as a function of pressure
|
|
35
|
+
|
|
36
|
+
There are also routines to invert properties; e.g. calculating
|
|
37
|
+
temperature from enthalpy or from entropy and pressure.
|
|
38
|
+
T_h() temperature from enthalpy
|
|
39
|
+
T_s() temperature from entropy and pressure
|
|
40
|
+
|
|
41
|
+
The limits on the IF-97 validity are reported by the Tlim() and plim()
|
|
42
|
+
methods.
|
|
43
|
+
"""
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
def _peval(self,x,y,A,order=2):
|
|
48
|
+
"""Polynomial evaluation
|
|
49
|
+
(p, dpdx, dpdy) = _peval(x,y,A)
|
|
50
|
+
|
|
51
|
+
Evaluates a polynomial on x and y and its derivatives.
|
|
52
|
+
x x value
|
|
53
|
+
y y value
|
|
54
|
+
A coefficient list
|
|
55
|
+
|
|
56
|
+
Each element of A is a three-element list defining a term in the
|
|
57
|
+
polynomial; the x-exponent, the y-exponent, and the corresponding
|
|
58
|
+
coefficient.
|
|
59
|
+
|
|
60
|
+
The list,
|
|
61
|
+
[[0, 0, .5], [0, 1, 1.2], [0, 2, 0.2], [1, 1, 0.1]]
|
|
62
|
+
corrsponds to the polynomial
|
|
63
|
+
p(x,y) = .5 + 1.2y + .2y**2 + 0.1xy
|
|
64
|
+
"""
|
|
65
|
+
# _peval() performs sanity checks to make sure it doesn't
|
|
66
|
+
# lock in an infinite loop if the data is corrupted
|
|
67
|
+
# LARGE is the largest reasonable exponent
|
|
68
|
+
LARGE = 100
|
|
69
|
+
|
|
70
|
+
# start at the highest order term
|
|
71
|
+
index = len(A)-1
|
|
72
|
+
# initialize the final polynomial and its derivatives
|
|
73
|
+
p = 0. # total polynomial
|
|
74
|
+
px = 0.
|
|
75
|
+
py = 0.
|
|
76
|
+
pxx = 0.
|
|
77
|
+
pxy = 0.
|
|
78
|
+
pyy = 0.
|
|
79
|
+
# From here, we loop over terms of the form a*(x**m)*(y**n)
|
|
80
|
+
# If a particular m,n combination is not found in the data, then
|
|
81
|
+
# its coefficient is treated as zero.
|
|
82
|
+
# Start off with the largest x-exponent found in the data
|
|
83
|
+
m = A[index][0]
|
|
84
|
+
if m>LARGE:
|
|
85
|
+
raise Exception()
|
|
86
|
+
# loop through the x terms so long as there is data left to process
|
|
87
|
+
while index>=0:
|
|
88
|
+
# For each value of m, a "sub-polynomial" q is constructed
|
|
89
|
+
# on y. As soon as the x index changes in the data, q is re-
|
|
90
|
+
# initialized and the process begins again.
|
|
91
|
+
q = 0.
|
|
92
|
+
dq = 0.
|
|
93
|
+
ddq = 0.
|
|
94
|
+
# if the current x exponent corresponds to the next entry
|
|
95
|
+
if A[index][0]==m:
|
|
96
|
+
# grab the largest y exponent for this sub-polynomial
|
|
97
|
+
n = A[index][1]
|
|
98
|
+
# sanity check
|
|
99
|
+
if n>LARGE:
|
|
100
|
+
raise Exception()
|
|
101
|
+
# loop through the y terms so long as the x exponent is
|
|
102
|
+
# unchanged.
|
|
103
|
+
while index>=0 and A[index][0]==m:
|
|
104
|
+
# if the current y exponent corresponds to the next entry
|
|
105
|
+
# pull it into the polynomial
|
|
106
|
+
if n==A[index][1]:
|
|
107
|
+
if order>1:
|
|
108
|
+
ddq = ddq*y + 2.*dq
|
|
109
|
+
if order>0:
|
|
110
|
+
dq = dq*y + q
|
|
111
|
+
q = q*y + A[index][2]
|
|
112
|
+
index-=1
|
|
113
|
+
# if the next entry doesn't match the y exponent, then
|
|
114
|
+
# there is no coefficient for this term
|
|
115
|
+
else:
|
|
116
|
+
if order>1:
|
|
117
|
+
ddq = ddq*y + 2.*dq
|
|
118
|
+
if order>0:
|
|
119
|
+
dq = dq*y + q
|
|
120
|
+
q *= y
|
|
121
|
+
# decrement the exponent
|
|
122
|
+
n-=1
|
|
123
|
+
# sanity check (this one is important!)
|
|
124
|
+
# if the data are unordered, an infinite loop
|
|
125
|
+
# can occur. This addresses the problem.
|
|
126
|
+
if n<-LARGE:
|
|
127
|
+
raise Exception()
|
|
128
|
+
# restore the y exponent to the last value used
|
|
129
|
+
n+=1
|
|
130
|
+
# if the last y exponent wasn't zero
|
|
131
|
+
if n:
|
|
132
|
+
# there is a special algorithm for n==1
|
|
133
|
+
if n==1:
|
|
134
|
+
# modify q and its derivatives
|
|
135
|
+
ddyn = 0.
|
|
136
|
+
dyn = 1.
|
|
137
|
+
yn = y
|
|
138
|
+
else:
|
|
139
|
+
ddyn = y**(n-2)
|
|
140
|
+
dyn = ddyn*y
|
|
141
|
+
yn = dyn*y
|
|
142
|
+
dyn*=n
|
|
143
|
+
ddyn*=(n-1)*n
|
|
144
|
+
if order>1:
|
|
145
|
+
ddq = ddq*yn + 2.*dq*dyn + q*ddyn
|
|
146
|
+
if order>0:
|
|
147
|
+
dq = q*dyn + dq*yn
|
|
148
|
+
q *= yn
|
|
149
|
+
# update p and derivatives
|
|
150
|
+
if order>1:
|
|
151
|
+
pyy = pyy*x + ddq
|
|
152
|
+
pxy = pxy*x + py
|
|
153
|
+
pxx = pxx*x + 2.*px
|
|
154
|
+
if order>0:
|
|
155
|
+
py = py*x + dq
|
|
156
|
+
px = px*x + p
|
|
157
|
+
p = p*x + q
|
|
158
|
+
# if the next entry doesn't match the x exponent, then
|
|
159
|
+
# there are no coefficients for this term
|
|
160
|
+
else:
|
|
161
|
+
if order>1:
|
|
162
|
+
pyy *= x
|
|
163
|
+
pxy = pxy*x + py
|
|
164
|
+
pxx = pxx*x + 2.*px
|
|
165
|
+
if order>0:
|
|
166
|
+
py *= x
|
|
167
|
+
px = px*x + p
|
|
168
|
+
p *= x
|
|
169
|
+
|
|
170
|
+
m-=1
|
|
171
|
+
# sanity check (this one is important!)
|
|
172
|
+
if m<-LARGE:
|
|
173
|
+
raise Exception()
|
|
174
|
+
# restore the x exponent to the last value used
|
|
175
|
+
m+=1
|
|
176
|
+
# if the last x exponent wasn't zero
|
|
177
|
+
if m:
|
|
178
|
+
# modify p and its derivatives
|
|
179
|
+
# there is a special algorithm for m==1
|
|
180
|
+
if m==1:
|
|
181
|
+
# modify q and its derivatives
|
|
182
|
+
ddxm = 0.
|
|
183
|
+
dxm = 1.
|
|
184
|
+
xm = x
|
|
185
|
+
else:
|
|
186
|
+
ddxm = x**(m-2)
|
|
187
|
+
dxm = ddxm*x
|
|
188
|
+
xm = dxm*x
|
|
189
|
+
dxm*=m
|
|
190
|
+
ddxm*=(m-1)*m
|
|
191
|
+
if order>1:
|
|
192
|
+
pxx = pxx*xm + 2.*px*dxm + p*ddxm
|
|
193
|
+
pxy = pxy*xm + py*dxm
|
|
194
|
+
pyy *= xm
|
|
195
|
+
if order>0:
|
|
196
|
+
px = px*xm + p*dxm
|
|
197
|
+
py *= xm
|
|
198
|
+
p *= xm
|
|
199
|
+
|
|
200
|
+
return p,px,py,pxx,pxy,pyy
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
def _g1(self,T,p,order=2):
|
|
205
|
+
"""Gibbs energy in region 1
|
|
206
|
+
g,gp,gt,gpp,gpt,gtt = _g1(T,p,order=2)
|
|
207
|
+
|
|
208
|
+
Calculates the dimensionless gibbs free energy and its derivatives in
|
|
209
|
+
region 1. The 'order' keyword indicates the number of derivatives to
|
|
210
|
+
calculate.
|
|
211
|
+
"""
|
|
212
|
+
# apply the region 1 scaling
|
|
213
|
+
t = 1386./T
|
|
214
|
+
pi = p/165.3
|
|
215
|
+
g,gp,gt,gpp,gpt,gtt = self._peval(7.1-pi,t-1.222,self.data['r1'],order=order)
|
|
216
|
+
# gp is negative because pi appears as a negative in the argument to peval
|
|
217
|
+
# The effect cancels in gpp, but also appears in gpt.
|
|
218
|
+
return (pi,t,g,-gp,gt,gpp,-gpt,gtt)
|
|
219
|
+
|
|
220
|
+
|
|
221
|
+
def _th1(self,h,p):
|
|
222
|
+
"""Temperature from enthalpy and pressure
|
|
223
|
+
T = _th1(h,p)
|
|
224
|
+
|
|
225
|
+
Applies the inverse relations for region 1 to calculate temperature from
|
|
226
|
+
enthalpy and pressure.
|
|
227
|
+
"""
|
|
228
|
+
eta = h/2500.
|
|
229
|
+
pi = p/10.
|
|
230
|
+
T,_,_,_,_,_ = self._peval(pi, eta+1.,self.data['th1'],order=0)
|
|
231
|
+
return T
|
|
232
|
+
|
|
233
|
+
|
|
234
|
+
def _ts1(self,s,p):
|
|
235
|
+
"""Temperature from entropy and pressure
|
|
236
|
+
T = _th1(s,p)
|
|
237
|
+
|
|
238
|
+
Applies the inverse relations for region 1 to calculate temperature from
|
|
239
|
+
entropy and pressure.
|
|
240
|
+
"""
|
|
241
|
+
pi = p/10.
|
|
242
|
+
T,_,_,_,_,_ = self._peval(pi, s+2.,self.data['ts1'],order=0)
|
|
243
|
+
return T
|
|
244
|
+
|
|
245
|
+
|
|
246
|
+
def _g2(self,T,p,order=2):
|
|
247
|
+
"""Gibbs energy in region 2
|
|
248
|
+
g,gp,gt,gpp,gpt,gtt = _g2(T,p,order=2)
|
|
249
|
+
|
|
250
|
+
Calculates the dimensionless gibbs free energy and its derivatives in
|
|
251
|
+
region 1. The 'order' keyword indicates the number of derivatives to
|
|
252
|
+
calculate.
|
|
253
|
+
"""
|
|
254
|
+
# apply the region 2 scaling
|
|
255
|
+
t = 540./T
|
|
256
|
+
pi = p/10.
|
|
257
|
+
g,gp,gt,gpp,gpt,gtt = self._peval(pi,t,self.data['r2o'],order=order)
|
|
258
|
+
gr,grp,grt,grpp,grpt,grtt = self._peval(pi,t-0.5,self.data['r2r'],order=order)
|
|
259
|
+
LP = np.log(pi)
|
|
260
|
+
g+=(gr + LP)
|
|
261
|
+
if order>0:
|
|
262
|
+
LP = 1./pi
|
|
263
|
+
gp+=(grp + LP)
|
|
264
|
+
gt+=grt
|
|
265
|
+
if order>1:
|
|
266
|
+
LP = -LP/pi
|
|
267
|
+
gpp+=(grpp+LP)
|
|
268
|
+
gpt+=grpt
|
|
269
|
+
gtt+=grtt
|
|
270
|
+
return pi,t,g,gp,gt,gpp,gpt,gtt
|
|
271
|
+
|
|
272
|
+
|
|
273
|
+
def _th2a(self,h,p):
|
|
274
|
+
"""Temperature from enthalpy and pressure
|
|
275
|
+
T = _th2a(h,p)
|
|
276
|
+
|
|
277
|
+
Applies the inverse relations for region 2a to calculate temperature from
|
|
278
|
+
enthalpy and pressure.
|
|
279
|
+
"""
|
|
280
|
+
eta = h/2000.
|
|
281
|
+
pi = p/10.
|
|
282
|
+
T,_,_,_,_,_ = self._peval(pi, eta-2.1,self.data['th2a'],order=0)
|
|
283
|
+
return T
|
|
284
|
+
|
|
285
|
+
def _th2b(self,h,p):
|
|
286
|
+
"""Temperature from enthalpy and pressure
|
|
287
|
+
T = _th2b(h,p)
|
|
288
|
+
|
|
289
|
+
Applies the inverse relations for region 2b to calculate temperature from
|
|
290
|
+
enthalpy and pressure.
|
|
291
|
+
"""
|
|
292
|
+
eta = h/2000.
|
|
293
|
+
pi = p/10.
|
|
294
|
+
T,_,_,_,_,_ = self._peval(pi-2., eta-2.6,self.data['th2b'],order=0)
|
|
295
|
+
return T
|
|
296
|
+
|
|
297
|
+
def _th2c(self,h,p):
|
|
298
|
+
"""Temperature from enthalpy and pressure
|
|
299
|
+
T = _th2c(h,p)
|
|
300
|
+
|
|
301
|
+
Applies the inverse relations for region 2c to calculate temperature from
|
|
302
|
+
enthalpy and pressure.
|
|
303
|
+
"""
|
|
304
|
+
eta = h/2000.
|
|
305
|
+
pi = p/10.
|
|
306
|
+
T,_,_,_,_,_ = self._peval(pi+25., eta-1.8,self.data['th2c'],order=0)
|
|
307
|
+
return T
|
|
308
|
+
|
|
309
|
+
def _ts2a(self,s,p):
|
|
310
|
+
"""Temperature from entropy and pressure
|
|
311
|
+
T = _ts2a(s,p)
|
|
312
|
+
|
|
313
|
+
Applies the inverse relations for region 2a to calculate temperature from
|
|
314
|
+
enthalpy and pressure.
|
|
315
|
+
"""
|
|
316
|
+
sigma = s/2.
|
|
317
|
+
pi = p/10.
|
|
318
|
+
T,_,_,_,_,_ = self._peval(pi**.25, sigma-2.,self.data['ts2a'],order=0)
|
|
319
|
+
return T
|
|
320
|
+
|
|
321
|
+
def _ts2b(self,s,p):
|
|
322
|
+
"""Temperature from entropy and pressure
|
|
323
|
+
T = _ts2b(s,p)
|
|
324
|
+
|
|
325
|
+
Applies the inverse relations for region 2b to calculate temperature from
|
|
326
|
+
enthalpy and pressure.
|
|
327
|
+
"""
|
|
328
|
+
sigma = s/.7853
|
|
329
|
+
pi = p/10.
|
|
330
|
+
T,_,_,_,_,_ = self._peval(pi, 10.-sigma,self.data['ts2b'],order=0)
|
|
331
|
+
return T
|
|
332
|
+
|
|
333
|
+
def _ts2c(self,s,p):
|
|
334
|
+
"""Temperature from entropy and pressure
|
|
335
|
+
T = _ts2c(s,p)
|
|
336
|
+
|
|
337
|
+
Applies the inverse relations for region 2c to calculate temperature from
|
|
338
|
+
enthalpy and pressure.
|
|
339
|
+
"""
|
|
340
|
+
sigma = s/2.9251
|
|
341
|
+
pi = p/10.
|
|
342
|
+
T,_,_,_,_,_ = self._peval(pi, 2.-sigma,self.data['ts2c'],order=0)
|
|
343
|
+
return T
|
|
344
|
+
|
|
345
|
+
|
|
346
|
+
def _f3(self,T,p,order=2):
|
|
347
|
+
"""Helmholtz free energy for region 3
|
|
348
|
+
f,fx,fy,fxx,fxy,fyy,delta = _d3(T,p,order=2)
|
|
349
|
+
|
|
350
|
+
"""
|
|
351
|
+
if T.ndim>0:
|
|
352
|
+
n = np.zeros(T.shape)
|
|
353
|
+
t = np.zeros(T.shape)
|
|
354
|
+
f = np.zeros(T.shape)
|
|
355
|
+
fx = np.zeros(T.shape)
|
|
356
|
+
fy = np.zeros(T.shape)
|
|
357
|
+
fxx = np.zeros(T.shape)
|
|
358
|
+
fxy = np.zeros(T.shape)
|
|
359
|
+
fyy = np.zeros(T.shape)
|
|
360
|
+
for index in range(T.size):
|
|
361
|
+
(n[index], t[index], f[index],fx[index],fy[index],fxx[index],
|
|
362
|
+
fxy[index], fyy[index]) = self._f3(T[index],p[index])
|
|
363
|
+
return n,t,f,fx,fy,fxx,fxy,fyy
|
|
364
|
+
|
|
365
|
+
# static configuration parameters
|
|
366
|
+
R = self.data['R'] # ideal gas constant
|
|
367
|
+
dc = self.data['dc'] # critical density
|
|
368
|
+
Tc = self.data['Tc'] # critical temperature
|
|
369
|
+
r3 = self.data['r3']
|
|
370
|
+
A = self.data['r3ln'] # natural log coefficient
|
|
371
|
+
|
|
372
|
+
# initialization
|
|
373
|
+
N = 14
|
|
374
|
+
# nondimensionalize parameters
|
|
375
|
+
pp = p * 1e2 / (dc * R * T) # dimensionless target pressure
|
|
376
|
+
t = Tc / T # dimensionless temperature inverse
|
|
377
|
+
# create a helper funciton to calculate the pressure
|
|
378
|
+
# _pfromd() quietly updates N, pt, dpt, and enew
|
|
379
|
+
# it is also responsible for evaluating the curve fit
|
|
380
|
+
# and its derivatives in the third region
|
|
381
|
+
def _pfromd(nnew):
|
|
382
|
+
# Evaluate the curve fit polynomial terms
|
|
383
|
+
f,fx,fy,fxx,fxy,fyy = self._peval(nnew,t,r3)
|
|
384
|
+
# Modify the function and its derivatives to include the
|
|
385
|
+
# logarithmic terms.
|
|
386
|
+
f += A*np.log(nnew)
|
|
387
|
+
DLN = A/nnew
|
|
388
|
+
fx += DLN
|
|
389
|
+
fxx -= DLN/nnew
|
|
390
|
+
# Calculate the dimensionless pressure
|
|
391
|
+
pc = nnew*nnew*fx
|
|
392
|
+
# aggregate the values
|
|
393
|
+
values = (f,fx,fy,fxx,fxy,fyy)
|
|
394
|
+
return pc, values
|
|
395
|
+
|
|
396
|
+
# use bisection to find dimensionless density
|
|
397
|
+
na = 0.10 # minimum dimensionless density
|
|
398
|
+
nb = 2.4 # maximum dimensionless density
|
|
399
|
+
# continue until we exceed the iteration limit
|
|
400
|
+
for index in range(N):
|
|
401
|
+
nc = 0.5*(na+nb)
|
|
402
|
+
pc,values = _pfromd(nc)
|
|
403
|
+
if pc>pp:
|
|
404
|
+
nb = nc
|
|
405
|
+
else:
|
|
406
|
+
na = nc
|
|
407
|
+
|
|
408
|
+
return (nc,t) + tuple(values)
|
|
409
|
+
|
|
410
|
+
|
|
411
|
+
|
|
412
|
+
def _th3(self,h,p,Tinit=None,dinit=500.):
|
|
413
|
+
"""Temperature from enthalpy and pressure in region 3
|
|
414
|
+
T = _th3(h,p,Tinit,dinit)
|
|
415
|
+
|
|
416
|
+
Unlike the other region evaluation functions, _th3 does NOT accept
|
|
417
|
+
arrays. It requires initial values for temperature (Tinit) and
|
|
418
|
+
density (dinit).
|
|
419
|
+
|
|
420
|
+
The IF-97 document does not supply inverse relationships in regime 3.
|
|
421
|
+
Instead, _th3 uses Newton iteration to match enthalpy and pressure.
|
|
422
|
+
In order to know that the point lies in region 3, the controlling
|
|
423
|
+
algorithm will already need to have evaluated the enthalpy at the
|
|
424
|
+
region 3 boundary with region 1 and region 2 with pressure p.
|
|
425
|
+
"""
|
|
426
|
+
# Define some important constants
|
|
427
|
+
R = self.data['R'] # ideal gas constant
|
|
428
|
+
dc = self.data['dc'] # critical density
|
|
429
|
+
Tc = self.data['Tc'] # critical temperature
|
|
430
|
+
A = self.data['r3ln'] # natural log coefficient
|
|
431
|
+
maxiter = 200 # maximum iterations
|
|
432
|
+
epsilon = 1e-5
|
|
433
|
+
# This is the convergence threshold for error^2
|
|
434
|
+
# Computing the square of error saves the square root
|
|
435
|
+
threshold = epsilon*epsilon
|
|
436
|
+
|
|
437
|
+
# nondimensionalize parameters
|
|
438
|
+
pp = p * 1e2 / (dc * R * Tc) # dimensionless target pressure
|
|
439
|
+
hh = h / (R * Tc) # dimensionless target enthalpy (sortof)
|
|
440
|
+
n = dinit/dc # dimensionless density (delta)
|
|
441
|
+
t = Tc/Tinit # dimensionless temperature (tau)
|
|
442
|
+
|
|
443
|
+
n_old = n
|
|
444
|
+
t_old = t
|
|
445
|
+
error_old = float('inf')
|
|
446
|
+
dx = np.array([0.,0.])
|
|
447
|
+
for count in range(maxiter):
|
|
448
|
+
f,fx,fy,fxx,fxy,fyy = self._peval(n,t,self.data['r3'])
|
|
449
|
+
# Modify the function and its derivatives to include the
|
|
450
|
+
# logarithmic terms.
|
|
451
|
+
f += A*np.log(n)
|
|
452
|
+
DLN = A/n
|
|
453
|
+
fx += DLN
|
|
454
|
+
fxx -= DLN/n
|
|
455
|
+
|
|
456
|
+
ptest = n*n*fx/t - pp
|
|
457
|
+
htest = n*fx/t + fy - hh
|
|
458
|
+
|
|
459
|
+
# calculate the new square of error
|
|
460
|
+
# This is the 2D distance from the target point.
|
|
461
|
+
error = ptest*ptest + htest*htest
|
|
462
|
+
|
|
463
|
+
# Test for convergence
|
|
464
|
+
if error < threshold:
|
|
465
|
+
return Tc/t
|
|
466
|
+
# If the error in both variables is not reduced, cut the step size
|
|
467
|
+
# in half and repeat: this is back-tracking along the line of
|
|
468
|
+
# descent to look for a valley.
|
|
469
|
+
elif error >= error_old:
|
|
470
|
+
#print t,n,htest,ptest,'*'
|
|
471
|
+
dx /= 2.
|
|
472
|
+
n = n_old + dx[0]
|
|
473
|
+
t = t_old + dx[1]
|
|
474
|
+
# Otherwise, use the typical Newton algorithm
|
|
475
|
+
else:
|
|
476
|
+
#print t,n,htest,ptest
|
|
477
|
+
# Retire the current error and n,t values
|
|
478
|
+
error_old = error
|
|
479
|
+
n_old = n
|
|
480
|
+
t_old = t
|
|
481
|
+
|
|
482
|
+
dpdn = n/t * (2.*fx + n*fxx)
|
|
483
|
+
dpdt = n*n/t * (fxy - fx/t)
|
|
484
|
+
dhdn = fxy + (fx + n*fxx)/t
|
|
485
|
+
dhdt = fyy + n/t*(fxy - fx/t)
|
|
486
|
+
dx = np.linalg.solve(
|
|
487
|
+
[[dpdn, dpdt],[dhdn, dhdt]], [-ptest, -htest])
|
|
488
|
+
n += dx[0]
|
|
489
|
+
t += dx[1]
|
|
490
|
+
raise pyro.utility.PMAnalysisError('Steam _th3 failed to converge. h=%f, p=%f'%(h,p))
|
|
491
|
+
|
|
492
|
+
|
|
493
|
+
|
|
494
|
+
def _ts3(self,s,p,Tinit,dinit=500.):
|
|
495
|
+
"""Temperature from entropy and pressure in region 3
|
|
496
|
+
T = _ts3(h,p,Tinit,dinit)
|
|
497
|
+
|
|
498
|
+
Unlike the other region evaluation functions, _ts3 does NOT accept
|
|
499
|
+
arrays. It requires initial values for temperature (Tinit) and
|
|
500
|
+
density (dinit).
|
|
501
|
+
|
|
502
|
+
The IF-97 document does not supply inverse relationships in regime 3.
|
|
503
|
+
Instead, _th3 uses Newton iteration to match enthalpy and pressure.
|
|
504
|
+
In order to know that the point lies in region 3, the controlling
|
|
505
|
+
algorithm will already need to have evaluated the enthalpy at the
|
|
506
|
+
region 3 boundary with region 1 and region 2 with pressure p.
|
|
507
|
+
"""
|
|
508
|
+
|
|
509
|
+
# Define some important constants
|
|
510
|
+
R = self.data['R'] # ideal gas constant
|
|
511
|
+
dc = self.data['dc'] # critical density
|
|
512
|
+
Tc = self.data['Tc'] # critical temperature
|
|
513
|
+
A = self.data['r3ln'] # natural log coefficient
|
|
514
|
+
maxiter = 200 # maximum iterations
|
|
515
|
+
epsilon = 1e-5
|
|
516
|
+
# This is the convergence threshold for error^2
|
|
517
|
+
# Computing the square of error saves the square root
|
|
518
|
+
threshold = epsilon*epsilon
|
|
519
|
+
|
|
520
|
+
# nondimensionalize parameters
|
|
521
|
+
pp = p * 1e2 / (dc * R * Tc) # dimensionless target pressure
|
|
522
|
+
ss = s / R # dimensionless target enthalpy
|
|
523
|
+
n = dinit/dc # dimensionless density (delta)
|
|
524
|
+
t = Tc/Tinit # dimensionless temperature (tau)
|
|
525
|
+
|
|
526
|
+
n_old = n
|
|
527
|
+
t_old = t
|
|
528
|
+
error_old = float('inf')
|
|
529
|
+
dx = np.array([0.,0.])
|
|
530
|
+
for count in range(maxiter):
|
|
531
|
+
f,fx,fy,fxx,fxy,fyy = self._peval(n,t,self.data['r3'])
|
|
532
|
+
# Modify the function and its derivatives to include the
|
|
533
|
+
# logarithmic terms.
|
|
534
|
+
f += A*np.log(n)
|
|
535
|
+
DLN = A/n
|
|
536
|
+
fx += DLN
|
|
537
|
+
fxx -= DLN/n
|
|
538
|
+
|
|
539
|
+
ptest = n*n*fx/t - pp
|
|
540
|
+
stest = t*fy - f - ss
|
|
541
|
+
|
|
542
|
+
# calculate the new square of error
|
|
543
|
+
# This is the 2D distance from the target point.
|
|
544
|
+
error = ptest*ptest + stest*stest
|
|
545
|
+
|
|
546
|
+
# Test for convergence
|
|
547
|
+
if error < threshold:
|
|
548
|
+
return Tc/t
|
|
549
|
+
# If the error in both variables is not reduced, cut the step size
|
|
550
|
+
# in half and repeat: this is back-tracking along the line of
|
|
551
|
+
# descent to look for a valley.
|
|
552
|
+
elif error >= error_old:
|
|
553
|
+
#print t,n,htest,ptest,'*'
|
|
554
|
+
dx /= 2.
|
|
555
|
+
n = n_old + dx[0]
|
|
556
|
+
t = t_old + dx[1]
|
|
557
|
+
# Otherwise, use the typical Newton algorithm
|
|
558
|
+
else:
|
|
559
|
+
#print t,n,htest,ptest
|
|
560
|
+
# Retire the current error and n,t values
|
|
561
|
+
error_old = error
|
|
562
|
+
n_old = n
|
|
563
|
+
t_old = t
|
|
564
|
+
|
|
565
|
+
dpdn = n/t * (2.*fx + n*fxx)
|
|
566
|
+
dpdt = n*n/t * (fxy - fx/t)
|
|
567
|
+
dsdn = t*fxy - fx
|
|
568
|
+
dsdt = t*fyy
|
|
569
|
+
dx = np.linalg.solve(
|
|
570
|
+
[[dpdn, dpdt],[dsdn, dsdt]], [-ptest, -stest])
|
|
571
|
+
n += dx[0]
|
|
572
|
+
t += dx[1]
|
|
573
|
+
raise pyro.utility.PMAnalysisError('Steam _ts3 failed to converge. s=%f, p=%f'%(s,p))
|
|
574
|
+
|
|
575
|
+
|
|
576
|
+
def _g5(self,T,p,order=2):
|
|
577
|
+
"""Gibbs energy in region 5
|
|
578
|
+
g,gp,gt,gpp,gpt,gtt = _g2(T,p,order=2)
|
|
579
|
+
|
|
580
|
+
Calculates the dimensionless gibbs free energy and its derivatives in
|
|
581
|
+
region 5. The 'order' keyword indicates the number of derivatives to
|
|
582
|
+
calculate.
|
|
583
|
+
"""
|
|
584
|
+
# apply the region 5 scaling
|
|
585
|
+
t = 1000./T
|
|
586
|
+
pi = p/10.
|
|
587
|
+
g,gp,gt,gpp,gpt,gtt = self._peval(pi,t,self.data['r5o'],order=order)
|
|
588
|
+
gr,grp,grt,grpp,grpt,grtt = self._peval(pi,t,self.data['r5r'],order=order)
|
|
589
|
+
LP = np.log(pi)
|
|
590
|
+
g+=(gr + LP)
|
|
591
|
+
if order>0:
|
|
592
|
+
LP = 1./pi
|
|
593
|
+
gp+=(grp + LP)
|
|
594
|
+
gt+=grt
|
|
595
|
+
if order>1:
|
|
596
|
+
LP = -LP/pi
|
|
597
|
+
gpp+=(grpp+LP)
|
|
598
|
+
gpt+=grpt
|
|
599
|
+
gtt+=grtt
|
|
600
|
+
return pi,t,g,gp,gt,gpp,gpt,gtt
|
|
601
|
+
|
|
602
|
+
|
|
603
|
+
def _th5(self,h,p,Tinit):
|
|
604
|
+
"""Temperature from enthalpy and pressure in region 5
|
|
605
|
+
T = _th5(h,p,Tinit)
|
|
606
|
+
|
|
607
|
+
Unlike the other region evaluation functions, _th5 does NOT accept
|
|
608
|
+
arrays. It requires an initial value for temperature (Tinit).
|
|
609
|
+
|
|
610
|
+
The IF-97 document does not supply inverse relationships in regime 5.
|
|
611
|
+
Instead, _th5 uses Newton iteration to match enthalpy and pressure.
|
|
612
|
+
In order to know that the point lies in region 5, the controlling
|
|
613
|
+
algorithm will already need to have evaluated the enthalpy at the
|
|
614
|
+
region 5 boundary with region 2 with pressure p.
|
|
615
|
+
"""
|
|
616
|
+
# Define some important constants
|
|
617
|
+
R = self.data['R'] # ideal gas constant
|
|
618
|
+
ps = 10. # pressure scale
|
|
619
|
+
Ts = 1000. # temperature scale
|
|
620
|
+
maxiter = 30 # maximum iterations
|
|
621
|
+
epsilon = 1e-6
|
|
622
|
+
# nondimensional terms
|
|
623
|
+
t = Ts/Tinit
|
|
624
|
+
hh = h/R/Ts
|
|
625
|
+
|
|
626
|
+
for count in range(maxiter):
|
|
627
|
+
_,_,g,gp,gt,gpp,gpt,gtt = self._g5(T=Ts/t, p=p, order=2)
|
|
628
|
+
htest = gt - hh
|
|
629
|
+
if abs(htest)<epsilon*hh:
|
|
630
|
+
return Ts/t
|
|
631
|
+
dhdt = gtt
|
|
632
|
+
t -= htest/dhdt
|
|
633
|
+
raise pyro.utility.PMAnalysisError('Steam _th5() failed to converge.')
|
|
634
|
+
|
|
635
|
+
|
|
636
|
+
def _ts5(self,s,p,Tinit):
|
|
637
|
+
"""Temperature from entropy and pressure in region 5
|
|
638
|
+
T = _ts5(s,p,Tinit)
|
|
639
|
+
|
|
640
|
+
Unlike the other region evaluation functions, _ts5 does NOT accept
|
|
641
|
+
arrays. It requires an initial value for temperature (Tinit).
|
|
642
|
+
|
|
643
|
+
The IF-97 document does not supply inverse relationships in regime 5.
|
|
644
|
+
Instead, _th5 uses Newton iteration to match entropy and pressure.
|
|
645
|
+
In order to know that the point lies in region 5, the controlling
|
|
646
|
+
algorithm will already need to have evaluated the enthalpy at the
|
|
647
|
+
region 5 boundary with region 2 with pressure p.
|
|
648
|
+
"""
|
|
649
|
+
# Define some important constants
|
|
650
|
+
R = self.data['R'] # ideal gas constant
|
|
651
|
+
ps = 10. # pressure scale
|
|
652
|
+
Ts = 1000. # temperature scale
|
|
653
|
+
maxiter = 30 # maximum iterations
|
|
654
|
+
epsilon = 1e-6
|
|
655
|
+
# nondimensional terms
|
|
656
|
+
t = Ts/Tinit
|
|
657
|
+
ss = s/R
|
|
658
|
+
|
|
659
|
+
for count in range(maxiter):
|
|
660
|
+
_,_,g,gp,gt,gpp,gpt,gtt = self._g5(T=Ts/t, p=p, order=2)
|
|
661
|
+
stest = t*gt - g - ss
|
|
662
|
+
if abs(stest)<epsilon*ss:
|
|
663
|
+
return Ts/t
|
|
664
|
+
dsdt = t*gtt
|
|
665
|
+
t -= stest/dsdt
|
|
666
|
+
raise pyro.utility.PMAnalysisError('Steam _ts5() failed to converge.')
|
|
667
|
+
|
|
668
|
+
|
|
669
|
+
def _b23(self,T=None,p=None):
|
|
670
|
+
"""Calculate the 2-3 T,p boundary
|
|
671
|
+
p = _b23(T=T)
|
|
672
|
+
or
|
|
673
|
+
T = _b23(p=p)
|
|
674
|
+
Which ever is supplied (T or p), _b23 supplies the other. Uses the B23
|
|
675
|
+
equations 5 and 6 modified for pressure in bar.
|
|
676
|
+
"""
|
|
677
|
+
if T is not None:
|
|
678
|
+
n = self.data['b23']
|
|
679
|
+
return (n[2]*T + n[1])*T + n[0]
|
|
680
|
+
elif p is not None:
|
|
681
|
+
n = self.data['b23']
|
|
682
|
+
return n[3] + np.sqrt((p-n[4])/n[2])
|
|
683
|
+
else:
|
|
684
|
+
raise Exception('_b23 requires either T or p')
|
|
685
|
+
|
|
686
|
+
|
|
687
|
+
def _b2bc(self,h=None,p=None):
|
|
688
|
+
"""Calculate the 2b-2c h,p boundary
|
|
689
|
+
h = _b2bc(p=p)
|
|
690
|
+
or
|
|
691
|
+
p = _b2bc(h=h)
|
|
692
|
+
Which ever is supplied (h or p), _b2bc supplies the other. Uses the B2bc
|
|
693
|
+
equations 20 and 21 modified for pressure in bar.
|
|
694
|
+
"""
|
|
695
|
+
if h is not None:
|
|
696
|
+
n = self.data['b2bc']
|
|
697
|
+
return (n[2]*h + n[1])*h + n[0]
|
|
698
|
+
elif p is not None:
|
|
699
|
+
n = self.data['b2bc']
|
|
700
|
+
return n[3] + np.sqrt((p-n[4])/n[2])
|
|
701
|
+
else:
|
|
702
|
+
raise Exception('_b2bc requires either h or p')
|
|
703
|
+
|
|
704
|
+
|
|
705
|
+
def _region(self,T,p):
|
|
706
|
+
"""Identify the region in the IF97 model
|
|
707
|
+
r = mps._region(T,p)
|
|
708
|
+
|
|
709
|
+
For a scalar T and p, returns the IF-97 region index. If a valid region
|
|
710
|
+
is not found, _region() returns -1.
|
|
711
|
+
|
|
712
|
+
Accepts K, bar
|
|
713
|
+
Returns dimensionless
|
|
714
|
+
"""
|
|
715
|
+
nan = -1
|
|
716
|
+
|
|
717
|
+
T13 = 623.15
|
|
718
|
+
T32 = 863.15
|
|
719
|
+
T25 = 1073.15
|
|
720
|
+
Tmin = 273.15
|
|
721
|
+
Tmax = 2273.15
|
|
722
|
+
pmax = 1000.
|
|
723
|
+
p5max = 500.
|
|
724
|
+
|
|
725
|
+
pc = self.data['pc']
|
|
726
|
+
Tc = self.data['Tc']
|
|
727
|
+
|
|
728
|
+
if p<0. or p>pmax:
|
|
729
|
+
return nan
|
|
730
|
+
elif T>Tmax:
|
|
731
|
+
return nan
|
|
732
|
+
elif T>T25:
|
|
733
|
+
if p>p5max:
|
|
734
|
+
return nan
|
|
735
|
+
else:
|
|
736
|
+
return 5
|
|
737
|
+
elif T>T32:
|
|
738
|
+
return 2
|
|
739
|
+
elif T>T13:
|
|
740
|
+
# Test pressure against the 2-3 boundary
|
|
741
|
+
if p<self._b23(T=T):
|
|
742
|
+
return 2
|
|
743
|
+
else:
|
|
744
|
+
# we're in region 3.
|
|
745
|
+
return 3
|
|
746
|
+
else:
|
|
747
|
+
if p<self._ps(T):
|
|
748
|
+
return 2
|
|
749
|
+
else:
|
|
750
|
+
return 1
|
|
751
|
+
raise Exception('Unhandled exception in IF97 _region()')
|
|
752
|
+
|
|
753
|
+
|
|
754
|
+
def _ps(self, T):
|
|
755
|
+
"""Saturation pressure
|
|
756
|
+
Accepts K
|
|
757
|
+
Returns bar
|
|
758
|
+
"""
|
|
759
|
+
r4 = self.data['r4']
|
|
760
|
+
n10 = r4[9]
|
|
761
|
+
n9 = r4[8]
|
|
762
|
+
# calculate the scaled temperature
|
|
763
|
+
t = T + n9/(T-n10)
|
|
764
|
+
# calculate the quadratic coefficients
|
|
765
|
+
a = (t + r4[0])*t + r4[1]
|
|
766
|
+
b = (r4[2]*t + r4[3])*t + r4[4]
|
|
767
|
+
c = (r4[5]*t + r4[6])*t + r4[7]
|
|
768
|
+
pmpa = (2.*c / (-b + np.sqrt(b*b-4.*a*c)))**4
|
|
769
|
+
# IF97 reports pressure in MPa
|
|
770
|
+
# convert to bar
|
|
771
|
+
return pmpa*10.
|
|
772
|
+
|
|
773
|
+
|
|
774
|
+
def _Ts(self, p):
|
|
775
|
+
"""Saturation temperature
|
|
776
|
+
Accepts bar
|
|
777
|
+
Returns K
|
|
778
|
+
"""
|
|
779
|
+
r4 = self.data['r4']
|
|
780
|
+
n10 = r4[9]
|
|
781
|
+
n9 = r4[8]
|
|
782
|
+
pp = (p / 10.)**.25
|
|
783
|
+
# calculate the quadratic coefficients
|
|
784
|
+
a = (pp + r4[2])*pp + r4[5]
|
|
785
|
+
b = (r4[0]*pp + r4[3])*pp + r4[6]
|
|
786
|
+
c = (r4[1]*pp + r4[4])*pp + r4[7]
|
|
787
|
+
# compute the scaled temperature
|
|
788
|
+
t = 2.*c / (-b - np.sqrt(b*b-4.*a*c))
|
|
789
|
+
# de-scale the temperature
|
|
790
|
+
tt = n10 + t
|
|
791
|
+
T = 0.5*(tt - np.sqrt(tt*tt - 4*(n9+n10*t)))
|
|
792
|
+
return T
|
|
793
|
+
|
|
794
|
+
|
|
795
|
+
|
|
796
|
+
def Tlim(self,p=None):
|
|
797
|
+
"""Returns the upper and lower temperature limit
|
|
798
|
+
(Tmin, Tmax) = Tlim(p)
|
|
799
|
+
|
|
800
|
+
The IF-97 report has a piece-wise limit based on pressure. If pressure
|
|
801
|
+
is omitted, it obeys the same defaults as with any other property.
|
|
802
|
+
If all p are in the same range, then Tmax will be compressed into a
|
|
803
|
+
scalar. Otherwise, Tmax will be an array with the same dimension as p.
|
|
804
|
+
Tmin is always the same value, regardless of p, so it will always be
|
|
805
|
+
a scalar.
|
|
806
|
+
"""
|
|
807
|
+
if p is None:
|
|
808
|
+
p = pyro.config['def_p']
|
|
809
|
+
if not isinstance(p,np.ndarray):
|
|
810
|
+
p = np.array(p)
|
|
811
|
+
p = pyro.units.pressure(p,to_units='bar')
|
|
812
|
+
|
|
813
|
+
# First, parse out the Tmax limit
|
|
814
|
+
# Test the range for each element of p
|
|
815
|
+
RR = (p > 500.)
|
|
816
|
+
|
|
817
|
+
bigT = pyro.units.temperature_scale(2273.15, from_units='K')
|
|
818
|
+
smallT = pyro.units.temperature_scale(1073.15, from_units='K')
|
|
819
|
+
# If all of the pressures are in one of the ranges, let Tmax be a scalar
|
|
820
|
+
if RR.all():
|
|
821
|
+
Tmax = smallT
|
|
822
|
+
elif not RR.any():
|
|
823
|
+
Tmax = bigT
|
|
824
|
+
else:
|
|
825
|
+
# Otherwise, iterate element by element
|
|
826
|
+
# This is more complicated than boolean indexing, but it handles
|
|
827
|
+
# the scalar case gracefully
|
|
828
|
+
it = np.nditer((None,RR),
|
|
829
|
+
op_flags=[['readwrite','allocate'],['readonly','copy']],
|
|
830
|
+
op_dtypes='float')
|
|
831
|
+
|
|
832
|
+
for Tmax_,RR_ in it:
|
|
833
|
+
if RR_:
|
|
834
|
+
Tmax_[...] = smallT
|
|
835
|
+
else:
|
|
836
|
+
Tmax_[...] = bigT
|
|
837
|
+
|
|
838
|
+
Tmax = it.operands[0]
|
|
839
|
+
# Tmin is always the same regardless, so it is always a scalar
|
|
840
|
+
Tmin = pyro.units.temperature_scale(273.15, from_units='K')
|
|
841
|
+
return Tmin, Tmax
|
|
842
|
+
|
|
843
|
+
|
|
844
|
+
def plim(self,T=None):
|
|
845
|
+
"""Returns the upper and lower pressure limit
|
|
846
|
+
(pmin, pmax) = plim(T)
|
|
847
|
+
|
|
848
|
+
The IF-97 report has a piece-wise limit based on Temperature. If T
|
|
849
|
+
is omitted, it obeys the same defaults as with any other property.
|
|
850
|
+
If all T are in the same range, then pmax will be compressed into a
|
|
851
|
+
scalar. Otherwise, pmax will be an array with the same dimension as T.
|
|
852
|
+
pmin is always the same value, regardless of p, so it will always be
|
|
853
|
+
a scalar.
|
|
854
|
+
"""
|
|
855
|
+
if T is None:
|
|
856
|
+
T = pyro.config['def_T']
|
|
857
|
+
if not isinstance(T,np.ndarray):
|
|
858
|
+
T = np.array(T)
|
|
859
|
+
T = pyro.units.temperature_scale(T,to_units='K')
|
|
860
|
+
|
|
861
|
+
# First, parse out the Tmax limit
|
|
862
|
+
# Test the range for each element of p
|
|
863
|
+
RR = (T > 1073.15)
|
|
864
|
+
|
|
865
|
+
bigp = pyro.units.pressure(1000., from_units='bar')
|
|
866
|
+
smallp = pyro.units.pressure(500., from_units='bar')
|
|
867
|
+
# If all of the pressures are in one of the ranges, let Tmax be a scalar
|
|
868
|
+
if RR.all():
|
|
869
|
+
pmax = smallp
|
|
870
|
+
elif not RR.any():
|
|
871
|
+
pmax = bigp
|
|
872
|
+
else:
|
|
873
|
+
# Otherwise, iterate element by element
|
|
874
|
+
# This is more complicated than boolean indexing, but it handles
|
|
875
|
+
# the scalar case gracefully
|
|
876
|
+
it = np.nditer((None,RR),
|
|
877
|
+
op_flags=[['readwrite','allocate'],['readonly','copy']],
|
|
878
|
+
op_dtypes='float')
|
|
879
|
+
|
|
880
|
+
for pmax_,RR_ in it:
|
|
881
|
+
if RR_:
|
|
882
|
+
pmax_[...] = smallp
|
|
883
|
+
else:
|
|
884
|
+
pmax_[...] = bigp
|
|
885
|
+
|
|
886
|
+
pmax = it.operands[0]
|
|
887
|
+
# pmin is always the same regardless, so it is always a scalar
|
|
888
|
+
pmin = pyro.units.pressure(self.data['pt'], from_units='bar')
|
|
889
|
+
return pmin, pmax
|
|
890
|
+
|
|
891
|
+
|
|
892
|
+
def critical(self):
|
|
893
|
+
"""Returns the critical point
|
|
894
|
+
(Tc,pc) = critical()
|
|
895
|
+
|
|
896
|
+
Accepts None
|
|
897
|
+
Returns unit_temperature, unit_pressure
|
|
898
|
+
"""
|
|
899
|
+
T = pyro.units.temperature_scale(self.data['Tc'], from_units='K')
|
|
900
|
+
p = pyro.units.pressure(self.data['pc'], from_units='bar')
|
|
901
|
+
return T,p
|
|
902
|
+
|
|
903
|
+
|
|
904
|
+
|
|
905
|
+
def triple(self):
|
|
906
|
+
"""Returns the tripple point
|
|
907
|
+
(Tt,pt) = triple()
|
|
908
|
+
|
|
909
|
+
Accepts None
|
|
910
|
+
Returns unit_temperature, unit_pressure
|
|
911
|
+
"""
|
|
912
|
+
T = pyro.units.temperature_scale(self.data['Tt'], from_units='K')
|
|
913
|
+
p = pyro.units.pressure(self.data['pt'], from_units='bar')
|
|
914
|
+
return T,p
|
|
915
|
+
|
|
916
|
+
|
|
917
|
+
|
|
918
|
+
def ps(self,T=None):
|
|
919
|
+
"""Saturation pressure
|
|
920
|
+
ps(T)
|
|
921
|
+
Return the saturation pressure as a function of temperature.
|
|
922
|
+
|
|
923
|
+
Accepts unit_temperature
|
|
924
|
+
Returns unit_pressure
|
|
925
|
+
"""
|
|
926
|
+
if T is None:
|
|
927
|
+
T = pyro.config['def_T']
|
|
928
|
+
if not isinstance(T,np.ndarray):
|
|
929
|
+
T = np.array(T)
|
|
930
|
+
|
|
931
|
+
T = pyro.units.temperature_scale(T, to_units='K')
|
|
932
|
+
|
|
933
|
+
if (T < self.data['Tt']).any():
|
|
934
|
+
raise pyro.utility.PMParamError(
|
|
935
|
+
'Saturation properties are not available below the triple point.')
|
|
936
|
+
if (T > self.data['Tc']).any():
|
|
937
|
+
raise pyro.utility.PMParamError(
|
|
938
|
+
'Saturation properties are not available above the critical point.')
|
|
939
|
+
|
|
940
|
+
return pyro.units.pressure(self._ps(T), from_units='bar')
|
|
941
|
+
|
|
942
|
+
|
|
943
|
+
|
|
944
|
+
def Ts(self,p=None):
|
|
945
|
+
"""Saturation temperature
|
|
946
|
+
Ts(p)
|
|
947
|
+
Returns the saturation temperature as a function of pressure.
|
|
948
|
+
|
|
949
|
+
Accepts unit_pressure
|
|
950
|
+
Returns unit_temperature
|
|
951
|
+
"""
|
|
952
|
+
if p is None:
|
|
953
|
+
p = pyro.config['def_p']
|
|
954
|
+
if not isinstance(p,np.ndarray):
|
|
955
|
+
p = np.array(p)
|
|
956
|
+
|
|
957
|
+
p = pyro.units.pressure(p, to_units='bar')
|
|
958
|
+
|
|
959
|
+
if (p < self.data['pt']).any():
|
|
960
|
+
raise pyro.utility.PMParamError(
|
|
961
|
+
'Saturation properties are not available below the triple point.')
|
|
962
|
+
if (p > self.data['pc']).any():
|
|
963
|
+
raise pyro.utility.PMParamError(
|
|
964
|
+
'Saturation properties are not available above the critical point.')
|
|
965
|
+
|
|
966
|
+
T = self._Ts(p)
|
|
967
|
+
return pyro.units.temperature_scale(T, from_units='K')
|
|
968
|
+
|
|
969
|
+
|
|
970
|
+
def hs(self, T=None, p=None, tp=False):
|
|
971
|
+
"""Saturation enthalpy (kJ/kg)
|
|
972
|
+
(hL, hV) = hs(...)
|
|
973
|
+
|
|
974
|
+
Saturation properties are calculated in the liquid (L) and vapor (V)
|
|
975
|
+
states at the saturation condition. Saturation properties can be
|
|
976
|
+
calculated from either the temperature or the pressure or both. If one
|
|
977
|
+
is provided, the other will be calculated. If both are provided, hs
|
|
978
|
+
assumes that the user has already called Ts() or ps(), and skips the
|
|
979
|
+
calculation. Most users will want to pass only one property to avoid
|
|
980
|
+
the potential for error.
|
|
981
|
+
|
|
982
|
+
If neither T or p are provided, the saturation properties will use the
|
|
983
|
+
the 'def_p' config parameter. To prompt any of the saturation property
|
|
984
|
+
functions to return their values for temperature and pressure, set the
|
|
985
|
+
'tp' keyword to True.
|
|
986
|
+
|
|
987
|
+
(T,p,hL,hV) = hs(..., tp=True)
|
|
988
|
+
|
|
989
|
+
Accepts unit_temperature
|
|
990
|
+
unit_pressure
|
|
991
|
+
Returns (unit_temperature)
|
|
992
|
+
(unit_pressure)
|
|
993
|
+
unit_energy / unit_matter
|
|
994
|
+
"""
|
|
995
|
+
R = self.data['R']
|
|
996
|
+
# ensure that one property is defined
|
|
997
|
+
# use the default pressure when in doubt
|
|
998
|
+
if T is None and p is None:
|
|
999
|
+
p = pyro.config['def_p']
|
|
1000
|
+
|
|
1001
|
+
if T is not None:
|
|
1002
|
+
TT = pyro.units.temperature_scale(T, to_units='K')
|
|
1003
|
+
if (TT < self.data['Tt']).any():
|
|
1004
|
+
raise pyro.utility.PMParamError(
|
|
1005
|
+
'Saturation properties are not available below the triple point.')
|
|
1006
|
+
if (TT > self.data['Tc']).any():
|
|
1007
|
+
raise pyro.utility.PMParamError(
|
|
1008
|
+
'Saturation properties are not available above the critical point.')
|
|
1009
|
+
|
|
1010
|
+
if p is not None:
|
|
1011
|
+
pp = pyro.units.pressure(p, to_units='bar')
|
|
1012
|
+
if (pp < self.data['pt']).any():
|
|
1013
|
+
raise pyro.utility.PMParamError(
|
|
1014
|
+
'Saturation properties are not available below the triple point.')
|
|
1015
|
+
if (pp > self.data['pc']).any():
|
|
1016
|
+
raise pyro.utility.PMParamError(
|
|
1017
|
+
'Saturation properties are not available above the critical point.')
|
|
1018
|
+
else:
|
|
1019
|
+
pp = self._ps(TT)
|
|
1020
|
+
p = pyro.units.pressure(pp, from_units='bar')
|
|
1021
|
+
|
|
1022
|
+
if T is None:
|
|
1023
|
+
TT = self._Ts(pp)
|
|
1024
|
+
T = pyro.units.temperature_scale(TT, from_units='K')
|
|
1025
|
+
|
|
1026
|
+
if (TT>623.15).any():
|
|
1027
|
+
pyro.utility.print_warning(
|
|
1028
|
+
"Accuracy of steam saturation properties above 623.15K is reduced.")
|
|
1029
|
+
|
|
1030
|
+
scale = pyro.units.energy(from_units='kJ')
|
|
1031
|
+
scale = pyro.units.matter(scale, self.data['mw'], from_units='kg', exponent=-1)
|
|
1032
|
+
|
|
1033
|
+
pi,t,_,_,gt,_,_,_ = self._g1(TT,pp,order=1)
|
|
1034
|
+
hL = scale * R * TT * t * gt
|
|
1035
|
+
pi,t,_,_,gt,_,_,_ = self._g2(TT,pp,order=1)
|
|
1036
|
+
hV = scale * R * TT * t * gt
|
|
1037
|
+
if tp:
|
|
1038
|
+
return (T,p,hL,hV)
|
|
1039
|
+
return hL,hV
|
|
1040
|
+
|
|
1041
|
+
|
|
1042
|
+
|
|
1043
|
+
def es(self, T=None, p=None, tp=False):
|
|
1044
|
+
"""Saturation internal energy (kJ/kg)
|
|
1045
|
+
(eL, eV) = es(...)
|
|
1046
|
+
|
|
1047
|
+
Saturation properties are calculated in the liquid (L) and vapor (V)
|
|
1048
|
+
states at the saturation condition. Saturation properties can be
|
|
1049
|
+
calculated from either the temperature or the pressure or both. If one
|
|
1050
|
+
is provided, the other will be calculated. If both are provided, hs
|
|
1051
|
+
assumes that the user has already called Ts() or ps(), and skips the
|
|
1052
|
+
calculation. Most users will want to pass only one property to avoid
|
|
1053
|
+
the potential for error.
|
|
1054
|
+
|
|
1055
|
+
If neither T or p are provided, the saturation properties will use the
|
|
1056
|
+
the 'def_p' config parameter. To prompt any of the saturation property
|
|
1057
|
+
functions to return their values for temperature and pressure, set the
|
|
1058
|
+
'tp' keyword to True.
|
|
1059
|
+
|
|
1060
|
+
(T,p,eL,eV) = es(..., tp=True)
|
|
1061
|
+
|
|
1062
|
+
Accepts unit_temperature
|
|
1063
|
+
unit_pressure
|
|
1064
|
+
Returns (unit_temperature)
|
|
1065
|
+
(unit_pressure)
|
|
1066
|
+
unit_energy / unit_matter
|
|
1067
|
+
"""
|
|
1068
|
+
R = self.data['R']
|
|
1069
|
+
# ensure that one property is defined
|
|
1070
|
+
# use the default pressure when in doubt
|
|
1071
|
+
if T is None and p is None:
|
|
1072
|
+
p = pyro.config['def_p']
|
|
1073
|
+
|
|
1074
|
+
if T is not None:
|
|
1075
|
+
TT = pyro.units.temperature_scale(T, to_units='K')
|
|
1076
|
+
if (TT < self.data['Tt']).any():
|
|
1077
|
+
raise pyro.utility.PMParamError(
|
|
1078
|
+
'Saturation properties are not available below the triple point.')
|
|
1079
|
+
if (TT > self.data['Tc']).any():
|
|
1080
|
+
raise pyro.utility.PMParamError(
|
|
1081
|
+
'Saturation properties are not available above the critical point.')
|
|
1082
|
+
|
|
1083
|
+
if p is not None:
|
|
1084
|
+
pp = pyro.units.pressure(p, to_units='bar')
|
|
1085
|
+
if (pp < self.data['pt']).any():
|
|
1086
|
+
raise pyro.utility.PMParamError(
|
|
1087
|
+
'Saturation properties are not available below the triple point.')
|
|
1088
|
+
if (pp > self.data['pc']).any():
|
|
1089
|
+
raise pyro.utility.PMParamError(
|
|
1090
|
+
'Saturation properties are not available above the critical point.')
|
|
1091
|
+
else:
|
|
1092
|
+
pp = self._ps(TT)
|
|
1093
|
+
p = pyro.units.pressure(pp, from_units='bar')
|
|
1094
|
+
|
|
1095
|
+
if T is None:
|
|
1096
|
+
TT = self._Ts(pp)
|
|
1097
|
+
T = pyro.units.temperature_scale(TT, from_units='K')
|
|
1098
|
+
|
|
1099
|
+
if (TT>623.15).any():
|
|
1100
|
+
pyro.utility.print_warning(
|
|
1101
|
+
"Accuracy of steam saturation properties above 623.15K is reduced.")
|
|
1102
|
+
|
|
1103
|
+
scale = pyro.units.energy(from_units='kJ')
|
|
1104
|
+
scale = pyro.units.matter(scale, self.data['mw'], from_units='kg', exponent=-1)
|
|
1105
|
+
|
|
1106
|
+
pi,t,_,gp,gt,_,_,_ = self._g1(TT,pp,order=1)
|
|
1107
|
+
eL = scale * TT * R * (t*gt - pi*gp)
|
|
1108
|
+
pi,t,_,gp,gt,_,_,_ = self._g2(TT,pp,order=1)
|
|
1109
|
+
eV = scale * TT * R * (t*gt - pi*gp)
|
|
1110
|
+
if tp:
|
|
1111
|
+
return (T,p,eL,eV)
|
|
1112
|
+
return eL,eV
|
|
1113
|
+
|
|
1114
|
+
|
|
1115
|
+
|
|
1116
|
+
|
|
1117
|
+
def ds(self, T=None, p=None, tp=False):
|
|
1118
|
+
"""Saturation density (kg/m**3)
|
|
1119
|
+
(dL, dV) = ds(...)
|
|
1120
|
+
|
|
1121
|
+
Saturation properties are calculated in the liquid (L) and vapor (V)
|
|
1122
|
+
states at the saturation condition. Saturation properties can be
|
|
1123
|
+
calculated from either the temperature or the pressure or both. If one
|
|
1124
|
+
is provided, the other will be calculated. If both are provided, hs
|
|
1125
|
+
assumes that the user has already called Ts() or ps(), and skips the
|
|
1126
|
+
calculation. Most users will want to pass only one property to avoid
|
|
1127
|
+
the potential for error.
|
|
1128
|
+
|
|
1129
|
+
If neither T or p are provided, the saturation properties will use the
|
|
1130
|
+
the 'def_p' config parameter. To prompt any of the saturation property
|
|
1131
|
+
functions to return their values for temperature and pressure, set the
|
|
1132
|
+
'tp' keyword to True.
|
|
1133
|
+
|
|
1134
|
+
(T,p,dL,dV) = ds(..., tp=True)
|
|
1135
|
+
|
|
1136
|
+
Accepts unit_temperature
|
|
1137
|
+
unit_pressure
|
|
1138
|
+
Returns (unit_temperature)
|
|
1139
|
+
(unit_pressure)
|
|
1140
|
+
unit_matter / unit_volume
|
|
1141
|
+
"""
|
|
1142
|
+
R = self.data['R']
|
|
1143
|
+
# ensure that one property is defined
|
|
1144
|
+
# use the default pressure when in doubt
|
|
1145
|
+
if T is None and p is None:
|
|
1146
|
+
p = pyro.config['def_p']
|
|
1147
|
+
|
|
1148
|
+
if T is not None:
|
|
1149
|
+
TT = pyro.units.temperature_scale(T, to_units='K')
|
|
1150
|
+
if (TT < self.data['Tt']).any():
|
|
1151
|
+
raise pyro.utility.PMParamError(
|
|
1152
|
+
'Saturation properties are not available below the triple point.')
|
|
1153
|
+
if (TT > self.data['Tc']).any():
|
|
1154
|
+
raise pyro.utility.PMParamError(
|
|
1155
|
+
'Saturation properties are not available above the critical point.')
|
|
1156
|
+
|
|
1157
|
+
if p is not None:
|
|
1158
|
+
pp = pyro.units.pressure(p, to_units='bar')
|
|
1159
|
+
if (pp < self.data['pt']).any():
|
|
1160
|
+
raise pyro.utility.PMParamError(
|
|
1161
|
+
'Saturation properties are not available below the triple point.')
|
|
1162
|
+
if (pp > self.data['pc']).any():
|
|
1163
|
+
raise pyro.utility.PMParamError(
|
|
1164
|
+
'Saturation properties are not available above the critical point.')
|
|
1165
|
+
else:
|
|
1166
|
+
pp = self._ps(TT)
|
|
1167
|
+
p = pyro.units.pressure(pp, from_units='bar')
|
|
1168
|
+
|
|
1169
|
+
if T is None:
|
|
1170
|
+
TT = self._Ts(pp)
|
|
1171
|
+
T = pyro.units.temperature_scale(TT, from_units='K')
|
|
1172
|
+
|
|
1173
|
+
if (TT>623.15).any():
|
|
1174
|
+
pyro.utility.print_warning(
|
|
1175
|
+
"Accuracy of steam saturation properties above 623.15K is reduced.")
|
|
1176
|
+
|
|
1177
|
+
scale = pyro.units.volume(from_units='m3',exponent=-1)
|
|
1178
|
+
scale = pyro.units.matter(scale, self.data['mw'], from_units='kg')
|
|
1179
|
+
|
|
1180
|
+
pi,t,_,gp,_,_,_,_ = self._g1(TT,pp,order=1)
|
|
1181
|
+
dL = scale * pp * 100 / (R * TT * pi * gp)
|
|
1182
|
+
pi,t,_,gp,_,_,_,_ = self._g2(TT,pp,order=1)
|
|
1183
|
+
dV = scale * pp * 100 / (R * TT * pi * gp)
|
|
1184
|
+
if tp:
|
|
1185
|
+
return (T,p,dL,dV)
|
|
1186
|
+
return dL,dV
|
|
1187
|
+
|
|
1188
|
+
|
|
1189
|
+
def ss(self, T=None, p=None, tp=False):
|
|
1190
|
+
"""Saturation entropy (kJ/kg/K)
|
|
1191
|
+
(sL, sV) = ss(...)
|
|
1192
|
+
|
|
1193
|
+
Saturation properties are calculated in the liquid (L) and vapor (V)
|
|
1194
|
+
states at the saturation condition. Saturation properties can be
|
|
1195
|
+
calculated from either the temperature or the pressure or both. If one
|
|
1196
|
+
is provided, the other will be calculated. If both are provided, hs
|
|
1197
|
+
assumes that the user has already called Ts() or ps(), and skips the
|
|
1198
|
+
calculation. Most users will want to pass only one property to avoid
|
|
1199
|
+
the potential for error.
|
|
1200
|
+
|
|
1201
|
+
If neither T or p are provided, the saturation properties will use the
|
|
1202
|
+
the 'def_p' config parameter. To prompt any of the saturation property
|
|
1203
|
+
functions to return their values for temperature and pressure, set the
|
|
1204
|
+
'tp' keyword to True.
|
|
1205
|
+
|
|
1206
|
+
(T,p,dL,dV) = ds(..., tp=True)
|
|
1207
|
+
|
|
1208
|
+
Accepts unit_temperature
|
|
1209
|
+
unit_pressure
|
|
1210
|
+
Returns (unit_temperature)
|
|
1211
|
+
(unit_pressure)
|
|
1212
|
+
unit_energy / unit_temperature / unit_matter
|
|
1213
|
+
"""
|
|
1214
|
+
R = self.data['R']
|
|
1215
|
+
# ensure that one property is defined
|
|
1216
|
+
# use the default pressure when in doubt
|
|
1217
|
+
if T is None and p is None:
|
|
1218
|
+
p = pyro.config['def_p']
|
|
1219
|
+
|
|
1220
|
+
if T is not None:
|
|
1221
|
+
TT = pyro.units.temperature_scale(T, to_units='K')
|
|
1222
|
+
if (TT < self.data['Tt']).any():
|
|
1223
|
+
raise pyro.utility.PMParamError(
|
|
1224
|
+
'Saturation properties are not available below the triple point.')
|
|
1225
|
+
if (TT > self.data['Tc']).any():
|
|
1226
|
+
raise pyro.utility.PMParamError(
|
|
1227
|
+
'Saturation properties are not available above the critical point.')
|
|
1228
|
+
|
|
1229
|
+
if p is not None:
|
|
1230
|
+
pp = pyro.units.pressure(p, to_units='bar')
|
|
1231
|
+
if (pp < self.data['pt']).any():
|
|
1232
|
+
raise pyro.utility.PMParamError(
|
|
1233
|
+
'Saturation properties are not available below the triple point.')
|
|
1234
|
+
if (pp > self.data['pc']).any():
|
|
1235
|
+
raise pyro.utility.PMParamError(
|
|
1236
|
+
'Saturation properties are not available above the critical point.')
|
|
1237
|
+
else:
|
|
1238
|
+
pp = self._ps(TT)
|
|
1239
|
+
p = pyro.units.pressure(pp, from_units='bar')
|
|
1240
|
+
|
|
1241
|
+
if T is None:
|
|
1242
|
+
TT = self._Ts(pp)
|
|
1243
|
+
T = pyro.units.temperature_scale(TT, from_units='K')
|
|
1244
|
+
|
|
1245
|
+
if (TT>623.15).any():
|
|
1246
|
+
pyro.utility.print_warning(
|
|
1247
|
+
"Accuracy of steam saturation properties above 623.15K is reduced.")
|
|
1248
|
+
|
|
1249
|
+
scale = pyro.units.energy(from_units='kJ')
|
|
1250
|
+
scale = pyro.units.matter(scale, self.data['mw'], from_units='kg', exponent=-1)
|
|
1251
|
+
|
|
1252
|
+
pi,t,g,_,gt,_,_,_ = self._g1(TT,pp,order=1)
|
|
1253
|
+
sL = scale * R * (t*gt - g)
|
|
1254
|
+
pi,t,g,_,gt,_,_,_ = self._g2(TT,pp,order=1)
|
|
1255
|
+
sV = scale * R * (t*gt - g)
|
|
1256
|
+
if tp:
|
|
1257
|
+
return (T,p,sL,sV)
|
|
1258
|
+
return sL,sV
|
|
1259
|
+
|
|
1260
|
+
|
|
1261
|
+
|
|
1262
|
+
def hsd(self, T=None, p=None, x=None):
|
|
1263
|
+
"""Calculate enthalpy entropy and density
|
|
1264
|
+
(h,s,d) = hsd(T,p)
|
|
1265
|
+
(h,s,d) = hsd(T,x)
|
|
1266
|
+
(h,s,d) = hsd(p,x)
|
|
1267
|
+
|
|
1268
|
+
This funciton calculates these three common properties together to save
|
|
1269
|
+
the substantial computational overhead in cases where multiple
|
|
1270
|
+
properties are needed.
|
|
1271
|
+
|
|
1272
|
+
T temperature
|
|
1273
|
+
p pressure
|
|
1274
|
+
x quality (mass fraction in vapor phase)
|
|
1275
|
+
|
|
1276
|
+
Accepts unit_temperature
|
|
1277
|
+
unit_pressure
|
|
1278
|
+
dimensionless
|
|
1279
|
+
Returns unit_energy / unit_matter
|
|
1280
|
+
unit_energy / unit_matter / unit_temperature
|
|
1281
|
+
unit_matter / unit_volume
|
|
1282
|
+
"""
|
|
1283
|
+
def_T = False
|
|
1284
|
+
if T is None:
|
|
1285
|
+
T = pyro.config['def_T']
|
|
1286
|
+
def_T = True
|
|
1287
|
+
|
|
1288
|
+
def_p = False
|
|
1289
|
+
if p is None:
|
|
1290
|
+
p = pyro.config['def_p']
|
|
1291
|
+
def_p = True
|
|
1292
|
+
pscale = pyro.units.pressure(to_units='bar')
|
|
1293
|
+
|
|
1294
|
+
if x is None:
|
|
1295
|
+
x = -1.
|
|
1296
|
+
|
|
1297
|
+
R = self.data['R']
|
|
1298
|
+
|
|
1299
|
+
it = np.nditer((None,None,None,T,p,x),
|
|
1300
|
+
op_flags=[['readwrite','allocate'],['readwrite','allocate'],['readwrite','allocate'],
|
|
1301
|
+
['readonly','copy'],['readonly','copy'],['readonly','copy']],
|
|
1302
|
+
op_dtypes='float')
|
|
1303
|
+
|
|
1304
|
+
for h_,s_,d_,T_,p_,x_ in it:
|
|
1305
|
+
TT = pyro.units.temperature_scale(T_, to_units='K')
|
|
1306
|
+
pp = p_ * pscale
|
|
1307
|
+
|
|
1308
|
+
# If x is unspecified
|
|
1309
|
+
if x_<0.:
|
|
1310
|
+
|
|
1311
|
+
# Detect the region
|
|
1312
|
+
r = self._region(TT,pp)
|
|
1313
|
+
# Case out the region indices
|
|
1314
|
+
if r==1:
|
|
1315
|
+
pi,t,g,gp,gt,_,_,_ = self._g1(TT,pp,order=1)
|
|
1316
|
+
h_[...] = R * TT * t * gt
|
|
1317
|
+
s_[...] = R * (t*gt - g)
|
|
1318
|
+
d_[...] = pp * 100 / (R * TT * pi * gp)
|
|
1319
|
+
elif r==2:
|
|
1320
|
+
pi,t,g,gp,gt,_,_,_ = self._g2(TT,pp,order=1)
|
|
1321
|
+
h_[...] = R*TT * t * gt
|
|
1322
|
+
s_[...] = R * (t*gt - g)
|
|
1323
|
+
d_[...] = pp * 100 / (R * TT * pi * gp)
|
|
1324
|
+
elif r==3:
|
|
1325
|
+
n,t,f,fn,ft,_,_,_ = self._f3(TT,pp)
|
|
1326
|
+
h_[...] = R*TT * (n*fn + t*ft)
|
|
1327
|
+
s_[...] = R * (t*ft - f)
|
|
1328
|
+
d_[...] = self.data['dc'] * n
|
|
1329
|
+
elif r==5:
|
|
1330
|
+
pi,t,g,gp,gt,_,_,_ = self._g5(TT,pp,order=1)
|
|
1331
|
+
h_[...] = R*TT * t * gt
|
|
1332
|
+
s_[...] = R * (t*gt - g)
|
|
1333
|
+
d_[...] = pp * 100 / (R * TT * pi * gp)
|
|
1334
|
+
else:
|
|
1335
|
+
raise pyro.utility.PMParamError('Invalid property combination T=%f K, p=%f bar'%(TT,pp))
|
|
1336
|
+
|
|
1337
|
+
else:
|
|
1338
|
+
# If T was unspecified
|
|
1339
|
+
if def_T:
|
|
1340
|
+
# Override the default T with the saturation T
|
|
1341
|
+
TT = self._Ts(pp)
|
|
1342
|
+
# If pressure was unspecified, but temperature WAS
|
|
1343
|
+
elif pp<0.:
|
|
1344
|
+
# Override the default p with the saturation p
|
|
1345
|
+
pp = self._ps(TT)
|
|
1346
|
+
|
|
1347
|
+
pi,t,g,gp,gt,_,_,_ = self._g1(TT,pp,order=1)
|
|
1348
|
+
hL = R * TT * t * gt
|
|
1349
|
+
sL = R * (t*gt - g)
|
|
1350
|
+
vL = (R * TT * pi * gp) / (pp * 100)
|
|
1351
|
+
pi,t,g,gp,gt,_,_,_ = self._g2(TT,pp,order=1)
|
|
1352
|
+
hV = R * TT * t * gt
|
|
1353
|
+
sV = R * (t*gt - g)
|
|
1354
|
+
vV = (R * TT * pi * gp) / (pp * 100)
|
|
1355
|
+
|
|
1356
|
+
h_[...] = hL + (hV-hL)*x_
|
|
1357
|
+
s_[...] = sL + (sV-sL)*x_
|
|
1358
|
+
d_[...] = 1./(vL + (vV-vL)*x_)
|
|
1359
|
+
|
|
1360
|
+
h,s,d = it.operands[0:3]
|
|
1361
|
+
|
|
1362
|
+
# Convert the results
|
|
1363
|
+
hscale = pyro.units.energy(from_units='kJ')
|
|
1364
|
+
hscale = pyro.units.matter(hscale,self.data['mw'],from_units='kg',exponent=-1)
|
|
1365
|
+
sscale = hscale
|
|
1366
|
+
sscale = pyro.units.temperature(sscale,from_units='K')
|
|
1367
|
+
dscale = pyro.units.volume(from_units='m3',exponent=-1)
|
|
1368
|
+
dscale = pyro.units.matter(dscale, self.data['mw'], from_units='kg')
|
|
1369
|
+
|
|
1370
|
+
return hscale*h, sscale*s, dscale*d
|
|
1371
|
+
|
|
1372
|
+
|
|
1373
|
+
def h(self,T=None,p=None,x=None):
|
|
1374
|
+
"""Enthalpy
|
|
1375
|
+
h(T=None,p=None,x=None)
|
|
1376
|
+
|
|
1377
|
+
T Temperature
|
|
1378
|
+
p pressure
|
|
1379
|
+
x quality
|
|
1380
|
+
|
|
1381
|
+
Accepts the temperature, pressure, or quality in any of the three
|
|
1382
|
+
possible combinations. If none of the arguments are supplied, then
|
|
1383
|
+
def_T,def_p are used, and x is ignored. If only x is supplied, p is
|
|
1384
|
+
presumed to be def_p, and T is calculated to be the saturation
|
|
1385
|
+
temperature.
|
|
1386
|
+
|
|
1387
|
+
Accepts unit_temperature
|
|
1388
|
+
unit_pressure
|
|
1389
|
+
dimensionless
|
|
1390
|
+
Returns unit_energy / unit_matter
|
|
1391
|
+
"""
|
|
1392
|
+
def_T = False
|
|
1393
|
+
if T is None:
|
|
1394
|
+
T = pyro.config['def_T']
|
|
1395
|
+
def_T = True
|
|
1396
|
+
|
|
1397
|
+
def_p = False
|
|
1398
|
+
if p is None:
|
|
1399
|
+
p = pyro.config['def_p']
|
|
1400
|
+
def_p = True
|
|
1401
|
+
pscale = pyro.units.pressure(to_units='bar')
|
|
1402
|
+
|
|
1403
|
+
if x is None:
|
|
1404
|
+
x = -1.
|
|
1405
|
+
|
|
1406
|
+
R = self.data['R']
|
|
1407
|
+
|
|
1408
|
+
it = np.nditer((None,T,p,x),
|
|
1409
|
+
op_flags=[['readwrite','allocate'],['readonly','copy'],
|
|
1410
|
+
['readonly','copy'],['readonly','copy']], op_dtypes='float')
|
|
1411
|
+
|
|
1412
|
+
for h_,T_,p_,x_ in it:
|
|
1413
|
+
TT = pyro.units.temperature_scale(T_, to_units='K')
|
|
1414
|
+
pp = p_ * pscale
|
|
1415
|
+
|
|
1416
|
+
# If x is unspecified
|
|
1417
|
+
if x_<0.:
|
|
1418
|
+
|
|
1419
|
+
# Detect the region
|
|
1420
|
+
r = self._region(TT,pp)
|
|
1421
|
+
# Case out the region indices
|
|
1422
|
+
if r==1:
|
|
1423
|
+
pi,t,g,gp,gt,_,_,_ = self._g1(TT,pp,order=1)
|
|
1424
|
+
h_[...] = R * TT * t * gt
|
|
1425
|
+
elif r==2:
|
|
1426
|
+
pi,t,g,gp,gt,_,_,_ = self._g2(TT,pp,order=1)
|
|
1427
|
+
h_[...] = R*TT * t * gt
|
|
1428
|
+
elif r==3:
|
|
1429
|
+
n,t,f,fn,ft,_,_,_ = self._f3(TT,pp)
|
|
1430
|
+
h_[...] = R*TT * (n*fn + t*ft)
|
|
1431
|
+
elif r==5:
|
|
1432
|
+
pi,t,g,gp,gt,_,_,_ = self._g5(TT,pp,order=1)
|
|
1433
|
+
h_[...] = R*TT * t * gt
|
|
1434
|
+
else:
|
|
1435
|
+
raise pyro.utility.PMParamError('Invalid property combination T=%f K, p=%f bar'%(TT,pp))
|
|
1436
|
+
|
|
1437
|
+
|
|
1438
|
+
else:
|
|
1439
|
+
# If T was unspecified
|
|
1440
|
+
if def_T:
|
|
1441
|
+
# Override the default T with the saturation T
|
|
1442
|
+
TT = self._Ts(pp)
|
|
1443
|
+
# If pressure was unspecified, but temperature WAS
|
|
1444
|
+
elif def_p:
|
|
1445
|
+
# Override the default p with the saturation p
|
|
1446
|
+
pp = self._ps(TT)
|
|
1447
|
+
|
|
1448
|
+
pi,t,g,gp,gt,_,_,_ = self._g1(TT,pp,order=1)
|
|
1449
|
+
hL = R * TT * t * gt
|
|
1450
|
+
pi,t,g,gp,gt,_,_,_ = self._g2(TT,pp,order=1)
|
|
1451
|
+
hV = R * TT * t * gt
|
|
1452
|
+
|
|
1453
|
+
h_[...] = hL + (hV-hL)*x_
|
|
1454
|
+
|
|
1455
|
+
h = it.operands[0]
|
|
1456
|
+
|
|
1457
|
+
# Convert the results
|
|
1458
|
+
hscale = pyro.units.energy(from_units='kJ')
|
|
1459
|
+
hscale = pyro.units.matter(hscale,self.data['mw'],from_units='kg',exponent=-1)
|
|
1460
|
+
|
|
1461
|
+
return hscale*h
|
|
1462
|
+
|
|
1463
|
+
|
|
1464
|
+
|
|
1465
|
+
def d(self,T=None,p=None,x=None):
|
|
1466
|
+
"""Density
|
|
1467
|
+
d(T=None,p=None,x=None)
|
|
1468
|
+
|
|
1469
|
+
T Temperature
|
|
1470
|
+
p pressure
|
|
1471
|
+
x quality
|
|
1472
|
+
|
|
1473
|
+
Accepts the temperature, pressure, or quality in any of the three
|
|
1474
|
+
possible combinations. If none of the arguments are supplied, then
|
|
1475
|
+
def_T,def_p are used, and x is ignored. If only x is supplied, p is
|
|
1476
|
+
presumed to be def_p, and T is calculated to be the saturation
|
|
1477
|
+
temperature.
|
|
1478
|
+
|
|
1479
|
+
Accepts unit_temperature
|
|
1480
|
+
unit_pressure
|
|
1481
|
+
dimensionless
|
|
1482
|
+
Returns unit_matter / unit_volume
|
|
1483
|
+
"""
|
|
1484
|
+
def_T = False
|
|
1485
|
+
if T is None:
|
|
1486
|
+
T = pyro.config['def_T']
|
|
1487
|
+
def_T = True
|
|
1488
|
+
|
|
1489
|
+
def_p = False
|
|
1490
|
+
if p is None:
|
|
1491
|
+
p = pyro.config['def_p']
|
|
1492
|
+
def_p = True
|
|
1493
|
+
pscale = pyro.units.pressure(to_units='bar')
|
|
1494
|
+
|
|
1495
|
+
if x is None:
|
|
1496
|
+
x = -1.
|
|
1497
|
+
|
|
1498
|
+
R = self.data['R']
|
|
1499
|
+
|
|
1500
|
+
it = np.nditer((None,T,p,x),
|
|
1501
|
+
op_flags=[['readwrite','allocate'],['readonly','copy'],
|
|
1502
|
+
['readonly','copy'],['readonly','copy']], op_dtypes='float')
|
|
1503
|
+
|
|
1504
|
+
for d_,T_,p_,x_ in it:
|
|
1505
|
+
TT = pyro.units.temperature_scale(T_, to_units='K')
|
|
1506
|
+
pp = p_ * pscale
|
|
1507
|
+
|
|
1508
|
+
# If x is unspecified
|
|
1509
|
+
if x_<0.:
|
|
1510
|
+
|
|
1511
|
+
# Detect the region
|
|
1512
|
+
r = self._region(TT,pp)
|
|
1513
|
+
# Case out the region indices
|
|
1514
|
+
if r==1:
|
|
1515
|
+
pi,t,g,gp,gt,_,_,_ = self._g1(TT,pp,order=1)
|
|
1516
|
+
d_[...] = pp * 100 / (R * TT * pi * gp)
|
|
1517
|
+
elif r==2:
|
|
1518
|
+
pi,t,g,gp,gt,_,_,_ = self._g2(TT,pp,order=1)
|
|
1519
|
+
d_[...] = pp * 100 / (R * TT * pi * gp)
|
|
1520
|
+
elif r==3:
|
|
1521
|
+
n,t,f,fn,ft,_,_,_ = self._f3(TT,pp)
|
|
1522
|
+
d_[...] = self.data['dc'] * n
|
|
1523
|
+
elif r==5:
|
|
1524
|
+
pi,t,g,gp,gt,_,_,_ = self._g5(TT,pp,order=1)
|
|
1525
|
+
d_[...] = pp * 100 / (R * TT * pi * gp)
|
|
1526
|
+
else:
|
|
1527
|
+
raise pyro.utility.PMParamError('Invalid property combination T=%f K, p=%f bar'%(TT,pp))
|
|
1528
|
+
|
|
1529
|
+
|
|
1530
|
+
else:
|
|
1531
|
+
# If T was unspecified
|
|
1532
|
+
if def_T:
|
|
1533
|
+
# Override the default T with the saturation T
|
|
1534
|
+
TT = self._Ts(pp)
|
|
1535
|
+
# If pressure was unspecified, but temperature WAS
|
|
1536
|
+
elif def_p:
|
|
1537
|
+
# Override the default p with the saturation p
|
|
1538
|
+
pp = self._ps(TT)
|
|
1539
|
+
|
|
1540
|
+
pi,t,g,gp,gt,_,_,_ = self._g1(TT,pp,order=1)
|
|
1541
|
+
vL = (R * TT * pi * gp) / (pp * 100)
|
|
1542
|
+
pi,t,g,gp,gt,_,_,_ = self._g2(TT,pp,order=1)
|
|
1543
|
+
vV = (R * TT * pi * gp) / (pp * 100)
|
|
1544
|
+
|
|
1545
|
+
d_[...] = 1./(vL + (vV-vL)*x_)
|
|
1546
|
+
|
|
1547
|
+
d = it.operands[0]
|
|
1548
|
+
|
|
1549
|
+
# Convert the results
|
|
1550
|
+
dscale = pyro.units.volume(from_units='m3',exponent=-1)
|
|
1551
|
+
dscale = pyro.units.matter(dscale, self.data['mw'], from_units='kg')
|
|
1552
|
+
|
|
1553
|
+
return dscale*d
|
|
1554
|
+
|
|
1555
|
+
|
|
1556
|
+
|
|
1557
|
+
def s(self,T=None,p=None,x=None):
|
|
1558
|
+
"""Entropy
|
|
1559
|
+
s(T=None,p=None,x=None)
|
|
1560
|
+
|
|
1561
|
+
T Temperature
|
|
1562
|
+
p pressure
|
|
1563
|
+
x quality
|
|
1564
|
+
|
|
1565
|
+
Accepts the temperature, pressure, or quality in any of the three
|
|
1566
|
+
possible combinations. If none of the arguments are supplied, then
|
|
1567
|
+
def_T,def_p are used, and x is ignored. If only x is supplied, p is
|
|
1568
|
+
presumed to be def_p, and T is calculated to be the saturation
|
|
1569
|
+
temperature.
|
|
1570
|
+
|
|
1571
|
+
Accepts unit_temperature
|
|
1572
|
+
unit_pressure
|
|
1573
|
+
dimensionless
|
|
1574
|
+
Returns unit_energy / unit_matter / unit_temperature
|
|
1575
|
+
"""
|
|
1576
|
+
def_T = False
|
|
1577
|
+
if T is None:
|
|
1578
|
+
T = pyro.config['def_T']
|
|
1579
|
+
def_T = True
|
|
1580
|
+
|
|
1581
|
+
def_p = False
|
|
1582
|
+
if p is None:
|
|
1583
|
+
p = pyro.config['def_p']
|
|
1584
|
+
def_p = True
|
|
1585
|
+
pscale = pyro.units.pressure(to_units='bar')
|
|
1586
|
+
|
|
1587
|
+
if x is None:
|
|
1588
|
+
x = -1.
|
|
1589
|
+
|
|
1590
|
+
R = self.data['R']
|
|
1591
|
+
|
|
1592
|
+
it = np.nditer((None,T,p,x),
|
|
1593
|
+
op_flags=[['readwrite','allocate'],['readonly','copy'],
|
|
1594
|
+
['readonly','copy'],['readonly','copy']], op_dtypes='float')
|
|
1595
|
+
|
|
1596
|
+
for s_,T_,p_,x_ in it:
|
|
1597
|
+
TT = pyro.units.temperature_scale(T_, to_units='K')
|
|
1598
|
+
pp = p_ * pscale
|
|
1599
|
+
|
|
1600
|
+
# If x is unspecified
|
|
1601
|
+
if x_<0.:
|
|
1602
|
+
|
|
1603
|
+
# Detect the region
|
|
1604
|
+
r = self._region(TT,pp)
|
|
1605
|
+
# Case out the region indices
|
|
1606
|
+
if r==1:
|
|
1607
|
+
pi,t,g,gp,gt,_,_,_ = self._g1(TT,pp,order=1)
|
|
1608
|
+
s_[...] = R * (t*gt - g)
|
|
1609
|
+
elif r==2:
|
|
1610
|
+
pi,t,g,gp,gt,_,_,_ = self._g2(TT,pp,order=1)
|
|
1611
|
+
s_[...] = R * (t*gt - g)
|
|
1612
|
+
elif r==3:
|
|
1613
|
+
n,t,f,fn,ft,_,_,_ = self._f3(TT,pp)
|
|
1614
|
+
s_[...] = R * (t*ft - f)
|
|
1615
|
+
elif r==5:
|
|
1616
|
+
pi,t,g,gp,gt,_,_,_ = self._g5(TT,pp,order=1)
|
|
1617
|
+
s_[...] = R * (t*gt - g)
|
|
1618
|
+
else:
|
|
1619
|
+
raise pyro.utility.PMParamError('Invalid property combination T=%f K, p=%f bar'%(TT,pp))
|
|
1620
|
+
|
|
1621
|
+
|
|
1622
|
+
else:
|
|
1623
|
+
# If T was unspecified
|
|
1624
|
+
if def_T:
|
|
1625
|
+
# Override the default T with the saturation T
|
|
1626
|
+
TT = self._Ts(pp)
|
|
1627
|
+
# If pressure was unspecified, but temperature WAS
|
|
1628
|
+
elif def_p:
|
|
1629
|
+
# Override the default p with the saturation p
|
|
1630
|
+
pp = self._ps(TT)
|
|
1631
|
+
|
|
1632
|
+
pi,t,g,gp,gt,_,_,_ = self._g1(TT,pp,order=1)
|
|
1633
|
+
sL = R * (t*gt - g)
|
|
1634
|
+
pi,t,g,gp,gt,_,_,_ = self._g2(TT,pp,order=1)
|
|
1635
|
+
sV = R * (t*gt - g)
|
|
1636
|
+
|
|
1637
|
+
s_[...] = sL + (sV-sL)*x_
|
|
1638
|
+
|
|
1639
|
+
s = it.operands[0]
|
|
1640
|
+
|
|
1641
|
+
# Convert the results
|
|
1642
|
+
sscale = pyro.units.energy(from_units='kJ')
|
|
1643
|
+
sscale = pyro.units.matter(sscale,self.data['mw'],from_units='kg',exponent=-1)
|
|
1644
|
+
sscale = pyro.units.temperature(sscale,from_units='K')
|
|
1645
|
+
|
|
1646
|
+
return sscale*s
|
|
1647
|
+
|
|
1648
|
+
|
|
1649
|
+
|
|
1650
|
+
def e(self,T=None,p=None,x=None):
|
|
1651
|
+
"""Internal Energy
|
|
1652
|
+
e(T=None,p=None,x=None)
|
|
1653
|
+
|
|
1654
|
+
T Temperature
|
|
1655
|
+
p pressure
|
|
1656
|
+
x quality
|
|
1657
|
+
|
|
1658
|
+
Accepts the temperature, pressure, or quality in any of the three
|
|
1659
|
+
possible combinations. If none of the arguments are supplied, then
|
|
1660
|
+
def_T,def_p are used, and x is ignored. If only x is supplied, p is
|
|
1661
|
+
presumed to be def_p, and T is calculated to be the saturation
|
|
1662
|
+
temperature.
|
|
1663
|
+
|
|
1664
|
+
Accepts unit_temperature
|
|
1665
|
+
unit_pressure
|
|
1666
|
+
dimensionless
|
|
1667
|
+
Returns unit_energy / unit_matter
|
|
1668
|
+
"""
|
|
1669
|
+
def_T = False
|
|
1670
|
+
if T is None:
|
|
1671
|
+
T = pyro.config['def_T']
|
|
1672
|
+
def_T = True
|
|
1673
|
+
|
|
1674
|
+
def_p = False
|
|
1675
|
+
if p is None:
|
|
1676
|
+
p = pyro.config['def_p']
|
|
1677
|
+
def_p = True
|
|
1678
|
+
pscale = pyro.units.pressure(to_units='bar')
|
|
1679
|
+
|
|
1680
|
+
if x is None:
|
|
1681
|
+
x = -1.
|
|
1682
|
+
|
|
1683
|
+
R = self.data['R']
|
|
1684
|
+
|
|
1685
|
+
it = np.nditer((None,T,p,x),
|
|
1686
|
+
op_flags=[['readwrite','allocate'],['readonly','copy'],
|
|
1687
|
+
['readonly','copy'],['readonly','copy']], op_dtypes='float')
|
|
1688
|
+
|
|
1689
|
+
for e_,T_,p_,x_ in it:
|
|
1690
|
+
TT = pyro.units.temperature_scale(T_,to_units='K')
|
|
1691
|
+
pp = p_ * pscale
|
|
1692
|
+
|
|
1693
|
+
# If x is unspecified
|
|
1694
|
+
if x_<0.:
|
|
1695
|
+
|
|
1696
|
+
# Detect the region
|
|
1697
|
+
r = self._region(TT,pp)
|
|
1698
|
+
# Case out the region indices
|
|
1699
|
+
if r==1:
|
|
1700
|
+
pi,t,_,gp,gt,_,_,_ = self._g1(TT,pp,order=1)
|
|
1701
|
+
e_[...] = TT * R * (t*gt - pi*gp)
|
|
1702
|
+
elif r==2:
|
|
1703
|
+
pi,t,_,gp,gt,_,_,_ = self._g2(TT,pp,order=1)
|
|
1704
|
+
e_[...] = TT * R * (t*gt - pi*gp)
|
|
1705
|
+
elif r==3:
|
|
1706
|
+
n,t,_,_,ft,_,_,_ = self._f3(TT,pp)
|
|
1707
|
+
e_[...] = TT * R * t*ft
|
|
1708
|
+
elif r==5:
|
|
1709
|
+
pi,t,_,gp,gt,_,_,_ = self._g5(TT,pp,order=1)
|
|
1710
|
+
e_[...] = TT * R * (t*gt - pi*gp)
|
|
1711
|
+
else:
|
|
1712
|
+
raise pyro.utility.PMParamError('Invalid property combination T=%f K, p=%f bar'%(TT,pp))
|
|
1713
|
+
|
|
1714
|
+
|
|
1715
|
+
else:
|
|
1716
|
+
# If T was unspecified
|
|
1717
|
+
if def_T:
|
|
1718
|
+
# Override the default T with the saturation T
|
|
1719
|
+
TT = self._Ts(pp)
|
|
1720
|
+
# If pressure was unspecified, but temperature WAS
|
|
1721
|
+
elif def_p:
|
|
1722
|
+
# Override the default p with the saturation p
|
|
1723
|
+
pp = self._ps(TT)
|
|
1724
|
+
|
|
1725
|
+
pi,t,_,gp,gt,_,_,_ = self._g1(TT,pp,order=1)
|
|
1726
|
+
eL = TT * R * (t*gt - pi*gp)
|
|
1727
|
+
pi,t,g,gp,gt,_,_,_ = self._g2(TT,pp,order=1)
|
|
1728
|
+
eV = TT * R * (t*gt - pi*gp)
|
|
1729
|
+
|
|
1730
|
+
e_[...] = eL + (eV-eL)*x_
|
|
1731
|
+
|
|
1732
|
+
e = it.operands[0]
|
|
1733
|
+
|
|
1734
|
+
# Convert the results
|
|
1735
|
+
scale = pyro.units.energy(from_units='kJ')
|
|
1736
|
+
scale = pyro.units.matter(scale,self.data['mw'],from_units='kg',exponent=-1)
|
|
1737
|
+
|
|
1738
|
+
return e * scale
|
|
1739
|
+
|
|
1740
|
+
|
|
1741
|
+
|
|
1742
|
+
def cp(self,T=None,p=None,x=None):
|
|
1743
|
+
"""Constant pressure specific heat
|
|
1744
|
+
cp(T=None,p=None,x=None)
|
|
1745
|
+
|
|
1746
|
+
T Temperature
|
|
1747
|
+
p pressure
|
|
1748
|
+
x quality
|
|
1749
|
+
|
|
1750
|
+
Accepts the temperature, pressure, or quality in any of the three
|
|
1751
|
+
possible combinations. If none of the arguments are supplied, then
|
|
1752
|
+
def_T,def_p are used, and x is ignored. If only x is supplied, p is
|
|
1753
|
+
presumed to be def_p, and T is calculated to be the saturation
|
|
1754
|
+
temperature.
|
|
1755
|
+
|
|
1756
|
+
Accepts unit_temperature
|
|
1757
|
+
unit_pressure
|
|
1758
|
+
dimensionless
|
|
1759
|
+
Returns unit_energy / unit_matter / unit_temperature
|
|
1760
|
+
"""
|
|
1761
|
+
def_T = False
|
|
1762
|
+
if T is None:
|
|
1763
|
+
T = pyro.config['def_T']
|
|
1764
|
+
def_T = True
|
|
1765
|
+
|
|
1766
|
+
def_p = False
|
|
1767
|
+
if p is None:
|
|
1768
|
+
p = pyro.config['def_p']
|
|
1769
|
+
def_p = True
|
|
1770
|
+
pscale = pyro.units.pressure(to_units='bar')
|
|
1771
|
+
|
|
1772
|
+
if x is None:
|
|
1773
|
+
x = -1.
|
|
1774
|
+
|
|
1775
|
+
R = self.data['R']
|
|
1776
|
+
|
|
1777
|
+
it = np.nditer((None,T,p,x),
|
|
1778
|
+
op_flags=[['readwrite','allocate'],['readonly','copy'],
|
|
1779
|
+
['readonly','copy'],['readonly','copy']], op_dtypes='float')
|
|
1780
|
+
|
|
1781
|
+
for cp_,T_,p_,x_ in it:
|
|
1782
|
+
TT = pyro.units.temperature_scale(T_, to_units='K')
|
|
1783
|
+
pp = p_ * pscale
|
|
1784
|
+
# If x is unspecified
|
|
1785
|
+
if x_<0.:
|
|
1786
|
+
|
|
1787
|
+
# Detect the region
|
|
1788
|
+
r = self._region(TT,pp)
|
|
1789
|
+
# Case out the region indices
|
|
1790
|
+
if r==1:
|
|
1791
|
+
pi,t,_,_,_,_,_,gtt = self._g1(TT,pp,order=2)
|
|
1792
|
+
cp_[...] = -R * t*t*gtt
|
|
1793
|
+
elif r==2:
|
|
1794
|
+
pi,t,_,_,_,_,_,gtt = self._g2(TT,pp,order=2)
|
|
1795
|
+
cp_[...] = -R * t*t*gtt
|
|
1796
|
+
elif r==3:
|
|
1797
|
+
n,t,_,fp,ft,fpp,fpt,ftt = self._f3(TT,pp)
|
|
1798
|
+
temp = n*fp - n*t*fpt
|
|
1799
|
+
temp = temp*temp/(2*n*fp + n*n*fpp)
|
|
1800
|
+
cp_[...] = R * (-t*t*ftt + temp)
|
|
1801
|
+
elif r==5:
|
|
1802
|
+
pi,t,_,_,_,_,_,gtt = self._g5(TT,pp,order=2)
|
|
1803
|
+
cp_[...] = -R * t*t*gtt
|
|
1804
|
+
else:
|
|
1805
|
+
raise pyro.utility.PMParamError('Invalid property combination T=%f K, p=%f bar'%(T_,pp))
|
|
1806
|
+
|
|
1807
|
+
|
|
1808
|
+
else:
|
|
1809
|
+
# If T was unspecified
|
|
1810
|
+
if def_T:
|
|
1811
|
+
# Override the default T with the saturation T
|
|
1812
|
+
TT = self._Ts(pp)
|
|
1813
|
+
# If pressure was unspecified, but temperature WAS
|
|
1814
|
+
elif def_p:
|
|
1815
|
+
# Override the default p with the saturation p
|
|
1816
|
+
pp = self._ps(TT)
|
|
1817
|
+
|
|
1818
|
+
pi,t,_,_,_,_,_,gtt = self._g1(TT,pp,order=2)
|
|
1819
|
+
cpL = -R * t*t*gtt
|
|
1820
|
+
pi,t,_,_,_,_,_,gtt = self._g2(TT,pp,order=2)
|
|
1821
|
+
cpV = -R * t*t*gtt
|
|
1822
|
+
|
|
1823
|
+
cp_[...] = cpL + (cpV-cpL)*x_
|
|
1824
|
+
|
|
1825
|
+
cp = it.operands[0]
|
|
1826
|
+
|
|
1827
|
+
# Convert the results
|
|
1828
|
+
scale = pyro.units.energy(from_units='kJ')
|
|
1829
|
+
scale = pyro.units.matter(scale,self.data['mw'],from_units='kg',exponent=-1)
|
|
1830
|
+
scale = pyro.units.temperature(scale,from_units='K',exponent=-1)
|
|
1831
|
+
|
|
1832
|
+
return cp * scale
|
|
1833
|
+
|
|
1834
|
+
|
|
1835
|
+
|
|
1836
|
+
def cv(self,T=None,p=None,x=None):
|
|
1837
|
+
"""Constant volume specific heat (kJ/kg)
|
|
1838
|
+
cv(T=None,p=None,x=None)
|
|
1839
|
+
|
|
1840
|
+
T Temperature
|
|
1841
|
+
p pressure
|
|
1842
|
+
x quality
|
|
1843
|
+
|
|
1844
|
+
Accepts the temperature, pressure, or quality in any of the three
|
|
1845
|
+
possible combinations. If none of the arguments are supplied, then
|
|
1846
|
+
def_T,def_p are used, and x is ignored. If only x is supplied, p is
|
|
1847
|
+
presumed to be def_p, and T is calculated to be the saturation
|
|
1848
|
+
temperature.
|
|
1849
|
+
|
|
1850
|
+
Accepts unit_temperature
|
|
1851
|
+
unit_pressure
|
|
1852
|
+
dimensionless
|
|
1853
|
+
Returns unit_energy / unit_matter / unit_temperature
|
|
1854
|
+
"""
|
|
1855
|
+
def_T = False
|
|
1856
|
+
if T is None:
|
|
1857
|
+
T = pyro.config['def_T']
|
|
1858
|
+
def_T = True
|
|
1859
|
+
|
|
1860
|
+
def_p = False
|
|
1861
|
+
if p is None:
|
|
1862
|
+
p = pyro.config['def_p']
|
|
1863
|
+
def_p = True
|
|
1864
|
+
pscale = pyro.units.pressure(to_units='bar')
|
|
1865
|
+
|
|
1866
|
+
if x is None:
|
|
1867
|
+
x = -1.
|
|
1868
|
+
|
|
1869
|
+
R = self.data['R']
|
|
1870
|
+
|
|
1871
|
+
it = np.nditer((None,T,p,x),
|
|
1872
|
+
op_flags=[['readwrite','allocate'],['readonly','copy'],
|
|
1873
|
+
['readonly','copy'],['readonly','copy']], op_dtypes='float')
|
|
1874
|
+
|
|
1875
|
+
for cv_,T_,p_,x_ in it:
|
|
1876
|
+
TT = pyro.units.temperature_scale(T_,to_units='K')
|
|
1877
|
+
pp = p_ * pscale
|
|
1878
|
+
|
|
1879
|
+
# If x is unspecified
|
|
1880
|
+
if x_<0.:
|
|
1881
|
+
|
|
1882
|
+
# Detect the region
|
|
1883
|
+
r = self._region(TT,pp)
|
|
1884
|
+
# Case out the region indices
|
|
1885
|
+
if r==1:
|
|
1886
|
+
pi,t,_,gp,gt,gpp,gpt,gtt = self._g1(TT,pp,order=2)
|
|
1887
|
+
temp = gp - t*gpt
|
|
1888
|
+
temp = temp*temp/gpp
|
|
1889
|
+
cv_[...] = R * (temp - t*t*gtt)
|
|
1890
|
+
elif r==2:
|
|
1891
|
+
pi,t,_,gp,gt,gpp,gpt,gtt = self._g2(TT,pp,order=2)
|
|
1892
|
+
temp = gp - t*gpt
|
|
1893
|
+
temp = temp*temp/gpp
|
|
1894
|
+
cv_[...] = R * (temp - t*t*gtt)
|
|
1895
|
+
elif r==3:
|
|
1896
|
+
n,t,_,_,_,_,_,ftt = self._f3(TT,pp)
|
|
1897
|
+
cv_[...] = -R * t*t*ftt
|
|
1898
|
+
elif r==5:
|
|
1899
|
+
pi,t,_,gp,gt,gpp,gpt,gtt = self._g5(TT,pp,order=2)
|
|
1900
|
+
temp = gp - t*gpt
|
|
1901
|
+
temp = temp*temp/gpp
|
|
1902
|
+
cv_[...] = R * (temp - t*t*gtt)
|
|
1903
|
+
else:
|
|
1904
|
+
raise pyro.utility.PMParamError('Invalid property combination T=%f K, p=%f bar'%(T_,pp))
|
|
1905
|
+
|
|
1906
|
+
|
|
1907
|
+
else:
|
|
1908
|
+
# If T was unspecified
|
|
1909
|
+
if def_T:
|
|
1910
|
+
# Override the default T with the saturation T
|
|
1911
|
+
TT = self._Ts(pp)
|
|
1912
|
+
# If pressure was unspecified, but temperature WAS
|
|
1913
|
+
elif def_p:
|
|
1914
|
+
# Override the default p with the saturation p
|
|
1915
|
+
pp = self._ps(TT)
|
|
1916
|
+
|
|
1917
|
+
pi,t,_,gp,gt,gpp,gpt,gtt = self._g1(TT,pp,order=2)
|
|
1918
|
+
temp = gp - t*gpt
|
|
1919
|
+
temp = temp*temp/gpp
|
|
1920
|
+
cvL = R * (temp - t*t*gtt)
|
|
1921
|
+
pi,t,_,gp,gt,gpp,gpt,gtt = self._g2(TT,pp,order=2)
|
|
1922
|
+
temp = gp - t*gpt
|
|
1923
|
+
temp = temp*temp/gpp
|
|
1924
|
+
cvV = R * (temp - t*t*gtt)
|
|
1925
|
+
|
|
1926
|
+
cv_[...] = cvL + (cvV-cvL)*x_
|
|
1927
|
+
|
|
1928
|
+
cv = it.operands[0]
|
|
1929
|
+
|
|
1930
|
+
# Convert the results
|
|
1931
|
+
scale = pyro.units.energy(from_units='kJ')
|
|
1932
|
+
scale = pyro.units.matter(scale,self.data['mw'],from_units='kg',exponent=-1)
|
|
1933
|
+
scale = pyro.units.temperature(scale,from_units='K',exponent=-1)
|
|
1934
|
+
|
|
1935
|
+
return cv * scale
|
|
1936
|
+
|
|
1937
|
+
|
|
1938
|
+
def gam(self,T=None,p=None,x=None):
|
|
1939
|
+
"""Specific heat ratio
|
|
1940
|
+
gam(T=None,p=None,x=None)
|
|
1941
|
+
|
|
1942
|
+
T Temperature
|
|
1943
|
+
p pressure
|
|
1944
|
+
x quality
|
|
1945
|
+
|
|
1946
|
+
Accepts the temperature, pressure, or quality in any of the three
|
|
1947
|
+
possible combinations. If none of the arguments are supplied, then
|
|
1948
|
+
def_T,def_p are used, and x is ignored. If only x is supplied, p is
|
|
1949
|
+
presumed to be def_p, and T is calculated to be the saturation
|
|
1950
|
+
temperature.
|
|
1951
|
+
|
|
1952
|
+
Accepts unit_temperature
|
|
1953
|
+
unit_pressure
|
|
1954
|
+
dimensionless
|
|
1955
|
+
Returns unit_energy / unit_matter / unit_temperature
|
|
1956
|
+
"""
|
|
1957
|
+
return cp(T,p,x) / cv(T,p,x)
|
|
1958
|
+
|
|
1959
|
+
|
|
1960
|
+
def mw(self,T=None,p=None,x=None):
|
|
1961
|
+
"""Molecular weight (kg/kmol)
|
|
1962
|
+
mw(T=None,p=None,x=None)
|
|
1963
|
+
|
|
1964
|
+
T Temperature
|
|
1965
|
+
p pressure
|
|
1966
|
+
x quality
|
|
1967
|
+
|
|
1968
|
+
Accepts the temperature, pressure, or quality, but ignores all values.
|
|
1969
|
+
|
|
1970
|
+
Accepts unit_temperature
|
|
1971
|
+
unit_pressure
|
|
1972
|
+
dimensionless
|
|
1973
|
+
Returns unit_mass / unit_mol
|
|
1974
|
+
"""
|
|
1975
|
+
mw = pyro.units.mass(self.data['mw'],from_units='g')
|
|
1976
|
+
mw = pyro.units.molar(mw,from_units='mol',exponent=-1)
|
|
1977
|
+
return mw
|
|
1978
|
+
|
|
1979
|
+
|
|
1980
|
+
|
|
1981
|
+
|
|
1982
|
+
def T_h(self,h,p=None,quality=False):
|
|
1983
|
+
"""Temperature calculated from enthalpy
|
|
1984
|
+
T = T_h(h)
|
|
1985
|
+
or
|
|
1986
|
+
T = T_h(h,p)
|
|
1987
|
+
or
|
|
1988
|
+
T,x = T_h(h,p=None,quality=True)
|
|
1989
|
+
|
|
1990
|
+
Calculates temperature from the enthalpy and pressure.
|
|
1991
|
+
|
|
1992
|
+
When quality is set to True, T_h also returns the quality of saturated
|
|
1993
|
+
conditions. Non-saturated conditions are assigned quality -1.
|
|
1994
|
+
|
|
1995
|
+
Accepts unit_energy / unit_matter
|
|
1996
|
+
unit_pressure
|
|
1997
|
+
(boolean)
|
|
1998
|
+
Returns unit_temperature
|
|
1999
|
+
(dimensionless)
|
|
2000
|
+
"""
|
|
2001
|
+
|
|
2002
|
+
# First, figure out what region we're in. We need to use a custom
|
|
2003
|
+
# region-finding routine since we're in h,p coordinates and not T,p
|
|
2004
|
+
# Comments describe the process relative to the inverse region diagram
|
|
2005
|
+
# in the IF-97 report on page 21 (Figure 2)
|
|
2006
|
+
T13 = 623.15 # vertical boundary between regions 1 and 3
|
|
2007
|
+
p2ab = 40. # horizontal boundary between regions 2a and 2b
|
|
2008
|
+
p2c = 45.257578905948 # the bottom of the 2c region
|
|
2009
|
+
p3 = 165.292 # The bottom of region 3
|
|
2010
|
+
pmax = 1000. # The top of the IF-97 region
|
|
2011
|
+
p5max = 500. # The top of region 5
|
|
2012
|
+
T25 = 1073.15 # Left edge of region 5
|
|
2013
|
+
T5max = 2273.15 # Right edge of region 5
|
|
2014
|
+
R = self.data['R']
|
|
2015
|
+
|
|
2016
|
+
# Prepare h and p
|
|
2017
|
+
if p is None:
|
|
2018
|
+
p = pyro.config['def_p']
|
|
2019
|
+
if not isinstance(p,np.ndarray):
|
|
2020
|
+
p = np.array(p)
|
|
2021
|
+
pscale = pyro.units.pressure(to_units='bar')
|
|
2022
|
+
|
|
2023
|
+
scale = pyro.units.energy(to_units='kJ')
|
|
2024
|
+
scale = pyro.units.matter(scale,self.data['mw'],to_units='kg')
|
|
2025
|
+
|
|
2026
|
+
it = np.nditer((None,None,h,p),
|
|
2027
|
+
op_flags=[['readwrite','allocate'],['readwrite','allocate'],
|
|
2028
|
+
['readonly','copy'], ['readonly','copy']],
|
|
2029
|
+
op_dtypes='float')
|
|
2030
|
+
|
|
2031
|
+
for T_,x_,h_,p_ in it:
|
|
2032
|
+
T_[...] = -1.
|
|
2033
|
+
x_[...] = -1.
|
|
2034
|
+
pp = p_ * pscale
|
|
2035
|
+
# Scale the enthalpy to kJ/kg
|
|
2036
|
+
hh = h_ * scale
|
|
2037
|
+
if p_ < p3:
|
|
2038
|
+
# Calculate the saturation temperature and enthalpies
|
|
2039
|
+
Ts = self._Ts(p_)
|
|
2040
|
+
pi,t,_,_,gt,_,_,_ = self._g1(Ts,p_,order=1)
|
|
2041
|
+
hL = R * Ts * t * gt
|
|
2042
|
+
pi,t,_,_,gt,_,_,_ = self._g2(Ts,p_,order=1)
|
|
2043
|
+
hV = R * Ts * t * gt
|
|
2044
|
+
# If h is below the liquid enthalpy, use region 1
|
|
2045
|
+
if hh<hL:
|
|
2046
|
+
T_[...] = self._th1(h=hh,p=p_)
|
|
2047
|
+
# If h is below the vapor enthalpy, this is a saturated mixture
|
|
2048
|
+
elif hh<hV:
|
|
2049
|
+
T_[...] = Ts
|
|
2050
|
+
x_[...] = (hh-hL)/(hV-hL)
|
|
2051
|
+
# If p is below the a-b boundary
|
|
2052
|
+
elif p_<p2ab:
|
|
2053
|
+
# Calculate the enthalpy at the 2-5 boarder
|
|
2054
|
+
pi,t,g,gp,gt,_,_,_ = self._g5(T25,p_,order=1)
|
|
2055
|
+
h25 = R*T25 * t * gt
|
|
2056
|
+
# If h is below the 2-5 boundary, this is region 2a
|
|
2057
|
+
if hh<h25:
|
|
2058
|
+
T_[...] = self._th2a(h=hh,p=p_)
|
|
2059
|
+
else:
|
|
2060
|
+
# Calculate the enthalpy at the upper bound of r5
|
|
2061
|
+
pi,t,g,gp,gt,_,_,_ = self._g5(T5max,p_,order=1)
|
|
2062
|
+
h5 = R*T5max * t * gt
|
|
2063
|
+
if hh>h5:
|
|
2064
|
+
raise pyro.utility.PMParamError(
|
|
2065
|
+
'Steam T_h(): the state is not in the IF-97 domain.')
|
|
2066
|
+
Tinit = T25 + (T5max-T25)*(hh-h25)/(h5-h25)
|
|
2067
|
+
T_[...] = self._th5(h=hh, p=p_, Tinit=Tinit)
|
|
2068
|
+
# If h is below (left of) the b-c boarder
|
|
2069
|
+
elif p_>p2c and hh<self._b2bc(p=p_):
|
|
2070
|
+
# Region 2c
|
|
2071
|
+
T_[...] = self._th2c(h=hh, p=p_)
|
|
2072
|
+
else:
|
|
2073
|
+
# Calculate the enthalpy at the 2-5 boarder
|
|
2074
|
+
pi,t,g,gp,gt,_,_,_ = self._g5(T25,p_,order=1)
|
|
2075
|
+
h25 = R*T25 * t * gt
|
|
2076
|
+
# All that's left is either 2b or 5
|
|
2077
|
+
if hh<h25:
|
|
2078
|
+
# Region 2b
|
|
2079
|
+
T_[...] = self._th2b(h=hh, p=p_)
|
|
2080
|
+
else:
|
|
2081
|
+
# Calculate the enthalpy at the upper bound of r5
|
|
2082
|
+
pi,t,g,gp,gt,_,_,_ = self._g5(T5max,p_,order=1)
|
|
2083
|
+
h5 = R*T5max * t * gt
|
|
2084
|
+
if hh>h5:
|
|
2085
|
+
raise pyro.utility.PMParamError(
|
|
2086
|
+
'Steam T_h(): the state is not in the IF-97 domain.')
|
|
2087
|
+
Tinit = T25 + (T5max-T25)*(hh-h25)/(h5-h25)
|
|
2088
|
+
T_[...] = self._th5(h=hh, p=p_, Tinit=Tinit)
|
|
2089
|
+
elif p_ <= pmax:
|
|
2090
|
+
# Calculate the enthalpy at the 1-3 boarder
|
|
2091
|
+
pi,t,g,gp,gt,_,_,_ = self._g1(T13,p_,order=1)
|
|
2092
|
+
h13 = R*T13 * t * gt
|
|
2093
|
+
if hh<h13:
|
|
2094
|
+
# Region 1
|
|
2095
|
+
T_[...] = self._th1(h=hh,p=p_)
|
|
2096
|
+
else:
|
|
2097
|
+
# Calculate T and h at the 2-3 boarder
|
|
2098
|
+
T23 = self._b23(p=p_)
|
|
2099
|
+
h23 = self.h(T=T23,p=p_)
|
|
2100
|
+
pi,t,g,gp,gt,_,_,_ = self._g2(T23,p_,order=1)
|
|
2101
|
+
h23 = R*T23 * t * gt
|
|
2102
|
+
if hh<h23:
|
|
2103
|
+
# Region 3
|
|
2104
|
+
Tinit = T13 + (T23-T13)*(hh-h13)/(h23-h13)
|
|
2105
|
+
T_[...] = self._th3(h=hh, p=p_, Tinit=Tinit)
|
|
2106
|
+
elif hh<self._b2bc(p=p_):
|
|
2107
|
+
# Region 2c
|
|
2108
|
+
T_[...] = self._th2c(h=hh,p=p_)
|
|
2109
|
+
else:
|
|
2110
|
+
# Calculate the enthalpy at the 2-5 boarder
|
|
2111
|
+
pi,t,g,gp,gt,_,_,_ = self._g5(T25,p_,order=1)
|
|
2112
|
+
h25 = R*T25 * t * gt
|
|
2113
|
+
if hh<h25:
|
|
2114
|
+
# Region 2b
|
|
2115
|
+
T_[...] = self._th2b(h=hh,p=p_)
|
|
2116
|
+
elif p_<p5max:
|
|
2117
|
+
# Calculate the enthalpy at the upper bound of r5
|
|
2118
|
+
pi,t,g,gp,gt,_,_,_ = self._g5(T5max,p_,order=1)
|
|
2119
|
+
h5 = R*T5max * t * gt
|
|
2120
|
+
if hh>h5:
|
|
2121
|
+
raise pyro.utility.PMParamError(
|
|
2122
|
+
'Steam T_h(): the state is not in the IF-97 ' +
|
|
2123
|
+
'domain.')
|
|
2124
|
+
Tinit = T25 + (T5max-T25)*(hh-h25)/(h5-h25)
|
|
2125
|
+
T_[...] = self._th5(h=hh, p=p_, Tinit=Tinit)
|
|
2126
|
+
else:
|
|
2127
|
+
raise pyro.utility.PMParamError(
|
|
2128
|
+
'Steam T_h(): the state is not in the IF-97 domain.')
|
|
2129
|
+
else:
|
|
2130
|
+
raise pyro.utility.PMParamError(
|
|
2131
|
+
'Steam T_h(): pressure is above the IF-97 maximum (1000bar)')
|
|
2132
|
+
|
|
2133
|
+
T_[...] = pyro.units.temperature_scale(T_,from_units='K')
|
|
2134
|
+
|
|
2135
|
+
if quality:
|
|
2136
|
+
return it.operands[0:2]
|
|
2137
|
+
return it.operands[0]
|
|
2138
|
+
|
|
2139
|
+
|
|
2140
|
+
|
|
2141
|
+
def T_s(self,s,p=None,quality=False):
|
|
2142
|
+
"""Temperature calculated from entropy
|
|
2143
|
+
T = T_s(s)
|
|
2144
|
+
or
|
|
2145
|
+
T = T_s(s,p)
|
|
2146
|
+
or
|
|
2147
|
+
T,x = T_s(s,p=None,quality=False)
|
|
2148
|
+
|
|
2149
|
+
Calculates temperature from the entropy and pressure.
|
|
2150
|
+
|
|
2151
|
+
When quality is set to True, T_s also returns the quality of saturated
|
|
2152
|
+
conditions. Non-saturated conditions are assigned quality -1.
|
|
2153
|
+
|
|
2154
|
+
Accepts unit_energy / unit_matter / unit_temperature
|
|
2155
|
+
unit_pressure
|
|
2156
|
+
(boolean)
|
|
2157
|
+
Returns unit_temperature
|
|
2158
|
+
(dimensionless)
|
|
2159
|
+
"""
|
|
2160
|
+
# First, figure out what region we're in. We need to use a custom
|
|
2161
|
+
# region-finding routine since we're in s,p coordinates and not T,p
|
|
2162
|
+
# Comments describe the process relative to the inverse region diagram
|
|
2163
|
+
# in the IF-97 report on page 21 (Figure 2)
|
|
2164
|
+
T13 = 623.15 # vertical boundary between regions 2 and 3
|
|
2165
|
+
p2ab = 40. # horizontal boundary between regions 2a and 2b
|
|
2166
|
+
s2bc = 5.85 # entropy boundary between regions 2b and 2c
|
|
2167
|
+
p3 = 165.292 # The bottom of region 3
|
|
2168
|
+
pmax = 1000. # The top of the IF-97 region
|
|
2169
|
+
p5max = 500. # The top of region 5
|
|
2170
|
+
T25 = 1073.15 # Left edge of region 5
|
|
2171
|
+
T5max = 2273.15 # Right edge of region 5
|
|
2172
|
+
|
|
2173
|
+
R = self.data['R']
|
|
2174
|
+
|
|
2175
|
+
# Prepare s and p
|
|
2176
|
+
if p is None:
|
|
2177
|
+
p = pyro.config['def_p']
|
|
2178
|
+
if not isinstance(p,np.ndarray):
|
|
2179
|
+
p = np.array(p)
|
|
2180
|
+
p = pyro.units.pressure(p, to_units='bar')
|
|
2181
|
+
|
|
2182
|
+
scale = pyro.units.energy(to_units='kJ')
|
|
2183
|
+
scale = pyro.units.matter(scale,self.data['mw'],to_units='kg')
|
|
2184
|
+
scale = pyro.units.temperature(scale,to_units='K')
|
|
2185
|
+
|
|
2186
|
+
it = np.nditer((None,None,s,p),
|
|
2187
|
+
op_flags=[['readwrite','allocate'],['readwrite','allocate'],
|
|
2188
|
+
['readonly','copy'], ['readonly','copy']],
|
|
2189
|
+
op_dtypes='float')
|
|
2190
|
+
|
|
2191
|
+
for T_,x_,s_,p_ in it:
|
|
2192
|
+
T_[...] = -1.
|
|
2193
|
+
x_[...] = -1.
|
|
2194
|
+
# Scale the entropy to kJ/kg/K
|
|
2195
|
+
ss = s_ * scale
|
|
2196
|
+
if p_ < p3:
|
|
2197
|
+
Ts = self.Ts(p=p_)
|
|
2198
|
+
pi,t,g,_,gt,_,_,_ = self._g1(Ts,p_,order=1)
|
|
2199
|
+
sL = R * (t*gt - g)
|
|
2200
|
+
pi,t,g,_,gt,_,_,_ = self._g2(Ts,p_,order=1)
|
|
2201
|
+
sV = R * (t*gt - g)
|
|
2202
|
+
if ss<sL:
|
|
2203
|
+
# Region 1
|
|
2204
|
+
T_[...] = self._ts1(s=ss,p=p_)
|
|
2205
|
+
elif ss<sV:
|
|
2206
|
+
# Saturation
|
|
2207
|
+
T_[...] = Ts
|
|
2208
|
+
x_[...] = (ss-sL)/(sV-sL)
|
|
2209
|
+
elif p_<p2ab:
|
|
2210
|
+
s25 = self.s(T=T25,p=p_)
|
|
2211
|
+
if ss<s25:
|
|
2212
|
+
# Region 2a
|
|
2213
|
+
T_[...] = self._ts2a(s=ss,p=p_)
|
|
2214
|
+
else:
|
|
2215
|
+
# Region 5
|
|
2216
|
+
s5 = self.s(T=T5max,p=p_)
|
|
2217
|
+
if ss>s5:
|
|
2218
|
+
raise pyro.utility.PMParamError(
|
|
2219
|
+
'Steam T_h(): the state is not in the IF-97 domain.')
|
|
2220
|
+
Tinit = T25 + (T5max-T25)*(ss-s25)/(s5-s25)
|
|
2221
|
+
T_[...] = self._ts5(s=ss, p=p_, Tinit=Tinit)
|
|
2222
|
+
elif ss<s2bc:
|
|
2223
|
+
# Region 2c
|
|
2224
|
+
T_[...] = self._ts2c(s=ss, p=p_)
|
|
2225
|
+
else:
|
|
2226
|
+
s25 = self.s(T=T25,p=p_)
|
|
2227
|
+
if ss<s25:
|
|
2228
|
+
# Region 2b
|
|
2229
|
+
T_[...] = self._ts2b(s=ss, p=p_)
|
|
2230
|
+
else:
|
|
2231
|
+
# Region 5
|
|
2232
|
+
s5 = self.s(T=T5max,p=p_)
|
|
2233
|
+
if ss>s5:
|
|
2234
|
+
raise pyro.utility.PMParamError(
|
|
2235
|
+
'Steam T_h(): the state is not in the IF-97 domain.')
|
|
2236
|
+
Tinit = T25 + (T5max-T25)*(ss-s25)/(s5-s25)
|
|
2237
|
+
T_[...] = self._ts5(s=ss, p=p_, Tinit=Tinit)
|
|
2238
|
+
elif p_ <= pmax:
|
|
2239
|
+
s13 = self.s(T=T13, p=p_)
|
|
2240
|
+
if ss<s13:
|
|
2241
|
+
# Region 1
|
|
2242
|
+
T_[...] = self._ts1(s=ss,p=p_)
|
|
2243
|
+
else:
|
|
2244
|
+
T23 = self._b23(p=p_)
|
|
2245
|
+
s23 = self.s(T=T23,p=p_)
|
|
2246
|
+
if ss<s23:
|
|
2247
|
+
# Region 3
|
|
2248
|
+
Tinit = T13 + (T23-T13)*(ss-s13)/(s23-s13)
|
|
2249
|
+
T_[...] = self._ts3(s=ss, p=p_, Tinit=Tinit)
|
|
2250
|
+
elif ss<s2bc:
|
|
2251
|
+
# Region 2c
|
|
2252
|
+
T_[...] = self._ts2c(s=ss,p=p_)
|
|
2253
|
+
else:
|
|
2254
|
+
s25 = self.s(T=T25,p=p_)
|
|
2255
|
+
if ss<s25:
|
|
2256
|
+
# Region 2b
|
|
2257
|
+
T_[...] = self._ts2b(s=ss,p=p_)
|
|
2258
|
+
elif p_<=p5max:
|
|
2259
|
+
# Region 5
|
|
2260
|
+
s5 = self.s(T=T5max,p=p_)
|
|
2261
|
+
if ss>s5:
|
|
2262
|
+
raise pyro.utility.PMParamError(
|
|
2263
|
+
'Steam T_s(): the state is not in the IF-97 ' +
|
|
2264
|
+
'domain.')
|
|
2265
|
+
Tinit = T25 + (T5max-T25)*(ss-s25)/(s5-s25)
|
|
2266
|
+
T_[...] = self._ts5(s=ss, p=p_, Tinit=Tinit)
|
|
2267
|
+
else:
|
|
2268
|
+
raise pyro.utility.PMParamError(
|
|
2269
|
+
'*Steam T_s(): the state is not in the IF-97 domain.')
|
|
2270
|
+
else:
|
|
2271
|
+
raise pyro.utility.PMParamError(
|
|
2272
|
+
'Steam T_h(): pressure is above the IF-97 maximum (1000bar)')
|
|
2273
|
+
|
|
2274
|
+
T_[...] = pyro.units.temperature_scale(T_,from_units='K')
|
|
2275
|
+
|
|
2276
|
+
if quality:
|
|
2277
|
+
return it.operands[0:2]
|
|
2278
|
+
return it.operands[0]
|