Exemplo n.º 1
0
    def _define_params(self):

        lwing = self.comps['lwing'].props
        lwing['pos'].params[''] = PGMparameter(1, 3)
        lwing['pos'].params['lin'] = PGMparameter(3, 3, order_u=2)
        lwing['scl'].params[''] = PGMparameter(3, 1, pos_u=[0, 0.52, 1])
        lwing['shY', 'upp'].params[''] = PGMparameter(10,
                                                      6,
                                                      order_u=4,
                                                      order_v=4)
        lwing['shY', 'low'].params[''] = PGMparameter(10,
                                                      6,
                                                      order_u=4,
                                                      order_v=4)

        lstrut = self.comps['lstrut'].props
        lstrut['pos'].params[''] = PGMparameter(1, 3)
        lstrut['pos'].params['lin'] = PGMparameter(2, 3)
        lstrut['scl'].params[''] = PGMparameter(1, 1)
        lstrut['scl'].params['2'] = PGMparameter(2, 3)
        lstrut['nor'].params[''] = PGMparameter(2, 1)
        lstrut['rot'].params[''] = PGMparameter(3, 3, pos_u=[0, 0.15, 1])
        lstrut['shY', 'upp'].params[''] = PGMparameter(10,
                                                       3,
                                                       order_u=4,
                                                       order_v=3)
        lstrut['shY', 'low'].params[''] = PGMparameter(10,
                                                       3,
                                                       order_u=4,
                                                       order_v=3)

        lv = self.comps['lv'].props
        lv['pos'].params[''] = PGMparameter(1, 3)
        lv['pos'].params['lin'] = PGMparameter(2, 3)
        lv['scl'].params[''] = PGMparameter(2, 1)
        lv['nor'].params[''] = PGMparameter(3, 1)
        lv['rot'].params[''] = PGMparameter(2, 3, pos_u=[0, 1])
        lv['shY', 'upp'].params[''] = PGMparameter(10, 2, order_u=4, order_v=2)
        lv['shY', 'low'].params[''] = PGMparameter(10, 2, order_u=4, order_v=2)

        lstrut_lwing = self.comps['lstrut_lwing'].props
        lstrut_lwing['shN', ''].params[''] = PGMparameter(7, 7)
Exemplo n.º 2
0
    def _define_params(this):

        fuse = this.comps['fuse'].props  #1st parameter: streamwise
        fuse['pos'].params[''] = PGMparameter(
            2, 3)  #Specify the cylinder front and end
        fuse['nor'].params[''] = PGMparameter(1, 3)  #Normal of each section
        fuse['scl'].params[''] = PGMparameter(1, 1)
        fuse['flt'].params[''] = PGMparameter(3, 4, pos_u=[0.0, 0.2, 1.0])
        fuse['pos'].params['nose'] = PGMparameter(3,
                                                  3,
                                                  pos_u=[0, 0.15, 0.3],
                                                  order_u=3)
        fuse['scl'].params['nose_y'] = PGMparameter(3,
                                                    3,
                                                    pos_u=[0, 0.15, 0.3],
                                                    order_u=3)
        fuse['scl'].params['nose_z'] = PGMparameter(3,
                                                    3,
                                                    pos_u=[0, 0.1, 0.2],
                                                    order_u=3)
        fuse['pos'].params['bottom'] = PGMparameter(3,
                                                    3,
                                                    pos_u=[0.2, 0.88, 1.0],
                                                    order_u=2)
        fuse['scl'].params['bottom'] = PGMparameter(3,
                                                    3,
                                                    pos_u=[0.2, 0.88, 1.0],
                                                    order_u=2)
        fuse['rot'].params['bottom'] = PGMparameter(3,
                                                    3,
                                                    pos_u=[0.2, 0.88, 1.0],
                                                    order_u=2)

        lwing = this.comps['lwing'].props
        lwing['pos'].params[''] = PGMparameter(1, 3)
        lwing['pos'].params['lin'] = PGMparameter(3, 3, order_u=2)
        lwing['scl'].params[''] = PGMparameter(3, 3, order_u=2)

        rwing = this.comps['rwing'].props
        rwing['pos'].params[''] = PGMparameter(1, 3)
        rwing['pos'].params['lin'] = PGMparameter(3, 3, order_u=2)
        rwing['scl'].params[''] = PGMparameter(3, 3, order_u=2)

        if this.tail:
            ctail = this.comps['ctail'].props
            ctail['pos'].params[''] = PGMparameter(1, 3)
            ctail['pos'].params['lin'] = PGMparameter(2, 3)
            ctail['scl'].params[''] = PGMparameter(2, 3)
            ctail['nor'].params[''] = PGMparameter(1, 3)

        flap = this.comps['flap'].props
        flap['pos'].params[''] = PGMparameter(1, 3)
        flap['pos'].params['lin'] = PGMparameter(2, 3)
        flap['scl'].params[''] = PGMparameter(2, 3)
        flap['rot'].params[''] = PGMparameter(2, 3)
