Beispiel #1
0
    def __init__(self, physics='transport'):
        self.physics = physics

        self.discr = Upwind(self.physics)
        self.discr_ndof = self.discr.ndof
        self.coupling_conditions = UpwindCoupling(self.discr)

        self.solver = Coupler(self.discr, self.coupling_conditions)
Beispiel #2
0
    def __init__(self, physics='flow'):
        self.physics = physics

        self.discr = Mpfa(self.physics)
        self.discr_ndof = self.discr.ndof
        self.coupling_conditions = TpfaCoupling(self.discr)

        self.solver = Coupler(self.discr, self.coupling_conditions)
Beispiel #3
0
    def __init__(self, physics="flow"):
        self.physics = physics

        self.discr = P1(self.physics)
        self.discr_ndof = self.discr.ndof
        self.coupling_conditions = P1Coupling(self.discr)

        self.solver = Coupler(self.discr, self.coupling_conditions)
Beispiel #4
0
    def __init__(self, physics="flow", coupling=None):
        self.physics = physics

        self.discr = DualSource(self.physics)
        self.discr_ndof = self.discr.ndof
        self.coupling_conditions = coupling

        self.solver = Coupler(self.discr, self.coupling_conditions)
        SolverMixedDim.__init__(self)
Beispiel #5
0
    def __init__(self, physics='flow'):
        self.physics = physics

        self.discr = Integral(self.physics)
        self.discr_ndof = self.discr.ndof
        self.coupling_conditions = None

        self.solver = Coupler(self.discr)
        SolverMixedDim.__init__(self)
Beispiel #6
0
    def __init__(self, physics="flow"):
        self.physics = physics

        self.discr = P1Source(self.physics)
        self.discr_ndof = self.discr.ndof
        self.coupling_conditions = None

        self.solver = Coupler(self.discr)
        SolverMixedDim.__init__(self)
Beispiel #7
0
    def __init__(self, physics='flow'):
        self.physics = physics
        self.discr = tpfa.Tpfa(self.physics)
        self.discr_ndof = self.discr.ndof
        self.coupling_conditions = tpfa.TpfaCoupling(self.discr)
        tp = tpfa.Tpfa(self.physics)
        mp = mpfa.Mpfa(self.physics)

        def discr_fct(g, d): return mp.matrix_rhs(g, d) if g.dim < 3 \
            else tp.matrix_rhs(g, d)
        kwargs = {'discr_fct': discr_fct}
        self.solver = Coupler(self.discr, self.coupling_conditions, **kwargs)
Beispiel #8
0
    def __init__(self, dim_max, physics='flow'):
        # NOTE: There is no flow along the intersections of the fractures.

        self.physics = physics
        self.dim_max = dim_max

        self.discr = Tpfa(self.physics)
        self.coupling_conditions = TpfaCouplingDFN(self.discr)

        kwargs = {"discr_ndof": self.discr.ndof,
                  "discr_fct": self.__matrix_rhs__}
        self.solver = Coupler(coupling = self.coupling_conditions, **kwargs)
        SolverMixedDim.__init__(self)
Beispiel #9
0
    def time_disc(self):
        """
        Returns the time discretization.
        """
        class TimeDisc(mass_matrix.MassMatrix):
            def __init__(self, deltaT):
                self.deltaT = deltaT

            def matrix_rhs(self, g, data):
                lhs, rhs = mass_matrix.MassMatrix.matrix_rhs(self, g, data)
                return lhs * data['compressibility'], rhs * data[
                    'compressibility']

        time_discretization = TimeDisc(self.time_step())
        if self.is_GridBucket:
            time_discretization = Coupler(time_discretization)
        return time_discretization
Beispiel #10
0
    def __init__(self, dim_max, physics='flow'):
        # NOTE: There is no flow along the intersections of the fractures.
        # In this case a mixed solver is considered. We assume only two
        # (contiguous) dimensions active. In the higher dimensional grid the
        # physical problem is discretise with a vem solver and in the lower
        # dimensional grid Lagrange multiplier are used to "glue" the velocity
        # dof at the interface between the fractures.
        # For this reason the matrix_rhs and ndof need to be carefully taking
        # care.

        self.physics = physics
        self.dim_max = dim_max

        self.discr = DualSource(self.physics)
        self.coupling_conditions = None

        kwargs = {"discr_ndof": self.__ndof__,
                  "discr_fct": self.__matrix_rhs__}
        self.solver = Coupler(coupling = None, **kwargs)
        SolverMixedDim.__init__(self)
Beispiel #11
0
    def __init__(self, physics='flow'):
        self.physics = physics

        self.discr = InvMassMatrix(self.physics)

        self.solver = Coupler(self.discr)
Beispiel #12
0
    def __init__(self, physics="flow"):
        self.physics = physics

        self.discr = P1MassMatrix(self.physics)

        self.solver = Coupler(self.discr)
Beispiel #13
0
 def outflow(self, gb):
     def bind(g, d):
         return self.discr.outflow(g, d), np.zeros(g.num_cells)
     return Coupler(self.discr, solver_fct=bind).matrix_rhs(gb)[0]