Beispiel #1
0
    def _read_pshell(self, data, n):
        """
        PSHELL(2302,23,283) - the marker for Record 51
        """
        ntotal = 44  # 11*4
        s = Struct(b(self._endian + 'iififi4fi'))
        nproperties = (len(data) - n) // ntotal
        for i in range(nproperties):
            edata = data[n:n + 44]
            out = s.unpack(edata)
            (pid, mid1, t, mid2, bk, mid3, ts, nsm, z1, z2, mid4) = out
            if self.is_debug_file:
                self.binary_debug.write('  PSHELL=%s\n' % str(out))
            prop = PSHELL.add_op2_data(out)

            if max(pid, mid1, mid2, mid3, mid4) > 1e8:
                #print("PSHELL = ",out)
                self.big_properties[pid] = prop
            else:
                self._add_op2_property(prop)
            n += ntotal
        self.card_count['PSHELL'] = nproperties
        return n
    def _read_pshell(self, data, n):
        """
        PSHELL(2302,23,283) - the marker for Record 51
        """
        ntotal = 44  # 11*4
        s = Struct(b(self._endian + 'iififi4fi'))
        nproperties = (len(data) - n) // ntotal
        for i in range(nproperties):
            edata = data[n:n+44]
            out = s.unpack(edata)
            (pid, mid1, t, mid2, bk, mid3, ts, nsm, z1, z2, mid4) = out
            if self.is_debug_file:
                self.binary_debug.write('  PSHELL=%s\n' % str(out))
            prop = PSHELL.add_op2_data(out)

            if max(pid, mid1, mid2, mid3, mid4) > 1e8:
                #print("PSHELL = ",out)
                self.bigProperties[pid] = prop
            else:
                self._add_op2_property(prop)
            n += ntotal
        self.card_count['PSHELL'] = nproperties
        return n
Beispiel #3
0
 def add_pshell(self, card, comment):
     card = PSHELL(card, comment=comment)
     self.pshell[card.property_id] = card
Beispiel #4
0
 def create_plate(cls, p1, p2, p3, p4, nspan, nchord, pid, thick, mat):
     shell = PSHELL(pid, mat.mid, thick, mat.mid)
     plate = IsotropicPlate(p1, p2, p3, p4, nspan, nchord, shell, mat)
     plate.generate_mesh()
     return plate