本文整理汇总了Python中pyNastran.bdf.bdf.BDF.add_psolid方法的典型用法代码示例。如果您正苦于以下问题:Python BDF.add_psolid方法的具体用法?Python BDF.add_psolid怎么用?Python BDF.add_psolid使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pyNastran.bdf.bdf.BDF
的用法示例。
在下文中一共展示了BDF.add_psolid方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_solids_chexa
# 需要导入模块: from pyNastran.bdf.bdf import BDF [as 别名]
# 或者: from pyNastran.bdf.bdf.BDF import add_psolid [as 别名]
def test_solids_chexa(self):
"""tests a CHEXA8"""
model = BDF(debug=False)
eid = 10
pid = 20
mid = 30
E = 3.e7
G = None
nu = 0.3
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(14, xyz=[0., 1., 0.])
model.add_grid(15, xyz=[0., 0., 2.])
model.add_grid(16, xyz=[1., 0., 2.])
model.add_grid(17, xyz=[1., 1., 2.])
model.add_grid(18, xyz=[0., 1., 2.])
model.add_psolid(pid, mid)
model.add_mat1(mid, E, G, nu)
nids = [11, 12, 13, 14, 15, 16, 17, 18]
elem = model.add_chexa(eid, pid, nids, comment='chexa')
elem.write_card(size=8)
elem.write_card(size=16)
model.validate()
model._verify_bdf(xref=False)
model.cross_reference()
model._verify_bdf(xref=True)
示例2: test_solids_ctetra10
# 需要导入模块: from pyNastran.bdf.bdf import BDF [as 别名]
# 或者: from pyNastran.bdf.bdf.BDF import add_psolid [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)
示例3: test_solids_ctetra4
# 需要导入模块: from pyNastran.bdf.bdf import BDF [as 别名]
# 或者: from pyNastran.bdf.bdf.BDF import add_psolid [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)
示例4: test_solids_cpyram5
# 需要导入模块: from pyNastran.bdf.bdf import BDF [as 别名]
# 或者: from pyNastran.bdf.bdf.BDF import add_psolid [as 别名]
def test_solids_cpyram5(self):
"""tests a CPYRAM5"""
model = BDF(debug=False)
eid = 10
pid = 20
mid = 30
E = 3.e7
G = None
nu = 0.3
model.add_grid(10, xyz=[0., 0., 0.])
model.add_grid(20, xyz=[1., 0., 0.])
model.add_grid(30, xyz=[1., 1., 0.])
model.add_grid(40, xyz=[0., 0., 2.])
model.add_grid(50, xyz=[1., 1., 2.])
model.add_psolid(pid, mid)
model.add_mat1(mid, E, G, nu)
nids = [10, 20, 30, 40, 50]
model.add_cpyram(eid, pid, nids, comment='cpenta')
model.validate()
model._verify_bdf(xref=False)
model.cross_reference()
model._verify_bdf(xref=True)
示例5: test_solids_cpenta
# 需要导入模块: from pyNastran.bdf.bdf import BDF [as 别名]
# 或者: from pyNastran.bdf.bdf.BDF import add_psolid [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)
示例6: test_trax
# 需要导入模块: from pyNastran.bdf.bdf import BDF [as 别名]
# 或者: from pyNastran.bdf.bdf.BDF import add_psolid [as 别名]
def test_trax(self):
"""tests a CTRAX3/CTRAX6/???"""
model = BDF(debug=False)
model.add_grid(1, xyz=[0., 0., 0.])
model.add_grid(2, xyz=[1., 0., 0.])
model.add_grid(3, xyz=[1., 1., 0.])
model.add_grid(4, xyz=[0., 1., 0.])
model.add_grid(5, xyz=[.5, 0., 0.])
model.add_grid(6, xyz=[1., 0.5, 0.])
model.add_grid(7, xyz=[.5, 1., 0.])
model.add_grid(8, xyz=[0., .5, 0.])
model.add_grid(9, xyz=[.5, .5, 0.])
mid1 = 1
E = 30.e7
G = None
nu = 0.3
model.add_mat1(mid1, E, G, nu, rho=0.1)
#model.add_mat1(2, E, G, nu, rho=0.1)
#model.add_mat1(3, E, G, nu, rho=0.1)
pid = 1
nids = [1, 2, 3]
ctrax3 = model.add_ctrax3(1, pid, nids, theta=0., comment='ctrax3')
#model.add_pshell(pid, mid1=2, t=0.1)
psolid = model.add_psolid(pid, mid1, cordm=0, integ=None, stress=None,
isop=None, fctn='SMECH', comment='psolid')
pid = 2
nids = [1, 2, 3, 5, 6, 9]
ctrax6 = model.add_ctrax6(2, pid, nids, theta=0., comment='ctrax6')
plsolid = model.add_plsolid(pid, mid1, stress_strain='GRID', ge=0.,
comment='plsolid')
#assert pcomp.Thickness() == sum(thicknesses), thicknesses
#pcomp.lam = 'SYM'
#assert pcomp.Thickness() == sum(thicknesses)*2, thicknesses
model.validate()
ctrax6.raw_fields()
ctrax6.write_card(size=8)
psolid.raw_fields()
psolid.write_card(size=8)
#psolid.write_card(size=16)
#psolid.write_card(size=16, is_double=True)
plsolid.raw_fields()
plsolid.write_card(size=8)
#plsolid.write_card(size=16)
#plsolid.write_card(size=16, is_double=True)
model._verify_bdf(xref=False)
#--------------------------------
model.cross_reference()
model._verify_bdf(xref=True)
ctrax3.raw_fields()
ctrax3.write_card(size=8)
ctrax6.raw_fields()
ctrax6.write_card(size=8)