MURE
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
EvolutionControl Class Reference

EvolutionControl allows interactions with the evolution. More...

#include <EvolutionControl.hxx>

Inheritance diagram for EvolutionControl:
EvolutionWrapper FissileEvolutionControl HNEvolutionControl InLineReprocessing PoisonEvolutionControl RodEvolutionControl

Public Member Functions

 EvolutionControl ()
 Default Constructor. More...
 
 EvolutionControl (const EvolutionControl &ev)
 Copy constructor. More...
 
virtual EvolutionControlClone ()
 Correct way to copy a EvolutionControl in case of derivation. More...
 
virtual ~EvolutionControl ()
 destructor More...
 
Methods directly called by MURE to interact with evolution
virtual void ControlAtEachMCNPStep ()
 control at each MCNP step (just after a MCNP run) More...
 
virtual void ControlAtEachRKStep ()
 control at each RK step (just before a RK step) More...
 
virtual void ControlBeforeMCNPStep ()
 control at each MCNP step (just before a MCNP run) More...
 
virtual void ControlAfterEndOfRKIntegration ()
 control at the end of the RK integration, just before an other MCNP run. More...
 
void SetTimeCutting (vector< double >T)
 Set Time at which MCNP run is performed. More...
 
vector< double > & GetMCNPRunTimes ()
 returns Time at which MCNP run is performed More...
 
Evolution Condition methods
void SetWantedKeff (double keff=1.)
 set the wanted keff value More...
 
void SetWantedHNProportion (double HNproportion=0.01)
 set the wanted Heavy Nucleus proportion More...
 
double GetWantedHNProportion ()
 return the wanted Heavy Nucleus proportion More...
 
void SetLockToInitialKeff (bool flag=true)
 set keff control to keep keff at its initial value. (tang) More...
 
void SetConstantPower (bool flag=true)
 say whether the power is kept constant or not More...
 
bool IsConstantPower ()
 return whether the power is kept constant or not More...
 
void SetFuelReprocessing (FuelReprocessing *processing)
 add the FuelReprocessing More...
 
FuelReprocessingGetFuelReprocessing ()
 get the FuelReprocessing More...
 
Safety related methods
virtual void CalculateCoeffsAtStep (int s)
 Abstract method ; to be overlaoded. More...
 
virtual void SetRunFuelTemperatureCoeff (bool flag=true)
 Abstract method ; to be overlaoded. More...
 
virtual void SetRunVoidCoeff (bool flag=true)
 Abstract method ; to be overlaoded. More...
 
virtual void SetRunModeratorTemperatureCoeff (bool flag=true)
 Abstract method ; to be overlaoded. More...
 
virtual void SetRunPoisonReactivityWorth (bool flag=true)
 Abstract method ; to be overlaoded. More...
 
virtual void SetCriticalitySource (MCNPSource *s)
 Abstract method ; to be overlaoded. More...
 
virtual void LaunchReactivityCoeffsCalculations ()
 Abstract method ; to be overlaoded. More...
 
virtual void ControlKeff (double Time)
 Abstract method ; to be overlaoded. More...
 
void RunMCNPCriticality (string FileName)
 Run MCNP only for a Kcode (no tally) More...
 
Reaction rates and keff estimation methods
virtual double EstimatedKeff ()
 Extrapolation of Keff on the next step from a linear fit. More...
 
virtual void FindKeffSlope ()
 Find the slope of Keff base on previous run (fit) More...
 
virtual void FindAbsorptionSlope ()
 Find the slope of Aborption base on previous run (fit) More...
 
virtual void FindFissionSlope ()
 Find the slope of Fission base on previous run (fit) More...
 
virtual void FindNuFissionSlope ()
 Find the slope of Fission*nu base on previous run (fit) More...
 
virtual void ExtrapolateRates ()
 Extrapolation of reaction rates on the next step from a linear fit. More...
 
Miscellaneous methods
virtual void WriteControlParameters ()
 Write poison/fissile proportions etc. More...
 
virtual void WriteCurrentRates ()
 Write absorpstion, fission, ... rates in ABS, FISS, ... files. More...
 
void PrintKeffWarning ()
 Print Keff estimation warnings. More...
 
void FindNextCoefs (double value, vector< double > &V, double &Slope, double &Intersept, int &LastMCNPRunNumber)
 Fit a vector and return the fitted parameters. More...
 

