Consider a cylindrical storage tank with surface area A which contains a liquid at depth y:
At time t = 0, the tank is empty (y = 0 when t = 0). Liquid is supplied to the tank at a sinusoidal rate Qin =3Qsin2 (t) and withdrawn from the tank as: πππ’π‘ = 3(π¦ β π¦ππ’π‘) 1.5 if π¦ > π¦ππ’π‘ πππ’π‘ = 0 if π¦ β€ π¦ππ’π‘Β
Please note that both πππ and πππ’π‘ have units m3 /h.Β
The mass balance for this system can be written: (πβππππ ππ π£πππ’ππ) = (ππππππ€) β (ππ’π‘ππππ€) or: π(π΄π¦) ππ‘ = πππ β πππ’π‘ Assume that A = 1,250 m2 , Q = 450 m3 /h, yout = 10 m.
Write a program that solves the differential equation from t = 0 to t = 250 h using:Β
β’ the Classical 4th -order Runge-Kutta method using a step size of 1 hΒ
β’ the Eulerβs method using a step size which closely approximates the solution found the Classical 4th -order Runge-Kutta method (you must find the step size which closely approximates the Runge-Kutte solution)Β
β’ the built-in method ode45Β
β’ Plots the liquid height y versus time t for all three solutions. Your plot should show each curve using a different color. Add a title, axes labels, and a legend.
We need at least 9 more requests to produce the answer.
1 / 10 have requested this problem solution
The more requests, the faster the answer.
Can you help me with this problem? This has to be done using Matlab and solving with runge-katta, euler method, and the built in function ode45
4. (25 points) Solve the following ODE using classical 4th-order Runge- Kutta method within the domain of x = 0 to x= 2 with step size h = 1: dy 3 dr=y+ 6x3 dx The initial condition is y(0) = 1. If the analytical solution of the ODE is y = 21.97x - 5.15; calculate the error between true solution and numerical solution at y(1) and y(2).
(Matlab) Use Matlab's built-in Runge-Kutta function ode45 to solve the problem 1010y -xz +28x - y 3 on the interval t Ρ [0, 100 with initial condition (z(0), y(0),z(0)) = (1,1,25), and plot the trajectory of the solution ((t), (t)) forte [0, 100 (Matlab) Use Matlab's built-in Runge-Kutta function ode45 to solve the problem 1010y -xz +28x - y 3 on the interval t Ρ [0, 100 with initial condition (z(0), y(0),z(0)) = (1,1,25), and plot the trajectory of the...
ME 32200 Programming course (MATLAB) 4. Please finish the following Matlab code for solving the ODE: dy = y(1+1) dt I.C. y(0) = 0 with the multi-step 4th order Milne's Method, and apply 4th order Runge Kutta method to the first 4 points (1 boundary point and the next 3 points). (Hint: 4th order Milne's Method Predictor: 7i+ = Y-3 +h(2f;- fi- +25,-2) Corrector: y = y + + +0. +45j + fi-) Where f; = f(t;,y,) and Fit =...
Hey Can someone write me a c++ pogramm using 4th order runge kutta method? h=0.1 y' = 3y, y(0) = 1
(e) Consider the Runge-Kutta method in solving the following first order ODE: dy First, using Taylor series expansion, we have the following approximation of y evaluated at the time step n+1 as a function of y at the time step n: where h is the size of the time step. The fourth order Runge-Kutta method assumes the following form where the following approximations can be made at various iterations: )sh+ΰΈ£ΰΈΉΰΉ: ,f(t.ta, ),. Note that the first term is evaluated at...
Can you please help with this question? Please answer the question in MATLAB coding. Thank you in advance!! A storage tank (shown below) contains a liquid at depth y where y 0 when the tank is half full. Liquid is withdrawn at a constant flow rate Q to meet demands. The contents are resupplied at a sinusoidal rate 3Qsin2(t) A. The change in volume can be written as d(y) 30 sin2(t) Q dt where A is the surface area and...
Solve Example 6.2 on page 111 of textbook, using (1) the 4th order Runge Kutta method and (2) Simulink method, respectively. Please submit your MATLAB code m file and slx file You can use the results from the code attached below (from the textbook by ODE45 solver) as a reference Example 6.2 ode45 ex.m % This program solves a system of 3 differential equations % by using ode45 function % y1 (0)=0, y2 (0)=1.0, y3 (0)=1.0 clear; clc initial [0.0...
The Program for the code should be matlab 5. [25 pointsl Given the initial value problem with the initial conditions y(0) 2 and y'(0)10, (a) Solve analytically to obtain the exact solution y(x) (b) Solve numerically using the forward Euler, backward Euler, and fourth-order Runge Kutta methods. Please implement all three methods yourselves do not use any built- in integrators (i.e., ode45)). Integrate over 0 3 r < 4, and compare the methods with the exact solution. (For example, using...
Complete using MatLab 1. Consider the following initial value problem 3t2-y, y(0) = 1 Using Euler's Method and the second order Runge-Kutta method, for t E [0, 1] with a step size of h 0.05, approximate the solution to the initial value problem. Plot the true solution and the approximate solutions on the same figure. Be sure to label your axis and include an a. appropriate legend b. Verify that the analytic solution to the differential equation is given by...
9) Using Euler method, solve this with following initial conditions that t = 0 when y = 1, for the range t = 0 to t = 1 with intervals of 0.25 dr + 2x2 +1=0.3 dt 1o) Using second order Taylor Series method, solve with following initial conditions to-0, xo-1 and h-0.24 11) x(1)-2 h-0.02 Solve the following system to find x(1.06) using 2nd, and 3rd and 4th order Runge-Kutta (RK2, RK3 and RK4)method +2x 2 +1-0.3 de sx)-cox(x/2)...