Sie sind auf Seite 1von 55

Mathematical Modelling

Investigation of Gliders Trajectory

Anil Kutuwo Vu Le
Nepal Viet Nam

June 27, 2017


Summary

Mathematical modelling is a powerful tool that is used extensively to solve


real-life problems by engineers and scientists in many disciplines. Therefore,
in the investigation of the flight trajectory of a glider, a mathematical model
was constructed. The project was completed in a group of two students and
the topic was assigned in accordance to the online course MathMod MOOC
provided by TU Delft.

Included in this report are three essential steps that are necessary for any
mathematical modelling cycle. At first, the project was initiated by the process
of gathering data. As will be presented in the content of this report, all the
data collected are proved to be essentially fundamental, meaning that the
gliders model cannot be solved without the existences of them. To simulate the
flight path of a glider, a system of four differential equations are introduced, of
which two are derived from Newtons second law of motion while the remaining
are derived for the determination of the gliders position in space during its
flight.

Secondly, in solving the abovementioned system of equations of a glider, Eu-


lers method was used and implemented in the Python programming language
to find the solutions numerically. Accordingly, a range of simulations were it-
erated several times to investigate numerous situations of the problem to gain
a full comprehension of the model. In addition, the effect of different variables
on the behaviours of solutions were also observed and evaluated.

Finally, validation procedure was carried out by first solving analytically the
governing equations of the gliders model and then comparison between solu-
tions obtained from two approaches was made. As a result of this, the model
was confirmed to work correctly and gave sufficiently precise solutions to the
problem. Nevertheless, it was found that the included variables, despite being
fundamentally essential, were only crudely replicate the reality. Consequently,
it was concluded that further refinement should be made and suggestions are
included in the final chapter of this report.

3
Contents

Summary 3

List of variables 7

1 Introduction 8

1.1 Why mathematical modelling? . . . . . . . . . . . . . . . . . . 8

1.2 How to describe gliders flight . . . . . . . . . . . . . . . . . . . 8

1.3 A brief overview . . . . . . . . . . . . . . . . . . . . . . . . . . 9

1.4 Limitation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

1.5 Outline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

2 Mathematical modelling of glider 11

2.1 Data collection . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

2.2 Mathematical model of glider . . . . . . . . . . . . . . . . . . . 12

2.3 Research on lift and drag coefficients . . . . . . . . . . . . . . . 13

2.4 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

3 Model simulation 16

3.1 Determining the step size in modelling . . . . . . . . . . . . . . 16

3.1.1 Step size for determining precise gliders angle of orien-


tation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

4
3.1.2 Step size for determining precise velocity . . . . . . . . 17

3.1.3 Step size for further model simulation . . . . . . . . . . 18

3.1.4 Simulation of glider system for velocity and orientation 19

3.2 Evaluating trajectory of glider . . . . . . . . . . . . . . . . . . . 20

3.3 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20

4 Model validation 22

4.1 Analytical solutions at equilibrium point . . . . . . . . . . . . . 22

4.2 Determination of CD and CL . . . . . . . . . . . . . . . . . . . 23

4.3 Period of oscillation from analytical solution . . . . . . . . . . . 24

4.4 Flight simulation for initial condition . . . . . . . . . . . . . . . 25

4.5 Period of oscillation from flight simulation . . . . . . . . . . . . 25

4.6 Comparison of period of oscillation . . . . . . . . . . . . . . . . 26

4.7 Phase plan . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

4.8 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28

5 Conclusion 29

5.1 Main problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

5.2 Mathematical modelling . . . . . . . . . . . . . . . . . . . . . . 29

5.3 Model simulation . . . . . . . . . . . . . . . . . . . . . . . . . . 30

5.4 Validation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30

6 Recommendation 32

Bibliography 33

A Errors between time steps of velocity 34

5
B Errors between time steps of angle 37

C Glider tracjectory 40

D Phase plan 45

E MathCAD Calculation 50

6
List of variables

Angle of orientation of glider [rad]


eq Angle of orietation of glider at equilibrium point [rad]
m Mass [kg]
t Time [second]
V Velocity of glider [m/s]
Veq Velocity of glider at equilibrium point [m/s]
g Gravitational acceleration [m/s2 ]
CD Drag coefficient [kg/m]
CL Lift coefficient [kg/m]

7
Chapter 1

Introduction

1.1 Why mathematical modelling?

Many real-life phenomena and problems can be studied by mean of mathe-


matical modelling. Engineers and scientists in various disciplines have been
exploiting this powerful tool to further interpret the fundamentals of nature,
from which practical applications can be derived.

Aiming to introduce and demonstrate the importance of mathematical mod-


elling, MathMod MOOC is an online course provided by TU Delft which served
to help students understand the basics and techniques involved in modelling
and analyze a real-life problem. Students were given different projects and
allowed to work in group of two in going through various steps of analyzing
and refining their models to best replicate their respective projects.

Correspondingly, the authors of this work were given the objective of inves-
tigating the behavior of a gliders trajectory and how it is influenced by the
many terms included in the gliders mathematical model.

1.2 How to describe gliders flight

In general, a gliders flight is defined by two fundamental differential equations


according to Newtons second law of motion.

8
Figure 1.1: Gliders trajectory problem reference frame. (TU Delft,
2017)


dV

m = CD V 2 mg sin()
dt

mV d

= CL V 2 mg cos()


dt

Consisting in the equations are four essential variables which describe the
gliders velocity, angle of orientation, lift and drag coefficients. How these four
terms influence the trajectory and flight behavior of the glider is thus the main
concern in the mathematical model.

Subsequently, much of the work done by the authors was to investigate and
analyze the effects created by these variables through which the mathematical
model can be refined and improved to better replicate the real-life problem.

1.3 A brief overview

In studying the equations of the gliders motion, the work was conducted
through various steps. At first, information about the glider was gathered
as required to construct the mathematical model. By choosing a typical glider
model, the gliders specification data were then provided.

As soon as all the necessary information was available, the next step was to
simulate the differential equations by implementing Eulers method. At the be-
ginning, each of the equations was studied separately with the other variables
were held constant. With this technique, not only were the authors allowed
to quickly visualize of the behavior of the gliders velocity and angle of orien-
tation as they changed through time, but also errors could be estimated from
which the authors could decide how precise would the mathematical model
be. Nevertheless, to best replicate the reality, the equations were eventually

9
considered as one system for the implementation of Eulers method to simulate
the gliders flight behavior as well as its trajectory through time.

While going through these abovementioned steps, the simulation process was
iterated several times with different values of variables to validate the accuracy
of the results obtained from the mathematical model.

1.4 Limitation

All the simulations made in this work were run using Python. As this course is
an introduction to mathematical modelling, it is apparent there are limitations
with the model used to analyze the gliders flight behavior and trajectory. By
assuming the glider as a particle, the authors would only need to consider
the all the forces acting through the gliders center of mass. Additionally,
further simplifying the model was that the equations of motion were derived
in terms of a 2D plane problem. Obviously, these assumptions only crudely
represented the problem, since the influences of various parts on gliders such
as rudders and ailerons were not taken into considerations. Nevertheless, these
limitations, despite not being able to best illustrate the actual flight trajectory,
still provided a solid foundation upon which the authors can improve in the
future.

1.5 Outline

