|
| 1 | +# NeqSim Python 3.10.0 |
| 2 | + |
| 3 | +NeqSim Python is the Python interface to the NeqSim engine for thermodynamic calculations, physical properties, process simulation, and PVT analysis from Python and Jupyter notebooks. |
| 4 | + |
| 5 | +## Highlights |
| 6 | + |
| 7 | +- Bundles the NeqSim Java 3.10.0 engine for Java 11+ runtimes. |
| 8 | +- Bundles the NeqSim Java 3.10.0 engine for Java 8 runtimes. |
| 9 | +- Aligns Python package metadata and the conda recipe with version 3.10.0. |
| 10 | + |
| 11 | +## Install |
| 12 | + |
| 13 | +Use pip when you already have Java installed: |
| 14 | + |
| 15 | +```bash |
| 16 | +pip install --upgrade neqsim==3.10.0 |
| 17 | +``` |
| 18 | + |
| 19 | +Use conda when you want OpenJDK installed with the package: |
| 20 | + |
| 21 | +```bash |
| 22 | +conda install -c conda-forge neqsim=3.10.0 |
| 23 | +``` |
| 24 | + |
| 25 | +Requirements: |
| 26 | + |
| 27 | +- Python 3.9 or newer. |
| 28 | +- Java 8 or newer for pip installs. |
| 29 | +- Conda installs include OpenJDK through conda-forge. |
| 30 | + |
| 31 | +Verify the installed package version without starting the JVM: |
| 32 | + |
| 33 | +```bash |
| 34 | +python -c "from importlib.metadata import version; print(version('neqsim'))" |
| 35 | +``` |
| 36 | + |
| 37 | +## Quick Start |
| 38 | + |
| 39 | +```python |
| 40 | +from neqsim.thermo import TPflash, fluid, printFrame |
| 41 | + |
| 42 | +natural_gas = fluid("srk") |
| 43 | +natural_gas.addComponent("methane", 0.85) |
| 44 | +natural_gas.addComponent("ethane", 0.10) |
| 45 | +natural_gas.addComponent("propane", 0.05) |
| 46 | +natural_gas.setTemperature(25.0, "C") |
| 47 | +natural_gas.setPressure(60.0, "bara") |
| 48 | +natural_gas.setMixingRule("classic") |
| 49 | + |
| 50 | +TPflash(natural_gas) |
| 51 | +printFrame(natural_gas) |
| 52 | +``` |
| 53 | + |
| 54 | +## Useful Links |
| 55 | + |
| 56 | +- Full changelog: https://github.com/equinor/neqsim-python/compare/v3.9.1...v3.10.0 |
| 57 | +- Documentation: https://equinor.github.io/neqsimhome/ |
| 58 | +- Python examples: https://github.com/equinor/neqsim-python/tree/master/examples |
| 59 | +- Java engine: https://github.com/equinor/neqsim |
| 60 | +- Discussions: https://github.com/equinor/neqsim/discussions |
0 commit comments