Flow in pressurized conduits 77
hend(n)=h(nx-1);
h1end(n)=h1(nx-1);
h2end(n)=h2(nx-1);
end
end
hmax(nx)=hmax(nx-1);
h1max(nx)=h1max(nx-1);
h2max(nx)=h2max(nx-1);
plot(1:nx, hmax,'r','Linewidth',1.5)
hold on
plot(1:nx,h1max,'b','Linewidth',1.5)
plot(1:nx, h2max,'g','Linewidth',1.5)
xlabel('Number of spatial steps (Dx = 50m)'), ylabel('Max
pressure head [m]')
legend('valve closure time = 5s','valve closing time = 20s',
'valve closing time = 40s')
axis([0,100,0,26])
figure,plot(1:tn,hend,'r','Linewidth',1.5)
hold on
plot(1:tn,h1end,'b','Linewidth',1.5)
plot(1:tn,h2end,'g','Linewidth',1.5)
xlabel('Time [s]')
ylabel('Pressure head at the end of the pipe [m]')
legend('valve closure time = 5s','valve closing time = 20s',
'valve closing time = 40s')
PROBLEM 4.2
Solve the same problem by making the following suggested changes while
keeping the rest of the data constant:
1. Sequentially change the elastic wave celerity to 1500 m/s and the pipe
diameter to 0.5 m. Run the program and comment on the results.
2. Change the wall friction coefficient to 0.005 and 0.001. Run the program and comment on the results.
3. Neglect the frictional effects, run the simulation and comment on the
results.
4. Write a computer program that solves Equation 4.27 by using the
explicit scheme described by Equation 3.28 (see Chapter 3). Run and
comment on the results.
5. Modify the program as needed by assuming that the pipe is rigid and
that only the water is compressible (E f = 2.2 × 10 2 KN/m 2 ). Run the
program and compare the results with the present example.
Compare the solution data obtained by running the modifications, derive
conclusions and discuss the significance of the various parameters involved
in the water hammer phenomenon.
hend(n)=h(nx-1);
h1end(n)=h1(nx-1);
h2end(n)=h2(nx-1);
end
end
hmax(nx)=hmax(nx-1);
h1max(nx)=h1max(nx-1);
h2max(nx)=h2max(nx-1);
plot(1:nx, hmax,'r','Linewidth',1.5)
hold on
plot(1:nx,h1max,'b','Linewidth',1.5)
plot(1:nx, h2max,'g','Linewidth',1.5)
xlabel('Number of spatial steps (Dx = 50m)'), ylabel('Max
pressure head [m]')
legend('valve closure time = 5s','valve closing time = 20s',
'valve closing time = 40s')
axis([0,100,0,26])
figure,plot(1:tn,hend,'r','Linewidth',1.5)
hold on
plot(1:tn,h1end,'b','Linewidth',1.5)
plot(1:tn,h2end,'g','Linewidth',1.5)
xlabel('Time [s]')
ylabel('Pressure head at the end of the pipe [m]')
legend('valve closure time = 5s','valve closing time = 20s',
'valve closing time = 40s')
PROBLEM 4.2
Solve the same problem by making the following suggested changes while
keeping the rest of the data constant:
1. Sequentially change the elastic wave celerity to 1500 m/s and the pipe
diameter to 0.5 m. Run the program and comment on the results.
2. Change the wall friction coefficient to 0.005 and 0.001. Run the program and comment on the results.
3. Neglect the frictional effects, run the simulation and comment on the
results.
4. Write a computer program that solves Equation 4.27 by using the
explicit scheme described by Equation 3.28 (see Chapter 3). Run and
comment on the results.
5. Modify the program as needed by assuming that the pipe is rigid and
that only the water is compressible (E f = 2.2 × 10 2 KN/m 2 ). Run the
program and compare the results with the present example.
Compare the solution data obtained by running the modifications, derive
conclusions and discuss the significance of the various parameters involved
in the water hammer phenomenon.
