Ejemplo n.º 1
0
    def test_transmissibility_mpfa_no_micro_fractures(self):
        g = create_grids.cart_2d()
        discr = Mpfa_DFM()
        internal_nodes = [4, 7]
        macro_bc = pp.BoundaryCondition(g)
        for reg in discr._interaction_regions(g):
            # consider only the internal nodes
            if np.all(np.isin(reg.reg_ind, internal_nodes)):
                local_gb = LocalGridBucketSet(g.dim, reg)
                local_gb.construct_local_buckets()

                basis_functions, cc_assembler, cc_bc_values = lp.cell_basis_functions(
                    reg, local_gb, discr, {"bc": macro_bc})

                _, _, trm = lp.compute_transmissibilies(
                    reg,
                    local_gb,
                    basis_functions,
                    cc_assembler,
                    cc_bc_values,
                    g,
                    discr,
                    {"bc": macro_bc},
                )

                # @Eirik not sure the value here
                # EK: Me neither.
                # self.assertTrue(np.allclose(np.abs(trm), 1))
                self.assertTrue(np.allclose(np.sum(trm), 0))
Ejemplo n.º 2
0
 def test_partition_unity_mpfa_multiple_boundary_intersecting_local_micro_fracture(
     self, ):
     g = create_grids.cart_2d()
     pts = np.array([[0.7, 0.9, 0.6, 1.6], [0.475, 1.4, 0.8, 0.8]])
     edges = np.array([[0, 2], [1, 3]])
     internal_nodes = [4]
     self._check_partition_unity(g, internal_nodes, Mpfa_DFM(), pts, edges)
Ejemplo n.º 3
0
 def test_partition_unity_mpfa_multiple_intersecting_local_micro_fractures(
         self):
     g = create_grids.cart_2d()
     pts = np.array([[0.6, 1.2, 0.6, 1.2], [0.6, 0.8, 1.2, 0.6]])
     edges = np.array([[0, 2], [1, 3]])
     internal_nodes = [4]
     self._check_partition_unity(g, internal_nodes, Mpfa_DFM(), pts, edges)
Ejemplo n.º 4
0
 def test_partition_unity_mpfa_single_local_micro_fracture(self):
     g = create_grids.cart_2d()
     pts = np.array([[0.6, 1.4], [0.6, 1.1]])
     edges = np.array([[0], [1]])
     internal_nodes = [4]
     self._check_partition_unity(g, internal_nodes, Mpfa_DFM(), pts, edges)
Ejemplo n.º 5
0
 def test_partition_unit_mpfa_no_micro_fractures(self):
     g = create_grids.cart_2d()
     internal_nodes = [4, 7]
     self._check_partition_unity(g, internal_nodes, Mpfa_DFM())