Flow123d  jenkins-Flow123d-linux-release-multijob-282
Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | List of all members
RadioactiveDecay Class Reference

Class implements the radioactive decay chain. More...

#include <radioactive_decay.hh>

Inheritance diagram for RadioactiveDecay:
Inheritance graph
[legend]
Collaboration diagram for RadioactiveDecay:
Collaboration graph
[legend]

Public Member Functions

 RadioactiveDecay (Mesh &mesh, Input::Record in_rec)
 Constructor. More...
 
 ~RadioactiveDecay (void)
 Destructor. More...
 
- Public Member Functions inherited from FirstOrderReactionBase
 FirstOrderReactionBase (Mesh &init_mesh, Input::Record in_rec)
 Constructor. More...
 
 ~FirstOrderReactionBase (void)
 Destructor. More...
 
void initialize () override
 Prepares the object to usage. More...
 
void zero_time_step () override
 Moves the model to zero time. More...
 
void update_solution (void) override
 Updates the solution. More...
 
- Public Member Functions inherited from ReactionTerm
 TYPEDEF_ERR_INFO (EI_Substance, std::string)
 
 TYPEDEF_ERR_INFO (EI_Model, std::string)
 
 DECLARE_INPUT_EXCEPTION (ExcUnknownSubstance,<< "Unknown substance name: "<< EI_Substance::qval)
 
 DECLARE_INPUT_EXCEPTION (ExcWrongDescendantModel,<< "Impossible descendant model: "<< EI_Model::qval)
 
 ReactionTerm (Mesh &init_mesh, Input::Record in_rec)
 Constructor. More...
 
 ~ReactionTerm (void)
 Destructor. More...
 
virtual void output_data (void)
 Output method. More...
 
void choose_next_time (void) override
 Disable changes in TimeGovernor by empty method. More...
 
ReactionTermsubstances (SubstanceList &substances)
 Sets the names of substances considered in transport. More...
 
ReactionTermoutput_stream (OutputTime &ostream)
 Sets the output stream which is given from transport class. More...
 
ReactionTermconcentration_matrix (double **concentration, Distribution *conc_distr, int *el_4_loc, int *row_4_el)
 
- Public Member Functions inherited from EquationBase
 EquationBase ()
 
 EquationBase (Mesh &mesh, const Input::Record in_rec)
 
virtual ~EquationBase ()
 
virtual void set_time_upper_constraint (double dt)
 
virtual void set_time_lower_constraint (double dt)
 
TimeGovernor const & time ()
 
virtual void set_time_governor (TimeGovernor &time)
 
double planned_time ()
 
double solved_time ()
 
Meshmesh ()
 
TimeMark::Type mark_type ()
 
FieldSetdata ()
 
virtual void get_solution_vector (double *&vector, unsigned int &size)
 
virtual void get_parallel_solution_vector (Vec &vector)
 

Static Public Attributes

static Input::Type::Record input_type
 Input record for class RadioactiveDecay. More...
 
static Input::Type::Record input_type_single_decay
 Input record which defines particular decay step. More...
 
static Input::Type::Record input_type_product
 Input record for a product of a radioactive decay. More...
 
- Static Public Attributes inherited from ReactionTerm
static Input::Type::AbstractRecord input_type = AbstractRecord("ReactionTerm", "Equation for reading information about simple chemical reactions.")
 
static Input::Type::Record input_type_output_record
 Specification of the output record. More...
 

Protected Member Functions

void initialize_from_input () override
 Initializes private members of sorption from the input record. More...
 
void assemble_ode_matrix (void) override
 Implements the assembly of the system matrix of the ODEs. More...
 
- Protected Member Functions inherited from FirstOrderReactionBase
virtual double ** compute_reaction (double **concentrations, int loc_el) override
 Computes the reaction on a specified element. More...
 
unsigned int find_subst_name (const std::string &name)
 
- Protected Member Functions inherited from ReactionTerm
virtual void output_vector_gather (void)
 

Protected Attributes

std::vector< double > half_lives_
 Half-lives of the substances. More...
 
- Protected Attributes inherited from FirstOrderReactionBase
std::vector< std::vector
< unsigned int > > 
substance_ids_
 
std::vector< std::vector
< double > > 
bifurcation_
 
unsigned int n_substances_
 Number of all transported substances. It is the dimension of the reaction matrix. More...
 
arma::mat reaction_matrix_
 Reaction matrix. More...
 
