Final Problem Solving Lab Example

The following provides an example for the final version of the Problem Solving Lab Assignments in EGR 312. The problem explained and described below refers to the "falling parachutist" problem that is described in the course text book (Numerical Methods for Engineers 8th Edition - Chapra and Canale) and in class. Please use this as a guide when completing your final problem solving lab as it includes all key elements that you are expected to complete as part of your submission. Your final assignment should be in the form of a webpage. Remember that you are encouraged to present your results in a way that seems most appropriate to your problem and you should not exactly replicate the format and content you see here. The content below was developed by Dr. Di Vittorio, Dr. Lauren Lowman (co-instructor), and Nick Corak (EGR 312 TA). An example of an Initial Problem Solving Lab is also provided.

Introduction


This problem explores the concept of terminal velocity through the modeling of the velocity of a falling parachutist before they release their parachute. The parachutist has a mass of 68.1 kg and their initial velocity is assumed to be equal to zero. The drag coefficient is assumed constant and equal to 12.5kg/s.


In this example, a free body diagram is used to set up the model in terms of acceleration, or the derivative of velocity. The model takes the form of a differential equation with an analytical solution, so the “true” solution can be calculated. For the numerical solution, Euler’s method will be applied, which is a first order method for solving differential equations. Euler's method introduces some error in the calculations; however, these errors are largest in the first few iterations. Because the goal of this simulation is to calculate terminal velocity, these initial errors are not concerning. Later in the course we will learn about higher order methods that are more accurate.



Figure 1: Image of falling parachutist (Source)

Mathematical Model


First, a mathematical model needs to be formulated to describe the net forces on the parachutist. The result is a differential equation describing velocity change over time, as shown in Figure 2. In these equations, the following parameters are used:


F = external forces (N) (Fg = gravitational force; Fd = drag force)

m = mass (kg)

a = acceleration (m/s^2)

v = velocity (m/s)

c_d = drag coefficient

g = gravity (m/s^2)



Note: Sometimes you will be provided with the mathematical model and will not need to show the full derivation, but you should at least explain the model and how it was derived. You can lump this in with "Numerical" or "Alternative" or you can place it in its own section.

Figure 2: Mathematical Model

Numerical Approach


Euler’s method can be applied to solve the differential equation numerically. Euler’s is a first order approximation to the derivative and can be applied to our problem according to the steps shown in Figure 3, where "i" is the iterator for time (t).


Figure 3: Explanation of Numerical Approach

Sample Calculations


Sample calculations for Euler's method applied to the falling parachutist problem are provided in Figure 4, starting with a velocity = 0 at time = 0. A time step of 1 second was used for three iterations. The calculations show that velocity is still increasing after 4 seconds, although the rate of increase appears to be slowing down. The simulation will have to be extended to reach terminal velocity, but this can be done most efficiently with a computer.


Pseudocode

The following pseudocode was used to implement the simulation in MATLAB. The MATLAB code is included at the end of this webpage.


Define constant parameters

g = 9.81

c = 12.5

m = 68.1

Calculate true velocity using analytical solution and plot over time

Set initial conditions

t0 = 0 (time)

v0 = 0 (initial velocity)

h = 1 (step size)

Begin FOR loop - go out to 150 seconds

approximate v(t+1) using Euler's (refer to sample calcs)

store time and velocity in variable for each step size

END loop


Calculate true error and approximate error

comparison plot of true and approximate velocity for different step sizes

Plot error for different step sizes together



Figure 4: Sample Calculations for Numerical Approach

Analytical Approach


Instead of simulating the velocity using Euler's method, the exact equation for velocity can be derived by taking the integral of the ODE, using concepts and strategies from calculus. The analytical derivation is shown in Figure 5. u-substitution is used to simplify the integral and then initial conditions of t = 0 and v = 0 are used to solve for the integrating constant. Sample hand calculations using the resulting analytical equation are shown in Figure 6 below. These sample calculations can be directly compared to the numerical since the initial conditions and time step are the same. They can also be checked against the MATLAB output to ensure no coding errors were made.



Figure 6: Sample Calculations for Analytical Approach

Figure 5: Analytical Derivation of Velocity

Results


The numerical and analytical velocity calculations were implemented in MATLAB for different step sizes, from 0.5 seconds to 5 seconds. All velocity simulations are plotted together in Figure 7, where v_a is the analytical velocity and v_n is the numerical simulation.




Figure 7: Analytical and Numerical Results

Error


The absolute percent error was calculated for each time step using MATLAB. A sample error calculation is shown below and the error is plotted for each step size in Figure 8.

Figure 8: Error for Each Numerical Simulation

Discussion

The results in Figure 7 show that the numerical simulations that used Euler's method overestimate the true velocity. However, as the step size is reduced, the numerical simulations more closely approximate the true values. In addition, all of the simulations eventually reach the terminal velocity. Therefore, if we are only concerned with achieving the terminal velocity, then a large step size is sufficient as long as the velocity converges (stops changing). However, if we want to know how the velocity changes over time before reaching terminal velocity, then a smaller step size will greatly reduce the numerical error.

Figure 8 displays the true percent relative error over time for each time step. A step size of 5 seconds contains errors greater than 50% at the beginning of the simulation. If the step size is reduced by a factor of 10 (0.5s) then the maximum error is less than 5%. Both Figures 7 and 8 show that the velocity simulation converges around t = 25 seconds. Therefore, the parachutist will reach terminal velocity about 25 seconds after jumping from the plane.

When truncation error is reduced from decreasing the step size, the round-off error increases because more computations are performed. However, round-off error appears to be minor in this simulation, as the error is still drastically reduced for a step size of 0.5 seconds. The error could be further reduced for a smaller step size, but considering the simplicity of this model and processes that we have likely neglected the error reduction is likely small compared to overall model uncertainties. For instance, there could be wind currents that exert a horizontal force on the parachutist. The parachutists would also likely move and adjust their position, which would create a non-constant drag coefficient.

Regardless of the larger model uncertainties, this simple model is still helpful for answering questions such as the following: What is the maximum velocity for which we should design the parachute dimensions and material properties? If we are given an initial elevation, when should the parachutist open the chute to ensure they have enough time to safely land? What is the equivalent "wind speed" that the parachutist feels while falling? Numerical simulations of complex systems allow us to perform a variety of quick analyses at a low cost to develop safer engineering designs.