Source code for lib.newComponent.constantinou

#!/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 math import log

from lib import unidades
from lib.newComponent._base import GroupContribution


[docs] class Constantinou(GroupContribution): """ Group contribution for definition of unknown component using the Constantinou-Gani procedure (1994). This method is fairly complete, can calculate critical properties, boiling and melting temperature, enthalpy and gibbs free energy of formation, vaporization heat, acentric factor and ideal gas heat capacity dependence with temperature. The resulting instance has all the necessary properties to use in PFD as a predefined compound, using general properties for calculation of other mandatory properties don't defined by the method. Parameters ---------- group : array List with group index contribution : float List with group count ocurrences M: float, optional Molecular weight, [-] SG: float, optional Specific gravity, [-] Notes ----- M and SG are optional input, anyway know them improve the estimation Examples -------- Example from [2]_ to distinguish between isomers, dimethylhexanes 1st order only >>> cmp = Constantinou(group=[0, 1, 2], contribution=[4, 2, 2]) >>> "%0.2f %0.2f" % (cmp.Tc, cmp.Tb) '557.91 385.92' Adding 2nd order contributions >>> c23 = Constantinou(group=[0, 1, 2, 80], contribution=[4, 2, 2, 1]) >>> c24 = Constantinou(group=[0, 1, 2, 78], contribution=[4, 2, 2, 1]) >>> c25 = Constantinou(group=[0, 1, 2, 78], contribution=[4, 2, 2, 2]) >>> "%0.2f %0.2f %0.2f" % (c23.Tc, c24.Tc, c25.Tc) '566.60 553.41 548.80' >>> "%0.2f %0.2f %0.2f" % (c23.Tb, c24.Tb, c25.Tb) '391.41 382.32 378.64' Examples from Table 15a and 15b and 16 in [2]_ >>> cmp1 = Constantinou( ... group=[0, 1, 2, 3, 15], contribution=[3, 1, 1, 1, 2]) >>> cmp2 = Constantinou(group=[0, 1, 2, 38], contribution=[2, 1, 1, 1]) >>> cmp3 = Constantinou( ... group=[0, 1, 2, 3, 15, 105, 106], contribution=[3, 1, 1, 1, 2, 1, 1]) >>> cmp4 = Constantinou( ... group=[0, 1, 2, 38, 78], contribution=[2, 1, 1, 1, 1]) >>> "%0.2f %0.2f %0.2f %0.2f" % (cmp1.Tb, cmp2.Tb, cmp3.Tb, cmp4.Tb) '488.39 452.14 465.18 449.54' >>> cmp1 = Constantinou(group=[6, 4, 0], contribution=[1, 1, 1]) >>> cmp2 = Constantinou(group=[0, 13, 12, 10], contribution=[1, 1, 1, 4]) >>> cmp3 = Constantinou(group=[6, 4, 0, 88], contribution=[1, 1, 1, 1]) >>> "%0.2f %0.3f %0.3f" % ( ... cmp1.Gf.kJg*cmp1.M, cmp2.Gf.kJg*cmp2.M, cmp3.Gf.kJg*cmp3.M) '150.47 131.007 144.965' Examples from Table A1, A2 and A3 in [3]_ >>> cmp1 = Constantinou(group=[0, 2], contribution=[5, 3]) >>> cmp2 = Constantinou(group=[0, 17, 1, 2], contribution=[2, 1, 1, 1]) >>> cmp3 = Constantinou(group=[0, 2, 80], contribution=[5, 3, 2]) >>> cmp4 = Constantinou( ... group=[0, 17, 1, 2, 78, 95], contribution=[2, 1, 1, 1, 1, 1]) >>> "%0.5f %0.5f %0.5f %0.5f" % ( ... cmp1.Vliq/cmp1.M, cmp2.Vliq/cmp2.M, cmp3.Vliq/cmp3.M, cmp4.Vliq/cmp4.M) '0.16414 0.12446 0.16008 0.12549' >>> "%0.4f %0.4f %0.4f %0.4f" % ( ... cmp1.f_acent, cmp2.f_acent, cmp3.f_acent, cmp4.f_acent) '0.3195 0.4430 0.3167 0.3863' Example 2-2 in [1]_, 2-ethylphenol critical properties >>> cmp = Constantinou(group=[0, 10, 13, 16], contribution=[1, 4, 1, 1]) >>> "%0.1f %0.2f %0.1f" % (cmp.Tc, cmp.Pc.bar, cmp.Vc.ccg*cmp.M) '718.6 42.97 371.9' >>> cmp.formula 'C8H10O' Example 2-3 in [1]_, butanols critical properties >>> b1 = Constantinou(group=[0, 1, 15], contribution=[1, 3, 1]) 2-met-1-propanol CHOH Second order contribution is zero >>> b2m1 = Constantinou( ... group=[0, 1, 2, 15, 78], contribution=[2, 1, 1, 1, 1]) >>> b2m2 = Constantinou( ... group=[0, 3, 15, 79, 106], contribution=[3, 1, 1, 1, 1]) >>> b2 = Constantinou( ... group=[0, 1, 2, 15, 105], contribution=[2, 1, 1, 1, 1]) >>> "%0.2f %0.2f %0.2f %0.2f" % (b1.Tc, b2m1.Tc, b2m2.Tc, b2.Tc) '558.91 543.31 497.46 521.57' >>> "%0.2f %0.2f %0.2f %0.2f" % ( ... b1.Pc.bar, b2m1.Pc.bar, b2m2.Pc.bar, b2.Pc.bar) '41.97 41.66 42.32 44.28' >>> "%0.1f %0.1f %0.1f %0.1f" % (b1.Vc.ccg*b1.M, b2m1.Vc.ccg*b2m1.M, ... b2m2.Vc.ccg*b2m2.M, b2.Vc.ccg*b2.M) '276.9 276.0 280.2 264.2' Example 2-9 in [1]_, 2,3,3-trimethylpentane >>> c1 = Constantinou(group=[0, 1, 2, 3], contribution=[5, 1, 1, 1]) >>> c2 = Constantinou(group=[0, 1, 2, 3, 81], contribution=[5, 1, 1, 1, 1]) >>> "%0.3f %0.3f" % (c1.f_acent, c2.f_acent) '0.301 0.292' Example 2-11 in [1]_, 2,4-dimethylphenol >>> cmp = Constantinou(group=[10, 12, 16], contribution=[3, 2, 1]) >>> "%0.2f %0.2f" % (cmp.Tf, cmp.Tb) '315.96 492.33' Example 2-12 in [1]_, cycloalkanes >>> c7 = Constantinou(group=[1, 87], contribution=[7, 1]) >>> mc6 = Constantinou( ... group=[0, 1, 2, 86, 92], contribution=[1, 5, 1, 1, 1]) >>> ec5 = Constantinou( ... group=[0, 1, 2, 85, 92], contribution=[1, 5, 1, 1, 1]) >>> c5 = Constantinou( ... group=[0, 1, 2, 85], contribution=[2, 3, 2, 1]) >>> t5 = Constantinou( ... group=[0, 1, 2, 85], contribution=[2, 3, 2, 1]) >>> "%0.2f %0.2f %0.2f %0.2f %0.2f" % (c7.Tf, mc6.Tf, ec5.Tf, c5.Tf, t5.Tf) '266.15 146.46 122.14 166.79 166.79' >>> "%0.2f %0.2f %0.2f %0.2f %0.2f" % (c7.Tb, mc6.Tb, ec5.Tb, c5.Tb, t5.Tb) '391.93 377.81 377.69 364.27 364.27' Example 3-2 in [1]_, 2-ethylphenol ΔH and ΔG >>> cmp = Constantinou(group=[0, 10, 13, 16], contribution=[1, 4, 1, 1]) >>> "%0.3f %0.3f" % (cmp.Hf.kJg*cmp.M, cmp.Gf.kJg*cmp.M) '-145.561 -23.595' >>> "%0.2f" % (cmp._Cp0(700).JgK*cmp.M) '286.35' Example 3-3 in [1]_, butanols formations properties Component definition above in example 2-3 >>> "%0.2f %0.2f %0.2f %0.2f" % ( ... b1.Hf.kJg*b1.M, b2m1.Hf.kJg*b2m1.M, b2m2.Hf.kJg*b2m2.M, b2.Hf.kJg*b2.M) '-278.82 -287.87 -316.77 -290.90' >>> "%0.2f %0.2f %0.2f %0.2f" % ( ... b1.Gf.kJg*b1.M, b2m1.Gf.kJg*b2m1.M, b2m2.Gf.kJg*b2m2.M, b2.Gf.kJg*b2.M) '-156.75 -161.10 -180.70 -168.17' >>> "%0.1f %0.1f %0.1f %0.1f" % (b1._Cp0(298).JgK*b1.M, ... b2m1._Cp0(298).JgK*b2m1.M, b2m2._Cp0(298).JgK*b2m2.M, ... b2._Cp0(298).JgK*b2.M) '110.5 109.8 111.9 111.7' Example in [4]_ pag. 2-471, 2,6-dimethylpyridine >>> cmp = Constantinou(group=[0, 36, 86], contribution=[2, 1, 1]) >>> "%0.0f" % cmp.Tf '278' """ __title__ = "Constantinou-Gani (1995)" __doi__ = { 1: {"autor": "Poling, B.E, Prausnitz, J.M, O'Connell, J.P", "title": "The Properties of Gases and Liquids 5th Edition", "ref": "McGraw-Hill, New York, 2001", "doi": ""}, 2: {"autor": "Constantinou, L., Gani, R.", "title": "New Group Controbution Method for Estimating Properties of " "Pure Compounds", "ref": "AIChE J. 40(10) (1994) 1697-1710", "doi": "10.1002/aic.690401011"}, 3: {"autor": "Constantinou, L., Gani, R., O’Connell, J.P.", "title": "Estimation of the Acentric Factor and the Liquid Molar " "Volume at 298K Using a New Group Contribution Method", "ref": "Fluid Phase Equilibria 103 (1995) 11-22", "doi": "10.1016/0378-3812(94)02593-p"}, 4: {"autor": "", "title": "Perry's Chemical Engineers' Handbook 9th Edition", "ref": "McGraw-Hill (2019)", "doi": ""}} __coeff__ = { # The Second order term are append to the first order in each table # Table 1 in [3]_ "tc": [1.6781, 3.4920, 4.0330, 4.8823, 5.0146, 7.3691, 6.5081, 8.9582, 11.3764, 9.9318, 3.7337, 14.6409, 8.2130, 10.3239, 10.4664, 9.7292, 25.9145, 13.2896, 14.6273, 10.1986, 12.5965, 13.8116, 11.6057, 6.4737, 6.0723, 5.0663, 9.5059, 12.1726, 10.2075, 9.8544, 10.4677, 7.2121, 7.6924, 5.5172, 28.7570, 29.1528, 27.9464, 20.3781, 23.7593, 11.0752, 10.8632, 11.3959, 16.3945, 0, 18.5875, 14.1565, 24.7369, 23.2050, 34.5870, 13.8058, 17.3947, 10.5371, 7.5433, 11.4501, 5.4334, 2.8977, 0, 2.4778, 1.7399, 3.5192, 12.1084, 9.8408, 0, 4.8923, 1.5974, 65.1053, 0, 0, 36.1403, 0, 0, 17.9668, 0, 14.3969, 17.7916, 0, 0, 0, -0.5334, -0.5143, 1.0699, 1.9886, 5.8254, -2.3305, -1.2978, -0.6785, 0.8479, 3.6714, 0.4402, 0.0167, -0.5231, -0.3850, 2.1160, 2.0427, -1.5826, 0.2996, 0.5018, 2.9571, 1.1696, -1.7493, 6.1279, -1.3406, 2.5413, -2.7617, -3.4235, -2.8035, -3.5442, 5.4941, 0.3233, 5.4864, 2.0699, 2.1345, 1.0159, -5.3307, 4.4847, -0.4996, -1.9334, 0, -2.2974, 2.8907, 0], "Pc": [0.019904, 0.010558, 0.001315, -0.010404, 0.025014, 0.017865, 0.022319, 0.012590, 0.002044, 0.031270, 0.007542, 0.002136, 0.019360, 0.012200, 0.002769, 0.005148, -0.007444, 0.025073, 0.017841, 0.014091, 0.029020, 0.021836, 0.013797, 0.020440, 0.015135, 0.009857, 0.009011, 0.012558, 0.010694, 0.012589, 0.010390, -0.000462, 0.015874, 0.004917, 0.001120, 0.029565, 0.025653, 0.036133, 0.011507, 0.019789, 0.011360, 0.003086, 0.026808, 0, 0.034935, 0.013135, 0.020974, 0.012241, 0.015050, 0.013572, 0.002753, -0.001771, 0.014827, 0.004115, 0.016004, 0.013027, 0, 0.044232, 0.012884, 0.004673, 0.011294, 0.035446, 0, 0.039004, 0.014434, 0.004266, 0, 0, 0.040149, 0, 0, 0.025435, 0, 0.016048, 0.011105, 0, 0, 0, 0.000488, 0.001410, -0.001849, -0.005198, -0.013230, 0.003714, 0.001171, 0.000424, 0.002257, -0.009799, 0.004186, -0.000183, 0.003538, 0.005675, -0.002546, 0.005175, 0.003659, 0.001474, -0.002303, 0.003818, -0.002481, 0.004920, 0.000344, 0.000659, 0.001067, -0.004877, -0.000541, -0.004393, 0.000178, 0.005052, 0.006917, 0.001408, 0.002148, -0.005947, -0.000878, -0.002249, 0, 0.000319, -0.004305, 0.009027, 0.008247, 0], "vc": [0.07504, 0.05576, 0.03153, -0.00034, 0.11648, 0.09541, 0.09183, 0.07327, 0.07618, 0.14831, 0.04215, 0.03985, 0.10364, 0.10099, 0.07120, 0.03897, 0.03162, 0.13396, 0.11195, 0.08635, 0.15890, 0.13649, 0.10565, 0.08746, 0.07286, 0.05865, 0.06858, 0.13128, 0.07527, 0.12152, 0.09956, 0.09165, 0.12598, 0.06705, 0.06358, 0.24831, 0.17027, 0.15831, 0.10188, 0.11564, 0.10350, 0.07922, 0.16951, 0, 0.21031, 0.10158, 0.16531, 0.14227, 0.14258, 0.10252, 0.10814, 0.08281, 0.09331, 0.07627, 0.05687, 0.05672, 0, 0.11480, 0.09519, 0, 0.08588, 0.18212, 0, 0.14753, 0.03783, 0.14431, 0, 0, 0.25031, 0, 0, 0.16754, 0, 0.13021, 0.11650, 0, 0, 0, 0.00400, 0.00572, -0.00398, -0.01081, -0.02300, -0.00014, -0.00851, -0.00866, 0.01636, -0.02700, -0.00781, -0.00098, 0.00281, 0.00826, -0.01755, 0.00227, -0.00664, -0.00510, -0.00122, -0.01966, 0.00664, 0.00559, -0.00415, -0.00293, -0.00591, -0.00144, 0.02605, -0.00777, 0.01511, 0.00397, -0.02297, 0.00433, 0.00580, -0.01380, 0.00297, -0.00045, 0, -0.00596, 0.00507, 0, -0.00832, -0.00341, 0], "tb": [0.8894, 0.9225, 0.6033, 0.2878, 1.7827, 1.8433, 1.7117, 1.7957, 1.8881, 3.1243, 0.9297, 1.6254, 1.9669, 1.9478, 1.7444, 3.2152, 4.4014, 3.5668, 3.8967, 2.8526, 3.6360, 3.3953, 3.1459, 2.2536, 1.6249, 1.1557, 2.5892, 3.1656, 2.5983, 3.1376, 2.6127, 1.5780, 2.1647, 1.2171, 5.4736, 6.2800, 5.9234, 5.0525, 5.8337, 2.9637, 2.6948, 2.2073, 3.9300, 3.5600, 4.5797, 2.6293, 5.7619, 5.0767, 6.0837, 3.2914, 3.6650, 2.6495, 2.3678, 2.5645, 1.7824, 0.9442, 7.2644, 1.2880, 0.6115, 1.1739, 2.6446, 2.8881, 2.3086, 1.9163, 1.0081, 10.3428, 0, 0, 7.6904, 0, 6.7822, 5.5566, 5.4248, 3.6796, 3.6763, 2.6812, 5.7093, 5.8260, -0.1157, -0.0489, 0.1798, 0.3189, 0.7273, 0.4745, 0.3563, 0.1919, 0.1957, 0.3489, 0.1589, 0.0668, -0.1406, -0.0900, 0.0511, 0.6884, -0.1074, 0.0224, 0.0920, 0.5580, 0.0735, -0.1552, 0.7801, -0.2383, 0.4456, -0.1977, 0.0835, -0.5385, -0.6331, 1.4108, -0.0690, 1.0682, 0.4247, 0.2499, 0.1134, -0.2596, 0.4408, -0.1168, -0.3201, -0.4453, -0.6776, -0.3678, 0], "tf": [0.4640, 0.9246, 0.3557, 1.6479, 1.6472, 1.6322, 1.7899, 2.0018, 5.1175, 3.3439, 1.4669, 0.2098, 1.8635, 0.4177, -1.7567, 3.5979, 13.7349, 4.8776, 5.6622, 4.2927, 4.0823, 3.5572, 4.2250, 2.9248, 2.0695, 4.0352, 4.5047, 6.7684, 4.1187, 4.5341, 6.0609, 3.4100, 4.0580, 0.9544, 10.1031, 0, 12.6275, 4.1859, 11.5630, 3.3376, 2.9933, 9.8409, 5.1638, 0, 10.2337, 2.7336, 5.5424, 4.9738, 8.4724, 3.0044, 4.6089, 3.7442, 3.9106, 9.5793, 1.5598, 2.5015, 0, 3.2411, 0, 0, 3.4448, 7.4756, 0, 2.7523, 1.9623, 31.2786, 0, 0, 11.3770, 0, 0, 0, 0, 5.0506, 3.1468, 0, 0, 0, 0.0381, -0.2355, 0.4401, -0.4923, 6.0650, 1.3772, 0, 0.6824, 1.5656, 6.9709, 1.9913, 0.2476, -0.5870, -0.2361, -2.8298, 1.4880, 2.0547, -0.2951, -0.2986, 0.7143, -0.6697, -3.1034, 28.4324, 0.4838, 0.0127, -2.3598, -2.0198, -0.5480, 0.3189, 0.9124, 9.5209, 2.7826, 2.5114, 1.0729, 0.2476, 0.1175, -0.2914, -0.0514, -1.6425, 0, 2.5832, -1.5511, 0], # Table 2 in [3]_ "hf": [-45.947, -20.763, -3.766, 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, -164.609, -182.329, -164.410, -129.2, -389.737, -359.258, -332.822, -163.569, -151.143, -129.488, -140.313, -15.505, 3.320, 5.432, 23.101, 26.718, 54.929, 69.885, 20.079, 134.062, 139.758, 88.298, -396.242, -73.568, -63.795, -57.795, -82.921, 0, -107.188, -16.752, -66.138, -59.142, -7.365, -8.253, 57.546, 1.834, 220.803, 227.368, -36.097, -161.740, 0, -679.195, 0, 0, -313.545, -258.960, 0, -446.835, -223.398, -203.188, -67.778, -182.096, -189.888, -46.562, 0, -344.125, 0, -2.084, 18.022, 0, 0, 0, -0.860, -1.338, 6.771, 7.205, 14.271, 104.800, 99.455, 13.782, -9.660, 15.465, -8.392, 0.474, 1.472, 4.504, 1.252, -2.792, -2.092, 0.975, 4.753, 14.145, -3.173, 1.279, 12.245, -7.807, 37.462, -16.097, -9.874, -3.887, -24.125, 0.366, -16.333, -2.992, 2.855, 0.351, -8.644, 1.532, -0.329, 0, 11.989, 0, 12.285, 11.207, 11.740], "gf": [-8.030, 8.231, 19.848, 37.977, 84.926, 92.900, 88.402, 93.745, 116.613, 221.308, 22.533, 30.485, 22.505, 41.228, 52.948, -158.589, -132.097, -131.366, -132.386, -107.858, -318.616, -291.188, -288.902, -105.767, -101.563, -92.099, -90.883, 58.085, 63.051, 82.471, 95.888, 85.001, 128.602, 132.756, 68.861, 199.958, 199.288, 121.544, -349.439, -33.373, -31.502, -25.261, -35.814, 0, -53.332, -0.596, 17.963, 18.088, 60.161, 16.731, 46.945, -1.721, 217.003, 216.328, -28.148, -144.549, 0, -626.580, 0, 0, -281.495, -209.337, 0, -392.975, -212.718, -136.742, 0, 0, -65.642, 0, 0, -241.373, 0, 30.222, 38.346, 0, 0, 0, 0.297, -0.399, 6.342, 7.466, 16.224, 94.564, 92.573, 5.733, -8.180, 20.597, -5.505, 0.950, 0.699, 1.013, 1.041, -1.062, -1.359, 0.075, 0, 23.539, -2.602, 2.149, 10.715, -6.208, 29.181, -11.809, -7.415, -6.770, -20.770, 3.805, -5.487, -1.600, 1.858, 8.846, -13.167, -0.654, -2.091, 0, 12.373, 0, 14.161, 12.530, 0], "hv": [4.116, 4.650, 2.771, 1.284, 6.714, 7.370, 6.797, 8.178, 9.342, 12.318, 4.098, 12.552, 9.776, 10.185, 8.834, 24.529, 40.246, 18.999, 20.041, 12.909, 22.709, 17.759, 0, 10.919, 7.478, 5.708, 11.227, 14.599, 11.876, 14.452, 14.481, 0, 6.947, 6.918, 28.453, 31.523, 31.005, 23.340, 43.046, 13.780, 11.985, 9.818, 19.208, 17.574, 0, 11.883, 30.644, 26.277, 0, 14.931, 14.364, 11.423, 7.751, 11.549, 0, 4.877, 0, 8.901, 1.860, 8.901, 0, 13.322, 0, 8.301, 0, 0, 0, 51.787, 0, 0, 0, 0, 0, 16.921, 17.117, 13.265, 27.966, 0, 0.292, -0.720, 0.868, 1.027, 2.426, 0, 0, -0.568, -0.905, -0.847, 2.057, -0.073, -0.369, 0.345, -0.114, 0, 0.207, -0.668, 0.071, 0.744, -3.410, 0, 8.502, -3.345, 0, 1.517, 0, -1.398, 0.320, -3.661, 4.626, 0, 0, 2.311, 0, 0, 0.972, 0, 0, 0, -7.488, -4.864, 0], # Table 1 in [4]_ "w": [0.29602, 0.14691, -0.07063, -0.35125, 0.40842, 0.25224, 0.22309, 0.23492, -0.21017, 0.73865, 0.15188, 0.02725, 0.33409, 0.14598, -0.08807, 1.52370, 0.73657, 1.01522, 0.63264, 0.96265, 1.13257, 0.75574, 0.76454, 0.52646, 0.44184, 0.21808, 0.50922, 0.79963, 0, 0.95344, 0.55018, 0.38623, 0.38447, 0.07508, 0.79337, 0, 0, 0, 1.67037, 0.57021, 0, 0, 0.71592, 0, 0.61662, 0, 0, 0, 0, 0, 0.23323, 0.27778, 0.61802, 0, 0, 0.26254, 0, 0.50023, 0, 0, 0, 0.50260, 0, 0.54685, 0.43796, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.42753, 0, 0, 0, 0.01740, 0.01922, -0.00475, -0.02883, -0.08632, 0.17563, 0.22216, 0.16284, -0.03065, -0.02094, 0.01648, 0.00619, -0.01150, 0.02778, -0.11024, -0.11240, 0, -0.20789, -0.16571, 0, 0, 0.08774, 0, -0.26623, 0, 0.91939, 0, 0.03654, 0.21106, 0, 0, 0, 0, -0.13106, 0, 0, -0.01509, 0, 0, 0, -0.03078, 0.00001, 0], "vliq": [0.02614, 0.01641, 0.00711, -0.00380, 0.03727, 0.02692, 0.02697, 0.01610, 0.00296, 0.04340, 0.01317, 0.00440, 0.02888, 0.01916, 0.00993, 0.00551, 0.01133, 0.03655, 0.02816, 0.02002, 0.04500, 0.03567, 0.02667, 0.03274, 0.02311, 0.01799, 0.02059, 0.02646, 0.01952, 0.02674, 0.02318, 0.01813, 0.01913, 0.01683, 0.01365, 0.06082, 0.05238, 0.03313, 0.02232, 0.03371, 0.02663, 0.02020, 0.04682, 0, 0.06202, 0.02414, 0.03375, 0.02620, 0.02505, 0.03446, 0.02791, 0.02143, 0, 0.01451, 0.01533, 0.01727, 0, 0, 0, 0, 0.01917, 0.05384, 0, 0.05383, 0, 0, 0, 0, 0.05477, 0, 0, 0.04104, 0, 0.03484, 0.02732, 0, 0, 0, 0.00133, 0.00179, -0.00203, -0.00243, -0.00744, 0, 0, 0.00213, 0.00063, -0.00519, -0.00188, 0.00009, 0.00012, 0.00142, -0.00107, 0, -0.00009, -0.00030, -0.00108, -0.00111, -0.00036, -0.00050, 0.00777, 0.00083, 0.00036, 0.00198, 0.00001, -0.00092, 0.00175, 0.00235, -0.00250, 0.00046, 0, -0.00179, -0.00206, 0.01203, -0.00023, 0, -0.0058, 0, 0.00178, 0.00171, 0], # Table C-2 in [1]_ "cpa": [35.1152, 22.6346, 8.9272, 0.3456, 49.2506, 35.2248, 37.6299, 21.3528, 10.2797, 66.0574, 16.3794, 10.4283, 42.8569, 32.8206, 19.9504, 27.2107, 39.7712, 59.3032, 0, 40.7501, 66.8423, 0, 51.5048, 50.5604, 39.5784, 25.6750, 0, 57.6861, 44.1122, 53.7012, 44.6388, 0, 41.4064, 30.1561, 47.1311, 84.7602, 0, 58.2837, 46.5577, 48.4648, 36.5885, 29.1848, 60.8262, 56.1685, 78.6054, 33.6450, 63.7851, 51.1442, 0, 58.2445, 29.1815, 28.0260, 45.9768, 26.7371, 25.8094, 30.1696, 0, 63.2024, 44.3567, 0, 0, 0, 0, 0, 22.2082, 0, 0, 0, 0, 0, 0, 0, 0, 57.7670, 45.0314, 40.5275, 80.3010, 0, 0.5830, 0.3226, 0.9668, -0.3082, -0.1201, 8.5546, 3.1721, -5.9060, -3.9682, -3.2746, 2.6142, -1.3913, 0.2630, 6.5145, 4.1707, 0, 0, 3.7978, 0, 0, 0, 0, -15.7667, 0, 0, -6.4072, 0, 2.4484, -1.5252, 0, 0, 0, 0, 0, 0, 0, -2.7407, 0, -1.6978, 0, -2.2923, -0.3162, 0], "cpb": [39.5923, 45.0933, 59.9786, 74.0368, 59.3840, 62.1924, 62.1285, 66.3947, 65.5372, 69.3936, 32.7433, 25.3634, 65.6464, 70.4153, 81.8764, 2.7609, 35.5676, 67.8149, 0, 19.6990, 102.4553, 0, 44.4133, 38.9681, 41.8177, 24.7281, 0, 64.0768, 77.2155, 71.7948, 68.5041, 0, 85.0996, 81.6814, 51.3326, 177.2513, 0, 49.6388, 48.2322, 37.2370, 47.6004, 52.3817, 41.9908, 46.9337, 32.1318, 23.2759, 83.4744, 94.2934, 0, 46.9958, -9.7846, -7.1651, 20.6417, 21.7676, -5.2241, 26.9738, 0, 51.9366, 44.5875, 0, 0, 0, 0, 0, -2.8385, 0, 0, 0, 0, 0, 0, 0, 0, 44.1238, 55.1432, 55.0141, 132.7786, 0, -1.2002, 2.1309, -2.0762, 1.8969, 4.2846, -22.9771, -10.0834, -1.8710, 17.7889, 32.1670, 4.4511, -1.5496, -2.3428, -17.5541, -3.1964, 0, 0, -7.3251, 0, 0, 0, 0, -0.1174, 0, 0, 15.2583, 0, -0.0765, -7.6380, 0, 0, 0, 0, 0, 0, 0, 11.1033, 0, 1.0477, 0, 3.1142, 2.3711, 0], "cpc": [-9.9232, -15.7033, -29.5143, -45.7878, -21.7908, -24.8156, -26.0637, -29.3703, -30.6057, -25.1081, -13.1692, -12.7283, -21.0670, -28.9361, -40.2864, 1.3060, -15.5875, -20.9948, 0, -5.4360, -43.3306, 0, -19.6155, -4.7799, -11.0837, 4.2419, 0, -21.0480, -33.5086, -22.9685, -26.7106, 0, -35.6318, -36.1441, -25.0276, -72.3213, 0, -15.6291, -20.4868, -13.0635, -22.8148, -30.8526, -20.4091, -31.3325, -19.4033, -12.2406, -35.1171, -45.2029, 0, -10.5106, 3.4554, 2.4332, -8.3297, -6.4481, 1.4542, -13.3722, 0, -28.6308, -23.2820, 0, 0, 0, 0, 0, 1.2679, 0, 0, 0, 0, 0, 0, 0, 0, -9.5565, -18.7776, -31.7190, -58.3241, 0, -0.0584, -1.5728, 0.3148, -1.6454, -2.0262, 10.7278, 4.9674, 4.2945, -3.3639, -17.8246, -5.9808, 2.5899, 0.8975, 10.6977, -1.1997, 0, 0, 2.5312, 0, 0, 0, 0, 6.1191, 0, 0, -8.3149, 0, 0.1460, 8.1795, 0, 0, 0, 0, 0, 0, 0, -11.0878, 0, 0.2002, 0, -1.4995, -1.4825, -0.0584], # Custom dict for molecular weight and empiric formula calculation "txt": [("CH3", ), # 0 ("CH2", ), ("CH", ), ("C", ), ("CH2=CH", ), ("CH=CH", ), ("CH2=C", ), ("CH=C", ), ("C=C", ), ("CH2=C=CH", ), ("-CH (Aromatic)", ), # 10 ("=C (Aromatic)", ), ("-CCH3 (Aromatic)", ), ("-CCH2 (Aromatic)", ), ("-CCH (Aromatic)", ), ("-OH", ), ("-COH (Aromatic)", ), ("CH3CO", ), ("CH2CO", ), ("CHO", ), ("CH3COO", ), # 20 ("CH2COO", ), ("HCOO", ), ("CH3O", ), ("CH2O", ), ("CH-O", ), ("FCH2O", ), ("CH2NH2", ), ("CHNH2", ), ("CH3NH", ), ("CH2NH", ), # 30 ("CHNH", ), ("CH3N", ), ("CH2N", ), ("=CNH2 (Aromatic)", ), ("C5H4N", ), ("C5H3N", ), ("CH2CN", ), ("COOH", ), ("CH2Cl", ), ("CHCl", ), # 40 ("CCl", ), ("CHCl2", ), ("CCl3", ), ("CCl2", ), ("=CCl (Aromatic)", ), ("CH2NO2", ), ("CHNO2", ), ("=CNO2 (Aromatic)", ), ("CH2SH", ), ("I", ), # 50 ("Br", ), ("CH≡C", ), ("C≡C", ), ("Cl-C=C", ), ("=CF (Aromatic)", ), ("HCONCH2CH2", ), ("CF3", ), ("CF2", ), ("CF", ), ("COO", ), # 60 ("CCl2F", ), ("HCClF", ), ("CClF2", ), ("F (others)", ), ("CONH2", ), ("CONHCH3", ), ("CONHCH2", ), ("CONCH3CH3", ), ("CONCH2CH2", ), ("CONCH2CH2", ), # 70 ("C2H5O2", ), ("C2H4O2", ), ("CH3S", ), ("CH2S", ), ("CHS", ), ("C4H3S", ), ("C4H2S", ), # Second order ("CH(CH3)2", ), ("C(CH3)3", ), ("CHCH3CHCH3", ), # 80 ("CH(CH3)C(CH3)2", ), ("C(CH3)2C(CH3)2", ), ("3 membered ring", ), ("4 membered ring", ), ("5 membered ring", ), ("6 membered ring", ), ("7 membered ring", ), ("CHn=CHm-CHp=CHk (m, p (0,1); k, n (0,2)", ), ("CH3-CHm=CHn (m (0,1); n (0,2))", ), ("CH2-CHm=CHn (m (0,1); n (0,2))", ), # 90 ("CH-CHm=CHn (m (0,1); n (0,2))", ), ("Alicyclic side-chain CcyclicCm", ), ("CH3CH3", ), ("CHCHO or CCHO", ), ("CH3COCH2", ), ("CH3COCH or CH3COC", ), ("Ccyclic=O", ), ("ACCHO", ), ("CHCOOH or CCOOH", ), ("ACCOOH", ), # 100 ("CH3COOCH or CH3COOC", ), ("COCH2COO or COCHCOO or COCCOO", ), ("CO-O-CO", ), ("ACCOO", ), ("CHOH", ), ("COH", ), ("CHm(OH)CHn(OH) (0<m,n<2)", ), ("CHm cyclic-OH (0<m<1)", ), ("CHn(OH)CHm(NHp) (0<m<1); (0<n,p<2)", ), ("CHm(NH2)CHn(NH2) (0<m,n<2)", ), # 110 ("CHm cyclic-NHp-CHn cyclic (0<n,m,p<1)", ), ("CHn-O-CHm=CHp (0<m<1); (0<n,p<2)", ), ("AC-O-CHm (0<m<3)", ), ("CHm cyclic-S-CHn cyclic (0<n,m<1)", ), ("CHn=CHm-F (0<m<1); (0<n<2)", ), ("CHn=CHm-Br (0<m<1); (0<n<2)", ), ("CHn=CHm-I (0<m<1); (0<n<2)", ), ("ACBr", ), ("ACI", ), ("CHm(NH2)-COOH (0<m<2)", )] # 120 } FirstOrder = 78 SecondOrder = 121
[docs] def calculo(self): """Calculation procedure""" # Use the input properties # SG is defined in base class if self.kwargs["M"]: M = self.kwargs["M"] else: M = self._M() self.M = unidades.Dimensionless(M) tc = Pc = tf = tb = vc = w = gf = hf = hv = vliq = cpa = cpb = cpc = 0 for i, c in zip(self.kwargs["group"], self.kwargs["contribution"]): tc += c*self.__coeff__["tc"][i] Pc += c*self.__coeff__["Pc"][i] vc += c*self.__coeff__["vc"][i] tf += c*self.__coeff__["tf"][i] tb += c*self.__coeff__["tb"][i] hf += c*self.__coeff__["hf"][i] gf += c*self.__coeff__["gf"][i] hv += c*self.__coeff__["hv"][i] w += c*self.__coeff__["w"][i] vliq += c*self.__coeff__["vliq"][i] cpa += c*self.__coeff__["cpa"][i] cpb += c*self.__coeff__["cpb"][i] cpc += c*self.__coeff__["cpc"][i] # Table 5 with functions self.Tc = unidades.Temperature(181.128*log(tc)) self.Pc = unidades.Pressure((Pc+0.10022)**-2+1.3705, "bar") self.Vc = unidades.SpecificVolume((vc-0.00435)/self.M) self.Tf = unidades.Temperature(102.425*log(tf)) self.Tb = unidades.Temperature(204.359*log(tb)) self.Hf = unidades.Enthalpy((hf+10.835)/self.M, "kJg") self.Gf = unidades.Enthalpy((gf-14.828)/self.M, "kJg") self.Hv = unidades.Enthalpy((hv+6.829)/self.M, "kJg") # Eq 2 in [4]_ self.f_acent = 0.4085*log(w+1.1507)**(1/0.5050) # Eq 3 in [4]_ self.Vliq = unidades.SpecificVolume((vliq+0.01211)*self.M) # Ideal gas specific heat expression from [1]_ self.cp = [cpa-19.7779, cpb+22.5981, cpc-10.7983, 0, 0, 0] GroupContribution.calculo(self)
[docs] def _Cp0(self, T): """Ideal gas specific heat calculation Parameters ---------- T : float Temperature, [K] Returns ------- cp0 : float Ideal gas specific heat, [J/kgK] """ Tita = (T-298)/700 cp0 = 0 for i, c in enumerate(self.cp): cp0 += c*Tita**i return unidades.SpecificHeat(cp0/self.M, "JgK")