# Chapter 3 : Hydrostatic Pressure¶

## Example 3.1 Page No : 29¶

In [1]:
import math

# Variables :
D = 30*10**-2;			#in m
F = 9810.;			#in N

# Calculations
A = math.pi*D**2/4;			#in m**2
p = F/A;			#in N/m**2 or Pa
p = p/1000;			#kPa

# Results
print "Intensity of pressure at the bottom of container in kPa : %.2f"%p

Intensity of pressure at the bottom of container in kPa : 138.78


## Example 3.2 Page No : 29¶

In [2]:

# Variables :
h = 1.5;			#in m
w_w = 9.81;			#in kN/m**3
w_g = 1.26;			#in kN/m**3
w_m = 13.6;			#in kN/m**3

# Calculations and Results
f = h*w_w;			#kN/m**2
print "Intensity of pressure exerted by water column in kN/m**2 : ",f
f = h*w_w*w_g;			#kN/m**2
print "Intensity of pressure exerted by glycerine column in kN/m**2 : ",f
f = h*w_w*w_m;			#kN/m**2
print "Intensity of pressure exerted by mercury column in kN/m**2 : ",f

Intensity of pressure exerted by water column in kN/m**2 :  14.715
Intensity of pressure exerted by glycerine column in kN/m**2 :  18.5409
Intensity of pressure exerted by mercury column in kN/m**2 :  200.124


## Example 3.3 Page No : 30¶

In [3]:

# Variables :
p = 2;			#in kN/m**2
w_w = 9.81;			#in kN/m**3
w_alcohol = w_w*0.789;			#in kN/m**3
w_m = 13.6;			#in kN/m**3

# Calculations and Results
H = p/w_alcohol;			#in m
print "Depth of alcohol in meter : %.3f"%H

Depth of alcohol in meter : 0.258
Pressure head in terms of water in meter : 0.204
Pressure head in terms of mercury in meter : 0.015


## Example 3.4 Page No : 31¶

In [4]:

# Variables :
Hwater = 6.;			#m(Pressure head of water)
S_oil = 0.70;			#(specific gravity of oil)

# Calculations and Results
H_oil = Hwater/S_oil;			#in m(Pressure head in terms of oil)
print "Pressure head of water in terms of oil in meter : %.2f"%H_oil
S_oil = 0.825;			#(specific gravity of oil)
S_mercury = 13.6;			#(specific gravity of mercury)
Hmercury = 70./100;			#m(Pressure head of mercury)
H_oil = S_mercury/S_oil*Hmercury;			#in m(Pressure head in terms of oil)
print "Pressure head of mercury in terms of oil in meter : %.3f"%H_oil

Pressure head of water in terms of oil in meter : 8.57
Pressure head of mercury in terms of oil in meter : 11.539


## Example 3.5 Page No : 36¶

In [6]:

# Variables :
w = 9.81;			#in kN/m**3
l = 3.;			#in m
b = 2.;			#in m
h = 1.;			#in m

# Calculations and Results
f_bottom = w*h;			#in kN/m**2(Pressure intensity at bottom)
p_bottom = f_bottom*l*b;			#kN
print "Total pressure on the bottom in kN : ",p_bottom
f_long_vertical = f_bottom/2;			#kN
p_long_vertical = f_long_vertical*l*h;			#kN
print "Total pressure on long vertical wall in kN : ",p_long_vertical
f_short_vertical = f_bottom/2;			#kN
p_short_vertical = f_short_vertical*b*h;			#kN
print "Total pressure on short vertical wall in kN : ",p_short_vertical

Total pressure on the bottom in kN :  58.86
Total pressure on long vertical wall in kN :  14.715
Total pressure on short vertical wall in kN :  9.81


## Example 3.6 Page No : 37¶

In [7]:

# Variables :
p_water = 1000.;			#in kg/m**3
p_liquid = 800.;			#in kg/m**3
g = 9.81;			#gravity consmath.tant
h1 = 1.5;			#m

