Flow123d  release_3.0.0-872-gff21c48
heat_model.cc
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 heat_model.cc
15  * @brief Discontinuous Galerkin method for equation of transport with dispersion.
16  * @author Jan Stebel
17  */
18 
19 #include "input/input_type.hh"
20 #include "mesh/side_impl.hh"
21 #include "mesh/mesh.h"
22 #include "mesh/accessors.hh"
23 //#include "transport/transport_operator_splitting.hh"
24 #include "heat_model.hh"
25 #include "tools/unit_si.hh"
26 #include "coupling/balance.hh"
27 
28 
29 
30 using namespace std;
31 using namespace Input::Type;
32 
33 
34 
35 
36 
37 
38 
39 
41  return Selection("Heat_BC_Type", "Types of boundary conditions for heat transfer model.")
42  .add_value(bc_inflow, "inflow",
43  "Default heat transfer boundary condition.\n"
44  "On water inflow (($(q_w \\le 0)$)), total energy flux is given by the reference temperature 'bc_temperature'. "
45  "On water outflow we prescribe zero diffusive flux, "
46  "i.e. the energy flows out only due to advection.")
47  .add_value(bc_dirichlet, "dirichlet",
48  "Dirichlet boundary condition (($T = T_D $)).\n"
49  "The prescribed temperature (($T_D$)) is specified by the field 'bc_temperature'.")
50  .add_value(bc_total_flux, "total_flux",
51  "Total energy flux boundary condition.\n"
52  "The prescribed incoming total flux can have the general form (($\\delta(f_N+\\sigma_R(T_R-T) )$)), "
53  "where the absolute flux (($f_N$)) is specified by the field 'bc_flux', "
54  "the transition parameter (($\\sigma_R$)) by 'bc_robin_sigma', "
55  "and the reference temperature (($T_R$)) by 'bc_temperature'.")
56  .add_value(bc_diffusive_flux, "diffusive_flux",
57  "Diffusive flux boundary condition.\n"
58  "The prescribed incoming energy flux due to diffusion can have the general form (($\\delta(f_N+\\sigma_R(T_R-T) )$)), "
59  "where the absolute flux (($f_N$)) is specified by the field 'bc_flux', "
60  "the transition parameter (($\\sigma_R$)) by 'bc_robin_sigma', "
61  "and the reference temperature (($T_R$)) by 'bc_temperature'.")
62  .close();
63 }
64 
65 
67 {
68  *this+=bc_type
69  .name("bc_type")
70  .description(
71  "Type of boundary condition.")
72  .units( UnitSI::dimensionless() )
73  .input_default("\"inflow\"")
74  .input_selection( get_bc_type_selection() )
76  *this+=bc_dirichlet_value
77  .name("bc_temperature")
78  .description("Boundary value of temperature.")
79  .units( UnitSI().K() )
80  .input_default("0.0")
81  .flags_add(in_rhs);
82  *this+=bc_flux
83  .disable_where(bc_type, { bc_dirichlet, bc_inflow })
84  .name("bc_flux")
85  .description("Flux in Neumann boundary condition.")
86  .units( UnitSI().kg().m().s(-1).md() )
87  .input_default("0.0")
88  .flags_add(FieldFlag::in_rhs);
89  *this+=bc_robin_sigma
90  .disable_where(bc_type, { bc_dirichlet, bc_inflow })
91  .name("bc_robin_sigma")
92  .description("Conductivity coefficient in Robin boundary condition.")
93  .units( UnitSI().m(4).s(-1).md() )
94  .input_default("0.0")
95  .flags_add(FieldFlag::in_rhs & FieldFlag::in_main_matrix);
96 
97  *this+=init_temperature
98  .name("init_temperature")
99  .description("Initial temperature.")
100  .units( UnitSI().K() )
101  .input_default("0.0");
102 
103  *this+=porosity
104  .name("porosity")
105  .description("Porosity.")
106  .units( UnitSI::dimensionless() )
107  .input_default("1.0")
108  .flags_add(in_main_matrix & in_time_term)
109  .set_limits(0.0);
110 
111  *this+=water_content
112  .name("water_content")
113  .units( UnitSI::dimensionless() )
114  .input_default("1.0")
115  .flags_add(input_copy & in_main_matrix & in_time_term);
116 
117  *this+=fluid_density
118  .name("fluid_density")
119  .description("Density of fluid.")
120  .units( UnitSI().kg().m(-3) )
121  .input_default("1000")
122  .flags_add(in_main_matrix & in_time_term);
123 
124  *this+=fluid_heat_capacity
125  .name("fluid_heat_capacity")
126  .description("Heat capacity of fluid.")
127  .units( UnitSI::J() * UnitSI().kg(-1).K(-1) )
128  .flags_add(in_main_matrix & in_time_term);
129 
130  *this+=fluid_heat_conductivity
131  .name("fluid_heat_conductivity")
132  .description("Heat conductivity of fluid.")
133  .units( UnitSI::W() * UnitSI().m(-1).K(-1) )
134  .flags_add(in_main_matrix)
135  .set_limits(0.0);
136 
137 
138  *this+=solid_density
139  .name("solid_density")
140  .description("Density of solid (rock).")
141  .units( UnitSI().kg().m(-3) )
142  .flags_add(in_time_term);
143 
144  *this+=solid_heat_capacity
145  .name("solid_heat_capacity")
146  .description("Heat capacity of solid (rock).")
147  .units( UnitSI::J() * UnitSI().kg(-1).K(-1) )
148  .flags_add(in_time_term);
149 
150  *this+=solid_heat_conductivity
151  .name("solid_heat_conductivity")
152  .description("Heat conductivity of solid (rock).")
153  .units( UnitSI::W() * UnitSI().m(-1).K(-1) )
154  .flags_add(in_main_matrix)
155  .set_limits(0.0);
156 
157  *this+=disp_l
158  .name("disp_l")
159  .description("Longitudinal heat dispersivity in fluid.")
160  .units( UnitSI().m() )
161  .input_default("0.0")
162  .flags_add(in_main_matrix);
163 
164  *this+=disp_t
165  .name("disp_t")
166  .description("Transverse heat dispersivity in fluid.")
167  .units( UnitSI().m() )
168  .input_default("0.0")
169  .flags_add(in_main_matrix);
170 
171  *this+=fluid_thermal_source
172  .name("fluid_thermal_source")
173  .description("Density of thermal source in fluid.")
174  .units( UnitSI::W() * UnitSI().m(-3) )
175  .input_default("0.0")
176  .flags_add(in_rhs);
177 
178  *this+=solid_thermal_source
179  .name("solid_thermal_source")
180  .description("Density of thermal source in solid.")
181  .units( UnitSI::W() * UnitSI().m(-3) )
182  .input_default("0.0")
183  .flags_add(in_rhs);
184 
185  *this+=fluid_heat_exchange_rate
186  .name("fluid_heat_exchange_rate")
187  .description("Heat exchange rate of source in fluid.")
188  .units( UnitSI().s(-1) )
189  .input_default("0.0")
190  .flags_add(in_rhs);
191 
192  *this+=solid_heat_exchange_rate
193  .name("solid_heat_exchange_rate")
194  .description("Heat exchange rate of source in solid.")
195  .units( UnitSI().s(-1) )
196  .input_default("0.0")
197  .flags_add(in_rhs);
198 
199  *this+=fluid_ref_temperature
200  .name("fluid_ref_temperature")
201  .description("Reference temperature of source in fluid.")
202  .units( UnitSI().K() )
203  .input_default("0.0")
204  .flags_add(in_rhs);
205 
206  *this+=solid_ref_temperature
207  .name("solid_ref_temperature")
208  .description("Reference temperature in solid.")
209  .units( UnitSI().K() )
210  .input_default("0.0")
211  .flags_add(in_rhs);
212 
213  *this+=cross_section
214  .name("cross_section")
215  .units( UnitSI().m(3).md() )
216  .flags(input_copy & in_time_term & in_main_matrix);
217 
218  *this+=output_field
219  .name("temperature")
220  .description("Temperature solution.")
221  .units( UnitSI().K() )
222  .flags(equation_result);
223 }
224 
225 
226 
227 IT::Record HeatTransferModel::get_input_type(const string &implementation, const string &description)
228 {
229  return IT::Record(
230  std::string(ModelEqData::name()) + "_" + implementation,
231  description + " for heat transfer.")
233  .declare_key("time", TimeGovernor::get_input_type(), Default::obligatory(),
234  "Time governor setting for the secondary equation.")
235  .declare_key("balance", Balance::get_input_type(), Default("{}"),
236  "Settings for computing balance.")
237  .declare_key("output_stream", OutputTime::get_input_type(), Default("{}"),
238  "Parameters of output stream.");
239 }
240 
241 
243 {
244  // Return empty selection just to provide model specific selection name and description.
245  // The fields are added by TransportDG using an auxiliary selection.
246  return IT::Selection(
247  std::string(ModelEqData::name()) + "_DG_output_fields",
248  "Selection of output fields for Heat Transfer DG model.");
249 }
250 
251 
253  AdvectionProcessBase(mesh, in_rec),
254  flux_changed(true),
255  mh_dh(nullptr)
256 {
257  time_ = new TimeGovernor(in_rec.val<Input::Record>("time"));
258  substances_.initialize({""});
259 
260  output_stream_ = OutputTime::create_output_stream("heat", in_rec.val<Input::Record>("output_stream"), time().get_unit_string());
261  //output_stream_->add_admissible_field_names(in_rec.val<Input::Array>("output_fields"));
262 
263  balance_ = std::make_shared<Balance>("energy", mesh_);
264  balance_->init_from_input(in_rec.val<Input::Record>("balance"), *time_);
265  // initialization of balance object
266  subst_idx = {balance_->add_quantity("energy")};
267  balance_->units(UnitSI().m(2).kg().s(-2));
268 }
269 
270 
272 {
273  output_stream_->write_time_frame();
274 }
275 
276 
278  const ElementAccessor<3> &ele_acc,
279  std::vector<double> &mm_coef)
280 {
281  vector<double> elem_csec(point_list.size()),
282  por(point_list.size()),
283  f_rho(point_list.size()),
284  s_rho(point_list.size()),
285  f_c(point_list.size()),
286  s_c(point_list.size());
287 
288  data().cross_section.value_list(point_list, ele_acc, elem_csec);
289  data().porosity.value_list(point_list, ele_acc, por);
290  data().fluid_density.value_list(point_list, ele_acc, f_rho);
291  data().fluid_heat_capacity.value_list(point_list, ele_acc, f_c);
292  data().solid_density.value_list(point_list, ele_acc, s_rho);
293  data().solid_heat_capacity.value_list(point_list, ele_acc, s_c);
294 
295  for (unsigned int i=0; i<point_list.size(); i++)
296  mm_coef[i] = elem_csec[i]*(por[i]*f_rho[i]*f_c[i] + (1.-por[i])*s_rho[i]*s_c[i]);
297 }
298 
299 
301  const std::vector<arma::vec3> &velocity,
302  const ElementAccessor<3> &ele_acc,
305 {
306  const unsigned int qsize = point_list.size();
307  std::vector<double> f_rho(qsize), f_cap(qsize), f_cond(qsize),
308  s_cond(qsize), por(qsize), csection(qsize), disp_l(qsize), disp_t(qsize);
309 
310  data().fluid_density.value_list(point_list, ele_acc, f_rho);
311  data().fluid_heat_capacity.value_list(point_list, ele_acc, f_cap);
312  data().fluid_heat_conductivity.value_list(point_list, ele_acc, f_cond);
313  data().solid_heat_conductivity.value_list(point_list, ele_acc, s_cond);
314  data().disp_l.value_list(point_list, ele_acc, disp_l);
315  data().disp_t.value_list(point_list, ele_acc, disp_t);
316  data().porosity.value_list(point_list, ele_acc, por);
317  data().cross_section.value_list(point_list, ele_acc, csection);
318 
319  for (unsigned int k=0; k<qsize; k++) {
320  ad_coef[0][k] = velocity[k]*f_rho[k]*f_cap[k];
321 
322  // dispersive part of thermal diffusion
323  // Note that the velocity vector is in fact the Darcian flux,
324  // so to obtain |v| we have to divide vnorm by porosity and cross_section.
325  double vnorm = arma::norm(velocity[k], 2);
326  if (fabs(vnorm) > 0)
327  for (int i=0; i<3; i++)
328  for (int j=0; j<3; j++)
329  dif_coef[0][k](i,j) = ((velocity[k][i]/vnorm)*(velocity[k][j]/vnorm)*(disp_l[k]-disp_t[k]) + disp_t[k]*(i==j?1:0))
330  *vnorm*f_rho[k]*f_cond[k];
331  else
332  dif_coef[0][k].zeros();
333 
334  // conductive part of thermal diffusion
335  dif_coef[0][k] += csection[k]*(por[k]*f_cond[k] + (1.-por[k])*s_cond[k])*arma::eye(3,3);
336  }
337 }
338 
339 
341  const ElementAccessor<3> &ele_acc,
342  std::vector<std::vector<double> > &init_values)
343 {
344  data().init_temperature.value_list(point_list, ele_acc, init_values[0]);
345 }
346 
347 
349  arma::uvec &bc_types)
350 {
351  // Currently the bc types for HeatTransfer are numbered in the same way as in TransportDG.
352  // In general we should use some map here.
353  bc_types = { data().bc_type.value(ele_acc.centre(), ele_acc) };
354 }
355 
356 
357 void HeatTransferModel::get_flux_bc_data(unsigned int index,
358  const std::vector<arma::vec3> &point_list,
359  const ElementAccessor<3> &ele_acc,
360  std::vector< double > &bc_flux,
361  std::vector< double > &bc_sigma,
362  std::vector< double > &bc_ref_value)
363 {
364  data().bc_flux.value_list(point_list, ele_acc, bc_flux);
365  data().bc_robin_sigma.value_list(point_list, ele_acc, bc_sigma);
366  data().bc_dirichlet_value[index].value_list(point_list, ele_acc, bc_ref_value);
367 
368  // Change sign in bc_flux since internally we work with outgoing fluxes.
369  for (auto f : bc_flux) f = -f;
370 }
371 
372 void HeatTransferModel::get_flux_bc_sigma(unsigned int index,
373  const std::vector<arma::vec3> &point_list,
374  const ElementAccessor<3> &ele_acc,
375  std::vector< double > &bc_sigma)
376 {
377  data().bc_robin_sigma.value_list(point_list, ele_acc, bc_sigma);
378 }
379 
380 
382  const ElementAccessor<3> &ele_acc,
383  std::vector<std::vector<double> > &sources_value,
384  std::vector<std::vector<double> > &sources_density,
385  std::vector<std::vector<double> > &sources_sigma)
386 {
387  const unsigned int qsize = point_list.size();
388  std::vector<double> por(qsize), csection(qsize), f_rho(qsize), s_rho(qsize), f_cap(qsize), s_cap(qsize),
389  f_source(qsize), s_source(qsize), f_sigma(qsize), s_sigma(qsize), f_temp(qsize), s_temp(qsize);
390  data().porosity.value_list(point_list, ele_acc, por);
391  data().cross_section.value_list(point_list, ele_acc, csection);
392  data().fluid_density.value_list(point_list, ele_acc, f_rho);
393  data().solid_density.value_list(point_list, ele_acc, s_rho);
394  data().fluid_heat_capacity.value_list(point_list, ele_acc, f_cap);
395  data().solid_heat_capacity.value_list(point_list, ele_acc, s_cap);
396  data().fluid_thermal_source.value_list(point_list, ele_acc, f_source);
397  data().solid_thermal_source.value_list(point_list, ele_acc, s_source);
398  data().fluid_heat_exchange_rate.value_list(point_list, ele_acc, f_sigma);
399  data().solid_heat_exchange_rate.value_list(point_list, ele_acc, s_sigma);
400  data().fluid_ref_temperature.value_list(point_list, ele_acc, f_temp);
401  data().solid_ref_temperature.value_list(point_list, ele_acc, s_temp);
402 
403  sources_density[0].resize(point_list.size());
404  sources_sigma[0].resize(point_list.size());
405  sources_value[0].resize(point_list.size());
406  for (unsigned int k=0; k<point_list.size(); k++)
407  {
408  sources_density[0][k] = csection[k]*(por[k]*f_source[k] + (1.-por[k])*s_source[k]);
409  sources_sigma[0][k] = csection[k]*(por[k]*f_rho[k]*f_cap[k]*f_sigma[k] + (1.-por[k])*s_rho[k]*s_cap[k]*s_sigma[k]);
410  if (fabs(sources_sigma[0][k]) > numeric_limits<double>::epsilon())
411  sources_value[0][k] = csection[k]*(por[k]*f_rho[k]*f_cap[k]*f_sigma[k]*f_temp[k]
412  + (1.-por[k])*s_rho[k]*s_cap[k]*s_sigma[k]*s_temp[k])/sources_sigma[0][k];
413  else
414  sources_value[0][k] = 0;
415  }
416 }
417 
418 
420  const ElementAccessor<3> &ele_acc,
421  std::vector<std::vector<double> > &sources_sigma)
422 {
423  const unsigned int qsize = point_list.size();
424  std::vector<double> por(qsize), csection(qsize), f_rho(qsize), s_rho(qsize), f_cap(qsize), s_cap(qsize),
425  f_source(qsize), s_source(qsize), f_sigma(qsize), s_sigma(qsize), f_temp(qsize), s_temp(qsize);
426  data().porosity.value_list(point_list, ele_acc, por);
427  data().cross_section.value_list(point_list, ele_acc, csection);
428  data().fluid_density.value_list(point_list, ele_acc, f_rho);
429  data().solid_density.value_list(point_list, ele_acc, s_rho);
430  data().fluid_heat_capacity.value_list(point_list, ele_acc, f_cap);
431  data().solid_heat_capacity.value_list(point_list, ele_acc, s_cap);
432  data().fluid_heat_exchange_rate.value_list(point_list, ele_acc, f_sigma);
433  data().solid_heat_exchange_rate.value_list(point_list, ele_acc, s_sigma);
434  sources_sigma[0].resize(point_list.size());
435  for (unsigned int k=0; k<point_list.size(); k++)
436  {
437  sources_sigma[0][k] = csection[k]*(por[k]*f_rho[k]*f_cap[k]*f_sigma[k] + (1.-por[k])*s_rho[k]*s_cap[k]*s_sigma[k]);
438  }
439 }
440 
441 
443 {}
444 
445 
446 
447 
TimeGovernor & time()
Definition: equation.hh:148
vector< unsigned int > subst_idx
List of indices used to call balance methods for a set of quantities.
Definition: heat_model.hh:280
Field< 3, FieldValue< 3 >::Scalar > solid_heat_capacity
Heat capacity of solid.
Definition: heat_model.hh:133
static const Input::Type::Record & get_input_type()
Main balance input record type.
Definition: balance.cc:48
Field< 3, FieldValue< 3 >::Scalar > fluid_density
Density of fluid.
Definition: heat_model.hh:125
static constexpr Mask in_main_matrix
A field is part of main "stiffness matrix" of the equation.
Definition: field_flag.hh:49
Field< 3, FieldValue< 3 >::Scalar > disp_t
Transversal heat dispersivity.
Definition: heat_model.hh:139
Field< 3, FieldValue< 3 >::Scalar > cross_section
Pointer to DarcyFlow field cross_section.
Definition: heat_model.hh:154
static const Input::Type::Record & get_input_type()
The specification of output stream.
Definition: output_time.cc:38
Class Input::Type::Default specifies default value of keys of a Input::Type::Record.
Definition: type_record.hh:61
static IT::Selection get_output_selection()
Definition: heat_model.cc:242
void initialize(const Input::Array &in_array)
Read from input array.
Definition: substance.cc:58
Field< 3, FieldValue< 3 >::Scalar > fluid_heat_exchange_rate
Heat exchange rate in fluid.
Definition: heat_model.hh:145
static std::shared_ptr< OutputTime > create_output_stream(const std::string &equation_name, const Input::Record &in_rec, std::string unit_str)
This method delete all object instances of class OutputTime stored in output_streams vector...
Definition: output_time.cc:185
Field< 3, FieldValue< 3 >::Scalar > solid_heat_exchange_rate
Heat exchange rate in solid.
Definition: heat_model.hh:147
Definition: mesh.h:80
BCMultiField< 3, FieldValue< 3 >::Scalar > bc_dirichlet_value
Dirichlet boundary condition for temperature.
Definition: heat_model.hh:113
BCField< 3, FieldValue< 3 >::Enum > bc_type
Type of boundary condition (see also BC_Type)
Definition: heat_model.hh:111
static const Input::Type::Selection & get_bc_type_selection()
Definition: heat_model.cc:40
Field< 3, FieldValue< 3 >::Scalar > fluid_heat_capacity
Heat capacity of fluid.
Definition: heat_model.hh:127
Basic time management functionality for unsteady (and steady) solvers (class Equation).
BCField< 3, FieldValue< 3 >::Scalar > bc_flux
Flux value in total/diffusive flux b.c.
Definition: heat_model.hh:115
void get_bc_type(const ElementAccessor< 3 > &ele_acc, arma::uvec &bc_types) override
Definition: heat_model.cc:348
virtual void value_list(const std::vector< Point > &point_list, const ElementAccessor< spacedim > &elm, std::vector< typename Value::return_type > &value_list) const
Definition: field.hh:403
Field< 3, FieldValue< 3 >::Scalar > porosity
Porosity of solid.
Definition: heat_model.hh:121
Field< 3, FieldValue< 3 >::Scalar > fluid_thermal_source
Thermal source in fluid.
Definition: heat_model.hh:141
arma::vec::fixed< spacedim > centre() const
Computes the barycenter.
Definition: accessors.hh:285
virtual Record & derive_from(Abstract &parent)
Method to derive new Record from an AbstractRecord parent.
Definition: type_record.cc:195
Field< 3, FieldValue< 3 >::Scalar > fluid_heat_conductivity
Heat conductivity of fluid.
Definition: heat_model.hh:129
void get_flux_bc_sigma(unsigned int index, const std::vector< arma::vec3 > &point_list, const ElementAccessor< 3 > &ele_acc, std::vector< double > &bc_sigma) override
Return transition coefficient for flux b.c.
Definition: heat_model.cc:372
static Input::Type::Abstract & get_input_type()
Common specification of the input record for secondary equations.
Field< 3, FieldValue< 3 >::Scalar > fluid_ref_temperature
Reference temperature in fluid.
Definition: heat_model.hh:149
void get_flux_bc_data(unsigned int index, const std::vector< arma::vec3 > &point_list, const ElementAccessor< 3 > &ele_acc, std::vector< double > &bc_flux, std::vector< double > &bc_sigma, std::vector< double > &bc_ref_value) override
Return data for diffusive or total flux b.c.
Definition: heat_model.cc:357
Field< 3, FieldValue< 3 >::Scalar > init_temperature
Initial temperature.
Definition: heat_model.hh:119
Field< 3, FieldValue< 3 >::Scalar > solid_thermal_source
Thermal source in solid.
Definition: heat_model.hh:143
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:277
static UnitSI & W()
Returns Watt.
Definition: unit_si.cc:45
Accessor to the data with type Type::Record.
Definition: accessors.hh:292
const Ret val(const string &key) const
static UnitSI & J()
Returns Joule.
Definition: unit_si.cc:40
Mesh * mesh_
Definition: equation.hh:223
Selection & add_value(const int value, const std::string &key, const std::string &description="", TypeBase::attribute_map attributes=TypeBase::attribute_map())
Adds one new value with name given by key to the Selection.
virtual Value::return_type const & value(const Point &p, const ElementAccessor< spacedim > &elm) const
Definition: field.hh:389
std::shared_ptr< Balance > balance_
object for calculation and writing the mass balance to file.
Definition: equation.hh:235
Record & declare_key(const string &key, std::shared_ptr< TypeBase > type, const Default &default_value, const string &description, TypeBase::attribute_map key_attributes=TypeBase::attribute_map())
Declares a new key of the Record.
Definition: type_record.cc:501
Field< 3, FieldValue< 3 >::Scalar > solid_heat_conductivity
Heat conductivity of solid.
Definition: heat_model.hh:135
SubstanceList substances_
Transported substances.
Definition: heat_model.hh:270
static constexpr Mask in_rhs
A field is part of the right hand side of the equation.
Definition: field_flag.hh:51
Field< 3, FieldValue< 3 >::Scalar > solid_ref_temperature
Reference temperature in solid.
Definition: heat_model.hh:151
const Selection & close() const
Close the Selection, no more values can be added.
virtual ModelEqData & data()=0
Derived class should implement getter for ModelEqData instance.
void compute_init_cond(const std::vector< arma::vec3 > &point_list, const ElementAccessor< 3 > &ele_acc, std::vector< std::vector< double > > &init_values) override
Definition: heat_model.cc:340
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:300
static const Input::Type::Record & get_input_type()
~HeatTransferModel() override
Definition: heat_model.cc:442
Field< 3, FieldValue< 3 >::Scalar > solid_density
Density of solid.
Definition: heat_model.hh:131
Discontinuous Galerkin method for equation of transport with dispersion.
HeatTransferModel(Mesh &mesh, const Input::Record in_rec)
Definition: heat_model.cc:252
void compute_sources_sigma(const std::vector< arma::vec3 > &point_list, const ElementAccessor< 3 > &ele_acc, std::vector< std::vector< double > > &sources_sigma) override
Definition: heat_model.cc:419
Record type proxy class.
Definition: type_record.hh:182
BCField< 3, FieldValue< 3 >::Scalar > bc_robin_sigma
Transition coefficient in total/diffusive flux b.c.
Definition: heat_model.hh:117
std::shared_ptr< OutputTime > output_stream_
Definition: heat_model.hh:282
Class for representation SI units of Fields.
Definition: unit_si.hh:40
static UnitSI & dimensionless()
Returns dimensionless unit.
Definition: unit_si.cc:55
Template for classes storing finite set of named values.
void compute_source_coefficients(const std::vector< arma::vec3 > &point_list, const ElementAccessor< 3 > &ele_acc, std::vector< std::vector< double > > &sources_conc, std::vector< std::vector< double > > &sources_density, std::vector< std::vector< double > > &sources_sigma) override
Definition: heat_model.cc:381
void output_data() override
Write computed fields.
Definition: heat_model.cc:271
Field< 3, FieldValue< 3 >::Scalar > disp_l
Longitudal heat dispersivity.
Definition: heat_model.hh:137
TimeGovernor * time_
Definition: equation.hh:224