From 99cf50bca09bf547d21393168de59a4213253f42 Mon Sep 17 00:00:00 2001 From: Baptiste Mouginot <mouginot.baptiste@gmail.com> Date: Tue, 8 Apr 2014 09:52:48 +0000 Subject: [PATCH] Adding full commentary in oxygen format git-svn-id: svn+ssh://svn.in2p3.fr/class@227 0e7d625b-0364-4367-a6be-d5be4a48d228 --- source/trunk/include/CLASS.hxx | 210 ++++++++++++---- source/trunk/include/CLSSFacility.hxx | 55 +++-- source/trunk/include/CLSSObject.hxx | 21 +- source/trunk/include/DataBank.hxx | 284 +++++++++++++++++----- source/trunk/include/EvolutionData.hxx | 237 ++++++++++++------ source/trunk/include/FabricationPlant.hxx | 119 +++++++-- source/trunk/include/IsotopicVector.hxx | 93 +++++-- source/trunk/include/LogFile.hxx | 50 +++- source/trunk/include/Pool.hxx | 129 +++++++--- source/trunk/include/Reactor.hxx | 158 ++++++++++-- source/trunk/include/Storage.hxx | 131 ++++++++-- source/trunk/include/ZAI.hxx | 44 ++-- source/trunk/src/CLSSObject.cxx | 1 + source/trunk/src/DataBank.cxx | 61 +---- 14 files changed, 1183 insertions(+), 410 deletions(-) diff --git a/source/trunk/include/CLASS.hxx b/source/trunk/include/CLASS.hxx index 1b6cbc57b..59aa6a068 100755 --- a/source/trunk/include/CLASS.hxx +++ b/source/trunk/include/CLASS.hxx @@ -1,16 +1,10 @@ #ifndef _CLASS_HXX_ #define _CLASS_HXX_ - /*! \file \brief Header file for CLASS classes. - Define a CLASS Parc. - The aim of thes Class is to manage the parc, store reactor, Pool, process the evolution, build Isotopic vector - - - @author BaM, Marc - @version 2.0 */ + #include "CLSSObject.hxx" #include "IsotopicVector.hxx" @@ -32,19 +26,56 @@ class Reactor; class Pool; class Storage; +//-----------------------------------------------------------------------------// +/*! +Define a CLASS Parc. +The aim of these class is to manage the parc and its evolution and to lead all Storage, FabricationPlant, Reactor, Pool. + + + @author BaM + @author Marc + @version 2.0 + */ +//________________________________________________________________________ + + class CLASS : public CLSSObject { public : - ///< Normal Constructor. - CLASS(); - CLASS(LogFile* Log); - CLASS(double abstime); - - ///< Normal Destructor. - ~CLASS(); + +//********* Constructor/Destructor Method *********// + + /*! + \name Constructor/Desctructor + */ + //@{ + + CLASS(); ///< Normal Constructor. + + + + CLASS(LogFile* Log); ///< Log Constructor. + /*! + Use to load a LogFile + \param LogFile: LogFile used for the log... + */ + + + CLASS(double abstime); ///< Time Constructor. + /*! + Use to set the starting time of the Parc + \param abstime: Starting time of the Parc in second + */ + + ~CLASS(); ///< Normal Destructor. + //@} //********* Get Method *********// + /*! + \name Get Function + */ + //@{ cSecond GetAbsoluteTime() { return fAbsoluteTime; } ///< Return the Absolute Clock map<cSecond, int> GetTimeStep() { return fTimeStep; } ///< Return the Time Step Vector vector<Reactor*> GetReactor() { return fReactor; } ///< Return the Reactor Vector @@ -56,41 +87,113 @@ public : cSecond GetPrintSet() { return fPrintStep; } ///< Return the Print Step Periodicity bool GetStockManagement() { return fStockManagement; } ///< Return the StockManagement method (True or False) string GetOutputFileName() { return fOutputFileName; } ///< Return the Output File name - string GetOutputTreeName() { return fOutputTreeName; } ///< Return the Output File name + string GetOutputTreeName() { return fOutputTreeName; } ///< Return the Output ROOT TTree name + //@} + + //********* Set Method *********// - void SetTimeStep(double timestep) { fPrintStep = (cSecond)timestep; } ///< Set the Printing Step periodicity - void SetStockManagement(bool val) { fStockManagement = val; } //!< Set the StockManagement method (True or false) - void SetDecayDataBase(DataBank<ZAI>* decaydatabase) { fDecayDataBase = decaydatabase; } //!< Set the Pointer to the Decay DataBase - - void SetOutputFileName(string name) { fOutputFileName = name; } //!< Set the Output File Name - void SetOutputTreeName(string name) { fOutputTreeName = name; } //!< Set the Output File Name + /*! + \name Set Function + */ + //@{ + + //{ + /// Set the Printing Step periodicity + /*! + Use to set the periodicity of the output + \param timestep: periodicity of outpout in second + */ + void SetTimeStep(cSecond timestep) { fPrintStep = timestep; } + //} + + //{ + /// Set the StockManagement method + /*! + Use to define the stock managment method : true all fuel are stored individualy and false all fuel are mixed in a stock, and one can separate each isotope as needed + \param val: true or false depending on the stock management method used + */ + void SetStockManagement(bool val) { fStockManagement = val; } + //} + + //{ + /// Set the Decay DataBank + /*! + Use to define Decay DataBank to be used + \param decaydatabase: a Databank<ZAI> which should contain the evolution of each nuclei of the chart + */ + void SetDecayDataBase(DataBank<ZAI>* decaydatabase) { fDecayDataBase = decaydatabase; } + //} + + //{ + /// Set the Output File Name + /*! + Use to define name of the output file + \param name: a string which correspond to the output file name + */ + void SetOutputFileName(string name) { fOutputFileName = name; } + //} + + + //{ + /// Set the Output TTree Name + /*! + Use to define name of the output ROOT TTree + \param name: a string which correspond to the output ROOT TTree name + */ + void SetOutputTreeName(string name) { fOutputTreeName = name; } + //} + //@} //********* Add Method *********// + /*! + \name Adding Facilities + */ + //@{ + void AddPool(Pool* Pool); ///< Add A TF to the Park void AddReactor(Reactor* reactor); ///< Add a Reactor to the Park void AddStorage(Storage* storage); ///< Add a Storage to the Park void AddFabricationPlant(FabricationPlant* fabricationplant); ///< Add a Storage to the Park - - - + + //@} + //********* Evolution Method *********// - void BuildTimeVector(cSecond t); ///< Build the Time Evolution Vector - void Evolution(double t); ///< Do the Evolution - void PoolEvolution(); ///< Do TF Evolution - void ReactorEvolution(); ///< Do the Reactor Evolution - void FabricationPlantEvolution(); ///< Do the FabricationPlant Evolution - void StorageEvolution(); ///< Do the Storage Evolution + /*! + \name Evolution Method + */ + //@{ + + void BuildTimeVector(cSecond t); ///< Build the Time Evolution Vector where : + /// \li 1 printing, + /// \li 2 reactor Studown + /// \li 4 start/End of reactor cycle, + /// \li 8 end of Cooling, + /// \li 16 fuel Fabrication + + void Evolution(double t); ///< Perform the Evolution + void PoolEvolution(); ///< Perform TF Evolution + void ReactorEvolution(); ///< Perform the Reactor Evolution + void FabricationPlantEvolution(); ///< Perform the FabricationPlant Evolution + void StorageEvolution(); ///< Perform the Storage Evolution + + //@} //-------- IsotopicVector --------// + /*! + \name IsotopicVector Sum + */ + //@{ + + IsotopicVector GetGod() const { return fGod; } //!< Return the God Providings IsotopicVector void AddGodIncome(ZAI zai, double quantity) { AddGod(zai*quantity); } //!< Add a ZAI*quantity to GodIncome void AddGod(IsotopicVector isotopicvector) { fGod.Add(isotopicvector); } //!< Add a isotopicVector to GodIncome @@ -98,23 +201,34 @@ public : void AddWaste(IsotopicVector isotopicvector) { fWaste.Add(isotopicvector); } //!< Add a isotopicVector to Waste void AddToPower(double power) { fParcPower += power;} //!< Add power to the installed power in the Parc + //@} + + //********* In/Out related Method *********// - void ProgressPrintout(cSecond t); - - void Print(); - void Write(); - void UpdateParc(); - void OpenOutputTree(); - void CloseOutputTree(); - void OutAttach(); - void ResetQuantity(); + + /*! + \name In/Out Method + */ + //@{ + + + void ProgressPrintout(cSecond t); //!< Update the prompt output to the time t + void Print(); //!< Print some information about the Parc + void Write(); //!< Write information in a file + void UpdateParc(); //!< Update the Global IsotopicVector + void OpenOutputTree(); //!< Open and define the Ouput ROOT TTree + void CloseOutputTree(); //!< Close and delete the Ouput ROOT TTree + void OutAttach(); //!< Attach the Branch to the Ouput ROOT TTree + void ResetQuantity(); //!< Reset the values of the GLobal IsotopicVector + //@} + protected : - bool fNewTtree; + bool fNewTtree; //!< Tru if we want to define a new TTree in the output File bool fStockManagement; ///< True if real StockManagement false unstead (Default = true) @@ -122,11 +236,11 @@ protected : cSecond fAbsoluteTime; ///< Absolute Clock cSecond fStartingTime; ///< Starting Time map<cSecond, int> fTimeStep; ///< Time Step Vector for the evolution : - ///< 1 Printing, - ///< 2 Reactor Studown - ///< 4 Start/End of reactor cycle, - ///< 8 End of Cooling, - ///< 16 Fuel Fabrication + /// \li 1 printing, + /// \li 2 reactor Studown + /// \li 4 start/End of reactor cycle, + /// \li 8 end of Cooling, + /// \li 16 fuel Fabrication vector<Storage*> fStorage; ///< Vector of Storages @@ -150,9 +264,9 @@ protected : IsotopicVector fTotalInReactor; ///< Sum of all IV in Reactor IV - IsotopicVector fIVInCycleTotal; ///< Summ of all IV in the cycle (without Waste) IV - IsotopicVector fIVTotal; ///< Summ of all IV in the parc (including Waste) IV - double fParcPower; ///< Summ of the Power of all reactor in the parc + IsotopicVector fIVInCycleTotal; ///< Sum of all IV in the cycle (without Waste) IV + IsotopicVector fIVTotal; ///< Sum of all IV in the parc (including Waste) IV + double fParcPower; ///< Sum of the Power of all reactor in the parc }; diff --git a/source/trunk/include/CLSSFacility.hxx b/source/trunk/include/CLSSFacility.hxx index 59578723c..d6f13c562 100644 --- a/source/trunk/include/CLSSFacility.hxx +++ b/source/trunk/include/CLSSFacility.hxx @@ -6,10 +6,7 @@ /*! \file \brief Header file for CLSSFacility class. - - - @author BaM - @version 2.0 + */ #include <string> @@ -25,6 +22,20 @@ typedef long long int cSecond; class CLASS; +//-----------------------------------------------------------------------------// +/*! + Define a CLASS Facility. + The aim of these class is synthetyse all the commum properties of the nuclear facilities. + + + @author BaM + @version 2.0 + */ +//________________________________________________________________________ + + + + class CLSSFacility : public CLSSObject { public : @@ -32,6 +43,11 @@ public : CLSSFacility(); //********* Get Method *********// + /*! + \name Get Function + */ + //@{ + int GetId() const { return fId; } //!< Return the Facility Parc'Is IsotopicVector GetInsideIV() const { return fInsideIV; } //!< Return the IV contain in the Facility @@ -43,9 +59,13 @@ public : CLASS* GetParc() { return fParc; } IsotopicVector GetCumulativeIVIn() { return fCumulativeIVIn;} IsotopicVector GetCumulativeIVOut() { return fCumulativeIVOut;} - + //@} //********* Set Method *********// + /*! + \name Set Function + */ + //@{ void SetId(int id) { fId = id; } //!< Set The Facility Parc'Id void SetParc(CLASS* parc) { fParc = parc; } //!< Set the Pointer to the Parc @@ -55,28 +75,33 @@ public : virtual void SetCycleTime(double cycletime) { fCycleTime = (cSecond)cycletime; } //!< Set the cycle time (Cycle of the loading Plan) void SetInCycleTime(double incycletime) { fInCycleTime = (cSecond)incycletime; fIsStarted = true; } //!< Set the cycle time (Cycle of the loading Plan) void SetInternalTime(double internaltime) { fInternalTime = (cSecond)internaltime; } //!< Set the cycle time (Cycle of the loading Plan) - - void AddCumulativeIVIn(IsotopicVector IV) { fCumulativeIVIn += IV;} - void AddCumulativeIVOut(IsotopicVector IV) { fCumulativeIVOut += IV;} + //@} + - //********* Modification Method *********// + /*! + \name Evolution Method + */ + //@{ + + void AddCumulativeIVIn(IsotopicVector IV) { fCumulativeIVIn += IV;} //!< Add the Input IsotopicVector the The cumulative IV IN + void AddCumulativeIVOut(IsotopicVector IV) { fCumulativeIVOut += IV;} //!< Add the Input IsotopicVector the The cumulative IV OUT virtual void Evolution(cSecond t) { } //!< Performe the Evolution to the Time t - virtual void Dump() { } //!< Write Modification (IV In/Out, filling the TF...) - + virtual void Dump() { } //!< Write Modification (IV In/Out, filling the TF...) + //@} protected : bool fIsStarted; ///< True if Running, False Otherwise - bool fShutDown; ///< True if ShutDown + bool fShutDown; ///< True if the facility is stoped, False Otherwise bool fEndOfCycle; ///< True if Reaching the End of a Facility Cycle cSecond fInternalTime; ///< Internal Clock cSecond fInCycleTime; ///< Time spend since the beginning of the last Cycle - cSecond fCycleTime; ///< Cycle Time + cSecond fCycleTime; ///< Cycle duration Time IsotopicVector fInsideIV; ///< All IV in the Facility (fuel for reactor, total for all others...) - IsotopicVector fCumulativeIVIn; ///< All IV in the Facility (fuel for reactor, total for all others...) - IsotopicVector fCumulativeIVOut; ///< All IV in the Facility (fuel for reactor, total for all others...) + IsotopicVector fCumulativeIVIn; ///< All IV in the Facility (fuel for reactor, total for all others...) + IsotopicVector fCumulativeIVOut; ///< All IV in the Facility (fuel for reactor, total for all others...) //********* Internal Parameter *********// diff --git a/source/trunk/include/CLSSObject.hxx b/source/trunk/include/CLSSObject.hxx index 66c0d2a3f..cc5deddc4 100644 --- a/source/trunk/include/CLSSObject.hxx +++ b/source/trunk/include/CLSSObject.hxx @@ -21,6 +21,18 @@ using namespace std; +//-----------------------------------------------------------------------------// +/*! + Define a CLASS Object. + The aim of these class is synthetyse all the commum properties to all CLASS Element. + + + @author BaM + @version 2.0 + */ +//________________________________________________________________________ + + class CLSSObject : public TNamed { @@ -30,15 +42,14 @@ public : virtual CLSSObject* Clone() { return new CLSSObject(*this); } //!< Correct way to copy a CLSSObject in case of derivation - void SetLog(LogFile* log) { fLog = log; } - void IsLog(bool islog) { fNoLog = islog; } - + void SetLog(LogFile* log) { fLog = log; fIsLog = true; } //!< Set the LogFile + LogFile* GetLog() { return fLog; } //!< Return the Pointer to the Log - bool PrintLog() { return fNoLog; } + bool IsLog() { return fIsLog; } //!< reutrn true if a LogFile is defined private : LogFile* fLog; //!< Pointer to the Log - bool fNoLog; + bool fIsLog; //!< Set at true if a LogFile are define ClassDef(CLSSObject,0); }; diff --git a/source/trunk/include/DataBank.hxx b/source/trunk/include/DataBank.hxx index 8bd594eb0..54594deac 100755 --- a/source/trunk/include/DataBank.hxx +++ b/source/trunk/include/DataBank.hxx @@ -4,9 +4,6 @@ /*! \file \brief Header file for DataBank class. - The aim of this Class is to store the evolution Database of the all decay nuclei. - - @author BaM, Marc @version 2.0 */ @@ -29,22 +26,81 @@ class LogFile; double ReactionRateWeightedDistance(IsotopicVector IV1, EvolutionData DB ); double ReactionRateWeightedDistance(EvolutionData DB, IsotopicVector IV1 ); +//-----------------------------------------------------------------------------// +/*! + Define a DataBank. + The aim of these class is describe the evolution of "all" evoluting system in CLASS. + 2 kind of evoluting system can be defined : + \li the Decay Matrix + \li the fuel + + For the Decay Matrix the Databank take the form of the ZAI template (ie DataBank<ZAI>) which mainly contain a map of <ZAI,EvolutionData>.This map do the correspondance between a ZAI and its decay evolution (containing all the daughter nuclei comming from the decay a the original ZAI). + + For the Fuel the Databank take the form of the IsotopicVector template (ie DataBank<Isotopic>), which mainly contain a map of <IsotopicVector,EvolutionData>. This map do the correspondance between a IsotopicVector and its evolution throw irradiation (containing all the nuclei produced by the reaction on the original IsotopicVector) + + @author BaM + @author Marc + @author PTO for a part the Decay management -- steal from MURE (Even if he does not kown it!! :)) + @version 2.0 + */ +//________________________________________________________________________ + + template <class T> class DataBank : public CLSSObject, DynamicalSystem { public : -//********* Constructor/Destructor Method *********// - ///< Normal Constructor. + + +//********* Constructor/Desctructor *********// + + /*! + \name Constructor/Desctructor + */ + //@{ + /// Normal Constructor. DataBank(); - + + //{ + /// Special Constructor. + /*! + Use to load a LogFile + \param LogFile LogFile used for the log... + \param DB_index_file path to the index file + \param setlog if the log are stored in the LogFile + \param olfreadmethod true if the old format of EvolutionData are used (ie without the key word such as Inv, XSFiss...) + */ DataBank(LogFile* Log, string DB_index_file, bool setlog = true, bool olfreadmethod = true ); - - ///< Normal Destructor. + //} + + //{ + /// Normal Destructor. + /*! + Delete de DataBank and all associated EvolutionData... + */ ~DataBank(); + //} + + //{ + /// Reset the DataBank. + /*! + Use to reset the DataBank to its default values whihout deleting the EvolutionData (which contain pointer... ). + it does just clear the different maps + */ + void Clear(); + //} + //@} + + + //********* Get Method *********// + /*! + \name Get Method + */ + //@{ map<T ,EvolutionData > GetDataBank() const { return fDataBank; } //!< Return the DataBank string GetDataBaseIndex() const { return fDataBaseIndex; } //!< Return the index Name string GetFuelType() const { return fFuelType; } //!< Return the fuel type of the DB @@ -61,43 +117,106 @@ public : double GetShorstestHalflife() const { return fShorstestHalflife; } - void Clear(); + //@} + //********* Set Method *********// - - void SetDataBank(map<T ,EvolutionData > mymap) { fDataBank = mymap; } - void SetDataBaseIndex(string database) { fDataBaseIndex = database; } - EvolutionData GenerateEvolutionData(IsotopicVector isotopicvector, double cycletime, double Power); //!< Genration of a New EvolutionData From the one already present + /*! + \name Set Method + */ + //@{ + + void SetDataBank(map<T ,EvolutionData > mymap) { fDataBank = mymap; } //!< Set the Databank map + + void SetDataBaseIndex(string database) { fDataBaseIndex = database; } //!< Set the Name of the database index + + EvolutionData GenerateEvolutionData(IsotopicVector isotopicvector, double cycletime, double Power); //!< Generation of a New EvolutionData From the one already present + + void SetOldReadMethod(bool val) { fOldReadMethod = val;} ///< use the old reading method + + //{ + /// set Fission Energy using a file + /*! + // This method fill the Fission Energy map using a file + // \param FissionEnergyFile: filename containing the Fission Energy of some nuclei (form : Z A I Energy) + */ + void SetFissionEnergy(string FissionEnergyFile); + //} + + //{ + /// set Fission Energy for a ZAI using ZAI(Z,A,I) + /*! + // This method fill the Fission Energy map of a set ZAI + // \param zai ZAI + // \param E Fission energy of the ZAI + */ + void SetFissionEnergy(ZAI zai, double E); + //} + + //{ + /// set Fission Energy for a ZAI using the Z, A, I + /*! + // This method fill the Fission Energy map of a set ZAI + // \param Z Z of the ZAI + // \param A A of the ZAI + // \param I I of the ZAI + // \param E Fission energy of the ZAI + */ + void SetFissionEnergy(int Z, int A, int I, double E ) { SetFissionEnergy(ZAI(Z,A,I), E);} + //} + + void SetDataFileName(string name) { fDataFileName = name;} ///< Set the name of the reaction file + void SetDataDirectoryName(string name) { fDataDirectoryName = name;} ///< Set the Path to the reaction file + void SetShortestHalfLife(double halflife) { fShorstestHalflife = halflife;} ///< Set the Half Life cut + void LoadFPYield(string SponfaneusYield, string ReactionYield); ///< Build Fision Yields maps; + + void SetWeightedDistanceCalculation(bool val = true) { fWeightedDistance = val;} ///< Set weighted Distance calculation + void SetEvolutionDataInterpolation(bool val = true) { fEvolutionDataInterpolation = val;} ///< Set weighted Distance calculation + + void SetDistanceParameter(IsotopicVector DistanceParameter); ///< Define mannually the weight for each ZAI in the distance calculation - void SetOldReadMethod(bool val) { fOldReadMethod = val;} // use the old reading method - void SetFissionEnergy(string FissionEnergyFile); // set Fission Energy using a file - void SetFissionEnergy(ZAI zai, double E); // set Fission Energy for a ZAI - void SetFissionEnergy(int Z, int A, int I, double E ) { SetFissionEnergy(ZAI(Z,A,I), E);} // set Fission Energy for a ZAI - void SetDataFileName(string name) { fDataFileName = name;} // Set the name of the reaction file - void SetDataDirectoryName(string name) { fDataDirectoryName = name;} // Set the Path to the reaction file - void SetShortestHalfLife(double halflife) { fShorstestHalflife = halflife;} // Set the Half Life cut - void LoadFPYield(string SponfaneusYield, string ReactionYield); // Build Fision Yields maps; + //{ + /// Define the way to decide if two isotopic vectors are close. + /*! + // The different algorythm are: + // \li 0 is for the standard norme, + // \li 1 for each ZAI weighted with its XS, + // \li 2 for each ZAI weighted with coefficient given by the user. + */ + void SetDistanceType(int DistanceType); + //} - void SetWeightedDistanceCalculation(bool val=true) { fWeightedDistance = val;} // Set weighted Distance calculation - void SetEvolutionDataInterpolation(bool val=true) { fEvolutionDataInterpolation = val;} // Set weighted Distance calculation -//********* Modification Method *********// + +//********* Evolution Method *********// + + //@} + /*! + \name Evolution Method + */ + //@{ + + IsotopicVector Evolution(const T &key, double dt); ///< Return the Product IsotopicVector evolution from zai during a dt time - void ReadDataBase(); ///< ... void CalculateDistanceParameter(); ///< Calcul of the weight for each ZAI in the distance calculation from the mean XS of the DataBank - void SetDistanceParameter(IsotopicVector DistanceParameter);///< Define mannually the weight for each ZAI in the distance calculation - void SetDistanceType(int DistanceType); ///< Define the way to decide if two isotopic vectors are close : - ///< 0 is for the standard norme, - ///< 1 for each ZAI weighted with its XS, - ///< 2 for each ZAI weighted with coefficient given by the user. - void BuildDecayMatrix(); + + + +//********* RK4 Method *********// + + //@} + /*! + \name RK4 Method + */ + //@{ + void UseRK4EvolutionMethod(bool usemethod = true) {fUseRK4EvolutionMethod = usemethod;} @@ -108,6 +227,8 @@ public : // \param t1: initial time // \param t2: final time */ + + void BuildEqns(double t, double *N, double *dNdt); void SetTheMatrixToZero(); //!< Initialize the evolution Matrix void ResetTheMatrix(); @@ -118,24 +239,38 @@ public : void ResetTheNucleiVector(); void SetTheNucleiVector(TMatrixT<double> NEvolutionMatrix); //!< Set the Evolution Matrix (Bateman equations) TMatrixT<double> GetTheNucleiVector(); //!< return the Evolution Matrix (Bateman equations) + //@} + + + + +//********* Other Method *********// + /*! + \name Other Method + */ + //@{ + void ReadDataBase(); ///< read the index file and fill the evolutionData map - - -//********* Printing Method *********// void Print() const; - + + //@} + + + + + protected : double fShorstestHalflife; int fZAIThreshold; //!< Highest Mass deal bye the evolution (default 90) - string fDataFileName; - string fDataDirectoryName; + string fDataFileName; ///< Name of the decay list + string fDataDirectoryName; ///< Path to the decay list file - map<T, EvolutionData> fDataBank; - map<T, EvolutionData> fDataBankCalculated; + map<T, EvolutionData> fDataBank; ///< DataBanck map + map<T, EvolutionData> fDataBankCalculated; ///< Map of the already calculated EvolutionData (to avoid recalculation...) - string fDataBaseIndex; + string fDataBaseIndex; ///< Name of the index bool fUseRK4EvolutionMethod; ///< if true use RK4 calculation, mtriciel unstead bool fOldReadMethod; ///< use old DB format @@ -143,20 +278,24 @@ protected : bool fEvolutionDataInterpolation; ///< USe XS weighted distance calculation - string fFuelType; - pair<double,double> fBurnUpRange; - vector<double> fFuelParameter; - int fDistanceType; ///< 0 is for the standard norm (Default = 0), - ///< 1 for each ZAI weighted with its XS, - ///< 2 for each ZAI weighted with coefficient given by the user. + string fFuelType; ///< Type of fuel of the DataBank + pair<double,double> fBurnUpRange; ///< Range of the Burn-up range of the DataBank + vector<double> fFuelParameter; ///< Parameter needed by the equivalence model + + + + int fDistanceType; ///< Set the distance calculation algorytm + /// \li 0 is for the standard norm (Default = 0), + /// \li 1 for each ZAI weighted with its XS, + /// \li 2 for each ZAI weighted with coefficient given by the user. IsotopicVector fDistanceParameter; ///< weight for each ZAI in the distance calculation - TMatrixT<double> fDecayMatrix; ///< Matrix with half life of each nuclei - map<ZAI, double > fFissionEnergy; ///< Store the Energy per fission use for the flux normalisation. - map<ZAI, map<ZAI, double> > fFastDecay; - map<ZAI, IsotopicVector> fSpontaneusYield; - map<ZAI, IsotopicVector> fReactionYield; + TMatrixT<double> fDecayMatrix; ///< Matrix with half life of each nuclei + map<ZAI, double > fFissionEnergy; ///< Store the Energy per fission use for the flux normalisation. + map<ZAI, map<ZAI, double> > fFastDecay; ///< Store the cut decay + map<ZAI, IsotopicVector> fSpontaneusYield; ///< Store the Spontaneus fission yield + map<ZAI, IsotopicVector> fReactionYield; ///< Store the reaction fission yield double *fTheNucleiVector; //!< The evolving atoms copied from Material proportions. @@ -170,19 +309,52 @@ protected : double fMinHdid; //!< store the effective RK min step bool fIsNegativeValueAllowed; //!< whether or not negative value are physical. - map<ZAI, int> findex_inver; - map<int, ZAI> findex; - + map<ZAI, int> findex_inver; ///< correspondance matrix from ZAI to the column (or line) of the different Reaction/Decay matrix + map<int, ZAI> findex; ///< correspondance matrix from the column (or line) of the different Reaction/Decay matrix to the ZAI + //{ + /// Return the Fission XS Matrix at the time TStep + /*! + // This Method extract the Fission Cross section of an EvolutionData at the set time + // \param EvolutionDataStep: EvolutionData + // \param TStep: time + */ TMatrixT<double> GetFissionXsMatrix(EvolutionData EvolutionDataStep,double TStep); + //} + + //{ + /// Return the Capture XS Matrix at the time TStep + /*! + // This Method extract the capture Cross section of an EvolutionData at the set time + // \param EvolutionDataStep: EvolutionData + // \param TStep: time + */ TMatrixT<double> GetCaptureXsMatrix(EvolutionData EvolutionDataStep,double TStep); + //} + + //{ + /// Return the n2n XS Matrix at the time TStep + /*! + // This Method extract the (n,2n) Cross section of an EvolutionData at the set time + // \param EvolutionDataStep: EvolutionData + // \param TStep: time + */ TMatrixT<double> Getn2nXsMatrix(EvolutionData EvolutionDataStep,double TStep); + //} - TMatrixT<double> ExtractXS(EvolutionData EvolutionDataStep,double TStep); + //{ + //! Returns a particular decay mode. + /*! + \param DecayModes : a list of decay modes with their branching ratios and isomeric state of the Daughters. + \param BR : branching ratio of the current decay mode + \param Iso : isomeric state of the Daughter of the current decay mode. + \param StartPos : the current decay mode to extract. + */ string GetDecay(string DecayModes, double &BR,int &Iso, int &StartPos); + //} - map< ZAI,IsotopicVector > ReadFPYield(string Yield); + map< ZAI,IsotopicVector > ReadFPYield(string Yield); ///< Read a CLASSYield file and return the correpsponding map }; diff --git a/source/trunk/include/EvolutionData.hxx b/source/trunk/include/EvolutionData.hxx index 3252ebb21..609ee1aba 100755 --- a/source/trunk/include/EvolutionData.hxx +++ b/source/trunk/include/EvolutionData.hxx @@ -3,11 +3,7 @@ /*! \file - \brief Header file for EvolutionData classes. - The aim of this Class is to manage evolution of a system, such as a radioactiv nuclei or a reactor. It store the evolution of daughter nuclei proportion as the function of time of the - - - @author BaM + \brief Header file for EvolutionData class. @version 2.0 */ @@ -31,7 +27,6 @@ typedef long long int cSecond; EvolutionData operator*(EvolutionData const& evol, double F); EvolutionData operator*(double F, EvolutionData const& evol); EvolutionData operator/(EvolutionData const& evol, double F); -//EvolutionData operator+(EvolutionData const& evol1, EvolutionData const& evol2); EvolutionData Sum(EvolutionData const& evol1, EvolutionData const& evol2); EvolutionData Multiply(EvolutionData const& evol, double F); EvolutionData Multiply(double F, EvolutionData const& evol); @@ -39,117 +34,211 @@ EvolutionData Multiply(double F, EvolutionData const& evol); double Distance(IsotopicVector IV1, EvolutionData Evd1 ); double Distance(EvolutionData Evd1, IsotopicVector IV1 ); +//-----------------------------------------------------------------------------// +/*! + Define a EvolutionData. + The aim of these class is describe the evolution of a single evoluting system in CLASS. + The system can either be a fuel evolution trough irradiation or a nuclei which produce, trough his decay, a large nuclei tree. + + The nuclei tree resulting of the evolution are stored in a map of ZAI and TGraph, each TGraph correspond to the evolution of the quantity of the associeted ZAI. + + @author BaM + @version 2.0 + */ +//________________________________________________________________________ + + + class EvolutionData : public CLSSObject { public : //********* Constructor/Destructor Method *********// - ///< Normal DB Constructor. - - EvolutionData(); - EvolutionData(LogFile* Log); ///< Make a new Evolutive Product evolution - EvolutionData(LogFile* Log, string DB_file, bool oldread = true, ZAI zai = ZAI(0,0,0) ); ///< Make a new Evolutive Product evolution - - ///< Normal Destructor. - ~EvolutionData(); + /*! + \name Constructor/Desctructor + */ + //@{ + + EvolutionData(); ///< Normal DB Constructor. + + + //{ + /// LogFile Constructor. + /*! + Use create an empty EvolutionData loading a LogFile + \param LogFile LogFile used for the log... + */ + EvolutionData(LogFile* Log); ///< Make a new Evolutive Product evolution + //} + + //{ + /// Special Constructor. + /*! + Make a new EvolutionData + \param Log LogFile used for the log... + \param DB_file path to the DataBase file + \param oldread true if the oldmethod should be use to read the DatBase File + \param zai set the ZAI if you want to add a stable nuclei. + */ + EvolutionData(LogFile* Log, string DB_file, bool oldread = true, ZAI zai = ZAI(0,0,0) ); + //} + + + //{ + /// Normal Destructor. + /*! + Only remove the map without deleting the pointer to TGraph... + One need to call the DeleteEvolutionData() method to fully delete the EvolutionData, and then avoiding memory leak... + */ + ~EvolutionData(); + //} + + //{ + /// Delete the EvolutionData. + /*! + Use to fully delete the EvolutionData and all associeted TGraph. + In some case needed to be called to avoid memory leak. + */ void DeleteEvolutionData(); + //} + + //@} + + //********* Set Method *********// - void SetReactorType(string reactortype) { fReactorType = reactortype; } - void SetFuelType(string fueltype) { fFuelType = fueltype; } - void SetPower(double power) { fPower = power; } - void SetFlux(TGraph* flux ) { fFlux = flux; } + /*! + \name Set Method + */ + //@{ - void SetEvolutionData(map<ZAI, TGraph*> maptoinsert) { fEvolutionData = maptoinsert;} - void SetFissionXS(map<ZAI, TGraph*> maptoinsert) { fFissionXS = maptoinsert;} - void SetCaptureXS(map<ZAI, TGraph*> maptoinsert) { fCaptureXS = maptoinsert;} - void Setn2nXS(map<ZAI, TGraph*> maptoinsert) { fn2nXS = maptoinsert;} - void SetCycleTime(cSecond cycletime) { fCycleTime = cycletime; } + void SetReactorType(string reactortype) { fReactorType = reactortype; } ///< Set the reactor Type (string) + void SetFuelType(string fueltype) { fFuelType = fueltype; } ///< Set the fuel Type (string) + void SetPower(double power) { fPower = power; } ///< Set the power of the EvolutionData (double) + void SetFlux(TGraph* flux ) { fFlux = flux; } ///< Set the neutron flux of the EvolutionData (double) + void SetCycleTime(cSecond cycletime) { fCycleTime = cycletime; } ///< Set cycletime of the EvolutionData (double) + + + void SetEvolutionData(map<ZAI, TGraph*> maptoinsert) { fEvolutionData = maptoinsert;}///< Set EvolutionData map + void SetFissionXS(map<ZAI, TGraph*> maptoinsert) { fFissionXS = maptoinsert;} ///< Set fission cross section map + void SetCaptureXS(map<ZAI, TGraph*> maptoinsert) { fCaptureXS = maptoinsert;} ///< Set capture cross section map + void Setn2nXS(map<ZAI, TGraph*> maptoinsert) { fn2nXS = maptoinsert;} ///< Set (n,2n) cross section map + + //@} - + + //********* Get Method *********// + + /*! + \name Get Method + */ + //@{ + #ifndef __CINT__ - map<ZAI ,TGraph* > GetEvolutionData() const { return fEvolutionData; } //!< - map<ZAI ,TGraph* > GetFissionXS() const { return fFissionXS; } //!< - map<ZAI ,TGraph* > GetCaptureXS() const { return fCaptureXS; } //!< - map<ZAI ,TGraph* > Getn2nXS() const { return fn2nXS; } //!< - TGraph* GetKeff() const { return fKeff; } - TGraph* GetFlux() const { return fFlux; } + map<ZAI ,TGraph* > GetEvolutionData() const { return fEvolutionData; } //!< return the EvolutionData map + map<ZAI ,TGraph* > GetFissionXS() const { return fFissionXS; } //!< return the fission cross section map + map<ZAI ,TGraph* > GetCaptureXS() const { return fCaptureXS; } //!< return the capture cross section map + map<ZAI ,TGraph* > Getn2nXS() const { return fn2nXS; } //!< return the (n,2n) cross section map + TGraph* GetKeff() const { return fKeff; } //!< return the evolution of the keff (TGraph*) + TGraph* GetFlux() const { return fFlux; } //!< return the evolution of the neutron flux (TGraph*) #endif - double GetFinalTime() const { return fFinalTime; } - double GetCycleTime() const { return fCycleTime; } - double GetPower() const { return fPower; } //!< - string GetDB_file() const { return fDB_file; } - string GetReactorType() const { return fReactorType; } - TGraph* GetEvolutionTGraph(const ZAI& zai); - ///< Return the A,Z product proportion evolution TGraph + double GetFinalTime() const { return fFinalTime; } //!< return the final time - last point (double) + double GetCycleTime() const { return fCycleTime; } //!< return the cycletime (double) + double GetPower() const { return fPower; } //!< return the power (double) + string GetDB_file() const { return fDB_file; } //!< return the name of the Database file (string) + string GetReactorType() const { return fReactorType; } //!< return the type of reactor (string) + TGraph* GetEvolutionTGraph(const ZAI& zai); //!< return the evolution of the ZAI quantity (TGraph*) + IsotopicVector GetIsotopicVectorAt(double t); ///< Return the Product IsotopicVector at t time - - double GetXSForAt(double t, ZAI zai, int ReactionId); ///< Return the XS for a reactionId on zai at t time - /// ReactionId : 1 Fission, - /// 2 Capture, - /// 3 (n, 2n) , + //{ + /// Return the XS for a reactionId on zai at t time + /*! + // This method cross section of a reaction for a ZAI at a time + // \param t time + // \param ZAI ZAI for which the cross section if asked + // \param ReactionId ID of the reaction asked - bool NucleiInsert(pair<ZAI, TGraph*> zaitoinsert); //!< - bool FissionXSInsert(pair<ZAI, TGraph*> zaitoinsert); - bool CaptureXSInsert(pair<ZAI, TGraph*> zaitoinsert); - bool n2nXSInsert(pair<ZAI, TGraph*> zaitoinsert); - + // The different reaction ID are : + \li 1 fission, + \li 2 capture, + \li 3 (n,2n). + */ + double GetXSForAt(double t, ZAI zai, int ReactionId); + //} + //@} + + + + +//********* Insertion Method *********// + + //@} + /*! + \name Insertion Method + */ + //@{ + + bool NucleiInsert(pair<ZAI, TGraph*> zaitoinsert); //!< Add a nuclei evolution to the evolution map + bool FissionXSInsert(pair<ZAI, TGraph*> zaitoinsert); //!< Add a nuclei to the fission cross section map + bool CaptureXSInsert(pair<ZAI, TGraph*> zaitoinsert); //!< Add a nuclei to the capture cross section map + bool n2nXSInsert(pair<ZAI, TGraph*> zaitoinsert); //!< Add a nuclei to the (n,2n) cross section map + + //@} -//********* Get Method *********// protected : - string fDB_file; + string fDB_file; ///!< path to the DataBase file #ifndef __CINT__ - map<ZAI ,TGraph* > fEvolutionData; //!< - map<ZAI ,TGraph* > fFissionXS; //!< - map<ZAI ,TGraph* > fCaptureXS; //!< - map<ZAI ,TGraph* > fn2nXS; //!< - TGraph* fKeff; - TGraph* fFlux; + map<ZAI ,TGraph* > fEvolutionData; //!< evolution map + map<ZAI ,TGraph* > fFissionXS; //!< fission cross section map + map<ZAI ,TGraph* > fCaptureXS; //!< capture cross section map + map<ZAI ,TGraph* > fn2nXS; //!< (n,2n) cross section map + TGraph* fKeff; //!< Keff evolution + TGraph* fFlux; //!< Flux evolution #endif - cSecond fFinalTime; - bool fIsCrossSection; + cSecond fFinalTime; ///< time of the last point + bool fIsCrossSection; ///< true if some cross section are present in the database - string fReactorType; - string fFuelType; - double fPower; - double fCycleTime; - double fNormFactor; + string fReactorType; ///< Type of reactor + string fFuelType; ///< Type of fuel + double fPower; ///< Power in W + double fCycleTime; ///< Cycle time of the DataBase + double fNormFactor; ///< Normalisation factor needed to represent to full core (unsless) - void OldReadDB(string DBfile); - void ReadDB(string DBfile, bool oldread = false); - void ReadKeff(string line, double* time, int NTimeStep); - void ReadFlux(string line, double* time, int NTimeStep); - void ReadInv(string line, double* time, int NTimeStep); - void ReadXSFis(string line, double* time, int NTimeStep); - void ReadXSCap(string line, double* time, int NTimeStep); - void ReadXSn2n(string line, double* time, int NTimeStep); - void ReadInfo(); + void OldReadDB(string DBfile); //!< Read old format database + void ReadDB(string DBfile, bool oldread = false); //!< Main function to read database + void ReadKeff(string line, double* time, int NTimeStep); //!< Read the Keff in the database + void ReadFlux(string line, double* time, int NTimeStep); //!< Read the Flux in the database + void ReadInv(string line, double* time, int NTimeStep); //!< Read the Inventory evolution in the database + void ReadXSFis(string line, double* time, int NTimeStep); //!< Read the fission cross section evolution in the database + void ReadXSCap(string line, double* time, int NTimeStep); //!< Read the capture cross evolution in the database + void ReadXSn2n(string line, double* time, int NTimeStep); //!< Read the (n,2n) cross evolution in the database + void ReadInfo(); //!< Read the info file of the database - double Interpolate(double t, TGraph& EvolutionGraph); - ///< Interpolating the value of EvolutionGraph at the t time - void AddAsStable(ZAI zai); + double Interpolate(double t, TGraph& EvolutionGraph); ///< Interpolating the value of EvolutionGraph at the t time + + void AddAsStable(ZAI zai); ///< USe when adding a EvolutionData of a stable nuclei (for "non" decay) ClassDef(EvolutionData,0); }; diff --git a/source/trunk/include/FabricationPlant.hxx b/source/trunk/include/FabricationPlant.hxx index cde3a296a..5ed11f952 100644 --- a/source/trunk/include/FabricationPlant.hxx +++ b/source/trunk/include/FabricationPlant.hxx @@ -2,13 +2,8 @@ #define __FabricationPlant_HXX__ /*! - \file + \file \brief Header file for FabricationPlant class. - - The aim of the Class is to manage evolution of FabricationPlant - - - @author BaM, Marc @version 2.0 */ @@ -30,7 +25,20 @@ using namespace std; typedef long long int cSecond; +//-----------------------------------------------------------------------------// +/*! + Define a FabricationPLant. + The aim of these class is describe the deal all the reprocessed fuel. + It includes the fabrication of the fuel from a stock of used fuel, using the aproprieted algrorythm, and the storage of this fuel before putting it into a reactor. + The parameter used for the fuel fabrication are recover from the DataBank. + The Databank MUST include an equivalence model to build the fuel. This model is not necessary provided, each user need to put his own. By default a equivalence model is provided for PWR MOX fuel. + + The FabricationPlant once the fuel is builded, also store the corresponding EvolutionData generated using the DataBank. + @author BaM + @version 2.0 + */ +//________________________________________________________________________ @@ -38,45 +46,99 @@ class FabricationPlant : public CLSSFacility { public : - ///< Normal constructor - FabricationPlant(); + +//********* Constructor/Destructor Method *********// + + /*! + \name Constructor/Desctructor + */ + //@{ + + FabricationPlant(); ///< Normal constructor + + + //{ + /// LogFile Constructor. + /*! + Use create an empty FabricationPlant loading a LogFile + \param LogFile LogFile used for the log... + */ FabricationPlant(LogFile* log); - + //} + + + //{ + /// Special Constructor. + /*! + Make a new FabricationPlant evolution + \param LogFile LogFile used for the log... + \param storage storage used to build the reprocessed fuel + \param reusable storage used to store all separated material not used in the fabrication process + \param fabricationtime duration of the fabrication process (2 years by default). + */ FabricationPlant(LogFile* log, Storage* storage, Storage* reusable, double fabricationtime = 365.25*24*3600*2); - ///< Normal Destructor. - ~FabricationPlant(); + //} + ~FabricationPlant(); ///< Normal Destructor. + //@} + + //********* Set Method *********// - void SetUpdateReferenceDBatEachStep(bool val){ fUpdateReferenceDBatEachStep = val;} + + /*! + \name Set Method + */ + //@{ + + void SetUpdateReferenceDBatEachStep(bool val){ fUpdateReferenceDBatEachStep = val;} //!< Set fUpdateReferenceDBatEachStep variable void SetStorage(Storage* storage) { fStorage = storage; } //!< Set the Pointer to the Storage void SetDecayDataBase(DataBank<ZAI>* ddb) { fDecayDataBase = ddb; } //!< Set the pointer to the Decay DataBase void SetChronologicalTimePriority(bool bval) { fChronologicalTimePriority = bval;} //!< Set the chronological priority (true for chronological, false unstead) - void SetSubstitutionFuel(EvolutionData fuel); + void SetSubstitutionFuel(EvolutionData fuel); //!< To use a subtition fuel if the fabrication fail (not enough material in stock) void AddReactor(int reactorid, double creationtime) { fReactorNextStep.insert( pair<int,cSecond> (reactorid, (cSecond)creationtime-GetCycleTime() ) ); } //!< Add a new reactor + //@} + + + //********* Get Method *********// - Storage* GetStorage() { return fStorage; } //!< Return the Pointer to the Storage + /*! + \name Get Method + */ + //@{ + + Storage* GetStorage() { return fStorage; } //!< Return the Pointer to the Storage map<int, IsotopicVector > GetReactorFuturIncome() const { return fReactorFuturIV;} //!< Return the List of the Futur Fuel IV + DataBank<ZAI>* GeDecayDataBase() const { return fDecayDataBase; } //!< Return the pointer to the DecayDB - IsotopicVector GetFullFabrication(); + IsotopicVector GetFullFabrication(); //!< Return the Sum of all Fuel waiting to be put in a reator EvolutionData GetReactorEvolutionDB(int ReactorId); //!< Return the EvolutionData of Reactor ReactorId - + //@} + + -//---------- FabricationPlant ----------// + + +//********* Fabrication & Evolution Method *********// + + /*! + \name Fabrication & Evolution Method + */ + //@{ void AddValorisableIV(ZAI zai, double factor); ///< Add Valorisable Element void Evolution(cSecond t); //!< Perform the Evolution @@ -87,17 +149,13 @@ public : EvolutionData BuildEvolutiveDB(int ReactorId, IsotopicVector isotopicvector); //!< Build the Evolution Database for the Reactir ReactorId Fuel void TakeReactorFuel(int ReactorId) ; //!< Remove the Fuel of reactor ReactorId - - -//********* Other Method *********// - - + //@} protected : - bool fUpdateReferenceDBatEachStep; + bool fUpdateReferenceDBatEachStep; ///< Set to true if the Reference Evolution Product must be updated at each calculation step (in the DataBank calculation) //********* Internal Parameter *********// map<ZAI ,double> fValorisableIV; ///< The Valorisable Table @@ -116,16 +174,23 @@ protected : // double fFabricationTime; ///< Fabrication Duration Time bool fChronologicalTimePriority; //!< Set the Chronological Priotity (for the Stock Management) or the anti-chronological one - bool fSubstitutionFuel; - EvolutionData fSubstitutionEvolutionData; + bool fSubstitutionFuel; //!< true if a subtitution fuel as been set + EvolutionData fSubstitutionEvolutionData; //!< EvolutionData of the subtitution fuel //********* Private Method *********// IsotopicVector GetDecay(IsotopicVector isotopicvector, cSecond t); //!< Get IsotopicVector Decay at the t time void FabricationPlantEvolution(cSecond t); //!< Deal the FabricationPlant Evolution - pair<IsotopicVector, IsotopicVector> Separation(IsotopicVector isotopicvector); //!< Make the Separation - //!< return IV[0] -> To Stock / IV[1] -> To Waste + //{ + /// Separation Method + /*! + Make the Separation + \li IV[0] -> To Stock + \li IV[1] -> To Waste + */ + pair<IsotopicVector, IsotopicVector> Separation(IsotopicVector isotopicvector); + //} ClassDef(FabricationPlant,2); }; diff --git a/source/trunk/include/IsotopicVector.hxx b/source/trunk/include/IsotopicVector.hxx index 8f2fb1570..181884c56 100755 --- a/source/trunk/include/IsotopicVector.hxx +++ b/source/trunk/include/IsotopicVector.hxx @@ -5,8 +5,7 @@ /*! \file \brief Header file for IsotopicVector class. - The aim of this Class is to manage any kind of IsotopicVector, and any operation between them : sum, substraction.... - + @author BaM, Marc @version 2.0 */ @@ -19,6 +18,16 @@ using namespace std; typedef long long int cSecond; +//-----------------------------------------------------------------------------// +/*! + Define a Isotopicvector. + The aim of this Class is to manage any kind of IsotopicVector, and any operation between them : sum, substraction.... + + @author BaM + @version 2.0 + */ +//________________________________________________________________________ + class IsotopicVector : public TObject @@ -26,30 +35,54 @@ class IsotopicVector : public TObject public : //********* Constructor/Destructor Method *********// - ///< Normal Constructor. - IsotopicVector(); - - ///< Normal Destructor. - ~IsotopicVector(); - + /*! + \name Constructor/Desctructor + */ + //@{ + + IsotopicVector(); ///< Normal Constructor. + + + ~IsotopicVector(); ///< Normal Destructor. + + //@} + + //********* Get Method *********// + /*! + \name Get Method + */ + //@{ + map<ZAI ,double> GetIsotopicQuantity() const { return fIsotopicQuantity; } //!< Return the IVQuantity map map<ZAI ,double> GetIsotopicQuantityNeeded() const { return fIsotopicQuantityNeeded; } //!< Return the IVQuantityNeeded map IsotopicVector GetSpeciesComposition(int z) const; //!< Return the Species composition of the "z" atom vector<ZAI> GetZAIList() const; //!< Return the list of ZAI present in the IV - IsotopicVector GetActinidesComposition() const; //!< Return the Actinides composition of the "z" atom - double GetZAIIsotopicQuantity(const ZAI& zai) const; ///< Return the composition of the IsotopicVector - double GetZAIIsotopicQuantity(const int z, const int a, const int i) const; ///< Return the composition of the IsotopicVector + IsotopicVector GetActinidesComposition() const; //!< Return the Actinides composition of the "z" atom + double GetZAIIsotopicQuantity(const ZAI& zai) const; ///< Return the quantity of the ZAI + double GetZAIIsotopicQuantity(const int z, const int a, const int i) const; ///< Return the quantity of the ZAI + + vector<int> GetChemicalSpecies() const; //!< Return the Species Species contained + int GetZAIQuantity() {return fIsotopicQuantity.size(); } //!< Return the number of different ZAI in the IsotopicVector + + double GetSumOfAll(); //!< Return the Sum of nuclei in the IsotopicVector + + //@} + + + - vector<int> GetChemicalSpecies() const; //!< Return the Species Species contained - int GetZAIQuantity() {return fIsotopicQuantity.size(); } +//********* Internal Operation Method *********// - double GetSumOfAll(); + /*! + \name Internal Operation Method + */ + //@{ -//********* Modification Method *********// - void Clear(); //!< Empty all the IV + + void Clear(); //!< Empty all the IV void ClearNeed(); //!< Empty Need componant of the IV void Add(const ZAI& zai, double quantity); //!< Add Quantity gramme of the ZAI Element @@ -65,21 +98,31 @@ public : void Remove(const IsotopicVector& isotopicvector); //!< Remove IsotopicVector to the existing IsotopicVector void Multiply(double factor); //!< Multiply the IV by a Factor - - void Write(string filename, cSecond time = -1 ) const; ///< Write the Content of the IV in the filename file - - void Print(string o =" ") const ; ///< Print the composition of the IV - void PrintList(string o =" ") const ; ///< Print the composition of the IV - - -//******* Set Operator between IsotopicVector *******// - IsotopicVector& operator+=(IsotopicVector const& IVb); //!<.... IsotopicVector& operator-=(IsotopicVector const& IVb); //!<.... bool operator <(const IsotopicVector& isotopicvector) const; //!< IsotopicVector Comparator + //@} + + + +//********* In/Out related Method *********// + + /*! + \name In/Out Method + */ + //@{ + + void Write(string filename, cSecond time = -1 ) const; ///< Write the Content of the IV in the filename file + + void Print(string o =" ") const ; ///< Print the composition of the IV + void PrintList(string o =" ") const ; ///< Print the composition of the IV + + //@} + + //***************************************************///< diff --git a/source/trunk/include/LogFile.hxx b/source/trunk/include/LogFile.hxx index e48c368ec..3fca5f567 100755 --- a/source/trunk/include/LogFile.hxx +++ b/source/trunk/include/LogFile.hxx @@ -6,8 +6,7 @@ /*! \file \brief Header file for LogFile class. - The aim of this Class is to centralize the all CLASS software message inside a file. - + @author BaM @version 2.0 @@ -18,22 +17,53 @@ #include "stdlib.h" using namespace std; +//-----------------------------------------------------------------------------// +/*! + Define a LogFile. + The aim of this class is to centralize the all CLASS software message inside a file. + + + @author BaM + @version 2.0 + */ +//________________________________________________________________________ + + class LogFile { public: - //!< Normal Constructor - LogFile(string LogFileName ); - //!< Normal Destructor - ~LogFile(); - - string GetLogFileName() const { return fLogFileName; } + //********* Constructor/Destructor Method *********// + + /*! + \name Constructor/Desctructor + */ + //@{ + + + LogFile(string LogFileName ); //!< Normal Constructor + + ~LogFile(); //!< Normal Destructor + + //@} + + //********* In/Out Method *********// + + /*! + \name In/Out + */ + //@{ + + string GetLogFileName() const { return fLogFileName; } //!w return the logfile name std::ofstream fLog; //!< Log Stream - + + //@} + private : - string fLogFileName; + + string fLogFileName; //!< Log File name }; #endif diff --git a/source/trunk/include/Pool.hxx b/source/trunk/include/Pool.hxx index 57ccc2175..95a9c59ea 100755 --- a/source/trunk/include/Pool.hxx +++ b/source/trunk/include/Pool.hxx @@ -1,21 +1,10 @@ #ifndef __Pool_HXX__ #define __Pool_HXX__ - - /*! \file \brief Header file for Pool class. - - The aim of the Class is to manage evolution of all out reactor fuel. from Cooling to Waste or storage - - - @author BaM - @version 2.0 */ - - - #include <string> #include <map> @@ -31,29 +20,85 @@ class LogFile; template <class T> class DataBank; +//-----------------------------------------------------------------------------// +/*! + Define a Pool. + The aim of the Class is to manage evolution of all out reactor fuel. from Cooling to Waste or storage + + + @author BaM + @version 2.0 + */ +//________________________________________________________________________ + class Pool : public CLSSFacility { public : - ///< Normal constructor - Pool(); + + +//********* Constructor/Destructor Method *********// + + /*! + \name Constructor/Desctructor + */ + //@{ + + Pool(); ///< Normal Constructor. + + + //{ + /// LogFile Constructor. + /*! + Use create an empty Pool loading a LogFile + \param LogFile LogFile used for the log... + */ Pool(LogFile* log); - ///< Advanced Constructor - Pool(LogFile* log, double abstime, + //} + + + //{ + /// Special Constructor. + /*! + Make a new EvolutionData + \param Log LogFile used for the log... + \param abstime time to start the Pool + \param coolingtime duration of the cooling. + */ + Pool(LogFile* Log, double abstime, double coolingtime = 5*3600.*24.*365.25); //!< - + //} + + + //{ + /// Special Special Constructor. + /*! + Make a new EvolutionData + \param Log LogFile used for the log... + \param Storage storage which get the fuel after the cooling + \param abstime time to start the Pool + \param coolingtime duration of the cooling. + */ Pool(LogFile* log, Storage* Storage, double abstime = 0, double coolingtime = 5*3600.*24.*365.25); //!< + //} + + + ~Pool(); ///< Normal Destructor. + //@} - ///< Normal Destructor. - ~Pool(); - //********* Set Method *********// + + /*! + \name Set Method + */ + //@{ + void SetStorage(Storage* storage) { fStorage = storage; fPutToWaste = true; } //!< Set the Pointer to the Storage void SetPutToWaste(bool val) { fPutToWaste = val; } //!< Set True if IV goes to waste after cooling false instead @@ -61,22 +106,38 @@ public : void SetCoolingTime(double time) { SetCycleTime((cSecond)time); } //!< Set Cooling Time + //@} + + + + //********* Get Method *********// + + /*! + \name Get Method + */ + //@{ + Storage* GetStorage() const { return fStorage; } //!< Return the Pointer to the Storage bool GetPutToWaste() const { return fPutToWaste; } //!< Return True if IV goes to waste after cooling false instead - - - cSecond GetCoolingTime() const { return GetCycleTime(); } //!< Return the Cooling Time + cSecond GetCoolingTime() const { return GetCycleTime(); } //!< Return the Cooling Time DataBank<ZAI>* GeDecayDataBase() const { return fDecayDataBase; } //!< Return the pointer to the Decay DataBase + //@} -//********* IsotopicVector Method *********// -//--------- Cooling ---------// + +//********* IsotopicVector Managment Method *********// + + /*! + \name IsotopicVector Managment Method + */ + //@{ + vector<cSecond> GetCoolingStartingTime() const { return fCoolingStartingTime; } //!< Return the vector of Cooling Sstarting Time vector<IsotopicVector> GetIVCooling() const { return fIVCooling; } //!< Return the vector of Cooling IsotopicVector @@ -84,21 +145,31 @@ public : void RemoveIVCooling(int i); //!< Remove a Cooling IsotopicVector IsotopicVector GetFullCooling() {return GetInsideIV(); } + //@} + + + //********* Other Method *********// + + //@} + /*! + \name Other Method + */ + //@{ + void Evolution(cSecond t); //!< Performe the evolution until the Time t void Dump(); //!< Write Modification (exchange between Cooling, Separation and Storage) - + //@} + protected : //********* Internal Parameter *********// - Storage* fStorage; //!< Pointer to the Stock - bool fPutToWaste; //!< True if IV goes to waste after cooling false instead - // LogFile* fLog; //!< Pointer to the Log - + Storage* fStorage; //!< Pointer to the Stock + bool fPutToWaste; //!< True if IV goes to waste after cooling false instead DataBank<ZAI>* fDecayDataBase; //!< Pointer to the Decay DataBase diff --git a/source/trunk/include/Reactor.hxx b/source/trunk/include/Reactor.hxx index 0fcf1e941..b1c3bdf5f 100755 --- a/source/trunk/include/Reactor.hxx +++ b/source/trunk/include/Reactor.hxx @@ -4,11 +4,6 @@ /*! \file \brief Header file for reactor classes. - Define a reactor. - - - @author BaM - @version 2.0 */ #include <string> @@ -31,36 +26,129 @@ class FabricationPlant; class Storage; class LogFile; +//-----------------------------------------------------------------------------// +/*! + Define a reactor. + The aim of this class is to deal the evolution of the fuel inside a reactor. + The fuel state of the reactor is describe in the IsotopicVector. Its evolution is contain in the EvolutionData + + @author BaM + @version 2.0 + */ +//________________________________________________________________________ + + + class Reactor : public CLSSFacility { public : - ///< Normal Constructor. - Reactor(); + + +//********* Constructor/Destructor Method *********// + + /*! + \name Constructor/Desctructor + */ + //@{ + + Reactor(); ///< Normal Constructor. + + //{ + /// LogFile Constructor. + /*! + Use create an empty Reactor loading a LogFile + \param LogFile LogFile used for the log... + */ Reactor(LogFile* log); - ///< Advbanced Constructor. + //} + + //{ + /// Special Constructor for reprocessed fuel. + /*! + Make a new reactor + \param LogFile LogFile used for the log... + \param fueltypeDB Databank describing the evolution of the fuel + \param Pool Pool used for the cooling of the fuel after iradiation + \param creationtime creation time + \param lifetime working time duration. + */ Reactor(LogFile* log, DataBank<IsotopicVector>* fueltypeDB, FabricationPlant* fabricationplant, Pool* Pool, - double creationtime , double lifetime); //!< - + double creationtime , double lifetime); + //} + + //{ + /// Special Constructor for reprocessed fuel using cycletime and Burn-Up. + /*! + Make a new reactor + \param LogFile LogFile used for the log... + \param fueltypeDB Databank describing the evolution of the fuel + \param Pool Pool used for the cooling of the fuel after iradiation + \param creationtime creation time + \param lifetime working time duration. + \param cycletime duration of a cycle + \param HMMass Mass of Heavy Metal in the Reactor + \param BurnUp Burnup reach by the fuel at the end of the cycle + */ Reactor(LogFile* log, DataBank<IsotopicVector>* fueltypeDB, FabricationPlant* fabricationplant, Pool* Pool, double creationtime , double lifetime, double cycletime, - double HMMass, double BurnUp); //!< - + double HMMass, double BurnUp); + //} + + //{ + /// Special Constructor for reprocessed fuel using Power and Burn-Up. + /*! + Make a new reactor + \param LogFile LogFile used for the log... + \param fueltypeDB Databank describing the evolution of the fuel + \param Pool Pool used for the cooling of the fuel after iradiation + \param creationtime creation time + \param lifetime working time duration. + \param Power Thermal power of the reactor + \param HMMass Mass of Heavy Metal in the Reactor + \param BurnUp Burnup reach by the fuel at the end of the cycle + \param ChargeFactor effective charge of the reactor. + */ Reactor(LogFile* log, DataBank<IsotopicVector>* fueltypeDB, FabricationPlant* fabricationplant, Pool* Pool, double creationtime , double lifetime, - double Power, double HMMass, double BurnUp, double ChargeFactor); //!< - + double Power, double HMMass, double BurnUp, double ChargeFactor = 1); + //} + + //{ + /// Special Constructor for fixed fuel using Power and Burn-Up. + /*! + Make a new reactor + \param LogFile LogFile used for the log... + \param evolutivedb EvolutionData describing the evolution of the fuel + \param Pool Pool used for the cooling of the fuel after iradiation + \param creationtime creation time + \param lifetime working time duration. + \param Power Thermal power of the reactor + \param HMMass Mass of Heavy Metal in the Reactor + \param BurnUp Burnup reach by the fuel at the end of the cycle + \param ChargeFactor effective charge of the reactor. + */ Reactor(LogFile* log, EvolutionData evolutivedb, Pool* Pool, double creationtime, double lifetime, - double power, double HMMass, double BurnUp, double ChargeFactor); + double power, double HMMass, double BurnUp, double ChargeFactor = 1); + //} + + ~Reactor(); ///< Normal Destructor + + //@} + + - ///< Normal Destructor - ~Reactor(); - //********* Get Method *********// + + /*! + \name Get Method + */ + //@{ + IsotopicVector GetIVReactor() const { return GetInsideIV(); } //!< Return the IV contain in the Reactor IsotopicVector GetIVBeginCycle() const { return fIVBeginCycle; } //!< Return the Starting Cycle IV //!< (Note : IVBegin != IVIn, only if using charging plan) @@ -81,8 +169,18 @@ public : double GetBurnUp() const { return fBurnUp; } //!< Return the Burn Up of the Fuel at the end of the cycle double GetPower() const { return fPower; } //!< Return the cycle time of the Reactor + //@} + + + //********* Set Method *********// + + /*! + \name Set Method + */ + //@{ + void SetStorage(Storage* storage) { fStorage = storage; fIsStorage = true;} //!< Set the Pointer to the Storage void SetIVReactor(IsotopicVector isotopicvector) { fInsideIV = isotopicvector; } //!< Set the IV inside the Reactor Core @@ -96,20 +194,30 @@ public : void SetPower(double Power); //!< Set the Power void SetHMMass(double Mass) {fHeavyMetalMass = Mass;} //!< Set the HeavyMetal Mass in the Core at the begining of the cycle void SetBurnUp(double BU) {fBurnUp = BU;} //!< Set the the Burn Up of the Fuel at the end of the cycle + //@} + -//********* Modification Method *********// + + +//********* Evolution & Modification Method *********// + + /*! + \name Evolution & Modification Method + */ + //@{ + void Evolution(cSecond t); //!< Performe the Evolution until the Time t void Dump(); //!< Write Modification (IV In/Out, filling the TF...) void SetNewFuel(EvolutionData ivdb); //!< Change the Evolutive DB of the Reactor - -//********* Other Method *********// - - + //@} + + + protected : - bool fFixedFuel; - bool fIsStorage; + bool fFixedFuel; //!< true if the fuel is fixed (not reprocessed) + bool fIsStorage; //!< true if a storage has been define (to approximate the reprocessing using fixed fuel) //********* Internal Parameter *********// Pool* fAssociedPool; //!< Pointer to the TF which collect the spend fuel diff --git a/source/trunk/include/Storage.hxx b/source/trunk/include/Storage.hxx index a473958cf..99d49722a 100644 --- a/source/trunk/include/Storage.hxx +++ b/source/trunk/include/Storage.hxx @@ -4,12 +4,6 @@ /*! \file \brief Header file for Storage class. - - The aim of the Class is to manage evolution of Storage - - - @author BaM - @version 2.0 */ @@ -27,53 +21,146 @@ class LogFile; template <class T> class DataBank; +//-----------------------------------------------------------------------------// +/*! + Define a Storage. + The aim of this class is to deal the store used fuel after the cooling dealing the evolution of all radiaoactive nuclei. + + @author BaM + @version 2.0 + */ +//________________________________________________________________________ + + class Storage : public CLSSFacility { public : - ///< Normal Constructor. - Storage(); + + +//********* Constructor/Destructor Method *********// + + /*! + \name Constructor/Desctructor + */ + //@{ + + Storage(); ///< Normal Constructor. + + //{ + /// LogFile Constructor. + /*! + Use create an empty Stotarage loading a LogFile + \param LogFile LogFile used for the log... + */ Storage(LogFile* log); - ///< Advanced Constructor - Storage(LogFile* log, DataBank<ZAI>* evolutivedb); //!< + //} + + + //{ + /// Special Constructor. + /*! + Make a new reactor + \param LogFile LogFile used for the log... + \param evolutivedb DataBank for decay management + */ + Storage(LogFile* log, DataBank<ZAI>* evolutivedb); + //} + + + ~Storage(); ///< Normal Destructor. + + //@} - ///< Normal Destructor. - ~Storage(); //********* Set Method *********// + /*! + \name Set Method + */ + //@{ + void SetDecayDataBase(DataBank<ZAI>* ddb) { fDecayDataBase = ddb; } //!< Set the pointer to the Decay DataBase void SetStock(vector<IsotopicVector> IVsstock) { fIVStock = IVsstock; } //!< Set The Storage isotopicVector + //@} + + + + //********* Get Method *********// + + /*! + \name Get Method + */ + //@{ - //!< DataBank<ZAI>* GeDecayDataBase() const { return fDecayDataBase; } //!< Return the pointer to the Decay DataBase vector<IsotopicVector> GetStock() const { return fIVStock; } //!< Return the Storage IsotopicVector IsotopicVector GetFullStock() const { return GetInsideIV(); } //!< Return the Full Storage -//********* IsotopicVector Method *********// + //@} + -//---------- Storage ----------// - void ClearStock(); +//********* Storage specific Method *********// + + /*! + \name Storage specific Method + */ + //@{ + + void ClearStock(); //!< Empty the stock removing all fuel stored void AddToStock(ZAI zai, double quantity) { AddToStock(zai*quantity); } //!< Add a ZAI*quantity to the Storage void AddToStock(IsotopicVector isotopicvector); //!< Add an Isotopicvector to the Storage - void AddToFullStock(ZAI zai, double quantity) { fInsideIV += zai*quantity; } //!< Add a ZAI*quantity to the Storage + void AddToFullStock(ZAI zai, double quantity) { fInsideIV += zai*quantity; } //!< Add a ZAI*quantity to the Storage void AddToFullStock(IsotopicVector isotopicvector) { fInsideIV += isotopicvector; } //!< Add a IsotopicVector to the Storage void TakeFractionFromStock(int IVId,double fraction); //!< Take a part from an IV in sotck; void TakeFromStock(IsotopicVector isotopicvector); //!< - void Write(string filename,cSecond date = -1); + + //@} + + + + +//********* Evolution Method *********// + + /*! + \name Evolution Method + */ + //@{ -//********* Other Method *********// void Evolution(cSecond t); //!< Performe the evolution until the Time t - - + + //@} + + + + + //********* In/Out Method *********// + + /*! + \name In/Out Method + */ + //@{ + + //{ + /// Write the Isotope composition of all IsotopicVector stored. + /*! + Make a new reactor + \param filenam LogFile used for the log... + \param data only use to srite a date in the file, theyr is not treatment of the date in this method.... + */ + void Write(string filename,cSecond date = -1); + //} + + //@} + protected : //********* Internal Parameter *********// @@ -84,7 +171,7 @@ protected : //********* Isotopic Quantity *********// //---------- Storage ----------// - vector<IsotopicVector> fIVStock; + vector<IsotopicVector> fIVStock; ///< Vector containning all the fuel stored. diff --git a/source/trunk/include/ZAI.hxx b/source/trunk/include/ZAI.hxx index 37749e302..b31e56229 100755 --- a/source/trunk/include/ZAI.hxx +++ b/source/trunk/include/ZAI.hxx @@ -4,11 +4,6 @@ /*! \file \brief Header file for ZAI classes. - Define a nuclei as : Z A I. - - - @author BaM - @version 2.0 */ #include <string> @@ -17,20 +12,33 @@ using namespace std; +//-----------------------------------------------------------------------------// +/*! + Define a nuclei as : Z A I. + The aim of this class is to discribe each ZAI. + @author BaM + @version 2.0 + */ +//________________________________________________________________________ -///< A ZAI defined for a Nucleus. -/*! -*/ class ZAI : public TObject { - - - public: - ///< Default constructor - ZAI(); +public: + + +//********* Constructor/Destructor Method *********// + + /*! + \name Constructor/Desctructor + */ + //@{ + + ZAI(); ///< Default constructor + + //{ ///< Normal Constructor. /*! Default: No parent @@ -38,9 +46,13 @@ class ZAI : public TObject \param A : number of nucleons (A=0 means natural isotopes) */ ZAI(int Z, int A, int I=0); + //} + + + ~ZAI(); ///< Normal Destructor. - ///< Normal Destructor. - ~ZAI(); + +//********* ZAI main attributes Method *********// /*! \name ZAI main attributes @@ -53,6 +65,8 @@ class ZAI : public TObject void SetMass(double m) { fMass=m; } ///< set the mass of a ZAI double GetMass(); ///< get the mass of a ZAI + //@} + ZAI operator=(ZAI IVa); //!< ... diff --git a/source/trunk/src/CLSSObject.cxx b/source/trunk/src/CLSSObject.cxx index 49f7d2ca7..0409cfb44 100644 --- a/source/trunk/src/CLSSObject.cxx +++ b/source/trunk/src/CLSSObject.cxx @@ -18,5 +18,6 @@ ClassImp(CLSSObject) CLSSObject::CLSSObject() { fLog = 0; + fIsLog = false; } diff --git a/source/trunk/src/DataBank.cxx b/source/trunk/src/DataBank.cxx index 215e36f1f..296feac4e 100755 --- a/source/trunk/src/DataBank.cxx +++ b/source/trunk/src/DataBank.cxx @@ -76,13 +76,12 @@ DataBank<ZAI>::DataBank(LogFile* Log, string DB_index_file, bool setlog, bool ol { SetLog(Log); - IsLog(setlog); fDataBaseIndex = DB_index_file; fOldReadMethod = olfreadmethod; // Warning - if(PrintLog()) + if(IsLog()) { cout << "!!INFO!! !!!DataBank<ZAI>!!! A EvolutionData<ZAI> has been define :" << endl; cout << "\t His index is : \"" << DB_index_file << "\"" << endl << endl; @@ -230,8 +229,6 @@ template<> DataBank<IsotopicVector>::DataBank(LogFile* Log, string DB_index_file, bool setlog, bool olfreadmethod):DynamicalSystem() { SetLog(Log); - IsLog(setlog); - fWeightedDistance = false; fEvolutionDataInterpolation = false; @@ -256,7 +253,7 @@ DataBank<IsotopicVector>::DataBank(LogFile* Log, string DB_index_file, bool setl SetForbidNegativeValue(); - if(PrintLog()) + if(IsLog()) { // Warning cout << "!!INFO!! !!!DataBank<IsotopicVector>!!! A EvolutionData<ZAI> has been define :" << endl; @@ -1212,60 +1209,6 @@ TMatrixT<double> DataBank<IsotopicVector>::Getn2nXsMatrix(EvolutionData Evolutio return BatemanMatrix; } -//________________________________________________________________________ -template<> -TMatrixT<double> DataBank<IsotopicVector>::ExtractXS(EvolutionData EvolutionDataStep,double TStep) -{ - - - map<ZAI ,TGraph* >::iterator it; - // ---------------- A(n,.) X+Y - - map<ZAI ,TGraph* > FissionXS = EvolutionDataStep.GetFissionXS(); - - TMatrixT<double> SigmaPhi = TMatrixT<double>(findex.size()*3+1,1); - for(it = FissionXS.begin() ; it != FissionXS.end(); it++) - { - - if( findex_inver.find( (*it).first ) != findex_inver.end() ) - { - double y; - y = (*it).second->Eval(TStep); - SigmaPhi[findex_inver.find( (*it).first )->second][0] = y ; - } - - } - - // ---------------- A(n,.)A+1 - map<ZAI ,TGraph* > CaptureXS = EvolutionDataStep.GetCaptureXS(); - for(it = CaptureXS.begin(); it != CaptureXS.end(); it++) - { - if( findex_inver.find( (*it).first ) != findex_inver.end() ) - { - double y; - y = (*it).second->Eval(TStep); - SigmaPhi[findex_inver.find( (*it).first )->second + findex.size() ][0] = y ; - - } - } - - // ---------------- A(n,2n)A-1 - map<ZAI ,TGraph* > n2nXS = EvolutionDataStep.Getn2nXS(); - for(it = n2nXS.begin() ; it != n2nXS.end(); it++) - { - if( findex_inver.find( (*it).first ) != findex_inver.end() ) - { - double y; - y = (*it).second->Eval(TStep); - SigmaPhi[findex_inver.find( (*it).first )->second + findex.size() + findex.size()][0] = y ; - - } - } - return SigmaPhi; -} - - - //________________________________________________________________________ -- GitLab