-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathDrawCAESDischarging.m
147 lines (139 loc) · 4.88 KB
/
DrawCAESDischarging.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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
%% Discharging visulization interface V1.0
%%% Air Pressure
figure
plot(1/60*tstep*time_period_disc, p_a_in.e1(time_period_disc)*1e-3, 'r-'); % KPa -> MPa
hold on
plot(1/60*tstep*time_period_disc, p_a_in.e2(time_period_disc)*1e-3, 'g-');
plot(1/60*tstep*time_period_disc, p_a_in.e3(time_period_disc)*1e-3, 'b-');
plot(1/60*tstep*time_period_disc, P_as.Disc(time_period_disc)*1e-3, 'k-.')
if strcmp(DrawOption.lang, 'ch')
xlabel('时间 (min)');
ylabel('压力 (MPa)')
legend('一级透平进气', '二级透平进气', '三级透平进气', '储气压力')
if strcmp(TV_Mode.Turb, 'CP')
title('常压放气模式下的进气压力')
else
title('滑压放气模式下的进气压力')
end
else % 'en'
% pass
end
%%% Power generation
figure
W_disc.all = W_disc.e1 + W_disc.e2 + W_disc.e3;
plot(1/60*tstep*time_period_disc, W_disc.e1(time_period_disc)*1e-3, 'r-'); % W -> kW
hold on
plot(1/60*tstep*time_period_disc, W_disc.e2(time_period_disc)*1e-3, 'g-');
plot(1/60*tstep*time_period_disc, W_disc.e3(time_period_disc)*1e-3, 'b-');
plot(1/60*tstep*time_period_disc, W_disc.all(time_period_disc)*1e-3, 'k-.')
if strcmp(DrawOption.lang, 'ch')
xlabel('时间 (min)');
ylabel('功率 (kW)')
legend('一级透平', '二级透平', '三级透平', '总功率')
if strcmp(TV_Mode.Turb, 'CP')
title('常压放气模式下的透平输出功')
else
title('滑压放气模式下的透平输出功')
end
else
% pass
end
%%% Heat Exchanger heat exchanger amount
figure
plot(1/60*tstep*time_period_disc, Phi.HXH1(time_period_disc)*1e-3, 'r-'); % W -> kW
hold on
plot(1/60*tstep*time_period_disc, Phi.HXH2(time_period_disc)*1e-3, 'g-');
plot(1/60*tstep*time_period_disc, Phi.HXH3(time_period_disc)*1e-3, 'b-');
if strcmp(DrawOption.lang, 'ch')
xlabel('时间 (min)');
ylabel('换热量 (kW)')
legend('一级换热器', '二级换热器', '三级换热器')
if strcmp(TV_Mode.Turb, 'CP')
title('常压放气模式下的换热量')
else
title('滑压放气模式下的换热量')
end
else
% pass
end
%%% Inlet and outlet temperature of HX
figure
subplot(2,2,1)
plot(1/60*tstep*time_period_disc, T_a_in.HXH1(time_period_disc),'r-'); % [K]
hold on
plot(1/60*tstep*time_period_disc, T_HTF_in.HXH1(time_period_disc),'b-');
plot(1/60*tstep*time_period_disc, T_a_out.HXH1(time_period_disc),'r-.');
plot(1/60*tstep*time_period_disc, T_HTF_out.HXH1(time_period_disc),'b-.');
legend('入口空气', '入口HTF', '出口空气', '出口HTF')
xlabel('时间 (min)')
ylabel('温度 (K)')
if strcmp(TV_Mode.Turb, 'CP')
title('常压放气模式下的一级换热器温度')
else
title('滑压放气模式下的一级换热器温度')
end
subplot(2,2,2)
plot(1/60*tstep*time_period_disc, T_a_in.HXH2(time_period_disc),'r-'); % [K]
hold on
plot(1/60*tstep*time_period_disc, T_HTF_in.HXH2(time_period_disc),'b-');
plot(1/60*tstep*time_period_disc, T_a_out.HXH2(time_period_disc),'r-.');
plot(1/60*tstep*time_period_disc, T_HTF_out.HXH2(time_period_disc),'b-.');
legend('入口空气', '入口HTF', '出口空气', '出口HTF')
xlabel('时间 (min)')
ylabel('温度 (K)')
if strcmp(TV_Mode.Turb, 'CP')
title('常压放气模式下的二级换热器温度')
else
title('滑压放气模式下的二级换热器温度')
end
subplot(2,2,3)
plot(1/60*tstep*time_period_disc, T_a_in.HXH3(time_period_disc),'r-'); % [K]
hold on
plot(1/60*tstep*time_period_disc, T_HTF_in.HXH3(time_period_disc),'b-');
plot(1/60*tstep*time_period_disc, T_a_out.HXC3(time_period_disc),'r-.');
plot(1/60*tstep*time_period_disc, T_HTF_out.HXC3(time_period_disc),'b-.');
legend('入口空气', '入口HTF', '出口空气', '出口HTF')
xlabel('时间 (min)')
ylabel('温度 (K)')
if strcmp(TV_Mode.Turb, 'CP')
title('常压放气模式下的三级换热器温度')
else
title('滑压放气模式下的三级换热器温度')
end
%%% Mass/Pressure/Temperature of ASU
figure
subplot(2,1,1)
plot(1/60*tstep*time_period_disc, M_as.Disc(time_period_disc), 'r-'); % kg
if strcmp(DrawOption.lang, 'ch')
xlabel('时间 (min)');
ylabel('空气质量 (kg)')
if strcmp(TV_Mode.Turb, 'CP')
title('常压放气模式下的储气库空气质量')
else
title('滑压放气模式下的储气库空气质量')
end
else
% pass
end
subplot(2,1,2)
hAx = plotyy(1/60*tstep*time_period_disc,P_as.Disc(time_period_disc)*1e-3,1/60*tstep*time_period_disc,T_as.Disc(time_period_disc));
xlabel('时间 (min)')
ylabel(hAx(1), '储气库压力 (MPa)')
ylabel(hAx(2), '储气库温度 (K)')
if strcmp(TV_Mode.Comp, 'CP')
title('常压放气模式下的储气库动态特性')
else
title('滑压放气模式下的储气库动态特性')
end
%%% Mass and Temperature of TES
figure
hAx = plotyy(1/60*tstep*time_period_disc, T_TES.Disc(time_period_disc), 1/60*tstep*time_period_disc, M_TES.Disc(time_period_disc));
xlabel('时间 (min)')
ylabel(hAx(1), '储热罐温度 (K)')
ylabel(hAx(2), '储热罐质量 (Kg)')
hAx(1).YLim = [270,450];
if strcmp(TV_Mode.Turb, 'CP')
title('常压放气模式下的储热罐动态特性')
else
title('滑压放气模式下的储热罐动态特性')
end