# Calculations and Results
px1 = p_liquid*g*h1/1000;			#kN/m**2
print "Pressure at a point 1.5 meter below free surface in kN/m**2 : ",px1
h2 = 2.;			#m
px2 = p_liquid*g*h2/1000;			#kN/m**2
print "Pressure at a point 2 meter below free surface in kN/m**2 : ",px2
h31 = 2.;			#m(for liquid)
h32 = 0.5;			#m(for water)
px1 = p_liquid*g*h31/1000;			#kN/m**2
px2 = p_water*g*h32/1000;			#kN/m**2
px3 = (px1+px2);			#kN/m**2
print "Pressure at a point 2.5 meter below free surface in kN/m**2 : ",px3
h = 2.;			#meter(water level)
b = 8.;			#meter(width of wall)
p_bottom = px1+(p_water*g*h)/1000;			#kN/m**2
p_avg1 = (px1+0)/2;			#kN/m**2(top 2m liquid layer)
p_avg2 = (px1+p_bottom)/2;			#kN/m**2(top 2m water layer)
F_per_meter = p_avg1*h*1+p_avg2*h*1;			#kN
Fwall = F_per_meter*b;			#kN
print "Force on the wall in kN : ",Fwall

Pressure at a point 1.5 meter below free surface in kN/m**2 :  11.772
Pressure at a point 2 meter below free surface in kN/m**2 :  15.696
Pressure at a point 2.5 meter below free surface in kN/m**2 :  20.601
Force on the wall in kN :  533.664


## Example 3.7 Page No : 46¶

In [5]:

# Variables :
b = 3.;			#in meter
h = 3.;			#in meter
S_oil = 0.8;			#(specific gravity of oil)

# Calculations
A = 1./2*h*b;			#in m**2
x_bar = 2./3*3;			#in meter
SW_water = 9.81*1000;			#in N/m**3
SW_oil = SW_water*S_oil;			#in N/m**3
F_surface = SW_oil*A*x_bar;			#in kN
IG = b*h**3/36;			#in m**3
h_bar = IG/A/x_bar+x_bar;			#in meter

# Results
print "Force shall act at depth of centre of pressure. This depth in meter is : ",h_bar

Force shall act at depth of centre of pressure. This depth in meter is :  2.25


## Example 3.8 Page No : 47¶

In [6]:

# Variables :
l = 3.;			#in meter
b = 2.;			#in meter
p = 2.*10**6;			#in Pa
g = 9.81;			#gravity consmath.tant
w = g*1000.;			#in N/m**3

# Calculations and Results
h = p/w;			#in meter
xbar = h-1.5;			#in meter
A = l*b;			#in m**2
p_gate = w*A*xbar/10**6;			#in MN
print "Total pressure on the gate in MN : %.3f"%p_gate
IG = b*l**3/12;			#in m**3
h_bar = IG/A/xbar+xbar;			#in meter
print "Position of centre of pressure is ",round(h_bar-xbar,3)," meter below the centroid of gate."

Total pressure on the gate in MN : 11.912
Position of centre of pressure is  0.004  meter below the centroid of gate.


## Example 3.9 Page No : 48¶

In [7]:

# Variables :
g = 9.81;			#gravity
GH = 4.;			#meter
IJ = 4.;			#meter
IC = 2.;			#meter
GC = 3.;			#meter
AG = (10.-4)/2;			#meter
BH = (10.-4)/2;			#meter
EI = AG*IC/GC;			#meter
JF = AG*IC/GC;			#meter
EF = EI+IJ+JF;			#meter
A = (8.+4.)/2*2;			#in m**2
a = 4.;			#meter
b = 8.;			#meter
d = 2.;			#meter

# Calculations and Results
xbar = (2*a+b)/(a+b)*d/3;			#in meter
w = g*1000;			#in N/m**3
p_gate = w*A*xbar/10**3;			#in kN
print "Total pressure in kN : ",p_gate
IG = (a**2+4*a*b+b**2)/(a+b)*d**3/36;			#in m**3
h_bar = IG/A/xbar+xbar;			#in meter
print "Depth of centre of pressure is ",h_bar," meter."

