v0.13.2
Loading...
Searching...
No Matches
Classes | Macros | Typedefs | Functions | Variables
thermo_elastic.cpp File Reference
#include <MoFEM.hpp>
#include <ThermoElasticOps.hpp>

Go to the source code of this file.

Classes

struct  ElementsAndOps< DIM >
 
struct  ElementsAndOps< 2 >
 
struct  ElementsAndOps< 3 >
 
struct  ThermoElasticProblem
 

Macros

#define EXECUTABLE_DIMENSION   3
 

Typedefs

using EntData = EntitiesFieldData::EntData
 
using DomainEle = ElementsAndOps< SPACE_DIM >::DomainEle
 
using DomainEleOp = DomainEle::UserDataOperator
 
using BoundaryEle = ElementsAndOps< SPACE_DIM >::BoundaryEle
 
using BoundaryEleOp = BoundaryEle::UserDataOperator
 
using PostProcEle = PostProcBrokenMeshInMoab< DomainEle >
 
using AssemblyDomainEleOp = FormsIntegrators< DomainEleOp >::Assembly< PETSC >::OpBase
 
using OpKCauchy = FormsIntegrators< DomainEleOp >::Assembly< PETSC >::BiLinearForm< GAUSS >::OpGradSymTensorGrad< 1, SPACE_DIM, SPACE_DIM, 0 >
 [Linear elastic problem] More...
 
using OpInternalForceCauchy = FormsIntegrators< DomainEleOp >::Assembly< PETSC >::LinearForm< GAUSS >::OpGradTimesSymTensor< 1, SPACE_DIM, SPACE_DIM >
 
using OpHdivHdiv = FormsIntegrators< DomainEleOp >::Assembly< PETSC >::BiLinearForm< GAUSS >::OpMass< 3, SPACE_DIM >
 [Linear elastic problem] More...
 
using OpHdivT = FormsIntegrators< DomainEleOp >::Assembly< PETSC >::BiLinearForm< GAUSS >::OpMixDivTimesScalar< SPACE_DIM >
 Integrate Lhs div of base of flux time base of temperature (FLUX x T) and transpose of it, i.e. (T x FLAX) More...
 
using OpCapacity = FormsIntegrators< DomainEleOp >::Assembly< PETSC >::BiLinearForm< GAUSS >::OpMass< 1, 1 >
 Integrate Lhs base of temperature times (heat capacity) times base of temperature (T x T) More...
 
using OpHdivFlux = FormsIntegrators< DomainEleOp >::Assembly< PETSC >::LinearForm< GAUSS >::OpBaseTimesVector< 3, SPACE_DIM, 1 >
 Integrating Rhs flux base (1/k) flux (FLUX) More...
 
using OpHDivTemp = FormsIntegrators< DomainEleOp >::Assembly< PETSC >::LinearForm< GAUSS >::OpMixDivTimesU< 3, 1, 2 >
 Integrate Rhs div flux base times temperature (T) More...
 
using OpBaseDotT = FormsIntegrators< DomainEleOp >::Assembly< PETSC >::LinearForm< GAUSS >::OpBaseTimesScalar< 1 >
 Integrate Rhs base of temperature time heat capacity times heat rate (T) More...
 
using OpBaseDivFlux = OpBaseDotT
 Integrate Rhs base of temperature times divergence of flux (T) More...
 
using DomainNaturalBC = NaturalBC< DomainEleOp >::Assembly< PETSC >::LinearForm< GAUSS >
 [Thermal problem] More...
 
using OpBodyForce = DomainNaturalBC::OpFlux< NaturalMeshsetType< BLOCKSET >, 1, SPACE_DIM >
 
using OpHeatSource = DomainNaturalBC::OpFlux< NaturalMeshsetType< BLOCKSET >, 1, 1 >
 
using BoundaryNaturalBC = NaturalBC< BoundaryEleOp >::Assembly< PETSC >::LinearForm< GAUSS >
 [Body and heat source] More...
 
using OpForce = BoundaryNaturalBC::OpFlux< NaturalForceMeshsets, 1, SPACE_DIM >
 
using OpTemperatureBC = BoundaryNaturalBC::OpFlux< NaturalTemperatureMeshsets, 3, SPACE_DIM >
 
using OpEssentialFluxRhs = EssentialBC< BoundaryEleOp >::Assembly< PETSC >::LinearForm< GAUSS >::OpEssentialRhs< HeatFluxCubitBcData, 3, SPACE_DIM >
 [Natural boundary conditions] More...
 
using OpEssentialFluxLhs = EssentialBC< BoundaryEleOp >::Assembly< PETSC >::BiLinearForm< GAUSS >::OpEssentialLhs< HeatFluxCubitBcData, 3, SPACE_DIM >
 

Functions

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

Variables

constexpr int SPACE_DIM
 
