docs: def size_tee(Q1, Q2, D, D2, n=1, pipe_diameters=5):
      r'''Calculates CoV of an optimal or specified tee for mixing at a tee
      according to [1]_. Assumes turbulent flow.
      The smaller stream in injected into the main pipe, which continues
      straight.
      COV calculation is according to [2]_.
  
      .. math::
          TODO
  
      Parameters
      ----------
      Q1 : float
          Volumetric flow rate of larger stream [m^3/s]
      Q2 : float
          Volumetric flow rate of smaller stream [m^3/s]
      D : float
          Diameter of pipe after tee [m]
      D2 : float
          Diameter of mixing inlet, optional (optimally calculated if not
          specified) [m]
      n : float
          Number of jets, 1 to 4 []
      pipe_diameters : float
          Number of diameters along tail pipe for CoV calculation, 0 to 5 []
  
      Returns
      -------
      CoV : float
          Standard deviation of dimensionless concentration [-]
  
      Notes
      -----
      Not specified if this works for liquid also, though probably not.
      Example is from example Example 9-6 in [1]_. Low precision used in example.
  
      Examples
      --------
      >>> size_tee(Q1=11.7, Q2=2.74, D=0.762, D2=None, n=1, pipe_diameters=5)
      0.2940930233038544
  
      References
      ----------
      .. [1] Paul, Edward L, Victor A Atiemo-Obeng, and Suzanne M Kresta.
         Handbook of Industrial Mixing: Science and Practice.
         Hoboken, N.J.: Wiley-Interscience, 2004.
      .. [2] Giorges, Aklilu T. G., Larry J. Forney, and Xiaodong Wang.
         "Numerical Study of Multi-Jet Mixing." Chemical Engineering Research and
         Design, Fluid Flow, 79, no. 5 (July 2001): 515-22.
         doi:10.1205/02638760152424280.
      '''
      V1 = Q1/(pi/4*D**2)
      Cv = Q2/(Q1 + Q2)
      COV0 = ((1-Cv)/Cv)**0.5
      if not D2:
          D2 = (Q2/Q1)**(2/3.)*D
      V2 = Q2/(pi/4*D2**2)
      B = n**2*(D2/D)**2*(V2/V1)**2
      if not n == 1 and not n == 2 and not n == 3 and not n ==4:
          raise Exception('Only 1 or 4 side streams investigated')
      if n == 1:
          if B < 0.7:
              E = 1.33
          else:
              E = 1/33. + 0.95*log(B/0.7)
      elif n == 2:
          if B < 0.8:
              E = 1.44
          else:
              E = 1.44 + 0.95*log(B/0.8)**1.5
      elif n == 3:
          if B < 0.8:
              E = 1.75
          else:
              E = 1.75 + 0.95*log(B/0.8)**1.8
      else:
          if B < 2:
              E = 1.97
          else:
              E = 1.97 + 0.95*log(B/2.)**2
      COV = (0.32/B**0.86*(pipe_diameters)**-E )**0.5
      return COV