v0.15.0
Loading...
Searching...
No Matches
thermo_elastic.cpp File Reference
#include <MoFEM.hpp>
#include <MatrixFunction.hpp>
#include <ThermalConvection.hpp>
#include <ThermalRadiation.hpp>
#include <HenckyOps.hpp>
#include <FiniteThermalOps.hpp>
#include <ThermalOps.hpp>
#include <ThermoElasticOps.hpp>

Go to the source code of this file.

Classes

struct  ThermoElasticProblem
 
struct  ThermoElasticProblem::BlockedThermalParameters
 
struct  ThermoElasticProblem::BlockedThermoElasticParameters
 

Macros

#define EXECUTABLE_DIMENSION   3
 
#define FINITE_DEFORMATION_FLAG   true
 

Typedefs

using DomainEle = PipelineManager::ElementsAndOpsByDim<SPACE_DIM>::DomainEle
 
using BoundaryEle
 
using PostProcEle = PostProcBrokenMeshInMoab<DomainEle>
 
using SkinPostProcEle = PostProcBrokenMeshInMoab<BoundaryEle>
 
using SideEle = PipelineManager::ElementsAndOpsByDim<SPACE_DIM>::FaceSideEle
 
using AssemblyDomainEleOp
 
using DomainNaturalBCRhs
 [Thermal problem]
 
using OpBodyForce
 
using OpHeatSource
 
using DomainNaturalBCLhs
 
using BoundaryNaturalBC
 [Body and heat source]
 
using OpForce = BoundaryNaturalBC::OpFlux<NaturalForceMeshsets, 1, SPACE_DIM>
 
using OpEssentialFluxRhs
 [Natural boundary conditions]
 
using OpEssentialFluxLhs
 
using OpSetTemperatureRhs
 
using OpSetTemperatureLhs
 

Functions

int main (int argc, char *argv[])
 

Variables

constexpr int SPACE_DIM
 
constexpr bool IS_LARGE_STRAINS
 
constexpr AssemblyType AT = AssemblyType::PETSC
 
constexpr IntegrationType IT
 
double default_young_modulus = 1
 [Essential boundary conditions (Least square approach)]
 
double default_poisson_ratio = 0.25
 
double default_ref_temp = 0.0
 
double default_init_temp = 0.0
 
double default_coeff_expansion = 1
 
double default_heat_conductivity
 
double default_heat_capacity = 1
 
int order_temp = 2
 
int order_flux = 3
 
int order_disp = 3
 
int atom_test = 0
 
int save_every = 1
 
PetscBool do_output_domain
 
PetscBool do_output_skin
 
auto save_range
 
static char help [] = "...\n\n"
 [Solve]
 

Macro Definition Documentation

◆ EXECUTABLE_DIMENSION

#define EXECUTABLE_DIMENSION   3

Definition at line 10 of file thermo_elastic.cpp.

◆ FINITE_DEFORMATION_FLAG

#define FINITE_DEFORMATION_FLAG   true
Examples
thermo_elastic.cpp.

Definition at line 14 of file thermo_elastic.cpp.

Typedef Documentation

◆ AssemblyDomainEleOp

◆ BoundaryEle

◆ BoundaryNaturalBC

Initial value:

[Body and heat source]

[Natural boundary conditions]

Definition at line 74 of file thermo_elastic.cpp.

◆ DomainEle

◆ DomainNaturalBCLhs

◆ DomainNaturalBCRhs

Initial value:

[Thermal problem]

[Body and heat source]

Definition at line 63 of file thermo_elastic.cpp.

◆ OpBodyForce

◆ OpEssentialFluxLhs

Initial value:
GAUSS>::OpEssentialLhs<HeatFluxCubitBcData, 3, SPACE_DIM>

Definition at line 84 of file thermo_elastic.cpp.

◆ OpEssentialFluxRhs

Initial value:
GAUSS>::OpEssentialRhs<HeatFluxCubitBcData, 3, SPACE_DIM>

[Natural boundary conditions]

[Essential boundary conditions (Least square approach)]

Definition at line 81 of file thermo_elastic.cpp.

◆ OpForce

◆ OpHeatSource

using OpHeatSource
Initial value:

