equipment.Pipe module

class equipment.Pipe(**kwargs)[source]

Bases: equipment

Class to model a pipe segment

Parameters:

entrada: Corriente instance to define the input stream to equipment metodo: Calculate method

0 - Single phase flow 1 - Water flow (Hazen-Williams equation) 2 - Steam flow (Fritzsche equation) 3 - Isothermic gas flow 4 - Multiphase flow (Método Baker) 5 - Multiphase flow (Método de Beggs and Brill)

thermal: Thermal mode:

0 - Adiabatic 1 - Fix heat flow 2 - Heat exchanger calculation

Material: Array with material properties

0 - Name 1 - Class 2 - Roughness, mm 3 - Catalog 4 - Di, mm 5 - Width, mm 6 - De, mm 7 - Weight, kg/m 8 - Volume, m³/100m 9 - Surface, m²/100m 10 - Index of material in catalog 11 - Index of dimenion in catalog

Accesorios: Array with each fitting in pipe:

Index with fitting type Index diameter K Count Type Diameter in mm Nominal diameter, in inch Text

l: Length of pipe h: Head increase between input and output pipe K: Fittings total coefficient C: Parameter for Hazen-Williams equation T_ext: External temperatura of pipe for heat exchanger calculation U: Global heat transfer coeficient for pipe wall Q: Heat transfered by pipe wall

Coste:

Only available for steal pipes, Ref Darby pag 217

>>> from lib.corriente import Corriente
>>> agua=Corriente(T=300, P=101325, caudalMasico=1, fraccionMolar=[1.])
>>> material=["Cast Iron", "Class A", 0.12192, '6"', 152.4, 11.43,                   175.26, 42.07, 1.824, 55.06]
>>> pipe=Pipe(entrada=agua, metodo=0, l=5, material=material)
>>> print("%0.4f %6g %6g %6g" % (pipe.Di, pipe.V, pipe.Re, pipe.DeltaP))
0.1524 0.0626815 9427.99 1.83620
Attributes:
isCalculable

Each child class must define if its calculable for input kwargs

Methods

calculo()

Procedure to calcute equipment, defined in child class

coste()

Coste solo disponible para las tuberías de acero Ref Darby pag 217

propTxt()

txt equivalent to output properties of equipment

propertiesEquipment()

procedure to define output values in a list with format: (Name, kwargs name, units), if kwargs name if a combobox element the index isn't useful so use a tuple (Txt_Values kwargs_name)

propertiesListTitle(index)

Define titles for list properties in popup

readListFromJSON(data, key)

Read list from file, customize in entities with complex list

readStatefromJSON(state)

Load instance parameter from saved file

writeListtoJSON(kwarg, key, value)

Personalizar en el caso de equipos con listas complejas

writeStatetoJSON(state)

Write instance parameter to file

title = 'Pipe'
help = ''
kwargs = {'Base_index': 0.0, 'C': 100.0, 'Current_index': 0.0, 'K': 0.0, 'Q': 0.0, 'T_ext': 0.0, 'U': 0.0, 'accesorios': [], 'entrada': None, 'f_install': 2.8, 'h': 0.0, 'l': 0.0, 'material': [], 'metodo': 0, 'thermal': 0}
kwargsInput = ('entrada',)
kwargsValue = ('l', 'h', 'C')
kwargsList = ('metodo', 'thermal')
calculateValue = ('DeltaP', 'DeltaP_f', 'DeltaP_ac', 'DeltaP_h', 'DeltaP_v', 'DeltaP_100ft', 'V', 'f', 'Re', 'Tout')
calculateCostos = ('C_adq', 'C_inst')
indiceCostos = 5
salida = [None]
TEXT_METODO = ('Single Phase flow', 'Water (Hazen-Williams)', 'Steam (Fritzsche)', 'Isotermic gas flow', 'Two Phase flow (Baker method)', 'Two Phase flow (Beggs and Brill method)')
TEXT_THERMAL = ('Adiabatic', 'Heat flux', 'Heat transfer')
property isCalculable

Each child class must define if its calculable for input kwargs

calculo()[source]

Procedure to calcute equipment, defined in child class

__DeltaP_friccion()

Método para el calculo de la perdida de presión

coste()[source]

Coste solo disponible para las tuberías de acero Ref Darby pag 217

kwargs:

schedule: Clase de acero

writeListtoJSON(kwarg, key, value)[source]

Personalizar en el caso de equipos con listas complejas

readListFromJSON(data, key)[source]

Read list from file, customize in entities with complex list

writeStatetoJSON(state)[source]

Write instance parameter to file

readStatefromJSON(state)[source]

Load instance parameter from saved file

propTxt()[source]

txt equivalent to output properties of equipment

classmethod propertiesEquipment()[source]

procedure to define output values in a list with format: (Name, kwargs name, units), if kwargs name if a combobox element the index isn’t useful so use a tuple (Txt_Values kwargs_name)

propertiesListTitle(index)[source]

Define titles for list properties in popup