UI.UI_corriente module

UI_corriente module

A fundamental characteristic of a process design simulator like pychemqt is the definition of a stream with temperature, pressure, composition, vapor fraction as input parameters.

UI_corriente_definition

The specified properties are resalted in special color, to let user know the input parameters.

In case any solid compound is used the solid tab is enabled to configure solid properties

UI_corriente_solid

Its possible add any type of information in the notes tab with a basic text editor

UI_corriente_notes

Configuration

The methods used for calculation can be configurated in the Thermodynamic tab

UI_corriente_thermodynamic

K values Configure the equation of state used for phase equilibrium calculation, including the binary interation parameters if the stream is multicomponent for the EoS with support for that. For several cubic equation is possible configure too the alpha function used, and the mixing rules for multicomponent stream.

H values Configure the methods (equation of state or other method) used for enthalpy calculation and the ideal enthalpy method.

Advanced options Furthermore it’s possible check any advanced option available like mEoS library, external library alternative to mEoS like coolProp or refProp if available, iapws for water, external freesteam library for water, mEos GERG extension to mixtures.

Properties

When the definition is complete the calculated properties can be see in the properties tab

UI_corriente_propeties

API reference

Module with UI utilities

The module with library is in lib.corriente.html

class UI.UI_corriente.Ui_corriente(corriente=None, readOnly=False, psychro=False, parent=None)[source]

Bases: QWidget

Wdiget for global stream edit/view

Methods

repaint(repaint repaint repaint)

salida(**kwargs)

Función que crea la instancia corriente

Changed

calculo

changePsychroState

changeSolid

clear

corriente

setCorriente

setReadOnly

Changed

pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

__init__(corriente=None, readOnly=False, psychro=False, parent=None)[source]

corriente: Corriente instance to initialize widget readOnly: Set initial readOnly state for widget psychro: boolean to show aditional input stream por humid air

corriente = <class 'lib.corriente.Corriente'> empty
setReadOnly(bool)[source]
setCorriente(corriente, psychro=True)[source]
changePsychroState(stream)[source]
changeSolid(solido)[source]
repaint(self) repaint(self, x: int, y: int, w: int, h: int) repaint(self, a0: QRect) repaint(self, a0: QRegion)[source]
repaint(self, x: int, y: int, w: int, h: int)
repaint(self, a0: QRect)
repaint(self, a0: QRegion)
calculo(variable=None, valor=None)[source]
clear()[source]
salida(**kwargs)[source]

Función que crea la instancia corriente

class UI.UI_corriente.Corriente_Dialog(corriente=None, readOnly=False, psychro=False, parent=None)[source]

Bases: QDialog, Ui_corriente

Dialog to define stream with status added

Methods

Changed

corriente

Changed

pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

corriente = <class 'lib.corriente.Corriente'> empty
__init__(corriente=None, readOnly=False, psychro=False, parent=None)[source]
class UI.UI_corriente.StreamDefinition(stream=None, readOnly=False, parent=None)[source]

Bases: QWidget

Widget for stream definition as standard P,T,x composition input

Methods

calculo

changeFraction

changedFraction

changedValue

composicionEntrada

kwargs

setReadOnly

setResaltado

setStream

tipoFraccionesCambiado

changedValue

pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

changedFraction

pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

__init__(stream=None, readOnly=False, parent=None)[source]
setReadOnly(bool)[source]
setStream(stream)[source]
setResaltado(stream, arg)[source]
calculo(key, value)[source]
tipoFraccionesCambiado(index)[source]
composicionEntrada()[source]
changeFraction()[source]
kwargs()[source]
class UI.UI_corriente.PsychroDefinition(psystream=None, readOnly=False, parent=None)[source]

Bases: QWidget

Widget for stream definition as humid air input

Methods

Changed

calculo

rellenar

rellenarFlow

setReadOnly

setStream

stream

updatekwargsFlow

Changed

pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

parameters = ['tdb', 'twb', 'tdp', 'w', 'mu', 'HR', 'v', 'h', 'Pv', 'Xa', 'Xw']
stream = <lib.corriente.PsyStream object>
__init__(psystream=None, readOnly=False, parent=None)[source]
setStream(stream)[source]
setReadOnly(readOnly)[source]
calculo(key, value)[source]
rellenar(stream)[source]
rellenarFlow(stream)[source]
updatekwargsFlow(key, value)[source]
class UI.UI_corriente.StreamProperties(stream=None, parent=None)[source]

Bases: QTableWidget

Table to show stream properties

Methods

fill

__init__(stream=None, parent=None)[source]
fill(stream)[source]
class UI.UI_corriente.SolidDefinition(solid=None, readOnly=False, parent=None)[source]

Bases: QWidget

Widget for solids edit/view

Methods

Changed

botonGenerar_clicked

botonNormalizar_clicked

calculo

caudalSolido

caudalesSolidoFinished

checkDistributionToggled

distribucionFinished

fill

setReadOnly

setSolido

solido

Changed

pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

solido = <class 'lib.solids.Solid'> empty
__init__(solid=None, readOnly=False, parent=None)[source]
setSolido(solido)[source]
fill()[source]
setReadOnly(bool)[source]
distribucionFinished()[source]
caudalesSolidoFinished()[source]
caudalSolido()[source]
checkDistributionToggled(bool)[source]
botonNormalizar_clicked(diametros=None, fracciones=None)[source]
botonGenerar_clicked()[source]
calculo(key=None, value=None, **kw)[source]
class UI.UI_corriente.SolidDistribution(parent=None)[source]

