Question: How would this be coded in matlab? The f variable constantly changes between 0 or 1 depending on whether or not the water is flowing.
How would this be coded in matlab? The f variable constantly changes between 0 or 1 depending on whether or not the water is flowing.
AESC 210 - SS21 > Project - Review of Conditional Statements and Loops (Pliney's Fountain) > * Problem 4 - Pliney's Fountain 3 solutions submitted (max: 4) | View my solutions 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. RE Qin dy y_high = Qin - (C/2gy * rer) f TER dt y_low y = 0 Script C Reset %% 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
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
