Flow123d
jenkins-Flow123d-linux-release-multijob-282
|
#include <sorption_base.hh>
Classes | |
class | EqData |
struct | SorptionRecord |
Public Member Functions | |
TYPEDEF_ERR_INFO (EI_ArrayName, std::string) | |
DECLARE_INPUT_EXCEPTION (ExcSubstanceCountMatch,<< "The size of the input array "<< EI_ArrayName::qval<< " does not match the number of substances.") | |
SorptionBase (Mesh &init_mesh, Input::Record in_rec) | |
virtual | ~SorptionBase (void) |
void | initialize () override |
Prepares the object to usage. More... | |
void | zero_time_step () override |
void | update_solution (void) override |
Updates the solution. More... | |
void | output_data (void) override |
Output method. 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... | |
void | choose_next_time (void) override |
Disable changes in TimeGovernor by empty method. More... | |
ReactionTerm & | substances (SubstanceList &substances) |
Sets the names of substances considered in transport. More... | |
ReactionTerm & | output_stream (OutputTime &ostream) |
Sets the output stream which is given from transport class. More... | |
ReactionTerm & | concentration_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 () |
Mesh & | mesh () |
TimeMark::Type | mark_type () |
FieldSet & | data () |
virtual void | get_solution_vector (double *&vector, unsigned int &size) |
virtual void | get_parallel_solution_vector (Vec &vector) |
Static Public Member Functions | |
static Input::Type::Record | record_factory (SorptionRecord::Type) |
Creates the input record for different cases of sorption model (simple or in dual porosity). More... | |
static Input::Type::Selection | make_output_selection (const string &output_field_name, const string &selection_name) |
Static Public Attributes | |
static Input::Type::Record | input_type |
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 | |
SorptionBase () | |
void | make_reactions () |
void | initialize_substance_ids () |
Reads names of substances from input and creates indexing to global vector of substance. More... | |
void | initialize_from_input () |
Initializes private members of sorption from the input record. More... | |
void | initialize_fields () |
Initializes field sets. More... | |
void | set_initial_condition () |
Reads and sets initial condition for concentration in solid. More... | |
void | allocate_output_mpi (void) |
Allocates petsc vectors, prepares them for output and creates vector scatter. More... | |
void | output_vector_gather (void) override |
Gathers all the parallel vectors to enable them to be output. More... | |
double ** | compute_reaction (double **concentrations, int loc_el) |
virtual void | isotherm_reinit (std::vector< Isotherm > &isotherms, const ElementAccessor< 3 > &elm)=0 |
Reinitializes the isotherm. More... | |
void | make_tables (void) |
Protected Attributes | |
EqData * | data_ |
Pointer to equation data. The object is constructed in descendants. More... | |
unsigned int | n_interpolation_steps_ |
double | solvent_density_ |
std::vector< double > | solubility_vec_ |
std::vector< double > | table_limit_ |
std::vector< std::vector < Isotherm > > | isotherms |
unsigned int | n_substances_ |
std::vector< unsigned int > | substance_global_idx_ |
Mapping from local indexing of substances to global. More... | |
double ** | conc_solid |
Input::Array | output_array |
Input::Type::Selection | output_selection |
ReactionTerm * | reaction_liquid |
ReactionTerm * | reaction_solid |
members used in output routines | |
VecScatter | vconc_out_scatter |
Output vector scatter. More... | |
Vec * | vconc_solid |
PETSC sorbed concentration vector (parallel). More... | |
std::vector< VectorSeqDouble > | conc_solid_out |
sorbed concentration array output (gathered - sequential) More... | |
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... | |
Distribution * | distribution_ |
Pointer to reference to distribution of elements between processors. More... | |
SubstanceList | substances_ |
Names belonging to substances. More... | |
OutputTime * | output_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... | |
Mesh * | mesh_ |
TimeGovernor * | time_ |
Input::Record | input_record_ |
FieldSet * | eq_data_ |
Definition at line 24 of file sorption_base.hh.
SorptionBase::SorptionBase | ( | Mesh & | init_mesh, |
Input::Record | in_rec | ||
) |
Constructor with parameter for initialization of a new declared class member
Definition at line 117 of file sorption_base.cc.
|
virtual |
Destructor.
Definition at line 126 of file sorption_base.cc.
|
protected |
This method disables to use constructor without parameters.
|
protected |
Allocates petsc vectors, prepares them for output and creates vector scatter.
Definition at line 529 of file sorption_base.cc.
|
protectedvirtual |
For simulation of sorption in just one element either inside of MOBILE or IMMOBILE pores.
Implements ReactionTerm.
Definition at line 484 of file sorption_base.cc.
SorptionBase::DECLARE_INPUT_EXCEPTION | ( | ExcSubstanceCountMatch | , |
<< "The size of the input array "<< EI_ArrayName::qval<< " does not match the number of substances." | |||
) |
|
overridevirtual |
Prepares the object to usage.
Allocating memory, reading input, initialization of fields.
Reimplemented from EquationBase.
Definition at line 218 of file sorption_base.cc.
|
protected |
Initializes field sets.
Definition at line 369 of file sorption_base.cc.
|
protected |
Initializes private members of sorption from the input record.
Definition at line 320 of file sorption_base.cc.
|
protected |
Reads names of substances from input and creates indexing to global vector of substance.
Also creates the local vector of molar masses.
Definition at line 274 of file sorption_base.cc.
|
protectedpure virtual |
Reinitializes the isotherm.
On data change the isotherm is recomputed, possibly new interpolation table is made. Pure virtual method.
Implemented in SorptionImmob, SorptionMob, SorptionDual, and SorptionSimple.
|
inlinestatic |
|
protected |
Initializes possible following reactions from input record. It should be called after setting mesh, time_governor, distribution and concentration_matrix if there are some setting methods for reactions called (they are not at the moment, so it could be part of init_from_input).
Definition at line 143 of file sorption_base.cc.
|
protected |
Creates interpolation table for isotherms.
Definition at line 457 of file sorption_base.cc.
|
overridevirtual |
Output method.
Some reaction models have their own data to output (sorption, dual porosity)
Reimplemented from ReactionTerm.
Definition at line 563 of file sorption_base.cc.
|
overrideprotectedvirtual |
Gathers all the parallel vectors to enable them to be output.
Reimplemented from ReactionTerm.
Definition at line 552 of file sorption_base.cc.
|
static |
Creates the input record for different cases of sorption model (simple or in dual porosity).
Definition at line 85 of file sorption_base.cc.
|
protected |
Reads and sets initial condition for concentration in solid.
Definition at line 417 of file sorption_base.cc.
SorptionBase::TYPEDEF_ERR_INFO | ( | EI_ArrayName | , |
std::string | |||
) |
|
overridevirtual |
Updates the solution.
Goes through local distribution of elements and calls compute_reaction
.
Reimplemented from EquationBase.
Definition at line 436 of file sorption_base.cc.
|
overridevirtual |
Does first computation after initialization process. The time is set and initial condition is set and output.
Reimplemented from EquationBase.
Definition at line 397 of file sorption_base.cc.
|
protected |
Array for storage infos about sorbed species concentrations.
Definition at line 200 of file sorption_base.hh.
|
protected |
sorbed concentration array output (gathered - sequential)
Definition at line 215 of file sorption_base.hh.
|
protected |
Pointer to equation data. The object is constructed in descendants.
Definition at line 165 of file sorption_base.hh.
|
static |
Static variable for new input data types input
Definition at line 34 of file sorption_base.hh.
|
protected |
Three dimensional array contains intersections between isotherms and mass balance lines. It describes behaviour of sorbents in mobile pores of various rock matrix enviroments. Up to |nr_of_region x nr_of_substances x n_points| doubles. Because of equidistant step lenght in cocidered system of coordinates, just function values are stored.
Definition at line 190 of file sorption_base.hh.
|
protected |
Temporary nr_of_points can be computed using step_length. Should be |nr_of_region x nr_of_substances| matrix later.
Definition at line 170 of file sorption_base.hh.
|
protected |
Definition at line 192 of file sorption_base.hh.
|
protected |
Definition at line 202 of file sorption_base.hh.
|
protected |
Definition at line 204 of file sorption_base.hh.
|
protected |
Reaction model that follows the sorption.
Definition at line 208 of file sorption_base.hh.
|
protected |
Definition at line 209 of file sorption_base.hh.
|
protected |
Critical concentrations of species dissolved in water.
Definition at line 179 of file sorption_base.hh.
|
protected |
Density of the solvent. TODO: Could be done region dependent, easily.
Definition at line 175 of file sorption_base.hh.
|
protected |
Mapping from local indexing of substances to global.
Definition at line 195 of file sorption_base.hh.
|
protected |
Concentration table limits of species dissolved in water.
Definition at line 183 of file sorption_base.hh.
|
protected |
Output vector scatter.
Definition at line 213 of file sorption_base.hh.
|
protected |
PETSC sorbed concentration vector (parallel).
Definition at line 214 of file sorption_base.hh.