当前位置: 首页>>代码示例>>Python>>正文


Python BDF.add_ctetra方法代码示例

本文整理汇总了Python中pyNastran.bdf.bdf.BDF.add_ctetra方法的典型用法代码示例。如果您正苦于以下问题:Python BDF.add_ctetra方法的具体用法?Python BDF.add_ctetra怎么用?Python BDF.add_ctetra使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在pyNastran.bdf.bdf.BDF的用法示例。


在下文中一共展示了BDF.add_ctetra方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: test_solids_ctetra10

# 需要导入模块: from pyNastran.bdf.bdf import BDF [as 别名]
# 或者: from pyNastran.bdf.bdf.BDF import add_ctetra [as 别名]
    def test_solids_ctetra10(self):
        """tests a CTETRA10"""
        eid = 10
        pid = 20
        mid = 30
        E = 3.e7
        G = None
        nu = 0.3
        model = BDF(debug=False)
        g110 = model.add_grid(110, xyz=[0., 0., 0.])
        g120 = model.add_grid(120, xyz=[1., 0., 0.])
        g130 = model.add_grid(130, xyz=[1., 1., 0.])
        g140 = model.add_grid(140, xyz=[0., 2., 0.])

        model.add_grid(111, xyz=g110.xyz+g120.xyz)
        model.add_grid(112, xyz=g120.xyz+g130.xyz)
        model.add_grid(113, xyz=g130.xyz+g110.xyz)

        model.add_grid(121, xyz=g110.xyz+g140.xyz)
        model.add_grid(122, xyz=g120.xyz+g140.xyz)
        model.add_grid(123, xyz=g130.xyz+g140.xyz)

        model.add_psolid(pid, mid)
        model.add_mat1(mid, E, G, nu)
        nids = [
            110, 120, 130, 140,
            111, 112, 113,
            121, 122, 123
        ]
        model.add_ctetra(eid, pid, nids, comment='ctetra')
        model.validate()
        model._verify_bdf(xref=False)
        model.cross_reference()
        model._verify_bdf(xref=True)
开发者ID:saullocastro,项目名称:pyNastran,代码行数:36,代码来源:test_solids.py

示例2: test_solids_ctetra4

# 需要导入模块: from pyNastran.bdf.bdf import BDF [as 别名]
# 或者: from pyNastran.bdf.bdf.BDF import add_ctetra [as 别名]
 def test_solids_ctetra4(self):
     """tests a CTETRA4"""
     eid = 10
     pid = 20
     mid = 30
     E = 3.e7
     G = None
     nu = 0.3
     model = BDF(debug=False)
     model.add_grid(11, xyz=[0., 0., 0.])
     model.add_grid(12, xyz=[1., 0., 0.])
     model.add_grid(13, xyz=[1., 1., 0.])
     model.add_grid(15, xyz=[0., 2., 0.])
     model.add_psolid(pid, mid)
     model.add_mat1(mid, E, G, nu)
     nids = [11, 12, 13, 15]
     model.add_ctetra(eid, pid, nids, comment='ctetra')
     model.validate()
     model._verify_bdf(xref=False)
     model.cross_reference()
     model._verify_bdf(xref=True)
开发者ID:saullocastro,项目名称:pyNastran,代码行数:23,代码来源:test_solids.py


注:本文中的pyNastran.bdf.bdf.BDF.add_ctetra方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。