@staticmethod
def p2_hs(h, s):
    """function p2_hs = p2_hs(h, s)

        Supplementary Release on Backward Equations for Pressure as a function of Enthalpy and Entropy p(h,s) to the IAPWS Industrial formulation 1997 for the Thermodynamic Properties of Water and Steam

        Chapter 6: Backward Equations p(h,s) for Region 2
        """
    if (h < -3498.98083432139 + 2575.60716905876 * s - 421.073558227969 * s **
        2 + 27.6349063799944 * s ** 3):
        sub_reg = 1
    elif s < 5.85:
        sub_reg = 3
    else:
        sub_reg = 2
    if sub_reg == 1:
        Ii = [0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 3, 3,
            3, 3, 3, 4, 5, 5, 6, 7]
        Ji = [1, 3, 6, 16, 20, 22, 0, 1, 2, 3, 5, 6, 10, 16, 20, 22, 3, 16,
            20, 0, 2, 3, 6, 16, 16, 3, 16, 3, 1]
        ni = [-0.0182575361923032, -0.125229548799536, 0.592290437320145, 
            6.04769706185122, 238.624965444474, -298.639090222922, 
            0.051225081304075, -0.437266515606486, 0.413336902999504, -
            5.16468254574773, -5.57014838445711, 12.8555037824478, 
            11.414410895329, -119.504225652714, -2847.7798596156, 
            4317.57846408006, 1.1289404080265, 1974.09186206319, 
            1516.12444706087, 0.0141324451421235, 0.585501282219601, -
            2.97258075863012, 5.94567314847319, -6236.56565798905, 
            9659.86235133332, 6.81500934948134, -6332.07286824489, -
            5.5891922446576, 0.0400645798472063]
        eta = h / 4200
        Sigma = s / 12
        Pi = 0
        for i in range(0, 29):
            Pi = Pi + ni[i] * (eta - 0.5) ** Ii[i] * (Sigma - 1.2) ** Ji[i]
        p2_hs = Pi ** 4 * 4
    elif sub_reg == 2:
        Ii = [0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 3, 3, 3, 3, 4, 4, 5,
            5, 6, 6, 6, 7, 7, 8, 8, 8, 8, 12, 14]
        Ji = [0, 1, 2, 4, 8, 0, 1, 2, 3, 5, 12, 1, 6, 18, 0, 1, 7, 12, 1, 
            16, 1, 12, 1, 8, 18, 1, 16, 1, 3, 14, 18, 10, 16]
        ni = [0.0801496989929495, -0.543862807146111, 0.337455597421283, 
            8.9055545115745, 313.840736431485, 0.797367065977789, -
            1.2161697355624, 8.72803386937477, -16.9769781757602, -
            186.552827328416, 95115.9274344237, -18.9168510120494, -
            4334.0703719484, 543212633.012715, 0.144793408386013, 
            128.024559637516, -67230.9534071268, 33697238.0095287, -
            586.63419676272, -22140322476.9889, 1716.06668708389, -
            570817595.806302, -3121.09693178482, -2078413.8463301, 
            3056059461577.86, 3221.57004314333, 326810259797.295, -
            1441.04158934487, 410.694867802691, 109077066873.024, -
            24796465425889.3, 1888019068.65134, -123651009018773]
        eta = h / 4100
        Sigma = s / 7.9
        Pi = 0
        for i in range(0, 33):
            Pi = Pi + ni[i] * (eta - 0.6) ** Ii[i] * (Sigma - 1.01) ** Ji[i]
        p2_hs = Pi ** 4 * 100
    else:
        Ii = [0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3,
            4, 5, 5, 5, 5, 6, 6, 10, 12, 16]
        Ji = [0, 1, 2, 3, 4, 8, 0, 2, 5, 8, 14, 2, 3, 7, 10, 18, 0, 5, 8, 
            16, 18, 18, 1, 4, 6, 14, 8, 18, 7, 7, 10]
        ni = [0.112225607199012, -3.39005953606712, -32.0503911730094, -
            197.5973051049, -407.693861553446, 13294.3775222331, 
            1.70846839774007, 37.3694198142245, 3581.44365815434, 
            423014.446424664, -751071025.760063, 52.3446127607898, -
            228.351290812417, -960652.417056937, -80705929.2526074, 
            1626980172256.69, 0.772465073604171, 46392.9973837746, -
            13731788.5134128, 1704703926305.12, -25110462818730.8, 
            31774883083552, 53.8685623675312, -55308.9094625169, -
            1028615.22421405, 2042494187562.34, 273918446.626977, -
            2639631463126850.0, -1078908541.08088, -29649262098.0124, -
            1117549073234240.0]
        eta = h / 3500
        Sigma = s / 5.9
        Pi = 0
        for i in range(0, 31):
            Pi = Pi + ni[i] * (eta - 0.7) ** Ii[i] * (Sigma - 1.1) ** Ji[i]
        p2_hs = Pi ** 4 * 100
    return p2_hs
