v0.13.1
Loading...
Searching...
No Matches
Classes | Public Member Functions | Public Attributes | List of all members
ThermalStressElement Struct Reference

Implentation of thermal stress element. More...

#include <users_modules/basic_finite_elements/src/ThermalStressElement.hpp>

Collaboration diagram for ThermalStressElement:
[legend]

Classes

struct  BlockData
 
struct  CommonData
 
struct  MyVolumeFE
 
struct  OpGetTemperatureAtGaussPts
 
struct  OpThermalStressRhs
 

Public Member Functions

MyVolumeFEgetLoopThermalStressRhs ()
 
 ThermalStressElement (MoFEM::Interface &m_field)
 
MoFEMErrorCode addThermalStressElement (const std::string fe_name, const std::string field_name, const std::string thermal_field_name, const std::string mesh_nodals_positions="MESH_NODE_POSITIONS")
 
DEPRECATED MoFEMErrorCode addThermalSterssElement (const std::string fe_name, const std::string field_name, const std::string thermal_field_name, const std::string mesh_nodals_positions="MESH_NODE_POSITIONS")
 
MoFEMErrorCode setThermalStressRhsOperators (string field_name, string thermal_field_name, Vec &F, int verb=0)
 

Public Attributes

MyVolumeFE feThermalStressRhs
 
MoFEM::InterfacemField
 
std::map< int, BlockDatasetOfBlocks
 
CommonData commonData
 

Detailed Description

Implentation of thermal stress element.

Examples
elasticity.cpp.

Definition at line 15 of file ThermalStressElement.hpp.

Constructor & Destructor Documentation

◆ ThermalStressElement()

ThermalStressElement::ThermalStressElement ( MoFEM::Interface m_field)
inline

Definition at line 27 of file ThermalStressElement.hpp.

28 : feThermalStressRhs(m_field), mField(m_field) {}
MoFEM::Interface & mField

Member Function Documentation

◆ addThermalSterssElement()

DEPRECATED MoFEMErrorCode ThermalStressElement::addThermalSterssElement ( const std::string  fe_name,
const std::string  field_name,
const std::string  thermal_field_name,
const std::string  mesh_nodals_positions = "MESH_NODE_POSITIONS" 
)
inline
Deprecated:
Do not use this fiction with spelling mistake

Definition at line 199 of file ThermalStressElement.hpp.

202 {
203 return addThermalStressElement(fe_name, field_name, thermal_field_name,
204 mesh_nodals_positions);
205 }
constexpr auto field_name
MoFEMErrorCode addThermalStressElement(const std::string fe_name, const std::string field_name, const std::string thermal_field_name, const std::string mesh_nodals_positions="MESH_NODE_POSITIONS")

◆ addThermalStressElement()

MoFEMErrorCode ThermalStressElement::addThermalStressElement ( const std::string  fe_name,
const std::string  field_name,
const std::string  thermal_field_name,
const std::string  mesh_nodals_positions = "MESH_NODE_POSITIONS" 
)
inline

Definition at line 155 of file ThermalStressElement.hpp.

