docs: def entrance_rounded(Di, rc, method='Rennels'):
      r'''Returns loss coefficient for a rounded entrance to a pipe
      flush with the wall of a reservoir. This calculation has six methods
      available.
      
      The most conservative formulation is that of Rennels; with the Swammee 
      correlation being 0.02-0.07 lower. They were published in 2012 and 2008
      respectively, and for this reason could be regarded as more reliable.
      
      The Idel'chik correlation appears based on the Hamilton data; and the 
      Miller correlation as well, except a little more conservative. The Crane  
      model trends similarly but only has a few points. The Harris data set is 
      the lowest.
      
      The Rennels [1]_ formulas are:
      
      .. math::
          K = 0.0696\left(1 - 0.569\frac{r}{d}\right)\lambda^2 + (\lambda-1)^2
  
      .. math::
          \lambda = 1 + 0.622\left(1 - 0.30\sqrt{\frac{r}{d}}
          - 0.70\frac{r}{d}\right)^4
          
      The Swamee [5]_ formula is:
          
      .. math::
          K = 0.5\left[1 + 36\left(\frac{r}{D}\right)^{1.2}\right]^{-1}
          
      .. figure:: fittings/flush_mounted_rounded_entrance.png
         :scale: 30 %
         :alt: rounded entrace mounted straight and flush; after [1]_
  
      Parameters
      ----------
      Di : float
          Inside diameter of pipe, [m]
      rc : float
          Radius of curvature of the entrance, [m]
      method : str, optional
          One of 'Rennels', 'Crane', 'Miller', 'Idelchik', 'Harris', or 'Swamee'.
  
      Returns
      -------
      K : float
          Loss coefficient [-]
  
      Notes
      -----
      For generously rounded entrance (rc/Di >= 1), the loss coefficient 
      converges to 0.03 in the Rennels method.
      
      The Rennels formulation was derived primarily from data and theoretical 
      analysis from different flow scenarios than a rounded pipe entrance; the  
      only available data in [2]_ is quite old and [1]_ casts doubt on it.
          
      The Hamilton data set is available in [1]_ and [6]_.
      
      .. plot:: plots/entrance_rounded.py
  
      
      Examples
      --------
      Point from Diagram 9.2 in [1]_, which was used to confirm the Rennels
      model implementation:
      
      >>> entrance_rounded(Di=0.1, rc=0.0235)
      0.09839534618360923
  
      References
      ----------
      .. [1] Rennels, Donald C., and Hobart M. Hudson. Pipe Flow: A Practical
         and Comprehensive Guide. 1st edition. Hoboken, N.J: Wiley, 2012.
      .. [2] Hamilton, James Baker. Suppression of Pipe Intake Losses by Various
         Degrees of Rounding. Seattle: Published by the University of Washington, 
         1929. https://search.library.wisc.edu/catalog/999823652202121.
      .. [3] Miller, Donald S. Internal Flow Systems: Design and Performance
         Prediction. Gulf Publishing Company, 1990.
      .. [4] Harris, Charles William. Elimination of Hydraulic Eddy Current Loss 
         at Intake, Agreement of Theory and Experiment. University of Washington,
         1930.
      .. [5] Swamee, Prabhata K., and Ashok K. Sharma. Design of Water Supply 
         Pipe Networks. John Wiley & Sons, 2008.
      .. [6] Crane Co. Flow of Fluids Through Valves, Fittings, and Pipe. Crane,
         2009.
      .. [7] Blevins, Robert D. Applied Fluid Dynamics Handbook. New York, N.Y.: 
         Van Nostrand Reinhold Co., 1984.
      .. [8] 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.
      '''
      if method is None:
          method = 'Rennels'
      if method == 'Rennels':
          if rc/Di > 1.0:
              return 0.03
          lbd = 1.0 + 0.622*(1.0 - 0.30*(rc/Di)**0.5 - 0.70*(rc/Di))**4.0
          return 0.0696*(1.0 - 0.569*rc/Di)*lbd**2.0 + (lbd - 1.0)**2
      elif method == 'Swamee':
          return 0.5/(1.0 + 36.0*(rc/Di)**1.2)
      elif method == 'Crane':
          ratio = rc/Di
          if ratio < 0:
              return 0.5 
          elif ratio > 0.15:
              return 0.04
          else:
              return interp(ratio, entrance_rounded_ratios_Crane,
                            entrance_rounded_Ks_Crane)
      elif method == 'Miller':
          rc_Di = rc/Di
          if rc_Di > 0.3:
              rc_Di = 0.3
          return horner(entrance_rounded_Miller_coeffs, 20.0/3.0*(rc_Di - 0.15))
      elif method == 'Harris':
          ratio = rc/Di
          if ratio > .16:
              return 0.0
          return float(entrance_rounded_Harris(ratio))
      elif method == 'Idelchik':
          ratio = rc/Di
          if ratio > .2:
              return entrance_rounded_Ks_Idelchik[-1]
          return float(entrance_rounded_Idelchik(ratio))
      else:
          raise ValueError('Specified method not recognized; methods are %s'
                           %(entrance_rounded_methods))