Example #1
0
 def update_aero_trim(
     self, velocity, altitude, CmTrim=0.0, loadFactor=1.0, mass=None, cg=None, inertia=None, CD0=None
 ):
     """
     Updates results of aerodynamic analysis at trim condition using AVL solver. Stores the result 
     of analysis in self.aeroResults.
     
     Parameters
     ----------
     
     velocity : float, m/sec
         true airspeed of the aircraft. If velocity<5 then it is treated as Mach number, otherwise 
         airspeed in m/sec.
     altitude : float, m
         density altitude at which analysis is performed
     CmTrim : float
         Required moment coefficient. By default CmTrim=0 - no pitching moment.
     loadFactor : float
         load factor can be used for gust analysis: analysis is performed with mass= mass*loadFactor
     mass : float, kg
         aircraft mass. If value is not defined then total aircraft mass will be calculated.
     cg : array, m
         center of gravity in format array([x,y,z]). If value is not specified then value will be 
         calculated
     inertia : array, kg*m2
         aircraft moment of inertia in format array([Ixx, Iyy, Izz]). Required for dynamic 
         stability calculation.
     CD0 : float
         parasite drag coefficient. If value is not specified then value will be calculated.
     """
     aero = Aerodynamics(self)
     fc = FlightConditionsAVL(self, velocity, altitude, CmTrim, loadFactor, mass, cg, inertia, CD0)
     self.aeroResults = aero.run_trim(fc)
Example #2
0
 def get_aero_single_point(self,velocity=None,altitude=None,alpha=0.0,beta=0.0,
                           elevator=0.0,mass=None,cg=None,inertia=None,CD0=None):
     """
     Performs aerodynamic analysis using AVL at given aircraft configuration and flight condtions.
     
     
     Parameters
     ----------
     
     velocity : float, m/sec
         true airspeed of the aircraft. If velocity<5 then it is treated as Mach number, otherwise 
         airspeed in m/sec.
     altitude : float, m
         density altitude at which analysis is performed
     alpha : float, deg
         aircraft angle of attack
     beta : float, deg
         aircraft sideslip angle
     elevator : float, deg
         elevator deflection. positive direction is down.
     mass : float, kg
         aircraft mass. If value is not defined then total aircraft mass will be calculated.
     cg : array, m
         center of gravity in format array([x,y,z]). If value is not specified then value will be 
         calculated
     inertia : array, kg*m2
         aircraft moment of inertia in format array([Ixx, Iyy, Izz]). Required for dynamic 
         stability calculation.
     CD0 : float
         parasite drag coefficient. If value is not specified then value will be calculated.
     """
     if velocity==None:
         velocity = self.designGoals.cruiseSpeed
     if altitude==None:
         altitude = self.designGoals.cruiseAltitude
     aero = Aerodynamics(self)
     fc = FlightConditionsAVL(self,velocity,altitude,0,1,mass,cg,inertia,CD0)
     alpha = float(alpha)
     beta = float(beta)
     elevator = float(elevator)
     self.aeroResults = aero.run_single_point(fc,alpha,beta,elevator)
     return self.aeroResults