Skip to main content

Python bindings for the Java library NeqSim (via JPype), with python stubs

Project description

jNeqSim

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/

[!NOTE] JNeqSim mirrors NeqSims versions

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

:+1: 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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

jneqsim-2.5.21.tar.gz (30.6 MB view details)

Uploaded Source

Built Distribution

jneqsim-2.5.21-py3-none-any.whl (28.4 MB view details)

Uploaded Python 3

File details

Details for the file jneqsim-2.5.21.tar.gz.

File metadata

  • Download URL: jneqsim-2.5.21.tar.gz
  • Upload date:
  • Size: 30.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.0.0 CPython/3.12.2

File hashes

Hashes for jneqsim-2.5.21.tar.gz
Algorithm Hash digest
SHA256 c743dd6015ca9fbab72883714ffb90dfa8b47d2c497e9f696c14f76b3e67e471
MD5 92fe1c1c3a11bbce7d24eee581a91387
BLAKE2b-256 72c95fd06b29b6d9d8e8b65644579d5958c2ae45c7dde24673bf6072ed4a4825

See more details on using hashes here.

File details

Details for the file jneqsim-2.5.21-py3-none-any.whl.

File metadata

  • Download URL: jneqsim-2.5.21-py3-none-any.whl
  • Upload date:
  • Size: 28.4 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.0.0 CPython/3.12.2

File hashes

Hashes for jneqsim-2.5.21-py3-none-any.whl
Algorithm Hash digest
SHA256 8706e36595e7ef79871a54faa575b2c44289bce5691ba81e2e489d82578e0e83
MD5 c6d0486afdd90eb98f2c006ede0a881f
BLAKE2b-256 354b22c96dbd3eaa38f836c39c26ce4151d2096bca84eb5c17d822088345ed76

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page