def get_drainage_data(self):
        r"""
        Obtain the numerical values of the resultant capillary pressure curve.

        Parameters
        ----------
        None

        Returns
        -------
        A dictionary containing arrays of applied capillary pressures and
        various phase saturations.  The dictionary keys explain the content of
        each array.

        Notes
        -----
        This method assumes that the pore and throat volumes are stored under
        the keys 'pore.volume' and 'throat.volume'.  This cannot be customized
        at this time.
        """
        # Infer list of applied capillary pressures
        PcPoints = self._inv_points
        if PcPoints[-1] == sp.inf:  # Remove infinity from PcPoints if present
            PcPoints = PcPoints[:-1]
        # Get pore and throat volumes
        Pvol = self._net[self._pore_volume]
        Tvol = self._net[self._throat_volume]
        Total_vol = sp.sum(Pvol) + sp.sum(Tvol)
        # Find cumulative filled volume at each applied capillary pressure
        Vnwp_t = []
        Vnwp_p = []
        Vnwp_all = []
        for Pc in PcPoints:
            # Calculate filled pore volumes
            p_inv = self['pore.inv_Pc'] <= Pc
            if self._pore_filling is None:
                Vp = sp.sum(Pvol[p_inv])
            else:
                Vp = self._calc_fractional_filling(pressure=Pc,
                                                   element='pore')
                Vp = sp.sum(Vp[p_inv])
            # Calculate filled throat volumes
            t_inv = self['throat.inv_Pc'] <= Pc
            if self._throat_filling is None:
                Vt = sp.sum(Tvol[t_inv])
            else:
                Vt = self._calc_fractional_filling(pressure=Pc,
                                                   element='throat')
                Vt = sp.sum(Vt[t_inv])
            Vnwp_p.append(Vp)
            Vnwp_t.append(Vt)
            Vnwp_all.append(Vp + Vt)
        # Convert volumes to saturations by normalizing with total pore volume
        Snwp_all = [Total_vol/V for V in Vnwp_all]
        data = {}
        data['capillary_pressure'] = PcPoints
        data['invading_phase_saturation'] = Snwp_all
        data['defending_phase_saturation'] = [1-s for s in Snwp_all]
        return data
dataset/ETHPy150Open PMEAL/OpenPNM/OpenPNM/Algorithms/__Drainage__.py/Drainage.get_drainage_data/swapped operands of `/`