19 #ifndef HEAT_MODEL_HH_ 20 #define HEAT_MODEL_HH_ 53 static Input::Type::Abstract & get_input_type() {
54 return Input::Type::Abstract("Heat",
55 "Equation for heat transfer.")
61 class HeatNothing : public HeatProcessBase {
63 inline HeatNothing(Mesh &mesh_in)
64 : HeatProcessBase(mesh_in, Input::Record() )
67 // make module solved for ever
68 time_=new TimeGovernor();
72 inline virtual ~HeatNothing()
75 inline void set_velocity_field(const MH_DofHandler &dh) override {};
77 inline virtual void output_data() override {};
82 class HeatTransferModel : public AdvectionDiffusionModel, public AdvectionProcessBase {
85 class ModelEqData : public FieldSet {
96 BCField<3, FieldValue<3>::Enum > bc_type;
98 BCMultiField<3, FieldValue<3>::Scalar> bc_dirichlet_value;
100 BCField<3, FieldValue<3>::Scalar > bc_flux;
102 BCField<3, FieldValue<3>::Scalar > bc_robin_sigma;
104 Field<3, FieldValue<3>::Scalar> init_temperature;
106 Field<3, FieldValue<3>::Scalar> porosity;
108 Field<3, FieldValue<3>::Scalar> water_content;
110 Field<3, FieldValue<3>::Scalar> fluid_density;
112 Field<3, FieldValue<3>::Scalar> fluid_heat_capacity;
114 Field<3, FieldValue<3>::Scalar> fluid_heat_conductivity;
116 Field<3, FieldValue<3>::Scalar> solid_density;
118 Field<3, FieldValue<3>::Scalar> solid_heat_capacity;
120 Field<3, FieldValue<3>::Scalar> solid_heat_conductivity;
122 Field<3, FieldValue<3>::Scalar> disp_l;
124 Field<3, FieldValue<3>::Scalar> disp_t;
126 Field<3, FieldValue<3>::Scalar> fluid_thermal_source;
128 Field<3, FieldValue<3>::Scalar> solid_thermal_source;
130 Field<3, FieldValue<3>::Scalar> fluid_heat_exchange_rate;
132 Field<3, FieldValue<3>::Scalar> solid_heat_exchange_rate;
134 Field<3, FieldValue<3>::Scalar> fluid_ref_temperature;
136 Field<3, FieldValue<3>::Scalar> solid_ref_temperature;
139 Field<3, FieldValue<3>::Scalar > cross_section;
142 MultiField<3, FieldValue<3>::Scalar> output_field;
148 static constexpr const char * name() { return "Heat_AdvectionDiffusion"; }
150 static string default_output_field() { return "\"temperature\""; }
152 static const Input::Type::Selection & get_bc_type_selection();
154 static IT::Selection get_output_selection();
157 typedef AdvectionProcessBase FactoryBaseType;
160 HeatTransferModel(Mesh &mesh, const Input::Record in_rec);
162 void init_from_input(const Input::Record &in_rec) override {};
164 void compute_mass_matrix_coefficient(const std::vector<arma::vec3 > &point_list,
165 const ElementAccessor<3> &ele_acc,
166 std::vector<double> &mm_coef) override;
168 void compute_retardation_coefficient(const std::vector<arma::vec3 > &point_list,
169 const ElementAccessor<3> &ele_acc,
170 std::vector<std::vector<double> > &ret_coef) override {};
172 void compute_advection_diffusion_coefficients(const std::vector<arma::vec3 > &point_list,
173 const std::vector<arma::vec3> &velocity,
174 const ElementAccessor<3> &ele_acc,
175 std::vector<std::vector<arma::vec3> > &ad_coef,
176 std::vector<std::vector<arma::mat33> > &dif_coef) override;
178 void compute_init_cond(const std::vector<arma::vec3> &point_list,
179 const ElementAccessor<3> &ele_acc,
180 std::vector< arma::vec > &init_values) override;
182 void get_bc_type(const ElementAccessor<3> &ele_acc,
183 arma::uvec &bc_types) override;
185 void get_flux_bc_data(unsigned int index,
186 const std::vector<arma::vec3> &point_list,
187 const ElementAccessor<3> &ele_acc,
188 std::vector< double > &bc_flux,
189 std::vector< double > &bc_sigma,
190 std::vector< double > &bc_ref_value) override;
192 void get_flux_bc_sigma(unsigned int index,
193 const std::vector<arma::vec3> &point_list,
194 const ElementAccessor<3> &ele_acc,
195 std::vector< double > &bc_sigma) override;
197 void compute_source_coefficients(const std::vector<arma::vec3> &point_list,
198 const ElementAccessor<3> &ele_acc,
199 std::vector<arma::vec> &sources_conc,
200 std::vector<arma::vec> &sources_density,
201 std::vector<arma::vec> &sources_sigma) override;
203 void compute_sources_sigma(const std::vector<arma::vec3> &point_list,
204 const ElementAccessor<3> &ele_acc,
205 std::vector<arma::vec> &sources_sigma) override;
207 ~HeatTransferModel() override;
216 inline void set_velocity_field(const MH_DofHandler &dh) override
223 inline unsigned int n_substances()
227 inline SubstanceList &substances()
228 { return substances_; }
234 virtual ModelEqData &data() = 0;
242 static IT::Record get_input_type(const string &implementation, const string &description);
244 void output_data() override;
246 std::shared_ptr<OutputTime> &output_stream()
247 { return output_stream_; }
249 virtual void calculate_cumulative_balance() = 0;
251 virtual void calculate_instant_balance() = 0;
257 SubstanceList substances_;
264 const MH_DofHandler *mh_dh;
267 vector<unsigned int> subst_idx;
269 std::shared_ptr<OutputTime> output_stream_;
278 #endif /* HEAT_MODEL_HH_ */
Abstract base class for equation clasess.
Discontinuous Galerkin method for equation of transport with dispersion.
Classes for storing substance data.