Protected Member Functions

virtual void InitVector ()
 build vector used in fits full of 0. More...
 

Protected Attributes

vector< double > fMCNPRunTimes
 Time at which MCNP run is performed. More...
 
bool fConstantPower
 whether or not keep a constant power More...
 
double fWantedKeff
 The wanted Keff of the problem. More...
 
double fWantedHNProportion
 The wanted heavy nuclide proportion. More...
 
vector< double > fMCNPTime
 vector of last MCNP run time (for fits) More...
 
vector< double > fMCNPKeff
 vector of last MCNP run Keff More...
 
vector< double > fMCNPDeltaKeff
 vector of last MCNP run Keff error More...
 
vector< double > fKeffWarningTime
 Times at which estimate keff differs from MCNP keff at 3sigma. More...
 
vector< double > fKeffWarningGap
 |Estimate keff - Mcnp Keff| More...
 
vector< double > fKeffWarning3sigma
 3sigma on MCNP keff More...
 
vector< int > fKeffWarningMCNPNum
 The MCNP run number of the warning. More...
 
double fFitKeffSlope
 slope to find the Keff extrapolation More...
 
double fFitKeffIntersept
 intersept to find the Keff extrapolation More...
 
vector< double > fMCNPAbs
 vector of last MCNP run's global total absorption rate. More...
 
vector< double > fMCNPDeltaAbs
 vector of last MCNP run global Absorption rate (-2) error More...
 
double fFitAbsSlope
 slope to find extrapolated Absorption value. More...
 
double fFitAbsIntercept
 Absorption intercept for the extrapolation. More...
 
vector< double > fMCNPFiss
 vector of last MCNP run's global fission rate. More...
 
vector< double > fMCNPDeltaFiss
 vector of last MCNP run's global fission rate error. More...
 
double fFitFissSlope
 slope of linear fit of the fission rate. More...
 
double fFitFissIntercept
 intersept of linear fit of the fission rate. More...
 
vector< double > fMCNPNuFiss
 vector of last MCNP run's global nu*fission rate. More...
 
vector< double > fMCNPDeltaNuFiss
 vector of last MCNP run's global nu*fission rate error More...
 
double fFitNuFissSlope
 slope of linear fit of the nu*fission rate. More...
 
double fFitNuFissIntercept
 intersept of linear fit of the nu*fission rate. More...
 
double fOldKeff
 The previous MCNP keff result. More...
 
bool fLockToInitialKeff
 for keff control. More...
 
double fSumOfFission
 sum of all (n,fission) reaction in a cell More...
 
double fSumOfCapture
 sum of all (n,gamma) reaction in a cell More...
 
double fSumOfN2N
 sum of all (n,2n) reaction in a cell More...
 
double fTNF
 the Tally normalization Factor More...
 
FuelReprocessingfFuelReprocessing
 the FuelReprocessing More...
 

Detailed Description

EvolutionControl allows interactions with the evolution.

A list of usefull methods are provided to control evolution. The control only acts through the 2 main methods EvolutionControl::ControlAtEachMCNPStep() and EvolutionControl::ControlAtEachRKStep().

To implement your own evolution control, you have to make your onw class with inheritance mechanism in which YOU ABSOLUTELY NEED TO DEFINE THE EvolutionControl* Clone() method!!!

See Also
User Guide
Author
PTO
Version
1.0

Constructor & Destructor Documentation

EvolutionControl::EvolutionControl ( )

Default Constructor.

By default the tally normalization factor is <0. This mean that the power will be used to normalized tallies. The Constant power is assumed and the wanted Keff is set to 1.

EvolutionControl::EvolutionControl ( const EvolutionControl ev)

Copy constructor.

virtual EvolutionControl::~EvolutionControl ( )
inlinevirtual

destructor

Member Function Documentation

virtual void EvolutionControl::CalculateCoeffsAtStep ( int  s)
inlinevirtual

Abstract method ; to be overlaoded.

virtual EvolutionControl* EvolutionControl::Clone ( )
inlinevirtual
void EvolutionControl::ControlAfterEndOfRKIntegration ( )
virtual

control at the end of the RK integration, just before an other MCNP run.

