Example #1
0
    def __init__(self, aircraft):
        '''
        will initialize instance mainly used for documentation
        links to the aircraft instance
        initiates the airfoil class
        '''
        component.__init__(self)
        self.id = 'htp'
        self.aircraft = aircraft
        self.level = 2

        self.UID = uID(cpacsPath='/cpacs/toolspecific/vampZero/htpUID')

        # Mass
        self.mHtp = mHtp(
            cpacsPath='/cpacs/vehicles/aircraft/model/analyses/massBreakdown/mOEM/mEM/mStructure/mWingsStructure/mWingStructure[2]/massDescription['+self.id+'_mass]/mass')
        self.parentUID = parameter(value=self.id, 
			cpacsPath='/cpacs/vehicles/aircraft/model/analyses/massBreakdown/mOEM/mEM/mStructure/mWingsStructure/mWingStructure[2]/massDescription['+self.id+'_mass]/parentUID')

        # CoG
        self.posCoG = posCoG(
            cpacsPath='/cpacs/vehicles/aircraft/model/analyses/massBreakdown/mOEM/mEM/mStructure/mWingsStructure/mWingStructure[2]/massDescription['+self.id+'_mass]/location/x')

        # Geometry
        self.refArea = refArea()
        self.refAreaTakeOff = refAreaTakeOff() 
        self.refAreaCruise = refAreaCruise() 
        self.refAreaLanding = refAreaLanding()        
        self.expArea = expArea()
        self.wetArea = wetArea()
        self.aspectRatio = aspectRatio()
        self.span = span()
        self.taperRatio = taperRatio()
        self.tcAVG = tcAVG()
        self.cRoot = cRoot()
        self.cTip = cTip()
        self.cMAC = cMAC()
        self.yMAC = yMAC()
        self.xMAC = xMAC()
        self.xMAC25 = xMAC25()
        self.phiLE = phiLE()
        self.phiTE = phiTE()
        self.phi25 = phi25()
        self.phi50 = phi50()
        self.xRoot = xRoot()
        self.zRoot = zRoot()
        self.lHT = lHT()
        self.cHT = cHT()
        self.dihedral = dihedral()
        self.LoD = LoD()
        self.location = location()

        # Aerodynamic
        self.cLalpha = cLalpha()
        self.cLMAX = cLMAX()
        #self.cLMIN = cLMIN()
        self.cLMAXht = cLMAXht()
        self.CLalphaHTP_TO = CLalphaHTP_TO()
        self.CLalphaHTP_CR = CLalphaHTP_CR()
        self.CLalphaHTP_L = CLalphaHTP_L()
        self.formFactor = formFactor()
        self.reynoldsNr = reynoldsNr()
        self.cfLAM = cfLAM()
        self.cfTURB = cfTURB()
        self.cD0c = cD0c()
        self.nLam = nLam()
        self.detadalpha = detadalpha()
        self.DPR = DPR()

        # Airfoil
        self.airfoilr = airfoil(self)  # Root Airfoil
        self.airfoilt = airfoil(self)  # Tip  Airfoil

        # Elevator
        self.elevator = elevator(self)
Example #2
0
    def __init__(self, aircraft):
        '''
        will initialize instance mainly used for documentation
        links to the aircraft instance
        initiates the airfoil class
        '''
        component.__init__(self)
        self.id = 'htp'
        self.aircraft = aircraft
        self.level = 2

        self.UID = uID(cpacsPath='/cpacs/toolspecific/vampZero/htpUID')

        # Mass
        self.mHtp = mHtp(
            cpacsPath=
            '/cpacs/vehicles/aircraft/model/analyses/massBreakdown/mOEM/mEM/mStructure/mWingsStructure/mWingStructure[2]/massDescription['
            + self.id + '_mass]/mass')
        self.parentUID = parameter(
            value=self.id,
            cpacsPath=
            '/cpacs/vehicles/aircraft/model/analyses/massBreakdown/mOEM/mEM/mStructure/mWingsStructure/mWingStructure[2]/massDescription['
            + self.id + '_mass]/parentUID')

        # CoG
        self.posCoG = posCoG(
            cpacsPath=
            '/cpacs/vehicles/aircraft/model/analyses/massBreakdown/mOEM/mEM/mStructure/mWingsStructure/mWingStructure[2]/massDescription['
            + self.id + '_mass]/location/x')

        # Geometry
        self.refArea = refArea()
        self.refAreaTakeOff = refAreaTakeOff()
        self.refAreaCruise = refAreaCruise()
        self.refAreaLanding = refAreaLanding()
        self.expArea = expArea()
        self.wetArea = wetArea()
        self.aspectRatio = aspectRatio()
        self.span = span()
        self.taperRatio = taperRatio()
        self.tcAVG = tcAVG()
        self.cRoot = cRoot()
        self.cTip = cTip()
        self.cMAC = cMAC()
        self.yMAC = yMAC()
        self.xMAC = xMAC()
        self.xMAC25 = xMAC25()
        self.phiLE = phiLE()
        self.phiTE = phiTE()
        self.phi25 = phi25()
        self.phi50 = phi50()
        self.xRoot = xRoot()
        self.zRoot = zRoot()
        self.lHT = lHT()
        self.cHT = cHT()
        self.dihedral = dihedral()
        self.LoD = LoD()
        self.location = location()

        # Aerodynamic
        self.cLalpha = cLalpha()
        self.cLMAX = cLMAX()
        #self.cLMIN = cLMIN()
        self.cLMAXht = cLMAXht()
        self.CLalphaHTP_TO = CLalphaHTP_TO()
        self.CLalphaHTP_CR = CLalphaHTP_CR()
        self.CLalphaHTP_L = CLalphaHTP_L()
        self.formFactor = formFactor()
        self.reynoldsNr = reynoldsNr()
        self.cfLAM = cfLAM()
        self.cfTURB = cfTURB()
        self.cD0c = cD0c()
        self.nLam = nLam()
        self.detadalpha = detadalpha()
        self.DPR = DPR()

        # Airfoil
        self.airfoilr = airfoil(self)  # Root Airfoil
        self.airfoilt = airfoil(self)  # Tip  Airfoil

        # Elevator
        self.elevator = elevator(self)
