The matlab codebase FlexWing-ROM models fluid structure interaction (FSI) of flexible wings and generates data-driven reduced order models that can be used for analysis and control.
The different methods are introduced in the JOSS paper Fasel et al. (2022).
MAIN.m
Generates a wing model (e.g. NACA0012 or NACA6418, morphing or non-morphing), runs different FSI test cases, and generates and compares reduced-order models.
Two different flexible wings are used in the tutorials, shown in the figure below. On the left, a NACA6418 morphing wing (five compliant ribs on each side), and on the right, a NACA0012 non-morphing wing (no compliant ribs).
-
example1_NACA0012_FSI_modal_vs_displacement.m
- Comparing a modal vs. displacement FE-model FSI (on a NACA0012).
-
example2_NACA6418_unsteadyFSI.m
- Runs an unsteady panel method FSI (on a NACA6418) and animates the wake and wing displacements. The animation shows sinusoidal pitching (left) and morphing (right)
-
example3_NACA0012_unsteadyPM_vs_Theodorsen.m
- Comparing an unsteady panel method (on a NACA0012) with Theodorsen's function.
-
- Comparing three data-driven reduced-order models using a NACA6412 morphing wing.
The following matlab toolboxes are required to run the code:
- Control System Toolbox
- System Identification Toolbox
- Statistics and Machine Learning Toolbox
- Parallel Computing Toolbox
XFOIL is used to calculate the viscous drag and maximum lift coefficient of the airfoil. The XFOIL version only runs on Windows. In case the code is run on Linux, the airfoil coefficients are loaded from precalculated tables for NACA0012 and NACA6418.
FlexWingROM is a matlab codebase that contains a fully parametrized wing model generator, a fluid-structure interaction solver, and three recent data-driven parametric reduced order modeling methods for flexible wings.
The main code structure is shown in the figure above. First, a flexible wing FSI model is generated that is coupling a finite element code with a 3D unsteady panel method. The wing design is fully parametrised and can be defined in wingDesignAndSimParameters.m (e.g. the airfoil shape (currently four digit NACAs implemented), the planform, the material properties, structural design, ...).
The open source FE-code YetAnotherFEcode and parts of the Apame 3D panel code and XFOIL are used:
-
Finite element code:
- Shobhit Jain, Jacopo Marconi & Paolo Tiso (2020). YetAnotherFEcode. Zenodo.
-
3D unsteady panel method
- Based on J Katz, A Plotkin. Low-speed aerodynamics, Cambridge university press, 2001
- Steady panel method matlab implementation: Apame
-
XFOIL
- M. Drela. XFOIL
- Matlab interface 2011 by Rafael Oliveira
The FSI model of the flexible wing is then used to run some test cases
- Modal vs. full FE-model FSI runSteadyFSItestcases.m
- Unsteady FSI runUnsteadyFSItestcases.m
- Comparison unsteady panel method vs. Theodorsen's function runTheodorsenFSItestcases.m
The main features of the code are three data-driven (parameter varying) reduced order modeling approaches (ROM.m):
- algebraic dynamic mode decomposition with control
- input output reduced-order model
- balanced mode decomposition
The FSI solver is used to generate synthetic impulse response data sets that are stored in data files. These are used to build and test the three different reduced order models. Each method can be used to first generate local linear models that are accurate around a single operating condition. Then, depending on each method, interpolation schemes are introduced to build parameter varying models that are accurate over multiple operating conditions. The accuracy of the method is evaluated and the different methods are compared.
Most importantly, the model order reduction methods can be used with other fluid or fluid structure data sets (both numerical and experimental), by loading any external impulse response data. Therefore, the code should be widely applicable and useful for generating accurate and efficient reduced order models.
If you would like to contribute an example or extend a method (e.g. new ROM variants or advanced functionalities), reach out to us by creating an issue!
If you find a bug in the code or need help using FlexWingROM please create an issue.
The code is mainly based on the following publications:
-
N. Fonzi, S. L. Brunton, U. Fasel. Data-driven nonlinear aeroelastic models of morphing wings for control. Proceedings of the Royal Society A, 2020.
-
A. Iannelli, U. Fasel, R. S. Smith. The balanced mode decomposition algorithm for data-driven LPV low-order models of aeroservoelastic systems. Aerospace Science and Technology, 2021.
-
J. Annoni, P. Seiler. A method to construct reduced‐order parameter‐varying models. International Journal of Robust and Nonlinear Control, 2017.
-
G. Molinari, A. F. Arrieta, and P. Ermanni. Aero-structural optimization of three-dimensional adaptive wings with embedded smart actuators. AIAA Journal, 2014.
-
U. Fasel, P. Tiso, D. Keidel, G. Molinari, P. Ermanni. Reduced-order dynamic model of a morphing airborne wind energy aircraft. AIAA Journal, 2019.