本文整理汇总了Python中pyNastran.bdf.bdf.BDF.add_cpenta方法的典型用法代码示例。如果您正苦于以下问题:Python BDF.add_cpenta方法的具体用法?Python BDF.add_cpenta怎么用?Python BDF.add_cpenta使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pyNastran.bdf.bdf.BDF
的用法示例。
在下文中一共展示了BDF.add_cpenta方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_cpenta_01
# 需要导入模块: from pyNastran.bdf.bdf import BDF [as 别名]
# 或者: from pyNastran.bdf.bdf.BDF import add_cpenta [as 别名]
def test_cpenta_01(self):
"""tests a cpenta15"""
lines = [
'CPENTA,85,22,201,202,203,205,206,207,+PN2',
'+PN2,209,210,217, , , ,213,214,',
',218'
]
bdf = BDF(debug=False)
card = bdf.process_card(lines)
card = BDFCard(card)
solid = CPENTA15.add_card(card, comment='cpenta15')
solid.write_card(size=8, is_double=False)
solid.write_card(size=16, is_double=False)
solid.raw_fields()
node_ids = solid.node_ids
assert node_ids == [201, 202, 203, 205, 206, 207,
209, 210, 217, None, None, None, 213, 214, 218], node_ids
nids = [201, 202, 203, 205, 206, 207,
209, 210, 217, None, None, None, 213, 214, 218]
CPENTA.add_card(card, comment='spike')
eid = 85
pid = 22
bdf.add_cpenta(eid, pid, nids, comment='spike')
示例2: test_solids_cpenta
# 需要导入模块: from pyNastran.bdf.bdf import BDF [as 别名]
# 或者: from pyNastran.bdf.bdf.BDF import add_cpenta [as 别名]
def test_solids_cpenta(self):
"""tests a CPENTA6"""
model = BDF(debug=False)
eid = 10
pid = 20
mid = 30
E = 3.e7
G = None
nu = 0.3
model.add_grid(21, xyz=[0., 0., 0.])
model.add_grid(22, xyz=[1., 0., 0.])
model.add_grid(23, xyz=[1., 1., 0.])
model.add_grid(24, xyz=[0., 0., 2.])
model.add_grid(25, xyz=[1., 0., 2.])
model.add_grid(26, xyz=[1., 1., 2.])
model.add_psolid(pid, mid)
model.add_mat1(mid, E, G, nu)
nids = [21, 22, 23, 24, 25, 26]
model.add_cpenta(eid, pid, nids, comment='cpenta')
model.validate()
model._verify_bdf(xref=False)
model.cross_reference()
model._verify_bdf(xref=True)