Homework 04 Solution

6 if h0 empty fuel tank v0 elseif h06 level in

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: el of h r=0.6; if h<=0 % empty fuel tank V=0; elseif h<=0.6 % level in spherical cap V=pi*h*h*(3*r-h)/3; elseif h<=2 % level in cylinder V=2*pi*r*r*r/3 + pi*r*r*(h -r); elseif h<=2.8 % level in inverted cone V=2*pi*r*r*r/3 + pi*r* r*1.4 + pi*r*r*(0.8)/3 - pi*(r/0.8)^2*(2.8 h)^3/3; else % tank is full V=2*pi*r*r*r/3 + pi*r*r*1.4 + pi*r*r*(0.8)/3; end >> h=0:0.1:2.8 >> for i=1:29, V(i)=Vfuel(h(i));,end >> plot(h,V), xlabel('Liquid Height, \itm','Fontsize',18), ylabel('Tank Volume, \itm^3','Fontsize',18) 2.5 Tank Volume, m 3 2 1.5 1 0.5 0 0 0.5 1 1.5 2 Liquid Height, m 2.5 3 4.2. Text Problem 5 .2 x y -6 18 -4 13 ∑ ∑ [ x y f (x ) r =...
View Full Document

Ask a homework question - tutors are online