Skip to main content

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!

Metadata

Release files for pydraulics 0.1.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pydraulics 0.1.6
File Size Uploaded
pydraulics-0.1.6.tar.gz 9.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pydraulics 0.1.6
File Interpreter ABI Platform
pydraulics-0.1.6-py3-none-any.whl Python 3 none any Details

Total release size: 19.5 kB

Release files / pydraulics-0.1.6.tar.gz

Download URL pydraulics-0.1.6.tar.gz
Size 9.8 kB
Tags Source
SHA-256 checksum
How to use checksums
d5f3dab659a814f50dee7f8537bfdbde0c75371dda2466d847aad043845bf7b0
BLAKE2b-256 checksum
How to use checksums
9cca7adb82ebf453e70b8ec22ca8ae4657646c9ae65260dd66db52f0a52786c0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release files / pydraulics-0.1.6-py3-none-any.whl

Download URL pydraulics-0.1.6-py3-none-any.whl
Size 9.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fe3e2e43faf05988f5441d6caf4e183d8f19a6fbdfd406693b8acf269bb22dd6
BLAKE2b-256 checksum
How to use checksums
9e322556effe110b4e45c51de47ac68fbf479552998e41253d8af64350dcbcd8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release history Release notifications | RSS feed

This release

0.1.6 This release

2 release files

0.1.4

1 release file

0.1.3

1 release file

0.1.2

1 release file

0.1

1 release file

0.0.2

1 release file

0.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page