def _Backward3a_v_Ph(P, h):
    """Backward equation for region 3a, v=f(P,h)

    Parameters
    ----------
    P : float
        Pressure, [MPa]
    h : float
        Specific enthalpy, [kJ/kg]

    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 4

    Returns
    -------
    v : float
        Specific volume, [m³/kg]

    Examples
    --------
    >>> _Backward3a_v_Ph(20,1700)
    0.001749903962
    >>> _Backward3a_v_Ph(100,2100)
    0.001676229776
    """
    I = [-12, -12, -12, -12, -10, -10, -10, -8, -8, -6, -6, -6, -4, -4, -3, -2,
         -2, -1, -1, -1, -1, 0, 0, 1, 1, 1, 2, 2, 3, 4, 5, 8]
    J = [6, 8, 12, 18, 4, 7, 10, 5, 12, 3, 4, 22, 2, 3, 7, 3, 16, 0, 1, 2, 3,
         0, 1, 0, 1, 2, 0, 2, 0, 2, 2, 2]
    n = [0.529944062966028e-2, -0.170099690234461, 0.111323814312927e2,
         -0.217898123145125e4, -0.506061827980875e-3, 0.556495239685324,
         -0.943672726094016e1, -0.297856807561527, 0.939353943717186e2,
         0.192944939465981e-1, 0.421740664704763, -0.368914126282330e7,
         -0.737566847600639e-2, -0.354753242424366, -0.199768169338727e1,
         0.115456297059049e1, 0.568366875815960e4, 0.808169540124668e-2,
         0.172416341519307, 0.104270175292927e1, -0.297691372792847,
         0.560394465163593, 0.275234661176914, -0.148347894866012,
         -0.651142513478515e-1, -0.292468715386302e1, 0.664876096952665e-1,
         0.352335014263844e1, -0.146340792313332e-1, -0.224503486668184e1,
         0.110533464706142e1, -0.408757344495612e-1]

    Pr = P/100
    nu = h/2100
    suma = 0
    for i, j, ni in zip(I, J, n):
        suma += ni * (Pr+0.128)**i * (nu-0.727)**j
    return 0.0028*suma
def _Backward3a_v_Ph ( P , h ) : I = [ - 12 , - 12 , - 12 , - 12 , - 10 , - 10 , - 10 , - 8 , - 8 , - 6 , - 6 , - 6 , - 4 , - 4 , - 3 , - 2 , - 2 , - 1 , - 1 , - 1 , - 1 , 0 , 0 , 1 , 1 , 1 , 2 , 2 , 3 , 4 , 5 , 8 ] J = [ 6 , 8 , 12 , 18 , 4 , 7 , 10 , 5 , 12 , 3 , 4 , 22 , 2 , 3 , 7 , 3 , 16 , 0 , 1 , 2 , 3 , 0 , 1 , 0 , 1 , 2 , 0 , 2 , 0 , 2 , 2 , 2 ] n = [ 0.529944062966028e-2 , - 0.170099690234461 , 0.111323814312927e2 , - 0.217898123145125e4 , - 0.506061827980875e-3 , 0.556495239685324 , - 0.943672726094016e1 , - 0.297856807561527 , 0.939353943717186e2 , 0.192944939465981e-1 , 0.421740664704763 , - 0.368914126282330e7 , - 0.737566847600639e-2 , - 0.354753242424366 , - 0.199768169338727e1 , 0.115456297059049e1 , 0.568366875815960e4 , 0.808169540124668e-2 , 0.172416341519307 , 0.104270175292927e1 , - 0.297691372792847 , 0.560394465163593 , 0.275234661176914 , - 0.148347894866012 , - 0.651142513478515e-1 , - 0.292468715386302e1 , 0.664876096952665e-1 , 0.352335014263844e1 , - 0.146340792313332e-1 , - 0.224503486668184e1 , 0.110533464706142e1 , - 0.408757344495612e-1 ] Pr = P / 100 nu = h / 2100 suma = 0 for i , j , ni in zip ( I , J , n ) : suma += ni * ( Pr + 0.128 ) ** i * ( nu - 0.727 ) ** j return 0.0028 * suma
Backward equation for region 3a, v=f(P,h)

    Parameters
    ----------
    P : float
        Pressure, [MPa]
    h : float
        Specific enthalpy, [kJ/kg]

    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 4

    Returns
    -------
    v : float
        Specific volume, [m³/kg]

    Examples
    --------
    >>> _Backward3a_v_Ph(20,1700)
    0.001749903962
    >>> _Backward3a_v_Ph(100,2100)
    0.001676229776