Flow123d  release_2.2.1-10-gb9fad4d
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_conc_desc);
72 
73  /// Destructor.
74  ~SorptionDual(void);
75 
76  /// Sets the immobile porosity field.
78  {
79  immob_porosity_.copy_from(por_imm);
80  }
81 
82 protected:
83  /// Reinitializes the isotherm.
85 
86  Field<3, FieldValue<3>::Scalar > immob_porosity_; //< Immobile porosity field copied from transport
87 
88  //virtual double compute_sorbing_scale(double por_m, double por_imm) = 0;
89 };
90 
91 
92 /** @brief Sorption model in mobile zone in case dual porosity is considered.
93  *
94  */
96 {
97 public:
99 
100  static const Input::Type::Record & get_input_type();
101 
102  /// Constructor.
103  SorptionMob(Mesh &init_mesh, Input::Record in_rec);
104 
105  /// Destructor.
106  ~SorptionMob(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 private:
115  /// Registrar of class to factory
116  static const int registrar;
117 };
118 
119 
120 /** @brief Sorption model in immobile zone in case dual porosity is considered.
121  *
122  */
124 {
125 public:
127 
128  static const Input::Type::Record & get_input_type();
129 
130  /// Constructor.
131  SorptionImmob(Mesh &init_mesh, Input::Record in_rec);
132 
133  /// Destructor.
134  ~SorptionImmob(void);
135 
136 protected:
137  /// Reinitializes the isotherm.
138  void isotherm_reinit(std::vector<Isotherm> &isotherms_vec, const ElementAccessor<3> &elem) override;
139 
140  //double compute_sorbing_scale(double por_m, double por_imm) override;
141 
142 private:
143  /// Registrar of class to factory
144  static const int registrar;
145 };
146 
147 
148 #endif // SORPTION_H
Sorption model in immobile zone in case dual porosity is considered.
Definition: sorption.hh:123
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:77
Class template representing a field with values dependent on: point, element, and region...
Definition: field.hh:62
ReactionTerm FactoryBaseType
Definition: sorption.hh:126
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:98
Field< 3, FieldValue< 3 >::Scalar > immob_porosity_
Definition: sorption.hh:86
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:95
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:60
SorptionSimple(Mesh &init_mesh, Input::Record in_rec)
Constructor.
Definition: sorption.cc:46
static const int registrar
Registrar of class to factory.
Definition: sorption.hh:144
~SorptionSimple(void)
Destructor.
Definition: sorption.cc:57
static const int registrar
Registrar of class to factory.
Definition: sorption.hh:116
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