Capturing the work done in the project, three core chapters are included in
this report to illustrate the process gone through to mathematically model the
flight of a glider. Firstly, in chapter 2, all the necessary data collected for the
glider are introduced alongside the explanation on the physical meanings of the
four essential terms consisted in the system of differential equations of motion.
Secondly, chapter 3 concentrates in the simulation process of the mathematical
model by mean of Eulers method. Each of the equations are initially solved
separately to determine the needed step sizes for accurate solutions before they
are simulated as one system. In chapter 4, analytical solutions are calculated
and will be compared against the solutions obtained from Eulers method as
well as to analyze the behavior of the model regarding its validity opposed to
the actual problem. Subsequently, a conclusion chapter will then be made and
followed by a recommendation chapter in which suggestions for refining the
models are included.

10
Chapter 2

Mathematical modelling of
glider

Having previously mentioned about the content of this chapter, all the neces-
sary information is going to be presented here as preparation for the simulation
process in chapter 3. The physical meanings of all the essential variables will
also be explained as well as the inclusion of two additional differential equa-
tions that are needed for computing the gliders trajectory through space.

2.1 Data collection

Collecting data in mathematical modelling is an essential step to initiate the


process. By gathering information that is useful for the preparation of the
model, the authors can foresee what to expect during the simulation procedure,
which will be proved to be beneficial in validating the results later. Firstly,
the specification of a typical glider is presented here as these are the data used
by the authors during this project.

Model Cirrus 75
Number of seats 1
Wing span 15 m
Wing area 10 sq m
Aspect ratio 22.5
Gross weight 390 kg
Maximum L/D 37
Typical speed 93 km/h

Table 2.1: Cirrus 75 Glider specification. (Standard Cirrus, n.d.)

11
It is important to have the L/D ratio of a glider since this the optimal angle
of orientation that the glider will likely to obtain during a long unperturbed
flight.

2.2 Mathematical model of glider

dV
m = CD V 2 mg sin() (2.1)
dt

d
mV = CL V 2 mg cos() (2.2)
dt

Considering the pair of differential equations, assuming CD and CL are con-


stant, it is apparent that the rates of change of the gliders velocity and angle
of orientation depend on the instantaneous values of those two variables. As
the orientation of glider is associated with the trigonometry function sine and
cosine, the second term must vary periodically from positive mg to negative
mg, as shown below by the graph mg sin() and mg cos().

Figure 2.1: Graphs of the dependent second term in equations of


motion. (TU Delft, 2017)

Regarding the first term, since V is raised by a power of 2, its influence on the
values of both equations are going to be much more significant.

12
dV
Discussing first the equation of , when the first term is small enough with
dt
regard to the second term, the summation of two terms are dictated mainly
by the fluctuation of mg sin(). If the glider points steeply to the ground,
the total value will be positive since the first term is smaller despite being
negative. However, as V increases, the influence will gradually swift to the
first term, and instantaneous rate of change of the gliders velocity will be
negative, meaning the glider will eventually reach a terminal velocity. This
situation also remains true regardless the value of when V is too high.
d
As for the second equation , if V becomes too low, mg cos() will again
dt
determine the sign of the sum of two terms. The rate of change will be negative
3
from to and vice versa from to . Meanwhile, if the gliders speed
2 2 2 2
d dV
is too high, will have the same behavior as previously mentioned for .
dt dt
Also of interest in this project is the trajectory of the glider through space, and
therefore two additional differential equations of the position of the glider shall
be included. Given the instantaneous speed and orientation of the glider, the
changes of position in horizontal direction (x-axis) and vertical direction (y-
axis) are the products of these two variables. Given below are the differential
equations to compute the position of the glider as it changes through time.

dx
= V cos() (2.3)
dt

dy
= V sin() (2.4)
dt


Both the initial values of V and will be restricted between 10-40 m/s and -
4

respectively to minimize the amount of simulations run while maintaining


4
sufficient correlation with the actual problem.

2.3 Research on lift and drag coefficients

The nature of lift and drag coefficients are complex and affected by various
factors during a glider flight such as the speed and density of air, the gliders
wing area and angle of attack. Since the authors do not have prior knowledge
in the field of aerodynamics, it is acceptable that these values can set constant
for ease of computing and simulating the mathematical model. The figures
below show the range of typical values of lift and drag coefficients, which was
found on Wikipedia.

13
Figure 2.2: Range of values of drag coefficient. (Drag coefficient, n.d.)

14
Figure 2.3: Range of values of lift coefficient. (Lift coefficient, n.d.)

As a start, it is recommended to simulate using the highest values of both


coefficients, after which refinement can be made to better replicate the data
provided by the chosen gliders model (maximum velocity and lift-to-drag ra-
tio).

2.4 Conclusion

Overall, there are definite additional information required for a realistic math-
ematical model of a gliders trajectory. However, the data presented in this
chapter are proved to be essentially fundamental, meaning they are needed
for a simulation to be computed at all. They provide an adequate level of
accuracy to the problem stated and from which the authors can gain valuable
knowledge as well as what to expect in the simulation process.

15
Chapter 3

Model simulation

The mathematical model and different terms related to the model were dis-
cussed in the chapter 2. Firstly, in this chapter, time step required to estimate
the precise angle and velocity of the glider will be discussed by applying Eulers
method to the corresponding differential equations 2.1 and 2.2. After that, the
same method will be applied to both equations as one system to study varia-
tions and dependency of both V and with time. Finally, the trajectory of the
gliders flight will be computed once again by Eulers method for the solutions
of four differential equations with the addition of two differential equations 2.3
and 2.4.

3.1 Determining the step size in modelling

The differential equations for the gliders flight problem has been presented in
section 2.2. Now, the solution for the problem can be approximated with a
numerical method known as Eulers method. To apply the abovementioned
method, step size dt must be computed such that the errors in computation
is sufficiently small to obtain accurate solutions. Subsequently, the errors will
be included and presented as the difference in the values for a time t at step
sizes dt and 2dt.

3.1.1 Step size for determining precise gliders angle of orien-


tation

From the differential equation of angle 2.2, it is apparent that the rate of
change in angle with time is directly proportional to the lift coefficient. There-
fore, for the determination of the step size, the largest value 1.74 kg/m of CL

16
is selected as it will result in maximum error in the computation of at any
time.

The velocity is assumed to be constant at the typical speed of the glider i.e.
25.8 m/s and initial angle (0) to be the optimal angle for glider as described
in section 2.1, i.e. -0.02702 radians. For the analysis, the precision of the angle
is decided to be of 0.001 radians (to check angle of the model within error of
0.57 degrees).

The Python program is used for computing numerical solutions by mean of


Eulers method for different step sizes and it was found that the desire precision
in the angle is achieved at time step 1/64 second (Figure 3.1). The Figure 3.1
show that the difference in the angle is significantly small that it is difficult
to show. Therefore, for better visualization, the error between two values has
been plotted with a scale factor of 1000 i.e. an error value of 1 is corresponded
to 0.001. It is clearly seen that the maximum error in angle is roughly 0.76,
which is 0.00076 radians in actual term, at the time of 5 second.

The code for the program can be found in Appendix B.

Figure 3.1: Errors between step sizes in computing solution of angle.


Error value is scaled by a factor of 1000, i.e. error value 1 in graph equal to
0.001

3.1.2 Step size for determining precise velocity

From the differential equation of velocity 2.1, it is obvious that the rate of
change in velocity with time is directly proportional to the drag coefficient.
Therefore, for the determination of the step size, the largest value 1.15 kg/m
of CD is selected as it will result in maximum error in the computation of V
at any time.

17
The angle is assumed to be at the optimal angle for the glider i.e. 0.02702
radians and initial velocity V (0) to be the typical speed of glider i.e. 25.8 m/s.
For the analysis, the precision of the velocity is chosen to be of 0.1 m/s.

