docs: def agitator_time_homogeneous(N, P, T, H, mu, rho, D=None, homogeneity=.95):
      r'''Calculates time for a fluid mizing in a tank with an impeller to
      reach a specified level of homogeneity, according to [1]_.
  
      .. math::
          N_p = \frac{Pg}{\rho N^3 D^5}
  
      .. math::
          Re_{imp} = \frac{\rho D^2 N}{\mu}
  
      .. math::
          \text{constant} = N_p^{1/3} Re_{imp}
  
      .. math::
          Fo = 5.2/\text{constant} \text{for turbulent regime}
  
      .. math::
          Fo = (183/\text{constant})^2 \text{for transition regime}
  
      Parameters
      ----------
      N : float:
          Speed of impeller, [revolutions/s]
      P : float
          Actual power required to mix, ignoring mechanical inefficiencies [W]
      T : float
          Tank diameter, [m]
      H : float
          Tank height, [m]
      mu : float
          Mixture viscosity, [Pa*s]
      rho : float
          Mixture density, [kg/m^3]
      D : float, optional
          Impeller diameter [m]
      homogeneity : float, optional
          Fraction completion of mixing, []
  
      Returns
      -------
      t : float
          Time for specified degree of homogeneity [s]
  
      Notes
      -----
      If impeller diameter is not specified, assumed to be 0.5 tank diameters.
  
      The first example is solved forward rather than backwards here. A rather
      different result is obtained, but is accurate.
  
      No check to see if the mixture if laminar is currently implemented.
      This would under predict the required time.
  
      Examples
      --------
      >>> agitator_time_homogeneous(D=36*.0254, N=56/60., P=957., T=1.83, H=1.83, mu=0.018, rho=1020, homogeneity=.995)
      15.143198226374668
  
      >>> agitator_time_homogeneous(D=1, N=125/60., P=298., T=3, H=2.5, mu=.5, rho=980, homogeneity=.95)
      67.7575069865228
  
      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.
      '''
      if not D:
          D = T*0.5
      Np = P*g/rho/N**3/D**5
      Re_imp = rho/mu*D**2*N
      regime_constant = Np**(1/3.)*Re_imp
      if regime_constant >= min_regime_constant_for_turbulent:
          Fo = (5.2/regime_constant)
      else:
          Fo = (183./regime_constant)**2
      time = rho*T**1.5*H**0.5/mu*Fo
      multiplier = adjust_homogeneity(homogeneity)
      return time*multiplier