

def _calc_eff_prop(self, check_health=False):
    '\n        This returns the main parameters for calculating the effective\n        property in a linear transport equation.\n        It also checks for the proper boundary conditions, inlets and outlets.\n\n        Parameters\n        ----------\n        check_health : boolean(optional)\n            It analyzes the inlet and outlet pores to check their spatial\n            positions\n        '
    try:
        self[D._quantity]
    except KeyError:
        raise Exception(('The algorithm has not been run yet. Cannot ' + 'calculate effective property.'))
    Ps = self.pores('pore.Dirichlet')
    BCs = sp.unique(self['pore.bcval_Dirichlet'][Ps])
    if (sp.shape(BCs)[0] != 2):
        raise Exception(('The supplied algorithm did not have appropriate' + ' BCs'))
    inlets = sp.where((self[('pore.' + 'bcval_Dirichlet')] == sp.amax(BCs)))[0]
    outlets = sp.where((self[('pore.' + 'bcval_Dirichlet')] == sp.amin(BCs)))[0]
    if check_health:
        if (self._net.iscoplanar(inlets) is False):
            raise Exception(('The inlet pores do not define a plane. ' + 'Effective property will be approximation'))
        if (self._net.iscoplanar(outlets) is False):
            raise Exception(('The outlet pores do not define a plane. ' + 'Effective property will be approximation'))
        PnI = self._net.find_neighbor_pores(pores=inlets, mode='not_intersection', excl_self=True)
        if (sp.shape(PnI) != sp.shape(inlets)):
            logger.warning(('The inlet pores have too many neighbors. ' + 'Internal pores appear to be selected.'))
            pass
        PnO = self._net.find_neighbor_pores(pores=outlets, mode='not_intersection', excl_self=True)
        if (sp.shape(PnO) != sp.shape(outlets)):
            logger.warning(('The outlet pores have too many neighbors. ' + 'Internal pores appear to be selected.'))
            pass
    if ('pore.vert_index' in self._net.props()):
        A = vo.vertex_dimension(network=self._net, face1=inlets, parm='area')
        L = vo.vertex_dimension(network=self._net, face1=inlets, face2=outlets, parm='length')
    else:
        A = self._net.domain_area(face=inlets)
        L = self._net.domain_length(face_1=inlets, face_2=outlets)
    flow = self.rate(pores=inlets)
    D = (((sp.sum(flow) * L) / A) / (BCs[0] - BCs[1]))
    return D

dataset/ETHPy150Open PMEAL/OpenPNM/OpenPNM/Algorithms/__GenericLinearTransport__.py GenericLinearTransport._calc_eff_prop/VarMisuse@22/148 `self`->`D`