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

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

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: jneqsim-2.5.20.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.20.tar.gz
Algorithm Hash digest
SHA256 129335599c508f6f9ae376e50c8d8779c88bb64ae4585c80a88e27dac6172ccd
MD5 1447bdd233b171e9fbb8313533c9131b
BLAKE2b-256 0b931e9d04b452d507d5958e81212cee2210389fd1a1facc6082ba9e85eb43ba

See more details on using hashes here.

File details

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

File metadata

  • Download URL: jneqsim-2.5.20-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.20-py3-none-any.whl
Algorithm Hash digest
SHA256 e12fabf9cf8fd42dd7a6e69570f167e21df43f530175097cac833432ceda6c30
MD5 8b80f491660999191203ccab596a034d
BLAKE2b-256 1fb5064050002a2ef5fccbd727ec71d7e294b2169e4e1e6e411a7d592ab9034c

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