blob: fed514567a5c6b7f85e194ca95be8db9d9ff64d4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
// A Textbook of Fluid Mecahnics and Hydraulic Machines - By R K Bansal
// Chapter 2 - Pressure and its measurements
// Problem 2.16
//Given Data Set in the Problem
sg1=1.5
sg2=0.9
g=9.81
dens1=sg1*1000
dens2=sg2*1000
//calculations
pA=1*10^4*g
pB=1.8*10^4*g
//pressure above X-X in left limb is;
p_left=13.6*1000*g*h+dens1*g*(2+3)+pA
p_right=dens2*g*(h+2)+pB
function [f]=F(h)
f=13.6*1000*g*h+dens1*g*(2+3)+pA-(dens2*g*(h+2)+pB)
endfunction
h=10;
h=fsolve(h,F)
mprintf("\nTHE DIFFERENCE IN MERCURY LEVELS IS %f cm\n",h*100)
|