Flow123d  jenkins-Flow123d-linux-release-multijob-198
sorption.hh
Go to the documentation of this file.
1 /** @brief This file contains classes representing sorption model.
2  *
3  * Sorption model can be computed both in case the dual porosity is considered or not.
4  * The difference is only in the isotherm_reinit method.
5  * Passing immobile porosity from dual porosity model is solved in abstract class SorptionDual.
6  *
7  * TODO:
8  * It seems that the methods isotherm_reinit() are different only at computation of scale_aqua and scale_sorbed.
9  * So it could be moved to SorptionDual and the only method which would be virtual would be
10  * compute_sorbing_scale(). It is prepared in comment code.
11  */
12 #ifndef SORPTION_H
13 #define SORPTION_H
14 
17 
18 class Mesh;
19 class Isotherm;
20 
21 /** @brief Simple sorption model without dual porosity.
22  *
23  */
25 {
26 public:
28 
29  /// Constructor.
30  SorptionSimple(Mesh &init_mesh, Input::Record in_rec);
31 
32  /// Destructor.
33  ~SorptionSimple(void);
34 
35 protected:
36  /// Reinitializes the isotherm.
38 };
39 
40 
41 /** @brief Abstract class of sorption model in case dual porosity is considered.
42  *
43  */
45 {
46 public:
47  /// Constructor.
48  SorptionDual(Mesh &init_mesh, Input::Record in_rec,
49  const string &output_conc_name,
50  const string &output_selection_name);
51 
52  /// Destructor.
53  ~SorptionDual(void);
54 
55  /// Sets the immobile porosity field.
57  {
58  immob_porosity_.copy_from(por_imm);
59  }
60 
61 protected:
62  /// Reinitializes the isotherm.
64 
65  Field<3, FieldValue<3>::Scalar > immob_porosity_; //< Immobile porosity field copied from transport
66 
67  //virtual double compute_sorbing_scale(double por_m, double por_imm) = 0;
68 };
69 
70 
71 /** @brief Sorption model in mobile zone in case dual porosity is considered.
72  *
73  */
75 {
76 public:
78 
79  /// Constructor.
80  SorptionMob(Mesh &init_mesh, Input::Record in_rec);
81 
82  /// Destructor.
83  ~SorptionMob(void);
84 
85 protected:
86  /// Reinitializes the isotherm.
87  void isotherm_reinit(std::vector<Isotherm> &isotherms_vec, const ElementAccessor<3> &elem) override;
88 
89  //double compute_sorbing_scale(double por_m, double por_imm) override;
90 };
91 
92 
93 /** @brief Sorption model in immobile zone in case dual porosity is considered.
94  *
95  */
97 {
98 public:
100 
101  /// Constructor.
102  SorptionImmob(Mesh &init_mesh, Input::Record in_rec);
103 
104  /// Destructor.
105  ~SorptionImmob(void);
106 
107 protected:
108  /// Reinitializes the isotherm.
109  void isotherm_reinit(std::vector<Isotherm> &isotherms_vec, const ElementAccessor<3> &elem) override;
110 
111  //double compute_sorbing_scale(double por_m, double por_imm) override;
112 };
113 
114 
115 #endif // SORPTION_H
static Input::Type::Record input_type
Definition: sorption.hh:77
Sorption model in immobile zone in case dual porosity is considered.
Definition: sorption.hh:96
~SorptionDual(void)
Destructor.
Definition: sorption.cc:93
std::vector< std::vector< Isotherm > > isotherms
void set_porosity_immobile(Field< 3, FieldValue< 3 >::Scalar > &por_imm)
Sets the immobile porosity field.
Definition: sorption.hh:56
Class template representing a field with values dependent on: point, element, and region...
Definition: field.hh:52
~SorptionMob(void)
Destructor.
Definition: sorption.cc:107
Abstract class of sorption model in case dual porosity is considered.
Definition: sorption.hh:44
static Input::Type::Record input_type
Definition: sorption.hh:99
void isotherm_reinit(std::vector< Isotherm > &isotherms_vec, const ElementAccessor< 3 > &elem) override
Reinitializes the isotherm.
Definition: sorption.cc:118
Definition: mesh.h:109
virtual void isotherm_reinit(std::vector< Isotherm > &isotherms, const ElementAccessor< 3 > &elm)=0
Reinitializes the isotherm.
Field< 3, FieldValue< 3 >::Scalar > immob_porosity_
Definition: sorption.hh:65
Accessor to the data with type Type::Record.
Definition: accessors.hh:327
Sorption model in mobile zone in case dual porosity is considered.
Definition: sorption.hh:74
SorptionImmob(Mesh &init_mesh, Input::Record in_rec)
Constructor.
Definition: sorption.cc:178
static Input::Type::Record input_type
Definition: sorption.hh:27
void isotherm_reinit(std::vector< Isotherm > &isotherms, const ElementAccessor< 3 > &elm) override
Reinitializes the isotherm.
Definition: sorption.cc:26
SorptionSimple(Mesh &init_mesh, Input::Record in_rec)
Constructor.
Definition: sorption.cc:15
~SorptionSimple(void)
Destructor.
Definition: sorption.cc:23
Simple sorption model without dual porosity.
Definition: sorption.hh:24
Record type proxy class.
Definition: type_record.hh:169
void copy_from(const FieldCommon &other) override
Definition: field.impl.hh:312
SorptionDual(Mesh &init_mesh, Input::Record in_rec, const string &output_conc_name, const string &output_selection_name)
Constructor.
Definition: sorption.cc:80
void isotherm_reinit(std::vector< Isotherm > &isotherms_vec, const ElementAccessor< 3 > &elem) override
Reinitializes the isotherm.
Definition: sorption.cc:193
SorptionMob(Mesh &init_mesh, Input::Record in_rec)
Constructor.
Definition: sorption.cc:102
~SorptionImmob(void)
Destructor.
Definition: sorption.cc:182