1
|
/*************************************************/
|
2
|
// DESCRIPTION
|
3
|
// Simple scenario :
|
4
|
// This park is constituted by a simple PWR UOX
|
5
|
// Reactor and a Storage.
|
6
|
// _______ _______ _______
|
7
|
// | | | | | |
|
8
|
// |Reactor| =>| Pool |=>|Storage|
|
9
|
// |_______| |_______| |_______|
|
10
|
//
|
11
|
// The spent fuel goes to a Storage
|
12
|
//
|
13
|
//@author BaL
|
14
|
/*************************************************/
|
15
|
#include "CLASSHeaders.hxx"
|
16
|
#include <sstream>
|
17
|
#include <iomanip>
|
18
|
#include <math.h>
|
19
|
#include <string>
|
20
|
|
21
|
using namespace std;
|
22
|
|
23
|
int main(int argc, char** argv)
|
24
|
{
|
25
|
|
26
|
//seconds in one year
|
27
|
cSecond year = 3600*24.*365.25;
|
28
|
|
29
|
|
30
|
/******LOG MANAGEMENT**********************************/
|
31
|
//Definition of the Log file : CLASS messages output
|
32
|
int Std_output_level = 0; //Only error are shown in terminal
|
33
|
int File_output_level = 2; // Error + Warning + Info are shown in the file CLASS_OUTPUT.log
|
34
|
CLASSLogger *Logger = new CLASSLogger("CLASS_OUTPUT.log",Std_output_level,File_output_level);
|
35
|
|
36
|
|
37
|
/******SCENARIO**********************************/
|
38
|
// The scenario start at year 2015
|
39
|
Scenario *gCLASS=new Scenario(2015*year,Logger);
|
40
|
gCLASS->SetStockManagement(true); //If false all the IsotopicVector in stocks are mixed together.
|
41
|
gCLASS->SetTimeStep(year*15/512); //1024 timesteps (max number of columns in odc file)
|
42
|
gCLASS->SetOutputFileName("SimpleReactorMT.root"); //Set the name of the output file
|
43
|
|
44
|
|
45
|
/******DATA BASES**********************************/
|
46
|
//Geting CLASS to path
|
47
|
string CLASS_PATH = getenv("CLASS_PATH");
|
48
|
if (CLASS_PATH=="")
|
49
|
{
|
50
|
cout<<" Please setenv CLASS_PATH to your CLASS installation folder in your .bashs or .tcshrc"<<endl;
|
51
|
exit(0);
|
52
|
}
|
53
|
string PATH_TO_DATA = CLASS_PATH + "/DATA_BASES/";
|
54
|
|
55
|
|
56
|
/*===Decay data base===*/
|
57
|
//The decay data base is taken from the file Decay.idx
|
58
|
DecayDataBank* DecayDB = new DecayDataBank(gCLASS->GetLog(), PATH_TO_DATA + "DECAY/ALL/Decay.idx");
|
59
|
gCLASS->SetDecayDataBase(DecayDB);//This decay data base will be used for all the decay calculations in this Scenario
|
60
|
|
61
|
|
62
|
/*===Reactor data base===*/
|
63
|
//The file STD900.dat correspond to a fuel evolution of a UOX PWR (see manual for details)
|
64
|
EvolutionData *STD900 = new EvolutionData(gCLASS->GetLog(), PATH_TO_DATA + "PWR/UOX/FixedFuel/STD900.dat");
|
65
|
|
66
|
|
67
|
/******FACILITIES*********************************/
|
68
|
/*===A Stock===*/
|
69
|
Storage *Stock = new Storage(gCLASS->GetLog()); //Definition of the stock
|
70
|
Stock->SetName("Stock_UOX"); //Its name
|
71
|
//Stock->AddToStock(ZAI(92,238,0) * 10);// Just to illustrate, here we add ten nuclei of 238U in this stock
|
72
|
gCLASS->Add(Stock); //Adding the stock to the Scenario
|
73
|
|
74
|
|
75
|
/*===Pool===*/
|
76
|
|
77
|
//Pool for UOX
|
78
|
Pool *Cooling_UOX = new Pool(gCLASS->GetLog(),Stock, 3*year); //After 5 years of cooling, the pool sends its content to "StockUOX"
|
79
|
Cooling_UOX->SetName("Pool_UOX");
|
80
|
gCLASS->Add(Cooling_UOX);
|
81
|
|
82
|
/*===A Reactor : PWR_UOX===*/
|
83
|
double HMMass = 72.5;//heavy metal mass (in tons)
|
84
|
double Power_CP0 = 2660e6;//Thermal power (in W)
|
85
|
double BurnUp = 33; //33 GWd/tHM
|
86
|
|
87
|
cSecond StartingTime = 2015*year;
|
88
|
cSecond LifeTime = 30*year;
|
89
|
|
90
|
Reactor* PWR_UOX = new Reactor(gCLASS->GetLog(), //Log
|
91
|
STD900, // Data base
|
92
|
Cooling_UOX, // Connected Backend facility (here the Storage "Stock" previously declared)
|
93
|
StartingTime, // Starting time
|
94
|
LifeTime, // time of reactor life time
|
95
|
Power_CP0, // Power
|
96
|
HMMass,// HM mass
|
97
|
BurnUp, // BurnUp
|
98
|
0.8); // Load Factor
|
99
|
|
100
|
|
101
|
PWR_UOX->SetName("PWR_Reactor");// name of the reactor (as it will show up in the CLASSGui)
|
102
|
gCLASS->AddReactor(PWR_UOX);//Add this reactor to the scenario
|
103
|
|
104
|
gCLASS->Evolution((double)year*2045);//Perform the calculation from year 2015(defined in Scenario declaration) to year 2025
|
105
|
|
106
|
delete gCLASS;
|
107
|
|
108
|
}
|
109
|
|
110
|
|
111
|
//==========================================================================================
|
112
|
// Compilation
|
113
|
//==========================================================================================
|
114
|
/*
|
115
|
|
116
|
\rm CLASS* ; g++ -o CLASS_Exec SimpleReactorMT.cxx -I $CLASS_include -L $CLASS_lib -lCLASSpkg `root-config --cflags` `root-config --libs` -fopenmp -lgomp -Wunused-result
|
117
|
|
118
|
|
119
|
*/
|