Definition at line 67 of file thermo_elastic.cpp.

◆ OpSetTemperatureLhs

◆ OpSetTemperatureRhs

◆ PostProcEle

Definition at line 37 of file thermo_elastic.cpp.

◆ SideEle

◆ SkinPostProcEle

Function Documentation

◆ main()

int main ( int argc,
char * argv[] )

[Register MoFEM discrete manager in PETSc]

[Register MoFEM discrete manager in PETSc

[Create MoAB]

< mesh database

< mesh database interface

[Create MoAB]

[Create MoFEM]

< finite element database

< finite element database interface

[Create MoFEM]

[Load mesh]

[Load mesh]

[ThermoElasticProblem]

[ThermoElasticProblem]

Definition at line 1715 of file thermo_elastic.cpp.

1715 {
1716
1717 // Initialisation of MoFEM/PETSc and MOAB data structures
1718 const char param_file[] = "param_file.petsc";
1719 MoFEM::Core::Initialize(&argc, &argv, param_file, help);
1720
1721 // Add logging channel for example
1722 auto core_log = logging::core::get();
1723 core_log->add_sink(
1725 LogManager::setLog("ThermoElastic");
1726 MOFEM_LOG_TAG("ThermoElastic", "ThermoElastic");
1727
1728 core_log->add_sink(
1729 LogManager::createSink(LogManager::getStrmSync(), "ThermoElasticSync"));
1730 LogManager::setLog("ThermoElasticSync");
1731 MOFEM_LOG_TAG("ThermoElasticSync", "ThermoElasticSync");
1732
1733 try {
1734
1735 //! [Register MoFEM discrete manager in PETSc]
1736 DMType dm_name = "DMMOFEM";
1737 CHKERR DMRegister_MoFEM(dm_name);
1738 //! [Register MoFEM discrete manager in PETSc
1739
1740 //! [Create MoAB]
1741 moab::Core mb_instance; ///< mesh database
1742 moab::Interface &moab = mb_instance; ///< mesh database interface
1743 //! [Create MoAB]
1744
1745 //! [Create MoFEM]
1746 MoFEM::Core core(moab); ///< finite element database
1747 MoFEM::Interface &m_field = core; ///< finite element database interface
1748 //! [Create MoFEM]
1749
1750 //! [Load mesh]
1751 Simple *simple = m_field.getInterface<Simple>();
1753 CHKERR simple->loadFile();
1754 //! [Load mesh]
1755
1756 //! [ThermoElasticProblem]
1757 ThermoElasticProblem ex(m_field);
1758 CHKERR ex.runProblem();
1759 //! [ThermoElasticProblem]
1760 }
1762
1764}
void simple(double P1[], double P2[], double P3[], double c[], const int N)
Definition acoustic.cpp:69
#define CATCH_ERRORS
Catch errors.
#define CHKERR
Inline error check.
PetscErrorCode DMRegister_MoFEM(const char sname[])
Register MoFEM problem.
Definition DMMoFEM.cpp:43
static LoggerType & setLog(const std::string channel)
Set ans resset chanel logger.
#define MOFEM_LOG_TAG(channel, tag)
Tag channel.
Core (interface) class.
Definition Core.hpp:82
static MoFEMErrorCode Initialize(int *argc, char ***args, const char file[], const char help[])
Initializes the MoFEM database PETSc, MOAB and MPI.
Definition Core.cpp:72
static MoFEMErrorCode Finalize()
Checks for options to be called at the conclusion of the program.
Definition Core.cpp:118
Deprecated interface functions.
static boost::shared_ptr< SinkType > createSink(boost::shared_ptr< std::ostream > stream_ptr, std::string comm_filter)
Create a sink object.
static boost::shared_ptr< std::ostream > getStrmWorld()
Get the strm world object.
static boost::shared_ptr< std::ostream > getStrmSync()
Get the strm sync object.
Simple interface for fast problem set-up.
Definition Simple.hpp:27
MoFEMErrorCode getOptions()
get options
Definition Simple.cpp:180
MoFEMErrorCode getInterface(IFACE *&iface) const
Get interface reference to pointer of interface.
static char help[]
[Solve]

Variable Documentation

◆ AT

AssemblyType AT = AssemblyType::PETSC
constexpr

Definition at line 44 of file thermo_elastic.cpp.

◆ atom_test

int atom_test = 0
Examples
thermo_elastic.cpp.

Definition at line 106 of file thermo_elastic.cpp.

◆ default_coeff_expansion

double default_coeff_expansion = 1
Examples
thermo_elastic.cpp.

Definition at line 95 of file thermo_elastic.cpp.

◆ default_heat_capacity

double default_heat_capacity = 1
Examples
thermo_elastic.cpp.

Definition at line 99 of file thermo_elastic.cpp.

◆ default_heat_conductivity

double default_heat_conductivity
Initial value:
=
1
Examples
thermo_elastic.cpp.

Definition at line 96 of file thermo_elastic.cpp.

◆ default_init_temp

double default_init_temp = 0.0
Examples
thermo_elastic.cpp.

Definition at line 93 of file thermo_elastic.cpp.

◆ default_poisson_ratio

double default_poisson_ratio = 0.25
Examples
seepage.cpp, and thermo_elastic.cpp.

Definition at line 91 of file thermo_elastic.cpp.

◆ default_ref_temp

double default_ref_temp = 0.0
Examples
thermo_elastic.cpp.

Definition at line 92 of file thermo_elastic.cpp.

◆ default_young_modulus

double default_young_modulus = 1

[Essential boundary conditions (Least square approach)]

[Default input parameters]

Examples
seepage.cpp, and thermo_elastic.cpp.

Definition at line 90 of file thermo_elastic.cpp.

◆ do_output_domain

PetscBool do_output_domain
Examples
thermo_elastic.cpp.

Definition at line 109 of file thermo_elastic.cpp.

◆ do_output_skin

PetscBool do_output_skin
Examples
thermo_elastic.cpp.

Definition at line 110 of file thermo_elastic.cpp.

◆ help

char help[] = "...\n\n"
static

[Solve]

Definition at line 1713 of file thermo_elastic.cpp.

◆ IS_LARGE_STRAINS

bool IS_LARGE_STRAINS
constexpr
Initial value:
=
true
Examples
thermo_elastic.cpp.

Definition at line 28 of file thermo_elastic.cpp.

◆ IT

IntegrationType IT
constexpr
Initial value:
=
IntegrationType::GAUSS

Definition at line 45 of file thermo_elastic.cpp.

◆ order_disp

int order_disp = 3
Examples
thermo_elastic.cpp.

Definition at line 104 of file thermo_elastic.cpp.

◆ order_flux

int order_flux = 3
Examples
thermo_elastic.cpp.

Definition at line 103 of file thermo_elastic.cpp.

◆ order_temp

int order_temp = 2
Examples
thermo_elastic.cpp.

Definition at line 102 of file thermo_elastic.cpp.

◆ save_every

int save_every = 1
Examples
thermo_elastic.cpp.

Definition at line 108 of file thermo_elastic.cpp.

◆ save_range

MoFEMErrorCode save_range
Initial value:
= [](moab::Interface &moab, const std::string name,
const Range r) {
auto out_meshset = get_temp_meshset_ptr(moab);
CHKERR moab.add_entities(*out_meshset, r);
CHKERR moab.write_file(name.c_str(), "VTK", "", out_meshset->get_ptr(), 1);
}
#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()
auto get_temp_meshset_ptr(moab::Interface &moab)
Create smart pointer to temporary meshset.
Examples
EshelbianPlasticity.cpp, free_surface.cpp, level_set.cpp, mofem/tutorials/vec-7/adjoint.cpp, seepage.cpp, and thermo_elastic.cpp.

Definition at line 121 of file thermo_elastic.cpp.

122 {
124 auto out_meshset = get_temp_meshset_ptr(moab);
125 CHKERR moab.add_entities(*out_meshset, r);
126 CHKERR moab.write_file(name.c_str(), "VTK", "", out_meshset->get_ptr(), 1);
128};

◆ SPACE_DIM

int SPACE_DIM
constexpr
Initial value:
=
3
Examples
thermo_elastic.cpp.

Definition at line 25 of file thermo_elastic.cpp.