summaryrefslogtreecommitdiff
path: root/914/CH10/EX10.4/ex10_4.sce
diff options
context:
space:
mode:
Diffstat (limited to '914/CH10/EX10.4/ex10_4.sce')
-rwxr-xr-x914/CH10/EX10.4/ex10_4.sce43
1 files changed, 43 insertions, 0 deletions
diff --git a/914/CH10/EX10.4/ex10_4.sce b/914/CH10/EX10.4/ex10_4.sce
new file mode 100755
index 000000000..0dcb28a18
--- /dev/null
+++ b/914/CH10/EX10.4/ex10_4.sce
@@ -0,0 +1,43 @@
+clc;
+warning("off");
+printf("\n\n example10.4 - pg415");
+// given
+d=6*10^-2; //[m] - inside diameter of tube
+p=1000; //[kg/m^3] - density
+// for smooth pipe
+Nre=[10^4 10^5];
+f=[0.0076 0.0045];
+mu=10^-3; //[kg/m^2*s]
+U=(Nre*mu)/(d*p);
+L=300; //[m] - length of the tube
+for i=1:2
+deltap(i)=(4*f(i))*(L/d)*((p*(U(i)^2))/2);
+end
+disp("for smooth pipe");
+printf(" Nre -deltap");
+printf("\n %f %f",Nre(1),deltap(1));
+printf("\n %f %f \n",Nre(2),deltap(2));
+// for commercial steel
+Nre=[10^4 10^5];
+f=[0.008 0.0053];
+U=(Nre*mu)/(d*p);
+L=300; //[m] - length of the tube
+for i=1:2
+deltap(i)=(4*f(i))*(L/d)*((p*(U(i)^2))/2);
+end
+disp("for commercial steel pipe");
+printf(" Nre -deltap");
+printf("\n %f %f",Nre(1),deltap(1));
+printf("\n %f %f \n",Nre(2),deltap(2));
+// for cast iron pipe
+Nre=[10^4 10^5];
+f=[0.009 0.0073];
+U=(Nre*mu)/(d*p);
+L=300; //[m] - length of the tube
+for i=1:2
+deltap(i)=(4*f(i))*(L/d)*((p*(U(i)^2))/2);
+end
+disp("for cast iron pipe");
+printf(" Nre -deltap");
+printf("\n %f %f",Nre(1),deltap(1));
+printf("\n %f %f",Nre(2),deltap(2)); \ No newline at end of file