Flow123d  jenkins-Flow123d-windows32-release-multijob-51
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 
86 
87  ModelEqData();
88 
89  static string 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  void set_component_names(std::vector<string> &names, const Input::Record &in_rec) override;
118 
120  const ElementAccessor<3> &ele_acc,
121  std::vector<double> &mm_coef) override;
122 
124  const std::vector<arma::vec3> &velocity,
125  const ElementAccessor<3> &ele_acc,
127  std::vector<std::vector<arma::mat33> > &dif_coef) override;
128 
129  void compute_init_cond(const std::vector<arma::vec3> &point_list,
130  const ElementAccessor<3> &ele_acc,
131  std::vector< arma::vec > &init_values) override;
132 
133  void compute_dirichlet_bc(const std::vector<arma::vec3> &point_list,
134  const ElementAccessor<3> &ele_acc,
135  std::vector< arma::vec > &bc_values) override;
136 
138  const ElementAccessor<3> &ele_acc,
139  std::vector<arma::vec> &sources_conc,
140  std::vector<arma::vec> &sources_density,
141  std::vector<arma::vec> &sources_sigma) override;
142 
143  void compute_sources_sigma(const std::vector<arma::vec3> &point_list,
144  const ElementAccessor<3> &ele_acc,
145  std::vector<arma::vec> &sources_sigma) override;
146 
147  ~HeatTransferModel() override;
148 
149 };
150 
151 
152 
153 #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:332
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:48
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:271
Field< 3, FieldValue< 3 >::Scalar > fluid_heat_capacity
Heat capacity of fluid.
Definition: heat_model.hh:53
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
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
void set_component_names(std::vector< string > &names, const Input::Record &in_rec) override
Read or set names of solution components.
Definition: heat_model.cc:201
Field< 3, FieldValue< 3 >::Scalar > init_temperature
Initial temperature.
Definition: heat_model.hh:47
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:208
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:282
Accessor to the data with type Type::Record.
Definition: accessors.hh:308
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:188
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:231
bool flux_changed
Indicator of change in advection vector field.
Definition: heat_model.hh:110
~HeatTransferModel() override
Definition: heat_model.cc:355
Field< 3, FieldValue< 3 >::Scalar > solid_density
Density of solid.
Definition: heat_model.hh:57
Record type proxy class.
Definition: type_record.hh:161
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:293
static string default_output_field()
Definition: heat_model.hh:91
Class for representation of a vector of fields of the same physical quantity.
Definition: field.hh:309
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:178
Field< 3, FieldValue< 3 >::Scalar > disp_l
Longitudal heat dispersivity.
Definition: heat_model.hh:63