Skip to main content

jNeqSim

PyPI version License

Python interface for the NeqSim java package, with stubs. Java interface is created with jpype, and stubs are generated with stubgenj

PYPI

https://pypi.org/project/jneqsim/

Demo

demo.gif

Example

from jneqsim import neqsim


def pressurize_gas():
    inlet_fluid = neqsim.thermo.system.SystemSrkEos()
    neqsim.thermo.system.SystemSrkEos()
    thermo_ops = neqsim.thermodynamicOperations.ThermodynamicOperations(inlet_fluid)
    inlet_fluid.addComponent("methane", 100.0)

    inlet_fluid.setTemperature(10, "C")
    inlet_fluid.setPressure(20, "bara")
    inlet_fluid.setMultiPhaseCheck(True)
    inlet_fluid.setSolidPhaseCheck("methane")

    thermo_ops.TPflash()
    thermo_ops.bubblePointTemperatureFlash()

    inlet_fluid.initProperties()
    enthalpy = inlet_fluid.getEnthalpy()

    inlet_fluid.setPressure(1.0, "bara")
    thermo_ops.PHflash(enthalpy)

Dependencies

Version Management

jneqsim uses a controlled release process to ensure compatibility:

  • Pinned Versions: Each jneqsim release is pinned to a specific, tested NeqSim JAR version
  • Automated Updates: The nightly CI workflow automatically checks for new NeqSim releases and publishes updated jneqsim packages when available
  • No Auto-Updates: Applications using jneqsim will not automatically download newer NeqSim versions - they use the tested version that comes with their installed jneqsim package
  • Cache Management: Downloaded JARs are cached locally in ~/.jneqsim/cache for faster subsequent usage

Development

Running Tests

The project uses pytest with custom markers to categorize tests. Test dependencies are already included in the development dependencies.

# Install development dependencies (includes pytest and pytest-mock)
poetry install

# Run unit tests (fast, excludes tests marked as slow)
pytest -v -m "not slow" tests/

# Run all tests (may download JARs for integration tests)
pytest -v tests/

# Run with coverage (requires pytest-cov)
poetry add --group dev pytest-cov
poetry run pytest --cov=jneqsim --cov-report=html tests/

Test markers:

  • slow: Tests that may download files or take longer to run
  • integration: Integration tests that require external dependencies
  • unit: Fast unit tests (default)

👍 Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

Metadata

Release files for jneqsim 3.28.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for jneqsim 3.28.0
File Size Uploaded Provenance Actions
jneqsim-3.28.0.tar.gz 3.0 MB Without provenance Details for jneqsim-3.28.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for jneqsim 3.28.0
File Interpreter ABI Platform Actions
jneqsim-3.28.0-py3-none-any.whl Python 3 none any Details for jneqsim-3.28.0-py3-none-any.whl

Total release size: 4.1 MB

Release files / jneqsim-3.28.0.tar.gz

Download URL jneqsim-3.28.0.tar.gz
Size 3.0 MB
Tags Source
SHA-256 checksum
How to use checksums
39ddd4b874f4b8e9aaa8aae3e27ca0bd4f4ca4adf21a14592b63fcf340b563c5
BLAKE2b-256 checksum
How to use checksums
84aa5e3297a2a22e6e6d53db66eceb66fb5fd615e39abe0b14650fbf171d0222
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / jneqsim-3.28.0-py3-none-any.whl

Download URL jneqsim-3.28.0-py3-none-any.whl
Size 1.1 MB
Tags Python 3
SHA-256 checksum
How to use checksums
5e30bd864f5cf5f9ae51a741d51a646cd548fbaf3982b281667ff77c83d8fa43
BLAKE2b-256 checksum
How to use checksums
d671d4e614c04116b721f97bec97c5e3deb969558c6a7e4f76c9504c484dbe1f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Security for jneqsim 3.28.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

3.28.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page