In [8]:
from import *
import collections

Designing the exit box for the Gracias, Lempira plant requires knowing the flow rates needed for each line. These have been collected and compiled in the master plan for Gracias. The relevant tables are reproduced here:

It is necessary to determine the correct size for each LFOM required. This is either limited by the size of the conduction line between the distribution box and the tank, or by the number and size of orifices needed in the first row of each LFOM.

In [10]:
gracias_tuple = collections.namedtuple('barrios', ['bella_vista', 'las_palmas', 'san_cristobal', 'tanque_azul'])
flow_tuple = collections.namedtuple('flows', ['net_demand', 'gross_demand', 'actual'])
gracias_dict = {"flows":{'barrios':{'bella_vista':3*u.L/u.s, 'las_palmas':4, 'san_cristobal':5, 'tanque_azul':6}}}

net_demand = gracias_tuple(0.44*u.L/u.s, 0.74*u.L/u.s, 2.71*u.L/u.s, 22.30*u.L/u.s,)
gross_demand = gracias_tuple(0.99*u.L/u.s, 1.19*u.L/u.s, 4.92*u.L/u.s, 32.58*u.L/u.s,)
actual = gracias_tuple(2.1*u.L/u.s, 2.8*u.L/u.s, 9*u.L/u.s, 90*u.L/u.s,)
flows = flow_tuple(net_demand, gross_demand, actual)

#Headloss in the LFOM
hl_lfom = 20*

#Safety factor that insures that the LFOM pipe doesn't completely fill with water at the bottom row of orifices. 
#This factor is the ratio of the pipe area to the area required to contain all of the falling water. 
ratio_lfom_safety = 1.2

#We will use a pipe with a relatively low SDR so that it has a thick wall to handle the many perforations.
sdr = 26

#Here we use the LFOM functions to get the key parameters that define an LFOM.
def lfom_nd(flow):
    return lfom.nom_diam_lfom_pipe(flow, hl_lfom, ratio_lfom_safety, sdr)
lfom_nds = gracias_tuple(*[lfom_nd(flow) for flow in list(flows.gross_demand)])

print('Required pipe sizes for the LFOMs: ' + str(lfom_nds))
# # OrificeDiam = lfom.orifice_diameter(Flow, HeadlossLfom, DrillBits)
# # LfomOrificeArray = lfom.n_lfom_orifices(Flow, HeadlossLfom, DrillBits, SdrLfom)
# # HeightLfomOrifices = lfom.height_lfom_orifices(Flow, HeadlossLfom, DrillBits)


Required pipe sizes for the LFOMs: barrios(bella_vista=<Quantity(3.0, 'inch')>, las_palmas=<Quantity(3.0, 'inch')>, san_cristobal=<Quantity(6.0, 'inch')>, tanque_azul=<Quantity(10.0, 'inch')>)
103.9 liter / second

In [ ]: