-
Notifications
You must be signed in to change notification settings - Fork 1
/
Parameters_Output.h
347 lines (343 loc) · 44.5 KB
/
Parameters_Output.h
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
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
#pragma once
#ifndef PARAMETERS_OUTPUT_H
#define PARAMETERS_OUTPUT_H
#include <fstream>
#include "IAPWS.h"
#include "Known_Conditions_and_Given_Parameters.h"
#include "The_Main_Thermal_Parameters_Determined.h"
void Known_Conditions_and_Given_Parameters_Output() {
ofstream fout;
fout.open("Known_Conditions_and_Given_Parameters.csv");
fout << "Nuclear_Power_Plant_Output_Electric_Power" << ',' << Nuclear_Power_Plant_Output_Electric_Power << endl;
fout << "Primary_Circuit_Energy_Utilization_Coefficient" << ',' << Primary_Circuit_Energy_Utilization_Coefficient << endl;
fout << "Steam_Dryness_of_Steam_Generator_Outlet" << ',' << Steam_Dryness_of_Steam_Generator_Outlet << endl;
fout << "Blowdown_Rate_of_Steam_Generator" << ',' << Blowdown_Rate_of_Steam_Generator << endl;
fout << "High_Pressure_Cylinder_Efficiency" << ',' << High_Pressure_Cylinder_Efficiency << endl;
fout << "Low_Pressure_Cylinder_Efficiency" << ',' << Low_Pressure_Cylinder_Efficiency << endl;
fout << "Steam_Turbine_Mechanical_Efficiency" << ',' << Steam_Turbine_Mechanical_Efficiency << endl;
fout << "Generator_Efficiency" << ',' << Generator_Efficiency << endl;
fout << "New_Steam_Pressure_Loss_Coefficient" << ',' << New_Steam_Pressure_Loss_Coefficient << endl;
fout << "Reheat_Steam_Pressure_Loss_Coefficient" << ',' << Reheat_Steam_Pressure_Loss_Coefficient << endl;
fout << "Regeneration_Steam_Extraction_Pressure_Loss_Coefficient" << ',' << Regeneration_Steam_Extraction_Pressure_Loss_Coefficient << endl;
fout << "Low_Pressure_Cylinder_Exhaust_Steam_Pressure_Loss_Coefficient" << ',' << Low_Pressure_Cylinder_Exhaust_Steam_Pressure_Loss_Coefficient << endl;
fout << "High_Pressure_Feed_Water_Heater_Outlet_End_Difference" << ',' << High_Pressure_Feed_Water_Heater_Outlet_End_Difference << endl;
fout << "Low_Pressure_Feed_Water_Heater_Outlet_End_Difference" << ',' << Low_Pressure_Feed_Water_Heater_Outlet_End_Difference << endl;
fout << "Heater_Efficiency" << ',' << Heater_Efficiency << endl;
fout << "Feed_Pump_Efficiency" << ',' << Feed_Pump_Efficiency << endl;
fout << "Feedwater_Pump_Turbine_Internal_Efficiency" << ',' << Feedwater_Pump_Turbine_Internal_Efficiency << endl;
fout << "Feedwater_Pump_Turbine_Mechanical_Efficiency" << ',' << Feedwater_Pump_Turbine_Mechanical_Efficiency << endl;
fout << "Reducer_Efficiency_of_Feed_Pump_Steam_Turbine" << ',' << Reducer_Efficiency_of_Feed_Pump_Steam_Turbine << endl;
fout << "Circulating_Cooling_Water_Inlet_Temperature" << ',' << Circulating_Cooling_Water_Inlet_Temperature << endl;
fout.close();
}
void The_Main_Thermal_Parameters_Determined_Output() {
ofstream fout;
fout.open("The_Main_Thermal_Parameters_Determined.csv");
fout << "Reactor_Coolant_System_Operating_Pressure" << ',' << Reactor_Coolant_System_Operating_Pressure << endl;
Saturation_Temperature_Corresponding_to_Coolant_Pressure = Calculate_Saturation_Temperature(Reactor_Coolant_System_Operating_Pressure);
fout << "Saturation_Temperature_Corresponding_to_Coolant_Pressure" << ',' << Saturation_Temperature_Corresponding_to_Coolant_Pressure << endl;
fout << "Reactor_Outlet_Coolant_Supercooling" << ',' << Reactor_Outlet_Coolant_Supercooling << endl;
Reactor_Outlet_Coolant_Temperature = Calculate_of_Reactor_Inlet_Coolant_Temperature(Saturation_Temperature_Corresponding_to_Coolant_Pressure, Reactor_Outlet_Coolant_Supercooling);
fout << "Reactor_Outlet_Coolant_Temperature" << ',' << Reactor_Outlet_Coolant_Temperature << endl;
fout << "Reactor_Inletand_Outlet_Coolant_Temperature_Rise" << ',' << Reactor_Inletand_Outlet_Coolant_Temperature_Rise << endl;
Reactor_Inlet_Coolant_Temperature = Calculate_of_Reactor_Inlet_Coolant_Temperature(Reactor_Outlet_Coolant_Temperature, Reactor_Inletand_Outlet_Coolant_Temperature_Rise);
fout << "Reactor_Inlet_Coolant_Temperature" << ',' << Reactor_Inlet_Coolant_Temperature << endl;
fout << "Saturated_Steam_Pressure_of_Steam_Generator" << ',' << Saturated_Steam_Pressure_of_Steam_Generator << endl;
Saturated_Steam_Temperature_of_Steam_Generator = Calculate_Saturation_Temperature(Saturated_Steam_Pressure_of_Steam_Generator);
fout << "Saturated_Steam_Temperature_of_Steam_Generator" << ',' << Saturated_Steam_Temperature_of_Steam_Generator << endl;
Saturated_Steam_Enthalpy_of_Steam_Generator = Calculate_Enthalpy_px(Saturated_Steam_Pressure_of_Steam_Generator, 0);
fout << "Saturated_Steam_Enthalpy_of_Steam_Generator" << ',' << Saturated_Steam_Enthalpy_of_Steam_Generator << endl;
Enthalpy_of_Steam_at_the_Outlet_of_the_Steam_Generator = Calculate_Enthalpy_px(Saturated_Steam_Pressure_of_Steam_Generator, Steam_Dryness_of_Steam_Generator_Outlet);
fout << "Enthalpy_of_Steam_at_the_Outlet_of_the_Steam_Generator" << ',' << Enthalpy_of_Steam_at_the_Outlet_of_the_Steam_Generator << endl;
Logarithmic_Average_Temperature_Difference_Between_the_First_and_Second_Sides = Calculate_of_Logarithmic_Average_Temperature_Difference_Between_the_First_and_Second_Sides(Reactor_Outlet_Coolant_Temperature, Reactor_Inlet_Coolant_Temperature, Saturated_Steam_Temperature_of_Steam_Generator);
fout << "Logarithmic_Average_Temperature_Difference_Between_the_First_and_Second_Sides" << ',' << Logarithmic_Average_Temperature_Difference_Between_the_First_and_Second_Sides << endl;
fout << "Temperature_Rise_of_Circulating_Cooling_Water_in_Condenser" << ',' << Temperature_Rise_of_Circulating_Cooling_Water_in_Condenser << endl;
fout << "Heat_Transfer_End_Difference_of_Condenser" << ',' << Heat_Transfer_End_Difference_of_Condenser << endl;
Condensate_Saturation_Temperature_of_Condenser = Calculate_of_Condensate_Saturation_Temperature_of_Condenser(Circulating_Cooling_Water_Inlet_Temperature, Temperature_Rise_of_Circulating_Cooling_Water_in_Condenser, Heat_Transfer_End_Difference_of_Condenser);
fout << "Condensate_Saturation_Temperature_of_Condenser" << ',' << Condensate_Saturation_Temperature_of_Condenser << endl;
Operating_Pressure_of_Condenser = Calculate_Saturation_Pressure(Condensate_Saturation_Temperature_of_Condenser);
fout << "Operating_Pressure_of_Condenser" << ',' << Operating_Pressure_of_Condenser << endl;
Condensate_Enthalpy = Calculate_Enthalpy_px(Operating_Pressure_of_Condenser, 0);
fout << "Condensate_Enthalpy" << ',' << Condensate_Enthalpy << endl;
High_Pressure_Cylinder_Inlet_Steam_Pressure = Calculate_of_High_Pressure_Cylinder_Inlet_Steam_Pressure(Saturated_Steam_Pressure_of_Steam_Generator, New_Steam_Pressure_Loss_Coefficient);
fout << "High_Pressure_Cylinder_Inlet_Steam_Pressure" << ',' << High_Pressure_Cylinder_Inlet_Steam_Pressure << endl;
Imported_Steam_Dryness_of_High_Pressure_Cylinder = Calculate_Dryness(High_Pressure_Cylinder_Inlet_Steam_Pressure, Enthalpy_of_Steam_at_the_Outlet_of_the_Steam_Generator);
fout << "Imported_Steam_Dryness_of_High_Pressure_Cylinder" << ',' << Imported_Steam_Dryness_of_High_Pressure_Cylinder << endl;
High_Pressure_Cylinder_Inlet_Steam_Specific_Entropy = Calculate_Entropy(High_Pressure_Cylinder_Inlet_Steam_Pressure, Enthalpy_of_Steam_at_the_Outlet_of_the_Steam_Generator);
fout << "High_Pressure_Cylinder_Inlet_Steam_Specific_Entropy" << ',' << High_Pressure_Cylinder_Inlet_Steam_Specific_Entropy << endl;
High_Pressure_Cylinder_Exhaust_Pressure = Calculate_of_High_Pressure_Cylinder_Exhaust_Pressure(High_Pressure_Cylinder_Inlet_Steam_Pressure);
fout << "High_Pressure_Cylinder_Exhaust_Pressure" << ',' << High_Pressure_Cylinder_Exhaust_Pressure << endl;
Ideal_Enthalpy_of_High_Pressure_Cylinder_Exhaust_Steam = Calculate_Enthalpy_ps(High_Pressure_Cylinder_Exhaust_Pressure, High_Pressure_Cylinder_Inlet_Steam_Specific_Entropy);
fout << "Ideal_Enthalpy_of_High_Pressure_Cylinder_Exhaust_Steam" << ',' << Ideal_Enthalpy_of_High_Pressure_Cylinder_Exhaust_Steam << endl;
Ideal_Enthalpy_Drop_of_Steam_in_High_Pressure_Cylinder = Calculate_of_Ideal_Enthalpy_Drop_of_Steam_in_High_Pressure_Cylinder(Enthalpy_of_Steam_at_the_Outlet_of_the_Steam_Generator, Ideal_Enthalpy_of_High_Pressure_Cylinder_Exhaust_Steam);
fout << "Ideal_Enthalpy_Drop_of_Steam_in_High_Pressure_Cylinder" << ',' << Ideal_Enthalpy_Drop_of_Steam_in_High_Pressure_Cylinder << endl;
Actual_Enthalpy_Drop_of_Steam_in_High_Pressure_Cylinder = Calculate_of_Actual_Enthalpy_Drop_of_Steam_in_High_Pressure_Cylinder(High_Pressure_Cylinder_Efficiency, Ideal_Enthalpy_Drop_of_Steam_in_High_Pressure_Cylinder);
fout << "Actual_Enthalpy_Drop_of_Steam_in_High_Pressure_Cylinder" << ',' << Actual_Enthalpy_Drop_of_Steam_in_High_Pressure_Cylinder << endl;
Actual_Enthalpy_of_High_Pressure_Cylinder_Exhaust_Steam = Calculate_of_Actual_Enthalpy_of_High_Pressure_Cylinder_Exhaust_Steam(Enthalpy_of_Steam_at_the_Outlet_of_the_Steam_Generator, Actual_Enthalpy_Drop_of_Steam_in_High_Pressure_Cylinder);
fout << "Actual_Enthalpy_of_High_Pressure_Cylinder_Exhaust_Steam" << ',' << Actual_Enthalpy_of_High_Pressure_Cylinder_Exhaust_Steam << endl;
High_Pressure_Cylinder_Exhaust_Steam_Dryness = Calculate_Dryness(High_Pressure_Cylinder_Exhaust_Pressure, Actual_Enthalpy_of_High_Pressure_Cylinder_Exhaust_Steam);
fout << "High_Pressure_Cylinder_Exhaust_Steam_Dryness" << ',' << High_Pressure_Cylinder_Exhaust_Steam_Dryness << endl;
Steam_Pressure_of_Steam_water_Separator_Inlet = High_Pressure_Cylinder_Exhaust_Pressure;
fout << "Steam_Pressure_of_Steam_water_Separator_Inlet" << ',' << Steam_Pressure_of_Steam_water_Separator_Inlet << endl;
Steam_Dryness_of_Steam_water_Separator_Inlet = High_Pressure_Cylinder_Exhaust_Steam_Dryness;
fout << "Steam_Dryness_of_Steam_water_Separator_Inlet" << ',' << Steam_Dryness_of_Steam_water_Separator_Inlet << endl;
fout << "First_Stage_Reheater" << endl;
First_Stage_Reheater.Reheat_Steam_Inlet_Pressure = Calculate_of_Reheat_Steam_Inlet_Pressure(Steam_Water_Separator_Pressure_Loss, Steam_Pressure_of_Steam_water_Separator_Inlet);
fout << "Reheat_Steam_Inlet_Pressure" << ',' << First_Stage_Reheater.Reheat_Steam_Inlet_Pressure << endl;
First_Stage_Reheater.Reheat_Steam_Inlet_Dryness = Calculate_of_Reheat_Steam_Inlet_Dryness_in_First_Stage_Reheater(Steam_Dryness_of_Steam_water_Separator_Inlet, Water_Removal_Coefficient_of_Steam_Water_Separator);
fout << "Reheat_Steam_Inlet_Dryness" << ',' << First_Stage_Reheater.Reheat_Steam_Inlet_Dryness << endl;
First_Stage_Reheater.Reheat_Steam_Inlet_Enthalpy = Calculate_Enthalpy_px(First_Stage_Reheater.Reheat_Steam_Inlet_Pressure, First_Stage_Reheater.Reheat_Steam_Inlet_Dryness);
fout << "Reheat_Steam_Inlet_Enthalpy" << ',' << First_Stage_Reheater.Reheat_Steam_Inlet_Enthalpy << endl;
fout << "Second_Stage_Reheater" << endl;
Second_Stage_Reheater.Reheat_Steam_Inlet_Pressure = Calculate_of_Reheat_Steam_Inlet_Pressure(Primary_Reheater_Pressure_Loss, First_Stage_Reheater.Reheat_Steam_Inlet_Pressure);
fout << "Reheat_Steam_Inlet_Pressure" << ',' << Second_Stage_Reheater.Reheat_Steam_Inlet_Pressure << endl;
Second_Stage_Reheater.Reheat_Steam_Outlet_Pressure = Calculate_of_Reheat_Steam_Inlet_Pressure(Pressure_Loss_of_Secondary_Reheater, Second_Stage_Reheater.Reheat_Steam_Inlet_Pressure);
fout << "Reheat_Steam_Outlet_Pressure" << ',' << Second_Stage_Reheater.Reheat_Steam_Outlet_Pressure << endl;
Second_Stage_Reheater.Reheat_Steam_Outlet_Temperature = Calculate_of_Reheat_Steam_Outlet_Temperature(Saturated_Steam_Temperature_of_Steam_Generator, Reheat_Steam_Temperature_Difference);
fout << "Reheat_Steam_Outlet_Temperature" << ',' << Second_Stage_Reheater.Reheat_Steam_Outlet_Temperature << endl;
Second_Stage_Reheater.Reheat_Steam_Outlet_Enthalpy = Calculate_Enthalpy_pt(Second_Stage_Reheater.Reheat_Steam_Outlet_Pressure, Second_Stage_Reheater.Reheat_Steam_Outlet_Temperature);
fout << "Reheat_Steam_Outlet_Enthalpy" << ',' << Second_Stage_Reheater.Reheat_Steam_Outlet_Enthalpy << endl;
Second_Stage_Reheater.Reheat_Steam_Inlet_Enthalpy = Calculate_of_Enthalpy_of_Secondary_Reheater_Inlet(First_Stage_Reheater.Reheat_Steam_Inlet_Enthalpy, Second_Stage_Reheater.Reheat_Steam_Outlet_Enthalpy);
fout << "Reheat_Steam_Inlet_Enthalpy" << ',' << Second_Stage_Reheater.Reheat_Steam_Inlet_Enthalpy << endl;
Second_Stage_Reheater.Reheat_Steam_Inlet_Temperature = Calculate_Temperature_ph(Second_Stage_Reheater.Reheat_Steam_Inlet_Pressure, Second_Stage_Reheater.Reheat_Steam_Inlet_Enthalpy);
fout << "Reheat_Steam_Inlet_Temperature" << ',' << Second_Stage_Reheater.Reheat_Steam_Inlet_Temperature << endl;
Second_Stage_Reheater.Heating_Steam_Inlet_Pressure = High_Pressure_Cylinder_Inlet_Steam_Pressure;
fout << "Heating_Steam_Inlet_Pressure" << ',' << Second_Stage_Reheater.Heating_Steam_Inlet_Pressure << endl;
Second_Stage_Reheater.Heating_Steam_Inlet_Dryness = Imported_Steam_Dryness_of_High_Pressure_Cylinder;
fout << "Heating_Steam_Inlet_Dryness" << "," << Second_Stage_Reheater.Heating_Steam_Inlet_Dryness << endl;
Second_Stage_Reheater.Heating_Steam_Inlet_Enthalpy = Actual_Enthalpy_of_High_Pressure_Cylinder_Exhaust_Steam;
fout << "Heating_Steam_Inlet_Enthalpy" << ',' << Second_Stage_Reheater.Heating_Steam_Inlet_Enthalpy << endl;
fout << "First_Stage_Reheater" << endl;
First_Stage_Reheater.Heating_Steam_Inlet_Temperature = Second_Stage_Reheater.Reheat_Steam_Inlet_Temperature + High_Pressure_Feed_Water_Heater_Outlet_End_Difference;
fout << "Heating_Steam_Inlet_Temperature" << ',' << First_Stage_Reheater.Heating_Steam_Inlet_Temperature << endl;
First_Stage_Reheater.Heating_Steam_Inlet_Pressure = Calculate_Saturation_Pressure(First_Stage_Reheater.Heating_Steam_Inlet_Temperature);
fout << "Heating_Steam_Inlet_Pressure" << ',' << First_Stage_Reheater.Heating_Steam_Inlet_Pressure << endl;
First_Stage_Reheater.Heating_Steam_Inlet_Enthalpy = Calculate_Enthalpy_pt(First_Stage_Reheater.Heating_Steam_Inlet_Pressure, First_Stage_Reheater.Heating_Steam_Inlet_Temperature);
fout << "Heating_Steam_Inlet_Enthalpy" << ',' << First_Stage_Reheater.Heating_Steam_Inlet_Enthalpy << endl;
First_Stage_Reheater.Heating_Steam_Inlet_Dryness = Calculate_Dryness(First_Stage_Reheater.Heating_Steam_Inlet_Pressure, First_Stage_Reheater.Heating_Steam_Inlet_Enthalpy);
fout << "Heating_Steam_Inlet_Dryness" << ',' << First_Stage_Reheater.Heating_Steam_Inlet_Dryness << endl;
fout << "Low_Pressure_Cylinder" << endl;
Low_Pressure_Cylinder.Inlet_Steam_Pressure = Calculate_of_Low_Pressure_Cylinder_Inlet_Steam_Pressure(Low_Pressure_Cylinder_Exhaust_Steam_Pressure_Loss_Coefficient, Second_Stage_Reheater.Reheat_Steam_Outlet_Pressure);
fout << "Inlet_Steam_Pressure" << ',' << Low_Pressure_Cylinder.Inlet_Steam_Pressure << endl;
Low_Pressure_Cylinder.Inlet_Steam_Temperature = Calculate_Temperature_ph(Low_Pressure_Cylinder.Inlet_Steam_Pressure, Second_Stage_Reheater.Reheat_Steam_Outlet_Enthalpy);
fout << "Inlet_Steam_Temperature" << ',' << Low_Pressure_Cylinder.Inlet_Steam_Temperature << endl;
Low_Pressure_Cylinder.Inlet_Steam_Enthalpy = Second_Stage_Reheater.Reheat_Steam_Outlet_Enthalpy;
fout << "Inlet_Steam_Enthalpy" << ',' << Low_Pressure_Cylinder.Inlet_Steam_Enthalpy << endl;
Low_Pressure_Cylinder.Inlet_Steam_Entropy = Calculate_Entropy(Low_Pressure_Cylinder.Inlet_Steam_Pressure, Low_Pressure_Cylinder.Inlet_Steam_Enthalpy);
fout << "Inlet_Steam_Entropy" << ',' << Low_Pressure_Cylinder.Inlet_Steam_Entropy << endl;
Low_Pressure_Cylinder.Exhaust_Steam_Pressure = Calculate_of_Exhaust_Steam_Pressure(Operating_Pressure_of_Condenser, Low_Pressure_Cylinder_Exhaust_Steam_Pressure_Loss_Coefficient);
fout << "Exhaust_Steam_Pressure" << ',' << Low_Pressure_Cylinder.Exhaust_Steam_Pressure << endl;
Low_Pressure_Cylinder.Exhaust_Steam_Ideal_Enthalpy = Calculate_Enthalpy_ps(Low_Pressure_Cylinder.Exhaust_Steam_Pressure, Low_Pressure_Cylinder.Inlet_Steam_Entropy);
fout << "Exhaust_Steam_Ideal_Enthalpy" << ',' << Low_Pressure_Cylinder.Exhaust_Steam_Ideal_Enthalpy << endl;
Low_Pressure_Cylinder.Exhaust_Steam_Actual_Enthalpy = Calculate_of_Exhaust_Steam_Actual_Enthalpy(Low_Pressure_Cylinder.Inlet_Steam_Enthalpy, Low_Pressure_Cylinder.Exhaust_Steam_Ideal_Enthalpy, Low_Pressure_Cylinder_Efficiency);
fout << "Exhaust_Steam_Actual_Enthalpy" << ',' << Low_Pressure_Cylinder.Exhaust_Steam_Actual_Enthalpy << endl;
Low_Pressure_Cylinder.Exhaust_Steam_Dryness = Calculate_Dryness(Low_Pressure_Cylinder.Exhaust_Steam_Pressure, Low_Pressure_Cylinder.Exhaust_Steam_Actual_Enthalpy);
fout << "Exhaust_Steam_Dryness" << ',' << Low_Pressure_Cylinder.Exhaust_Steam_Dryness << endl;
fout << "Deaerator" << endl;
Deaerator.Operating_Pressure = Calculate_of_Operating_Pressure_of_Deaerator(High_Pressure_Cylinder_Exhaust_Pressure, Inlet_Pressure_Loss_of_Deaerator);
fout << "Operating_Pressure" << ',' << Deaerator.Operating_Pressure << endl;
Deaerator.Outlet_Feed_Water_Temperature = Calculate_Saturation_Temperature(Deaerator.Operating_Pressure);
fout << "Outlet_Feed_Water_Temperature" << ',' << Deaerator.Outlet_Feed_Water_Temperature << endl;
Deaerator.Specific_Enthalpy_of_Outlet_Water_Supply = Calculate_Enthalpy_px(Deaerator.Operating_Pressure, 0);
fout << "Specific_Enthalpy_of_Outlet_Water_Supply" << ',' << Deaerator.Specific_Enthalpy_of_Outlet_Water_Supply << endl;
fout << "Regeneration_Level" << ',' << Regeneration_Level << endl;
fout << "Low_Pressure_Feed_Water_Heater_Stages" << ',' << Low_Pressure_Feed_Water_Heater_Stages << endl;
fout << "High_Pressure_Feed_Water_Heater_Stages" << ',' << High_Pressure_Feed_Water_Heater_Stages << endl;
Enthalpy_Rise = Calculate_of_Enthalpy_Rise(Saturated_Steam_Enthalpy_of_Steam_Generator, Condensate_Enthalpy, Regeneration_Level);
fout << "Enthalpy_Rise" << ',' << Enthalpy_Rise << endl;
The_Best_Enthalpy_of_Water_Supply = Calculate_of_The_Best_Enthalpy_of_Water_Supply(Condensate_Enthalpy, Enthalpy_Rise, Regeneration_Level);
fout << "The_Best_Enthalpy_of_Water_Supply" << ',' << The_Best_Enthalpy_of_Water_Supply << endl;
Optimal_Feed_Water_Temperature = Calculate_Temperature_ph(Saturated_Steam_Pressure_of_Steam_Generator, The_Best_Enthalpy_of_Water_Supply);
fout << "Optimal_Feed_Water_Temperature" << ',' << Optimal_Feed_Water_Temperature << endl;
Actual_Feed_Water_Temperature = Calculate_of_Actual_Feed_Water_Temperature(Optimal_Feed_Water_Temperature, Actual_Temperature_Calibration_Coefficient);
fout << "Actual_Feed_Water_Temperature" << ',' << Actual_Feed_Water_Temperature << endl;
Actual_Feed_Water_Enthalpy = Calculate_Enthalpy_pt(Saturated_Steam_Pressure_of_Steam_Generator, Actual_Feed_Water_Temperature);
fout << "Actual_Feed_Water_Enthalpy" << ',' << Actual_Feed_Water_Enthalpy << endl;
First_Feed_Water_Recuperation_Distribution = Calculate_of_First_Feed_Water_Recuperation_Distribution(Actual_Feed_Water_Enthalpy, Condensate_Enthalpy, Regeneration_Level);
fout << "First_Feed_Water_Recuperation_Distribution" << ',' << First_Feed_Water_Recuperation_Distribution << endl;
Enthalpy_Rise_of_High_Pressure_Heater_Feed_Water = Calculate_of_Enthalpy_Rise_of_High_Pressure_Heater_Feed_Water(Actual_Feed_Water_Enthalpy, Deaerator.Specific_Enthalpy_of_Outlet_Water_Supply, High_Pressure_Feed_Water_Heater_Stages);
fout << "Enthalpy_Rise_of_High_Pressure_Heater_Feed_Water" << ',' << Enthalpy_Rise_of_High_Pressure_Heater_Feed_Water << endl;
Deaerator_and_Low_Feed_Water_Enthalpy_Rise = Calculate_of_Deaerator_and_Low_Feed_Water_Enthalpy_Rise(Deaerator.Specific_Enthalpy_of_Outlet_Water_Supply, Condensate_Enthalpy, Low_Pressure_Feed_Water_Heater_Stages);
fout << "Deaerator_and_Low_Feed_Water_Enthalpy_Rise" << ',' << Deaerator_and_Low_Feed_Water_Enthalpy_Rise << endl;
Condensate_Pump_Outlet_Pressure = Calculate_of_Condensate_Pump_Outlet_Pressure(Deaerator.Operating_Pressure, Coefficient_of_Outlet_Pressure_of_Condensate_Pump);
fout << "Condensate_Pump_Outlet_Pressure" << ',' << Condensate_Pump_Outlet_Pressure << endl;
Low_Pressure_Heater_Feed_Water_Pressure_Drop = Calculate_of_Low_Pressure_Heater_Feed_Water_Pressure_Drop(Condensate_Pump_Outlet_Pressure, Deaerator.Operating_Pressure, Low_Pressure_Feed_Water_Heater_Stages);
fout << "Low_Pressure_Heater_Feed_Water_Pressure_Drop" << ',' << Low_Pressure_Heater_Feed_Water_Pressure_Drop << endl;
fout << "Low_Pressure_Heater_Feed_Water_No1" << endl;
Low_Pressure_Heater_Feed_Water[0].Outlet_Feed_Water_Pressure = Calculate_of_Outlet_Feed_Water_Pressure(Condensate_Pump_Outlet_Pressure, Low_Pressure_Heater_Feed_Water_Pressure_Drop);
fout << "Outlet_Feed_Water_Pressure" << ',' << Low_Pressure_Heater_Feed_Water[0].Outlet_Feed_Water_Pressure << endl;
Low_Pressure_Heater_Feed_Water[0].Imported_Feed_Water_Specific_Enthalpy = Condensate_Enthalpy;
fout << "Imported_Feed_Water_Specific_Enthalpy" << ',' << Low_Pressure_Heater_Feed_Water[0].Imported_Feed_Water_Specific_Enthalpy << endl;
Low_Pressure_Heater_Feed_Water[0].Specific_Enthalpy_of_Outlet_Water_Supply = Calculate_of_Specific_Enthalpy_of_Outlet_Water_Supply(Low_Pressure_Heater_Feed_Water[0].Imported_Feed_Water_Specific_Enthalpy, Deaerator_and_Low_Feed_Water_Enthalpy_Rise);
fout << "Specific_Enthalpy_of_Outlet_Water_Supply" << ',' << Low_Pressure_Heater_Feed_Water[0].Specific_Enthalpy_of_Outlet_Water_Supply << endl;
Low_Pressure_Heater_Feed_Water[0].Inlet_Feed_Water_Temperature = Calculate_Temperature_ph(Low_Pressure_Heater_Feed_Water[0].Outlet_Feed_Water_Pressure, Low_Pressure_Heater_Feed_Water[0].Imported_Feed_Water_Specific_Enthalpy);
fout << "Inlet_Feed_Water_Temperature" << ',' << Low_Pressure_Heater_Feed_Water[0].Inlet_Feed_Water_Temperature << endl;
Low_Pressure_Heater_Feed_Water[0].Outlet_Feed_Water_Temperature = Calculate_Temperature_ph(Low_Pressure_Heater_Feed_Water[0].Outlet_Feed_Water_Pressure, Low_Pressure_Heater_Feed_Water[0].Specific_Enthalpy_of_Outlet_Water_Supply);
fout << "Outlet_Feed_Water_Temperature" << ',' << Low_Pressure_Heater_Feed_Water[0].Outlet_Feed_Water_Temperature << endl;
fout << "Low_Pressure_Heater_Feed_Water_No2" << endl;
Low_Pressure_Heater_Feed_Water[1].Outlet_Feed_Water_Pressure = Calculate_of_Outlet_Feed_Water_Pressure(Low_Pressure_Heater_Feed_Water[0].Outlet_Feed_Water_Pressure, Low_Pressure_Heater_Feed_Water_Pressure_Drop);
fout << "Outlet_Feed_Water_Pressure" << ',' << Low_Pressure_Heater_Feed_Water[1].Outlet_Feed_Water_Pressure << endl;
Low_Pressure_Heater_Feed_Water[1].Imported_Feed_Water_Specific_Enthalpy = Low_Pressure_Heater_Feed_Water[0].Specific_Enthalpy_of_Outlet_Water_Supply;
fout << "Imported_Feed_Water_Specific_Enthalpy" << ',' << Low_Pressure_Heater_Feed_Water[1].Imported_Feed_Water_Specific_Enthalpy << endl;
Low_Pressure_Heater_Feed_Water[1].Specific_Enthalpy_of_Outlet_Water_Supply = Calculate_of_Specific_Enthalpy_of_Outlet_Water_Supply(Low_Pressure_Heater_Feed_Water[1].Imported_Feed_Water_Specific_Enthalpy, Deaerator_and_Low_Feed_Water_Enthalpy_Rise);
fout << "Specific_Enthalpy_of_Outlet_Water_Supply" << ',' << Low_Pressure_Heater_Feed_Water[1].Specific_Enthalpy_of_Outlet_Water_Supply << endl;
Low_Pressure_Heater_Feed_Water[1].Inlet_Feed_Water_Temperature = Calculate_Temperature_ph(Low_Pressure_Heater_Feed_Water[1].Outlet_Feed_Water_Pressure, Low_Pressure_Heater_Feed_Water[1].Imported_Feed_Water_Specific_Enthalpy);
fout << "Inlet_Feed_Water_Temperature" << ',' << Low_Pressure_Heater_Feed_Water[1].Inlet_Feed_Water_Temperature << endl;
Low_Pressure_Heater_Feed_Water[1].Outlet_Feed_Water_Temperature = Calculate_Temperature_ph(Low_Pressure_Heater_Feed_Water[1].Outlet_Feed_Water_Pressure, Low_Pressure_Heater_Feed_Water[1].Specific_Enthalpy_of_Outlet_Water_Supply);
fout << "Outlet_Feed_Water_Temperature" << ',' << Low_Pressure_Heater_Feed_Water[1].Outlet_Feed_Water_Temperature << endl;
fout << "Low_Pressure_Heater_Feed_Water_No3" << endl;
Low_Pressure_Heater_Feed_Water[2].Outlet_Feed_Water_Pressure = Calculate_of_Outlet_Feed_Water_Pressure(Low_Pressure_Heater_Feed_Water[1].Outlet_Feed_Water_Pressure, Low_Pressure_Heater_Feed_Water_Pressure_Drop);
fout << "Outlet_Feed_Water_Pressure" << ',' << Low_Pressure_Heater_Feed_Water[2].Outlet_Feed_Water_Pressure << endl;
Low_Pressure_Heater_Feed_Water[2].Imported_Feed_Water_Specific_Enthalpy = Low_Pressure_Heater_Feed_Water[1].Specific_Enthalpy_of_Outlet_Water_Supply;
fout << "Imported_Feed_Water_Specific_Enthalpy" << ',' << Low_Pressure_Heater_Feed_Water[2].Imported_Feed_Water_Specific_Enthalpy << endl;
Low_Pressure_Heater_Feed_Water[2].Specific_Enthalpy_of_Outlet_Water_Supply = Calculate_of_Specific_Enthalpy_of_Outlet_Water_Supply(Low_Pressure_Heater_Feed_Water[2].Imported_Feed_Water_Specific_Enthalpy, Deaerator_and_Low_Feed_Water_Enthalpy_Rise);
fout << "Specific_Enthalpy_of_Outlet_Water_Supply" << ',' << Low_Pressure_Heater_Feed_Water[2].Specific_Enthalpy_of_Outlet_Water_Supply << endl;
Low_Pressure_Heater_Feed_Water[2].Inlet_Feed_Water_Temperature = Calculate_Temperature_ph(Low_Pressure_Heater_Feed_Water[2].Outlet_Feed_Water_Pressure, Low_Pressure_Heater_Feed_Water[2].Imported_Feed_Water_Specific_Enthalpy);
fout << "Inlet_Feed_Water_Temperature" << ',' << Low_Pressure_Heater_Feed_Water[2].Inlet_Feed_Water_Temperature << endl;
Low_Pressure_Heater_Feed_Water[2].Outlet_Feed_Water_Temperature = Calculate_Temperature_ph(Low_Pressure_Heater_Feed_Water[2].Outlet_Feed_Water_Pressure, Low_Pressure_Heater_Feed_Water[2].Specific_Enthalpy_of_Outlet_Water_Supply);
fout << "Outlet_Feed_Water_Temperature" << ',' << Low_Pressure_Heater_Feed_Water[2].Outlet_Feed_Water_Temperature << endl;
fout << "Low_Pressure_Heater_Feed_Water_No4" << endl;
Low_Pressure_Heater_Feed_Water[3].Outlet_Feed_Water_Pressure = Calculate_of_Outlet_Feed_Water_Pressure(Low_Pressure_Heater_Feed_Water[2].Outlet_Feed_Water_Pressure, Low_Pressure_Heater_Feed_Water_Pressure_Drop);
fout << "Outlet_Feed_Water_Pressure" << ',' << Low_Pressure_Heater_Feed_Water[3].Outlet_Feed_Water_Pressure << endl;
Low_Pressure_Heater_Feed_Water[3].Imported_Feed_Water_Specific_Enthalpy = Low_Pressure_Heater_Feed_Water[2].Specific_Enthalpy_of_Outlet_Water_Supply;
fout << "Imported_Feed_Water_Specific_Enthalpy" << ',' << Low_Pressure_Heater_Feed_Water[3].Imported_Feed_Water_Specific_Enthalpy << endl;
Low_Pressure_Heater_Feed_Water[3].Specific_Enthalpy_of_Outlet_Water_Supply = Calculate_of_Specific_Enthalpy_of_Outlet_Water_Supply(Low_Pressure_Heater_Feed_Water[3].Imported_Feed_Water_Specific_Enthalpy, Deaerator_and_Low_Feed_Water_Enthalpy_Rise);
fout << "Specific_Enthalpy_of_Outlet_Water_Supply" << ',' << Low_Pressure_Heater_Feed_Water[3].Specific_Enthalpy_of_Outlet_Water_Supply << endl;
Low_Pressure_Heater_Feed_Water[3].Inlet_Feed_Water_Temperature = Calculate_Temperature_ph(Low_Pressure_Heater_Feed_Water[3].Outlet_Feed_Water_Pressure, Low_Pressure_Heater_Feed_Water[3].Imported_Feed_Water_Specific_Enthalpy);
fout << "Inlet_Feed_Water_Temperature" << ',' << Low_Pressure_Heater_Feed_Water[3].Inlet_Feed_Water_Temperature << endl;
Low_Pressure_Heater_Feed_Water[3].Outlet_Feed_Water_Temperature = Calculate_Temperature_ph(Low_Pressure_Heater_Feed_Water[3].Outlet_Feed_Water_Pressure, Low_Pressure_Heater_Feed_Water[3].Specific_Enthalpy_of_Outlet_Water_Supply);
fout << "Outlet_Feed_Water_Temperature" << ',' << Low_Pressure_Heater_Feed_Water[3].Outlet_Feed_Water_Temperature << endl;
fout << "Deaerator" << endl;
Deaerator.Imported_Feed_Water_Specific_Enthalpy = Low_Pressure_Heater_Feed_Water[3].Specific_Enthalpy_of_Outlet_Water_Supply;
fout << "Imported_Feed_Water_Specific_Enthalpy" << ',' << Deaerator.Imported_Feed_Water_Specific_Enthalpy << endl;
Deaerator.Specific_Enthalpy_of_Outlet_Water_Supply = Calculate_of_Specific_Enthalpy_of_Outlet_Water_Supply(Deaerator.Imported_Feed_Water_Specific_Enthalpy, Deaerator_and_Low_Feed_Water_Enthalpy_Rise);
fout << "Specific_Enthalpy_of_Outlet_Water_Supply" << ',' << Deaerator.Specific_Enthalpy_of_Outlet_Water_Supply << endl;
Deaerator.Outlet_Feed_Water_Entropy = Calculate_Entropy(Deaerator.Operating_Pressure, Deaerator.Specific_Enthalpy_of_Outlet_Water_Supply);
fout << "Outlet_Feed_Water_Entropy" << ',' << Deaerator.Outlet_Feed_Water_Entropy << endl;
/*
double error = 1;
double t1 = Condensate_Saturation_Temperature_of_Condenser;
double t2 = Actual_Feed_Water_Temperature;
do
{
Deaerator.Outlet_Feed_Water_Temperature = (t1 + t2) / 2;
double h = Calculate_Enthalpy_tx(Deaerator.Outlet_Feed_Water_Temperature, 0);
error = h - Deaerator.Specific_Enthalpy_of_Outlet_Water_Supply;
if (error > 0) {
t2 = Deaerator.Outlet_Feed_Water_Temperature;
}
else {
t1 = Deaerator.Outlet_Feed_Water_Temperature;
}
} while (fabs(error) < Error_Accuracy);
fout << "Outlet_Feed_Water_Temperature" << ',' << Deaerator.Outlet_Feed_Water_Temperature << endl;
Deaerator.Operating_Pressure = Calculate_Saturation_Pressure(Deaerator.Outlet_Feed_Water_Temperature);
fout << "Operating_Pressure" << ',' << Deaerator.Operating_Pressure << endl;
*/
Feed_Water_Pump_Outlet_Pressure = Calculate_of_Feed_Water_Pump_Outlet_Pressure(Saturated_Steam_Pressure_of_Steam_Generator, Pressure_Coefficient_of_Feed_Pump);
fout << "Feed_Water_Pump_Outlet_Pressure" << ',' << Feed_Water_Pump_Outlet_Pressure << endl;
High_Pressure_Heater_Feed_Water_Pressure_Drop = Calculate_of_High_Pressure_Heater_Feed_Water_Pressure_Drop(Feed_Water_Pump_Outlet_Pressure, Saturated_Steam_Pressure_of_Steam_Generator, High_Pressure_Feed_Water_Heater_Stages);
fout << "High_Pressure_Heater_Feed_Water_Pressure_Drop" << ',' << High_Pressure_Heater_Feed_Water_Pressure_Drop << endl;
fout << "High_Pressure_Heater_Feed_Water_No1" << endl;
High_Pressure_Heater_Feed_Water[0].Outlet_Feed_Water_Pressure = Calculate_of_Outlet_Feed_Water_Pressure(Feed_Water_Pump_Outlet_Pressure, High_Pressure_Heater_Feed_Water_Pressure_Drop);
fout << "Outlet_Feed_Water_Pressure" << ',' << High_Pressure_Heater_Feed_Water[0].Outlet_Feed_Water_Pressure << endl;
High_Pressure_Heater_Feed_Water[0].Water_Supply_Side_Pressure = Feed_Water_Pump_Outlet_Pressure;
fout << "Water_Supply_Side_Pressure" << ',' << High_Pressure_Heater_Feed_Water[0].Water_Supply_Side_Pressure << endl;
High_Pressure_Heater_Feed_Water[0].Imported_Feed_Water_Specific_Enthalpy = Calculate_Enthalpy_ps(High_Pressure_Heater_Feed_Water[0].Water_Supply_Side_Pressure, Deaerator.Outlet_Feed_Water_Entropy);
fout << "Imported_Feed_Water_Specific_Enthalpy" << ',' << High_Pressure_Heater_Feed_Water[0].Imported_Feed_Water_Specific_Enthalpy << endl;
High_Pressure_Heater_Feed_Water[0].Specific_Enthalpy_of_Outlet_Water_Supply = Calculate_of_Specific_Enthalpy_of_Outlet_Water_Supply(High_Pressure_Heater_Feed_Water[0].Imported_Feed_Water_Specific_Enthalpy, Enthalpy_Rise_of_High_Pressure_Heater_Feed_Water);
fout << "Specific_Enthalpy_of_Outlet_Water_Supply" << ',' << High_Pressure_Heater_Feed_Water[0].Specific_Enthalpy_of_Outlet_Water_Supply << endl;
High_Pressure_Heater_Feed_Water[0].Inlet_Feed_Water_Temperature = Calculate_Temperature_ph(High_Pressure_Heater_Feed_Water[0].Water_Supply_Side_Pressure, High_Pressure_Heater_Feed_Water[0].Imported_Feed_Water_Specific_Enthalpy);
fout << "Inlet_Feed_Water_Temperature" << ',' << High_Pressure_Heater_Feed_Water[0].Inlet_Feed_Water_Temperature << endl;
High_Pressure_Heater_Feed_Water[0].Outlet_Feed_Water_Temperature = Calculate_Temperature_ph(High_Pressure_Heater_Feed_Water[0].Water_Supply_Side_Pressure, High_Pressure_Heater_Feed_Water[0].Specific_Enthalpy_of_Outlet_Water_Supply);
fout << "Outlet_Feed_Water_Temperature" << ',' << High_Pressure_Heater_Feed_Water[0].Outlet_Feed_Water_Temperature << endl;
fout << "High_Pressure_Heater_Feed_Water_No2" << endl;
High_Pressure_Heater_Feed_Water[1].Outlet_Feed_Water_Pressure = Calculate_of_Outlet_Feed_Water_Pressure(High_Pressure_Heater_Feed_Water[0].Outlet_Feed_Water_Pressure, High_Pressure_Heater_Feed_Water_Pressure_Drop);
fout << "Outlet_Feed_Water_Pressure" << ',' << High_Pressure_Heater_Feed_Water[1].Outlet_Feed_Water_Pressure << endl;
High_Pressure_Heater_Feed_Water[1].Water_Supply_Side_Pressure = High_Pressure_Heater_Feed_Water[0].Outlet_Feed_Water_Pressure;
fout << "Water_Supply_Side_Pressure" << ',' << High_Pressure_Heater_Feed_Water[1].Water_Supply_Side_Pressure << endl;
High_Pressure_Heater_Feed_Water[1].Imported_Feed_Water_Specific_Enthalpy = High_Pressure_Heater_Feed_Water[0].Specific_Enthalpy_of_Outlet_Water_Supply;
fout << "Imported_Feed_Water_Specific_Enthalpy" << ',' << High_Pressure_Heater_Feed_Water[1].Imported_Feed_Water_Specific_Enthalpy << endl;
High_Pressure_Heater_Feed_Water[1].Specific_Enthalpy_of_Outlet_Water_Supply = Calculate_of_Specific_Enthalpy_of_Outlet_Water_Supply(High_Pressure_Heater_Feed_Water[1].Imported_Feed_Water_Specific_Enthalpy, Enthalpy_Rise_of_High_Pressure_Heater_Feed_Water);
fout << "Specific_Enthalpy_of_Outlet_Water_Supply" << ',' << High_Pressure_Heater_Feed_Water[1].Specific_Enthalpy_of_Outlet_Water_Supply << endl;
High_Pressure_Heater_Feed_Water[1].Inlet_Feed_Water_Temperature = Calculate_Temperature_ph(High_Pressure_Heater_Feed_Water[1].Water_Supply_Side_Pressure, High_Pressure_Heater_Feed_Water[1].Imported_Feed_Water_Specific_Enthalpy);
fout << "Inlet_Feed_Water_Temperature" << ',' << High_Pressure_Heater_Feed_Water[1].Inlet_Feed_Water_Temperature << endl;
High_Pressure_Heater_Feed_Water[1].Outlet_Feed_Water_Temperature = Calculate_Temperature_ph(High_Pressure_Heater_Feed_Water[1].Water_Supply_Side_Pressure, High_Pressure_Heater_Feed_Water[1].Specific_Enthalpy_of_Outlet_Water_Supply);
fout << "Outlet_Feed_Water_Temperature" << ',' << High_Pressure_Heater_Feed_Water[1].Outlet_Feed_Water_Temperature << endl;
fout << "High_Pressure_Cylinder_Steam_Extraction_No1" << endl;
High_Pressure_Cylinder_Steam_Extraction[0].Temperature = Calculate_of_The_Temperature_of_Steam_Extraction(High_Pressure_Heater_Feed_Water[0].Outlet_Feed_Water_Temperature, High_Pressure_Feed_Water_Heater_Outlet_End_Difference);
fout << "Temperature" << ',' << High_Pressure_Cylinder_Steam_Extraction[0].Temperature << endl;
High_Pressure_Cylinder_Steam_Extraction[0].Pressure = Calculate_of_The_Pressure_of_Steam_Extraction(Calculate_Saturation_Pressure(High_Pressure_Cylinder_Steam_Extraction[0].Temperature), Regeneration_Steam_Extraction_Pressure_Loss_Coefficient);
fout << "Pressure" << ',' << High_Pressure_Cylinder_Steam_Extraction[0].Pressure << endl;
High_Pressure_Cylinder_Steam_Extraction[0].Ideal_Enthalpy = Calculate_Enthalpy_ps(High_Pressure_Cylinder_Steam_Extraction[0].Pressure, High_Pressure_Cylinder_Inlet_Steam_Specific_Entropy);
fout << "Ideal_Enthalpy" << ',' << High_Pressure_Cylinder_Steam_Extraction[0].Ideal_Enthalpy << endl;
High_Pressure_Cylinder_Steam_Extraction[0].Ideal_Enthalpy_Drop = Calculate_of_Ideal_Enthalpy_Drop_of_Steam_in_High_Pressure_Cylinder(Enthalpy_of_Steam_at_the_Outlet_of_the_Steam_Generator, High_Pressure_Cylinder_Steam_Extraction[0].Ideal_Enthalpy);
fout << "Ideal_Enthalpy_Drop" << ',' << High_Pressure_Cylinder_Steam_Extraction[0].Ideal_Enthalpy_Drop << endl;
High_Pressure_Cylinder_Steam_Extraction[0].Actual_Enthalpy_Drop = Calculate_of_Actual_Enthalpy_Drop_of_Steam_in_High_Pressure_Cylinder(High_Pressure_Cylinder_Efficiency, High_Pressure_Cylinder_Steam_Extraction[0].Ideal_Enthalpy_Drop);
fout << "Actual_Enthalpy_Drop" << ',' << High_Pressure_Cylinder_Steam_Extraction[0].Actual_Enthalpy_Drop << endl;
High_Pressure_Cylinder_Steam_Extraction[0].Actual_Enthalpy = Calculate_of_Actual_Enthalpy_of_High_Pressure_Cylinder_Exhaust_Steam(Enthalpy_of_Steam_at_the_Outlet_of_the_Steam_Generator, High_Pressure_Cylinder_Steam_Extraction[0].Actual_Enthalpy_Drop);
fout << "Actual_Enthalpy" << ',' << High_Pressure_Cylinder_Steam_Extraction[0].Actual_Enthalpy << endl;
High_Pressure_Cylinder_Steam_Extraction[0].Dryness = Calculate_Dryness(High_Pressure_Cylinder_Steam_Extraction[0].Pressure, High_Pressure_Cylinder_Steam_Extraction[0].Actual_Enthalpy);
fout << "Dryness" << ',' << High_Pressure_Cylinder_Steam_Extraction[0].Dryness << endl;
fout << "High_Pressure_Cylinder_Steam_Extraction_No2" << endl;
High_Pressure_Cylinder_Steam_Extraction[1].Temperature = Calculate_of_The_Temperature_of_Steam_Extraction(High_Pressure_Heater_Feed_Water[1].Outlet_Feed_Water_Temperature, High_Pressure_Feed_Water_Heater_Outlet_End_Difference);
fout << "Temperature" << ',' << High_Pressure_Cylinder_Steam_Extraction[1].Temperature << endl;
High_Pressure_Cylinder_Steam_Extraction[1].Pressure = Calculate_of_The_Pressure_of_Steam_Extraction(Calculate_Saturation_Pressure(High_Pressure_Cylinder_Steam_Extraction[1].Temperature), Regeneration_Steam_Extraction_Pressure_Loss_Coefficient);
fout << "Pressure" << ',' << High_Pressure_Cylinder_Steam_Extraction[1].Pressure << endl;
High_Pressure_Cylinder_Steam_Extraction[1].Ideal_Enthalpy = Calculate_Enthalpy_ps(High_Pressure_Cylinder_Steam_Extraction[1].Pressure, High_Pressure_Cylinder_Inlet_Steam_Specific_Entropy);
fout << "Ideal_Enthalpy" << ',' << High_Pressure_Cylinder_Steam_Extraction[1].Ideal_Enthalpy << endl;
High_Pressure_Cylinder_Steam_Extraction[1].Ideal_Enthalpy_Drop = Calculate_of_Ideal_Enthalpy_Drop_of_Steam_in_High_Pressure_Cylinder(Enthalpy_of_Steam_at_the_Outlet_of_the_Steam_Generator, High_Pressure_Cylinder_Steam_Extraction[1].Ideal_Enthalpy);
fout << "Ideal_Enthalpy_Drop" << ',' << High_Pressure_Cylinder_Steam_Extraction[1].Ideal_Enthalpy_Drop << endl;
High_Pressure_Cylinder_Steam_Extraction[1].Actual_Enthalpy_Drop = Calculate_of_Actual_Enthalpy_Drop_of_Steam_in_High_Pressure_Cylinder(High_Pressure_Cylinder_Efficiency, High_Pressure_Cylinder_Steam_Extraction[1].Ideal_Enthalpy_Drop);
fout << "Actual_Enthalpy_Drop" << ',' << High_Pressure_Cylinder_Steam_Extraction[1].Actual_Enthalpy_Drop << endl;
High_Pressure_Cylinder_Steam_Extraction[1].Actual_Enthalpy = Calculate_of_Actual_Enthalpy_of_High_Pressure_Cylinder_Exhaust_Steam(Enthalpy_of_Steam_at_the_Outlet_of_the_Steam_Generator, High_Pressure_Cylinder_Steam_Extraction[1].Actual_Enthalpy_Drop);
fout << "Actual_Enthalpy" << ',' << High_Pressure_Cylinder_Steam_Extraction[1].Actual_Enthalpy << endl;
High_Pressure_Cylinder_Steam_Extraction[1].Dryness = Calculate_Dryness(High_Pressure_Cylinder_Steam_Extraction[1].Pressure, High_Pressure_Cylinder_Steam_Extraction[1].Actual_Enthalpy);
fout << "Dryness" << ',' << High_Pressure_Cylinder_Steam_Extraction[1].Dryness << endl;
fout << "Low_Pressure_Cylinder_Steam_Extraction_No1" << endl;
Low_Pressure_Cylinder_Steam_Extraction[0].Temperature = Calculate_of_The_Temperature_of_Steam_Extraction(Low_Pressure_Heater_Feed_Water[0].Outlet_Feed_Water_Temperature, Low_Pressure_Feed_Water_Heater_Outlet_End_Difference);
fout << "Temperature" << ',' << Low_Pressure_Cylinder_Steam_Extraction[0].Temperature << endl;
Low_Pressure_Cylinder_Steam_Extraction[0].Pressure = Calculate_of_The_Pressure_of_Steam_Extraction(Calculate_Saturation_Pressure(Low_Pressure_Cylinder_Steam_Extraction[0].Temperature), Regeneration_Steam_Extraction_Pressure_Loss_Coefficient);
fout << "Pressure" << ',' << Low_Pressure_Cylinder_Steam_Extraction[0].Pressure << endl;
Low_Pressure_Cylinder_Steam_Extraction[0].Ideal_Enthalpy = Calculate_Enthalpy_ps(Low_Pressure_Cylinder_Steam_Extraction[0].Pressure, Low_Pressure_Cylinder.Inlet_Steam_Entropy);
fout << "Ideal_Enthalpy" << ',' << Low_Pressure_Cylinder_Steam_Extraction[0].Ideal_Enthalpy << endl;
Low_Pressure_Cylinder_Steam_Extraction[0].Actual_Enthalpy = Calculate_of_Exhaust_Steam_Actual_Enthalpy(Low_Pressure_Cylinder.Inlet_Steam_Enthalpy, Low_Pressure_Cylinder_Steam_Extraction[0].Ideal_Enthalpy, Low_Pressure_Cylinder_Efficiency);
fout << "Actual_Enthalpy" << ',' << Low_Pressure_Cylinder_Steam_Extraction[0].Actual_Enthalpy << endl;
Low_Pressure_Cylinder_Steam_Extraction[0].Dryness = Calculate_Dryness(Low_Pressure_Cylinder_Steam_Extraction[0].Pressure, Low_Pressure_Cylinder_Steam_Extraction[0].Actual_Enthalpy);
fout << "Dryness" << ',' << Low_Pressure_Cylinder_Steam_Extraction[0].Dryness << endl;
fout << "Low_Pressure_Cylinder_Steam_Extraction_No2" << endl;
Low_Pressure_Cylinder_Steam_Extraction[1].Temperature = Calculate_of_The_Temperature_of_Steam_Extraction(Low_Pressure_Heater_Feed_Water[1].Outlet_Feed_Water_Temperature, Low_Pressure_Feed_Water_Heater_Outlet_End_Difference);
fout << "Temperature" << ',' << Low_Pressure_Cylinder_Steam_Extraction[1].Temperature << endl;
Low_Pressure_Cylinder_Steam_Extraction[1].Pressure = Calculate_of_The_Pressure_of_Steam_Extraction(Calculate_Saturation_Pressure(Low_Pressure_Cylinder_Steam_Extraction[1].Temperature), Regeneration_Steam_Extraction_Pressure_Loss_Coefficient);
fout << "Pressure" << ',' << Low_Pressure_Cylinder_Steam_Extraction[1].Pressure << endl;
Low_Pressure_Cylinder_Steam_Extraction[1].Ideal_Enthalpy = Calculate_Enthalpy_ps(Low_Pressure_Cylinder_Steam_Extraction[1].Pressure, Low_Pressure_Cylinder.Inlet_Steam_Entropy);
fout << "Ideal_Enthalpy" << ',' << Low_Pressure_Cylinder_Steam_Extraction[1].Ideal_Enthalpy << endl;
Low_Pressure_Cylinder_Steam_Extraction[1].Actual_Enthalpy = Calculate_of_Exhaust_Steam_Actual_Enthalpy(Low_Pressure_Cylinder.Inlet_Steam_Enthalpy, Low_Pressure_Cylinder_Steam_Extraction[1].Ideal_Enthalpy, Low_Pressure_Cylinder_Efficiency);
fout << "Actual_Enthalpy" << ',' << Low_Pressure_Cylinder_Steam_Extraction[0].Actual_Enthalpy << endl;
Low_Pressure_Cylinder_Steam_Extraction[1].Dryness = Calculate_Dryness(Low_Pressure_Cylinder_Steam_Extraction[1].Pressure, Low_Pressure_Cylinder_Steam_Extraction[1].Actual_Enthalpy);
fout << "Dryness" << ',' << Low_Pressure_Cylinder_Steam_Extraction[1].Dryness << endl;
fout << "Low_Pressure_Cylinder_Steam_Extraction_No3" << endl;
Low_Pressure_Cylinder_Steam_Extraction[2].Temperature = Calculate_of_The_Temperature_of_Steam_Extraction(Low_Pressure_Heater_Feed_Water[2].Outlet_Feed_Water_Temperature, Low_Pressure_Feed_Water_Heater_Outlet_End_Difference);
fout << "Temperature" << ',' << Low_Pressure_Cylinder_Steam_Extraction[2].Temperature << endl;
Low_Pressure_Cylinder_Steam_Extraction[2].Pressure = Calculate_of_The_Pressure_of_Steam_Extraction(Calculate_Saturation_Pressure(Low_Pressure_Cylinder_Steam_Extraction[2].Temperature), Regeneration_Steam_Extraction_Pressure_Loss_Coefficient);
fout << "Pressure" << ',' << Low_Pressure_Cylinder_Steam_Extraction[2].Pressure << endl;
Low_Pressure_Cylinder_Steam_Extraction[2].Ideal_Enthalpy = Calculate_Enthalpy_ps(Low_Pressure_Cylinder_Steam_Extraction[2].Pressure, Low_Pressure_Cylinder.Inlet_Steam_Entropy);
fout << "Ideal_Enthalpy" << ',' << Low_Pressure_Cylinder_Steam_Extraction[2].Ideal_Enthalpy << endl;
Low_Pressure_Cylinder_Steam_Extraction[2].Actual_Enthalpy = Calculate_of_Exhaust_Steam_Actual_Enthalpy(Low_Pressure_Cylinder.Inlet_Steam_Enthalpy, Low_Pressure_Cylinder_Steam_Extraction[2].Ideal_Enthalpy, Low_Pressure_Cylinder_Efficiency);
fout << "Actual_Enthalpy" << ',' << Low_Pressure_Cylinder_Steam_Extraction[2].Actual_Enthalpy << endl;
Low_Pressure_Cylinder_Steam_Extraction[2].Dryness = Calculate_Dryness(Low_Pressure_Cylinder_Steam_Extraction[2].Pressure, Low_Pressure_Cylinder_Steam_Extraction[2].Actual_Enthalpy);
fout << "Dryness" << ',' << Low_Pressure_Cylinder_Steam_Extraction[2].Dryness << endl;
fout << "Low_Pressure_Cylinder_Steam_Extraction_No4" << endl;
Low_Pressure_Cylinder_Steam_Extraction[3].Temperature = Calculate_of_The_Temperature_of_Steam_Extraction(Low_Pressure_Heater_Feed_Water[3].Outlet_Feed_Water_Temperature, Low_Pressure_Feed_Water_Heater_Outlet_End_Difference);
fout << "Temperature" << ',' << Low_Pressure_Cylinder_Steam_Extraction[3].Temperature << endl;
Low_Pressure_Cylinder_Steam_Extraction[3].Pressure = Calculate_of_The_Pressure_of_Steam_Extraction(Calculate_Saturation_Pressure(Low_Pressure_Cylinder_Steam_Extraction[3].Temperature), Regeneration_Steam_Extraction_Pressure_Loss_Coefficient);
fout << "Pressure" << ',' << Low_Pressure_Cylinder_Steam_Extraction[3].Pressure << endl;
Low_Pressure_Cylinder_Steam_Extraction[3].Ideal_Enthalpy = Calculate_Enthalpy_ps(Low_Pressure_Cylinder_Steam_Extraction[3].Pressure, Low_Pressure_Cylinder.Inlet_Steam_Entropy);
fout << "Ideal_Enthalpy" << ',' << Low_Pressure_Cylinder_Steam_Extraction[3].Ideal_Enthalpy << endl;
Low_Pressure_Cylinder_Steam_Extraction[3].Actual_Enthalpy = Calculate_of_Exhaust_Steam_Actual_Enthalpy(Low_Pressure_Cylinder.Inlet_Steam_Enthalpy, Low_Pressure_Cylinder_Steam_Extraction[3].Ideal_Enthalpy, Low_Pressure_Cylinder_Efficiency);
fout << "Actual_Enthalpy" << ',' << Low_Pressure_Cylinder_Steam_Extraction[3].Actual_Enthalpy << endl;
Low_Pressure_Cylinder_Steam_Extraction[3].Dryness = Calculate_Dryness(Low_Pressure_Cylinder_Steam_Extraction[3].Pressure, Low_Pressure_Cylinder_Steam_Extraction[3].Actual_Enthalpy);
fout << "Dryness" << ',' << Low_Pressure_Cylinder_Steam_Extraction[3].Dryness << endl;
fout.close();
}
#endif