本文整理汇总了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)
示例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)