double young_modulus = 1
 [Essential boundary conditions (Least square approach)] More...
 
double poisson_ratio = 0.25
 
double coeff_expansion = 1
 
double ref_temp = 0.0
 
double heat_conductivity
 
double heat_capacity = 1
 
int order = 2
 
static char help [] = "...\n\n"
 

Macro Definition Documentation

◆ EXECUTABLE_DIMENSION

#define EXECUTABLE_DIMENSION   3

Definition at line 10 of file thermo_elastic.cpp.

Typedef Documentation

◆ AssemblyDomainEleOp

Definition at line 39 of file thermo_elastic.cpp.

◆ BoundaryEle

Definition at line 35 of file thermo_elastic.cpp.

◆ BoundaryEleOp

Definition at line 36 of file thermo_elastic.cpp.

◆ BoundaryNaturalBC

using BoundaryNaturalBC = NaturalBC<BoundaryEleOp>::Assembly<PETSC>::LinearForm<GAUSS>

[Body and heat source]

[Natural boundary conditions]

Definition at line 115 of file thermo_elastic.cpp.

◆ DomainEle

Definition at line 33 of file thermo_elastic.cpp.

◆ DomainEleOp

Definition at line 34 of file thermo_elastic.cpp.

◆ DomainNaturalBC

using DomainNaturalBC = NaturalBC<DomainEleOp>::Assembly<PETSC>::LinearForm<GAUSS>

[Thermal problem]

[Body and heat source]

Definition at line 106 of file thermo_elastic.cpp.

◆ EntData

Definition at line 32 of file thermo_elastic.cpp.

◆ OpBaseDivFlux

Integrate Rhs base of temperature times divergence of flux (T)

Examples
thermo_elastic.cpp.

Definition at line 101 of file thermo_elastic.cpp.

◆ OpBaseDotT

using OpBaseDotT = FormsIntegrators<DomainEleOp>::Assembly<PETSC>::LinearForm< GAUSS>::OpBaseTimesScalar<1>

Integrate Rhs base of temperature time heat capacity times heat rate (T)

Examples
thermo_elastic.cpp.

Definition at line 94 of file thermo_elastic.cpp.

◆ OpBodyForce

Definition at line 108 of file thermo_elastic.cpp.

◆ OpCapacity

using OpCapacity = FormsIntegrators<DomainEleOp>::Assembly<PETSC>::BiLinearForm< GAUSS>::OpMass<1, 1>

Integrate Lhs base of temperature times (heat capacity) times base of temperature (T x T)

Examples
thermo_elastic.cpp.

Definition at line 73 of file thermo_elastic.cpp.

◆ OpEssentialFluxLhs

Definition at line 126 of file thermo_elastic.cpp.

◆ OpEssentialFluxRhs

[Natural boundary conditions]

[Essential boundary conditions (Least square approach)]

Definition at line 123 of file thermo_elastic.cpp.

◆ OpForce

Definition at line 117 of file thermo_elastic.cpp.

◆ OpHdivFlux

using OpHdivFlux = FormsIntegrators<DomainEleOp>::Assembly<PETSC>::LinearForm< GAUSS>::OpBaseTimesVector<3, SPACE_DIM, 1>

Integrating Rhs flux base (1/k) flux (FLUX)

Examples
thermo_elastic.cpp.

Definition at line 79 of file thermo_elastic.cpp.

◆ OpHdivHdiv

[Linear elastic problem]

[Thermal problem]

Integrate Lhs base of flux (1/k) base of flux (FLUX x FLUX)

Examples
phase.cpp, and thermo_elastic.cpp.

Definition at line 57 of file thermo_elastic.cpp.

◆ OpHdivT

using OpHdivT = FormsIntegrators<DomainEleOp>::Assembly<PETSC>::BiLinearForm< GAUSS>::OpMixDivTimesScalar<SPACE_DIM>

Integrate Lhs div of base of flux time base of temperature (FLUX x T) and transpose of it, i.e. (T x FLAX)

Examples
thermo_elastic.cpp.

Definition at line 65 of file thermo_elastic.cpp.

◆ OpHDivTemp

using OpHDivTemp = FormsIntegrators<DomainEleOp>::Assembly<PETSC>::LinearForm< GAUSS>::OpMixDivTimesU<3, 1, 2>

Integrate Rhs div flux base times temperature (T)

Examples
thermo_elastic.cpp.

Definition at line 86 of file thermo_elastic.cpp.

◆ OpHeatSource

Definition at line 110 of file thermo_elastic.cpp.

◆ OpInternalForceCauchy

using OpInternalForceCauchy = FormsIntegrators<DomainEleOp>::Assembly<PETSC>::LinearForm< GAUSS>::OpGradTimesSymTensor<1, SPACE_DIM, SPACE_DIM>
Examples
thermo_elastic.cpp.

