Flow123d  3.9.0-c2ae2d0a8
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
SorptionDual::SorptionDual
SorptionDual(Mesh &init_mesh, Input::Record in_rec, const string &output_conc_name, const string &output_conc_desc)
Constructor.
Definition: sorption.cc:105
SorptionImmob::SorptionImmob
SorptionImmob(Mesh &init_mesh, Input::Record in_rec)
Constructor.
Definition: sorption.cc:220
SorptionMob::SorptionMob
SorptionMob(Mesh &init_mesh, Input::Record in_rec)
Constructor.
Definition: sorption.cc:161
SorptionSimple::registrar
static const int registrar
Registrar of class to factory.
Definition: sorption.hh:66
SorptionSimple::init_field_models
void init_field_models() override
Implements SorptionBase::init_field_models.
Definition: sorption.cc:83
SorptionMob::~SorptionMob
~SorptionMob(void)
Destructor.
Definition: sorption.cc:166
SorptionImmob::~SorptionImmob
~SorptionImmob(void)
Destructor.
Definition: sorption.cc:224
ReactionTerm::EqFields::EqFields
EqFields()
Constructor.
Definition: reaction_term.hh:69
Input
Abstract linear system class.
Definition: balance.hh:40
SorptionSimple::~SorptionSimple
~SorptionSimple(void)
Destructor.
Definition: sorption.cc:80
SorptionImmob::init_field_models
void init_field_models() override
Implements SorptionBase::init_field_models.
Definition: sorption.cc:227
ElementAccessor
Definition: dh_cell_accessor.hh:32
sorption_base.hh
Class SorptionBase is abstract class representing model of sorption in transport.
type_base.hh
SorptionMob::FactoryBaseType
ReactionTerm FactoryBaseType
Definition: sorption.hh:108
SorptionBase::EqFields
Definition: sorption_base.hh:83
SorptionBase
Definition: sorption_base.hh:63
SorptionImmob
Sorption model in immobile zone in case dual porosity is considered.
Definition: sorption.hh:131
SorptionDual::set_porosity_immobile
void set_porosity_immobile(Field< 3, FieldValue< 3 >::Scalar > &por_imm)
Sets the immobile porosity field.
Definition: sorption.hh:92
SorptionMob
Sorption model in mobile zone in case dual porosity is considered.
Definition: sorption.hh:105
SorptionImmob::get_input_type
static const Input::Type::Record & get_input_type()
Definition: sorption.cc:205
Input::Record
Accessor to the data with type Type::Record.
Definition: accessors.hh:291
SorptionMob::init_field_models
void init_field_models() override
Implements SorptionBase::init_field_models.
Definition: sorption.cc:169
type_generic.hh
field_values.hh
SorptionDual::~SorptionDual
~SorptionDual(void)
Destructor.
Definition: sorption.cc:116
SorptionSimple
Simple sorption model without dual porosity.
Definition: sorption.hh:47
SorptionImmob::FactoryBaseType
ReactionTerm FactoryBaseType
Definition: sorption.hh:134
SorptionMob::get_input_type
static const Input::Type::Record & get_input_type()
Definition: sorption.cc:144
Input::Type::Record
Record type proxy class.
Definition: type_record.hh:182
Mesh
Definition: mesh.h:361
SorptionMob::registrar
static const int registrar
Registrar of class to factory.
Definition: sorption.hh:124
Isotherm
Definition: isotherm.hh:158
SorptionDual::EqFields
Definition: sorption.hh:76
SorptionDual::eq_fields_dual_
std::shared_ptr< EqFields > eq_fields_dual_
Overwrites SorptionBase::eq_fields_.
Definition: sorption.hh:98
SorptionSimple::get_input_type
static const Input::Type::Record & get_input_type()
Definition: sorption.cc:57
Field
Class template representing a field with values dependent on: point, element, and region.
Definition: field.hh:91
reaction_term.hh
Class ReactionTerm is an abstract class representing reaction term in transport.
SorptionSimple::FactoryBaseType
ReactionTerm FactoryBaseType
Definition: sorption.hh:50
ReactionTerm
Definition: reaction_term.hh:46
SorptionDual
Abstract class of sorption model in case dual porosity is considered.
Definition: sorption.hh:73
SorptionSimple::SorptionSimple
SorptionSimple(Mesh &init_mesh, Input::Record in_rec)
Constructor.
Definition: sorption.cc:68
field.hh
SorptionDual::EqFields::immob_porosity_
Field< 3, FieldValue< 3 >::Scalar > immob_porosity_
Definition: sorption.hh:80
FieldValue
Definition: field_values.hh:645
SorptionImmob::registrar
static const int registrar
Registrar of class to factory.
Definition: sorption.hh:150