def _PSat_s(s):
    """Define the saturated line, P=f(s) for region 3

    Parameters
    ----------
    s : float
        Specific entropy, [kJ/kgK]

    Returns
    -------
    P : float
        Pressure, [MPa]

    Notes
    ------
    Raise :class:`NotImplementedError` if input isn't in limit:

        * s'(623.15K) ≤ s ≤ s''(623.15K)

    References
    ----------
    IAPWS, Revised Supplementary Release on Backward Equations for the
    Functions T(p,h), v(p,h) and T(p,s), v(p,s) for Region 3 of the IAPWS
    Industrial Formulation 1997 for the Thermodynamic Properties of Water and
    Steam, http://www.iapws.org/relguide/Supp-Tv%28ph,ps%293-2014.pdf, Eq 11

    Examples
    --------
    >>> _PSat_s(3.8)
    16.87755057
    >>> _PSat_s(5.2)
    16.68968482
    """
    # Check input parameters
    smin_Ps3 = _Region1(623.15, Ps_623)["s"]
    smax_Ps3 = _Region2(623.15, Ps_623)["s"]
    if s < smin_Ps3 or s > smax_Ps3:
        raise NotImplementedError("Incoming out of bound")

    sigma = s/5.2
    I = [0, 1, 1, 4, 12, 12, 16, 24, 28, 32]
    J = [0, 1, 32, 7, 4, 14, 36, 10, 0, 18]
    n = [0.639767553612785, -0.129727445396014e2, -0.224595125848403e16,
         0.177466741801846e7, 0.717079349571538e10, -0.378829107169011e18,
         -0.955586736431328e35, 0.187269814676188e24, 0.119254746466473e12,
         0.110649277244882e37]

    suma = 0
    for i, j, ni in zip(I, J, n):
        suma += ni * (sigma-1.03)**i * (sigma-0.699)**j
    return 22*suma
def _PSat_s ( s ) : smin_Ps3 = _Region1 ( 623.15 , Ps_623 ) [ "s" ] smax_Ps3 = _Region2 ( 623.15 , Ps_623 ) [ "s" ] if s < smin_Ps3 or s > smax_Ps3 : raise NotImplementedError ( "Incoming out of bound" ) sigma = s / 5.2 I = [ 0 , 1 , 1 , 4 , 12 , 12 , 16 , 24 , 28 , 32 ] J = [ 0 , 1 , 32 , 7 , 4 , 14 , 36 , 10 , 0 , 18 ] n = [ 0.639767553612785 , - 0.129727445396014e2 , - 0.224595125848403e16 , 0.177466741801846e7 , 0.717079349571538e10 , - 0.378829107169011e18 , - 0.955586736431328e35 , 0.187269814676188e24 , 0.119254746466473e12 , 0.110649277244882e37 ] suma = 0 for i , j , ni in zip ( I , J , n ) : suma += ni * ( sigma - 1.03 ) ** i * ( sigma - 0.699 ) ** j return 22 * suma
Define the saturated line, P=f(s) for region 3

    Parameters
    ----------
    s : float
        Specific entropy, [kJ/kgK]

    Returns
    -------
    P : float
        Pressure, [MPa]

    Notes
    ------
    Raise :class:`NotImplementedError` if input isn't in limit:

        * s'(623.15K) ≤ s ≤ s''(623.15K)

    References
    ----------
    IAPWS, Revised Supplementary Release on Backward Equations for the
    Functions T(p,h), v(p,h) and T(p,s), v(p,s) for Region 3 of the IAPWS
    Industrial Formulation 1997 for the Thermodynamic Properties of Water and
    Steam, http://www.iapws.org/relguide/Supp-Tv%28ph,ps%293-2014.pdf, Eq 11

    Examples
    --------
    >>> _PSat_s(3.8)
    16.87755057
    >>> _PSat_s(5.2)
    16.68968482