Ticket #5351: BraytonCycle_CombinedCycle_1.mo

File BraytonCycle_CombinedCycle_1.mo, 8.9 KB (added by KieranF <kieran.fung@…>, 6 years ago)

Brayton Cycle Model

Line 
1model BraytonCycle_CombinedCycle_1
2
3 parameter Real tableEtaC[6, 4]=[0, 95, 100, 105; 1, 82.5e-2, 81e-2,
4 80.5e-2; 2, 84e-2, 82.9e-2, 82e-2; 3, 83.2e-2, 82.2e-2, 81.5e-2; 4,
5 82.5e-2, 81.2e-2, 79e-2; 5, 79.5e-2, 78e-2, 76.5e-2];
6 parameter Real tablePhicC[6, 4]=[0, 95, 100, 105; 1, 38.3e-3, 43e-3,
7 46.8e-3; 2, 39.3e-3, 43.8e-3, 47.9e-3; 3, 40.6e-3, 45.2e-3, 48.4e-3;
8 4, 41.6e-3, 46.1e-3, 48.9e-3; 5, 42.3e-3, 46.6e-3, 49.3e-3];
9 parameter Real tablePR[6, 4]=[0, 95, 100, 105; 1, 22.6, 27, 32; 2, 22,
10 26.6, 30.8; 3, 20.8, 25.5, 29; 4, 19, 24.3, 27.1; 5, 17, 21.5, 24.2];
11 parameter Real tablePhicT[5, 4]=[1, 90, 100, 110; 2.36, 4.68e-3, 4.68e-3,
12 4.68e-3; 2.88, 4.68e-3, 4.68e-3, 4.68e-3; 3.56, 4.68e-3, 4.68e-3,
13 4.68e-3; 4.46, 4.68e-3, 4.68e-3, 4.68e-3];
14 parameter Real tableEtaT[5, 4]=[1, 90, 100, 110; 2.36, 89e-2, 89.5e-2,
15 89.3e-2; 2.88, 90e-2, 90.6e-2, 90.5e-2; 3.56, 90.5e-2, 90.6e-2,
16 90.5e-2; 4.46, 90.2e-2, 90.3e-2, 90e-2];
17
18 Modelica.Blocks.Interfaces.RealInput FuelFlowRate
19 annotation(
20 Placement(visible = true, transformation(origin = {-110, -1.77636e-15}, extent = {{-10, -10}, {10, 10}}, rotation = 0), iconTransformation(origin = {-110, -1.77636e-15}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
21
22 ThermoPower.Gas.SourceMassFlow SourceW1(
23 redeclare package Medium = ThermoPower.Media.NaturalGas,
24 T = 300,
25 p0 = 811000,
26 use_in_w0 = true,
27 w0 = 2.0)
28 annotation(
29 Placement(visible = true, transformation(origin = {-44, 76}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
30
31 Modelica.Blocks.Continuous.FirstOrder GasFlowActuator(
32 T = 4,
33 initType = Modelica.Blocks.Types.Init.SteadyState,
34 y_start = 500)
35 annotation(
36 Placement(visible = true, transformation(origin = {-85, 85}, extent = {{-5, -5}, {5, 5}}, rotation = 0)));
37
38 ThermoPower.Gas.CombustionChamber combustionChamber1(
39 Cm=1,
40 HH=41.6e6,
41 S=0.05, Tmstart = 300,
42 Tstart=1370,
43 V=0.05,gamma=1,
44 initOpt=ThermoPower.Choices.Init.Options.steadyState,
45 pstart=8.11e5)
46 annotation(
47 Placement(visible = true, transformation(origin = {4.44089e-16, 60}, extent = {{-14, -14}, {14, 14}}, rotation = 0)));
48
49 ThermoPower.Gas.SourcePressure SourceP1(
50 redeclare package Medium = ThermoPower.Media.Air, T = 293, p0 = 101325)
51 annotation(
52 Placement(visible = true, transformation(origin = {-96, -18}, extent = {{-8, -8}, {8, 8}}, rotation = 0)));
53
54 ThermoPower.Gas.Compressor compressor1(
55 redeclare package Medium = ThermoPower.Media.Air,
56 Ndesign = 157.08,
57 Table = ThermoPower.Choices.TurboMachinery.TableTypes.matrix,
58 Tdes_in = 293,
59 Tstart_in = 293,
60 Tstart_out = 600,
61 explicitIsentropicEnthalpy = true,
62 pstart_in = 1.01325e5,
63 pstart_out = 8.3e5,
64 tableEta = tableEtaC,
65 tablePR = tablePR,
66 tablePhic = tablePhicC)
67 annotation(
68 Placement(visible = true, transformation(origin = {-59, -31}, extent = {{-15, -15}, {15, 15}}, rotation = 0)));
69
70 ThermoPower.Gas.Turbine turbine1(
71 redeclare package Medium = ThermoPower.Media.FlueGas,
72 Ndesign = 157.08,
73 Table = ThermoPower.Choices.TurboMachinery.TableTypes.matrix,
74 Tdes_in = 1370,
75 Tstart_in = 1370,
76 Tstart_out = 800,
77 pstart_in = 711000,
78 pstart_out = 101325,
79 tableEta = tableEtaT,
80 tablePhic = tablePhicT)
81 annotation(
82 Placement(visible = true, transformation(origin = {52, -30}, extent = {{-14, -14}, {14, 14}}, rotation = 0)));
83
84 ThermoPower.Gas.PressDrop pressDrop1(
85 redeclare package Medium = ThermoPower.Media.Air,
86 A = 1,
87 Tstart = 600,
88 dpnom = 19000,
89 pstart = 8.3e5,
90 rhonom = 4.7,
91 wnom = 100)
92 annotation(
93 Placement(visible = true, transformation(origin = {-46, 18}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
94
95 ThermoPower.Gas.PressDrop pressDrop2(
96 redeclare package Medium = ThermoPower.Media.FlueGas,
97 A = 1,
98 FFtype = ThermoPower.Choices.PressDrop.FFtypes.OpPoint,
99 Tstart = 1370,
100 dpnom = 100000,
101 pstart = 811000,
102 rhonom = 2,
103 wnom = 102)
104 annotation(
105 Placement(visible = true, transformation(origin = {40, 18}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
106
107 ThermoPower.PowerPlants.HRSG.Components.StateReader_gas stateReader_gas1(
108 redeclare package Medium = ThermoPower.Media.Air)
109 annotation(
110 Placement(visible = true, transformation(origin = {-46, 48}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
111
112 ThermoPower.PowerPlants.HRSG.Components.StateReader_gas stateReader_gas2(
113 redeclare package Medium = ThermoPower.Media.FlueGas)
114 annotation(
115 Placement(visible = true, transformation(origin = {40, 48}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
116
117 Modelica.Mechanics.Rotational.Sensors.PowerSensor powerSensor1
118 annotation(
119 Placement(visible = true, transformation(origin = {78, -30}, extent = {{-6, -6}, {6, 6}}, rotation = 0)));
120
121 ThermoPower.Electrical.Generator generator1(
122 J = 30,
123 initOpt = ThermoPower.Choices.Init.Options.steadyState)
124 annotation(
125 Placement(visible = true, transformation(origin = {100, -30}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
126
127 ThermoPower.Electrical.NetworkGrid_Pmax networkGrid_Pmax1(
128 J = 30,
129 Pmax = 10e6,
130 initOpt = ThermoPower.Choices.Init.Options.steadyState)
131 annotation(
132 Placement(visible = true, transformation(origin = {126, -30}, extent = {{-8, -8}, {8, 8}}, rotation = 0)));
133
134 Modelica.Blocks.Continuous.FirstOrder firstOrder1(
135 T = 1,
136 initType = Modelica.Blocks.Types.Init.SteadyState,
137 y_start = 56.8e6)
138 annotation(
139 Placement(visible = true, transformation(origin = {83, -55}, extent = {{-5, -5}, {5, 5}}, rotation = 0)));
140
141 Modelica.Blocks.Interfaces.RealOutput GeneratedPower
142 annotation(
143 Placement(visible = true, transformation(origin = {110, -54}, extent = {{-10, -10}, {10, 10}}, rotation = 0), iconTransformation(origin = {110, -54}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
144 inner ThermoPower.System system annotation(
145 Placement(visible = true, transformation(origin = {88, 90}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
146
147 ThermoPower.Gas.FlangeA ExhaustOutlet(
148 redeclare package Medium = ThermoPower.Media.FlueGas)
149 annotation(
150 Placement(visible = true, transformation(origin = {84, -2}, extent = {{-10, -10}, {10, 10}}, rotation = 0), iconTransformation(origin = {84, -2}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
151equation
152 connect(turbine1.outlet, ExhaustOutlet) annotation(
153 Line(points = {{64, -18}, {64, -18}, {64, 0}, {84, 0}, {84, -2}}, color = {159, 159, 223}));
154 connect(SourceP1.flange, compressor1.inlet) annotation(
155 Line(points = {{-88, -18}, {-70, -18}}, color = {159, 159, 223}));
156 connect(GasFlowActuator.y, SourceW1.in_w0) annotation(
157 Line(points = {{-80, 86}, {-50, 86}, {-50, 81}}, color = {0, 0, 127}));
158 connect(SourceW1.flange, combustionChamber1.inf) annotation(
159 Line(points = {{-34, 76}, {0, 76}, {0, 74}}, color = {159, 159, 223}));
160 connect(firstOrder1.y, GeneratedPower) annotation(
161 Line(points = {{88, -54}, {110, -54}}, color = {0, 0, 127}));
162 connect(powerSensor1.power, firstOrder1.u) annotation(
163 Line(points = {{74, -36}, {74, -55}, {77, -55}}, color = {0, 0, 127}));
164 connect(powerSensor1.flange_b, generator1.shaft) annotation(
165 Line(points = {{84, -30}, {92, -30}, {92, -30}, {92, -30}}));
166 connect(turbine1.shaft_b, powerSensor1.flange_a) annotation(
167 Line(points = {{60, -30}, {72, -30}, {72, -30}, {72, -30}}));
168 connect(compressor1.shaft_b, turbine1.shaft_a) annotation(
169 Line(points = {{-50, -30}, {44, -30}}));
170 connect(pressDrop2.outlet, turbine1.inlet) annotation(
171 Line(points = {{40, 8}, {40, 8}, {40, -18}, {40, -18}}, color = {159, 159, 223}));
172 connect(stateReader_gas2.outlet, pressDrop2.inlet) annotation(
173 Line(points = {{40, 42}, {40, 42}, {40, 28}, {40, 28}}, color = {159, 159, 223}));
174 connect(combustionChamber1.out, stateReader_gas2.inlet) annotation(
175 Line(points = {{14, 60}, {40, 60}, {40, 56}, {40, 56}, {40, 54}}, color = {159, 159, 223}));
176 connect(stateReader_gas1.inlet, combustionChamber1.ina) annotation(
177 Line(points = {{-46, 54}, {-46, 54}, {-46, 60}, {-14, 60}, {-14, 60}}, color = {159, 159, 223}));
178 connect(pressDrop1.inlet, stateReader_gas1.outlet) annotation(
179 Line(points = {{-46, 28}, {-46, 28}, {-46, 42}, {-46, 42}}, color = {159, 159, 223}));
180 connect(compressor1.outlet, pressDrop1.outlet) annotation(
181 Line(points = {{-46, -18}, {-46, 8}}, color = {159, 159, 223}));
182 connect(FuelFlowRate, GasFlowActuator.u) annotation(
183 Line(points = {{-110, 0}, {-100, 0}, {-100, 85}, {-91, 85}}, color = {0, 0, 127}));
184 annotation(
185 uses(ThermoPower(version = "3.1"), Modelica(version = "3.2.2")));end BraytonCycle_CombinedCycle_1;