-
Notifications
You must be signed in to change notification settings - Fork 4
/
HtfCycle.hpp
130 lines (111 loc) · 6.4 KB
/
HtfCycle.hpp
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
/*-------------------------------------------------------------------------------*/
/* SOLAR - The solar thermal power plant simulator */
/* https://github.com/bbopt/solar */
/* */
/* Miguel Diago, Sebastien Le Digabel, Mathieu Lemyre-Garneau, Bastien Talgorn */
/* */
/* Polytechnique Montreal / GERAD */
/* sebastien.le-digabel@polymtl.ca */
/* */
/* This program is free software: you can redistribute it and/or modify it */
/* under the terms of the GNU Lesser General Public License as published by */
/* the Free Software Foundation, either version 3 of the License, or (at your */
/* option) any later version. */
/* */
/* This program is distributed in the hope that it will be useful, but WITHOUT */
/* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or */
/* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License */
/* for more details. */
/* */
/* You should have received a copy of the GNU Lesser General Public License */
/* along with this program. If not, see <http://www.gnu.org/licenses/>. */
/* */
/*-------------------------------------------------------------------------------*/
#ifndef __HTF_CYCLE_H__
#define __HTF_CYCLE_H__
#include "CentralReceiver.hpp"
#include "ThermalStorage.hpp"
#include "HeatExchanger.hpp"
#include "MoltenSalt.hpp"
#include "Constants.hpp"
#include "Powerblock.hpp"
#include "Global.hpp"
#include <cmath>
class HtfCycle {
private:
CentralReceiver _centralReceiver;
ThermalStorage _hotStorage;
ThermalStorage _coldStorage;
HeatExchanger _steamGenerator;
MoltenSalt _centralReceiverInlet;
MoltenSalt _centralReceiverOutlet;
MoltenSalt _steamGeneratorInlet;
MoltenSalt _steamGeneratorOutlet;
int _timeInterval; //minutes
// Data gathering
std::vector<double> _steamGenOutletMsRate;
std::vector<double> _steamGenOutletTemp;
double _minColdStorageTemp;
double _minHotStorageTemp;
double _minSteamGenOutletTemp;
std::vector<double> _storageHeat;
public:
HtfCycle ( double receiverTemp ,
double storageHeight ,
double storageDiameter ,
double insulationThickness ,
double exchangerExitTemp ,
Powerblock * powerblock ,
double apertureHeight ,
double apertureWidth ,
double receiverTubesDin ,
double receiverTubesThickness ,
int receiverNbTubes ,
int timeInterval );
HtfCycle ( double receiverTemp ,
double storageHeight ,
double storageDiameter ,
double insulationThickness ,
double exchangerExitTemp ,
Powerblock * powerblock ,
double apertureHeight ,
double apertureWidth ,
double receiverTubesDin ,
double receiverTubesThickness ,
int receiverNbTubes ,
int timeInterval ,
double exchangerTubesDin ,
double exchangerTubesDout ,
double exchangerTubesLength ,
double exchangerTubesSpacing ,
double baffleCut ,
int nbOfBaffles ,
int exchangerNbOfTubes ,
int exchangerNbOfPassesPerShell ,
int exchangerNbOfShells );
~HtfCycle ( void ) {}
double compute_CR_YieldPressure ( void ) const { return _centralReceiver.computeYieldPressure(); }
double compute_CR_PressureInTubes ( void ) const { return _centralReceiver.computePressureInTubes(); }
double compute_SG_YieldPressure ( void ) const { return _steamGenerator.computeYieldPressure(); }
double compute_SG_PressureInTubes ( double s ) const { return _steamGenerator.computePressureInTubes(s); }
int get_exchangerModel ( void ) const { return _steamGenerator.get_exchangerModel(); }
double computePressureInShells ( void ) const { return _steamGenerator.computePressureInShells(); }
const ThermalStorage & get_hotStorage ( void ) const { return _hotStorage; }
const MoltenSalt & get_centralReceiverOutlet ( void ) const { return _centralReceiverOutlet; }
const MoltenSalt & get_steamGeneratorInlet ( void ) const { return _steamGeneratorInlet; }
const MoltenSalt & get_steamGeneratorOutlet ( void ) const { return _steamGeneratorOutlet; }
const std::vector<double> & get_steamGenOutletMsRate ( void ) const { return _steamGenOutletMsRate; }
const std::vector<double> & get_steamGenOutletTemp ( void ) const { return _steamGenOutletTemp; }
const std::vector<double> & get_storageHeatV ( void ) const { return _storageHeat; }
double get_storageHeat ( int i ) const { return _storageHeat[i]; }
double get_minColdStorageTemp ( void ) const { return _minColdStorageTemp; }
double get_minHotStorageTemp ( void ) const { return _minHotStorageTemp; }
double get_minSteamGenTemp ( void ) const { return _minSteamGenOutletTemp; }
void initiateColdStorage ( void );
void setStorage ( double, double, double );
void fOperateCycle ( int timeInSeconds ,
double energyFromField ,
double requiredPowerOutput ,
bool low_fid );
};
#endif