Пример #1
0
    def __init__(self, aircraft):
        '''
        will initialize instance mainly used for documentation
        links to the aircraft instance
        initiates the airfoil class
        @Method: Component Constructor
        '''
        component.__init__(self)
        self.id = 'wing'
        self.aircraft = aircraft
        self.level = 2
        self.UID = uID(cpacsPath='/cpacs/toolspecific/vampZero/wingUID')

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

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

        # Geometry
        self.location = location()		
        self.refArea = refArea(cpacsPath='/cpacs/vehicles/aircraft/model/reference/area')
        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(cpacsPath='/cpacs/vehicles/aircraft/model/reference/length')
        self.yMAC = yMAC()
        self.xMAC = xMAC()
        self.xMAC25 = xMAC25(cpacsPath='/cpacs/vehicles/aircraft/model/reference/point/x')
        self.phiLE = phiLE()
        self.phiTE = phiTE()
        self.phi25 = phi25()
        self.phi50 = phi50()
        self.dihedral = dihedral()
        self.twist = twist()
        self.xRoot = xRoot()
        self.zRoot = zRoot()
        self.LoD = LoD()
        self.etaKink = etaKink()
        self.etaEngine = etaEngine()

        # Aerodynamics
        self.cLalpha = cLalpha()
        self.cLMAX = cLMAX()
        self.formFactor = formFactor()
        self.reynoldsNr = reynoldsNr()  # cpacsPath='/cpacs/vehicles/aircraft/model/global/aeroPerformanceMap/reynoldsNumber')
        self.cfLAM = cfLAM()
        self.cfTURB = cfTURB()
        self.cD0c = cD0c()
        self.oswald = oswald()
        self.cDMINoffset = cDMINoffset()
        self.nLam = nLam()
        self.cDw = cDw()
        self.machDD = machDD()
        self.machCrit = machCrit()
        self.cM0CR = cM0CR()
        self.cM0TO = cM0TO()
        self.cM0L = cM0L()

        # Airfoil
        self.airfoilr = airfoil(self, position='root')
        self.airfoilt = airfoil(self, position='tip')

        # Aileron
        self.aileron = aileron(self)

        # Slat
        self.slat = slat(self)

        # Flap
        self.flap = flap(self)

        # Spoiler
        self.spoiler = spoiler(self)

        # CPACS Stuff for Export to higher Level
        self.xFuselage = xFuselage()
        self.yFuselage = yFuselage()
        self.zFuselage = zFuselage()
        self.cFuselage = cFuselage()

        self.xKink = xKink()
        self.yKink = yKink()
        self.zKink = zKink()
        self.cKink = cKink()

        self.xTip = xTip()
        self.zTip = zTip()
Пример #2
0
    def __init__(self, aircraft):
        '''
        will initialize instance mainly used for documentation
        links to the aircraft instance
        initiates the airfoil class
        @Method: Component Constructor
        '''
        component.__init__(self)
        self.id = 'wing'
        self.aircraft = aircraft
        self.level = 2
        self.UID = uID(cpacsPath='/cpacs/toolspecific/vampZero/wingUID')

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

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

        # Geometry
        self.location = location()
        self.refArea = refArea(
            cpacsPath='/cpacs/vehicles/aircraft/model/reference/area')
        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(
            cpacsPath='/cpacs/vehicles/aircraft/model/reference/length')
        self.yMAC = yMAC()
        self.xMAC = xMAC()
        self.xMAC25 = xMAC25(
            cpacsPath='/cpacs/vehicles/aircraft/model/reference/point/x')
        self.phiLE = phiLE()
        self.phiTE = phiTE()
        self.phi25 = phi25()
        self.phi50 = phi50()
        self.dihedral = dihedral()
        self.twist = twist()
        self.xRoot = xRoot()
        self.zRoot = zRoot()
        self.LoD = LoD()
        self.etaKink = etaKink()
        self.etaEngine = etaEngine()

        # Aerodynamics
        self.cLalpha = cLalpha()
        self.cLMAX = cLMAX()
        self.formFactor = formFactor()
        self.reynoldsNr = reynoldsNr(
        )  # cpacsPath='/cpacs/vehicles/aircraft/model/global/aeroPerformanceMap/reynoldsNumber')
        self.cfLAM = cfLAM()
        self.cfTURB = cfTURB()
        self.cD0c = cD0c()
        self.oswald = oswald()
        self.cDMINoffset = cDMINoffset()
        self.nLam = nLam()
        self.cDw = cDw()
        self.machDD = machDD()
        self.machCrit = machCrit()
        self.cM0CR = cM0CR()
        self.cM0TO = cM0TO()
        self.cM0L = cM0L()

        # Airfoil
        self.airfoilr = airfoil(self, position='root')
        self.airfoilt = airfoil(self, position='tip')

        # Aileron
        self.aileron = aileron(self)

        # Slat
        self.slat = slat(self)

        # Flap
        self.flap = flap(self)

        # Spoiler
        self.spoiler = spoiler(self)

        # CPACS Stuff for Export to higher Level
        self.xFuselage = xFuselage()
        self.yFuselage = yFuselage()
        self.zFuselage = zFuselage()
        self.cFuselage = cFuselage()

        self.xKink = xKink()
        self.yKink = yKink()
        self.zKink = zKink()
        self.cKink = cKink()

        self.xTip = xTip()
        self.zTip = zTip()
