Ejemplo n.º 1
0
 def input_node_loads(self):
     table = self.get_table("node_loads")
     dirns = ["FX", "FY", "FZ"]
     for ix, row in table.iterrows():
         n = self.get_node(row.NODEID)
         if row.DIRN not in dirns:
             raise ValueError(
                 "Invalid node load direction: {} for load {}, node {}; must be one of '{}'".format(
                     row.DIRN, row.LOAD, row.NODEID, ", ".join(dirns)
                 )
             )
         if row.DIRN in n.constraints:
             raise ValueError("Constrained node {} {} must not have load applied.".format(row.NODEID, row.DIRN))
         l = makeNodeLoad({row.DIRN: row.F})
         self.nodeloads.append(row.LOAD, n, l)
     self.rawdata.node_loads = table
Ejemplo n.º 2
0
 def input_support_displacements(self):
     table = self.get_table("support_displacements", optional=True)
     forns = {"DX": "FX", "DY": "FY", "RZ": "MZ"}
     for ix, row in table.iterrows():
         n = self.get_node(row.NODEID)
         if row.DIRN not in forns:
             raise ValueError(
                 "Invalid support displacements direction: {} for load {}, node {}; must be one of '{}'".format(
                     row.DIRN, row.LOAD, row.NODEID, ", ".join(forns.keys())
                 )
             )
         fd = forns[row.DIRN]
         if fd not in n.constraints:
             raise ValueError(
                 "Support displacement, load: '{}'  node: '{}'  dirn: '{}' must be for a constrained node.".format(
                     row.LOAD, row.NODEID, row.DIRN
                 )
             )
         l = makeNodeLoad({fd: row.DELTA})
         self.nodedeltas.append(row.LOAD, n, l)
     self.rawdata.support_displacements = table