Flow123d  jenkins-Flow123d-windows32-release-multijob-51
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 Distribution;
20 class Isotherm;
21 
22 /** @brief Simple sorption model without dual porosity.
23  *
24  */
26 {
27 public:
29 
30  /// Constructor.
31  SorptionSimple(Mesh &init_mesh, Input::Record in_rec);
32 
33  /// Destructor.
34  ~SorptionSimple(void);
35 
36 protected:
37  /// Reinitializes the isotherm.
39 };
40 
41 
42 /** @brief Abstract class of sorption model in case dual porosity is considered.
43  *
44  */
46 {
47 public:
48  /// Constructor.
49  SorptionDual(Mesh &init_mesh, Input::Record in_rec,
50  const string &output_conc_name,
51  const string &output_selection_name);
52 
53  /// Destructor.
54  ~SorptionDual(void);
55 
56  /// Sets the immobile porosity field.
58  {
59  immob_porosity_.copy_from(por_imm);
60  }
61 
62 protected:
63  /// Reinitializes the isotherm.
65 
66  Field<3, FieldValue<3>::Scalar > immob_porosity_; //< Immobile porosity field copied from transport
67 
68  //virtual double compute_sorbing_scale(double por_m, double por_imm) = 0;
69 };
70 
71 
72 /** @brief Sorption model in mobile zone in case dual porosity is considered.
73  *
74  */
76 {
77 public:
79 
80  /// Constructor.
81  SorptionMob(Mesh &init_mesh, Input::Record in_rec);
82 
83  /// Destructor.
84  ~SorptionMob(void);
85 
86 protected:
87  /// Reinitializes the isotherm.
88  void isotherm_reinit(std::vector<Isotherm> &isotherms_vec, const ElementAccessor<3> &elem) override;
89 
90  //double compute_sorbing_scale(double por_m, double por_imm) override;
91 };
92 
93 
94 /** @brief Sorption model in immobile zone in case dual porosity is considered.
95  *
96  */
98 {
99 public:
101 
102  /// Constructor.
103  SorptionImmob(Mesh &init_mesh, Input::Record in_rec);
104 
105  /// Destructor.
106  ~SorptionImmob(void);
107 
108 protected:
109  /// Reinitializes the isotherm.
110  void isotherm_reinit(std::vector<Isotherm> &isotherms_vec, const ElementAccessor<3> &elem) override;
111 
112  //double compute_sorbing_scale(double por_m, double por_imm) override;
113 };
114 
115 
116 #endif // SORPTION_H
static Input::Type::Record input_type
Definition: sorption.hh:78
Sorption model in immobile zone in case dual porosity is considered.
Definition: sorption.hh:97
~SorptionDual(void)
Destructor.
Definition: sorption.cc:86
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:57
Class template representing a field with values dependent on: point, element, and region...
Definition: field.hh:48
~SorptionMob(void)
Destructor.
Definition: sorption.cc:100
Abstract class of sorption model in case dual porosity is considered.
Definition: sorption.hh:45
static Input::Type::Record input_type
Definition: sorption.hh:100
void isotherm_reinit(std::vector< Isotherm > &isotherms_vec, const ElementAccessor< 3 > &elem) override
Reinitializes the isotherm.
Definition: sorption.cc:111
Definition: mesh.h:108
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:66
Accessor to the data with type Type::Record.
Definition: accessors.hh:308
Sorption model in mobile zone in case dual porosity is considered.
Definition: sorption.hh:75
SorptionImmob(Mesh &init_mesh, Input::Record in_rec)
Constructor.
Definition: sorption.cc:163
static Input::Type::Record input_type
Definition: sorption.hh:28
void isotherm_reinit(std::vector< Isotherm > &isotherms, const ElementAccessor< 3 > &elm) override
Reinitializes the isotherm.
Definition: sorption.cc:27
SorptionSimple(Mesh &init_mesh, Input::Record in_rec)
Constructor.
Definition: sorption.cc:16
~SorptionSimple(void)
Destructor.
Definition: sorption.cc:24
Simple sorption model without dual porosity.
Definition: sorption.hh:25
Record type proxy class.
Definition: type_record.hh:161
void copy_from(const FieldCommon &other) override
Definition: field.impl.hh:311
SorptionDual(Mesh &init_mesh, Input::Record in_rec, const string &output_conc_name, const string &output_selection_name)
Constructor.
Definition: sorption.cc:73
void isotherm_reinit(std::vector< Isotherm > &isotherms_vec, const ElementAccessor< 3 > &elem) override
Reinitializes the isotherm.
Definition: sorption.cc:178
SorptionMob(Mesh &init_mesh, Input::Record in_rec)
Constructor.
Definition: sorption.cc:95
~SorptionImmob(void)
Destructor.
Definition: sorption.cc:167