function f = friction_coef(flow,Re)
switch flow
    case 'turb'
        f = 0.316/4*Re.^(0.25);
    case 'lam'
        f = 16./Re;
end;