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-3.0.1.tar.gz (88.0 MB view details)

Uploaded Source

Built Distribution

jneqsim-3.0.1-py3-none-any.whl (85.8 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: jneqsim-3.0.1.tar.gz
  • Upload date:
  • Size: 88.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for jneqsim-3.0.1.tar.gz
Algorithm Hash digest
SHA256 177095a8e926c3e6c588257c5bee9979ec95944a4e156a0dd698bd9dcb58e133
MD5 d04ce57496e5e04101a632df169f8ccf
BLAKE2b-256 32d98791999680537b76d60b9fe768e13e6c62a9d5f4f24decab8ce95d8efd98

See more details on using hashes here.

File details

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

File metadata

  • Download URL: jneqsim-3.0.1-py3-none-any.whl
  • Upload date:
  • Size: 85.8 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for jneqsim-3.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 73dd5ea2a890873480aa7ce6cdcfe8ea4f174d696476198fb6711b23ea43a6bc
MD5 689b5337b7bbc4cd8b6bed99aa9d1824
BLAKE2b-256 f5abadd61bb16619aa56c3911fe7b61e413c25efd0ffa0a89f8ffcd47dc6b650

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