19 #ifndef HEAT_MODEL_HH_ 20 #define HEAT_MODEL_HH_ 22 #include <boost/exception/info.hpp> 44 namespace Input {
class Record; }
68 static Input::Type::Abstract & get_input_type() {
69 return Input::Type::Abstract("Heat",
70 "Equation for heat transfer.")
76 class HeatNothing : public HeatProcessBase {
78 inline HeatNothing(Mesh &mesh_in)
79 : HeatProcessBase(mesh_in, Input::Record() )
82 // make module solved for ever
83 time_=new TimeGovernor();
87 inline virtual ~HeatNothing()
90 inline void set_velocity_field(const MH_DofHandler &dh) override {};
92 inline virtual void output_data() override {};
97 class HeatTransferModel : public AdvectionDiffusionModel, public AdvectionProcessBase {
100 class ModelEqData : public FieldSet {
111 BCField<3, FieldValue<3>::Enum > bc_type;
113 BCMultiField<3, FieldValue<3>::Scalar> bc_dirichlet_value;
115 BCField<3, FieldValue<3>::Scalar > bc_flux;
117 BCField<3, FieldValue<3>::Scalar > bc_robin_sigma;
119 Field<3, FieldValue<3>::Scalar> init_temperature;
121 Field<3, FieldValue<3>::Scalar> porosity;
123 Field<3, FieldValue<3>::Scalar> water_content;
125 Field<3, FieldValue<3>::Scalar> fluid_density;
127 Field<3, FieldValue<3>::Scalar> fluid_heat_capacity;
129 Field<3, FieldValue<3>::Scalar> fluid_heat_conductivity;
131 Field<3, FieldValue<3>::Scalar> solid_density;
133 Field<3, FieldValue<3>::Scalar> solid_heat_capacity;
135 Field<3, FieldValue<3>::Scalar> solid_heat_conductivity;
137 Field<3, FieldValue<3>::Scalar> disp_l;
139 Field<3, FieldValue<3>::Scalar> disp_t;
141 Field<3, FieldValue<3>::Scalar> fluid_thermal_source;
143 Field<3, FieldValue<3>::Scalar> solid_thermal_source;
145 Field<3, FieldValue<3>::Scalar> fluid_heat_exchange_rate;
147 Field<3, FieldValue<3>::Scalar> solid_heat_exchange_rate;
149 Field<3, FieldValue<3>::Scalar> fluid_ref_temperature;
151 Field<3, FieldValue<3>::Scalar> solid_ref_temperature;
154 Field<3, FieldValue<3>::Scalar > cross_section;
157 MultiField<3, FieldValue<3>::Scalar> output_field;
163 static constexpr const char * name() { return "Heat_AdvectionDiffusion"; }
165 static string default_output_field() { return "\"temperature\""; }
167 static const Input::Type::Selection & get_bc_type_selection();
169 static IT::Selection get_output_selection();
172 typedef AdvectionProcessBase FactoryBaseType;
175 HeatTransferModel(Mesh &mesh, const Input::Record in_rec);
177 void init_from_input(const Input::Record &in_rec) override {};
179 void compute_mass_matrix_coefficient(const std::vector<arma::vec3 > &point_list,
180 const ElementAccessor<3> &ele_acc,
181 std::vector<double> &mm_coef) override;
183 void compute_retardation_coefficient(const std::vector<arma::vec3 > &point_list,
184 const ElementAccessor<3> &ele_acc,
185 std::vector<std::vector<double> > &ret_coef) override {};
187 void compute_advection_diffusion_coefficients(const std::vector<arma::vec3 > &point_list,
188 const std::vector<arma::vec3> &velocity,
189 const ElementAccessor<3> &ele_acc,
190 std::vector<std::vector<arma::vec3> > &ad_coef,
191 std::vector<std::vector<arma::mat33> > &dif_coef) override;
193 void compute_init_cond(const std::vector<arma::vec3> &point_list,
194 const ElementAccessor<3> &ele_acc,
195 std::vector<std::vector<double> > &init_values) override;
197 void get_bc_type(const ElementAccessor<3> &ele_acc,
198 arma::uvec &bc_types) override;
200 void get_flux_bc_data(unsigned int index,
201 const std::vector<arma::vec3> &point_list,
202 const ElementAccessor<3> &ele_acc,
203 std::vector< double > &bc_flux,
204 std::vector< double > &bc_sigma,
205 std::vector< double > &bc_ref_value) override;
207 void get_flux_bc_sigma(unsigned int index,
208 const std::vector<arma::vec3> &point_list,
209 const ElementAccessor<3> &ele_acc,
210 std::vector< double > &bc_sigma) override;
212 void compute_source_coefficients(const std::vector<arma::vec3> &point_list,
213 const ElementAccessor<3> &ele_acc,
214 std::vector<std::vector<double> > &sources_conc,
215 std::vector<std::vector<double> > &sources_density,
216 std::vector<std::vector<double> > &sources_sigma) override;
218 void compute_sources_sigma(const std::vector<arma::vec3> &point_list,
219 const ElementAccessor<3> &ele_acc,
220 std::vector<std::vector<double> > &sources_sigma) override;
222 ~HeatTransferModel() override;
231 inline void set_velocity_field(const MH_DofHandler &dh) override
238 inline unsigned int n_substances()
242 inline SubstanceList &substances()
243 { return substances_; }
249 virtual ModelEqData &data() = 0;
257 static IT::Record get_input_type(const string &implementation, const string &description);
259 void output_data() override;
261 std::shared_ptr<OutputTime> &output_stream()
262 { return output_stream_; }
264 virtual void calculate_cumulative_balance() = 0;
270 SubstanceList substances_;
277 const MH_DofHandler *mh_dh;
280 vector<unsigned int> subst_idx;
282 std::shared_ptr<OutputTime> output_stream_;
291 #endif /* HEAT_MODEL_HH_ */
The class for outputting data during time.
Discontinuous Galerkin method for equation of transport with dispersion.
Classes for storing substance data.