docs: def contraction_round(Di1, Di2, rc, method='Rennels'):
      r'''Returns loss coefficient for any any round edged pipe contraction.
      This calculation has three methods available. The 'Miller' [2]_ method is a 
      bivariate spline digitization of a graph; the 'Idelchik' [3]_ method is an
      interpolation using a formula and a table of values.
  
      The most conservative formulation is that of Rennels; with fairly similar.
      The 'Idelchik' method is more conservative and less complex; it offers a
      straight-line curve where the others curves are curved.
      
      The Rennels [1]_ formulas are:
          
      .. math::
          K = 0.0696\left(1 - 0.569\frac{r}{d_2}\right)\left(1-\sqrt{\frac{r}
          {d_2}}\beta\right)(1-\beta^5)\lambda^2 + (\lambda-1)^2
  
      .. math::
          \lambda = 1 + 0.622\left(1 - 0.30\sqrt{\frac{r}{d_2}}
          - 0.70\frac{r}{d_2}\right)^4 (1-0.215\beta^2-0.785\beta^5)
  
      .. math::
          \beta = d_2/d_1
  
      .. figure:: fittings/contraction_round.png
         :scale: 30 %
         :alt: Cirucular round contraction; after [1]_
  
      Parameters
      ----------
      Di1 : float
          Inside diameter of original pipe, [m]
      Di2 : float
          Inside diameter of following pipe, [m]
      rc : float
          Radius of curvature of the contraction, [m]
      method : str
          The calculation method to use; one of 'Rennels', 'Miller', or 
          'Idelchik', [-]
  
      Returns
      -------
      K : float
          Loss coefficient in terms of the following pipe [-]
  
      Notes
      -----
      Rounding radius larger than 0.14Di2 prevents flow separation from the wall.
      Further increase in rounding radius continues to reduce loss coefficient.
      
      .. plot:: plots/contraction_round.py
  
      Examples
      --------
      >>> contraction_round(Di1=1, Di2=0.4, rc=0.04)
      0.1783332490866574
  
      References
      ----------
      .. [1] Rennels, Donald C., and Hobart M. Hudson. Pipe Flow: A Practical
         and Comprehensive Guide. 1st edition. Hoboken, N.J: Wiley, 2012.
      .. [2] Miller, Donald S. Internal Flow Systems: Design and Performance
         Prediction. Gulf Publishing Company, 1990.
      .. [3] Idel’chik, I. E. Handbook of Hydraulic Resistance: Coefficients of 
         Local Resistance and of Friction (Spravochnik Po Gidravlicheskim 
         Soprotivleniyam, Koeffitsienty Mestnykh Soprotivlenii i Soprotivleniya
         Treniya). National technical information Service, 1966.
      '''
      beta = Di2/Di1
      if method is None:
          method = 'Rennels'
      if method == 'Rennels':
          lbd = 1.0 + 0.622*(1.0 - 0.30*(rc/Di2)**0.5 - 0.70*rc/Di2)**4*(1.0 - 0.215*beta**2 - 0.785*beta**5)
          return 0.0696*(1.0 - 0.569*rc/Di2)*(1.0 - (rc/Di2)**0.5*beta)*(1.0 - beta**5)*lbd*lbd + (lbd - 1.0)**2
      elif method == 'Miller':
          return contraction_round_Miller(Di1=Di1, Di2=Di2, rc=rc)
      elif method == 'Idelchik':
          # Di2, ratio defined in terms over diameter
          K0 = interp(rc/Di2, contraction_round_Idelchik_ratios, 
                      contraction_round_Idelchik_factors)
          return K0*(1.0 - beta*beta)
      else:
          raise ValueError('Specified method not recognized; methods are %s'
                           %(contraction_round_methods))