v0.15.0
Loading...
Searching...
No Matches
ThermoElasticOps::OpStressThermal Struct Reference

#include "tutorials/adv-2/src/ThermoElasticOps.hpp"

Inheritance diagram for ThermoElasticOps::OpStressThermal:
[legend]
Collaboration diagram for ThermoElasticOps::OpStressThermal:
[legend]

Public Member Functions

DEPRECATED OpStressThermal (const std::string field_name, boost::shared_ptr< MatrixDouble > strain_ptr, boost::shared_ptr< VectorDouble > temp_ptr, boost::shared_ptr< MatrixDouble > m_D_ptr, boost::shared_ptr< VectorDouble > coeff_expansion_ptr, boost::shared_ptr< MatrixDouble > stress_ptr)
 
 OpStressThermal (boost::shared_ptr< MatrixDouble > strain_ptr, boost::shared_ptr< VectorDouble > temp_ptr, boost::shared_ptr< MatrixDouble > m_D_ptr, boost::shared_ptr< VectorDouble > coeff_expansion_ptr, boost::shared_ptr< double > ref_temp_ptr, boost::shared_ptr< MatrixDouble > stress_ptr)
 
MoFEMErrorCode doWork (int side, EntityType type, EntData &data)
 [Calculate stress]
 

Private Attributes

boost::shared_ptr< MatrixDouble > strainPtr
 
boost::shared_ptr< VectorDouble > tempPtr
 
boost::shared_ptr< MatrixDouble > mDPtr
 
boost::shared_ptr< VectorDouble > coeffExpansionPtr
 
boost::shared_ptr< doublerefTempPtr
 
boost::shared_ptr< MatrixDouble > stressPtr
 

Detailed Description

Definition at line 23 of file ThermoElasticOps.hpp.

Constructor & Destructor Documentation

◆ OpStressThermal() [1/2]

ThermoElasticOps::OpStressThermal::OpStressThermal ( const std::string field_name,
boost::shared_ptr< MatrixDouble > strain_ptr,
boost::shared_ptr< VectorDouble > temp_ptr,
boost::shared_ptr< MatrixDouble > m_D_ptr,
boost::shared_ptr< VectorDouble > coeff_expansion_ptr,
boost::shared_ptr< MatrixDouble > stress_ptr )
Deprecated
do not use this constructor
Examples
ThermoElasticOps.hpp.

Definition at line 117 of file ThermoElasticOps.hpp.

123 : DomainEleOp(field_name, DomainEleOp::OPROW), strainPtr(strain_ptr),
124 tempPtr(temp_ptr), mDPtr(m_D_ptr), coeffExpansionPtr(coeff_expansion_ptr),
125 stressPtr(stress_ptr) {
126 // Operator is only executed for vertices
127 std::fill(&doEntities[MBEDGE], &doEntities[MBMAXTYPE], false);
128}
DomainEle::UserDataOperator DomainEleOp
Finire element operator type.
constexpr auto field_name
boost::shared_ptr< VectorDouble > coeffExpansionPtr
boost::shared_ptr< MatrixDouble > strainPtr
boost::shared_ptr< MatrixDouble > stressPtr
boost::shared_ptr< VectorDouble > tempPtr
boost::shared_ptr< MatrixDouble > mDPtr

◆ OpStressThermal() [2/2]

ThermoElasticOps::OpStressThermal::OpStressThermal ( boost::shared_ptr< MatrixDouble > strain_ptr,
boost::shared_ptr< VectorDouble > temp_ptr,
boost::shared_ptr< MatrixDouble > m_D_ptr,
boost::shared_ptr< VectorDouble > coeff_expansion_ptr,
boost::shared_ptr< double > ref_temp_ptr,
boost::shared_ptr< MatrixDouble > stress_ptr )

Definition at line 130 of file ThermoElasticOps.hpp.

137 : DomainEleOp(NOSPACE, DomainEleOp::OPSPACE), strainPtr(strain_ptr),
138 tempPtr(temp_ptr), mDPtr(m_D_ptr), coeffExpansionPtr(coeff_expansion_ptr),
139 refTempPtr(ref_temp_ptr), stressPtr(stress_ptr) {}
@ NOSPACE
Definition definitions.h:83
boost::shared_ptr< double > refTempPtr

Member Function Documentation

◆ doWork()

MoFEMErrorCode ThermoElasticOps::OpStressThermal::doWork ( int side,
EntityType type,
EntData & data )

[Calculate stress]

Examples
ThermoElasticOps.hpp.

Definition at line 142 of file ThermoElasticOps.hpp.

143 {
145 const auto nb_gauss_pts = getGaussPts().size2();
146 stressPtr->resize((SPACE_DIM * (SPACE_DIM + 1)) / 2, nb_gauss_pts);
147
148 auto t_D = getFTensor4DdgFromMat<SPACE_DIM, SPACE_DIM, 0>(*mDPtr);
149 auto t_strain = getFTensor2SymmetricFromMat<SPACE_DIM>(*strainPtr);
150 auto t_stress = getFTensor2SymmetricFromMat<SPACE_DIM>(*stressPtr);
151 auto t_temp = getFTensor0FromVec(*tempPtr);
152
157
159 t_coeff_exp(i, j) = 0;
160 for (auto d = 0; d != SPACE_DIM; ++d) {
161 t_coeff_exp(d, d) = (*coeffExpansionPtr)[d];
162 }
163
164 for (size_t gg = 0; gg != nb_gauss_pts; ++gg) {
165 t_stress(i, j) =
166 t_D(i, j, k, l) *
167 (t_strain(k, l) - t_coeff_exp(k, l) * (t_temp - (*refTempPtr)));
168 ++t_strain;
169 ++t_stress;
170 ++t_temp;
171 }
173}
constexpr int SPACE_DIM
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
FTensor::Index< 'i', SPACE_DIM > i
FTensor::Index< 'l', 3 > l
FTensor::Index< 'j', 3 > j
FTensor::Index< 'k', 3 > k

Member Data Documentation

◆ coeffExpansionPtr

boost::shared_ptr<VectorDouble> ThermoElasticOps::OpStressThermal::coeffExpansionPtr
private
Examples
ThermoElasticOps.hpp.

Definition at line 48 of file ThermoElasticOps.hpp.

◆ mDPtr

boost::shared_ptr<MatrixDouble> ThermoElasticOps::OpStressThermal::mDPtr
private
Examples
ThermoElasticOps.hpp.

Definition at line 47 of file ThermoElasticOps.hpp.

◆ refTempPtr

boost::shared_ptr<double> ThermoElasticOps::OpStressThermal::refTempPtr
private
Examples
ThermoElasticOps.hpp.

Definition at line 49 of file ThermoElasticOps.hpp.

◆ strainPtr

boost::shared_ptr<MatrixDouble> ThermoElasticOps::OpStressThermal::strainPtr
private
Examples
ThermoElasticOps.hpp.

Definition at line 45 of file ThermoElasticOps.hpp.

◆ stressPtr

boost::shared_ptr<MatrixDouble> ThermoElasticOps::OpStressThermal::stressPtr
private
Examples
ThermoElasticOps.hpp.

Definition at line 50 of file ThermoElasticOps.hpp.

◆ tempPtr

boost::shared_ptr<VectorDouble> ThermoElasticOps::OpStressThermal::tempPtr
private
Examples
ThermoElasticOps.hpp.

Definition at line 46 of file ThermoElasticOps.hpp.


The documentation for this struct was generated from the following file: