示例#1
0
    def cases(self):
        """ The run cases of AVL.

        .. note::
           The ailerons are never deflected, because due to the perfect
           symmetry, the CL does not change as a result

        """
        return [
            avl.Case(
                name='alpha_{0:0.1f}'.format(alpha),
                settings={'alpha': avl.Parameter(name='alpha', value=alpha)})
            for alpha in np.arange(self.avl_alpha_start, self.avl_alpha_end,
                                   self.avl_alpha_step)
        ]
示例#2
0
    def get_custom_avl_results(self,
                               alpha,
                               show_trefftz_plot=False,
                               show_geometry=False,
                               **kwargs):
        """

        :param alpha: the angle of attack of the wing.
        :type alpha: float
        :param show_trefftz_plot: show the trefftz plot?
        :type show_trefftz_plot: bool
        :param show_geometry: show the wing geometry?
        :type show_geometry: bool
        :param kwargs: a (set of) key-value pair(s) defining a (set of)
            movable deflection(s).

        """
        CASE_PARAMETERS = {
            'alpha': 'alpha',
            'beta': 'beta',
            'roll_rate': 'pb/2V',
            'pitch_rate': 'qc/2V',
            'yaw_rate': 'rb/2V'
        }

        VALID_CONSTRAINTS = [
            'alpha', 'beta', 'pb/2V', 'qc/2V', 'rb/2V', 'CL', 'CY', 'Cl', 'Cm',
            'Cn'
        ]

        settings = {'alpha': avl.Parameter(name='alpha', value=alpha)}
        settings.update(kwargs)

        cases = [avl.Case(name='custom', settings=settings)]

        analysis = avl.Interface(cases=cases,
                                 configuration=self.avl_configuration)
        if show_trefftz_plot:
            analysis.show_trefftz_plot()
        if show_geometry:
            analysis.show_geometry()
        return analysis.results['custom']
示例#3
0
 def cases(self):
     return avl.Case(quantify=len(self.case_settings),
                     name=self.case_settings[child.index][0],
                     settings=self.case_settings[child.index][1])
示例#4
0
 def cases(self):
     # Create the AVL case for each case that needs to be analysed
     return avl.Case(quantify=len(self.case_settings),
                     name=self.case_settings[child.index][0],
                     settings=self.case_settings[child.index][1])