Show HN: Fast Thermodynamic Calculations in Python

原始链接: https://dlr-institute-of-future-fuels.github.io/gaspype/

Total mol: array([[ 2. , 5.33333333, 8.66666667, 12. ], [ 3. , 6.33333333, 9.66666667, 13. ], [ 4. , 7.33333333, 10.66666667, 14. ]]) Species: H2 H2O N2 Molar fractions: array([[[0. , 0.5 , 0.5 ], [0.625 , 0.1875 , 0.1875 ], [0.76923077, 0.11538462, 0.11538462], [0.83333333, 0.08333333, 0.08333333]], [[0. , 0.33333333, 0.66666667], [0.52631579, 0.15789474, 0.31578947], [0.68965517, 0.10344828, 0.20689655], [0.76923077, 0.07692308, 0.15384615]], [[0. , 0.25 , 0.75 ], [0.45454545, 0.13636364, 0.40909091], [0.625 , 0.09375 , 0.28125 ], [0.71428571, 0.07142857, 0.21428571]]])

Saloc introduced gaspype, a Python library for fast thermodynamic calculations, particularly equilibrium reactions. Designed for ease of use and high performance, it operates on multidimensional arrays and aims for GPU compatibility (JAX, PyTorch) and ML pipeline integration. Feedback has been positive, with users noting its potential as an alternative to more expensive software like Aspen-Hysys. Suggestions included incorporating the Python Array API Standard for broader array library support and adding features like mole/mass/vol fraction conversion, unit conversions, and steam tables. The developer explained the choice of "fluid" as the main entrypoint anticipates future expansion to include real gas behavior and model high-pressure, supercritical fluid processes beyond ideal gas assumptions. Users praised the memorable package name.
相关文章

原文
Total mol:
array([[ 2.        ,  5.33333333,  8.66666667, 12.        ],
       [ 3.        ,  6.33333333,  9.66666667, 13.        ],
       [ 4.        ,  7.33333333, 10.66666667, 14.        ]])
Species:
              H2        H2O         N2
Molar fractions:
array([[[0.        , 0.5       , 0.5       ],
        [0.625     , 0.1875    , 0.1875    ],
        [0.76923077, 0.11538462, 0.11538462],
        [0.83333333, 0.08333333, 0.08333333]],

       [[0.        , 0.33333333, 0.66666667],
        [0.52631579, 0.15789474, 0.31578947],
        [0.68965517, 0.10344828, 0.20689655],
        [0.76923077, 0.07692308, 0.15384615]],

       [[0.        , 0.25      , 0.75      ],
        [0.45454545, 0.13636364, 0.40909091],
        [0.625     , 0.09375   , 0.28125   ],
        [0.71428571, 0.07142857, 0.21428571]]])
联系我们 contact @ memedata.com