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


Python BDF.add_aesurf方法代码示例

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


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

示例1: test_csschd

# 需要导入模块: from pyNastran.bdf.bdf import BDF [as 别名]
# 或者: from pyNastran.bdf.bdf.BDF import add_aesurf [as 别名]
    def test_csschd(self):
        """checks the CSSCHD card"""
        #sid = 10
        #aesid = 0
        #lalpha = None
        #lmach = None
        #lschd = None

        sid = 5
        aesid = 50
        lalpha = 12
        lmach = 15
        lschd = 25

        card = ['CSSCHD', sid, aesid, lalpha, lmach, lschd]
        bdf_card = BDFCard(card, has_none=True)
        csshcd1 = CSSCHD.add_card(bdf_card, comment='csschd card')
        csshcd1.validate()
        csshcd1.write_card()

        label = 'ELEV'
        cid1 = 0
        alid1 = 37
        aesurf = AESURF(aesid, label, cid1, alid1)

        aefact_sid = alid1
        Di = [0., 0.5, 1.]
        aefact_elev = AEFACT(aefact_sid, Di)

        aefact_sid = lalpha
        Di = [0., 5., 10.]
        aefact_alpha = AEFACT(aefact_sid, Di)

        aefact_sid = lmach
        Di = [0., 0.7, 0.8]
        aefact_mach = AEFACT(aefact_sid, Di)

        aefact_sid = lschd
        Di = [0., 15., 30., 45.]
        aefact_delta = AEFACT(aefact_sid, Di)

        model = BDF()
        model.add_aesurf(aesurf)
        model.add_aefact(aefact_elev)
        model.add_aefact(aefact_alpha)
        model.add_aefact(aefact_mach)
        model.add_aefact(aefact_delta)

        csshcd1.cross_reference(model)
        csshcd1.write_card()
        csshcd1.uncross_reference()
        csshcd1.write_card()

        #-----------
        lalpha = None
        lmach = None
        csshcd2 = CSSCHD(sid, aesid, lschd, lalpha=lalpha, lmach=lmach, comment='cssch card')
        csshcd2.write_card()
        with self.assertRaises(RuntimeError):
            csshcd2.validate()
开发者ID:hurlei,项目名称:pyNastran,代码行数:62,代码来源:test_aero.py

示例2: test_aesurf_1

# 需要导入模块: from pyNastran.bdf.bdf import BDF [as 别名]
# 或者: from pyNastran.bdf.bdf.BDF import add_aesurf [as 别名]
    def test_aesurf_1(self):
        """checks the AESURF/AELIST cards"""
        aesid = 10
        label = 'FLAP'
        cid1 = 0
        aelist_id1 = 10
        cid2 = None
        alid2 = None
        aesurf1 = AESURF(aesid, label, cid1, aelist_id1, cid2, alid2,
                         #eff, ldw,
                         #crefc, crefs, pllim, pulim,
                         #hmllim, hmulim, tqllim, tqulim,
                         comment='aesurf comment')
        aesurf2 = AESURF.add_card(BDFCard(
            [
                'AESURF', aesid, label, cid1, aelist_id1, cid2, alid2,
                #eff, ldw,
                #crefc, crefs, pllim, pulim,
                #hmllim, hmulim, tqllim, tqulim,
            ]), comment='aesurf comment')
        #assert aesurf1 == aesurf2

        cid2 = 1
        coord = CORD2R(cid2, rid=0, origin=[0., 0., 0.],
                       zaxis=[1., 0., 0.], xzplane=[0., 1., 1.], comment='')

        aelist_id1 = 10
        aelist_id2 = 20
        aesurf2 = AESURF.add_card(BDFCard(
            [
                'AESURF', aesid, label, cid1, aelist_id1, cid2, aelist_id2,
                #eff, ldw,
                #crefc, crefs, pllim, pulim,
                #hmllim, hmulim, tqllim, tqulim,
            ]), comment='aesurf comment')

        aesurf1.validate()
        aesurf2.validate()
        log = SimpleLogger(level='warning')

        model = BDF()
        model.add_coord(coord)
        model.add_aesurf(aesurf1)

        elements = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100]
        aelist = AELIST(aelist_id1, elements)
        model.add_aelist(aelist)

        elements = [11, 22, 33, 44, 55, 66, 77, 88, 99]
        aelist = AELIST(aelist_id2, elements)
        model.add_aelist(aelist)

        aesurf1.cross_reference(model)
        aesurf1.write_card()
        aesurf1.raw_fields()
        aesurf1.uncross_reference()
        aesurf1.write_card()
        aesurf1.cross_reference(model)
        aesurf1.raw_fields()

        aesurf2.cross_reference(model)
        aesurf2.write_card()
        aesurf2.raw_fields()
        aesurf2.uncross_reference()
        aesurf2.write_card()
        aesurf2.cross_reference(model)
        aesurf2.raw_fields()
开发者ID:hurlei,项目名称:pyNastran,代码行数:69,代码来源:test_aero.py


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