Flow123d  master-f44eb46
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 computation of scale_aqua and scale_sorbed.
19  * Passing immobile porosity from dual porosity model is solved in abstract class SorptionDual.
20  */
21 
22 #ifndef SORPTION_H
23 #define SORPTION_H
24 
25 
26 #include <string> // for string
27 #include <vector> // for vector
28 #include "fields/field.hh" // for Field
29 #include "fields/field_values.hh" // for FieldValue<>::Scalar, FieldValue
30 #include "input/type_base.hh" // for Array
31 #include "input/type_generic.hh" // for Instance
32 #include "reaction/reaction_term.hh" // for ReactionTerm
34 
35 class Mesh;
36 class Isotherm;
37 namespace Input {
38  class Record;
39  namespace Type { class Record; }
40 }
41 template <int spacedim> class ElementAccessor;
42 
43 
44 /** @brief Simple sorption model without dual porosity.
45  *
46  */
48 {
49 public:
51 
52  static const Input::Type::Record & get_input_type();
53 
54  /// Constructor.
55  SorptionSimple(Mesh &init_mesh, Input::Record in_rec);
56 
57  /// Destructor.
58  ~SorptionSimple(void);
59 
60 protected:
61  /// Implements @p SorptionBase::init_field_models
62  void init_field_models() override;
63 
64 private:
65  /// Registrar of class to factory
66  static const int registrar;
67 };
68 
69 
70 /** @brief Abstract class of sorption model in case dual porosity is considered.
71  *
72  */
74 {
75 public:
77  public:
78  EqFields(const string &output_field_name, const string &output_field_desc);
79 
80  Field<3, FieldValue<3>::Scalar > immob_porosity_; //< Immobile porosity field copied from transport
81  };
82 
83  /// Constructor.
84  SorptionDual(Mesh &init_mesh, Input::Record in_rec,
85  const string &output_conc_name,
86  const string &output_conc_desc);
87 
88  /// Destructor.
89  ~SorptionDual(void);
90 
91  /// Sets the immobile porosity field.
93  {
94  eq_fields_dual_->immob_porosity_.copy_from(por_imm);
95  }
96 
97 protected:
98  std::shared_ptr<EqFields> eq_fields_dual_; ///< Overwrites SorptionBase::eq_fields_.
99 };
100 
101 
102 /** @brief Sorption model in mobile zone in case dual porosity is considered.
103  *
104  */
106 {
107 public:
109 
110  static const Input::Type::Record & get_input_type();
111 
112  /// Constructor.
113  SorptionMob(Mesh &init_mesh, Input::Record in_rec);
114 
115  /// Destructor.
116  ~SorptionMob(void);
117 
118 protected:
119  /// Implements @p SorptionBase::init_field_models
120  void init_field_models() override;
121 
122 private:
123  /// Registrar of class to factory
124  static const int registrar;
125 };
126 
127 
128 /** @brief Sorption model in immobile zone in case dual porosity is considered.
129  *
130  */
132 {
133 public:
135 
136  static const Input::Type::Record & get_input_type();
137 
138  /// Constructor.
139  SorptionImmob(Mesh &init_mesh, Input::Record in_rec);
140 
141  /// Destructor.
142  ~SorptionImmob(void);
143 
144 protected:
145  /// Implements @p SorptionBase::init_field_models
146  void init_field_models() override;
147 
148 private:
149  /// Registrar of class to factory
150  static const int registrar;
151 };
152 
153 
154 #endif // SORPTION_H
Class template representing a field with values dependent on: point, element, and region.
Definition: field.hh:92
Accessor to the data with type Type::Record.
Definition: accessors.hh:291
Record type proxy class.
Definition: type_record.hh:182
Definition: mesh.h:362
EqFields()
Constructor.
Field< 3, FieldValue< 3 >::Scalar > immob_porosity_
Definition: sorption.hh:80
Abstract class of sorption model in case dual porosity is considered.
Definition: sorption.hh:74
void set_porosity_immobile(Field< 3, FieldValue< 3 >::Scalar > &por_imm)
Sets the immobile porosity field.
Definition: sorption.hh:92
~SorptionDual(void)
Destructor.
Definition: sorption.cc:116
SorptionDual(Mesh &init_mesh, Input::Record in_rec, const string &output_conc_name, const string &output_conc_desc)
Constructor.
Definition: sorption.cc:105
std::shared_ptr< EqFields > eq_fields_dual_
Overwrites SorptionBase::eq_fields_.
Definition: sorption.hh:98
Sorption model in immobile zone in case dual porosity is considered.
Definition: sorption.hh:132
ReactionTerm FactoryBaseType
Definition: sorption.hh:134
SorptionImmob(Mesh &init_mesh, Input::Record in_rec)
Constructor.
Definition: sorption.cc:220
~SorptionImmob(void)
Destructor.
Definition: sorption.cc:224
void init_field_models() override
Implements SorptionBase::init_field_models.
Definition: sorption.cc:227
static const int registrar
Registrar of class to factory.
Definition: sorption.hh:150
static const Input::Type::Record & get_input_type()
Definition: sorption.cc:205
Sorption model in mobile zone in case dual porosity is considered.
Definition: sorption.hh:106
static const int registrar
Registrar of class to factory.
Definition: sorption.hh:124
SorptionMob(Mesh &init_mesh, Input::Record in_rec)
Constructor.
Definition: sorption.cc:161
static const Input::Type::Record & get_input_type()
Definition: sorption.cc:144
void init_field_models() override
Implements SorptionBase::init_field_models.
Definition: sorption.cc:169
ReactionTerm FactoryBaseType
Definition: sorption.hh:108
~SorptionMob(void)
Destructor.
Definition: sorption.cc:166
Simple sorption model without dual porosity.
Definition: sorption.hh:48
static const Input::Type::Record & get_input_type()
Definition: sorption.cc:57
~SorptionSimple(void)
Destructor.
Definition: sorption.cc:80
static const int registrar
Registrar of class to factory.
Definition: sorption.hh:66
void init_field_models() override
Implements SorptionBase::init_field_models.
Definition: sorption.cc:83
SorptionSimple(Mesh &init_mesh, Input::Record in_rec)
Constructor.
Definition: sorption.cc:68
ReactionTerm FactoryBaseType
Definition: sorption.hh:50
Abstract linear system class.
Definition: balance.hh:40
Class ReactionTerm is an abstract class representing reaction term in transport.
Class SorptionBase is abstract class representing model of sorption in transport.