Example #3
0
class htp(wing):
    '''
    The horizontal tailplane it inherits the wing class
    
    Several parameters are inherited from the wing as well!!!
    '''

    def __init__(self, aircraft):
        '''
        will initialize instance mainly used for documentation
        links to the aircraft instance
        initiates the airfoil class
        '''
        component.__init__(self)
        self.id = 'htp'
        self.aircraft = aircraft
        self.level = 2

        self.UID = uID(cpacsPath='/cpacs/toolspecific/vampZero/htpUID')

        # Mass
        self.mHtp = mHtp(
            cpacsPath='/cpacs/vehicles/aircraft/model/analyses/massBreakdown/mOEM/mEM/mStructure/mWingsStructure/mWingStructure[2]/massDescription['+self.id+'_mass]/mass')
        self.parentUID = parameter(value=self.id, 
			cpacsPath='/cpacs/vehicles/aircraft/model/analyses/massBreakdown/mOEM/mEM/mStructure/mWingsStructure/mWingStructure[2]/massDescription['+self.id+'_mass]/parentUID')

        # CoG
        self.posCoG = posCoG(
            cpacsPath='/cpacs/vehicles/aircraft/model/analyses/massBreakdown/mOEM/mEM/mStructure/mWingsStructure/mWingStructure[2]/massDescription['+self.id+'_mass]/location/x')

        # Geometry
        self.refArea = refArea()
        self.refAreaTakeOff = refAreaTakeOff() 
        self.refAreaCruise = refAreaCruise() 
        self.refAreaLanding = refAreaLanding()        
        self.expArea = expArea()
        self.wetArea = wetArea()
        self.aspectRatio = aspectRatio()
        self.span = span()
        self.taperRatio = taperRatio()
        self.tcAVG = tcAVG()
        self.cRoot = cRoot()
        self.cTip = cTip()
        self.cMAC = cMAC()
        self.yMAC = yMAC()
        self.xMAC = xMAC()
        self.xMAC25 = xMAC25()
        self.phiLE = phiLE()
        self.phiTE = phiTE()
        self.phi25 = phi25()
        self.phi50 = phi50()
        self.xRoot = xRoot()
        self.zRoot = zRoot()
        self.lHT = lHT()
        self.cHT = cHT()
        self.dihedral = dihedral()
        self.LoD = LoD()
        self.location = location()

        # Aerodynamic
        self.cLalpha = cLalpha()
        self.cLMAX = cLMAX()
        #self.cLMIN = cLMIN()
        self.cLMAXht = cLMAXht()
        self.CLalphaHTP_TO = CLalphaHTP_TO()
        self.CLalphaHTP_CR = CLalphaHTP_CR()
        self.CLalphaHTP_L = CLalphaHTP_L()
        self.formFactor = formFactor()
        self.reynoldsNr = reynoldsNr()
        self.cfLAM = cfLAM()
        self.cfTURB = cfTURB()
        self.cD0c = cD0c()
        self.nLam = nLam()
        self.detadalpha = detadalpha()
        self.DPR = DPR()

        # Airfoil
        self.airfoilr = airfoil(self)  # Root Airfoil
        self.airfoilt = airfoil(self)  # Tip  Airfoil

        # Elevator
        self.elevator = elevator(self)

    def cpacsExport(self, CPACSObj):
        '''
        this methods exports all parameters nested in the component. Nested Components will be called as well. 
        cpacsPath must be filled
        
        :Author: Jonas Jepsen
        :param CPACSObj: the CPACS object holding the data for export
        '''

        xRoot = self.xRoot.getValue()
        zRoot = self.zRoot.getValue()

        createHTP(CPACSObj, self.id, xRoot, zRoot, self.airfoilr.tc.getValue(), self.airfoilt.tc.getValue(), self.cRoot.getValue(),
                  self.cTip.getValue(), self.span.getValue(), self.phiLE.getValue(), self.dihedral.getValue(),
                  self.LoD.getValue(), self.location.getValue())

        super(wing, self).cpacsExport(CPACSObj)
