-
Notifications
You must be signed in to change notification settings - Fork 0
/
OrcSpecCapCost_v_ProdTemp.m
82 lines (64 loc) · 2.55 KB
/
OrcSpecCapCost_v_ProdTemp.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
%need to clear all to remove persistent variables in ORC_Cycle
clear all;
close all;
params = SimulationParameters;
%params.orcFluid = 'R245fa';
params.orcFluid = 'R600a';
prodTemp = 80:1:320;%320;
capacity = [5, 10, 25, 50, 75, 100];
model = 'PROPOSED';
%model = 'GEOPHIRES';
%GEOPHIRES Cycle
cycleType = 'SubcriticalORC';
%cycleType = 'SupercriticalORC';
%cycleType = 'SingleFlash';
%cycleType = 'DoubleFlash';
if (strcmp(model,'PROPOSED'))
cycleType = 'SubcriticalORC';
end
Output = zeros(0);
for i = 1:size(prodTemp,2)
T_in_C = prodTemp(i);
result = ORC_Cycle(T_in_C, params);
for j = 1:size(capacity, 2)
disp(strcat(['Iteration x=' num2str(prodTemp(i)) ', y=' num2str(capacity(j)) '.']));
cap_MW = capacity(j);
% find m_dot to meet capacity
m_dot = cap_MW * 1e6 / result.w_net;
Q_preheater = m_dot * result.q_preheater;
Q_boiler = m_dot * result.q_boiler;
W_turbine = m_dot * result.w_turbine;
Q_recuperator = m_dot * result.q_recuperator;
Q_desuperheater = m_dot * result.q_desuperheater;
Q_condenser = m_dot * result.q_condenser;
W_pump_orc = m_dot * result.w_pump;
W_cooler_orc = m_dot * result.w_cooler;
W_condenser_orc = m_dot * result.w_condenser;
W_pump_prod = 0;
if (strcmp(model,'PROPOSED'))
result_cost = CapitalCost_SurfacePlant_ORC(Q_preheater, Q_boiler, W_turbine, ...
Q_recuperator, Q_desuperheater, Q_condenser, ...
W_pump_orc, W_pump_prod, result.dT_range_CT, result.dT_LMTD_preheater, ...
result.dT_LMTD_boiler, 0, params);
C_surfacePlant = result_cost.C_plant;
elseif (strcmp(model,'GEOPHIRES'))
ElectricityProduced_MW = cap_MW;
C_plant_geophires = CapitalCost_SurfacePlant_ORC_GEOPHIRES(T_in_C, ElectricityProduced_MW, cycleType, params);
C_surfacePlant = C_plant_geophires;
end
SpecificCapitalCost = C_surfacePlant / (cap_MW * 1000);
Output = [ Output; T_in_C cap_MW {model} {cycleType} SpecificCapitalCost ];
end
end
hold on;
for i = 1:size(capacity,2)
cap_MW = capacity(i);
ind = cell2mat(Output(:,2)) == cap_MW;
plot(cell2mat(Output(ind,1)),cell2mat(Output(ind,5)),'DisplayName',strcat([ num2str(cap_MW) ' MWe']));
end
grid on;
ylabel('Specific Power [$/kWe]');
xlabel('Input Temperature [\circC]');
legend();
filename = strcat(['data\SpecCapCost_' datestr(now,'yyyymmdd_HHMMSS') '.xlsx']);
xlswrite(filename, Output);