v0.16.0
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
ThermoElasticOps::OpStressThermal Struct Reference

#include "tutorials/adv-2_thermo_elasticity/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]
 
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)
 

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/4]

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 120 of file ThermoElasticOps.hpp.

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

◆ OpStressThermal() [2/4]

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 133 of file ThermoElasticOps.hpp.

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

◆ OpStressThermal() [3/4]

DEPRECATED 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

◆ OpStressThermal() [4/4]

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 
)

Member Function Documentation

◆ doWork() [1/2]

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

[Calculate stress]

Examples
ThermoElasticOps.hpp.

Definition at line 145 of file ThermoElasticOps.hpp.

146 {
148 const auto nb_gauss_pts = getGaussPts().size2();
149 stressPtr->resize(nb_gauss_pts, (SPACE_DIM * (SPACE_DIM + 1)) / 2);
150
151 auto t_D = getFTensor4DdgFromMat<SPACE_DIM, SPACE_DIM, 0>(*mDPtr);
152 auto t_strain = getFTensor2SymmetricFromMat<SPACE_DIM>(*strainPtr);
153 auto t_stress = getFTensor2SymmetricFromMat<SPACE_DIM>(*stressPtr);
154 auto t_temp = getFTensor0FromVec(*tempPtr);
155
160
162 t_coeff_exp(i, j) = 0;
163 for (auto d = 0; d != SPACE_DIM; ++d) {
164 t_coeff_exp(d, d) = (*coeffExpansionPtr)[d];
165 }
166
167 for (size_t gg = 0; gg != nb_gauss_pts; ++gg) {
168 t_stress(i, j) =
169 t_D(i, j, k, l) *
170 (t_strain(k, l) - t_coeff_exp(k, l) * (t_temp - (*refTempPtr)));
171 ++t_strain;
172 ++t_stress;
173 ++t_temp;
174 }
176}
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

◆ doWork() [2/2]

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

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 files: