Skip to main content

A simple package in development for open and pipe flow in hydraulics.

Project description

pydraulics

pydraulics is a Python package designed to facilitate hydraulic calculations and analysis. It provides a range of functionalities for open channel flow and pipe flow calculations.

Reinstala y usa uv pip install -e . pydraulics

Features

Open Channel Flow

  • Depth Calculation: Estimate the depth of flow in open channels based on input parameters such as flow rate, channel geometry, and Manning's roughness coefficient.
  • Flow Calculation: Determine the flow rate in open channels using various methods by using Manning's equation.
  • Critical Flow and Critical Slope Calculation: Calculate the critical flow rate and critical slope in open channels to determine the specific conditions at which flow transitions occur.

Pipe Flow

  • Losses Calculation: Calculate the friction losses and other energy losses in pipes for different flow conditions and material roughness.
  • Reynolds Number and Darcy Coefficient: Utilize a third-party package to calculate the Reynolds number and Darcy coefficient, providing valuable information about the flow regime and the hydraulic resistance of the pipe.

Installation

To install pydraulics, you can use pip, the Python package manager. Simply run the following command:

pip install pydraulics

Getting Started

Here's an example of how to use pydraulics for open channel and pipe flow calculations:

from open_flow import TrapezoidalChannel, TriangularChannel, CircularChannel, RectangularChannel
from pipe_flow import Pipe

# Calculate friction losses in a pipe

#Example with Darcy (default)
pipe1 = Pipe(Q=10, D=0.2, e=0.005, L=100)
print(pipe1.__dict__)
#Example with azen-Williams
pipe2 = Pipe(Q=1, D=0.9, L=100, method='Hazen-Williams', C=140)
print(pipe2.__dict__)

# Calculate depth in an open channel
print(RectangularChannel(b=2, n=0.0013, So=0.0075, Q = 3.5).__dict__)
print(TrapezoidalChannel(b=2, n=0.013, So=0.0075, Q = 3.5, z=1.5).__dict__)
print(CircularChannel(D=1, n=0.013, So=0.0075, Q = 2.1).__dict__)
print(TriangularChannel(z=1.5, n=0.0013, So=0.0075, Q = 3.5).__dict__)

# Calculate flow rate in an open channel using Manning's equation
print(RectangularChannel(b=2, n=0.0013, So=0.0075, y = .1177).__dict__)
print(TrapezoidalChannel(b=2, n=0.013, So=0.0075, y = 0.426, z=1.5).__dict__)
print(CircularChannel(D=1, n=0.0013, So=0.0075, y = 0.2777).__dict__)
print(TriangularChannel(z=1.5, n=0.0013, So=0.0075, y = 0.354).__dict__)

Contributing

Contributions to pydraulics are welcome! If you have any ideas, bug fixes, or new features, feel free to open an issue or submit a pull request on GitHub.

License

pydraulics is licensed under the MIT License. See the LICENSE file for more information.

We hope pydraulics proves to be a valuable tool for your hydraulic analysis and calculations. Happy coding!

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

pydraulics-0.1.6.tar.gz (9.8 kB view details)

Uploaded Source

Built Distribution

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

pydraulics-0.1.6-py3-none-any.whl (9.7 kB view details)

Uploaded Python 3

File details

Details for the file pydraulics-0.1.6.tar.gz.

File metadata

  • Download URL: pydraulics-0.1.6.tar.gz
  • Upload date:
  • Size: 9.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pydraulics-0.1.6.tar.gz
Algorithm Hash digest
SHA256 d5f3dab659a814f50dee7f8537bfdbde0c75371dda2466d847aad043845bf7b0
MD5 1524683a4d330dc6298dc8a07ecc4c3d
BLAKE2b-256 9cca7adb82ebf453e70b8ec22ca8ae4657646c9ae65260dd66db52f0a52786c0

See more details on using hashes here.

File details

Details for the file pydraulics-0.1.6-py3-none-any.whl.

File metadata

  • Download URL: pydraulics-0.1.6-py3-none-any.whl
  • Upload date:
  • Size: 9.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pydraulics-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 fe3e2e43faf05988f5441d6caf4e183d8f19a6fbdfd406693b8acf269bb22dd6
MD5 b72f1d476d11eb8baf9cd3924c153876
BLAKE2b-256 9e322556effe110b4e45c51de47ac68fbf479552998e41253d8af64350dcbcd8

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