diff options
author | prashantsinalkar | 2017-10-10 12:27:19 +0530 |
---|---|---|
committer | prashantsinalkar | 2017-10-10 12:27:19 +0530 |
commit | 7f60ea012dd2524dae921a2a35adbf7ef21f2bb6 (patch) | |
tree | dbb9e3ddb5fc829e7c5c7e6be99b2c4ba356132c /629/CH10/EX10.4/example10_4.sce | |
parent | b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (diff) | |
download | Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.tar.gz Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.tar.bz2 Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.zip |
initial commit / add all books
Diffstat (limited to '629/CH10/EX10.4/example10_4.sce')
-rw-r--r-- | 629/CH10/EX10.4/example10_4.sce | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/629/CH10/EX10.4/example10_4.sce b/629/CH10/EX10.4/example10_4.sce new file mode 100644 index 000000000..f8c2217d4 --- /dev/null +++ b/629/CH10/EX10.4/example10_4.sce @@ -0,0 +1,20 @@ +clear
+clc
+//Example 10.4 FLOW RATE IN A PIPE (CASE 2)
+g=9.81; //[m/s^2]
+L=1000; //[m]
+D=0.20; //diameter[m]
+A=%pi*D^2/4 //area[m^2]
+v=10^-6; //viscosity[m^2/s]
+hf=12.2; //[m]
+P=D^(3/2)*sqrt(2*g*hf/L)/v
+ks=0.12; //[mm]
+//Relative roughness
+Rr=ks/D
+//From Moody diagram for P and Rr
+f=0.019; //friction factor
+//Darcy-Weisbach equation
+V=sqrt(hf*2*g*(D/L)/f) //[m/s]
+//Discharge
+Q=V*A //[m^3/s]
+printf("\nThe flow rate of water through the pipe = %.2f m^3/s.\n",Q)
\ No newline at end of file |