コード例 #1
0
    def __init__(self, aircraft):
        '''
        initializes fuselage object
        mostly used for documentation
        establishes link to the aircraft class
        @Method: Component Constructor
        '''
        component.__init__(self)
        self.id = 'fuselage'
        self.aircraft = aircraft
        self.level = 2

        #Mass
        self.mFuselage = mFuselage()
        self.mFurn = mFurn(
            cpacsPath='/cpacs/vehicles/aircraft/model/analyses/massBreakdown/mOEM/mEM/mFurnishing/massDescription/mass')
        self.mStructure = mStructure(
            cpacsPath='/cpacs/vehicles/aircraft/model/analyses/massBreakdown/mOEM/mEM/mStructure/mFuselagesStructure/mFuselageStructure/massDescription/mass')

        #CoG
        self.posCoG = posCoG(
            cpacsPath='/cpacs/vehicles/aircraft/model/analyses/massBreakdown/mOEM/mEM/mStructure/mFuselagesStructure/mFuselageStructure/massDescription/location/x')

        #Geometry
        self.xRoot = xRoot()# the fuselages origin
        self.dfus = dfus()
        self.lfus = lfus()#cpacsPath='/cpacs/toolspecific/joeFuMo/lfuselage')
        self.lcabin = lcabin()#cpacsPath='/cpacs/toolspecific/joeFuMo/deck/length')
        self.lcockpit = lcockpit()
        self.lnose = lnose()#cpacsPath='/cpacs/toolspecific/joeFuMo/lnose')
        self.ltail = ltail()#cpacsPath='/cpacs/toolspecific/joeFuMo/ltail')
        self.loverlay = loverlay()#cpacsPath='/cpacs/toolspecific/joeFuMo/loverlay')
        self.wetArea = wetArea()
        self.LoD = LoD()

        #Cabin
        self.nRow = nRow()
        self.nPaxR = nPaxR()
        self.nAisle = nAisle()
        self.nClasses = nClasses()
        self.refLayout = refLayout()#cpacsPath='/cpacs/toolspecific/joeFuMo/deck/refLayout',)
        self.refAbreast = refAbreast()#cpacsPath='/cpacs/toolspecific/joeFuMo/deck/refAbreast',)
        self.cargoDeck = cargoDeck()#cpacsPath='/cpacs/toolspecific/joeFuMo/cargoDeck')
        self.paxDensity = paxDensity()
        self.dcabin = dcabin()
        self.hcabin = hcabin()
        self.vcabin = vcabin()
        self.yFloor = yFloor()
        self.zFloor = zFloor()

        #Aerodynamics
        self.formFactor = formFactor()
        self.reynoldsNr = reynoldsNr()
        self.cfLAM = cfLAM()
        self.cfTURB = cfTURB()
        self.cD0c = cD0c()
        self.dragArea = dragArea()
        self.nLam = nLam()
コード例 #2
0
class fuselage(component):
    '''
    fuselage Class
    '''

    def __init__(self, aircraft):
        '''
        initializes fuselage object
        mostly used for documentation
        establishes link to the aircraft class
        @Method: Component Constructor
        '''
        component.__init__(self)
        self.id = 'fuselage'
        self.aircraft = aircraft
        self.level = 2

        #Mass
        self.mFuselage = mFuselage()
        self.mFurn = mFurn(
            cpacsPath='/cpacs/vehicles/aircraft/model/analyses/massBreakdown/mOEM/mEM/mFurnishing/massDescription/mass')
        self.mStructure = mStructure(
            cpacsPath='/cpacs/vehicles/aircraft/model/analyses/massBreakdown/mOEM/mEM/mStructure/mFuselagesStructure/mFuselageStructure/massDescription/mass')

        #CoG
        self.posCoG = posCoG(
            cpacsPath='/cpacs/vehicles/aircraft/model/analyses/massBreakdown/mOEM/mEM/mStructure/mFuselagesStructure/mFuselageStructure/massDescription/location/x')

        #Geometry
        self.xRoot = xRoot()# the fuselages origin
        self.dfus = dfus()
        self.lfus = lfus()#cpacsPath='/cpacs/toolspecific/joeFuMo/lfuselage')
        self.lcabin = lcabin()#cpacsPath='/cpacs/toolspecific/joeFuMo/deck/length')
        self.lcockpit = lcockpit()
        self.lnose = lnose()#cpacsPath='/cpacs/toolspecific/joeFuMo/lnose')
        self.ltail = ltail()#cpacsPath='/cpacs/toolspecific/joeFuMo/ltail')
        self.loverlay = loverlay()#cpacsPath='/cpacs/toolspecific/joeFuMo/loverlay')
        self.wetArea = wetArea()
        self.LoD = LoD()

        #Cabin
        self.nRow = nRow()
        self.nPaxR = nPaxR()
        self.nAisle = nAisle()
        self.nClasses = nClasses()
        self.refLayout = refLayout()#cpacsPath='/cpacs/toolspecific/joeFuMo/deck/refLayout',)
        self.refAbreast = refAbreast()#cpacsPath='/cpacs/toolspecific/joeFuMo/deck/refAbreast',)
        self.cargoDeck = cargoDeck()#cpacsPath='/cpacs/toolspecific/joeFuMo/cargoDeck')
        self.paxDensity = paxDensity()
        self.dcabin = dcabin()
        self.hcabin = hcabin()
        self.vcabin = vcabin()
        self.yFloor = yFloor()
        self.zFloor = zFloor()

        #Aerodynamics
        self.formFactor = formFactor()
        self.reynoldsNr = reynoldsNr()
        self.cfLAM = cfLAM()
        self.cfTURB = cfTURB()
        self.cD0c = cD0c()
        self.dragArea = dragArea()
        self.nLam = nLam()

    ###################################################################################################
    ##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
        '''
        # level of detail
        self.log.debug("lfus,lcabin,lcockpit,lnose,ltail,loverlay: %s, %s, %s, %s, %s, %s" % (
            self.lfus.getValue(), self.lcabin.getValue(), self.lcockpit.getValue(), self.lnose.getValue(),
            self.ltail.getValue(), self.loverlay.getValue()))
        createFuselageProfile(CPACSObj, 'Circle')
        createFuselage(CPACSObj, self.id, self.dfus.getValue(), self.lnose.getValue(),
                       self.lfus.getValue() - self.ltail.getValue() - self.lnose.getValue(), self.ltail.getValue(),
                       self.LoD.getValue())

        super(fuselage, self).cpacsExport(CPACSObj)