summaryrefslogtreecommitdiff
path: root/1457/CH13/EX13.4/13_4.sce
diff options
context:
space:
mode:
Diffstat (limited to '1457/CH13/EX13.4/13_4.sce')
-rwxr-xr-x1457/CH13/EX13.4/13_4.sce22
1 files changed, 22 insertions, 0 deletions
diff --git a/1457/CH13/EX13.4/13_4.sce b/1457/CH13/EX13.4/13_4.sce
new file mode 100755
index 000000000..9df157c92
--- /dev/null
+++ b/1457/CH13/EX13.4/13_4.sce
@@ -0,0 +1,22 @@
+clc
+//Initialization of variables
+Q=30 //cfs
+r=2 //ft
+cp=3200
+rho=1.94
+Q2=10 //cfs
+z=300 //ft
+//calculations
+V=Q/(%pi*r^2)
+ph=rho*cp*V/144
+phd=4000/cp /(2*r) *ph
+dV=(Q2-Q)/(%pi*r^2)
+dph=-rho*cp*dV/144
+ph3=rho*cp*V/3 /144
+ph4=ph3*z*2/cp
+//results
+printf("Water hammer pressure= %.1f psi",ph)
+printf("\n Water hammer pressure in case 2= %.1f psi",phd)
+printf("\n Water hammer pressure in case 3= %.1f psi",dph)
+printf("\n Pressure at valve in case 4 = %.1f psi",ph3)
+printf("\n Pressure at 300 ft from reservoir = %.2f psi",ph4)