The Python program is used for computing numerical solutions by mean of


Eulers method for different step sizes and it was found that the desire precision
in the angle is achieved at time step 1/4 second (Figure 3.2). The Figure 3.2
show that the difference in the velocity is so minute that it is difficult to be
observed. Therefore, for better visualization, the error between two values has
been plotted with an enlarged scale of factor of 100, i.e. an error value of 10
is corresponded to 0.1. It is clearly seen that the maximum error in velocity
is about 8, i.e. 0.08 m/s at the time of approximately 8 second.

Figure 3.2: Errors between step sizes in computing solution of V.


Error value is scaled by a factor of 100, i.e. error value 10 in graph equal to
0.1

The code for the program can be found in Appendix A.

3.1.3 Step size for further model simulation

The step size for desired precision in angle and velocity are 1/64 and 1/4 of
a second respectively. Therefore, for the further modelling simulation, the
minimum of the two step sizes should be used to get the desired precision in
both angle and velocity. As a result, further simulation of Eulers method for
the system has been conducted with a step size 1/64 of a second.

18
3.1.4 Simulation of glider system for velocity and orientation

After determining the appropriate step size for the simulation, the glider sys-
tem has been analysed with initial velocity of 30 m/s and initial angle of -0.1
radians (these values are not of the equilibrium point). In addition, with the
assumption of glider to be streamlined, the drag coefficient is assumed to be
0.04 kg/m and the corresponding lift coefficient to maintain a L/D ratio of 37
is estimated to be 1.48 kg/m.

The result of simulation is presented in Figure 3.3. To get enlarged view of


velocity and angle, Figure 3.3 has been presented in two parts as Figure 3.4
and Figure 3.5.

Figure 3.3: Variations in velocity and angle with time. V (0) = 30 m/s,
(0) = -0.1, CL l = 1.48 kg/m, CD = 0.04kg/m

Figure 3.4: Velocity vs time. V (0) = 30 m/s, (0) = -0.1, CL l = 1.48


kg/m, CD = 0.04kg/m

Figure 3.4 shows that solution function of velocity with time has a nature of

19
bounded and damping oscillation. The model oscillates at around 50.8 m/s.

Figure 3.5: Angle vs time. V (0) = 30 m/s, (0) = -0.1, CL l = 1.48 kg/m,
CD = 0.04kg/m

Figure 3.5 shows that solution function of angle with time has nature of
bounded and damping oscillation which is similar to the graph of velocity.
The model oscillates at around -0.02702 radians.

3.2 Evaluating trajectory of glider

After finding the solutions for angle and velocity, Eulers method is modified
with the addition of two differential equations 2.3 and 2.4 to find the hori-
zontal and vertical position of the glider during flight. The solutions of these
equations are presented in Figure 3.6.

Figure 3.6 shows that there is oscillation in vertical position with an amplitude
of about 100 m and it minimizes with time as the system attains its equilibrium
position. Moreover, the distance traveled by the flight in horizontal direction
is about 30,000 m and drop in height of about 900 m in 600 s.

3.3 Conclusion

The mathematical model defined in section 2.2 has been simulated numerically
using Eulers method in Python programming language. The step size to get
precise velocity within 0.1 m/s and angle within 0.001 radians is computed to
be 1/64 of a second. After determining the step size, the differential equations
of the glider system are solved and it was found that the velocity and time
solutions have a bounded-and-damped oscillating nature. The system seems

20
Figure 3.6: Trajectory of glider flight. V (0) = 30 m/s, (0) = -0.1, CL l
= 1.48 kg/m, CD = 0.04kg/m, 600-second simulation

to reach equilibrium at V = 50.8 m/s and = -0.02702 radians. Additionally,


the trajectory of the flight has also been computed and found that the flight
covers about 30,000 m in horizontal direction and drops by about 900 m in
height after 600 seconds.

21
Chapter 4

Model validation

The preceding chapter deals with the calculation of mathematical model of the
Glider flight. In this chapter, the final section of a Mathematical modelling
cycle known as validation will be discussed. At first, the analytical solutions
of velocity and angle at equilibrium point will be presented. After that, the
oscillation period of the model will be analyzed based on the calculation for
eigenvalues of the Jacobian matrix with different drag and lift coefficients. This
analysis will yield a corresponding oscillation period of the Glider for specific
values of Cd and Cl. This step will be followed by a numerical simulation of
flight with different initial conditions. Once again, oscillation period will be
computed but numerically. The oscillation period from analytical solution and
numerical simulation with the same drag and lift coefficients will be compared
to validate the model. Finally, the phase plane will also analyzed to study
model performance and its validity.

4.1 Analytical solutions at equilibrium point

An equilibrium point is the point where the variation is zero i.e. the first
derivative of the function is zero. For the modelling of Glider flight, velocity
and angle at the equilibrium point can be estimated analytically by solving
equations 2.1 and 2.2 when they are equal to zero. This results in the following
equations at equilibrium point:

s
mg cos()
Ve q = (4.1)
CL

CD
e q = arctan( ) (4.2)
CL

22
The Table 4.1 shows the velocity and angle at equilibrium point for different
drag and lift coefficients. The table shows only limited data since these data
are used for validation process.

Case CD CL eq Veq Oscillation period (s)


1 0.155 5.746 -0.02697 25.80 11.689
2 0.04 1.48 -0.02702 50.83 23.032
3 0.009 0.1 -0.08976 195.20 88.809
4 1.15 1.74 -0.58401 42.83 23.913

Table 4.1: Velocity and angle at equilibrium point for different drag
coefficient and lift coefficient. (for detail calculation see Appendix E)

4.2 Determination of CD and CL

There are different methods for finding Cd and Cl. Some are as below:

Compare the expressions for Veq and eq with the values for real glider

Numerical simulation experiments and check the plausibility of the re-


sulting trajectories

Research on values of CD and CL

Computation of the eigvenvalues of the Jacobian matrix in the equilib-


rium point. If the solution oscillates, the Cd and Cl values are selected
such that the period of the oscillations is plausible

The above four method are considered to get a solution for determining of CD
and CL value. The detail of glider model Cirrus 75 is presented in Table 2.1.
The first set of CD and CL , i.e. CD = 0.155 kg/m and CL = 5.746 kg/m,
resulting in a velocity of 25.8 m/s (93 km/h) which matches the speed the
Glider. The corresponding numerical simulation for the trajectory is presented
in Figure 4.1, which was simulated for 300 seconds. The trajectory of the flight
is satisfactory; however, according to (Lift coefficient, n.d.) that the maximum
possible value for CL is roughly 1.74 kg/m so the abovementioned values of
CD and CL are discarded.

Following Figure 2.2, the drag coefficient of a streamlined body is 0.04. Aiming
to have the optimal angle of attack as the equilibrium condition, i.e. -0.02702
1
rads (arctan( )), CL was calculated to be about 1.48 kg/m, which is ac-
37
ceptable and thus these two values were selected for further analysis. The
trajectory for this case is depicted in Figure 4.2.

23
Figure 4.1: Trajectory of glider flight. V (0) = 30 m/s, (0) = -0.1, CL l
= 5.746 kg/m, CD = 0.155 kg/m, 300-second simulation

Meanwhile, the Jacobian matrices for different cases were computed to find
their respective eigenvalues to determine their corresponding oscillation pe-
riods for comparison. The eigenvalues for the different cases showed stable
spiral points. The several periods of oscillation were computed using Math-
CAD Prime 4.0 (see Appendix E MathCAD calculation sheet). The results
are discussed in section 4.3.

