This a repo to solve the three typical problems for permanent flow in pipe hydraulics:
-
Type 1: Revision of a simple pipe design. Here, given all the fluid, pipe and flow characteristics, we estimate the discharte (Q).
-
Type 2: Estimation of the power required to transport flow from one side to the other. Here, given all the fluid, pipe and flow characteristics, we estimate the net power (P).
-
Type 3: Simple pipe design. Here, given all the fluid, pipe and flow characteristics, we estimate the comercial diameter (D).
for the folling pipe system:
-
Simple pipes: This a system of one pipe where the geometry and its physical characteristics are constant.
-
Serial pipes: This system is made up by diferent pipes conected one after one. The geometrical and physical characteristics are diferent for each pipe. There are outflows at the end of each pipe.
-
Porous pipes: This system is made up by a pipe that discharge water per unit length. It is very common in irrigation systems and the problem here is to calculate the energy loss through the pipe.
-
Parallel pipes: This system is composed for usually 2 or seldom more pipes conected in parallel between two nodes. The geometrical and physical characteristics are usually diferent for each pipe.
-
Open pipe network: This is a system of reservoir conected by pipes and nodes. Usually, there is a reservoir that supply to downstream reservoir throuthg the pipes. Sometimes there are outflow at the nodes.
This directory contains:
-
plib.py
: This is a python library with functions to calculate multiple variables related to pipe systems. -
spclass.py
: This is a python library with classes to solve any of the three problems in simple pipe systems mentioned defore. Here the classSimplePipes
call other classes and functions to execute the calculus. -
sepclass.py
: This is a python library with classes to solve any of the three problems in serial pipe systems mentioned defore. Here the classSerialPipes
call other classes and functions to execute the calculus. -
popclass.py
: This is a python library with classes to calculate the energy losses in porous pipes mentioned defore. Here the classPorousPipes
call other classes and functions to execute the calculus. -
ppclass.py
: This is a python library with classes to solve any of the three problems in parallel pipe systems mentioned defore. Here the classParallelPipes
call other classes and functions to execute the calculus. -
opnclass.py
: This is a python library with classes to solve problem type 1 and type 2 in open pipe networks mentioned defore. Here the classOpenPipesNet
call other classes and functions to execute the calculus.
There are some directories named as test_*
, that have the following structure:
- Clone the repo as
git clone git@github.com:lamhydro/phydraulics.git
- For example, go into
phydraulics/test_sp
(Simple pipes) directory:
cd phydraulics/test_sp
- Execute the code as (e.g.):
./main.py designTest.json
Here main.py
reads the designTest.json
file and resolve problem type 1 for simple pipes.