1
|
/************************************************************/
|
2
|
// DESCRIPTION
|
3
|
//
|
4
|
//
|
5
|
// The brasilian fleat and the candu
|
6
|
//
|
7
|
//
|
8
|
// _______ ________________
|
9
|
// | | | |
|
10
|
// |Storage|==>|FabricationPlant|==>StorageCANDU
|
11
|
// | UOX | |________________|
|
12
|
// |_______|
|
13
|
//
|
14
|
//
|
15
|
//@author BaL
|
16
|
/***********************************************************/
|
17
|
#include "CLASSHeaders.hxx"
|
18
|
#include <sstream>
|
19
|
#include <iomanip>
|
20
|
#include <math.h>
|
21
|
#include <string>
|
22
|
#include "XS/XSM_MLP.hxx" //Load the include for Neural network cross section predictor
|
23
|
#include "Irradiation/IM_RK4.hxx" //Load the include for Runge Kutta 4 resolution
|
24
|
#include "Equivalence/EQM_PWR_MLP_MOX.hxx" //Load the include for Neural Network Equivalence Model (PWRMOX)
|
25
|
#include "Equivalence/EQM_CANDU2.hxx" //Load the include for Equivalence Model for CANDU
|
26
|
#include "XS/XSM_CLOSEST.hxx" //Load the include for CLOSEST cross section
|
27
|
using namespace std;
|
28
|
|
29
|
int main(int argc, char** argv)
|
30
|
{
|
31
|
//seconds in one year
|
32
|
cSecond year = 3600*24.*365.25;
|
33
|
/******LOG MANAGEMENT**********************************/
|
34
|
//Definition of the Log file : CLASS messages output
|
35
|
int Std_output_level = 0; // Only error are shown in terminal
|
36
|
int File_output_level = 2; // Error + Warning + Info are shown in the file CLASS_OUTPUT.log
|
37
|
CLASSLogger *Logger = new CLASSLogger("CLASS_OUTPUT.log",Std_output_level,File_output_level);
|
38
|
|
39
|
/******SCENARIO**********************************/
|
40
|
// The scenario start at year 1977
|
41
|
cSecond StartingTime = year*2015;
|
42
|
Scenario *gCLASS=new Scenario(StartingTime,Logger);
|
43
|
gCLASS->SetStockManagement(true); //If false all the IsotopicVector in stocks are mixed together.
|
44
|
gCLASS->SetTimeStep(year/26); //the scenario calculation is updated every 3 months
|
45
|
cSecond EndOfScenarioTime=2040*year; //Scenario ends in year 2040
|
46
|
gCLASS->SetOutputFileName("ExampleParc_CANDU_SYM.root"); //Set the name of the output file
|
47
|
|
48
|
|
49
|
|
50
|
|
51
|
/******DATA BASES**********************************/
|
52
|
//Geting CLASS to path
|
53
|
string CLASS_PATH = getenv("CLASS_PATH");
|
54
|
if (CLASS_PATH=="")
|
55
|
{
|
56
|
cout<<" Please setenv CLASS_PATH to your CLASS installation folder in your .bashs or .tcshrc"<<endl;
|
57
|
exit(0);
|
58
|
}
|
59
|
string PATH_TO_DATA = CLASS_PATH + "/DATA_BASES/";
|
60
|
|
61
|
/*===Decay data base===*/
|
62
|
//The decay data base is taken from the file Decay.idx
|
63
|
DecayDataBank* DecayDB = new DecayDataBank(gCLASS->GetLog(), PATH_TO_DATA + "DECAY/ALL/Decay.idx"); //you may have to open this file and do the proper changes according your path
|
64
|
gCLASS->SetDecayDataBase(DecayDB);//This decay data base will be used for all the decay calculations in this Scenario
|
65
|
|
66
|
/*===Reactor data base===*/
|
67
|
|
68
|
// Reprocessed fuel PWR MOX
|
69
|
// XSM_MLP* XSMOX = new XSM_MLP(gCLASS->GetLog(), PATH_TO_DATA + "PWR/MOX/XSModel/30Wg_FullMOX");//Defining the XS Predictor
|
70
|
XSM_CLOSEST* XSMOX = new XSM_CLOSEST(gCLASS->GetLog(), PATH_TO_DATA + "CANDU_Urep/CANDU_Urep.idx");//Defining the XS Predictor
|
71
|
IM_RK4 *IMRK4 = new IM_RK4(gCLASS->GetLog()); //Bateman's equation solver method (RungeKutta4)
|
72
|
// EQM_PWR_MLP_MOX* EQMMLPPWRMOX = new EQM_PWR_MLP_MOX(gCLASS->GetLog(),PATH_TO_DATA + "PWR/MOX/EQModel/MLP/EQM_MLP_PWR_MOX_3batch.xml");//Defining the EquivalenceModel
|
73
|
EQM_CANDU2* EQMMLPPWRMOX = new EQM_CANDU2(gCLASS->GetLog(),PATH_TO_DATA + "PWR/MOX/EQModel/MLP/EQM_MLP_PWR_MOX_3batch.xml");//Defining the EquivalenceModel
|
74
|
PhysicsModels* PHYMOD = new PhysicsModels(XSMOX, EQMMLPPWRMOX, IMRK4); //The PhysicsModels containing the 3 object previously defined
|
75
|
|
76
|
//Fixed fuel : PWR UOX
|
77
|
|
78
|
//The file GEMMES.dat correspond to a fuel evolution of a UOX PWR (see manual for details) I chose this one because enrichment is 4%
|
79
|
EvolutionData *GEMMES = new EvolutionData(gCLASS->GetLog(), PATH_TO_DATA + "PWR/UOX/FixedFuel/GEMMES.dat");
|
80
|
|
81
|
/******FACILITIES*********************************/
|
82
|
/*=== Stock===*/
|
83
|
//Adding the stock to the Scenario
|
84
|
//Storage for MOX
|
85
|
Storage *StockMOX = new Storage(gCLASS->GetLog()); // Definition of the stock
|
86
|
StockMOX->SetName("StockMOX"); // Its name
|
87
|
gCLASS->Add(StockMOX); //Adding the stock to the Scenario
|
88
|
|
89
|
//Storage for infinite DepU
|
90
|
Storage *Stock = new Storage(gCLASS->GetLog()); //Definition of the stock
|
91
|
Stock->SetName("Stock"); //Its name
|
92
|
gCLASS->Add(Stock); //Adding the stock to the Scenario
|
93
|
|
94
|
IsotopicVector InfiniteU;
|
95
|
InfiniteU.Add(92,238,0,3e31);
|
96
|
InfiniteU.Add(92,235,0,3e31);
|
97
|
InfiniteU.Add(92,234,0,3e31);
|
98
|
//nfiniteU.Add(92,233,0,3e31);
|
99
|
//InfiniteU.Add(92,232,0,3e31);
|
100
|
//InfiniteU.Add(92,231,0,3e31);
|
101
|
//InfiniteU.Add(92,230,0,3e31);
|
102
|
InfiniteU.Add(92,236,0,3e31);
|
103
|
//InfiniteU.Add(92,237,0,3e31);
|
104
|
//InfiniteU.Add(92,240,0,3e31);
|
105
|
|
106
|
Stock->AddToStock(InfiniteU);
|
107
|
|
108
|
/*===Pool===*/
|
109
|
|
110
|
//Pool for UOX
|
111
|
/* Pool *Cooling_UOX1 = new Pool(gCLASS->GetLog(),Stock, 3*year); //After 3 years of cooling, the pool sends its content to "StockUOX"
|
112
|
Cooling_UOX1->SetName("Pool_UOX1");
|
113
|
gCLASS->Add(Cooling_UOX1);
|
114
|
|
115
|
//Pool for UOX
|
116
|
Pool *Cooling_UOX2 = new Pool(gCLASS->GetLog(),Stock, 3*year); //After 3 years of cooling, the pool sends its content to "StockUOX"
|
117
|
Cooling_UOX2->SetName("Pool_UOX2");
|
118
|
gCLASS->Add(Cooling_UOX2);
|
119
|
|
120
|
//Pool for UOX
|
121
|
Pool *Cooling_UOX3 = new Pool(gCLASS->GetLog(),Stock, 3*year); //After 3 years of cooling, the pool sends its content to "StockUOX"
|
122
|
Cooling_UOX3->SetName("Pool_UOX3");
|
123
|
gCLASS->Add(Cooling_UOX3);*/
|
124
|
|
125
|
//Pool for MOX
|
126
|
Pool *Cooling_MOX = new Pool(gCLASS->GetLog(),StockMOX, 5*year); //After 5 years of cooling, the pool sends its content to "StockMOX"
|
127
|
Cooling_MOX->SetName("Pool_MOX");
|
128
|
gCLASS->Add(Cooling_MOX);
|
129
|
|
130
|
/*===A FabricationPlant===*/
|
131
|
FabricationPlant *FP_MOX = new FabricationPlant(gCLASS->GetLog(), 1.0*year); //Declare a FabricationPlant. After the build of the fuel, it decays during 3years before to be loaded in Reactor
|
132
|
FP_MOX->SetFiFo(false); //The latest isotopicVector to enter in "Stock" will be used to build the fuel (Opposite of First In First Out)
|
133
|
FP_MOX->SetName("Fab_MOX");
|
134
|
FP_MOX->AddFissileStorage(Stock); //Tell the FP to look in StockUOX for fissionable material
|
135
|
//FP_MOX->AddFertileStorage(StockUOX);//Tell the FP to look in Stock2 for fertile material
|
136
|
//If fertile stock is not defined (like here), CLASS get fertile from nature (OUTCOMING vector)
|
137
|
//FP_MOX->SetReUsableStorage(wastestock);//By default the fabricationplant get the list of nuclei defined in the EquivalenceModel (here EQM_MLP_MOX) from stock and send the others nuclei in WASTE. If user want these nuclei to go in another stock he can use the SetReUsableStorage function
|
138
|
gCLASS->AddFabricationPlant(FP_MOX);
|
139
|
|
140
|
|
141
|
|
142
|
|
143
|
/*===A Reactor : PWR_UOX===*/
|
144
|
|
145
|
cSecond Embalse_Time = year*2020;
|
146
|
cSecond LifeTime;
|
147
|
|
148
|
/* double HMMass2 = 103;//heavy metal mass (in tons)
|
149
|
double Power_CP02 = 3771e6;//Thermal power (in W)
|
150
|
double BurnUp2 = 50; //GWd/tHM I calculated it so that the fuel lasts about 13*3 months in the core. 35.5 ou 50
|
151
|
|
152
|
cSecond StartingTime2 = 2016*year;
|
153
|
cSecond LifeTime2 = 40*year;
|
154
|
|
155
|
Reactor* ANGRA2 = new Reactor(gCLASS->GetLog(), //Log
|
156
|
GEMMES, // Data base
|
157
|
Cooling_UOX1, // Connected Backend facility (here the Storage "Stock" previously declared)
|
158
|
StartingTime2, // Starting time
|
159
|
LifeTime2, // time of reactor life time
|
160
|
Power_CP02, // Power
|
161
|
HMMass2,// HM mass
|
162
|
BurnUp2, // BurnUp
|
163
|
0.816); // Load Factor
|
164
|
|
165
|
|
166
|
ANGRA2->SetName("ANGRA2");// name of the reactor (as it will show up in the CLASSGui)
|
167
|
gCLASS->AddReactor(ANGRA2);//Add this reactor to the scenario
|
168
|
*/
|
169
|
|
170
|
/*===A Reactor : PWR_UOX===*/
|
171
|
/* double HMMass1 = 49.5;//heavy metal mass (in tons)
|
172
|
double Power_CP01 = 1882e6;//Thermal power (in W)
|
173
|
double BurnUp1 = 55; //GWd/tHM I calculated it so that the fuel lasts about 13*3 months in the core. 33.4 ou 55
|
174
|
|
175
|
cSecond StartingTime1 = 2016*year;
|
176
|
cSecond LifeTime1 = 40*year;
|
177
|
|
178
|
Reactor* ANGRA1 = new Reactor(gCLASS->GetLog(), //Log
|
179
|
GEMMES, // Data base
|
180
|
Cooling_UOX2, // Connected Backend facility (here the Storage "Stock" previously declared)
|
181
|
StartingTime1, // Starting time
|
182
|
LifeTime1, // time of reactor life time
|
183
|
Power_CP01, // Power
|
184
|
HMMass1,// HM mass
|
185
|
BurnUp1, // BurnUp
|
186
|
0.834); // Load Factor
|
187
|
|
188
|
|
189
|
ANGRA1->SetName("ANGRA1");// name of the reactor (as it will show up in the CLASSGui)
|
190
|
gCLASS->AddReactor(ANGRA1);//Add this reactor to the scenario
|
191
|
|
192
|
*/
|
193
|
|
194
|
/*===A Reactor : PWR_UOX===*/
|
195
|
|
196
|
/* double HMMass3 = 103;//heavy metal mass (in tons)
|
197
|
double Power_CP03 = 3771e6;//Thermal power (in W)
|
198
|
double BurnUp3 = 50; //GWd/tHM I calculated it so that the fuel lasts about 13*3 months in the core. 35.5 ou 50
|
199
|
|
200
|
cSecond StartingTime3 = 2016*year;
|
201
|
cSecond LifeTime3 = 40*year;
|
202
|
|
203
|
Reactor* ANGRA3 = new Reactor(gCLASS->GetLog(), //Log
|
204
|
GEMMES, // Data base
|
205
|
Cooling_UOX3, // Connected Backend facility (here the Storage "Stock" previously declared)
|
206
|
StartingTime3, // Starting time
|
207
|
LifeTime3, // time of reactor life time
|
208
|
Power_CP03, // Power
|
209
|
HMMass3,// HM mass
|
210
|
BurnUp3, // BurnUp
|
211
|
0.816); // Load Factor
|
212
|
|
213
|
|
214
|
ANGRA3->SetName("ANGRA3");// name of the reactor (as it will show up in the CLASSGui)
|
215
|
gCLASS->AddReactor(ANGRA3);//Add this reactor to the scenario
|
216
|
*/
|
217
|
|
218
|
//the CANDU
|
219
|
StartingTime = Embalse_Time;
|
220
|
LifeTime = EndOfScenarioTime - StartingTime;
|
221
|
double HMMass_CANDU = 68.62;//heavy metal mass (in tons)
|
222
|
double Power_CANDU = 2041e6;//Thermal power (in W)2.551GW
|
223
|
double BurnUp_CANDU = 15.9; //33 GWd/tHM
|
224
|
|
225
|
|
226
|
Reactor* Embalse = new Reactor(gCLASS->GetLog(),// Log
|
227
|
PHYMOD, // The models used to build the fuel & to calculate its evolution
|
228
|
FP_MOX, // The FabricationPlant
|
229
|
Cooling_MOX, // Connected Backend
|
230
|
StartingTime, // Starting time
|
231
|
LifeTime, // time of reactor l
|
232
|
Power_CANDU, // Power
|
233
|
HMMass_CANDU, // HM mass
|
234
|
BurnUp_CANDU, // BurnUp
|
235
|
1.0); // Load Factor
|
236
|
|
237
|
Embalse->SetName("Embalse");// name of the reactor (as it will l
|
238
|
gCLASS->AddReactor(Embalse);//Add this reactor to the scenario
|
239
|
|
240
|
|
241
|
|
242
|
gCLASS->Evolution((double)EndOfScenarioTime);//Perform the calculation from year 1977(defined in Scenario declaration) to year 2018
|
243
|
|
244
|
delete gCLASS;
|
245
|
|
246
|
}
|
247
|
|
248
|
|
249
|
//==========================================================================================
|
250
|
// Compilation
|
251
|
//==========================================================================================
|
252
|
/*
|
253
|
|
254
|
\rm CLASS* ; g++ -o CLASS_Exec ExampleParc_LIN_CANDU_SYM.cxx -I $CLASS_include -L $CLASS_lib -lCLASSpkg `root-config --cflags` `root-config --libs` -fopenmp -lgomp -Wunused-result
|
255
|
|
256
|
|
257
|
*/
|