Total pressure in kN :  104.64
Depth of centre of pressure is  1.25  meter.


## Example 3.10 Page No : 50¶

In [8]:
import math

# Variables :
g = 9.81;			#gravity
xbar = 8.;			#meter
D = 4.;			#meter

# Calculations and Results
A = math.pi*D**2/4;			#meter**2
w = g*1000;			#in N/m**3
p = w*A*xbar/10**3;			#in kN
print "Total pressure in kN : %.2f"%p
IG = math.pi*D**4/64;			#in m**4
h_bar = IG/A/xbar+xbar;			#in meter
print "Depth of centre of pressure is ",(h_bar)," meter."

# note : Answer of total pressure is wrong in the book.

Total pressure in kN : 986.21
Depth of centre of pressure is  8.125  meter.


## Example 3.11 Page No : 51¶

In [9]:
import math

# Variables :
g = 9.81;			#gravity
D = 4.;			#meter
xbar = (10.+7)/2;			#meter

# Calculations and Results
A = math.pi*D**2/4;			#meter**2
w = g*1000;			#in N/m**3
p = w*A*xbar/10**6;			#in MN
print "Total pressure in MN : %.3f"%p
BC = 3;			#meter
AB = 4;			#mete
math.sin_theta = BC/AB;
IG = math.pi*D**4/64;			#in m**4
h_bar = IG/A/xbar*math.sin_theta**2+xbar;			#in meter
print "Position of centre of pressure is ",(h_bar)," meter."

Total pressure in MN : 1.048
Position of centre of pressure is  8.5  meter.


## Example 3.12 Page No : 52¶

In [10]:
import math

# Variables :
a = 3.;			#meter
b = 4.;			#meter(altitude)
S = 1.2;			#specific gravity
theta = 30.;			#degree
d = 2.5;			#meter
g = 9.81;			#gravity
AG = b/3;			#meter

# Calculations and Results
A = 1./2*a*b;			#meter**2
w = S*g*1000;			#in N/m**3
p = w*A*xbar/10**3;			#in kN
print "Total pressure in kN : ",p
IG = a*b**3/36;			#in m**4
print "Depth of centre of pressure is ",round(h_bar,3)," meter."

Total pressure in kN :  223.668
Depth of centre of pressure is  3.237  meter.


## Example 3.13 Page No : 54¶

In [11]:
import math

# Variables :
a = 8.;			#meter
b = 6.;			#meter
h = 3.;			#meter
CD = 2.;			#meter
theta = 30.;			#degree

# Calculations and Results
A = (a+b)/2*h;			#meter**2
AB = (a+2*b)/(a+b)*h/3;			#meter
x1bar = AB;			#meter
BD = BC+CD;			#meter
xbar = BD;			#meter
g = 9.81;			#gravity
w = g*1000;			#in N/m**3
p = w*A*xbar/10**3;			#in kN
print "Total pressure in kN : ",p
IG = (a**2+b**2+4*a*b)/(a+b)*h**3/36;			#in m**4
print "Depth of centre of pressure is ",round(h_bar,3)," meter."

# note : rounding off error

Total pressure in kN :  559.17
Depth of centre of pressure is  2.783  meter.


## Example 3.14 Page No : 55¶

In [12]:
import math

# Variables :
l = 2.;			#meter
b = 2.;			#meter
p_i = 98.1;			#kN/m**3(Pressure intensity)
w = 9.81;			#kN/m**2
BC = 1.;			#meter
AB = 2.;			#meter
theta = 30.;			#degree
B = p_i/w;			#m

# Calculations
xbar = 10+0.5;			#meter
A = l*b;			#m**2
p = w*A*xbar;			#kN
IG = (2*l**3)/12;			#in m**4
DI = h_bar-xbar;			#m
FB = FC+BC;			#meter
P = p*FB/AB;			#kN

# Results
print "Force in kN : ",P
RB = p-P;			#kN
print "Reaction at hinge B in kN : ",RB

#Answer in the book is slightly differ due to limited accuracy used in the book as compared to SCILAB.

