# Flight Simulation

Lecture: Wednesday, 16.00-18.00 (Sal 104),
Exercise: Wednesday, 18.00-20.00 (Sal 104+137)
First lecture is on 05.10.2016. Students are expected to attend the lectures and the exercises. Exercises are checked and graded!

## Prerequisites

You must know basics of differential calculus, linear algebra, mechanics, and computer graphics. You must be good at C++. This is a serious course, involving a lot of mathematics!

## Topics

First five lectures: Differential equations. Numerical methods for solving differential equations. Order of a numerical method. Runge-Kutta Methods. We apply RK methods to orbits, Lagrange points, and rocket trajectories. Analytic solutions of systems of linear differential equations. Qualitative behavior of solutions.

Next two lectures: Basics of mechanics. The notions of mass center, torque (moment), and momentum. Definition of rigid body. Derivation of laws for rigid body movement.

Two lectures: Properties of airfoils. Typical lift/drag curves. Notion of aerodynamic center, and its importance for stability. Theory of longitudinal stability. Kutta-Joukowski law: Lift = Uniform Flow X Circulation.

One lecture: Representation of orientation by quaternions. Role of quaternions in simulation and computer graphics.

One/two lectures: Application of rigid-body laws to airplanes. Theory of stability in three dimensions. The four stability modes. How to enhance stability with automatic controls. (Autopilots.)

One lecture: Detecting contacts with the ground or other objects. There exist collisions and there exist controlled ground contacts. In order to be able to simulate landings and take offs, one need to detect when the airplane touches the ground, in which way it touches the ground, and what forces these contacts create.

One lecture: Modelling of wheels.

## SFML (Simple and Fast Multimedia Library)

I use SFML as Window Manager, and as interface to OpenGL. SMFL can be obtained from here . You need version 2.0 or higher. Installing SFML in Ubuntu is easy, because it has the correct version in the package manager. Unfortunately, Debian still has version 1.6. The differences are not big, but they are irritating, so try to get version 2.0 or later.

## Open GL

SFML supports computer graphics through OpenGL. The homepage of Andrzej Lukaszewski contains a lot of pointers to openGL. The Red Book used to be the main source for learning OpenGL. It is outdated, because the standard commands are now deprecated, and one should use shading language. Even when the commands in the Red Book are outdated, the algorithms are still valid, so it is still useful to look at the first 5 sections.

## Lectures

• 5.10.2016. General introduction . Movement of a point mass under gravity. Movement of a group of point masses under each other's gravity. Modelling of rockets. slides .
• 12.10.2016. Exponentiality of rocket propulsion. (Ciolkowski equation.) The Oberth-Effect. (Using a rocket engine at low potential energy is more effective than using one at high potential energy). Differential equation for suspension bridge, and differential equation for free hanging chain. Reducing the order of a differential equation, making it autonomous, and Euler's method for numerical solving.

It was asked why rockets cannot be launched from airplanes, this is my answer.

• 19.10.2016. Runge-Kutta Methods for solving differential equations. (Slides). Demonstration of the order of a numerical method on the equation for the catenoid. chain.cpp and runge_kutta.h.
• 26.10.2016. Simulation of Saturn 5.
• 02.11.2016. Rector day.
• 09.11.2016. Quaternions. Use of quaternions for the representation of rotations.
• 16.11.2016. More about quaternions. How to find a quaternion, using the Quaternion Finder. Basic formula of airfoils. Definitions of lift and drag.
• 23.11.2016. Fundamental properties of airfoils: center of pressure, moment coefficient, aerodynamic center. Inherent instability of airfoils. Finding maximal gliding distance, finding most efficient angle of attack. Start of mechanics of rigid objects in two dimensions. Slides.
• 30.11.2016. Completion of two-dimensional flight model. Demonstration of (somewhat) working code.
• 07.12.2016. Mechanics in 3D. Starting from basic axioms, we derive the laws of motion for rigid objects in 3 dimensions. It will take two lectures. Last week I told you that modelling wheels in 2D, is 'easy', but unfortunately this turned out a lie. I hope to make it next week.
• 14.12.2016. Laws of movement for rigid objects in 3 dimensions. Slides.
• 11.01.2017. Laws of movement for rigid objects in 3 dimension. Demonstration of an implementation. Comparison with an elementary implementation based on point-masses.
• 18.01.2017. Collision detection. Slides. I improved the slides, because they were too messy.
• 25.01.2017. Wheels
• 01.02.2017. Stability analysis through eigenvalues. Slides. The slides are completed, corrected, recorrected, and the results are now in agreement with the observations from the 2-dimensional simulation. (The current version is from 3 feb, 17.47.)

## Exercises

• Exercise 0 is due on 12.10.2016.
• Exercise list 1. (I updated it, but it is not changed.) Deadline is 19.10.2016.
• Exercise list 2. This exercise must be handed in on 26.10.2016.
• Exercise list 3, which must be handed in on 16.11.2016.
• Exercise list 4, which must be handed in on 23.11.2016. (You need this drawing.)
• Exercise list 5, which must be handed in on 30.12.2016. You need page 416/417 from A.C. Kermode, Mechanics of Flight.
• Exercise list 6, which must be handed in on 07.12.2016, (one week later.)
• Exercise list 7, which must be shown on 11.01.2017 in Lab 137. You need this code.
• Exercise list 8. You need this two dimensional simulation. This is the last exercise. flatland2017 also contains the code for rigid object simulation in three dimensions that was shown on 11.01.2017.