Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

Small MATLAB programming project:

The model.

A water tank has shape shown below. Water is delivered to this tank through the bottom. The water volume in the system is given by a function V (t), such that V (0) = 0 (here V (t) denotes the volume of water delivered to the system by the time t).

In this assignment you will simulate the process of filling up this tank. There are several reasonable questions to answer:

At what time water will reach the top of the tank?

At what time water reaches particular level?

and so on.

You will develop a MATLAB code that helps to answer this and similar questions. Your MATLAB code will have to have a function named solver that solves numerically an equation using the method defined  by NUMBER: 20763792. Function solver will take an equation to be solved, interval, and tolerance as    arguments and return smallest solution of the equation on specified interval. This function will be used    several times in order to provide answers to above mentioned or similar questions.

What to compute?

Your code should first find and print times TA ; TB ; TC and TD when water reaches the levels A; B; C and D (top of the tank).

After this, calculate and plot dependency t(h) where h is the height of water level 0£ h £ 2r1 + l1 + l2 + r2,  and t(h) is time when water reaches level h. For this, Set H = 2r1 + l1 + l2 + r2, divide interval [0, H] into N equal subintervals and compute t(hi), where hi = i(H/N) ; i = 0, 1, … , N, and t(hi) is the earliest time when the water level reaches the height hi .

Your code must have a function named simulate that takes tank parameters r1, l1, l2, r2, integer value N and tolerance as arguments and produces necessary for plotting data along with the plot.

How to find your personal version of the problem?

Take the sum m of digits of NUMBER: 20763792.

Find j = m mod 3 + 1. This gives you the method to implement in function solver:

j = 1: Bisection,

j = 2: Newton's,

j = 3: Secant.

Take the last digit k of NUMBER: 20763792.

Find i = k mod 3 + 1. This gives you the function V (t):

i = 1: V (t) = 3t + 5t2 + cos(3t) + sin(5t) - 1,

i = 2: V (t) = 3t + 2t2 + cos(4t) exp(-t/4) - 1,

i = 3: V (t) = 2t2 + sin(3t)*exp(-t/8).

What to submit?

Submit m-files, and the results ofyour program run (including values TA ; TB ; TC ; TD and plot) for r1 = 2; l1 = 3; l2 = 3; r2 = 4; N = 100 and tolerance 10-4 .