Force in kN :  209.28
Reaction at hinge B in kN :  202.74


## Example 3.15 Page No : 57¶

In [13]:
import math

# Variables :
l = 4.;			#meter
b = 2.;			#meter
h = 1.8;			#meter
w = 9.81;			#kN/m**2
xbar = 6.-2			#meter

# Calculations
A = l*b;			#m**2
P = w*A*xbar;			#kN
IG = (2*l**3)/12;			#in m**4
h_bar = IG/A/xbar+xbar;			#in meter
# As P acts at h_bar-xbar :
F = P*((h_bar-xbar)-(b-h))/h;			#kN

# Results
print "Horizontal Force in kN : %.3f"%F

Horizontal Force in kN : 23.253


## Example 3.16 Page No : 58¶

In [14]:

# Variables :
b = 2.;			#meter
d = 3.;			#meter
h = 2.;			#meter
w = 9.81;			#kN/m**2
xbar = 2+3./2;			#meter

# Calculations and Results
A = b*d;			#m**2
P = w*A*xbar;			#kN
print "Total Pressure in kN : ",P
IG = (b*d**3)/12;			#in m**4
h_bar = IG/A/xbar+xbar;			#in meter
print "Position of centre of pressure in meter : %.3f"%h_bar

Total Pressure in kN :  206.01
Position of centre of pressure in meter : 3.714


## Example 3.17 Page No : 59¶

In [15]:

# Variables :
b = 4.;			#meter
d = 4.;			#meter
h = 8.;			#meter
w = 9.81;			#kN/m**2
xbar = 8.;			#meter

# Calculations and Results
A = b*d;			#m**2
P = w*A*xbar;			#kN
print "Total Pressure in kN : ",P
IG = (b*d**3)/12;			#in m**4
h_bar = IG/A/xbar+xbar;			#in meter
print "Position of centre of pressure in meter : %.3f"%h_bar

Total Pressure in kN :  1255.68
Position of centre of pressure in meter : 8.167


## Example 3.18 Page No : 60¶

In [16]:
import math

# Variables :
D = 1.5;			#meter
BE = 2.;			#meter

# Calculations and Results
FG = CE+BC/2;			#meter
xbar = FG;			#meter
w = 9.81;			#kN/m**2
A = math.pi*D**2/4;			#m**2
AB = D;			#meter
sin_theta = BC/AB;
P = w*A*xbar;			#kN
print "Total Pressure in kN : %.3f"%P
IG = (math.pi/64*D**4);			#in m**4
h_bar = IG/A/xbar*sin_theta**2+xbar;			#in meter
print "Position of centre of pressure in meter : %.3f"%h_bar

Total Pressure in kN : 23.837
Position of centre of pressure in meter : 1.446


## Example 3.19 Page No : 62¶

In [17]:

# Variables :
b = 3.;			#meter
a = 3.;			#meter
S_oil = 0.8;			#specific gravity of oil
w = 9.81*S_oil;			#kN/m**2
xbar = 1./3*b;			#meter
A = 1./2*a*b;			#m**2

# Calculations and Results
P = w*A*xbar;			#kN
print "Total Pressure in kN : ",P
IG = (a*b**3)/36;			#in m**4
h_bar = IG/A/xbar+xbar;			#in meter
print "Centre of pressure in meter : ",h_bar

Total Pressure in kN :  35.316
Centre of pressure in meter :  1.5


## Example 3.20 Page No : 63¶

In [18]:

# Variables :
a = 2.;			#meter
b = 1.;			#meter
d = 2.;			#meter
w = 9.81;			#kN/m**2
xbar = 2+a/2;			#meter

# Calculations and Results
A = a*b;			#m**2
P = w*A*xbar;			#kN
print "Total Pressure in kN : ",P
IG = (b*d**3)/12;			#in m**4
h_bar = IG/A/xbar+xbar;			#in meter
print "Position of centre of pressure in meter : %.3f"%h_bar

Total Pressure in kN :  58.86
Position of centre of pressure in meter : 3.111


## Example 3.21 Page No : 67¶

