-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTr_AMTD_Schlapmann.m
58 lines (46 loc) · 1.88 KB
/
Tr_AMTD_Schlapmann.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
function Tr=Tr_AMTD_Schlapmann(q,Ts,Ti,qo,Tso,Tro,Tio,n)
%% Calculates the return temperature from the radiator unit
% emprical equation based on AMTD by Soumerai H. with Schlapmmann factors
% Ref: Phetteplace - Optimal Design of Piping Systems for District Heating
% Ref: McIntyre MA, McIntyre DA. Output of radiators at reduced flow rate
% prepared by Hakan ibrahim Tol, PhD
%% INPUT&OUTPUT
% Input
% q : Heat demand - actual condition [kW]
% Ts : Supply temperature - actual condition [degC]
% Ti : Set degree of indoor temperature - actual [degC]
% qo : Heat demand - design condition [kW]
% Tso : Supply temperature - design condition [degC]
% Tro : Return temperature - design condition [degC]
% Tio : Set degree of indoor temperature - design [degC]
% n : Emprical radiator constant [-]
% Output
% Tr : Radiator return temperature - actual [degC]
%% Calculation of AMTD for the design condition
% AMTD: Arithmetic Mean Temperature Difference [degC]
AMTDo=tAMTD(Tso,Tro,Tio);
mo=qo/(XSteam('hl_t',Tso)-XSteam('hl_t',Tro));
%% Calculation
% Need of iteration due to Schlapmann factor
% Initial value by use of AMTD method (no Schlapmann factors)
Tr=2*(Ti+(AMTDo*(q/qo)^(1/n)))-Ts;
if or(Tr<=20,Tr>=Ts)
Tr=NaN;
return
end
m=q/(XSteam('hl_t',Ts)-XSteam('hl_t',Tr));
m_r=m/mo;
err=10;
Counter=0;
% iteration for Schlapmann factors
while or(err<0.01,Counter==10000)
f_flow=-2.498E-01*m_r^4+1.326E+00*m_r^3-2.519E+00*m_r^2+2.045E+00*m_r^1+4.210E-01*m_r^0;
f_cp=-1.393E-01*m_r^4+8.627E-01*m_r^3-1.976E+00*m_r^2+1.989E+00*m_r^1+2.866E-01*m_r^0;
Tr=2*(Ti+(AMTDo*(q/(qo*f_flow))^(1/(n*f_cp))))-Ts;
m_ite=q/(XSteam('hl_t',Ts)-XSteam('hl_t',Tr));
m_r_ite=m_ite/mo;
err=abs(m_r_ite-m_r);
Counter=Counter+1;
m_r=m_r_ite;
end
end