# Flow Regime Map
**FlowRegimeMap** is a Python package to predict flow regimes and plot flow regime maps using the Taitel and Dukler method. It supports both metric and imperial unit inputs.
## Features
- Predicts flow regimes such as Bubble Flow, Slug Flow, Annular Flow, and Dispersed Bubble Flow.
- Plots flow regime maps based on user-defined gas and liquid velocities.
- Supports both metric and imperial unit inputs.
## Installation
You can install the package via pip (after publishing to PyPI):
```bash
pip install flowregimemap
```
## Usage
### Import the Package
First, you need to import the `draw_flow_regime_map_with_imperial` function from the package.
```python
from flowregimemap import draw_flow_regime_map_with_imperial
```
### Example Usage
Here’s how to use the function with the provided example parameters:
```python
# Import the function
from flowregimemap import draw_flow_regime_map_with_imperial
# Example inputs in imperial units
rho_L_imperial = 62.4 # Liquid density in lb/ft³
rho_G_imperial = 0.0801 # Gas density in lb/ft³
mu_imperial = 0.89 # Liquid viscosity in cP
sigma_imperial = 70 # Surface tension in dyne/cm
D_imperial = 2 # Pipe diameter in inches
# Example inputs for operating point in imperial units
U_LS_imperial = 3 # Superficial liquid velocity in ft/s
U_GS_imperial = 3 # Superficial gas velocity in ft/s
# Call the function to generate the flow regime map
draw_flow_regime_map_with_imperial(rho_L_imperial, rho_G_imperial, sigma_imperial, mu_imperial, D_imperial, U_GS_imperial, U_LS_imperial)
```
This function will generate a plot of the flow regime map and indicate the operating point.
### Parameters
- `rho_L_imperial`: Liquid density (lb/ft³)
- `rho_G_imperial`: Gas density (lb/ft³)
- `mu_imperial`: Viscosity (cP)
- `sigma_imperial`: Surface tension (dyne/cm)
- `D_imperial`: Pipe diameter (inches)
- `U_LS_imperial`: Superficial liquid velocity (ft/s)
- `U_GS_imperial`: Superficial gas velocity (ft/s)
### Output
- A log-log plot showing various flow regimes and the operating point based on the given parameters.
### Dependencies
- `numpy`
- `matplotlib`
Make sure to install the required dependencies by running:
```bash
pip install numpy matplotlib
```
Raw data
{
"_id": null,
"home_page": "https://github.com/abdopetroleum/flowregimemap",
"name": "flowregimemap",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": null,
"keywords": null,
"author": "Abdulrahman Shahin",
"author_email": "your.email@example.com",
"download_url": "https://files.pythonhosted.org/packages/9f/bf/8294225b90e12715fba30d9d2a358d0a8397becde00735e0aa7593c392f4/flowregimemap-0.1.tar.gz",
"platform": null,
"description": "\r\n# Flow Regime Map\r\n\r\n**FlowRegimeMap** is a Python package to predict flow regimes and plot flow regime maps using the Taitel and Dukler method. It supports both metric and imperial unit inputs.\r\n\r\n## Features\r\n\r\n- Predicts flow regimes such as Bubble Flow, Slug Flow, Annular Flow, and Dispersed Bubble Flow.\r\n- Plots flow regime maps based on user-defined gas and liquid velocities.\r\n- Supports both metric and imperial unit inputs.\r\n\r\n## Installation\r\n\r\nYou can install the package via pip (after publishing to PyPI):\r\n\r\n```bash\r\npip install flowregimemap\r\n```\r\n\r\n## Usage\r\n\r\n### Import the Package\r\n\r\nFirst, you need to import the `draw_flow_regime_map_with_imperial` function from the package.\r\n\r\n```python\r\nfrom flowregimemap import draw_flow_regime_map_with_imperial\r\n```\r\n\r\n### Example Usage\r\n\r\nHere\u00e2\u20ac\u2122s how to use the function with the provided example parameters:\r\n\r\n```python\r\n# Import the function\r\nfrom flowregimemap import draw_flow_regime_map_with_imperial\r\n\r\n# Example inputs in imperial units\r\nrho_L_imperial = 62.4 # Liquid density in lb/ft\u00c2\u00b3\r\nrho_G_imperial = 0.0801 # Gas density in lb/ft\u00c2\u00b3\r\nmu_imperial = 0.89 # Liquid viscosity in cP\r\nsigma_imperial = 70 # Surface tension in dyne/cm\r\nD_imperial = 2 # Pipe diameter in inches\r\n\r\n# Example inputs for operating point in imperial units\r\nU_LS_imperial = 3 # Superficial liquid velocity in ft/s\r\nU_GS_imperial = 3 # Superficial gas velocity in ft/s\r\n\r\n# Call the function to generate the flow regime map\r\ndraw_flow_regime_map_with_imperial(rho_L_imperial, rho_G_imperial, sigma_imperial, mu_imperial, D_imperial, U_GS_imperial, U_LS_imperial)\r\n```\r\n\r\nThis function will generate a plot of the flow regime map and indicate the operating point.\r\n\r\n### Parameters\r\n\r\n- `rho_L_imperial`: Liquid density (lb/ft\u00c2\u00b3)\r\n- `rho_G_imperial`: Gas density (lb/ft\u00c2\u00b3)\r\n- `mu_imperial`: Viscosity (cP)\r\n- `sigma_imperial`: Surface tension (dyne/cm)\r\n- `D_imperial`: Pipe diameter (inches)\r\n- `U_LS_imperial`: Superficial liquid velocity (ft/s)\r\n- `U_GS_imperial`: Superficial gas velocity (ft/s)\r\n\r\n### Output\r\n\r\n- A log-log plot showing various flow regimes and the operating point based on the given parameters.\r\n\r\n### Dependencies\r\n\r\n- `numpy`\r\n- `matplotlib`\r\n\r\nMake sure to install the required dependencies by running:\r\n\r\n```bash\r\npip install numpy matplotlib\r\n```\r\n",
"bugtrack_url": null,
"license": null,
"summary": "A Python package to predict flow regimes and plot flow regime maps",
"version": "0.1",
"project_urls": {
"Homepage": "https://github.com/abdopetroleum/flowregimemap"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "b2cdc7de53794a63e8805ebeaf74db5a4afc44db5174c5f1d09cef987e91af3b",
"md5": "fd0ce1161796733a73cab0dac78d5807",
"sha256": "88a0b156b719a3218b39a88c981674e8319880f9c363a5a7ff573114e6afda35"
},
"downloads": -1,
"filename": "flowregimemap-0.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "fd0ce1161796733a73cab0dac78d5807",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 4692,
"upload_time": "2024-10-24T06:44:53",
"upload_time_iso_8601": "2024-10-24T06:44:53.233995Z",
"url": "https://files.pythonhosted.org/packages/b2/cd/c7de53794a63e8805ebeaf74db5a4afc44db5174c5f1d09cef987e91af3b/flowregimemap-0.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "9fbf8294225b90e12715fba30d9d2a358d0a8397becde00735e0aa7593c392f4",
"md5": "8bfe1fdac965657848540bc9ec62df27",
"sha256": "9bb18d4651e14d3ff62f899c786206ccf7d544c9d1395c18a9eb7b89fc842fee"
},
"downloads": -1,
"filename": "flowregimemap-0.1.tar.gz",
"has_sig": false,
"md5_digest": "8bfe1fdac965657848540bc9ec62df27",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 4632,
"upload_time": "2024-10-24T06:44:57",
"upload_time_iso_8601": "2024-10-24T06:44:57.421107Z",
"url": "https://files.pythonhosted.org/packages/9f/bf/8294225b90e12715fba30d9d2a358d0a8397becde00735e0aa7593c392f4/flowregimemap-0.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-10-24 06:44:57",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "abdopetroleum",
"github_project": "flowregimemap",
"github_not_found": true,
"lcname": "flowregimemap"
}