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

Uploaded Source

Built Distribution

jneqsim-2.5.25-py3-none-any.whl (85.6 MB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for jneqsim-2.5.25.tar.gz
Algorithm Hash digest
SHA256 d437b895f4da9e052062d8aa1cb40b3352982fa0ec1dc9460189c6d034a60566
MD5 43a9e70ce0b6bd54fef84043d81a637a
BLAKE2b-256 4c927ee3463d2829fc21ab05210d605240d56dfdbedf0f350d28b9ab0e2b7ca3

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for jneqsim-2.5.25-py3-none-any.whl
Algorithm Hash digest
SHA256 0d50117e986e54e6897ccc5f517b50e47db3525edb974a971c71be0b77f89dcf
MD5 5e7276d2fb95ce3c523e785c6566eb9f
BLAKE2b-256 ce23951eefc810e2b7941bccef80d1d2ba2118d6ccd6a719712c212d4c9372bb

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