Skip to main content

A library containing various tools in the categories of thermodynamics, fluid mechanics, metering etc.

Project description

pvtlib

pvtlib is a Python library that provides various tools in the categories of thermodynamics, fluid mechanics, metering and various process equipment. The library includes functions for calculating flow rates, gas properties, and other related calculations.

Installation

You can install the library using pip:

pip install pvtlib

Usage

Here is an example of how to use the library:

from pvtlib.metering import differential_pressure_flowmeters

# Example usage of the calculate_flow_venturi function
result = differential_pressure_flowmeters.calculate_flow_venturi(D=0.1, d=0.05, dP=200, rho1=1000)
print(result)

More examples are provided in the examples folder: https://github.com/equinor/pvtlib/tree/main/examples

Features

  • Thermodynamics: Thermodynamic functions
  • Fluid Mechanics: Fluid mechanic functions
  • Metering: Metering functions
  • aga8: Equations for calculating gas properties (GERG-2008 and DETAIL) using the Rust port (https://crates.io/crates/aga8) of NIST's AGA8 code (https://github.com/usnistgov/AGA8)
  • Unit converters: Functions to convert between different units of measure

Handling of invalid input

This library is used for analyzing large amounts of data, as well as in live applications. In these applications it is desired that the functions return "nan" (using numpy nan) when invalid input are provided, or in case of certain errors (such as "divide by zero" errors).

License

This project is licensed under the MIT License - see the LICENSE file for details.

Contact

For any questions or suggestions, feel free to open an issue or contact the author at chaagen2013@gmail.com.

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

pvtlib-1.5.0.tar.gz (33.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pvtlib-1.5.0-py3-none-any.whl (52.3 kB view details)

Uploaded Python 3

File details

Details for the file pvtlib-1.5.0.tar.gz.

File metadata

  • Download URL: pvtlib-1.5.0.tar.gz
  • Upload date:
  • Size: 33.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.11

File hashes

Hashes for pvtlib-1.5.0.tar.gz
Algorithm Hash digest
SHA256 5d67e38ae85a8b40241499ce0f9acf9466c6d225239fcd3d5078b1a2818d986e
MD5 f098fdb1b13434e388cc7a6016977300
BLAKE2b-256 1a831c68c0222e72c2f7b70e65b394502c31e4e4f474edb09916d0b03c01bb28

See more details on using hashes here.

File details

Details for the file pvtlib-1.5.0-py3-none-any.whl.

File metadata

  • Download URL: pvtlib-1.5.0-py3-none-any.whl
  • Upload date:
  • Size: 52.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.11

File hashes

Hashes for pvtlib-1.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9dd301bbb44dfc74e44844e0350dc192d58622d601964f3cfbf6f3af8659d9e4
MD5 d4f80e53e227666e89ce3920093f83a7
BLAKE2b-256 7cfad21569e2dd64752aa9e08e4a64138b5c7381fb587fcefaac6da10c6f7421

See more details on using hashes here.

Supported by

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