当前位置: 首页>>代码示例>>Python>>正文


Python Property.__init__方法代码示例

本文整理汇总了Python中pyNastran.bdf.cards.baseCard.Property.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python Property.__init__方法的具体用法?Python Property.__init__怎么用?Python Property.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在pyNastran.bdf.cards.baseCard.Property的用法示例。


在下文中一共展示了Property.__init__方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

# 需要导入模块: from pyNastran.bdf.cards.baseCard import Property [as 别名]
# 或者: from pyNastran.bdf.cards.baseCard.Property import __init__ [as 别名]
 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)
开发者ID:anick107,项目名称:von_mises_rms,代码行数:32,代码来源:properties.py

示例2: __init__

# 需要导入模块: from pyNastran.bdf.cards.baseCard import Property [as 别名]
# 或者: from pyNastran.bdf.cards.baseCard.Property import __init__ [as 别名]
    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)
开发者ID:sukhbinder,项目名称:cyNastran,代码行数:33,代码来源:properties.py

示例3: __init__

# 需要导入模块: from pyNastran.bdf.cards.baseCard import Property [as 别名]
# 或者: from pyNastran.bdf.cards.baseCard.Property import __init__ [as 别名]
 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)
开发者ID:umvarma,项目名称:pynastran,代码行数:12,代码来源:bars.py

示例4: __init__

# 需要导入模块: from pyNastran.bdf.cards.baseCard import Property [as 别名]
# 或者: from pyNastran.bdf.cards.baseCard.Property import __init__ [as 别名]
 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')
开发者ID:xirxa,项目名称:pynastran-locr,代码行数:14,代码来源:properties.py

示例5: __init__

# 需要导入模块: from pyNastran.bdf.cards.baseCard import Property [as 别名]
# 或者: from pyNastran.bdf.cards.baseCard.Property import __init__ [as 别名]
 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
开发者ID:sukhbinder,项目名称:cyNastran,代码行数:21,代码来源:rods.py

示例6: __init__

# 需要导入模块: from pyNastran.bdf.cards.baseCard import Property [as 别名]
# 或者: from pyNastran.bdf.cards.baseCard.Property import __init__ [as 别名]
 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]
开发者ID:abk-ShuaiHaotian,项目名称:pyNastran,代码行数:43,代码来源:properties.py

示例7: __init__

# 需要导入模块: from pyNastran.bdf.cards.baseCard import Property [as 别名]
# 或者: from pyNastran.bdf.cards.baseCard.Property import __init__ [as 别名]
 def __init__(self, card, data):
     Property.__init__(self, card, data)
开发者ID:ClaesFredo,项目名称:pyNastran,代码行数:4,代码来源:mass.py

示例8: __init__

# 需要导入模块: from pyNastran.bdf.cards.baseCard import Property [as 别名]
# 或者: from pyNastran.bdf.cards.baseCard.Property import __init__ [as 别名]
 def __init__(self, card=None, data=None):
     Property.__init__(self, card, data)
开发者ID:xirxa,项目名称:pynastran-locr,代码行数:4,代码来源:shell.py


注:本文中的pyNastran.bdf.cards.baseCard.Property.__init__方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。