Example #1
0
    def compute_t_visco(self, PD_deck, PD_problem, y):
        w = PD_deck.Influence_Function
        M = PD_problem.compute_m(PD_deck.Num_Nodes, y)

        t_visco = np.zeros((int(PD_deck.Num_Nodes), int(PD_deck.Num_Nodes)))
        for x_i in range(0, len(PD_problem.x)):
            index_x_family = PD_problem.get_index_x_family(PD_problem.x, x_i)
            for x_p in index_x_family:
                for k in range(1, len(self.Relaxation_Time)):
                    t_visco[x_i,
                            x_p] = t_visco[x_i,
                                           x_p] + (w / PD_problem.weighted_function(PD_deck,
                                                                                    PD_problem.x,
                                                                                    x_i)) * self.Modulus[k] * (self.e[x_i,
                                                                                                                      x_p] - self.e_visco[x_i,
                                                                                                                                          x_p,
                                                                                                                                          k])
        self.t_visco = t_visco
Example #2
0
    def compute_T(self, PD_deck, PD_problem, y):
        w = PD_deck.Influence_Function
        M = PD_problem.compute_m(PD_deck.Num_Nodes, y)

        tscal = np.zeros((int(PD_deck.Num_Nodes), int(PD_deck.Num_Nodes)))
        for x_i in range(0, self.len_x):
            index_x_family = PD_problem.get_index_x_family(PD_problem.x, x_i)
            for x_p in index_x_family:
                tscal[x_i,
                      x_p] = (w / PD_problem.weighted_function(PD_deck,
                                                               PD_problem.x,
                                                               x_i)) * self.Modulus[0] * self.e[x_i,
                                                                                                x_p] + self.t_visco[x_i,
                                                                                                                    x_p]
        self.tscal = tscal

        T = np.zeros((int(PD_deck.Num_Nodes), int(PD_deck.Num_Nodes)))
        for x_i in range(0, self.len_x):
            index_x_family = PD_problem.get_index_x_family(PD_problem.x, x_i)
            for x_p in index_x_family:
                T[x_i, x_p] = tscal[x_i, x_p] * M[x_i, x_p]
        self.T = T