Flow123d  jenkins-Flow123d-linux-release-multijob-282
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 #include "fields/multi_field.hh"
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 
86 
87  ModelEqData();
88 
89  static constexpr const char * name() { return "HeatTransfer"; }
90 
91  static string default_output_field() { return "temperature"; }
92 
93  static IT::Selection &get_output_selection_input_type(const string &implementation, const string &description);
94  };
95 
96 protected:
97 
98  /// Derived class should implement getter for ModelEqData instance.
99  virtual ModelEqData &data() = 0;
100 
101  /**
102  * Create input type that can be passed to the derived class.
103  * @param implementation String characterizing the numerical method, e.g. DG, FEM, FVM.
104  * @param description Comment used to describe the record key.
105  * @return
106  */
107  static IT::Record &get_input_type(const string &implementation, const string &description);
108 
109  /// Indicator of change in advection vector field.
111 
112 
113 public:
114 
116 
117  static string balance_prefix() { return "energy"; }
118 
120 
121  void init_from_input(const Input::Record &in_rec, SubstanceList &substances) override;
122 
124  const ElementAccessor<3> &ele_acc,
125  std::vector<double> &mm_coef) override;
126 
128  const ElementAccessor<3> &ele_acc,
129  std::vector<std::vector<double> > &ret_coef) override {};
130 
132  const std::vector<arma::vec3> &velocity,
133  const ElementAccessor<3> &ele_acc,
135  std::vector<std::vector<arma::mat33> > &dif_coef) override;
136 
137  void compute_init_cond(const std::vector<arma::vec3> &point_list,
138  const ElementAccessor<3> &ele_acc,
139  std::vector< arma::vec > &init_values) override;
140 
141  void compute_dirichlet_bc(const std::vector<arma::vec3> &point_list,
142  const ElementAccessor<3> &ele_acc,
143  std::vector< arma::vec > &bc_values) override;
144 
146  const ElementAccessor<3> &ele_acc,
147  std::vector<arma::vec> &sources_conc,
148  std::vector<arma::vec> &sources_density,
149  std::vector<arma::vec> &sources_sigma) override;
150 
151  void compute_sources_sigma(const std::vector<arma::vec3> &point_list,
152  const ElementAccessor<3> &ele_acc,
153  std::vector<arma::vec> &sources_sigma) override;
154 
155  ~HeatTransferModel() override;
156 
157 };
158 
159 
160 
161 #endif /* HEAT_MODEL_HH_ */
Field< 3, FieldValue< 3 >::Scalar > solid_heat_capacity
Heat capacity of solid.
Definition: heat_model.hh:59
void compute_sources_sigma(const std::vector< arma::vec3 > &point_list, const ElementAccessor< 3 > &ele_acc, std::vector< arma::vec > &sources_sigma) override
Definition: heat_model.cc:345
UnitSI balance_units()
Definition: heat_model.cc:179
Container for various descendants of FieldCommonBase.
Definition: field_set.hh:51
Field< 3, FieldValue< 3 >::Scalar > fluid_density
Density of fluid.
Definition: heat_model.hh:51
BCField< 3, FieldValue< 3 >::Scalar > bc_temperature
Dirichlet boundary condition for temperature.
Definition: heat_model.hh:45
Field< 3, FieldValue< 3 >::Scalar > disp_t
Transversal heat dispersivity.
Definition: heat_model.hh:65
Field< 3, FieldValue< 3 >::Scalar > cross_section
Pointer to DarcyFlow field cross_section.
Definition: heat_model.hh:80
Class template representing a field with values dependent on: point, element, and region...
Definition: field.hh:52
Field< 3, FieldValue< 3 >::Scalar > fluid_heat_exchange_rate
Heat exchange rate in fluid.
Definition: heat_model.hh:71
Field< 3, FieldValue< 3 >::Scalar > solid_heat_exchange_rate
Heat exchange rate in solid.
Definition: heat_model.hh:73
void compute_init_cond(const std::vector< arma::vec3 > &point_list, const ElementAccessor< 3 > &ele_acc, std::vector< arma::vec > &init_values) override
Definition: heat_model.cc:284
Field< 3, FieldValue< 3 >::Scalar > fluid_heat_capacity
Heat capacity of fluid.
Definition: heat_model.hh:53
static string balance_prefix()
Definition: heat_model.hh:117
Field< 3, FieldValue< 3 >::Scalar > porosity
Porosity of solid.
Definition: heat_model.hh:49
Field< 3, FieldValue< 3 >::Scalar > fluid_thermal_source
Thermal source in fluid.
Definition: heat_model.hh:67
void init_from_input(const Input::Record &in_rec, SubstanceList &substances) override
Read necessary data from input record.
Definition: heat_model.cc:215
Field< 3, FieldValue< 3 >::Scalar > fluid_heat_conductivity
Heat conductivity of fluid.
Definition: heat_model.hh:55
Field< 3, FieldValue< 3 >::Scalar > fluid_ref_temperature
Reference temperature in fluid.
Definition: heat_model.hh:75
Field< 3, FieldValue< 3 >::Scalar > init_temperature
Initial temperature.
Definition: heat_model.hh:47
static constexpr const char * name()
Definition: heat_model.hh:89
void compute_mass_matrix_coefficient(const std::vector< arma::vec3 > &point_list, const ElementAccessor< 3 > &ele_acc, std::vector< double > &mm_coef) override
Definition: heat_model.cc:221
Field< 3, FieldValue< 3 >::Scalar > solid_thermal_source
Thermal source in solid.
Definition: heat_model.hh:69
void compute_dirichlet_bc(const std::vector< arma::vec3 > &point_list, const ElementAccessor< 3 > &ele_acc, std::vector< arma::vec > &bc_values) override
Definition: heat_model.cc:295
Accessor to the data with type Type::Record.
Definition: accessors.hh:327
Field< 3, FieldValue< 3 >::Scalar > solid_heat_conductivity
Heat conductivity of solid.
Definition: heat_model.hh:61
MultiField< 3, FieldValue< 3 >::Scalar > output_field
Definition: heat_model.hh:83
Field< 3, FieldValue< 3 >::Scalar > solid_ref_temperature
Reference temperature in solid.
Definition: heat_model.hh:77
Discontinuous Galerkin method for equation of transport with dispersion.
static IT::Selection & get_output_selection_input_type(const string &implementation, const string &description)
Definition: heat_model.cc:200
virtual ModelEqData & data()=0
Derived class should implement getter for ModelEqData instance.
void compute_advection_diffusion_coefficients(const std::vector< arma::vec3 > &point_list, const std::vector< arma::vec3 > &velocity, const ElementAccessor< 3 > &ele_acc, std::vector< std::vector< arma::vec3 > > &ad_coef, std::vector< std::vector< arma::mat33 > > &dif_coef) override
Definition: heat_model.cc:244
bool flux_changed
Indicator of change in advection vector field.
Definition: heat_model.hh:110
~HeatTransferModel() override
Definition: heat_model.cc:368
Field< 3, FieldValue< 3 >::Scalar > solid_density
Density of solid.
Definition: heat_model.hh:57
Record type proxy class.
Definition: type_record.hh:169
void compute_source_coefficients(const std::vector< arma::vec3 > &point_list, const ElementAccessor< 3 > &ele_acc, std::vector< arma::vec > &sources_conc, std::vector< arma::vec > &sources_density, std::vector< arma::vec > &sources_sigma) override
Definition: heat_model.cc:306
static string default_output_field()
Definition: heat_model.hh:91
void compute_retardation_coefficient(const std::vector< arma::vec3 > &point_list, const ElementAccessor< 3 > &ele_acc, std::vector< std::vector< double > > &ret_coef) override
Definition: heat_model.hh:127
Class for representation of a vector of fields of the same physical quantity.
Definition: multi_field.hh:45
Class for representation SI units of Fields.
Definition: unit_si.hh:31
Template for classes storing finite set of named values.
static IT::Record & get_input_type(const string &implementation, const string &description)
Definition: heat_model.cc:188
Field< 3, FieldValue< 3 >::Scalar > disp_l
Longitudal heat dispersivity.
Definition: heat_model.hh:63