Source code for lib.EoS.Cubic.PRAlmeida

#!/usr/bin/python3
# -*- coding: utf-8 -*-

r"""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 exp

from lib.EoS.Cubic.PR import PR


# Compounds specific parameters, given in Table 1 from reference 2_
dat = {
    98: (0.27614, 0.06982, 0.93960),
    629: (0.64550, 0.05264, 1.18518),
    630: (0.64257, 0.18552, 0.89607),
    99: (0.32107, 0.10871, 0.76332),
    105: (0.41244, 0.07346, 0.97199),
    944: (0.64681, 0.06412, 0.99894),
    208: (0.37960, 0.05905, 0.97180),
    951: (0.41540, 0.09196, 0.89372),
    971: (0.25912, 0.07399, 0.87894),
    63: (0.50842, 0.12210, 0.86548),
    108: (0.86918, 0.11269, 0.83445),
    109: (1.16864, 0.00757, 0.79389),
    46: (0.33208, 0.07382, 0.95405),
    110: (0.40154, 0.13400, 0.90308),
    107: (0.34340, 0.00415, 0.93764),
    47: (0.37175, 0.04062, 0.97811),
    214: (0.44878, 0.09822, 0.77234),
    51: (0.53228, 0.12695, 0.91620),
    994: (0.27306, 0.07160, 0.88731),
    209: (0.41883, 0.02190, 0.82045),
    104: (0.39861, 0.08672, 0.85194),
    210: (0.97748, -0.15636, 0.85741),
    106: (0.30824, 0.07865, 0.79937),
    1: (0.05570, -0.03392, 0.45350),
    62: (0.81473, 0.02707, 0.96611),
    50: (0.35951, 0.10865, 0.91548),
    211: (0.62901, 0.09766, 0.87064),
    634: (0.56232, 0.06590, 0.97471),
    637: (0.96019, -0.06453, 1.24362),
    215: (0.44040, 0.12991, 0.94046),
    216: (0.56310, 0.06384, 0.98100),
    101: (0.54006, 0.08154, 0.94853),

    217: (0.44111, 0.12243, 0.88165),
    100: (0.49680, 0.10336, 0.94047),
    48: (0.29990, 0.10040, 0.91971),
    49: (0.46189, 0.16353, 0.94571),
    219: (0.43526, 0.06883, 0.97759),
    102: (0.50499, 0.02763, 0.94350),
    220: (0.60622, 0.07328, 0.98587),
    642: (0.45078, 0.14529, 0.91990),
    112: (0.58912, 0.07534, 0.97959),
    643: (0.67976, 0.05670, 0.97172),
    113: (0.79517, -0.00668, 0.81927),
    222: (0.60529, 0.05946, 0.96591),
    645: (0.71076, 0.04351, 0.96991),
    114: (0.74992, 0.01807, 0.97805),
    224: (0.37618, 0.11421, 0.85173),
    115: (0.49571, 0.07139, 0.94487),
    225: (0.65355, 0.03317, 1.00643),
    116: (0.52417, 0.06322, 0.99832),
    226: (0.70429, 0.05665, 0.88360),
    2: (0.33181, 0.04863, 0.96106),
    117: (1.26437, -0.07694, 0.99388),
    227: (0.47254, 0.08791, 0.95644),
    118: (0.62704, 0.10901, 0.96010),
    228: (0.24257, 0.26498, 0.08051),
    651: (0.60139, 0.08713, 0.95837),
    229: (0.56462, 0.10515, 0.92690),
    230: (0.58036, 0.09995, 0.94262),
    231: (0.63455, 0.07853, 0.96900),
    232: (0.59596, 0.09749, 0.95989),
    233: (0.54087, 0.10955, 0.91921),
    234: (0.71130, 0.07615, 0.93806),
    # C2F3N: (0.83254, 0.02369, 1.04850),
    235: (0.57072, 0.09812, 0.97139),
    236: (0.56872, 0.10842, 0.93453),

    237: (0.45941, 0.17794, 0.91261),
    654: (0.64366, 0.05919, 1.00837),
    # 1629: (0.69142, 0.06357, 0.96829),
    119: (0.46626, 0.13854, 0.88668),
    655: (0.79035, 0.06020, 0.99783),
    238: (0.58366, 0.15110, 0.00600),
    65: (0.50899, 0.09797, 0.95055),
    658: (0.60350, 0.06604, 0.97464),
    659: (0.54669, 0.09435, 1.01501),
    478: (0.62992, 0.08719, 0.90503),
    239: (0.66313, -0.02124, 1.01725),
    122: (0.41572, 0.11979, 0.98541),
    241: (0.61160, 0.07185, 0.93328),
    123: (0.79598, 0.00518, 0.93451),
    479: (0.53211, 0.10216, 0.94094),
    124: (0.39677, 0.21034, 0.94660),
    242: (0.55419, 0.06892, 1.03307),
    243: (0.53797, 0.10935, 0.88559),
    125: (0.55941, 0.10564, 0.76802),
    244: (0.71552, 0.09673, 1.05314),
    22: (0.45163, 0.05714, 1.00780),
    440: (0.53844, 0.10189, 0.92964),
    126: (0.22533, 0.24102, 0.48536),
    127: (0.59850, 0.08827, 0.95190),
    245: (0.64796, 0.07125, 0.97052),
    128: (0.94781, -0.05760, 1.02960),
    129: (0.66480, 0.04036, 1.03796),
    130: (1.12415, -0.07116, 0.99316),
    131: (0.67097, 0.07412, 1.01003),
    246: (0.43618, 0.10744, 0.71925),
    132: (0.49536, 0.09767, 0.92540),
    247: (0.69964, 0.02160, 1.00440),
    442: (0.44418, 0.13651, 1.01605),

    3: (0.47142, 0.05114, 0.99543),
    134: (1.36653, -0.04523, 1.02803),
    133: (0.50427, 0.09808, 0.93677),
    135: (1.14819, 0.00815, 0.63286),
    137: (0.48217, 0.11186, 0.94143),
    136: (0.53611, 0.08561, 0.96686),
    138: (0.60521, 0.13419, 0.98843),
    249: (0.40264, 0.22937, 0.84054),
    250: (1.35759, -0.02742, 0.90711),
    251: (0.82025, 0.07901, 0.88882),
    671: (0.80311, 0.04779, 1.00298),
    139: (0.52148, 0.11700, 0.71966),
    57: (0.53983, 0.10090, 0.95965),
    252: (0.47719, 0.11459, 0.64809),
    253: (0.61435, 0.17289, 0.67561),
    254: (0.64563, 0.17018, 0.71687),
    255: (0.10004, 0.31314, 0.73168),
    256: (0.74025, 0.08127, 1.00951),
    257: (0.81904, 0.01757, 0.98851),
    23: (0.51371, 0.06476, 0.98727),
    258: (0.28091, 0.14067, 0.70429),
    259: (0.66893, 0.06590, 1.01393),
    140: (0.72902, 0.05795, 0.96962),
    261: (0.78333, 0.03067, 0.97110),
    444: (0.67750, 0.06727, 0.99623),
    262: (0.25664, 0.08018, 0.07731),
    141: (0.59442, 0.13142, 0.97792),
    142: (0.57330, 0.14398, 0.88928),
    143: (1.08106, 0.00726, 0.96563),
    263: (0.48973, 0.12693, 0.90761),
    264: (0.63277, 0.07272, 0.98729),
    4: (0.53138, 0.06071, 0.98361),
    146: (1.38534, -0.01368, 1.08591),
    145: (1.45619, -0.02055, 1.08752),

    486: (0.39951, 0.19924, 0.88298),
    266: (1.31690, -0.05161, 0.72056),
    267: (1.23417, -0.02121, 0.91655),
    268: (0.62353, 0.38149, 0.22358),
    269: (0.47362, 0.15281, 0.98226),
    270: (0.61001, 0.13393, 0.98576),
    271: (0.44993, 0.18742, 0.84567),
    147: (0.57013, 0.07790, 0.98251),
    691: (0.67876, 0.12759, 0.94241),
    693: (0.97310, -0.00095, 1.03480),
    148: (0.85940, 0.01990, 1.40992),
    273: (0.60353, 0.08046, 1.01850),
    149: (0.45500, 0.12987, 0.92520),
    150: (0.42864, 0.19463, 0.62147),
    67: (0.07554, 0.28482, 0.86814),
    151: (0.92504, -0.02020, 1.32837),
    58: (0.60483, 0.06004, 0.88968),
    28: (0.52507, 0.08488, 0.93867),
    427: (0.69463, 0.10290, 0.94916),
    447: (1.04573, -0.08927, 0.63841),
    278: (0.66934, 0.10010, 0.86579),
    279: (0.64836, 0.11212, 0.89549),
    24: (0.56640, 0.07247, 0.98438),
    27: (0.60269, 0.05790, 0.99119),
    25: (0.56502, 0.08162, 0.97990),
    26: (0.56327, 0.07444, 0.93156),
    705: (0.49065, 0.08164, 0.89131),
    153: (0.72760, 0.06914, 0.96060),
    448: (1.00306, -0.05422, 1.01820),
    152: (0.75140, 0.04777, 0.95854),
    281: (0.62854, 0.06892, 0.98903),
    280: (0.61479, 0.09751, 0.95854),
    155: (0.71686, 0.11341, 0.96614),
    154: (1.08717, 0.05180, 0.90463),

    283: (0.90575, 0.12446, 0.88656),
    282: (0.62175, 0.10336, 0.94735),
    156: (0.55529, 0.16848, 0.86753),
    157: (0.56858, 0.16414, 0.95529),
    284: (0.56176, 0.11728, 0.99955),
    285: (0.63176, 0.08308, 0.89981),
    286: (0.65684, 0.06001, 1.06960),
    287: (0.48149, 0.16222, 0.87062),
    288: (0.58614, 0.13480, 0.80758),
    6: (0.58249, 0.06849, 0.98301),
    5: (0.56620, 0.06509, 0.97948),
    162: (0.63505, 0.09997, 0.96601),
    160: (1.24423, 0.06409, 1.09856),
    450: (1.16606, 0.11341, 1.11217),
    159: (1.07264, 0.15655, 1.07521),
    161: (1.28889, 0.09052, 1.13096),
    # 1287: (0.56197, 0.11720, 0.91375),
    # 1286: (0.65900, 0.08093, 0.99014),
    289: (0.62491, 0.10450, 0.82705),
    163: (0.62605, 0.33979, 0.34915),
    290: (0.63747, 0.09218, 0.93391),
    292: (0.56937, 0.15170, 0.90617),
    293: (0.56034, 0.15703, 0.85777),
    294: (0.68660, 0.10343, 1.00427),
    # C5F12: (0.94679, 0.04609, 0.99545),
    164: (0.25548, 0.27473, 0.30659),
    295: (0.56994, 0.10909, 0.96710),
    61: (0.41380, 0.15598, 1.00111),
    300: (0.30349, 0.22243, 0.92886),
    296: (0.81229, 0.02073, 1.23701),
    297: (0.76063, 0.02815, 1.16636),
    298: (0.90992, -0.01169, 1.39204),
    299: (0.87930, 0.01792, 1.28230),
    301: (0.66474, 0.07204, 0.98246),

    302: (0.63940, 0.11441, 0.81373),
    36: (0.62875, 0.05594, 1.03231),
    29: (0.65205, 0.05981, 0.99564),
    32: (0.60692, 0.09491, 1.00314),
    34: (0.62486, 0.08755, 0.91683),
    33: (0.59134, 0.07508, 0.94883),
    30: (0.65061, 0.07291, 1.01106),
    31: (0.60788, 0.09046, 0.98449),
    303: (0.69961, 0.10040, 0.86750),
    165: (0.70655, 0.10267, 0.95425),
    304: (0.66031, 0.11294, 0.91859),
    305: (0.12440, 0.32916, -0.03331),
    307: (0.67926, 0.11425, 0.92603),
    309: (0.58616, 0.18274, 0.86773),
    166: (0.73585, 0.12007, 0.95810),
    310: (0.77245, 0.09567, 0.97249),
    311: (0.74123, 0.10133, 0.97508),
    312: (0.47861, 0.15408, 0.88458),
    8: (0.66228, 0.06209, 0.98054),
    7: (0.59518, 0.07842, 0.96520),
    9: (0.47804, 0.12295, 0.94552),
    313: (0.70898, 0.29589, 0.94464),
    318: (0.61901, 0.12706, 0.93683),
    314: (0.60177, 0.35971, 0.91012),
    316: (0.45556, 0.39508, 0.90503),
    # 1317: (0.63920, 0.10817, 0.92877),
    456: (0.44103, 0.18636, 0.87018),
    # C6ClF5: (0.80270, 0.07789, 0.95331),
    # C6Cl3F3: (0.84634, 0.06807, 0.95179),
    319: (0.78841, 0.08848, 0.95324),
    320: (0.01162, 0.69206, -0.56583),
    321: (0.73072, 0.17378, 0.89397),
    # C6F14, Perfluoro-2-methylpentane: (1.14272, -0.01719, 1.04804),
    # C6F14, Perfluoro-3-methylpentane: (0.95504, 0.06362, 0.98504),

    # C6F14, Perfluoro-2,3-dimethylbutane: (1.44048, -0.12541, 1.18935),
    # C6HF5: (0.75301, 0.09390, 0.95802),
    # C6HF5O, pentafluorophenol: (0.85801, 0.10713, 0.92760),
    # C6H2F4, 1,2,4,5-tetrafluorobenzene: (0.72112, 0.09709, 0.95249),
    # C6H2F4, 1,2,3,4-tetrafluorobenzene: (0.71415, 0.09459, 0.95514),
    # C6H2F4, 1,2,3,5-tetrafluorobenzene: (0.72141, 0.09114, 0.95669),
    169: (0.60367, 0.12000, 0.98178),
    168: (0.58714, 0.12430, 0.99048),
    170: (0.38199, 0.21856, 0.90937),
    171: (0.54950, 0.10878, 0.91267),
    172: (0.52168, 0.12213, 0.90207),
    322: (0.53710, 0.11806, 0.91639),
    173: (0.54255, 0.11954, 0.92572),
    40: (0.52303, 0.11059, 0.96187),
    174: (0.67600, 0.15807, 0.87817),
    175: (0.84149, 0.05527, 0.98312),
    622: (0.67558, 0.08585, 0.95430),
    323: (0.67370, 0.09237, 0.99852),
    324: (0.52314, 0.10459, 0.86191),
    325: (0.60605, 0.07350, 0.99850),
    508: (0.71304, 0.10374, 0.74179),
    38: (0.51860, 0.11301, 0.96150),
    37: (0.55303, 0.10453, 0.95084),
    35: (0.54595, 0.13355, 0.89729),
    552: (0.88847, 0.00275, 1.12938),
    553: (0.47296, 0.16587, 0.89851),
    554: (0.73220, 0.06092, 1.10001),
    555: (0.87234, 0.02081, 1.21053),
    556: (0.83060, 0.03231, 1.15304),
    557: (0.78333, 0.04077, 1.10710),
    558: (0.80270, 0.04144, 1.11444),
    559: (0.65561, 0.08369, 0.92976),
    560: (0.69744, 0.07246, 0.96031),
    561: (0.73077, 0.04801, 1.08447),

    563: (0.32348, 0.19299, 0.97939),
    562: (0.54437, 0.14784, 0.96945),
    328: (0.46579, 0.39045, 0.86208),
    # 1356: (0.77246, 0.08804, 0.95453),
    329: (0.63006, 0.13853, 0.86784),
    330: (0.70303, 0.14500, 0.92010),
    331: (0.78812, 0.09626, 0.94605),
    332: (0.83334, 0.08408, 0.96683),
    333: (0.79027, 0.09499, 0.94966),
    334: (0.83708, 0.08303, 0.96673),
    10: (0.68783, 0.08006, 0.96790),
    # Isohexane and 2-methylpentane defined in table
    # Using the second value,
    # 52: (0.67081, 0.07709, 0.98013),
    52: (0.55292, 0.13115, 0.91572),
    53: (0.68148, 0.06838, 0.98275),
    54: (0.59868, 0.07806, 0.96186),
    55: (0.61611, 0.08058, 0.96359),
    335: (1.42563, -0.01298, 1.09068),
    336: (0.77734, 0.06752, 0.91667),
    778: (0.69900, 0.09780, 0.90533),
    337: (0.70645, 0.09452, 0.95486),
    338: (0.69168, 0.11008, 0.89108),
    786: (0.72787, 0.09845, 0.96217),
    339: (0.24354, 0.27613, 0.44312),
    340: (0.60523, 0.17525, 0.74783),
    326: (0.85562, 0.14614, 0.91776),
    # C7H3F5, pentafluorotoluene: (0.83558, 0.07159, 0.95938),
    342: (0.65447, 0.09713, 0.92935),
    343: (1.14872, 0.10243, 1.04622),
    41: (0.62210, 0.09000, 0.96073),
    344: (0.67855, 0.11065, 0.93385),
    345: (1.44133, -0.14429, 0.94232),
    177: (0.63811, 0.17338, 0.86162),
    346: (0.60559, 0.23120, 0.89014),
    347: (0.73730, 0.15840, 0.86751),

    352: (0.58305, 0.14604, 0.66852),
    353: (0.70343, 0.14399, 0.88911),
    354: (0.64211, 0.16783, 0.89164),
    355: (1.32030, -0.05051, 1.15334),
    356: (0.25082, 0.17726, 0.26552),
    93: (0.60360, 0.08901, 0.92238),
    94: (0.55274, 0.11649, 0.90321),
    95: (0.66272, 0.07068, 0.97158),
    59: (0.54204, 0.12776, 0.90545),
    39: (0.60261, 0.08716, 0.97949),
    56: (0.56281, 0.15185, 0.87403),
    # 1398: (0.80299, 0.03461, 1.19483),
    530: (0.90550, 0.07010, 0.96134),
    # 1651: (0.80777, 0.09131, 0.91932),
    # C7H14O2, isobutyl propionate: (0.86894, 0.07607, 0.94665),
    11: (0.75431, 0.08112, 0.97264),
    79: (0.64945, 0.11528, 0.93136),
    80: (0.65153, 0.10975, 0.93496),
    432: (0.63796, 0.09905, 0.95677),
    433: (0.61482, 0.11118, 0.93356),
    434: (0.58970, 0.12809, 0.91843),
    435: (0.61533, 0.09398, 0.95082),
    436: (0.67342, 0.09433, 0.95704),
    437: (0.63554, 0.07654, 0.97894),
    357: (-15.32902, 0.82974, 6.08209),
    358: (0.48305, 0.16194, 0.39535),
    178: (0.55947, 0.13177, 1.00486),
    359: (0.83394, 0.05234, 0.99842),
    535: (0.72010, 0.11652, 0.87313),
    42: (0.68858, 0.08524, 0.95929),
    43: (0.71601, 0.08056, 0.96289),
    44: (0.69828, 0.08360, 0.95263),
    45: (0.66249, 0.09632, 0.96009),
    564: (0.69262, 0.14090, 0.89851),

    574: (1.00568, -0.00427, 1.02038),
    87: (0.59132, 0.10767, 1.00119),
    88: (0.54015, 0.13805, 0.98734),
    89: (0.74703, 0.05374, 1.07942),
    84: (-11.01711, 0.48312, 6.62813),
    85: (1.52616, -0.23382, 1.28334),
    86: (0.94549, -0.03310, 1.10987),
    60: (0.79281, 0.04643, 1.11552),
    578: (0.60972, 0.10644, 0.99682),
    579: (0.45349, 0.17133, 0.97741),
    580: (0.67634, 0.07747, 0.94431),
    581: (0.81081, 0.03823, 1.11486),
    582: (0.56764, 0.13085, 0.98663),
    179: (0.43898, 0.19906, 0.87719),
    583: (0.53209, 0.14557, 0.98506),
    584: (0.64829, 0.08510, 0.99606),
    83: (0.61941, 0.15117, 0.86080),
    585: (0.71812, 0.08234, 0.93396),
    587: (0.92463, 0.06318, 0.96223),
    588: (0.90061, 0.06522, 0.96528),
    12: (0.79451, 0.09048, 0.96658),
    81: (0.70973, 0.11641, 0.93719),
    590: (0.75019, 0.09688, 0.96446),
    591: (0.77081, 0.08619, 0.96912),
    592: (0.71794, 0.09127, 0.96317),
    593: (0.73868, 0.08431, 0.96432),
    594: (0.74013, 0.08499, 0.97282),
    595: (0.74833, 0.08689, 0.96550),
    596: (0.72176, 0.07745, 0.97093),
    597: (0.72636, 0.08515, 0.96239),
    598: (0.75685, 0.08620, 0.96772),
    541: (0.69115, 0.07940, 0.97328),
    82: (0.70713, 0.07690, 0.98275),
    599: (0.70524, 0.06648, 0.98106),

    600: (0.67476, 0.09645, 0.95531),
    601: (0.72354, 0.08261, 0.96785),
    602: (0.70929, 0.06980, 0.96893),
    603: (-10.46502, 0.53661, 7.54917),
    360: (0.57565, 0.35019, 0.83303),
    363: (0.84042, 0.08165, 0.89391),
    606: (0.66220, 0.12187, 0.97272),
    362: (1.22950, 0.03573, 0.88999),
    364: (0.86310, 0.08266, 0.89962),
    608: (0.82289, 0.08918, 0.90112),
    182: (0.88067, 0.04722, 1.02375),
    365: (1.02062, 0.02478, 0.92919),
    70: (0.66981, 0.11144, 0.92832),
    71: (0.70971, 0.09422, 0.97630),
    72: (0.50919, 0.19430, 0.94364),
    73: (0.51945, 0.20006, 0.91454),
    74: (0.60012, 0.15623, 0.94657),
    75: (0.64001, 0.12657, 0.88247),
    76: (0.64639, 0.13101, 0.88324),
    77: (0.74380, 0.09836, 0.91952),
    184: (0.44742, 0.20722, 0.94043),
    366: (0.40409, 0.21699, 0.93734),
    367: (0.76744, 0.11743, 0.93515),
    13: (0.83101, 0.09679, 0.94867),
    611: (0.81237, 0.08890, 0.94271),
    612: (0.75546, 0.09747, 0.93570),
    368: (0.78528, 0.07139, 1.00333),
    369: (0.78676, 0.07662, 0.99681),
    370: (0.68618, 0.12274, 0.94927),
    371: (0.66690, 0.10119, 0.91887),
    372: (0.68056, 0.08849, 0.96890),
    373: (0.65735, 0.10384, 0.94962),
    374: (0.62691, 0.11472, 0.93189),
    375: (0.65573, 0.10225, 0.94526),

    185: (0.56870, 0.13078, 0.89118),
    188: (0.74378, 0.06437, 0.92432),
    78: (0.67561, 0.13307, 0.90158),
    377: (0.82098, 0.04576, 0.93365),
    378: (0.47488, 0.20315, 0.94255),
    379: (0.42233, 0.22540, 0.92787),
    380: (0.92686, 0.03050, 1.16411),
    381: (1.31433, -0.09883, 1.27345),
    382: (1.10824, -0.04258, 1.08884),
    383: (0.77181, 0.09751, 0.94355),
    384: (1.18248, -0.05915, 1.06693),
    385: (0.87988, 0.11334, 0.90879),
    386: (0.71019, 0.07420, 1.00012),
    387: (0.68185, 0.07837, 0.95895),
    190: (0.68382, 0.10360, 0.90045),
    389: (0.55910, 0.14834, 0.88750),
    390: (0.37885, 0.24916, 0.90560),
    391: (0.43526, 0.20991, 0.94028),
    392: (0.77328, 0.13331, 0.88944),
    14: (0.83101, 0.12256, 0.93515),
    393: (0.76707, 0.09025, 0.94853),
    394: (0.70015, 0.09326, 0.90118),
    395: (0.88072, 0.06398, 1.03454),
    396: (1.10996, 0.16677, 1.22177),
    191: (0.74403, 0.08577, 0.97724),
    192: (0.65095, 0.12385, 0.88752),
    397: (0.81275, 0.13319, 0.82832),
    398: (0.88176, 0.08976, 0.95271),
    399: (0.81505, 0.13786, 0.90184),
    15: (0.78851, 0.15573, 0.87706),
    194: (0.81271, 0.06629, 0.99032),
    400: (0.72710, 0.13777, 0.90072),
    401: (0.95080, 0.08565, 0.96762),
    402: (0.86528, 0.13718, 0.90908),

    16: (0.87249, 0.14052, 0.90190),
    403: (0.83605, 0.15847, 0.76480),
    404: (0.41579, 0.48784, 0.35082),
    405: (0.84916, 0.14653, 0.79175),
    406: (0.17325, 0.43206, 0.30979),
    407: (0.96196, 0.10071, 0.93569),
    408: (0.89834, 0.14456, 0.90559),
    17: (0.98377, 0.11237, 0.92465),
    410: (1.01804, 0.09816, 0.94885),
    411: (0.78325, 0.21147, 0.81595),
    18: (1.41132, -0.03229, 1.08283),
    412: (1.04872, 0.10437, 0.94062),
    413: (0.94108, 0.17167, 0.89517),
    19: (0.78865, 0.22842, 0.78501),
    414: (1.52363, -0.06512, 1.14071),
    415: (0.93233, 0.19706, 0.87689),
    20: (1.03097, 0.13214, 0.88876),
    416: (1.21259, 0.08618, 0.99142),
    21: (1.07038, 0.14049, 0.90113),
    417: (0.52027, 0.56819, 0.49239),
    420: (1.24571, 0.08937, 0.95518),
    421: (1.35447, 0.04686, 1.01655),
    90: (1.20216, 0.10173, 0.96355),
    422: (0.55503, 0.56374, 0.50699),
    423: (-8.20533, 0.94282, 4.93733),
    91: (1.22684, 0.10889, 0.95038),
    424: (1.38888, 0.07042, 0.97480),
    92: (1.37387, 0.07482, 0.95695),
    425: (0.79191, 0.48624, 0.72825)}


[docs] class PRAlmeida(PR): r"""Peng-Robinson temperature dependence modification by Almeida et al. .. math:: \alpha = \exp\left(m\left(1-T_r\right)\left|1-T_r\right|^{\Gamma-1} + n\left(\frac{1}{Tr}-\right)\right) where m, n and Γ are adjustable parameters compound specific get in [2]_ """ __title__ = "PR Almeida (1991)" __status__ = "PRAlm" __doi__ = ( { "autor": "Almeida, G.S., Aznar, M., Silva Telles, A.", "title": "Uma Nova Forma de Dependência com a Temperatura do Termo " "Atrativo de Equaçöes de Estado Cúbicas", "ref": "Cad. Eng. Quim., 8 (1991) 95-123", "doi": ""}, { "autor": "Aznar, M., Silva Telles, A.", "title": "A Data Bank of Parameters for the Attractive Coefficient of " "the Peng-Robinson Equation of State", "ref": "Braz. J. Chem. Eng. 14(1) (1997)", "doi": "10.1590/S0104-66321997000100003"})
[docs] def _alfa(self, cmp, T): # m,n and G are parameters compound specific if cmp.id in dat: m, n, G = dat[cmp.id] Tr = T/cmp.Tc alfa = exp(m*(1-Tr)*abs(1-Tr)**(G-1) + n*(1/Tr-1)) # Eq 6 else: m, alfa = PR._alfa(self, cmp, T) return 0, alfa
if __name__ == "__main__": from lib.mezcla import Mezcla mix = Mezcla(5, ids=[4], caudalMolar=1, fraccionMolar=[1]) eq = PRAlmeida(300, 9.9742e5, mix) print('%0.0f %0.1f' % (eq.Vg.ccmol, eq.Vl.ccmol)) eq = PRAlmeida(300, 42.477e5, mix) print('%0.1f' % (eq.Vl.ccmol))