v0.14.0
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) {}

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  }

◆ 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  }
173  mField, BLOCKSET | MAT_ELASTICSET, it)) {
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  }

◆ 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  }

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:
ThermalStressElement::mField
MoFEM::Interface & mField
Definition: ThermalStressElement.hpp:26
MoFEM::CoreInterface::get_comm
virtual MPI_Comm & get_comm() const =0
MoFEM::CoreInterface::modify_finite_element_add_field_row
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
_IT_CUBITMESHSETS_BY_BCDATA_TYPE_FOR_LOOP_
#define _IT_CUBITMESHSETS_BY_BCDATA_TYPE_FOR_LOOP_(MESHSET_MANAGER, CUBITBCTYPE, IT)
Iterator that loops over a specific Cubit MeshSet in a moFEM field.
Definition: MeshsetsManager.hpp:49
ThermalStressElement::addThermalStressElement
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")
Definition: ThermalStressElement.hpp:155
ref_temp
double ref_temp
Definition: thermo_elastic.cpp:125
MoFEM::CoreInterface::add_ents_to_finite_element_by_type
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
CHKERR
#define CHKERR
Inline error check.
Definition: definitions.h:548
MoFEM::CoreInterface::add_finite_element
virtual MoFEMErrorCode add_finite_element(const std::string &fe_name, enum MoFEMTypes bh=MF_EXCL, int verb=DEFAULT_VERBOSITY)=0
add finite element
MoFEM::CoreInterface::get_moab
virtual moab::Interface & get_moab()=0
MoFEM::CoreInterface::modify_finite_element_add_field_col
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
MoFEM::PetscOptionsGetReal
PetscErrorCode PetscOptionsGetReal(PetscOptions *, const char pre[], const char name[], PetscReal *dval, PetscBool *set)
Definition: DeprecatedPetsc.hpp:152
MAT_ELASTICSET
@ MAT_ELASTICSET
block name is "MAT_ELASTIC"
Definition: definitions.h:172
MoFEM::CoreInterface::check_field
virtual bool check_field(const std::string &name) const =0
check if field is in database
MoFEM::CoreInterface::modify_finite_element_add_field_data
virtual MoFEMErrorCode modify_finite_element_add_field_data(const std::string &fe_name, const std::string name_field)=0
set finite element field data
ThermalStressElement::feThermalStressRhs
MyVolumeFE feThermalStressRhs
Definition: ThermalStressElement.hpp:23
field_name
constexpr auto field_name
Definition: poisson_2d_homogeneous.cpp:13
ThermalStressElement::commonData
CommonData commonData
Definition: ThermalStressElement.hpp:43
MF_ZERO
@ MF_ZERO
Definition: definitions.h:111
BLOCKSET
@ BLOCKSET
Definition: definitions.h:161
ThermalStressElement::setOfBlocks
std::map< int, BlockData > setOfBlocks
Definition: ThermalStressElement.hpp:38
MoFEM::ForcesAndSourcesCore::getOpPtrVector
boost::ptr_deque< UserDataOperator > & getOpPtrVector()
Use to push back operator for row operator.
Definition: ForcesAndSourcesCore.hpp:83
MoFEMFunctionReturn
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:429
MoFEMFunctionBegin
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:359
F
@ F
Definition: free_surface.cpp:394