Bases: QDialog

Dialog to specified parameter to model particle solid distribution Teoretical model implemented:

Rosin, Rammler, Sperling (Weibull distribution) Gates, Gaudin, Shumann Gaudin, Meloy Broadbent, Callcott Distribución lognormal Harris

Generate distribution to several standard test sieves:

Tyler ASTM E 11-70 DIN 4188 AFNOR NFX11-501 ISO 565 BS 410

Methods

aceptar

standardCambiado

Sieve = {'AFNOR': [0.02, 0.022, 0.025, 0.028, 0.032, 0.036, 0.04, 0.045, 0.05, 0.056, 0.063, 0.071, 0.08, 0.09, 0.1, 0.125, 0.14, 0.16, 0.18, 0.2, 0.224, 0.25, 0.28, 0.315, 0.355, 0.4, 0.45, 0.5, 0.56, 0.63, 0.71, 0.8, 0.9, 1.0, 1.18, 1.25, 1.4, 1.6, 1.8, 2.0, 2.24, 2.5, 3.15, 3.55, 4.0, 4.5, 5.0, 5.6], 'ASTM': [0.02, 0.025, 0.032, 0.038, 0.045, 0.053, 0.063, 0.075, 0.09, 0.106, 0.125, 0.15, 0.18, 0.212, 0.25, 0.3, 0.355, 0.425, 0.5, 0.6, 0.71, 0.85, 1.0, 1.18, 1.4, 1.7, 2.0, 2.36, 2.8, 3.35, 4.0, 4.75, 5.6, 6.3, 6.7, 8.0, 9.5, 11.2, 12.5, 13.2, 16.0, 19.0, 22.4, 25.0, 26.5, 31.5, 37.5, 45.0, 50.0, 53.0, 63.0, 75.0, 90.0, 100.0, 106.0, 125], 'BS': [0.045, 0.053, 0.063, 0.075, 0.09, 0.106, 0.125, 0.15, 0.18, 0.212, 0.25, 0.3, 0.355, 0.425, 0.5, 0.6, 0.71, 0.85, 1.0, 1.18, 1.4, 1.7, 2.0, 2.36, 2.8, 3.35, 4.0, 4.75, 5.6], 'DIN': [0.02, 0.022, 0.025, 0.028, 0.032, 0.036, 0.04, 0.045, 0.05, 0.056, 0.063, 0.071, 0.08, 0.09, 0.1, 0.125, 0.14, 0.18, 0.2, 0.224, 0.25, 0.28, 0.315, 0.355, 0.4, 0.5, 0.56, 0.63, 0.71, 0.8, 0.9, 1.0, 1.18, 1.25, 1.4, 1.6, 1.8, 2.0, 2.24, 2.5, 2.8, 3.15, 3.55, 4.0, 4.5, 5.0, 5.6], 'ISO': [0.02, 0.022, 0.025, 0.028, 0.032, 0.036, 0.045, 0.05, 0.063, 0.071, 0.08, 0.09, 0.1, 0.125, 0.14, 0.18, 0.2, 0.224, 0.25, 0.28, 0.315, 0.355, 0.4, 0.45, 0.63, 0.71, 0.8, 0.9, 1.0, 1.18, 1.25, 1.4, 1.6, 1.8, 2, 2.24, 2.5, 2.8, 3.15, 3.55, 4, 4.5, 5, 5.6], 'Tyler': [0.033, 0.043, 0.053, 0.061, 0.074, 0.088, 0.104, 0.121, 0.147, 0.173, 0.208, 0.246, 0.295, 0.351, 0.417, 0.495, 0.589, 0.701, 0.833, 0.991, 1.168, 1.397, 1.651, 1.981, 2.362, 2.794, 3.327, 3.962, 4.699, 5.613, 6.68, 7.925]}
model = {'Broadbent Callcott': {'magnitud': ['ParticleDiameter', ''], 'title': ['d*=', 'N='], 'unit': [<class 'lib.unidades.Length'>, <class 'float'>]}, 'Gates Gaudin Schumann': {'magnitud': ['ParticleDiameter', ''], 'title': ['d*=', 'N='], 'unit': [<class 'lib.unidades.Length'>, <class 'float'>]}, 'Gaudin Meloy': {'magnitud': ['ParticleDiameter', ''], 'title': ['d*=', 'N='], 'unit': [<class 'lib.unidades.Length'>, <class 'float'>]}, 'Harris': {'magnitud': ['ParticleDiameter', '', ''], 'title': ['d*=', 'S=', 'N='], 'unit': [<class 'lib.unidades.Length'>, <class 'float'>, <class 'float'>]}, 'Lognormal': {'magnitud': ['ParticleDiameter', ''], 'title': ['d*=', 'σ='], 'unit': [<class 'lib.unidades.Length'>, <class 'float'>]}, 'Rosin Rammler Sperling': {'magnitud': ['ParticleDiameter', ''], 'title': ['d*=', 'S='], 'unit': [<class 'lib.unidades.Length'>, <class 'float'>]}}
__init__(parent=None)[source]
standardCambiado(txt)[source]
aceptar()[source]