summaryrefslogtreecommitdiff
path: root/557/CH2/EX2.8/8.sce
blob: 559d1f94b0fa442b2d75574e6f2ffb192a8a1c61 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
clc ;funcprot(0);
//Example 2.8 

//Initializing the variables
rho = 10^3;    //Density of fluid
rhoM = 13.6*10^3;    //Density of manometer liquid
g = 9.81;    //Acceleration due to gravity
H = 0.3;    // Differnce in height = b-a as in text
h = 0.7;

//Calculations
result = rho*g*H + h*g*(rhoM-rho);
disp( result/1000,"Pressure difference (kN/m2):");