예제 #1
0
    def compute_flight_points(self, flight_point: FlightPoint):

        if flight_point.thrust_is_regulated or flight_point.thrust_rate is None:
            flight_point.thrust_rate = flight_point.thrust / self.max_thrust
        else:
            flight_point.thrust = self.max_thrust * flight_point.thrust_rate

        flight_point.sfc = self.max_sfc * (1.0 + flight_point.thrust_rate) / 2.0
예제 #2
0
    def _compute_cruise_mass_ratio(self, start: FlightPoint, cruise_distance):
        """
        Computes mass ratio between end and start of cruise

        :param start: the initial flight point, defined for `CL`, `CD`, `mass` and`true_airspeed`
        :param cruise_distance: cruise distance in meters
        :return: (mass at end of cruise) / (mass at start of cruise)
        """

        if self.use_max_lift_drag_ratio:
            lift_drag_ratio = self.polar.optimal_cl / self.polar.cd(self.polar.optimal_cl)
        else:
            lift_drag_ratio = start.CL / start.CD
        start.thrust = start.mass / lift_drag_ratio * g
        self.propulsion.compute_flight_points(start)

        range_factor = start.true_airspeed * lift_drag_ratio / g / start.sfc
        return 1.0 / np.exp(cruise_distance / range_factor)
예제 #3
0
 def _compute_propulsion(self, flight_point: FlightPoint):
     flight_point.thrust = flight_point.drag
     flight_point.thrust_is_regulated = True
     self.propulsion.compute_flight_points(flight_point)