Reimplemented in EvolutionWrapper, InLineReprocessing, RodEvolutionControl, FissileEvolutionControl, HNEvolutionControl, and PoisonEvolutionControl.

void EvolutionControl::ControlAtEachMCNPStep ( )
virtual

control at each MCNP step (just after a MCNP run)

Reimplemented in EvolutionWrapper, InLineReprocessing, RodEvolutionControl, FissileEvolutionControl, HNEvolutionControl, and PoisonEvolutionControl.

void EvolutionControl::ControlAtEachRKStep ( )
virtual

control at each RK step (just before a RK step)

Reimplemented in EvolutionWrapper, InLineReprocessing, RodEvolutionControl, FissileEvolutionControl, HNEvolutionControl, and PoisonEvolutionControl.

void EvolutionControl::ControlBeforeMCNPStep ( )
virtual

control at each MCNP step (just before a MCNP run)

virtual void EvolutionControl::ControlKeff ( double  Time)
inlinevirtual

Abstract method ; to be overlaoded.

double EvolutionControl::EstimatedKeff ( )
virtual

Extrapolation of Keff on the next step from a linear fit.

void EvolutionControl::ExtrapolateRates ( )
virtual

Extrapolation of reaction rates on the next step from a linear fit.

Reimplemented in FissileEvolutionControl, and PoisonEvolutionControl.

void EvolutionControl::FindAbsorptionSlope ( )
virtual

Find the slope of Aborption base on previous run (fit)

void EvolutionControl::FindFissionSlope ( )
virtual

Find the slope of Fission base on previous run (fit)

void EvolutionControl::FindKeffSlope ( )
virtual

Find the slope of Keff base on previous run (fit)

void EvolutionControl::FindNextCoefs ( double  value,
vector< double > &  V,
double &  Slope,
double &  Intersept,
int &  LastMCNPRunNumber 
)

Fit a vector and return the fitted parameters.

The value (at time T) is added to the vector V and a time linear fit is performed to find the slope and intersept

Parameters
value: the value added to the vector V to fit
V: the vector to fit
Slope: output only: the slope of the linear fit
Intersept: output only: the intersept of the linear fit.
LastMCNPRunNumber: value of the last MCNP number to avoid to used 2 time the same value in case of multi call
void EvolutionControl::FindNuFissionSlope ( )
virtual

Find the slope of Fission*nu base on previous run (fit)

FuelReprocessing* EvolutionControl::GetFuelReprocessing ( )
inline
vector<double>& EvolutionControl::GetMCNPRunTimes ( )
inline

returns Time at which MCNP run is performed

double EvolutionControl::GetWantedHNProportion ( )
inline

return the wanted Heavy Nucleus proportion

void EvolutionControl::InitVector ( )
protectedvirtual

build vector used in fits full of 0.

Reimplemented in RodEvolutionControl, and PoisonEvolutionControl.

bool EvolutionControl::IsConstantPower ( )
inline

return whether the power is kept constant or not

virtual void EvolutionControl::LaunchReactivityCoeffsCalculations ( )
inlinevirtual

Abstract method ; to be overlaoded.

void EvolutionControl::PrintKeffWarning ( )

Print Keff estimation warnings.

If abs(MCNP Keff - Estimated Keff)>3*MCNP_Keff_sigma) the time, the MCNP run number, the difference and the 3 sigma are printed.

void EvolutionControl::RunMCNPCriticality ( string  FileName)

Run MCNP only for a Kcode (no tally)

void EvolutionControl::SetConstantPower ( bool  flag = true)
inline

say whether the power is kept constant or not

virtual void EvolutionControl::SetCriticalitySource ( MCNPSource s)
inlinevirtual

Abstract method ; to be overlaoded.

void EvolutionControl::SetFuelReprocessing ( FuelReprocessing processing)
inline
void EvolutionControl::SetLockToInitialKeff ( bool  flag = true)
inline

set keff control to keep keff at its initial value. (tang)

virtual void EvolutionControl::SetRunFuelTemperatureCoeff ( bool  flag = true)
inlinevirtual

Abstract method ; to be overlaoded.

virtual void EvolutionControl::SetRunModeratorTemperatureCoeff ( bool  flag = true)
inlinevirtual

Abstract method ; to be overlaoded.

