Comparative study of High-rise Building Using ETABS,SAP200 and SAFE., SAFE an...
Moody chart, M-File for finding Friction factor using equation
1. M-File for finding Friction factor using equation
rough = input('Enter Relative Roughness ');
re = input ('Enter Reynolds number ');
fst = 0;
f = 0.008;
while f ~= fst
disp (' Assumed value for trial and error ')
disp (f)
fst = f;
int1 = 2 * log10(1 / rough);
int2 = (9.3 /(re * rough * sqrt(fst)));
int3 = 2 * log10(1 + int2);
int4 = 1.14 + int1 - int3;
f = (1 / int4)^2;
end
disp (' Final value of friction factor ')
f
Programmed by:
Danial Sohail
Mechanical Engineering Department
NED University of Engineering and Technology