# Multi-Fidelity Gradient-Based Optimization for High-Dimensional Aeroelastic Configurations
## 2 Modeling and Analysis
### Accuracy and Cost of Derivative Calculations
With 41 chordwise nodes throughout (clustered near leading and trailing edges), the LF aerodynamic meshes contained 2378 nodes and 2240 elements on the wing and 902 nodes and 800 elements on the tail. The (somewhat coarse) HF aerodynamic mesh averaged roughly 350 K nodes and 2 M cells, respectively. Structural meshes for both fidelities consisted of around 25 K nodes and 27 K CQUAD4 elements. Figure 7 shows the mean wall-clock times required to prepare and run the models versus the number of shape design variables for several parameterizations. For the LF rigid model, both the preparation and run times scaled linearly with the number of design variables, since the derivatives were computed with finite differences. Note, however, that the VLM used for the aeroelastic analysis, which is analytically differentiated, could be used instead; this has not yet been implemented and is a topic of future work. Because the other models obtain gradients through adjoint solvers, run times only depend weakly on the number of design variables. Note that for the sizing-only cases in Figure 7(i.e., cases with fewer than 300 design variables), model preparation must only be performed once if the pyCAPS instance is retained in memory. Building the IML and OML geometries and generating the aerodynamic and structural meshes made up almost all of preparation time, while rewriting the TACS input deck with different property cards was cheap in comparison. Figure 7: Mean case preparation and run times (wall-clock) as a function of shape design variables. The adjoint-based analyses (Subplots (**b–d**)) include one forward and three adjoint solves. (**a**) Low-fidelity rigid; (**b**) High-fidelity rigid; (**c**) Low-fidelity aeroelastic; (**d**) High-fidelity aeroelastic. Case preparation times did, however, increase with dimensionality. While this was most significant for the LF aeroelastic model, the finite differencing process to obtain geometric sensitivities can be carried out in parallel. The case preparation time was also significant for the rigid high-fidelity model. While other airfoil parameterizations in ESP (e.g., PARSEC or NACA) are fully differentiated, Kulfan primitives still rely on internal finite differencing to obtain aerodynamic design velocities, which slows down the process marginally. A more significant increase in sensitivity calculation time was caused by the union of the fuselage and wing, as well as how the fuselage hump is formed (through splining with sketch primitives, which are also not differentiated). For instance, for the highest-dimensional rigid model, the wing and tail alone required 1.7 min for building the geometry, meshing, and computing surface mesh sensitivities. When done with the fuselage included, this required 5.4 and 7.3 min when excluding and including the fuselage hump, respectively. The structure's wingbox also uses sketch primitives and a number of intersections and unions, so further improvements in sensitivity speeds would likely be required before including structural design velocities in the aeroelastic adjoint gradients. Fortunately, the case preparation times were insignificant for the HF aeroelastic case (when excluding structural design velocities) due to the much greater run times. A similar situation would be expected for the RANS equations, which would require finer grids and longer run times than for Euler.