PyNE C++
enrichment.h
Go to the documentation of this file.
1 
6 #ifndef PYNE_B3ANNCKDQ5HEJLI33RPZPDNX6A
7 #define PYNE_B3ANNCKDQ5HEJLI33RPZPDNX6A
8 
9 #ifndef PYNE_IS_AMALGAMATED
10 #include "enrichment_symbolic.h"
11 #endif
12 
13 /************************************************/
14 /*** Enrichment Component Class and Functions ***/
15 /************************************************/
16 
17 namespace pyne {
19 namespace enrichment {
20 
25 
28  double feed_per_prod(double x_feed, double x_prod, double x_tail);
31  double feed_per_tail(double x_feed, double x_prod, double x_tail);
34  double prod_per_feed(double x_feed, double x_prod, double x_tail);
37  double prod_per_tail(double x_feed, double x_prod, double x_tail);
40  double tail_per_feed(double x_feed, double x_prod, double x_tail);
43  double tail_per_prod(double x_feed, double x_prod, double x_tail);
45  double value_func(double x);
48  double swu_per_feed(double x_feed, double x_prod, double x_tail);
51  double swu_per_prod(double x_feed, double x_prod, double x_tail);
54  double swu_per_tail(double x_feed, double x_prod, double x_tail);
55 
59  double alphastar_i(double alpha, double Mstar, double M_i);
60 
64 
71  Cascade solve_numeric(Cascade & orig_casc, double tolerance=1.0E-7,
72  int max_iter=100);
76  void _recompute_nm(Cascade & casc, double tolerance=1.0E-7);
93  Cascade _norm_comp_secant(Cascade & casc, double tolerance=1.0E-7, int max_iter=100);
103  double _deltaU_i_OverG(Cascade & casc, int i);
105 
117  Cascade multicomponent(Cascade & orig_casc, char * solver,
118  double tolerance=1.0E-7, int max_iter=100);
119  Cascade multicomponent(Cascade & orig_casc, std::string solver="symbolic",
120  double tolerance=1.0E-7, int max_iter=100);
122 
124  class EnrichmentInfiniteLoopError: public std::exception
125  {
127  virtual const char* what() const throw()
128  {
129  return "Inifinite loop found while calculating enrichment cascade.";
130  }
131  };
132 
135  class EnrichmentIterationLimit: public std::exception
136  {
138  virtual const char* what() const throw()
139  {
140  return "Iteration limit hit durring enrichment calculation.";
141  }
142  };
143 
145  class EnrichmentIterationNaN: public std::exception
146  {
148  virtual const char* what() const throw()
149  {
150  return "Iteration has hit a point where some values are not-a-number.";
151  }
152  };
153 
154 // end enrichment
155 }
156 // end pyne
157 }
158 
159 #endif
double prod_per_feed(double x_feed, double x_prod, double x_tail)
Definition: enrichment.cpp:49
double swu_per_feed(double x_feed, double x_prod, double x_tail)
Definition: enrichment.cpp:65
Cascade default_uranium_cascade
a cascade instance with default values for a uranium enrichment.
Cascade solve_numeric(Cascade &orig_casc, double tolerance=1.0E-7, int max_iter=100)
Definition: enrichment.cpp:314
double prod_per_tail(double x_feed, double x_prod, double x_tail)
Definition: enrichment.cpp:45
void _recompute_nm(Cascade &casc, double tolerance=1.0E-7)
Definition: enrichment.cpp:93
double feed_per_prod(double x_feed, double x_prod, double x_tail)
Definition: enrichment.cpp:37
a struct matching the '/decay/alphas' table in nuc_data.h5.
Definition: data.h:579
void _recompute_prod_tail_mats(Cascade &casc)
Definition: enrichment.cpp:147
double alphastar_i(double alpha, double Mstar, double M_i)
Definition: enrichment.cpp:87
Cascade _fill_default_uranium_cascade()
Greates a cascade instance with default values for a uranium enrichment.
Definition: enrichment.cpp:8
double _deltaU_i_OverG(Cascade &casc, int i)
Definition: enrichment.cpp:299
Custom exception for when an enrichment solver iteration has produced a NaN.
Definition: enrichment.h:145
double tail_per_feed(double x_feed, double x_prod, double x_tail)
Definition: enrichment.cpp:53
double swu_per_tail(double x_feed, double x_prod, double x_tail)
Definition: enrichment.cpp:79
double swu_per_prod(double x_feed, double x_prod, double x_tail)
Definition: enrichment.cpp:72
Custom exception for when an enrichment solver has entered an infinite loop.
Definition: enrichment.h:124
A multicomponent enrichment cascade solver using a symbolic solution to the mass flow rate equations...
double value_func(double x)
Computes the value or separation potential of an assay x.
Definition: enrichment.cpp:61
double tail_per_prod(double x_feed, double x_prod, double x_tail)
Definition: enrichment.cpp:57
A container representing enrichment cascades.
Definition: _atomic_data.h:16
double feed_per_tail(double x_feed, double x_prod, double x_tail)
Definition: enrichment.cpp:41
Definition: enrichment.h:135
A set of physical parameters used to specify an enrichment cascade.
Definition: enrichment_cascade.h:21
Cascade _norm_comp_secant(Cascade &casc, double tolerance=1.0E-7, int max_iter=100)
Definition: enrichment.cpp:187