Example #4
0
class htp(wing):
    '''
    The horizontal tailplane it inherits the wing class
    
    Several parameters are inherited from the wing as well!!!
    '''
    def __init__(self, aircraft):
        '''
        will initialize instance mainly used for documentation
        links to the aircraft instance
        initiates the airfoil class
        '''
        component.__init__(self)
        self.id = 'htp'
        self.aircraft = aircraft
        self.level = 2

        self.UID = uID(cpacsPath='/cpacs/toolspecific/vampZero/htpUID')

        # Mass
        self.mHtp = mHtp(
            cpacsPath=
            '/cpacs/vehicles/aircraft/model/analyses/massBreakdown/mOEM/mEM/mStructure/mWingsStructure/mWingStructure[2]/massDescription['
            + self.id + '_mass]/mass')
        self.parentUID = parameter(
            value=self.id,
            cpacsPath=
            '/cpacs/vehicles/aircraft/model/analyses/massBreakdown/mOEM/mEM/mStructure/mWingsStructure/mWingStructure[2]/massDescription['
            + self.id + '_mass]/parentUID')

        # CoG
        self.posCoG = posCoG(
            cpacsPath=
            '/cpacs/vehicles/aircraft/model/analyses/massBreakdown/mOEM/mEM/mStructure/mWingsStructure/mWingStructure[2]/massDescription['
            + self.id + '_mass]/location/x')

        # Geometry
        self.refArea = refArea()
        self.refAreaTakeOff = refAreaTakeOff()
        self.refAreaCruise = refAreaCruise()
        self.refAreaLanding = refAreaLanding()
        self.expArea = expArea()
        self.wetArea = wetArea()
        self.aspectRatio = aspectRatio()
        self.span = span()
        self.taperRatio = taperRatio()
        self.tcAVG = tcAVG()
        self.cRoot = cRoot()
        self.cTip = cTip()
        self.cMAC = cMAC()
        self.yMAC = yMAC()
        self.xMAC = xMAC()
        self.xMAC25 = xMAC25()
        self.phiLE = phiLE()
        self.phiTE = phiTE()
        self.phi25 = phi25()
        self.phi50 = phi50()
        self.xRoot = xRoot()
        self.zRoot = zRoot()
        self.lHT = lHT()
        self.cHT = cHT()
        self.dihedral = dihedral()
        self.LoD = LoD()
        self.location = location()

        # Aerodynamic
        self.cLalpha = cLalpha()
        self.cLMAX = cLMAX()
        #self.cLMIN = cLMIN()
        self.cLMAXht = cLMAXht()
        self.CLalphaHTP_TO = CLalphaHTP_TO()
        self.CLalphaHTP_CR = CLalphaHTP_CR()
        self.CLalphaHTP_L = CLalphaHTP_L()
        self.formFactor = formFactor()
        self.reynoldsNr = reynoldsNr()
        self.cfLAM = cfLAM()
        self.cfTURB = cfTURB()
        self.cD0c = cD0c()
        self.nLam = nLam()
        self.detadalpha = detadalpha()
        self.DPR = DPR()

        # Airfoil
        self.airfoilr = airfoil(self)  # Root Airfoil
        self.airfoilt = airfoil(self)  # Tip  Airfoil

        # Elevator
        self.elevator = elevator(self)

    def cpacsExport(self, CPACSObj):
        '''
        this methods exports all parameters nested in the component. Nested Components will be called as well. 
        cpacsPath must be filled
        
        :Author: Jonas Jepsen
        :param CPACSObj: the CPACS object holding the data for export
        '''
        # self.LoD.setValue(1)    # level of detail [0,1]
        if self.location.getValue():
            xRoot = self.xRoot.getValue()
            zRoot = self.zRoot.getValue()
        else:
            vtp_span = self.aircraft.vtp.span.getValue()
            vtp_phiLE = (self.aircraft.vtp.phiLE.getValue()) * pi / 180.

            xRoot = tan(vtp_phiLE) * vtp_span
            try:
                xRoot = xRoot.real
            except:
                pass

            zRoot = vtp_span

        createHTP(CPACSObj, self.id, xRoot, zRoot, self.airfoilr.tc.getValue(),
                  self.airfoilt.tc.getValue(), self.cRoot.getValue(),
                  self.cTip.getValue(), self.span.getValue(),
                  self.phiLE.getValue(), self.dihedral.getValue(),
                  self.LoD.getValue(), self.location.getValue())

        super(wing, self).cpacsExport(CPACSObj)