40 using namespace Input::Type;
54 .name(
"bc_temperature")
55 .description(
"Boundary value of temperature.")
60 *
this+=init_temperature
61 .name(
"init_temperature")
62 .description(
"Initial temperature.")
64 .input_default(
"0.0");
68 .description(
"Porosity.")
71 .flags_add(in_main_matrix & in_time_term);
74 .name(
"fluid_density")
75 .description(
"Density of fluid.")
76 .units(
UnitSI().kg().m(-3) )
77 .flags_add(in_main_matrix & in_time_term);
79 *
this+=fluid_heat_capacity
80 .name(
"fluid_heat_capacity")
81 .description(
"Heat capacity of fluid.")
83 .flags_add(in_main_matrix & in_time_term);
85 *
this+=fluid_heat_conductivity
86 .name(
"fluid_heat_conductivity")
87 .description(
"Heat conductivity of fluid.")
89 .flags_add(in_main_matrix);
93 .name(
"solid_density")
94 .description(
"Density of solid (rock).")
95 .units(
UnitSI().kg().m(-3) )
96 .flags_add(in_time_term);
98 *
this+=solid_heat_capacity
99 .name(
"solid_heat_capacity")
100 .description(
"Heat capacity of solid (rock).")
102 .flags_add(in_time_term);
104 *
this+=solid_heat_conductivity
105 .name(
"solid_heat_conductivity")
106 .description(
"Heat conductivity of solid (rock).")
108 .flags_add(in_main_matrix);
112 .description(
"Longitudal heat dispersivity in fluid.")
114 .input_default(
"0.0")
115 .flags_add(in_main_matrix);
119 .description(
"Transversal heat dispersivity in fluid.")
121 .input_default(
"0.0")
122 .flags_add(in_main_matrix);
124 *
this+=fluid_thermal_source
125 .name(
"fluid_thermal_source")
126 .description(
"Thermal source density in fluid.")
128 .input_default(
"0.0")
131 *
this+=solid_thermal_source
132 .name(
"solid_thermal_source")
133 .description(
"Thermal source density in solid.")
135 .input_default(
"0.0")
138 *
this+=fluid_heat_exchange_rate
139 .name(
"fluid_heat_exchange_rate")
140 .description(
"Heat exchange rate in fluid.")
142 .input_default(
"0.0")
145 *
this+=solid_heat_exchange_rate
146 .name(
"solid_heat_exchange_rate")
147 .description(
"Heat exchange rate of source in solid.")
149 .input_default(
"0.0")
152 *
this+=fluid_ref_temperature
153 .name(
"fluid_ref_temperature")
154 .description(
"Reference temperature of source in fluid.")
156 .input_default(
"0.0")
159 *
this+=solid_ref_temperature
160 .name(
"solid_ref_temperature")
161 .description(
"Reference temperature in solid.")
163 .input_default(
"0.0")
167 .name(
"cross_section")
168 .units(
UnitSI().m(3).md() )
169 .flags(input_copy & in_time_term & in_main_matrix);
174 .flags(equation_result);
180 static IT::Record input_type =
IT::Record(ModelEqData::name() +
"_" + implementation, description +
" for heat transfer.")
190 static IT::Selection input_type =
IT::Selection(ModelEqData::name() +
"_" + implementation +
"_Output",
"Selection for output fields of " + description +
" for heat transfer.");
213 por(point_list.size()),
214 f_rho(point_list.size()),
215 s_rho(point_list.size()),
216 f_c(point_list.size()),
217 s_c(point_list.size());
226 for (
unsigned int i=0; i<point_list.size(); i++)
227 mm_coef[i] = elem_csec[i]*(por[i]*f_rho[i]*f_c[i] + (1.-por[i])*s_rho[i]*s_c[i]);
237 const unsigned int qsize = point_list.size();
239 s_cond(qsize), por(qsize), csection(qsize), disp_l(qsize), disp_t(qsize);
250 for (
unsigned int k=0; k<qsize; k++) {
251 ad_coef[0][k] = velocity[k]*f_rho[k]*f_cap[k];
256 double vnorm = arma::norm(velocity[k], 2);
258 for (
int i=0; i<3; i++)
259 for (
int j=0; j<3; j++)
260 dif_coef[0][k](i,j) = (velocity[k][i]*velocity[k][j]/(vnorm*vnorm)*(disp_l[k]-disp_t[k]) + disp_t[k]*(i==j?1:0))
261 *vnorm*f_rho[k]*f_cond[k];
263 dif_coef[0][k].zeros();
266 dif_coef[0][k] += csection[k]*(por[k]*f_cond[k] + (1.-por[k])*s_cond[k])*arma::eye(3,3);
277 for (
unsigned int i=0; i<point_list.size(); i++)
278 init_values[i] = init_value[i];
288 for (
unsigned int i=0; i<point_list.size(); i++)
289 bc_values[i] = bc_value[i];
299 const unsigned int qsize = point_list.size();
300 std::vector<double> por(qsize), csection(qsize), f_rho(qsize), s_rho(qsize), f_cap(qsize), s_cap(qsize),
301 f_source(qsize), s_source(qsize), f_sigma(qsize), s_sigma(qsize), f_temp(qsize), s_temp(qsize);
315 for (
unsigned int k=0; k<point_list.size(); k++)
317 sources_density[k].resize(1);
318 sources_sigma[k].resize(1);
319 sources_value[k].resize(1);
321 sources_density[k][0] = csection[k]*(por[k]*f_source[k] + (1.-por[k])*s_source[k]);
322 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]);
324 sources_value[k][0] = csection[k]*(por[k]*f_rho[k]*f_cap[k]*f_sigma[k]*f_temp[k]
325 + (1.-por[k])*s_rho[k]*s_cap[k]*s_sigma[k]*s_temp[k])/sources_sigma[k][0];
327 sources_value[k][0] = 0;
336 const unsigned int qsize = point_list.size();
337 std::vector<double> por(qsize), csection(qsize), f_rho(qsize), s_rho(qsize), f_cap(qsize), s_cap(qsize),
338 f_source(qsize), s_source(qsize), f_sigma(qsize), s_sigma(qsize), f_temp(qsize), s_temp(qsize);
347 for (
unsigned int k=0; k<point_list.size(); k++)
349 sources_sigma[k].resize(1);
350 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.
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.
Field< 3, FieldValue< 3 >::Scalar > fluid_heat_conductivity
Heat conductivity of fluid.
Field< 3, FieldValue< 3 >::Scalar > fluid_ref_temperature
Reference temperature in fluid.
void set_component_names(std::vector< string > &names, const Input::Record &in_rec) override
Read or set names of solution components.
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.
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.