Exemplo n.º 1
0
    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_object(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()
Exemplo n.º 2
0
    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_object(paero4)

        caero4b.cross_reference(model)
        caero4b.write_card()
        caero4b.raw_fields()
        p1, p2, p3, p4 = caero4b.get_points()