Based on the present research, the most acceptable and practical possibility
values of the drag coefficient and lift coefficient, which are 0.04 kg/m and 1.48
kg/m respectively, are considered for numerical simulations of Glider flight at
the current stage. However, it is to be noted that the values shall be updated
in next cycle of mathematical modelling.

4.3 Period of oscillation from analytical solution

Oscillation periods computed from analytical solutions are presented in Table


4.1. It shows that the period of oscillation for CD = 0.04 lg/m and CL = 1.48
kg/m is 23.032 seconds.

24
4.4 Flight simulation for initial condition

After determining the CD and CL values, numerical simulation of the glider


flight is made with initial conditions of V (0) = 5 m/s and (0) = -0.2 rad. The
2000-second simulation time shows that the velocity, angle of flight, horizontal
distance and vertical distance travelled in flight at 2000th second are 50.83
m/s, -0.02702 radian, 100,446.31 m, and -2966.82 m respectively.

The resulted trajectory is depicted in Figure 4.2.

Figure 4.2: Trajectory of glider flight. V (0) = 5 m/s, (0) = -0.2, CL l =


1.48 kg/m, CD = 0.04 kg/m, 2000-second simulation

It is noted that the simulated values of velocity and angle of flight are matched
with the analytical solutions for the velocity and angle of flight at equilibrium
point. Moreover, the horizontal distance travel is close to the product of the
velocity at equilibrium point and time.

Program code presented in Appendix C.

4.5 Period of oscillation from flight simulation

The period of oscillation from numerical simulation is computed by examining


at three consecutive peaks in velocity graph and their corresponding time are
listed below:

25
First peak: time 11.546875 s; velocity 82.9064880 m/s

Second peak: time 34.953125 s; velocity 78.2344283 m/s

Third peak: time 58.265625 s; velocity 74.2331653 m/s

Timed period between first peak and second peak is approximately 23.40625
seconds

Timed period between second peak and third peak is approximately 23.3125
seconds

The velocity vs time for 70-second simulation is shown in Figure 4.3, it is


apparent that there are three complete oscillations within 70 second which
indicates that the period of oscillation is about 23.3 seconds.

Figure 4.3: Velocity vs time. V (0) = 5 m/s, (0) = -0.2, CL l = 1.48 kg/m,
CD = 0.04 kg/m, 70-second simulation, oscillating period is about 23.3
seconds

4.6 Comparison of period of oscillation

Period of oscillation from analytical solution is 23.032 seconds for CD = 0.04


kg/m and CL = 1.48 kg/m with velocity and angle at equilibrium point are
equal to 50.83 m/s and -0.02702 rad correspondingly.

From the numerical solution, period of oscillation is computed to be about


23.3 seconds, which was as expected.

26
4.7 Phase plan

The phase plane for the system is generated considering following three initial
cases with drag coefficient of 0.04 kg/m and lift coefficient 1.48 kg/m.

Case Initial velocity (m/s) Angle (radian)


1 60 -1.3
2 20 1.3
3 1 1

Table 4.2: Initial values of three different cases used to generate


phase plane of the system.

The phase plane graph is shown in Figure 4.4, which illustrates that the solu-
tion of differential equations of glider system converse to around the equilib-
rium values of velocity and angle regardless of initial conditions.

Figure 4.4: Phase plane of glider flight. CL l = 1.48 kg/m, CD = 0.04


kg/m, 150-second simulation

27
4.8 Conclusion

The mathematical model discussed in preceding chapter has been validated


by determining the angle and velocity at equilibrium point. Additionally, the
determination of drag and lift coefficients also further supports the model.
Moreover, both analytical and numerical solutions for timed period correlate
well to each other and converge to the solution as indicated in the phase plane
of the mathematical model of the Glider flight.

However, the trajectory of the flight shows high-amplitude fluctuations as


shown in Figure 3.6, which is unrealistic. Thus, it is recommended to modify
the mathematical model to better reflect the actual trajectory of the glider.

28
Chapter 5

Conclusion

5.1 Main problem

MathMod MOOC is an online course developed by TU Delft delivered to


student via edX platform. The main aim of the course is to introduce students
to the process of mathematical modelling in solving real world problems. In
this course, each two students were given an opportunity to form a team
and select a real-life problem. In this regard, the authors of this work were
given the objective of investigating the behavior of a gliders trajectory and the
influences of the gliders velocity, angle of orientation, lift and drag coefficients
on its flight path utilizing the application of mathematical modelling.

5.2 Mathematical modelling

There are many parameters required for a realistic mathematical model of


a gliders trajectory. However, the data collected during the mathematical
modelling process are proved to be essentially fundamental which are sufficient
to solve two differential equations of motion defining gliders flight as shown
by equations 2.1 and 2.2. Furthermore, the additional differential equations
2.3 and 2.4 were simultaneously computed to study gliders trajectory through
space. The collected data are ample to simulate the mentioned system of
differential equations.

29
5.3 Model simulation

The mathematical model was simulated numerically using Eulers methods in


Python program. Firstly, the step size needed to get precise velocity within
0.1 m/s and angle within 0.001 radians is computed to be 1/64 of a second
by solving differential equation of angle and velocity individually considering
largest drag and lift coefficients. After determining the necessary step size,
the system of differential equations of the glider system was solved and the
resulted solutions of velocity and angle as functions of time have bounded and
damped oscillating nature.

The system seems to approach equilibrium at V = 50.8 m/s and = -0.02702


rad with the coefficients of lift and drag are 1.48 kg/m and 0.04 kg/m re-
spectively. The glider was assumed to be streamlined for CD = 0.04 kg/m.
Subsequently, to satisfy the L/D ratio of 37, CL is evaluated to be 1.48 kg/m.

Moreover, the trajectory of the flight has also been computed and found that
the flight covers about 30,000 m in horizontal direction and drops by about
900 m height after 600 seconds of flight.

5.4 Validation

For the validation of the model, differential equations were solved analyti-
cally to compute angle and velocity at equilibrium point. Different methods
were considered to determine the drag and lift coefficients. Considering the
practical possibility, CD and CL were determined to be 0.04 kg/m and 1.48
kg/m respectively. Consequently, the resulted angle and velocity at equilib-
rium point were calculated to be -0.02702 rad and 50.83 m/s correspondingly.
The solutions are analytically indicated as a stable spiral point since the eval-
uated eigenvalues of the Jacobian matrix consist of an imaginary part with a
negative real part. Subsequently, the corresponding period of oscillation was
calculated to be 23.032 seconds.

Numerical simulation of the mathematical model with the same values for all
variables was computed for a duration of 2000 seconds with a step size of 1/64
of a second. Expectedly, the obtained solutions closely correlate to the analyt-
ically computed solutions. The period of oscillation from numerical simulation
was also estimated to be 23.3 seconds, which is close to the one computed ana-
lytically. Finally, phase plane confirms the accuracy of the solutions as all the
graphs converge to the equilibrium point of V = 50.83 m/s and = -0.02702
rad.

Therefore, analytical solution and numerical simulation results are relatively

30
the same, which validate the mathematical model that was studied. However,
the trajectory of the flight shows high amplitude in fluctuations of height,
which is impractical. As a result, it is recommended that the model shall be
modified. Detail recommendations will be discussed in subsequent chapter.

31
Chapter 6

Recommendation

Based on the conclusion chapter, it is suggested that the mathematical model


shall be refined. After completing the first cycle of mathematical modelling,
the authors would like to present the following recommendations for future
modification of the model:

To incorporate the varying possibility in both coefficients of lift and drag