Exemplo n.º 3
0
    def _define_params(self):
        fuse = self.comps['fuse'].props
        fuse['pos'].params[''] = PGMparameter(2, 3)
        fuse['nor'].params[''] = PGMparameter(1, 1)
        fuse['scl'].params[''] = PGMparameter(1, 1)
        fuse['flt'].params[''] = PGMparameter(2, 4, pos_u=[0.28, 0.53])
        fuse['pos'].params['nose'] = PGMparameter(3,
                                                  3,
                                                  pos_u=[0, 0.065, 0.13],
                                                  order_u=3)
        fuse['scl'].params['nose'] = PGMparameter(3,
                                                  1,
                                                  pos_u=[0, 0.07, 0.14],
                                                  order_u=3)
        fuse['scl'].params['tail'] = PGMparameter(2, 1, pos_u=[0.7, 1.0])

        lwing = self.comps['lwing'].props
        lwing['pos'].params[''] = PGMparameter(1, 3)
        lwing['scl'].params[''] = PGMparameter(3, 1, pos_u=[0, 0.35, 1.0])
        lwing['pos'].params['lin'] = PGMparameter(2, 3)

        lpylon = self.comps['lpylon'].props
        lpylon['pos'].params[''] = PGMparameter(1, 3)
        lpylon['pos'].params['lin'] = PGMparameter(2, 3)
        lpylon['scl'].params[''] = PGMparameter(2, 1)
        lpylon['nor'].params[''] = PGMparameter(1, 3)

        lnac = self.comps['lnac'].props
        lnac['pos'].params[''] = PGMparameter(1, 3)
        lnac['pos'].params['lin'] = PGMparameter(2, 3)
        lnac['nor'].params[''] = PGMparameter(1, 1)
        lnac['scl'].params[''] = PGMparameter(1, 1)
        lnac['thk'].params[''] = PGMparameter(3, 1)

        ltail = self.comps['ltail'].props
        ltail['pos'].params[''] = PGMparameter(1, 3)
        ltail['pos'].params['lin'] = PGMparameter(2, 3)
        ltail['scl'].params[''] = PGMparameter(2, 1)
        ltail['rot'].params[''] = PGMparameter(2, 3)
        ltail['ogn'].params[''] = PGMparameter(1, 3)

        vtail = self.comps['vtail'].props
        vtail['pos'].params[''] = PGMparameter(1, 3)
        vtail['pos'].params['lin'] = PGMparameter(2, 3)
        vtail['nor'].params[''] = PGMparameter(1, 3)
        vtail['scl'].params[''] = PGMparameter(2, 1)
        vtail['rot'].params[''] = PGMparameter(2, 3)
        vtail['ogn'].params[''] = PGMparameter(1, 3)
