Problem1:: Water Exerts Pressure On The Upstream Face of A Dame As Shown in Following Figure
Problem1:: Water Exerts Pressure On The Upstream Face of A Dame As Shown in Following Figure
Water exerts pressure on the upstream face of a dame as shown in following Figure. The pressure
can be characterized by
p(z) = ρ g( D – z)
where p(z) = pressure in pascals (or N/m2 ) exerted at an elevation z meters above the reservoir bottom;
ρ = density of water, which for this problem is assumed to be a constant 103 kg/m3 ; g = acceleration
due to gravity (9.81 m/s2 ); and D = elevation (in m) of the water surface above the reservoir bottom.
According to above Equation, pressure increases linearly with depth, as depicted in Figure (a). Omitting
atmospheric pressure (because it works against both sides of the dam face and essentially cancels out),
the total force ft can be determined by multiplying pressure times the area of the dam face (as shown in
Figure (b).
It is required to evaluate the total force acting on the wall of the dam and line of
action using the Simpson’s rule for the data given in the figure. The data of the
figure can be tabulated in a table as shown below:
z w(z) ρ gw(z)(75-z) ρ gzw(z)(75-z)
75 200 0 0
62.5 190 23298750 1456171875
50 175 42918750 2145937500
37.5 160 58860000 2207250000
26 135 66217500 1655437500
12.5 130 79706250 996328125
0 122 89761500 0
To evaluate the force f, acting on the wall of dam, composite Simpson’s 1/3 rule is
applied. The force is given as
D
f(t) = ∫ ρ gw ( z )( D−z ) dz
0
The above integral is evaluated using Simpson’s rule. The composite Simpson’s
1/3 rule is given as,
n−1 n−2
f ( x 0 ) +4 ∑ f ( x i ) +2 ∑ f ( x i ) + f (x n)
I = (b – a)( i=1,3,5 j=2,4,6
3n
Observe that the number of segments for the above data is 6, that is n = 6.
Therefore, apply the rule to evaluate the integral as,
ft=( 75−0)¿ ¿
ft=3981225000 N
∫ ρgw ( z ) ( D−z ) dz
d= D0
∫ ρ gw ( z ) ( D−z ) dz
0
Evaluate the integral I =∫ ρ gzw ( z )( D−z ) dz using the composite Simpson’s 1/3 rule.
0
I =109340625000.
109340625000
d=
3981225000
d=27.4641m
clc
clear
z=[0 12.5 25 37.5 50 62.5 75];
w=[122 130 135 160 175 190 200];
syms x y
f1=10^3*9.81*x*(75-y);
f2=f1*y;
f1_vec=zeros(1,5);
f2_vec=zeros(1,5);
for i=1:7
f1_vec(i)=subs(f1,[x,y],[w(i),z(i)]);
f2_vec(i)=subs(f2,[x,y],[w(i),z(i)]);
end
force=simpson(f1_vec,0,75);
intf2=simpson(f2_vec,0,75);
d=double(intf2/force);
disp(['The total force ft is ',num2str(force),' N',newline])
disp(['The line of action is ',num2str(d),' m'])
Problem5:
(a) Consider the differential equation
dp
=k g p
dt
y = 0.0186x – 28.4378
dp
=k g p , P(1950) = 2555
dt
From (a), the value of k g is 0.017773, thus the given differential equation is
dp
=¿ 0.017773p, p(1950) = 2555
dt
Find the world population from 1960 to 2050 with a step size of 5 years.
Here f ( t , y )=0.017773 p , p(1950) = 2555, and h = 5
1
pi+1 =p i+ h(k 1+ 2k 2+2 k 3+ k 4 )
6
Where
k 1=f ( t i , y i)
h h
k 2=f (t i + , pi + k 1)
2 2
h h
k 3=f (t i + , pi + k 2)
2 2
k 4=f (t i+ h , pi + h k 3)
Here t i=0+ih .
Step 1:
t 0=1950 , p 0=2555
t 1=1955 , k 1=f (t i , p i)
k 1=f (t 0 , p 0)
¿(1950,2555)
= 0.017773(2555)
= 45.41
h h
k 2=f (t i + , pi + k 1)
2 2
5 5
¿ f (t 0 + , p0 + k 1)
2 2
¿ f ( 1950+ 2.5 ,2555+2.5 ( 45.41 ))
¿ f (1952.5,2668.525)
¿ 0.017773(2673.57)
¿ 47.52
h h
k 3=f (t i + , pi + k 2)
2 2
5
¿ f (t 0 +5 , p0 + k 2)
2
¿ f (1950+2.5 , 2555+ 2.5 ( 47.43 ) )
¿ f (1952.5 ,2673.57)
¿ 0.017773(2673.57)
¿ 47.52
k 4=f (t i+ h , pi + k 3 h)
¿ f (t 0 +5 , p0 +k 3 ( 5 ) )
¿ f (1950+5 , 2555+ ( 47.52 ) ( 5 ))
¿ f (1955,2792.6)
¿ 0.017773(2792.6)
¿ 49.64
1
p1= p0 + h(k 1 +2 k 2 +2 k 3 +k 4 )
6
1
¿ 2555+ ∗5(45.41+2∗47.43+2∗47.52+49.64)
6
¿ 2792.46
%%
%-----------problem(a)----------
%-------------------------------
clear
clc
table=xlsread('C:\Users\DELL\Desktop\growth.xlsx'); %read table
from excel
T=table(1:5,1); %---1950 to 1970
P=table(1:5,2);
y=log(P); % lnP=Kg*t+C;
x0=ones(length(T),1); %% x0=1 for all case bc C is a constant
x1=T; %% x1 is coeffient of Kg*T is T
A=[x0 x1];
b=y;
x=A\b; %%solve Ax=b ==> x=A\b
C=x(1);
Kg=x(2);
disp(['Kg=',num2str(Kg),'/year',newline]);
figure(1);
plot(T,b,'o',T,(Kg.*T+C));
legend({'real','regression'},'Location','Southeast');
title('a semi-log plot (lnP versus t)');
xlabel('year from 1950 to 1970');
ylabel('ln(P)');
%-----------problem(b)----------
%-------------------------------
Tnew=(1950:5:2050);
syms pb
dy=Kg*pb;
x0=1950;
y0=2555;
h=5;
Pb=zeros(length(Tnew),1);
Pb(1)=y0;
for i=1:((2050-1950)/5)
k1=subs(dy,pb,y0);
k2=subs(dy,pb,y0+(k1/2));
k3=subs(dy,pb,y0+(k2/2));
k4=subs(dy,pb,y0+k3);
y0=y0+1/6*(k1+2*k2+2*k3+k4)*h;
x0=x0+h;
Pb(i+1)=y0;
end
figure(2);
plot(Tnew,Pb,'k-o','MarkerFaceColor',[0 0 0]);
legend({'population'},'Location','Southeast');
title('World population from 1950 to 2020');
xlabel('year');
ylabel('population(milions)');