MURE
Loading...
Searching...
No Matches
EvolutiveSystem.hxx
Go to the documentation of this file.
1/*
2 This file is part of MURE,
3 Copyright (C) 2007-2021 MURE developers.
4
5 MURE is free software: you can redistribute it and/or modify
6 it under the terms of the GNU Lesser General Public License as published by
7 the Free Software Foundation, either version 3 of the License, or
8 (at your option) any later version.
9
10 MURE is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public License
16 along with MURE. If not, see <http://www.gnu.org/licenses/>.
17*/
18
19#ifndef _EvolutiveSystem_
20#define _EvolutiveSystem_
26#include <vector>
27#include <iosfwd>
28#include <string>
29
30// #include "DynamicalSystem.hxx"
31//#include "Cell.hxx"
32#include "Material.hxx"
33#include "CRAMSolver.hxx"
34#include "RKSolver.hxx"
35
36class Cell;
37class BatemanSolver;
38class Material;
39
40using namespace std;
41
42//-----------------------------------------------------------------------------//
43
44
45
47
62//________________________________________________________________________
63
65{
66 public :
67
68 EvolutiveSystem(Cell *cell);
72
80
90
98
111
122
127
132
143 {
144 return fNVar;
145 }
147 {
148 fNVar = n;
149 }
151 void SetEvolvingAtoms(int i, double proportion)
152 {
153 fEvolvingAtoms[i] = proportion;
154 }
155 double GetEvolvingAtoms(int i)
156 {
157 if ( ! fEvolvingAtoms)
158 {
160 }
161 return fEvolvingAtoms[i];
162 }
163 void SetEvolvingAtoms(double *f)
164 {
165 fEvolvingAtoms = f;
166 }
168 {
169 if ( ! fEvolvingAtoms)
170 {
172 }
173 return fEvolvingAtoms;
174 }
176 {
178 }
179 void SetTransmogrify(bool flag)
180 {
182 }
184
190 {
191 return fEvolvingCell;
192 }
194 {
195 return fEvolvingMaterial;
196 }
197 void SetCell(Cell *c)
198 {
199 fEvolvingCell = c;
200 }
202 {
204 }
206
211
213 // using DynamicalSystem::RungeKutta;
215
220 // void RungeKutta(double t1, double t2);
221 void Solve(double t1, double t2); // calls unified solver
222
224
230 // void BuildEqns(double t, double *N, double *dNdt);
231 void SetMatrixToZero();
232 void LoadTheMatrix(int index);
233 void SetTheMatrix(double * *f)
234 {
235 fTheMatrix = f;
236 }
237 double * *GetTheMatrix()
238 {
239 return fTheMatrix;
240 }
242
247 double GetPower()
248 {
250 return fPower;
251 }
252 double GetPowerErr()
253 {
254 return fPowerErr;
255 }
257 {
259 return fPowerDensity;
260 }
261 void SetPowerFrac(double powerfrac)
262 {
263 fPowerFrac = powerfrac;
264 };
266 {
267 return fPowerFrac;
268 };
269 double GetAvgQ()
270 {
271 return fAvgQ;
272 };
273 void SetAvgQ(double AvgQ)
274 {
275 fAvgQ = AvgQ;
276 };
277
278 void Init()
279 {
281 }
282 double GetBurnup()
283 {
284 return fBurnup;
285 }
286 void UpdateBurnupHistory(double deltaT, bool cool); // external method
288 {
289 return fEvolve;
290 }
291 void SetEvolve(bool flag = true)
292 {
293 fEvolve = flag;
294 }
295 string PrintEvolvingAtoms();
297 void FindIndexMass135();
299
318
319 protected :
320 void CalculatePower();
321 void UpdateBurnupHistory(double deltaT); // Local method only
323 void SetSolver();
324
325 BatemanSolver *fBatemanSolver; // !<Bateman solver class (CRAM or RungeKutta)
326
331
332 int fNVar;
333 double **fTheMatrix;
334
335 double fPower;
336 double fPowerErr;
338 double fBurnup;
339 double fPowerFrac;
340 double fAvgQ;
341
346
350 double fNI135;
351 double fNXe135;
352
353 double fOldFlux;
354 double fMeanFlux;
355 double fFirstTNF;
356
357};
358
359#endif
360
Header file for CRAMSolver class.
Header file for Material class.
Header file for RKSolver class.
Base class of Bateman-type solvers like Runge-Kutta or CRAM or any other.
Definition BatemanSolver.hxx:45
A Cell is composed from a Shape and a Material.
Definition Cell.hxx:84
EvolutiveSystem class carries out evolution.
Definition EvolutiveSystem.hxx:65
void FindIndexMass135()
Definition EvolutiveSystem.cxx:861
double ** fTheMatrix
The evolution Matrix.
Definition EvolutiveSystem.hxx:333
void SetAvgQ(double AvgQ)
Definition EvolutiveSystem.hxx:273
double fOldFlux
Old flux stored.
Definition EvolutiveSystem.hxx:353
double fPowerFrac
Fraction of local power produced.
Definition EvolutiveSystem.hxx:339
int fIdxXe135
index of Xe-135 in the fEvolvingAtoms array
Definition EvolutiveSystem.hxx:349
double fAvgQ
Average Q value of the system.
Definition EvolutiveSystem.hxx:340
bool fEvolve
Definition EvolutiveSystem.hxx:345
void SetEvolvingCompositionSize(int n)
Definition EvolutiveSystem.hxx:146
double fBurnup
Local sum of extracted energy per mass initial HM.
Definition EvolutiveSystem.hxx:338
void TransmogrifyMaterial()
Updates the proportion array.
Definition EvolutiveSystem.cxx:388
void TransmogrifyEvolvingAtoms()
Updates the EvolvingAtoms array.
Definition EvolutiveSystem.cxx:342
bool fAlreadyTransmodrified
True if transmogrification is done.
Definition EvolutiveSystem.hxx:344
double fPowerDensity
Local Power Density.
Definition EvolutiveSystem.hxx:337
double GetBurnup()
Definition EvolutiveSystem.hxx:282
void CalculatePower()
Calculate the local power in this evolving system.
Definition EvolutiveSystem.cxx:778
double fMeanFlux
Mean flux=(old+new)/2 to calculate Xe and I135 equilibrium concentration.
Definition EvolutiveSystem.hxx:354
BatemanSolver * fBatemanSolver
Definition EvolutiveSystem.hxx:325
int fIdxI135
index of I-135 in the fEvolvingAtoms array
Definition EvolutiveSystem.hxx:348
void SetEvolvingAtoms(double *f)
Definition EvolutiveSystem.hxx:163
void Solve(double t1, double t2)
the true Runge-Kutta calling method.
Definition EvolutiveSystem.cxx:318
double GetPowerDensity()
Definition EvolutiveSystem.hxx:256
void SetCell(Cell *c)
Definition EvolutiveSystem.hxx:197
void PredictorTransmogrifyMaterial()
Updates the proportion array after a Predictor step.
Definition EvolutiveSystem.cxx:409
void CorrectorTransmogrifyGroupCell()
Updates the proportion array for group cells after a Corrector step.
Definition EvolutiveSystem.cxx:533
double fInitHNMassInTon
Definition EvolutiveSystem.hxx:342
bool fNMassInTonInitialized
Definition EvolutiveSystem.hxx:343
void PredictorTransmogrifyGroupCell()
Updates the proportion array for group cells after a Predictor step.
Definition EvolutiveSystem.cxx:489
void SetTransmogrify(bool flag)
Definition EvolutiveSystem.hxx:179
double fPower
Local Power.
Definition EvolutiveSystem.hxx:335
double fFirstTNF
value of Tally Normalization factor at the first RK step
Definition EvolutiveSystem.hxx:355
void SetPowerFrac(double powerfrac)
Definition EvolutiveSystem.hxx:261
Cell * fEvolvingCell
The cell which IS the Evolving System.
Definition EvolutiveSystem.hxx:328
void UpdateBurnupHistory(double deltaT, bool cool)
Definition EvolutiveSystem.cxx:744
bool IsEvolving()
Definition EvolutiveSystem.hxx:287
void CorrectorTransmogrifyMaterial()
Updates the proportion array after a Corrector step (PCE only).
Definition EvolutiveSystem.cxx:429
void Init()
Definition EvolutiveSystem.hxx:278
int fIdxTe135
index of Te-135 in the fEvolvingAtoms array
Definition EvolutiveSystem.hxx:347
void CalculateEvolvingAtoms()
calculate Evolving Proportion
Definition EvolutiveSystem.cxx:276
int GetEvolvingCompositionSize()
Definition EvolutiveSystem.hxx:142
double GetPowerErr()
Definition EvolutiveSystem.hxx:252
int fNVar
fMatrix size
Definition EvolutiveSystem.hxx:332
double * fPCEvolvingAtoms
The evolving atoms copied from Material proportions for predictor-corrector method.
Definition EvolutiveSystem.hxx:330
Material * fEvolvingMaterial
The Evolving material.
Definition EvolutiveSystem.hxx:327
double GetEvolvingAtoms(int i)
Definition EvolutiveSystem.hxx:155
Cell * GetCell()
Definition EvolutiveSystem.hxx:189
double fNXe135
the new Xe 135 number of atoms
Definition EvolutiveSystem.hxx:351
void SetSolver()
set fBatemanSolver
Definition EvolutiveSystem.cxx:241
void FindXe135Equilibrium()
Calculate the "equilibrium" Xe concentration.
Definition EvolutiveSystem.cxx:882
double fPowerErr
Error on Local Power.
Definition EvolutiveSystem.hxx:336
Material * GetMaterial()
Definition EvolutiveSystem.hxx:193
double GetPowerFrac()
Definition EvolutiveSystem.hxx:265
double GetAvgQ()
Definition EvolutiveSystem.hxx:269
string PrintEvolvingAtoms()
Prints out the Atoms vector.
Definition EvolutiveSystem.cxx:304
double fNI135
the new I-135 number of atoms (use only for fNXe135 calculation)
Definition EvolutiveSystem.hxx:350
void SetEvolve(bool flag=true)
Definition EvolutiveSystem.hxx:291
void CalculateInitialHNMass()
Definition EvolutiveSystem.cxx:709
double ** GetTheMatrix()
Definition EvolutiveSystem.hxx:237
void SetTheMatrix(double **f)
Definition EvolutiveSystem.hxx:233
void SetEvolvingAtoms(int i, double proportion)
Definition EvolutiveSystem.hxx:151
void CalculateNuSigmaFisPhis()
Calculate for an evolutive system.
Definition EvolutiveSystem.cxx:823
double GetPower()
Definition EvolutiveSystem.hxx:247
bool IsTransmogrify()
Definition EvolutiveSystem.hxx:175
double * fEvolvingAtoms
The evolving atoms copied from Material proportions.
Definition EvolutiveSystem.hxx:329
void SetMaterial(Material *m)
Definition EvolutiveSystem.hxx:201
double * GetEvolvingAtoms()
Definition EvolutiveSystem.hxx:167
void TransmogrifyGroupCell()
Updates the proportion array for group cells.
Definition EvolutiveSystem.cxx:454
~EvolutiveSystem()
Destructor.
Definition EvolutiveSystem.cxx:221
void SetMatrixToZero()
Builds the Bateman equations for integration.
Definition EvolutiveSystem.cxx:584
void LoadTheMatrix(int index)
Fill evolution Matrix, index is the place of the current evolutionsystem in the evolutionsystemvector...
Definition EvolutiveSystem.cxx:615
A Material constituing a Cell.
Definition Material.hxx:83
the namespace of the Standard C++

MURE Project, documentation generated by Doxygen 1.9.7 - Fri Jan 19 2024