v0.15.0
Loading...
Searching...
No Matches
ThermalElement.hpp
Go to the documentation of this file.
1/** \file ThermalElement.hpp
2 \ingroup mofem_thermal_elem
3
4 \brief Operators and data structures for thermal analysis
5
6 Implementation of thermal element for unsteady and steady case.
7 Radiation and convection blocks implemented by Xuan Meng
8
9*/
10
11
12
13#ifndef __THERMAL_ELEMENT_HPP
14#define __THERMAL_ELEMENT_HPP
15
16/** \brief structure grouping operators and data used for thermal problems
17 * \ingroup mofem_thermal_elem
18 *
19 * In order to assemble matrices and right hand vectors, the loops over
20 * elements, entities within the element and finally loop over integration
21 * points are executed.
22 *
23 * Following implementation separate those three types of loops and to each
24 * loop attach operator.
25 *
26 */
28
29 /// \brief definition of volume element
32 : MoFEM::VolumeElementForcesAndSourcesCore(m_field) {}
33
34 /** \brief it is used to calculate nb. of Gauss integration points
35 *
36 * for more details pleas look
37 * Reference:
38 *
39 * Albert Nijenhuis, Herbert Wilf,
40 * Combinatorial Algorithms for Computers and Calculators,
41 * Second Edition,
42 * Academic Press, 1978,
43 * ISBN: 0-12-519260-6,
44 * LC: QA164.N54.
45 *
46 * More details about algorithm
47 * http://people.sc.fsu.edu/~jburkardt/cpp_src/gm_rule/gm_rule.html
48 **/
49 int getRule(int order) { return 2 * (order - 1); };
50 };
51 MyVolumeFE feRhs; ///< cauclate right hand side for tetrahedral elements
52 MyVolumeFE &getLoopFeRhs() { return feRhs; } ///< get rhs volume element
53 MyVolumeFE feLhs; //< calculate left hand side for tetrahedral elements
54 MyVolumeFE &getLoopFeLhs() { return feLhs; } ///< get lhs volume element
55
56 /** \brief define surface element
57 *
58 * This element is used to integrate heat fluxes; convection and radiation
59 */
63 int getRule(int order) { return 2 * order; };
64 };
65
66 MyTriFE feFlux; //< heat flux element
67 MyTriFE &getLoopFeFlux() { return feFlux; } //< get heat flux element
68
69 MyTriFE feConvectionRhs; //< convection element
72 return feConvectionRhs;
73 } //< get convection element
75
76 MyTriFE feRadiationRhs; //< radiation element
79 return feRadiationRhs;
80 } //< get radiation element
82
85 : feRhs(m_field), feLhs(m_field), feFlux(m_field),
86 feConvectionRhs(m_field), feConvectionLhs(m_field),
87 feRadiationRhs(m_field), feRadiationLhs(m_field), mField(m_field) {}
88
89 /** \brief data for calculation heat conductivity and heat capacity elements
90 * \ingroup mofem_thermal_elem
91 */
92 struct BlockData {
93 // double cOnductivity;
94 MatrixDouble cOnductivity_mat; // This is (3x3) conductivity matrix
95 double cApacity; // rou * c_p == material density multiple heat capacity
96 double initTemp; ///< initial temperature
97 Range tEts; ///< contains elements in block set
98 };
99 std::map<int, BlockData>
100 setOfBlocks; ///< maps block set id with appropriate BlockData
101
102 /** \brief data for calculation heat flux
103 * \ingroup mofem_thermal_elem
104 */
105 struct FluxData {
106 HeatFluxCubitBcData dAta; ///< for more details look to BCMultiIndices.hpp
107 ///< to see details of HeatFluxCubitBcData
108 Range tRis; ///< surface triangles where hate flux is applied
109 };
110 std::map<int, FluxData>
111 setOfFluxes; ///< maps side set id with appropriate FluxData
112
113 /** \brief data for convection
114 * \ingroup mofem_thermal_elem
115 */
117 double cOnvection; /*The summation of Convection coefficients*/
118 double tEmperature; /*Ambient temperature of the area contains the black
119 body */
120 Range tRis; ///< those will be on body skin, except this with contact with
121 ///< other body where temperature is applied
122 };
123 std::map<int, ConvectionData>
124 setOfConvection; //< maps block set id with appropriate data
125
126 /** \brief data for radiation
127 * \ingroup mofem_thermal_elem
128 */
130 double sIgma; /* The Stefan-Boltzmann constant*/
131 double eMissivity; /* The surface emissivity coefficients range = [0,1] */
132 // double aBsorption; /* The surface absorption coefficients */
133 double aMbienttEmp; /* The incident radiant heat flow per unit surface area;
134 or the ambient temperature of space*/
135 Range tRis; ///< those will be on body skin, except this with contact with
136 ///< other body where temperature is applied
137 };
138 std::map<int, RadiationData>
139 setOfRadiation; //< maps block set id with appropriate data
140
141 /** \brief common data used by volume elements
142 * \ingroup mofem_thermal_elem
143 */
144 struct CommonData {
147 MatrixDouble gradAtGaussPts;
148 inline ublas::matrix_row<MatrixDouble> getGradAtGaussPts(const int gg) {
149 return ublas::matrix_row<MatrixDouble>(gradAtGaussPts, gg);
150 }
151 };
153
154 /// \brief operator to calculate temperature gradient at Gauss points
157
159 OpGetGradAtGaussPts(const std::string field_name, CommonData &common_data)
160 : MoFEM::VolumeElementForcesAndSourcesCore::UserDataOperator(
162 commonData(common_data) {}
163
164 /** \brief operator calculating temperature gradients
165 *
166 * temperature gradient is calculated multiplying derivatives of shape
167 * functions by degrees of freedom.
168 */
169 MoFEMErrorCode doWork(int side, EntityType type,
170 EntitiesFieldData::EntData &data);
171 };
172
173 /** \brief operator to calculate temperature and rate of temperature at Gauss
174 * points \ingroup mofem_thermal_elem
175 */
176 template <typename OP>
177 struct OpGetFieldAtGaussPts : public OP::UserDataOperator {
178
179 VectorDouble &fieldAtGaussPts;
181 VectorDouble &field_at_gauss_pts)
183 fieldAtGaussPts(field_at_gauss_pts) {}
184
185 /** \brief operator calculating temperature and rate of temperature
186 *
187 * temperature temperature or rate of temperature is calculated multiplying
188 * shape functions by degrees of freedom
189 */
190 MoFEMErrorCode doWork(int side, EntityType type,
191 EntitiesFieldData::EntData &data) {
193 try {
194
195 if (data.getFieldData().size() == 0)
197 int nb_dofs = data.getFieldData().size();
198 int nb_gauss_pts = data.getN().size1();
199
200 // initialize
201 fieldAtGaussPts.resize(nb_gauss_pts);
202 if (type == MBVERTEX) {
203 // loop over shape functions on entities always start from
204 // vertices, so if nodal shape functions are processed, vector of
205 // field values is zero at initialization
206 std::fill(fieldAtGaussPts.begin(), fieldAtGaussPts.end(), 0);
207 }
208
209 for (int gg = 0; gg < nb_gauss_pts; gg++) {
210 fieldAtGaussPts[gg] +=
211 inner_prod(data.getN(gg, nb_dofs), data.getFieldData());
212 }
213
214 } catch (const std::exception &ex) {
215 std::ostringstream ss;
216 ss << "throw in method: " << ex.what() << std::endl;
217 SETERRQ(PETSC_COMM_SELF, MOFEM_STD_EXCEPTION_THROW, "%s",
218 ss.str().c_str());
219 }
220
222 }
223 };
224
225 /** \brief operator to calculate temperature at Gauss pts
226 * \ingroup mofem_thermal_elem
227 */
229 : public OpGetFieldAtGaussPts<MoFEM::VolumeElementForcesAndSourcesCore> {
231 CommonData &common_data)
232 : OpGetFieldAtGaussPts<MoFEM::VolumeElementForcesAndSourcesCore>(
233 field_name, common_data.temperatureAtGaussPts) {}
234 };
235
236 /** \brief operator to calculate temperature at Gauss pts
237 * \ingroup mofem_thermal_elem
238 */
240 : public OpGetFieldAtGaussPts<MoFEM::FaceElementForcesAndSourcesCore> {
242 CommonData &common_data)
244 field_name, common_data.temperatureAtGaussPts) {}
245 };
246
247 /** \brief operator to calculate temperature rate at Gauss pts
248 * \ingroup mofem_thermal_elem
249 */
251 : public OpGetFieldAtGaussPts<MoFEM::VolumeElementForcesAndSourcesCore> {
253 CommonData &common_data)
254 : OpGetFieldAtGaussPts<MoFEM::VolumeElementForcesAndSourcesCore>(
255 field_name, common_data.temperatureRateAtGaussPts) {}
256 };
257
258 /** \biref operator to calculate right hand side of heat conductivity terms
259 * \ingroup mofem_thermal_elem
260 */
263
266 bool useTsF;
267 OpThermalRhs(const std::string field_name, BlockData &data,
268 CommonData &common_data)
269 : MoFEM::VolumeElementForcesAndSourcesCore::UserDataOperator(
271 dAta(data), commonData(common_data), useTsF(true) {}
272
273 Vec F;
274 OpThermalRhs(const std::string field_name, Vec _F, BlockData &data,
275 CommonData &common_data)
276 : MoFEM::VolumeElementForcesAndSourcesCore::UserDataOperator(
278 dAta(data), commonData(common_data), useTsF(false), F(_F) {}
279
280 VectorDouble Nf;
281
282 /** \brief calculate thermal conductivity matrix
283 *
284 * F = int diffN^T k gard_T dOmega^2
285 *
286 */
287 MoFEMErrorCode doWork(int side, EntityType type,
288 EntitiesFieldData::EntData &data);
289 };
290
291 /** \biref operator to calculate left hand side of heat conductivity terms
292 * \ingroup mofem_thermal_elem
293 */
296
299 bool useTsB;
300 OpThermalLhs(const std::string field_name, BlockData &data,
301 CommonData &common_data)
302 : MoFEM::VolumeElementForcesAndSourcesCore::UserDataOperator(
304 dAta(data), commonData(common_data), useTsB(true) {}
305
306 Mat A;
307 OpThermalLhs(const std::string field_name, Mat _A, BlockData &data,
308 CommonData &common_data)
309 : MoFEM::VolumeElementForcesAndSourcesCore::UserDataOperator(
311 dAta(data), commonData(common_data), useTsB(false), A(_A) {}
312
313 MatrixDouble K, transK;
314
315 /** \brief calculate thermal conductivity matrix
316 *
317 * K = int diffN^T k diffN^T dOmega^2
318 *
319 */
320 MoFEMErrorCode doWork(int row_side, int col_side, EntityType row_type,
321 EntityType col_type,
322 EntitiesFieldData::EntData &row_data,
323 EntitiesFieldData::EntData &col_data);
324 };
325
326 /** \brief operator to calculate right hand side of heat capacity terms
327 * \ingroup mofem_thermal_elem
328 */
331
334 OpHeatCapacityRhs(const std::string field_name, BlockData &data,
335 CommonData &common_data)
336 : MoFEM::VolumeElementForcesAndSourcesCore::UserDataOperator(
338 dAta(data), commonData(common_data) {}
339
340 VectorDouble Nf;
341
342 /** \brief calculate thermal conductivity matrix
343 *
344 * F = int N^T c (dT/dt) dOmega^2
345 *
346 */
347 MoFEMErrorCode doWork(int side, EntityType type,
348 EntitiesFieldData::EntData &data);
349 };
350
351 /** \brief operator to calculate left hand side of heat capacity terms
352 * \ingroup mofem_thermal_elem
353 */
356
359 OpHeatCapacityLhs(const std::string field_name, BlockData &data,
360 CommonData &common_data)
361 : MoFEM::VolumeElementForcesAndSourcesCore::UserDataOperator(
363 dAta(data), commonData(common_data) {}
364
365 MatrixDouble M, transM;
366
367 /** \brief calculate heat capacity matrix
368 *
369 * M = int N^T c N dOmega^2
370 *
371 */
372 MoFEMErrorCode doWork(int row_side, int col_side, EntityType row_type,
373 EntityType col_type,
374 EntitiesFieldData::EntData &row_data,
375 EntitiesFieldData::EntData &col_data);
376 };
377
378 /** \brief operator for calculate heat flux and assemble to right hand side
379 * \ingroup mofem_thermal_elem
380 */
383
386 bool useTsF;
387 OpHeatFlux(const std::string field_name, FluxData &data,
388 bool ho_geometry = false)
391 dAta(data), hoGeometry(ho_geometry), useTsF(true) {}
392
393 Vec F;
394 OpHeatFlux(const std::string field_name, Vec _F, FluxData &data,
395 bool ho_geometry = false)
398 dAta(data), hoGeometry(ho_geometry), useTsF(false), F(_F) {}
399
400 VectorDouble Nf;
401
402 /** \brief calculate heat flux
403 *
404 * F = int_S N^T * flux dS
405 *
406 */
407 MoFEMErrorCode doWork(int side, EntityType type,
408 EntitiesFieldData::EntData &data);
409 };
410
411 /**
412 * operator to calculate radiation therms on body surface and assemble to lhs
413 * of equations for the jocabian Matrix of Picard Linearization \ingroup
414 * mofem_thermal_elem
415 */
419 &commonData; // get the temperature or temperature Rate from CommonData
422 bool useTsB;
423
424 OpRadiationLhs(const std::string field_name, RadiationData &data,
425 CommonData &common_data, bool ho_geometry = false)
428 commonData(common_data), dAta(data), hoGeometry(ho_geometry),
429 useTsB(true) {}
430
431 Mat A;
432 OpRadiationLhs(const std::string field_name, Mat _A, RadiationData &data,
433 CommonData &common_data, bool ho_geometry = false)
436 commonData(common_data), dAta(data), hoGeometry(ho_geometry),
437 useTsB(false), A(_A) {}
438
439 MatrixDouble N, transN;
440
441 /** \brief calculate thermal radiation term in the lhs of equations(Tangent
442 * Matrix) for transient Thermal Problem
443 *
444 * K = intS 4* N^T* sIgma* eMissivity* N* T^3 dS (Reference _ see Finite
445 * Element Simulation of Heat Transfer by jean-Michel Bergheau)
446 */
447 MoFEMErrorCode doWork(int row_side, int col_side, EntityType row_type,
448 EntityType col_type,
449 EntitiesFieldData::EntData &row_data,
450 EntitiesFieldData::EntData &col_data);
451 };
452
453 /** \brief operator to calculate radiation therms on body surface and assemble
454 * to rhs of transient equations(Residual Vector) \ingroup mofem_thermal_elem
455 */
458
460 &commonData; // get the temperature or temperature Rate from CommonData
463 bool useTsF;
464 OpRadiationRhs(const std::string field_name, RadiationData &data,
465 CommonData &common_data, bool ho_geometry = false)
468 commonData(common_data), dAta(data), hoGeometry(ho_geometry),
469 useTsF(true) {}
470
471 Vec F;
472 OpRadiationRhs(const std::string field_name, Vec _F, RadiationData &data,
473 CommonData &common_data, bool ho_geometry = false)
476 commonData(common_data), dAta(data), hoGeometry(ho_geometry),
477 useTsF(false), F(_F) {}
478
479 VectorDouble Nf;
480
481 /** \brief calculate Transient Radiation condition on the right hand side
482 *residual
483 *
484 * R=int_S N^T * sIgma * eMissivity * (Ta^4 -Ts^4) dS
485 **/
486 MoFEMErrorCode doWork(int side, EntityType type,
487 EntitiesFieldData::EntData &data);
488 };
489
490 /** \brief operator to calculate convection therms on body surface and
491 * assemble to rhs of equations \ingroup mofem_thermal_elem
492 */
495
497 &commonData; // get the temperature or temperature Rate from CommonData
500 bool useTsF;
501 OpConvectionRhs(const std::string field_name, ConvectionData &data,
502 CommonData &common_data, bool ho_geometry = false)
505 commonData(common_data), dAta(data), hoGeometry(ho_geometry),
506 useTsF(true) {}
507
508 Vec F;
509 OpConvectionRhs(const std::string field_name, Vec _F, ConvectionData &data,
510 CommonData &common_data, bool ho_geometry = false)
513 commonData(common_data), dAta(data), hoGeometry(ho_geometry),
514 useTsF(false), F(_F) {}
515
516 VectorDouble Nf;
517
518 /** brief calculate Convection condition on the right hand side
519 * R=int_S N^T*alpha*N_f dS **/
520
521 MoFEMErrorCode doWork(int side, EntityType type,
522 EntitiesFieldData::EntData &data);
523 };
524
525 /// \biref operator to calculate convection therms on body surface and
526 /// assemble to lhs of equations
529
532 bool useTsB;
533
534 OpConvectionLhs(const std::string field_name, ConvectionData &data,
535 bool ho_geometry = false)
538 dAta(data), hoGeometry(ho_geometry), useTsB(true) {}
539
540 Mat A;
541 OpConvectionLhs(const std::string field_name, Mat _A, ConvectionData &data,
542 bool ho_geometry = false)
545 dAta(data), hoGeometry(ho_geometry), useTsB(false), A(_A) {}
546
547 MatrixDouble K, transK;
548 /** \brief calculate thermal convection term in the lhs of equations
549 *
550 * K = intS N^T alpha N dS
551 */
552 MoFEMErrorCode doWork(int row_side, int col_side, EntityType row_type,
553 EntityType col_type,
554 EntitiesFieldData::EntData &row_data,
555 EntitiesFieldData::EntData &col_data);
556 };
557
558 /** \brief this calass is to control time stepping
559 * \ingroup mofem_thermal_elem
560 *
561 * It is used to save data for temperature rate vector to MoFEM field.
562 */
563 struct UpdateAndControl : public FEMethod {
564
566 const std::string tempName;
567 const std::string rateName;
568
569 UpdateAndControl(MoFEM::Interface &m_field, const std::string temp_name,
570 const std::string rate_name)
571 : mField(m_field), tempName(temp_name), rateName(rate_name) {}
572
573 MoFEMErrorCode preProcess();
574 MoFEMErrorCode postProcess();
575 };
576
577 /** \brief TS monitore it records temperature at time steps
578 * \ingroup mofem_thermal_elem
579 */
580 struct TimeSeriesMonitor : public FEMethod {
581
583 const std::string seriesName;
584 const std::string tempName;
585 BitRefLevel mask;
586
587 using Ele = ForcesAndSourcesCore;
588 using VolEle = VolumeElementForcesAndSourcesCore;
589 using VolOp = VolumeElementForcesAndSourcesCore::UserDataOperator;
590 using SetPtsData = FieldEvaluatorInterface::SetPtsData;
591
592 boost::shared_ptr<SetPtsData> dataFieldEval;
593 boost::shared_ptr<VectorDouble> tempPtr;
594
595 std::vector<std::array<double, 3>> evalPoints;
596
597 TimeSeriesMonitor(MoFEM::Interface &m_field, const std::string series_name,
598 const std::string temp_name,
599 std::vector<std::array<double, 3>> eval_points = {})
600 : mField(m_field), seriesName(series_name), tempName(temp_name),
601 evalPoints(eval_points),
602 dataFieldEval(m_field.getInterface<FieldEvaluatorInterface>()
603 ->getData<VolEle>()) {
604 mask.set();
605
606 if (!evalPoints.empty()) {
607 ierr = m_field.getInterface<FieldEvaluatorInterface>()->buildTree<3>(
608 dataFieldEval, "THERMAL_FE");
609 CHKERRABORT(PETSC_COMM_WORLD, ierr);
610
611 auto no_rule = [](int, int, int) { return -1; };
612
613 tempPtr = boost::make_shared<VectorDouble>();
614
615 boost::shared_ptr<Ele> vol_ele(dataFieldEval->feMethodPtr.lock());
616 vol_ele->getRuleHook = no_rule;
617
618 vol_ele->getOpPtrVector().push_back(
619 new OpCalculateScalarFieldValues("TEMP", tempPtr));
620 }
621 }
622
623 MoFEMErrorCode postProcess();
624 };
625
626 /** \brief add thermal element on tets
627 * \ingroup mofem_thermal_elem
628 *
629 * It get data from block set and define element in moab
630 *w
631 * \param field name
632 * \param name of mesh nodal positions (if not defined nodal coordinates are
633 *used)
634 */
635 MoFEMErrorCode addThermalElements(
636 const std::string field_name,
637 const std::string mesh_nodals_positions = "MESH_NODE_POSITIONS");
638
639 /** \brief add heat flux element
640 * \ingroup mofem_thermal_elem
641 *
642 * It get data from heat flux set and define element in moab. Alternatively
643 * uses block set with name including substring HEAT_FLUX.
644 *
645 * \param field name
646 * \param name of mesh nodal positions (if not defined nodal coordinates are
647 * used)
648 */
649 MoFEMErrorCode addThermalFluxElement(
650 const std::string field_name,
651 const std::string mesh_nodals_positions = "MESH_NODE_POSITIONS");
652
653 /** \brief add convection element
654 * \ingroup mofem_thermal_elem
655 *
656 * It get data from convection set and define element in moab. Alternatively
657 * uses block set with name including substring CONVECTION.
658 *
659 * \param field name
660 * \param name of mesh nodal positions (if not defined nodal coordinates are
661 * used)
662 */
663 MoFEMErrorCode addThermalConvectionElement(
664 const std::string field_name,
665 const std::string mesh_nodals_positions = "MESH_NODE_POSITIONS");
666
667 /** \brief add Non-linear Radiation element
668 * \ingroup mofem_thermal_elem
669 *
670 * It get data from Radiation set and define element in moab. Alternatively
671 * uses block set with name including substring RADIATION.
672 *
673 * \param field name
674 * \param name of mesh nodal positions (if not defined nodal coordinates are
675 * used)
676 */
677 MoFEMErrorCode addThermalRadiationElement(
678 const std::string field_name,
679 const std::string mesh_nodals_positions = "MESH_NODE_POSITIONS");
680
681 /** \brief this function is used in case of stationary problem to set elements
682 * for rhs \ingroup mofem_thermal_elem
683 */
684 MoFEMErrorCode setThermalFiniteElementRhsOperators(string field_name, Vec &F);
685
686 /** \brief this function is used in case of stationary heat conductivity
687 * problem for lhs \ingroup mofem_thermal_elem
688 */
689 MoFEMErrorCode setThermalFiniteElementLhsOperators(string field_name, Mat A);
690
691 /** \brief this function is used in case of stationary problem for heat flux
692 * terms \ingroup mofem_thermal_elem
693 */
694 MoFEMErrorCode setThermalFluxFiniteElementRhsOperators(
695 string field_name, Vec &F,
696 const std::string mesh_nodals_positions = "MESH_NODE_POSITIONS");
697
698 /* \brief linear Steady convection terms in lhs
699 */
700 MoFEMErrorCode setThermalConvectionFiniteElementRhsOperators(
701 string field_name, Vec &F,
702 const std::string mesh_nodals_positions = "MESH_NODE_POSITIONS");
703
704 /* \brief linear Steady convection terms in rhs
705 */
706 MoFEMErrorCode setThermalConvectionFiniteElementLhsOperators(
707 string field_name, Mat A,
708 const std::string mesh_nodals_positions = "MESH_NODE_POSITIONS");
709
710 /** \brief set up operators for unsteady heat flux; convection; radiation
711 * problem \ingroup mofem_thermal_elem
712 */
713 MoFEMErrorCode setTimeSteppingProblem(
714 string field_name, string rate_name,
715 const std::string mesh_nodals_positions = "MESH_NODE_POSITIONS");
716
717 /** \brief set up operators for unsteady heat flux; convection; radiation
718 * problem \ingroup mofem_thermal_elem
719 */
720 MoFEMErrorCode setTimeSteppingProblem(
721 TsCtx &ts_ctx, string field_name, string rate_name,
722 const std::string mesh_nodals_positions = "MESH_NODE_POSITIONS");
723};
724
725#endif //__THERMAL_ELEMENT_HPP
726
727/**
728 * \defgroup mofem_thermal_elem Thermal element
729 * \ingroup user_modules
730 **/
ForcesAndSourcesCore::UserDataOperator UserDataOperator
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
@ MOFEM_STD_EXCEPTION_THROW
Definition definitions.h:39
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
constexpr int order
@ F
MoFEM::TsCtx * ts_ctx
PetscErrorCode MoFEMErrorCode
MoFEM/PETSc error code.
implementation of Data Operators for Forces and Sources
Definition Common.hpp:10
constexpr auto field_name
#define _F(n)
Definition quad.c:25
Deprecated interface functions.
@ OPROW
operator doWork function is executed on FE rows
@ OPROWCOL
operator doWork is executed on FE rows &columns
data for calculation heat conductivity and heat capacity elements
double initTemp
initial temperature
Range tEts
contains elements in block set
common data used by volume elements
ublas::matrix_row< MatrixDouble > getGradAtGaussPts(const int gg)
data for calculation heat flux
Range tRis
surface triangles where hate flux is applied
HeatFluxCubitBcData dAta
define surface element
MyTriFE(MoFEM::Interface &m_field)
definition of volume element
int getRule(int order)
it is used to calculate nb. of Gauss integration points
MyVolumeFE(MoFEM::Interface &m_field)
MoFEMErrorCode doWork(int row_side, int col_side, EntityType row_type, EntityType col_type, EntitiesFieldData::EntData &row_data, EntitiesFieldData::EntData &col_data)
calculate thermal convection term in the lhs of equations
OpConvectionLhs(const std::string field_name, ConvectionData &data, bool ho_geometry=false)
OpConvectionLhs(const std::string field_name, Mat _A, ConvectionData &data, bool ho_geometry=false)
operator to calculate convection therms on body surface and assemble to rhs of equations
OpConvectionRhs(const std::string field_name, ConvectionData &data, CommonData &common_data, bool ho_geometry=false)
OpConvectionRhs(const std::string field_name, Vec _F, ConvectionData &data, CommonData &common_data, bool ho_geometry=false)
MoFEMErrorCode doWork(int side, EntityType type, EntitiesFieldData::EntData &data)
operator to calculate temperature and rate of temperature at Gauss points
OpGetFieldAtGaussPts(const std::string field_name, VectorDouble &field_at_gauss_pts)
MoFEMErrorCode doWork(int side, EntityType type, EntitiesFieldData::EntData &data)
operator calculating temperature and rate of temperature
operator to calculate temperature gradient at Gauss points
MoFEMErrorCode doWork(int side, EntityType type, EntitiesFieldData::EntData &data)
operator calculating temperature gradients
OpGetGradAtGaussPts(const std::string field_name, CommonData &common_data)
operator to calculate temperature rate at Gauss pts
OpGetTetRateAtGaussPts(const std::string field_name, CommonData &common_data)
operator to calculate temperature at Gauss pts
OpGetTetTemperatureAtGaussPts(const std::string field_name, CommonData &common_data)
operator to calculate temperature at Gauss pts
OpGetTriTemperatureAtGaussPts(const std::string field_name, CommonData &common_data)
operator to calculate left hand side of heat capacity terms
MoFEMErrorCode doWork(int row_side, int col_side, EntityType row_type, EntityType col_type, EntitiesFieldData::EntData &row_data, EntitiesFieldData::EntData &col_data)
calculate heat capacity matrix
OpHeatCapacityLhs(const std::string field_name, BlockData &data, CommonData &common_data)
operator to calculate right hand side of heat capacity terms
OpHeatCapacityRhs(const std::string field_name, BlockData &data, CommonData &common_data)
MoFEMErrorCode doWork(int side, EntityType type, EntitiesFieldData::EntData &data)
calculate thermal conductivity matrix
operator for calculate heat flux and assemble to right hand side
OpHeatFlux(const std::string field_name, FluxData &data, bool ho_geometry=false)
MoFEMErrorCode doWork(int side, EntityType type, EntitiesFieldData::EntData &data)
calculate heat flux
OpHeatFlux(const std::string field_name, Vec _F, FluxData &data, bool ho_geometry=false)
MoFEMErrorCode doWork(int row_side, int col_side, EntityType row_type, EntityType col_type, EntitiesFieldData::EntData &row_data, EntitiesFieldData::EntData &col_data)
calculate thermal radiation term in the lhs of equations(TangentMatrix) for transient Thermal Problem
OpRadiationLhs(const std::string field_name, Mat _A, RadiationData &data, CommonData &common_data, bool ho_geometry=false)
OpRadiationLhs(const std::string field_name, RadiationData &data, CommonData &common_data, bool ho_geometry=false)
operator to calculate radiation therms on body surface and assemble to rhs of transient equations(Res...
OpRadiationRhs(const std::string field_name, Vec _F, RadiationData &data, CommonData &common_data, bool ho_geometry=false)
MoFEMErrorCode doWork(int side, EntityType type, EntitiesFieldData::EntData &data)
calculate Transient Radiation condition on the right hand side residual
OpRadiationRhs(const std::string field_name, RadiationData &data, CommonData &common_data, bool ho_geometry=false)
MoFEMErrorCode doWork(int row_side, int col_side, EntityType row_type, EntityType col_type, EntitiesFieldData::EntData &row_data, EntitiesFieldData::EntData &col_data)
calculate thermal conductivity matrix
OpThermalLhs(const std::string field_name, Mat _A, BlockData &data, CommonData &common_data)
OpThermalLhs(const std::string field_name, BlockData &data, CommonData &common_data)
OpThermalRhs(const std::string field_name, Vec _F, BlockData &data, CommonData &common_data)
OpThermalRhs(const std::string field_name, BlockData &data, CommonData &common_data)
MoFEMErrorCode doWork(int side, EntityType type, EntitiesFieldData::EntData &data)
calculate thermal conductivity matrix
TS monitore it records temperature at time steps.
boost::shared_ptr< SetPtsData > dataFieldEval
TimeSeriesMonitor(MoFEM::Interface &m_field, const std::string series_name, const std::string temp_name, std::vector< std::array< double, 3 > > eval_points={})
std::vector< std::array< double, 3 > > evalPoints
VolumeElementForcesAndSourcesCore VolEle
FieldEvaluatorInterface::SetPtsData SetPtsData
VolumeElementForcesAndSourcesCore::UserDataOperator VolOp
boost::shared_ptr< VectorDouble > tempPtr
this calass is to control time stepping
UpdateAndControl(MoFEM::Interface &m_field, const std::string temp_name, const std::string rate_name)
structure grouping operators and data used for thermal problems
MyTriFE & getLoopFeConvectionLhs()
std::map< int, FluxData > setOfFluxes
maps side set id with appropriate FluxData
ThermalElement(MoFEM::Interface &m_field)
MyVolumeFE feRhs
cauclate right hand side for tetrahedral elements
MyTriFE & getLoopFeFlux()
MyVolumeFE & getLoopFeLhs()
get lhs volume element
MyTriFE & getLoopFeConvectionRhs()
MoFEM::Interface & mField
MyVolumeFE & getLoopFeRhs()
get rhs volume element
MyTriFE & getLoopFeRadiationRhs()
CommonData commonData
std::map< int, RadiationData > setOfRadiation
std::map< int, ConvectionData > setOfConvection
std::map< int, BlockData > setOfBlocks
maps block set id with appropriate BlockData
MyTriFE & getLoopFeRadiationLhs()