41 using namespace Input::Type;
55 .name(
"bc_temperature")
56 .description(
"Boundary value of temperature.")
61 *
this+=init_temperature
62 .name(
"init_temperature")
63 .description(
"Initial temperature.")
65 .input_default(
"0.0");
69 .description(
"Porosity.")
72 .flags_add(in_main_matrix & in_time_term);
75 .name(
"fluid_density")
76 .description(
"Density of fluid.")
77 .units(
UnitSI().kg().m(-3) )
78 .flags_add(in_main_matrix & in_time_term);
80 *
this+=fluid_heat_capacity
81 .name(
"fluid_heat_capacity")
82 .description(
"Heat capacity of fluid.")
84 .flags_add(in_main_matrix & in_time_term);
86 *
this+=fluid_heat_conductivity
87 .name(
"fluid_heat_conductivity")
88 .description(
"Heat conductivity of fluid.")
90 .flags_add(in_main_matrix);
94 .name(
"solid_density")
95 .description(
"Density of solid (rock).")
96 .units(
UnitSI().kg().m(-3) )
97 .flags_add(in_time_term);
99 *
this+=solid_heat_capacity
100 .name(
"solid_heat_capacity")
101 .description(
"Heat capacity of solid (rock).")
103 .flags_add(in_time_term);
105 *
this+=solid_heat_conductivity
106 .name(
"solid_heat_conductivity")
107 .description(
"Heat conductivity of solid (rock).")
109 .flags_add(in_main_matrix);
113 .description(
"Longitudal heat dispersivity in fluid.")
115 .input_default(
"0.0")
116 .flags_add(in_main_matrix);
120 .description(
"Transversal heat dispersivity in fluid.")
122 .input_default(
"0.0")
123 .flags_add(in_main_matrix);
125 *
this+=fluid_thermal_source
126 .name(
"fluid_thermal_source")
127 .description(
"Thermal source density in fluid.")
129 .input_default(
"0.0")
132 *
this+=solid_thermal_source
133 .name(
"solid_thermal_source")
134 .description(
"Thermal source density in solid.")
136 .input_default(
"0.0")
139 *
this+=fluid_heat_exchange_rate
140 .name(
"fluid_heat_exchange_rate")
141 .description(
"Heat exchange rate in fluid.")
143 .input_default(
"0.0")
146 *
this+=solid_heat_exchange_rate
147 .name(
"solid_heat_exchange_rate")
148 .description(
"Heat exchange rate of source in solid.")
150 .input_default(
"0.0")
153 *
this+=fluid_ref_temperature
154 .name(
"fluid_ref_temperature")
155 .description(
"Reference temperature of source in fluid.")
157 .input_default(
"0.0")
160 *
this+=solid_ref_temperature
161 .name(
"solid_ref_temperature")
162 .description(
"Reference temperature in solid.")
164 .input_default(
"0.0")
168 .name(
"cross_section")
169 .units(
UnitSI().m(3).md() )
170 .flags(input_copy & in_time_term & in_main_matrix);
175 .flags(equation_result);
181 return data().cross_section.units()*
UnitSI().
md(1)
182 *data().output_field.units()
183 *data().porosity.units()
184 *data().fluid_density.units()
185 *data().fluid_heat_capacity.units();
191 std::string(ModelEqData::name()) +
"_" + implementation,
192 description +
" for heat transfer.")
203 std::string(ModelEqData::name()) +
"_" + implementation +
"_Output",
204 "Selection for output fields of " + description +
" for heat transfer.");
226 por(point_list.size()),
227 f_rho(point_list.size()),
228 s_rho(point_list.size()),
229 f_c(point_list.size()),
230 s_c(point_list.size());
239 for (
unsigned int i=0; i<point_list.size(); i++)
240 mm_coef[i] = elem_csec[i]*(por[i]*f_rho[i]*f_c[i] + (1.-por[i])*s_rho[i]*s_c[i]);
250 const unsigned int qsize = point_list.size();
252 s_cond(qsize), por(qsize), csection(qsize), disp_l(qsize), disp_t(qsize);
263 for (
unsigned int k=0; k<qsize; k++) {
264 ad_coef[0][k] = velocity[k]*f_rho[k]*f_cap[k];
269 double vnorm = arma::norm(velocity[k], 2);
271 for (
int i=0; i<3; i++)
272 for (
int j=0; j<3; j++)
273 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))
274 *vnorm*f_rho[k]*f_cond[k];
276 dif_coef[0][k].zeros();
279 dif_coef[0][k] += csection[k]*(por[k]*f_cond[k] + (1.-por[k])*s_cond[k])*arma::eye(3,3);
290 for (
unsigned int i=0; i<point_list.size(); i++)
291 init_values[i] = init_value[i];
301 for (
unsigned int i=0; i<point_list.size(); i++)
302 bc_values[i] = bc_value[i];
312 const unsigned int qsize = point_list.size();
313 std::vector<double> por(qsize), csection(qsize), f_rho(qsize), s_rho(qsize), f_cap(qsize), s_cap(qsize),
314 f_source(qsize), s_source(qsize), f_sigma(qsize), s_sigma(qsize), f_temp(qsize), s_temp(qsize);
328 for (
unsigned int k=0; k<point_list.size(); k++)
330 sources_density[k].resize(1);
331 sources_sigma[k].resize(1);
332 sources_value[k].resize(1);
334 sources_density[k][0] = csection[k]*(por[k]*f_source[k] + (1.-por[k])*s_source[k]);
335 sources_sigma[k][0] = 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]);
337 sources_value[k][0] = csection[k]*(por[k]*f_rho[k]*f_cap[k]*f_sigma[k]*f_temp[k]
338 + (1.-por[k])*s_rho[k]*s_cap[k]*s_sigma[k]*s_temp[k])/sources_sigma[k][0];
340 sources_value[k][0] = 0;
349 const unsigned int qsize = point_list.size();
350 std::vector<double> por(qsize), csection(qsize), f_rho(qsize), s_rho(qsize), f_cap(qsize), s_cap(qsize),
351 f_source(qsize), s_source(qsize), f_sigma(qsize), s_sigma(qsize), f_temp(qsize), s_temp(qsize);
360 for (
unsigned int k=0; k<point_list.size(); k++)
362 sources_sigma[k].resize(1);
363 sources_sigma[k][0] = 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]);
Field< 3, FieldValue< 3 >::Scalar > solid_heat_capacity
Heat capacity of solid.
void compute_sources_sigma(const std::vector< arma::vec3 > &point_list, const ElementAccessor< 3 > &ele_acc, std::vector< arma::vec > &sources_sigma) override
Field< 3, FieldValue< 3 >::Scalar > fluid_density
Density of fluid.
BCField< 3, FieldValue< 3 >::Scalar > bc_temperature
Dirichlet boundary condition for temperature.
static Input::Type::AbstractRecord input_type
Common specification of the input record for secondary equations.
Field< 3, FieldValue< 3 >::Scalar > disp_t
Transversal heat dispersivity.
Field< 3, FieldValue< 3 >::Scalar > cross_section
Pointer to DarcyFlow field cross_section.
void initialize(const Input::Array &in_array)
Read from input array.
Field< 3, FieldValue< 3 >::Scalar > fluid_heat_exchange_rate
Heat exchange rate in fluid.
Field< 3, FieldValue< 3 >::Scalar > solid_heat_exchange_rate
Heat exchange rate in solid.
void compute_init_cond(const std::vector< arma::vec3 > &point_list, const ElementAccessor< 3 > &ele_acc, std::vector< arma::vec > &init_values) override
Field< 3, FieldValue< 3 >::Scalar > fluid_heat_capacity
Heat capacity of fluid.
virtual void value_list(const std::vector< Point > &point_list, const ElementAccessor< spacedim > &elm, std::vector< typename Value::return_type > &value_list) const
Field< 3, FieldValue< 3 >::Scalar > porosity
Porosity of solid.
Field< 3, FieldValue< 3 >::Scalar > fluid_thermal_source
Thermal source in fluid.
void init_from_input(const Input::Record &in_rec, SubstanceList &substances) override
Read necessary data from input record.
Field< 3, FieldValue< 3 >::Scalar > fluid_heat_conductivity
Heat conductivity of fluid.
Field< 3, FieldValue< 3 >::Scalar > fluid_ref_temperature
Reference temperature in fluid.
Field< 3, FieldValue< 3 >::Scalar > init_temperature
Initial temperature.
Field< 3, FieldValue< 3 >::Scalar > solid_thermal_source
Thermal source in solid.
void compute_mass_matrix_coefficient(const std::vector< arma::vec3 > &point_list, const ElementAccessor< 3 > &ele_acc, std::vector< double > &mm_coef) override
void compute_dirichlet_bc(const std::vector< arma::vec3 > &point_list, const ElementAccessor< 3 > &ele_acc, std::vector< arma::vec > &bc_values) override
static UnitSI & W()
Returns Watt.
static UnitSI & J()
Returns Joule.
Field< 3, FieldValue< 3 >::Scalar > solid_heat_conductivity
Heat conductivity of solid.
Field< 3, FieldValue< 3 >::Scalar > solid_ref_temperature
Reference temperature in solid.
static IT::Selection & get_output_selection_input_type(const string &implementation, const string &description)
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
~HeatTransferModel() override
Field< 3, FieldValue< 3 >::Scalar > solid_density
Density of solid.
Discontinuous Galerkin method for equation of transport with dispersion.
mixed-hybrid model of linear Darcy flow, possibly unsteady.
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
Class for representation SI units of Fields.
UnitSI & md(int exp=-1)
Method sets value of exponent for m^{-d}, where d is dimension of region.
static UnitSI & dimensionless()
Returns dimensionless unit.
static IT::Record & get_input_type(const string &implementation, const string &description)
Field< 3, FieldValue< 3 >::Scalar > disp_l
Longitudal heat dispersivity.