Exemplo n.º 4
0
    def _define_params(self):
        fuse_props = self.comps[
            'fuse'].props  #Get the reference to the body properties
        fuse_props['pos'].params[''] = PGMparameter(
            4, 3, order_u=3
        )  #This command states that we will have 4 points (linearly spaced between u=0.0 and u=1.0) to specify the fuselage center-line control points. In addition, the interpolation between the sections will be parabolic due to the order_u=3 option.
        fuse_props['nor'].params[''] = PGMparameter(
            1, 1
        )  #This controls the normal of the faces with respect to the center-line
        fuse_props['scl'].params[''] = PGMparameter(
            4, 3
        )  #We will specify the radius along 4 linearly spaced sections and in 3 directions (x,y,z, although the z one is ignored) to make an ellipse. Linear interpolation will be used for the radius of intermediate sections.
        fuse_props['flt'].params[''] = PGMparameter(
            1, 1
        )  #This parameter steadily turns elliptical cross-sections into rectangular cross-sections.

        wing_l_props = self.comps[
            'wing_l'].props  #Get the reference to the left wing parameters
        wing_l_props['pos'].params[''] = PGMparameter(
            2, 3
        )  #We need to set 3 coordinates (x,y,z) for the root section and the tip section (root + tip, hence the 2)
        wing_l_props['scl'].params[''] = PGMparameter(
            2, 1
        )  #We will specify the chord of the root and the tip with the scaling parameter (1 because the same scaling is applied to x,y,z, though z is irrelevant)
        wing_r_props = self.comps[
            'wing_r'].props  #Get the reference to the right wing parameters
        wing_r_props['pos'].params[''] = PGMparameter(2, 3)
        wing_r_props['scl'].params[''] = PGMparameter(2, 1)

        htail_l_props = self.comps[
            'htail_l'].props  #Get the reference to the left tail parameters
        htail_l_props['pos'].params[''] = PGMparameter(2, 3)
        htail_l_props['scl'].params[''] = PGMparameter(2, 3)
        htail_l_props['rot'].params[''] = PGMparameter(
            2, 3
        )  #Now we use 3 parameters to set rotations around 3 axes (x,y,z) for the root and tip sections
        htail_r_props = self.comps[
            'htail_r'].props  #Get the reference to the right tail parameters
        htail_r_props['pos'].params[''] = PGMparameter(2, 3)
        htail_r_props['scl'].params[''] = PGMparameter(2, 3)
        htail_r_props['rot'].params[''] = PGMparameter(2, 3)
        vtail_props = self.comps[
            'vtail'].props  #Get the reference to the vertical tail parameters
        vtail_props['pos'].params[''] = PGMparameter(2, 3)
        vtail_props['scl'].params[''] = PGMparameter(2, 3)
        vtail_props['nor'].params[''] = PGMparameter(
            2, 3
        )  #We will turn on the normal condition for the root and tip sections
        vtail_props['rot'].params[''] = PGMparameter(2, 3)
Exemplo n.º 5
0
    def _define_params(self):
        fuse = self.comps['fuse'].props
        fuse['nor'].params[''] = PGMparameter(1, 3)
        fuse['pos'].params[''] = PGMparameter(2, 3)
        fuse['pos'].params['nose'] = PGMparameter(2, 3, pos_u=[0, 0.12])
        fuse['pos'].params['tail'] = PGMparameter(2, 3, pos_u=[0.76, 1.0])
        #	fuse['scl'].params['rad'] = PGMparameter(4, 1, pos_u=[0,0.14,0.75,1.0])
        fuse['scl'].params['rad1'] = PGMparameter(4,
                                                  1,
                                                  pos_u=[0, 0.01, 0.05, 0.12],
                                                  order_u=4)
        fuse['scl'].params['rad2'] = PGMparameter(2, 1, pos_u=[0.12, 0.76])
        fuse['scl'].params['rad3'] = PGMparameter(4,
                                                  1,
                                                  pos_u=[0.76, 0.83, 0.99, 1],
                                                  order_u=4)
        fuse['scl'].params['tail'] = PGMparameter(2, 3, pos_u=[0.76, 1.0])
        fuse['flt'].params['flt1a'] = PGMparameter(
            4, 2, pos_u=[0.24, 0.27, 0.33, 0.36], pos_v=[0.5, 1], order_u=4)
        fuse['flt'].params['flt1b'] = PGMparameter(2,
                                                   2,
                                                   pos_u=[0.36, 0.41],
                                                   pos_v=[0.5, 1])
        fuse['flt'].params['flt1c'] = PGMparameter(
            4, 2, pos_u=[0.41, 0.44, 0.49, 0.52], pos_v=[0.5, 1], order_u=4)
        fuse['flt'].params['flt2a'] = PGMparameter(
            4, 2, pos_u=[0.24, 0.27, 0.33, 0.36], pos_v=[0, 0.5], order_u=4)
        fuse['flt'].params['flt2b'] = PGMparameter(2,
                                                   2,
                                                   pos_u=[0.36, 0.41],
                                                   pos_v=[0, 0.5])
        fuse['flt'].params['flt2c'] = PGMparameter(
            4, 2, pos_u=[0.41, 0.44, 0.49, 0.52], pos_v=[0, 0.5], order_u=4)

        lwing = self.comps['lwing'].props
        lwing['pos'].params[''] = PGMparameter(1, 3)
        lwing['scl'].params[''] = PGMparameter(2, 1)
        lwing['pos'].params['lin'] = PGMparameter(3, 3, order_u=3)

        lstrut = self.comps['lstrut'].props
        lstrut['pos'].params[''] = PGMparameter(1, 3)
        lstrut['pos'].params['lin'] = PGMparameter(2, 3)
        #	lstrut['pos'].params['curv'] = PGMparameter(3, 3, pos_u=[0.9,0.95,1.0], order_u=3)
        lstrut['scl'].params[''] = PGMparameter(2, 1)
        lstrut['nor'].params[''] = PGMparameter(1, 1)
        #	lstrut['rot'].params[''] = PGMparameter(2, 3, pos_u=[0.85,1.0])
        #	lstrut['rot'].params[''] = PGMparameter(2, 3, pos_u=[0,1.0])

        lv = self.comps['lv'].props
        lv['pos'].params[''] = PGMparameter(1, 3)
        lv['pos'].params['lin'] = PGMparameter(2, 3)
        lv['scl'].params[''] = PGMparameter(2, 1)
        lv['nor'].params[''] = PGMparameter(1, 1)
        lv['rot'].params[''] = PGMparameter(2, 3, pos_u=[0, 1])

        ltail = self.comps['ltail'].props
        ltail['pos'].params[''] = PGMparameter(1, 3)
        ltail['pos'].params['lin'] = PGMparameter(2, 3)
        ltail['scl'].params[''] = PGMparameter(2, 1)

        vtail = self.comps['vtail'].props
        vtail['pos'].params[''] = PGMparameter(1, 3)
        vtail['pos'].params['lin'] = PGMparameter(2, 3)
        vtail['scl'].params[''] = PGMparameter(2, 1)
        vtail['nor'].params[''] = PGMparameter(1, 3)
