-
Notifications
You must be signed in to change notification settings - Fork 3
/
f_Haaland.m
22 lines (18 loc) · 879 Bytes
/
f_Haaland.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
function f = f_Haaland(D,Re,aRou)
%% Calculates the Darcy-Weisbach friction factor for pressure loss calculations
% via explicit equation by Haaland,S.E.
% by Tol,Hakan Ibrahim from the PhD study at Technical University of Denmark
% PhD Topic: District Heating in Areas with Low-Energy Houses
%% INPUTS (Scalar or Vector)
% aRou : Absolute roughness of pipe [mm]
% D : Inner diameter of the pipe [mm]
% Re : Reynolds Number [-]
%% Checking algorithm limitations
if Re<4000 | Re>1e8
error('Error: Zigrang&Sylvester algorithm is valid for a Reynold range as in 4000<Re<1e8')
end
if aRou/D<1e-6 | aRou/D>0.05
error('Error: Zigrang&Sylvester algorithm is valid for a relative roughness range as in 1e-6<eps/D<0.05')
end
f=(-1.8.*log10(((aRou./D)./3.7).^1.11+6.9./Re)).^-2;
end