docs: def orifice_expansibility(D, Do, P1, P2, k):
      r'''Calculates the expansibility factor for orifice plate calculations
      based on the geometry of the plate, measured pressures of the orifice, and
      the isentropic exponent of the fluid.
      
      .. math::
          \epsilon = 1 - (0.351 + 0.256\beta^4 + 0.93\beta^8)
          \left[1-\left(\frac{P_2}{P_1}\right)^{1/\kappa}\right]
          
      Parameters
      ----------
      D : float
          Upstream internal pipe diameter, [m]
      Do : float
          Diameter of orifice at flow conditions, [m]
      P1 : float
          Static pressure of fluid upstream of orifice at the cross-section of
          the pressure tap, [Pa]
      P2 : float
          Static pressure of fluid downstream of orifice at the cross-section of
          the pressure tap, [Pa]
      k : float
          Isentropic exponent of fluid, [-]
  
      Returns
      -------
      expansibility : float, optional
          Expansibility factor (1 for incompressible fluids, less than 1 for
          real fluids), [-]
  
      Notes
      -----
      This formula was determined for the range of P2/P1 >= 0.80, and for fluids
      of air, steam, and natural gas. However, there is no objection to using
      it for other fluids.
  
      Examples
      --------
      >>> orifice_expansibility(D=0.0739, Do=0.0222, P1=1E5, P2=9.9E4, k=1.4)
      0.9974739057343425
  
      References
      ----------
      .. [1] American Society of Mechanical Engineers. Mfc-3M-2004 Measurement 
         Of Fluid Flow In Pipes Using Orifice, Nozzle, And Venturi. ASME, 2001.
      .. [2] ISO 5167-2:2003 - Measurement of Fluid Flow by Means of Pressure 
         Differential Devices Inserted in Circular Cross-Section Conduits Running
         Full -- Part 2: Orifice Plates.
      '''
      beta = Do/D
      beta2 = beta*beta
      beta4 = beta2*beta2
      return (1.0 - (0.351 + 0.256*beta4 + 0.93*beta4*beta4)*(
              1.0 - (P2/P1)**(1./k)))