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.22.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.22.0
File Size Uploaded Provenance
jneqsim-3.22.0.tar.gz 3.0 MB Without provenance Details

Built distribution (wheel)

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

Total release size: 4.0 MB

Release files / jneqsim-3.22.0.tar.gz

Download URL jneqsim-3.22.0.tar.gz
Size 3.0 MB
Tags Source
SHA-256 checksum
How to use checksums
9192fab53fc9f272ca24e700a1617b13659e59250f479e75f1aecf545da78944
BLAKE2b-256 checksum
How to use checksums
7b2808a42b2d58b2c4b41b4f655566002ed245189e5201587c30a89d4d12f6c4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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

Download URL jneqsim-3.22.0-py3-none-any.whl
Size 993.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
aba872707c29d6d6e2784f42653039b5d54197a7f55dca42fa17382181550837
BLAKE2b-256 checksum
How to use checksums
b5dd87b0a503a668e3a6d120f39c7293faec6668b5fdd3b06564ec434e3907f5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Security for jneqsim 3.22.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.

Release history Release notifications | RSS feed

This release

3.22.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