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.23.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.23.0
File Size Uploaded Provenance
jneqsim-3.23.0.tar.gz 3.0 MB Without provenance Details

Built distribution (wheel)

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

Total release size: 4.0 MB

Release files / jneqsim-3.23.0.tar.gz

Download URL jneqsim-3.23.0.tar.gz
Size 3.0 MB
Tags Source
SHA-256 checksum
How to use checksums
1aa1b3c7f6ac523346db6dfc3f9f9ab1de5973371e8fa8ef8553513b76960253
BLAKE2b-256 checksum
How to use checksums
e2fb215e01fa02a47d30eca1e84bea7676ac68deacd10681b81ed0759783f9e0
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.23.0-py3-none-any.whl

Download URL jneqsim-3.23.0-py3-none-any.whl
Size 1.0 MB
Tags Python 3
SHA-256 checksum
How to use checksums
dae604b885b3d3618c197b8efe4329547166a1dc33d61b019969876c01176ee5
BLAKE2b-256 checksum
How to use checksums
5949caf1d430a6a628b410d514e0b9acff798fd1781e5ad27671120218069100
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.23.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.23.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