OpenVOGEL/Free flight

From Wikibooks, open books for an open world
Jump to navigation Jump to search

Free flight simulation in OpenVOGEL[edit | edit source]

One of the most recent features developed in the OpenVOGEL suit is the free flight simulation module. This module combines the unsteady aeroelastic solver (which provides air loads for a given flow field) with the numerical integration of the rigid body equations of motion (in 6 degrees of freedom). It resembles in some aspects the aeroelastic module, but here the flow field is directly manipulated from the outcome of the equations (in the aeroelastic module, the variation of the flow field is a consequence of the repositioning if the shedding edges).

Coupling algorithm[edit | edit source]

The free flight simulation consists of an algorithm that couples the air loads and the motion. The air-loads are first computed using the instantaneous flow field at the beginning of each time step using the previous state. Based on these air loads, the motion is predicted (through numerical integration) for the next time step and the result is translated into a new flow field. The air loads are then recomputed in the new state and the motion is corrected in a cycle that is repeated until convergence is reached. Once the convergence criteria are met, the time is advanced by one step.

Equations of motion[edit | edit source]

If we attempt to write the equations of motion of a rigid body in an inertial reference frame, the inertial properties of the body become time dependent. So to reduce the complexity of the equations, the motion can better be described from the point of view of the body itself (a non inertial reference frame), where the inertia tensor is an invariant. Additionally, to avoid having the kinetic moment being coupled to the momentum, it is convenient to take the reference point for the moments as the center of gravity. Finally, to avoid a complex coupling of the angular velocities in the angular momentum equations, it is much simpler to align the axes with the main axes of inertia.

With all this said, the equations of motion for the rigid aircraft model including the external forces and gravity field can be written as follows [1]:

Note that we have used Tenembaum's notation, in which the superscript R at the left of the differential operator means that the derivatives are taken with respect to the inertial reference frame (for the sake of simplicity, the earth in our case).

To convert the derivatives to the non inertial reference frame A (the moving aircraft), we use the reference frame transformation formula:

where is a generic vector.

The equations turn now to be:

Tenembaum would accurately write the angular velocity vector as , however, to simplify the notation (and because we only have two reference frames here) we simply write to refer to the angular velocity of the aircraft with respect to the earth. The matrix is the tensor of inertia, which for us is an identity matrix with , and in the main diagonal and 0's anywhere else.

In order to use the equations for numerical computations, it is necessary to write them in scalar form and to leave the derivatives alone at the left side:

Momentum







Angular momentum (Euler's equations)






These six equations are not sufficient to describe the motion, since the gravity acceleration vector also varies with time in the non inertial reference frame A. So we need to add the next three kinematic equations to the set:

and thus, in scalar form:

Rotation of the gravity field






Finally, if we want to output the position of the aircraft, then we need to integrate it in parallel also:

Position






Note that this position will be relative to the aircraft reference coordinates, so to make it mean full, all points should be remapped to the global reference frame. The program does this when loading the results using the last orientation of the model.

Numerical integration[edit | edit source]

All the equations derived above form an initial value problem with 12 variables that can be solved using an appropriate numerical integration algorithm. One would probably think of the Runge-Kutta methods as first option, however they are not a good option since they require evaluating the forces at an intermediate time step, creating a complex scheme in our case (the UVLM method is quite heavy to be called continuously). Therefore, probably the best option is to use some kind of predictor corrector method that uses a fixed time step.

The numerical algorithm programmed in OpenVOGEL follows an scheme from Preidikman. This scheme is self-starting. It starts with the Euler method, then it switches to two Adams-Bashford and Adams-Moulton steps of increasing grade, and from the fourth step on it uses the Hamming method only.

In the next frames, vector X is the array (or better said, the record) containing all independent variables of the equations, and vector DX is the array containing the associated derivatives.

Time step 1

> Predict using initial derivatives (Euler)

 X(1) = X(0) + Dt * DX(0)

> Correct for K=0 to M (Modified Euler)

 Calculate new forces and derivatives...

 X(1) = X(0) + (0.5# * Dt) * (DX(0) + DX(1))


Time step 2

> Predict using previous derivatives (Adams-Bashford)

 X(2) = X(1) + (0.5# * Dt) * (3.0# * DX(1) - DX(0))

> Correct for K=0 to M (Adams-Moulton)

 Calculate new forces and derivatives...

 X(2) = X(1) + (Dt / 12.0#) * (5.0# * DX(2) + 8.0# * DX(1) - DX(0))


Time step 3

> Predict using previous derivatives (Adams-Bashford)

 X(3) = X(2) + (Dt / 12.0#) * (23.0# * DX(2) - 16.0# * DX(1) + 5.0# * DX(0))

> Correct for K=0 to M (Adams-Moulton)

 Calculate new forces and derivatives...

 X(3) = X(2) + Dt / 24.0# * (9.0# * DX(3) + 19.0# * DX(2) - 5.0# * DX(1) + DX(0))

 TE(3) = (9.0# / 121.0#) * (X(3) - XS)


Time steps S = 4 to N (Hamming)

> Predict using previous derivatives

 XP = X(S - 4) + (Dt * 4.0# / 3.0#) * (2.0 * DX(S - 1) - DX(S - 2) + 2.0 * DX(S - 3))
 
 X(S) = XP + 112.0# / 9.0# * TE(S - 1)

> Correct for K=0 to M

 Calculate new forces and derivatives...

 X(S) = (1.0# / 8.0#) * (9.0# * X(S - 1) - X(S - 3) + 3.0# * Dt * (DX(S) + 2.0# * DX(S - 1) - DX(S - 2)))
 
 TE(S) = (9.0# / 121.0#) * ((X(S) - XP))
 
 X(S) = X(S) - TE(S)

Validation[edit | edit source]

Validation of the numerical integration algorithm using a simple harmonic oscillator

Our VB.NET implementation of the algorithm has been validated for a simple 1-D harmonic oscillator. In such a system the force is a linear function of the position and the velocity:

The analytic solution for the displacement considering only an initial velocity is [2][3]:

where:

The agreement of the numerical solution for this problem is excellent, as can be seen on the previous graphic. With 400 time steps and a time inteval of 0.025s, the simulation time was 10 seconds. Along the complete integration domain, the error could be maintained under 0.5%.

Reference[edit | edit source]

  1. "Fundamentals of applied dynamics", Roberto A. Tenembaum
  2. "Introducción a la dinámica estructural", Julio Massa
  3. "Física I", Marcelo Alonso, Edward J. Finn