In [23]:
import math

# Variables :
r = 2.;			#meter
l = 4.;			#meter
A = r*l;			#m**2
xbar = 2+r/2;			#meter
w = 9.81;			#kN/m**2

# Calculations and Results
PH = w*A*xbar;			#kN
print "Horizontal component of resulting Pressure in kN : ",PH
PV = 2*r*l*w+math.pi*r**2/4*l*w;			#kN
print "Verticalal component of resulting Pressure in kN : %.3f"%PV
IG = (l*r**3)/12;			#in m**4
h_bar = IG/A/xbar+xbar;			#in meter
print "Position of centre of horizontal component of pressure in meter : %.3f"%h_bar
x = (2*r+math.pi*r**2/4*(4*r/3/math.pi))/(2*r+math.pi*r**2/4);			#meter
P = math.sqrt(PH**2+PV**2);			#kN
print "Resultant pressure in kN : %.3f"%P
theta = math.degrees(math.atan(PV/PH));			#degree
print "Direction of resultant pressure in degree : %.2f"%theta

# note : rounding off error

Horizontal component of resulting Pressure in kN :  235.44
Verticalal component of resulting Pressure in kN : 280.236
Position of centre of horizontal component of pressure in meter : 3.111
Resultant pressure in kN : 366.011
Direction of resultant pressure in degree : 49.96


## Example 3.22 Page No : 69¶

In [26]:
import math

# Variables :
A = 2.*1;			#m**2
xbar = 2+2./2;			#meter
w = 9.81;			#kN/m**2

# Calculations and Results
PH = w*A*xbar;			#kN
print "Horizontal component of resultant Pressure in kN : ",PH
PV = w*(2*2+2*2-math.pi*2**2/4)*1;			#kN
print "Verticalal component of resultant Pressure in kN : %.3f"%PV
P = math.sqrt(PH**2+PV**2);			#kN
print "resultant pressure in kN : %.3f"%P
theta = math.degrees(math.atan(PV/PH));			#degree
print "Direction of resultant pressure in degree : %.2f"%theta

# note : rounding ogg error

Horizontal component of resultant Pressure in kN :  58.86
Verticalal component of resultant Pressure in kN : 47.661
resultant pressure in kN : 75.737
Direction of resultant pressure in degree : 39.00


## Example 3.23 Page No : 70¶

In [27]:
import math

# Variables :
ABbar = math.sqrt(2)*4;			#meter
xbar = ABbar/2;			#meter

# Calculations and Results
A = ABbar*1;			#m**2
w = 9.81;			#kN/m**2
PH = w*A*xbar;			#kN
print "Horizontal component of resultant Pressure in kN : ",PH
hbar = 2./3*ABbar;			#meter
print "Position of horizontal component of pressure is ",round(hbar,3)," meter below free water surface."
PV = w*(math.pi*4**2/4-4*4./2)*1;			#kN
print "Verticalal component of resultant Pressure in kN : %.3f"%PV

Horizontal component of resultant Pressure in kN :  156.96
Position of horizontal component of pressure is  3.771  meter below free water surface.
Verticalal component of resultant Pressure in kN : 44.796


## Example 3.24 Page No : 74¶

In [28]:

# Variables :
h = 24.;			#meter
b = 15.;			#meter
g = 9.81;			#gravity consmath.tant
Wm = 2000.*g;			#N/m**3
W = b*h/2*Wm;			#N
w = 9.81;			#kN/m**2

# Calculations and Results
PH = w*20**2/2.*1000;			#N
y = PH/W*20/3+5;			#meter
e = y-b/2;			#meter
MaxStress = W/b*(1+6*e/b);			#N/m**2
print "Maximum stress in N/m**2 : ",MaxStress
MinStress = W/b*(1-6*e/b);			#N/m**2
print "Minimum stress in N/m**2 : ",MinStress

#Answer in the book is slightly differ due to limited accuracy used in the book as compared to PYTHON.

Maximum stress in N/m**2 :  348800.0
Minimum stress in N/m**2 :  122080.0