本文整理汇总了Python中pyNastran.bdf.cards.baseCard.Property类的典型用法代码示例。如果您正苦于以下问题:Python Property类的具体用法?Python Property怎么用?Python Property使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Property类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
def __init__(self, card=None, data=None, comment=''):
Property.__init__(self, card, data)
if comment:
self._comment = comment
if card:
#: Property ID
self.pid = integer(card, 1, 'pid')
#: diameter of the fastener
self.d = double(card, 2, 'd')
assert self.d > 0
#: Specifies the element stiffness coordinate system
self.mcid = integer_or_blank(card, 3, 'mcid', -1)
assert self.mcid >= -1
self.mflag = integer_or_blank(card, 4, 'mflag', 0) # 0-absolute 1-relative
assert self.mflag in [0, 1]
#: stiffness values in directions 1-3
self.kt1 = double(card, 5, 'kt1')
self.kt2 = double(card, 6, 'kt2')
self.kt3 = double(card, 7, 'kt3')
#: Rotational stiffness values in directions 1-3
self.kr1 = double_or_blank(card, 8, 'kr1', 0.0)
self.kr2 = double_or_blank(card, 9, 'kr2', 0.0)
self.kr3 = double_or_blank(card, 10, 'kr3', 0.0)
#: Lumped mass of fastener
self.mass = double_or_blank(card, 11, 'mass', 0.0)
#: Structural damping
self.ge = double_or_blank(card, 12, 'ge', 0.0)
assert len(card) <= 13, 'len(PFAST card) = %i' % len(card)
else:
raise NotImplementedError(data)
示例2: __init__
def __init__(self, card=None, data=None, comment=''):
Property.__init__(self, card, data)
if comment:
self._comment = comment
if card:
#: Property ID
self.pid = integer(card, 1, 'pid')
#: Material ID
self.mid1 = integer_or_blank(card, 2, 'mid1', 0)
self.t1 = double_or_blank(card, 3, 't1')
self.mid2 = integer_or_blank(card, 4, 'mid2', 0)
if self.mid2 > 0:
self.i = double(card, 5, 'i')
assert self.i > 0.0
else:
self.i = blank(card, 5, 'i')
self.mid3 = integer(card, 6, 0)
if self.mid3 > 0:
self.t2 = double(card, 7, 't3')
assert self.t2 > 0.0
else:
self.t2 = blank(card, 7, 't3')
self.nsm = double(card, 8, 'nsm')
self.z1 = double(card, 9, 'z1')
self.z2 = double(card, 10, 'z2')
self.phi = fields(double, card, 'phi', i=11, j=len(card))
else:
raise NotImplementedError(data)
示例3: __init__
def __init__(self, card, data):
self.Type = None
self.dim = None
self.A = None
self.i1 = None
self.i2 = None
self.i12 = None
self.j = None
self.nsm = None
Property.__init__(self, card, data)
示例4: __init__
def __init__(self, card=None, data=None):
Property.__init__(self, card, data)
if card:
## Property ID
self.pid = card.field(1)
## Material ID
self.mid = card.field(2)
self.group = card.field(3, 'MSCBMLO')
self.Type = card.field(4)
self.dim = [] # confusing entry...
else:
raise NotImplementedError('not supported')
示例5: __init__
def __init__(self, card=None, data=None, comment=''):
Property.__init__(self, card, data)
if comment:
self._comment = comment
if card:
self.pid = integer(card, 1, 'pid')
self.mid = integer(card, 2, 'mid')
self.OD1 = double(card, 3, 'OD1')
self.t = double_or_blank(card, 4, 't')
self.nsm = double_or_blank(card, 5, 'nsm', 0.0)
self.OD2 = double_or_blank(card, 6, 'OD2', self.OD1)
assert len(card) <= 7, 'len(PTUBE card) = %i' % len(card)
else:
self.pid = data[0]
self.mid = data[1]
self.OD1 = data[2]
self.t = data[3]
self.nsm = data[4]
self.OD2 = self.OD1
示例6: __init__
def __init__(self, card=None, data=None, comment=''):
"""
Defines the properties of the gap element (CGAP entry).
"""
Property.__init__(self, card, data)
if comment:
self._comment = comment
if card:
#: Property ID
self.pid = integer(card, 1, 'pid')
#: initial gap opening
self.u0 = double_or_blank(card, 2, 'u0', 0.)
#: preload
self.f0 = double_or_blank(card, 3, 'f0', 0.)
#: axial stiffness of closed gap
self.ka = double_or_blank(card, 4, 'ka', 1.e8)
#: axial stiffness of open gap
self.kb = double_or_blank(card, 5, 'kb', 1e-14 * self.ka)
#: static friction coeff
self.mu1 = double_or_blank(card, 7, 'mu1', 0.)
#: transverse stiffness of closed gap
self.kt = double_or_blank(card, 6, 'kt', self.mu1 * self.ka)
#: kinetic friction coeff
self.mu2 = double_or_blank(card, 8, 'mu2', self.mu1)
self.tmax = double_or_blank(card, 9, 'tmax', 0.)
self.mar = double_or_blank(card, 10, 'mar', 100.)
self.trmin = double_or_blank(card, 11, 'trmin', 0.001)
assert len(card) <= 12, 'len(PGAP card) = %i' % len(card)
else:
#(pid,u0,f0,ka,kb,kt,mu1,mu2,tmax,mar,trmin) = out
self.pid = data[0]
self.u0 = data[1]
self.f0 = data[2]
self.ka = data[3]
self.kb = data[4]
self.kt = data[5]
self.mu1 = data[6]
self.mu2 = data[7]
self.tmax = data[8]
self.mar = data[9]
self.trmin = data[10]
示例7: __init__
def __init__(self, card, data):
Property.__init__(self, card, data)
示例8: __init__
def __init__(self, card=None, data=None):
Property.__init__(self, card, data)