depending on the angle of glider

To revise the step size for obtaining even more precise results

To incorporate additional parameters in the mathematical model

32
Bibliography

[1] Drag coefficient. Retrieved from Wikipedia

[2] Lift coefficient. Retrieved from Wikipedia

[3] Specifications. Retrieved from Standard Cirrus

[4] Glider model. Retrieved from DelftX: MathMod1x Mathematical Mod-


elling Basics

33
Appendix A

Errors between time steps of


velocity

# -*- coding: utf-8 -*-


"""
Created on Sun Jun 4 10:43:24 2017

@author: Ayanil
"""

# Program : Eulers method for Glider Velocity


# Author : MOOC team Mathematical Modelling Basics
# Created : April, 2017
# Edited : Anil and Vu Le

import numpy as np
import matplotlib.pyplot as plt

print("Solution for dV/dt =(-CD*V^2-m*g*Sin)/m") # in Python 2.7: use no brackets

# Constant
m = 390 # mass of glider in kg
g = 9.81 # Acceleration due to gravity in m/s^2
Cd = 1.15 # Drag Coefficient; the highest value of that
= -0.02702 # the typical angle the glider flies under on

#Boundary condition
V_init = 25.8 # initial velocity in m/s (use different valu

#time steps

34
t_init = 0 # initial time
t_end = 200 # stopping time
t_step=2 # reciprocal of time step in second for first

# Initializations for 1/t_step second


Dt = 1/t_step # timestep Delta t in sec
n_steps = int(round((t_end-t_init)/Dt)) # total number of timesteps

#Define array
t_arr = np.zeros(n_steps + 1) # create an array of zeros for t
V_arr = np.zeros(n_steps + 1) # create an array of zeros for V
Err_arr=np.zeros(t_end) # create an array of zeros for errors
Terr_arr=np.zeros(t_end) # create an array of zeros for tracing errors
t_arr[0] = t_init # add the initial t to the array
V_arr[0] = V_init # add the initial V to the array

# Eulers method
for i in range (1, n_steps + 1):
V = V_arr[i-1]
t = t_arr[i-1]
#print (t, V)
dVdt = (-Cd*V**2-m*g*np.sin())/m # calculate the derivative
V_arr[i] = V + Dt*dVdt # calculate V on the next time step
t_arr[i] = t + Dt # adding the new t-value to the list

# Output for 1/t_step second


t_s1=np.copy(t_arr)
V_s1=np.copy(V_arr)

# Initializations for 1/2 of t_step second


Dt = Dt/2 # timestep Delta t in sec
n_steps = int(round((t_end-t_init)/Dt)) # total number of timesteps

#Define array
t_arr = np.zeros(n_steps + 1) # create an array of zeros for t
V_arr = np.zeros(n_steps + 1) # create an array of zeros for V
t_arr[0] = t_init # add the initial t to the array
V_arr[0] = V_init # add the initial V to the array

# Eulers method
for i in range (1, n_steps + 1):
V = V_arr[i-1]
t = t_arr[i-1]
#print (t, V)
dVdt = (-Cd*V**2-m*g*np.sin())/m # calculate the derivative

35
V_arr[i] = V + Dt*dVdt # calculate V on the next time step
t_arr[i] = t + Dt # adding the new t-value to the list

# Output for 1/2 of t_step second


t_s2=np.copy(t_arr)
V_s2=np.copy(V_arr)

# Check value error in velocity at time range


for i in range (1,t_end):
print (t_s1[t_step*i],V_s1[t_step*i])
print (t_s2[2*t_step*i],V_s2[2*t_step*i])
print ("error=",V_s2[2*t_step*i]-V_s1[t_step*i])
Err_arr[i]=V_s2[2*t_step*i]-V_s1[t_step*i]
Terr_arr[i]=i

# Plot the results


fig = plt.figure() # create figure
plt.plot(t_s1, V_s1, linewidth = 1, label="stepsize=1/2 sec") # plot velocity vs.
plt.plot(t_s2, V_s2, linewidth = 1, label="stepsize=1/4 sec") # plot velocity vs.
plt.plot(Terr_arr, Err_arr*100, linewidth = 1, label="error 100 time scaled") # p

plt.title(dV/dt =(-CD*V^2-m*g*Sin)/m, V(0)=25.8, = -0.02702, fontsize = 20)


plt.xlabel(t (sec), fontsize = 15)
plt.ylabel(V(m/s), fontsize = 15)

