本文整理汇总了Python中pyNastran.bdf.bdf.BDF.test_deqatn方法的典型用法代码示例。如果您正苦于以下问题:Python BDF.test_deqatn方法的具体用法?Python BDF.test_deqatn怎么用?Python BDF.test_deqatn使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pyNastran.bdf.bdf.BDF
的用法示例。
在下文中一共展示了BDF.test_deqatn方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_deqatn_1b
# 需要导入模块: from pyNastran.bdf.bdf import BDF [as 别名]
# 或者: from pyNastran.bdf.bdf.BDF import test_deqatn [as 别名]
def test_deqatn_1b(self):
model = BDF(debug=None)
#model.cards_to_read.add('DEQATN')
model.test_deqatn = True
card = ["DEQATN", 1000, "MAXDIFF(t1,t2)=abs(t2-t1)/t1"]
with self.assertRaises(ValueError):
model.add_card(card, "DEQATN", is_list=False)
示例2: test_deqatn_10
# 需要导入模块: from pyNastran.bdf.bdf import BDF [as 别名]
# 或者: from pyNastran.bdf.bdf.BDF import test_deqatn [as 别名]
def test_deqatn_10(self):
"""
per nast/tpl/ptdmi1.dat
"""
model = BDF(debug=None)
model.cards_to_read.add('DEQATN')
model.test_deqatn = True
card = [
'deqatn 2 f(x,y,z)= 1.;',
' L=x+y',
]
model.add_card(card, 'DEQATN', is_list=False)
model.cross_reference()
s = StringIO()
model.write_bdf(s, close=False)
s.getvalue()
s.close()
eq = model.dequations[2]
x = zeros(10., dtype='float32')
y = zeros(11., dtype='float32')
z = zeros(12., dtype='float32')
#out = eq.func(x, y, z)
out = eq.func(1.0, 2.0)
print(out)
示例3: test_deqatn_9
# 需要导入模块: from pyNastran.bdf.bdf import BDF [as 别名]
# 或者: from pyNastran.bdf.bdf.BDF import test_deqatn [as 别名]
def test_deqatn_9(self):
"""
per nast/tpl/ptdmi1.dat
"""
model = BDF(debug=None)
model.cards_to_read.add('DEQATN')
model.test_deqatn = True
card = [
'deqatn 2 f(x,y,z)= 1.;',
' L=1+2+3+',
' + 4/min(1,2);',
' b= 4.;',
' h= 2.;',
' t1= 200.;',
' t2= 300.;',
' t=t1*(L-x)/L+t2*x/L',
' +4'
]
model.add_card(card, 'DEQATN', is_list=False)
model.cross_reference()
s = StringIO()
model.write_bdf(s, close=False)
s.getvalue()
s.close()
示例4: test_deqatn_3
# 需要导入模块: from pyNastran.bdf.bdf import BDF [as 别名]
# 或者: from pyNastran.bdf.bdf.BDF import test_deqatn [as 别名]
def test_deqatn_3(self):
model = BDF(debug=None)
model.cards_to_read.add('DEQATN')
model.test_deqatn = True
card = ['DEQATN 1000',
' MAXDIFF(t1,t2)=abs(t2-t1)/t1']
model.add_card(card, 'DEQATN', is_list=False)
model.cross_reference()
s = StringIO()
model.write_bdf(s, close=False)
s.getvalue()
#print(s.getvalue())
s.close()
示例5: test_deqatn_4
# 需要导入模块: from pyNastran.bdf.bdf import BDF [as 别名]
# 或者: from pyNastran.bdf.bdf.BDF import test_deqatn [as 别名]
def test_deqatn_4(self):
"""
per nast/tpl/ptdmi1.dat
"""
model = BDF(debug=None)
#model.cards_to_read.add('DEQATN')
model.test_deqatn = True
card = [
'deqatn 2 f(x,y,z)= 1.;',
' l=10.;',
' b= 4.;',
' h= 2.;',
' t1= 200.;',
' t2= 300.;',
' t=t1*(l-x)/l+t2*(x)/l',
]
model.add_card(card, 'DEQATN', is_list=False)
model.cross_reference()
s = StringIO()
model.write_bdf(s, close=False)
s.getvalue()
s.close()
示例6: test_deqatn_5
# 需要导入模块: from pyNastran.bdf.bdf import BDF [as 别名]
# 或者: from pyNastran.bdf.bdf.BDF import test_deqatn [as 别名]
def test_deqatn_5(self):
"""
per nast/tpl/ptdmi1.dat
"""
model = BDF(debug=None)
model.cards_to_read.add('DEQATN')
model.test_deqatn = True
card = [
'deqatn 2 f(x,y,z)= 1.;',
' l=10.;',
' b= 4.;',
' h= 2.;',
' t1= 200.;',
' t2= 300.;',
' t=t1*(l-x)/l+t2*(x)/l',
]
model.add_card(card, 'DEQATN', is_list=False)
model.cross_reference()
with open('junk.bdf', 'wb') as f:
model.write_bdf(f, close=False)
#s.getvalue()
os.remove('junk.bdf')