1
|
/************************************************************/
|
2
|
// DESCRIPTION
|
3
|
//
|
4
|
//
|
5
|
// Simple Scenario with one PWR UOX and one PWR MOX
|
6
|
//
|
7
|
//
|
8
|
// _______ ____ _______ ___________
|
9
|
// | | | | | | | |
|
10
|
// |Reactor| =>|Pool|=>|Storage|=>|Fabrication|
|
11
|
// | UOx | |UOX | | UOX | | Plant |
|
12
|
// |_______| |____| |_______| |___________|
|
13
|
// ||
|
14
|
// \/
|
15
|
// _______ ____ _______
|
16
|
// | | | | | |
|
17
|
// |Storage|<= |Pool|<==|Reactor|
|
18
|
// | MOX | |MOX | | MOX |
|
19
|
// |_______| |____| |_______|
|
20
|
//
|
21
|
//
|
22
|
//@author FrA
|
23
|
/***********************************************************/
|
24
|
#include "CLASSHeaders.hxx"
|
25
|
#include <sstream>
|
26
|
#include <iomanip>
|
27
|
#include <math.h>
|
28
|
#include <string>
|
29
|
#include "XS/XSM_MLP.hxx" //Load the include for Neural network cross section predictor
|
30
|
#include "Irradiation/IM_RK4.hxx" //Load the include for Runge Kutta 4 resolution
|
31
|
#include "Equivalence/EQM_PWR_MLP_MOX.hxx" //Load the include for Neural Network Equivalence Model (PWRMOX)
|
32
|
using namespace std;
|
33
|
|
34
|
int main(int argc, char** argv)
|
35
|
{
|
36
|
//seconds in one year
|
37
|
cSecond year = 3600*24.*365.25;
|
38
|
|
39
|
|
40
|
/******LOG MANAGEMENT**********************************/
|
41
|
|
42
|
//Definition of the Log file : CLASS messages output
|
43
|
int Std_output_level = 0; // Only error are shown in terminal
|
44
|
int File_output_level = 2; // Error + Warning + Info are shown in the file CLASS_OUTPUT.log
|
45
|
CLASSLogger *Logger = new CLASSLogger("CLASS_OUTPUT.log",Std_output_level,File_output_level);
|
46
|
|
47
|
|
48
|
/******SCENARIO****************************************/
|
49
|
|
50
|
// The scenario start at year 2015
|
51
|
Scenario *gCLASS=new Scenario(2015*year,Logger);
|
52
|
gCLASS->SetStockManagement(true); //If false all the IsotopicVector in stocks are mixed together.
|
53
|
gCLASS->SetTimeStep(year/4.); //the scenario calculation is updated every 3 months
|
54
|
cSecond EndOfScenarioTime=2060*year; //Scenario ends in year 2060
|
55
|
gCLASS->SetOutputFileName("Scenario6.root");//Set the name of the output file
|
56
|
|
57
|
|
58
|
/******DATA BASES**************************************/
|
59
|
|
60
|
//Geting CLASS to path
|
61
|
string CLASS_PATH = getenv("CLASS_PATH");
|
62
|
if (CLASS_PATH=="")
|
63
|
{
|
64
|
cout<<" Please setenv CLASS_PATH to your CLASS installation folder in your .bashs or .tcshrc"<<endl;
|
65
|
exit(0);
|
66
|
}
|
67
|
string PATH_TO_DATA = CLASS_PATH + "/DATA_BASES/";
|
68
|
|
69
|
/*===Decay data base===*/
|
70
|
|
71
|
//The decay data base is taken from the file Decay.idx
|
72
|
DecayDataBank* DecayDB = new DecayDataBank(gCLASS->GetLog(), PATH_TO_DATA + "DECAY/ALL/Decay.idx");
|
73
|
//you may have to open this file and do the proper changes according your path
|
74
|
gCLASS->SetDecayDataBase(DecayDB);
|
75
|
//This decay data base will be used for all the decay calculations in this Scenario
|
76
|
|
77
|
/*===Reactor data base===*/
|
78
|
|
79
|
// Reprocessed fuel PWR MOX
|
80
|
XSM_MLP* XSMOX = new XSM_MLP(gCLASS->GetLog(), PATH_TO_DATA + "PWR/MOX/XSModel/30Wg_FullMOX");
|
81
|
//Defining the XS Predictor
|
82
|
IM_RK4 *IMRK4 = new IM_RK4(gCLASS->GetLog()); //Bateman's equation solver method (RungeKutta4)
|
83
|
|
84
|
//NO PATH FOR THE RK SOLVER???
|
85
|
|
86
|
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
|
87
|
PhysicsModels* PHYMOD = new PhysicsModels(XSMOX, EQMMLPPWRMOX, IMRK4);//The PhysicsModels containing the 3 object previously defined
|
88
|
|
89
|
//Fixed fuel : PWR UOX
|
90
|
EvolutionData *CYCLADE =new EvolutionData(gCLASS->GetLog(), PATH_TO_DATA + "PWR/UOX/FixedFuel/CYCLADES.dat");
|
91
|
EvolutionData *GARANCE = new EvolutionData(gCLASS->GetLog(), PATH_TO_DATA + "PWR/UOX/FixedFuel/GARANCE.dat");
|
92
|
EvolutionData *STD900 = new EvolutionData(gCLASS->GetLog(), PATH_TO_DATA + "PWR/UOX/FixedFuel/STD900.dat");
|
93
|
|
94
|
|
95
|
/******FACILITIES*************************************/
|
96
|
|
97
|
/*=== Stock===*/
|
98
|
|
99
|
//Storage for infinite U and Pu
|
100
|
Storage *Stock = new Storage(gCLASS->GetLog()); //Definition of the stock
|
101
|
Stock->SetName("Stock"); //Its name
|
102
|
Stock->AddToStock(ZAI(92,238,0) * 3e31);
|
103
|
Stock->AddToStock(ZAI(92,235,0) * 0.04375* 3e31);
|
104
|
/* Stock->AddToStock(ZAI(94,238,0) * 10e28);
|
105
|
Stock->AddToStock(ZAI(94,239,0) * 10e28);
|
106
|
Stock->AddToStock(ZAI(94,240,0) * 10e28);
|
107
|
Stock->AddToStock(ZAI(94,241,0) * 10e28);
|
108
|
Stock->AddToStock(ZAI(94,242,0) * 10e28);*/
|
109
|
|
110
|
gCLASS->Add(Stock); //Adding the stock to the Scenario
|
111
|
|
112
|
//Storage for MOX
|
113
|
Storage *StockMOX = new Storage(gCLASS->GetLog());//Definition of the stock
|
114
|
StockMOX->SetName("StockMOX"); //Its name
|
115
|
gCLASS->Add(StockMOX); //Adding the stock to the Scenario
|
116
|
|
117
|
//Storage for UOX
|
118
|
Storage *StockUOX = new Storage(gCLASS->GetLog());//Definition of the stock
|
119
|
StockUOX->SetName("StockUOX"); //Its name
|
120
|
gCLASS->Add(StockUOX); //Adding the stock to the Scenario
|
121
|
|
122
|
/*===Pool===*/
|
123
|
|
124
|
//Pool for UOX
|
125
|
Pool *Cooling_UOX = new Pool(gCLASS->GetLog(),StockUOX, 5*year); //After 5 years of cooling, the pool sends its content to "StockUOX"
|
126
|
Cooling_UOX->SetName("Pool_UOX");
|
127
|
gCLASS->Add(Cooling_UOX);
|
128
|
|
129
|
//Pool for MOX
|
130
|
Pool *Cooling_MOX = new Pool(gCLASS->GetLog(),StockMOX, 5*year); //After 5 years of cooling, the pool sends its content to "StockMOX"
|
131
|
Cooling_MOX->SetName("Pool_MOX");
|
132
|
gCLASS->Add(Cooling_MOX);
|
133
|
|
134
|
/*===A FabricationPlant===*/
|
135
|
FabricationPlant *FP_MOX = new FabricationPlant(gCLASS->GetLog(), 3*year); //Declare a FabricationPlant. After the build of the fuel, it decays during 3years before to be loaded in Reactor
|
136
|
FP_MOX->SetFiFo(false); //The latest isotopicVector to enter in "Stock" will be used to build the fuel (Opposite of First In First Out)
|
137
|
FP_MOX->SetName("Fab_MOX");
|
138
|
FP_MOX->AddFissileStorage(StockUOX); //Tell the FP to look in Stock for fissionable material
|
139
|
FP_MOX->AddFertileStorage(Stock);//Tell the FP to look in Stock for fertile material
|
140
|
//If fertile stock is not defined (like here), CLASS get fertile from nature (OUTCOMING vector)
|
141
|
//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
|
142
|
gCLASS->AddFabricationPlant(FP_MOX);
|
143
|
|
144
|
|
145
|
/*=== Reactor===*/
|
146
|
double Power_CP0 = 2.66e10; //Thermal power (in W)
|
147
|
//Combustibles type : CYCLADE
|
148
|
double BurnUp_Cyclade = 47; // GWd/tHM
|
149
|
double HMMass_Cyclade = 72.3; //heavy metal mass (in tons)
|
150
|
|
151
|
//REACTOR PWR UOX
|
152
|
cSecond StartingTime = 2016*year;
|
153
|
cSecond LifeTime = (EndOfScenarioTime - StartingTime);
|
154
|
Reactor* PWR_UOX = new Reactor(gCLASS->GetLog(),// Log
|
155
|
CYCLADE, // The DataBase used
|
156
|
Cooling_UOX, // Connected Backend facility : The reactor discharge its fuel into the Pool "Cooling_UOX"
|
157
|
StartingTime,// Starting time
|
158
|
LifeTime, // time of reactor life time
|
159
|
Power_CP0, // Power
|
160
|
HMMass_Cyclade,// HM mass
|
161
|
BurnUp_Cyclade,// BurnUp
|
162
|
0.8); // Load Factor
|
163
|
|
164
|
PWR_UOX->SetName("PWR_UOX");// name of the reactor (as it will show up in the CLASSGui)
|
165
|
gCLASS->AddReactor(PWR_UOX);//Add this reactor to the scenario
|
166
|
|
167
|
//POWER reactor MOX
|
168
|
double Power_CPY = 2.785e9; //Thermal power (in W)
|
169
|
|
170
|
//Combustibles type : STANDARD 900
|
171
|
double BurnUpMOX = 35; //GWd/tHM
|
172
|
//double BurnUp_STD900 = 33; // GWd/tHM
|
173
|
double HMMass_STD900 = 72.3; //heavy metal mass (in tons)
|
174
|
|
175
|
|
176
|
//the PWR MOX
|
177
|
StartingTime = 2022*year;
|
178
|
LifeTime = EndOfScenarioTime - StartingTime;
|
179
|
Reactor* PWR_MOX = new Reactor(gCLASS->GetLog(),// Log
|
180
|
PHYMOD, // The models used to build the fuel & to calculate its evolution
|
181
|
FP_MOX, // The FabricationPlant
|
182
|
Cooling_MOX, // Connected Backend
|
183
|
StartingTime, // Starting time
|
184
|
LifeTime, // time of reactor l
|
185
|
Power_CPY, // Power
|
186
|
HMMass_STD900, // HM mass
|
187
|
BurnUpMOX, // BurnUp
|
188
|
0.8); // Load Factor
|
189
|
|
190
|
PWR_MOX->SetName("PWR_MOX");// name of the reactor (as it will appear in the CLASSGui)
|
191
|
gCLASS->AddReactor(PWR_MOX);//Add this reactor to the scenario
|
192
|
|
193
|
|
194
|
gCLASS->Evolution((double)EndOfScenarioTime);//Perform the calculation from year 2015(defined in Scenario declaration) to year 2060
|
195
|
|
196
|
delete gCLASS;
|
197
|
|
198
|
}
|
199
|
|
200
|
|
201
|
//==========================================================================================
|
202
|
// Compilation
|
203
|
//==========================================================================================
|
204
|
/*
|
205
|
|
206
|
\rm CLASS* ; g++ -o CLASS_Exec Scenario6.cxx -I $CLASS_include -L $CLASS_lib -lCLASSpkg `root-config --cflags` `root-config --libs` -fopenmp -lgomp -Wunused-result
|
207
|
|
208
|
|
209
|
*/
|