USING A MATLAB PROGRAM SOLVE THE FOLLOWING QUESTION: ( HARD COPY OF REPORT, SOFT
ID: 3582676 • Letter: U
Question
USING A MATLAB PROGRAM SOLVE THE FOLLOWING QUESTION: ( HARD COPY OF REPORT, SOFT COPY OF PROGRAM)
NOTE: This question is 24.8 from the book (NUMERICAL METHODS for ENGINEERS 6th edition (Steven C. Chapra, Raymond P. Canale))
Q: You are interested in measuring the fluid velocity in a narrow rectangular open channel carrying petroleum waste between locations in an oil refinery. You know that, because of bottom friction, the velocity varies with depth in the channel. If your technician has time to perform only two velocity measurements, at what depth would you take them to obtain the best estimate of the average velocity? State your recommendation in terms of the percent of total depth (d) measured from the fluid surface. For example, measuring at the top would be 0%d, whereas at very bottom would be 100%d.
Explanation / Answer
function velocity = moving_velocity(total_pressure, static_pressure)
if total_pressure >= static_pressure
velocity = 1.016*(sqrt(total_pressure - static_pressure));
else
fprintf('Static pressure cannot be greater than total pressure. ');
fprintf('May be there is an error in the instrument');
velocity = 'Imaginery!';
end
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.