You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
NeqSim 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).
NeqSim Python can be installed via **pip** or **conda**.
28
+
## What is NeqSim Python?
13
29
14
-
### Using pip
30
+
NeqSim Python is part of the [NeqSim project](https://equinor.github.io/neqsimhome/) — 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.
15
31
16
-
```bash
17
-
pip install neqsim
18
-
```
32
+
It provides Python toolboxes such as [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) that streamline the use of NeqSim, plus direct access to the full Java API via the `jneqsim` gateway.
**Note:** The conda package automatically includes Java (OpenJDK) as a dependency, so no separate Java installation is required.
64
+
</td>
65
+
</tr>
66
+
</table>
37
67
38
-
### Prerequisites
68
+
> **Prerequisites:** Python 3.9+ and Java 11+. The conda package automatically installs OpenJDK — no separate Java setup needed. For pip, install Java from [Adoptium](https://adoptium.net/).
39
69
40
-
- Python 3.9 or higher
41
-
- Java 11 or higher (automatically installed with conda, or install separately for pip)
70
+
### Try it now
42
71
43
-
## Getting Started
72
+
```python
73
+
from neqsim.thermo import fluid
44
74
45
-
See 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).
75
+
# Create a natural gas fluid
76
+
fl = fluid('srk')
77
+
fl.addComponent('methane', 0.85)
78
+
fl.addComponent('ethane', 0.10)
79
+
fl.addComponent('propane', 0.05)
80
+
fl.setTemperature(25.0, 'C')
81
+
fl.setPressure(60.0, 'bara')
82
+
fl.setMixingRule('classic')
83
+
84
+
from neqsim.thermo import TPflash, printFrame
85
+
TPflash(fl)
86
+
printFrame(fl)
87
+
```
88
+
89
+
---
46
90
47
-
## Process Simulation
91
+
## 🔧 Process Simulation
48
92
49
93
NeqSim Python provides multiple ways to build process simulations:
50
94
51
-
### 1. Python Wrappers (Recommended for beginners)
95
+
<details>
96
+
<summary><strong>1. Python Wrappers</strong> — recommended for beginners & notebooks</summary>
52
97
53
-
Simple functions with a global process - great for notebooks and prototyping:
98
+
Simple functions with a global process — great for prototyping:
NeqSim includes a `pvtsimulation` package for common PVT experiments (CCE/CME, CVD, differential liberation, separator tests, swelling, viscosity, etc.) and tuning workflows.
-[PVT examples with direct Java access](examples/pvtsimulation/README.md)
160
225
161
-
See 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.
226
+
---
162
227
163
-
## PVT Simulation (PVTsimulation)
228
+
## 📂 Examples
164
229
165
-
NeqSim also includes a `pvtsimulation` package for common PVT experiments (CCE/CME, CVD, differential liberation, separator tests, swelling, viscosity, etc.) and tuning workflows.
230
+
Explore ready-to-run examples in the [examples folder](https://github.com/equinor/neqsim-python/tree/master/examples):
166
231
167
-
- Documentation: `docs/pvt_simulation.md`
168
-
- Direct Java access examples: `examples/pvtsimulation/README.md`
232
+
- Process simulation — [processApproaches.py](https://github.com/equinor/neqsim-python/blob/master/examples/processApproaches.py) (all four approaches)
Java 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).
240
+
## ⚙️ Technical Notes
173
241
174
-
## Contributing
242
+
[JPype](https://github.com/jpype-project/jpype) bridges Python and Java. See the [JPype installation guide](https://jpype.readthedocs.io/en/latest/install.html) for platform-specific details. Ensure Python and Java are both 64-bit (or both 32-bit) — mixing architectures will crash on import.
175
243
176
-
Please read [CONTRIBUTING.md](CONTRIBUTING.md) for details on our code of conduct, and the process for submitting pull requests.
244
+
The full list of Python dependencies is on the [dependencies page](https://github.com/equinor/neqsim-python/network/dependencies).
177
245
178
-
## Discussion forum
246
+
---
179
247
180
-
Questions related to neqsim can be posted in the [github discussion pages](https://github.com/equinor/neqsim/discussions).
248
+
## 🏗️ Contributing
249
+
250
+
We welcome contributions — bug fixes, new examples, documentation improvements, and more.
251
+
252
+
-[CONTRIBUTING.md](CONTRIBUTING.md) — Code of conduct and PR process
253
+
-[NeqSim Python Wiki](https://github.com/equinor/neqsim-python/wiki) — Guides and usage patterns
NeqSim use [SemVer](https://semver.org/) for versioning.
273
+
NeqSim uses [SemVer](https://semver.org/) for versioning.
274
+
275
+
## Authors
185
276
186
-
## Licence
277
+
Even Solbraa (esolbraa@gmail.com), Marlene Louise Lund
187
278
188
-
NeqSim is distributed under the [Apache-2.0](https://github.com/equinor/neqsimsource/blob/master/LICENSE) licence.
279
+
NeqSim development was initiated at [NTNU](https://www.ntnu.edu/employees/even.solbraa). A number of master and PhD students have contributed — we greatly acknowledge their contributions.
189
280
190
-
## Acknowledgments
281
+
## License
191
282
192
-
A number of master and PhD students at NTNU have contributed to development of NeqSim. We greatly acknowledge their contributions.
0 commit comments