Skip to main content

A Python package to predict flow regimes and plot flow regime maps

Project description

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):

pip install flowregimemap

Usage

Import the Package

First, you need to import the draw_flow_regime_map_with_imperial function from the package.

from flowregimemap import draw_flow_regime_map_with_imperial

Example Usage

Here’s how to use the function with the provided example parameters:

# 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:

pip install numpy matplotlib

Project details


Release history Release notifications | RSS feed

This version

0.1

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

flowregimemap-0.1.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

flowregimemap-0.1-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

Details for the file flowregimemap-0.1.tar.gz.

File metadata

  • Download URL: flowregimemap-0.1.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.3

File hashes

Hashes for flowregimemap-0.1.tar.gz
Algorithm Hash digest
SHA256 9bb18d4651e14d3ff62f899c786206ccf7d544c9d1395c18a9eb7b89fc842fee
MD5 8bfe1fdac965657848540bc9ec62df27
BLAKE2b-256 9fbf8294225b90e12715fba30d9d2a358d0a8397becde00735e0aa7593c392f4

See more details on using hashes here.

File details

Details for the file flowregimemap-0.1-py3-none-any.whl.

File metadata

  • Download URL: flowregimemap-0.1-py3-none-any.whl
  • Upload date:
  • Size: 4.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.3

File hashes

Hashes for flowregimemap-0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 88a0b156b719a3218b39a88c981674e8319880f9c363a5a7ff573114e6afda35
MD5 fd0ce1161796733a73cab0dac78d5807
BLAKE2b-256 b2cdc7de53794a63e8805ebeaf74db5a4afc44db5174c5f1d09cef987e91af3b

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