def _define_comps(self): self.comps['fuse'] = PGMbody( num_x=12, num_y=4, num_z=2) #num_x is the number of surfacees self.comps['lwing'] = PGMwing(num_x=4, num_z=4, left_closed=True) self.comps['rwing'] = PGMwing(num_x=4, num_z=4, right_closed=True) self.comps['lpylon'] = PGMwing() self.comps['lnac'] = PGMshell(num_x=4, num_y=1, num_z=4) self.comps['ltail'] = PGMwing(left_closed=True) self.comps['rtail'] = PGMwing(right_closed=True) self.comps['vtail'] = PGMwing(num_x=2, left_closed=True) self.comps['fuse_f'] = PGMcone(self, 'fuse', 'front', 2) self.comps['fuse_r'] = PGMcone(self, 'fuse', 'rear', 2) self.comps['lwing_t'] = PGMtip(self, 'lwing', 'left', 0.1) self.comps['rwing_t'] = PGMtip(self, 'rwing', 'right', 0.1) self.comps['ltail_t'] = PGMtip(self, 'ltail', 'left', 0.1) self.comps['rtail_t'] = PGMtip(self, 'rtail', 'right', 0.1) self.comps['vtail_t'] = PGMtip(self, 'vtail', 'left', 0.1) self.comps['lwing_fuse'] = PGMjunction(self, 'fuse', 'lft', 'E', [2, 1], 'lwing', 'right') self.comps['rwing_fuse'] = PGMjunction(self, 'fuse', 'rgt', 'W', [2, 5], 'rwing', 'left') self.comps['lpylon_lwing'] = PGMjunction(self, 'lwing', 'low', 'N', [1, 0], 'lpylon', 'right') self.comps['lpylon_lnac'] = PGMjunction(self, 'lnac', 'tp0', 'W', [1, 0], 'lpylon', 'left') self.comps['ltail_fuse'] = PGMjunction(self, 'fuse', 'lft', 'E', [1, 9], 'ltail', 'right') self.comps['rtail_fuse'] = PGMjunction(self, 'fuse', 'rgt', 'W', [1, 0], 'rtail', 'left') self.comps['vtail_fuse'] = PGMjunction(self, 'fuse', 'top', 'E', [0, 8], 'vtail', 'right')
def _define_comps(this): if this.structure: this.fuse_num_x = 16 else: this.fuse_num_x = 14 this.comps['fuse'] = PGMbody( num_x=this.fuse_num_x, num_y=4, num_z=8) #num_x is the number of surfacees if this.structure: this.comps['lwing'] = PGMwing(num_x=11, num_z=12, left_closed=True) this.comps['rwing'] = PGMwing(num_x=11, num_z=12, right_closed=True) else: this.comps['lwing'] = PGMwing(num_x=9, num_z=12, left_closed=True) this.comps['rwing'] = PGMwing(num_x=9, num_z=12, right_closed=True) if this.tail: this.comps['ctail'] = PGMwing(num_x=3, num_z=4, left_closed=True) this.comps['flap'] = PGMwing(num_x=6, num_z=4, left_closed=True) this.comps['fuse_f'] = PGMcone(this, 'fuse', 'front', 7.0) this.comps['fuse_r'] = PGMcone(this, 'fuse', 'rear', 3.0) this.comps['lwing_t'] = PGMtip(this, 'lwing', 'left', 0.1) this.comps['rwing_t'] = PGMtip(this, 'rwing', 'right', 0.1) if this.tail: this.comps['ctail_t'] = PGMtip(this, 'ctail', 'left', 3.0) # this.comps['flap_t'] = PGMtip(this, 'flap', 'left', 0.1) #this.comps['lwing_fuse'] = PGMjunction(this, 'fuse', 'bot', 'E', [0,1], 'lwing', 'right') if this.structure: this.comps['lwing_fuse'] = PGMjunction(this, 'fuse', 'lft', 'E', [3, 2], 'lwing', 'right') this.comps['rwing_fuse'] = PGMjunction(this, 'fuse', 'rgt', 'W', [3, 1], 'rwing', 'left') else: this.comps['lwing_fuse'] = PGMjunction(this, 'fuse', 'lft', 'E', [3, 1], 'lwing', 'right') this.comps['rwing_fuse'] = PGMjunction(this, 'fuse', 'rgt', 'W', [3, 2], 'rwing', 'left') if this.tail: this.comps['ctail_fuse'] = PGMjunction(this, 'fuse', 'top', 'E', [3, this.fuse_num_x - 5], 'ctail', 'right') this.comps['flap_fuse'] = PGMjunction(this, 'fuse', 'bot', 'S', [this.fuse_num_x - 2, 0], 'flap', 'right')
def _define_comps(self): self.comps['fuse'] = PGMbody( num_x=12, num_y=4, num_z=4 ) #Creates the fuselage component with 12 surfaces on the longitudinal direction, 4 surfaces on y direction and 4 surfaces on z direction self.comps['cone_f'] = PGMcone( self, 'fuse', 'front', 2 ) #Adds a cone to close the front of the fuselage. The last parameter controls how the cone uses the tangential component of the primary component (fuselage) to generate the junction self.comps['cone_r'] = PGMcone( self, 'fuse', 'rear', 0.1 ) #Adds a cone to close the rear of the fuselage. The last parameter controls how the cone uses the tangential component of the primary component (fuselage) to generate the junction self.comps['wing_l'] = PGMwing( num_x=3, num_z=4, left_closed=True ) #Creates the left wing component. We only need to close the left tip self.comps['wingtip_l'] = PGMtip(self, 'wing_l', 'left', 0.1) #Creates the left wing tip self.comps['junc_fus_wing_l'] = PGMjunction( self, 'fuse', 'lft', 'E', [0, 3], 'wing_l', 'right' ) #We will connect the 'right' end of the left wing ('wing_l') to the left face ('lft') of the fuselage ('fuse'). We look at the face on the female component in the orientation that has the upper face of the male component facing up. The 'v' direction of the female face is pointing to the right, so we specify 'E' for east. The northwest-most surface of the junction has coordinates (i=0,j=3), where the i axis points down, and the j axis points right; i.e., (i=0,j=0) is the northwest-most surface on the female face. self.comps['wing_r'] = PGMwing( num_x=3, num_z=4, right_closed=True ) #Creates the right wing component. We only need to close the right tip self.comps['wingtip_r'] = PGMtip(self, 'wing_r', 'right', 0.1) #Creates the right wing tip self.comps['junc_fus_wing_r'] = PGMjunction( self, 'fuse', 'rgt', 'W', [0, 4], 'wing_r', 'left' ) #We will connect the 'left' end to the right wing ('wing_r') to the right face ('rgt') of the fuselage ('fuse'). self.comps['htail_l'] = PGMwing( num_x=1, num_z=3, left_closed=True) #This creates the left horizontal tail component self.comps['htailtip_l'] = PGMtip(self, 'htail_l', 'left', 0.1) #Creates the left tail tip self.comps['junc_fus_htail_l'] = PGMjunction( self, 'fuse', 'lft', 'E', [1, 9], 'htail_l', 'right' ) #We will connect the 'right' end to the left tail ('htail_l') to the left face ('lft') of the fuselage ('fuse'). self.comps['htail_r'] = PGMwing( num_x=1, num_z=3, right_closed=True ) #This creates the right horizontal tail component self.comps['htailtip_r'] = PGMtip(self, 'htail_r', 'right', 0.1) #Creates the right tail tip self.comps['junc_fus_htail_r'] = PGMjunction( self, 'fuse', 'rgt', 'W', [1, 0], 'htail_r', 'left' ) #We will connect the 'left' end to the right tail ('htail_r') to the right face ('rgt') of the fuselage ('fuse'). self.comps['vtail'] = PGMwing( num_x=1, num_z=3, left_closed=True ) #This creates the vertical tail component. We will define this component with the upper face pointing to the right. self.comps['vtailtip'] = PGMtip(self, 'vtail', 'left', 0.1) #Creates the vertical tail tip self.comps['junc_fus_vtail'] = PGMjunction( self, 'fuse', 'top', 'E', [1, 9], 'vtail', 'right' ) #We will connect the 'right' end to the vertical tail ('vtail') to the top face ('top') of the fuselage ('fuse').
def _define_comps(self): self.comps['fuse'] = PGMbody(num_x=8, num_y=6, num_z=4) self.comps['lwing'] = PGMwing(num_x=5, num_z=7, left_closed=True) self.comps['pylon'] = PGMwing() self.comps['nac'] = PGMshell(num_x=3, num_y=1, num_z=4) self.comps['fuse_f'] = PGMcone(self, 'fuse', 'front', 4) self.comps['fuse_r'] = PGMcone(self, 'fuse', 'rear', 2) self.comps['lwing_t'] = PGMtip(self, 'lwing', 'left', 0.1) self.comps['lwing_fuse'] = PGMjunction(self, 'fuse', 'lft', 'E', [0, 1], 'lwing', 'right') self.comps['pylon_fuse'] = PGMjunction(self, 'fuse', 'top', 'E', [1, 5], 'pylon', 'right') self.comps['pylon_nac'] = PGMjunction(self, 'nac', 'bt0', 'W', [1, 0], 'pylon', 'left')
def _define_comps(self): self.comps['fuse'] = PGMbody(num_x=17, num_y=6, num_z=4) self.comps['lwing'] = PGMwing(num_x=7, num_z=7, left_closed=True) self.comps['lstrut'] = PGMwing(num_x=4, num_z=4, left_closed=True, right_closed=True) self.comps['lv'] = PGMwing(num_z=4) self.comps['ltail'] = PGMwing(left_closed=True) self.comps['vtail'] = PGMwing(num_x=5, num_z=4, left_closed=True) self.comps['fuse_f'] = PGMcone(self, 'fuse', 'front', 18) self.comps['fuse_r'] = PGMcone(self, 'fuse', 'rear', 2) self.comps['lwing_t'] = PGMtip(self, 'lwing', 'left', 0.1) self.comps['ltail_t'] = PGMtip(self, 'ltail', 'left', 0.1) self.comps['vtail_t'] = PGMtip(self, 'vtail', 'left', 0.1) self.comps['lwing_fuse'] = PGMjunction(self, 'fuse', 'lft', 'E', [0, 1], 'lwing', 'right', fweight=4, mweight=2) self.comps['lstrut_fuse'] = PGMjunction(self, 'fuse', 'lft', 'E', [4, 2], 'lstrut', 'right') self.comps['lstrut_lwing'] = PGMjunction(self, 'lwing', 'low', 'S', [4, 1], 'lstrut', 'left', fweight=3, mweight=3) self.comps['lv_lwing'] = PGMjunction(self, 'lwing', 'low', 'S', [1, 3], 'lv', 'left') self.comps['lv_lstrut'] = PGMjunction(self, 'lstrut', 'upp', 'S', [1, 0], 'lv', 'right') self.comps['vtail_fuse'] = PGMjunction(self, 'fuse', 'top', 'E', [1, 10], 'vtail', 'right') self.comps['ltail_vtail'] = PGMjunction(self, 'vtail', 'low', 'N', [0, 1], 'ltail', 'right')