Ejemplo n.º 1
0
    def __init__(self,Sref,Lref,database=None,aeroShape=None,aOaList=None):
        '''
        Constructor for a polar.
        @param Sref : reference surface
        @param Lref : reference length        
        @param database : the dataBase in which the discrete values are stored, or None
        @param aeroShape : the aeroShape from which the polar should be built, or None if the database is already fulfilled
        @param aOaList : the angles of attack list on which  polar should be built, or None if the database is already fulfilled
        '''
        DifferentiatedAeroShape.__init__(self,Sref,Lref)
        self.__Sref=Sref
        self.__Lref=Lref
        self.__aeroShape=aeroShape
        self.__aOaList=aOaList
        self.__ClInterpolator=Kriging()
        self.__CdInterpolator=Kriging()
        self.__CmInterpolator=Kriging()

        if database is not None:
            self.__database=database
            self.__buildFromDatabase(database)
        elif aeroShape is not None and aOaList is not None:
            self.__database=Database()
            self.__buildFromAeroShape(aOaList,aeroShape)
        else:
            raise Exception, 'A polar initialization must be done either from a non-Null Database or a non-Null AeroShape and aOaList.'
Ejemplo n.º 2
0
    def __init__(self,
                 Sref,
                 Lref,
                 database=None,
                 aeroShape=None,
                 aOaList=None):
        '''
        Constructor for a polar.
        @param Sref : reference surface
        @param Lref : reference length        
        @param database : the dataBase in which the discrete values are stored, or None
        @param aeroShape : the aeroShape from which the polar should be built, or None if the database is already fulfilled
        @param aOaList : the angles of attack list on which  polar should be built, or None if the database is already fulfilled
        '''
        DifferentiatedAeroShape.__init__(self, Sref, Lref)
        self.__Sref = Sref
        self.__Lref = Lref
        self.__aeroShape = aeroShape
        self.__aOaList = aOaList
        self.__ClInterpolator = Kriging()
        self.__CdInterpolator = Kriging()
        self.__CmInterpolator = Kriging()

        if database is not None:
            self.__database = database
            self.__buildFromDatabase(database)
        elif aeroShape is not None and aOaList is not None:
            self.__database = Database()
            self.__buildFromAeroShape(aOaList, aeroShape)
        else:
            raise Exception, 'A polar initialization must be done either from a non-Null Database or a non-Null AeroShape and aOaList.'
Ejemplo n.º 3
0
    def __init__(self, OC, Sref, Lref, rel_thick=0.0, sweep=0.0, camber=0.0):
        '''
        Constructor
        @param Sref : reference surface
        @param Lref : reference length
        '''
        DifferentiatedAeroShape.__init__(self, Sref, Lref)
        self.__OC = OC

        self.__rel_thick = rel_thick
        self.__rel_thick_grad = 0.

        self.__camber = camber
        self.__camber_grad = 0.

        self.__sweep = sweep
        self.__sweep_grad = 0.
Ejemplo n.º 4
0
 def __init__(self, OC, Sref, Lref, rel_thick=0.0, sweep=0.0, camber=0.0):
     '''
     Constructor
     @param Sref : reference surface
     @param Lref : reference length
     '''
     DifferentiatedAeroShape.__init__(self,Sref,Lref)
     self.__OC = OC
     
     self.__rel_thick = rel_thick
     self.__rel_thick_grad = 0.
     
     self.__camber      = camber
     self.__camber_grad = 0.
     
     self.__sweep      = sweep
     self.__sweep_grad = 0.