Flow123d
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
flow123d
src
transport
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
33
#include "
advection_diffusion_model.hh
"
34
35
36
37
38
class
HeatTransferModel
:
public
AdvectionDiffusionModel
{
39
public
:
40
41
class
ModelEqData
:
public
FieldSet
{
42
public
:
43
44
/// Dirichlet boundary condition for temperature.
45
BCField<3, FieldValue<3>::Scalar
>
bc_temperature
;
46
/// Initial temperature.
47
Field<3, FieldValue<3>::Scalar
>
init_temperature
;
48
/// Porosity of solid.
49
Field<3, FieldValue<3>::Scalar
>
porosity
;
50
/// Density of fluid.
51
Field<3, FieldValue<3>::Scalar
>
fluid_density
;
52
/// Heat capacity of fluid.
53
Field<3, FieldValue<3>::Scalar
>
fluid_heat_capacity
;
54
/// Heat conductivity of fluid.
55
Field<3, FieldValue<3>::Scalar
>
fluid_heat_conductivity
;
56
/// Density of solid.
57
Field<3, FieldValue<3>::Scalar
>
solid_density
;
58
/// Heat capacity of solid.
59
Field<3, FieldValue<3>::Scalar
>
solid_heat_capacity
;
60
/// Heat conductivity of solid.
61
Field<3, FieldValue<3>::Scalar
>
solid_heat_conductivity
;
62
/// Longitudal heat dispersivity.
63
Field<3, FieldValue<3>::Scalar
>
disp_l
;
64
/// Transversal heat dispersivity.
65
Field<3, FieldValue<3>::Scalar
>
disp_t
;
66
/// Thermal source in fluid.
67
Field<3, FieldValue<3>::Scalar
>
fluid_thermal_source
;
68
/// Thermal source in solid.
69
Field<3, FieldValue<3>::Scalar
>
solid_thermal_source
;
70
/// Heat exchange rate in fluid.
71
Field<3, FieldValue<3>::Scalar
>
fluid_heat_exchange_rate
;
72
/// Heat exchange rate in solid.
73
Field<3, FieldValue<3>::Scalar
>
solid_heat_exchange_rate
;
74
/// Reference temperature in fluid.
75
Field<3, FieldValue<3>::Scalar
>
fluid_ref_temperature
;
76
/// Reference temperature in solid.
77
Field<3, FieldValue<3>::Scalar
>
solid_ref_temperature
;
78
79
/// Pointer to DarcyFlow field cross_section
80
Field<3, FieldValue<3>::Scalar
>
cross_section
;
81
82
83
MultiField<3, FieldValue<3>::Scalar
>
output_field
;
84
85
/// Fields indended for output, i.e. all input fields plus those representing solution.
86
FieldSet
output_fields
;
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.
112
bool
flux_changed
;
113
114
115
public
:
116
117
HeatTransferModel
();
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
131
void
compute_mass_matrix_coefficient
(
const
std::vector<arma::vec3 >
&point_list,
132
const
ElementAccessor<3>
&ele_acc,
133
std::vector<double>
&mm_coef)
override
;
134
135
void
compute_advection_diffusion_coefficients
(
const
std::vector<arma::vec3 >
&point_list,
136
const
std::vector<arma::vec3>
&velocity,
137
const
ElementAccessor<3>
&ele_acc,
138
std::vector
<
std::vector<arma::vec3>
> &ad_coef,
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
149
void
compute_source_coefficients
(
const
std::vector<arma::vec3>
&point_list,
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_ */
Generated on Thu May 29 2014 23:14:49 for Flow123d by
1.8.4