virtual void EvolutionControl::SetRunPoisonReactivityWorth ( bool  flag = true)
inlinevirtual

Abstract method ; to be overlaoded.

virtual void EvolutionControl::SetRunVoidCoeff ( bool  flag = true)
inlinevirtual

Abstract method ; to be overlaoded.

void EvolutionControl::SetTimeCutting ( vector< double >  T)

Set Time at which MCNP run is performed.

void EvolutionControl::SetWantedHNProportion ( double  HNproportion = 0.01)
inline

set the wanted Heavy Nucleus proportion

void EvolutionControl::SetWantedKeff ( double  keff = 1.)
inline

set the wanted keff value

virtual void EvolutionControl::WriteControlParameters ( )
inlinevirtual

Write poison/fissile proportions etc.

Reimplemented in FissileEvolutionControl, and PoisonEvolutionControl.

void EvolutionControl::WriteCurrentRates ( )
virtual

Write absorpstion, fission, ... rates in ABS, FISS, ... files.

Reimplemented in PoisonEvolutionControl.

Member Data Documentation

bool EvolutionControl::fConstantPower
protected

whether or not keep a constant power

double EvolutionControl::fFitAbsIntercept
protected

Absorption intercept for the extrapolation.

double EvolutionControl::fFitAbsSlope
protected

slope to find extrapolated Absorption value.

double EvolutionControl::fFitFissIntercept
protected

intersept of linear fit of the fission rate.

double EvolutionControl::fFitFissSlope
protected

slope of linear fit of the fission rate.

double EvolutionControl::fFitKeffIntersept
protected

intersept to find the Keff extrapolation

double EvolutionControl::fFitKeffSlope
protected

slope to find the Keff extrapolation

double EvolutionControl::fFitNuFissIntercept
protected

intersept of linear fit of the nu*fission rate.

double EvolutionControl::fFitNuFissSlope
protected

slope of linear fit of the nu*fission rate.

FuelReprocessing* EvolutionControl::fFuelReprocessing
protected
vector<double> EvolutionControl::fKeffWarning3sigma
protected

3sigma on MCNP keff

vector<double> EvolutionControl::fKeffWarningGap
protected

|Estimate keff - Mcnp Keff|

vector<int> EvolutionControl::fKeffWarningMCNPNum
protected

The MCNP run number of the warning.

vector<double> EvolutionControl::fKeffWarningTime
protected

Times at which estimate keff differs from MCNP keff at 3sigma.

bool EvolutionControl::fLockToInitialKeff
protected

for keff control.

vector<double> EvolutionControl::fMCNPAbs
protected

vector of last MCNP run's global total absorption rate.

vector<double> EvolutionControl::fMCNPDeltaAbs
protected

vector of last MCNP run global Absorption rate (-2) error

vector<double> EvolutionControl::fMCNPDeltaFiss
protected

vector of last MCNP run's global fission rate error.

vector<double> EvolutionControl::fMCNPDeltaKeff
protected

vector of last MCNP run Keff error

vector<double> EvolutionControl::fMCNPDeltaNuFiss
protected

vector of last MCNP run's global nu*fission rate error

vector<double> EvolutionControl::fMCNPFiss
protected

vector of last MCNP run's global fission rate.

vector<double> EvolutionControl::fMCNPKeff
protected

vector of last MCNP run Keff

vector<double> EvolutionControl::fMCNPNuFiss
protected

vector of last MCNP run's global nu*fission rate.

vector<double> EvolutionControl::fMCNPRunTimes
protected

Time at which MCNP run is performed.

vector<double> EvolutionControl::fMCNPTime
protected

vector of last MCNP run time (for fits)

double EvolutionControl::fOldKeff
protected

The previous MCNP keff result.

double EvolutionControl::fSumOfCapture
protected

sum of all (n,gamma) reaction in a cell

double EvolutionControl::fSumOfFission
protected

sum of all (n,fission) reaction in a cell

double EvolutionControl::fSumOfN2N
protected

sum of all (n,2n) reaction in a cell

double EvolutionControl::fTNF
protected

the Tally normalization Factor

double EvolutionControl::fWantedHNProportion
protected

The wanted heavy nuclide proportion.

double EvolutionControl::fWantedKeff
protected

The wanted Keff of the problem.


The documentation for this class was generated from the following files:

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