summaryrefslogtreecommitdiff
path: root/647/CH7/EX7.3/Example7_3.sce
blob: 863ea29be786d0a848711aed16f4c49ee6b94f3f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
clear;
clc;

// Example: 7.3
// Page: 262

printf("Example: 7.3 - Page: 262\n\n");

// Solution

//*****Data******//
d1 = 0.3;// [m]
d2 = 0715;//[m]
Q = 40/1000;// [cubic m/s]
Z1 = 8;// [m]
Z2 = 6;// [m]
P1 = 5*10^5;// [Pa]
density = 1000;// [kg/cubic m]
g = 9.81;// [m/square s]
//*************//

// From Fig. 7.3 (Pg: 262)
A1 = (%pi/4)*d1^2;// [square m]
A2 = (%pi/4)*d2^2;// [square m]
U1 = Q/A1;// [m/s]
U2 = Q/A2;// [m/s]
// Applying Bernoulli's equations at sections 1 & 2:
P2 =  ((U1^2/(2*g) + Z1 + P1/(density*g)) - (U2^2/(2*g) + Z2))*(density*g);// [Pa]
printf("Pressure at section 2 is %.2f bar",P2/10^5);