diff options
Diffstat (limited to '629/CH7/EX7.2/example7_2.sce')
-rw-r--r-- | 629/CH7/EX7.2/example7_2.sce | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/629/CH7/EX7.2/example7_2.sce b/629/CH7/EX7.2/example7_2.sce new file mode 100644 index 000000000..6d2594101 --- /dev/null +++ b/629/CH7/EX7.2/example7_2.sce @@ -0,0 +1,21 @@ +clear
+clc
+//Example 7.2 PRESSURE IN A PIPE
+//Energy equation, (p1/gamma)+(alpha1*V1^2/2g)+hp=(p2/gamma)+(alpha2*V2^2/2g)+ht+hL
+p1=0; //pressure at top of reservoir is p_atm=0
+ht=0;
+hp=0;
+V1=0;
+Gamma=9810; //specific weight[N/m^3]
+alpha2=1;
+z1=100; //[m]
+z2=20; //[m]
+L=2000; //[m]
+D=0.2; //diameter[m]
+A=%pi*D^2/4 //area[m^2]
+Q=0.06; //rate of flow[m^3/s]
+g=9.81; //[m/s^2]
+V2=Q/A //[m/s]
+hL=(0.02*(L/D)*V2^2)/(2*g) //head loss[m]
+p2=p1+Gamma*((z1-z2)+hp-ht-hL-(alpha2*V2^2)/(2*g))/10^3 //pressure at L[kPa]
+printf("\nThe pressure in the pipe at L=2000m is = %.f kPa.\n",p2)
\ No newline at end of file |