Question: Solve this MATLAB project for a numerical methods course. Use exactly the method and rules written in the parts above the red line, if it's
Solve this MATLAB project for a numerical methods course. Use exactly the method and rules written in the parts above the red line, if it's solved in another way there with be loss of marks. Attach the MATLAB file and fill the part below the red line. Read the page from left to right
Work in groups of 4 max. Only Octave (or MATLAB) is allowed. 2. We need to solve for time Os t S M. Choose your own bound M and your time spacing At. Start with the tank half filled. Submit the files (program file (.m) and template report) electronically via Moodle. Note that your program will be checked and executed 3. Find the steady state in terms of time, K1, K2 and C. (Steady state is the function h(t) . Any plagiarism zero will automatically assigned. that satisfies = 0. You can find it mathematically from the given differential We need to solve numerically the problem: tion. Note that the steady state refers to the equilibrium or long-term behaviour of the solution of the differential equation. Further reading is recommended about the steady states) 1. Write Your Code in Two Separate Problem Consider the cylindrical water tank 4. Run your algorithm to select the values of the constants K1, K2 and C that gives: dm /di shown in the figure. a. An increasing non-oscillatory (curve) of volume (or h) versus time. Plot the Files: Function and Euler Explicit curve of volume (or h) versus time. Observe the steady state in the long-time The tank is being filled at the top, and water behaviour of the solution and compare it to the one you found in 3 Method: You are required to create flows out of the tank through a pipe connected at the bottom. mathematically. What can you say about the level of water in the long term two separate files. and draw a conclusion about the total height of the tank. Is it We need to know at any time t the volume of water (or h) available in the tank. curve of volume (or h) versus time. Observe the steady state in the long-time o Function File: One file must contain behaviour of the solution and compare it to the one you found in 3 mathematically. at can you say about the level of water in the long term the function that performs the Ahole and draw a conclusion about the total height of the tank. necessary mathematical calculations An oscillatory (sinusoidal) regime (curve) of volume (or h) versus time. dm Id Observe the steady state in the long-time behaviour of the solution a for the solution. This function should compare it to the one you found in 3 mathematically. What can you say about the level of water in the long term and draw a conclusion about the total height take the parameters that influence The ODE modelling the height h(t) is given by: of the tank. the water level change, such as K1, dh(t) PAtank - = Ki + Kz sin?(Ct) - PApipe v2gh(t) Provide using the code, the volume water at time t = 24 min for one of the previous regimes K2, and C, as inputs so that it can where, p = 1000kg/m' is the water density, g is gravity, K1, Kz and C are calibration Important: perform calculations based on these constants of the inlet mass flow actuator. Atank is the area of the cross-section of the tank and Apipe is the area of the cross-section of the exit pipe. 1. Only MATLAB/OCTAVE language is accepted. parameters. (Note that this function For your simulations, consider: 2. Don't call any MATLAB/OCTAVE built-in function, for which case the work will not be graded. You need to program your own Euler algorithm. is the in ()) Please check tank = ID X 10-5m" and Apipe = Atank X 10 5m, the total height of the tank is 10m. (use the provided word out the sample codes in the moodle. pdf, it is MANDATORY) and the code (.m file) in a single zipped folder, and one Note that the feeding pipe (inlet mass flow) is controlled by the term: K, + submission per group. Kzsin? (Ct) in the equation. Volume of the water at each time t: V(t) = Atank X h(t) 4. Names of the group must appear in the code file, and report. No name can be added after submission. ID: is the student's ID of one of the group members. 5. Marks will be deducted for not commented codes and not running codes.! Euler Explicit Method File: The second file must contain your Euler Explicit method code. Crucially, this Submit Two Plots for Each Case: For each scenario, you need to submit two code must call the function you graphs: one showing the increasing water Codes that separately model only the defined in the separate function level and its corresponding steady state inflow or only the outflow will be file to perform the calculations at (using the same K1, K2, and C values), one considered as homework done with Al showing the decreasing water level and its each step of the Euler method. We corresponding steady state, and finally, assistance. Please do not directly use have provided you with a sample one showing the oscillatory water level didh. Instead, you should transform the and its corresponding steady state. This problem into new variables, such as x function file and a sample Euler means you will submit a total of six and y, and use the y variable in your Explicit code that demonstrates how graphs. (Check the expected graphs in solution, ensuring that your Euler to call this function. You are required the moodle) Write Comments About Water Level and Tank Capacity: For Explicit code calls the function you to submit both the function file and each scenario (increasing, decreasing, created in the separate file to perform your Euler Explicit code(s) that oscillatory water level), you are expected the calculations. This approach is to correctly call this function. The Euler to write at least one sentence commenting encourage you to understand the on the water level's change over time and Explicit code can either provide modularity of code and the fundamental its relationship with the tank's capacity. graphs for increasing, decreasing, Calculate and Include the Value at t=25: principles of solving differential equations, Do not forget to numerically calculate and as well as to support your learning and oscillatory water levels with state the water height (or volume) at time process. steady states in a single file, or you t=25 in your submission. Please recheck can submit separate files for each the instructions in the project word file before submitted your project files! We scenario. Your codes will be run for evaluation. MAT224: Project1 Name ID 3. Increasing Regim Provide all simulation parameters; K1. K2, C. At, Ap. final time simulation M. and the used ID. . Plot the graph of h(t) (or V(t)) Water distribution tank simulation. Provide the steady state from the graph and from formula. Comment the tank size 4. Decreasing Regim Provide all simul in M. and the used ID. . he graph of h(t) (or V(t)) Provide the steady state from the graph and from formula. Comment the tank size 1. Equations Write the ODE to solve. Specify your unknown. Oscillatory Regim ameters; K1, K2, C, At, Ap, final t lation M, and the used ID. Plot the graph of h(t) (or V(t)) Provide the amplitude and average of the osc the formula. Comment the tank size 6. Volume of the water at t=25minutes 2. Steady state formula
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
