lib.reaction module¶
- class lib.reaction.Reaction(**kwargs)[source]¶
Bases:
objectChemical reaction object
- Attributes:
- isCalculable
Methods
__call__(**kwargs)Call self as a function.
conversion(corriente, T)Calculate reaction conversion corriente: Corriente instance for reaction T: Temperature of reaction
calculo
- status = 0¶
- msg = 'undefined'¶
- error = 0¶
- kwargsValue = ('Hr',)¶
- kwargsList = ('tipo', 'fase', 'key', 'base')¶
- kwargsCheck = ('customHr', 'formula')¶
- calculateValue = ('DeltaP', 'DeltaP_f', 'DeltaP_ac', 'DeltaP_h', 'DeltaP_v', 'DeltaP_100ft', 'V', 'f', 'Re', 'Tout')¶
- TEXT_TYPE = ['Estequiometric', 'Equilibrium', 'Kinetic', 'Catalitic']¶
- TEXT_PHASE = ['Global', 'Liquid', 'Gas']¶
- TEXT_BASE = ['Mole', 'Mass', 'Partial pressure']¶
- __init__(**kwargs)[source]¶
constructor, kwargs keys can be: comp: array with index of reaction components coef: array with stequiometric coefficient for each component fase: Phase where reaction work
0 - Global 1 - Liquid 2 - Gas
key: Index of key component base
0 - Mol 1 - Mass 2 - Partial pressure
Hr: Heat of reaction, calculate from heat of formation if no input formula: boolean to show compound names in formules tipo: Kind of reaction
0 - Stequiometric, without equilibrium or kinetic calculations 1 - Equilibrium, without kinetic calculation 2 - Equilibrium by minimization of Gibbs free energy 3 - Kinetic 4 - Catalytic
conversion: conversion value for reaction with tipo=0 keq: equilibrium constant for reation with tipo=1
-it is float if it don’t depend with temperature -it is array if it depends with temperature
- kwargs = {'Hr': 0.0, 'base': 0, 'coef': [], 'comp': [], 'conversion': None, 'customHr': False, 'fase': 0, 'formula': False, 'keq': None, 'key': 0, 'tipo': 0}¶
- property isCalculable¶