[SOLVED] C Scheme matlab Portfolio 3 Submission Instructions

$25

File Name: C_Scheme_matlab_Portfolio_3_Submission_Instructions.zip
File Size: 480.42 KB

5/5 - (1 vote)

Portfolio 3 Submission Instructions
Please follow the submission instructions carefully. A failure to do so will result in mark deductions. Make sure you attempt all questions in Part A, Part B and Part C.
1. Solutions to all questions must be presented within a single pdf document and submitted via blackboard. There is no MATLAB grader for this Portfolio all MATLAB code will be marked by hand.
2. The submitted pdf should include your student number in its same (eg. n#######Portfolio3.pdf)
3. All your working and MATLAB code should be set out clearly.
4. All questions should be solved using hand working unless you are specifi- cally told to solve in MATLAB.
5. A marking scheme for the Portfolio can be found at the end of this docu- ment. Please read it carefully.
6. Portfolio 3 is due at 11:59pm Friday 10th January and should be sub- mitted through Blackboard. Late submissions will receive a mark of zero. If you make multiple submissions, the most recent on-time submission will be graded.
1

Part A: Systems of ODEs (10 Marks)
Consider the system of cascading tanks shown in Figure 1.
Figure 1: System of Cascading Tanks
The upper tank has water flowing in at a rate Q(t) and water exiting at a rate of kAVA. The water exiting tank A feeds into tank B, where water escapes at a rate of kBVB. This system can be modelled with the following system of linear ODEs:
dVA dt
are constant parameters representing how quickly water exits the tanks. Consider that kA = 2 min1, kB = 1 min1 and Q(t) = 0.
1. Convert the system of ODEs into the matrix-vector form V = AV + b.
2. Solve the eigenvalues and eigenvectors of the coefficient matrix A.
3. Solve for VA(t) and VB(t) given VA(0) = 1000 L and VB(0) = 0.
4. Plot your answers for VA(t) and VB(t) in MATLAB.
5. Consider that water now flows into tank A at a constant rate (ie. Q(t) is a non-zero constant). We would like for the steady-state volume of water in tank B to be 100 L. What should the flow rate, Q(t), be set to?
Hint: at steady-state VA and VB will both be constant. 2
= Q(t) kAVA (1)
dVB dt
= kAVAkBVB (2) where VA and VB represent the volume of water in each tank and kA and kB

Part B: Numerical Methods (10 Marks)
In this exercise, you will once again be analysing a system of cascading tanks, but now you will be solving numerically.
dVA dt
dVB dt
Consider that kA = 2 min1, kB = 1 min1 and Q(t) = 0.
1. Solve equation (1) using ode45 and plot the solution.
2. Solve the system of equations (ie. equation (1) and (2)) using ode45. Plot your ode45 solution and comment on whether it looks the same as your plot from Part A, Q4.
3. Solve the system of equations (ie. equation (1) and (2)) using Eulers Method with a step size of h = 0.5. A function called eulerPortfolio can be downloaded from Blackboard to help you with this task. Plot the solution and comment on its accuracy.
4. Conduct an investigation into how the step size, h effects the accuracy of your numerical solution when using Eulers Method. From your investiga- tion, you should recommend a step size to use that produces a sufficiently accurate solution while not wasting computational time. Include any rele- vant code, plots and reasoning in your solution. Make sure to clearly state what you define as sufficiently accurate.
= Q(t) kAVA (1) = kAVAkBVB (2)
3

Part C: Probability (10 Marks)
Michael the mechanical engineer catches public transport into work each day. He has three different modes of transport: bus, train and ferry. He catches the bus on 50% of days, the train on 30% of days and otherwise catches the ferry. He finds the bus is late 20% of the time, the train is late 10% of the time and the ferry is late 15% of the time. When his mode of transport is late, he ends up being late for work.
1. Define the events in the problem (eg. Let B be catching the bus).
2. Define the probabilities given in the problem using probability notation and the events you previously defined.
3. Calculate the probability that Michael will be late for work.
4. Given Michael is late to work, what is the probability that he caught the train to work?
5. Given Michael arrives at work on-time, what is the probability that he caught the bus to work?
4

Marking Scheme
Part A
1. Correct coefficient matrix (1 mark), other terms in equation correct (1 mark).
2. Correct eigenvalues (1 mark), correct eigenvectors (2 marks).
3. Correct general solution (1 mark), Correct application of initial conditions (1 mark), Correct final answer (1 mark).
4. Correct plot with title, labels and legend (1 mark).
5. Correct solution (1 mark).
Part B
1. Correct application of ode45 (1 mark), Correct plot with title and axis labels (1 mark).
2. Correct application of ode45 (1 mark), Correct plot with title, axis labels and legend (1 mark), correct comment (1 mark).
3. Correct application of eulerPortfolio (1 mark), Correct plot with title, axis labels and legend (1 mark), correct comment (1 mark).
4. Recommending a step size that produces a sufficiently accurate solution (1 mark) that doesnt waste computational time (1 mark).
Part C
1. Correctly defining transport modes (1 mark), correctly defining late/not late (1 mark).
2. Correctly defining probabilities transport probabilities (1 mark), correctly defining conditional probabilities (1 mark).
3. Correct approach (1 mark), correct solution (1 mark).
4. Correct approach (1 mark), correct solution (1 mark).
5. Correct approach (1 mark), correct solution (1 mark).
5

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[SOLVED] C Scheme matlab Portfolio 3 Submission Instructions
$25