docs: def V_vertical_spherical(D, a, h):
      r'''Calculates volume of a vertical tank with a convex spherical bottom,
      according to [1]_. No provision for the top of the tank is made here.
  
      .. math::
          V_f = \frac{\pi h^2}{4}\left(2a + \frac{D^2}{2a} - \frac{4h}{3}\right),\; h < a
  
      .. math::
          V_f = \frac{\pi}{4}\left(\frac{2a^3}{3} - \frac{aD^2}{2} + hD^2\right),\; h\ge a
  
      Parameters
      ----------
      D : float
          Diameter of the main cylindrical section, [m]
      a : float
          Distance the spherical head extends under the main cylinder, [m]
      h : float
          Height, as measured up to where the fluid ends, [m]
  
      Returns
      -------
      V : float
          Volume [m^3]
  
      Examples
      --------
      Matching example from [1]_, with inputs in inches and volume in gallons.
  
      >>> V_vertical_spherical(132., 33., 24)/231.
      583.6018352850442
  
      References
      ----------
      .. [1] Jones, D. "Calculating Tank Volume." Text. Accessed December 22, 2015.
         http://www.webcalc.com.br/blog/Tank_Volume.PDF'''
      if h < a:
          Vf = pi*h**2/4*(2*a + D**2/2/a - 4*h/3)
      else:
          Vf = pi/4*(2*a**3/3 - a*D**2/2 + h*D**2)
      return Vf