Example #1
0
 def analyze_body(self,body,name):
     """
     analyzing revolution body object (fuselages with non-revolution body 
         shape are also analyzed)
     
     Parameters
     ----------
     
     body : aircraft.fuselage
         fuselage or nacelle object
     name : string
         name of analyzed body. Can be arbitrary and will be used for 
         report generation
 
     Returns
     -------
     
     bodyDrag : DragItem
         drag of the fuselage with reference area specified while initialization
     """
     self.set_reference_area()
     bodyDrag = DragItem()
     bodyDrag.name = name
     self.add_body(body)
     bodyDrag.CD = self.analyze()
     bodyDrag.quantity = 1
     bodyDrag.CDtotal = bodyDrag.CD
     return bodyDrag
Example #2
0
 def analyze_wing(self,wing,name):
     """
     analyzing friction and form drag of the wing-type bodies. Creates Component 
     object returns with all fields filled including geometry required for 
     drag analysis and drag value itself. 
     
     Parameters
     ----------
     
     wing : aircraft.wing
         wing, horizontal or vertical stabilizer object
     name : string
         name of the wing. Can be arbitrary and will be used for 
         report generation
     """
     self.set_reference_area()
     wingDrag = DragItem()
     wingDrag.name = name
     self.add_wing(wing)
     wingDrag.CD = self.analyze()
     wingDrag.quantity = 1
     wingDrag.CDtotal = wingDrag.CD
     return wingDrag