Ejemplo n.º 1
0
 def compute_b(self, PD_deck):
     # Build  matrix b[row = node, column = time]
     b = np.zeros((int(PD_deck.Num_Nodes), int(PD_deck.Num_TimeStep)))
     PD_deck.get_parameters_loading_ramp()
     if PD_deck.Loading_Flag == "RAMP":
         for x_i in range(len(self.x) -
                          PD_deck.Horizon_Factor, len(self.x)):
             for t_n in range(1, int(PD_deck.Num_TimeStep)):
                 b[x_i, t_n] = self.ramp_loading(PD_deck, t_n)
     else:
         logger.error(
             "There is a problem with the Boundary Conditions in your XML deck.")
     # print b
     self.b = b
Ejemplo n.º 2
0
 def compute_u_load(self, PD_deck):
     # We only update the nodes we actually pull (Horizon_Factor)
     displ_load = np.zeros(
         (int(
             PD_deck.Horizon_Factor), int(
             PD_deck.Num_TimeStep)))
     PD_deck.get_parameters_linear_displacement()
     for x_i in range(0, PD_deck.Horizon_Factor):
         for t_n in range(0, int(PD_deck.Num_TimeStep)):
             
             displ_load[
                 x_i, t_n] = self.linear_displacement_loading(
                 PD_deck, t_n)
     self.displ_load = displ_load
Ejemplo n.º 3
0
 def strain_energy_bond_based(self, PD_deck):
     energy = np.zeros((int(PD_deck.Num_Nodes), int(PD_deck.Num_TimeStep)))
     for t_n in range(0, PD_deck.Num_TimeStep):
         for x_i in range(0, PD_deck.Num_Nodes):
             index_x_family = self.get_index_x_family(x_i)
             modulus = PD_deck.get_elastic_material_properties()
             for x_p in index_x_family:
                 #Silling-Askari2005, Eq17
                 stretch = (abs(self.u[x_p, t_n] - self.u[x_i, t_n]) - abs(
                     self.x[x_p] - self.x[x_i])) / abs(self.x[x_p] - self.x[x_i])
                 #Silling-Askari2005, Eq22
                 energy[x_i, t_n] = (
                     math.pi * modulus * math.pow(stretch, 2) * math.pow(self.Horizon, 4)) / 4.
     self.strain_energy = energy