Flow123d  release_2.2.0-41-g0958a8d
sorption.hh
Go to the documentation of this file.
1 /*!
2  *
3  * Copyright (C) 2015 Technical University of Liberec. All rights reserved.
4  *
5  * This program is free software; you can redistribute it and/or modify it under
6  * the terms of the GNU General Public License version 3 as published by the
7  * Free Software Foundation. (http://www.gnu.org/licenses/gpl-3.0.en.html)
8  *
9  * This program is distributed in the hope that it will be useful, but WITHOUT
10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11  * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
12  *
13  *
14  * @file sorption.hh
15  * @brief This file contains classes representing sorption model.
16  * Sorption model can be computed both in case the dual porosity is considered or not.
17  *
18  * The difference is only in the isotherm_reinit method.
19  * Passing immobile porosity from dual porosity model is solved in abstract class SorptionDual.
20  *
21  * @todo
22  * It seems that the methods isotherm_reinit() are different only at computation of scale_aqua and scale_sorbed.
23  * So it could be moved to SorptionDual and the only method which would be virtual would be
24  * compute_sorbing_scale(). It is prepared in comment code.
25  */
26 
27 #ifndef SORPTION_H
28 #define SORPTION_H
29 
32 
33 class Mesh;
34 class Isotherm;
35 
36 /** @brief Simple sorption model without dual porosity.
37  *
38  */
40 {
41 public:
43 
44  static const Input::Type::Record & get_input_type();
45 
46  /// Constructor.
47  SorptionSimple(Mesh &init_mesh, Input::Record in_rec);
48 
49  /// Destructor.
50  ~SorptionSimple(void);
51 
52 protected:
53  /// Reinitializes the isotherm.
55 
56 private:
57  /// Registrar of class to factory
58  static const int registrar;
59 };
60 
61 
62 /** @brief Abstract class of sorption model in case dual porosity is considered.
63  *
64  */
66 {
67 public:
68  /// Constructor.
69  SorptionDual(Mesh &init_mesh, Input::Record in_rec,
70  const string &output_conc_name,
71  const string &output_selection_name,
72  const string &output_conc_desc);
73 
74  /// Destructor.
75  ~SorptionDual(void);
76 
77  /// Sets the immobile porosity field.
79  {
80  immob_porosity_.copy_from(por_imm);
81  }
82 
83 protected:
84  /// Reinitializes the isotherm.
86 
87  Field<3, FieldValue<3>::Scalar > immob_porosity_; //< Immobile porosity field copied from transport
88 
89  //virtual double compute_sorbing_scale(double por_m, double por_imm) = 0;
90 };
91 
92 
93 /** @brief Sorption model in mobile zone in case dual porosity is considered.
94  *
95  */
97 {
98 public:
100 
101  static const Input::Type::Record & get_input_type();
102 
103  /// Constructor.
104  SorptionMob(Mesh &init_mesh, Input::Record in_rec);
105 
106  /// Destructor.
107  ~SorptionMob(void);
108 
109 protected:
110  /// Reinitializes the isotherm.
111  void isotherm_reinit(std::vector<Isotherm> &isotherms_vec, const ElementAccessor<3> &elem) override;
112 
113  //double compute_sorbing_scale(double por_m, double por_imm) override;
114 
115 private:
116  /// Registrar of class to factory
117  static const int registrar;
118 };
119 
120 
121 /** @brief Sorption model in immobile zone in case dual porosity is considered.
122  *
123  */
125 {
126 public:
128 
129  static const Input::Type::Record & get_input_type();
130 
131  /// Constructor.
132  SorptionImmob(Mesh &init_mesh, Input::Record in_rec);
133 
134  /// Destructor.
135  ~SorptionImmob(void);
136 
137 protected:
138  /// Reinitializes the isotherm.
139  void isotherm_reinit(std::vector<Isotherm> &isotherms_vec, const ElementAccessor<3> &elem) override;
140 
141  //double compute_sorbing_scale(double por_m, double por_imm) override;
142 
143 private:
144  /// Registrar of class to factory
145  static const int registrar;
146 };
147 
148 
149 #endif // SORPTION_H
Sorption model in immobile zone in case dual porosity is considered.
Definition: sorption.hh:124
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:78
Class template representing a field with values dependent on: point, element, and region...
Definition: field.hh:62
ReactionTerm FactoryBaseType
Definition: sorption.hh:127
Abstract class of sorption model in case dual porosity is considered.
Definition: sorption.hh:65
Definition: mesh.h:97
static const Input::Type::Record & get_input_type()
Definition: sorption.cc:35
ReactionTerm FactoryBaseType
Definition: sorption.hh:99
Field< 3, FieldValue< 3 >::Scalar > immob_porosity_
Definition: sorption.hh:87
Accessor to the data with type Type::Record.
Definition: accessors.hh:292
Sorption model in mobile zone in case dual porosity is considered.
Definition: sorption.hh:96
static const int registrar
Registrar of class to factory.
Definition: sorption.hh:58
Class SorptionBase is abstract class representing model of sorption in transport. ...
void isotherm_reinit(std::vector< Isotherm > &isotherms, const ElementAccessor< 3 > &elm) override
Reinitializes the isotherm.
Definition: sorption.cc:65
SorptionSimple(Mesh &init_mesh, Input::Record in_rec)
Constructor.
Definition: sorption.cc:48
static const int registrar
Registrar of class to factory.
Definition: sorption.hh:145
~SorptionSimple(void)
Destructor.
Definition: sorption.cc:62
static const int registrar
Registrar of class to factory.
Definition: sorption.hh:117
Simple sorption model without dual porosity.
Definition: sorption.hh:39
Record type proxy class.
Definition: type_record.hh:182
ReactionTerm FactoryBaseType
Definition: sorption.hh:42