#!/usr/bin/python3
# -*- coding: utf-8 -*-
'''Pychemqt, Chemical Engineering Process simulator
Copyright (C) 2009-2025, Juan José Gómez Romera <jjgomera@gmail.com>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.'''
from tools.qt import translate
from lib import unidades
from lib.newComponent._base import GroupContribution
[docs]
class Elliott(GroupContribution):
"""Zuppo and Elliott, Ind. Eng. Chem. Res. Submitted (1999).
ref, chemcad propiedades fisicas pag 62
grupos: grupos que forman la molécula
contribuciones: contribuciones de cada grupo
M: peso molecular
Tb: Temperatura de ebullición, opcional
SG: gravedad específica, opcional
# >>> elliot=Elliott(group=[0, 5], contribution=[4, 1], M=72)
# >>> print elliot.Tb, elliot.Tc
# 333.268576405 829.20395796
"""
__title__ = "UNIFAC (1999)"
__coeff__ = {
"tc": [0.135, 0.131, 0.077, 0.073, 0.070, -0.015, 0.070, 0.169, 0.169,
0.169, 0.169, 0.169, 0.338, 0.069, 0.099, 0.221, 0.207, 0.136,
0.554, 0.0, 0.0, 0.278, 0.387, 0.383, 0.299, 0.457, 0.453,
0.305, 0.234, 0.230, 0.175, 0.140, 0.0, 0.301, 0.247, 0.306,
0.301, 0.247, 0.148, 0.144, 0.270, 0.0, 0.433, 0.433, 0.0,
0.512, 0.615, 0.0, 0.236, 0.178, 0.090, 0.0, 0.283, 0.196, 0.0,
0.326, 0.0, 0.165, 0.0, 0.440, 0.440, 0.440, 0.0, 0.0, 0.203,
0.0, 0.0, 0.056, 0.056, 0.125, 0.125, 0.0, 0.0, 0.082, 0.147,
0.0, 0.0, 0.340, 0.222, 0.103, 0.327, 0.209, 0.205, 0.151,
0.144, 0.245, 0.245, 0.215, 0.148, 0.0, 0.314, 0.0, 0.209,
0.327, 0.0, 0.0, 0.0, 0.0, 0.422, 0.557, 0.553, 0.670, 0.666,
0.662, 0.839, 0.609, 0.207, 0.203, 0.149, 0.0, 0.0, 0.379,
0.372, 0.0],
"Pc": [0.232, 0.224, 0.177, 0.186, 0.195, 0.143, 0.204, 0.360, 0.360,
0.360, 0.360, 0.360, 0.720, 0.153, 0.173, 0.375, 0.370, 0.356,
0.075, 0.0, 0.0, 0.126, 0.513, 0.504, 0.324, 0.712, 0.704,
0.455, 0.367, 0.358, 0.311, 0.249, 0.0, 0.316, 0.269, 0.324,
0.316, 0.269, 0.313, 0.304, 0.211, 0.0, 0.869, 0.869, 0.0,
0.564, 0.511, 0.0, 0.542, 0.504, 0.461, 0.0, 0.822, 0.779, 0.0,
1.161, 0.0, 0.460, 0.0, 0.617, 0.617, 0.617, 0.0, 0.0, 0.476,
0.0, 0.0, 0.816, 0.522, 0.274, 0.274, 0.0, 0.0, 0.318, 0.340,
0.0, 0.0, 0.886, 0.638, 0.391, 0.485, 0.398, 0.298, 0.251,
0.269, 0.675, 0.675, 0.645, 0.200, 0.0, 1.027, 0.0, 0.709,
0.956, 0.0, 0.0, 0.0, 0.0, 0.372, 0.605, 0.596, 0.946, 0.937,
0.929, 0.658, 0.761, 0.485, 0.476, 0.429, 0.0, 0.0, 0.960,
0.978, 0.0],
"vc": [40, 41, 25, 30, 37, 5, 55, 32, 32, 32, 32, 32, 64, 16, 87, 68,
95, 107, -25, 0.0, 0.0, -20, 77, 78, -8, 102, 103, -6, 41, 42,
27, -57, 0.0, 78, 62, 77, 78, 62, 111, 112, 24, 0.0, 107, 107,
0.0, 27, -31, 0.0, 79, 68, 43, 0.0, 107, 82, 0.0, 124, 0.0, 47,
0.0, 34, 34, 34, 0.0, 0.0, 65, 0.0, 0.0, -7, 6, -12, -12, 0.0,
0.0, 23, 27, 0.0, 0.0, 188, 127, 66, 47, -6, 41, 25, 37, 108,
108, 108, -15, 0.0, 143, 0.0, 104, 165, 0.0, 0.0, 0.0, 0.0, 73,
114, 115, 101, 102, 103, 55, 109, 64, 65, 49, 0.0, 0.0, 125,
137, 0.0],
"tb": [123, 121, 138, 97, 107, 74, 20, 257, 257, 257, 257, 257, 514,
124, 247, 282, 303, 191, 474, 0.0, 0.0, 525, 514, 512, 396, 451,
573, 426, 288, 286, 262, 323, 0.0, 437, 412, 444, 442, 418, 293,
291, 655, 0.0, 942, 942, 0.0, 794, 858, 0.0, 360, 336, 313, 0.0,
575, 552, 0.0, 598, 0.0, 358, 0.0, 692, 668, 818, 0.0, 0.0, 515,
0.0, 0.0, 525, 353, 288, 288, 0.0, 0.0, 190, 135, 0.0, 0.0, 141,
108, 91, 338, 164, 164, 164, 164, 44, 44, 61, 225, 0.0, 569,
0.0, 477, 348, 0.0, 0.0, 0.0, 17, 707, 835, 833, 862, 860, 858,
830, 495, 473, 471, 447, 0.0, 0.0, 0, 0, 0.0],
"hf": [-45.947, -20.763, -20.763, -3.766, -3.766, 17.119, 17.119,
53.712, 69.939, 64.145, 82.528, 104.293, 197.322, 11.189,
27.016, -19.243, 9.404, 27.671, -181.422, 0.0, 0.0, -164.609,
-182.329, -164.41, -129.158, -389.737, -359.258, -332.822,
-163.569, -151.143, -129.488, -140.313, 0.0, -15.505, 3.32,
5.432, 23.101, 26.718, 54.929, 69.885, 20.079, 0.0, 134.062,
139.758, 0.0, 88.298, -396.242, 0.0, -73.568, -63.795, -57.795,
0.0, -82.921, 0.0, 0.0, -107.188, 0.0, -16.752, 0.0, -66.138,
-59.142, -7.365, 0.0, 0.0, -8.253, 0.0, 0.0, 57.546, 1.834,
220.803, 227.368, 0.0, 0.0, -36.097, -161.74, 0.0, 0.0,
-679.195, 0.0, 0.0, -313.545, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
0.0, 0.0, -258.96, 0.0, 0.0, -446.835, 0.0, 0.0, 0.0, -223.398,
-203.188, -67.778, -182.005, -189.888, -46.562, 0.0, -344.125,
0.0, -2.084, 18.022, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
"gf": [-8.03, 8.231, 8.231, 19.848, 19.848, 37.977, 37.977, 84.926,
92.9, 88.402, 93.745, 116.613, 221.308, 22.533, 30.485, 22.505,
41.228, 52.948, -158.589, 0.0, 0.0, -132.097, -131.366,
-132.386, -107.858, -318.616, -291.188, -288.902, -105.767,
-101.563, -92.099, -90.883, 0.0, 58.085, 63.051, 82.471, 95.888,
85.001, 128.602, 132.756, 68.861, 0.0, 199.958, 199.288, 0.0,
121.544, -349.439, 0.0, -33.373, -31.502, -25.261, 0.0, -35.814,
0.0, 0.0, -53.332, 0.0, -0.50, 0.0, 17.963, 18.088, 60.161, 0.0,
0.0, 16.731, 0.0, 0.0, 46.945, -1.721, 217.003, 216.328, 0.0,
0.0, -28.148, -144.549, 0.0, 0.0, -626.58, 0.0, 0.0, -281.495,
0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, -209.337, 0.0, 0.0,
-392.975, 0.0, 0.0, 0.0, 212.718, 136.742, 0.0, 0.0, -65.642,
0.0, 0.0, 241.373, 0.0, 30.222, 38.346, 0.0, 0.0, 0.0, 0.0, 0.0,
0.0],
"hv": [4.116, 4.65, 4.65, 2.771, 2.771, 1.284, 1.284, 6.714, 7.37,
6.797, 8.178, 9.342, 12.318, 4.098, 12.552, 9.776, 10.185,
8.834, 24.529, 0.0, 0.0, 40.246, 18.999, 20.041, 12.909, 22.709,
17.759, 0.0, 10.919, 7.478, 5.708, 11.227, 0.0, 14.599, 11.876,
14.452, 14.481, 0.0, 6.947, 6.918, 28.453, 0.0, 31.523, 31.005,
0.0, 23.34, 43.046, 0.0, 13.78, 11.985, 9.818, 0.0, 19.208,
17.574, 0.0, 0.0, 0.0, 11.883, 0.0, 30.644, 26.277, 0.0, 0.0,
0.0, 14.931, 0.0, 0.0, 14.364, 11.423, 7.751, 11.549, 0.0, 0.0,
4.877, 0.0, 0.0, 8.901, 1.86, 8.901, 0.0, 0.0, 0.0, 0.0, 0.0,
0.0, 0.0, 0.0, 0.0, 0.0, 13.322, 0.0, 0.0, 8.301, 0.0, 0.0, 0.0,
0.0, 0.0, 0.0, 51.787, 0.0, 0.0, 0.0, 0.0, 0.0, 16.921, 17.117,
13.265, 0.0, 0.0, 27.966, 0.0, 0.0],
"txt": [("CH3-",),
("CH2<",),
("RCH2<",),
("CH",),
(">RCH-",),
(">C<",),
(">RC<",),
("CH2=CH",),
("CH=CH",),
("CH2=C",),
("CH=C",),
("C=C",),
("CH2=C=CH",),
("ACH",),
("AC-",),
("ACCH3",),
("ACCH2",),
("ACCH",),
("OH",),
("CH3OH",),
("H2O",),
("ACOH",),
("CH3CO",),
("CH2CO",),
("CHO",),
("CH3COO",),
("CH2COO",),
("HCOO",),
("CH3O",),
("CH2O",),
("CH-O",),
("FCH2O",),
("CH3NH2",),
("CH2NH2",),
("CHNH2",),
("CH3NH",),
("CH2NH",),
("CHNH",),
("CH3-RN",),
("CH2-RN",),
("ACNH2",),
("C5H5N",),
("C5H4N",),
("C5H3N",),
("CH3CN",),
("CH2CN",),
("COOH",),
("HCOOH",),
("CH2CL",),
("CHCL",),
("CCL",),
("CH2CL2",),
("CHCL2",),
("CCL2",),
("CHCL3",),
("CCL3",),
("CCL4",),
("ACCL",),
("CH3NO2",),
("CH2NO2",),
("CHNO2",),
("ACNO2",),
("CS2",),
("CH3SH",),
("CH2SH",),
("FURFURAL",),
("<CH2OH>2",),
("I",),
("Br",),
("CH===C",),
("C===C",),
("ME2SO",),
("ACRY",),
("CL<C=C>",),
("ACF",),
("DMF-1",),
("DMF-2",),
("CF3",),
("CF2",),
("CF",),
("COO",),
("SiH3",),
("SiH2",),
("SiH",),
("Si",),
("SiH2O",),
("SiHO",),
("SiO",),
("TERT-N",),
("CCL3F",),
("CCL2F",),
("HCCL2F",),
("HCCLF",),
("CCLF2",),
("HCCLF2",),
("CCLF3",),
("CCL2F2",),
("F (exceptions)",),
("CONH2",),
("CONHCH3",),
("CONHCH2",),
("CON<CH3>2",),
("CONCH3CH2",),
("CON<CH2>2",),
("C2H5O2",),
("C2H4O2",),
("CH3S",),
("CH2S",),
("CHS",),
("MORPH",),
("C4H4S",),
("C4H3S",),
("C4H2S",),
("NMP",)]}
[docs]
def isCalculable(self):
"""Procedure to define the status of input parameter"""
if not self.kwargs["M"]:
self.msg = translate("newComponent", "undefined molecular weight")
self.status = 0
else:
return GroupContribution.isCalculable(self)
[docs]
def calculo(self):
self.M = self.kwargs["M"]
tc = Pc = vc = tb = hv = gf = hf = 0
for i, c in zip(self.kwargs["group"], self.kwargs["contribution"]):
tb += c*self.__coeff__["tb"][i]
tc += c*self.__coeff__["tc"][i]
Pc += c*self.__coeff__["Pc"][i]
vc += c*self.__coeff__["vc"][i]
hv += c*self.__coeff__["hv"][i]
gf += c*self.__coeff__["gf"][i]
hf += c*self.__coeff__["hf"][i]
if self.kwargs["Tb"]:
Tb = self.kwargs["Tb"]
else:
Tb = 1000/(0.5+35.7/tb**0.5+1000/(142+tb))
self.Tb = unidades.Temperature(Tb)
self.Tc = unidades.Temperature(self.Tb*(1+(1.28*tc)**-1))
self.Pc = unidades.Pressure(self.M/(0.346+Pc)**2, "bar")
self.Vc = unidades.SpecificVolume((172+vc)/self.M, "ccg")
self.Hv = unidades.Enthalpy((hv+6.829)/self.M, "kJg")
self.Hf = unidades.Enthalpy((hf+10.835)/self.M, "kJg")
self.Gf = unidades.Enthalpy((gf-14.828)/self.M, "kJg")
GroupContribution.calculo(self)