Exemplo n.º 6
0
 def _define_params(self):
     wing = self.comps['wing'].props
     wing['pos'].params[''] = PGMparameter(3, 3, pos_u=[0,0.37,1.0])
     wing['scl'].params[''] = PGMparameter(3, 1, pos_u=[0,0.37,1.0])
Exemplo n.º 7
0
    def _define_params(self):
        fuse = self.comps['fuse'].props  #1st parameter: streamwise
        fuse['pos'].params[''] = PGMparameter(
            2, 3)  #Specify the cylinder front and end
        fuse['nor'].params[''] = PGMparameter(1, 1)  #Normal of each section
        fuse['scl'].params[''] = PGMparameter(1, 1)
        fuse['flt'].params[''] = PGMparameter(2, 4, pos_u=[0.28, 0.53])
        fuse['pos'].params['nose'] = PGMparameter(3,
                                                  3,
                                                  pos_u=[0, 0.065, 0.13],
                                                  order_u=3)
        fuse['scl'].params['nose'] = PGMparameter(3,
                                                  1,
                                                  pos_u=[0, 0.07, 0.14],
                                                  order_u=3)
        fuse['scl'].params['tail'] = PGMparameter(2, 1, pos_u=[0.7, 1.0])

        lwing = self.comps['lwing'].props
        lwing['pos'].params[''] = PGMparameter(1, 3)
        lwing['scl'].params[''] = PGMparameter(3, 1, pos_u=[0, 0.35, 1.0])
        lwing['pos'].params['lin'] = PGMparameter(2, 3)
        lwing['shY', 'upp'].params[''] = PGMparameter(10,
                                                      6,
                                                      order_u=4,
                                                      order_v=4)
        lwing['shY', 'low'].params[''] = PGMparameter(10,
                                                      6,
                                                      order_u=4,
                                                      order_v=4)

        rwing = self.comps['rwing'].props
        rwing['pos'].params[''] = PGMparameter(1, 3)
        rwing['scl'].params[''] = PGMparameter(3, 1, pos_u=[0, 0.65, 1.0])
        rwing['pos'].params['lin'] = PGMparameter(2, 3)
        rwing['shY', 'upp'].params[''] = PGMparameter(10,
                                                      6,
                                                      order_u=4,
                                                      order_v=4)
        rwing['shY', 'low'].params[''] = PGMparameter(10,
                                                      6,
                                                      order_u=4,
                                                      order_v=4)

        lpylon = self.comps['lpylon'].props
        lpylon['pos'].params[''] = PGMparameter(1, 3)
        lpylon['pos'].params['lin'] = PGMparameter(2, 3)
        lpylon['scl'].params[''] = PGMparameter(2, 1)
        lpylon['nor'].params[''] = PGMparameter(1, 3)

        lnac = self.comps['lnac'].props
        lnac['pos'].params[''] = PGMparameter(1, 3)
        lnac['pos'].params['lin'] = PGMparameter(2, 3)
        lnac['nor'].params[''] = PGMparameter(1, 1)
        lnac['scl'].params[''] = PGMparameter(1, 1)
        lnac['thk'].params[''] = PGMparameter(3, 1)

        ltail = self.comps['ltail'].props
        ltail['pos'].params[''] = PGMparameter(1, 3)
        ltail['pos'].params['lin'] = PGMparameter(2, 3)
        ltail['scl'].params[''] = PGMparameter(2, 1)
        ltail['rot'].params[''] = PGMparameter(2, 3)
        ltail['ogn'].params[''] = PGMparameter(1, 3)

        rtail = self.comps['rtail'].props
        rtail['pos'].params[''] = PGMparameter(1, 3)
        rtail['pos'].params['lin'] = PGMparameter(2, 3)
        rtail['scl'].params[''] = PGMparameter(2, 1)
        rtail['rot'].params[''] = PGMparameter(2, 3)
        rtail['ogn'].params[''] = PGMparameter(1, 3)

        vtail = self.comps['vtail'].props
        vtail['pos'].params[''] = PGMparameter(1, 3)
        vtail['pos'].params['lin'] = PGMparameter(2, 3)
        vtail['nor'].params[''] = PGMparameter(1, 3)
        vtail['scl'].params[''] = PGMparameter(2, 1)
        vtail['rot'].params[''] = PGMparameter(2, 3)
        vtail['ogn'].params[''] = PGMparameter(1, 3)

        lwing_fuse = self.comps['lwing_fuse'].props
        lwing_fuse['shN', ''].params[''] = PGMparameter(7, 7)