Пример #3
0
class wing(component):
    '''
    class for the description of the wing
    inherits component for throwing errors
    Component Class
    '''

    def __init__(self, aircraft):
        '''
        will initialize instance mainly used for documentation
        links to the aircraft instance
        initiates the airfoil class
        @Method: Component Constructor
        '''
        component.__init__(self)
        self.id = 'wing'
        self.aircraft = aircraft
        self.level = 2
        self.UID = uID(cpacsPath='/cpacs/toolspecific/vampZero/wingUID')

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

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

        # Geometry
        self.location = location()		
        self.refArea = refArea(cpacsPath='/cpacs/vehicles/aircraft/model/reference/area')
        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(cpacsPath='/cpacs/vehicles/aircraft/model/reference/length')
        self.yMAC = yMAC()
        self.xMAC = xMAC()
        self.xMAC25 = xMAC25(cpacsPath='/cpacs/vehicles/aircraft/model/reference/point/x')
        self.phiLE = phiLE()
        self.phiTE = phiTE()
        self.phi25 = phi25()
        self.phi50 = phi50()
        self.dihedral = dihedral()
        self.twist = twist()
        self.xRoot = xRoot()
        self.zRoot = zRoot()
        self.LoD = LoD()
        self.etaKink = etaKink()
        self.etaEngine = etaEngine()

        # Aerodynamics
        self.cLalpha = cLalpha()
        self.cLMAX = cLMAX()
        self.formFactor = formFactor()
        self.reynoldsNr = reynoldsNr()  # cpacsPath='/cpacs/vehicles/aircraft/model/global/aeroPerformanceMap/reynoldsNumber')
        self.cfLAM = cfLAM()
        self.cfTURB = cfTURB()
        self.cD0c = cD0c()
        self.oswald = oswald()
        self.cDMINoffset = cDMINoffset()
        self.nLam = nLam()
        self.cDw = cDw()
        self.machDD = machDD()
        self.machCrit = machCrit()
        self.cM0CR = cM0CR()
        self.cM0TO = cM0TO()
        self.cM0L = cM0L()

        # Airfoil
        self.airfoilr = airfoil(self, position='root')
        self.airfoilt = airfoil(self, position='tip')

        # Aileron
        self.aileron = aileron(self)

        # Slat
        self.slat = slat(self)

        # Flap
        self.flap = flap(self)

        # Spoiler
        self.spoiler = spoiler(self)

        # CPACS Stuff for Export to higher Level
        self.xFuselage = xFuselage()
        self.yFuselage = yFuselage()
        self.zFuselage = zFuselage()
        self.cFuselage = cFuselage()

        self.xKink = xKink()
        self.yKink = yKink()
        self.zKink = zKink()
        self.cKink = cKink()

        self.xTip = xTip()
        self.zTip = zTip()

    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
        '''
        if self.aircraft.strut.active.getValue():
            self.LoD.setValueCalc(WING_LOD.SBW)

        try:
            etaKink = self.etaKink.getValue() 
            etaEngine = self.aircraft.engine.yEngine.getValue() / self.span.getValue() * 2. 
            createWingAirfoil(CPACSObj)
            createWing(CPACSObj, id=self.id, zeroWing=self, LoD=self.LoD.getValue())        
        except ZeroDivisionError, e:
            self.log.warning('VAMPzero EXPORT: WING could not be created due to "%s"!', e)
        super(wing, self).cpacsExport(CPACSObj)
Пример #4
0
class wing(component):
    '''
    class for the description of the wing
    inherits component for throwing errors
    Component Class
    '''
    def __init__(self, aircraft):
        '''
        will initialize instance mainly used for documentation
        links to the aircraft instance
        initiates the airfoil class
        @Method: Component Constructor
        '''
        component.__init__(self)
        self.id = 'wing'
        self.aircraft = aircraft
        self.level = 2
        self.UID = uID(cpacsPath='/cpacs/toolspecific/vampZero/wingUID')

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

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

        # Geometry
        self.location = location()
        self.refArea = refArea(
            cpacsPath='/cpacs/vehicles/aircraft/model/reference/area')
        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(
            cpacsPath='/cpacs/vehicles/aircraft/model/reference/length')
        self.yMAC = yMAC()
        self.xMAC = xMAC()
        self.xMAC25 = xMAC25(
            cpacsPath='/cpacs/vehicles/aircraft/model/reference/point/x')
        self.phiLE = phiLE()
        self.phiTE = phiTE()
        self.phi25 = phi25()
        self.phi50 = phi50()
        self.dihedral = dihedral()
        self.twist = twist()
        self.xRoot = xRoot()
        self.zRoot = zRoot()
        self.LoD = LoD()
        self.etaKink = etaKink()
        self.etaEngine = etaEngine()

        # Aerodynamics
        self.cLalpha = cLalpha()
        self.cLMAX = cLMAX()
        self.formFactor = formFactor()
        self.reynoldsNr = reynoldsNr(
        )  # cpacsPath='/cpacs/vehicles/aircraft/model/global/aeroPerformanceMap/reynoldsNumber')
        self.cfLAM = cfLAM()
        self.cfTURB = cfTURB()
        self.cD0c = cD0c()
        self.oswald = oswald()
        self.cDMINoffset = cDMINoffset()
        self.nLam = nLam()
        self.cDw = cDw()
        self.machDD = machDD()
        self.machCrit = machCrit()
        self.cM0CR = cM0CR()
        self.cM0TO = cM0TO()
        self.cM0L = cM0L()

        # Airfoil
        self.airfoilr = airfoil(self, position='root')
        self.airfoilt = airfoil(self, position='tip')

        # Aileron
        self.aileron = aileron(self)

        # Slat
        self.slat = slat(self)

        # Flap
        self.flap = flap(self)

        # Spoiler
        self.spoiler = spoiler(self)

        # CPACS Stuff for Export to higher Level
        self.xFuselage = xFuselage()
        self.yFuselage = yFuselage()
        self.zFuselage = zFuselage()
        self.cFuselage = cFuselage()

        self.xKink = xKink()
        self.yKink = yKink()
        self.zKink = zKink()
        self.cKink = cKink()

        self.xTip = xTip()
        self.zTip = zTip()

    ###################################################################################################
    # #Export to CPACS
    ###################################################################################################

    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
        '''
        if self.aircraft.strut.active.getValue():
            self.LoD.setValueFix(WING_LOD.SBW)

        try:
            etaKink = self.etaKink.getValue()
            etaEngine = self.aircraft.engine.yEngine.getValue(
            ) / self.span.getValue() * 2.
            createWingAirfoil(CPACSObj)
            createWing(CPACSObj,
                       id=self.id,
                       zeroWing=self,
                       LoD=self.LoD.getValue())
        except ZeroDivisionError, e:
            self.log.warning(
                'VAMPzero EXPORT: WING could not be created due to "%s"!', e)
        super(wing, self).cpacsExport(CPACSObj)