arma::vec prev_conc_
 Column vector storing previous concetrations on an element. More...
 
arma::mat molar_matrix_
 Diagonal matrix with molar masses of substances. More...
 
arma::mat molar_mat_inverse_
 Inverse of molar_matrix_. More...
 
LinearODESolverBaselinear_ode_solver_
 
- Protected Attributes inherited from ReactionTerm
double ** concentration_matrix_
 
int * el_4_loc_
 Indices of elements belonging to local dofs. More...
 
int * row_4_el_
 Indices of rows belonging to elements. More...
 
Distributiondistribution_
 Pointer to reference to distribution of elements between processors. More...
 
SubstanceList substances_
 Names belonging to substances. More...
 
OutputTimeoutput_stream_
 Pointer to a transport output stream. More...
 
- Protected Attributes inherited from EquationBase
bool equation_empty_
 flag is true if only default constructor was called More...
 
Meshmesh_
 
TimeGovernortime_
 
Input::Record input_record_
 
FieldSeteq_data_
 

Detailed Description

Class implements the radioactive decay chain.

This class implements the user interface for radioactive decay chain and prepares the reaction matrix, The decay behaves like the linear reaction thus everything else is inherited from the FirstOrderReactionBase class.

TODO: fix the mass balance - we do not take in account the emitted particles.

Definition at line 19 of file radioactive_decay.hh.

Constructor & Destructor Documentation

RadioactiveDecay::RadioactiveDecay ( Mesh mesh,
Input::Record  in_rec 
)

Constructor.

Definition at line 45 of file radioactive_decay.cc.

RadioactiveDecay::~RadioactiveDecay ( void  )

Destructor.

Definition at line 50 of file radioactive_decay.cc.

Member Function Documentation

void RadioactiveDecay::assemble_ode_matrix ( void  )
overrideprotectedvirtual

Implements the assembly of the system matrix of the ODEs.

Implements FirstOrderReactionBase.

Definition at line 116 of file radioactive_decay.cc.

void RadioactiveDecay::initialize_from_input ( )
overrideprotectedvirtual

Initializes private members of sorption from the input record.

Implements FirstOrderReactionBase.

Definition at line 55 of file radioactive_decay.cc.

Member Data Documentation

std::vector<double> RadioactiveDecay::half_lives_
protected

Half-lives of the substances.

Definition at line 40 of file radioactive_decay.hh.

Record RadioactiveDecay::input_type
static
Initial value:
= Record("RadioactiveDecay", "A model of a radioactive decay and possibly of a decay chain.")
.derive_from( ReactionTerm::input_type )
.declare_key("decays", Array( RadioactiveDecay::input_type_single_decay, 1), Default::obligatory(),
"An array of radioactive decays.")
.declare_key("ode_solver", LinearODESolverBase::input_type, Default::optional(),
"Numerical solver for the system of first order ordinary differential equations coming from the model.")

Input record for class RadioactiveDecay.

Definition at line 22 of file radioactive_decay.hh.

Record RadioactiveDecay::input_type_product
static
Initial value:
= Record("RadioactiveDecayProduct", "A record describing a product of a radioactive decay.")
.allow_auto_conversion("name")
.declare_key("name", String(), Default::obligatory(),
"The name of the product.")
.declare_key("energy", Double(0.0), Default("0.0"),
"Not used at the moment! The released energy in MeV from the decay of the radionuclide into the product.")
.declare_key("branching_ratio", Double(0.0), Default("1.0"),
"The branching ratio of the product when there is more than one."
"Considering only one product, the default ratio 1.0 is used."
"Its value must be positive. Further, the branching ratios of all products are normalized"
"by their sum, so the sum then gives 1.0 (this also resolves possible rounding errors).")

Input record for a product of a radioactive decay.

Definition at line 24 of file radioactive_decay.hh.

Record RadioactiveDecay::input_type_single_decay
static
Initial value:
= Record("Decay", "A model of a radioactive decay.")
.declare_key("radionuclide", String(), Default::obligatory(),
"The name of the parent radionuclide.")
.declare_key("half_life", Double(0.0), Default::obligatory(),
"The half life of the parent radionuclide in seconds.")
.declare_key("products", Array(RadioactiveDecay::input_type_product,1), Default::obligatory(),
"An array of the decay products (daughters).")

Input record which defines particular decay step.

Definition at line 23 of file radioactive_decay.hh.


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