MCD4140 Computing for Engineers Self Study Exercise 9
Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit
MCD4140 Computing for Engineers
Self Study Exercise 9
Note: Tasks below can use for both hand calculation practice and programming practice.
Note: You might want to use extra sheet for hand calculation practice.
Task 1
Solve the following initial value problem over the interval from t = 0 to 2 where y(0) = 1. Display all your results on the same graph.
= yt2 −1.1y
(a) Using Euler’s method with h = 0.5 and 0.25
(b) Using the midpoint method with h = 0.5
Task 2
Solve the following problem over the interval from x = 0 to 1 using a step size of 0.25 where y(0) = 1. Display all your results on the same graph.
dy
(a) Using Euler’s method
(b) Using Heun’s method without iteration
Task 3
Solve the following problem over the interval from t = 0 to 3 using a step size of 0.5 where y(0) = 1. Display all your results on the same graph.
dy 2
= − y + t
dt
Obtain your solutions with (a) Heun’s method, (b) the midpoint method
Task 4
Suppose that a projectile is launched upward from the earth’s surface. Assume that the only force acting on the object is the downward force of gravity. Under these conditions, a force balance can be used to derive
dv R2
= − g(0) 2
dt (R + x)
where v = upward velocity (m/s), t = time (s), x = altitude (m) measured upward from the earth’s surface, g(0) = the gravitational acceleration at the earth’s surface (approximately 9.8 m/s2), and R = the earth’s radius (approximately 6.37 × 106 m). Recognizing that dx/dt = v, use Euler’s method to determine the maximum height that would be obtained if v(t = 0) = 1400 m/s.
Task 5
The material chosen for the body panels of an automobile will be subjected to cyclic loading (alternating positive and negative forces or stresses) during use. To test the materials behaviour in the laboratory under such cyclic loading, a computer is used to measure the force acting on the material over time. The computer also precisely indicates when the material sample fractures. The equation describing the loading may be given by:
= F1 sin (ωt ) + F2 cos (2ωt )
where F1 = 34 kN, F2 = -18kN, and ω = 33 rad/s. The material was observed to fracture after 3 hours, 15 minutes and 5 seconds. Use ode45 and a step size of 0.01 seconds, determine what the force acting on the material was at this instant. Use MATLAB command window to solve this problem.
Task 6
The growth of populations of organisms has many engineering and scientific applications. One of the simplest models assumes that the rate of change of the population, dp/dt, is proportional to the existing population, p, at any time, t :
dp
= kg p
dt
where kg is the growth rate. The world population in millions from 1950 through to 2000 is listed below.
t [years] |
1950 |
1955 |
1960 |
1965 |
1970 |
1975 |
1980 |
1985 |
1990 |
1995 |
2000 |
p[millions] |
2555 |
2780 |
3040 |
3346 |
3708 |
4087 |
4454 |
4850 |
5276 |
5686 |
6079 |
(a) Assuming that the model above holds, transform the given data and apply linear regression to estimate kg .
(b) Use ode45() along with the results of (a) above to simulate the world population trend from 1950 to 2050 with a step size of 5 years. Display your simulation results along with the actual data on a plot. How sensitive are your simulation results to the initial value of the population in 1950?
Task 7
Although the model in task 4 works adequately when population growth is unlimited, it breaks down when factors such as food shortages, pollution, and lack of space inhibit growth. In such cases, the growth rate is not a constant, but can be formulated as
kg = kgm (1− p / pmax )
where kgm = the maximum growth rate under unlimited conditions, p = population, and pmax = the maximum population. Note that pmax is sometimes called the carrying capacity. Thus, at low population density p << pmax , kg →kgm. As p approaches pmax, the growth rate approaches zero. Using this growth rate formulation, the rate of change of population can be modeled as
dp
= kgm (1− p / pmax )p
dt
This is referred to as the logistic model. The analytical solution to this model is
p = po
Simulate the world’s population from 1950 to 2050 using (a) the analytical solution, and (b) ode45() with a step size of 5 years. Employ the following initial conditions and parameter values for your simulation: po (in 1950) = 2,555 million people, kgm = 0.026/yr, and pmax =12,000 million people. Display your results as a plot along with the data from task 4.
Task 8
Consider a pond drains through a pipe. Under a number of simplifying assumptions, the following differential equation describes how depth changes with time:
= −
where h = depth (m), t = time (s), d = pipe diameter (m), A(h) = pond surface area as a function of depth (m2), g = gravitational constant (= 9.81 m/s2), and e = depth of pipe outlet below the pond bottom (m). Based on the following area-depth table, solve this differential equation to determine how long it takes for the pond to empty, given that h(0) = 6 m, d = 0.25 m, e = 1 m.
h, m |
6 |
5 |
4 |
3 |
2 |
1 |
0 |
A(h), m2 |
1.17 |
0.97 |
0.67 |
0.45 |
0.32 |
0.18 |
0 |
2023-01-13