{"id":19835114,"url":"https://github.com/equinor/neqsim-python","last_synced_at":"2026-01-20T23:04:17.097Z","repository":{"id":35612830,"uuid":"164088889","full_name":"equinor/neqsim-python","owner":"equinor","description":"NeqSim is a library for calculation of fluid behavior, phase equilibrium and process simulation. This project is a Python interface to NeqSim.","archived":false,"fork":false,"pushed_at":"2026-01-07T16:30:06.000Z","size":2549178,"stargazers_count":93,"open_issues_count":3,"forks_count":19,"subscribers_count":8,"default_branch":"master","last_synced_at":"2026-01-09T10:58:42.567Z","etag":null,"topics":["equation-of-state","fluid-dynamics","fluid-properties","gas-production","gas-transport","oil-and-gas","oil-production","process-simulation","pvt","python","thermodynamic-properties","thermodynamics"],"latest_commit_sha":null,"homepage":"https://equinor.github.io/neqsimhome/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/equinor.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2019-01-04T09:45:00.000Z","updated_at":"2026-01-08T18:54:32.000Z","dependencies_parsed_at":"2023-01-16T01:15:49.879Z","dependency_job_id":"52d80044-4bd0-4dfb-91ac-fa879e4ec4c8","html_url":"https://github.com/equinor/neqsim-python","commit_stats":{"total_commits":667,"total_committers":15,"mean_commits":44.46666666666667,"dds":"0.39730134932533734","last_synced_commit":"af8cb65afe2fdb6dd706770761a4b1ff0ab333e3"},"previous_names":["equinor/neqsimpython"],"tags_count":231,"template":false,"template_full_name":null,"purl":"pkg:github/equinor/neqsim-python","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/equinor%2Fneqsim-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/equinor%2Fneqsim-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/equinor%2Fneqsim-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/equinor%2Fneqsim-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/equinor","download_url":"https://codeload.github.com/equinor/neqsim-python/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/equinor%2Fneqsim-python/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28618364,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-20T22:24:05.405Z","status":"ssl_error","status_checked_at":"2026-01-20T22:20:31.342Z","response_time":117,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["equation-of-state","fluid-dynamics","fluid-properties","gas-production","gas-transport","oil-and-gas","oil-production","process-simulation","pvt","python","thermodynamic-properties","thermodynamics"],"created_at":"2024-11-12T12:06:41.571Z","updated_at":"2026-01-20T23:04:17.071Z","avatar_url":"https://github.com/equinor.png","language":"Python","readme":"![NeqSim Logo](https://github.com/equinor/neqsim/blob/master/docs/wiki/neqsimlogocircleflatsmall.png)\r\n\r\n![Run tests](https://github.com/equinor/neqsim-python/actions/workflows/runtests.yml/badge.svg?branch=master)\r\n![Publish package](https://github.com/equinor/neqsim-python/actions/workflows/publish-to-test-pypi.yml/badge.svg?branch=master)\r\n\r\n# NeqSim Python\r\n\r\nNeqSim Python is part of the [NeqSim project](https://equinor.github.io/neqsimhome/). NeqSim Python is a Python interface to the [NeqSim Java library](https://github.com/equinor/neqsim) for estimation of fluid behavior and process design for oil and gas production. NeqSim Python toolboxes (eg. [thermoTools](https://github.com/equinor/neqsim-python/blob/master/src/neqsim/thermo/thermoTools.py) and [processTools](https://github.com/equinor/neqsim-python/blob/master/src/neqsim/process/processTools.py)) are implemented to streamline use of neqsim in Python. Examples of use are given in the [examples folder](https://github.com/equinor/neqsim-python/tree/master/examples).\r\n\r\n## Installation\r\n\r\nNeqSim Python can be installed via **pip** or **conda**.\r\n\r\n### Using pip\r\n\r\n```bash\r\npip install neqsim\r\n```\r\n\r\n### Using Conda\r\n\r\nNeqSim is available on conda-forge. Install with:\r\n\r\n```bash\r\nconda install -c conda-forge neqsim\r\n```\r\n\r\nOr add conda-forge to your channels and install:\r\n\r\n```bash\r\nconda config --add channels conda-forge\r\nconda config --set channel_priority strict\r\nconda install neqsim\r\n```\r\n\r\n**Note:** The conda package automatically includes Java (OpenJDK) as a dependency, so no separate Java installation is required.\r\n\r\n### Prerequisites\r\n\r\n- Python 3.9 or higher\r\n- Java 11 or higher (automatically installed with conda, or install separately for pip)\r\n\r\n## Getting Started\r\n\r\nSee the [NeqSim Python Wiki](https://github.com/equinor/neqsim-python/wiki) for how to use NeqSim Python via Python or in Jupyter notebooks. Also see [examples of use of NeqSim for Gas Processing in Colab](https://colab.research.google.com/github/EvenSol/NeqSim-Colab/blob/master/notebooks/examples_of_NeqSim_in_Colab.ipynb#scrollTo=kHt6u-utpvYf). Learn and ask questions in [Discussions for use and development of NeqSim](https://github.com/equinor/neqsim/discussions).\r\n\r\n## Process Simulation\r\n\r\nNeqSim Python provides multiple ways to build process simulations:\r\n\r\n### 1. Python Wrappers (Recommended for beginners)\r\n\r\nSimple functions with a global process - great for notebooks and prototyping:\r\n\r\n```python\r\nfrom neqsim.thermo import fluid\r\nfrom neqsim.process import stream, compressor, separator, runProcess, clearProcess\r\n\r\nclearProcess()\r\nfeed = fluid('srk')\r\nfeed.addComponent('methane', 0.9)\r\nfeed.addComponent('ethane', 0.1)\r\nfeed.setTemperature(30.0, 'C')\r\nfeed.setPressure(50.0, 'bara')\r\nfeed.setTotalFlowRate(10.0, 'MSm3/day')\r\n\r\ninlet = stream('inlet', feed)\r\nsep = separator('separator', inlet)\r\ncomp = compressor('compressor', sep.getGasOutStream(), pres=100.0)\r\nrunProcess()\r\n\r\nprint(f\"Compressor power: {comp.getPower()/1e6:.2f} MW\")\r\n```\r\n\r\n### 2. ProcessContext (Recommended for production)\r\n\r\nContext manager with explicit process control - supports multiple independent processes:\r\n\r\n```python\r\nfrom neqsim.thermo import fluid\r\nfrom neqsim.process import ProcessContext\r\n\r\nfeed = fluid('srk')\r\nfeed.addComponent('methane', 0.9)\r\nfeed.addComponent('ethane', 0.1)\r\nfeed.setTemperature(30.0, 'C')\r\nfeed.setPressure(50.0, 'bara')\r\n\r\nwith ProcessContext(\"Compression Train\") as ctx:\r\n    inlet = ctx.stream('inlet', feed)\r\n    sep = ctx.separator('separator', inlet)\r\n    comp = ctx.compressor('compressor', sep.getGasOutStream(), pres=100.0)\r\n    ctx.run()\r\n    print(f\"Compressor power: {comp.getPower()/1e6:.2f} MW\")\r\n```\r\n\r\n### 3. ProcessBuilder (Fluent API)\r\n\r\nChainable builder pattern - ideal for configuration-driven design:\r\n\r\n```python\r\nfrom neqsim.thermo import fluid\r\nfrom neqsim.process import ProcessBuilder\r\n\r\nfeed = fluid('srk')\r\nfeed.addComponent('methane', 0.9)\r\nfeed.addComponent('ethane', 0.1)\r\nfeed.setTemperature(30.0, 'C')\r\nfeed.setPressure(50.0, 'bara')\r\n\r\nprocess = (ProcessBuilder(\"Compression Train\")\r\n    .add_stream('inlet', feed)\r\n    .add_separator('separator', 'inlet')\r\n    .add_compressor('compressor', 'separator', pressure=100.0)\r\n    .run())\r\n\r\nprint(f\"Compressor power: {process.get('compressor').getPower()/1e6:.2f} MW\")\r\n```\r\n\r\n### 4. Direct Java Access (Full control)\r\n\r\nExplicit process management using jneqsim - for advanced features see [neqsim java API](https://github.com/equinor/neqsim):\r\n\r\n```python\r\nfrom neqsim import jneqsim\r\nfrom neqsim.thermo import fluid\r\n\r\nfeed = fluid('srk')\r\nfeed.addComponent('methane', 0.9)\r\nfeed.addComponent('ethane', 0.1)\r\nfeed.setTemperature(30.0, 'C')\r\nfeed.setPressure(50.0, 'bara')\r\n\r\n# Create equipment using Java classes\r\ninlet = jneqsim.process.equipment.stream.Stream('inlet', feed)\r\nsep = jneqsim.process.equipment.separator.Separator('separator', inlet)\r\ncomp = jneqsim.process.equipment.compressor.Compressor('compressor', sep.getGasOutStream())\r\ncomp.setOutletPressure(100.0)\r\n\r\n# Create and run process explicitly\r\nprocess = jneqsim.process.processmodel.ProcessSystem()\r\nprocess.add(inlet)\r\nprocess.add(sep)\r\nprocess.add(comp)\r\nprocess.run()\r\n\r\nprint(f\"Compressor power: {comp.getPower()/1e6:.2f} MW\")\r\n```\r\n\r\n### Choosing an Approach\r\n\r\n| Use Case                    | Recommended Approach |\r\n| --------------------------- | -------------------- |\r\n| Learning \u0026 prototyping      | Python wrappers      |\r\n| Jupyter notebooks           | Python wrappers      |\r\n| Production applications     | ProcessContext       |\r\n| Multiple parallel processes | ProcessContext       |\r\n| Configuration-driven design | ProcessBuilder       |\r\n| Advanced Java features      | Direct Java access   |\r\n\r\nSee the [examples folder](https://github.com/equinor/neqsim-python/tree/master/examples) for more process simulation examples, including [processApproaches.py](https://github.com/equinor/neqsim-python/blob/master/examples/processApproaches.py) which demonstrates all four approaches.\r\n\r\n## PVT Simulation (PVTsimulation)\r\n\r\nNeqSim also includes a `pvtsimulation` package for common PVT experiments (CCE/CME, CVD, differential liberation, separator tests, swelling, viscosity, etc.) and tuning workflows.\r\n\r\n- Documentation: `docs/pvt_simulation.md`\r\n- Direct Java access examples: `examples/pvtsimulation/README.md`\r\n\r\n## Prerequisites\r\n\r\nJava version 8 or higher ([Java JDK](https://adoptium.net/)) needs to be installed. The Python package [JPype](https://github.com/jpype-project/jpype) is used to connect Python and Java. Read the [installation requirements for Jpype](https://jpype.readthedocs.io/en/latest/install.html). Be aware that mixing 64 bit Python with 32 bit Java and vice versa crashes on import of the jpype module. The needed Python packages are listed in the [NeqSim Python dependencies page](https://github.com/equinor/neqsim-python/network/dependencies).\r\n\r\n## Contributing\r\n\r\nPlease read [CONTRIBUTING.md](CONTRIBUTING.md) for details on our code of conduct, and the process for submitting pull requests.\r\n\r\n## Discussion forum\r\n\r\nQuestions related to neqsim can be posted in the [github discussion pages](https://github.com/equinor/neqsim/discussions).\r\n\r\n## Versioning\r\n\r\nNeqSim use [SemVer](https://semver.org/) for versioning.\r\n\r\n## Licence\r\n\r\nNeqSim is distributed under the [Apache-2.0](https://github.com/equinor/neqsimsource/blob/master/LICENSE) licence.\r\n\r\n## Acknowledgments\r\n\r\nA number of master and PhD students at NTNU have contributed to development of NeqSim. We greatly acknowledge their contributions.\r\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fequinor%2Fneqsim-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fequinor%2Fneqsim-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fequinor%2Fneqsim-python/lists"}