CLASS  5.1
Fuel Cycle Simulator
FabricationPlant.hxx
Go to the documentation of this file.
1 #ifndef _FabricationPlant_
2 #define _FabricationPlant_
3 
10 #include <vector>
11 #include <map>
12 
13 #include "CLASSConstante.hxx"
14 #include "CLASSFacility.hxx"
15 #include "IsotopicVector.hxx"
16 #include "EvolutionData.hxx"
17 #include "Scenario.hxx"
18 #include "Storage.hxx"
19 #include "Reactor.hxx"
20 #include "CLASSLogger.hxx"
21 #include "ZAI.hxx"
22 
23 using namespace std;
24 typedef long long int cSecond;
25 
26 //_________________________________________________________________________________________________________
28 
49 //________________________________________________________________________
50 
52 
63 
64 class DecayDataBank;
65 class FuelDataBank;
66 
67 
69 {
70 
71 public :
72 
73 //********* Constructor/Destructor Method *********//
74 
79 
81 
82  //{
84 
89  FabricationPlant(CLASSLogger* log, double fabricationtime = cYear*2);
90  //}
91 
92  ~FabricationPlant();
93 
95 
96 //********* Set Method *********//
97 
102 #ifndef __ROOTCLING__
103  void SetDecayDataBank(DecayDataBank* decayDB) {fDecayDataBase = decayDB;}
104  void SetSubstitutionMaterialFromIV(string keyword, IsotopicVector SubstitutionIV)
105  {fSubstitutionMaterialFromIV[keyword] = true; fSubstitutionIV[keyword]= SubstitutionIV;}
106 #endif
107  void SetFiFo(bool bval = true) { if(bval) fStorageManagement=kpFiFo; else fStorageManagement=kpLiFo ;}
108  void SetStorageManagement(StorageManagement SM){fStorageManagement = SM ;}
109 
110 
111  void SetSubstitutionFuel(EvolutionData fuel);
112 
113  void SetSeparationManagement(bool bval = true) { fIsSeparationManagement = bval;}
114 
115  void SetImpuritiesTolerance(double val) {fImpuritiesTolerance = val;}
116 
117 #ifndef __ROOTCLING__
118  void AddReactor(int reactorid, double creationtime)
119  { fReactorNextStep.insert( pair<int,cSecond> (reactorid, (cSecond)creationtime-GetCycleTime() ) ); }
120 
121  void SetReUsableStorage(Storage* store) { fReUsable = store; fIsReusable = true;}
122 #endif
123 
124  using CLASSFacility::SetName;
125 
127 
128 #ifndef __ROOTCLING__
129 
130  void AddStorage(string keyword, Storage* Stock, double MassFractionMin = 0, double MassFractionMax = 1., int Priority = 0) ;
131  void AddInfiniteStorage(string keyword, double MassFractionMin = 0, double MassFractionMax = 1., int Priority = 0);
132  void AddStorage(string keyword, Storage* Stock, double MassFraction = 0., int Priority = 0) ;
133  void AddInfiniteStorage(string keyword, double MassFraction = 0., int Priority = 0);
134  void AddFuelBuffer(string keyword);
135  void AddFuelBuffer(string keyword, Storage* Stock);
136 
137 
138 #endif
139 
140 //********* Get Method *********//
141 
146 
147 
148  double GetImpuritiesTolerance() { return fImpuritiesTolerance;}
149 #ifndef __ROOTCLING__
150  map < string , vector <Storage*> > GetAllStorage() {return fStorage;}
151 
152  vector<Storage*> GetStorage(string keyword) { return fStorage[keyword]; }
153 
154  EvolutionData GetReactorEvolutionDB(int ReactorId);
155 
156  StorageManagement GetStorageManagement(){return fStorageManagement;}
157 
158  IsotopicVector GetDecay(IsotopicVector isotopicvector, cSecond t);
159 
160  map<int, IsotopicVector > GetReactorFuturIncome() const
161  { return fReactorFuturIV;}
162 
163 
164  map < string, double> GetStreamListFPMassFractionMax(){return fStreamListFPMassFractionMax;}
165  map < string, double> GetStreamListFPMassFractionMin(){return fStreamListFPMassFractionMin;}
166 #endif
167 
169 
170 //********* Fabrication & Evolution Method *********//
171 
176  void SetSeparationEfficiency(IsotopicVector IV, cSecond TimeOfSep);
177  IsotopicVector GetSeparationEfficiencyAt(cSecond time);
178 
179 
180  void Evolution(cSecond t);
181  void DumpStock(map <string , vector<double> > LambdaArray);
182  void TakeReactorFuel(int ReactorId) ;
183  void UpdateInsideIV();
184 
185  IsotopicVector BuildFuelFromEqModel(map <string , vector<double> > LambdaArray, double ReactorMass);
186  void BuildArray(int ReactorId, cSecond ReactorLoadingTime);
187 
188  void BuildFuelForReactor(int ReactorId, cSecond t);
189 
190  void SortArray();
191 
192  void SortFiFo(vector<IsotopicVector> &IVArray, vector<cSecond> &TimeArray, vector< pair<int,int> > &AdressArray);
193  void SortLiFo(vector<IsotopicVector> &IVArray, vector<cSecond> &TimeArray, vector< pair<int,int> > &AdressArray);
194  void SortMix(vector<IsotopicVector> &IVArray, vector<cSecond> &TimeArray, vector< pair<int,int> > &AdressArray);
195  void SortRandom(vector<IsotopicVector> &IVArray, vector<cSecond> &TimeArray, vector< pair<int,int> > &AdressArray);
196 
198 
199 
200 
201 
202 protected:
203 
204 
205 
206 //********* Internal Parameter *********//
208 
209  map<cSecond, IsotopicVector> fSeparationStrategy;
210 
211  map<int, cSecond > fReactorNextStep;
212 
213 #ifndef __ROOTCLING__
214  map< int,EvolutionData > fReactorFuturDB;
215 #endif
216  map< int,IsotopicVector > fReactorFuturIV;
217 
220 
222 
224 
225 
226 #ifndef __ROOTCLING__
227  void FabricationPlantEvolution(cSecond t);
228  void ResetArrays();
229 
230  map < string , IsotopicVector> fStreamList;
231  map < string , double> fStreamListFPMassFractionMax;
232  map < string , double> fStreamListFPMassFractionMin;
233  map < int, string> fStreamListFPPriority;
234  map < string , bool> fStreamListFPIsBuffer;
235 
236 
237 
238  map < string , vector <Storage*> > fStorage;
239  map < string , vector <IsotopicVector> > fStreamArray;
240  map < string , vector <cSecond> > fStreamArrayTime;
241  map < string , vector < pair<int,int> > > fStreamArrayAdress;
242  map < string , IsotopicVector> fSubstitutionIV;
243 
244  map < string , bool > fSubstitutionMaterialFromIV;
245  map < string , bool > fInfiniteMaterialFromList;
246 
247  map < string , bool > fErrorOnLambda;
248 
250 
252  bool fIsReusable;
255 
256 
257 
258  //{
260 
265  pair<IsotopicVector, IsotopicVector> Separation(IsotopicVector isotopicvector, IsotopicVector ExtractedList);
266  //}
267 
268 #endif
269 
270  ClassDef(FabricationPlant,5);
271 
272 };
273 
274 #endif
Defines a Storage object.
Definition: Storage.hxx:38
map< string, vector< pair< int, int > > > fStreamArrayAdress
Definition: FabricationPlant.hxx:241
map< string, IsotopicVector > fStreamList
Map that contains lists of stream according to the EqModel with corresponding isotopes list...
Definition: FabricationPlant.hxx:230
map< string, bool > fStreamListFPIsBuffer
Map that contains lists of stream according to the EqModel saying if fuel buffer. ...
Definition: FabricationPlant.hxx:234
Header file for EvolutionData class.
map< string, double > GetStreamListFPMassFractionMin()
Get the map of allowed min fractions.
Definition: FabricationPlant.hxx:165
map< string, double > GetStreamListFPMassFractionMax()
Get the map of allowed max fractions.
Definition: FabricationPlant.hxx:164
map< int, string > fStreamListFPPriority
Map that contains lists of stream according to the EqModel with priority (1 = first, 2 = second, etc...)
Definition: FabricationPlant.hxx:233
void SetFiFo(bool bval=true)
Set the chronological priority (true for chronological, false instead).Equivalent to SetStorageManage...
Definition: FabricationPlant.hxx:107
Allows to store & operate on radioactive sample.
Definition: IsotopicVector.hxx:37
bool fIsReusable
Sets a storage used to storing unused material.
Definition: FabricationPlant.hxx:252
map< int, EvolutionData > fReactorFuturDB
List of the futur EvolutionData use in the reactor.
Definition: FabricationPlant.hxx:214
EvolutionData fSubstitutionEvolutionData
EvolutionData of the subtitution fuel.
Definition: FabricationPlant.hxx:249
bool fIsSeparationManagement
Separation managment.
Definition: FabricationPlant.hxx:219
Definition: CLASSBackEndDict.cxx:37
void SetStorageManagement(StorageManagement SM)
The storage management : either kpFiFo, kpLiFo , kpMix or kpRand.
Definition: FabricationPlant.hxx:108
Header file for ZAI classes.
StorageManagement
CLASS object to build the fresh fuel (do chemical separation) & store it until core loading...
Definition: FabricationPlant.hxx:62
Definition: FabricationPlant.hxx:68
map< string, vector< IsotopicVector > > fStreamArray
The vector of isotopicVector of each material and each stock.
Definition: FabricationPlant.hxx:239
double fImpuritiesTolerance
Tolerance for impurities that are not considered in the ANN.
Definition: FabricationPlant.hxx:223
bool fSubstitutionFuel
True if a substitution fuel as been set.
Definition: FabricationPlant.hxx:221
vector< Storage * > GetStorage(string keyword)
Return the Pointer to Storage associated to a StreamList.
Definition: FabricationPlant.hxx:152
Storage * fReUsable
Pointer to the Storage used to storing unused material.
Definition: FabricationPlant.hxx:251
map< string, vector< Storage * > > fStorage
Pointer to the Storages defined for each list.
Definition: FabricationPlant.hxx:238
Definition: FabricationPlant.hxx:62
long long int cSecond
Definition: FabricationPlant.hxx:24
map< string, vector< cSecond > > fStreamArrayTime
Time when a IsotopicVector arrives in its storage.
Definition: FabricationPlant.hxx:240
Stores fuel inventory evolution , mean cross sections evolution, flux evolution, power ...
Definition: EvolutionData.hxx:54
map< string, double > fStreamListFPMassFractionMax
Map that contains lists of stream according to the EqModel with mass maximum fraction.
Definition: FabricationPlant.hxx:231
map< string, double > fStreamListFPMassFractionMin
Map that contains lists of stream according to the EqModel with mass minimum fraction.
Definition: FabricationPlant.hxx:232
StorageManagement GetStorageManagement()
The storage management : either kpFiFo, kpLiFo , kpMix or kpRand.
Definition: FabricationPlant.hxx:156
map< int, IsotopicVector > GetReactorFuturIncome() const
Return the list of the futur fuel IV.
Definition: FabricationPlant.hxx:160
void SetImpuritiesTolerance(double val)
Definition: FabricationPlant.hxx:115
bool fFuelCanBeBuilt
Default fuel fabrication process has failed.
Definition: FabricationPlant.hxx:253
void SetReUsableStorage(Storage *store)
Set the Storage where all the separated matetial not used in the fabrication process will be sent...
Definition: FabricationPlant.hxx:121
DecayDataBank * fDecayDataBase
Pointer to the DecayDataBank.
Definition: FabricationPlant.hxx:254
void SetDecayDataBank(DecayDataBank *decayDB)
Definition: FabricationPlant.hxx:103
Header file for CLASSLogger class.
void AddReactor(int reactorid, double creationtime)
Add a new reactor to be filled with the fresh fuel build by the FabricationPlant. ...
Definition: FabricationPlant.hxx:118
map< string, bool > fInfiniteMaterialFromList
True = an infinite stock of this material is created according to the list defined in the EqM...
Definition: FabricationPlant.hxx:245
StorageManagement fStorageManagement
The storage management : either kpFiFo, kpLiFo , kpMix or kpRand.
Definition: FabricationPlant.hxx:218
Header file for reactor classes.
long long int cSecond
Definition: CLASSConstante.hxx:10
map< string, bool > fErrorOnLambda
True = lambdas haven&#39;t been well calculated for this material (not enough material in stock...
Definition: FabricationPlant.hxx:247
map< int, cSecond > fReactorNextStep
Next time step to build a new fuel.
Definition: FabricationPlant.hxx:211
Definition: FabricationPlant.hxx:62
Header file for IsotopicVector class.
void SetSubstitutionMaterialFromIV(string keyword, IsotopicVector SubstitutionIV)
Set the Decay DataBank.
Definition: FabricationPlant.hxx:104
Header file for CLASS classes.
Describes outcore radioactive decays.
Definition: DecayDataBank.hxx:45
void SetSeparationManagement(bool bval=true)
Set the separation managmeent for the fabrication plant.
Definition: FabricationPlant.hxx:113
Object to handle output messages.
Definition: CLASSLogger.hxx:144
IsotopicVector fSeparationLostFraction
The lost fraction table during separation (1- efficiency)
Definition: FabricationPlant.hxx:207
map< cSecond, IsotopicVector > fSeparationStrategy
Definition: FabricationPlant.hxx:209
Defines the common properties of all facilities.
Definition: CLASSFacility.hxx:30
Definition: FabricationPlant.hxx:62
Definition: FabricationPlant.hxx:62
map< string, vector< Storage * > > GetAllStorage()
Return the map containing all the storage vectors (useful in CLASS Reactor to check list consistency)...
Definition: FabricationPlant.hxx:150
map< int, IsotopicVector > fReactorFuturIV
List of the futur fuel IsotopicVector used in the reactor.
Definition: FabricationPlant.hxx:216
Header file for Storage class.
map< string, IsotopicVector > fSubstitutionIV
contains the susbstitution IV defined by the user
Definition: FabricationPlant.hxx:242
map< string, bool > fSubstitutionMaterialFromIV
True = a substitution IV is set for this material in case of failure in fuel building.
Definition: FabricationPlant.hxx:244
double GetImpuritiesTolerance()
Definition: FabricationPlant.hxx:148