Exemplo n.º 8
0
    def _define_params(self):
        fuse = self.comps['fuse'].props
        fuse['pos'].params[''] = PGMparameter(2, 3)
        fuse['pos'].params['nose'] = PGMparameter(2, 3, pos_u=[0, 0.45])
        fuse['pos'].params['tail'] = PGMparameter(2, 3, pos_u=[0.85, 1.0])
        fuse['scl'].params['rad_nose'] = PGMparameter(
            4, 1, pos_u=[0, 0.05, 0.41, 0.45], order_u=4)
        fuse['scl'].params['rad_middle'] = PGMparameter(2,
                                                        1,
                                                        pos_u=[0.45, 0.85])
        fuse['scl'].params['rad_tail'] = PGMparameter(
            4, 1, pos_u=[0.85, 0.87, 0.98, 1.0], order_u=4)
        fuse['nor'].params[''] = PGMparameter(1, 3)

        lwing = self.comps['lwing'].props
        lwing['pos'].params[''] = PGMparameter(1, 3)
        lwing['pos'].params['lin'] = PGMparameter(3, 3, order_u=2)
        lwing['scl'].params[''] = PGMparameter(2, 1)
        lwing['rot'].params[''] = PGMparameter(2, 3)

        pylon = self.comps['pylon'].props
        pylon['pos'].params[''] = PGMparameter(1, 3)
        pylon['pos'].params['lin'] = PGMparameter(2, 3)
        pylon['scl'].params[''] = PGMparameter(2, 1)
        pylon['nor'].params[''] = PGMparameter(1, 3)

        nac = self.comps['nac'].props
        nac['pos'].params[''] = PGMparameter(1, 3)
        nac['pos'].params['lin'] = PGMparameter(2, 3)
        nac['nor'].params[''] = PGMparameter(1, 1)
        nac['scl'].params[''] = PGMparameter(3,
                                             1,
                                             pos_u=[0, 0.8, 1],
                                             order_u=3)
        nac['thk'].params[''] = PGMparameter(3, 1)