158 {
160 if (mField.check_field(thermal_field_name)) {
161
167 thermal_field_name);
168 if (mField.check_field(mesh_nodals_positions)) {
170 fe_name, mesh_nodals_positions);
171 }
174 Mat_Elastic mydata;
175 CHKERR it->getAttributeDataStructure(mydata);
176 setOfBlocks[it->getMeshsetId()].youngModulus = mydata.data.Young;
177 setOfBlocks[it->getMeshsetId()].poissonRatio = mydata.data.Poisson;
178 setOfBlocks[it->getMeshsetId()].thermalExpansion =
179 mydata.data.ThermalExpansion;
180 CHKERR mField.get_moab().get_entities_by_type(
181 it->meshset, MBTET, setOfBlocks[it->getMeshsetId()].tEts, true);
183 setOfBlocks[it->getMeshsetId()].tEts, MBTET, fe_name);
184 double ref_temp;
185 PetscBool flg;
186 CHKERR PetscOptionsGetReal(PETSC_NULL, PETSC_NULL, "-my_ref_temp",
187 &ref_temp, &flg);
188 if (flg == PETSC_TRUE) {
189 PetscPrintf(mField.get_comm(), "set refernce temperature %3.2f\n",
190 ref_temp);
191 setOfBlocks[it->getMeshsetId()].refTemperature = ref_temp;
192 }
193 }
194 }
196 }
@ MF_ZERO
Definition: definitions.h:98
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:346
@ MAT_ELASTICSET
block name is "MAT_ELASTIC"
Definition: definitions.h:159
@ BLOCKSET
Definition: definitions.h:148
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:416
#define CHKERR
Inline error check.
Definition: definitions.h:535
virtual MoFEMErrorCode modify_finite_element_add_field_row(const std::string &fe_name, const std::string &name_row)=0
set field row which finite element use
virtual MoFEMErrorCode add_finite_element(const std::string &fe_name, enum MoFEMTypes bh=MF_EXCL, int verb=DEFAULT_VERBOSITY)=0
add finite element
virtual MoFEMErrorCode add_ents_to_finite_element_by_type(const EntityHandle entities, const EntityType type, const std::string &name, const bool recursive=true)=0
add entities to finite element
virtual MoFEMErrorCode modify_finite_element_add_field_data(const std::string &fe_name, const std::string &name_filed)=0
set finite element field data
virtual MoFEMErrorCode modify_finite_element_add_field_col(const std::string &fe_name, const std::string &name_row)=0
set field col which finite element use
virtual bool check_field(const std::string &name) const =0
check if field is in database
#define _IT_CUBITMESHSETS_BY_BCDATA_TYPE_FOR_LOOP_(MESHSET_MANAGER, CUBITBCTYPE, IT)
Iterator that loops over a specific Cubit MeshSet in a moFEM field.
PetscErrorCode PetscOptionsGetReal(PetscOptions *, const char pre[], const char name[], PetscReal *dval, PetscBool *set)
virtual moab::Interface & get_moab()=0
virtual MPI_Comm & get_comm() const =0
std::map< int, BlockData > setOfBlocks
double ref_temp

◆ getLoopThermalStressRhs()

MyVolumeFE & ThermalStressElement::getLoopThermalStressRhs ( )
inline

Definition at line 24 of file ThermalStressElement.hpp.

24{ return feThermalStressRhs; }

◆ setThermalStressRhsOperators()

MoFEMErrorCode ThermalStressElement::setThermalStressRhsOperators ( string  field_name,
string  thermal_field_name,
Vec &  F,
int  verb = 0 
)
inline

Definition at line 207 of file ThermalStressElement.hpp.

209 {
211 if (mField.check_field(thermal_field_name)) {
212 std::map<int, BlockData>::iterator sit = setOfBlocks.begin();
213 for (; sit != setOfBlocks.end(); sit++) {
214 // add finite elemen
216 new OpGetTemperatureAtGaussPts(thermal_field_name, commonData,
217 verb));
218 feThermalStressRhs.getOpPtrVector().push_back(new OpThermalStressRhs(
219 field_name, F, sit->second, commonData, verb));
220 }
221 }
223 }
boost::ptr_vector< UserDataOperator > & getOpPtrVector()
Use to push back operator for row operator.

Member Data Documentation

◆ commonData

CommonData ThermalStressElement::commonData

Definition at line 43 of file ThermalStressElement.hpp.

◆ feThermalStressRhs

MyVolumeFE ThermalStressElement::feThermalStressRhs

Definition at line 23 of file ThermalStressElement.hpp.

◆ mField

MoFEM::Interface& ThermalStressElement::mField

Definition at line 26 of file ThermalStressElement.hpp.

◆ setOfBlocks

std::map<int, BlockData> ThermalStressElement::setOfBlocks

Definition at line 38 of file ThermalStressElement.hpp.


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