Flow123d
heat_model.hh
Go to the documentation of this file.
1 /*!
2  *
3  * Copyright (C) 2007 Technical University of Liberec. All rights reserved.
4  *
5  * Please make a following refer to Flow123d on your project site if you use the program for any purpose,
6  * especially for academic research:
7  * Flow123d, Research Centre: Advanced Remedial Technologies, Technical University of Liberec, Czech Republic
8  *
9  * This program is free software; you can redistribute it and/or modify it under the terms
10  * of the GNU General Public License version 3 as published by the Free Software Foundation.
11  *
12  * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
13  * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14  * See the GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License along with this program; if not,
17  * write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 021110-1307, USA.
18  *
19  *
20  * $Id$
21  * $Revision$
22  * $LastChangedBy$
23  * $LastChangedDate$
24  *
25  * @file
26  * @brief Discontinuous Galerkin method for equation of transport with dispersion.
27  * @author Jan Stebel
28  */
29 
30 #ifndef HEAT_MODEL_HH_
31 #define HEAT_MODEL_HH_
32 
34 
35 
36 
37 
39 public:
40 
41  class ModelEqData : public FieldSet {
42  public:
43 
44  /// Dirichlet boundary condition for temperature.
46  /// Initial temperature.
48  /// Porosity of solid.
50  /// Density of fluid.
52  /// Heat capacity of fluid.
54  /// Heat conductivity of fluid.
56  /// Density of solid.
58  /// Heat capacity of solid.
60  /// Heat conductivity of solid.
62  /// Longitudal heat dispersivity.
64  /// Transversal heat dispersivity.
66  /// Thermal source in fluid.
68  /// Thermal source in solid.
70  /// Heat exchange rate in fluid.
72  /// Heat exchange rate in solid.
74  /// Reference temperature in fluid.
76  /// Reference temperature in solid.
78 
79  /// Pointer to DarcyFlow field cross_section
81 
82 
84 
85  /// Fields indended for output, i.e. all input fields plus those representing solution.
87 
88 
89  ModelEqData();
90 
91  static string name() { return "HeatTransfer"; }
92 
93  static string default_output_field() { return "temperature"; }
94 
95  static IT::Selection &get_output_selection_input_type(const string &implementation, const string &description);
96  };
97 
98 protected:
99 
100  /// Derived class should implement getter for ModelEqData instance.
101  virtual ModelEqData &data() = 0;
102 
103  /**
104  * Create input type that can be passed to the derived class.
105  * @param implementation String characterizing the numerical method, e.g. DG, FEM, FVM.
106  * @param description Comment used to describe the record key.
107  * @return
108  */
109  static IT::Record &get_input_type(const string &implementation, const string &description);
110 
111  /// Indicator of change in advection vector field.
113 
114 
115 public:
116 
118 
119  void init_data(unsigned int n_subst_) override;
120 
121  //void set_cross_section_field(const Field< 3, FieldValue<3>::Scalar > &cross_section) override;
122 
123  void set_component_names(std::vector<string> &names, const Input::Record &in_rec) override;
124 
125  bool mass_matrix_changed() override;
126 
127  bool stiffness_matrix_changed() override;
128 
129  bool rhs_changed() override;
130 
132  const ElementAccessor<3> &ele_acc,
133  std::vector<double> &mm_coef) override;
134 
136  const std::vector<arma::vec3> &velocity,
137  const ElementAccessor<3> &ele_acc,
139  std::vector<std::vector<arma::mat33> > &dif_coef) override;
140 
141  void compute_init_cond(const std::vector<arma::vec3> &point_list,
142  const ElementAccessor<3> &ele_acc,
143  std::vector< arma::vec > &init_values) override;
144 
145  void compute_dirichlet_bc(const std::vector<arma::vec3> &point_list,
146  const ElementAccessor<3> &ele_acc,
147  std::vector< arma::vec > &bc_values) override;
148 
150  const ElementAccessor<3> &ele_acc,
151  std::vector<arma::vec> &sources_conc,
152  std::vector<arma::vec> &sources_density,
153  std::vector<arma::vec> &sources_sigma) override;
154 
155  void compute_sources_sigma(const std::vector<arma::vec3> &point_list,
156  const ElementAccessor<3> &ele_acc,
157  std::vector<arma::vec> &sources_sigma) override;
158 
159  ~HeatTransferModel() override;
160 
161 };
162 
163 
164 
165 #endif /* HEAT_MODEL_HH_ */