CLASS  5.1
Fuel Cycle Simulator
Reactor.hxx
Go to the documentation of this file.
1 #ifndef _Reactor_
2 #define _Reactor_
3 
9 #include <string>
10 #include <map>
11 
12 #include "CLASSFacility.hxx"
13 #include "IsotopicVector.hxx"
14 #include "EvolutionData.hxx"
15 #include "PhysicsModels.hxx"
16 #include "ReactorScheduler.hxx"
17 
18 using namespace std;
19 
20 
21 class CLASSBackEnd;
22 class EvolutionData;
23 class FabricationPlant;
24 class Storage;
25 class CLASSLogger;
26 
27 //-----------------------------------------------------------------------------//
29 
37 //________________________________________________________________________
38 
39 
40 
41 class Reactor : public CLASSFacility
42 {
43  public :
44 
45 
46  //********* Constructor/Destructor Method *********//
47 
52 
53  Reactor();
54 
55  //{
57 
61  Reactor(CLASSLogger* log);
62  //}
63 
64 #ifndef __ROOTCLING__
65  //{
67 
77  Reactor(CLASSLogger* log, CLASSBackEnd* backend,
78  cSecond creationtime , cSecond lifetime, double Power,
79  double HMMass, double CapacityFactor = 1);
80  //}
81 
82  //{
84 
95  Reactor(CLASSLogger* log,
96  FabricationPlant* fabricationplant, CLASSBackEnd* backend,
97  cSecond creationtime , cSecond lifetime, double Power,
98  double HMMass, double CapacityFactor = 1);
99  //}
100 
101  //{
103 
114  Reactor(CLASSLogger* log, PhysicsModels* fueltypeDB,
115  FabricationPlant* fabricationplant, CLASSBackEnd* Pool,
116  cSecond creationtime , cSecond lifetime, cSecond cycletime,
117  double HMMass, double BurnUp);
118  //}
119 
120  //{
122 
134  Reactor(CLASSLogger* log, PhysicsModels* fueltypeDB,
135  FabricationPlant* fabricationplant, CLASSBackEnd* backend,
136  cSecond creationtime , cSecond lifetime,
137  double Power, double HMMass, double BurnUp, double CapacityFactor);
138  //}
139 
140  //{
142 
154  Reactor(CLASSLogger* log, EvolutionData* evolutivedb, CLASSBackEnd* backend,
155  cSecond creationtime, cSecond lifetime,
156  double power, double HMMass, double BurnUp, double CapacityFactor);
157  //}
158 
159  //{
161 
172  Reactor(CLASSLogger* log, EvolutionData* evolutivedb, CLASSBackEnd* backend,
173  cSecond creationtime, cSecond lifetime,
174  cSecond cycletime, double HMMass, double BurnUp);
175  //}
176 #endif
177  ~Reactor();
178 
180 
181 
182 
183 
184  //********* Get Method *********//
185 
190 
191  IsotopicVector GetIVReactor() const { return GetInsideIV(); }
192  IsotopicVector GetIVBeginCycle() const { return fIVBeginCycle; }
193  IsotopicVector GetIVOutCycle() const { return fIVOutCycle; }
195  IsotopicVector GetIVInCycle() const { return fIVInCycle; }
196 
198  cSecond GetNextCycleTime(cSecond time);
199 
200  bool IsFuelFixed() const { return fFixedFuel; }
201  double GetHeavyMetalMass() const { return fHeavyMetalMass; }
202  double GetBurnUp() const { return fBurnUp; }
203  double GetCapacityFactor() const { return fCapacityFactor; }
204  double GetPower() const { return fPower; }
205 
206 #ifndef __ROOTCLING__
207  map<cSecond, double> GetPowerEvolution(){return fPowerEvolution;}
208  map<cSecond, double> GetHMMassEvolution(){return fHMMassEvolution;}
209  map<cSecond, double> GetSchedulePowerEvolution(){return fSchedulePowerEvolution;}
210  map<cSecond, double> GetScheduleHMMassEvolution(){return fScheduleHMMassEvolution;}
211 
213 
214  EvolutionData GetEvolutionDB() const { return fEvolutionDB; }
215  CLASSBackEnd* GetOutBackEndFacility() const { return fOutBackEndFacility; }
216  FabricationPlant* GetFabricationPlant() const { return fFabricationPlant; }
217 
218  ReactorScheduler* GetScheduler() const { return fReactorScheduler; }
219 
220 #endif
221 
222 
223 
224 
225 
226  //********* Set Method *********//
227 
232 #ifndef __ROOTCLING__
233  void SetReactorScheduler(ReactorScheduler* reactorscheduler) { fReactorScheduler = reactorscheduler; }
234 #endif
235  void SetHMMass(double Mass) {fHeavyMetalMass = Mass;}
236  void SetCycleTime(double cycletime);
237  void SetPower(double Power);
238  void SetBurnUp(double BU);
239 
240  void SetIVReactor(IsotopicVector isotopicvector) { fInsideIV = isotopicvector; }
241  void SetIVBeginCycle(IsotopicVector isotopicvector) { fIVBeginCycle = isotopicvector;}
242  void SetIVOutCycle(IsotopicVector isotopicvector){ fIVOutCycle = isotopicvector;}
243  void SetIVInCycle(IsotopicVector isotopicvector) { fIVInCycle = isotopicvector;}
244 
245 
246 
247 
248 #ifndef __ROOTCLING__
249 
250  void SetOutBackEndFacility(CLASSBackEnd* pool) { fOutBackEndFacility = pool; }
251  void SetStorage(Storage* storage) { fStorage = storage; fIsStorage = true;}
252  void SetFabricationPlant(FabricationPlant* FP) { fFabricationPlant = FP;}
253  void SetEvolutionDB(EvolutionData evolutionDB);
254 #endif
255 
256  using CLASSFacility::SetName;
257  using CLASSFacility::GetName;
258 
260 
261 
262 
263 
264  //********* Evolution & Modification Method *********//
265 
270 
271  void Evolution(cSecond t);
272  void Dump();
273  void SetNewFuel(EvolutionData ivdb);
274  void CheckListConsistency(PhysicsModels* fueltypeDB, FabricationPlant* fabricationplant);
275 #ifndef __ROOTCLING__
276 
277  void AddScheduleEntry(cSecond time, ReactorModel* Model, double BurnUp, double Power, double HMMass)
278  { if(Model->GetPhysicsModels() && !fFabricationPlant )
279  {ERROR<<"You must add a FabicationPlant to Reactor " <<GetName()
280  <<"\n"<< "Use YourReactor->AddFabricationPlant(YourFP);"<<endl;exit(0);}
281  fReactorScheduler->AddEntry( time, Model, BurnUp, Power*fCapacityFactor, HMMass);
282  fSchedulePowerEvolution.insert( pair<cSecond, double>(time, Power*fCapacityFactor));
283  fScheduleHMMassEvolution.insert( pair<cSecond, double>(time, HMMass));
284 
285  }
287  void AddScheduleEntry(cSecond time, EvolutionData* Model, double BurnUp, double Power, double HMMass)
288  {
289  fReactorScheduler->AddEntry( time, new ReactorModel(Model), BurnUp, Power*fCapacityFactor, HMMass);
290  fSchedulePowerEvolution.insert( pair<cSecond, double>(time, Power*fCapacityFactor));
291  fScheduleHMMassEvolution.insert( pair<cSecond, double>(time, HMMass));
292  }
295  void AddScheduleEntry(cSecond time, PhysicsModels* Model, double BurnUp, double Power, double HMMass)
296  { if(!fFabricationPlant)
297  {ERROR<<"You must add a FabicationPlant to Reactor " <<GetName()
298  <<"\n"<< "Use YourReactor->AddFabricationPlant(YourFP);"<<endl;exit(0);}
299  fReactorScheduler->AddEntry( time, new ReactorModel(Model), BurnUp, Power*fCapacityFactor, HMMass);
300  fSchedulePowerEvolution.insert( pair<cSecond, double>(time, Power*fCapacityFactor));
301  fScheduleHMMassEvolution.insert( pair<cSecond, double>(time, HMMass));
302  }
303 #endif
304 
306 
307 
308 
309  protected :
310 
311  bool fFixedFuel;
312  bool fIsStorage;
313 
314  //********* Internal Parameter *********//
315 
316  double fPower;
317  double fElectricPower;
318  double fEfficiencyFactor;
319  double fCapacityFactor;
321  IsotopicVector fIVBeginCycle;
322  IsotopicVector fIVInCycle;
323  IsotopicVector fIVOutCycle;
324 
325 #ifndef __ROOTCLING__
326  EvolutionData fEvolutionDB;
327 
328  CLASSBackEnd* fOutBackEndFacility;
329 
330  ReactorScheduler* fReactorScheduler;
331 
332  FabricationPlant* fFabricationPlant;
333 
334  Storage* fStorage;
335 
336 #endif
337  //********* Unfixed Fuel Parameter *********//
338 
339 
340  double fHeavyMetalMass;
341  double fBurnUp;
343  map < cSecond, double > fPowerEvolution;
344  map < cSecond, double > fHMMassEvolution;
345  map < cSecond, double > fSchedulePowerEvolution;
346  map < cSecond, double > fScheduleHMMassEvolution;
347 
348  ClassDef(Reactor,4);
349 };
350 
351 
352 #endif
Defines a Storage object.
Definition: Storage.hxx:38
Container object of XSModel, EquivalenceModel and IrradiationModel.
Definition: PhysicsModels.hxx:48
Defines the spent fuel pool.
Definition: Pool.hxx:36
Header file for EvolutionData class.
Allows to store & operate on radioactive sample.
Definition: IsotopicVector.hxx:37
#define ERROR
Definition: CLASSLogger.hxx:26
Definition: CLASSBackEndDict.cxx:37
IsotopicVector GetIVBeginCycle() const
(Note : IVBegin != IVIn, only if using ReactorScheduler)
Definition: Reactor.hxx:192
PhysicsModels * GetPhysicsModels()
Return the PhysicsModels (NULL if EvolutionData)
Definition: ReactorScheduler.hxx:70
IsotopicVector GetIVReactor() const
Return the IV contain in the Reactor.
Definition: Reactor.hxx:191
Header file for ReactorScheduler class.
Definition: FabricationPlant.hxx:68
Allows a Reactor to change its ED_Or_PhysMod, BurnUp, Power, HMMass.
Definition: ReactorScheduler.hxx:136
Stores fuel inventory evolution , mean cross sections evolution, flux evolution, power ...
Definition: EvolutionData.hxx:54
Header file for XS_INTERPOLATOR class.
Allows to define PhysicsModels & EvolutionData as a ReactorModel.
Definition: ReactorScheduler.hxx:38
long long int cSecond
Definition: CLASSConstante.hxx:10
Header file for IsotopicVector class.
Object to handle output messages.
Definition: CLASSLogger.hxx:144
Defines the common properties of all facilities.
Definition: CLASSFacility.hxx:30
Defines the Reactor.
Definition: Reactor.hxx:41
Class defining the common properties of all back end fuel cycle facilities.
Definition: CLASSBackEnd.hxx:26