blob: 0dcb28a18223eec21d8d05898ec52a87f0adc905 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
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));
|