%
% PURPOSE Compute turbulent surface friction drag as a function of k, the
% grain size in m, and L, vehicle length.
%
% Schlichting 1936, Naca Tech Report #823, page 29.
function Cfr = schlichting(L, U, k, nu)

  if(   (length(L)>1 & length(U)>1) |...
	(length(L)>1 & length(k)>1) |...
	(length(U)>1 & length(k)>1) )
    fprintf('schlichting: Error.  Only one argument can be a vector.\n');
    return
  end
    
  Re = L*U/nu;
  
  Cf = schoenherr(Re);

  if( k <= 0 ) 
    Cfr = Cf;
    return
  end

  Luponk = L./k;
  
  Cfr = (1.89 + 1.62*log10(Luponk)).^(-2.5);
  
  Cfr = max(Cf, Cfr);

  return
  
