pvtlib


Namepvtlib JSON
Version 1.4.0 PyPI version JSON
download
home_pagehttps://github.com/equinor/pvtlib
SummaryA library containing various tools in the categories of thermodynamics, fluid mechanics, metering etc.
upload_time2025-01-26 10:09:54
maintainerNone
docs_urlNone
authorChristian Hågenvik
requires_python>=3.9
licenseMIT
keywords thermodynamics fluid-mechanics metering aga8
VCS
bugtrack_url
requirements numpy pyaga8 scipy
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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`:

```sh
pip install pvtlib
```

## Usage

Here is an example of how to use the library:

```py
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](https://github.com/equinor/pvtlib/blob/main/LICENSE) file for details.

## Contact

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

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/equinor/pvtlib",
    "name": "pvtlib",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": null,
    "keywords": "thermodynamics fluid-mechanics metering aga8",
    "author": "Christian H\u00e5genvik",
    "author_email": "chaagen2013@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/2c/5d/3c74411fd83a636a077e559266230feba1b916e047b4fb0aa82cb8ed150e/pvtlib-1.4.0.tar.gz",
    "platform": null,
    "description": "# pvtlib\n\n`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.\n\n## Installation\n\nYou can install the library using `pip`:\n\n```sh\npip install pvtlib\n```\n\n## Usage\n\nHere is an example of how to use the library:\n\n```py\nfrom pvtlib.metering import differential_pressure_flowmeters\n\n# Example usage of the calculate_flow_venturi function\nresult = differential_pressure_flowmeters.calculate_flow_venturi(D=0.1, d=0.05, dP=200, rho1=1000)\nprint(result)\n```\n\nMore examples are provided in the examples folder: https://github.com/equinor/pvtlib/tree/main/examples\n\n## Features\n\n- **Thermodynamics**: Thermodynamic functions\n- **Fluid Mechanics**: Fluid mechanic functions\n- **Metering**: Metering functions\n- **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)\n- **Unit converters**: Functions to convert between different units of measure\n\n### Handling of invalid input\nThis 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). \n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](https://github.com/equinor/pvtlib/blob/main/LICENSE) file for details.\n\n## Contact\n\nFor any questions or suggestions, feel free to open an issue or contact the author at chaagen2013@gmail.com.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A library containing various tools in the categories of thermodynamics, fluid mechanics, metering etc.",
    "version": "1.4.0",
    "project_urls": {
        "Homepage": "https://github.com/equinor/pvtlib"
    },
    "split_keywords": [
        "thermodynamics",
        "fluid-mechanics",
        "metering",
        "aga8"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "d14b882244ba4f7e47c49f19cd2c9f1580ff7ba1d0eb6bdff73d4ad196323e19",
                "md5": "083e181bacb7baf735521c9b8d75ecf8",
                "sha256": "83ca474587cdd094b09d0e187ce89c1184dbb00693f9bce58695118647a60e9d"
            },
            "downloads": -1,
            "filename": "pvtlib-1.4.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "083e181bacb7baf735521c9b8d75ecf8",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 49484,
            "upload_time": "2025-01-26T10:09:53",
            "upload_time_iso_8601": "2025-01-26T10:09:53.042177Z",
            "url": "https://files.pythonhosted.org/packages/d1/4b/882244ba4f7e47c49f19cd2c9f1580ff7ba1d0eb6bdff73d4ad196323e19/pvtlib-1.4.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "2c5d3c74411fd83a636a077e559266230feba1b916e047b4fb0aa82cb8ed150e",
                "md5": "1a49bf6440446f52773727974752ddf7",
                "sha256": "9072de3fde4784e087f0c370fd3b40fbbe6e34ecd918c2346e71f8d1a936a819"
            },
            "downloads": -1,
            "filename": "pvtlib-1.4.0.tar.gz",
            "has_sig": false,
            "md5_digest": "1a49bf6440446f52773727974752ddf7",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 29616,
            "upload_time": "2025-01-26T10:09:54",
            "upload_time_iso_8601": "2025-01-26T10:09:54.905007Z",
            "url": "https://files.pythonhosted.org/packages/2c/5d/3c74411fd83a636a077e559266230feba1b916e047b4fb0aa82cb8ed150e/pvtlib-1.4.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-01-26 10:09:54",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "equinor",
    "github_project": "pvtlib",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "numpy",
            "specs": [
                [
                    ">=",
                    "1.26.2"
                ]
            ]
        },
        {
            "name": "pyaga8",
            "specs": [
                [
                    ">=",
                    "0.1.8"
                ]
            ]
        },
        {
            "name": "scipy",
            "specs": [
                [
                    ">=",
                    "1.11.4"
                ]
            ]
        }
    ],
    "lcname": "pvtlib"
}
        
Elapsed time: 0.82444s