MURE
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
EvolutiveSystem.hxx
Go to the documentation of this file.
1 #ifndef _EvolutiveSystem_
2 #define _EvolutiveSystem_
3 
8 #include <math.h>
9 #include <vector>
10 #include "MureHeaders.hxx"
11 
12 
13 using namespace std;
14 
15 //-----------------------------------------------------------------------------//
16 
17 
18 
20 
35 //________________________________________________________________________
36 
38 {
39  public :
40 
41  EvolutiveSystem(Cell* cell);
43  EvolutiveSystem(const EvolutiveSystem & ES);
44  ~EvolutiveSystem();
45 
52 
61  void TransmogrifyMaterial();
63 
69  void PredictorTransmogrifyMaterial();
71 
82  void CorrectorTransmogrifyMaterial();
84 
93  void TransmogrifyGroupCell();
95 
98  void PredictorTransmogrifyGroupCell();
100 
103  void CorrectorTransmogrifyGroupCell();
105 
114  void TransmogrifyEvolvingAtoms();
115  int GetEvolvingCompositionSize(){return fNVar;}
116  void SetEvolvingCompositionSize(int n){fNVar=n;}
117  void CalculateEvolvingAtoms();
118  void SetEvolvingAtoms(int i, double proportion){fEvolvingAtoms[i]=proportion;}
119  double GetEvolvingAtoms(int i){if (!fEvolvingAtoms) {CalculateEvolvingAtoms();} return fEvolvingAtoms[i];}
120  void SetEvolvingAtoms(double* f){fEvolvingAtoms=f;}
121  double* GetEvolvingAtoms(){if (!fEvolvingAtoms) {CalculateEvolvingAtoms();} return fEvolvingAtoms;}
122  bool IsTransmogrify(){return fAlreadyTransmodrified;}
123  void SetTransmogrify(bool flag){fAlreadyTransmodrified=flag;}
124 
125 
130  Cell* GetCell(){return fEvolvingCell;}
131  Material* GetMaterial() {return fEvolvingMaterial;}
132  void SetCell(Cell *c){fEvolvingCell=c;}
133  void SetMaterial(Material *m){fEvolvingMaterial=m;}
134 
135 
140 
144 
149  void RungeKutta(double t1, double t2);
150 
152 
158  void BuildEqns(double t, double *N, double *dNdt);
159  void SetMatrixToZero();
160  void LoadTheMatrix(int index);
161  void SetTheMatrix(double** f){fTheMatrix=f;}
162  double** GetTheMatrix(){return fTheMatrix;}
163 
164 
169  double GetPower() {CalculatePower(); return fPower;}
170  double GetPowerErr(){return fPowerErr;}
171  double GetPowerDensity() {CalculatePower(); return fPowerDensity;}
172  bool IsEvolving(){return fEvolve;}
173  void SetEvolve(bool flag=true){fEvolve=flag;}
174  string PrintEvolvingAtoms();
175  void CalculateNuSigmaFisPhis();
176  void FindIndexMass135();
177 
195  void FindXe135Equilibrium();
197 
198  protected :
199  void CalculatePower();
200 
203  double *fEvolvingAtoms;
205  double fTmin;
206  double **fTheMatrix;
207  double fPower;
208  double fPowerErr;
209  double fPowerDensity;
211  bool fEvolve;
212 
213  int fIdxTe135;
214  int fIdxI135;
215  int fIdxXe135;
216  double fNI135;
217  double fNXe135;
218  double fOldFlux;
219  double fMeanFlux;
220  double fFirstTNF;
221 
222 };
223 
224 #endif
225 
double fPower
Local Power.
Definition: EvolutiveSystem.hxx:207
double fPowerDensity
Local Power Density.
Definition: EvolutiveSystem.hxx:209
double * fEvolvingAtoms
The evolving atoms copied from Material proportions.
Definition: EvolutiveSystem.hxx:203
A Cell is a MCNP cell.
Definition: Cell.hxx:48
int fIdxXe135
index of Xe-135 in the fEvolvingAtoms array
Definition: EvolutiveSystem.hxx:215
bool IsEvolving()
True if this evolving system really evolve (default)
Definition: EvolutiveSystem.hxx:172
void SetEvolvingAtoms(int i, double proportion)
Sets the ith proportion.
Definition: EvolutiveSystem.hxx:118
void SetMaterial(Material *m)
set the evolving material
Definition: EvolutiveSystem.hxx:133
bool IsTransmogrify()
return true when transmogrification has been done.
Definition: EvolutiveSystem.hxx:122
EvolutiveSystem class carries out evolution.
Definition: EvolutiveSystem.hxx:37
double ** fTheMatrix
The evolution Matrix.
Definition: EvolutiveSystem.hxx:206
double fPowerErr
Error on Local Power.
Definition: EvolutiveSystem.hxx:208
int fIdxI135
index of I-135 in the fEvolvingAtoms array
Definition: EvolutiveSystem.hxx:214
double fMeanFlux
Mean flux=(old+new)/2 to calculate Xe and I135 equilibrium concentration.
Definition: EvolutiveSystem.hxx:219
double fNI135
the new I-135 number of atoms (use only for fNXe135 calculation)
Definition: EvolutiveSystem.hxx:216
double GetPowerDensity()
Calculates and returns the local power density in this evolving cell.
Definition: EvolutiveSystem.hxx:171
Material * GetMaterial()
returns the evolving material
Definition: EvolutiveSystem.hxx:131
void SetCell(Cell *c)
set the evolving cell.
Definition: EvolutiveSystem.hxx:132
Cell * fEvolvingCell
The cell which IS the Evolving System.
Definition: EvolutiveSystem.hxx:202
double ** GetTheMatrix()
return the Evolution Matrix (Bateman equations)
Definition: EvolutiveSystem.hxx:162
void SetEvolvingCompositionSize(int n)
sets composition vector size.
Definition: EvolutiveSystem.hxx:116
double GetPower()
Calculates and returns the local power in this evolving cell.
Definition: EvolutiveSystem.hxx:169
File including all headers.
bool fEvolve
Definition: EvolutiveSystem.hxx:211
int fIdxTe135
index of Te-135 in the fEvolvingAtoms array
Definition: EvolutiveSystem.hxx:213
double fOldFlux
Old flux stored.
Definition: EvolutiveSystem.hxx:218
double fNXe135
the new Xe 135 number of atoms
Definition: EvolutiveSystem.hxx:217
A Material constituing a Cell.
Definition: Material.hxx:53
Cell * GetCell()
returns the evolving Cell.
Definition: EvolutiveSystem.hxx:130
double * fPCEvolvingAtoms
The evolving atoms copied from Material proportions for predictor-corrector method.
Definition: EvolutiveSystem.hxx:204
int GetEvolvingCompositionSize()
returns composition vector size.
Definition: EvolutiveSystem.hxx:115
void SetEvolve(bool flag=true)
Set evolve flag to true or false.
Definition: EvolutiveSystem.hxx:173
double GetPowerErr()
Returns the error on local power in this evolving cell (from MCNP SigmaPhi error) must be called afte...
Definition: EvolutiveSystem.hxx:170
Material * fEvolvingMaterial
The Evolving material.
Definition: EvolutiveSystem.hxx:201
void RungeKutta(double *YStart, double t1, double t2)
Runge Kutta calling method.
Definition: DynamicalSystem.cxx:41
DynamicalSystem class solves system of differential equations.
Definition: DynamicalSystem.hxx:34
double * GetEvolvingAtoms()
returns the array
Definition: EvolutiveSystem.hxx:121
void SetTransmogrify(bool flag)
set fAlreadyTransmodrified to flag.
Definition: EvolutiveSystem.hxx:123
double GetEvolvingAtoms(int i)
returns ith atoms.
Definition: EvolutiveSystem.hxx:119
bool fAlreadyTransmodrified
True if transmogrification is done.
Definition: EvolutiveSystem.hxx:210
double fTmin
The lowest value of the decay constant considered.
Definition: EvolutiveSystem.hxx:205
void SetEvolvingAtoms(double *f)
Set the array.
Definition: EvolutiveSystem.hxx:120
double fFirstTNF
value of Tally Normalization factor at the first RK step
Definition: EvolutiveSystem.hxx:220
void SetTheMatrix(double **f)
Set the Evolution Matrix (Bateman equations)
Definition: EvolutiveSystem.hxx:161

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