Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I am not sure why i am getting this error please help Given the parameters set in the template below, create a script that uses

image text in transcribedimage text in transcribedimage text in transcribedI am not sure why i am getting this error please help

Given the parameters set in the template below, create a script that uses Euler's method to chart the height of water in the tank (y in the diagram below) of Pliney's fountain. Use a time-step of 0.01 seconds and investigate from t=0 to t= 100 seconds. Assume the tank is initially empty. Plot the resulting relationship RA Qin y_high dy lin - (C/2gy rer?).[ TER dc Y_low y = 0 Script C Reset MATLAB Documentation 1 %% Parameters and initial conditions 2 Q_in=50*10^-6; % Flow in m^3/s 3 Rt=0.05; % Tank radius in m 4 y_high-0.1; % high water mark in m 5 r=0.007; %outlet radius in m 6 C=0.6; % dimensionless constant 7 y_low=0.025; % low water mark in m 8 g=9.81; % gravitational constant in m/s^2 9 y=0; % initial water level in m 10 f=8.5; 11 12 dydt=@(y) (Q_in-(C*sqrt(2*g*y)*pi*r^2)*+)/pi/Rt^2; % differential equation 13 14 h = 0.01; % step size 15 16 t = 0:h:100; % time array 17 18 for i = 1: length(t)-1 19 y(i+1) = y(i) + h*dydt (y(i)); 20 end 21 22 plot(t,y); 23 24 xlabel('time (sec)'); 25 26 ylabel('y(t) m'); 27 Output 0.06 0.05 0.04 y(t) m 0.03 0.02 0.01 0 0 20 40 60 80 100 time(sec) Previous Assessment: 1 of 2 Tests Passed X y is correct at all timesteps Variable y has an incorrect value. Solution is plotted

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_step_2

Step: 3

blur-text-image_step3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

2. What is your turnover among employees?

Answered: 1 week ago