## 4 Multidisciplinary Design, Analysis, and Optimization of an Adaptive Wing
### Airfoil Shape Optimization  
A genetic algorithm (GA) was used for the generation of new airfoil shapes, starting from their reference shape. This type of algorithm is used in computing to find true or approximate solutions to optimization and search problems and is inspired by the evolutionary principles of biology. The global functioning of genetic algorithms (GA) follows five distinct steps [23]. In the first step, the initial population needs to be created in order to reduce the calculation time. Each individual of this population is a potential solution to the problem. In the second step, the individuals are evaluated in order to create the next generation. The evaluation function is user-defined as the users determine which individuals are selected. In the third step, new individuals are created. Once the best individuals are selected, the new ones are created by \"mutation\" or \"crossover\". In the fourth step, the new individuals are added to the population, while the N best individuals of this population are selected. Finally, the fifth step consists of iterating the previous steps until the best solution is found. The evaluation function that defines the evolution of the population is the \"fitness function\". The GA follows the Darwinian evolution principle via genetic selection and gives valid shapes for almost any combination of parameters characterizing the (i) camber, (ii) location, and (iii) maximum thickness of the airfoils. Certain combinations will be excluded; for instance, high curvature combined with a strong trailing edge deflection can result in undesired airfoil shapes. The optimization method used on the S45 airfoil is presented in Figure 11. This method is focused on optimizing the upper surface part located between 30% and 67% of the chord. This area was chosen because both the leading edge and the flap zone must not be deformed. A MATLAB script was developed in-house to perform the airfoil optimization by using the class/shape transformation (CST) method to parameterize the airfoil, the ABC algorithm to optimize the shape of the airfoil, and the numerical 2D XFoil solver to run the aerodynamics calculations. Another script was used to run the calculations with the PSO and ABC algorithms and thus to allow the results given by each algorithm to be compared. The optimization method was based on the previous work performed by [PERSON], [PERSON], [PERSON], et al. [24]. The optimization is applied to the airfoil between 30% and 67% of its chord and is limited to \(\pm\)5 mm of displacement in the direction normal to the airfoil. This study has also been conducted in previous projects at our LARCASE laboratory, where we measured the flow transition point \"displacement\" in wind tunnel tests with the use of very sensitive pressure sensors (Kulite XCQ_062), which were able to detect the Tollmien-Schlichting frequencies (Project CRIAQ MDO 505). A new numerical technique was developed at the LARCASE by [PERSON] et al. [15]; it allows the detection of the transition point location using the pressure distribution at the upper surface of the wing (Cp values); the first derivative of the Cp versus the chord variation curve shows the laminar-to-turbulence transition point location using an inflection point in the Cp curve. In our work, the Kulite sensor could not be installed on the wing prototype because it required the drilling of holes on the prototype skin, and the thickness of the skin (of the prototype) was too thin to keep the Kulite sensors \"flush mounted\", meaning straight and perpendicular to the skin surface. The Cp variation with the chord was solved with the XFoil software, and the first derivative of the Cp curves was obtained using MATLAB. Figure 12 shows the final particle swarm optimized (PSO) airfoil, which has a transition point delayed to 0.3% of the chord. Figure 13 shows the Cp derivative of a non-optimized (reference) airfoil, with an inflection point located at 0.27% of the chord and the optimized PSO airfoil, with an inflection point delayed to 0.3% of the chord.