コード例 #1
0
ファイル: test_contact.py プロジェクト: zhenhaochu/pyNastran
    def test_contact_3(self):
        """
        tests:
         - BLSEG
         - BCONP -> BFRIC
        """
        model = BDF(debug=False, log=None, mode='msc')
        nodes = [2, 3]
        contact_id = 4
        master = 5
        slave = 6
        sfac = 1.2
        friction_id = 7
        ptype = 8
        cid = 9

        line_id = master
        model.add_blseg(line_id, nodes, comment='blseg_master')

        line_id = slave
        blseg = model.add_blseg(line_id, nodes, comment='blseg_slave')
        bconp = model.add_bconp(contact_id,
                                slave,
                                master,
                                sfac,
                                friction_id,
                                ptype,
                                cid,
                                comment='bconp')
        mu1 = 0.2
        bfric = model.add_bfric(friction_id, mu1, fstiff=None, comment='bfric')
        model.add_grid(2, [0., 0., 0.])
        model.add_grid(3, [0., 0., 0.])
        origin = [0., 0., 0.]
        zaxis = [0., 0., 1]
        xzplane = [1., 0., 0.]
        model.add_cord2r(9,
                         origin,
                         zaxis,
                         xzplane,
                         rid=0,
                         setup=True,
                         comment='')
        blseg.raw_fields()
        bconp.raw_fields()
        save_load_deck(model)