equipment.Compressor module¶
- class equipment.Compressor(**kwargs)[source]¶
Bases:
equipmentClass to model a gas compressor
- Parameters:
entrada: Instance of class Corriente to define the imput stream metodo: Value to specified the calculate type
0 - Output pressure and efficiency 1 - Compression ratio and efficiency 2 - Real work and efficiency 3 - Output pressure and real work 4 - Compression ratio and real work 5 - Calculate flow ot stream to compress known output pressure,
work and efficiency
6 - Compressor curve (unimplemented)
- termodicnamica: Index with the thermodynamic model
0 - Adiabatic 1 - Polytropic 2 - Isothermic
Pout: Output pressure razon: Compression ratio rendimeinto: Compressor efficiency etapas: Compressor etapas trabajo: Compressor work
- Coste
f_install: instalation factor base: Base index actual: Current index compresor: Compressor type
0 - Centrifugal compressor 1 - Reciprocating compressor 2 - Screw compressor
- transmision: Transmission type
0 - Belt drive coupling 1 - Chain drive coupling 2 - Variable speed drive coupling
- motor: Motor type
0 - Open drip-proof 1 - Totally enclosed, fan-cooled 2 - Explosion-proof
- rpm
0 - 3600 rpm 1 - 1800 rpm 2 - 1200 rpm
>>> from lib.corriente import Corriente >>> corriente=Corriente(T=400, P=101325, caudalMasico=0.1, fraccionMasica=[1., 0, 0, 0]) >>> compresor=Compressor(entrada=corriente, metodo=1, termodinamica=0, razon=3, rendimiento=0.75, etapas=1) >>> print(compresor.power.kW) 31.1007420914 >>> compresor(compresor=2, transmision=1, motor=0, rpm=1) >>> print(compresor.C_inst) 60464.196881
- Attributes:
isCalculableEach child class must define if its calculable for input kwargs
Methods
calculo()Procedure to calcute equipment, defined in child class
propTxt()txt equivalent to output properties of equipment
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)
readStatefromJSON(state)Load instance parameter from saved file
writeStatetoJSON(state)Write instance parameter to file
coste
- title = 'Compressor'¶
- help = ''¶
- kwargs = {'Base_index': 0.0, 'Current_index': 0.0, 'Pout': 0.0, 'compresor': 0, 'entrada': None, 'etapas': 0, 'f_install': 1.3, 'metodo': 0, 'motor': 0, 'razon': 0.0, 'rendimiento': 0.0, 'rpm': 0, 'termodinamica': 0, 'trabajo': 0.0, 'transmision': 0}¶
- kwargsInput = ('entrada',)¶
- kwargsValue = ('Pout', 'razon', 'rendimiento', 'etapas', 'trabajo')¶
- kwargsList = ('metodo', 'termodinamica', 'compresor', 'transmision', 'motor', 'rpm')¶
- calculateValue = ('power', 'cp_cv', 'razonCalculada', 'rendimientoCalculado')¶
- calculateCostos = ('C_comp', 'C_motor', 'C_trans', 'C_adq', 'C_inst')¶
- indiceCostos = 7¶
- TEXT_METODO = ['Specify out pressure and efficiency', 'Specify actual power and efficiency', 'Specify out pressure and actual power', 'Specify pressure ratio and actual power', 'Calculate input flowrate']¶
- TEXT_TERMODINAMICA = ['Adiabatic', 'Polytropic', 'Isothermic']¶
- TEXT_COMPRESOR = ['Centrifugal compressor', 'Reciprocating compressor', 'Screw compressor']¶
- TEXT_TRANSMISION = ['Belt drive coupling', 'Chain drive coupling', 'Variable speed drive coupling']¶
- TEXT_MOTOR = ['Open drip-proof', 'Totally enclosed, fan-cooled', 'Explosion-proof']¶
- TEXT_RPM = ['3600 RPM', '1800 RPM', '1200 RPM']¶
- property isCalculable¶
Each child class must define if its calculable for input kwargs
- __Wideal(Pout)¶
Calculate the ideal work
- __Tout(Wid)¶
Calculate the output temperature