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.")
68 "An array of radioactive decays.")
73 Input::register_class< RadioactiveDecay, Mesh &, Input::Record >(
"RadioactiveDecay") +
99 dec_it != decay_array.
end(); ++dec_it, ++i_decay)
102 half_lives_[i_decay] = dec_it->val<
double>(
"half_life");
105 string radionuclide = dec_it->val<
string>(
"radionuclide");
114 unsigned int i_product = 0;
116 prod_it != product_array.end(); ++prod_it, ++i_product)
118 string product_name = prod_it->val<
string>(
"name");
120 if (idx < eq_data_base_->substances_.size())
122 else THROW(ReactionTerm::ExcUnknownSubstance()
123 << ReactionTerm::EI_Substance(product_name)
124 << (*prod_it).ei_address());
126 bifurcation_[i_decay][i_product] = prod_it->val<
double>(
"branching_ratio");
131 if (idx < eq_data_base_->substances_.size())
133 else THROW(ReactionTerm::ExcUnknownSubstance()
134 << ReactionTerm::EI_Substance(radionuclide)
135 << (*dec_it).ei_address());
153 unsigned int reactant_index, product_index;
155 for (
unsigned int i_decay = 0; i_decay <
half_lives_.size(); i_decay++) {
160 for (
unsigned int i_product = 1; i_product <
substance_ids_[i_decay].size(); ++i_product){
Input::Record input_record_
Base class for linear reactions and decay chain.
unsigned int n_substances_
Number of all transported substances. It is the dimension of the reaction matrix.
std::vector< std::vector< unsigned int > > substance_ids_
arma::mat reaction_matrix_
Reaction matrix.
std::vector< std::vector< double > > bifurcation_
unsigned int find_subst_name(const std::string &name)
static const int registrar
Registrar of class to factory.
static const Input::Type::Record & get_input_type_single_decay()
Input record which defines particular decay step.
void initialize_from_input() override
Initializes private members of sorption from the input record.
static const Input::Type::Record & get_input_type()
Input record for class RadioactiveDecay.
void assemble_ode_matrix(void) override
Implements the assembly of the system matrix of the ODEs.
std::vector< double > half_lives_
Half-lives of the substances.
static const Input::Type::Record & get_input_type_product()
Input record for a product of a radioactive decay.
~RadioactiveDecay(void)
Destructor.
RadioactiveDecay(Mesh &mesh, Input::Record in_rec)
Constructor.
static Input::Type::Abstract & it_abstract_immobile_term()
static Input::Type::Abstract & it_abstract_term()
static Input::Type::Abstract & it_abstract_reaction()
static Input::Type::Abstract & it_abstract_mobile_term()
Global macros to enhance readability and debugging, general constants.
#define FLOW123D_FORCE_LINK_IN_CHILD(x)
#define THROW(whole_exception_expr)
Wrapper for throw. Saves the throwing point.
Class ReactionTerm is an abstract class representing reaction term in transport.