MURE
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
EvolutionControl.hxx
Go to the documentation of this file.
1 #ifndef _EVOLUTIONCONTROL_HXX_
2 #define _EVOLUTIONCONTROL_HXX_
3 
9 #include <fstream>
10 #include <iostream>
11 #include <sstream>
12 #include <vector>
13 #include <string>
14 #include "MureHeaders.hxx"
15 using namespace std;
16 //________________________________________________________________________
17 //
18 // EvolutionControl
20 
33 //________________________________________________________________________
34 
36 {
37  public:
39 
45 
46  virtual EvolutionControl* Clone(){return new EvolutionControl(*this);}
47 
48  virtual ~EvolutionControl(){}
49 
54  virtual void ControlAtEachMCNPStep();
55  virtual void ControlAtEachRKStep();
56 
57 // ADDED FOR ADS SIMULATION - BY NT
58  virtual void ControlBeforeMCNPStep();
59 // ADDED FOR ADS SIMULATION - BY NT
60 
61  virtual void ControlAfterEndOfRKIntegration();
62 
63  void SetTimeCutting(vector<double>T);
64  vector<double> & GetMCNPRunTimes(){return fMCNPRunTimes;}
65 
66 
71  void SetWantedKeff(double keff=1.){fWantedKeff=keff;}
72  void SetWantedHNProportion(double HNproportion=0.01){fWantedHNProportion=HNproportion;}
73  double GetWantedHNProportion() {return fWantedHNProportion;}
74  void SetLockToInitialKeff(bool flag=true){fLockToInitialKeff = flag;}
75  void SetConstantPower(bool flag=true){fConstantPower=flag;}
76  bool IsConstantPower(){return fConstantPower;}
77  void SetFuelReprocessing(FuelReprocessing* processing){fFuelReprocessing=processing;}
78  FuelReprocessing* GetFuelReprocessing(){return fFuelReprocessing;}
79 
80 
85 
86  virtual void CalculateCoeffsAtStep(int s){}
87  virtual void SetRunFuelTemperatureCoeff(bool flag=true){}
88  virtual void SetRunVoidCoeff(bool flag=true) {}
89  virtual void SetRunModeratorTemperatureCoeff(bool flag=true){}
90  virtual void SetRunPoisonReactivityWorth(bool flag=true){}
91  virtual void SetCriticalitySource(MCNPSource* s){}
93  virtual void ControlKeff(double Time){}
94  void RunMCNPCriticality(string FileName);
95 
96 
101  virtual double EstimatedKeff();
102  virtual void FindKeffSlope();
103  virtual void FindAbsorptionSlope();
104 
105  virtual void FindFissionSlope();
106  virtual void FindNuFissionSlope();
107  virtual void ExtrapolateRates();
108 
110 
115 
116  virtual void WriteControlParameters(){}
117  virtual void WriteCurrentRates();
118 
120 
124  void PrintKeffWarning();
125 
127 
135  void FindNextCoefs(double value, vector<double> &V, double &Slope,double &Intersept,int &LastMCNPRunNumber);
136 
138 
139  protected:
140 
141  virtual void InitVector();
142  vector<double>fMCNPRunTimes;
143 
145  double fWantedKeff;
147  vector<double> fMCNPTime;
148 
149  vector<double> fMCNPKeff;
150  vector<double> fMCNPDeltaKeff;
151 
152  vector<double> fKeffWarningTime;
153  vector<double> fKeffWarningGap;
154  vector<double> fKeffWarning3sigma;
155  vector<int> fKeffWarningMCNPNum;
156 
157  double fFitKeffSlope;
159 
160  vector<double> fMCNPAbs;
161  vector<double> fMCNPDeltaAbs;
162  double fFitAbsSlope;
164 
165  vector<double> fMCNPFiss;
166  vector<double> fMCNPDeltaFiss;
167  double fFitFissSlope;
169 
170  vector<double> fMCNPNuFiss;
171  vector<double> fMCNPDeltaNuFiss;
174 
175  double fOldKeff;
176 
178  double fSumOfFission ;
179  double fSumOfCapture ;
180  double fSumOfN2N ;
181  double fTNF;
182 
184 
185 };
186 
187 #endif
vector< double > fMCNPDeltaNuFiss
vector of last MCNP run&#39;s global nu*fission rate error
Definition: EvolutionControl.hxx:171
double fFitNuFissIntercept
intersept of linear fit of the nu*fission rate.
Definition: EvolutionControl.hxx:173
virtual void WriteControlParameters()
Write poison/fissile proportions etc.
Definition: EvolutionControl.hxx:116
double fFitFissSlope
slope of linear fit of the fission rate.
Definition: EvolutionControl.hxx:167
FuelReprocessing * GetFuelReprocessing()
get the FuelReprocessing
Definition: EvolutionControl.hxx:78
vector< double > fMCNPTime
vector of last MCNP run time (for fits)
Definition: EvolutionControl.hxx:147
vector< double > fMCNPDeltaKeff
vector of last MCNP run Keff error
Definition: EvolutionControl.hxx:150
virtual void SetRunVoidCoeff(bool flag=true)
Abstract method ; to be overlaoded.
Definition: EvolutionControl.hxx:88
virtual void ControlKeff(double Time)
Abstract method ; to be overlaoded.
Definition: EvolutionControl.hxx:93
double fFitFissIntercept
intersept of linear fit of the fission rate.
Definition: EvolutionControl.hxx:168
bool fLockToInitialKeff
for keff control.
Definition: EvolutionControl.hxx:177
FuelReprocessing * fFuelReprocessing
the FuelReprocessing
Definition: EvolutionControl.hxx:183
virtual void CalculateCoeffsAtStep(int s)
Abstract method ; to be overlaoded.
Definition: EvolutionControl.hxx:86
double fFitNuFissSlope
slope of linear fit of the nu*fission rate.
Definition: EvolutionControl.hxx:172
virtual void SetRunFuelTemperatureCoeff(bool flag=true)
Abstract method ; to be overlaoded.
Definition: EvolutionControl.hxx:87
double fSumOfN2N
sum of all (n,2n) reaction in a cell
Definition: EvolutionControl.hxx:180
virtual void LaunchReactivityCoeffsCalculations()
Abstract method ; to be overlaoded.
Definition: EvolutionControl.hxx:92
double fWantedKeff
The wanted Keff of the problem.
Definition: EvolutionControl.hxx:145
double fFitAbsIntercept
Absorption intercept for the extrapolation.
Definition: EvolutionControl.hxx:163
void SetWantedKeff(double keff=1.)
set the wanted keff value
Definition: EvolutionControl.hxx:71
vector< int > fKeffWarningMCNPNum
The MCNP run number of the warning.
Definition: EvolutionControl.hxx:155
vector< double > fKeffWarningGap
|Estimate keff - Mcnp Keff|
Definition: EvolutionControl.hxx:153
virtual void SetCriticalitySource(MCNPSource *s)
Abstract method ; to be overlaoded.
Definition: EvolutionControl.hxx:91
double fWantedHNProportion
The wanted heavy nuclide proportion.
Definition: EvolutionControl.hxx:146
FuelReprocessing allows Fuel reprocessing during Evolution.
Definition: FuelReprocessing.hxx:89
vector< double > & GetMCNPRunTimes()
returns Time at which MCNP run is performed
Definition: EvolutionControl.hxx:64
void SetConstantPower(bool flag=true)
say whether the power is kept constant or not
Definition: EvolutionControl.hxx:75
vector< double > fMCNPFiss
vector of last MCNP run&#39;s global fission rate.
Definition: EvolutionControl.hxx:165
vector< double > fMCNPDeltaFiss
vector of last MCNP run&#39;s global fission rate error.
Definition: EvolutionControl.hxx:166
bool fConstantPower
whether or not keep a constant power
Definition: EvolutionControl.hxx:144
File including all headers.
double fSumOfCapture
sum of all (n,gamma) reaction in a cell
Definition: EvolutionControl.hxx:179
virtual EvolutionControl * Clone()
Correct way to copy a EvolutionControl in case of derivation.
Definition: EvolutionControl.hxx:46
double fFitAbsSlope
slope to find extrapolated Absorption value.
Definition: EvolutionControl.hxx:162
double fFitKeffIntersept
intersept to find the Keff extrapolation
Definition: EvolutionControl.hxx:158
vector< double > fMCNPNuFiss
vector of last MCNP run&#39;s global nu*fission rate.
Definition: EvolutionControl.hxx:170
Define a MCNP Source.
Definition: MCNPSource.hxx:28
double fSumOfFission
sum of all (n,fission) reaction in a cell
Definition: EvolutionControl.hxx:178
vector< double > fMCNPRunTimes
Time at which MCNP run is performed.
Definition: EvolutionControl.hxx:142
vector< double > fMCNPKeff
vector of last MCNP run Keff
Definition: EvolutionControl.hxx:149
void SetFuelReprocessing(FuelReprocessing *processing)
add the FuelReprocessing
Definition: EvolutionControl.hxx:77
virtual void SetRunPoisonReactivityWorth(bool flag=true)
Abstract method ; to be overlaoded.
Definition: EvolutionControl.hxx:90
double fFitKeffSlope
slope to find the Keff extrapolation
Definition: EvolutionControl.hxx:157
void SetLockToInitialKeff(bool flag=true)
set keff control to keep keff at its initial value. (tang)
Definition: EvolutionControl.hxx:74
virtual void SetRunModeratorTemperatureCoeff(bool flag=true)
Abstract method ; to be overlaoded.
Definition: EvolutionControl.hxx:89
double fTNF
the Tally normalization Factor
Definition: EvolutionControl.hxx:181
virtual ~EvolutionControl()
destructor
Definition: EvolutionControl.hxx:48
vector< double > fKeffWarningTime
Times at which estimate keff differs from MCNP keff at 3sigma.
Definition: EvolutionControl.hxx:152
bool IsConstantPower()
return whether the power is kept constant or not
Definition: EvolutionControl.hxx:76
vector< double > fMCNPDeltaAbs
vector of last MCNP run global Absorption rate (-2) error
Definition: EvolutionControl.hxx:161
double fOldKeff
The previous MCNP keff result.
Definition: EvolutionControl.hxx:175
vector< double > fKeffWarning3sigma
3sigma on MCNP keff
Definition: EvolutionControl.hxx:154
vector< double > fMCNPAbs
vector of last MCNP run&#39;s global total absorption rate.
Definition: EvolutionControl.hxx:160
void SetWantedHNProportion(double HNproportion=0.01)
set the wanted Heavy Nucleus proportion
Definition: EvolutionControl.hxx:72
double GetWantedHNProportion()
return the wanted Heavy Nucleus proportion
Definition: EvolutionControl.hxx:73
EvolutionControl allows interactions with the evolution.
Definition: EvolutionControl.hxx:35

MURE Project, documentation generated by Doxygen 1.8.5 - Mon Nov 17 2014