Moody chart, M-File for finding Friction factor using equation

danialme089 545 views 1 slides May 14, 2015
Slide 1
Slide 1 of 1
Slide 1
1

About This Presentation

M-File for finding Friction factor using equation, finding friction factor from colebrook equation..


Slide Content

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