blob: e20c9c94d1114b30969ce2d2ac39962cb219d535 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
clc ;funcprot(0);
//Example 2.5
//Initializing the variables
p = 350*10^3; //Gauge Pressure
pAtm = 101.3*10^3; //Atmospheric Pressure
rhoW = 1000; //Density of Water
sigma = 13.6; //Relative Density of Mercury
g = 9.81;//Acceleration due to gravity
//Calculations
function[head]=Head(rho)
head = p/(rho*g);
endfunction
rhoM = sigma*rhoW;
pAbs = p + pAtm;
disp(pAbs/1000,"Absolute pressure(kN/m2)",Head(rhoM),"Equivalent head of water (m):","Part (b)",Head(rhoW),"Equivalent head of water (m) :","Part (a)" );
|