summaryrefslogtreecommitdiff
path: root/3720/CH5/EX5.1/Ex5_1.sce
blob: ea27ff59f20b371e0eabadcc3af275b79efbc800 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
//Example 5_1
clc;clear;funcprot(0);
// Given values
V=10; // Volume of water in gallon
dt=50;// Time in seconds
rho=1;//The density of water in kg/L
r_e=0.4;// Radius of  nozzle at exit in cm

// Calculation (a)
v=V/dt; // Volume flow rate in L/s
v=v*3.7854;// Convert gal into L
printf('(a)The volume flow rate of water,v=%0.3f L/s\n',v);
m=rho*v;// Mass flow rate of water in kg/s
printf('The mass flow rate of water,m=%0.3f kg/s\n',m);

// Calculation (b)
A_e=%pi*r_e^2;// The cross sectional area of nozzle at exit in cm^2
V_e=v/A_e;
V_e=(V_e*10000/1000);// Convert to m/s
printf('(b)The average velocity of water at the nozzle exit,V_e=%0.1f m/s\n',V_e);