33 using namespace
Input::Type;
36 return Record(
"RadioactiveDecayProduct",
"A record describing a product of a radioactive decay.")
39 "The name of the product.")
41 "Not used at the moment! The released energy in MeV from the decay of the radionuclide into the product.")
43 "The branching ratio of the product when there is more than one." 44 "Considering only one product, the default ratio 1.0 is used." 45 "Its value must be positive. Further, the branching ratios of all products are normalized" 46 "by their sum, so the sum then gives 1.0 (this also resolves possible rounding errors).")
51 return Record(
"Decay",
"A model of a radioactive decay.")
53 "The name of the parent radionuclide.")
55 "The half life of the parent radionuclide in seconds.")
57 "An array of the decay products (daughters).")
62 return Record(
"RadioactiveDecay",
"A model of a radioactive decay and possibly of a decay chain.")
65 "An array of radioactive decays.")
67 "Numerical solver for the system of first order ordinary differential equations coming from the model.")
72 Input::register_class< RadioactiveDecay, Mesh &, Input::Record >(
"RadioactiveDecay") +
98 dec_it != decay_array.
end(); ++dec_it, ++i_decay)
101 half_lives_[i_decay] = dec_it->val<
double>(
"half_life");
104 string radionuclide = dec_it->val<
string>(
"radionuclide");
113 unsigned int i_product = 0;
115 prod_it != product_array.end(); ++prod_it, ++i_product)
117 string product_name = prod_it->val<
string>(
"name");
121 else THROW(ReactionTerm::ExcUnknownSubstance()
122 << ReactionTerm::EI_Substance(product_name)
123 << (*prod_it).ei_address());
125 bifurcation_[i_decay][i_product] = prod_it->val<
double>(
"branching_ratio");
132 else THROW(ReactionTerm::ExcUnknownSubstance()
133 << ReactionTerm::EI_Substance(radionuclide)
134 << (*dec_it).ei_address());
152 unsigned int reactant_index, product_index;
154 for (
unsigned int i_decay = 0; i_decay <
half_lives_.size(); i_decay++) {
159 for (
unsigned int i_product = 1; i_product <
substance_ids_[i_decay].size(); ++i_product){
void assemble_ode_matrix(void) override
Implements the assembly of the system matrix of the ODEs.
static Input::Type::Abstract & get_input_type()
static const Input::Type::Record & get_input_type_product()
Input record for a product of a radioactive decay.
SubstanceList substances_
Names belonging to substances.
~RadioactiveDecay(void)
Destructor.
unsigned int find_subst_name(const std::string &name)
Base class for linear reactions and decay chain.
unsigned int size() const
void initialize_from_input() override
Initializes private members of sorption from the input record.
Class ReactionTerm is an abstract class representing reaction term in transport.
static const Input::Type::Record & get_input_type_single_decay()
Input record which defines particular decay step.
Global macros to enhance readability and debugging, general constants.
arma::mat reaction_matrix_
Reaction matrix.
Class implements the radioactive decay chain.
static const Input::Type::Record & get_input_type()
static const int registrar
Registrar of class to factory.
static const Input::Type::Record & get_input_type()
Input record for class RadioactiveDecay.
Input::Record input_record_
std::vector< double > half_lives_
Half-lives of the substances.
std::vector< std::vector< unsigned int > > substance_ids_
RadioactiveDecay(Mesh &mesh, Input::Record in_rec)
Constructor.
unsigned int n_substances_
Number of all transported substances. It is the dimension of the reaction matrix. ...
#define THROW(whole_exception_expr)
Wrapper for throw. Saves the throwing point.
#define FLOW123D_FORCE_LINK_IN_CHILD(x)
std::vector< std::vector< double > > bifurcation_