From 1f7b14bc2631c97ad6084bdec5e9365daae4d8a2 Mon Sep 17 00:00:00 2001 From: Baptiste Mouginot <mouginot.baptiste@gmail.com> Date: Tue, 10 Feb 2015 15:39:09 +0000 Subject: [PATCH] remove example git-svn-id: svn+ssh://svn.in2p3.fr/class@593 0e7d625b-0364-4367-a6be-d5be4a48d228 --- example/CloseCycle.cxx | 132 ----------------------------- example/FBR_Example.cxx | 134 ----------------------------- example/Separation.cxx | 168 ------------------------------------- example/SimpleReactor.cxx | 95 --------------------- example/SimpleReactor2.cxx | 99 ---------------------- 5 files changed, 628 deletions(-) delete mode 100644 example/CloseCycle.cxx delete mode 100644 example/FBR_Example.cxx delete mode 100644 example/Separation.cxx delete mode 100644 example/SimpleReactor.cxx delete mode 100644 example/SimpleReactor2.cxx diff --git a/example/CloseCycle.cxx b/example/CloseCycle.cxx deleted file mode 100644 index bd22a380f..000000000 --- a/example/CloseCycle.cxx +++ /dev/null @@ -1,132 +0,0 @@ -/************************************************************/ -// DESCRIPTION -// Close Fuel cycle scenario : -// This park is constituted by a PWR MOX which -// multi-recycle its own fuel. -// The Storage is initially filled with Pu in order -// to this scenario to be doable -// _______________ _______ ____ _______ -// | | | | | | | | -// ||===>|FabricationPlant| =>|Reactor| =>|Pool|=>|Storage|===|| -// || |________________| |_______| |____| |_______| || -// ||=========================================================|| -// -// The spent fuel goes to the pool for 5 y -// then it goes to the Storage -//The scenario is run for 40 years -// -//@author BaL -/***********************************************************/ -#include "CLASSHeaders.hxx" -#include <sstream> -#include <iomanip> -#include <math.h> -#include <string> -#include "XS/XSM_MLP.hxx" //Load the include for Neural network cross section predictor -#include "Irradiation/IM_RK4.hxx" //Load the include for Runge Kutta 4 resolution -#include "Equivalence/EQM_MLP_PWR_MOX.hxx" //Load the include for Neural Network Equivalence Model (PWRMOX) -using namespace std; - -int main(int argc, char** argv) -{ - //seconds in one year - cSecond year = 3600*24.*365.25; - /******LOG MANAGEMENT**********************************/ - //Definition of the Log file : CLASS messages output - int Std_output_level=0; // Only error are shown in terminal - int File_output_level=2; // Error + Warning + Info are shown in the file CLASS_OUTPUT.log - CLASSLogger *Logger = new CLASSLogger("CLASS_OUTPUT.log",Std_output_level,File_output_level); - - /******SCENARIO**********************************/ - // The scenario start at year 1977 - Scenario *gCLASS=new Scenario(1977*year,Logger); - gCLASS->SetStockManagement(true);//If false all the IsotopicVector in stocks are mixed together. - gCLASS->SetTimeStep(year/4.); //the scenario calculation is updated every 3 months - gCLASS−>SetOutputFileName("CloseCycle.root"); //Set the name of the output file - - /******DATA BASES**********************************/ - /*===Decay data base===*/ - //The decay data base is taken from the file Decay.idx - DecayDataBank* DecayDB = new DecayDataBank(gCLASS->GetLog(), "../DATA_BASES/DECAY/ALL/Decay.idx"); - gCLASS->SetDecayDataBase(DecayDB);//This decay data base will be used for all the decay calculations in this Scenario - - /*===Reactor data base===*/ - - XSM_MLP* XSMOX = new XSM_MLP(gCLASS->GetLog(), "../DATA_BASES/PWR/MOX/XSModel/30Wg_FullMOX");//Defining the XS Predictor - IM_RK4 *IMRK4 = new IM_RK4(gCLASS->GetLog()); //Bateman's equation solver method (RungeKutta4) - EQM_MLP_MOX* EQMLINPWRMOX = new EQM_MLP_MOX(gCLASS->GetLog(),"../DATA_BASES/PWR/MOX/EQModel/EQM_MLP_PWR_MOX_3batch.xml");//Defining the EquivalenceModel - - PhysicsModels* PHYMOD = new PhysicsModels(XSMOX, EQMLINPWRMOX, IMRK4); //The PhysicsModels containing the 3 object previously defined - - - /******FACILITIES*********************************/ - /*===A Stock===*/ - Storage *Stock = new Storage(gCLASS->GetLog()); // Definition of the stock - Stock->SetName("Stock"); // Its name - //Fill the stock with an initial amount of Plutonium - // In order to allow the PWR_MOX to work - IsotopicVector InitialIV; - InitialIV.Add(94,238,0,4e27 ); - InitialIV.Add(94,239,0,6.4e28); - InitialIV.Add(94,240,0,1.6e28); - InitialIV.Add(94,241,0,9.0e27); - InitialIV.Add(94,242,0,6e27 ); - InitialIV.Add(95,241,0,1e27 ); - gCLASS->Add(Stock); //Adding the stock to the Scenario - Stock->AddToStock(InitialIV); - - /*===A Pool===*/ - Pool *Cooling_MOX = new Pool(gCLASS->GetLog(),Stock, 5*year); //After 5 years of cooling, the pool sends its content to "Stock" - Cooling_MOX->SetName("Pool_MOX"); - gCLASS->Add(Cooling_MOX); - - /*===A FabricationPlant===*/ - 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 - FP_MOX->SetFiFo(false); //The latest isotopicVector to enter in "Stock" will be used to build the fuel (Opposite of First In First Out) - FP_MOX->SetName("Fab_MOX"); - FP_MOX->AddFissileStorage(Stock); //Tell the FP to look in Stock for fissionable material - //FP_MOX->AddFertileStorage(Stock2);//Tell the FP to look in Stock2 for fertile material - //If fertile stock is not defined (like here), CLASS get fertile from nature (OUTCOMING vector) - //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 - gCLASS->AddFabricationPlant(FP_MOX); - - - /*===A Reactor : PWR_UOX===*/ - double HMMass = 72.5; //heavy metal mass (in tons) - double Power_CP0 = 2660e6; //Thermal power (in W) - double BurnUp = 35; //35 GWd/tHM - - cSecond StartingTime = 1985*year; - cSecond LifeTime = 40*year; - - Reactor* PWR_MOX = new Reactor(gCLASS->GetLog(),// Log - PHYMOD, // The models used to build the fuel & to calculate its evolution - FP_MOX, // The FabricationPlant - Cooling_MOX, // Connected Backend facility : The reactor discharge its fuel into the Pool "Cooling_UOX" - StartingTime, // Starting time - LifeTime, // time of reactor life time - Power_CP0, // Power - HMMass, // HM mass - BurnUp, // BurnUp - 0.8); // Load Factor - - - PWR_MOX->SetName("a_PWR_MOX");// name of the reactor (as it will show up in the CLASSGui) - gCLASS->AddReactor(PWR_MOX);//Add this reactor to the scenario - - gCLASS->Evolution((double)year*2018);//Perform the calculation from year 1977(defined in Scenario declaration) to year 2018 - - delete gCLASS; - -} - - -//========================================================================================== -// Compilation -//========================================================================================== -/* - - \rm CLASS* ; g++ -o CLASS_Exec CloseCycle.cxx -I $CLASS_include -L $CLASS_lib -lCLASSpkg `root-config --cflags` `root-config --libs` -fopenmp -lgomp -Wunused-result - - - */ diff --git a/example/FBR_Example.cxx b/example/FBR_Example.cxx deleted file mode 100644 index 2e2b2d4a0..000000000 --- a/example/FBR_Example.cxx +++ /dev/null @@ -1,134 +0,0 @@ -/************************************************************/ -// DESCRIPTION -// Close Fuel cycle scenario : -// This park is constituted by a FBR-Na MOX which -// multi-recycle its own fuel. -// The Storage is initially filled with Pu in order -// to this scenario to be doable -// _______________ _______ ____ _______ -// | | | FBR | | | | | -// ||===>|FabricationPlant| =>|Reactor| =>|Pool|=>|Storage|===|| -// || |________________| |_______| |____| |_______| || -// ||=========================================================|| -// -// The spent fuel goes to the pool for 5 y -// then it goes to the Storage -// -//@author BaL -/***********************************************************/ -#include "CLASSHeaders.hxx" -#include <sstream> -#include <iomanip> -#include <math.h> -#include <string> -#include "XS/XSM_MLP.hxx" //Load the include for Neural network cross section predictor -#include "Irradiation/IM_RK4.hxx" //Load the include for Runge Kutta 4 resolution -#include "Equivalence/EQM_BakerRoss_FBR_MOX.hxx" //Load the include for Neural Network Equivalence Model (PWRMOX) -using namespace std; - -int main(int argc, char** argv) -{ - //seconds in one year - cSecond year = 3600*24.*365.25; - /******LOG MANAGEMENT**********************************/ - //Definition of the Log file : CLASS messages output - int Std_output_level=0; // Only error are shown in terminal - int File_output_level=3; // Error + Warning + Info are shown in the file CLASS_OUTPUT.log - CLASSLogger *Logger = new CLASSLogger("CLASS_OUTPUT.log",Std_output_level,File_output_level); - - /******SCENARIO**********************************/ - // The scenario start at year 1977 - Scenario *gCLASS=new Scenario(1977*year,Logger); - gCLASS->SetStockManagement(true);//If false all the IsotopicVector in stocks are mixed together. - gCLASS->SetTimeStep(year/4.); //the scenario calculation is updated every 3 months - gCLASS->SetOutputFileName("FBR_Example.root"); //Set the name of the output file - - /******DATA BASES**********************************/ - /*===Decay data base===*/ - //The decay data base is taken from the file Decay.idx - DecayDataBank* DecayDB = new DecayDataBank(gCLASS->GetLog(), "../DATA_BASES/DECAY/ALL/Decay.idx"); - gCLASS->SetDecayDataBase(DecayDB);//This decay data base will be used for all the decay calculations in this Scenario - - /*===Reactor data base===*/ - - XSM_MLP* XS_FBRMOX = new XSM_MLP(gCLASS->GetLog(), "../DATA_BASES/FBR_Na/MOX/XSModel/ESFR_48Wg");//Defining the XS Predictor - IM_RK4 *IMRK4 = new IM_RK4(gCLASS->GetLog()); //Bateman's equation solver method (RungeKutta4) - IMRK4->SetSpectrumType("fast"); //Set the spectrum to fast for reactions isomeric branching ratios (can be fast or thermal) - IMRK4->LoadFPYield("","../data/FPyield_Fast_JEFF3.1.dat"); //Add the handling of fission procuct and gets fission yields from this file (the first argument is for spontaneousfission yield : here is not handle) - - EQM_BakerRoss_FBR_MOX* EQM_FBRMOX = new EQM_BakerRoss_FBR_MOX(gCLASS->GetLog());//Defining the EquivalenceModel - EQM_FBRMOX->SetBuildFuelFirstGuess(0.12); //Set the first guess of fissile content to 12 per cent of plutonium (default : 5%) - PhysicsModels* PHYMOD = new PhysicsModels(XS_FBRMOX, EQM_FBRMOX, IMRK4); //The PhysicsModels containing the 3 object previously defined - - - /******FACILITIES*********************************/ - /*===A Stock===*/ - Storage *Stock = new Storage(gCLASS->GetLog()); // Definition of the stock - Stock->SetName("Stock"); // Its name - //Fill the stock with an initial amount of Plutonium - // In order to allow the FBR_MOX to work - IsotopicVector InitialIV; - InitialIV.Add(94,238,0,4e27 ); - InitialIV.Add(94,239,0,6.4e28); - InitialIV.Add(94,240,0,1.6e28); - InitialIV.Add(94,241,0,9.0e27); - InitialIV.Add(94,242,0,6e27 ); - InitialIV.Add(95,241,0,1e27 ); - gCLASS->Add(Stock); //Adding the stock to the Scenario - Stock->AddToStock(InitialIV); - - /*===A Pool===*/ - Pool *Cooling_MOX = new Pool(gCLASS->GetLog(),Stock, 5*year); //After 5 years of cooling, the pool sends its content to "Stock" - Cooling_MOX->SetName("Pool_MOX"); - gCLASS->Add(Cooling_MOX); - - /*===A FabricationPlant===*/ - 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 - FP_MOX->SetFiFo(false); //The latest isotopicVector to enter in "Stock" will be used to build the fuel (Opposite of First In First Out) - FP_MOX->SetName("Fab_MOX"); - FP_MOX->AddFissileStorage(Stock); //Tell the FP to look in Stock for fissionable material - //FP_MOX->AddFertileStorage(Stock2);//Tell the FP to look in Stock2 for fertile material - //If fertile stock is not defined (like here), CLASS get fertile from nature (OUTCOMING vector) - //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 - gCLASS->AddFabricationPlant(FP_MOX); - - - /*===A Reactor : FBR_MOX===*/ - double HMMass = 7.48336500000000058e+01; //heavy metal mass (in tons) - double Power_CP0 = 3.6e9; //Thermal power (in W) - double BurnUp = 100; //100 GWd/tHM - - cSecond StartingTime = 1985*year; - cSecond LifeTime = 40*year; - - Reactor* FBR_MOX = new Reactor(gCLASS->GetLog(), // Log - PHYMOD, // The models used to build the fuel & to calculate its evolution - FP_MOX, // The FabricationPlant - Cooling_MOX, // Connected Backend facility : The reactor discharge its fuel into the Pool "Cooling_UOX" - StartingTime, // Starting time - LifeTime, // time of reactor life time - Power_CP0, // Power - HMMass, // HM mass - BurnUp, // BurnUp - 0.8); // Reactor efficiency (% of time it is working @ full power) - - - FBR_MOX->SetName("a_FBR_MOX"); // name of the reactor (as it will show up in the CLASSGui) - gCLASS->AddReactor(FBR_MOX); //Add this reactor to the scenario - - gCLASS->Evolution((double)year*2018);//Perform the calculation from year 1977(defined in Scenario declaration) to year 2018 - - delete gCLASS; - -} - - -//========================================================================================== -// Compilation -//========================================================================================== -/* - - \rm CLASS* ; g++ -o CLASS_Exec FBR_Example.cxx -I $CLASS_include -L $CLASS_lib -lCLASSpkg `root-config --cflags` `root-config --libs` -fopenmp -lgomp -Wunused-result - - - */ diff --git a/example/Separation.cxx b/example/Separation.cxx deleted file mode 100644 index 83c8589d2..000000000 --- a/example/Separation.cxx +++ /dev/null @@ -1,168 +0,0 @@ -/*****************************************************************/ -// DESCRIPTION -// More complex (and dumby) scenario to illustrate how to use -// SeparationPlant and BackEnd Facilities (Pool/Storage/Separation) -// This park is constituted by a simple PWR UOX Reactor, a pool -// 4 Storage and 2 FabricationPlant. -// _______ _______________ -// | | | | => Pool => Storage1 -// |Reactor| =>|SeparationPlant1| => Storage2 -// |_______| |_______________ | =>|SeparationPlant2|=>Storage3 -// | |=>Storage4 -// -// -//@author BaL -/****************************************************************/ -#include "CLASSHeaders.hxx" -#include <sstream> -#include <iomanip> -#include <math.h> -#include <string> - -using namespace std; - -int main(int argc, char** argv) -{ - //seconds in one year - cSecond year = 3600*24.*365.25; - /******LOG MANAGEMENT**********************************/ - //Definition of the Log file : CLASS messages output - int Std_output_level=0; //Only error are shown in terminal - int File_output_level=2; // Error + Warning + Info are shown in the file CLASS_OUTPUT.log - CLASSLogger *Logger = new CLASSLogger("CLASS_OUTPUT.log",Std_output_level,File_output_level); - - /******SCENARIO**********************************/ - // The scenario start at year 1977 - Scenario *gCLASS=new Scenario(1977*year,Logger); - gCLASS->SetStockManagement(true);//If false all the IsotopicVector in stocks are mixed together. - gCLASS->SetTimeStep(year/4.);//the scenario calculation is updated every 3 months - gCLASS->SetOutputFileName("Separation.root"); //Set the name of the output file - - /******DATA BASES**********************************/ - /*===Decay data base===*/ - //The decay data base is taken from the file Decay.idx - DecayDataBank* DecayDB = new DecayDataBank(gCLASS->GetLog(), "../DATA_BASES/DECAY/ALL/Decay.idx"); - gCLASS->SetDecayDataBase(DecayDB);//This decay data base will be used for all the decay calculations in this Scenario - - /*===Reactor data base===*/ - //The file STD900.dat correspond to a fuel evolution of a UOX PWR (see manual for details) - EvolutionData *STD900 = new EvolutionData(gCLASS->GetLog(), "../DATA_BASES/PWR/UOX/FixedFuel/STD900.dat"); - /******FACILITIES*********************************/ - /*===The 4 Stocks ===*/ - Storage* MyStorage1 = new Storage(Logger); - MyStorage1->SetName("Storage1"); - gCLASS->Add(MyStorage1); //Adding the stock to the Scenario - - Storage* MyStorage2 = new Storage(Logger); - MyStorage2->SetName("Storage2"); - gCLASS->Add(MyStorage2); //Adding the stock to the Scenario - - Storage* MyStorage3 = new Storage(Logger); - MyStorage3->SetName("Storage3"); - gCLASS->Add(MyStorage3); //Adding the stock to the Scenario - - Storage* MyStorage4 = new Storage(Logger); - MyStorage4->SetName("Storage4"); - gCLASS->Add(MyStorage4); //Adding the stock to the Scenario - - - /*===A Pool===*/ - Pool* MyPool1 = new Pool ( Logger , MyStorage1 , 5*year) ; //Defined the Pool MyPool1 connected to the Storage MyStorage1. 5year of cooling - //After 5 years of cooling, the pool sends its content to "MyStorage1" - MyPool1->SetName("MyPool1"); - gCLASS->Add(MyPool1); - - - //*=======2 Separation Plants===*/ - /***Separation Efficencies Definition***/ - IsotopicVector UraniumSeparationEfficiency; - UraniumSeparationEfficiency.Add(92,232,0,0.99);//Efficiency of 99% - UraniumSeparationEfficiency.Add(92,233,0,0.99); - UraniumSeparationEfficiency.Add(92,234,0,0.99); - UraniumSeparationEfficiency.Add(92,235,0,0.99); - UraniumSeparationEfficiency.Add(92,236,0,0.99); - UraniumSeparationEfficiency.Add(92,238,0,0.99); - - IsotopicVector PlutoniumSeparationEfficiency; - PlutoniumSeparationEfficiency.Add(94,236,0,0.98);//Efficiency of 98% - PlutoniumSeparationEfficiency.Add(94,238,0,0.98);//Efficiency of 98% - PlutoniumSeparationEfficiency.Add(94,239,0,0.98); - PlutoniumSeparationEfficiency.Add(94,240,0,0.98); - PlutoniumSeparationEfficiency.Add(94,241,0,0.98); - PlutoniumSeparationEfficiency.Add(94,242,0,0.98); - - IsotopicVector AmericiumSeparationEfficiency; - AmericiumSeparationEfficiency.Add(95,241,0,0.98);//Efficiency of 98% - AmericiumSeparationEfficiency.Add(95,243,0,0.98);//Efficiency of 98% - - //Yes we assume that may be one day, such isotopic separation will be doable !! - IsotopicVector Am241SeparationEfficiency; - Am241SeparationEfficiency.Add(95,241,0,0.98);//Efficiency of 98% - IsotopicVector Am243SeparationEfficiency; - Am243SeparationEfficiency.Add(95,243,0,0.98);//Efficiency of 98% - - - //Separation 2 - SeparationPlant* MySeparation2 = new SeparationPlant ( Logger ) ; - MySeparation2->SetName("Separation2"); - - double AvoidReprocessingUntilYear = 1990*year; - MySeparation2->SetBackEndDestination( MyStorage3 , Am241SeparationEfficiency , AvoidReprocessingUntilYear ); - //Extract 241Am from incoming material and send it to MyStorage3, wait year 1990 to begin extraction - MySeparation2->SetBackEndDestination( MyStorage4 , Am243SeparationEfficiency , AvoidReprocessingUntilYear ); - //Extract 243Am from incoming material and send it to MyStorage4, wait year 1990 to begin extraction - //The material flux wich not goes to a BackeEnDestination is sent to the WASTE - gCLASS->Add(MySeparation2); - - //Separation 1 - SeparationPlant* MySeparation1 = new SeparationPlant ( Logger ) ; - MySeparation1->SetName("Separation1"); - - - MySeparation1->SetBackEndDestination( MyPool1 , UraniumSeparationEfficiency , 0 ); - //Extract uranium from incoming material and send it to MyPool1, Don't wait before extraction - MySeparation1->SetBackEndDestination( MyStorage2 , PlutoniumSeparationEfficiency , 0 ) ; - //Extract Plutonium from incoming material and send it to MyStorage2 , Don't wait before extraction - MySeparation1->SetBackEndDestination( MySeparation2 , AmericiumSeparationEfficiency , AvoidReprocessingUntilYear ) ; - //Extract Americium from incoming material and send it to MySeparation2 , wait year 1990 to begin extraction - gCLASS->Add(MySeparation1); - - - /*===A Reactor : PWR_UOX===*/ - double HMMass = 72.5;//heavy metal mass (in tons) - double Power_CP0 = 2660e6;//Thermal power (in W) - double BurnUp = 33; //33 GWd/tHM - - cSecond StartingTime = 1978*year; - cSecond LifeTime = 40*year; - - Reactor* PWR_UOX = new Reactor(gCLASS->GetLog(), //Log - STD900, // Data base - MySeparation1, // Connected Backend facility : The reactor discharge its fuel into the SeparationPlant1 "MySeparation1" - StartingTime, // Starting time - LifeTime, // time of reactor life time - Power_CP0, // Power - HMMass,// HM mass - BurnUp, // BurnUp - 0.8); // Load Factor - - - PWR_UOX->SetName("a_PWR_Reactor");// name of the reactor (as it will show up in the CLASSGui) - gCLASS->AddReactor(PWR_UOX);//Add this reactor to the scenario - - gCLASS->Evolution((double)year*2018);//Perform the calculation from year 1977(defined in Scenario declaration) to year 2018 - - delete gCLASS; - -} - - -//========================================================================================== -// Compilation -//========================================================================================== -/* - - \rm CLASS* ; g++ -o CLASS_Exec Separation.cxx -I $CLASS_include -L $CLASS_lib -lCLASSpkg `root-config --cflags` `root-config --libs` -fopenmp -lgomp -Wunused-result - - - */ diff --git a/example/SimpleReactor.cxx b/example/SimpleReactor.cxx deleted file mode 100644 index 8192ece6e..000000000 --- a/example/SimpleReactor.cxx +++ /dev/null @@ -1,95 +0,0 @@ -/*************************************************/ -// DESCRIPTION -// Simple scenario : -// This park is constituted by a simple PWR UOX -// Reactor and a Storage. -// _______ _______ -// | | | | -// |Reactor| =>|Storage| -// |_______| |_______| -// -// The spent fuel goes to a Storage -// -//@author BaL -/*************************************************/ -#include "CLASSHeaders.hxx" -#include <sstream> -#include <iomanip> -#include <math.h> -#include <string> - -using namespace std; - -int main(int argc, char** argv) -{ - //seconds in one year - cSecond year = 3600*24.*365.25; - /******LOG MANAGEMENT**********************************/ - //Definition of the Log file : CLASS messages output - int Std_output_level=0; //Only error are shown in terminal - int File_output_level=2; // Error + Warning + Info are shown in the file CLASS_OUTPUT.log - CLASSLogger *Logger = new CLASSLogger("CLASS_OUTPUT.log",Std_output_level,File_output_level); - - /******SCENARIO**********************************/ - // The scenario start at year 1977 - Scenario *gCLASS=new Scenario(1977*year,Logger); - gCLASS->SetStockManagement(true);//If false all the IsotopicVector in stocks are mixed together. - gCLASS->SetTimeStep(year/4.);//the scenario calculation is updated every 3 months - gCLASS->SetOutputFileName("SimpleReactor.root"); //Set the name of the output file - - /******DATA BASES**********************************/ - /*===Decay data base===*/ - //The decay data base is taken from the file Decay.idx - DecayDataBank* DecayDB = new DecayDataBank(gCLASS->GetLog(), "../DATA_BASES/DECAY/ALL/Decay.idx"); - gCLASS->SetDecayDataBase(DecayDB);//This decay data base will be used for all the decay calculations in this Scenario - - /*===Reactor data base===*/ - //The file STD900.dat correspond to a fuel evolution of a UOX PWR (see manual for details) - EvolutionData *STD900 = new EvolutionData(gCLASS->GetLog(), "../DATA_BASES/PWR/UOX/FixedFuel/STD900.dat"); - - /******FACILITIES*********************************/ - /*===A Stock===*/ - Storage *Stock = new Storage(gCLASS->GetLog()); //Definition of the stock - Stock->SetName("Stock_UOX"); //Its name - Stock->AddToStock(ZAI(92,238,0) * 10);// Just to illustrate, here we add ten nuclei of 238U in this stock - gCLASS->Add(Stock); //Adding the stock to the Scenario - - - /*===A Reactor : PWR_UOX===*/ - double HMMass = 72.5;//heavy metal mass (in tons) - double Power_CP0 = 2660e6;//Thermal power (in W) - double BurnUp = 33; //33 GWd/tHM - - cSecond StartingTime = 1978*year; - cSecond LifeTime = 40*year; - - Reactor* PWR_UOX = new Reactor(gCLASS->GetLog(), //Log - STD900, // Data base - Stock, // Connected Backend facility (here the Storage "Stock" previously declared) - StartingTime, // Starting time - LifeTime, // time of reactor life time - Power_CP0, // Power - HMMass,// HM mass - BurnUp, // BurnUp - 0.8); // Load Factor - - - PWR_UOX->SetName("a_PWR_Reactor");// name of the reactor (as it will show up in the CLASSGui) - gCLASS->AddReactor(PWR_UOX);//Add this reactor to the scenario - - gCLASS->Evolution((double)year*2018);//Perform the calculation from year 1977(defined in Scenario declaration) to year 2018 - - delete gCLASS; - -} - - -//========================================================================================== -// Compilation -//========================================================================================== -/* - - \rm CLASS* ; g++ -o CLASS_Exec SimpleReactor.cxx -I $CLASS_include -L $CLASS_lib -lCLASSpkg `root-config --cflags` `root-config --libs` -fopenmp -lgomp -Wunused-result - - - */ diff --git a/example/SimpleReactor2.cxx b/example/SimpleReactor2.cxx deleted file mode 100644 index 6dbd9de56..000000000 --- a/example/SimpleReactor2.cxx +++ /dev/null @@ -1,99 +0,0 @@ -/*************************************************/ -// DESCRIPTION -// Simple scenario : -// This park is constituted by a simple PWR UOX -// Reactor, a pool and a Storage. -// _______ ____ _______ -// | | | | | | -// |Reactor| =>|Pool|=>|Storage| -// |_______| |____| |_______| -// -// The spent fuel goes to the pool for 5 y -// then it goes to the Storage -// -//@author BaL -/*************************************************/ -#include "CLASSHeaders.hxx" -#include <sstream> -#include <iomanip> -#include <math.h> -#include <string> - -using namespace std; - -int main(int argc, char** argv) -{ - //seconds in one year - cSecond year = 3600*24.*365.25; - /******LOG MANAGEMENT**********************************/ - //Definition of the Log file : CLASS messages output - int Std_output_level=0; //Only error are shown in terminal - int File_output_level=2; // Error + Warning + Info are shown in the file CLASS_OUTPUT.log - CLASSLogger *Logger = new CLASSLogger("CLASS_OUTPUT.log",Std_output_level,File_output_level); - - /******SCENARIO**********************************/ - // The scenario start at year 1977 - Scenario *gCLASS=new Scenario(1977*year,Logger); - gCLASS->SetStockManagement(true);//If false all the IsotopicVector in stocks are mixed together. - gCLASS->SetTimeStep(year/4.);//the scenario calculation is updated every 3 months - gCLASS->SetOutputFileName("SimpleReactor2.root"); //Set the name of the output file - - /******DATA BASES**********************************/ - /*===Decay data base===*/ - //The decay data base is taken from the file Decay.idx - DecayDataBank* DecayDB = new DecayDataBank(gCLASS->GetLog(), "../DATA_BASES/DECAY/ALL/Decay.idx"); - gCLASS->SetDecayDataBase(DecayDB);//This decay data base will be used for all the decay calculations in this Scenario - - /*===Reactor data base===*/ - //The file STD900.dat correspond to a fuel evolution of a UOX PWR (see manual for details) - EvolutionData *STD900 = new EvolutionData(gCLASS->GetLog(), "../DATA_BASES/PWR/UOX/FixedFuel/STD900.dat"); - /******FACILITIES*********************************/ - /*===A Stock===*/ - Storage *Stock = new Storage(gCLASS->GetLog()); //Definition of the stock - Stock->SetName("Stock_UOX"); //Its name - Stock->AddToStock(ZAI(92,238,0) * 10);// Just to illustrate, here we add ten nuclei of 238U in this stock - gCLASS->Add(Stock); //Adding the stock to the Scenario - - /*===A Pool===*/ - Pool *Cooling_UOX = new Pool(gCLASS->GetLog(),Stock, 5*year); //After 5 years of cooling, the pool sends its content to "Stock" - Cooling_UOX->SetName("Pool_UOX"); - gCLASS->Add(Cooling_UOX); - - /*===A Reactor : PWR_UOX===*/ - double HMMass = 72.5;//heavy metal mass (in tons) - double Power_CP0 = 2660e6;//Thermal power (in W) - double BurnUp = 33; //33 GWd/tHM - - cSecond StartingTime = 1978*year; - cSecond LifeTime = 40*year; - - Reactor* PWR_UOX = new Reactor(gCLASS->GetLog(), //Log - STD900, // Data base - Cooling_UOX, // Connected Backend facility : The reactor discharge its fuel into the Pool "Cooling_UOX" - StartingTime, // Starting time - LifeTime, // time of reactor life time - Power_CP0, // Power - HMMass,// HM mass - BurnUp, // BurnUp - 0.8); // Load Factor - - - PWR_UOX->SetName("a_PWR_Reactor");// name of the reactor (as it will show up in the CLASSGui) - gCLASS->AddReactor(PWR_UOX);//Add this reactor to the scenario - - gCLASS->Evolution((double)year*2018);//Perform the calculation from year 1977(defined in Scenario declaration) to year 2018 - - delete gCLASS; - -} - - -//========================================================================================== -// Compilation -//========================================================================================== -/* - - \rm CLASS* ; g++ -o CLASS_Exec SimpleReactor2.cxx -I $CLASS_include -L $CLASS_lib -lCLASSpkg `root-config --cflags` `root-config --libs` -fopenmp -lgomp -Wunused-result - - - */ -- GitLab