Part A
Jesse the civil engineer is testing concrete strength (in MPa), and would like to create some MATLAB functions to analyse the test data. Each MATLAB function requires the use of for loops to solve the problem.
1. (AMS Submission) Write a MATLAB function that accepts a vector of concrete strengths and calculates the mean concrete strength. The mean is given by the equation
x‾ = 1/n∑i=1nxi,
where n is the number of elements in the vector x. Your solution must use a for loop and cannot use the in-built functions mean or sum.
2. (AMS Submission) Jesse requires the concrete to be stronger than 30 MPa in strength. Write a MATLAB function that accepts the vector of concrete strengths and outputs the ratio of concrete strengths above 30 MPa.
3. (AMS Submission) Jesse now has a matrix of concrete strength data. Each column is a different type of concrete, and each row represents a concrete test. Write a MATLAB function that computes the ratio of concrete strengths above 30 MPa for each type of concrete. The output should be a row vector of the calculated ratios.
Note: If you are unable to get a question correct in ANIS, your tutor will look at the code you submit in your portfolio, and will award part marks where appropriate.
Part B
1. Consider a sky diver in free fall.
(a) Draw a free body diagram showing the forces acting on the sky diver. Note that the drag force will be proprtional to velocity squared, and act in the opposite direction to velocity.
(b) Apply Newton's 2nd Law to model the skydiver's velocity with a 1st order ODE, treating down as the positive direction. Present your ODE in standard form.
(c) A skydiver has a mass of 90 kg, and a drag constant of 0.3 kg/m. Solve the terminal velocity of the skydiver. Hint: You do not need to solve the ODE in order to find the terminal velocity.
(d) Comment on what would change in the ODE model once the parachute has been released.
2. Consider the RL circuit shown below in Figure 1. The resulting ODE for the current was modelled in class. Model an ODE such that the dependent variable is the voltage across the resistor. Present your ODE in standard form.
Part C
Consider a water tank with a hole of area a in its base. The tank will drain through this hole, at a rate proportional to the height of the water (as this influences the pressure). Torricelli's Law describes this process
where:
- h(t) = the height of water in the tank at time t in m,
- A = is the cross-sectional area of the tank in m2,
- a = the area of the hole in the bottom of the tank in m2, and
- g = 9.81 m/s2 is the acceleration due to gravity.
For the following questions, use A = 10 m2, a = 0.1 m2, and h(0) = 10 m.
1. Solve the ODE using separation of variables.
2. Use a first order Taylor series to show that when Torricelli's law is linearised about the initial height, we get
dh/dt = -a/A √(g/(2h(0))).(h(t)+ h(0)))
3. Solve the linearised ODE using the integrating factor method.
4. Plot your solutions to Q1 and Q3 in the same figure. Discuss the accuracy of the linearised ODE solution.