Definition at line 46 of file thermo_elastic.cpp.

◆ OpKCauchy

using OpKCauchy = FormsIntegrators<DomainEleOp>::Assembly<PETSC>::BiLinearForm< GAUSS>::OpGradSymTensorGrad<1, SPACE_DIM, SPACE_DIM, 0>

[Linear elastic problem]

Examples
thermo_elastic.cpp.

Definition at line 43 of file thermo_elastic.cpp.

◆ OpTemperatureBC

Definition at line 118 of file thermo_elastic.cpp.

◆ PostProcEle

Definition at line 37 of file thermo_elastic.cpp.

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 648 of file thermo_elastic.cpp.

648 {
649
650 // Initialisation of MoFEM/PETSc and MOAB data structures
651 const char param_file[] = "param_file.petsc";
653
654 // Add logging channel for example
655 auto core_log = logging::core::get();
656 core_log->add_sink(
658 LogManager::setLog("ThermoElastic");
659 MOFEM_LOG_TAG("ThermoElastic", "ThermoElastic");
660
661 try {
662
663 //! [Register MoFEM discrete manager in PETSc]
664 DMType dm_name = "DMMOFEM";
665 CHKERR DMRegister_MoFEM(dm_name);
666 //! [Register MoFEM discrete manager in PETSc
667
668 //! [Create MoAB]
669 moab::Core mb_instance; ///< mesh database
670 moab::Interface &moab = mb_instance; ///< mesh database interface
671 //! [Create MoAB]
672
673 //! [Create MoFEM]
674 MoFEM::Core core(moab); ///< finite element database
675 MoFEM::Interface &m_field = core; ///< finite element database interface
676 //! [Create MoFEM]
677
678 //! [Load mesh]
679 Simple *simple = m_field.getInterface<Simple>();
680 CHKERR simple->getOptions();
681 CHKERR simple->loadFile();
682 //! [Load mesh]
683
684 //! [ThermoElasticProblem]
685 ThermoElasticProblem ex(m_field);
686 CHKERR ex.runProblem();
687 //! [ThermoElasticProblem]
688 }
690
692}
std::string param_file
void simple(double P1[], double P2[], double P3[], double c[], const int N)
Definition: acoustic.cpp:69
#define CATCH_ERRORS
Catch errors.
Definition: definitions.h:372
#define CHKERR
Inline error check.
Definition: definitions.h:535
PetscErrorCode DMRegister_MoFEM(const char sname[])
Register MoFEM problem.
Definition: DMMoFEM.cpp:47
static LoggerType & setLog(const std::string channel)
Set ans resset chanel logger.
Definition: LogManager.cpp:389
#define MOFEM_LOG_TAG(channel, tag)
Tag channel.
Definition: LogManager.hpp:339
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:112
Deprecated interface functions.
static boost::shared_ptr< SinkType > createSink(boost::shared_ptr< std::ostream > stream_ptr, std::string comm_filter)
Create a sink object.
Definition: LogManager.cpp:298
static boost::shared_ptr< std::ostream > getStrmWorld()
Get the strm world object.
Definition: LogManager.cpp:344
Simple interface for fast problem set-up.
Definition: Simple.hpp:27
MoFEMErrorCode getInterface(IFACE *&iface) const
Get interface refernce to pointer of interface.
static char help[]

Variable Documentation

◆ coeff_expansion

double coeff_expansion = 1
Examples
ThermoElasticOps.hpp, and thermo_elastic.cpp.

Definition at line 133 of file thermo_elastic.cpp.

◆ heat_capacity

double heat_capacity = 1
Examples
thermo_elastic.cpp.

Definition at line 139 of file thermo_elastic.cpp.

◆ heat_conductivity

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

Definition at line 136 of file thermo_elastic.cpp.

◆ help

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

Definition at line 646 of file thermo_elastic.cpp.

◆ order

int order = 2
Examples
thermo_elastic.cpp.

Definition at line 142 of file thermo_elastic.cpp.

◆ poisson_ratio

double poisson_ratio = 0.25
Examples
thermo_elastic.cpp.

Definition at line 132 of file thermo_elastic.cpp.

◆ ref_temp

double ref_temp = 0.0
Examples
ThermoElasticOps.hpp, and thermo_elastic.cpp.

Definition at line 134 of file thermo_elastic.cpp.

◆ SPACE_DIM

constexpr int SPACE_DIM
constexpr
Initial value:
=
#define EXECUTABLE_DIMENSION
Examples
thermo_elastic.cpp.

Definition at line 29 of file thermo_elastic.cpp.

◆ young_modulus

double young_modulus = 1

[Essential boundary conditions (Least square approach)]

Examples
thermo_elastic.cpp.

Definition at line 131 of file thermo_elastic.cpp.