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.7.0.tar.gz (36.6 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.7.0-py3-none-any.whl (55.8 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for pvtlib-1.7.0.tar.gz
Algorithm Hash digest
SHA256 49bbcfecee50536be75f4b62c4ea6bf6e6330d8bfa8c57727d08acb8ac5ca518
MD5 74cc486f1855793e97f521c3a2a1f78b
BLAKE2b-256 a2456c68f36d5c4adc72761be820e15d198d2726f9abb566b3bfca1eaf28457a

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for pvtlib-1.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3e7a50488847d3583709cc4f726144ef57ca89ed6e5214864426ed27a28696a1
MD5 048e8c57a1defb79de0cf05fa163719e
BLAKE2b-256 d47a829f81444bbabc877f7df5b31ab6f636c69ffda846fbe2535eada51886aa

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