plt.xticks(fontsize = 10)
plt.yticks(fontsize = 10)
plt.grid(True) # show grid
plt.axis([0, 40, 0, 26]) # define the axes
plt.legend(fontsize=10) # show the legend
plt.show() # show the plot
# save the figure as .jpg
fig.savefig(Task_3.4_Solution for Velocity stepsize with error tracking.jpg, dpi=fi

36
Appendix B

Errors between time steps of


angle

# -*- coding: utf-8 -*-


"""
Created on Sun Jun 4 10:43:24 2017

@author: Ayanil
"""

# Program : Eulers method for Glider


# Author : MOOC team Mathematical Modelling Basics
# Created : April, 2017
# Edited : Anil and Vu Le

import numpy as np
import matplotlib.pyplot as plt

print("Solution for d/dt =(Cl*V^2-m*g*Cos)/(m*V)") # in Python 2.7: use no brackets

# Constant
m = 390 # mass of glider in kg
g = 9.81 # Acceleration due to gravity in m/s^2
Cl = 1.74 # Lift Coefficient; the highest value of that
V = 25.8 # the typical velocity (in m/s) of the glider

#Boundary condition
_init = -0.02702 # initial angle in radian (use different value

#time steps

37
t_init = 0 # initial time
t_end = 200 # stopping time
t_step=32 # reciprocal of time step in second for first

# Initializations for 1/t_step second


Dt = 1/t_step # timestep Delta t in sec
n_steps = int(round((t_end-t_init)/Dt)) # total number of timesteps

#Define array
t_arr = np.zeros(n_steps + 1) # create an array of zeros for t
_arr = np.zeros(n_steps + 1) # create an array of zeros for
Err_arr=np.zeros(t_end) # create an array of zeros for errors
Terr_arr=np.zeros(t_end) # create an array of zeros for tracing errors
t_arr[0] = t_init # add the initial t to the array
_arr[0] = _init # add the initial to the array

# Eulers method
for i in range (1, n_steps + 1):
= _arr[i-1]
t = t_arr[i-1]
#print (t, )
ddt = (Cl*V**2-m*g*np.cos())/(m*V)# calculate the derivative
_arr[i] = + Dt*ddt # calculate on the next time step
t_arr[i] = t + Dt # adding the new t-value to the list

# Output for 1/t_step second


t_s1=np.copy(t_arr)
_s1=np.copy(_arr)

# Initializations for 1/2 of t_step second


Dt = Dt/2 # timestep Delta t in sec
n_steps = int(round((t_end-t_init)/Dt)) # total number of timesteps

#Define array
t_arr = np.zeros(n_steps + 1) # create an array of zeros for t
_arr = np.zeros(n_steps + 1) # create an array of zeros for
t_arr[0] = t_init # add the initial t to the array
_arr[0] = _init # add the initial to the array

# Eulers method
for i in range (1, n_steps + 1):
= _arr[i-1]
t = t_arr[i-1]
#print (t, )
ddt = (Cl*V**2-m*g*np.cos())/(m*V)# calculate the derivative

38
_arr[i] = + Dt*ddt # calculate on the next time step
t_arr[i] = t + Dt # adding the new t-value to the list

# Output for 1/2 of t_step second


t_s2=np.copy(t_arr)
_s2=np.copy(_arr)

# Check value error in angle at time range


for i in range (0,t_end):
print (t_s1[t_step*i],_s1[t_step*i])
print (t_s2[2*t_step*i],_s2[2*t_step*i])
print ("error=",_s2[2*t_step*i]-_s1[t_step*i])
Err_arr[i]=_s2[2*t_step*i]-_s1[t_step*i]
Terr_arr[i]=i

# Plot the results


fig = plt.figure() # create figure
plt.plot(t_s1, _s1, linewidth = 1, label="stepsize 1/32 sec") # plot angle vs. ti
plt.plot(t_s2, _s2, linewidth = 1, label="stepsize 1/64 sec") # plot angle vs. ti
plt.plot(Terr_arr, Err_arr*1000, linewidth = 1, label="error 1000 time scaled") #

plt.title(d/dt =(Cl*V^2-m*g*Cos)/(m*V), (0)=-0.02702, V=25.8 m/s, fontsize = 20)


plt.xlabel(t (sec), fontsize = 15)
plt.ylabel((radian), fontsize = 15)

plt.xticks(fontsize = 10)
plt.yticks(fontsize = 10)
plt.grid(True) # show grid
plt.axis([0, 20, -1.3, 1]) # define the axes
plt.legend(fontsize=10) # show the legend
plt.show() # show the plot
# save the figure as .jpg
fig.savefig(Task_3.3_Solution for Angle stepsize with error tracking.jpg, dpi=fig.d

39
Appendix C

Glider tracjectory

# Program : Eulers method for a system


# Author : MOOC team Mathematical Modelling Basics
# Created : May, 2017
# Edited : Anil and Vu Le

import numpy as np
import matplotlib.pyplot as plt

print("Solution for dV/dt = (-CdV^2 mgsin())/m, d/dt = (ClV^2 mgcos())/(mV)")

# Constant
m = 390 # mass of glider in kg
g = 9.81 # Acceleration due to gravity in m/s^2
Cd = 0.04 # Drag Coefficient; the highest value of that rang
Cl = 1.48 # Lift Coefficient; the highest value of the range

#time steps
t_init = 0 # initial time
t_end = 600 # stopping time
t_step = 64 #reciprocal of time step in second for first time

#Initialization for 1/t_step second


Dt = 1/t_step # timestep Delta t
n_steps = int(round((t_end-t_init)/Dt)) # total number of timesteps

#Boundary condition
V_init = 30 # initial velocity of V
_init = -0.1 # initial angle of
x_init = 0 # initial angle of x
y_init = 0 # initial angle of y

40
#Define array
X = np.zeros(4) # create space for current X=[V,]^T
dXdt = np.zeros(4) # create space for current derivative
t_arr = np.zeros(n_steps + 1) # create a storage array for t
X_arr = np.zeros((4,n_steps+1)) # create a storage array for X=[V,]^T
t_arr[0] = t_init # add the initial t to the storage array
X_arr[0,0] = V_init # add the initial V to the storage array
X_arr[1,0] = _init # add the initial to the storage array
X_arr[2,0] = x_init # add the initial x to the storage array
X_arr[3,0] = y_init # add the initial y to the storage array

# Eulers method
for i in range (1, n_steps + 1):
t = t_arr[i-1] # load the time
V = X_arr[0,i-1] # load the value of V
= X_arr[1,i-1] # load the value of
x = X_arr[2,i-1] # load the value of x
y = X_arr[3,i-1] # load the value of y
X[0] = V # fill current state vector X=[V,]^T
X[1] =
X[2] = x
X[3] = y
dVdt = (-Cd*V**2 - m*g*np.sin())/m # calculate the derivative dV/dt
ddt = (Cl*V**2 - m*g*np.cos())/(m*V) # calculate the derivative d/dt
dxdt = V*np.cos() # calculate the derivative dx/dt
dydt = V*np.sin() # calculate the derivative dx/dt
dXdt[0] = dVdt # fill derivative vector dX/dt
dXdt[1] = ddt
dXdt[2] = dxdt
dXdt[3] = dydt
Xnew = X + Dt*dXdt # calculate X on next time step
X_arr[:,i] = Xnew # store Xnew
t_arr[i] = t + Dt # store new t-value
#print(t_arr[i],X_arr[:,i]) # store new t-value

# Plot the results


fig = plt.figure()
plt.plot(t_arr, X_arr[0,:], linewidth = 4, label="V(t)") # plot V vs. time
plt.plot(t_arr, X_arr[1,:], linewidth = 4, label="(t)") # plot vs. time

plt.title(dV/dt = (-CdV^2 mgsin())/m, d/dt = (ClV^2 mgcos())/(mV), fontsize = 20)


plt.xlabel(t (in secs), fontsize = 20) # name of horizontal axis
plt.ylabel(V(m/s) / (radian), fontsize = 20) # name of vertical axis

41
plt.xticks(fontsize = 15) # adjust the fontsize
plt.yticks(fontsize = 15) # adjust the fontsize
plt.axis([0, t_end, min(X_arr[1,:])-2, max(X_arr[0,:])+2]) # set the ra

plt.legend(fontsize=15) # show the legend


plt.show() # necessary for some platforms

# save the figure as .jpg (other formats: png, pdf, svg, (ps, eps))
fig.savefig(Task_3.5_Glider Speed and Angle.jpg, dpi=fig.dpi, bbox_inches = "tight"

# Plot the results Velocity


fig1 = plt.figure()
plt.plot(t_arr, X_arr[0,:], linewidth = 4, label="V(t)") # plot V vs. time

plt.title(dV/dt = (-CdV^2 mgsin())/m, d/dt = (ClV^2 mgcos())/(mV), fontsize = 20)


plt.xlabel(t (in secs), fontsize = 20) # name of horizontal axis
plt.ylabel(V(m/s), fontsize = 20) # name of vertical axis

plt.xticks(fontsize = 15) # adjust the fontsize


plt.yticks(fontsize = 15) # adjust the fontsize
plt.axis([0, t_end, min(X_arr[0,:])-2, max(X_arr[0,:])+2]) # set the ra

plt.legend(fontsize=15) # show the legend


plt.show() # necessary for some platforms

print (t_arr[t_end*t_step],X_arr[0,t_end*t_step])

# save the figure as .jpg (other formats: png, pdf, svg, (ps, eps))
fig1.savefig(Task_3.5_Glider Speed.jpg, dpi=fig.dpi, bbox_inches = "tight")

# Plot the results Angle


fig2 = plt.figure()
plt.plot(t_arr, X_arr[1,:], linewidth = 4, label="(t)") # plot vs. time

plt.title(dV/dt = (-CdV^2 mgsin())/m, d/dt = (ClV^2 mgcos())/(mV), fontsize = 20)


plt.xlabel(t (in secs), fontsize = 20) # name of horizontal axis
plt.ylabel((radian), fontsize = 20) # name of vertical axis

plt.xticks(fontsize = 15) # adjust the fontsize


plt.yticks(fontsize = 15) # adjust the fontsize
plt.axis([0, t_end, min(X_arr[1,:])-.1, max(X_arr[1,:])+.1]) # set the

plt.legend(fontsize=15) # show the legend


plt.show() # necessary for some platforms

42
print (t_arr[t_end*t_step],X_arr[1,t_end*t_step])

# save the figure as .jpg (other formats: png, pdf, svg, (ps, eps))
fig2.savefig(Task_3.5_Glider Angle.jpg, dpi=fig.dpi, bbox_inches = "tight")

# Plot the x vs time


fig3 = plt.figure()
plt.plot(t_arr, X_arr[2,:], linewidth = 4, label="x(t)") # plot x vs. time

plt.title(x vs time, fontsize = 20) # set title


plt.xlabel(t (in secs), fontsize = 20) # name of horizontal axis
plt.ylabel(x(m), fontsize = 20) # name of vertical axis

plt.xticks(fontsize = 15) # adjust the fontsize


plt.yticks(fontsize = 15) # adjust the fontsize
plt.axis([0, t_end, min(X_arr[2,:])-2, max(X_arr[2,:])+2]) # set the ra

plt.legend(fontsize=15) # show the legend


plt.show() # necessary for some platforms

print (t_arr[t_end*t_step],X_arr[2,t_end*t_step])

# save the figure as .jpg (other formats: png, pdf, svg, (ps, eps))
fig3.savefig(Task_3.5_Glider x vs t.jpg, dpi=fig.dpi, bbox_inches = "tight")

# Plot the y vs time


fig4 = plt.figure()
plt.plot(t_arr, X_arr[3,:], linewidth = 4, label="y(t)") # plot y vs. time

plt.title(y vs time, fontsize = 20) # set title


plt.xlabel(t (in secs), fontsize = 20) # name of horizontal axis
plt.ylabel(y(m), fontsize = 20) # name of vertical axis

plt.xticks(fontsize = 15) # adjust the fontsize


plt.yticks(fontsize = 15) # adjust the fontsize
plt.axis([0, t_end, min(X_arr[3,:])-2, max(X_arr[3,:])+2]) # set the ra

plt.legend(fontsize=15) # show the legend


plt.show() # necessary for some platforms

print (t_arr[t_end*t_step],X_arr[3,t_end*t_step])

# save the figure as .jpg (other formats: png, pdf, svg, (ps, eps))
fig4.savefig(Task_3.5_Glider y vs t.jpg, dpi=fig.dpi, bbox_inches = "tight")

43
# Plot the results Trejectory
fig5 = plt.figure()
plt.plot(X_arr[2,:], X_arr[3,:], linewidth = 4) # plot y vs. x

plt.title(Glider Trejectory, fontsize = 20) # set title


plt.xlabel(x (m), fontsize = 20) # name of horizontal axis
plt.ylabel(y(m), fontsize = 20) # name of vertical axis

plt.xticks(fontsize = 15) # adjust the fontsize


plt.yticks(fontsize = 15) # adjust the fontsize
plt.axis([min(X_arr[2,:])-2, max(X_arr[2,:])+2, min(X_arr[3,:])-2, max(X_arr[3,:])+2]

plt.legend(fontsize=15) # show the legend


plt.show() # necessary for some platforms

print (t_arr[t_end*t_step], X_arr[0,t_end*t_step],X_arr[1,t_end*t_step],X_arr[2,t_end

# save the figure as .jpg (other formats: png, pdf, svg, (ps, eps))
fig5.savefig(Task_3.5_Trejectory.jpg, dpi=fig.dpi, bbox_inches = "tight")

44
Appendix D

Phase plan

# Program : Eulers method for a system


# Author : MOOC team Mathematical Modelling Basics
# Created : May, 2017
# Edited : Anil and Vu Le

import numpy as np
import matplotlib.pyplot as plt

print("Solution for dV/dt = (-CdV^2 mgsin())/m, d/dt = (ClV^2 mgcos())/(mV)")

# Constant
m = 390 # mass of glider in kg
g = 9.81 # Acceleration due to gravity in m/s^2
Cd = 0.04 # Drag Coefficient; the highest value of that rang
Cl = 1.48 # Lift Coefficient; the highest value of the range

#time steps
t_init = 0 # initial time
t_end = 250 # stopping time
t_step = 64 #reciprocal of time step in second for first time

#Initialization for 1/t_step second


Dt = 1/t_step # timestep Delta t
n_steps = int(round((t_end-t_init)/Dt)) # total number of timesteps

#Boundary condition 1
V_init = 60 # initial velocity of V
_init = -1.3 # initial angle of
x_init = 0 # initial angle of x
y_init = 0 # initial angle of y

45
#Define array
X = np.zeros(4) # create space for current X=[V,]^T
dXdt = np.zeros(4) # create space for current derivative
t_arr = np.zeros(n_steps + 1) # create a storage array for t
X_arr = np.zeros((4,n_steps+1)) # create a storage array for X=[V,]^T
t_arr[0] = t_init # add the initial t to the storage array
X_arr[0,0] = V_init # add the initial V to the storage array
X_arr[1,0] = _init # add the initial to the storage array
X_arr[2,0] = x_init # add the initial x to the storage array
X_arr[3,0] = y_init # add the initial y to the storage array

# Eulers method
for i in range (1, n_steps + 1):
t = t_arr[i-1] # load the time
V = X_arr[0,i-1] # load the value of V
= X_arr[1,i-1] # load the value of
x = X_arr[2,i-1] # load the value of x
y = X_arr[3,i-1] # load the value of y
X[0] = V # fill current state vector X=[V,]^T
X[1] =
X[2] = x
X[3] = y
dVdt = (-Cd*V**2 - m*g*np.sin())/m # calculate the derivative dV/dt
ddt = (Cl*V**2 - m*g*np.cos())/(m*V) # calculate the derivative d/dt
dxdt = V*np.cos() # calculate the derivative dx/dt
dydt = V*np.sin() # calculate the derivative dx/dt
dXdt[0] = dVdt # fill derivative vector dX/dt
dXdt[1] = ddt
dXdt[2] = dxdt
dXdt[3] = dydt
Xnew = X + Dt*dXdt # calculate X on next time step
X_arr[:,i] = Xnew # store Xnew
t_arr[i] = t + Dt # store new t-value
#print(t_arr[i],X_arr[:,i]) # store new t-value

# Copy array
X1=np.copy(X_arr)
t1=np.copy(t_arr)

#Boundary condition 2
V_init = 20 # initial velocity of V
_init = 1.3 # initial angle of
x_init = 0 # initial angle of x
y_init = 0 # initial angle of y

46
#Define array
X = np.zeros(4) # create space for current X=[V,]^T
dXdt = np.zeros(4) # create space for current derivative
t_arr = np.zeros(n_steps + 1) # create a storage array for t
X_arr = np.zeros((4,n_steps+1)) # create a storage array for X=[V,]^T
t_arr[0] = t_init # add the initial t to the storage array
X_arr[0,0] = V_init # add the initial V to the storage array
X_arr[1,0] = _init # add the initial to the storage array
X_arr[2,0] = x_init # add the initial x to the storage array
X_arr[3,0] = y_init # add the initial y to the storage array

# Eulers method
for i in range (1, n_steps + 1):
t = t_arr[i-1] # load the time
V = X_arr[0,i-1] # load the value of V
= X_arr[1,i-1] # load the value of
x = X_arr[2,i-1] # load the value of x
y = X_arr[3,i-1] # load the value of y
X[0] = V # fill current state vector X=[V,]^T
X[1] =
X[2] = x
X[3] = y
dVdt = (-Cd*V**2 - m*g*np.sin())/m # calculate the derivative dV/dt
ddt = (Cl*V**2 - m*g*np.cos())/(m*V) # calculate the derivative d/dt
dxdt = V*np.cos() # calculate the derivative dx/dt
dydt = V*np.sin() # calculate the derivative dx/dt
dXdt[0] = dVdt # fill derivative vector dX/dt
dXdt[1] = ddt
dXdt[2] = dxdt
dXdt[3] = dydt
Xnew = X + Dt*dXdt # calculate X on next time step
X_arr[:,i] = Xnew # store Xnew
t_arr[i] = t + Dt # store new t-value
#print(t_arr[i],X_arr[:,i]) # store new t-value

# Copy array
X2=np.copy(X_arr)
t2=np.copy(t_arr)

#Boundary condition 3
V_init = 1 # initial velocity of V
_init = -2 # initial angle of
x_init = 0 # initial angle of x
y_init = 0 # initial angle of y

47
#Define array
X = np.zeros(4) # create space for current X=[V,]^T
dXdt = np.zeros(4) # create space for current derivative
t_arr = np.zeros(n_steps + 1) # create a storage array for t
X_arr = np.zeros((4,n_steps+1)) # create a storage array for X=[V,]^T
t_arr[0] = t_init # add the initial t to the storage array
X_arr[0,0] = V_init # add the initial V to the storage array
X_arr[1,0] = _init # add the initial to the storage array
X_arr[2,0] = x_init # add the initial x to the storage array
X_arr[3,0] = y_init # add the initial y to the storage array

# Eulers method
for i in range (1, n_steps + 1):
t = t_arr[i-1] # load the time
V = X_arr[0,i-1] # load the value of V
= X_arr[1,i-1] # load the value of
x = X_arr[2,i-1] # load the value of x
y = X_arr[3,i-1] # load the value of y
X[0] = V # fill current state vector X=[V,]^T
X[1] =
X[2] = x
X[3] = y
dVdt = (-Cd*V**2 - m*g*np.sin())/m # calculate the derivative dV/dt
ddt = (Cl*V**2 - m*g*np.cos())/(m*V) # calculate the derivative d/dt
dxdt = V*np.cos() # calculate the derivative dx/dt
dydt = V*np.sin() # calculate the derivative dx/dt
dXdt[0] = dVdt # fill derivative vector dX/dt
dXdt[1] = ddt
dXdt[2] = dxdt
dXdt[3] = dydt
Xnew = X + Dt*dXdt # calculate X on next time step
X_arr[:,i] = Xnew # store Xnew
t_arr[i] = t + Dt # store new t-value
#print(t_arr[i],X_arr[:,i]) # store new t-value

# Copy array
X3=np.copy(X_arr)
t3=np.copy(t_arr)

# Plot the results


# Plot the results vs V
fig = plt.figure()
plt.plot(X1[0,:], X1[1,:], linewidth = 4,label="V(0)=60, (0)=-0.5") # plot y vs. x
plt.plot(X2[0,:], X2[1,:], linewidth = 4,label="V(0)=10, (0)=0.1") # plot y vs. x

48
plt.plot(X3[0,:], X3[1,:], linewidth = 4,label="V(0)=1, (0)=1") # plot y vs. x

plt.title(Phase Plane, fontsize = 20) # set title


plt.xlabel(V (m/s), fontsize = 20) # name of horizontal axis
plt.ylabel((radian), fontsize = 20) # name of vertical axis

plt.xticks(fontsize = 15) # adjust the fontsize


plt.yticks(fontsize = 15) # adjust the fontsize
plt.axis([min(X3[0,:])-2, max(X3[0,:])+2, min(X3[1,:])-1, max(X3[1,:])+1])

plt.legend(fontsize=10) # show the legend


plt.show() # necessary for some platforms

print (t_arr[t_end*t_step], X_arr[0,t_end*t_step],X_arr[1,t_end*t_step],X_arr[2,t_end

# save the figure as .jpg (other formats: png, pdf, svg, (ps, eps))
fig.savefig(T4.8_Phase plane.jpg, dpi=fig.dpi, bbox_inches = "tight")

49
Appendix E

MathCAD Calculation

50
m
w 390 kg g 9.81
s2

V0 0

kg kg
CD 0.155 CL 5.746
m m

m
V 25.8 0 rad
s

-CD V 2 - w g sin (()) 0

CL V 2 - w g cos (()) 0

m
25.799
( )
Find (V , ) = s

-0.027

CD 0.155 CL 5.746

w 390 g 9.81

CD
eq -atan = -0.027
CL

cos ((eq))
Veq 61.85386 = 25.799
CL

-2 CD Veq
-g cos ((eq))
w
J
CL g cos ((eq)) g
+ 2
sin ((eq))
w Veq Veq
expand , float , 5
J - J - - J J 0.03076 + 2 + 0.28917
0,0 1,1 0,1 1,0

1 -0.015380249117859692743 - 0.53752823314043435729i
2 eigenvals ((J)) -0.015380249117859692743 + 0.53752823314043435729i
||Im ((1))|| = 0.538
2
T = 11.689

( )
y ((t)) e Re (1) t ((cos ((||Im ((1))|| t)) + sin ((||Im ((1))|| t))))

1.5

1.2

0.9

0.6

0.3

0
y ((t))
-0.3

-0.6

-0.9

-1.2

-1.5

0 20 40 60 80 100 120 140 160 180 200


t

CD 0.04 CL 1.48

w 390 g 9.81

CD
eq -atan = -0.027
CL

cos ((eq))
Veq 61.85386 = 50.834
CL

-2 CD Veq
-g cos ((eq))
w
J
CL g cos ((eq)) g
+ 2
sin ((eq))
w Veq Veq

1 -0.0078206583347437412573 - 0.27280287815901961412i
2 eigenvals ((J)) -0.0078206583347437412573 + 0.27280287815901961412i
||Im ((1))|| = 0.273
2
T = 23.032

( )
y ((t)) e Re (1) t ((cos ((||Im ((1))|| t)) + sin ((||Im ((1))|| t))))

1.5

1.2

0.9

0.6

0.3

0
y ((t))
-0.3

-0.6

-0.9

-1.2

-1.5

0 20 40 60 80 100 120 140 160 180 200


t

CD 0.009 CL 0.1

w 390 g 9.81

CD
eq -atan = -0.09
CL

cos ((eq))
Veq 61.85386 = 195.205
CL

-2 CD Veq
-g cos ((eq))
w
J
CL g cos ((eq)) g
+ sin ((eq))
w Veq 2 Veq

1 -0.0067570956236706587345 - 0.070749165469117760089i
2 eigenvals ((J)) -0.0067570956236706587345 + 0.070749165469117760089i
||Im ((1))|| = 0.071
2
T = 88.809

( )
y ((t)) e Re (1) t ((cos ((||Im ((1))|| t)) + sin ((||Im ((1))|| t))))

1.5

1.25

0.75

0.5

0.25
y ((t))
0

-0.25

-0.5

-0.75

-1

0 20 40 60 80 100 120 140 160 180 200


t

CD 1.15 CL 1.74

w 390 g 9.81

CD
eq -atan = -0.584
CL

cos ((eq))
Veq 61.85386 = 42.829
CL

-2 CD Veq
-g cos ((eq))
w
J
CL g cos ((eq)) g
+ sin ((eq))
w Veq 2 Veq

1 -0.18943773365304595807 - 0.26275380565632381246i
2 eigenvals ((J)) -0.18943773365304595807 + 0.26275380565632381246i
||Im ((1))|| = 0.263
2
T = 23.913

( )
y ((t)) e Re (1) t ((cos ((||Im ((1))|| t)) + sin ((||Im ((1))|| t))))

1.1

0.9

0.8

0.7

0.6

0.5

0.4 y ((t))
0.3

0.2

0.1

-0.1

-0.2

0 20 40 60 80 100 120 140 160 180 200


t

Das könnte Ihnen auch gefallen