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


Python BDF.add_paero方法代码示例

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


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

示例1: test_caero5_1

# 需要导入模块: from pyNastran.bdf.bdf import BDF [as 别名]
# 或者: from pyNastran.bdf.bdf.BDF import add_paero [as 别名]
    def test_caero5_1(self):
        """checks the CAERO5/PAERO5"""
        pid = 6001
        caoci = [0., 0.5, 1.0]
        paero5 = PAERO5(pid, caoci,
                        nalpha=0, lalpha=0, nxis=0, lxis=0, ntaus=0, ltaus=0,
                        comment='msg')

        #| PAERO5 | PID   | NALPHA | LALPHA | NXIS    | LXIS  | NTAUS | LTAUS |
        #+--------+-------+--------+--------+---------+-------+-------+-------+
        #|        | CAOC1 | CAOC2  | CAOC3  | CAOC4   | CAOC5 |       |       |
        nalpha = 0
        lalpha = 0
        nxis = 0
        lxis = 0
        ntaus = 0
        ltaus = 0
        card = ['PAERO5', pid, nalpha, lalpha, nxis, lxis, ntaus, ltaus, ] + caoci

        model = BDF()
        model.add_card(card, card[0], comment='', is_list=True,
                       has_none=True)
        paero5 = model.paeros[pid]
        paero5.raw_fields()

        eid = 6000
        cp = 0
        nspan = 5
        lspan = 0
        ntheory = 0
        nthick = 0
        x1 = 0.
        y1 = 0.
        z1 = 0.
        x12 = 1.
        x4 = 0.2
        y4 = 1.
        z4 = 0.
        x43 = 0.8
        p1 = [x1, y1, z1]
        p4 = [x4, y4, z4]
        caero5 = CAERO5(eid, pid, p1, x12, p4, x43,
                        cp=cp, nspan=nspan, lspan=lspan,
                        ntheory=ntheory, nthick=nthick,
                        comment='msg')

        model = BDF()
        model.add_paero(paero5)
        caero5.cross_reference(model)
        npoints, nelements = caero5.get_npanel_points_elements()
        points, elements = caero5.panel_points_elements()

        caero5.write_card()
        #caero5.raw_fields()

        caero5.uncross_reference()
        caero5.write_card()
开发者ID:hurlei,项目名称:pyNastran,代码行数:59,代码来源:test_aero.py

示例2: test_caero4_1

# 需要导入模块: from pyNastran.bdf.bdf import BDF [as 别名]
# 或者: from pyNastran.bdf.bdf.BDF import add_paero [as 别名]
    def test_caero4_1(self):
        """checks the CAERO4/PAERO4"""
        pid = 1001
        docs = []
        caocs = []
        gapocs = []
        paero4 = PAERO4(pid, docs, caocs, gapocs,
                        cla=0, lcla=0, circ=0, lcirc=0,
                        comment='')

        x1 = 0.
        y1 = 0.
        z1 = 0.
        x12 = 100.
        x4 = 50.
        y4 = 0.
        z4 = 0.
        x43 = 10.

        eid = 1000
        nspan = 4  # number of stations
        lspan = 0  # AEFACT
        cp = 0
        card = ['CAERO4', eid, pid, cp, nspan, lspan, None, None, None,
                x1, y1, z1, x12, x4, y4, z4, x43]

        bdf_card = BDFCard(card, has_none=True)
        caero4a = CAERO4.add_card(bdf_card, comment='msg')
        caero4a.validate()
        caero4a.write_card()
        caero4a.raw_fields()

        p1 = [x1, y1, z1]
        p4 = [x4, y4, z4]
        caero4b = CAERO4(eid, pid, cp, nspan, lspan, p1, x12, p4, x43,
                         comment='msg2')
        caero4b.validate()
        caero4b.write_card()
        caero4b.raw_fields()

        model = BDF()
        model.add_paero(paero4)

        caero4b.cross_reference(model)
        caero4b.write_card()
        caero4b.raw_fields()
        p1, p2, p3, p4 = caero4b.get_points()
开发者ID:hurlei,项目名称:pyNastran,代码行数:49,代码来源:test_aero.py


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